/** * Intro.js v2.9.3 * https://github.com/usablica/intro.js * * Copyright (C) 2017 Afshin Mehrabani (@afshinmeh) */ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t(),module.exports.introJs=function(){return console.warn('Deprecated: please use require("intro.js") directly, instead of the introJs method of the function'),t().apply(this,arguments)};else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).introJs=t()}}(function(){function t(t){this._targetElement=t,this._introItems=[],this._options={nextLabel:"Next →",prevLabel:"← Back",skipLabel:"Skip",doneLabel:"Done",hidePrev:!1,hideNext:!1,tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintAnimation:!0,buttonClass:"introjs-button"}}function e(t,e){var l=t.querySelectorAll("*[data-intro]"),a=[];if(this._options.steps)g(this._options.steps,function(t){var e=o(t);if(e.step=a.length+1,"string"==typeof e.element&&(e.element=document.querySelector(e.element)),void 0===e.element||null===e.element){var i=document.querySelector(".introjsFloatingElement");null===i&&((i=document.createElement("div")).className="introjsFloatingElement",document.body.appendChild(i)),e.element=i,e.position="floating"}e.scrollTo=e.scrollTo||this._options.scrollTo,void 0===e.disableInteraction&&(e.disableInteraction=this._options.disableInteraction),null!==e.element&&a.push(e)}.bind(this));else{var c;if(l.length<1)return!1;g(l,function(t){if((!e||t.getAttribute("data-intro-group")===e)&&"none"!==t.style.display){var i=parseInt(t.getAttribute("data-step"),10);c=void 0!==t.getAttribute("data-disable-interaction")?!!t.getAttribute("data-disable-interaction"):this._options.disableInteraction,i>0&&(a[i-1]={element:t,intro:t.getAttribute("data-intro"),step:parseInt(t.getAttribute("data-step"),10),tooltipClass:t.getAttribute("data-tooltipclass"),highlightClass:t.getAttribute("data-highlightclass"),position:t.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:t.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:c})}}.bind(this));var h=0;g(l,function(t){if((!e||t.getAttribute("data-intro-group")===e)&&null===t.getAttribute("data-step")){for(;void 0!==a[h];)h++;c=void 0!==t.getAttribute("data-disable-interaction")?!!t.getAttribute("data-disable-interaction"):this._options.disableInteraction,a[h]={element:t,intro:t.getAttribute("data-intro"),step:h+1,tooltipClass:t.getAttribute("data-tooltipclass"),highlightClass:t.getAttribute("data-highlightclass"),position:t.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:t.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:c}}}.bind(this))}for(var u=[],d=0;do.height&&u(n,"bottom");r.top-s<0&&u(n,"top");r.right+l>o.width&&u(n,"right");r.left-l<0&&u(n,"left");var c=(h=i||"",d=h.indexOf("-"),-1!==d?h.substr(d):"");var h,d;i&&(i=i.split("-")[0]);n.length&&(a="auto"!==i&&n.indexOf(i)>-1?i:n[0]);-1!==["top","bottom"].indexOf(a)&&(a+=function(t,e,i,n){var o=e/2,s=Math.min(i.width,window.screen.width),l=["-left-aligned","-middle-aligned","-right-aligned"],r="";s-ta.height?(i.className="introjs-arrow left-bottom",e.style.top="-"+(l.height-r.height-20)+"px"):i.className="introjs-arrow left";break;case"left":o||!0!==this._options.showStepNumbers||(e.style.top="15px"),r.top+l.height>a.height?(e.style.top="-"+(l.height-r.height-20)+"px",i.className="introjs-arrow right-bottom"):i.className="introjs-arrow right",e.style.right=r.width+20+"px";break;case"floating":i.style.display="none",e.style.left="50%",e.style.top="50%",e.style.marginLeft="-"+l.width/2+"px",e.style.marginTop="-"+l.height/2+"px",null!=n&&(n.style.left="-"+(l.width/2+18)+"px",n.style.top="-"+(l.height/2+18)+"px");break;case"bottom-right-aligned":i.className="introjs-arrow top-right",h(r,f=0,l,e),e.style.top=r.height+20+"px";break;case"bottom-middle-aligned":i.className="introjs-arrow top-middle",m=r.width/2-l.width/2,o&&(m+=5),h(r,m,l,e)&&(e.style.right=null,c(r,m,l,a,e)),e.style.top=r.height+20+"px";break;default:i.className="introjs-arrow top",c(r,0,l,a,e),e.style.top=r.height+20+"px"}}function c(t,e,i,n,o){return t.left+e+i.width>n.width?(o.style.left=n.width-i.width-t.left+"px",!1):(o.style.left=e+"px",!0)}function h(t,e,i,n){return t.left+t.width-e-i.width<0?(n.style.left=-t.left+"px",!1):(n.style.right=e+"px",!0)}function u(t,e){t.indexOf(e)>-1&&t.splice(t.indexOf(e),1)}function d(t){if(t){if(!this._introItems[this._currentStep])return;var e=this._introItems[this._currentStep],i=B(e.element),n=this._options.helperElementPadding;k(e.element)?w(t,"introjs-fixedTooltip"):C(t,"introjs-fixedTooltip"),"floating"===e.position&&(n=0),t.style.cssText="width: "+(i.width+n)+"px; height:"+(i.height+n)+"px; top:"+(i.top-n/2)+"px;left: "+(i.left-n/2)+"px;"}}function p(t){t.setAttribute("role","button"),t.tabIndex=0}function f(t){void 0!==this._introChangeCallback&&this._introChangeCallback.call(this,t.element);var e,i,n,o,c=this,h=document.querySelector(".introjs-helperLayer"),u=document.querySelector(".introjs-tooltipReferenceLayer"),f="introjs-helperLayer";if("string"==typeof t.highlightClass&&(f+=" "+t.highlightClass),"string"==typeof this._options.highlightClass&&(f+=" "+this._options.highlightClass),null!==h){var y=u.querySelector(".introjs-helperNumberLayer"),v=u.querySelector(".introjs-tooltiptext"),_=u.querySelector(".introjs-arrow"),k=u.querySelector(".introjs-tooltip");if(n=u.querySelector(".introjs-skipbutton"),i=u.querySelector(".introjs-prevbutton"),e=u.querySelector(".introjs-nextbutton"),h.className=f,k.style.opacity=0,k.style.display="none",null!==y){var x=this._introItems[t.step-2>=0?t.step-2:0];(null!==x&&"forward"===this._direction&&"floating"===x.position||"backward"===this._direction&&"floating"===t.position)&&(y.style.opacity=0)}(o=H(t.element))!==document.body&&O(o,t.element),d.call(c,h),d.call(c,u),g(document.querySelectorAll(".introjs-fixParent"),function(t){C(t,/introjs-fixParent/g)}),b(),c._lastShowElementTimer&&window.clearTimeout(c._lastShowElementTimer),c._lastShowElementTimer=window.setTimeout(function(){null!==y&&(y.innerHTML=t.step),v.innerHTML=t.intro,k.style.display="block",a.call(c,t.element,k,_,y),c._options.showBullets&&(u.querySelector(".introjs-bullets li > a.active").className="",u.querySelector('.introjs-bullets li > a[data-stepnumber="'+t.step+'"]').className="active"),u.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:"+M.call(c)+"%;",u.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",M.call(c)),k.style.opacity=1,y&&(y.style.opacity=1),null!=n&&/introjs-donebutton/gi.test(n.className)?n.focus():null!=e&&e.focus(),m.call(c,t.scrollTo,t,v)},350)}else{var S=document.createElement("div"),E=document.createElement("div"),N=document.createElement("div"),A=document.createElement("div"),L=document.createElement("div"),T=document.createElement("div"),I=document.createElement("div"),P=document.createElement("div");S.className=f,E.className="introjs-tooltipReferenceLayer",(o=H(t.element))!==document.body&&O(o,t.element),d.call(c,S),d.call(c,E),this._targetElement.appendChild(S),this._targetElement.appendChild(E),N.className="introjs-arrow",L.className="introjs-tooltiptext",L.innerHTML=t.intro,T.className="introjs-bullets",!1===this._options.showBullets&&(T.style.display="none");var q=document.createElement("ul");q.setAttribute("role","tablist");var B=function(){c.goToStep(this.getAttribute("data-stepnumber"))};g(this._introItems,function(e,i){var n=document.createElement("li"),o=document.createElement("a");n.setAttribute("role","presentation"),o.setAttribute("role","tab"),o.onclick=B,i===t.step-1&&(o.className="active"),p(o),o.innerHTML=" ",o.setAttribute("data-stepnumber",e.step),n.appendChild(o),q.appendChild(n)}),T.appendChild(q),I.className="introjs-progress",!1===this._options.showProgress&&(I.style.display="none");var R=document.createElement("div");R.className="introjs-progressbar",R.setAttribute("role","progress"),R.setAttribute("aria-valuemin",0),R.setAttribute("aria-valuemax",100),R.setAttribute("aria-valuenow",M.call(this)),R.style.cssText="width:"+M.call(this)+"%;",I.appendChild(R),P.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(P.style.display="none"),A.className="introjs-tooltip",A.appendChild(L),A.appendChild(T),A.appendChild(I);var V=document.createElement("span");!0===this._options.showStepNumbers&&(V.className="introjs-helperNumberLayer",V.innerHTML=t.step,E.appendChild(V)),A.appendChild(N),E.appendChild(A),(e=document.createElement("a")).onclick=function(){c._introItems.length-1!==c._currentStep&&s.call(c)},p(e),e.innerHTML=this._options.nextLabel,(i=document.createElement("a")).onclick=function(){0!==c._currentStep&&l.call(c)},p(i),i.innerHTML=this._options.prevLabel,(n=document.createElement("a")).className=this._options.buttonClass+" introjs-skipbutton ",p(n),n.innerHTML=this._options.skipLabel,n.onclick=function(){c._introItems.length-1===c._currentStep&&"function"==typeof c._introCompleteCallback&&c._introCompleteCallback.call(c),c._introItems.length-1!==c._currentStep&&"function"==typeof c._introExitCallback&&c._introExitCallback.call(c),"function"==typeof c._introSkipCallback&&c._introSkipCallback.call(c),r.call(c,c._targetElement)},P.appendChild(n),this._introItems.length>1&&(P.appendChild(i),P.appendChild(e)),A.appendChild(P),a.call(c,t.element,A,N,V),m.call(this,t.scrollTo,t,A)}var z=c._targetElement.querySelector(".introjs-disableInteraction");z&&z.parentNode.removeChild(z),t.disableInteraction&&function(){var t=document.querySelector(".introjs-disableInteraction");null===t&&((t=document.createElement("div")).className="introjs-disableInteraction",this._targetElement.appendChild(t)),d.call(this,t)}.call(c),0===this._currentStep&&this._introItems.length>1?(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton"),!0===this._options.hidePrev?(null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton introjs-hidden"),null!=e&&w(e,"introjs-fullbutton")):null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton introjs-disabled"),null!=n&&(n.innerHTML=this._options.skipLabel)):this._introItems.length-1===this._currentStep||1===this._introItems.length?(null!=n&&(n.innerHTML=this._options.doneLabel,w(n,"introjs-donebutton")),null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton"),!0===this._options.hideNext?(null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton introjs-hidden"),null!=i&&w(i,"introjs-fullbutton")):null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton introjs-disabled")):(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton"),null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton"),null!=n&&(n.innerHTML=this._options.skipLabel)),i.setAttribute("role","button"),e.setAttribute("role","button"),n.setAttribute("role","button"),null!=e&&e.focus(),function(t){var e;if(t.element instanceof SVGElement)for(e=t.element.parentNode;null!==t.element.parentNode&&e.tagName&&"body"!==e.tagName.toLowerCase();)"svg"===e.tagName.toLowerCase()&&w(e,"introjs-showElement introjs-relativePosition"),e=e.parentNode;w(t.element,"introjs-showElement");var i=j(t.element,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&w(t.element,"introjs-relativePosition");e=t.element.parentNode;for(;null!==e&&e.tagName&&"body"!==e.tagName.toLowerCase();){var n=j(e,"z-index"),o=parseFloat(j(e,"opacity")),s=j(e,"transform")||j(e,"-webkit-transform")||j(e,"-moz-transform")||j(e,"-ms-transform")||j(e,"-o-transform");(/[0-9]+/.test(n)||o<1||"none"!==s&&void 0!==s)&&w(e,"introjs-fixParent"),e=e.parentNode}}(t),void 0!==this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,t.element)}function m(t,e,i){var n;if("off"!==t&&(this._options.scrollToElement&&(n="tooltip"===t?i.getBoundingClientRect():e.element.getBoundingClientRect(),!function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom+80<=window.innerHeight&&e.right<=window.innerWidth}(e.element)))){var o=x().height;n.bottom-(n.bottom-n.top)<0||e.element.clientHeight>o?window.scrollBy(0,n.top-(o/2-n.height/2)-this._options.scrollPadding):window.scrollBy(0,n.top-(o/2-n.height/2)+this._options.scrollPadding)}}function b(){g(document.querySelectorAll(".introjs-showElement"),function(t){C(t,/introjs-[a-zA-Z]+/g)})}function g(t,e,i){if(t)for(var n=0,o=t.length;n