{"version":3,"sources":["webpack:///./node_modules/gatsby/node_modules/core-js/internals/string-trim.js","webpack:///./node_modules/gatsby/node_modules/core-js/internals/string-trim-forced.js","webpack:///./node_modules/lodash/_isFlattenable.js","webpack:///./node_modules/tiny-invariant/dist/tiny-invariant.esm.js","webpack:///./src/pages/search.js","webpack:///./node_modules/react-lunr/dist/react-lunr.esm.js","webpack:///./node_modules/gatsby/node_modules/core-js/modules/es.string.trim-right.js","webpack:///./node_modules/lodash/_castFunction.js","webpack:///./node_modules/lodash/_baseForOwn.js","webpack:///./node_modules/gatsby/node_modules/core-js/internals/whitespaces.js","webpack:///./node_modules/lunr/lunr.js","webpack:///./node_modules/lodash/_baseEach.js","webpack:///./node_modules/lodash/flatten.js","webpack:///./node_modules/lodash/_baseFlatten.js","webpack:///./node_modules/gatsby/node_modules/core-js/internals/string-trim-end.js","webpack:///./node_modules/lodash/forEach.js","webpack:///./node_modules/lodash/_arrayEach.js","webpack:///./node_modules/lodash/_createBaseEach.js","webpack:///./node_modules/gatsby/node_modules/core-js/modules/es.string.trim-end.js","webpack:///./node_modules/lodash/each.js","webpack:///./src/components/home/menu.js"],"names":["uncurryThis","requireObjectCoercible","toString","whitespaces","replace","whitespace","ltrim","RegExp","rtrim","createMethod","TYPE","$this","string","module","exports","start","end","trim","PROPER_FUNCTION_NAME","PROPER","fails","METHOD_NAME","name","Symbol","isArguments","isArray","spreadableSymbol","isConcatSpreadable","undefined","value","condition","message","Error","getIndexStore","SearchPage","asmetHome","useAsmetHome","useStaticQuery","queryData","fotosResult","allStrapiMediaFoto","edges","audiosResult","allStrapiMediaAudio","videosResult","allStrapiMediaVideo","eventosResult","allStrapiMediaEvento","noticiasResult","allStrapiMediaNoticia","paginasResult","allStrapiAsmetPagina","articulosResult","allStrapiBlogArticulo","categoriasResult","allStrapiBlogCategoria","subcategoriasResult","allStrapiBlogSubcategoria","flattenData","indexData","componentsList","forEach","item","node","id","split","push","componente","index","store","useState","query","setQuery","results","rawIndex","rawStore","load","JSON","parse","search","map","_ref","ref","useLunr","meta","og_titulo","className","htmlFor","type","aria-label","aria-describedby","placeholder","onChange","event","target","trimEnd","length","key","format","fecha","publicado_en","published_at","titulo","nombre","slug","content","descripcion","to","menuSecundario","menu_secundario","data","lunr","this","field","doc","add","$","proto","forced","trimRight","identity","baseFor","keys","object","iteratee","global","step2list","step3list","v","C","re_mgr0","re_mgr1","re_meq1","re_s_v","re_1a","re2_1a","re_1b","re2_1b","re_1b_2","re2_1b_2","re3_1b_2","re4_1b_2","re_1c","re_2","re_3","re_4","re2_4","re_5","re_5_1","re3_5","porterStemmer","config","builder","Builder","pipeline","trimmer","stopWordFilter","stemmer","searchPipeline","call","build","version","utils","warn","console","asString","obj","clone","Object","create","i","val","Array","slice","TypeError","FieldRef","docRef","fieldName","stringValue","_stringValue","joiner","fromString","s","n","indexOf","fieldRef","prototype","Set","elements","complete","intersect","other","union","contains","empty","a","b","intersection","element","concat","idf","posting","documentCount","documentsWithTerm","x","Math","log","abs","Token","str","metadata","update","fn","tokenizer","t","toLowerCase","len","tokens","sliceEnd","sliceStart","sliceLength","charAt","match","separator","tokenMetadata","Pipeline","_stack","registeredFunctions","registerFunction","label","warnIfFunctionNotRegistered","serialised","fnName","fns","arguments","after","existingFn","newFn","pos","splice","before","remove","run","stackLength","memo","j","result","k","runString","token","reset","toJSON","Vector","_magnitude","positionForIndex","pivotPoint","floor","pivotIndex","insert","insertIdx","upsert","position","magnitude","sumOfSquares","elementsLength","sqrt","dot","otherVector","dotProduct","aLen","bLen","aVal","bVal","similarity","toArray","output","c","w","stem","suffix","firstch","re","re2","re3","re4","substr","toUpperCase","test","fp","exec","generateStopWordFilter","stopWords","words","reduce","stopWord","TokenSet","final","_nextId","fromArray","arr","finish","root","fromClause","clause","fromFuzzyString","term","editDistance","stack","editsRemaining","frame","pop","noEditNode","char","insertionNode","substitutionNode","transposeNode","charA","charB","next","prefix","edge","_str","labels","sort","qNode","qEdges","qLen","nEdges","nLen","q","qEdge","nEdge","previousWord","uncheckedNodes","minimizedNodes","word","commonPrefix","minimize","child","nextNode","parent","downTo","childKey","Index","attrs","invertedIndex","fieldVectors","tokenSet","fields","queryString","QueryParser","Query","matchingFields","queryVectors","termFieldCache","requiredMatches","prohibitedMatches","clauses","terms","clauseMatches","usePipeline","m","termTokenSet","expandedTerms","presence","REQUIRED","expandedTerm","termIndex","_index","fieldPosting","matchingDocumentRefs","termField","matchingDocumentsSet","PROHIBITED","boost","l","fieldMatch","matchingDocumentRef","matchingFieldRef","MatchData","allRequiredMatches","allProhibitedMatches","matchingFieldRefs","matches","isNegated","docMatch","fieldVector","score","matchData","combine","serializedIndex","serializedVectors","serializedInvertedIndex","tokenSetBuilder","tuple","_fields","_documents","fieldTermFrequencies","fieldLengths","_b","_k1","metadataWhitelist","attributes","RangeError","number","k1","extractor","fieldTerms","metadataKey","calculateAverageFieldLengths","fieldRefs","numberOfFields","accumulator","documentsWithField","averageFieldLength","createFieldVectors","fieldRefsLength","termIdfCache","fieldLength","termFrequencies","termsLength","fieldBoost","docBoost","scoreWithPrecision","tf","round","createTokenSet","use","args","unshift","apply","clonedMetadata","metadataKeys","otherMatchData","allFields","wildcard","String","NONE","LEADING","TRAILING","OPTIONAL","options","QueryParseError","QueryLexer","lexemes","escapeCharPositions","state","lexText","sliceString","subSlices","join","emit","escapeCharacter","EOS","width","ignore","backup","acceptDigitRun","charCode","charCodeAt","more","FIELD","TERM","EDIT_DISTANCE","BOOST","PRESENCE","lexField","lexer","lexTerm","lexEditDistance","lexBoost","lexEOS","termSeparator","currentClause","lexemeIdx","parseClause","peekLexeme","consumeLexeme","lexeme","nextClause","completedClause","parser","parsePresence","parseField","parseTerm","errorMessage","nextLexeme","possibleFields","f","parseEditDistance","parseBoost","parseInt","isNaN","baseForOwn","baseEach","createBaseEach","baseFlatten","array","arrayPush","isFlattenable","depth","predicate","isStrict","$trimEnd","forcedStringTrimMethod","arrayEach","castFunction","collection","isArrayLike","eachFunc","fromRight","iterable","Menu","props","link","customClass","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Q,QACZrB,EAAU,EAAQ,QAKtBqB,EAAE,CAAEtB,OAAQ,SAAUuB,OAAO,EAAM/F,KAAM,UAAWgG,OAAQ,GAAGvB,UAAYA,GAAW,CACpFA,QAASA,K,qBCTXlF,EAAOC,QAAU,EAAQ,S,kCCAzB,qCAMMkf,EAAO,SAAAC,GACX,IAAQrZ,EAAmBqZ,EAAnBrZ,eACR,OACE,yBAAK5C,GAAG,WAAWsB,UAAU,0BAC3B,yBAAKA,UAAU,OACZsB,EAAe5B,KAAI,SAAClB,EAAMM,GACzB,OACE,yBAAKkB,UAAU,qBAAqBW,IAAK7B,GACvC,kBAAC,IAAU,CACT8b,KAAMpc,EACNqc,YAAa,YAAwB,IAAV/b,EAAc,UAAY,KAErD,yBAAKgc,IAAKtc,EAAKuc,OAASvc,EAAKuc,MAAMC,UAAYxc,EAAKuc,MAAMC,UAAY,4BAA6BC,IAAKzc,EAAKyC,SAC5GzC,EAAKyC,eAuBtByZ,EAAKQ,aAAe,CAClB5Z,eAAgB,CACd,CACEL,OAAO,uBACPka,KAAK,SACLC,QAAQ,IACRL,MAAO,CACLC,UAAU,oFAMHN","file":"component---src-pages-search-js-2f0cd5bf48195ec79088.js","sourcesContent":["var uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar replace = uncurryThis(''.replace);\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = toString(requireObjectCoercible($this));\n if (TYPE & 1) string = replace(string, ltrim, '');\n if (TYPE & 2) string = replace(string, rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","var PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]()\n || non[METHOD_NAME]() !== non\n || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);\n });\n};\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n throw new Error(prefix + \": \" + (message || ''));\n}\nexport default invariant;","import React, { useState } from \"react\"\nimport { Link } from \"gatsby\"\nimport { graphql, useStaticQuery } from \"gatsby\"\nimport { useLunr } from \"react-lunr\"\nimport lunr from \"lunr\"\nimport _ from \"lodash\"\nimport Moment from \"react-moment\"\n\n// Layout\nimport Layout from \"../components/layout\"\n// Components\nimport Menu from \"../components/home/menu\"\nimport ContentToHTML from \"../components/elements/content-html\"\n\n// Hooks\nimport { useAsmetHome } from \"../hooks/use-asmet-home\"\n\nconst SearchPage = () => {\n const asmetHome = useAsmetHome()\n\n const {\n // Media\n allStrapiMediaFoto: { edges: fotosResult },\n allStrapiMediaAudio: { edges: audiosResult },\n allStrapiMediaVideo: { edges: videosResult },\n allStrapiMediaEvento: { edges: eventosResult },\n allStrapiMediaNoticia: { edges: noticiasResult },\n // Paginas\n allStrapiAsmetPagina: { edges: paginasResult },\n // Blog\n allStrapiBlogArticulo: { edges: articulosResult },\n allStrapiBlogCategoria: { edges: categoriasResult },\n allStrapiBlogSubcategoria: { edges: subcategoriasResult },\n } = useStaticQuery(queryData)\n\n const { flattenData } = {\n flattenData: _.flatten([\n fotosResult,\n audiosResult,\n videosResult,\n eventosResult,\n noticiasResult,\n paginasResult,\n articulosResult,\n categoriasResult,\n subcategoriasResult,\n ]),\n }\n\n const indexData = []\n const componentsList = {\n \"Media-foto\": \"fotos\",\n \"Media-audio\": \"audios\",\n \"Media-video\": \"videos\",\n \"Media-evento\": \"events\",\n \"Media-noticia\": \"noticias\",\n \"Asmet-pagina\": \"pagina\",\n \"Blog-articulo\": \"blog\",\n \"Blog-categoria\": \"blog\",\n \"Blog-subcategoria\": \"blog\",\n }\n\n flattenData.forEach(item => {\n if (componentsList[item.node.id.split(\"_\")[0]]) {\n indexData.push({\n ...item.node,\n componente: componentsList[item.node.id.split(\"_\")[0]],\n })\n }\n })\n\n const { index, store } = getIndexStore(indexData)\n const [query, setQuery] = useState(\"\")\n\n const results = useLunr(query, index, store)\n\n return (\n <Layout meta={{ og_titulo: \"Búsqueda\" }}>\n <div id=\"asm-template-header\" className=\"contanier-fluid pt-5 pb-3\">\n <h2 className=\"text-white-alpha text-center\">Búsqueda</h2>\n </div>\n <div id=\"asm-search-main\" className=\"container-fluid mb-5\">\n <div className=\"row\">\n <div className=\"col-12 col-sm-5 pl-0 pr-0 pr-sm-3\">\n <form className=\"bg-gray-alpha position-relative text-center px-5 py-4\">\n <div className=\"form-group mb-4\">\n <label htmlFor=\"inputSearch\">\n Escribe tu búsqueda en el siguiente campo de texto\n </label>\n <input\n type=\"text\"\n aria-label=\"inputSearch\"\n className=\"form-control border-0 rounded-pill text-center py-4\"\n id=\"inputSearch\"\n aria-describedby=\"searchField\"\n placeholder=\"Estilo de vida saludable\"\n onChange={event => {\n setQuery(event.target.value.trimEnd())\n }}\n />\n </div>\n </form>\n </div>\n <div className=\"col-12 col-sm-6 py-5\">\n {results.length === 0 ? (\n <p className=\"search-results text-center\">\n Intenta realizar una búsqueda!\n </p>\n ) : (\n <div>\n <p className=\"search-results text-center\">\n {`1 a ${results.length} de ${results.length} resultados`}\n </p>\n {results.map((item, index) => (\n <div className=\"card border-0\" key={index}>\n <div className=\"card-body px-1 px-sm-4 pb-0\">\n <p className=\"card-subtitle mb-2 text-muted\">\n Fecha de publicación: \n <Moment format=\"LL\">\n {item.fecha || item.publicado_en || item.published_at}\n </Moment>\n </p>\n <h5 className=\"card-title mb-1\">\n {item.titulo\n ? item.titulo\n : item.nombre\n ? item.nombre\n : item.slug}\n </h5>\n <div className=\"card-text\">\n <ContentToHTML\n content={\n item.descripcion\n ? item.descripcion\n : \"No hay una descripción preliminar.\"\n }\n />\n </div>\n <Link\n to={`/${item.componente}/${item.slug}`}\n className=\"stretched-link\"\n >\n {\"\"}\n </Link>\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n </div>\n <hr />\n <Menu menuSecundario={asmetHome.menu_secundario}/>\n </Layout>\n )\n}\n\nexport default SearchPage\n\nconst getIndexStore = data => {\n const index = lunr(function () {\n this.field(\"titulo\")\n this.field(\"nombre\")\n this.field(\"descripcion\")\n\n data.forEach(function (doc) {\n this.add(doc)\n }, this)\n })\n\n let store = {}\n _.each(data, function (item) {\n store[item.id] = {\n id: item.id,\n slug: item.slug,\n componente: item.componente,\n ...(item.titulo ? { titulo: item.titulo } : {}),\n ...(item.nombre ? { nombre: item.nombre } : {}),\n ...(item.fecha ? { fecha: item.fecha } : {}),\n ...(item.descripcion ? { descripcion: item.descripcion } : {}),\n ...(item.publicado_en ? { publicado_en: item.publicado_en } : {}),\n ...(item.published_at ? { published_at: item.publicado_en } : {}),\n }\n })\n\n return {\n index: index,\n store: store,\n }\n}\n\nconst queryData = graphql`\n query {\n allStrapiMediaEvento(sort: { order: DESC, fields: fecha }) {\n edges {\n node {\n id\n slug\n nombre\n fecha\n descripcion\n }\n }\n }\n allStrapiMediaNoticia(sort: { order: DESC, fields: fecha }) {\n edges {\n node {\n id\n slug\n titulo\n fecha\n descripcion\n }\n }\n }\n allStrapiMediaFoto(sort: { order: DESC, fields: fecha }) {\n edges {\n node {\n id\n slug\n titulo\n fecha\n descripcion\n }\n }\n }\n allStrapiMediaAudio(sort: { order: DESC, fields: publicado_en }) {\n edges {\n node {\n id\n slug\n titulo\n descripcion\n publicado_en\n }\n }\n }\n allStrapiMediaVideo(sort: { order: DESC, fields: publicado_en }) {\n edges {\n node {\n id\n slug\n titulo\n descripcion\n publicado_en\n }\n }\n }\n allStrapiAsmetPagina(sort: { order: DESC, fields: published_at }) {\n edges {\n node {\n id\n slug\n titulo\n published_at\n }\n }\n }\n allStrapiBlogArticulo(sort: { order: DESC, fields: publicado_en }) {\n edges {\n node {\n id\n slug\n titulo\n descripcion\n publicado_en\n }\n }\n }\n allStrapiBlogCategoria(sort: { order: DESC, fields: published_at }) {\n edges {\n node {\n id\n slug\n nombre\n published_at\n }\n }\n }\n allStrapiBlogSubcategoria(sort: { order: DESC, fields: published_at }) {\n edges {\n node {\n id\n slug\n nombre\n descripcion\n published_at\n }\n }\n }\n }\n`\n","import { useMemo } from 'react';\nimport { Index } from 'lunr';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\nvar useLunr = function useLunr(query, rawIndex, rawStore) {\n var index = useMemo(function () {\n if (rawIndex === undefined || rawIndex === null) {\n process.env.NODE_ENV !== \"production\" ? warning(rawIndex !== undefined && rawIndex !== null, 'No index was provided. Results will always be empty.') : void 0;\n return;\n }\n if (rawIndex instanceof Index) return rawIndex;\n if (typeof rawIndex === 'string') return Index.load(JSON.parse(rawIndex));\n if (typeof rawIndex === 'object') return Index.load(rawIndex);\n process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid index provided. Please provide an instance of Lunr.Index or exported JSON or string index.') : invariant(false);\n }, [rawIndex]);\n var store = useMemo(function () {\n if (typeof rawStore === 'string') return JSON.parse(rawStore);\n return rawStore;\n }, [rawStore]);\n return useMemo(function () {\n if (!query || !index) return [];\n var results = index.search(query);\n if (store) return results.map(function (_ref) {\n var ref = _ref.ref;\n return store[ref];\n });\n return results;\n }, [query, index, store]);\n};\nexport { useLunr };","var $ = require('../internals/export');\nvar trimEnd = require('../internals/string-trim-end');\n\n// `String.prototype.trimRight` method\n// https://tc39.es/ecma262/#sec-string.prototype.trimend\n// eslint-disable-next-line es/no-string-prototype-trimleft-trimright -- safe\n$({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimRight !== trimEnd }, {\n trimRight: trimEnd\n});\n","var identity = require('./identity');\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","require(\"core-js/modules/es.array.reduce.js\");\nrequire(\"core-js/modules/es.array.sort.js\");\n/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9\n * Copyright (C) 2020 Oliver Nightingale\n * @license MIT\n */\n\n;\n(function () {\n /**\n * A convenience function for configuring and constructing\n * a new lunr Index.\n *\n * A lunr.Builder instance is created and the pipeline setup\n * with a trimmer, stop word filter and stemmer.\n *\n * This builder object is yielded to the configuration function\n * that is passed as a parameter, allowing the list of fields\n * and other builder parameters to be customised.\n *\n * All documents _must_ be added within the passed config function.\n *\n * @example\n * var idx = lunr(function () {\n * this.field('title')\n * this.field('body')\n * this.ref('id')\n *\n * documents.forEach(function (doc) {\n * this.add(doc)\n * }, this)\n * })\n *\n * @see {@link lunr.Builder}\n * @see {@link lunr.Pipeline}\n * @see {@link lunr.trimmer}\n * @see {@link lunr.stopWordFilter}\n * @see {@link lunr.stemmer}\n * @namespace {function} lunr\n */\n var lunr = function lunr(config) {\n var builder = new lunr.Builder();\n builder.pipeline.add(lunr.trimmer, lunr.stopWordFilter, lunr.stemmer);\n builder.searchPipeline.add(lunr.stemmer);\n config.call(builder, builder);\n return builder.build();\n };\n lunr.version = \"2.3.9\";\n /*!\n * lunr.utils\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * A namespace containing utils for the rest of the lunr library\n * @namespace lunr.utils\n */\n lunr.utils = {};\n\n /**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf lunr.utils\n * @function\n */\n lunr.utils.warn = function (global) {\n /* eslint-disable no-console */\n return function (message) {\n if (global.console && console.warn) {\n console.warn(message);\n }\n };\n /* eslint-enable no-console */\n }(this);\n\n /**\n * Convert an object to a string.\n *\n * In the case of `null` and `undefined` the function returns\n * the empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {Any} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf lunr.utils\n */\n lunr.utils.asString = function (obj) {\n if (obj === void 0 || obj === null) {\n return \"\";\n } else {\n return obj.toString();\n }\n };\n\n /**\n * Clones an object.\n *\n * Will create a copy of an existing object such that any mutations\n * on the copy cannot affect the original.\n *\n * Only shallow objects are supported, passing a nested object to this\n * function will cause a TypeError.\n *\n * Objects with primitives, and arrays of primitives are supported.\n *\n * @param {Object} obj The object to clone.\n * @return {Object} a clone of the passed object.\n * @throws {TypeError} when a nested object is passed.\n * @memberOf Utils\n */\n lunr.utils.clone = function (obj) {\n if (obj === null || obj === undefined) {\n return obj;\n }\n var clone = Object.create(null),\n keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i],\n val = obj[key];\n if (Array.isArray(val)) {\n clone[key] = val.slice();\n continue;\n }\n if (typeof val === 'string' || typeof val === 'number' || typeof val === 'boolean') {\n clone[key] = val;\n continue;\n }\n throw new TypeError(\"clone is not deep and does not support nested objects\");\n }\n return clone;\n };\n lunr.FieldRef = function (docRef, fieldName, stringValue) {\n this.docRef = docRef;\n this.fieldName = fieldName;\n this._stringValue = stringValue;\n };\n lunr.FieldRef.joiner = \"/\";\n lunr.FieldRef.fromString = function (s) {\n var n = s.indexOf(lunr.FieldRef.joiner);\n if (n === -1) {\n throw \"malformed field ref string\";\n }\n var fieldRef = s.slice(0, n),\n docRef = s.slice(n + 1);\n return new lunr.FieldRef(docRef, fieldRef, s);\n };\n lunr.FieldRef.prototype.toString = function () {\n if (this._stringValue == undefined) {\n this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef;\n }\n return this._stringValue;\n };\n /*!\n * lunr.Set\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * A lunr set.\n *\n * @constructor\n */\n lunr.Set = function (elements) {\n this.elements = Object.create(null);\n if (elements) {\n this.length = elements.length;\n for (var i = 0; i < this.length; i++) {\n this.elements[elements[i]] = true;\n }\n } else {\n this.length = 0;\n }\n };\n\n /**\n * A complete set that contains all elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\n lunr.Set.complete = {\n intersect: function intersect(other) {\n return other;\n },\n union: function union() {\n return this;\n },\n contains: function contains() {\n return true;\n }\n };\n\n /**\n * An empty set that contains no elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\n lunr.Set.empty = {\n intersect: function intersect() {\n return this;\n },\n union: function union(other) {\n return other;\n },\n contains: function contains() {\n return false;\n }\n };\n\n /**\n * Returns true if this set contains the specified object.\n *\n * @param {object} object - Object whose presence in this set is to be tested.\n * @returns {boolean} - True if this set contains the specified object.\n */\n lunr.Set.prototype.contains = function (object) {\n return !!this.elements[object];\n };\n\n /**\n * Returns a new set containing only the elements that are present in both\n * this set and the specified set.\n *\n * @param {lunr.Set} other - set to intersect with this set.\n * @returns {lunr.Set} a new set that is the intersection of this and the specified set.\n */\n\n lunr.Set.prototype.intersect = function (other) {\n var a,\n b,\n elements,\n intersection = [];\n if (other === lunr.Set.complete) {\n return this;\n }\n if (other === lunr.Set.empty) {\n return other;\n }\n if (this.length < other.length) {\n a = this;\n b = other;\n } else {\n a = other;\n b = this;\n }\n elements = Object.keys(a.elements);\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i];\n if (element in b.elements) {\n intersection.push(element);\n }\n }\n return new lunr.Set(intersection);\n };\n\n /**\n * Returns a new set combining the elements of this and the specified set.\n *\n * @param {lunr.Set} other - set to union with this set.\n * @return {lunr.Set} a new set that is the union of this and the specified set.\n */\n\n lunr.Set.prototype.union = function (other) {\n if (other === lunr.Set.complete) {\n return lunr.Set.complete;\n }\n if (other === lunr.Set.empty) {\n return this;\n }\n return new lunr.Set(Object.keys(this.elements).concat(Object.keys(other.elements)));\n };\n /**\n * A function to calculate the inverse document frequency for\n * a posting. This is shared between the builder and the index\n *\n * @private\n * @param {object} posting - The posting for a given term\n * @param {number} documentCount - The total number of documents.\n */\n lunr.idf = function (posting, documentCount) {\n var documentsWithTerm = 0;\n for (var fieldName in posting) {\n if (fieldName == '_index') continue; // Ignore the term index, its not a field\n documentsWithTerm += Object.keys(posting[fieldName]).length;\n }\n var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5);\n return Math.log(1 + Math.abs(x));\n };\n\n /**\n * A token wraps a string representation of a token\n * as it is passed through the text processing pipeline.\n *\n * @constructor\n * @param {string} [str=''] - The string token being wrapped.\n * @param {object} [metadata={}] - Metadata associated with this token.\n */\n lunr.Token = function (str, metadata) {\n this.str = str || \"\";\n this.metadata = metadata || {};\n };\n\n /**\n * Returns the token string that is being wrapped by this object.\n *\n * @returns {string}\n */\n lunr.Token.prototype.toString = function () {\n return this.str;\n };\n\n /**\n * A token update function is used when updating or optionally\n * when cloning a token.\n *\n * @callback lunr.Token~updateFunction\n * @param {string} str - The string representation of the token.\n * @param {Object} metadata - All metadata associated with this token.\n */\n\n /**\n * Applies the given function to the wrapped string token.\n *\n * @example\n * token.update(function (str, metadata) {\n * return str.toUpperCase()\n * })\n *\n * @param {lunr.Token~updateFunction} fn - A function to apply to the token string.\n * @returns {lunr.Token}\n */\n lunr.Token.prototype.update = function (fn) {\n this.str = fn(this.str, this.metadata);\n return this;\n };\n\n /**\n * Creates a clone of this token. Optionally a function can be\n * applied to the cloned token.\n *\n * @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token.\n * @returns {lunr.Token}\n */\n lunr.Token.prototype.clone = function (fn) {\n fn = fn || function (s) {\n return s;\n };\n return new lunr.Token(fn(this.str, this.metadata), this.metadata);\n };\n /*!\n * lunr.tokenizer\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * A function for splitting a string into tokens ready to be inserted into\n * the search index. Uses `lunr.tokenizer.separator` to split strings, change\n * the value of this property to change how strings are split into tokens.\n *\n * This tokenizer will convert its parameter to a string by calling `toString` and\n * then will split this string on the character in `lunr.tokenizer.separator`.\n * Arrays will have their elements converted to strings and wrapped in a lunr.Token.\n *\n * Optional metadata can be passed to the tokenizer, this metadata will be cloned and\n * added as metadata to every token that is created from the object to be tokenized.\n *\n * @static\n * @param {?(string|object|object[])} obj - The object to convert into tokens\n * @param {?object} metadata - Optional metadata to associate with every token\n * @returns {lunr.Token[]}\n * @see {@link lunr.Pipeline}\n */\n lunr.tokenizer = function (obj, metadata) {\n if (obj == null || obj == undefined) {\n return [];\n }\n if (Array.isArray(obj)) {\n return obj.map(function (t) {\n return new lunr.Token(lunr.utils.asString(t).toLowerCase(), lunr.utils.clone(metadata));\n });\n }\n var str = obj.toString().toLowerCase(),\n len = str.length,\n tokens = [];\n for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) {\n var char = str.charAt(sliceEnd),\n sliceLength = sliceEnd - sliceStart;\n if (char.match(lunr.tokenizer.separator) || sliceEnd == len) {\n if (sliceLength > 0) {\n var tokenMetadata = lunr.utils.clone(metadata) || {};\n tokenMetadata[\"position\"] = [sliceStart, sliceLength];\n tokenMetadata[\"index\"] = tokens.length;\n tokens.push(new lunr.Token(str.slice(sliceStart, sliceEnd), tokenMetadata));\n }\n sliceStart = sliceEnd + 1;\n }\n }\n return tokens;\n };\n\n /**\n * The separator used to split a string into tokens. Override this property to change the behaviour of\n * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see lunr.tokenizer\n */\n lunr.tokenizer.separator = /[\\s\\-]+/;\n /*!\n * lunr.Pipeline\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * lunr.Pipelines maintain an ordered list of functions to be applied to all\n * tokens in documents entering the search index and queries being ran against\n * the index.\n *\n * An instance of lunr.Index created with the lunr shortcut will contain a\n * pipeline with a stop word filter and an English language stemmer. Extra\n * functions can be added before or after either of these functions or these\n * default functions can be removed.\n *\n * When run the pipeline will call each function in turn, passing a token, the\n * index of that token in the original list of all tokens and finally a list of\n * all the original tokens.\n *\n * The output of functions in the pipeline will be passed to the next function\n * in the pipeline. To exclude a token from entering the index the function\n * should return undefined, the rest of the pipeline will not be called with\n * this token.\n *\n * For serialisation of pipelines to work, all functions used in an instance of\n * a pipeline should be registered with lunr.Pipeline. Registered functions can\n * then be loaded. If trying to load a serialised pipeline that uses functions\n * that are not registered an error will be thrown.\n *\n * If not planning on serialising the pipeline then registering pipeline functions\n * is not necessary.\n *\n * @constructor\n */\n lunr.Pipeline = function () {\n this._stack = [];\n };\n lunr.Pipeline.registeredFunctions = Object.create(null);\n\n /**\n * A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token\n * string as well as all known metadata. A pipeline function can mutate the token string\n * or mutate (or add) metadata for a given token.\n *\n * A pipeline function can indicate that the passed token should be discarded by returning\n * null, undefined or an empty string. This token will not be passed to any downstream pipeline\n * functions and will not be added to the index.\n *\n * Multiple tokens can be returned by returning an array of tokens. Each token will be passed\n * to any downstream pipeline functions and all will returned tokens will be added to the index.\n *\n * Any number of pipeline functions may be chained together using a lunr.Pipeline.\n *\n * @interface lunr.PipelineFunction\n * @param {lunr.Token} token - A token from the document being processed.\n * @param {number} i - The index of this token in the complete list of tokens for this document/field.\n * @param {lunr.Token[]} tokens - All tokens for this document/field.\n * @returns {(?lunr.Token|lunr.Token[])}\n */\n\n /**\n * Register a function with the pipeline.\n *\n * Functions that are used in the pipeline should be registered if the pipeline\n * needs to be serialised, or a serialised pipeline needs to be loaded.\n *\n * Registering a function does not add it to a pipeline, functions must still be\n * added to instances of the pipeline for them to be used when running a pipeline.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @param {String} label - The label to register this function with\n */\n lunr.Pipeline.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing registered function: ' + label);\n }\n fn.label = label;\n lunr.Pipeline.registeredFunctions[fn.label] = fn;\n };\n\n /**\n * Warns if the function is not registered as a Pipeline function.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @private\n */\n lunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n var isRegistered = fn.label && fn.label in this.registeredFunctions;\n if (!isRegistered) {\n lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn);\n }\n };\n\n /**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with lunr.Pipeline.\n * If any function from the serialised data has not been registered then an\n * error will be thrown.\n *\n * @param {Object} serialised - The serialised pipeline to load.\n * @returns {lunr.Pipeline}\n */\n lunr.Pipeline.load = function (serialised) {\n var pipeline = new lunr.Pipeline();\n serialised.forEach(function (fnName) {\n var fn = lunr.Pipeline.registeredFunctions[fnName];\n if (fn) {\n pipeline.add(fn);\n } else {\n throw new Error('Cannot load unregistered function: ' + fnName);\n }\n });\n return pipeline;\n };\n\n /**\n * Adds new functions to the end of the pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the pipeline.\n */\n lunr.Pipeline.prototype.add = function () {\n var fns = Array.prototype.slice.call(arguments);\n fns.forEach(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn);\n this._stack.push(fn);\n }, this);\n };\n\n /**\n * Adds a single function after a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\n lunr.Pipeline.prototype.after = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn);\n var pos = this._stack.indexOf(existingFn);\n if (pos == -1) {\n throw new Error('Cannot find existingFn');\n }\n pos = pos + 1;\n this._stack.splice(pos, 0, newFn);\n };\n\n /**\n * Adds a single function before a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\n lunr.Pipeline.prototype.before = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn);\n var pos = this._stack.indexOf(existingFn);\n if (pos == -1) {\n throw new Error('Cannot find existingFn');\n }\n this._stack.splice(pos, 0, newFn);\n };\n\n /**\n * Removes a function from the pipeline.\n *\n * @param {lunr.PipelineFunction} fn The function to remove from the pipeline.\n */\n lunr.Pipeline.prototype.remove = function (fn) {\n var pos = this._stack.indexOf(fn);\n if (pos == -1) {\n return;\n }\n this._stack.splice(pos, 1);\n };\n\n /**\n * Runs the current list of functions that make up the pipeline against the\n * passed tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @returns {Array}\n */\n lunr.Pipeline.prototype.run = function (tokens) {\n var stackLength = this._stack.length;\n for (var i = 0; i < stackLength; i++) {\n var fn = this._stack[i];\n var memo = [];\n for (var j = 0; j < tokens.length; j++) {\n var result = fn(tokens[j], j, tokens);\n if (result === null || result === void 0 || result === '') continue;\n if (Array.isArray(result)) {\n for (var k = 0; k < result.length; k++) {\n memo.push(result[k]);\n }\n } else {\n memo.push(result);\n }\n }\n tokens = memo;\n }\n return tokens;\n };\n\n /**\n * Convenience method for passing a string through a pipeline and getting\n * strings out. This method takes care of wrapping the passed string in a\n * token and mapping the resulting tokens back to strings.\n *\n * @param {string} str - The string to pass through the pipeline.\n * @param {?object} metadata - Optional metadata to associate with the token\n * passed to the pipeline.\n * @returns {string[]}\n */\n lunr.Pipeline.prototype.runString = function (str, metadata) {\n var token = new lunr.Token(str, metadata);\n return this.run([token]).map(function (t) {\n return t.toString();\n });\n };\n\n /**\n * Resets the pipeline by removing any existing processors.\n *\n */\n lunr.Pipeline.prototype.reset = function () {\n this._stack = [];\n };\n\n /**\n * Returns a representation of the pipeline ready for serialisation.\n *\n * Logs a warning if the function has not been registered.\n *\n * @returns {Array}\n */\n lunr.Pipeline.prototype.toJSON = function () {\n return this._stack.map(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn);\n return fn.label;\n });\n };\n /*!\n * lunr.Vector\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * A vector is used to construct the vector space of documents and queries. These\n * vectors support operations to determine the similarity between two documents or\n * a document and a query.\n *\n * Normally no parameters are required for initializing a vector, but in the case of\n * loading a previously dumped vector the raw elements can be provided to the constructor.\n *\n * For performance reasons vectors are implemented with a flat array, where an elements\n * index is immediately followed by its value. E.g. [index, value, index, value]. This\n * allows the underlying array to be as sparse as possible and still offer decent\n * performance when being used for vector calculations.\n *\n * @constructor\n * @param {Number[]} [elements] - The flat list of element index and element value pairs.\n */\n lunr.Vector = function (elements) {\n this._magnitude = 0;\n this.elements = elements || [];\n };\n\n /**\n * Calculates the position within the vector to insert a given index.\n *\n * This is used internally by insert and upsert. If there are duplicate indexes then\n * the position is returned as if the value for that index were to be updated, but it\n * is the callers responsibility to check whether there is a duplicate at that index\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @returns {Number}\n */\n lunr.Vector.prototype.positionForIndex = function (index) {\n // For an empty vector the tuple can be inserted at the beginning\n if (this.elements.length == 0) {\n return 0;\n }\n var start = 0,\n end = this.elements.length / 2,\n sliceLength = end - start,\n pivotPoint = Math.floor(sliceLength / 2),\n pivotIndex = this.elements[pivotPoint * 2];\n while (sliceLength > 1) {\n if (pivotIndex < index) {\n start = pivotPoint;\n }\n if (pivotIndex > index) {\n end = pivotPoint;\n }\n if (pivotIndex == index) {\n break;\n }\n sliceLength = end - start;\n pivotPoint = start + Math.floor(sliceLength / 2);\n pivotIndex = this.elements[pivotPoint * 2];\n }\n if (pivotIndex == index) {\n return pivotPoint * 2;\n }\n if (pivotIndex > index) {\n return pivotPoint * 2;\n }\n if (pivotIndex < index) {\n return (pivotPoint + 1) * 2;\n }\n };\n\n /**\n * Inserts an element at an index within the vector.\n *\n * Does not allow duplicates, will throw an error if there is already an entry\n * for this index.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n */\n lunr.Vector.prototype.insert = function (insertIdx, val) {\n this.upsert(insertIdx, val, function () {\n throw \"duplicate index\";\n });\n };\n\n /**\n * Inserts or updates an existing index within the vector.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n * @param {function} fn - A function that is called for updates, the existing value and the\n * requested value are passed as arguments\n */\n lunr.Vector.prototype.upsert = function (insertIdx, val, fn) {\n this._magnitude = 0;\n var position = this.positionForIndex(insertIdx);\n if (this.elements[position] == insertIdx) {\n this.elements[position + 1] = fn(this.elements[position + 1], val);\n } else {\n this.elements.splice(position, 0, insertIdx, val);\n }\n };\n\n /**\n * Calculates the magnitude of this vector.\n *\n * @returns {Number}\n */\n lunr.Vector.prototype.magnitude = function () {\n if (this._magnitude) return this._magnitude;\n var sumOfSquares = 0,\n elementsLength = this.elements.length;\n for (var i = 1; i < elementsLength; i += 2) {\n var val = this.elements[i];\n sumOfSquares += val * val;\n }\n return this._magnitude = Math.sqrt(sumOfSquares);\n };\n\n /**\n * Calculates the dot product of this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The vector to compute the dot product with.\n * @returns {Number}\n */\n lunr.Vector.prototype.dot = function (otherVector) {\n var dotProduct = 0,\n a = this.elements,\n b = otherVector.elements,\n aLen = a.length,\n bLen = b.length,\n aVal = 0,\n bVal = 0,\n i = 0,\n j = 0;\n while (i < aLen && j < bLen) {\n aVal = a[i], bVal = b[j];\n if (aVal < bVal) {\n i += 2;\n } else if (aVal > bVal) {\n j += 2;\n } else if (aVal == bVal) {\n dotProduct += a[i + 1] * b[j + 1];\n i += 2;\n j += 2;\n }\n }\n return dotProduct;\n };\n\n /**\n * Calculates the similarity between this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The other vector to calculate the\n * similarity with.\n * @returns {Number}\n */\n lunr.Vector.prototype.similarity = function (otherVector) {\n return this.dot(otherVector) / this.magnitude() || 0;\n };\n\n /**\n * Converts the vector to an array of the elements within the vector.\n *\n * @returns {Number[]}\n */\n lunr.Vector.prototype.toArray = function () {\n var output = new Array(this.elements.length / 2);\n for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) {\n output[j] = this.elements[i];\n }\n return output;\n };\n\n /**\n * A JSON serializable representation of the vector.\n *\n * @returns {Number[]}\n */\n lunr.Vector.prototype.toJSON = function () {\n return this.elements;\n };\n /* eslint-disable */\n /*!\n * lunr.stemmer\n * Copyright (C) 2020 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n /**\n * lunr.stemmer is an english language stemmer, this is a JavaScript\n * implementation of the PorterStemmer taken from http://tartarus.org/~martin\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token - The string to stem\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n * @function\n */\n lunr.stemmer = function () {\n var step2list = {\n \"ational\": \"ate\",\n \"tional\": \"tion\",\n \"enci\": \"ence\",\n \"anci\": \"ance\",\n \"izer\": \"ize\",\n \"bli\": \"ble\",\n \"alli\": \"al\",\n \"entli\": \"ent\",\n \"eli\": \"e\",\n \"ousli\": \"ous\",\n \"ization\": \"ize\",\n \"ation\": \"ate\",\n \"ator\": \"ate\",\n \"alism\": \"al\",\n \"iveness\": \"ive\",\n \"fulness\": \"ful\",\n \"ousness\": \"ous\",\n \"aliti\": \"al\",\n \"iviti\": \"ive\",\n \"biliti\": \"ble\",\n \"logi\": \"log\"\n },\n step3list = {\n \"icate\": \"ic\",\n \"ative\": \"\",\n \"alize\": \"al\",\n \"iciti\": \"ic\",\n \"ical\": \"ic\",\n \"ful\": \"\",\n \"ness\": \"\"\n },\n c = \"[^aeiou]\",\n // consonant\n v = \"[aeiouy]\",\n // vowel\n C = c + \"[^aeiouy]*\",\n // consonant sequence\n V = v + \"[aeiou]*\",\n // vowel sequence\n\n mgr0 = \"^(\" + C + \")?\" + V + C,\n // [C]VC... is m>0\n meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\",\n // [C]VC[V] is m=1\n mgr1 = \"^(\" + C + \")?\" + V + C + V + C,\n // [C]VCVC... is m>1\n s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n var re_mgr0 = new RegExp(mgr0);\n var re_mgr1 = new RegExp(mgr1);\n var re_meq1 = new RegExp(meq1);\n var re_s_v = new RegExp(s_v);\n var re_1a = /^(.+?)(ss|i)es$/;\n var re2_1a = /^(.+?)([^s])s$/;\n var re_1b = /^(.+?)eed$/;\n var re2_1b = /^(.+?)(ed|ing)$/;\n var re_1b_2 = /.$/;\n var re2_1b_2 = /(at|bl|iz)$/;\n var re3_1b_2 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n var re4_1b_2 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n var re_1c = /^(.+?[^aeiou])y$/;\n var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n var re2_4 = /^(.+?)(s|t)(ion)$/;\n var re_5 = /^(.+?)e$/;\n var re_5_1 = /ll$/;\n var re3_5 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n var porterStemmer = function porterStemmer(w) {\n var stem, suffix, firstch, re, re2, re3, re4;\n if (w.length < 3) {\n return w;\n }\n firstch = w.substr(0, 1);\n if (firstch == \"y\") {\n w = firstch.toUpperCase() + w.substr(1);\n }\n\n // Step 1a\n re = re_1a;\n re2 = re2_1a;\n if (re.test(w)) {\n w = w.replace(re, \"$1$2\");\n } else if (re2.test(w)) {\n w = w.replace(re2, \"$1$2\");\n }\n\n // Step 1b\n re = re_1b;\n re2 = re2_1b;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = re_mgr0;\n if (re.test(fp[1])) {\n re = re_1b_2;\n w = w.replace(re, \"\");\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = re_s_v;\n if (re2.test(stem)) {\n w = stem;\n re2 = re2_1b_2;\n re3 = re3_1b_2;\n re4 = re4_1b_2;\n if (re2.test(w)) {\n w = w + \"e\";\n } else if (re3.test(w)) {\n re = re_1b_2;\n w = w.replace(re, \"\");\n } else if (re4.test(w)) {\n w = w + \"e\";\n }\n }\n }\n\n // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)\n re = re_1c;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n w = stem + \"i\";\n }\n\n // Step 2\n re = re_2;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step2list[suffix];\n }\n }\n\n // Step 3\n re = re_3;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step3list[suffix];\n }\n }\n\n // Step 4\n re = re_4;\n re2 = re2_4;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n if (re.test(stem)) {\n w = stem;\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = re_mgr1;\n if (re2.test(stem)) {\n w = stem;\n }\n }\n\n // Step 5\n re = re_5;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n re2 = re_meq1;\n re3 = re3_5;\n if (re.test(stem) || re2.test(stem) && !re3.test(stem)) {\n w = stem;\n }\n }\n re = re_5_1;\n re2 = re_mgr1;\n if (re.test(w) && re2.test(w)) {\n re = re_1b_2;\n w = w.replace(re, \"\");\n }\n\n // and turn initial Y back to y\n\n if (firstch == \"y\") {\n w = firstch.toLowerCase() + w.substr(1);\n }\n return w;\n };\n return function (token) {\n return token.update(porterStemmer);\n };\n }();\n lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer');\n /*!\n * lunr.stopWordFilter\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * lunr.generateStopWordFilter builds a stopWordFilter function from the provided\n * list of stop words.\n *\n * The built in lunr.stopWordFilter is built using this generator and can be used\n * to generate custom stopWordFilters for applications or non English languages.\n *\n * @function\n * @param {Array} token The token to pass through the filter\n * @returns {lunr.PipelineFunction}\n * @see lunr.Pipeline\n * @see lunr.stopWordFilter\n */\n lunr.generateStopWordFilter = function (stopWords) {\n var words = stopWords.reduce(function (memo, stopWord) {\n memo[stopWord] = stopWord;\n return memo;\n }, {});\n return function (token) {\n if (token && words[token.toString()] !== token.toString()) return token;\n };\n };\n\n /**\n * lunr.stopWordFilter is an English language stop word list filter, any words\n * contained in the list will not be passed through the filter.\n *\n * This is intended to be used in the Pipeline. If the token does not pass the\n * filter then undefined will be returned.\n *\n * @function\n * @implements {lunr.PipelineFunction}\n * @params {lunr.Token} token - A token to check for being a stop word.\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n */\n lunr.stopWordFilter = lunr.generateStopWordFilter(['a', 'able', 'about', 'across', 'after', 'all', 'almost', 'also', 'am', 'among', 'an', 'and', 'any', 'are', 'as', 'at', 'be', 'because', 'been', 'but', 'by', 'can', 'cannot', 'could', 'dear', 'did', 'do', 'does', 'either', 'else', 'ever', 'every', 'for', 'from', 'get', 'got', 'had', 'has', 'have', 'he', 'her', 'hers', 'him', 'his', 'how', 'however', 'i', 'if', 'in', 'into', 'is', 'it', 'its', 'just', 'least', 'let', 'like', 'likely', 'may', 'me', 'might', 'most', 'must', 'my', 'neither', 'no', 'nor', 'not', 'of', 'off', 'often', 'on', 'only', 'or', 'other', 'our', 'own', 'rather', 'said', 'say', 'says', 'she', 'should', 'since', 'so', 'some', 'than', 'that', 'the', 'their', 'them', 'then', 'there', 'these', 'they', 'this', 'tis', 'to', 'too', 'twas', 'us', 'wants', 'was', 'we', 'were', 'what', 'when', 'where', 'which', 'while', 'who', 'whom', 'why', 'will', 'with', 'would', 'yet', 'you', 'your']);\n lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter');\n /*!\n * lunr.trimmer\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * lunr.trimmer is a pipeline function for trimming non word\n * characters from the beginning and end of tokens before they\n * enter the index.\n *\n * This implementation may not work correctly for non latin\n * characters and should either be removed or adapted for use\n * with languages with non-latin characters.\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token The token to pass through the filter\n * @returns {lunr.Token}\n * @see lunr.Pipeline\n */\n lunr.trimmer = function (token) {\n return token.update(function (s) {\n return s.replace(/^\\W+/, '').replace(/\\W+$/, '');\n });\n };\n lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer');\n /*!\n * lunr.TokenSet\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * A token set is used to store the unique list of all tokens\n * within an index. Token sets are also used to represent an\n * incoming query to the index, this query token set and index\n * token set are then intersected to find which tokens to look\n * up in the inverted index.\n *\n * A token set can hold multiple tokens, as in the case of the\n * index token set, or it can hold a single token as in the\n * case of a simple query token set.\n *\n * Additionally token sets are used to perform wildcard matching.\n * Leading, contained and trailing wildcards are supported, and\n * from this edit distance matching can also be provided.\n *\n * Token sets are implemented as a minimal finite state automata,\n * where both common prefixes and suffixes are shared between tokens.\n * This helps to reduce the space used for storing the token set.\n *\n * @constructor\n */\n lunr.TokenSet = function () {\n this.final = false;\n this.edges = {};\n this.id = lunr.TokenSet._nextId;\n lunr.TokenSet._nextId += 1;\n };\n\n /**\n * Keeps track of the next, auto increment, identifier to assign\n * to a new tokenSet.\n *\n * TokenSets require a unique identifier to be correctly minimised.\n *\n * @private\n */\n lunr.TokenSet._nextId = 1;\n\n /**\n * Creates a TokenSet instance from the given sorted array of words.\n *\n * @param {String[]} arr - A sorted array of strings to create the set from.\n * @returns {lunr.TokenSet}\n * @throws Will throw an error if the input array is not sorted.\n */\n lunr.TokenSet.fromArray = function (arr) {\n var builder = new lunr.TokenSet.Builder();\n for (var i = 0, len = arr.length; i < len; i++) {\n builder.insert(arr[i]);\n }\n builder.finish();\n return builder.root;\n };\n\n /**\n * Creates a token set from a query clause.\n *\n * @private\n * @param {Object} clause - A single clause from lunr.Query.\n * @param {string} clause.term - The query clause term.\n * @param {number} [clause.editDistance] - The optional edit distance for the term.\n * @returns {lunr.TokenSet}\n */\n lunr.TokenSet.fromClause = function (clause) {\n if ('editDistance' in clause) {\n return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance);\n } else {\n return lunr.TokenSet.fromString(clause.term);\n }\n };\n\n /**\n * Creates a token set representing a single string with a specified\n * edit distance.\n *\n * Insertions, deletions, substitutions and transpositions are each\n * treated as an edit distance of 1.\n *\n * Increasing the allowed edit distance will have a dramatic impact\n * on the performance of both creating and intersecting these TokenSets.\n * It is advised to keep the edit distance less than 3.\n *\n * @param {string} str - The string to create the token set from.\n * @param {number} editDistance - The allowed edit distance to match.\n * @returns {lunr.Vector}\n */\n lunr.TokenSet.fromFuzzyString = function (str, editDistance) {\n var root = new lunr.TokenSet();\n var stack = [{\n node: root,\n editsRemaining: editDistance,\n str: str\n }];\n while (stack.length) {\n var frame = stack.pop();\n\n // no edit\n if (frame.str.length > 0) {\n var char = frame.str.charAt(0),\n noEditNode;\n if (char in frame.node.edges) {\n noEditNode = frame.node.edges[char];\n } else {\n noEditNode = new lunr.TokenSet();\n frame.node.edges[char] = noEditNode;\n }\n if (frame.str.length == 1) {\n noEditNode.final = true;\n }\n stack.push({\n node: noEditNode,\n editsRemaining: frame.editsRemaining,\n str: frame.str.slice(1)\n });\n }\n if (frame.editsRemaining == 0) {\n continue;\n }\n\n // insertion\n if (\"*\" in frame.node.edges) {\n var insertionNode = frame.node.edges[\"*\"];\n } else {\n var insertionNode = new lunr.TokenSet();\n frame.node.edges[\"*\"] = insertionNode;\n }\n if (frame.str.length == 0) {\n insertionNode.final = true;\n }\n stack.push({\n node: insertionNode,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str\n });\n\n // deletion\n // can only do a deletion if we have enough edits remaining\n // and if there are characters left to delete in the string\n if (frame.str.length > 1) {\n stack.push({\n node: frame.node,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str.slice(1)\n });\n }\n\n // deletion\n // just removing the last character from the str\n if (frame.str.length == 1) {\n frame.node.final = true;\n }\n\n // substitution\n // can only do a substitution if we have enough edits remaining\n // and if there are characters left to substitute\n if (frame.str.length >= 1) {\n if (\"*\" in frame.node.edges) {\n var substitutionNode = frame.node.edges[\"*\"];\n } else {\n var substitutionNode = new lunr.TokenSet();\n frame.node.edges[\"*\"] = substitutionNode;\n }\n if (frame.str.length == 1) {\n substitutionNode.final = true;\n }\n stack.push({\n node: substitutionNode,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str.slice(1)\n });\n }\n\n // transposition\n // can only do a transposition if there are edits remaining\n // and there are enough characters to transpose\n if (frame.str.length > 1) {\n var charA = frame.str.charAt(0),\n charB = frame.str.charAt(1),\n transposeNode;\n if (charB in frame.node.edges) {\n transposeNode = frame.node.edges[charB];\n } else {\n transposeNode = new lunr.TokenSet();\n frame.node.edges[charB] = transposeNode;\n }\n if (frame.str.length == 1) {\n transposeNode.final = true;\n }\n stack.push({\n node: transposeNode,\n editsRemaining: frame.editsRemaining - 1,\n str: charA + frame.str.slice(2)\n });\n }\n }\n return root;\n };\n\n /**\n * Creates a TokenSet from a string.\n *\n * The string may contain one or more wildcard characters (*)\n * that will allow wildcard matching when intersecting with\n * another TokenSet.\n *\n * @param {string} str - The string to create a TokenSet from.\n * @returns {lunr.TokenSet}\n */\n lunr.TokenSet.fromString = function (str) {\n var node = new lunr.TokenSet(),\n root = node;\n\n /*\n * Iterates through all characters within the passed string\n * appending a node for each character.\n *\n * When a wildcard character is found then a self\n * referencing edge is introduced to continually match\n * any number of any characters.\n */\n for (var i = 0, len = str.length; i < len; i++) {\n var char = str[i],\n final = i == len - 1;\n if (char == \"*\") {\n node.edges[char] = node;\n node.final = final;\n } else {\n var next = new lunr.TokenSet();\n next.final = final;\n node.edges[char] = next;\n node = next;\n }\n }\n return root;\n };\n\n /**\n * Converts this TokenSet into an array of strings\n * contained within the TokenSet.\n *\n * This is not intended to be used on a TokenSet that\n * contains wildcards, in these cases the results are\n * undefined and are likely to cause an infinite loop.\n *\n * @returns {string[]}\n */\n lunr.TokenSet.prototype.toArray = function () {\n var words = [];\n var stack = [{\n prefix: \"\",\n node: this\n }];\n while (stack.length) {\n var frame = stack.pop(),\n edges = Object.keys(frame.node.edges),\n len = edges.length;\n if (frame.node.final) {\n /* In Safari, at this point the prefix is sometimes corrupted, see:\n * https://github.com/olivernn/lunr.js/issues/279 Calling any\n * String.prototype method forces Safari to \"cast\" this string to what\n * it's supposed to be, fixing the bug. */\n frame.prefix.charAt(0);\n words.push(frame.prefix);\n }\n for (var i = 0; i < len; i++) {\n var edge = edges[i];\n stack.push({\n prefix: frame.prefix.concat(edge),\n node: frame.node.edges[edge]\n });\n }\n }\n return words;\n };\n\n /**\n * Generates a string representation of a TokenSet.\n *\n * This is intended to allow TokenSets to be used as keys\n * in objects, largely to aid the construction and minimisation\n * of a TokenSet. As such it is not designed to be a human\n * friendly representation of the TokenSet.\n *\n * @returns {string}\n */\n lunr.TokenSet.prototype.toString = function () {\n // NOTE: Using Object.keys here as this.edges is very likely\n // to enter 'hash-mode' with many keys being added\n //\n // avoiding a for-in loop here as it leads to the function\n // being de-optimised (at least in V8). From some simple\n // benchmarks the performance is comparable, but allowing\n // V8 to optimize may mean easy performance wins in the future.\n\n if (this._str) {\n return this._str;\n }\n var str = this.final ? '1' : '0',\n labels = Object.keys(this.edges).sort(),\n len = labels.length;\n for (var i = 0; i < len; i++) {\n var label = labels[i],\n node = this.edges[label];\n str = str + label + node.id;\n }\n return str;\n };\n\n /**\n * Returns a new TokenSet that is the intersection of\n * this TokenSet and the passed TokenSet.\n *\n * This intersection will take into account any wildcards\n * contained within the TokenSet.\n *\n * @param {lunr.TokenSet} b - An other TokenSet to intersect with.\n * @returns {lunr.TokenSet}\n */\n lunr.TokenSet.prototype.intersect = function (b) {\n var output = new lunr.TokenSet(),\n frame = undefined;\n var stack = [{\n qNode: b,\n output: output,\n node: this\n }];\n while (stack.length) {\n frame = stack.pop();\n\n // NOTE: As with the #toString method, we are using\n // Object.keys and a for loop instead of a for-in loop\n // as both of these objects enter 'hash' mode, causing\n // the function to be de-optimised in V8\n var qEdges = Object.keys(frame.qNode.edges),\n qLen = qEdges.length,\n nEdges = Object.keys(frame.node.edges),\n nLen = nEdges.length;\n for (var q = 0; q < qLen; q++) {\n var qEdge = qEdges[q];\n for (var n = 0; n < nLen; n++) {\n var nEdge = nEdges[n];\n if (nEdge == qEdge || qEdge == '*') {\n var node = frame.node.edges[nEdge],\n qNode = frame.qNode.edges[qEdge],\n final = node.final && qNode.final,\n next = undefined;\n if (nEdge in frame.output.edges) {\n // an edge already exists for this character\n // no need to create a new node, just set the finality\n // bit unless this node is already final\n next = frame.output.edges[nEdge];\n next.final = next.final || final;\n } else {\n // no edge exists yet, must create one\n // set the finality bit and insert it\n // into the output\n next = new lunr.TokenSet();\n next.final = final;\n frame.output.edges[nEdge] = next;\n }\n stack.push({\n qNode: qNode,\n output: next,\n node: node\n });\n }\n }\n }\n }\n return output;\n };\n lunr.TokenSet.Builder = function () {\n this.previousWord = \"\";\n this.root = new lunr.TokenSet();\n this.uncheckedNodes = [];\n this.minimizedNodes = {};\n };\n lunr.TokenSet.Builder.prototype.insert = function (word) {\n var node,\n commonPrefix = 0;\n if (word < this.previousWord) {\n throw new Error(\"Out of order word insertion\");\n }\n for (var i = 0; i < word.length && i < this.previousWord.length; i++) {\n if (word[i] != this.previousWord[i]) break;\n commonPrefix++;\n }\n this.minimize(commonPrefix);\n if (this.uncheckedNodes.length == 0) {\n node = this.root;\n } else {\n node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child;\n }\n for (var i = commonPrefix; i < word.length; i++) {\n var nextNode = new lunr.TokenSet(),\n char = word[i];\n node.edges[char] = nextNode;\n this.uncheckedNodes.push({\n parent: node,\n char: char,\n child: nextNode\n });\n node = nextNode;\n }\n node.final = true;\n this.previousWord = word;\n };\n lunr.TokenSet.Builder.prototype.finish = function () {\n this.minimize(0);\n };\n lunr.TokenSet.Builder.prototype.minimize = function (downTo) {\n for (var i = this.uncheckedNodes.length - 1; i >= downTo; i--) {\n var node = this.uncheckedNodes[i],\n childKey = node.child.toString();\n if (childKey in this.minimizedNodes) {\n node.parent.edges[node.char] = this.minimizedNodes[childKey];\n } else {\n // Cache the key for this node since\n // we know it can't change anymore\n node.child._str = childKey;\n this.minimizedNodes[childKey] = node.child;\n }\n this.uncheckedNodes.pop();\n }\n };\n /*!\n * lunr.Index\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * An index contains the built index of all documents and provides a query interface\n * to the index.\n *\n * Usually instances of lunr.Index will not be created using this constructor, instead\n * lunr.Builder should be used to construct new indexes, or lunr.Index.load should be\n * used to load previously built and serialized indexes.\n *\n * @constructor\n * @param {Object} attrs - The attributes of the built search index.\n * @param {Object} attrs.invertedIndex - An index of term/field to document reference.\n * @param {Object<string, lunr.Vector>} attrs.fieldVectors - Field vectors\n * @param {lunr.TokenSet} attrs.tokenSet - An set of all corpus tokens.\n * @param {string[]} attrs.fields - The names of indexed document fields.\n * @param {lunr.Pipeline} attrs.pipeline - The pipeline to use for search terms.\n */\n lunr.Index = function (attrs) {\n this.invertedIndex = attrs.invertedIndex;\n this.fieldVectors = attrs.fieldVectors;\n this.tokenSet = attrs.tokenSet;\n this.fields = attrs.fields;\n this.pipeline = attrs.pipeline;\n };\n\n /**\n * A result contains details of a document matching a search query.\n * @typedef {Object} lunr.Index~Result\n * @property {string} ref - The reference of the document this result represents.\n * @property {number} score - A number between 0 and 1 representing how similar this document is to the query.\n * @property {lunr.MatchData} matchData - Contains metadata about this match including which term(s) caused the match.\n */\n\n /**\n * Although lunr provides the ability to create queries using lunr.Query, it also provides a simple\n * query language which itself is parsed into an instance of lunr.Query.\n *\n * For programmatically building queries it is advised to directly use lunr.Query, the query language\n * is best used for human entered text rather than program generated text.\n *\n * At its simplest queries can just be a single term, e.g. `hello`, multiple terms are also supported\n * and will be combined with OR, e.g `hello world` will match documents that contain either 'hello'\n * or 'world', though those that contain both will rank higher in the results.\n *\n * Wildcards can be included in terms to match one or more unspecified characters, these wildcards can\n * be inserted anywhere within the term, and more than one wildcard can exist in a single term. Adding\n * wildcards will increase the number of documents that will be found but can also have a negative\n * impact on query performance, especially with wildcards at the beginning of a term.\n *\n * Terms can be restricted to specific fields, e.g. `title:hello`, only documents with the term\n * hello in the title field will match this query. Using a field not present in the index will lead\n * to an error being thrown.\n *\n * Modifiers can also be added to terms, lunr supports edit distance and boost modifiers on terms. A term\n * boost will make documents matching that term score higher, e.g. `foo^5`. Edit distance is also supported\n * to provide fuzzy matching, e.g. 'hello~2' will match documents with hello with an edit distance of 2.\n * Avoid large values for edit distance to improve query performance.\n *\n * Each term also supports a presence modifier. By default a term's presence in document is optional, however\n * this can be changed to either required or prohibited. For a term's presence to be required in a document the\n * term should be prefixed with a '+', e.g. `+foo bar` is a search for documents that must contain 'foo' and\n * optionally contain 'bar'. Conversely a leading '-' sets the terms presence to prohibited, i.e. it must not\n * appear in a document, e.g. `-foo bar` is a search for documents that do not contain 'foo' but may contain 'bar'.\n *\n * To escape special characters the backslash character '\\' can be used, this allows searches to include\n * characters that would normally be considered modifiers, e.g. `foo\\~2` will search for a term \"foo~2\" instead\n * of attempting to apply a boost of 2 to the search term \"foo\".\n *\n * @typedef {string} lunr.Index~QueryString\n * @example <caption>Simple single term query</caption>\n * hello\n * @example <caption>Multiple term query</caption>\n * hello world\n * @example <caption>term scoped to a field</caption>\n * title:hello\n * @example <caption>term with a boost of 10</caption>\n * hello^10\n * @example <caption>term with an edit distance of 2</caption>\n * hello~2\n * @example <caption>terms with presence modifiers</caption>\n * -foo +bar baz\n */\n\n /**\n * Performs a search against the index using lunr query syntax.\n *\n * Results will be returned sorted by their score, the most relevant results\n * will be returned first. For details on how the score is calculated, please see\n * the {@link https://lunrjs.com/guides/searching.html#scoring|guide}.\n *\n * For more programmatic querying use lunr.Index#query.\n *\n * @param {lunr.Index~QueryString} queryString - A string containing a lunr query.\n * @throws {lunr.QueryParseError} If the passed query string cannot be parsed.\n * @returns {lunr.Index~Result[]}\n */\n lunr.Index.prototype.search = function (queryString) {\n return this.query(function (query) {\n var parser = new lunr.QueryParser(queryString, query);\n parser.parse();\n });\n };\n\n /**\n * A query builder callback provides a query object to be used to express\n * the query to perform on the index.\n *\n * @callback lunr.Index~queryBuilder\n * @param {lunr.Query} query - The query object to build up.\n * @this lunr.Query\n */\n\n /**\n * Performs a query against the index using the yielded lunr.Query object.\n *\n * If performing programmatic queries against the index, this method is preferred\n * over lunr.Index#search so as to avoid the additional query parsing overhead.\n *\n * A query object is yielded to the supplied function which should be used to\n * express the query to be run against the index.\n *\n * Note that although this function takes a callback parameter it is _not_ an\n * asynchronous operation, the callback is just yielded a query object to be\n * customized.\n *\n * @param {lunr.Index~queryBuilder} fn - A function that is used to build the query.\n * @returns {lunr.Index~Result[]}\n */\n lunr.Index.prototype.query = function (fn) {\n // for each query clause\n // * process terms\n // * expand terms from token set\n // * find matching documents and metadata\n // * get document vectors\n // * score documents\n\n var query = new lunr.Query(this.fields),\n matchingFields = Object.create(null),\n queryVectors = Object.create(null),\n termFieldCache = Object.create(null),\n requiredMatches = Object.create(null),\n prohibitedMatches = Object.create(null);\n\n /*\n * To support field level boosts a query vector is created per\n * field. An empty vector is eagerly created to support negated\n * queries.\n */\n for (var i = 0; i < this.fields.length; i++) {\n queryVectors[this.fields[i]] = new lunr.Vector();\n }\n fn.call(query, query);\n for (var i = 0; i < query.clauses.length; i++) {\n /*\n * Unless the pipeline has been disabled for this term, which is\n * the case for terms with wildcards, we need to pass the clause\n * term through the search pipeline. A pipeline returns an array\n * of processed terms. Pipeline functions may expand the passed\n * term, which means we may end up performing multiple index lookups\n * for a single query term.\n */\n var clause = query.clauses[i],\n terms = null,\n clauseMatches = lunr.Set.empty;\n if (clause.usePipeline) {\n terms = this.pipeline.runString(clause.term, {\n fields: clause.fields\n });\n } else {\n terms = [clause.term];\n }\n for (var m = 0; m < terms.length; m++) {\n var term = terms[m];\n\n /*\n * Each term returned from the pipeline needs to use the same query\n * clause object, e.g. the same boost and or edit distance. The\n * simplest way to do this is to re-use the clause object but mutate\n * its term property.\n */\n clause.term = term;\n\n /*\n * From the term in the clause we create a token set which will then\n * be used to intersect the indexes token set to get a list of terms\n * to lookup in the inverted index\n */\n var termTokenSet = lunr.TokenSet.fromClause(clause),\n expandedTerms = this.tokenSet.intersect(termTokenSet).toArray();\n\n /*\n * If a term marked as required does not exist in the tokenSet it is\n * impossible for the search to return any matches. We set all the field\n * scoped required matches set to empty and stop examining any further\n * clauses.\n */\n if (expandedTerms.length === 0 && clause.presence === lunr.Query.presence.REQUIRED) {\n for (var k = 0; k < clause.fields.length; k++) {\n var field = clause.fields[k];\n requiredMatches[field] = lunr.Set.empty;\n }\n break;\n }\n for (var j = 0; j < expandedTerms.length; j++) {\n /*\n * For each term get the posting and termIndex, this is required for\n * building the query vector.\n */\n var expandedTerm = expandedTerms[j],\n posting = this.invertedIndex[expandedTerm],\n termIndex = posting._index;\n for (var k = 0; k < clause.fields.length; k++) {\n /*\n * For each field that this query term is scoped by (by default\n * all fields are in scope) we need to get all the document refs\n * that have this term in that field.\n *\n * The posting is the entry in the invertedIndex for the matching\n * term from above.\n */\n var field = clause.fields[k],\n fieldPosting = posting[field],\n matchingDocumentRefs = Object.keys(fieldPosting),\n termField = expandedTerm + \"/\" + field,\n matchingDocumentsSet = new lunr.Set(matchingDocumentRefs);\n\n /*\n * if the presence of this term is required ensure that the matching\n * documents are added to the set of required matches for this clause.\n *\n */\n if (clause.presence == lunr.Query.presence.REQUIRED) {\n clauseMatches = clauseMatches.union(matchingDocumentsSet);\n if (requiredMatches[field] === undefined) {\n requiredMatches[field] = lunr.Set.complete;\n }\n }\n\n /*\n * if the presence of this term is prohibited ensure that the matching\n * documents are added to the set of prohibited matches for this field,\n * creating that set if it does not yet exist.\n */\n if (clause.presence == lunr.Query.presence.PROHIBITED) {\n if (prohibitedMatches[field] === undefined) {\n prohibitedMatches[field] = lunr.Set.empty;\n }\n prohibitedMatches[field] = prohibitedMatches[field].union(matchingDocumentsSet);\n\n /*\n * Prohibited matches should not be part of the query vector used for\n * similarity scoring and no metadata should be extracted so we continue\n * to the next field\n */\n continue;\n }\n\n /*\n * The query field vector is populated using the termIndex found for\n * the term and a unit value with the appropriate boost applied.\n * Using upsert because there could already be an entry in the vector\n * for the term we are working with. In that case we just add the scores\n * together.\n */\n queryVectors[field].upsert(termIndex, clause.boost, function (a, b) {\n return a + b;\n });\n\n /**\n * If we've already seen this term, field combo then we've already collected\n * the matching documents and metadata, no need to go through all that again\n */\n if (termFieldCache[termField]) {\n continue;\n }\n for (var l = 0; l < matchingDocumentRefs.length; l++) {\n /*\n * All metadata for this term/field/document triple\n * are then extracted and collected into an instance\n * of lunr.MatchData ready to be returned in the query\n * results\n */\n var matchingDocumentRef = matchingDocumentRefs[l],\n matchingFieldRef = new lunr.FieldRef(matchingDocumentRef, field),\n metadata = fieldPosting[matchingDocumentRef],\n fieldMatch;\n if ((fieldMatch = matchingFields[matchingFieldRef]) === undefined) {\n matchingFields[matchingFieldRef] = new lunr.MatchData(expandedTerm, field, metadata);\n } else {\n fieldMatch.add(expandedTerm, field, metadata);\n }\n }\n termFieldCache[termField] = true;\n }\n }\n }\n\n /**\n * If the presence was required we need to update the requiredMatches field sets.\n * We do this after all fields for the term have collected their matches because\n * the clause terms presence is required in _any_ of the fields not _all_ of the\n * fields.\n */\n if (clause.presence === lunr.Query.presence.REQUIRED) {\n for (var k = 0; k < clause.fields.length; k++) {\n var field = clause.fields[k];\n requiredMatches[field] = requiredMatches[field].intersect(clauseMatches);\n }\n }\n }\n\n /**\n * Need to combine the field scoped required and prohibited\n * matching documents into a global set of required and prohibited\n * matches\n */\n var allRequiredMatches = lunr.Set.complete,\n allProhibitedMatches = lunr.Set.empty;\n for (var i = 0; i < this.fields.length; i++) {\n var field = this.fields[i];\n if (requiredMatches[field]) {\n allRequiredMatches = allRequiredMatches.intersect(requiredMatches[field]);\n }\n if (prohibitedMatches[field]) {\n allProhibitedMatches = allProhibitedMatches.union(prohibitedMatches[field]);\n }\n }\n var matchingFieldRefs = Object.keys(matchingFields),\n results = [],\n matches = Object.create(null);\n\n /*\n * If the query is negated (contains only prohibited terms)\n * we need to get _all_ fieldRefs currently existing in the\n * index. This is only done when we know that the query is\n * entirely prohibited terms to avoid any cost of getting all\n * fieldRefs unnecessarily.\n *\n * Additionally, blank MatchData must be created to correctly\n * populate the results.\n */\n if (query.isNegated()) {\n matchingFieldRefs = Object.keys(this.fieldVectors);\n for (var i = 0; i < matchingFieldRefs.length; i++) {\n var matchingFieldRef = matchingFieldRefs[i];\n var fieldRef = lunr.FieldRef.fromString(matchingFieldRef);\n matchingFields[matchingFieldRef] = new lunr.MatchData();\n }\n }\n for (var i = 0; i < matchingFieldRefs.length; i++) {\n /*\n * Currently we have document fields that match the query, but we\n * need to return documents. The matchData and scores are combined\n * from multiple fields belonging to the same document.\n *\n * Scores are calculated by field, using the query vectors created\n * above, and combined into a final document score using addition.\n */\n var fieldRef = lunr.FieldRef.fromString(matchingFieldRefs[i]),\n docRef = fieldRef.docRef;\n if (!allRequiredMatches.contains(docRef)) {\n continue;\n }\n if (allProhibitedMatches.contains(docRef)) {\n continue;\n }\n var fieldVector = this.fieldVectors[fieldRef],\n score = queryVectors[fieldRef.fieldName].similarity(fieldVector),\n docMatch;\n if ((docMatch = matches[docRef]) !== undefined) {\n docMatch.score += score;\n docMatch.matchData.combine(matchingFields[fieldRef]);\n } else {\n var match = {\n ref: docRef,\n score: score,\n matchData: matchingFields[fieldRef]\n };\n matches[docRef] = match;\n results.push(match);\n }\n }\n\n /*\n * Sort the results objects by score, highest first.\n */\n return results.sort(function (a, b) {\n return b.score - a.score;\n });\n };\n\n /**\n * Prepares the index for JSON serialization.\n *\n * The schema for this JSON blob will be described in a\n * separate JSON schema file.\n *\n * @returns {Object}\n */\n lunr.Index.prototype.toJSON = function () {\n var invertedIndex = Object.keys(this.invertedIndex).sort().map(function (term) {\n return [term, this.invertedIndex[term]];\n }, this);\n var fieldVectors = Object.keys(this.fieldVectors).map(function (ref) {\n return [ref, this.fieldVectors[ref].toJSON()];\n }, this);\n return {\n version: lunr.version,\n fields: this.fields,\n fieldVectors: fieldVectors,\n invertedIndex: invertedIndex,\n pipeline: this.pipeline.toJSON()\n };\n };\n\n /**\n * Loads a previously serialized lunr.Index\n *\n * @param {Object} serializedIndex - A previously serialized lunr.Index\n * @returns {lunr.Index}\n */\n lunr.Index.load = function (serializedIndex) {\n var attrs = {},\n fieldVectors = {},\n serializedVectors = serializedIndex.fieldVectors,\n invertedIndex = Object.create(null),\n serializedInvertedIndex = serializedIndex.invertedIndex,\n tokenSetBuilder = new lunr.TokenSet.Builder(),\n pipeline = lunr.Pipeline.load(serializedIndex.pipeline);\n if (serializedIndex.version != lunr.version) {\n lunr.utils.warn(\"Version mismatch when loading serialised index. Current version of lunr '\" + lunr.version + \"' does not match serialized index '\" + serializedIndex.version + \"'\");\n }\n for (var i = 0; i < serializedVectors.length; i++) {\n var tuple = serializedVectors[i],\n ref = tuple[0],\n elements = tuple[1];\n fieldVectors[ref] = new lunr.Vector(elements);\n }\n for (var i = 0; i < serializedInvertedIndex.length; i++) {\n var tuple = serializedInvertedIndex[i],\n term = tuple[0],\n posting = tuple[1];\n tokenSetBuilder.insert(term);\n invertedIndex[term] = posting;\n }\n tokenSetBuilder.finish();\n attrs.fields = serializedIndex.fields;\n attrs.fieldVectors = fieldVectors;\n attrs.invertedIndex = invertedIndex;\n attrs.tokenSet = tokenSetBuilder.root;\n attrs.pipeline = pipeline;\n return new lunr.Index(attrs);\n };\n /*!\n * lunr.Builder\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n /**\n * lunr.Builder performs indexing on a set of documents and\n * returns instances of lunr.Index ready for querying.\n *\n * All configuration of the index is done via the builder, the\n * fields to index, the document reference, the text processing\n * pipeline and document scoring parameters are all set on the\n * builder before indexing.\n *\n * @constructor\n * @property {string} _ref - Internal reference to the document reference field.\n * @property {string[]} _fields - Internal reference to the document fields to index.\n * @property {object} invertedIndex - The inverted index maps terms to document fields.\n * @property {object} documentTermFrequencies - Keeps track of document term frequencies.\n * @property {object} documentLengths - Keeps track of the length of documents added to the index.\n * @property {lunr.tokenizer} tokenizer - Function for splitting strings into tokens for indexing.\n * @property {lunr.Pipeline} pipeline - The pipeline performs text processing on tokens before indexing.\n * @property {lunr.Pipeline} searchPipeline - A pipeline for processing search terms before querying the index.\n * @property {number} documentCount - Keeps track of the total number of documents indexed.\n * @property {number} _b - A parameter to control field length normalization, setting this to 0 disabled normalization, 1 fully normalizes field lengths, the default value is 0.75.\n * @property {number} _k1 - A parameter to control how quickly an increase in term frequency results in term frequency saturation, the default value is 1.2.\n * @property {number} termIndex - A counter incremented for each unique term, used to identify a terms position in the vector space.\n * @property {array} metadataWhitelist - A list of metadata keys that have been whitelisted for entry in the index.\n */\n lunr.Builder = function () {\n this._ref = \"id\";\n this._fields = Object.create(null);\n this._documents = Object.create(null);\n this.invertedIndex = Object.create(null);\n this.fieldTermFrequencies = {};\n this.fieldLengths = {};\n this.tokenizer = lunr.tokenizer;\n this.pipeline = new lunr.Pipeline();\n this.searchPipeline = new lunr.Pipeline();\n this.documentCount = 0;\n this._b = 0.75;\n this._k1 = 1.2;\n this.termIndex = 0;\n this.metadataWhitelist = [];\n };\n\n /**\n * Sets the document field used as the document reference. Every document must have this field.\n * The type of this field in the document should be a string, if it is not a string it will be\n * coerced into a string by calling toString.\n *\n * The default ref is 'id'.\n *\n * The ref should _not_ be changed during indexing, it should be set before any documents are\n * added to the index. Changing it during indexing can lead to inconsistent results.\n *\n * @param {string} ref - The name of the reference field in the document.\n */\n lunr.Builder.prototype.ref = function (ref) {\n this._ref = ref;\n };\n\n /**\n * A function that is used to extract a field from a document.\n *\n * Lunr expects a field to be at the top level of a document, if however the field\n * is deeply nested within a document an extractor function can be used to extract\n * the right field for indexing.\n *\n * @callback fieldExtractor\n * @param {object} doc - The document being added to the index.\n * @returns {?(string|object|object[])} obj - The object that will be indexed for this field.\n * @example <caption>Extracting a nested field</caption>\n * function (doc) { return doc.nested.field }\n */\n\n /**\n * Adds a field to the list of document fields that will be indexed. Every document being\n * indexed should have this field. Null values for this field in indexed documents will\n * not cause errors but will limit the chance of that document being retrieved by searches.\n *\n * All fields should be added before adding documents to the index. Adding fields after\n * a document has been indexed will have no effect on already indexed documents.\n *\n * Fields can be boosted at build time. This allows terms within that field to have more\n * importance when ranking search results. Use a field boost to specify that matches within\n * one field are more important than other fields.\n *\n * @param {string} fieldName - The name of a field to index in all documents.\n * @param {object} attributes - Optional attributes associated with this field.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this field.\n * @param {fieldExtractor} [attributes.extractor] - Function to extract a field from a document.\n * @throws {RangeError} fieldName cannot contain unsupported characters '/'\n */\n lunr.Builder.prototype.field = function (fieldName, attributes) {\n if (/\\//.test(fieldName)) {\n throw new RangeError(\"Field '\" + fieldName + \"' contains illegal character '/'\");\n }\n this._fields[fieldName] = attributes || {};\n };\n\n /**\n * A parameter to tune the amount of field length normalisation that is applied when\n * calculating relevance scores. A value of 0 will completely disable any normalisation\n * and a value of 1 will fully normalise field lengths. The default is 0.75. Values of b\n * will be clamped to the range 0 - 1.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\n lunr.Builder.prototype.b = function (number) {\n if (number < 0) {\n this._b = 0;\n } else if (number > 1) {\n this._b = 1;\n } else {\n this._b = number;\n }\n };\n\n /**\n * A parameter that controls the speed at which a rise in term frequency results in term\n * frequency saturation. The default value is 1.2. Setting this to a higher value will give\n * slower saturation levels, a lower value will result in quicker saturation.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\n lunr.Builder.prototype.k1 = function (number) {\n this._k1 = number;\n };\n\n /**\n * Adds a document to the index.\n *\n * Before adding fields to the index the index should have been fully setup, with the document\n * ref and all fields to index already having been specified.\n *\n * The document must have a field name as specified by the ref (by default this is 'id') and\n * it should have all fields defined for indexing, though null or undefined values will not\n * cause errors.\n *\n * Entire documents can be boosted at build time. Applying a boost to a document indicates that\n * this document should rank higher in search results than other documents.\n *\n * @param {object} doc - The document to add to the index.\n * @param {object} attributes - Optional attributes associated with this document.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this document.\n */\n lunr.Builder.prototype.add = function (doc, attributes) {\n var docRef = doc[this._ref],\n fields = Object.keys(this._fields);\n this._documents[docRef] = attributes || {};\n this.documentCount += 1;\n for (var i = 0; i < fields.length; i++) {\n var fieldName = fields[i],\n extractor = this._fields[fieldName].extractor,\n field = extractor ? extractor(doc) : doc[fieldName],\n tokens = this.tokenizer(field, {\n fields: [fieldName]\n }),\n terms = this.pipeline.run(tokens),\n fieldRef = new lunr.FieldRef(docRef, fieldName),\n fieldTerms = Object.create(null);\n this.fieldTermFrequencies[fieldRef] = fieldTerms;\n this.fieldLengths[fieldRef] = 0;\n\n // store the length of this field for this document\n this.fieldLengths[fieldRef] += terms.length;\n\n // calculate term frequencies for this field\n for (var j = 0; j < terms.length; j++) {\n var term = terms[j];\n if (fieldTerms[term] == undefined) {\n fieldTerms[term] = 0;\n }\n fieldTerms[term] += 1;\n\n // add to inverted index\n // create an initial posting if one doesn't exist\n if (this.invertedIndex[term] == undefined) {\n var posting = Object.create(null);\n posting[\"_index\"] = this.termIndex;\n this.termIndex += 1;\n for (var k = 0; k < fields.length; k++) {\n posting[fields[k]] = Object.create(null);\n }\n this.invertedIndex[term] = posting;\n }\n\n // add an entry for this term/fieldName/docRef to the invertedIndex\n if (this.invertedIndex[term][fieldName][docRef] == undefined) {\n this.invertedIndex[term][fieldName][docRef] = Object.create(null);\n }\n\n // store all whitelisted metadata about this token in the\n // inverted index\n for (var l = 0; l < this.metadataWhitelist.length; l++) {\n var metadataKey = this.metadataWhitelist[l],\n metadata = term.metadata[metadataKey];\n if (this.invertedIndex[term][fieldName][docRef][metadataKey] == undefined) {\n this.invertedIndex[term][fieldName][docRef][metadataKey] = [];\n }\n this.invertedIndex[term][fieldName][docRef][metadataKey].push(metadata);\n }\n }\n }\n };\n\n /**\n * Calculates the average document length for this index\n *\n * @private\n */\n lunr.Builder.prototype.calculateAverageFieldLengths = function () {\n var fieldRefs = Object.keys(this.fieldLengths),\n numberOfFields = fieldRefs.length,\n accumulator = {},\n documentsWithField = {};\n for (var i = 0; i < numberOfFields; i++) {\n var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n field = fieldRef.fieldName;\n documentsWithField[field] || (documentsWithField[field] = 0);\n documentsWithField[field] += 1;\n accumulator[field] || (accumulator[field] = 0);\n accumulator[field] += this.fieldLengths[fieldRef];\n }\n var fields = Object.keys(this._fields);\n for (var i = 0; i < fields.length; i++) {\n var fieldName = fields[i];\n accumulator[fieldName] = accumulator[fieldName] / documentsWithField[fieldName];\n }\n this.averageFieldLength = accumulator;\n };\n\n /**\n * Builds a vector space model of every document using lunr.Vector\n *\n * @private\n */\n lunr.Builder.prototype.createFieldVectors = function () {\n var fieldVectors = {},\n fieldRefs = Object.keys(this.fieldTermFrequencies),\n fieldRefsLength = fieldRefs.length,\n termIdfCache = Object.create(null);\n for (var i = 0; i < fieldRefsLength; i++) {\n var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n fieldName = fieldRef.fieldName,\n fieldLength = this.fieldLengths[fieldRef],\n fieldVector = new lunr.Vector(),\n termFrequencies = this.fieldTermFrequencies[fieldRef],\n terms = Object.keys(termFrequencies),\n termsLength = terms.length;\n var fieldBoost = this._fields[fieldName].boost || 1,\n docBoost = this._documents[fieldRef.docRef].boost || 1;\n for (var j = 0; j < termsLength; j++) {\n var term = terms[j],\n tf = termFrequencies[term],\n termIndex = this.invertedIndex[term]._index,\n idf,\n score,\n scoreWithPrecision;\n if (termIdfCache[term] === undefined) {\n idf = lunr.idf(this.invertedIndex[term], this.documentCount);\n termIdfCache[term] = idf;\n } else {\n idf = termIdfCache[term];\n }\n score = idf * ((this._k1 + 1) * tf) / (this._k1 * (1 - this._b + this._b * (fieldLength / this.averageFieldLength[fieldName])) + tf);\n score *= fieldBoost;\n score *= docBoost;\n scoreWithPrecision = Math.round(score * 1000) / 1000;\n // Converts 1.23456789 to 1.234.\n // Reducing the precision so that the vectors take up less\n // space when serialised. Doing it now so that they behave\n // the same before and after serialisation. Also, this is\n // the fastest approach to reducing a number's precision in\n // JavaScript.\n\n fieldVector.insert(termIndex, scoreWithPrecision);\n }\n fieldVectors[fieldRef] = fieldVector;\n }\n this.fieldVectors = fieldVectors;\n };\n\n /**\n * Creates a token set of all tokens in the index using lunr.TokenSet\n *\n * @private\n */\n lunr.Builder.prototype.createTokenSet = function () {\n this.tokenSet = lunr.TokenSet.fromArray(Object.keys(this.invertedIndex).sort());\n };\n\n /**\n * Builds the index, creating an instance of lunr.Index.\n *\n * This completes the indexing process and should only be called\n * once all documents have been added to the index.\n *\n * @returns {lunr.Index}\n */\n lunr.Builder.prototype.build = function () {\n this.calculateAverageFieldLengths();\n this.createFieldVectors();\n this.createTokenSet();\n return new lunr.Index({\n invertedIndex: this.invertedIndex,\n fieldVectors: this.fieldVectors,\n tokenSet: this.tokenSet,\n fields: Object.keys(this._fields),\n pipeline: this.searchPipeline\n });\n };\n\n /**\n * Applies a plugin to the index builder.\n *\n * A plugin is a function that is called with the index builder as its context.\n * Plugins can be used to customise or extend the behaviour of the index\n * in some way. A plugin is just a function, that encapsulated the custom\n * behaviour that should be applied when building the index.\n *\n * The plugin function will be called with the index builder as its argument, additional\n * arguments can also be passed when calling use. The function will be called\n * with the index builder as its context.\n *\n * @param {Function} plugin The plugin to apply.\n */\n lunr.Builder.prototype.use = function (fn) {\n var args = Array.prototype.slice.call(arguments, 1);\n args.unshift(this);\n fn.apply(this, args);\n };\n /**\n * Contains and collects metadata about a matching document.\n * A single instance of lunr.MatchData is returned as part of every\n * lunr.Index~Result.\n *\n * @constructor\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n * @property {object} metadata - A cloned collection of metadata associated with this document.\n * @see {@link lunr.Index~Result}\n */\n lunr.MatchData = function (term, field, metadata) {\n var clonedMetadata = Object.create(null),\n metadataKeys = Object.keys(metadata || {});\n\n // Cloning the metadata to prevent the original\n // being mutated during match data combination.\n // Metadata is kept in an array within the inverted\n // index so cloning the data can be done with\n // Array#slice\n for (var i = 0; i < metadataKeys.length; i++) {\n var key = metadataKeys[i];\n clonedMetadata[key] = metadata[key].slice();\n }\n this.metadata = Object.create(null);\n if (term !== undefined) {\n this.metadata[term] = Object.create(null);\n this.metadata[term][field] = clonedMetadata;\n }\n };\n\n /**\n * An instance of lunr.MatchData will be created for every term that matches a\n * document. However only one instance is required in a lunr.Index~Result. This\n * method combines metadata from another instance of lunr.MatchData with this\n * objects metadata.\n *\n * @param {lunr.MatchData} otherMatchData - Another instance of match data to merge with this one.\n * @see {@link lunr.Index~Result}\n */\n lunr.MatchData.prototype.combine = function (otherMatchData) {\n var terms = Object.keys(otherMatchData.metadata);\n for (var i = 0; i < terms.length; i++) {\n var term = terms[i],\n fields = Object.keys(otherMatchData.metadata[term]);\n if (this.metadata[term] == undefined) {\n this.metadata[term] = Object.create(null);\n }\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j],\n keys = Object.keys(otherMatchData.metadata[term][field]);\n if (this.metadata[term][field] == undefined) {\n this.metadata[term][field] = Object.create(null);\n }\n for (var k = 0; k < keys.length; k++) {\n var key = keys[k];\n if (this.metadata[term][field][key] == undefined) {\n this.metadata[term][field][key] = otherMatchData.metadata[term][field][key];\n } else {\n this.metadata[term][field][key] = this.metadata[term][field][key].concat(otherMatchData.metadata[term][field][key]);\n }\n }\n }\n }\n };\n\n /**\n * Add metadata for a term/field pair to this instance of match data.\n *\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n */\n lunr.MatchData.prototype.add = function (term, field, metadata) {\n if (!(term in this.metadata)) {\n this.metadata[term] = Object.create(null);\n this.metadata[term][field] = metadata;\n return;\n }\n if (!(field in this.metadata[term])) {\n this.metadata[term][field] = metadata;\n return;\n }\n var metadataKeys = Object.keys(metadata);\n for (var i = 0; i < metadataKeys.length; i++) {\n var key = metadataKeys[i];\n if (key in this.metadata[term][field]) {\n this.metadata[term][field][key] = this.metadata[term][field][key].concat(metadata[key]);\n } else {\n this.metadata[term][field][key] = metadata[key];\n }\n }\n };\n /**\n * A lunr.Query provides a programmatic way of defining queries to be performed\n * against a {@link lunr.Index}.\n *\n * Prefer constructing a lunr.Query using the {@link lunr.Index#query} method\n * so the query object is pre-initialized with the right index fields.\n *\n * @constructor\n * @property {lunr.Query~Clause[]} clauses - An array of query clauses.\n * @property {string[]} allFields - An array of all available fields in a lunr.Index.\n */\n lunr.Query = function (allFields) {\n this.clauses = [];\n this.allFields = allFields;\n };\n\n /**\n * Constants for indicating what kind of automatic wildcard insertion will be used when constructing a query clause.\n *\n * This allows wildcards to be added to the beginning and end of a term without having to manually do any string\n * concatenation.\n *\n * The wildcard constants can be bitwise combined to select both leading and trailing wildcards.\n *\n * @constant\n * @default\n * @property {number} wildcard.NONE - The term will have no wildcards inserted, this is the default behaviour\n * @property {number} wildcard.LEADING - Prepend the term with a wildcard, unless a leading wildcard already exists\n * @property {number} wildcard.TRAILING - Append a wildcard to the term, unless a trailing wildcard already exists\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example <caption>query term with trailing wildcard</caption>\n * query.term('foo', { wildcard: lunr.Query.wildcard.TRAILING })\n * @example <caption>query term with leading and trailing wildcard</caption>\n * query.term('foo', {\n * wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING\n * })\n */\n\n lunr.Query.wildcard = new String(\"*\");\n lunr.Query.wildcard.NONE = 0;\n lunr.Query.wildcard.LEADING = 1;\n lunr.Query.wildcard.TRAILING = 2;\n\n /**\n * Constants for indicating what kind of presence a term must have in matching documents.\n *\n * @constant\n * @enum {number}\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example <caption>query term with required presence</caption>\n * query.term('foo', { presence: lunr.Query.presence.REQUIRED })\n */\n lunr.Query.presence = {\n /**\n * Term's presence in a document is optional, this is the default value.\n */\n OPTIONAL: 1,\n /**\n * Term's presence in a document is required, documents that do not contain\n * this term will not be returned.\n */\n REQUIRED: 2,\n /**\n * Term's presence in a document is prohibited, documents that do contain\n * this term will not be returned.\n */\n PROHIBITED: 3\n };\n\n /**\n * A single clause in a {@link lunr.Query} contains a term and details on how to\n * match that term against a {@link lunr.Index}.\n *\n * @typedef {Object} lunr.Query~Clause\n * @property {string[]} fields - The fields in an index this clause should be matched against.\n * @property {number} [boost=1] - Any boost that should be applied when matching this clause.\n * @property {number} [editDistance] - Whether the term should have fuzzy matching applied, and how fuzzy the match should be.\n * @property {boolean} [usePipeline] - Whether the term should be passed through the search pipeline.\n * @property {number} [wildcard=lunr.Query.wildcard.NONE] - Whether the term should have wildcards appended or prepended.\n * @property {number} [presence=lunr.Query.presence.OPTIONAL] - The terms presence in any matching documents.\n */\n\n /**\n * Adds a {@link lunr.Query~Clause} to this query.\n *\n * Unless the clause contains the fields to be matched all fields will be matched. In addition\n * a default boost of 1 is applied to the clause.\n *\n * @param {lunr.Query~Clause} clause - The clause to add to this query.\n * @see lunr.Query~Clause\n * @returns {lunr.Query}\n */\n lunr.Query.prototype.clause = function (clause) {\n if (!('fields' in clause)) {\n clause.fields = this.allFields;\n }\n if (!('boost' in clause)) {\n clause.boost = 1;\n }\n if (!('usePipeline' in clause)) {\n clause.usePipeline = true;\n }\n if (!('wildcard' in clause)) {\n clause.wildcard = lunr.Query.wildcard.NONE;\n }\n if (clause.wildcard & lunr.Query.wildcard.LEADING && clause.term.charAt(0) != lunr.Query.wildcard) {\n clause.term = \"*\" + clause.term;\n }\n if (clause.wildcard & lunr.Query.wildcard.TRAILING && clause.term.slice(-1) != lunr.Query.wildcard) {\n clause.term = \"\" + clause.term + \"*\";\n }\n if (!('presence' in clause)) {\n clause.presence = lunr.Query.presence.OPTIONAL;\n }\n this.clauses.push(clause);\n return this;\n };\n\n /**\n * A negated query is one in which every clause has a presence of\n * prohibited. These queries require some special processing to return\n * the expected results.\n *\n * @returns boolean\n */\n lunr.Query.prototype.isNegated = function () {\n for (var i = 0; i < this.clauses.length; i++) {\n if (this.clauses[i].presence != lunr.Query.presence.PROHIBITED) {\n return false;\n }\n }\n return true;\n };\n\n /**\n * Adds a term to the current query, under the covers this will create a {@link lunr.Query~Clause}\n * to the list of clauses that make up this query.\n *\n * The term is used as is, i.e. no tokenization will be performed by this method. Instead conversion\n * to a token or token-like string should be done before calling this method.\n *\n * The term will be converted to a string by calling `toString`. Multiple terms can be passed as an\n * array, each term in the array will share the same options.\n *\n * @param {object|object[]} term - The term(s) to add to the query.\n * @param {object} [options] - Any additional properties to add to the query clause.\n * @returns {lunr.Query}\n * @see lunr.Query#clause\n * @see lunr.Query~Clause\n * @example <caption>adding a single term to a query</caption>\n * query.term(\"foo\")\n * @example <caption>adding a single term to a query and specifying search fields, term boost and automatic trailing wildcard</caption>\n * query.term(\"foo\", {\n * fields: [\"title\"],\n * boost: 10,\n * wildcard: lunr.Query.wildcard.TRAILING\n * })\n * @example <caption>using lunr.tokenizer to convert a string to tokens before using them as terms</caption>\n * query.term(lunr.tokenizer(\"foo bar\"))\n */\n lunr.Query.prototype.term = function (term, options) {\n if (Array.isArray(term)) {\n term.forEach(function (t) {\n this.term(t, lunr.utils.clone(options));\n }, this);\n return this;\n }\n var clause = options || {};\n clause.term = term.toString();\n this.clause(clause);\n return this;\n };\n lunr.QueryParseError = function (message, start, end) {\n this.name = \"QueryParseError\";\n this.message = message;\n this.start = start;\n this.end = end;\n };\n lunr.QueryParseError.prototype = new Error();\n lunr.QueryLexer = function (str) {\n this.lexemes = [];\n this.str = str;\n this.length = str.length;\n this.pos = 0;\n this.start = 0;\n this.escapeCharPositions = [];\n };\n lunr.QueryLexer.prototype.run = function () {\n var state = lunr.QueryLexer.lexText;\n while (state) {\n state = state(this);\n }\n };\n lunr.QueryLexer.prototype.sliceString = function () {\n var subSlices = [],\n sliceStart = this.start,\n sliceEnd = this.pos;\n for (var i = 0; i < this.escapeCharPositions.length; i++) {\n sliceEnd = this.escapeCharPositions[i];\n subSlices.push(this.str.slice(sliceStart, sliceEnd));\n sliceStart = sliceEnd + 1;\n }\n subSlices.push(this.str.slice(sliceStart, this.pos));\n this.escapeCharPositions.length = 0;\n return subSlices.join('');\n };\n lunr.QueryLexer.prototype.emit = function (type) {\n this.lexemes.push({\n type: type,\n str: this.sliceString(),\n start: this.start,\n end: this.pos\n });\n this.start = this.pos;\n };\n lunr.QueryLexer.prototype.escapeCharacter = function () {\n this.escapeCharPositions.push(this.pos - 1);\n this.pos += 1;\n };\n lunr.QueryLexer.prototype.next = function () {\n if (this.pos >= this.length) {\n return lunr.QueryLexer.EOS;\n }\n var char = this.str.charAt(this.pos);\n this.pos += 1;\n return char;\n };\n lunr.QueryLexer.prototype.width = function () {\n return this.pos - this.start;\n };\n lunr.QueryLexer.prototype.ignore = function () {\n if (this.start == this.pos) {\n this.pos += 1;\n }\n this.start = this.pos;\n };\n lunr.QueryLexer.prototype.backup = function () {\n this.pos -= 1;\n };\n lunr.QueryLexer.prototype.acceptDigitRun = function () {\n var char, charCode;\n do {\n char = this.next();\n charCode = char.charCodeAt(0);\n } while (charCode > 47 && charCode < 58);\n if (char != lunr.QueryLexer.EOS) {\n this.backup();\n }\n };\n lunr.QueryLexer.prototype.more = function () {\n return this.pos < this.length;\n };\n lunr.QueryLexer.EOS = 'EOS';\n lunr.QueryLexer.FIELD = 'FIELD';\n lunr.QueryLexer.TERM = 'TERM';\n lunr.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE';\n lunr.QueryLexer.BOOST = 'BOOST';\n lunr.QueryLexer.PRESENCE = 'PRESENCE';\n lunr.QueryLexer.lexField = function (lexer) {\n lexer.backup();\n lexer.emit(lunr.QueryLexer.FIELD);\n lexer.ignore();\n return lunr.QueryLexer.lexText;\n };\n lunr.QueryLexer.lexTerm = function (lexer) {\n if (lexer.width() > 1) {\n lexer.backup();\n lexer.emit(lunr.QueryLexer.TERM);\n }\n lexer.ignore();\n if (lexer.more()) {\n return lunr.QueryLexer.lexText;\n }\n };\n lunr.QueryLexer.lexEditDistance = function (lexer) {\n lexer.ignore();\n lexer.acceptDigitRun();\n lexer.emit(lunr.QueryLexer.EDIT_DISTANCE);\n return lunr.QueryLexer.lexText;\n };\n lunr.QueryLexer.lexBoost = function (lexer) {\n lexer.ignore();\n lexer.acceptDigitRun();\n lexer.emit(lunr.QueryLexer.BOOST);\n return lunr.QueryLexer.lexText;\n };\n lunr.QueryLexer.lexEOS = function (lexer) {\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM);\n }\n };\n\n // This matches the separator used when tokenising fields\n // within a document. These should match otherwise it is\n // not possible to search for some tokens within a document.\n //\n // It is possible for the user to change the separator on the\n // tokenizer so it _might_ clash with any other of the special\n // characters already used within the search string, e.g. :.\n //\n // This means that it is possible to change the separator in\n // such a way that makes some words unsearchable using a search\n // string.\n lunr.QueryLexer.termSeparator = lunr.tokenizer.separator;\n lunr.QueryLexer.lexText = function (lexer) {\n while (true) {\n var char = lexer.next();\n if (char == lunr.QueryLexer.EOS) {\n return lunr.QueryLexer.lexEOS;\n }\n\n // Escape character is '\\'\n if (char.charCodeAt(0) == 92) {\n lexer.escapeCharacter();\n continue;\n }\n if (char == \":\") {\n return lunr.QueryLexer.lexField;\n }\n if (char == \"~\") {\n lexer.backup();\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM);\n }\n return lunr.QueryLexer.lexEditDistance;\n }\n if (char == \"^\") {\n lexer.backup();\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM);\n }\n return lunr.QueryLexer.lexBoost;\n }\n\n // \"+\" indicates term presence is required\n // checking for length to ensure that only\n // leading \"+\" are considered\n if (char == \"+\" && lexer.width() === 1) {\n lexer.emit(lunr.QueryLexer.PRESENCE);\n return lunr.QueryLexer.lexText;\n }\n\n // \"-\" indicates term presence is prohibited\n // checking for length to ensure that only\n // leading \"-\" are considered\n if (char == \"-\" && lexer.width() === 1) {\n lexer.emit(lunr.QueryLexer.PRESENCE);\n return lunr.QueryLexer.lexText;\n }\n if (char.match(lunr.QueryLexer.termSeparator)) {\n return lunr.QueryLexer.lexTerm;\n }\n }\n };\n lunr.QueryParser = function (str, query) {\n this.lexer = new lunr.QueryLexer(str);\n this.query = query;\n this.currentClause = {};\n this.lexemeIdx = 0;\n };\n lunr.QueryParser.prototype.parse = function () {\n this.lexer.run();\n this.lexemes = this.lexer.lexemes;\n var state = lunr.QueryParser.parseClause;\n while (state) {\n state = state(this);\n }\n return this.query;\n };\n lunr.QueryParser.prototype.peekLexeme = function () {\n return this.lexemes[this.lexemeIdx];\n };\n lunr.QueryParser.prototype.consumeLexeme = function () {\n var lexeme = this.peekLexeme();\n this.lexemeIdx += 1;\n return lexeme;\n };\n lunr.QueryParser.prototype.nextClause = function () {\n var completedClause = this.currentClause;\n this.query.clause(completedClause);\n this.currentClause = {};\n };\n lunr.QueryParser.parseClause = function (parser) {\n var lexeme = parser.peekLexeme();\n if (lexeme == undefined) {\n return;\n }\n switch (lexeme.type) {\n case lunr.QueryLexer.PRESENCE:\n return lunr.QueryParser.parsePresence;\n case lunr.QueryLexer.FIELD:\n return lunr.QueryParser.parseField;\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm;\n default:\n var errorMessage = \"expected either a field or a term, found \" + lexeme.type;\n if (lexeme.str.length >= 1) {\n errorMessage += \" with value '\" + lexeme.str + \"'\";\n }\n throw new lunr.QueryParseError(errorMessage, lexeme.start, lexeme.end);\n }\n };\n lunr.QueryParser.parsePresence = function (parser) {\n var lexeme = parser.consumeLexeme();\n if (lexeme == undefined) {\n return;\n }\n switch (lexeme.str) {\n case \"-\":\n parser.currentClause.presence = lunr.Query.presence.PROHIBITED;\n break;\n case \"+\":\n parser.currentClause.presence = lunr.Query.presence.REQUIRED;\n break;\n default:\n var errorMessage = \"unrecognised presence operator'\" + lexeme.str + \"'\";\n throw new lunr.QueryParseError(errorMessage, lexeme.start, lexeme.end);\n }\n var nextLexeme = parser.peekLexeme();\n if (nextLexeme == undefined) {\n var errorMessage = \"expecting term or field, found nothing\";\n throw new lunr.QueryParseError(errorMessage, lexeme.start, lexeme.end);\n }\n switch (nextLexeme.type) {\n case lunr.QueryLexer.FIELD:\n return lunr.QueryParser.parseField;\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm;\n default:\n var errorMessage = \"expecting term or field, found '\" + nextLexeme.type + \"'\";\n throw new lunr.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);\n }\n };\n lunr.QueryParser.parseField = function (parser) {\n var lexeme = parser.consumeLexeme();\n if (lexeme == undefined) {\n return;\n }\n if (parser.query.allFields.indexOf(lexeme.str) == -1) {\n var possibleFields = parser.query.allFields.map(function (f) {\n return \"'\" + f + \"'\";\n }).join(', '),\n errorMessage = \"unrecognised field '\" + lexeme.str + \"', possible fields: \" + possibleFields;\n throw new lunr.QueryParseError(errorMessage, lexeme.start, lexeme.end);\n }\n parser.currentClause.fields = [lexeme.str];\n var nextLexeme = parser.peekLexeme();\n if (nextLexeme == undefined) {\n var errorMessage = \"expecting term, found nothing\";\n throw new lunr.QueryParseError(errorMessage, lexeme.start, lexeme.end);\n }\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm;\n default:\n var errorMessage = \"expecting term, found '\" + nextLexeme.type + \"'\";\n throw new lunr.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);\n }\n };\n lunr.QueryParser.parseTerm = function (parser) {\n var lexeme = parser.consumeLexeme();\n if (lexeme == undefined) {\n return;\n }\n parser.currentClause.term = lexeme.str.toLowerCase();\n if (lexeme.str.indexOf(\"*\") != -1) {\n parser.currentClause.usePipeline = false;\n }\n var nextLexeme = parser.peekLexeme();\n if (nextLexeme == undefined) {\n parser.nextClause();\n return;\n }\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause();\n return lunr.QueryParser.parseTerm;\n case lunr.QueryLexer.FIELD:\n parser.nextClause();\n return lunr.QueryParser.parseField;\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance;\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost;\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause();\n return lunr.QueryParser.parsePresence;\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\";\n throw new lunr.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);\n }\n };\n lunr.QueryParser.parseEditDistance = function (parser) {\n var lexeme = parser.consumeLexeme();\n if (lexeme == undefined) {\n return;\n }\n var editDistance = parseInt(lexeme.str, 10);\n if (isNaN(editDistance)) {\n var errorMessage = \"edit distance must be numeric\";\n throw new lunr.QueryParseError(errorMessage, lexeme.start, lexeme.end);\n }\n parser.currentClause.editDistance = editDistance;\n var nextLexeme = parser.peekLexeme();\n if (nextLexeme == undefined) {\n parser.nextClause();\n return;\n }\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause();\n return lunr.QueryParser.parseTerm;\n case lunr.QueryLexer.FIELD:\n parser.nextClause();\n return lunr.QueryParser.parseField;\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance;\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost;\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause();\n return lunr.QueryParser.parsePresence;\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\";\n throw new lunr.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);\n }\n };\n lunr.QueryParser.parseBoost = function (parser) {\n var lexeme = parser.consumeLexeme();\n if (lexeme == undefined) {\n return;\n }\n var boost = parseInt(lexeme.str, 10);\n if (isNaN(boost)) {\n var errorMessage = \"boost must be numeric\";\n throw new lunr.QueryParseError(errorMessage, lexeme.start, lexeme.end);\n }\n parser.currentClause.boost = boost;\n var nextLexeme = parser.peekLexeme();\n if (nextLexeme == undefined) {\n parser.nextClause();\n return;\n }\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause();\n return lunr.QueryParser.parseTerm;\n case lunr.QueryLexer.FIELD:\n parser.nextClause();\n return lunr.QueryParser.parseField;\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance;\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost;\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause();\n return lunr.QueryParser.parsePresence;\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\";\n throw new lunr.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);\n }\n }\n\n /**\n * export the module via AMD, CommonJS or as a browser global\n * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js\n */;\n (function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory);\n } else if (typeof exports === 'object') {\n /**\n * Node. Does not work with strict CommonJS, but\n * only CommonJS-like enviroments that support module.exports,\n * like Node.\n */\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.lunr = factory();\n }\n })(this, function () {\n /**\n * Just return a value to define the module export.\n * This example returns an object, but the module\n * can return a function as the exported value.\n */\n return lunr;\n });\n})();","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","'use strict';\nvar $trimEnd = require('../internals/string-trim').end;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.{ trimEnd, trimRight }` method\n// https://tc39.es/ecma262/#sec-string.prototype.trimend\n// https://tc39.es/ecma262/#String.prototype.trimright\nmodule.exports = forcedStringTrimMethod('trimEnd') ? function trimEnd() {\n return $trimEnd(this);\n// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe\n} : ''.trimEnd;\n","var arrayEach = require('./_arrayEach'),\n baseEach = require('./_baseEach'),\n castFunction = require('./_castFunction'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","// TODO: Remove this line from `core-js@4`\nrequire('../modules/es.string.trim-right');\nvar $ = require('../internals/export');\nvar trimEnd = require('../internals/string-trim-end');\n\n// `String.prototype.trimEnd` method\n// https://tc39.es/ecma262/#sec-string.prototype.trimend\n// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe\n$({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimEnd !== trimEnd }, {\n trimEnd: trimEnd\n});\n","module.exports = require('./forEach');\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\n// Components\nimport CustomLink from \"../elements/custom-link\"\n\nconst Menu = props => {\n const { menuSecundario } = props\n return (\n <div id=\"asm-menu\" className=\"container my-0 my-sm-5\">\n <div className=\"row\">\n {menuSecundario.map((item, index) => {\n return (\n <div className=\"col-sm text-center\" key={index}>\n <CustomLink\n link={item}\n customClass={\"nav-link\" + (index === 0 ? \" active\" : \"\")}\n >\n <img src={item.icono && item.icono.publicURL ? item.icono.publicURL : \"http://placehold.it/75x75\"} alt={item.nombre} />\n {item.nombre}\n </CustomLink>\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nMenu.propTypes = {\n menuSecundario: PropTypes.arrayOf(\n PropTypes.shape({\n nombre: PropTypes.string.isRequired,\n tipo: PropTypes.string.isRequired,\n link_id: PropTypes.string.isRequired,\n icono: PropTypes.shape({\n publicURL: PropTypes.string.isRequired,\n }).isRequired,\n })\n ).isRequired,\n}\n\nMenu.defaultProps = {\n menuSecundario: [\n {\n nombre: `Afiliación a la Mano`,\n tipo: `Pagina`,\n link_id: `/`,\n icono: {\n publicURL: `/static/6e42e9fd87b792be6a3040d64eeec6b3/36e2e83e7518ebc69a1b6b2108c16be8.png`,\n },\n },\n ],\n}\n\nexport default Menu\n"],"sourceRoot":""}