diff --git a/dist/introduction.min.js b/dist/introduction.min.js index 08c6db9..fdbd2b9 100644 --- a/dist/introduction.min.js +++ b/dist/introduction.min.js @@ -1 +1 @@ -!function(a,b){"use strict";"object"==typeof exports?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):b(a)}(this,function(a){function b(a){this._targetElement=a,this._options={nextLabel:"Next",prevLabel:"Back",skipLabel:"Skip",doneLabel:"Done",showSkipButton:!1,tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,showArrow:!1,scrollToElement:!0,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,swipeNavigation:!0,swipeSensibility:30}}function c(a){var b=[],c=this;if(this._options.steps)for(var e=0,i=this._options.steps.length;e0&&(b[q-1]={element:p,intro:p.getAttribute("data-intro"),step:parseInt(p.getAttribute("data-step"),10),tooltipClass:p.getAttribute("data-tooltipClass"),highlightClass:p.getAttribute("data-highlightClass"),position:p.getAttribute("data-position")||this._options.tooltipPosition})}for(var r=0,s=0;s0?g.call(c):d&&d.className.indexOf("introjs-skipbutton")>0?(c._introItems.length-1===c._currentStep&&"function"==typeof c._introCompleteCallback&&c._introCompleteCallback.call(c),void 0!==c._introExitCallback&&c._introExitCallback.call(c),h.call(c,a)):f.call(c),b.preventDefault?b.preventDefault():b.returnValue=!1}},c._onResize=function(){n.call(c,document.querySelector(".introjs-helperLayer")),n.call(c,document.querySelector(".introjs-tooltipReferenceLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",c._onKeyDown,!0),window.addEventListener("resize",c._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",c._onKeyDown),document.attachEvent("onresize",c._onResize))),this._options.swipeNavigation&&(new x).init({main_target:"introjs-tooltip",x_min_length:c._options.swipeSensibility,callback:function(a){"right"===a?f.call(c):g.call(c)}}),!1}function d(a){if(null===a||"object"!=typeof a||"undefined"!=typeof a.nodeType)return a;var b={};for(var c in a)"undefined"!=typeof jQuery&&a[c]instanceof jQuery?b[c]=a[c]:b[c]=d(a[c]);return b}function e(a){this._currentStep=a-2,"undefined"!=typeof this._introItems&&f.call(this)}function f(){if(this._direction="forward","undefined"==typeof this._currentStep?this._currentStep=0:++this._currentStep,this._introItems.length<=this._currentStep)return"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void h.call(this,this._targetElement);var a=this._introItems[this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element),p.call(this,a)}function g(){if(this._direction="backward",0===this._currentStep)return!1;var a=this._introItems[--this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element),p.call(this,a)}function h(a){var b=a.querySelector(".introjs-overlay");if(null!==b){b.style.opacity=0,setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b)},500);var c=a.querySelector(".introjs-helperLayer");c&&c.parentNode.removeChild(c);var d=a.querySelector(".introjs-tooltipReferenceLayer");d&&d.parentNode.removeChild(d);var e=a.querySelector(".introjs-disableInteraction");e&&e.parentNode.removeChild(e);var f=document.querySelector(".introjsFloatingElement");f&&f.parentNode.removeChild(f);var g=document.querySelector(".introjs-showElement");g&&(g.className=g.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""));var h=document.querySelectorAll(".introjs-fixParent");if(h&&h.length>0)for(var i=h.length-1;i>=0;i--)h[i].className=h[i].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");window.removeEventListener?window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown),this._currentStep=void 0}}function i(a,b,c,d){var e,f,g,h,i,m="";if(b.style.top=null,b.style.right=null,b.style.bottom=null,b.style.left=null,b.style.marginLeft=null,b.style.marginTop=null,c.style.display="inherit","undefined"!=typeof d&&null!==d&&(d.style.top=null,d.style.left=null),this._introItems[this._currentStep]){e=this._introItems[this._currentStep],m="string"==typeof e.tooltipClass?e.tooltipClass:this._options.tooltipClass,b.className=("introjs-tooltip "+m).replace(/^\s+|\s+$/g,""),i=this._introItems[this._currentStep].position,"auto"!==i&&"auto"!==this._options.tooltipPosition||"floating"!==i&&(i=l.call(this,a,b,i)),g=u(a),f=u(b),h=r();var n=0;switch(i){case"top":this._options.showArrow&&(c.className="introjs-arrow bottom"),n=15,j(g,n,f,h,b),b.style.bottom=g.height+20+"px";break;case"right":b.style.left=g.width+20+"px",g.top+f.height>h.height?(this._options.showArrow&&(c.className="introjs-arrow left-bottom"),b.style.top="-"+(f.height-g.height-20)+"px"):this._options.showArrow&&(c.className="introjs-arrow left");break;case"left":this._options.showStepNumbers===!0&&(b.style.top="15px"),g.top+f.height>h.height?(b.style.top="-"+(f.height-g.height-20)+"px",this._options.showArrow&&(c.className="introjs-arrow right-bottom")):this._options.showArrow&&(c.className="introjs-arrow right"),b.style.right=g.width+20+"px";break;case"floating":c.style.display="none",b.style.left="50%",b.style.top="50%",b.style.marginLeft="-"+f.width/2+"px",b.style.marginTop="-"+f.height/2+"px","undefined"!=typeof d&&null!==d&&(d.style.left="-"+(f.width/2+18)+"px",d.style.top="-"+(f.height/2+18)+"px");break;case"bottom-right-aligned":this._options.showArrow&&(c.className="introjs-arrow top-right");var o=0;k(g,o,f,b),b.style.top=g.height+20+"px";break;case"bottom-middle-aligned":this._options.showArrow&&(c.className="introjs-arrow top-middle");var p=g.width/2-f.width/2;k(g,p,f,b)&&(b.style.right=null,j(g,p,f,h,b)),b.style.top=g.height+20+"px";break;default:this._options.showArrow&&(c.className="introjs-arrow top"),j(g,n,f,h,b),b.style.top=g.height+20+"px"}}}function j(a,b,c,d,e){return a.left+b+c.width>d.width?(e.style.left=d.width-c.width-a.left+"px",!1):(e.style.left=b+"px",!0)}function k(a,b,c,d){return a.left+a.width-b-c.width<0?(d.style.left=-a.left+"px",!1):(d.style.right=b+"px",!0)}function l(a,b,c){var d=this._options.positionPrecedence.slice(),e=r(),f=u(b).height+10,g=u(b).width+20,h=u(a),i="floating";return h.left+g>e.width||h.left+h.width/2-g<0?(m(d,"bottom"),m(d,"top")):(h.height+h.top+f>e.height&&m(d,"bottom"),h.top-f<0&&m(d,"top")),h.width+h.left+g>e.width&&m(d,"right"),h.left-g<0&&m(d,"left"),d.length>0&&(i=d[0]),c&&"auto"!==c&&d.indexOf(c)>-1&&(i=c),i}function m(a,b){a.indexOf(b)>-1&&a.splice(a.indexOf(b),1)}function n(a){if(a){if(!this._introItems[this._currentStep])return;var b=this._introItems[this._currentStep],c=u(b.element),d=10;"floating"===b.position&&(d=0),a.setAttribute("style","width: "+(c.width+d)+"px; height:"+(c.height+d)+"px; top:"+(c.top-5)+"px;left: "+(c.left-5)+"px;")}}function o(){var a=document.querySelector(".introjs-disableInteraction");null===a&&(a=document.createElement("div"),a.className="introjs-disableInteraction",this._targetElement.appendChild(a)),n.call(this,a)}function p(a){var b,c,d,e;"undefined"!=typeof this._introChangeCallback&&this._introChangeCallback.call(this,a.element);var j=this,k=document.querySelector(".introjs-helperLayer"),l=document.querySelector(".introjs-tooltipReferenceLayer"),m="introjs-helperLayer";if("string"==typeof a.highlightClass&&(m+=" "+a.highlightClass),"string"==typeof this._options.highlightClass&&(m+=" "+this._options.highlightClass),null!==k){var p=l.querySelector(".introjs-helperNumberLayer"),t=l.querySelector(".introjs-tooltiptext"),u=l.querySelector(".introjs-arrow"),w=l.querySelector(".introjs-tooltip");if(b=l.querySelector(".introjs-skipbutton"),c=l.querySelector(".introjs-prevbutton"),d=l.querySelector(".introjs-nextbutton"),k.className=m,w.style.opacity=0,w.style.display="none",null!==p){var x=this._introItems[a.step-2>=0?a.step-2:0];(null!==x&&"forward"===this._direction&&"floating"===x.position||"backward"===this._direction&&"floating"===a.position)&&(p.style.opacity=0)}n.call(j,k),n.call(j,l);var y=document.querySelectorAll(".introjs-fixParent");if(y&&y.length>0)for(var z=y.length-1;z>=0;z--)y[z].className=y[z].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");var A=document.querySelector(".introjs-showElement");A.className=A.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""),j._lastShowElementTimer&&clearTimeout(j._lastShowElementTimer),j._lastShowElementTimer=setTimeout(function(){null!==p&&(p.innerHTML=a.step),t.innerHTML=a.intro,w.style.display="block",i.call(j,a.element,w,u,p),l.querySelector(".introjs-bullets li > a.active").className="",l.querySelector('.introjs-bullets li > a[data-stepnumber="'+a.step+'"]').className="active",l.querySelector(".introjs-progress .introjs-progressbar").setAttribute("style","width:"+v.call(j)+"%;"),w.style.opacity=1,p&&(p.style.opacity=1),j._options.showSkipButton&&d.tabIndex===-1?b.focus():d.focus()},300)}else{var B=document.createElement("div"),C=document.createElement("div"),D=document.createElement("div"),E=document.createElement("div"),F=document.createElement("div"),G=document.createElement("div"),H=document.createElement("div"),I=document.createElement("div");B.className=m,C.className="introjs-tooltipReferenceLayer",n.call(j,B),n.call(j,C),this._targetElement.appendChild(B),this._targetElement.appendChild(C),D.className="introjs-arrow",F.className="introjs-tooltiptext",F.innerHTML=a.intro,G.className="introjs-bullets",this._options.showBullets===!1&&(G.style.display="none");for(var J=document.createElement("ul"),K=0,L=this._introItems.length;K1&&I.appendChild(c),this._options.showSkipButton&&(b=document.createElement("a"),b.className="introjs-button introjs-skipbutton",b.href="javascript:void(0);",b.innerHTML=this._options.skipLabel,b.onclick=function(){j._introItems.length-1===j._currentStep&&"function"==typeof j._introCompleteCallback&&j._introCompleteCallback.call(j),j._introItems.length-1!==j._currentStep&&"function"==typeof j._introExitCallback&&j._introExitCallback.call(j),h.call(j,j._targetElement)},I.appendChild(b)),this._introItems.length>1&&I.appendChild(d),E.appendChild(I),i.call(j,a.element,E,D,e)}this._options.disableInteraction===!0&&o.call(j),c.removeAttribute("tabIndex"),d.removeAttribute("tabIndex"),0===this._currentStep&&this._introItems.length>1?(c.className="introjs-button introjs-prevbutton introjs-disabled",c.tabIndex="-1",d.className="introjs-button introjs-nextbutton",this._options.showSkipButton?b.innerHTML=this._options.skipLabel:d.innerHTML=this._options.nextLabel):this._introItems.length-1===this._currentStep||1===this._introItems.length?(this._options.showSkipButton?(b.innerHTML=this._options.doneLabel,d.className="introjs-button introjs-nextbutton introjs-disabled"):(d.innerHTML=this._options.doneLabel,d.className="introjs-button introjs-nextbutton"),c.className="introjs-button introjs-prevbutton",d.tabIndex="-1"):(c.className="introjs-button introjs-prevbutton",d.className="introjs-button introjs-nextbutton",this._options.showSkipButton?b.innerHTML=this._options.skipLabel:d.innerHTML=this._options.nextLabel),d.focus(),a.element.className+=" introjs-showElement";var P=q(a.element,"position");"absolute"!==P&&"relative"!==P&&(a.element.className+=" introjs-relativePosition");for(var Q=a.element.parentNode;null!==Q&&"body"!==Q.tagName.toLowerCase();){var R=q(Q,"z-index"),S=parseFloat(q(Q,"opacity")),T=q(Q,"transform")||q(Q,"-webkit-transform")||q(Q,"-moz-transform")||q(Q,"-ms-transform")||q(Q,"-o-transform");(/[0-9]+/.test(R)||S<1||"none"!==T&&void 0!==T)&&(Q.className+=" introjs-fixParent"),Q=Q.parentNode}if(!s(a.element)&&this._options.scrollToElement===!0){var U=a.element.getBoundingClientRect(),V=r().height,W=U.bottom-(U.bottom-U.top),X=U.bottom-V;W<0||a.element.clientHeight>V?window.scrollBy(0,W-30):window.scrollBy(0,X+100)}"undefined"!=typeof this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,a.element)}function q(a,b){var c="";return a.currentStyle?c=a.currentStyle[b]:document.defaultView&&document.defaultView.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b)),c&&c.toLowerCase?c.toLowerCase():c}function r(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var a=document.documentElement;return{width:a.clientWidth,height:a.clientHeight}}function s(a){var b=a.getBoundingClientRect();return b.top>=0&&b.left>=0&&b.bottom+80<=window.innerHeight&&b.right<=window.innerWidth}function t(a){var b=document.createElement("div"),c="",d=this;if(b.className="introjs-overlay","body"===a.tagName.toLowerCase())c+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",b.setAttribute("style",c);else{var e=u(a);e&&(c+="width: "+e.width+"px; height:"+e.height+"px; top:"+e.top+"px;left: "+e.left+"px;",b.setAttribute("style",c))}return a.appendChild(b),b.onclick=function(){d._options.exitOnOverlayClick===!0&&(void 0!==d._introExitCallback&&d._introExitCallback.call(d),h.call(d,a))},setTimeout(function(){c+="opacity: "+d._options.overlayOpacity.toString()+";",b.setAttribute("style",c)},10),!0}function u(a){var b={};b.width=a.offsetWidth,b.height=a.offsetHeight;for(var c=0,d=0;a&&!isNaN(a.offsetLeft)&&!isNaN(a.offsetTop);)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;return b.top=d,b.left=c,b}function v(){var a=parseInt(this._currentStep+1,10);return a/this._introItems.length*100}function w(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}function x(){this._cb=function(){},this._y_diff=-1,this._x_diff=-1,this._x_min_length=1,this.touches={touchstart:{entered:!1,x:-1,y:-1},touchmove:{entered:!1,x:-1,y:-1},touchend:!1,direction:"undetermined"}}x.prototype={touchHandler:function(a){var b,c=this.handle;if("undefined"!=typeof a&&"undefined"!==a.touches)switch(b=a.touches[0],a.type){case"touchstart":case"touchmove":c.touches[a.type].entered=!0,c.touches[a.type].x=b.pageX,c.touches[a.type].y=b.pageY;break;case"touchend":if(c.touches[a.type]=!0,!c.touches.touchmove.entered)break;c._y_diff=c.touches.touchstart.y>c.touches.touchmove.y?c.touches.touchstart.y-c.touches.touchmove.y:c.touches.touchmove.y-c.touches.touchstart.y,c._x_diff=c.touches.touchstart.x>c.touches.touchmove.x?c.touches.touchstart.x-c.touches.touchmove.x:c.touches.touchmove.x-c.touches.touchstart.x,c.touches.touchstart.x>-1&&c.touches.touchmove.x>-1&&c._x_diff>c._x_min_length&&c._x_diff>=c._y_diff&&(c.touches.direction=c.touches.touchstart.x0&&(b[q-1]={element:p,intro:p.getAttribute("data-intro"),step:parseInt(p.getAttribute("data-step"),10),tooltipClass:p.getAttribute("data-tooltipClass"),highlightClass:p.getAttribute("data-highlightClass"),position:p.getAttribute("data-position")||this._options.tooltipPosition})}for(var r=0,s=0;s0?g.call(c):d&&d.className.indexOf("introjs-skipbutton")>0?(c._introItems.length-1===c._currentStep&&"function"==typeof c._introCompleteCallback&&c._introCompleteCallback.call(c),void 0!==c._introExitCallback&&c._introExitCallback.call(c),h.call(c,a)):f.call(c),b.preventDefault?b.preventDefault():b.returnValue=!1}},c._onResize=function(){n.call(c,document.querySelector(".introjs-helperLayer")),n.call(c,document.querySelector(".introjs-tooltipReferenceLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",c._onKeyDown,!0),window.addEventListener("resize",c._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",c._onKeyDown),document.attachEvent("onresize",c._onResize))),this._options.swipeNavigation&&(new x).init({main_target:"introjs-tooltip",x_min_length:c._options.swipeSensibility,callback:function(a){"right"===a?f.call(c):g.call(c)}}),!1}function d(a){if(null===a||"object"!=typeof a||"undefined"!=typeof a.nodeType)return a;var b={};for(var c in a)"undefined"!=typeof jQuery&&a[c]instanceof jQuery?b[c]=a[c]:b[c]=d(a[c]);return b}function e(a){this._currentStep=a-2,"undefined"!=typeof this._introItems&&f.call(this)}function f(){if(this._direction="forward","undefined"==typeof this._currentStep?this._currentStep=0:++this._currentStep,this._introItems.length<=this._currentStep)return"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void h.call(this,this._targetElement);var a=this._introItems[this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element),p.call(this,a)}function g(){if(this._direction="backward",0===this._currentStep)return!1;var a=this._introItems[--this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element),p.call(this,a)}function h(a){var b=a.querySelector(".introjs-overlay");if(null!==b){b.style.opacity=0,setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b)},500);var c=a.querySelector(".introjs-helperLayer");c&&c.parentNode.removeChild(c);var d=a.querySelector(".introjs-tooltipReferenceLayer");d&&d.parentNode.removeChild(d);var e=a.querySelector(".introjs-disableInteraction");e&&e.parentNode.removeChild(e);var f=document.querySelector(".introjsFloatingElement");f&&f.parentNode.removeChild(f);var g=document.querySelector(".introjs-showElement");g&&(g.className=g.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""));var h=document.querySelectorAll(".introjs-fixParent");if(h&&h.length>0)for(var i=h.length-1;i>=0;i--)h[i].className=h[i].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");window.removeEventListener?window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown),this._currentStep=void 0}}function i(a,b,c,d){var e,f,g,h,i,m="";if(b.style.top=null,b.style.right=null,b.style.bottom=null,b.style.left=null,b.style.marginLeft=null,b.style.marginTop=null,c.style.display="inherit","undefined"!=typeof d&&null!==d&&(d.style.top=null,d.style.left=null),this._introItems[this._currentStep]){e=this._introItems[this._currentStep],m="string"==typeof e.tooltipClass?e.tooltipClass:this._options.tooltipClass,b.className=("introjs-tooltip "+m).replace(/^\s+|\s+$/g,""),i=this._introItems[this._currentStep].position,"auto"!==i&&"auto"!==this._options.tooltipPosition||"floating"!==i&&(i=l.call(this,a,b,i)),g=u(a),f=u(b),h=r();var n=0;switch(i){case"top":this._options.showArrow&&(c.className="introjs-arrow bottom"),n=15,j(g,n,f,h,b),b.style.bottom=g.height+20+"px";break;case"right":b.style.left=g.width+20+"px",g.top+f.height>h.height?(this._options.showArrow&&(c.className="introjs-arrow left-bottom"),b.style.top="-"+(f.height-g.height-20)+"px"):this._options.showArrow&&(c.className="introjs-arrow left");break;case"left":this._options.showStepNumbers===!0&&(b.style.top="15px"),g.top+f.height>h.height?(b.style.top="-"+(f.height-g.height-20)+"px",this._options.showArrow&&(c.className="introjs-arrow right-bottom")):this._options.showArrow&&(c.className="introjs-arrow right"),b.style.right=g.width+20+"px";break;case"floating":c.style.display="none",b.style.left="50%",b.style.top="50%",b.style.marginLeft="-"+f.width/2+"px",b.style.marginTop="-"+f.height/2+"px","undefined"!=typeof d&&null!==d&&(d.style.left="-"+(f.width/2+18)+"px",d.style.top="-"+(f.height/2+18)+"px");break;case"bottom-right-aligned":this._options.showArrow&&(c.className="introjs-arrow top-right");var o=0;k(g,o,f,b),b.style.top=g.height+20+"px";break;case"bottom-middle-aligned":this._options.showArrow&&(c.className="introjs-arrow top-middle");var p=g.width/2-f.width/2;k(g,p,f,b)&&(b.style.right=null,j(g,p,f,h,b)),b.style.top=g.height+20+"px";break;default:this._options.showArrow&&(c.className="introjs-arrow top"),j(g,n,f,h,b),b.style.top=g.height+20+"px"}}}function j(a,b,c,d,e){return a.left+b+c.width>d.width?(e.style.left=d.width-c.width-a.left+"px",!1):(e.style.left=b+"px",!0)}function k(a,b,c,d){return a.left+a.width-b-c.width<0?(d.style.left=-a.left+"px",!1):(d.style.right=b+"px",!0)}function l(a,b,c){var d=this._options.positionPrecedence.slice(),e=r(),f=u(b).height+10,g=u(b).width+20,h=u(a),i="floating";return h.left+g>e.width||h.left+h.width/2-g<0?(m(d,"bottom"),m(d,"top")):(h.height+h.top+f>e.height&&m(d,"bottom"),h.top-f<0&&m(d,"top")),h.width+h.left+g>e.width&&m(d,"right"),h.left-g<0&&m(d,"left"),d.length>0&&(i=d[0]),c&&"auto"!==c&&d.indexOf(c)>-1&&(i=c),i}function m(a,b){a.indexOf(b)>-1&&a.splice(a.indexOf(b),1)}function n(a){if(a){if(!this._introItems[this._currentStep])return;var b=this._introItems[this._currentStep],c=u(b.element),d=10;"floating"===b.position&&(d=0),a.setAttribute("style","width: "+(c.width+d)+"px; height:"+(c.height+d)+"px; top:"+(c.top-5)+"px;left: "+(c.left-5)+"px;")}}function o(){var a=document.querySelector(".introjs-disableInteraction");null===a&&(a=document.createElement("div"),a.className="introjs-disableInteraction",this._targetElement.appendChild(a)),n.call(this,a)}function p(a){var b,c,d,e;"undefined"!=typeof this._introChangeCallback&&this._introChangeCallback.call(this,a.element);var j=this,k=document.querySelector(".introjs-helperLayer"),l=document.querySelector(".introjs-tooltipReferenceLayer"),m="introjs-helperLayer";if("string"==typeof a.highlightClass&&(m+=" "+a.highlightClass),"string"==typeof this._options.highlightClass&&(m+=" "+this._options.highlightClass),null!==k){var p=l.querySelector(".introjs-helperNumberLayer"),t=l.querySelector(".introjs-tooltiptext"),u=l.querySelector(".introjs-arrow"),w=l.querySelector(".introjs-tooltip");if(b=l.querySelector(".introjs-skipbutton"),c=l.querySelector(".introjs-prevbutton"),d=l.querySelector(".introjs-nextbutton"),k.className=m,w.style.opacity=0,w.style.display="none",null!==p){var x=this._introItems[a.step-2>=0?a.step-2:0];(null!==x&&"forward"===this._direction&&"floating"===x.position||"backward"===this._direction&&"floating"===a.position)&&(p.style.opacity=0)}n.call(j,k),n.call(j,l);var y=document.querySelectorAll(".introjs-fixParent");if(y&&y.length>0)for(var z=y.length-1;z>=0;z--)y[z].className=y[z].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");var A=document.querySelector(".introjs-showElement");A.className=A.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""),j._lastShowElementTimer&&clearTimeout(j._lastShowElementTimer),j._lastShowElementTimer=setTimeout(function(){null!==p&&(p.innerHTML=a.step),t.innerHTML=a.intro,w.style.display="block",i.call(j,a.element,w,u,p),l.querySelector(".introjs-bullets li > a.active").className="",l.querySelector('.introjs-bullets li > a[data-stepnumber="'+a.step+'"]').className="active",l.querySelector(".introjs-progress .introjs-progressbar").setAttribute("style","width:"+v.call(j)+"%;"),w.style.opacity=1,p&&(p.style.opacity=1),j._options.showSkipButton&&d.tabIndex===-1?b.focus():d.focus()},300)}else{var B=document.createElement("div"),C=document.createElement("div"),D=document.createElement("div"),E=document.createElement("div"),F=document.createElement("div"),G=document.createElement("div"),H=document.createElement("div"),I=document.createElement("div");B.className=m,C.className="introjs-tooltipReferenceLayer",n.call(j,B),n.call(j,C),this._targetElement.appendChild(B),this._targetElement.appendChild(C),D.className="introjs-arrow",F.className="introjs-tooltiptext",F.innerHTML=a.intro,G.className="introjs-bullets",this._options.showBullets===!1&&(G.style.display="none");for(var J=document.createElement("ul"),K=0,L=this._introItems.length;K1&&I.appendChild(c),this._options.showSkipButton&&(b=document.createElement("a"),b.className="introjs-button introjs-skipbutton",b.href="javascript:void(0);",b.innerHTML=this._options.skipLabel,b.onclick=function(){j._introItems.length-1===j._currentStep&&"function"==typeof j._introCompleteCallback&&j._introCompleteCallback.call(j),j._introItems.length-1!==j._currentStep&&"function"==typeof j._introExitCallback&&j._introExitCallback.call(j),h.call(j,j._targetElement)},I.appendChild(b)),this._introItems.length>1&&I.appendChild(d),E.appendChild(I),i.call(j,a.element,E,D,e)}this._options.disableInteraction===!0&&o.call(j),c.removeAttribute("tabIndex"),d.removeAttribute("tabIndex"),0===this._currentStep&&this._introItems.length>1?(c.className="introjs-button introjs-prevbutton introjs-disabled",c.tabIndex="-1",d.className="introjs-button introjs-nextbutton",this._options.showSkipButton?b.innerHTML=this._options.skipLabel:d.innerHTML=this._options.nextLabel):this._introItems.length-1===this._currentStep||1===this._introItems.length?(this._options.showSkipButton?(b.innerHTML=this._options.doneLabel,d.className="introjs-button introjs-nextbutton introjs-disabled"):(d.innerHTML=this._options.doneLabel,d.className="introjs-button introjs-nextbutton"),c.className="introjs-button introjs-prevbutton",d.tabIndex="-1"):(c.className="introjs-button introjs-prevbutton",d.className="introjs-button introjs-nextbutton",this._options.showSkipButton?b.innerHTML=this._options.skipLabel:d.innerHTML=this._options.nextLabel),d.focus(),a.element.className+=" introjs-showElement";var P=q(a.element,"position");"absolute"!==P&&"relative"!==P&&(a.element.className+=" introjs-relativePosition");for(var Q=a.element.parentNode;null!==Q&&"body"!==Q.tagName.toLowerCase();){var R=q(Q,"z-index"),S=parseFloat(q(Q,"opacity")),T=q(Q,"transform")||q(Q,"-webkit-transform")||q(Q,"-moz-transform")||q(Q,"-ms-transform")||q(Q,"-o-transform");(/[0-9]+/.test(R)||S<1||"none"!==T&&void 0!==T)&&(Q.className+=" introjs-fixParent"),Q=Q.parentNode}if(!s(a.element)&&this._options.scrollToElement===!0){var U=a.element.getBoundingClientRect(),V=r().height,W=U.bottom-(U.bottom-U.top),X=U.bottom-V;W<0||a.element.clientHeight>V?window.scrollBy(0,W-30):window.scrollBy(0,X+100)}"undefined"!=typeof this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,a.element)}function q(a,b){var c="";return a.currentStyle?c=a.currentStyle[b]:document.defaultView&&document.defaultView.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b)),c&&c.toLowerCase?c.toLowerCase():c}function r(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var a=document.documentElement;return{width:a.clientWidth,height:a.clientHeight}}function s(a){var b=a.getBoundingClientRect();return b.top>=0&&b.left>=0&&b.bottom+80<=window.innerHeight&&b.right<=window.innerWidth}function t(a){var b=document.createElement("div"),c="",d=this;if(b.className="introjs-overlay","body"===a.tagName.toLowerCase())c+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",b.setAttribute("style",c);else{var e=u(a);e&&(c+="width: "+e.width+"px; height:"+e.height+"px; top:"+e.top+"px;left: "+e.left+"px;",b.setAttribute("style",c))}return a.appendChild(b),b.onclick=function(){d._options.exitOnOverlayClick===!0&&(void 0!==d._introExitCallback&&d._introExitCallback.call(d),h.call(d,a))},setTimeout(function(){c+="opacity: "+d._options.overlayOpacity.toString()+";",b.setAttribute("style",c)},10),!0}function u(a){var b={};b.width=a.offsetWidth,b.height=a.offsetHeight;for(var c=0,d=0;a&&!isNaN(a.offsetLeft)&&!isNaN(a.offsetTop);)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;return b.top=d,b.left=c,b}function v(){var a=parseInt(this._currentStep+1,10);return a/this._introItems.length*100}function w(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}function x(){this._cb=function(){},this._y_diff=-1,this._x_diff=-1,this._x_min_length=1,this.touches={touchstart:{entered:!1,x:-1,y:-1},touchmove:{entered:!1,x:-1,y:-1},touchend:!1,direction:"undetermined"}}x.prototype={touchHandler:function(a){var b,c=this.handle;if("undefined"!=typeof a&&"undefined"!==a.touches)switch(b=a.touches[0],a.type){case"touchstart":case"touchmove":c.touches[a.type].entered=!0,c.touches[a.type].x=b.pageX,c.touches[a.type].y=b.pageY;break;case"touchend":if(c.touches[a.type]=!0,!c.touches.touchmove.entered)break;c._y_diff=c.touches.touchstart.y>c.touches.touchmove.y?c.touches.touchstart.y-c.touches.touchmove.y:c.touches.touchmove.y-c.touches.touchstart.y,c._x_diff=c.touches.touchstart.x>c.touches.touchmove.x?c.touches.touchstart.x-c.touches.touchmove.x:c.touches.touchmove.x-c.touches.touchstart.x,c.touches.touchstart.x>-1&&c.touches.touchmove.x>-1&&c._x_diff>c._x_min_length&&c._x_diff>=c._y_diff&&(c.touches.direction=c.touches.touchstart.x