slide method now accepts fragment index argument #228
authorHakim El Hattab <hakim.elhattab@gmail.com>
Thu, 22 Nov 2012 14:10:34 +0000 (09:10 -0500)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Thu, 22 Nov 2012 14:10:34 +0000 (09:10 -0500)
1  2 
README.md
grunt.js
js/reveal.js
js/reveal.min.js

diff --cc README.md
Simple merge
diff --cc grunt.js
index 1cbc09ee64e00cfc34161687e3cefcf09e30f8b8,0000000000000000000000000000000000000000..b1d6e3db8aa9b8e3e637910a0841dc969efcf299
mode 100644,000000..100644
--- /dev/null
+++ b/grunt.js
@@@ -1,83 -1,0 +1,84 @@@
-                               module: false
 +/* global module:false */
 +module.exports = function(grunt) {
 +
 +      // Project configuration
 +      grunt.initConfig({
 +              pkg: '<json:package.json>',
 +
 +              inputJS: 'js/reveal.js',
 +              inputCSS: 'css/reveal.css',
 +
 +              outputJS: 'js/reveal.min.js',
 +              outputCSS: 'css/reveal.min.css',
 +
 +              meta: {
 +                      version: '2.2',
 +                      banner: 
 +                              '/*!\n' +
 +                              ' * reveal.js <%= meta.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +
 +                              ' * http://lab.hakim.se/reveal-js\n' +
 +                              ' * MIT licensed\n' +
 +                              ' *\n' +
 +                              ' * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se\n' +
 +                              ' */'
 +              },
 +
 +              lint: {
 +                      files: [ 'grunt.js', '<%= inputJS %>' ]
 +              },
 +
 +              // Tests will be added soon
 +              qunit: {
 +                      files: [ 'test/**/*.html' ]
 +              },
 +
 +              min: {
 +                      dist: {
 +                              src: [ '<banner:meta.banner>', '<%= inputJS %>' ],
 +                              dest: '<%= outputJS %>'
 +                      }
 +              },
 +
 +              mincss: {
 +                      compress: {
 +                              files: {
 +                                      '<%= outputCSS %>': [ '<%= inputCSS %>' ]
 +                              }
 +                      }
 +              },
 +
 +              jshint: {
 +                      options: {
 +                              curly: false,
 +                              eqeqeq: true,
 +                              immed: true,
 +                              latedef: true,
 +                              newcap: true,
 +                              noarg: true,
 +                              sub: true,
 +                              undef: true,
 +                              eqnull: true,
 +                              browser: true,
 +                              expr: true
 +                      },
 +                      globals: {
 +                              head: false,
++                              module: false,
++                              console: false
 +                      }
 +              },
 +
 +              watch: {
 +                      files: [ 'grunt.js', '<%= inputJS %>', '<%= inputCSS %>' ],
 +                      tasks: 'default'
 +              }
 +
 +      });
 +      
 +      // Dependencies
 +      grunt.loadNpmTasks( 'grunt-contrib-mincss' );
 +
 +      // Default task
 +      grunt.registerTask( 'default', [ 'lint', 'mincss', 'min' ] );
 +
 +};
diff --cc js/reveal.js
index 84e362f06e8f6dacdca0a509ef26b9dc9308b59d,58cb58e720dca51eead61207c3383d4344ff7d31..5ee5702e7519589ef15c3f5280a4c33db8cd7a2b
@@@ -741,8 -628,8 +741,10 @@@ var Reveal = (function()
         *
         * @param {int} h Horizontal index of the target slide
         * @param {int} v Vertical index of the target slide
++       * @param {int} f Optional index of a fragment within the 
++       * target slide to activate
         */
-       function slide( h, v ) {
 -      function slide( h, v, f) {
++      function slide( h, v, f ) {
                // Remember where we were at before
                previousSlide = currentSlide;
  
                // Activate and transition to the new slide
                indexh = updateSlides( HORIZONTAL_SLIDES_SELECTOR, h === undefined ? indexh : h );
                indexv = updateSlides( VERTICAL_SLIDES_SELECTOR, v === undefined ? indexv : v );
 -              
 -              // Show fragment, if specified
 -              if ( typeof f !== undefined ) {
 -                      // Hide all fragments in current slide
 -                      while ( previousFragment() ) {
 -                              // loop
 -                      }
 -                      if ( f !== 0 ) {
 -                              var fragmentIndex = 0;
 -                              while ( indexf < f && nextFragment() ) {
 -                                      fragmentIndex++;
 -                              }
 -                              // We cannot trust nextFragment for setting indexf: it can go beyond the max number of fragments available
 -                              indexf = fragmentIndex;
 -                      }
 -              } else {
 -                      indexf = 0;
 +
++              // No need to proceed if we're navigating to the same slide as 
++              // we're already on, unless a fragment index is specified
++              if( indexh === indexhBefore && indexv === indexvBefore && !f ) {
++                      return;
+               }
 +              layout();
 +
                // Apply the new state
                stateLoop: for( var i = 0, len = state.length; i < len; i++ ) {
                        // Check if this state existed on the previous slide. If it
--                      // did, we will avoid adding it repeatedly.
++                      // did, we will avoid adding it repeatedly
                        for( var j = 0; j < stateBefore.length; j++ ) {
                                if( stateBefore[j] === state[i] ) {
                                        stateBefore.splice( j, 1 );
                        activateOverview();
                }
  
 -              updateControls();
 -
 -              updateURL();
 -
 -              // Query all horizontal slides in the deck
 -              var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR );
 +              // Update the URL hash after a delay since updating it mid-transition
 +              // is likely to cause visual lag
-               clearTimeout( writeURLTimeout );
-               writeURLTimeout = setTimeout( writeURL, 1500 );
++              writeURL( 1500 );
  
                // Find the current horizontal slide and any possible vertical slides
                // within it
                // Store references to the previous and current slides
                currentSlide = currentVerticalSlides[ indexv ] || currentHorizontalSlide;
  
++              // Show fragment, if specified
++              if ( typeof f !== undefined ) {
++                      var fragments = currentSlide.querySelectorAll( '.fragment' );
++
++                      toArray( fragments ).forEach( function( fragment, indexf ) {
++                              if( indexf < f ) {
++                                      fragment.classList.add( 'visible' );
++                              }
++                              else {
++                                      fragment.classList.remove( 'visible' );
++                              }
++                      } );
++              }
++
                // Dispatch an event if the slide changed
                if( indexh !== indexhBefore || indexv !== indexvBefore ) {
                        dispatchEvent( 'slidechanged', {
        /**
         * Updates the page URL (hash) to reflect the current
         * state.
++       *
++       * @param {Number} delay The time in ms to wait before 
++       * writing the hash
         */
--      function writeURL() {
++      function writeURL( delay ) {
                if( config.history ) {
--                      var url = '/';
  
-                       // If the current slide has an ID, use that as a named link
-                       if( currentSlide && typeof currentSlide.getAttribute( 'id' ) === 'string' ) {
-                               url = '/' + currentSlide.getAttribute( 'id' );
 -                      // Only include the minimum possible number of components in
 -                      // the URL
 -                      if( indexh > 0 || indexv > 0 ) url += indexh;
 -                      if( indexv > 0 ) url += '/' + indexv;
 -                      if( indexf > 0 ) url += '?' + indexf;
++                      // Make sure there's never more than one timeout running
++                      clearTimeout( writeURLTimeout );
 -                      window.location.hash = url;
++                      // If a delay is specified, timeout this call
++                      if( typeof delay === 'number' ) {
++                              writeURLTimeout = setTimeout( writeURL, delay );
 +                      }
-                       // Otherwise use the /h/v index
 +                      else {
-                               if( indexh > 0 || indexv > 0 ) url += indexh;
-                               if( indexv > 0 ) url += '/' + indexv;
-                       }
++                              var url = '/';
 +
-                       window.location.hash = url;
++                              // If the current slide has an ID, use that as a named link
++                              if( currentSlide && typeof currentSlide.getAttribute( 'id' ) === 'string' ) {
++                                      url = '/' + currentSlide.getAttribute( 'id' );
++                              }
++                              // Otherwise use the /h/v index
++                              else {
++                                      if( indexh > 0 || indexv > 0 ) url += indexh;
++                                      if( indexv > 0 ) url += '/' + indexv;
++                              }
++
++                              window.location.hash = url;
++                      }
                }
        }
  
index 100fdee7a05a3111bfeee376a5ae9ef832730e80,e31d807cc76455fce39ca21218c25e17be6a4b59..7a159758afd31fd026976d28e44388e8fb0b75c4
@@@ -1,8 -1,83 +1,8 @@@
  /*!
-  * reveal.js 2.2 (2012-11-18, 12:09)
 - * reveal.js 2.1 r37
++ * reveal.js 2.2 (2012-11-22, 09:09)
   * http://lab.hakim.se/reveal-js
   * MIT licensed
   *
   * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
   */
- var Reveal=function(){"use strict";function g(e){if(!h&&!c){document.body.setAttribute("class","no-transforms");return}N(r,e),b(),w()}function y(){l.theme=document.querySelector("#theme"),l.wrapper=document.querySelector(".reveal"),l.slides=document.querySelector(".reveal .slides");if(!l.wrapper.querySelector(".progress")&&r.progress){var e=document.createElement("div");e.classList.add("progress"),e.innerHTML="<span></span>",l.wrapper.appendChild(e)}if(!l.wrapper.querySelector(".controls")&&r.controls){var t=document.createElement("aside");t.classList.add("controls"),t.innerHTML='<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>',l.wrapper.appendChild(t)}if(!l.wrapper.querySelector(".state-background")){var n=document.createElement("div");n.classList.add("state-background"),l.wrapper.appendChild(n)}if(!l.wrapper.querySelector(".pause-overlay")){var i=document.createElement("div");i.classList.add("pause-overlay"),l.wrapper.appendChild(i)}l.progress=document.querySelector(".reveal .progress"),l.progressbar=document.querySelector(".reveal .progress span"),r.controls&&(l.controls=document.querySelector(".reveal .controls"),l.controlsLeft=C(document.querySelectorAll(".navigate-left")),l.controlsRight=C(document.querySelectorAll(".navigate-right")),l.controlsUp=C(document.querySelectorAll(".navigate-up")),l.controlsDown=C(document.querySelectorAll(".navigate-down")),l.controlsPrev=C(document.querySelectorAll(".navigate-prev")),l.controlsNext=C(document.querySelectorAll(".navigate-next")))}function b(){navigator.userAgent.match(/(iphone|ipod)/i)&&(document.documentElement.style.overflow="scroll",document.body.style.height="120%",window.addEventListener("load",O,!1),window.addEventListener("orientationchange",O,!1))}function w(){function o(){t.length&&head.js.apply(null,t),E()}var e=[],t=[];for(var n=0,i=r.dependencies.length;n<i;n++){var s=r.dependencies[n];if(!s.condition||s.condition())s.async?t.push(s.src):e.push(s.src),typeof s.callback=="function"&&head.ready(s.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],s.callback)}e.length?(head.ready(o),head.js.apply(null,e)):o()}function E(){y(),x(),S(),D(),Q(),tt(),setTimeout(function(){M("ready",{indexh:s,indexv:o,currentSlide:a})},1)}function S(){c===!1&&(r.transition="linear"),r.controls&&l.controls&&(l.controls.style.display="block"),r.progress&&l.progress&&(l.progress.style.display="block"),r.transition!=="default"&&l.wrapper.classList.add(r.transition),r.rtl&&l.wrapper.classList.add("rtl"),r.center&&l.wrapper.classList.add("center"),r.mouseWheel&&(document.addEventListener("DOMMouseScroll",ht,!1),document.addEventListener("mousewheel",ht,!1)),r.rollingLinks&&_();if(r.theme&&l.theme){var e=l.theme.getAttribute("href"),t=/[^\/]*?(?=\.css)/,n=e.match(t)[0];r.theme!==n&&(e=e.replace(t,r.theme),l.theme.setAttribute("href",e))}}function x(){document.addEventListener("touchstart",ft,!1),document.addEventListener("touchmove",lt,!1),document.addEventListener("touchend",ct,!1),window.addEventListener("hashchange",dt,!1),window.addEventListener("resize",vt,!1),r.keyboard&&document.addEventListener("keydown",at,!1),r.progress&&l.progress&&l.progress.addEventListener("click",A(pt),!1),r.controls&&l.controls&&(l.controlsLeft.forEach(function(e){e.addEventListener("click",A(nt),!1)}),l.controlsRight.forEach(function(e){e.addEventListener("click",A(rt),!1)}),l.controlsUp.forEach(function(e){e.addEventListener("click",A(it),!1)}),l.controlsDown.forEach(function(e){e.addEventListener("click",A(st),!1)}),l.controlsPrev.forEach(function(e){e.addEventListener("click",A(ot),!1)}),l.controlsNext.forEach(function(e){e.addEventListener("click",A(ut),!1)}))}function T(){document.removeEventListener("keydown",at,!1),document.removeEventListener("touchstart",ft,!1),document.removeEventListener("touchmove",lt,!1),document.removeEventListener("touchend",ct,!1),window.removeEventListener("hashchange",dt,!1),window.removeEventListener("resize",vt,!1),r.progress&&l.progress&&l.progress.removeEventListener("click",A(pt),!1),r.controls&&l.controls&&(l.controlsLeft.forEach(function(e){e.removeEventListener("click",A(nt),!1)}),l.controlsRight.forEach(function(e){e.removeEventListener("click",A(rt),!1)}),l.controlsUp.forEach(function(e){e.removeEventListener("click",A(it),!1)}),l.controlsDown.forEach(function(e){e.removeEventListener("click",A(st),!1)}),l.controlsPrev.forEach(function(e){e.removeEventListener("click",A(ot),!1)}),l.controlsNext.forEach(function(e){e.removeEventListener("click",A(ut),!1)}))}function N(e,t){for(var n in t)e[n]=t[n]}function C(e){return Array.prototype.slice.call(e)}function k(e,t,n){e.forEach(function(e){e[t].apply(e,n)})}function L(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function A(e){return function(t){t.preventDefault(),e.call(null,t)}}function O(){setTimeout(function(){window.scrollTo(0,1)},0)}function M(e,t){var n=document.createEvent("HTMLEvents",1,2);n.initEvent(e,!0,!0),N(n,t),l.wrapper.dispatchEvent(n)}function _(){if(c&&!("msPerspective"in document.body.style)){var t=document.querySelectorAll(e+" a:not(.image)");for(var n=0,r=t.length;n<r;n++){var i=t[n];i.textContent&&!i.querySelector("img")&&(!i.className||!i.classList.contains(i,"roll"))&&(i.classList.add("roll"),i.innerHTML='<span data-title="'+i.text+'">'+i.innerHTML+"</span>")}}}function D(){if(r.center){var t=C(document.querySelectorAll(e)),n=-l.wrapper.offsetHeight/2;for(var i=0,s=t.length;i<s;i++){var o=t[i];if(o.style.display==="none")continue;o.classList.contains("stack")?o.style.top=0:o.style.top=Math.max(-(o.offsetHeight/2)-20,n)+"px"}}}function P(e,t){e&&e.setAttribute("data-previous-indexv",t||0)}function H(e){return e&&e.classList.contains("stack")?parseInt(e.getAttribute("data-previous-indexv")||0,10):0}function B(){if(r.overview){l.wrapper.classList.add("overview");var e=document.querySelectorAll(t);for(var n=0,i=e.length;n<i;n++){var u=e[n],a="translateZ(-2500px) translate("+(n-s)*105+"%, 0%)";u.setAttribute("data-index-h",n),u.style.display="block",u.style.WebkitTransform=a,u.style.MozTransform=a,u.style.msTransform=a,u.style.OTransform=a,u.style.transform=a;if(u.classList.contains("stack")){var f=u.querySelectorAll("section");for(var c=0,h=f.length;c<h;c++){var p=n===s?o:H(u),d=f[c],v="translate(0%, "+(c-p)*105+"%)";d.setAttribute("data-index-h",n),d.setAttribute("data-index-v",c),d.style.display="block",d.style.WebkitTransform=v,d.style.MozTransform=v,d.style.msTransform=v,d.style.OTransform=v,d.style.transform=v,d.addEventListener("click",mt,!0)}}else u.addEventListener("click",mt,!0)}D()}}function j(){if(r.overview){l.wrapper.classList.remove("overview");var t=C(document.querySelectorAll(e));for(var n=0,i=t.length;n<i;n++){var u=t[n];u.style.WebkitTransform="",u.style.MozTransform="",u.style.msTransform="",u.style.OTransform="",u.style.transform="",u.removeEventListener("click",mt)}X(s,o)}}function F(e){typeof e=="boolean"?e?B():j():I()?j():B()}function I(){return l.wrapper.classList.contains("overview")}function q(){var e=document.body,t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullScreen;t&&t.apply(e)}function R(){l.wrapper.classList.add("paused")}function U(){l.wrapper.classList.remove("paused")}function z(){W()?U():R()}function W(){return l.wrapper.classList.contains("paused")}function X(e,r){u=a;var i=document.querySelectorAll(t);r===undefined&&(r=H(i[e])),u&&u.parentNode&&u.parentNode.classList.contains("stack")&&P(u.parentNode,o);var l=f.concat();f.length=0;var c=s,h=o;s=V(t,e===undefined?s:e),o=V(n,r===undefined?o:r),D();e:for(var p=0,d=f.length;p<d;p++){for(var m=0;m<l.length;m++)if(l[m]===f[p]){l.splice(m,1);continue e}document.documentElement.classList.add(f[p]),M(f[p])}while(l.length)document.documentElement.classList.remove(l.pop());I()&&B(),clearTimeout(v),v=setTimeout(G,1500);var g=i[s],y=g.querySelectorAll("section");a=y[o]||g,s!==c||o!==h?M("slidechanged",{indexh:s,indexv:o,previousSlide:u,currentSlide:a}):u=null,u&&u.classList.remove("present"),J(),$()}function V(e,t){var n=C(document.querySelectorAll(e)),s=n.length;if(s){r.loop&&(t%=s,t<0&&(t=s+t)),t=Math.max(Math.min(t,s-1),0);for(var o=0;o<s;o++){var u=n[o];if(I()===!1){var a=Math.abs((t-o)%(s-3))||0;u.style.display=a>3?"none":"block"}n[o].classList.remove("past"),n[o].classList.remove("present"),n[o].classList.remove("future"),o<t?n[o].classList.add("past"):o>t&&n[o].classList.add("future"),u.querySelector("section")&&n[o].classList.add("stack")}n[t].classList.add("present");var l=n[t].getAttribute("data-state");l&&(f=f.concat(l.split(" ")));var c=n[t].getAttribute("data-autoslide");c?i=parseInt(c,10):i=r.autoSlide}else t=0;return t}function $(){if(r.progress&&l.progress){var n=C(document.querySelectorAll(t)),i=document.querySelectorAll(e+":not(.stack)").length,s=0;e:for(var o=0;o<n.length;o++){var u=n[o],a=C(u.querySelectorAll("section"));for(var f=0;f<a.length;f++){if(a[f].classList.contains("present"))break e;s++}if(u.classList.contains("present"))break;u.classList.contains("stack")===!1&&s++}l.progressbar.style.width=s/(i-1)*window.innerWidth+"px"}}function J(){if(r.controls&&l.controls){var e=K();l.controlsLeft.concat(l.controlsRight).concat(l.controlsUp).concat(l.controlsDown).concat(l.controlsPrev).concat(l.controlsNext).forEach(function(e){e.classList.remove("enabled")}),e.left&&l.controlsLeft.forEach(function(e){e.classList.add("enabled")}),e.right&&l.controlsRight.forEach(function(e){e.classList.add("enabled")}),e.up&&l.controlsUp.forEach(function(e){e.classList.add("enabled")}),e.down&&l.controlsDown.forEach(function(e){e.classList.add("enabled")}),(e.left||e.up)&&l.controlsPrev.forEach(function(e){e.classList.add("enabled")}),(e.right||e.down)&&l.controlsNext.forEach(function(e){e.classList.add("enabled")})}}function K(){var e=document.querySelectorAll(t),r=document.querySelectorAll(n);return{left:s>0,right:s<e.length-1,up:o>0,down:o<r.length-1}}function Q(){var e=window.location.hash,t=e.slice(2).split("/"),n=e.replace(/#|\//gi,"");if(isNaN(parseInt(t[0],10))&&n.length){var r=document.querySelector("#"+n);if(r){var i=Reveal.getIndices(r);X(i.h,i.v)}else X(s,o)}else{var u=parseInt(t[0],10)||0,a=parseInt(t[1],10)||0;X(u,a)}}function G(){if(r.history){var e="/";if(a&&typeof a.getAttribute("id")=="string")e="/"+a.getAttribute("id");else{if(s>0||o>0)e+=s;o>0&&(e+="/"+o)}window.location.hash=e}}function Y(e){var n=s,r=o;if(e){var i=!!e.parentNode.nodeName.match(/section/gi),u=i?e.parentNode:e,a=C(document.querySelectorAll(t));n=Math.max(a.indexOf(u),0),i&&(r=Math.max(C(e.parentNode.children).indexOf(e),0))}return{h:n,v:r}}function Z(){if(document.querySelector(n+".present")){var e=document.querySelectorAll(n+".present .fragment:not(.visible)");if(e.length)return e[0].classList.add("visible"),M("fragmentshown",{fragment:e[0]}),!0}else{var r=document.querySelectorAll(t+".present .fragment:not(.visible)");if(r.length)return r[0].classList.add("visible"),M("fragmentshown",{fragment:r[0]}),!0}return!1}function et(){if(document.querySelector(n+".present")){var e=document.querySelectorAll(n+".present .fragment.visible");if(e.length)return e[e.length-1].classList.remove("visible"),M("fragmenthidden",{fragment:e[e.length-1]}),!0}else{var r=document.querySelectorAll(t+".present .fragment.visible");if(r.length)return r[r.length-1].classList.remove("visible"),M("fragmenthidden",{fragment:r[r.length-1]}),!0}return!1}function tt(){clearTimeout(d),i&&(d=setTimeout(ut,i))}function nt(){(K().left&&I()||et()===!1)&&X(s-1)}function rt(){(K().right&&I()||Z()===!1)&&X(s+1)}function it(){(K().up&&I()||et()===!1)&&X(s,o-1)}function st(){(K().down&&I()||Z()===!1)&&X(s,o+1)}function ot(){if(et()===!1)if(K().up)it();else{var e=document.querySelector(t+".past:nth-child("+s+")");e&&(o=e.querySelectorAll("section").length+1||undefined,s--,X())}}function ut(){Z()===!1&&(K().down?st():rt()),tt()}function at(e){var t=document.activeElement,n=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&document.activeElement.contentEditable==="inherit");if(n||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)return;var r=!0;switch(e.keyCode){case 80:case 33:ot();break;case 78:case 34:ut();break;case 72:case 37:nt();break;case 76:case 39:rt();break;case 75:case 38:it();break;case 74:case 40:st();break;case 36:X(0);break;case 35:X(Number.MAX_VALUE);break;case 32:I()?j():ut();break;case 13:I()?j():r=!1;break;case 66:case 190:z();break;case 70:q();break;default:r=!1}r?e.preventDefault():e.keyCode===27&&c&&(F(),e.preventDefault()),tt()}function ft(e){m.startX=e.touches[0].clientX,m.startY=e.touches[0].clientY,m.startCount=e.touches.length,e.touches.length===2&&r.overview&&(m.startSpan=L({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:m.startX,y:m.startY}))}function lt(e){if(!m.handled){var t=e.touches[0].clientX,n=e.touches[0].clientY;if(e.touches.length===2&&m.startCount===2&&r.overview){var i=L({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:m.startX,y:m.startY});Math.abs(m.startSpan-i)>m.threshold&&(m.handled=!0,i<m.startSpan?B():j()),e.preventDefault()}else if(e.touches.length===1&&m.startCount!==2){var s=t-m.startX,o=n-m.startY;s>m.threshold&&Math.abs(s)>Math.abs(o)?(m.handled=!0,nt()):s<-m.threshold&&Math.abs(s)>Math.abs(o)?(m.handled=!0,rt()):o>m.threshold?(m.handled=!0,it()):o<-m.threshold&&(m.handled=!0,st()),e.preventDefault()}}else navigator.userAgent.match(/android/gi)&&e.preventDefault()}function ct(e){m.handled=!1}function ht(e){clearTimeout(p),p=setTimeout(function(){var t=e.detail||-e.wheelDelta;t>0?ut():ot()},100)}function pt(e){var n=C(document.querySelectorAll(t)).length,r=Math.floor(e.clientX/l.wrapper.offsetWidth*n);X(r)}function dt(e){Q()}function vt(e){D()}function mt(e){if(I()){e.preventDefault(),j();var t=parseInt(e.target.getAttribute("data-index-h"),10),n=parseInt(e.target.getAttribute("data-index-v"),10);X(t,n)}}var e=".reveal .slides section",t=".reveal .slides>section",n=".reveal .slides>section.present>section",r={controls:!0,progress:!0,history:!1,keyboard:!0,overview:!0,center:!0,loop:!1,rtl:!1,autoSlide:0,mouseWheel:!1,rollingLinks:!0,theme:null,transition:"default",dependencies:[]},i=r.autoSlide,s=0,o=0,u,a,f=[],l={},c="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,h="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,p=0,d=0,v=0,m={startX:0,startY:0,startSpan:0,startCount:0,handled:!1,threshold:80};return{initialize:g,slide:X,left:nt,right:rt,up:it,down:st,prev:ot,next:ut,prevFragment:et,nextFragment:Z,navigateTo:X,navigateLeft:nt,navigateRight:rt,navigateUp:it,navigateDown:st,navigatePrev:ot,navigateNext:ut,toggleOverview:F,addEventListeners:x,removeEventListeners:T,getIndices:Y,getPreviousSlide:function(){return u},getCurrentSlide:function(){return a},getQueryHash:function(){var e={};return location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(t){e[t.split("=").shift()]=t.split("=").pop()}),e},addEventListener:function(e,t,n){"addEventListener"in window&&(l.wrapper||document.querySelector(".reveal")).addEventListener(e,t,n)},removeEventListener:function(e,t,n){"addEventListener"in window&&(l.wrapper||document.querySelector(".reveal")).removeEventListener(e,t,n)}}}();
 -var Reveal=(function(){var l=".reveal .slides>section",b=".reveal .slides>section.present>section",R={controls:true,progress:true,history:false,keyboard:true,overview:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},Y=R.autoSlide,m=0,e=0,y,G,ak=[],f={},T="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,n="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,z=0,k=0,D=0,ac={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:80};
 -function i(al){if((!n&&!T)){document.body.setAttribute("class","no-transforms");return;}t(R,al);d();V();}function P(){f.theme=document.querySelector("#theme");
 -f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&R.progress){var ao=document.createElement("div");ao.classList.add("progress");
 -ao.innerHTML="<span></span>";f.wrapper.appendChild(ao);}if(!f.wrapper.querySelector(".controls")&&R.controls){var an=document.createElement("aside");an.classList.add("controls");
 -an.innerHTML='<div class="left"></div><div class="right"></div><div class="up"></div><div class="down"></div>';f.wrapper.appendChild(an);}if(!f.wrapper.querySelector(".state-background")){var am=document.createElement("div");
 -am.classList.add("state-background");f.wrapper.appendChild(am);}if(!f.wrapper.querySelector(".pause-overlay")){var al=document.createElement("div");al.classList.add("pause-overlay");
 -f.wrapper.appendChild(al);}f.progress=document.querySelector(".reveal .progress");f.progressbar=document.querySelector(".reveal .progress span");if(R.controls){f.controls=document.querySelector(".reveal .controls");
 -f.controlsLeft=document.querySelector(".reveal .controls .left");f.controlsRight=document.querySelector(".reveal .controls .right");f.controlsUp=document.querySelector(".reveal .controls .up");
 -f.controlsDown=document.querySelector(".reveal .controls .down");}}function d(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";
 -document.body.style.height="120%";window.addEventListener("load",ad,false);window.addEventListener("orientationchange",ad,false);}}function V(){var am=[],aq=[];
 -for(var an=0,al=R.dependencies.length;an<al;an++){var ao=R.dependencies[an];if(!ao.condition||ao.condition()){if(ao.async){aq.push(ao.src);}else{am.push(ao.src);
 -}if(typeof ao.callback==="function"){head.ready(ao.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],ao.callback);}}}function ap(){if(aq.length){head.js.apply(null,aq);
 -}H();}if(am.length){head.ready(ap);head.js.apply(null,am);}else{ap();}}function H(){P();E();K();J();O();setTimeout(function(){r("ready",{indexh:m,indexv:e,currentSlide:G});
 -},1);}function K(){if(T===false){R.transition="linear";}if(R.controls&&f.controls){f.controls.style.display="block";}if(R.progress&&f.progress){f.progress.style.display="block";
 -}if(R.transition!=="default"){f.wrapper.classList.add(R.transition);}if(R.mouseWheel){document.addEventListener("DOMMouseScroll",o,false);document.addEventListener("mousewheel",o,false);
 -}if(R.rollingLinks){N();}if(R.theme&&f.theme){var an=f.theme.getAttribute("href");var al=/[^\/]*?(?=\.css)/;var am=an.match(al)[0];if(R.theme!==am){an=an.replace(al,R.theme);
 -f.theme.setAttribute("href",an);}}}function E(){document.addEventListener("touchstart",A,false);document.addEventListener("touchmove",af,false);document.addEventListener("touchend",W,false);
 -window.addEventListener("hashchange",w,false);if(R.keyboard){document.addEventListener("keydown",ah,false);}if(R.progress&&f.progress){f.progress.addEventListener("click",q(ai),false);
 -}if(R.controls&&f.controls){f.controlsLeft.addEventListener("click",q(B),false);f.controlsRight.addEventListener("click",q(j),false);f.controlsUp.addEventListener("click",q(u),false);
 -f.controlsDown.addEventListener("click",q(F),false);}}function U(){document.removeEventListener("keydown",ah,false);document.removeEventListener("touchstart",A,false);
 -document.removeEventListener("touchmove",af,false);document.removeEventListener("touchend",W,false);window.removeEventListener("hashchange",w,false);if(R.progress&&f.progress){f.progress.removeEventListener("click",q(ai),false);
 -}if(R.controls&&f.controls){f.controlsLeft.removeEventListener("click",q(B),false);f.controlsRight.removeEventListener("click",q(j),false);f.controlsUp.removeEventListener("click",q(u),false);
 -f.controlsDown.removeEventListener("click",q(F),false);}}function t(am,al){for(var an in al){am[an]=al[an];}}function S(an,al){var ao=an.x-al.x,am=an.y-al.y;
 -return Math.sqrt(ao*ao+am*am);}function q(al){return function(am){am.preventDefault();al.call(null,am);};}function ad(){setTimeout(function(){window.scrollTo(0,1);
 -},0);}function r(am,al){var an=document.createEvent("HTMLEvents",1,2);an.initEvent(am,true,true);t(an,al);f.wrapper.dispatchEvent(an);}function N(){if(T&&!("msPerspective" in document.body.style)){var am=document.querySelectorAll(".reveal .slides section a:not(.image)");
 -for(var an=0,al=am.length;an<al;an++){var ao=am[an];if(ao.textContent&&!ao.querySelector("img")&&(!ao.className||!ao.classList.contains(ao,"roll"))){ao.classList.add("roll");
 -ao.innerHTML='<span data-title="'+ao.text+'">'+ao.innerHTML+"</span>";}}}}function I(){if(R.overview){f.wrapper.classList.add("overview");var al=document.querySelectorAll(l);
 -for(var aq=0,ao=al.length;aq<ao;aq++){var an=al[aq],av="translateZ(-2500px) translate("+((aq-m)*105)+"%, 0%)";an.setAttribute("data-index-h",aq);an.style.display="block";
 -an.style.WebkitTransform=av;an.style.MozTransform=av;an.style.msTransform=av;an.style.OTransform=av;an.style.transform=av;if(!an.classList.contains("stack")){an.addEventListener("click",C,true);
 -}var au=an.querySelectorAll("section");for(var ap=0,am=au.length;ap<am;ap++){var at=au[ap],ar="translate(0%, "+((ap-(aq===m?e:0))*105)+"%)";at.setAttribute("data-index-h",aq);
 -at.setAttribute("data-index-v",ap);at.style.display="block";at.style.WebkitTransform=ar;at.style.MozTransform=ar;at.style.msTransform=ar;at.style.OTransform=ar;
 -at.style.transform=ar;at.addEventListener("click",C,true);}}}}function ae(){if(R.overview){f.wrapper.classList.remove("overview");var ao=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section"));
 -for(var an=0,al=ao.length;an<al;an++){var am=ao[an];am.style.WebkitTransform="";am.style.MozTransform="";am.style.msTransform="";am.style.OTransform="";
 -am.style.transform="";am.removeEventListener("click",C);}a();}}function X(al){if(typeof al==="boolean"){al?I():ae();}else{L()?ae():I();}}function L(){return f.wrapper.classList.contains("overview");
 -}function ab(){var al=document.body;var am=al.requestFullScreen||al.webkitRequestFullScreen||al.mozRequestFullScreen||al.msRequestFullScreen;if(am){am.apply(al);
 -}}function c(){f.wrapper.classList.add("paused");}function p(){f.wrapper.classList.remove("paused");}function aa(){if(ag()){p();}else{c();}}function ag(){return f.wrapper.classList.contains("paused");
 -}function a(ar,aw){y=G;var ao=ak.concat();ak.length=0;var av=m,am=e;m=aj(l,ar===undefined?m:ar);e=aj(b,aw===undefined?e:aw);stateLoop:for(var ap=0,at=ak.length;
 -ap<at;ap++){for(var an=0;an<ao.length;an++){if(ao[an]===ak[ap]){ao.splice(an,1);continue stateLoop;}}document.documentElement.classList.add(ak[ap]);r(ak[ap]);
 -}while(ao.length){document.documentElement.classList.remove(ao.pop());}if(R.progress&&f.progress){f.progressbar.style.width=(m/(document.querySelectorAll(l).length-1))*window.innerWidth+"px";
 -}if(L()){I();}s();clearTimeout(D);D=setTimeout(h,1500);var al=document.querySelectorAll(l);var au=al[m],aq=au.querySelectorAll("section");G=aq[e]||au;if(m!==av||e!==am){r("slidechanged",{indexh:m,indexv:e,previousSlide:y,currentSlide:G});
 -}else{y=null;}if(y){y.classList.remove("present");}}function aj(ao,au){var am=Array.prototype.slice.call(document.querySelectorAll(ao)),at=am.length;if(at){if(R.loop){au%=at;
 -if(au<0){au=at+au;}}au=Math.max(Math.min(au,at-1),0);for(var aq=0;aq<at;aq++){var ar=am[aq];if(L()===false){var al=Math.abs((au-aq)%(at-3))||0;ar.style.display=al>3?"none":"block";
 -}am[aq].classList.remove("past");am[aq].classList.remove("present");am[aq].classList.remove("future");if(aq<au){am[aq].classList.add("past");}else{if(aq>au){am[aq].classList.add("future");
 -}}if(ar.querySelector("section")){am[aq].classList.add("stack");}}am[au].classList.add("present");var an=am[au].getAttribute("data-state");if(an){ak=ak.concat(an.split(" "));
 -}var ap=am[au].getAttribute("data-autoslide");if(ap){Y=parseInt(ap);}else{Y=R.autoSlide;}}else{au=0;}return au;}function s(){if(R.controls&&f.controls){var al=g();
 -[f.controlsLeft,f.controlsRight,f.controlsUp,f.controlsDown].forEach(function(am){am.classList.remove("enabled");});if(al.left){f.controlsLeft.classList.add("enabled");
 -}if(al.right){f.controlsRight.classList.add("enabled");}if(al.up){f.controlsUp.classList.add("enabled");}if(al.down){f.controlsDown.classList.add("enabled");
 -}}}function g(){var al=document.querySelectorAll(l),am=document.querySelectorAll(b);return{left:m>0,right:m<al.length-1,up:e>0,down:e<am.length-1};}function J(){var aq=window.location.hash;
 -var ap=aq.slice(2).split("/"),am=aq.replace(/#|\//gi,"");if(isNaN(parseInt(ap[0],10))&&am.length){var an=document.querySelector("#"+am);if(an){var ar=Reveal.getIndices(an);
 -a(ar.h,ar.v);}else{a(m,e);}}else{var ao=parseInt(ap[0],10)||0,al=parseInt(ap[1],10)||0;a(ao,al);}}function h(){if(R.history){var al="/";if(m>0||e>0){al+=m;
 -}if(e>0){al+="/"+e;}window.location.hash=al;}}function M(al){var ap=m,an=e;if(al){var aq=!!al.parentNode.nodeName.match(/section/gi);var ao=aq?al.parentNode:al;
 -var am=Array.prototype.slice.call(document.querySelectorAll(l));ap=Math.max(am.indexOf(ao),0);if(aq){an=Math.max(Array.prototype.slice.call(al.parentNode.children).indexOf(al),0);
 -}}return{h:ap,v:an};}function v(){if(document.querySelector(b+".present")){var am=document.querySelectorAll(b+".present .fragment:not(.visible)");if(am.length){am[0].classList.add("visible");
 -r("fragmentshown",{fragment:am[0]});return true;}}else{var al=document.querySelectorAll(l+".present .fragment:not(.visible)");if(al.length){al[0].classList.add("visible");
 -r("fragmentshown",{fragment:al[0]});return true;}}return false;}function Q(){if(document.querySelector(b+".present")){var am=document.querySelectorAll(b+".present .fragment.visible");
 -if(am.length){am[am.length-1].classList.remove("visible");r("fragmenthidden",{fragment:am[am.length-1]});return true;}}else{var al=document.querySelectorAll(l+".present .fragment.visible");
 -if(al.length){al[al.length-1].classList.remove("visible");r("fragmenthidden",{fragment:al[al.length-1]});return true;}}return false;}function O(){clearTimeout(k);
 -if(Y){k=setTimeout(x,Y);}}function B(){if(g().left&&(L()||Q()===false)){a(m-1,0);}}function j(){if(g().right&&(L()||v()===false)){a(m+1,0);}}function u(){if(g().up&&(L()||Q()===false)){a(m,e-1);
 -}}function F(){if(g().down&&(L()||v()===false)){a(m,e+1);}}function Z(){if(Q()===false){if(g().up){u();}else{var al=document.querySelector(".reveal .slides>section.past:nth-child("+m+")");
 -if(al){e=(al.querySelectorAll("section").length+1)||0;m--;a();}}}}function x(){if(v()===false){g().down?F():j();}O();}function ah(an){var am=document.activeElement;
 -var ao=!!(document.activeElement&&(document.activeElement.type||document.activeElement.href||document.activeElement.contentEditable!=="inherit"));if(ao||an.shiftKey||an.altKey||an.ctrlKey||an.metaKey){return;
 -}var al=true;switch(an.keyCode){case 80:case 33:Z();break;case 78:case 34:x();break;case 72:case 37:B();break;case 76:case 39:j();break;case 75:case 38:u();
 -break;case 74:case 40:F();break;case 36:a(0);break;case 35:a(Number.MAX_VALUE);break;case 32:L()?ae():x();break;case 13:L()?ae():al=false;break;case 66:case 190:aa();
 -break;case 70:ab();break;default:al=false;}if(al){an.preventDefault();}else{if(an.keyCode===27&&T){X();an.preventDefault();}}O();}function A(al){ac.startX=al.touches[0].clientX;
 -ac.startY=al.touches[0].clientY;ac.startCount=al.touches.length;if(al.touches.length===2&&R.overview){ac.startSpan=S({x:al.touches[1].clientX,y:al.touches[1].clientY},{x:ac.startX,y:ac.startY});
 -}}function af(aq){if(!ac.handled){var ao=aq.touches[0].clientX;var an=aq.touches[0].clientY;if(aq.touches.length===2&&ac.startCount===2&&R.overview){var ap=S({x:aq.touches[1].clientX,y:aq.touches[1].clientY},{x:ac.startX,y:ac.startY});
 -if(Math.abs(ac.startSpan-ap)>ac.threshold){ac.handled=true;if(ap<ac.startSpan){I();}else{ae();}}aq.preventDefault();}else{if(aq.touches.length===1&&ac.startCount!==2){var am=ao-ac.startX,al=an-ac.startY;
 -if(am>ac.threshold&&Math.abs(am)>Math.abs(al)){ac.handled=true;B();}else{if(am<-ac.threshold&&Math.abs(am)>Math.abs(al)){ac.handled=true;j();}else{if(al>ac.threshold){ac.handled=true;
 -u();}else{if(al<-ac.threshold){ac.handled=true;F();}}}}aq.preventDefault();}}}else{if(navigator.userAgent.match(/android/gi)){aq.preventDefault();}}}function W(al){ac.handled=false;
 -}function o(al){clearTimeout(z);z=setTimeout(function(){var am=al.detail||-al.wheelDelta;if(am>0){x();}else{Z();}},100);}function ai(am){var al=Array.prototype.slice.call(document.querySelectorAll(l)).length;
 -var an=Math.floor((am.clientX/f.wrapper.offsetWidth)*al);a(an);}function w(al){J();}function C(al){if(L()){al.preventDefault();ae();m=this.getAttribute("data-index-h");
 -e=this.getAttribute("data-index-v");a();}}return{initialize:i,slide:a,left:B,right:j,up:u,down:F,prev:Z,next:x,prevFragment:Q,nextFragment:v,navigateTo:a,navigateLeft:B,navigateRight:j,navigateUp:u,navigateDown:F,navigatePrev:Z,navigateNext:x,toggleOverview:X,addEventListeners:E,removeEventListeners:U,getIndices:M,getPreviousSlide:function(){return y;
 -},getCurrentSlide:function(){return G;},getQueryHash:function(){var al={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(am){al[am.split("=").shift()]=am.split("=").pop();
 -});return al;},addEventListener:function(am,an,al){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).addEventListener(am,an,al);
 -}},removeEventListener:function(am,an,al){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).removeEventListener(am,an,al);
 -}}};})();
++var Reveal=function(){"use strict";function g(e){if(!h&&!c){document.body.setAttribute("class","no-transforms");return}N(r,e),b(),w()}function y(){l.theme=document.querySelector("#theme"),l.wrapper=document.querySelector(".reveal"),l.slides=document.querySelector(".reveal .slides");if(!l.wrapper.querySelector(".progress")&&r.progress){var e=document.createElement("div");e.classList.add("progress"),e.innerHTML="<span></span>",l.wrapper.appendChild(e)}if(!l.wrapper.querySelector(".controls")&&r.controls){var t=document.createElement("aside");t.classList.add("controls"),t.innerHTML='<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>',l.wrapper.appendChild(t)}if(!l.wrapper.querySelector(".state-background")){var n=document.createElement("div");n.classList.add("state-background"),l.wrapper.appendChild(n)}if(!l.wrapper.querySelector(".pause-overlay")){var i=document.createElement("div");i.classList.add("pause-overlay"),l.wrapper.appendChild(i)}l.progress=document.querySelector(".reveal .progress"),l.progressbar=document.querySelector(".reveal .progress span"),r.controls&&(l.controls=document.querySelector(".reveal .controls"),l.controlsLeft=C(document.querySelectorAll(".navigate-left")),l.controlsRight=C(document.querySelectorAll(".navigate-right")),l.controlsUp=C(document.querySelectorAll(".navigate-up")),l.controlsDown=C(document.querySelectorAll(".navigate-down")),l.controlsPrev=C(document.querySelectorAll(".navigate-prev")),l.controlsNext=C(document.querySelectorAll(".navigate-next")))}function b(){navigator.userAgent.match(/(iphone|ipod)/i)&&(document.documentElement.style.overflow="scroll",document.body.style.height="120%",window.addEventListener("load",O,!1),window.addEventListener("orientationchange",O,!1))}function w(){function o(){t.length&&head.js.apply(null,t),E()}var e=[],t=[];for(var n=0,i=r.dependencies.length;n<i;n++){var s=r.dependencies[n];if(!s.condition||s.condition())s.async?t.push(s.src):e.push(s.src),typeof s.callback=="function"&&head.ready(s.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],s.callback)}e.length?(head.ready(o),head.js.apply(null,e)):o()}function E(){y(),x(),S(),D(),Q(),tt(),setTimeout(function(){M("ready",{indexh:s,indexv:o,currentSlide:a})},1)}function S(){c===!1&&(r.transition="linear"),r.controls&&l.controls&&(l.controls.style.display="block"),r.progress&&l.progress&&(l.progress.style.display="block"),r.transition!=="default"&&l.wrapper.classList.add(r.transition),r.rtl&&l.wrapper.classList.add("rtl"),r.center&&l.wrapper.classList.add("center"),r.mouseWheel&&(document.addEventListener("DOMMouseScroll",ht,!1),document.addEventListener("mousewheel",ht,!1)),r.rollingLinks&&_();if(r.theme&&l.theme){var e=l.theme.getAttribute("href"),t=/[^\/]*?(?=\.css)/,n=e.match(t)[0];r.theme!==n&&(e=e.replace(t,r.theme),l.theme.setAttribute("href",e))}}function x(){document.addEventListener("touchstart",ft,!1),document.addEventListener("touchmove",lt,!1),document.addEventListener("touchend",ct,!1),window.addEventListener("hashchange",dt,!1),window.addEventListener("resize",vt,!1),r.keyboard&&document.addEventListener("keydown",at,!1),r.progress&&l.progress&&l.progress.addEventListener("click",A(pt),!1),r.controls&&l.controls&&(l.controlsLeft.forEach(function(e){e.addEventListener("click",A(nt),!1)}),l.controlsRight.forEach(function(e){e.addEventListener("click",A(rt),!1)}),l.controlsUp.forEach(function(e){e.addEventListener("click",A(it),!1)}),l.controlsDown.forEach(function(e){e.addEventListener("click",A(st),!1)}),l.controlsPrev.forEach(function(e){e.addEventListener("click",A(ot),!1)}),l.controlsNext.forEach(function(e){e.addEventListener("click",A(ut),!1)}))}function T(){document.removeEventListener("keydown",at,!1),document.removeEventListener("touchstart",ft,!1),document.removeEventListener("touchmove",lt,!1),document.removeEventListener("touchend",ct,!1),window.removeEventListener("hashchange",dt,!1),window.removeEventListener("resize",vt,!1),r.progress&&l.progress&&l.progress.removeEventListener("click",A(pt),!1),r.controls&&l.controls&&(l.controlsLeft.forEach(function(e){e.removeEventListener("click",A(nt),!1)}),l.controlsRight.forEach(function(e){e.removeEventListener("click",A(rt),!1)}),l.controlsUp.forEach(function(e){e.removeEventListener("click",A(it),!1)}),l.controlsDown.forEach(function(e){e.removeEventListener("click",A(st),!1)}),l.controlsPrev.forEach(function(e){e.removeEventListener("click",A(ot),!1)}),l.controlsNext.forEach(function(e){e.removeEventListener("click",A(ut),!1)}))}function N(e,t){for(var n in t)e[n]=t[n]}function C(e){return Array.prototype.slice.call(e)}function k(e,t,n){e.forEach(function(e){e[t].apply(e,n)})}function L(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function A(e){return function(t){t.preventDefault(),e.call(null,t)}}function O(){setTimeout(function(){window.scrollTo(0,1)},0)}function M(e,t){var n=document.createEvent("HTMLEvents",1,2);n.initEvent(e,!0,!0),N(n,t),l.wrapper.dispatchEvent(n)}function _(){if(c&&!("msPerspective"in document.body.style)){var t=document.querySelectorAll(e+" a:not(.image)");for(var n=0,r=t.length;n<r;n++){var i=t[n];i.textContent&&!i.querySelector("img")&&(!i.className||!i.classList.contains(i,"roll"))&&(i.classList.add("roll"),i.innerHTML='<span data-title="'+i.text+'">'+i.innerHTML+"</span>")}}}function D(){if(r.center){var t=C(document.querySelectorAll(e)),n=-l.wrapper.offsetHeight/2;for(var i=0,s=t.length;i<s;i++){var o=t[i];if(o.style.display==="none")continue;o.classList.contains("stack")?o.style.top=0:o.style.top=Math.max(-(o.offsetHeight/2)-20,n)+"px"}}}function P(e,t){e&&e.setAttribute("data-previous-indexv",t||0)}function H(e){return e&&e.classList.contains("stack")?parseInt(e.getAttribute("data-previous-indexv")||0,10):0}function B(){if(r.overview){l.wrapper.classList.add("overview");var e=document.querySelectorAll(t);for(var n=0,i=e.length;n<i;n++){var u=e[n],a="translateZ(-2500px) translate("+(n-s)*105+"%, 0%)";u.setAttribute("data-index-h",n),u.style.display="block",u.style.WebkitTransform=a,u.style.MozTransform=a,u.style.msTransform=a,u.style.OTransform=a,u.style.transform=a;if(u.classList.contains("stack")){var f=u.querySelectorAll("section");for(var c=0,h=f.length;c<h;c++){var p=n===s?o:H(u),d=f[c],v="translate(0%, "+(c-p)*105+"%)";d.setAttribute("data-index-h",n),d.setAttribute("data-index-v",c),d.style.display="block",d.style.WebkitTransform=v,d.style.MozTransform=v,d.style.msTransform=v,d.style.OTransform=v,d.style.transform=v,d.addEventListener("click",mt,!0)}}else u.addEventListener("click",mt,!0)}D()}}function j(){if(r.overview){l.wrapper.classList.remove("overview");var t=C(document.querySelectorAll(e));for(var n=0,i=t.length;n<i;n++){var u=t[n];u.style.WebkitTransform="",u.style.MozTransform="",u.style.msTransform="",u.style.OTransform="",u.style.transform="",u.removeEventListener("click",mt)}X(s,o)}}function F(e){typeof e=="boolean"?e?B():j():I()?j():B()}function I(){return l.wrapper.classList.contains("overview")}function q(){var e=document.body,t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullScreen;t&&t.apply(e)}function R(){l.wrapper.classList.add("paused")}function U(){l.wrapper.classList.remove("paused")}function z(){W()?U():R()}function W(){return l.wrapper.classList.contains("paused")}function X(e,r,i){u=a;var l=document.querySelectorAll(t);r===undefined&&(r=H(l[e])),u&&u.parentNode&&u.parentNode.classList.contains("stack")&&P(u.parentNode,o);var c=f.concat();f.length=0;var h=s,p=o;s=V(t,e===undefined?s:e),o=V(n,r===undefined?o:r);if(s===h&&o===p&&!i)return;D();e:for(var d=0,v=f.length;d<v;d++){for(var m=0;m<c.length;m++)if(c[m]===f[d]){c.splice(m,1);continue e}document.documentElement.classList.add(f[d]),M(f[d])}while(c.length)document.documentElement.classList.remove(c.pop());I()&&B(),G(1500);var g=l[s],y=g.querySelectorAll("section");a=y[o]||g;if(typeof i!==undefined){var b=a.querySelectorAll(".fragment");C(b).forEach(function(e,t){t<i?e.classList.add("visible"):e.classList.remove("visible")})}s!==h||o!==p?M("slidechanged",{indexh:s,indexv:o,previousSlide:u,currentSlide:a}):u=null,u&&u.classList.remove("present"),J(),$()}function V(e,t){var n=C(document.querySelectorAll(e)),s=n.length;if(s){r.loop&&(t%=s,t<0&&(t=s+t)),t=Math.max(Math.min(t,s-1),0);for(var o=0;o<s;o++){var u=n[o];if(I()===!1){var a=Math.abs((t-o)%(s-3))||0;u.style.display=a>3?"none":"block"}n[o].classList.remove("past"),n[o].classList.remove("present"),n[o].classList.remove("future"),o<t?n[o].classList.add("past"):o>t&&n[o].classList.add("future"),u.querySelector("section")&&n[o].classList.add("stack")}n[t].classList.add("present");var l=n[t].getAttribute("data-state");l&&(f=f.concat(l.split(" ")));var c=n[t].getAttribute("data-autoslide");c?i=parseInt(c,10):i=r.autoSlide}else t=0;return t}function $(){if(r.progress&&l.progress){var n=C(document.querySelectorAll(t)),i=document.querySelectorAll(e+":not(.stack)").length,s=0;e:for(var o=0;o<n.length;o++){var u=n[o],a=C(u.querySelectorAll("section"));for(var f=0;f<a.length;f++){if(a[f].classList.contains("present"))break e;s++}if(u.classList.contains("present"))break;u.classList.contains("stack")===!1&&s++}l.progressbar.style.width=s/(i-1)*window.innerWidth+"px"}}function J(){if(r.controls&&l.controls){var e=K();l.controlsLeft.concat(l.controlsRight).concat(l.controlsUp).concat(l.controlsDown).concat(l.controlsPrev).concat(l.controlsNext).forEach(function(e){e.classList.remove("enabled")}),e.left&&l.controlsLeft.forEach(function(e){e.classList.add("enabled")}),e.right&&l.controlsRight.forEach(function(e){e.classList.add("enabled")}),e.up&&l.controlsUp.forEach(function(e){e.classList.add("enabled")}),e.down&&l.controlsDown.forEach(function(e){e.classList.add("enabled")}),(e.left||e.up)&&l.controlsPrev.forEach(function(e){e.classList.add("enabled")}),(e.right||e.down)&&l.controlsNext.forEach(function(e){e.classList.add("enabled")})}}function K(){var e=document.querySelectorAll(t),r=document.querySelectorAll(n);return{left:s>0,right:s<e.length-1,up:o>0,down:o<r.length-1}}function Q(){var e=window.location.hash,t=e.slice(2).split("/"),n=e.replace(/#|\//gi,"");if(isNaN(parseInt(t[0],10))&&n.length){var r=document.querySelector("#"+n);if(r){var i=Reveal.getIndices(r);X(i.h,i.v)}else X(s,o)}else{var u=parseInt(t[0],10)||0,a=parseInt(t[1],10)||0;X(u,a)}}function G(e){if(r.history){clearTimeout(v);if(typeof e=="number")v=setTimeout(G,e);else{var t="/";if(a&&typeof a.getAttribute("id")=="string")t="/"+a.getAttribute("id");else{if(s>0||o>0)t+=s;o>0&&(t+="/"+o)}window.location.hash=t}}}function Y(e){var n=s,r=o;if(e){var i=!!e.parentNode.nodeName.match(/section/gi),u=i?e.parentNode:e,a=C(document.querySelectorAll(t));n=Math.max(a.indexOf(u),0),i&&(r=Math.max(C(e.parentNode.children).indexOf(e),0))}return{h:n,v:r}}function Z(){if(document.querySelector(n+".present")){var e=document.querySelectorAll(n+".present .fragment:not(.visible)");if(e.length)return e[0].classList.add("visible"),M("fragmentshown",{fragment:e[0]}),!0}else{var r=document.querySelectorAll(t+".present .fragment:not(.visible)");if(r.length)return r[0].classList.add("visible"),M("fragmentshown",{fragment:r[0]}),!0}return!1}function et(){if(document.querySelector(n+".present")){var e=document.querySelectorAll(n+".present .fragment.visible");if(e.length)return e[e.length-1].classList.remove("visible"),M("fragmenthidden",{fragment:e[e.length-1]}),!0}else{var r=document.querySelectorAll(t+".present .fragment.visible");if(r.length)return r[r.length-1].classList.remove("visible"),M("fragmenthidden",{fragment:r[r.length-1]}),!0}return!1}function tt(){clearTimeout(d),i&&(d=setTimeout(ut,i))}function nt(){(K().left&&I()||et()===!1)&&X(s-1)}function rt(){(K().right&&I()||Z()===!1)&&X(s+1)}function it(){(K().up&&I()||et()===!1)&&X(s,o-1)}function st(){(K().down&&I()||Z()===!1)&&X(s,o+1)}function ot(){if(et()===!1)if(K().up)it();else{var e=document.querySelector(t+".past:nth-child("+s+")");e&&(o=e.querySelectorAll("section").length+1||undefined,s--,X())}}function ut(){Z()===!1&&(K().down?st():rt()),tt()}function at(e){var t=document.activeElement,n=!(!document.activeElement||!document.activeElement.type&&!document.activeElement.href&&document.activeElement.contentEditable==="inherit");if(n||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)return;var r=!0;switch(e.keyCode){case 80:case 33:ot();break;case 78:case 34:ut();break;case 72:case 37:nt();break;case 76:case 39:rt();break;case 75:case 38:it();break;case 74:case 40:st();break;case 36:X(0);break;case 35:X(Number.MAX_VALUE);break;case 32:I()?j():ut();break;case 13:I()?j():r=!1;break;case 66:case 190:z();break;case 70:q();break;default:r=!1}r?e.preventDefault():e.keyCode===27&&c&&(F(),e.preventDefault()),tt()}function ft(e){m.startX=e.touches[0].clientX,m.startY=e.touches[0].clientY,m.startCount=e.touches.length,e.touches.length===2&&r.overview&&(m.startSpan=L({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:m.startX,y:m.startY}))}function lt(e){if(!m.handled){var t=e.touches[0].clientX,n=e.touches[0].clientY;if(e.touches.length===2&&m.startCount===2&&r.overview){var i=L({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:m.startX,y:m.startY});Math.abs(m.startSpan-i)>m.threshold&&(m.handled=!0,i<m.startSpan?B():j()),e.preventDefault()}else if(e.touches.length===1&&m.startCount!==2){var s=t-m.startX,o=n-m.startY;s>m.threshold&&Math.abs(s)>Math.abs(o)?(m.handled=!0,nt()):s<-m.threshold&&Math.abs(s)>Math.abs(o)?(m.handled=!0,rt()):o>m.threshold?(m.handled=!0,it()):o<-m.threshold&&(m.handled=!0,st()),e.preventDefault()}}else navigator.userAgent.match(/android/gi)&&e.preventDefault()}function ct(e){m.handled=!1}function ht(e){clearTimeout(p),p=setTimeout(function(){var t=e.detail||-e.wheelDelta;t>0?ut():ot()},100)}function pt(e){var n=C(document.querySelectorAll(t)).length,r=Math.floor(e.clientX/l.wrapper.offsetWidth*n);X(r)}function dt(e){Q()}function vt(e){D()}function mt(e){if(I()){e.preventDefault(),j();var t=parseInt(e.target.getAttribute("data-index-h"),10),n=parseInt(e.target.getAttribute("data-index-v"),10);X(t,n)}}var e=".reveal .slides section",t=".reveal .slides>section",n=".reveal .slides>section.present>section",r={controls:!0,progress:!0,history:!1,keyboard:!0,overview:!0,center:!0,loop:!1,rtl:!1,autoSlide:0,mouseWheel:!1,rollingLinks:!0,theme:null,transition:"default",dependencies:[]},i=r.autoSlide,s=0,o=0,u,a,f=[],l={},c="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,h="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,p=0,d=0,v=0,m={startX:0,startY:0,startSpan:0,startCount:0,handled:!1,threshold:80};return{initialize:g,slide:X,left:nt,right:rt,up:it,down:st,prev:ot,next:ut,prevFragment:et,nextFragment:Z,navigateTo:X,navigateLeft:nt,navigateRight:rt,navigateUp:it,navigateDown:st,navigatePrev:ot,navigateNext:ut,toggleOverview:F,addEventListeners:x,removeEventListeners:T,getIndices:Y,getPreviousSlide:function(){return u},getCurrentSlide:function(){return a},getQueryHash:function(){var e={};return location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(t){e[t.split("=").shift()]=t.split("=").pop()}),e},addEventListener:function(e,t,n){"addEventListener"in window&&(l.wrapper||document.querySelector(".reveal")).addEventListener(e,t,n)},removeEventListener:function(e,t,n){"addEventListener"in window&&(l.wrapper||document.querySelector(".reveal")).removeEventListener(e,t,n)}}}();