presentazione-papero/js/reveal.min.js

9 lines
33 KiB
JavaScript

/*!
* reveal.js 2.6.2 (2014-03-27, 16:30)
* http://lab.hakim.se/reveal-js
* MIT licensed
*
* Copyright (C) 2014 Hakim El Hattab, http://hakim.se
*/
var Reveal=function(){"use strict";function a(a){if(b(),!fc.transforms2d&&!fc.transforms3d)return void document.body.setAttribute("class","no-transforms");window.addEventListener("load",B,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(ac,a),l(ac,d),s(),c()}function b(){fc.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,fc.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,fc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,fc.requestAnimationFrame="function"==typeof fc.requestAnimationFrameMethod,fc.canvas=!!document.createElement("canvas").getContext,Wb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=ac.dependencies.length;h>g;g++){var i=ac.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),R(),i(),db(),Y(!0),setTimeout(function(){ec.slides.classList.remove("no-transition"),bc=!0,u("ready",{indexh:Rb,indexv:Sb,currentSlide:Ub})},1)}function e(){ec.theme=document.querySelector("#theme"),ec.wrapper=document.querySelector(".reveal"),ec.slides=document.querySelector(".reveal .slides"),ec.slides.classList.add("no-transition"),ec.background=g(ec.wrapper,"div","backgrounds",null),ec.progress=g(ec.wrapper,"div","progress","<span></span>"),ec.progressbar=ec.progress.querySelector("span"),g(ec.wrapper,"aside","controls",'<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>'),ec.slideNumber=g(ec.wrapper,"div","slide-number",""),g(ec.wrapper,"div","state-background",null),g(ec.wrapper,"div","pause-overlay",null),ec.controls=document.querySelector(".reveal .controls"),ec.wrapper.setAttribute("role","application"),ec.controlsLeft=m(document.querySelectorAll(".navigate-left")),ec.controlsRight=m(document.querySelectorAll(".navigate-right")),ec.controlsUp=m(document.querySelectorAll(".navigate-up")),ec.controlsDown=m(document.querySelectorAll(".navigate-down")),ec.controlsPrev=m(document.querySelectorAll(".navigate-prev")),ec.controlsNext=m(document.querySelectorAll(".navigate-next")),ec.statusDiv=f()}function f(){var a=document.getElementById("statusDiv");if(!a){a=document.createElement("div");var b=a.style;b.position="absolute",b.height="1px",b.width="1px",b.overflow="hidden",b.clip="rect( 1px, 1px, 1px, 1px )",a.setAttribute("id","statusDiv"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),ec.wrapper.appendChild(a)}return a}function g(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function h(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),(c.background||c.backgroundColor||c.backgroundImage)&&d.setAttribute("data-background-hash",c.background+c.backgroundSize+c.backgroundImage+c.backgroundColor+c.backgroundRepeat+c.backgroundPosition+c.backgroundTransition),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),ec.background.innerHTML="",ec.background.classList.add("no-transition"),m(document.querySelectorAll(Zb)).forEach(function(b){var c;c=r()?a(b,b):a(b,ec.background),m(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),ac.parallaxBackgroundImage?(ec.background.style.backgroundImage='url("'+ac.parallaxBackgroundImage+'")',ec.background.style.backgroundSize=ac.parallaxBackgroundSize,setTimeout(function(){ec.wrapper.classList.add("has-parallax-background")},1)):(ec.background.style.backgroundImage="",ec.wrapper.classList.remove("has-parallax-background"))}function i(a){var b=document.querySelectorAll(Yb).length;if(ec.wrapper.classList.remove(ac.transition),"object"==typeof a&&l(ac,a),fc.transforms3d===!1&&(ac.transition="linear"),ec.wrapper.classList.add(ac.transition),ec.wrapper.setAttribute("data-transition-speed",ac.transitionSpeed),ec.wrapper.setAttribute("data-background-transition",ac.backgroundTransition),ec.controls.style.display=ac.controls?"block":"none",ec.progress.style.display=ac.progress?"block":"none",ac.rtl?ec.wrapper.classList.add("rtl"):ec.wrapper.classList.remove("rtl"),ac.center?ec.wrapper.classList.add("center"):ec.wrapper.classList.remove("center"),ac.mouseWheel?(document.addEventListener("DOMMouseScroll",Cb,!1),document.addEventListener("mousewheel",Cb,!1)):(document.removeEventListener("DOMMouseScroll",Cb,!1),document.removeEventListener("mousewheel",Cb,!1)),ac.rollingLinks?v():w(),ac.previewLinks?x():(y(),x("[data-preview-link]")),b>1&&ac.autoSlide&&ac.autoSlideStoppable&&fc.canvas&&fc.requestAnimationFrame?(Xb=new Qb(ec.wrapper,function(){return Math.min(Math.max((Date.now()-nc)/lc,0),1)}),Xb.on("click",Pb),oc=!1):Xb&&(Xb.destroy(),Xb=null),ac.theme&&ec.theme){var c=ec.theme.getAttribute("href"),d=/[^\/]*?(?=\.css)/,e=c.match(d)[0];ac.theme!==e&&(c=c.replace(d,ac.theme),ec.theme.setAttribute("href",c))}Q()}function j(){if(kc=!0,window.addEventListener("hashchange",Kb,!1),window.addEventListener("resize",Lb,!1),ac.touch&&(ec.wrapper.addEventListener("touchstart",wb,!1),ec.wrapper.addEventListener("touchmove",xb,!1),ec.wrapper.addEventListener("touchend",yb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.addEventListener("MSPointerDown",zb,!1),ec.wrapper.addEventListener("MSPointerMove",Ab,!1),ec.wrapper.addEventListener("MSPointerUp",Bb,!1))),ac.keyboard&&document.addEventListener("keydown",vb,!1),ac.progress&&ec.progress&&ec.progress.addEventListener("click",Db,!1),ac.focusBodyOnPageVisiblityChange){var a;"hidden"in document?a="visibilitychange":"msHidden"in document?a="msvisibilitychange":"webkitHidden"in document&&(a="webkitvisibilitychange"),a&&document.addEventListener(a,Mb,!1)}["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.addEventListener(a,Eb,!1)}),ec.controlsRight.forEach(function(b){b.addEventListener(a,Fb,!1)}),ec.controlsUp.forEach(function(b){b.addEventListener(a,Gb,!1)}),ec.controlsDown.forEach(function(b){b.addEventListener(a,Hb,!1)}),ec.controlsPrev.forEach(function(b){b.addEventListener(a,Ib,!1)}),ec.controlsNext.forEach(function(b){b.addEventListener(a,Jb,!1)})})}function k(){kc=!1,document.removeEventListener("keydown",vb,!1),window.removeEventListener("hashchange",Kb,!1),window.removeEventListener("resize",Lb,!1),ec.wrapper.removeEventListener("touchstart",wb,!1),ec.wrapper.removeEventListener("touchmove",xb,!1),ec.wrapper.removeEventListener("touchend",yb,!1),window.navigator.msPointerEnabled&&(ec.wrapper.removeEventListener("MSPointerDown",zb,!1),ec.wrapper.removeEventListener("MSPointerMove",Ab,!1),ec.wrapper.removeEventListener("MSPointerUp",Bb,!1)),ac.progress&&ec.progress&&ec.progress.removeEventListener("click",Db,!1),["touchstart","click"].forEach(function(a){ec.controlsLeft.forEach(function(b){b.removeEventListener(a,Eb,!1)}),ec.controlsRight.forEach(function(b){b.removeEventListener(a,Fb,!1)}),ec.controlsUp.forEach(function(b){b.removeEventListener(a,Gb,!1)}),ec.controlsDown.forEach(function(b){b.removeEventListener(a,Hb,!1)}),ec.controlsPrev.forEach(function(b){b.removeEventListener(a,Ib,!1)}),ec.controlsNext.forEach(function(b){b.removeEventListener(a,Jb,!1)})})}function l(a,b){for(var c in b)a[c]=b[c]}function m(a){return Array.prototype.slice.call(a)}function n(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function o(a,b){a.style.WebkitTransform=b,a.style.MozTransform=b,a.style.msTransform=b,a.style.OTransform=b,a.style.transform=b}function p(a){var b=0;if(a){var c=0;m(a.childNodes).forEach(function(a){"number"==typeof a.offsetTop&&a.style&&("absolute"===a.style.position&&(c+=1),b=Math.max(b,a.offsetTop+a.offsetHeight))}),0===c&&(b=a.offsetHeight)}return b}function q(a,b){if(b=b||0,a){var c=a.parentNode,d=c.childNodes;m(d).forEach(function(c){if("number"==typeof c.offsetHeight&&c!==a){var d=window.getComputedStyle(c),e=parseInt(d.marginTop,10),f=parseInt(d.marginBottom,10);b-=c.offsetHeight+e+f}});var e=window.getComputedStyle(a);b-=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}return b}function r(){return/print-pdf/gi.test(window.location.search)}function s(){ac.hideAddressBar&&Wb&&(window.addEventListener("load",t,!1),window.addEventListener("orientationchange",t,!1))}function t(){setTimeout(function(){window.scrollTo(0,1)},10)}function u(a,b){var c=document.createEvent("HTMLEvents",1,2);c.initEvent(a,!0,!0),l(c,b),ec.wrapper.dispatchEvent(c)}function v(){if(fc.transforms3d&&!("msPerspective"in document.body.style))for(var a=document.querySelectorAll(Yb+" a:not(.image)"),b=0,c=a.length;c>b;b++){var d=a[b];if(!(!d.textContent||d.querySelector("*")||d.className&&d.classList.contains(d,"roll"))){var e=document.createElement("span");e.setAttribute("data-title",d.text),e.innerHTML=d.innerHTML,d.classList.add("roll"),d.innerHTML="",d.appendChild(e)}}}function w(){for(var a=document.querySelectorAll(Yb+" a.roll"),b=0,c=a.length;c>b;b++){var d=a[b],e=d.querySelector("span");e&&(d.classList.remove("roll"),d.innerHTML=e.innerHTML)}}function x(a){var b=m(document.querySelectorAll(a?a:"a"));b.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.addEventListener("click",Ob,!1)})}function y(){var a=m(document.querySelectorAll("a"));a.forEach(function(a){/^(http|www)/gi.test(a.getAttribute("href"))&&a.removeEventListener("click",Ob,!1)})}function z(a){A(),ec.preview=document.createElement("div"),ec.preview.classList.add("preview-link-overlay"),ec.wrapper.appendChild(ec.preview),ec.preview.innerHTML=["<header>",'<a class="close" href="#"><span class="icon"></span></a>','<a class="external" href="'+a+'" target="_blank"><span class="icon"></span></a>',"</header>",'<div class="spinner"></div>','<div class="viewport">','<iframe src="'+a+'"></iframe>',"</div>"].join(""),ec.preview.querySelector("iframe").addEventListener("load",function(){ec.preview.classList.add("loaded")},!1),ec.preview.querySelector(".close").addEventListener("click",function(a){A(),a.preventDefault()},!1),ec.preview.querySelector(".external").addEventListener("click",function(){A()},!1),setTimeout(function(){ec.preview.classList.add("visible")},1)}function A(){ec.preview&&(ec.preview.setAttribute("src",""),ec.preview.parentNode.removeChild(ec.preview),ec.preview=null)}function B(){if(ec.wrapper&&!r()){var a=ec.wrapper.offsetWidth,b=ec.wrapper.offsetHeight;a-=b*ac.margin,b-=b*ac.margin;var c=ac.width,d=ac.height,e=20;C(ac.width,ac.height,e),"string"==typeof c&&/%$/.test(c)&&(c=parseInt(c,10)/100*a),"string"==typeof d&&/%$/.test(d)&&(d=parseInt(d,10)/100*b),ec.slides.style.width=c+"px",ec.slides.style.height=d+"px",dc=Math.min(a/c,b/d),dc=Math.max(dc,ac.minScale),dc=Math.min(dc,ac.maxScale),"undefined"==typeof ec.slides.style.zoom||navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)?o(ec.slides,"translate(-50%, -50%) scale("+dc+") translate(50%, 50%)"):ec.slides.style.zoom=dc;for(var f=m(document.querySelectorAll(Yb)),g=0,h=f.length;h>g;g++){var i=f[g];"none"!==i.style.display&&(i.style.top=ac.center||i.classList.contains("center")?i.classList.contains("stack")?0:Math.max(-(p(i)/2)-e,-d/2)+"px":"")}V(),Z()}}function C(a,b,c){m(ec.slides.querySelectorAll("section > .stretch")).forEach(function(d){var e=q(d,b-2*c);if(/(img|video)/gi.test(d.nodeName)){var f=d.naturalWidth||d.videoWidth,g=d.naturalHeight||d.videoHeight,h=Math.min(a/f,e/g);d.style.width=f*h+"px",d.style.height=g*h+"px"}else d.style.width=a+"px",d.style.height=e+"px"})}function D(a,b){"object"==typeof a&&"function"==typeof a.setAttribute&&a.setAttribute("data-previous-indexv",b||0)}function E(a){if("object"==typeof a&&"function"==typeof a.setAttribute&&a.classList.contains("stack")){var b=a.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(a.getAttribute(b)||0,10)}return 0}function F(){if(ac.overview){lb();var a=ec.wrapper.classList.contains("overview"),b=window.innerWidth<400?1e3:2500;ec.wrapper.classList.add("overview"),ec.wrapper.classList.remove("overview-deactivating"),clearTimeout(ic),clearTimeout(jc),ic=setTimeout(function(){for(var c=document.querySelectorAll(Zb),d=0,e=c.length;e>d;d++){var f=c[d],g=ac.rtl?-105:105;if(f.setAttribute("data-index-h",d),o(f,"translateZ(-"+b+"px) translate("+(d-Rb)*g+"%, 0%)"),f.classList.contains("stack"))for(var h=f.querySelectorAll("section"),i=0,j=h.length;j>i;i++){var k=d===Rb?Sb:E(f),l=h[i];l.setAttribute("data-index-h",d),l.setAttribute("data-index-v",i),o(l,"translate(0%, "+105*(i-k)+"%)"),l.addEventListener("click",Nb,!0)}else f.addEventListener("click",Nb,!0)}U(),B(),a||u("overviewshown",{indexh:Rb,indexv:Sb,currentSlide:Ub})},10)}}function G(){ac.overview&&(clearTimeout(ic),clearTimeout(jc),ec.wrapper.classList.remove("overview"),ec.wrapper.classList.add("overview-deactivating"),jc=setTimeout(function(){ec.wrapper.classList.remove("overview-deactivating")},1),m(document.querySelectorAll(Yb)).forEach(function(a){o(a,""),a.removeEventListener("click",Nb,!0)}),P(Rb,Sb),kb(),u("overviewhidden",{indexh:Rb,indexv:Sb,currentSlide:Ub}))}function H(a){"boolean"==typeof a?a?F():G():I()?G():F()}function I(){return ec.wrapper.classList.contains("overview")}function J(a){return a=a?a:Ub,a&&a.parentNode&&!!a.parentNode.nodeName.match(/section/i)}function K(){var a=document.body,b=a.requestFullScreen||a.webkitRequestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;b&&b.apply(a)}function L(){var a=ec.wrapper.classList.contains("paused");lb(),ec.wrapper.classList.add("paused"),a===!1&&u("paused")}function M(){var a=ec.wrapper.classList.contains("paused");ec.wrapper.classList.remove("paused"),kb(),a&&u("resumed")}function N(){O()?M():L()}function O(){return ec.wrapper.classList.contains("paused")}function P(a,b,c,d){Tb=Ub;var e=document.querySelectorAll(Zb);void 0===b&&(b=E(e[a])),Tb&&Tb.parentNode&&Tb.parentNode.classList.contains("stack")&&D(Tb.parentNode,Sb);var f=cc.concat();cc.length=0;var g=Rb||0,h=Sb||0;Rb=T(Zb,void 0===a?Rb:a),Sb=T($b,void 0===b?Sb:b),U(),B();a:for(var i=0,j=cc.length;j>i;i++){for(var k=0;k<f.length;k++)if(f[k]===cc[i]){f.splice(k,1);continue a}document.documentElement.classList.add(cc[i]),u(cc[i])}for(;f.length;)document.documentElement.classList.remove(f.pop());I()&&F();var l=e[Rb],n=l.querySelectorAll("section");Ub=n[Sb]||l,"undefined"!=typeof c&&hb(c);var o=Rb!==g||Sb!==h;o?u("slidechanged",{indexh:Rb,indexv:Sb,previousSlide:Tb,currentSlide:Ub,origin:d}):Tb=null,Tb&&(Tb.classList.remove("present"),Tb.setAttribute("aria-hidden","true"),document.querySelector(_b).classList.contains("present")&&setTimeout(function(){var a,b=m(document.querySelectorAll(Zb+".stack"));for(a in b)b[a]&&D(b[a],0)},0)),o&&(bb(Tb),ab(Ub)),X(),V(),Y(),Z(),W(),eb(),kb()}function Q(){k(),j(),B(),lc=ac.autoSlide,kb(),h(),S(),X(),V(),Y(!0),W()}function R(){var a=m(document.querySelectorAll(Zb));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a,b){b>0&&(a.classList.remove("present"),a.classList.remove("past"),a.classList.add("future"),a.setAttribute("aria-hidden","true"))})})}function S(){var a=m(document.querySelectorAll(Zb));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a){gb(a.querySelectorAll(".fragment"))}),0===b.length&&gb(a.querySelectorAll(".fragment"))})}function T(a,b){var c=m(document.querySelectorAll(a)),d=c.length;if(d){ac.loop&&(b%=d,0>b&&(b=d+b)),b=Math.max(Math.min(b,d-1),0);for(var e=0;d>e;e++){var f=c[e],g=ac.rtl&&!J(f);if(f.classList.remove("past"),f.classList.remove("present"),f.classList.remove("future"),f.setAttribute("hidden",""),f.setAttribute("aria-hidden","true"),b>e){f.classList.add(g?"future":"past");for(var h=m(f.querySelectorAll(".fragment"));h.length;){var i=h.pop();i.classList.add("visible"),i.classList.remove("current-fragment")}}else if(e>b){f.classList.add(g?"past":"future");for(var j=m(f.querySelectorAll(".fragment.visible"));j.length;){var k=j.pop();k.classList.remove("visible"),k.classList.remove("current-fragment")}}f.querySelector("section")&&f.classList.add("stack")}c[b].classList.add("present"),c[b].removeAttribute("hidden"),c[b].removeAttribute("aria-hidden"),ec.statusDiv.innerHTML=c[b].innerHTML;var l=c[b].getAttribute("data-state");l&&(cc=cc.concat(l.split(" ")))}else b=0;return b}function U(){var a,b,c=m(document.querySelectorAll(Zb)),d=c.length;if(d){var e=I()?10:ac.viewDistance;Wb&&(e=I()?6:1);for(var f=0;d>f;f++){var g=c[f],h=m(g.querySelectorAll("section")),i=h.length;if(a=Math.abs((Rb-f)%(d-e))||0,g.style.display=a>e?"none":"block",i)for(var j=E(g),k=0;i>k;k++){var l=h[k];b=Math.abs(f===Rb?Sb-k:k-j),l.style.display=a+b>e?"none":"block"}}}}function V(){if(ac.progress&&ec.progress){var a=m(document.querySelectorAll(Zb)),b=document.querySelectorAll(Yb+":not(.stack)").length,c=0;a:for(var d=0;d<a.length;d++){for(var e=a[d],f=m(e.querySelectorAll("section")),g=0;g<f.length;g++){if(f[g].classList.contains("present"))break a;c++}if(e.classList.contains("present"))break;e.classList.contains("stack")===!1&&c++}ec.progressbar.style.width=c/(b-1)*window.innerWidth+"px"}}function W(){if(ac.slideNumber&&ec.slideNumber){var a=Rb;Sb>0&&(a+=" - "+Sb),ec.slideNumber.innerHTML=a}}function X(){var a=$(),b=_();ec.controlsLeft.concat(ec.controlsRight).concat(ec.controlsUp).concat(ec.controlsDown).concat(ec.controlsPrev).concat(ec.controlsNext).forEach(function(a){a.classList.remove("enabled"),a.classList.remove("fragmented")}),a.left&&ec.controlsLeft.forEach(function(a){a.classList.add("enabled")}),a.right&&ec.controlsRight.forEach(function(a){a.classList.add("enabled")}),a.up&&ec.controlsUp.forEach(function(a){a.classList.add("enabled")}),a.down&&ec.controlsDown.forEach(function(a){a.classList.add("enabled")}),(a.left||a.up)&&ec.controlsPrev.forEach(function(a){a.classList.add("enabled")}),(a.right||a.down)&&ec.controlsNext.forEach(function(a){a.classList.add("enabled")}),Ub&&(b.prev&&ec.controlsPrev.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsNext.forEach(function(a){a.classList.add("fragmented","enabled")}),J(Ub)?(b.prev&&ec.controlsUp.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsDown.forEach(function(a){a.classList.add("fragmented","enabled")})):(b.prev&&ec.controlsLeft.forEach(function(a){a.classList.add("fragmented","enabled")}),b.next&&ec.controlsRight.forEach(function(a){a.classList.add("fragmented","enabled")})))}function Y(a){var b=null,c=ac.rtl?"future":"past",d=ac.rtl?"past":"future";if(m(ec.background.childNodes).forEach(function(e,f){Rb>f?e.className="slide-background "+c:f>Rb?e.className="slide-background "+d:(e.className="slide-background present",b=e),(a||f===Rb)&&m(e.childNodes).forEach(function(a,c){Sb>c?a.className="slide-background past":c>Sb?a.className="slide-background future":(a.className="slide-background present",f===Rb&&(b=a))})}),b){var e=Vb?Vb.getAttribute("data-background-hash"):null,f=b.getAttribute("data-background-hash");f&&f===e&&b!==Vb&&ec.background.classList.add("no-transition"),Vb=b}setTimeout(function(){ec.background.classList.remove("no-transition")},1)}function Z(){if(ac.parallaxBackgroundImage){var a,b,c=document.querySelectorAll(Zb),d=document.querySelectorAll($b),e=ec.background.style.backgroundSize.split(" ");1===e.length?a=b=parseInt(e[0],10):(a=parseInt(e[0],10),b=parseInt(e[1],10));var f=ec.background.offsetWidth,g=c.length,h=-(a-f)/(g-1)*Rb,i=ec.background.offsetHeight,j=d.length,k=j>0?-(b-i)/(j-1)*Sb:0;ec.background.style.backgroundPosition=h+"px "+k+"px"}}function $(){var a=document.querySelectorAll(Zb),b=document.querySelectorAll($b),c={left:Rb>0||ac.loop,right:Rb<a.length-1||ac.loop,up:Sb>0,down:Sb<b.length-1};if(ac.rtl){var d=c.left;c.left=c.right,c.right=d}return c}function _(){if(Ub&&ac.fragments){var a=Ub.querySelectorAll(".fragment"),b=Ub.querySelectorAll(".fragment:not(.visible)");return{prev:a.length-b.length>0,next:!!b.length}}return{prev:!1,next:!1}}function ab(a){a&&!cb()&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&a.play()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:start","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-autoplay")&&a.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}function bb(a){a&&(m(a.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-ignore")||a.pause()}),m(a.querySelectorAll("iframe")).forEach(function(a){a.contentWindow.postMessage("slide:stop","*")}),m(a.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(a){a.hasAttribute("data-ignore")||"function"!=typeof a.contentWindow.postMessage||a.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}function cb(){return!!window.location.search.match(/receiver/gi)}function db(){var a=window.location.hash,b=a.slice(2).split("/"),c=a.replace(/#|\//gi,"");if(isNaN(parseInt(b[0],10))&&c.length){var d=document.querySelector("#"+c);if(d){var e=Reveal.getIndices(d);P(e.h,e.v)}else P(Rb||0,Sb||0)}else{var f=parseInt(b[0],10)||0,g=parseInt(b[1],10)||0;(f!==Rb||g!==Sb)&&P(f,g)}}function eb(a){if(ac.history)if(clearTimeout(hc),"number"==typeof a)hc=setTimeout(eb,a);else{var b="/";Ub&&"string"==typeof Ub.getAttribute("id")?b="/"+Ub.getAttribute("id"):((Rb>0||Sb>0)&&(b+=Rb),Sb>0&&(b+="/"+Sb)),window.location.hash=b}}function fb(a){var b,c=Rb,d=Sb;if(a){var e=J(a),f=e?a.parentNode:a,g=m(document.querySelectorAll(Zb));c=Math.max(g.indexOf(f),0),e&&(d=Math.max(m(a.parentNode.querySelectorAll("section")).indexOf(a),0))}if(!a&&Ub){var h=Ub.querySelectorAll(".fragment").length>0;if(h){var i=Ub.querySelectorAll(".fragment.visible");b=i.length-1}}return{h:c,v:d,f:b}}function gb(a){a=m(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function hb(a,b){if(Ub&&ac.fragments){var c=gb(Ub.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=gb(Ub.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return m(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),ec.statusDiv.innerHTML=b.innerHTML,c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&u("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&u("fragmentshown",{fragment:e[0],fragments:e}),X(),!(!e.length&&!f.length)}}return!1}function ib(){return hb(null,1)}function jb(){return hb(null,-1)}function kb(){if(lb(),Ub){var a=Ub.parentNode?Ub.parentNode.getAttribute("data-autoslide"):null,b=Ub.getAttribute("data-autoslide");lc=b?parseInt(b,10):a?parseInt(a,10):ac.autoSlide,m(Ub.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&lc&&1e3*a.duration>lc&&(lc=1e3*a.duration+1e3)}),!lc||oc||O()||I()||Reveal.isLastSlide()&&ac.loop!==!0||(mc=setTimeout(tb,lc),nc=Date.now()),Xb&&Xb.setPlaying(-1!==mc)}}function lb(){clearTimeout(mc),mc=-1}function mb(){oc=!0,clearTimeout(mc),Xb&&Xb.setPlaying(!1)}function nb(){oc=!1,kb()}function ob(){ac.rtl?(I()||ib()===!1)&&$().left&&P(Rb+1):(I()||jb()===!1)&&$().left&&P(Rb-1)}function pb(){ac.rtl?(I()||jb()===!1)&&$().right&&P(Rb-1):(I()||ib()===!1)&&$().right&&P(Rb+1)}function qb(){(I()||jb()===!1)&&$().up&&P(Rb,Sb-1)}function rb(){(I()||ib()===!1)&&$().down&&P(Rb,Sb+1)}function sb(){if(jb()===!1)if($().up)qb();else{var a=document.querySelector(Zb+".past:nth-child("+Rb+")");if(a){var b=a.querySelectorAll("section").length-1||void 0,c=Rb-1;P(c,b)}}}function tb(){ib()===!1&&($().down?rb():pb()),kb()}function ub(){ac.autoSlideStoppable&&mb()}function vb(a){ub(a);var b=(document.activeElement,!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&"inherit"===document.activeElement.contentEditable));if(!(b||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(O()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var c=!1;if("object"==typeof ac.keyboard)for(var d in ac.keyboard)if(parseInt(d,10)===a.keyCode){var e=ac.keyboard[d];"function"==typeof e?e.apply(null,[a]):"string"==typeof e&&"function"==typeof Reveal[e]&&Reveal[e].call(),c=!0}if(c===!1)switch(c=!0,a.keyCode){case 80:case 33:sb();break;case 78:case 34:tb();break;case 72:case 37:ob();break;case 76:case 39:pb();break;case 75:case 38:qb();break;case 74:case 40:rb();break;case 36:P(0);break;case 35:P(Number.MAX_VALUE);break;case 32:I()?G():a.shiftKey?sb():tb();break;case 13:I()?G():c=!1;break;case 66:case 190:case 191:N();break;case 70:K();break;default:c=!1}c?a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!fc.transforms3d||(ec.preview?A():H(),a.preventDefault()),kb()}}function wb(a){pc.startX=a.touches[0].clientX,pc.startY=a.touches[0].clientY,pc.startCount=a.touches.length,2===a.touches.length&&ac.overview&&(pc.startSpan=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY}))}function xb(a){if(pc.captured)navigator.userAgent.match(/android/gi)&&a.preventDefault();else{ub(a);var b=a.touches[0].clientX,c=a.touches[0].clientY;if(2===a.touches.length&&2===pc.startCount&&ac.overview){var d=n({x:a.touches[1].clientX,y:a.touches[1].clientY},{x:pc.startX,y:pc.startY});Math.abs(pc.startSpan-d)>pc.threshold&&(pc.captured=!0,d<pc.startSpan?F():G()),a.preventDefault()}else if(1===a.touches.length&&2!==pc.startCount){var e=b-pc.startX,f=c-pc.startY;e>pc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,ob()):e<-pc.threshold&&Math.abs(e)>Math.abs(f)?(pc.captured=!0,pb()):f>pc.threshold?(pc.captured=!0,qb()):f<-pc.threshold&&(pc.captured=!0,rb()),ac.embedded?(pc.captured||J(Ub))&&a.preventDefault():a.preventDefault()}}}function yb(){pc.captured=!1}function zb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],wb(a))}function Ab(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],xb(a))}function Bb(a){a.pointerType===a.MSPOINTER_TYPE_TOUCH&&(a.touches=[{clientX:a.clientX,clientY:a.clientY}],yb(a))}function Cb(a){if(Date.now()-gc>600){gc=Date.now();var b=a.detail||-a.wheelDelta;b>0?tb():sb()}}function Db(a){ub(a),a.preventDefault();var b=m(document.querySelectorAll(Zb)).length,c=Math.floor(a.clientX/ec.wrapper.offsetWidth*b);P(c)}function Eb(a){a.preventDefault(),ub(),ob()}function Fb(a){a.preventDefault(),ub(),pb()}function Gb(a){a.preventDefault(),ub(),qb()}function Hb(a){a.preventDefault(),ub(),rb()}function Ib(a){a.preventDefault(),ub(),sb()}function Jb(a){a.preventDefault(),ub(),tb()}function Kb(){db()}function Lb(){B()}function Mb(){var a=document.webkitHidden||document.msHidden||document.hidden;a===!1&&document.activeElement!==document.body&&(document.activeElement.blur(),document.body.focus())}function Nb(a){if(kc&&I()){a.preventDefault();for(var b=a.target;b&&!b.nodeName.match(/section/gi);)b=b.parentNode;if(b&&!b.classList.contains("disabled")&&(G(),b.nodeName.match(/section/gi))){var c=parseInt(b.getAttribute("data-index-h"),10),d=parseInt(b.getAttribute("data-index-v"),10);P(c,d)}}}function Ob(a){var b=a.target.getAttribute("href");b&&(z(b),a.preventDefault())}function Pb(){Reveal.isLastSlide()&&ac.loop===!1?(P(0,0),nb()):oc?nb():mb()}function Qb(a,b){this.diameter=50,this.thickness=3,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=a,this.progressCheck=b,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 Rb,Sb,Tb,Ub,Vb,Wb,Xb,Yb=".reveal .slides section",Zb=".reveal .slides>section",$b=".reveal .slides>section.present>section",_b=".reveal .slides>section:first-of-type",ac={width:960,height:700,margin:.1,minScale:.2,maxScale:1,controls:!0,progress:!0,slideNumber:!1,history:!1,keyboard:!0,overview:!0,center:!0,touch:!0,loop:!1,rtl:!1,fragments:!0,embedded:!1,autoSlide:0,autoSlideStoppable:!0,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,focusBodyOnPageVisiblityChange:!0,theme:null,transition:"default",transitionSpeed:"default",backgroundTransition:"default",parallaxBackgroundImage:"",parallaxBackgroundSize:"",viewDistance:3,dependencies:[]},bc=!1,cc=[],dc=1,ec={},fc={},gc=0,hc=0,ic=0,jc=0,kc=!1,lc=0,mc=0,nc=-1,oc=!1,pc={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40};return Qb.prototype.setPlaying=function(a){var b=this.playing;this.playing=a,!b&&this.playing?this.animate():this.render()},Qb.prototype.animate=function(){var a=this.progress;this.progress=this.progressCheck(),a>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&fc.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Qb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+2*a*Math.PI,g=-Math.PI/2+2*this.progressOffset*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,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(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()
},Qb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Qb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Qb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:Q,slide:P,left:ob,right:pb,up:qb,down:rb,prev:sb,next:tb,navigateFragment:hb,prevFragment:jb,nextFragment:ib,navigateTo:P,navigateLeft:ob,navigateRight:pb,navigateUp:qb,navigateDown:rb,navigatePrev:sb,navigateNext:tb,layout:B,availableRoutes:$,availableFragments:_,toggleOverview:H,togglePause:N,isOverview:I,isPaused:O,addEventListeners:j,removeEventListeners:k,getIndices:fb,getSlide:function(a,b){var c=document.querySelectorAll(Zb)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return Tb},getCurrentSlide:function(){return Ub},getScale:function(){return dc},getConfig:function(){return ac},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=unescape(c),"null"===c?a[b]=null:"true"===c?a[b]=!0:"false"===c?a[b]=!1:c.match(/^\d+$/)&&(a[b]=parseFloat(c))}return a},isFirstSlide:function(){return null==document.querySelector(Yb+".past")?!0:!1},isLastSlide:function(){return Ub?Ub.nextElementSibling?!1:J(Ub)&&Ub.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return bc},addEventListener:function(a,b,c){"addEventListener"in window&&(ec.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(ec.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}();