-
Notifications
You must be signed in to change notification settings - Fork 12
/
reveal.min.js
2 lines (2 loc) · 44.8 KB
/
reveal.min.js
1
2
!function(e,t){"function"==typeof define&&define.amd?define(function(){return e.Reveal=t(),e.Reveal}):"object"==typeof exports?module.exports=t():e.Reveal=t()}(this,function(){"use strict";function e(e){if(t(),Ht.transforms2d||Ht.transforms3d){Dt.wrapper=document.querySelector(".reveal"),Dt.slides=document.querySelector(".reveal .slides"),window.addEventListener("load",W,!1);var n=gt.getQueryHash();"undefined"!=typeof n.dependencies&&delete n.dependencies,h(Mt,e),h(Mt,n),q(),r()}else{document.body.setAttribute("class","no-transforms");for(var a=g(document.getElementsByTagName("img")),i=g(document.getElementsByTagName("iframe")),o=a.concat(i),s=0,c=o.length;c>s;s++){var l=o[s];l.getAttribute("data-src")&&(l.setAttribute("src",l.getAttribute("data-src")),l.removeAttribute("data-src"))}}}function t(){Ht.transforms3d="WebkitPerspective"in document.body.style||"MozPerspective"in document.body.style||"msPerspective"in document.body.style||"OPerspective"in document.body.style||"perspective"in document.body.style,Ht.transforms2d="WebkitTransform"in document.body.style||"MozTransform"in document.body.style||"msTransform"in document.body.style||"OTransform"in document.body.style||"transform"in document.body.style,Ht.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,Ht.requestAnimationFrame="function"==typeof Ht.requestAnimationFrameMethod,Ht.canvas=!!document.createElement("canvas").getContext,Ht.touch=!!("ontouchstart"in window),Ht.overviewTransitions=!/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),Lt=/(iphone|ipod|ipad|android)/gi.test(navigator.userAgent)}function r(){function e(){a.length&&head.js.apply(null,a),n()}function t(t){head.ready(t.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof t.callback&&t.callback.apply(this),0===--i&&e()})}for(var r=[],a=[],i=0,o=0,s=Mt.dependencies.length;s>o;o++){var c=Mt.dependencies[o];(!c.condition||c.condition())&&(c.async?a.push(c.src):r.push(c.src),t(c))}r.length?(i=r.length,head.js.apply(null,r)):e()}function n(){a(),u(),s(),ae(),p(),Ee(),ue(!0),setTimeout(function(){Dt.slides.classList.remove("no-transition"),Tt=!0,T("ready",{indexh:mt,indexv:yt,currentSlide:wt})},1),x()&&(v(),"complete"===document.readyState?o():window.addEventListener("load",o))}function a(){Dt.slides.classList.add("no-transition"),Dt.background=c(Dt.wrapper,"div","backgrounds",null),Dt.progress=c(Dt.wrapper,"div","progress","<span></span>"),Dt.progressbar=Dt.progress.querySelector("span"),c(Dt.wrapper,"aside","controls",'<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>'),Dt.slideNumber=c(Dt.wrapper,"div","slide-number",""),c(Dt.wrapper,"div","pause-overlay",null),Dt.controls=document.querySelector(".reveal .controls"),Dt.theme=document.querySelector("#theme"),Dt.wrapper.setAttribute("role","application"),Dt.controlsLeft=g(document.querySelectorAll(".navigate-left")),Dt.controlsRight=g(document.querySelectorAll(".navigate-right")),Dt.controlsUp=g(document.querySelectorAll(".navigate-up")),Dt.controlsDown=g(document.querySelectorAll(".navigate-down")),Dt.controlsPrev=g(document.querySelectorAll(".navigate-prev")),Dt.controlsNext=g(document.querySelectorAll(".navigate-next")),Dt.statusDiv=i()}function i(){var e=document.getElementById("aria-status-div");return e||(e=document.createElement("div"),e.style.position="absolute",e.style.height="1px",e.style.width="1px",e.style.overflow="hidden",e.style.clip="rect( 1px, 1px, 1px, 1px )",e.setAttribute("id","aria-status-div"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),Dt.wrapper.appendChild(e)),e}function o(){var e=O(window.innerWidth,window.innerHeight),t=Math.floor(e.width*(1+Mt.margin)),r=Math.floor(e.height*(1+Mt.margin)),n=e.width,a=e.height;k("@page{size:"+t+"px "+r+"px; margin: 0;}"),k(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+n+"px; max-height:"+a+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=t+"px",document.body.style.height=r+"px",g(Dt.wrapper.querySelectorAll(Et)).forEach(function(e){if(e.classList.contains("stack")===!1){var i=(t-n)/2,o=(r-a)/2,s=E(e),c=Math.max(Math.ceil(s/r),1);(1===c&&Mt.center||e.classList.contains("center"))&&(o=Math.max((r-s)/2,0)),e.style.left=i+"px",e.style.top=o+"px",e.style.width=n+"px";var l=e.querySelector(".slide-background");l&&(l.style.width=t+"px",l.style.height=r*c+"px",l.style.top=-o+"px",l.style.left=-i+"px")}}),g(Dt.wrapper.querySelectorAll(Et+" .fragment")).forEach(function(e){e.classList.add("visible")})}function s(){Dt.slides.querySelector("iframe")&&setInterval(function(){(0!==Dt.wrapper.scrollTop||0!==Dt.wrapper.scrollLeft)&&(Dt.wrapper.scrollTop=0,Dt.wrapper.scrollLeft=0)},500)}function c(e,t,r,n){for(var a=e.querySelectorAll("."+r),i=0;i<a.length;i++){var o=a[i];if(o.parentNode===e)return o}var s=document.createElement(t);return s.classList.add(r),"string"==typeof n&&(s.innerHTML=n),e.appendChild(s),s}function l(){var e=x();Dt.background.innerHTML="",Dt.background.classList.add("no-transition"),g(Dt.wrapper.querySelectorAll(St)).forEach(function(t){var r;r=e?d(t,t):d(t,Dt.background),g(t.querySelectorAll("section")).forEach(function(t){e?d(t,t):d(t,r),r.classList.add("stack")})}),Mt.parallaxBackgroundImage?(Dt.background.style.backgroundImage='url("'+Mt.parallaxBackgroundImage+'")',Dt.background.style.backgroundSize=Mt.parallaxBackgroundSize,setTimeout(function(){Dt.wrapper.classList.add("has-parallax-background")},1)):(Dt.background.style.backgroundImage="",Dt.wrapper.classList.remove("has-parallax-background"))}function d(e,t){var r={background:e.getAttribute("data-background"),backgroundSize:e.getAttribute("data-background-size"),backgroundImage:e.getAttribute("data-background-image"),backgroundVideo:e.getAttribute("data-background-video"),backgroundIframe:e.getAttribute("data-background-iframe"),backgroundColor:e.getAttribute("data-background-color"),backgroundRepeat:e.getAttribute("data-background-repeat"),backgroundPosition:e.getAttribute("data-background-position"),backgroundTransition:e.getAttribute("data-background-transition")},n=document.createElement("div");n.className="slide-background "+e.className.replace(/present|past|future/,""),r.background&&(/^(http|file|\/\/)/gi.test(r.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(r.background)?e.setAttribute("data-background-image",r.background):n.style.background=r.background),(r.background||r.backgroundColor||r.backgroundImage||r.backgroundVideo||r.backgroundIframe)&&n.setAttribute("data-background-hash",r.background+r.backgroundSize+r.backgroundImage+r.backgroundVideo+r.backgroundIframe+r.backgroundColor+r.backgroundRepeat+r.backgroundPosition+r.backgroundTransition),r.backgroundSize&&(n.style.backgroundSize=r.backgroundSize),r.backgroundColor&&(n.style.backgroundColor=r.backgroundColor),r.backgroundRepeat&&(n.style.backgroundRepeat=r.backgroundRepeat),r.backgroundPosition&&(n.style.backgroundPosition=r.backgroundPosition),r.backgroundTransition&&n.setAttribute("data-background-transition",r.backgroundTransition),t.appendChild(n),e.classList.remove("has-dark-background"),e.classList.remove("has-light-background");var a=window.getComputedStyle(n).backgroundColor;if(a){var i=L(a);i&&0!==i.a&&(A(a)<128?e.classList.add("has-dark-background"):e.classList.add("has-light-background"))}return n}function u(){Mt.postMessage&&window.addEventListener("message",function(e){var t=e.data;"string"==typeof t&&"{"===t.charAt(0)&&"}"===t.charAt(t.length-1)&&(t=JSON.parse(t),t.method&&"function"==typeof gt[t.method]&>[t.method].apply(gt,t.args))},!1)}function p(e){var t=Dt.wrapper.querySelectorAll(Et).length;Dt.wrapper.classList.remove(Mt.transition),"object"==typeof e&&h(Mt,e),Ht.transforms3d===!1&&(Mt.transition="linear"),Dt.wrapper.classList.add(Mt.transition),Dt.wrapper.setAttribute("data-transition-speed",Mt.transitionSpeed),Dt.wrapper.setAttribute("data-background-transition",Mt.backgroundTransition),Dt.controls.style.display=Mt.controls?"block":"none",Dt.progress.style.display=Mt.progress?"block":"none",Mt.rtl?Dt.wrapper.classList.add("rtl"):Dt.wrapper.classList.remove("rtl"),Mt.center?Dt.wrapper.classList.add("center"):Dt.wrapper.classList.remove("center"),Mt.pause===!1&&J(),Mt.mouseWheel?(document.addEventListener("DOMMouseScroll",tt,!1),document.addEventListener("mousewheel",tt,!1)):(document.removeEventListener("DOMMouseScroll",tt,!1),document.removeEventListener("mousewheel",tt,!1)),Mt.rollingLinks?N():I(),Mt.previewLinks?C():(P(),C("[data-preview-link]")),At&&(At.destroy(),At=null),t>1&&Mt.autoSlide&&Mt.autoSlideStoppable&&Ht.canvas&&Ht.requestAnimationFrame&&(At=new ht(Dt.wrapper,function(){return Math.min(Math.max((Date.now()-Ft)/Ot,0),1)}),At.on("click",vt),Yt=!1),Mt.fragments===!1&&g(Dt.slides.querySelectorAll(".fragment")).forEach(function(e){e.classList.add("visible"),e.classList.remove("current-fragment")}),ne()}function f(){if(zt=!0,window.addEventListener("hashchange",lt,!1),window.addEventListener("resize",dt,!1),Mt.touch&&(Dt.wrapper.addEventListener("touchstart",Ke,!1),Dt.wrapper.addEventListener("touchmove",Ze,!1),Dt.wrapper.addEventListener("touchend",Je,!1),window.navigator.pointerEnabled?(Dt.wrapper.addEventListener("pointerdown",Qe,!1),Dt.wrapper.addEventListener("pointermove",Ge,!1),Dt.wrapper.addEventListener("pointerup",et,!1)):window.navigator.msPointerEnabled&&(Dt.wrapper.addEventListener("MSPointerDown",Qe,!1),Dt.wrapper.addEventListener("MSPointerMove",Ge,!1),Dt.wrapper.addEventListener("MSPointerUp",et,!1))),Mt.keyboard&&(document.addEventListener("keydown",_e,!1),document.addEventListener("keypress",$e,!1)),Mt.progress&&Dt.progress&&Dt.progress.addEventListener("click",rt,!1),Mt.focusBodyOnPageVisibilityChange){var e;"hidden"in document?e="visibilitychange":"msHidden"in document?e="msvisibilitychange":"webkitHidden"in document&&(e="webkitvisibilitychange"),e&&document.addEventListener(e,ut,!1)}var t=["touchstart","click"];navigator.userAgent.match(/android/gi)&&(t=["touchstart"]),t.forEach(function(e){Dt.controlsLeft.forEach(function(t){t.addEventListener(e,nt,!1)}),Dt.controlsRight.forEach(function(t){t.addEventListener(e,at,!1)}),Dt.controlsUp.forEach(function(t){t.addEventListener(e,it,!1)}),Dt.controlsDown.forEach(function(t){t.addEventListener(e,ot,!1)}),Dt.controlsPrev.forEach(function(t){t.addEventListener(e,st,!1)}),Dt.controlsNext.forEach(function(t){t.addEventListener(e,ct,!1)})})}function v(){zt=!1,document.removeEventListener("keydown",_e,!1),document.removeEventListener("keypress",$e,!1),window.removeEventListener("hashchange",lt,!1),window.removeEventListener("resize",dt,!1),Dt.wrapper.removeEventListener("touchstart",Ke,!1),Dt.wrapper.removeEventListener("touchmove",Ze,!1),Dt.wrapper.removeEventListener("touchend",Je,!1),window.navigator.pointerEnabled?(Dt.wrapper.removeEventListener("pointerdown",Qe,!1),Dt.wrapper.removeEventListener("pointermove",Ge,!1),Dt.wrapper.removeEventListener("pointerup",et,!1)):window.navigator.msPointerEnabled&&(Dt.wrapper.removeEventListener("MSPointerDown",Qe,!1),Dt.wrapper.removeEventListener("MSPointerMove",Ge,!1),Dt.wrapper.removeEventListener("MSPointerUp",et,!1)),Mt.progress&&Dt.progress&&Dt.progress.removeEventListener("click",rt,!1),["touchstart","click"].forEach(function(e){Dt.controlsLeft.forEach(function(t){t.removeEventListener(e,nt,!1)}),Dt.controlsRight.forEach(function(t){t.removeEventListener(e,at,!1)}),Dt.controlsUp.forEach(function(t){t.removeEventListener(e,it,!1)}),Dt.controlsDown.forEach(function(t){t.removeEventListener(e,ot,!1)}),Dt.controlsPrev.forEach(function(t){t.removeEventListener(e,st,!1)}),Dt.controlsNext.forEach(function(t){t.removeEventListener(e,ct,!1)})})}function h(e,t){for(var r in t)e[r]=t[r]}function g(e){return Array.prototype.slice.call(e)}function m(e){if("string"==typeof e){if("null"===e)return null;if("true"===e)return!0;if("false"===e)return!1;if(e.match(/^\d+$/))return parseFloat(e)}return e}function y(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.sqrt(r*r+n*n)}function b(e,t){e.style.WebkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.transform=t}function w(e){"string"==typeof e.layout&&(Pt.layout=e.layout),"string"==typeof e.overview&&(Pt.overview=e.overview),Pt.layout?b(Dt.slides,Pt.layout+" "+Pt.overview):b(Dt.slides,Pt.overview)}function k(e){var t=document.createElement("style");t.type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(t)}function L(e){var t=e.match(/^#([0-9a-f]{3})$/i);if(t&&t[1])return t=t[1],{r:17*parseInt(t.charAt(0),16),g:17*parseInt(t.charAt(1),16),b:17*parseInt(t.charAt(2),16)};var r=e.match(/^#([0-9a-f]{6})$/i);if(r&&r[1])return r=r[1],{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16)};var n=e.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(n)return{r:parseInt(n[1],10),g:parseInt(n[2],10),b:parseInt(n[3],10)};var a=e.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i);return a?{r:parseInt(a[1],10),g:parseInt(a[2],10),b:parseInt(a[3],10),a:parseFloat(a[4])}:null}function A(e){return"string"==typeof e&&(e=L(e)),e?(299*e.r+587*e.g+114*e.b)/1e3:null}function E(e){var t=0;if(e){var r=0;g(e.childNodes).forEach(function(e){"number"==typeof e.offsetTop&&e.style&&("absolute"===window.getComputedStyle(e).position&&(r+=1),t=Math.max(t,e.offsetTop+e.offsetHeight))}),0===r&&(t=e.offsetHeight)}return t}function S(e,t){if(t=t||0,e){var r,n=e.style.height;return e.style.height="0px",r=t-e.parentNode.offsetHeight,e.style.height=n+"px",r}return t}function x(){return/print-pdf/gi.test(window.location.search)}function q(){Mt.hideAddressBar&&Lt&&(window.addEventListener("load",M,!1),window.addEventListener("orientationchange",M,!1))}function M(){setTimeout(function(){window.scrollTo(0,1)},10)}function T(e,t){var r=document.createEvent("HTMLEvents",1,2);r.initEvent(e,!0,!0),h(r,t),Dt.wrapper.dispatchEvent(r),Mt.postMessageEvents&&window.parent!==window.self&&window.parent.postMessage(JSON.stringify({namespace:"reveal",eventName:e,state:Ne()}),"*")}function N(){if(Ht.transforms3d&&!("msPerspective"in document.body.style))for(var e=Dt.wrapper.querySelectorAll(Et+" a"),t=0,r=e.length;r>t;t++){var n=e[t];if(n.textContent&&!n.querySelector("*")&&(!n.className||!n.classList.contains(n,"roll"))){var a=document.createElement("span");a.setAttribute("data-title",n.text),a.innerHTML=n.innerHTML,n.classList.add("roll"),n.innerHTML="",n.appendChild(a)}}}function I(){for(var e=Dt.wrapper.querySelectorAll(Et+" a.roll"),t=0,r=e.length;r>t;t++){var n=e[t],a=n.querySelector("span");a&&(n.classList.remove("roll"),n.innerHTML=a.innerHTML)}}function C(e){var t=g(document.querySelectorAll(e?e:"a"));t.forEach(function(e){/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",ft,!1)})}function P(){var e=g(document.querySelectorAll("a"));e.forEach(function(e){/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",ft,!1)})}function D(e){R(),Dt.overlay=document.createElement("div"),Dt.overlay.classList.add("overlay"),Dt.overlay.classList.add("overlay-preview"),Dt.wrapper.appendChild(Dt.overlay),Dt.overlay.innerHTML=["<header>",'<a class="close" href="#"><span class="icon"></span></a>','<a class="external" href="'+e+'" target="_blank"><span class="icon"></span></a>',"</header>",'<div class="spinner"></div>','<div class="viewport">','<iframe src="'+e+'"></iframe>',"</div>"].join(""),Dt.overlay.querySelector("iframe").addEventListener("load",function(e){Dt.overlay.classList.add("loaded")},!1),Dt.overlay.querySelector(".close").addEventListener("click",function(e){R(),e.preventDefault()},!1),Dt.overlay.querySelector(".external").addEventListener("click",function(e){R()},!1),setTimeout(function(){Dt.overlay.classList.add("visible")},1)}function H(){if(Mt.help){R(),Dt.overlay=document.createElement("div"),Dt.overlay.classList.add("overlay"),Dt.overlay.classList.add("overlay-help"),Dt.wrapper.appendChild(Dt.overlay);var e='<p class="title">Keyboard Shortcuts</p><br/>';e+="<table><th>KEY</th><th>ACTION</th>";for(var t in jt)e+="<tr><td>"+t+"</td><td>"+jt[t]+"</td></tr>";e+="</table>",Dt.overlay.innerHTML=["<header>",'<a class="close" href="#"><span class="icon"></span></a>',"</header>",'<div class="viewport">','<div class="viewport-inner">'+e+"</div>","</div>"].join(""),Dt.overlay.querySelector(".close").addEventListener("click",function(e){R(),e.preventDefault()},!1),setTimeout(function(){Dt.overlay.classList.add("visible")},1)}}function R(){Dt.overlay&&(Dt.overlay.parentNode.removeChild(Dt.overlay),Dt.overlay=null)}function W(){if(Dt.wrapper&&!x()){var e=O(),t=20;z(Mt.width,Mt.height,t),Dt.slides.style.width=e.width+"px",Dt.slides.style.height=e.height+"px",Ct=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),Ct=Math.max(Ct,Mt.minScale),Ct=Math.min(Ct,Mt.maxScale),1===Ct?(Dt.slides.style.zoom="",Dt.slides.style.left="",Dt.slides.style.top="",Dt.slides.style.bottom="",Dt.slides.style.right="",w({layout:""})):!Lt&&/chrome/i.test(navigator.userAgent)&&"undefined"!=typeof Dt.slides.style.zoom?(Dt.slides.style.zoom=Ct,w({layout:""})):(Dt.slides.style.left="50%",Dt.slides.style.top="50%",Dt.slides.style.bottom="auto",Dt.slides.style.right="auto",w({layout:"translate(-50%, -50%) scale("+Ct+")"}));for(var r=g(Dt.wrapper.querySelectorAll(Et)),n=0,a=r.length;a>n;n++){var i=r[n];"none"!==i.style.display&&(Mt.center||i.classList.contains("center")?i.classList.contains("stack")?i.style.top=0:i.style.top=Math.max((e.height-E(i))/2-t,0)+"px":i.style.top="")}ce(),pe()}}function z(e,t,r){g(Dt.slides.querySelectorAll("section > .stretch")).forEach(function(r){var n=S(r,t);if(/(img|video)/gi.test(r.nodeName)){var a=r.naturalWidth||r.videoWidth,i=r.naturalHeight||r.videoHeight,o=Math.min(e/a,n/i);r.style.width=a*o+"px",r.style.height=i*o+"px"}else r.style.width=e+"px",r.style.height=n+"px"})}function O(e,t){var r={width:Mt.width,height:Mt.height,presentationWidth:e||Dt.wrapper.offsetWidth,presentationHeight:t||Dt.wrapper.offsetHeight};return r.presentationWidth-=r.presentationWidth*Mt.margin,r.presentationHeight-=r.presentationHeight*Mt.margin,"string"==typeof r.width&&/%$/.test(r.width)&&(r.width=parseInt(r.width,10)/100*r.presentationWidth),"string"==typeof r.height&&/%$/.test(r.height)&&(r.height=parseInt(r.height,10)/100*r.presentationHeight),r}function B(e,t){"object"==typeof e&&"function"==typeof e.setAttribute&&e.setAttribute("data-previous-indexv",t||0)}function F(e){if("object"==typeof e&&"function"==typeof e.setAttribute&&e.classList.contains("stack")){var t=e.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(e.getAttribute(t)||0,10)}return 0}function Y(){Mt.overview&&!$()&&(Nt=!0,Dt.wrapper.classList.add("overview"),Dt.wrapper.classList.remove("overview-deactivating"),Ht.overviewTransitions&&setTimeout(function(){Dt.wrapper.classList.add("overview-animated")},1),We(),Dt.slides.appendChild(Dt.background),g(Dt.wrapper.querySelectorAll(Et)).forEach(function(e){e.classList.contains("stack")||e.addEventListener("click",pt,!0)}),se(),X(),j(),W(),T("overviewshown",{indexh:mt,indexv:yt,currentSlide:wt}))}function X(){var e=70,t=Mt.width+e,r=Mt.height+e;Mt.rtl&&(t=-t),g(Dt.wrapper.querySelectorAll(St)).forEach(function(e,n){e.setAttribute("data-index-h",n),b(e,"translate3d("+n*t+"px, 0, 0)"),e.classList.contains("stack")&&g(e.querySelectorAll("section")).forEach(function(e,t){e.setAttribute("data-index-h",n),e.setAttribute("data-index-v",t),b(e,"translate3d(0, "+t*r+"px, 0)")})}),g(Dt.background.childNodes).forEach(function(e,n){b(e,"translate3d("+n*t+"px, 0, 0)"),g(e.querySelectorAll(".slide-background")).forEach(function(e,t){b(e,"translate3d(0, "+t*r+"px, 0)")})})}function j(){var e=70,t=Mt.width+e,r=Mt.height+e;Mt.rtl&&(t=-t),w({overview:["translateX("+-mt*t+"px)","translateY("+-yt*r+"px)","translateZ("+(window.innerWidth<400?-1e3:-2500)+"px)"].join(" ")})}function U(){Mt.overview&&(Nt=!1,Dt.wrapper.classList.remove("overview"),Dt.wrapper.classList.remove("overview-animated"),Dt.wrapper.classList.add("overview-deactivating"),setTimeout(function(){Dt.wrapper.classList.remove("overview-deactivating")},1),Dt.wrapper.appendChild(Dt.background),g(Dt.wrapper.querySelectorAll(Et)).forEach(function(e){b(e,""),e.removeEventListener("click",pt,!0)}),g(Dt.background.querySelectorAll(".slide-background")).forEach(function(e){b(e,"")}),w({overview:""}),re(mt,yt),W(),Re(),T("overviewhidden",{indexh:mt,indexv:yt,currentSlide:wt}))}function V(e){"boolean"==typeof e?e?Y():U():$()?U():Y()}function $(){return Nt}function _(e){return e=e?e:wt,e&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function K(){var e=document.body,t=e.requestFullScreen||e.webkitRequestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t&&t.apply(e)}function Z(){if(Mt.pause){var e=Dt.wrapper.classList.contains("paused");We(),Dt.wrapper.classList.add("paused"),e===!1&&T("paused")}}function J(){var e=Dt.wrapper.classList.contains("paused");Dt.wrapper.classList.remove("paused"),Re(),e&&T("resumed")}function Q(e){"boolean"==typeof e?e?Z():J():G()?J():Z()}function G(){return Dt.wrapper.classList.contains("paused")}function ee(e){"boolean"==typeof e?e?Oe():ze():Yt?Oe():ze()}function te(){return!(!Ot||Yt)}function re(e,t,r,n){bt=wt;var a=Dt.wrapper.querySelectorAll(St);void 0!==t||$()||(t=F(a[e])),bt&&bt.parentNode&&bt.parentNode.classList.contains("stack")&&B(bt.parentNode,yt);var i=It.concat();It.length=0;var o=mt||0,s=yt||0;mt=oe(St,void 0===e?mt:e),yt=oe(xt,void 0===t?yt:t),se(),W();e:for(var c=0,l=It.length;l>c;c++){for(var d=0;d<i.length;d++)if(i[d]===It[c]){i.splice(d,1);continue e}document.documentElement.classList.add(It[c]),T(It[c])}for(;i.length;)document.documentElement.classList.remove(i.pop());$()&&j();var u=a[mt],p=u.querySelectorAll("section");wt=p[yt]||u,"undefined"!=typeof r&&Pe(r);var f=mt!==o||yt!==s;f?T("slidechanged",{indexh:mt,indexv:yt,previousSlide:bt,currentSlide:wt,origin:n}):bt=null,bt&&(bt.classList.remove("present"),bt.setAttribute("aria-hidden","true"),Dt.wrapper.querySelector(qt).classList.contains("present")&&setTimeout(function(){var e,t=g(Dt.wrapper.querySelectorAll(St+".stack"));for(e in t)t[e]&&B(t[e],0)},0)),(f||!bt)&&(we(bt),ye(wt)),Dt.statusDiv.textContent=wt.textContent,de(),ce(),ue(),pe(),le(),Se(),Re()}function ne(){v(),f(),W(),Ot=Mt.autoSlide,Re(),l(),Se(),ie(),de(),ce(),ue(!0),le(),se(),me(),ye(wt),$()&&X()}function ae(){var e=g(Dt.wrapper.querySelectorAll(St));e.forEach(function(e){var t=g(e.querySelectorAll("section"));t.forEach(function(e,t){t>0&&(e.classList.remove("present"),e.classList.remove("past"),e.classList.add("future"),e.setAttribute("aria-hidden","true"))})})}function ie(){var e=g(Dt.wrapper.querySelectorAll(St));e.forEach(function(e){var t=g(e.querySelectorAll("section"));t.forEach(function(e,t){Ce(e.querySelectorAll(".fragment"))}),0===t.length&&Ce(e.querySelectorAll(".fragment"))})}function oe(e,t){var r=g(Dt.wrapper.querySelectorAll(e)),n=r.length,a=x();if(n){Mt.loop&&(t%=n,0>t&&(t=n+t)),t=Math.max(Math.min(t,n-1),0);for(var i=0;n>i;i++){var o=r[i],s=Mt.rtl&&!_(o);if(o.classList.remove("past"),o.classList.remove("present"),o.classList.remove("future"),o.setAttribute("hidden",""),o.setAttribute("aria-hidden","true"),o.querySelector("section")&&o.classList.add("stack"),a)o.classList.add("present");else if(t>i){if(o.classList.add(s?"future":"past"),Mt.fragments)for(var c=g(o.querySelectorAll(".fragment"));c.length;){var l=c.pop();l.classList.add("visible"),l.classList.remove("current-fragment")}}else if(i>t&&(o.classList.add(s?"past":"future"),Mt.fragments))for(var d=g(o.querySelectorAll(".fragment.visible"));d.length;){var u=d.pop();u.classList.remove("visible"),u.classList.remove("current-fragment")}}r[t].classList.add("present"),r[t].removeAttribute("hidden"),r[t].removeAttribute("aria-hidden");var p=r[t].getAttribute("data-state");p&&(It=It.concat(p.split(" ")))}else t=0;return t}function se(){var e,t,r=g(Dt.wrapper.querySelectorAll(St)),n=r.length;if(n&&"undefined"!=typeof mt){var a=$()?10:Mt.viewDistance;Lt&&(a=$()?6:2),x()&&(a=Number.MAX_VALUE);for(var i=0;n>i;i++){var o=r[i],s=g(o.querySelectorAll("section")),c=s.length;if(e=Math.abs((mt||0)-i)||0,Mt.loop&&(e=Math.abs(((mt||0)-i)%(n-a))||0),a>e?fe(o):ve(o),c)for(var l=F(o),d=0;c>d;d++){var u=s[d];t=i===(mt||0)?Math.abs((yt||0)-d):Math.abs(d-l),a>e+t?fe(u):ve(u)}}}}function ce(){Mt.progress&&Dt.progressbar&&(Dt.progressbar.style.width=Le()*Dt.wrapper.offsetWidth+"px")}function le(){if(Mt.slideNumber&&Dt.slideNumber){var e="c";"string"==typeof Mt.slideNumber&&(e=Mt.slideNumber),Dt.slideNumber.innerHTML=e.replace(/h/g,mt).replace(/v/g,yt).replace(/c/g,ke()+1).replace(/t/g,qe())}}function de(){var e=he(),t=ge();Dt.controlsLeft.concat(Dt.controlsRight).concat(Dt.controlsUp).concat(Dt.controlsDown).concat(Dt.controlsPrev).concat(Dt.controlsNext).forEach(function(e){e.classList.remove("enabled"),e.classList.remove("fragmented")}),e.left&&Dt.controlsLeft.forEach(function(e){e.classList.add("enabled")}),e.right&&Dt.controlsRight.forEach(function(e){e.classList.add("enabled")}),e.up&&Dt.controlsUp.forEach(function(e){e.classList.add("enabled")}),e.down&&Dt.controlsDown.forEach(function(e){e.classList.add("enabled")}),(e.left||e.up)&&Dt.controlsPrev.forEach(function(e){e.classList.add("enabled")}),(e.right||e.down)&&Dt.controlsNext.forEach(function(e){e.classList.add("enabled")}),wt&&(t.prev&&Dt.controlsPrev.forEach(function(e){e.classList.add("fragmented","enabled")}),t.next&&Dt.controlsNext.forEach(function(e){e.classList.add("fragmented","enabled")}),_(wt)?(t.prev&&Dt.controlsUp.forEach(function(e){e.classList.add("fragmented","enabled")}),t.next&&Dt.controlsDown.forEach(function(e){e.classList.add("fragmented","enabled")})):(t.prev&&Dt.controlsLeft.forEach(function(e){e.classList.add("fragmented","enabled")}),t.next&&Dt.controlsRight.forEach(function(e){e.classList.add("fragmented","enabled")})))}function ue(e){var t=null,r=Mt.rtl?"future":"past",n=Mt.rtl?"past":"future";if(g(Dt.background.childNodes).forEach(function(a,i){a.classList.remove("past"),a.classList.remove("present"),a.classList.remove("future"),mt>i?a.classList.add(r):i>mt?a.classList.add(n):(a.classList.add("present"),t=a),(e||i===mt)&&g(a.querySelectorAll(".slide-background")).forEach(function(e,r){e.classList.remove("past"),e.classList.remove("present"),e.classList.remove("future"),yt>r?e.classList.add("past"):r>yt?e.classList.add("future"):(e.classList.add("present"),i===mt&&(t=e))})}),kt){var a=kt.querySelector("video");a&&a.pause()}if(t){var i=t.querySelector("video");i&&(i.currentTime=0,i.play());var o=t.style.backgroundImage||"";/\.gif/i.test(o)&&(t.style.backgroundImage="",window.getComputedStyle(t).opacity,t.style.backgroundImage=o);var s=kt?kt.getAttribute("data-background-hash"):null,c=t.getAttribute("data-background-hash");c&&c===s&&t!==kt&&Dt.background.classList.add("no-transition"),kt=t}wt&&["has-light-background","has-dark-background"].forEach(function(e){wt.classList.contains(e)?Dt.wrapper.classList.add(e):Dt.wrapper.classList.remove(e)}),setTimeout(function(){Dt.background.classList.remove("no-transition")},1)}function pe(){if(Mt.parallaxBackgroundImage){var e,t,r=Dt.wrapper.querySelectorAll(St),n=Dt.wrapper.querySelectorAll(xt),a=Dt.background.style.backgroundSize.split(" ");1===a.length?e=t=parseInt(a[0],10):(e=parseInt(a[0],10),t=parseInt(a[1],10));var i,o,s=Dt.background.offsetWidth,c=r.length;i="number"==typeof Mt.parallaxBackgroundHorizontal?Mt.parallaxBackgroundHorizontal:(e-s)/(c-1),o=i*mt*-1;var l,d,u=Dt.background.offsetHeight,p=n.length;l="number"==typeof Mt.parallaxBackgroundVertical?Mt.parallaxBackgroundVertical:(t-u)/(p-1),d=p>0?l*yt*1:0,Dt.background.style.backgroundPosition=o+"px "+-d+"px"}}function fe(e){e.style.display="block",g(e.querySelectorAll("img[data-src], video[data-src], audio[data-src]")).forEach(function(e){e.setAttribute("src",e.getAttribute("data-src")),e.removeAttribute("data-src")}),g(e.querySelectorAll("video, audio")).forEach(function(e){var t=0;g(e.querySelectorAll("source[data-src]")).forEach(function(e){e.setAttribute("src",e.getAttribute("data-src")),e.removeAttribute("data-src"),t+=1}),t>0&&e.load()});var t=xe(e),r=Te(t.h,t.v);if(r&&(r.style.display="block",r.hasAttribute("data-loaded")===!1)){r.setAttribute("data-loaded","true");var n=e.getAttribute("data-background-image"),a=e.getAttribute("data-background-video"),i=e.hasAttribute("data-background-video-loop"),o=e.getAttribute("data-background-iframe");if(n)r.style.backgroundImage="url("+n+")";else if(a&&!Ae()){var s=document.createElement("video");i&&s.setAttribute("loop",""),a.split(",").forEach(function(e){s.innerHTML+='<source src="'+e+'">'}),r.appendChild(s)}else if(o){var c=document.createElement("iframe");c.setAttribute("src",o),c.style.width="100%",c.style.height="100%",c.style.maxHeight="100%",c.style.maxWidth="100%",r.appendChild(c)}}}function ve(e){e.style.display="none";var t=xe(e),r=Te(t.h,t.v);r&&(r.style.display="none")}function he(){var e=Dt.wrapper.querySelectorAll(St),t=Dt.wrapper.querySelectorAll(xt),r={left:mt>0||Mt.loop,right:mt<e.length-1||Mt.loop,up:yt>0,down:yt<t.length-1};if(Mt.rtl){var n=r.left;r.left=r.right,r.right=n}return r}function ge(){if(wt&&Mt.fragments){var e=wt.querySelectorAll(".fragment"),t=wt.querySelectorAll(".fragment:not(.visible)");return{prev:e.length-t.length>0,next:!!t.length}}return{prev:!1,next:!1}}function me(){var e=function(e,t,r){g(Dt.slides.querySelectorAll("iframe["+e+'*="'+t+'"]')).forEach(function(t){var n=t.getAttribute(e);n&&-1===n.indexOf(r)&&t.setAttribute(e,n+(/\?/.test(n)?"&":"?")+r)})};e("src","youtube.com/embed/","enablejsapi=1"),e("data-src","youtube.com/embed/","enablejsapi=1"),e("src","player.vimeo.com/","api=1"),e("data-src","player.vimeo.com/","api=1")}function ye(e){e&&!Ae()&&(g(e.querySelectorAll('img[src$=".gif"]')).forEach(function(e){e.setAttribute("src",e.getAttribute("src"))}),g(e.querySelectorAll("video, audio")).forEach(function(e){e.hasAttribute("data-autoplay")&&"function"==typeof e.play&&e.play()}),g(e.querySelectorAll("iframe[src]")).forEach(function(e){be({target:e})}),g(e.querySelectorAll("iframe[data-src]")).forEach(function(e){e.getAttribute("src")!==e.getAttribute("data-src")&&(e.removeEventListener("load",be),e.addEventListener("load",be),e.setAttribute("src",e.getAttribute("data-src")))}))}function be(e){var t=e.target;/youtube\.com\/embed\//.test(t.getAttribute("src"))&&t.hasAttribute("data-autoplay")?t.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(t.getAttribute("src"))&&t.hasAttribute("data-autoplay")?t.contentWindow.postMessage('{"method":"play"}',"*"):t.contentWindow.postMessage("slide:start","*")}function we(e){e&&e.parentNode&&(g(e.querySelectorAll("video, audio")).forEach(function(e){e.hasAttribute("data-ignore")||"function"!=typeof e.pause||e.pause()}),g(e.querySelectorAll("iframe")).forEach(function(e){e.contentWindow.postMessage("slide:stop","*"),e.removeEventListener("load",be)}),g(e.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(e){e.hasAttribute("data-ignore")||"function"!=typeof e.contentWindow.postMessage||e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),g(e.querySelectorAll('iframe[src*="player.vimeo.com/"]')).forEach(function(e){e.hasAttribute("data-ignore")||"function"!=typeof e.contentWindow.postMessage||e.contentWindow.postMessage('{"method":"pause"}',"*")}),g(e.querySelectorAll("iframe[data-src]")).forEach(function(e){e.setAttribute("src","about:blank"),e.removeAttribute("src")}))}function ke(){var e=g(Dt.wrapper.querySelectorAll(St)),t=0;e:for(var r=0;r<e.length;r++){
for(var n=e[r],a=g(n.querySelectorAll("section")),i=0;i<a.length;i++){if(a[i].classList.contains("present"))break e;t++}if(n.classList.contains("present"))break;n.classList.contains("stack")===!1&&t++}return t}function Le(){var e=qe(),t=ke();if(wt){var r=wt.querySelectorAll(".fragment");if(r.length>0){var n=wt.querySelectorAll(".fragment.visible"),a=.9;t+=n.length/r.length*a}}return t/(e-1)}function Ae(){return!!window.location.search.match(/receiver/gi)}function Ee(){var e=window.location.hash,t=e.slice(2).split("/"),r=e.replace(/#|\//gi,"");if(isNaN(parseInt(t[0],10))&&r.length){var n;if(/^[a-zA-Z][\w:.-]*$/.test(r)&&(n=document.getElementById(r)),n){var a=gt.getIndices(n);re(a.h,a.v)}else re(mt||0,yt||0)}else{var i=parseInt(t[0],10)||0,o=parseInt(t[1],10)||0;(i!==mt||o!==yt)&&re(i,o)}}function Se(e){if(Mt.history)if(clearTimeout(Wt),"number"==typeof e)Wt=setTimeout(Se,e);else if(wt){var t="/",r=wt.getAttribute("id");r&&(r=r.toLowerCase(),r=r.replace(/[^a-zA-Z0-9\-\_\:\.]/g,"")),"string"==typeof r&&r.length?t="/"+r:((mt>0||yt>0)&&(t+=mt),yt>0&&(t+="/"+yt)),window.location.hash=t}}function xe(e){var t,r=mt,n=yt;if(e){var a=_(e),i=a?e.parentNode:e,o=g(Dt.wrapper.querySelectorAll(St));r=Math.max(o.indexOf(i),0),n=void 0,a&&(n=Math.max(g(e.parentNode.querySelectorAll("section")).indexOf(e),0))}if(!e&&wt){var s=wt.querySelectorAll(".fragment").length>0;if(s){var c=wt.querySelector(".current-fragment");t=c&&c.hasAttribute("data-fragment-index")?parseInt(c.getAttribute("data-fragment-index"),10):wt.querySelectorAll(".fragment.visible").length-1}}return{h:r,v:n,f:t}}function qe(){return Dt.wrapper.querySelectorAll(Et+":not(.stack)").length}function Me(e,t){var r=Dt.wrapper.querySelectorAll(St)[e],n=r&&r.querySelectorAll("section");return n&&n.length&&"number"==typeof t?n?n[t]:void 0:r}function Te(e,t){if(x()){var r=Me(e,t);if(r){var n=r.querySelector(".slide-background");if(n&&n.parentNode===r)return n}return void 0}var a=Dt.wrapper.querySelectorAll(".backgrounds>.slide-background")[e],i=a&&a.querySelectorAll(".slide-background");return i&&i.length&&"number"==typeof t?i?i[t]:void 0:a}function Ne(){var e=xe();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:G(),overview:$()}}function Ie(e){if("object"==typeof e){re(m(e.indexh),m(e.indexv),m(e.indexf));var t=m(e.paused),r=m(e.overview);"boolean"==typeof t&&t!==G()&&Q(t),"boolean"==typeof r&&r!==$()&&V(r)}}function Ce(e){e=g(e);var t=[],r=[],n=[];e.forEach(function(e,n){if(e.hasAttribute("data-fragment-index")){var a=parseInt(e.getAttribute("data-fragment-index"),10);t[a]||(t[a]=[]),t[a].push(e)}else r.push([e])}),t=t.concat(r);var a=0;return t.forEach(function(e){e.forEach(function(e){n.push(e),e.setAttribute("data-fragment-index",a)}),a++}),n}function Pe(e,t){if(wt&&Mt.fragments){var r=Ce(wt.querySelectorAll(".fragment"));if(r.length){if("number"!=typeof e){var n=Ce(wt.querySelectorAll(".fragment.visible")).pop();e=n?parseInt(n.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof t&&(e+=t);var a=[],i=[];return g(r).forEach(function(t,r){t.hasAttribute("data-fragment-index")&&(r=parseInt(t.getAttribute("data-fragment-index"),10)),e>=r?(t.classList.contains("visible")||a.push(t),t.classList.add("visible"),t.classList.remove("current-fragment"),Dt.statusDiv.textContent=t.textContent,r===e&&t.classList.add("current-fragment")):(t.classList.contains("visible")&&i.push(t),t.classList.remove("visible"),t.classList.remove("current-fragment"))}),i.length&&T("fragmenthidden",{fragment:i[0],fragments:i}),a.length&&T("fragmentshown",{fragment:a[0],fragments:a}),de(),ce(),!(!a.length&&!i.length)}}return!1}function De(){return Pe(null,1)}function He(){return Pe(null,-1)}function Re(){if(We(),wt){var e=wt.querySelector(".current-fragment"),t=e?e.getAttribute("data-autoslide"):null,r=wt.parentNode?wt.parentNode.getAttribute("data-autoslide"):null,n=wt.getAttribute("data-autoslide");Ot=t?parseInt(t,10):n?parseInt(n,10):r?parseInt(r,10):Mt.autoSlide,0===wt.querySelectorAll(".fragment").length&&g(wt.querySelectorAll("video, audio")).forEach(function(e){e.hasAttribute("data-autoplay")&&Ot&&1e3*e.duration>Ot&&(Ot=1e3*e.duration+1e3)}),!Ot||Yt||G()||$()||gt.isLastSlide()&&!ge().next&&Mt.loop!==!0||(Bt=setTimeout(Ue,Ot),Ft=Date.now()),At&&At.setPlaying(-1!==Bt)}}function We(){clearTimeout(Bt),Bt=-1}function ze(){Ot&&!Yt&&(Yt=!0,T("autoslidepaused"),clearTimeout(Bt),At&&At.setPlaying(!1))}function Oe(){Ot&&Yt&&(Yt=!1,T("autoslideresumed"),Re())}function Be(){Mt.rtl?($()||De()===!1)&&he().left&&re(mt+1):($()||He()===!1)&&he().left&&re(mt-1)}function Fe(){Mt.rtl?($()||He()===!1)&&he().right&&re(mt-1):($()||De()===!1)&&he().right&&re(mt+1)}function Ye(){($()||He()===!1)&&he().up&&re(mt,yt-1)}function Xe(){($()||De()===!1)&&he().down&&re(mt,yt+1)}function je(){if(He()===!1)if(he().up)Ye();else{var e;if(e=Mt.rtl?g(Dt.wrapper.querySelectorAll(St+".future")).pop():g(Dt.wrapper.querySelectorAll(St+".past")).pop()){var t=e.querySelectorAll("section").length-1||void 0,r=mt-1;re(r,t)}}}function Ue(){De()===!1&&(he().down?Xe():Mt.rtl?Be():Fe()),Re()}function Ve(e){Mt.autoSlideStoppable&&ze()}function $e(e){e.shiftKey&&63===e.charCode&&(Dt.overlay?R():H(!0))}function _e(e){if("function"==typeof Mt.keyboardCondition&&Mt.keyboardCondition()===!1)return!0;var t=Yt;Ve(e);var r=document.activeElement&&"inherit"!==document.activeElement.contentEditable,n=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName);if(!(r||n||e.shiftKey&&32!==e.keyCode||e.altKey||e.ctrlKey||e.metaKey)){if(G()&&-1===[66,190,191].indexOf(e.keyCode))return!1;var a=!1;if("object"==typeof Mt.keyboard)for(var i in Mt.keyboard)if(parseInt(i,10)===e.keyCode){var o=Mt.keyboard[i];"function"==typeof o?o.apply(null,[e]):"string"==typeof o&&"function"==typeof gt[o]&>[o].call(),a=!0}if(a===!1)switch(a=!0,e.keyCode){case 80:case 33:je();break;case 78:case 34:Ue();break;case 72:case 37:Be();break;case 76:case 39:Fe();break;case 75:case 38:Ye();break;case 74:case 40:Xe();break;case 36:re(0);break;case 35:re(Number.MAX_VALUE);break;case 32:$()?U():e.shiftKey?je():Ue();break;case 13:$()?U():a=!1;break;case 58:case 59:case 66:case 190:case 191:Q();break;case 70:K();break;case 65:Mt.autoSlideStoppable&&ee(t);break;default:a=!1}a?e.preventDefault&&e.preventDefault():27!==e.keyCode&&79!==e.keyCode||!Ht.transforms3d||(Dt.overlay?R():V(),e.preventDefault&&e.preventDefault()),Re()}}function Ke(e){Xt.startX=e.touches[0].clientX,Xt.startY=e.touches[0].clientY,Xt.startCount=e.touches.length,2===e.touches.length&&Mt.overview&&(Xt.startSpan=y({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:Xt.startX,y:Xt.startY}))}function Ze(e){if(Xt.captured)navigator.userAgent.match(/android/gi)&&e.preventDefault();else{Ve(e);var t=e.touches[0].clientX,r=e.touches[0].clientY;if(2===e.touches.length&&2===Xt.startCount&&Mt.overview){var n=y({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:Xt.startX,y:Xt.startY});Math.abs(Xt.startSpan-n)>Xt.threshold&&(Xt.captured=!0,n<Xt.startSpan?Y():U()),e.preventDefault()}else if(1===e.touches.length&&2!==Xt.startCount){var a=t-Xt.startX,i=r-Xt.startY;a>Xt.threshold&&Math.abs(a)>Math.abs(i)?(Xt.captured=!0,Be()):a<-Xt.threshold&&Math.abs(a)>Math.abs(i)?(Xt.captured=!0,Fe()):i>Xt.threshold?(Xt.captured=!0,Ye()):i<-Xt.threshold&&(Xt.captured=!0,Xe()),Mt.embedded?(Xt.captured||_(wt))&&e.preventDefault():e.preventDefault()}}}function Je(e){Xt.captured=!1}function Qe(e){(e.pointerType===e.MSPOINTER_TYPE_TOUCH||"touch"===e.pointerType)&&(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Ke(e))}function Ge(e){(e.pointerType===e.MSPOINTER_TYPE_TOUCH||"touch"===e.pointerType)&&(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Ze(e))}function et(e){(e.pointerType===e.MSPOINTER_TYPE_TOUCH||"touch"===e.pointerType)&&(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Je(e))}function tt(e){if(Date.now()-Rt>600){Rt=Date.now();var t=e.detail||-e.wheelDelta;t>0?Ue():je()}}function rt(e){Ve(e),e.preventDefault();var t=g(Dt.wrapper.querySelectorAll(St)).length,r=Math.floor(e.clientX/Dt.wrapper.offsetWidth*t);Mt.rtl&&(r=t-r),re(r)}function nt(e){e.preventDefault(),Ve(),Be()}function at(e){e.preventDefault(),Ve(),Fe()}function it(e){e.preventDefault(),Ve(),Ye()}function ot(e){e.preventDefault(),Ve(),Xe()}function st(e){e.preventDefault(),Ve(),je()}function ct(e){e.preventDefault(),Ve(),Ue()}function lt(e){Ee()}function dt(e){W()}function ut(e){var t=document.webkitHidden||document.msHidden||document.hidden;t===!1&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function pt(e){if(zt&&$()){e.preventDefault();for(var t=e.target;t&&!t.nodeName.match(/section/gi);)t=t.parentNode;if(t&&!t.classList.contains("disabled")&&(U(),t.nodeName.match(/section/gi))){var r=parseInt(t.getAttribute("data-index-h"),10),n=parseInt(t.getAttribute("data-index-v"),10);re(r,n)}}}function ft(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){var t=e.currentTarget.getAttribute("href");t&&(D(t),e.preventDefault())}}function vt(e){gt.isLastSlide()&&Mt.loop===!1?(re(0,0),Oe()):Yt?Oe():ze()}function ht(e,t){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=e,this.progressCheck=t,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}var gt,mt,yt,bt,wt,kt,Lt,At,Et=".slides section",St=".slides>section",xt=".slides>section.present>section",qt=".slides>section:first-of-type",Mt={width:960,height:700,margin:.1,minScale:.2,maxScale:1.5,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,keyboardCondition:null,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,help:!0,pause:!0,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,viewDistance:3,dependencies:[]},Tt=!1,Nt=!1,It=[],Ct=1,Pt={layout:"",overview:""},Dt={},Ht={},Rt=0,Wt=0,zt=!1,Ot=0,Bt=0,Ft=-1,Yt=!1,Xt={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40},jt={"N , SPACE":"Next slide",P:"Previous slide","← , H":"Navigate left","→ , L":"Navigate right","↑ , K":"Navigate up","↓ , J":"Navigate down",Home:"First slide",End:"Last slide","B , .":"Pause",F:"Fullscreen","ESC, O":"Slide overview"};return ht.prototype.setPlaying=function(e){var t=this.playing;this.playing=e,!t&&this.playing?this.animate():this.render()},ht.prototype.animate=function(){var e=this.progress;this.progress=this.progressCheck(),e>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&Ht.requestAnimationFrameMethod.call(window,this.animate.bind(this))},ht.prototype.render=function(){var e=this.playing?this.progress:0,t=this.diameter/2-this.thickness,r=this.diameter/2,n=this.diameter/2,a=14;this.progressOffset+=.1*(1-this.progressOffset);var i=-Math.PI/2+e*(2*Math.PI),o=-Math.PI/2+this.progressOffset*(2*Math.PI);this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(r,n,t+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(r,n,t,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(r,n,t,o,i,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(r-a/2,n-a/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,a/2-2,a),this.context.fillRect(a/2+2,0,a/2-2,a)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(a-2,a/2),this.context.lineTo(0,a),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},ht.prototype.on=function(e,t){this.canvas.addEventListener(e,t,!1)},ht.prototype.off=function(e,t){this.canvas.removeEventListener(e,t,!1)},ht.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},gt={initialize:e,configure:p,sync:ne,slide:re,left:Be,right:Fe,up:Ye,down:Xe,prev:je,next:Ue,navigateFragment:Pe,prevFragment:He,nextFragment:De,navigateTo:re,navigateLeft:Be,navigateRight:Fe,navigateUp:Ye,navigateDown:Xe,navigatePrev:je,navigateNext:Ue,layout:W,availableRoutes:he,availableFragments:ge,toggleOverview:V,togglePause:Q,toggleAutoSlide:ee,isOverview:$,isPaused:G,isAutoSliding:te,addEventListeners:f,removeEventListeners:v,getState:Ne,setState:Ie,getProgress:Le,getIndices:xe,getTotalSlides:qe,getSlide:Me,getSlideBackground:Te,getPreviousSlide:function(){return bt},getCurrentSlide:function(){return wt},getScale:function(){return Ct},getConfig:function(){return Mt},getQueryHash:function(){var e={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(t){e[t.split("=").shift()]=t.split("=").pop()});for(var t in e){var r=e[t];e[t]=m(unescape(r))}return e},isFirstSlide:function(){return 0===mt&&0===yt},isLastSlide:function(){return wt?wt.nextElementSibling?!1:_(wt)&&wt.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return Tt},addEventListener:function(e,t,r){"addEventListener"in window&&(Dt.wrapper||document.querySelector(".reveal")).addEventListener(e,t,r)},removeEventListener:function(e,t,r){"addEventListener"in window&&(Dt.wrapper||document.querySelector(".reveal")).removeEventListener(e,t,r)},triggerKey:function(e){_e({keyCode:e})}}});