functionIsValidPublicDicitonary(){return"string"!=typeofpublicDictionary}functionShowPublicDictionary(e){if(e="undefined"!=typeofe?e:!1,IsValidPublicDicitonary()){vari=e?[]:GetSelectedFilters(),n=[],t=e?"":htmlEntitiesParseForSearchEntry(document.getElementById("searchBox").value),r=e?null:document.getElementById("searchOptionWord").checked,o=e?null:document.getElementById("searchOptionSimple").checked,c=e?null:document.getElementById("searchOptionLong").checked,a=e?null:!document.getElementById("searchCaseSensitive").checked,l=e?null:document.getElementById("searchIgnoreDiacritics").checked;if(!e&&""!=t&&(r||o||c)){vard=[],s=htmlEntitiesParseForSearch(JSON.stringify(publicDictionary));a&&(t=t.toLowerCase()),l&&(t=removeDiacritics(t),s=removeDiacritics(s)),r&&d.push("contains("+(a?"name":'translate(name, "", "")')+', "'+t+'")'),o&&d.push("contains("+(a?"simpleDefinition":'translate(simpleDefinition, "", "")')+', "'+t+'")'),c&&d.push("contains("+(a?"longDefinition":'translate(longDefinition, "", "")')+', "'+t+'")');varp=JSON.parse(s);n=JSON.search(p,"//words["+d.join(" or ")+"]/wordId")}varm=document.getElementById("dictionaryName");m.innerHTML=publicDictionary.name+" Dictionary";varu=document.getElementById("dictionaryBy");u.innerHTML="created by "+publicDictionary.createdBy;varh=document.getElementById("incompleteNotice");publicDictionary.settings.isComplete||(h.innerHTML="<em>Note: This dictionary is not yet complete and is likely to change.</em>");vary=document.getElementById("dictionaryDescription");y.innerHTML=marked(htmlEntitiesParseForMarkdown(publicDictionary.description));varD=document.getElementById("theDictionary"),f="",g=0;if(publicDictionary.words.length>0)for(varw=0;w<publicDictionary.words.length;w++)(0==i.length||i.length>0&&i.indexOf(publicDictionary.words[w].partOfSpeech)>-1)&&(""==t||""!=t&&(r||o||c)&&n.indexOf(publicDictionary.words[w].wordId)>=0)&&(publicDictionary.words[w].hasOwnProperty("pronunciation")||(publicDictionary.words[w].pronunciation=""),publicDictionary.words[w].hasOwnProperty("wordId")||(publicDictionary.words[w].wordId=w+1),f+=PublicDictionaryEntry(w,e),g++);elsef="There are no entries in the dictionary.";D.innerHTML=f,e||ShowFilterWordCount(g)}elsedocument.getElementById("dictionaryContainer").innerHTML=publicDictionary}functionPublicDictionaryEntry(e,i){varn=i?"":regexParseForSearch(document.getElementById("searchBox").value),t=i?!1:document.getElementById("searchOptionWord").checked,r=i?!1:document.getElementById("searchOptionSimple").checked,o=i?!1:document.getElementById("searchOptionLong").checked,c=i?!1:!document.getElementById("searchCaseSensitive").checked,a=i?!1:document.getElementById("searchIgnoreDiacritics").checked,l=newRegExp("("+(a?removeDiacritics(n)+"|"+n:n)+")","g"+(c?"i":"")),d=wordPronunciation=wordPartOfSpeech=wordSimpleDefinition=wordLongDefinition="";returnd+=""!=n&&t?htmlEntities(htmlEntitiesParse(publicDictionary.words[e].name).replace(l,"<searchterm>$1</searchterm>")).replace(/<(\/?)searchterm>/g,"<$1searchterm>"):publicDictionary.words[e].name.toString(),""!=publicDictionary.words[e].pronunciation&&(wordPronunciation+=marked(htmlEntitiesParseForMarkdown(publicDictionary.words[e].pronunciation)).replace(/<\/?p>/g,""))," "!=publicDictionary.words[e].partOfSpeech&&""!=publicDictionary.words[e].partOfSpeech&&(wordPartOfSpeech+=publicDictionary.words[e].partOfSpeech.toString()),""!=publicDictionary.words[e].simpleDefinition&&(""!=n&&r?wordSimpleDefinition+=htmlEntities(htmlEntitiesParse(publicDictionary.words[e].simpleDefinition).replace(l,"<searchterm>$1</searchterm>")).replace(/<(\/?)searchterm>/g,"<$1searchterm>"):wordSimpleDefinition+=publicDictionary.words[e].simpleDefinition.toString()),""!=publicDictionary.words[e].longDefinition&&(""!=n&&o?wordLongDefinition+=marked(htmlEntitiesParseForMarkdown(htmlEntities(htmlEntitiesParse(publicDictionary.words[e].longDefinition).replace(l,"<searchterm>$1</searchterm>")))).replace(/<(\/?)searchterm>\;/g,"<$1searchterm>"):wordLongDefinition+=marked(htmlEntitiesParseForMarkdown(publi