!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).RevealSearch=t()}(this,(function(){"use strict"; /*! * Handles finding a text string anywhere in the slides and showing the next occurrence to the user * by navigatating to that slide and highlighting it. * * By Jon Snyder , February 2013 */return function(){var e,t,n,i;function r(e,t){var n=document.getElementById(e)||document.body,i=t||"EM",r=new RegExp("^(?:"+i+"|SCRIPT|FORM)$"),o=["#ff6","#a0ffff","#9f9","#f99","#f6f"],d=[],l=0,a="",s=[];this.setRegex=function(e){e=e.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w'-]+/g,"|"),a=new RegExp("("+e+")","i")},this.getRegex=function(){return a.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(e){if(null!=e&&e&&a&&!r.test(e.nodeName)){if(e.hasChildNodes())for(var t=0;tt&&(Reveal.slide(e[t].h,e[t].v),t++))}var a={};if(a.wrapper=document.querySelector(".reveal"),!a.wrapper.querySelector(".searchbox")){var s=document.createElement("div");s.id="searchinputdiv",s.classList.add("searchdiv"),s.style.position="absolute",s.style.top="10px",s.style.right="10px",s.style.zIndex=10,s.innerHTML='',a.wrapper.appendChild(s)}return document.getElementById("searchbutton").addEventListener("click",(function(e){l()}),!1),document.getElementById("searchinput").addEventListener("keyup",(function(e){switch(e.keyCode){case 13:e.preventDefault(),l(),n=!1;break;default:n=!0}}),!1),document.addEventListener("keydown",(function(e){"F"==e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),"inline"!==document.getElementById("searchinputdiv").style.display?o():d())}),!1),d(),{id:"search",init:function(e){e.registerKeyboardShortcut("CTRL + Shift + F","Search")},open:o}}()}));