guidechimp
Advanced tools
Comparing version
@@ -1,3 +0,3 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.GuideChimp=e():t.GuideChimp=e()}(window,function(){return r={},i.m=n=[function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e,n){"use strict";var r=n(0),i=r(n(3)),o=r(n(6));n(18);var s=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,i.default)(o.default,e)};s.prototype=o.default.prototype,s.extend=function(t){for(var e=arguments.length,n=new Array(1<e?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.apply(void 0,[o.default,s].concat(n)),s},t.exports=s},function(r,t,e){var o=e(4),i=e(5);function s(t,e,n){return i()?r.exports=s=Reflect.construct:r.exports=s=function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&o(i,n.prototype),i},s.apply(null,arguments)}r.exports=s},function(n,t){function r(t,e){return n.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.exports=r},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var C=r(n(7)),s=r(n(9)),i=r(n(10)),a=r(n(11)),c=r(n(16)),l=r(n(17));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){(0,i.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u=new Map,h=function(){function r(t){var e=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};(0,c.default)(this,r),this.step=null,this.steps=[],this.tour=null,this.options={},this.cache=u,this.listeners={},this.observers={},"undefined"!=typeof ResizeObserver&&(this.observers.stepElementResizeObserver=new ResizeObserver(function(){return e.refresh()})),this.setOptions(n),this.setTour(t),this.init()}var t,e,n,i,o;return(0,l.default)(r,[{key:"init",value:function(){}},{key:"setTour",value:function(t){return this.tour=Array.isArray(t)?(0,a.default)(t):t,this.steps=this.sortSteps(this.getSteps(this.tour)),this}},{key:"getTour",value:function(){return this.tour}},{key:"setOptions",value:function(t){return this.options=x(x({},this.constructor.getDefaultOptions()),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(o=(0,s.default)(C.default.mark(function t(){var e,n,r,i=arguments;return C.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<i.length&&void 0!==i[0]?i[0]:0,n=!(1<i.length&&void 0!==i[1])||i[1],t.next=4,this.go(e,n);case 4:if(r=t.sent)return document.body.classList.add(this.constructor.getBodyClass()),this.options.useKeyboard&&this.addOnKeydownListener(),this.addOnWindowResizeListener(),t.next=11,this.emit("onStart");t.next=11;break;case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}},t,this)})),function(){return o.apply(this,arguments)})},{key:"go",value:(i=(0,s.default)(C.default.mark(function t(e){var n,r,i,o,s,a,c,l,u,h,d,p,f,g,y,v,m,b,L=this,w=arguments;return C.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=!(1<w.length&&void 0!==w[1])||w[1],this.steps.length){t.next=3;break}return t.abrupt("return",!1);case 3:if(r=n?parseInt(e,10):e,n?this.steps.indexOf(this.step)===r:this.step&&this.step.step===r)return t.abrupt("return",!1);t.next=7;break;case 7:i=x({},this.step),o=null,s=0;case 10:if(!(s<this.steps.length)){t.next=19;break}if(a=this.steps[s],n?s===r:a.step===r)return o=a,t.abrupt("break",19);t.next=16;break;case 16:s++,t.next=10;break;case 19:if(o){t.next=21;break}return t.abrupt("return",!1);case 21:return this.resetElementsHighlighting(),this.unobserveResizeAllStepsElements(),this.showOverlayLayer(),this.startPreloader(),c=o.onBeforeChange,l=o.onAfterChange,t.next=28,this.emit("onBeforeChange",o,i);case 28:if(t.sent.some(function(t){return!1===t}))return t.abrupt("return",!1);t.next=31;break;case 31:if(c)return t.next=34,Promise.resolve().then(function(){return c.call(L,o,i)});t.next=37;break;case 34:if(t.t0=t.sent,!1===t.t0)return t.abrupt("return",!1);t.next=37;break;case 37:return this.stopPreloader(),this.step=o,u=this.step,h=u.element,d=u.position,p=u.buttons,f=this.getStepElement(h),this.scrollParentToChildElement(f),this.scrollTo(f),g=this.showHighlightLayer(),y=this.showInteractionLayer(),v=this.showControlLayer(),this.setHighlightLayerPosition(g,f),this.setInteractionLayerPosition(y,f),this.setControlLayerPosition(v,f),m=this.showTooltipLayer(),this.showTooltipTail(),this.showProgressbar(),this.showTitle(this.step.title),this.showDescription(this.step.description),this.showClose(),this.showCustomButtonsLayer(p),b=this.showNavigation(),this.showNavigationPrev(),this.showPagination(),this.showNavigationNext(),Array.from(b.children).every(function(t){return t.classList.contains(L.constructor.getHiddenClass())})?b.classList.add(this.constructor.getHiddenClass()):b.classList.remove(this.constructor.getHiddenClass()),this.showCopyright(),this.setTooltipLayerPosition(m,f,{position:d,boundary:document.documentElement}),this.highlightElement(f),this.observeResizeStepElement(f),setTimeout(function(){L.scrollTo(m,"smooth")},300),this.emit("onAfterChange",o,i),l&&l.call(this,o,i),t.abrupt("return",!0);case 70:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"previous",value:(n=(0,s.default)(C.default.mark(function t(){var e,n,r,i=this;return C.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.step){t.next=2;break}return t.abrupt("return",!1);case 2:if(e=this.step.onPrevious,n=this.steps.indexOf(this.step)-1,r=this.steps[n]){t.next=7;break}return t.abrupt("return",!1);case 7:return t.next=9,this.emit("onPrevious",r,this.step);case 9:if(t.sent.some(function(t){return!1===t}))return t.abrupt("return",!1);t.next=12;break;case 12:if(e)return t.next=15,Promise.resolve().then(function(){return e.call(i,r,i.step)});t.next=18;break;case 15:if(t.t0=t.sent,!1===t.t0)return t.abrupt("return",!1);t.next=18;break;case 18:return t.abrupt("return",this.go(n,!0));case 19:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"next",value:(e=(0,s.default)(C.default.mark(function t(){var e,n,r,i=this;return C.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.step){t.next=2;break}return t.abrupt("return",!1);case 2:if(e=this.step.onNext,n=this.steps.indexOf(this.step)+1,r=this.steps[n]){t.next=7;break}return t.abrupt("return",!1);case 7:return t.next=9,this.emit("onNext",r,this.step);case 9:if(t.sent.some(function(t){return!1===t}))return t.abrupt("return",!1);t.next=12;break;case 12:if(e)return t.next=15,Promise.resolve().then(function(){return e.call(i,r,i.step)});t.next=18;break;case 15:if(t.t0=t.sent,!1===t.t0)return t.abrupt("return",!1);t.next=18;break;case 18:return t.abrupt("return",this.go(n,!0));case 19:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"stop",value:(t=(0,s.default)(C.default.mark(function t(){return C.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.steps.indexOf(this.step)===this.steps.length-1)return t.next=4,this.emit("onComplete");t.next=4;break;case 4:return t.next=6,this.emit("onStop");case 6:return this.step=null,document.body.classList.remove(this.constructor.getBodyClass()),this.removeOnKeydownListener(),this.removeOnWindowResizeListener(),this.unobserveResizeAllStepsElements(),this.removePreloaderElement(),this.removeOverlayLayer(),this.removeControlLayer(),this.removeHighlightLayer(),this.removeInteractionLayer(),this.resetElementsHighlighting(),this.cache.clear(),t.abrupt("return",this);case 19:case"end":return t.stop()}},t,this)})),function(){return t.apply(this,arguments)})},{key:"getSteps",value:function(t){return t&&t.length?"string"==typeof t?this.getDataSteps(t):this.getJsSteps(t):[]}},{key:"getDataSteps",value:function(u){var h=this,d="data-guidechimp",t=Array.from(document.querySelectorAll("[".concat(d,"-tour*='").concat(u,"']")));t=t.filter(function(t){return t.getAttribute("".concat(d,"-tour")).split(",").includes(h.tour)});var p=new RegExp("^".concat(d,"-").concat(u,"-[^-]+$")),f=new RegExp("^".concat(d,"-[^-]+$"));return t.map(function(t,e){for(var n={},r=0;r<t.attributes.length;r++){var i=t.attributes[r],o=i.name,s=i.value,a=p.test(o),c=!a&&f.test(o);if(a||c){var l=a?o.replace("".concat(d,"-").concat(u,"-"),""):o.replace("".concat(d,"-"),"");"tour"!==l&&(a||c&&!n[l])&&(n[l]=s)}}return x(x({step:e,title:"",description:"",position:h.options.position,interaction:h.options.interaction},n),{},{element:t})})}},{key:"getJsSteps",value:function(t){return t.map(function(t,e){return x(x({},t),{},{step:t.step||e})})}},{key:"sortSteps",value:function(t){return(0,a.default)(t).sort(function(t,e){return t.step<e.step?-1:t.step>e.step?1:0})}},{key:"getStepElement",value:function(t){var e=t instanceof HTMLElement?t:document.querySelector(t);return e&&"none"!==e.style.display&&"hidden"!==e.style.visibility||(e=this.showDefaultElement()),e}},{key:"getScrollableParentElement",value:function(t,e){var i=1<arguments.length&&void 0!==e?e:["x","y"],o=/(auto|scroll)/,s=getComputedStyle(t);return"fixed"===s.getPropertyValue("position")?document.body:function t(e){if(!e||e===document.body)return document.body;var n=getComputedStyle(e);if("fixed"===s.getPropertyValue("position")&&"static"===n.getPropertyValue("position"))return t(e.parentElement);var r="";return(Array.isArray(i)?i:[i]).forEach(function(t){r+=n.getPropertyValue("overflow-".concat(t))}),o.test(r)?e:t(e.parentElement)}(t.parentElement)}},{key:"scrollParentToChildElement",value:function(t){var e=this.getScrollableParentElement(t,"x"),n=this.getScrollableParentElement(t,"y"),r=this.options.scrollPadding;return n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop-r),e!==document.body&&(e.scrollLeft=t.offsetLeft-e.offsetLeft-r),this}},{key:"scrollTo",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:"auto",r=t.getBoundingClientRect(),i=r.top,o=r.bottom,s=r.left,a=r.right,c=window,l=c.innerWidth,u=c.innerHeight,h=this.options.scrollPadding;return 0<=i&&0<=s&&o<=u&&a<=l||window.scrollBy({behavior:n,top:i-h,left:s-h}),this}},{key:"highlightElement",value:function(t){for(var e=t.parentElement;e&&e!==document.body;){t instanceof SVGElement&&"svg"===e.tagName.toLowerCase()&&(this.constructor.addElementClass(e,"".concat(this.constructor.getHighlightElementClass())),this.constructor.addElementClass(e,this.constructor.getRelativePositionClass()));var n=getComputedStyle(e),r=n.getPropertyValue("z-index"),i=n.getPropertyValue("opacity"),o=n.getPropertyValue("transform");(/[0-9]+/.test(r)||i<1||o&&"none"!==o)&&this.constructor.addElementClass(e,this.constructor.getFixStackingContext()),e=e.parentElement}this.constructor.addElementClass(t,this.constructor.getHighlightElementClass());var s=getComputedStyle(t);["absolute","relative","fixed"].includes(s.getPropertyValue("position"))||this.constructor.addElementClass(t,this.constructor.getRelativePositionClass());var a=this.cache.get("highlightEls")||new Set;return a.add(t),this.cache.set("highlightEls",a),this}},{key:"resetElementHighlighting",value:function(t){if(t){var e=this.cache.get("highlightEls");e&&e.delete(t),t.classList.remove(this.constructor.getHighlightElementClass()),t.classList.remove(this.constructor.getRelativePositionClass());for(var n=t.parentElement;n&&n!==document.body;)n.classList.remove(this.constructor.getFixStackingContext()),n=n.parentElement}return this}},{key:"resetElementsHighlighting",value:function(){var e=this,t=this.cache.get("highlightEls");t&&Array.from(t).length&&t.forEach(function(t){e.resetElementHighlighting(t)});return this}},{key:"setLayerPosition",value:function(t,e){if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=this.constructor.getElementOffset(e),i=r.width,o=r.height,s=r.top,a=r.left;return this.constructor.isElementFixed(e)?this.constructor.addElementClass(t,this.constructor.getFixedClass()):this.constructor.removeElementClass(t,this.constructor.getFixedClass()),t.style.cssText="width: ".concat(i+n,"px;\n height: ").concat(o+n,"px;\n top: ").concat(s-n/2,"px;\n left: ").concat(a-n/2,"px;"),this}},{key:"setHighlightLayerPosition",value:function(){return this.setLayerPosition.apply(this,arguments)}},{key:"setInteractionLayerPosition",value:function(){return this.setLayerPosition.apply(this,arguments)}},{key:"setControlLayerPosition",value:function(t,e){if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=window.pageXOffset,i=document.documentElement.getBoundingClientRect().width,o=this.constructor.getElementOffset(e),s=o.height,a=o.top,c=o.left,l=o.right,u=s+n,h=a-n/2,d=r<r+(c-n/2)?r:c-n/2,p=r+(l+n/2)<r+i?i:l+n/2;return this.constructor.isElementFixed(e)?this.constructor.addElementClass(t,this.constructor.getFixedClass()):this.constructor.removeElementClass(t,this.constructor.getFixedClass()),t.style.cssText="width: ".concat(p,"px;\n height: ").concat(u,"px;\n top: ").concat(h,"px;\n left: ").concat(d,"px;"),this}},{key:"setTooltipLayerPosition",value:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{},i=r.position,o=r.boundary;i=i||this.options.position;var s=null;o=o||window;var a=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(a=0);var c=t.style;c.top=null,c.right=null,c.bottom=null,c.left=null,c.transform=null;var l=e.getBoundingClientRect(),u=l.top,h=l.bottom,d=l.left,p=l.right,f=l.width,g=l.height,y=t.getBoundingClientRect(),v=y.height,m=y.width,b=t.cloneNode();b.style.visibility="hidden",b.innerHTML="",t.parentElement.appendChild(b);var L=b.getBoundingClientRect().width;b.parentElement.removeChild(b);var w={};if(o===window)w=new DOMRect(0,0,window.innerWidth,window.innerHeight);else{var C=o.getBoundingClientRect(),x=C.x,E=C.y;w=new DOMRect(x,E,o.scrollWidth,o.scrollHeight)}var k=w.top,P=w.bottom,O=w.left,S=w.right;if(e.classList.contains(this.constructor.getDefaultElementClass()))i="floating";else{var T=["bottom","right","left","top"];t.setAttribute("data-guidechimp-position","top");var N=getComputedStyle(t),R=N.marginTop,A=N.marginBottom;u-k<v+(R=parseInt(R,10))+(A=parseInt(A,10))&&T.splice(T.indexOf("top"),1),t.setAttribute("data-guidechimp-position","bottom");var H=getComputedStyle(t),j=H.marginTop,I=H.marginBottom;P-h<v+(j=parseInt(j,10))+(I=parseInt(I,10))&&T.splice(T.indexOf("bottom"),1),t.setAttribute("data-guidechimp-position","left");var _=getComputedStyle(t),z=_.marginLeft,D=_.marginRight;d-O<L+(z=parseInt(z,10))+(D=parseInt(D,10))&&T.splice(T.indexOf("left"),1),t.setAttribute("data-guidechimp-position","right");var B=getComputedStyle(t),F=B.marginLeft,M=B.marginRight;if(S-p<L+(F=parseInt(F,10))+(M=parseInt(M,10))&&T.splice(T.indexOf("right"),1),"top"===(i=T.length?T.includes(i)?i:T[0]:"floating")||"bottom"===i){var W=["left","right","middle"];S-d<L&&W.splice(W.indexOf("left"),1),p-O<L&&W.splice(W.indexOf("right"),1),(d+f/2-O<L/2||S-(p-f/2)<L/2)&&W.splice(W.indexOf("middle"),1),s=W.length?W[0]:"middle"}}var K=document.documentElement;switch(t.removeAttribute("data-guidechimp-position"),t.setAttribute("data-guidechimp-position",i),i){case"top":c.bottom="".concat(g+a,"px");break;case"right":c.left="".concat(p+a/2-K.clientLeft,"px");break;case"left":c.right="".concat(K.clientWidth-(d-a/2),"px");break;case"bottom":c.top="".concat(g+a,"px");break;default:c.left="50%",c.top="50%",c.transform="translate(-50%,-50%)"}if(t.removeAttribute("data-guidechimp-alignment"),s)switch(t.setAttribute("data-guidechimp-alignment",s),s){case"left":c.left="".concat(d-a/2,"px");break;case"right":c.right="".concat(K.clientWidth-p-a/2,"px");break;default:d+f/2<m/2||d+f/2+m/2>K.clientWidth?c.left="".concat(K.clientWidth/2-m/2,"px"):c.left="".concat(d+f/2-m/2,"px")}return this}},{key:"startPreloader",value:function(){var t=this.cache.has("highlightLayer")?this.cache.get("highlightLayer"):document.body.querySelector(".".concat(this.constructor.getHighlightLayerClass()));t&&(t.style.visibility="hidden");var e=this.cache.has("controlLayer")?this.cache.get("controlLayer"):document.body.querySelector(".".concat(this.constructor.getControlLayerClass()));e&&(e.style.visibility="hidden");var n=this.cache.has("interactionLayer")?this.cache.get("interactionLayer"):document.body.querySelector(".".concat(this.constructor.getInteractionLayerClass()));n&&(n.style.visibility="hidden");var r=this.cache.has("tooltipLayer")?this.cache.get("tooltipLayer"):document.body.querySelector(".".concat(this.constructor.getTooltipLayerClass()));return r&&(r.style.visibility="hidden"),this.showPreloaderElement(),this}},{key:"stopPreloader",value:function(){var t=this.cache.has("highlightLayer")?this.cache.get("highlightLayer"):document.body.querySelector(".".concat(this.constructor.getHighlightLayerClass()));t&&(t.style.visibility="visible");var e=this.cache.has("controlLayer")?this.cache.get("controlLayer"):document.body.querySelector(".".concat(this.constructor.getControlLayerClass()));e&&(e.style.visibility="visible");var n=this.cache.has("interactionLayer")?this.cache.get("interactionLayer"):document.body.querySelector(".".concat(this.constructor.getInteractionLayerClass()));n&&(n.style.visibility="visible");var r=this.cache.has("tooltipLayer")?this.cache.get("tooltipLayer"):document.body.querySelector(".".concat(this.constructor.getTooltipLayerClass()));return r&&(r.style.visibility="visible"),this.removePreloaderElement(),this}},{key:"showDefaultElement",value:function(){var t=this.cache.get("defaultEl");return t||(t=document.createElement("div"),document.body.appendChild(t)),t.className=this.constructor.getDefaultElementClass(),this.cache.set("defaultEl",t),t}},{key:"showPreloaderElement",value:function(){var t=this.cache.get("preloaderEl");return t||((t=document.createElement("div")).className=this.constructor.getPreloaderClass(),document.body.appendChild(t)),this.cache.set("preloaderEl",t),t}},{key:"removePreloaderElement",value:function(){var t=this.cache.get("preloaderEl");return t&&t.parentElement.removeChild(t),this.cache.delete("preloaderEl"),this}},{key:"showOverlayLayer",value:function(){var t=this,e=this.cache.get("overlayLayer");return e||((e=document.createElement("div")).className=this.constructor.getOverlayLayerClass(),e.addEventListener("click",function(){t.options.exitOverlay&&t.stop()}),document.body.appendChild(e)),this.cache.set("overlayLayer",e),e}},{key:"removeOverlayLayer",value:function(){var t=this.cache.get("overlayLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("overlayLayer"),this}},{key:"showHighlightLayer",value:function(){var t=this.cache.get("highlightLayer");return t||((t=document.createElement("div")).className=this.constructor.getHighlightLayerClass(),document.body.appendChild(t)),this.cache.set("highlightLayer",t),t}},{key:"removeHighlightLayer",value:function(){var t=this.cache.get("highlightLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("highlightLayer"),this}},{key:"showControlLayer",value:function(){var t=this.cache.get("controlLayer");return t||((t=document.createElement("div")).className=this.constructor.getControlLayerClass(),document.body.appendChild(t)),this.cache.set("controlLayer",t),t}},{key:"removeControlLayer",value:function(){var t=this.cache.get("controlLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("controlLayer"),this}},{key:"showInteractionLayer",value:function(){var t=this.cache.get("interactionLayer");t||(t=document.createElement("div"),document.body.appendChild(t)),t.className=this.constructor.getInteractionLayerClass();var e=this.options.interaction;return this.step&&"boolean"==typeof this.step.interaction&&(e=this.step.interaction),e||t.classList.add(this.constructor.getDisableInteractionClass()),this.cache.set("interactionLayer",t),t}},{key:"removeInteractionLayer",value:function(){var t=this.cache.get("interactionLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("interactionLayer"),this}},{key:"showTooltipLayer",value:function(){var t=this.showControlLayer(),e=this.cache.get("tooltipLayer");return e||((e=document.createElement("div")).setAttribute("role","dialog"),t.appendChild(e)),e.className=this.constructor.getTooltipLayerClass(),this.cache.set("tooltipLayer",e),e}},{key:"showTooltipTail",value:function(){var t=this.showTooltipLayer(),e=this.cache.get("tooltipTailEl");return e||(e=document.createElement("div"),t.appendChild(e)),e.className=this.constructor.getTooltipTailClass(),this.cache.set("tooltipTailEl",e),e}},{key:"showClose",value:function(){var t=this,e=this.showTooltipLayer(),n=this.cache.get("closeEl");return n||((n=document.createElement("div")).addEventListener("click",function(){return t.stop()}),e.appendChild(n)),n.className=this.constructor.getCloseClass(),this.cache.set("closeEl",n),n}},{key:"showProgressbar",value:function(){var t=this.showTooltipLayer(),e=this.cache.get("progressbarEl");e||((e=document.createElement("div")).setAttribute("role","progress"),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuemax",100),t.appendChild(e));var n=this.steps.indexOf(this.step);if(0<=n&&this.steps.length){var r=(n+1)/this.steps.length*100;e.setAttribute("aria-valuenow",r),e.style.cssText="width: ".concat(r,"%;")}return e.className=this.constructor.getProgressbarClass(),this.options.showProgressbar||e.classList.add(this.constructor.getHiddenClass()),this.cache.set("progressbarEl",e),e}},{key:"showTitle",value:function(t){var e=this.cache.get("titleEl");return e||(e=document.createElement("div"),this.showTooltipLayer().appendChild(e)),e.className=this.constructor.getTitleClass(),t||e.classList.add(this.constructor.getHiddenClass()),e.innerHTML=t||"",this.cache.set("titleEl",e),e}},{key:"showDescription",value:function(t){var e=this.cache.get("descriptionEl");return e||(e=document.createElement("div"),this.showTooltipLayer().appendChild(e)),e.className=this.constructor.getDescriptionClass(),t||e.classList.add(this.constructor.getHiddenClass()),e.innerHTML=t||"",this.cache.set("descriptionEl",e),e}},{key:"showCustomButtonsLayer",value:function(t){var c=this,e=0<arguments.length&&void 0!==t?t:[],l=this.cache.get("customButtonsLayer");for(l||(l=document.createElement("div"),this.showTooltipLayer().appendChild(l)),l.className=this.constructor.getCustomButtonsLayerClass(),e.length||l.classList.add(this.constructor.getHiddenClass());l.firstChild;)l.removeChild(l.firstChild);return e.forEach(function(t){if(t instanceof HTMLElement)l.appendChild(t);else{var e=t.tagName,n=void 0===e?"button":e,r=t.title,i=void 0===r?"":r,o=t.class,s=t.onClick,a=document.createElement(n);a.innerHTML=i,o&&(a.className=o),s&&a.addEventListener("click",function(t){return s.call(c,t)}),l.appendChild(a)}}),this.cache.set("customButtonsLayer",l),l}},{key:"showNavigation",value:function(){var t=this.cache.get("navigationLayer");return t||(t=document.createElement("div"),this.showTooltipLayer().appendChild(t)),t.className=this.constructor.getNavigationClass(),this.cache.set("navigationLayer",t),t}},{key:"showPagination",value:function(){var r=this,i=this.cache.get("paginationLayer");for(i||(i=document.createElement("div"),this.showNavigation().appendChild(i)),i.className=this.constructor.getPaginationLayerClass(),(!this.options.showPagination||this.steps.length<2)&&i.classList.add(this.constructor.getHiddenClass());i.firstChild;)i.removeChild(i.firstChild);return this.steps.forEach(function(t,e){var n=document.createElement("div");n.className=r.constructor.getPaginationItemClass(),r.step===t&&n.classList.add(r.constructor.getPaginationCurrentItemClass()),n.addEventListener("click",function(){return r.go(e,!0)}),i.appendChild(n)}),this.cache.set("paginationLayer",i),i}},{key:"showNavigationPrev",value:function(){var t=this,e=this.cache.get("navigationPrevEl");return e||(e=document.createElement("div"),this.showNavigation().appendChild(e),e.addEventListener("click",function(){t.previous()})),e.className=this.constructor.getNavigationPrevClass(),this.steps.indexOf(this.step)<=0&&e.classList.add(this.constructor.getHiddenClass()),this.cache.set("navigationPrevEl",e),e}},{key:"showNavigationNext",value:function(){var t=this,e=this.cache.get("navigationNextEl");e||(e=document.createElement("div"),this.showNavigation().appendChild(e),e.addEventListener("click",function(){t.next()}));var n=this.steps.indexOf(this.step);return e.className=this.constructor.getNavigationNextClass(),(n<0||n===this.steps.length-1||1===this.steps.length)&&e.classList.add(this.constructor.getHiddenClass()),this.cache.set("navigationNextEl",e),e}},{key:"showCopyright",value:function(){var t=this.cache.get("copyrightEl");return t||(t=document.createElement("div"),this.showTooltipLayer().appendChild(t)),t.className=this.constructor.getCopyrightClass(),t.innerHTML="Made with GuideChimp",this.cache.set("copyrightEl",t),t}},{key:"on",value:function(t,e){var n=this;t.split(",").map(function(t){return t.trim()}).forEach(function(t){n.listeners[t]=n.listeners[t]||[],n.listeners[t].push(e)})}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=this.listeners[t];return o?Promise.all(o.map(function(t){return Promise.resolve().then(function(){return t.apply(e,r)})})):[]}},{key:"addOnKeydownListener",value:function(){return this.cache.set("onKeydownListener",this.getOnKeydownListener()),window.addEventListener("keydown",this.cache.get("onKeydownListener"),!0),this}},{key:"getOnKeydownListener",value:function(){var s=this;return function(t){var e=t.keyCode,n=x(x({},s.constructor.getDefaultKeyboardCodes()),s.options.useKeyboard),r=n.previous,i=n.next,o=n.stop;o&&o.includes(e)?s.stop():r&&r.includes(e)?s.previous():i&&i.includes(e)&&s.next()}}},{key:"removeOnKeydownListener",value:function(){return this.cache.has("onKeydownListener")&&(window.removeEventListener("keydown",this.cache.get("onKeydownListener"),!0),this.cache.delete("onKeydownListener")),this}},{key:"addOnWindowResizeListener",value:function(){return this.cache.set("onWindowResizeListener",this.getOnWindowResizeListener()),window.addEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this}},{key:"getOnWindowResizeListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowResizeListener",value:function(){return this.cache.has("onWindowResizeListener")&&(window.removeEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this.cache.delete("onWindowResizeListener")),this}},{key:"observeResizeStepElement",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:{box:"border-box"},r=this.observers.stepElementResizeObserver;return r&&r.observe(t,n),this}},{key:"unobserveResizeStepElement",value:function(t){var e=this.observers.stepElementResizeObserver;return e&&e.unobserve(t),this}},{key:"unobserveResizeAllStepsElements",value:function(){var t=this.observers.stepElementResizeObserver;return t&&t.disconnect(),this}},{key:"refresh",value:function(){if(!this.step)return this;var t=this.step,e=t.element,n=t.position,r=this.getStepElement(e);return this.cache.has("highlightLayer")&&this.setHighlightLayerPosition(this.cache.get("highlightLayer"),r),this.cache.has("controlLayer")&&this.setControlLayerPosition(this.cache.get("controlLayer"),r),this.cache.has("interactionLayer")&&this.setInteractionLayerPosition(this.cache.get("interactionLayer"),r),this.cache.has("tooltipLayer")&&this.setTooltipLayerPosition(this.cache.get("tooltipLayer"),r,{position:n,boundary:window}),this}}],[{key:"getDefaultOptions",value:function(){return{position:"bottom",useKeyboard:!0,exitEscape:!0,exitOverlay:!0,showPagination:!0,showProgressbar:!0,interaction:!0,padding:10,scrollPadding:10}}},{key:"getDefaultKeyboardCodes",value:function(){return{previous:[37],next:[39,13,32],stop:[27]}}},{key:"getBodyClass",value:function(){return"gc"}},{key:"getDefaultElementClass",value:function(){return"gc-default"}},{key:"getFixStackingContext",value:function(){return"gc-fix-stacking-context"}},{key:"getHighlightElementClass",value:function(){return"gc-highlighted"}},{key:"getPreloaderClass",value:function(){return"gc-preloader"}},{key:"getOverlayLayerClass",value:function(){return"gc-overlay"}},{key:"getFixedClass",value:function(){return"gc-fixed"}},{key:"getHighlightLayerClass",value:function(){return"gc-highlight"}},{key:"getControlLayerClass",value:function(){return"gc-control"}},{key:"getInteractionLayerClass",value:function(){return"gc-interaction"}},{key:"getTooltipLayerClass",value:function(){return"gc-tooltip"}},{key:"getTooltipTailClass",value:function(){return"gc-tooltip-tail"}},{key:"getTitleClass",value:function(){return"gc-title"}},{key:"getDescriptionClass",value:function(){return"gc-description"}},{key:"getCustomButtonsLayerClass",value:function(){return"gc-custom-buttons"}},{key:"getNavigationClass",value:function(){return"gc-navigation"}},{key:"getNavigationPrevClass",value:function(){return"gc-navigation-prev"}},{key:"getNavigationNextClass",value:function(){return"gc-navigation-next"}},{key:"getCloseClass",value:function(){return"gc-close"}},{key:"getPaginationLayerClass",value:function(){return"gc-pagination"}},{key:"getPaginationItemClass",value:function(){return"gc-pagination-item"}},{key:"getPaginationCurrentItemClass",value:function(){return"gc-pagination-active"}},{key:"getProgressbarClass",value:function(){return"gc-progressbar"}},{key:"getDisableInteractionClass",value:function(){return"gc-disable"}},{key:"getCopyrightClass",value:function(){return"gc-copyright"}},{key:"getHiddenClass",value:function(){return"gc-hidden"}},{key:"getRelativePositionClass",value:function(){return"gc-relative"}},{key:"getElementOffset",value:function(t){var e=document,n=e.body,r=e.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,o=window.pageXOffset||r.scrollLeft||n.scrollLeft,s=t.getBoundingClientRect(),a=s.top,c=s.right,l=s.bottom,u=s.left;return{right:c,bottom:l,width:s.width,height:s.height,x:s.x,y:s.y,top:a+i,left:u+o}}},{key:"isElementFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isElementFixed(e))}},{key:"addElementClass",value:function(t,e){t instanceof SVGElement?t.setAttribute("class","".concat(t.getAttribute("class")||""," ").concat(e)):t.classList.add(e)}},{key:"removeElementClass",value:function(t,e){if(t instanceof SVGElement){var n=t.getAttribute("class")||"";return n.replace(e,""),void t.setAttribute("class",n)}t.classList.remove(e)}}]),r}();e.default=h},function(t,e,n){t.exports=n(8)},function(t,e,n){var r=function(s){"use strict";var c,t=Object.prototype,u=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},i=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",r=e.toStringTag||"@@toStringTag";function a(t,e,n,r){var o,s,a,c,i=e&&e.prototype instanceof v?e:v,l=Object.create(i.prototype),u=new O(r||[]);return l._invoke=(o=t,s=n,a=u,c=d,function(t,e){if(c===f)throw new Error("Generator is already running");if(c===g){if("throw"===t)throw e;return T()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){var r=E(n,a);if(r){if(r===y)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===d)throw c=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=f;var i=h(o,s,a);if("normal"===i.type){if(c=a.done?g:p,i.arg===y)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(c=g,a.method="throw",a.arg=i.arg)}}),l}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}s.wrap=a;var d="suspendedStart",p="suspendedYield",f="executing",g="completed",y={};function v(){}function o(){}function l(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,L=b&&b(b(S([])));L&&L!==t&&u.call(L,i)&&(m=L);var w=l.prototype=v.prototype=Object.create(m);function C(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function x(c,l){var e;this._invoke=function(n,r){function t(){return new l(function(t,e){!function e(t,n,r,i){var o=h(c[t],c,n);if("throw"!==o.type){var s=o.arg,a=s.value;return a&&"object"==typeof a&&u.call(a,"__await")?l.resolve(a.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):l.resolve(a).then(function(t){s.value=t,r(s)},function(t){return e("throw",t,r,i)})}i(o.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function E(t,e){var n=t.iterator[e.method];if(n===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,E(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var r=h(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,y;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(u.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:c,done:!0}}return o.prototype=w.constructor=l,l.constructor=o,l[r]=o.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===o||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,r in t||(t[r]="GeneratorFunction")),t.prototype=Object.create(w),t},s.awrap=function(t){return{__await:t}},C(x.prototype),x.prototype[n]=function(){return this},s.AsyncIterator=x,s.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new x(a(t,e,n,r),i);return s.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},C(w),w[r]="Generator",w[i]=function(){return this},w.toString=function(){return"[object Generator]"},s.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},s.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=u.call(i,"catchLoc"),a=u.call(i,"finallyLoc");if(s&&a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&u.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),y}},s}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){function c(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}t.exports=function(a){return function(){var t=this,s=arguments;return new Promise(function(e,n){var r=a.apply(t,s);function i(t){c(r,e,n,i,o,"next",t)}function o(t){c(r,e,n,i,o,"throw",t)}i(void 0)})}}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var r=n(12),i=n(13),o=n(14),s=n(15);t.exports=function(t){return r(t)||i(t)||o(t)||s()}},function(t,e,n){var r=n(1);t.exports=function(t){if(Array.isArray(t))return r(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e,n){var r=n(1);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e,n){}],i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=2);function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var n,r}); | ||
//# sourceMappingURL=guidechimp.min.js.map |
@@ -1,3 +0,3 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.guideChimpPluginBeacons=e():t.guideChimpPluginBeacons=e()}(window,function(){return d=[function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(t){return typeof t}:e.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}e.exports=n},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e,n){"use strict";var r=n(0)(n(9));n(29),t.exports=function(t,e){e.beacons=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new r.default(t,e)}}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(1)),i=r(n(2)),s=r(n(3)),a=r(n(10)),c=r(n(12)),l=r(n(14)),u=r(n(4)),h=r(n(16));function f(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=(0,u.default)(r);if(i){var n=(0,u.default)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,l.default)(this,t)}}var d=function(t){(0,c.default)(n,t);var e=f(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,s.default)(n,[{key:"getDataBeacons",value:function(t){var s=this,e=(0,a.default)((0,u.default)(n.prototype),"getDataBeacons",this).call(this,t);return e.forEach(function(t){var e=t.id,n=t.element,r="",i="".concat(s.constructor.getBeaconDataPrefix(),"-tour"),o="".concat(s.constructor.getBeaconDataPrefix(),"-").concat(e,"-tour");n.attributes[i]&&(r=n.attributes[i].value);n.attributes[o]&&(r=n.attributes[o].value);r&&(t.tour=r)}),e}},{key:"createBeaconEl",value:function(r){var i=this,t=(0,a.default)((0,u.default)(n.prototype),"createBeaconEl",this).call(this,r);return r.tour&&t.addEventListener("click",function(){var t=null;if("string"==typeof r.tour||Array.isArray(r.tour))t=new h.default(r.tour);else if(r.tour instanceof h.default)t=r.tour;else if("object"===(0,o.default)(r.tour)){var e=r.steps,n=r.options;t=new h.default(e,n)}t&&(i.hide(r),t.on("onStop",function(){i.show(r)}),t.start())}),t}}]),n}(r(n(24)).default);e.default=d},function(r,t,e){var o=e(11);function i(t,e,n){return"undefined"!=typeof Reflect&&Reflect.get?r.exports=i=Reflect.get:r.exports=i=function(t,e,n){var r=o(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},i(t,e,n||t)}r.exports=i},function(t,e,n){var r=n(4);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e,n){var r=n(13);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(n,t){function r(t,e){return n.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.exports=r},function(t,e,n){var r=n(1),i=n(15);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var L=r(n(17)),s=r(n(19)),i=r(n(5)),a=r(n(20)),c=r(n(2)),l=r(n(3));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){(0,i.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u=new Map,h=function(){function r(t){var e=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};(0,c.default)(this,r),this.step=null,this.steps=[],this.tour=null,this.options={},this.cache=u,this.listeners={},this.observers={},"undefined"!=typeof ResizeObserver&&(this.observers.stepElementResizeObserver=new ResizeObserver(function(){return e.refresh()})),this.setOptions(n),this.setTour(t),this.init()}var t,e,n,i,o;return(0,l.default)(r,[{key:"init",value:function(){}},{key:"setTour",value:function(t){return this.tour=Array.isArray(t)?(0,a.default)(t):t,this.steps=this.sortSteps(this.getSteps(this.tour)),this}},{key:"getTour",value:function(){return this.tour}},{key:"setOptions",value:function(t){return this.options=C(C({},this.constructor.getDefaultOptions()),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(o=(0,s.default)(L.default.mark(function t(){var e,n,r,i=arguments;return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<i.length&&void 0!==i[0]?i[0]:0,n=!(1<i.length&&void 0!==i[1])||i[1],t.next=4,this.go(e,n);case 4:if(r=t.sent)return document.body.classList.add(this.constructor.getBodyClass()),this.options.useKeyboard&&this.addOnKeydownListener(),this.addOnWindowResizeListener(),t.next=11,this.emit("onStart");t.next=11;break;case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}},t,this)})),function(){return o.apply(this,arguments)})},{key:"go",value:(i=(0,s.default)(L.default.mark(function t(e){var n,r,i,o,s,a,c,l,u,h,f,d,p,g,v,y,m,b,w=this,x=arguments;return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=!(1<x.length&&void 0!==x[1])||x[1],this.steps.length){t.next=3;break}return t.abrupt("return",!1);case 3:if(r=n?parseInt(e,10):e,n?this.steps.indexOf(this.step)===r:this.step&&this.step.step===r)return t.abrupt("return",!1);t.next=7;break;case 7:i=C({},this.step),o=null,s=0;case 10:if(!(s<this.steps.length)){t.next=19;break}if(a=this.steps[s],n?s===r:a.step===r)return o=a,t.abrupt("break",19);t.next=16;break;case 16:s++,t.next=10;break;case 19:if(o){t.next=21;break}return t.abrupt("return",!1);case 21:return this.resetElementsHighlighting(),this.unobserveResizeAllStepsElements(),this.showOverlayLayer(),this.startPreloader(),c=o.onBeforeChange,l=o.onAfterChange,t.next=28,this.emit("onBeforeChange",o,i);case 28:if(t.sent.some(function(t){return!1===t}))return t.abrupt("return",!1);t.next=31;break;case 31:if(c)return t.next=34,Promise.resolve().then(function(){return c.call(w,o,i)});t.next=37;break;case 34:if(t.t0=t.sent,!1===t.t0)return t.abrupt("return",!1);t.next=37;break;case 37:return this.stopPreloader(),this.step=o,u=this.step,h=u.element,f=u.position,d=u.buttons,p=this.getStepElement(h),this.scrollParentToChildElement(p),this.scrollTo(p),g=this.showHighlightLayer(),v=this.showInteractionLayer(),y=this.showControlLayer(),this.setHighlightLayerPosition(g,p),this.setInteractionLayerPosition(v,p),this.setControlLayerPosition(y,p),m=this.showTooltipLayer(),this.showTooltipTail(),this.showProgressbar(),this.showTitle(this.step.title),this.showDescription(this.step.description),this.showClose(),this.showCustomButtonsLayer(d),b=this.showNavigation(),this.showNavigationPrev(),this.showPagination(),this.showNavigationNext(),Array.from(b.children).every(function(t){return t.classList.contains(w.constructor.getHiddenClass())})?b.classList.add(this.constructor.getHiddenClass()):b.classList.remove(this.constructor.getHiddenClass()),this.showCopyright(),this.setTooltipLayerPosition(m,p,{position:f,boundary:document.documentElement}),this.highlightElement(p),this.observeResizeStepElement(p),setTimeout(function(){w.scrollTo(m,"smooth")},300),this.emit("onAfterChange",o,i),l&&l.call(this,o,i),t.abrupt("return",!0);case 70:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"previous",value:(n=(0,s.default)(L.default.mark(function t(){var e,n,r,i=this;return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.step){t.next=2;break}return t.abrupt("return",!1);case 2:if(e=this.step.onPrevious,n=this.steps.indexOf(this.step)-1,r=this.steps[n]){t.next=7;break}return t.abrupt("return",!1);case 7:return t.next=9,this.emit("onPrevious",r,this.step);case 9:if(t.sent.some(function(t){return!1===t}))return t.abrupt("return",!1);t.next=12;break;case 12:if(e)return t.next=15,Promise.resolve().then(function(){return e.call(i,r,i.step)});t.next=18;break;case 15:if(t.t0=t.sent,!1===t.t0)return t.abrupt("return",!1);t.next=18;break;case 18:return t.abrupt("return",this.go(n,!0));case 19:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"next",value:(e=(0,s.default)(L.default.mark(function t(){var e,n,r,i=this;return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.step){t.next=2;break}return t.abrupt("return",!1);case 2:if(e=this.step.onNext,n=this.steps.indexOf(this.step)+1,r=this.steps[n]){t.next=7;break}return t.abrupt("return",!1);case 7:return t.next=9,this.emit("onNext",r,this.step);case 9:if(t.sent.some(function(t){return!1===t}))return t.abrupt("return",!1);t.next=12;break;case 12:if(e)return t.next=15,Promise.resolve().then(function(){return e.call(i,r,i.step)});t.next=18;break;case 15:if(t.t0=t.sent,!1===t.t0)return t.abrupt("return",!1);t.next=18;break;case 18:return t.abrupt("return",this.go(n,!0));case 19:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"stop",value:(t=(0,s.default)(L.default.mark(function t(){return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.steps.indexOf(this.step)===this.steps.length-1)return t.next=4,this.emit("onComplete");t.next=4;break;case 4:return t.next=6,this.emit("onStop");case 6:return this.step=null,document.body.classList.remove(this.constructor.getBodyClass()),this.removeOnKeydownListener(),this.removeOnWindowResizeListener(),this.unobserveResizeAllStepsElements(),this.removePreloaderElement(),this.removeOverlayLayer(),this.removeControlLayer(),this.removeHighlightLayer(),this.removeInteractionLayer(),this.resetElementsHighlighting(),this.cache.clear(),t.abrupt("return",this);case 19:case"end":return t.stop()}},t,this)})),function(){return t.apply(this,arguments)})},{key:"getSteps",value:function(t){return t&&t.length?"string"==typeof t?this.getDataSteps(t):this.getJsSteps(t):[]}},{key:"getDataSteps",value:function(u){var h=this,f="data-guidechimp",t=Array.from(document.querySelectorAll("[".concat(f,"-tour*='").concat(u,"']")));t=t.filter(function(t){return t.getAttribute("".concat(f,"-tour")).split(",").includes(h.tour)});var d=new RegExp("^".concat(f,"-").concat(u,"-[^-]+$")),p=new RegExp("^".concat(f,"-[^-]+$"));return t.map(function(t,e){for(var n={},r=0;r<t.attributes.length;r++){var i=t.attributes[r],o=i.name,s=i.value,a=d.test(o),c=!a&&p.test(o);if(a||c){var l=a?o.replace("".concat(f,"-").concat(u,"-"),""):o.replace("".concat(f,"-"),"");"tour"!==l&&(a||c&&!n[l])&&(n[l]=s)}}return C(C({step:e,title:"",description:"",position:h.options.position,interaction:h.options.interaction},n),{},{element:t})})}},{key:"getJsSteps",value:function(t){return t.map(function(t,e){return C(C({},t),{},{step:t.step||e})})}},{key:"sortSteps",value:function(t){return(0,a.default)(t).sort(function(t,e){return t.step<e.step?-1:t.step>e.step?1:0})}},{key:"getStepElement",value:function(t){var e=t instanceof HTMLElement?t:document.querySelector(t);return e&&"none"!==e.style.display&&"hidden"!==e.style.visibility||(e=this.showDefaultElement()),e}},{key:"getScrollableParentElement",value:function(t,e){var i=1<arguments.length&&void 0!==e?e:["x","y"],o=/(auto|scroll)/,s=getComputedStyle(t);return"fixed"===s.getPropertyValue("position")?document.body:function t(e){if(!e||e===document.body)return document.body;var n=getComputedStyle(e);if("fixed"===s.getPropertyValue("position")&&"static"===n.getPropertyValue("position"))return t(e.parentElement);var r="";return(Array.isArray(i)?i:[i]).forEach(function(t){r+=n.getPropertyValue("overflow-".concat(t))}),o.test(r)?e:t(e.parentElement)}(t.parentElement)}},{key:"scrollParentToChildElement",value:function(t){var e=this.getScrollableParentElement(t,"x"),n=this.getScrollableParentElement(t,"y"),r=this.options.scrollPadding;return n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop-r),e!==document.body&&(e.scrollLeft=t.offsetLeft-e.offsetLeft-r),this}},{key:"scrollTo",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:"auto",r=t.getBoundingClientRect(),i=r.top,o=r.bottom,s=r.left,a=r.right,c=window,l=c.innerWidth,u=c.innerHeight,h=this.options.scrollPadding;return 0<=i&&0<=s&&o<=u&&a<=l||window.scrollBy({behavior:n,top:i-h,left:s-h}),this}},{key:"highlightElement",value:function(t){for(var e=t.parentElement;e&&e!==document.body;){t instanceof SVGElement&&"svg"===e.tagName.toLowerCase()&&(this.constructor.addElementClass(e,"".concat(this.constructor.getHighlightElementClass())),this.constructor.addElementClass(e,this.constructor.getRelativePositionClass()));var n=getComputedStyle(e),r=n.getPropertyValue("z-index"),i=n.getPropertyValue("opacity"),o=n.getPropertyValue("transform");(/[0-9]+/.test(r)||i<1||o&&"none"!==o)&&this.constructor.addElementClass(e,this.constructor.getFixStackingContext()),e=e.parentElement}this.constructor.addElementClass(t,this.constructor.getHighlightElementClass());var s=getComputedStyle(t);["absolute","relative","fixed"].includes(s.getPropertyValue("position"))||this.constructor.addElementClass(t,this.constructor.getRelativePositionClass());var a=this.cache.get("highlightEls")||new Set;return a.add(t),this.cache.set("highlightEls",a),this}},{key:"resetElementHighlighting",value:function(t){if(t){var e=this.cache.get("highlightEls");e&&e.delete(t),t.classList.remove(this.constructor.getHighlightElementClass()),t.classList.remove(this.constructor.getRelativePositionClass());for(var n=t.parentElement;n&&n!==document.body;)n.classList.remove(this.constructor.getFixStackingContext()),n=n.parentElement}return this}},{key:"resetElementsHighlighting",value:function(){var e=this,t=this.cache.get("highlightEls");t&&Array.from(t).length&&t.forEach(function(t){e.resetElementHighlighting(t)});return this}},{key:"setLayerPosition",value:function(t,e){if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=this.constructor.getElementOffset(e),i=r.width,o=r.height,s=r.top,a=r.left;return this.constructor.isElementFixed(e)?this.constructor.addElementClass(t,this.constructor.getFixedClass()):this.constructor.removeElementClass(t,this.constructor.getFixedClass()),t.style.cssText="width: ".concat(i+n,"px;\n height: ").concat(o+n,"px;\n top: ").concat(s-n/2,"px;\n left: ").concat(a-n/2,"px;"),this}},{key:"setHighlightLayerPosition",value:function(){return this.setLayerPosition.apply(this,arguments)}},{key:"setInteractionLayerPosition",value:function(){return this.setLayerPosition.apply(this,arguments)}},{key:"setControlLayerPosition",value:function(t,e){if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=window.pageXOffset,i=document.documentElement.getBoundingClientRect().width,o=this.constructor.getElementOffset(e),s=o.height,a=o.top,c=o.left,l=o.right,u=s+n,h=a-n/2,f=r<r+(c-n/2)?r:c-n/2,d=r+(l+n/2)<r+i?i:l+n/2;return this.constructor.isElementFixed(e)?this.constructor.addElementClass(t,this.constructor.getFixedClass()):this.constructor.removeElementClass(t,this.constructor.getFixedClass()),t.style.cssText="width: ".concat(d,"px;\n height: ").concat(u,"px;\n top: ").concat(h,"px;\n left: ").concat(f,"px;"),this}},{key:"setTooltipLayerPosition",value:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{},i=r.position,o=r.boundary;i=i||this.options.position;var s=null;o=o||window;var a=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(a=0);var c=t.style;c.top=null,c.right=null,c.bottom=null,c.left=null,c.transform=null;var l=e.getBoundingClientRect(),u=l.top,h=l.bottom,f=l.left,d=l.right,p=l.width,g=l.height,v=t.getBoundingClientRect(),y=v.height,m=v.width,b=t.cloneNode();b.style.visibility="hidden",b.innerHTML="",t.parentElement.appendChild(b);var w=b.getBoundingClientRect().width;b.parentElement.removeChild(b);var x={};if(o===window)x=new DOMRect(0,0,window.innerWidth,window.innerHeight);else{var L=o.getBoundingClientRect(),C=L.x,E=L.y;x=new DOMRect(C,E,o.scrollWidth,o.scrollHeight)}var k=x.top,O=x.bottom,P=x.left,_=x.right;if(e.classList.contains(this.constructor.getDefaultElementClass()))i="floating";else{var S=["bottom","right","left","top"];t.setAttribute("data-guidechimp-position","top");var R=getComputedStyle(t),A=R.marginTop,j=R.marginBottom;u-k<y+(A=parseInt(A,10))+(j=parseInt(j,10))&&S.splice(S.indexOf("top"),1),t.setAttribute("data-guidechimp-position","bottom");var N=getComputedStyle(t),T=N.marginTop,B=N.marginBottom;O-h<y+(T=parseInt(T,10))+(B=parseInt(B,10))&&S.splice(S.indexOf("bottom"),1),t.setAttribute("data-guidechimp-position","left");var z=getComputedStyle(t),D=z.marginLeft,H=z.marginRight;f-P<w+(D=parseInt(D,10))+(H=parseInt(H,10))&&S.splice(S.indexOf("left"),1),t.setAttribute("data-guidechimp-position","right");var I=getComputedStyle(t),W=I.marginLeft,q=I.marginRight;if(_-d<w+(W=parseInt(W,10))+(q=parseInt(q,10))&&S.splice(S.indexOf("right"),1),"top"===(i=S.length?S.includes(i)?i:S[0]:"floating")||"bottom"===i){var M=["left","right","middle"];_-f<w&&M.splice(M.indexOf("left"),1),d-P<w&&M.splice(M.indexOf("right"),1),(f+p/2-P<w/2||_-(d-p/2)<w/2)&&M.splice(M.indexOf("middle"),1),s=M.length?M[0]:"middle"}}var F=document.documentElement;switch(t.removeAttribute("data-guidechimp-position"),t.setAttribute("data-guidechimp-position",i),i){case"top":c.bottom="".concat(g+a,"px");break;case"right":c.left="".concat(d+a/2-F.clientLeft,"px");break;case"left":c.right="".concat(F.clientWidth-(f-a/2),"px");break;case"bottom":c.top="".concat(g+a,"px");break;default:c.left="50%",c.top="50%",c.transform="translate(-50%,-50%)"}if(t.removeAttribute("data-guidechimp-alignment"),s)switch(t.setAttribute("data-guidechimp-alignment",s),s){case"left":c.left="".concat(f-a/2,"px");break;case"right":c.right="".concat(F.clientWidth-d-a/2,"px");break;default:f+p/2<m/2||f+p/2+m/2>F.clientWidth?c.left="".concat(F.clientWidth/2-m/2,"px"):c.left="".concat(f+p/2-m/2,"px")}return this}},{key:"startPreloader",value:function(){var t=this.cache.has("highlightLayer")?this.cache.get("highlightLayer"):document.body.querySelector(".".concat(this.constructor.getHighlightLayerClass()));t&&(t.style.visibility="hidden");var e=this.cache.has("controlLayer")?this.cache.get("controlLayer"):document.body.querySelector(".".concat(this.constructor.getControlLayerClass()));e&&(e.style.visibility="hidden");var n=this.cache.has("interactionLayer")?this.cache.get("interactionLayer"):document.body.querySelector(".".concat(this.constructor.getInteractionLayerClass()));n&&(n.style.visibility="hidden");var r=this.cache.has("tooltipLayer")?this.cache.get("tooltipLayer"):document.body.querySelector(".".concat(this.constructor.getTooltipLayerClass()));return r&&(r.style.visibility="hidden"),this.showPreloaderElement(),this}},{key:"stopPreloader",value:function(){var t=this.cache.has("highlightLayer")?this.cache.get("highlightLayer"):document.body.querySelector(".".concat(this.constructor.getHighlightLayerClass()));t&&(t.style.visibility="visible");var e=this.cache.has("controlLayer")?this.cache.get("controlLayer"):document.body.querySelector(".".concat(this.constructor.getControlLayerClass()));e&&(e.style.visibility="visible");var n=this.cache.has("interactionLayer")?this.cache.get("interactionLayer"):document.body.querySelector(".".concat(this.constructor.getInteractionLayerClass()));n&&(n.style.visibility="visible");var r=this.cache.has("tooltipLayer")?this.cache.get("tooltipLayer"):document.body.querySelector(".".concat(this.constructor.getTooltipLayerClass()));return r&&(r.style.visibility="visible"),this.removePreloaderElement(),this}},{key:"showDefaultElement",value:function(){var t=this.cache.get("defaultEl");return t||(t=document.createElement("div"),document.body.appendChild(t)),t.className=this.constructor.getDefaultElementClass(),this.cache.set("defaultEl",t),t}},{key:"showPreloaderElement",value:function(){var t=this.cache.get("preloaderEl");return t||((t=document.createElement("div")).className=this.constructor.getPreloaderClass(),document.body.appendChild(t)),this.cache.set("preloaderEl",t),t}},{key:"removePreloaderElement",value:function(){var t=this.cache.get("preloaderEl");return t&&t.parentElement.removeChild(t),this.cache.delete("preloaderEl"),this}},{key:"showOverlayLayer",value:function(){var t=this,e=this.cache.get("overlayLayer");return e||((e=document.createElement("div")).className=this.constructor.getOverlayLayerClass(),e.addEventListener("click",function(){t.options.exitOverlay&&t.stop()}),document.body.appendChild(e)),this.cache.set("overlayLayer",e),e}},{key:"removeOverlayLayer",value:function(){var t=this.cache.get("overlayLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("overlayLayer"),this}},{key:"showHighlightLayer",value:function(){var t=this.cache.get("highlightLayer");return t||((t=document.createElement("div")).className=this.constructor.getHighlightLayerClass(),document.body.appendChild(t)),this.cache.set("highlightLayer",t),t}},{key:"removeHighlightLayer",value:function(){var t=this.cache.get("highlightLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("highlightLayer"),this}},{key:"showControlLayer",value:function(){var t=this.cache.get("controlLayer");return t||((t=document.createElement("div")).className=this.constructor.getControlLayerClass(),document.body.appendChild(t)),this.cache.set("controlLayer",t),t}},{key:"removeControlLayer",value:function(){var t=this.cache.get("controlLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("controlLayer"),this}},{key:"showInteractionLayer",value:function(){var t=this.cache.get("interactionLayer");t||(t=document.createElement("div"),document.body.appendChild(t)),t.className=this.constructor.getInteractionLayerClass();var e=this.options.interaction;return this.step&&"boolean"==typeof this.step.interaction&&(e=this.step.interaction),e||t.classList.add(this.constructor.getDisableInteractionClass()),this.cache.set("interactionLayer",t),t}},{key:"removeInteractionLayer",value:function(){var t=this.cache.get("interactionLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("interactionLayer"),this}},{key:"showTooltipLayer",value:function(){var t=this.showControlLayer(),e=this.cache.get("tooltipLayer");return e||((e=document.createElement("div")).setAttribute("role","dialog"),t.appendChild(e)),e.className=this.constructor.getTooltipLayerClass(),this.cache.set("tooltipLayer",e),e}},{key:"showTooltipTail",value:function(){var t=this.showTooltipLayer(),e=this.cache.get("tooltipTailEl");return e||(e=document.createElement("div"),t.appendChild(e)),e.className=this.constructor.getTooltipTailClass(),this.cache.set("tooltipTailEl",e),e}},{key:"showClose",value:function(){var t=this,e=this.showTooltipLayer(),n=this.cache.get("closeEl");return n||((n=document.createElement("div")).addEventListener("click",function(){return t.stop()}),e.appendChild(n)),n.className=this.constructor.getCloseClass(),this.cache.set("closeEl",n),n}},{key:"showProgressbar",value:function(){var t=this.showTooltipLayer(),e=this.cache.get("progressbarEl");e||((e=document.createElement("div")).setAttribute("role","progress"),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuemax",100),t.appendChild(e));var n=this.steps.indexOf(this.step);if(0<=n&&this.steps.length){var r=(n+1)/this.steps.length*100;e.setAttribute("aria-valuenow",r),e.style.cssText="width: ".concat(r,"%;")}return e.className=this.constructor.getProgressbarClass(),this.options.showProgressbar||e.classList.add(this.constructor.getHiddenClass()),this.cache.set("progressbarEl",e),e}},{key:"showTitle",value:function(t){var e=this.cache.get("titleEl");return e||(e=document.createElement("div"),this.showTooltipLayer().appendChild(e)),e.className=this.constructor.getTitleClass(),t||e.classList.add(this.constructor.getHiddenClass()),e.innerHTML=t||"",this.cache.set("titleEl",e),e}},{key:"showDescription",value:function(t){var e=this.cache.get("descriptionEl");return e||(e=document.createElement("div"),this.showTooltipLayer().appendChild(e)),e.className=this.constructor.getDescriptionClass(),t||e.classList.add(this.constructor.getHiddenClass()),e.innerHTML=t||"",this.cache.set("descriptionEl",e),e}},{key:"showCustomButtonsLayer",value:function(t){var c=this,e=0<arguments.length&&void 0!==t?t:[],l=this.cache.get("customButtonsLayer");for(l||(l=document.createElement("div"),this.showTooltipLayer().appendChild(l)),l.className=this.constructor.getCustomButtonsLayerClass(),e.length||l.classList.add(this.constructor.getHiddenClass());l.firstChild;)l.removeChild(l.firstChild);return e.forEach(function(t){if(t instanceof HTMLElement)l.appendChild(t);else{var e=t.tagName,n=void 0===e?"button":e,r=t.title,i=void 0===r?"":r,o=t.class,s=t.onClick,a=document.createElement(n);a.innerHTML=i,o&&(a.className=o),s&&a.addEventListener("click",function(t){return s.call(c,t)}),l.appendChild(a)}}),this.cache.set("customButtonsLayer",l),l}},{key:"showNavigation",value:function(){var t=this.cache.get("navigationLayer");return t||(t=document.createElement("div"),this.showTooltipLayer().appendChild(t)),t.className=this.constructor.getNavigationClass(),this.cache.set("navigationLayer",t),t}},{key:"showPagination",value:function(){var r=this,i=this.cache.get("paginationLayer");for(i||(i=document.createElement("div"),this.showNavigation().appendChild(i)),i.className=this.constructor.getPaginationLayerClass(),(!this.options.showPagination||this.steps.length<2)&&i.classList.add(this.constructor.getHiddenClass());i.firstChild;)i.removeChild(i.firstChild);return this.steps.forEach(function(t,e){var n=document.createElement("div");n.className=r.constructor.getPaginationItemClass(),r.step===t&&n.classList.add(r.constructor.getPaginationCurrentItemClass()),n.addEventListener("click",function(){return r.go(e,!0)}),i.appendChild(n)}),this.cache.set("paginationLayer",i),i}},{key:"showNavigationPrev",value:function(){var t=this,e=this.cache.get("navigationPrevEl");return e||(e=document.createElement("div"),this.showNavigation().appendChild(e),e.addEventListener("click",function(){t.previous()})),e.className=this.constructor.getNavigationPrevClass(),this.steps.indexOf(this.step)<=0&&e.classList.add(this.constructor.getHiddenClass()),this.cache.set("navigationPrevEl",e),e}},{key:"showNavigationNext",value:function(){var t=this,e=this.cache.get("navigationNextEl");e||(e=document.createElement("div"),this.showNavigation().appendChild(e),e.addEventListener("click",function(){t.next()}));var n=this.steps.indexOf(this.step);return e.className=this.constructor.getNavigationNextClass(),(n<0||n===this.steps.length-1||1===this.steps.length)&&e.classList.add(this.constructor.getHiddenClass()),this.cache.set("navigationNextEl",e),e}},{key:"showCopyright",value:function(){var t=this.cache.get("copyrightEl");return t||(t=document.createElement("div"),this.showTooltipLayer().appendChild(t)),t.className=this.constructor.getCopyrightClass(),t.innerHTML="Made with GuideChimp",this.cache.set("copyrightEl",t),t}},{key:"on",value:function(t,e){var n=this;t.split(",").map(function(t){return t.trim()}).forEach(function(t){n.listeners[t]=n.listeners[t]||[],n.listeners[t].push(e)})}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=this.listeners[t];return o?Promise.all(o.map(function(t){return Promise.resolve().then(function(){return t.apply(e,r)})})):[]}},{key:"addOnKeydownListener",value:function(){return this.cache.set("onKeydownListener",this.getOnKeydownListener()),window.addEventListener("keydown",this.cache.get("onKeydownListener"),!0),this}},{key:"getOnKeydownListener",value:function(){var s=this;return function(t){var e=t.keyCode,n=C(C({},s.constructor.getDefaultKeyboardCodes()),s.options.useKeyboard),r=n.previous,i=n.next,o=n.stop;o&&o.includes(e)?s.stop():r&&r.includes(e)?s.previous():i&&i.includes(e)&&s.next()}}},{key:"removeOnKeydownListener",value:function(){return this.cache.has("onKeydownListener")&&(window.removeEventListener("keydown",this.cache.get("onKeydownListener"),!0),this.cache.delete("onKeydownListener")),this}},{key:"addOnWindowResizeListener",value:function(){return this.cache.set("onWindowResizeListener",this.getOnWindowResizeListener()),window.addEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this}},{key:"getOnWindowResizeListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowResizeListener",value:function(){return this.cache.has("onWindowResizeListener")&&(window.removeEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this.cache.delete("onWindowResizeListener")),this}},{key:"observeResizeStepElement",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:{box:"border-box"},r=this.observers.stepElementResizeObserver;return r&&r.observe(t,n),this}},{key:"unobserveResizeStepElement",value:function(t){var e=this.observers.stepElementResizeObserver;return e&&e.unobserve(t),this}},{key:"unobserveResizeAllStepsElements",value:function(){var t=this.observers.stepElementResizeObserver;return t&&t.disconnect(),this}},{key:"refresh",value:function(){if(!this.step)return this;var t=this.step,e=t.element,n=t.position,r=this.getStepElement(e);return this.cache.has("highlightLayer")&&this.setHighlightLayerPosition(this.cache.get("highlightLayer"),r),this.cache.has("controlLayer")&&this.setControlLayerPosition(this.cache.get("controlLayer"),r),this.cache.has("interactionLayer")&&this.setInteractionLayerPosition(this.cache.get("interactionLayer"),r),this.cache.has("tooltipLayer")&&this.setTooltipLayerPosition(this.cache.get("tooltipLayer"),r,{position:n,boundary:window}),this}}],[{key:"getDefaultOptions",value:function(){return{position:"bottom",useKeyboard:!0,exitEscape:!0,exitOverlay:!0,showPagination:!0,showProgressbar:!0,interaction:!0,padding:10,scrollPadding:10}}},{key:"getDefaultKeyboardCodes",value:function(){return{previous:[37],next:[39,13,32],stop:[27]}}},{key:"getBodyClass",value:function(){return"gc"}},{key:"getDefaultElementClass",value:function(){return"gc-default"}},{key:"getFixStackingContext",value:function(){return"gc-fix-stacking-context"}},{key:"getHighlightElementClass",value:function(){return"gc-highlighted"}},{key:"getPreloaderClass",value:function(){return"gc-preloader"}},{key:"getOverlayLayerClass",value:function(){return"gc-overlay"}},{key:"getFixedClass",value:function(){return"gc-fixed"}},{key:"getHighlightLayerClass",value:function(){return"gc-highlight"}},{key:"getControlLayerClass",value:function(){return"gc-control"}},{key:"getInteractionLayerClass",value:function(){return"gc-interaction"}},{key:"getTooltipLayerClass",value:function(){return"gc-tooltip"}},{key:"getTooltipTailClass",value:function(){return"gc-tooltip-tail"}},{key:"getTitleClass",value:function(){return"gc-title"}},{key:"getDescriptionClass",value:function(){return"gc-description"}},{key:"getCustomButtonsLayerClass",value:function(){return"gc-custom-buttons"}},{key:"getNavigationClass",value:function(){return"gc-navigation"}},{key:"getNavigationPrevClass",value:function(){return"gc-navigation-prev"}},{key:"getNavigationNextClass",value:function(){return"gc-navigation-next"}},{key:"getCloseClass",value:function(){return"gc-close"}},{key:"getPaginationLayerClass",value:function(){return"gc-pagination"}},{key:"getPaginationItemClass",value:function(){return"gc-pagination-item"}},{key:"getPaginationCurrentItemClass",value:function(){return"gc-pagination-active"}},{key:"getProgressbarClass",value:function(){return"gc-progressbar"}},{key:"getDisableInteractionClass",value:function(){return"gc-disable"}},{key:"getCopyrightClass",value:function(){return"gc-copyright"}},{key:"getHiddenClass",value:function(){return"gc-hidden"}},{key:"getRelativePositionClass",value:function(){return"gc-relative"}},{key:"getElementOffset",value:function(t){var e=document,n=e.body,r=e.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,o=window.pageXOffset||r.scrollLeft||n.scrollLeft,s=t.getBoundingClientRect(),a=s.top,c=s.right,l=s.bottom,u=s.left;return{right:c,bottom:l,width:s.width,height:s.height,x:s.x,y:s.y,top:a+i,left:u+o}}},{key:"isElementFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isElementFixed(e))}},{key:"addElementClass",value:function(t,e){t instanceof SVGElement?t.setAttribute("class","".concat(t.getAttribute("class")||""," ").concat(e)):t.classList.add(e)}},{key:"removeElementClass",value:function(t,e){if(t instanceof SVGElement){var n=t.getAttribute("class")||"";return n.replace(e,""),void t.setAttribute("class",n)}t.classList.remove(e)}}]),r}();e.default=h},function(t,e,n){t.exports=n(18)},function(t,e,n){var r=function(s){"use strict";var c,t=Object.prototype,u=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},i=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",r=e.toStringTag||"@@toStringTag";function a(t,e,n,r){var o,s,a,c,i=e&&e.prototype instanceof y?e:y,l=Object.create(i.prototype),u=new P(r||[]);return l._invoke=(o=t,s=n,a=u,c=f,function(t,e){if(c===p)throw new Error("Generator is already running");if(c===g){if("throw"===t)throw e;return S()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){var r=E(n,a);if(r){if(r===v)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===f)throw c=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=p;var i=h(o,s,a);if("normal"===i.type){if(c=a.done?g:d,i.arg===v)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(c=g,a.method="throw",a.arg=i.arg)}}),l}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}s.wrap=a;var f="suspendedStart",d="suspendedYield",p="executing",g="completed",v={};function y(){}function o(){}function l(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(_([])));w&&w!==t&&u.call(w,i)&&(m=w);var x=l.prototype=y.prototype=Object.create(m);function L(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function C(c,l){var e;this._invoke=function(n,r){function t(){return new l(function(t,e){!function e(t,n,r,i){var o=h(c[t],c,n);if("throw"!==o.type){var s=o.arg,a=s.value;return a&&"object"==typeof a&&u.call(a,"__await")?l.resolve(a.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):l.resolve(a).then(function(t){s.value=t,r(s)},function(t){return e("throw",t,r,i)})}i(o.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function E(t,e){var n=t.iterator[e.method];if(n===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,E(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var r=h(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,v;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function _(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(u.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t};return r.next=r}}return{next:S}}function S(){return{value:c,done:!0}}return o.prototype=x.constructor=l,l.constructor=o,l[r]=o.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===o||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,r in t||(t[r]="GeneratorFunction")),t.prototype=Object.create(x),t},s.awrap=function(t){return{__await:t}},L(C.prototype),C.prototype[n]=function(){return this},s.AsyncIterator=C,s.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new C(a(t,e,n,r),i);return s.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},L(x),x[r]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},s.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},s.values=_,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=u.call(i,"catchLoc"),a=u.call(i,"finallyLoc");if(s&&a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&u.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),v}},s}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){function c(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}t.exports=function(a){return function(){var t=this,s=arguments;return new Promise(function(e,n){var r=a.apply(t,s);function i(t){c(r,e,n,i,o,"next",t)}function o(t){c(r,e,n,i,o,"throw",t)}i(void 0)})}}},function(t,e,n){var r=n(21),i=n(22),o=n(7),s=n(23);t.exports=function(t){return r(t)||i(t)||o(t)||s()}},function(t,e,n){var r=n(6);t.exports=function(t){if(Array.isArray(t))return r(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _typeof2=_interopRequireDefault(__webpack_require__(1)),_slicedToArray2=_interopRequireDefault(__webpack_require__(25)),_defineProperty2=_interopRequireDefault(__webpack_require__(5)),_classCallCheck2=_interopRequireDefault(__webpack_require__(2)),_createClass2=_interopRequireDefault(__webpack_require__(3));function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,_defineProperty2.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var cache=new Map,Beacons=function(){function Beacons(t){var e=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};(0,_classCallCheck2.default)(this,Beacons),this.beacons=[],this.options={},this.observers={},"undefined"!=typeof ResizeObserver&&(this.observers.elementResizeObserver=new ResizeObserver(function(){return e.refresh()})),this.cache=cache,this.setOptions(n),this.setBeacons(t),this.init()}return(0,_createClass2.default)(Beacons,[{key:"init",value:function(){}},{key:"setOptions",value:function(t){return this.options=_objectSpread(_objectSpread({},this.constructor.getDefaultOptions()),t),this}},{key:"setBeacons",value:function(t){var i=this;return this.removeAll(),this.beacons=!t||"string"==typeof t||Array.isArray(t)&&t.every(function(t){return"string"==typeof t})?this.getDataBeacons(t):this.getJsBeacons(t),this.beacons.length&&(this.beacons.forEach(function(t){var e=t.element;if(e){var n=i.getElement(e),r=i.createBeaconEl(t);r.classList.add(i.constructor.getHiddenClass()),i.constructor.isElementFixed(n)&&r.classList.add(i.constructor.getFixedClass()),document.body.append(r),i.cache.set(t,r),i.setBeaconPosition(n,r,t),i.observeResizeElement(n)}}),this.addOnWindowResizeListener()),this}},{key:"getBeacons",value:function(){return this.beacons}},{key:"getBeacon",value:function(e,t){var n=e&&"object"===(0,_typeof2.default)(e)?[e]:this.beacons.filter(function(t){return t.id===e});return(0,_slicedToArray2.default)(n,1)[0]||t}},{key:"getDataBeacons",value:function getDataBeacons(ids){var _this3=this,beaconsIds="string"==typeof ids?ids.split(",").map(function(t){return t.trim()}):ids,beaconsSelector=["[".concat(this.constructor.getBeaconDataPrefix(),"]")];beaconsIds&&(beaconsSelector=[],beaconsIds.forEach(function(t){beaconsSelector.push("[".concat(_this3.constructor.getBeaconDataPrefix(),"*='").concat(t,"']"))}));var beaconsEl=Array.from(document.querySelectorAll(beaconsSelector.join(","))),dataGlobalRegExp=new RegExp("^".concat(this.constructor.getBeaconDataPrefix(),"-([^-]+)$")),beacons=[];return beaconsEl.forEach(function(el){var beaconsIdsAttrValue=el.attributes[_this3.constructor.getBeaconDataPrefix()].value;if(beaconsIdsAttrValue){var elBeaconsIds=beaconsIdsAttrValue.split(",");elBeaconsIds.forEach(function(id){if(!beaconsIds||beaconsIds.includes(id)){for(var globalBeaconAttrs={},beaconAttrs={},dataBeaconRegExp=new RegExp("^".concat(_this3.constructor.getBeaconDataPrefix(),"-").concat(id,"-([^-]+)$")),j=0;j<el.attributes.length;j++){var _el$attributes$j=el.attributes[j],attrName=_el$attributes$j.name,attrValue=_el$attributes$j.value,isGlobalAttr=dataGlobalRegExp.test(attrName),isBeaconAttr=dataBeaconRegExp.test(attrName);if(isGlobalAttr){var _attrName$match=attrName.match(dataGlobalRegExp),_attrName$match2=(0,_slicedToArray2.default)(_attrName$match,2),shortAttrName=_attrName$match2[1];globalBeaconAttrs[shortAttrName]=attrValue}else if(isBeaconAttr){var _attrName$match3=attrName.match(dataBeaconRegExp),_attrName$match4=(0,_slicedToArray2.default)(_attrName$match3,2),_shortAttrName=_attrName$match4[1];beaconAttrs[_shortAttrName]=attrValue}}var beacon=_objectSpread(_objectSpread(_objectSpread({id:id,position:_this3.options.position},globalBeaconAttrs),beaconAttrs),{},{element:el}),onClick=beacon.onclick||beacon.onClick;onClick&&(delete beacon.onclick,beacon.onClick=function(e){var onClickCode=eval(onClick);"function"==typeof onClickCode&&onClickCode.call(e,beacon)}),beacons.push(beacon)}})}}),beacons}},{key:"getJsBeacons",value:function(t){return(Array.isArray(t)?t:[t]).map(function(t,e){return _objectSpread(_objectSpread({},t),{},{id:t.id||e})})}},{key:"createBeaconEl",value:function(e){var n=this,t=document.createElement("div"),r=e.class,i=e.onClick;return r&&(t.className=r),i&&(t.onclick=function(t){t.stopPropagation(),i.call(n,t,e)}),t.classList.add(this.constructor.getBeaconClass()),t}},{key:"getElement",value:function(t){return t instanceof HTMLElement?t:document.querySelector(t)}},{key:"setBeaconPosition",value:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{},i=r.position,o=r.boundary;i=i||this.options.position,o="inner"===(o=o||this.options.boundary)?"inner":"outer";var s=this.constructor.getElementOffset(t),a=s.width,c=s.height,l=s.top,u=s.left,h=e.style,f=getComputedStyle(e),d=f.width,p=f.height;switch(d=parseInt(d,10),p=parseInt(p,10),e.removeAttribute("data-beacon-position"),e.removeAttribute("data-beacon-boundary"),e.setAttribute("data-beacon-position",i),e.setAttribute("data-beacon-boundary",o),i){case"top-left":"inner"===o?(h.left="".concat(u,"px"),h.top="".concat(l,"px")):(h.left="".concat(u-d,"px"),h.top="".concat(l-p,"px"));break;case"top":h.left="".concat(u+(a-d)/2,"px"),h.top="".concat("inner"===o?l:l-p,"px");break;case"top-right":"inner"===o?(h.left="".concat(a+u-d,"px"),h.top="".concat(l,"px")):(h.left="".concat(a+u,"px"),h.top="".concat(l-p,"px"));break;case"left":h.left="".concat("inner"===o?u:u-d,"px"),h.top="".concat(l+(c-p)/2,"px");break;default:case"center":e.setAttribute("data-beacon-position","center"),h.left="".concat(u+(a-d)/2,"px"),h.top="".concat(l+(c-p)/2,"px");break;case"right":h.left="".concat("inner"===o?u+a-d:u+a,"px"),h.top="".concat(l+(c-p)/2,"px");break;case"bottom-left":"inner"===o?(h.left="".concat(u,"px"),h.top="".concat(l+c-p,"px")):(h.left="".concat(u-d,"px"),h.top="".concat(l+c,"px"));break;case"bottom":h.left="".concat(u+(a-d)/2,"px"),h.top="".concat("inner"===o?l+c-p:l+c,"px");break;case"bottom-right":"inner"===o?(h.left="".concat(a+u-d,"px"),h.top="".concat(l+c-p,"px")):(h.left="".concat(a+u,"px"),h.top="".concat(l+c,"px"))}return this}},{key:"isCanShowBeacon",value:function(t){var e=t.canShow;return!(void 0!==e&&(!e||"function"==typeof e&&!1===e()))}},{key:"showAll",value:function(t){var e=this,n=0<arguments.length&&void 0!==t&&t;return this.beacons.forEach(function(t){e.show(t,n)}),this}},{key:"show",value:function(t,e){var n=1<arguments.length&&void 0!==e&&e,r=this.getBeacon(t);if(r){var i=this.cache.get(r);i&&(n||this.isCanShowBeacon(r))&&i.classList.remove(this.constructor.getHiddenClass())}return this}},{key:"hideAll",value:function(){var e=this;return this.beacons.forEach(function(t){e.hide(t)}),this}},{key:"hide",value:function(t){var e=this.getBeacon(t);if(e){var n=this.cache.get(e);n&&n.classList.add(this.constructor.getHiddenClass())}return this}},{key:"removeAll",value:function(){var e=this;return this.beacons.forEach(function(t){e.remove(t)}),this.beacons=[],this.unobserveResizeAllElements(),this.removeOnWindowResizeListener(),this}},{key:"remove",value:function(t){var e=this.getBeacon(t),n=this.cache.get(e);if(n){n.parentNode.removeChild(n),-1!==this.beacons.indexOf(e)&&this.beacons.splice(this.beacons.indexOf(e),1),this.cache.delete(e);var r=this.getElement(e.element);r&&this.unobserveResizeElement(r)}return this.beacons.length||this.removeOnWindowResizeListener(),this}},{key:"refresh",value:function(){var i=this;return this.beacons.forEach(function(t){var e=t.element;if(e){var n=i.getElement(e),r=i.cache.get(t);n&&r&&i.setBeaconPosition(n,r,t)}}),this}},{key:"addOnWindowResizeListener",value:function(){return this.cache.set("onWindowResizeListener",this.getOnWindowResizeListener()),window.addEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this}},{key:"getOnWindowResizeListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowResizeListener",value:function(){return this.cache.has("onWindowResizeListener")&&(window.removeEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this.cache.delete("onWindowResizeListener")),this}},{key:"observeResizeElement",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:{box:"border-box"},r=this.observers.elementResizeObserver;return r&&r.observe(t,n),this}},{key:"unobserveResizeElement",value:function(t){var e=this.observers.elementResizeObserver;return e&&e.unobserve(t),this}},{key:"unobserveResizeAllElements",value:function(){var t=this.observers.elementResizeObserver;return t&&t.disconnect(),this}}],[{key:"getDefaultOptions",value:function(){return{position:"center",boundary:"inner"}}},{key:"getBeaconClass",value:function(){return"gc-beacon"}},{key:"getFixedClass",value:function(){return"gc-beacon-fixed"}},{key:"getHiddenClass",value:function(){return"gc-beacon-hidden"}},{key:"getBeaconDataPrefix",value:function(){return"data-beacon"}},{key:"isElementFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isElementFixed(e))}},{key:"getElementOffset",value:function(t){var e=document,n=e.body,r=e.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,o=window.pageXOffset||r.scrollLeft||n.scrollLeft,s=t.getBoundingClientRect(),a=s.top,c=s.right,l=s.bottom,u=s.left;return{right:c,bottom:l,width:s.width,height:s.height,x:s.x,y:s.y,top:a+i,left:u+o}}}]),Beacons}();exports.default=Beacons},function(t,e,n){var r=n(26),i=n(27),o=n(7),s=n(28);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){}],f={},g.m=d,g.c=f,g.d=function(t,e,n){g.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},g.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},g.t=function(e,t){if(1&t&&(e=g(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(g.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)g.d(n,r,function(t){return e[t]}.bind(null,r));return n},g.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return g.d(e,"a",e),e},g.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},g.p="",g(g.s=8);function g(t){if(f[t])return f[t].exports;var e=f[t]={i:t,l:!1,exports:{}};return d[t].call(e.exports,e,e.exports,g),e.l=!0,e.exports}var d,f}); | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.guideChimpPluginBeacons=e():t.guideChimpPluginBeacons=e()}(window,function(){return d=[function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(t){return typeof t}:e.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}e.exports=n},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e,n){"use strict";var r=n(0)(n(9));n(29),t.exports=function(t,e){e.beacons=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new r.default(t,e)}}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=r(n(1)),i=r(n(2)),o=r(n(3)),a=r(n(10)),c=r(n(12)),l=r(n(14)),u=r(n(4)),h=r(n(16));function f(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=(0,u.default)(r);if(i){var n=(0,u.default)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,l.default)(this,t)}}var d=function(t){(0,c.default)(n,t);var e=f(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,o.default)(n,[{key:"getDataBeacons",value:function(t){var s=this,e=(0,a.default)((0,u.default)(n.prototype),"getDataBeacons",this).call(this,t);return e.forEach(function(t){var e=t.id,n=t.element,r="",i="".concat(s.constructor.getBeaconDataPrefix(),"-tour"),o="".concat(s.constructor.getBeaconDataPrefix(),"-").concat(e,"-tour");n.attributes[i]&&(r=n.attributes[i].value);n.attributes[o]&&(r=n.attributes[o].value);r&&(t.tour=r)}),e}},{key:"createBeaconEl",value:function(i){var o=this,t=(0,a.default)((0,u.default)(n.prototype),"createBeaconEl",this).call(this,i);return i.tour&&t.addEventListener("click",function(){var t=null;if("string"==typeof i.tour||Array.isArray(i.tour))t=new h.default(i.tour);else if(i.tour instanceof h.default)t=i.tour;else if("object"===(0,s.default)(i.tour)){var e=i.tour,n=e.steps,r=e.options;t=new h.default(n,r)}t&&(o.hide(i),t.on("onStop",function(){o.show(i)}),t.start())}),t}}]),n}(r(n(24)).default);e.default=d},function(r,t,e){var o=e(11);function i(t,e,n){return"undefined"!=typeof Reflect&&Reflect.get?r.exports=i=Reflect.get:r.exports=i=function(t,e,n){var r=o(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},i(t,e,n||t)}r.exports=i},function(t,e,n){var r=n(4);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e,n){var r=n(13);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(n,t){function r(t,e){return n.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.exports=r},function(t,e,n){var r=n(1),i=n(15);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var L=r(n(17)),s=r(n(19)),i=r(n(5)),a=r(n(20)),c=r(n(2)),l=r(n(3));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){(0,i.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u=new Map,h=function(){function r(t){var e=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};(0,c.default)(this,r),this.step=null,this.steps=[],this.tour=null,this.options={},this.cache=u,this.listeners={},this.observers={},"undefined"!=typeof ResizeObserver&&(this.observers.stepElementResizeObserver=new ResizeObserver(function(){return e.refresh()})),this.setOptions(n),this.setTour(t),this.init()}var t,e,n,i,o;return(0,l.default)(r,[{key:"init",value:function(){}},{key:"setTour",value:function(t){return this.tour=Array.isArray(t)?(0,a.default)(t):t,this.steps=this.sortSteps(this.getSteps(this.tour)),this}},{key:"getTour",value:function(){return this.tour}},{key:"setOptions",value:function(t){return this.options=C(C({},this.constructor.getDefaultOptions()),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(o=(0,s.default)(L.default.mark(function t(){var e,n,r,i=arguments;return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<i.length&&void 0!==i[0]?i[0]:0,n=!(1<i.length&&void 0!==i[1])||i[1],t.next=4,this.go(e,n);case 4:if(r=t.sent)return document.body.classList.add(this.constructor.getBodyClass()),this.options.useKeyboard&&this.addOnKeydownListener(),this.addOnWindowResizeListener(),t.next=11,this.emit("onStart");t.next=11;break;case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}},t,this)})),function(){return o.apply(this,arguments)})},{key:"go",value:(i=(0,s.default)(L.default.mark(function t(e){var n,r,i,o,s,a,c,l,u,h,f,d,p,g,v,y,m,b,w=this,x=arguments;return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=!(1<x.length&&void 0!==x[1])||x[1],this.steps.length){t.next=3;break}return t.abrupt("return",!1);case 3:if(r=n?parseInt(e,10):e,n?this.steps.indexOf(this.step)===r:this.step&&this.step.step===r)return t.abrupt("return",!1);t.next=7;break;case 7:i=C({},this.step),o=null,s=0;case 10:if(!(s<this.steps.length)){t.next=19;break}if(a=this.steps[s],n?s===r:a.step===r)return o=a,t.abrupt("break",19);t.next=16;break;case 16:s++,t.next=10;break;case 19:if(o){t.next=21;break}return t.abrupt("return",!1);case 21:return this.resetElementsHighlighting(),this.unobserveResizeAllStepsElements(),this.showOverlayLayer(),this.startPreloader(),c=o.onBeforeChange,l=o.onAfterChange,t.next=28,this.emit("onBeforeChange",o,i);case 28:if(t.sent.some(function(t){return!1===t}))return t.abrupt("return",!1);t.next=31;break;case 31:if(c)return t.next=34,Promise.resolve().then(function(){return c.call(w,o,i)});t.next=37;break;case 34:if(t.t0=t.sent,!1===t.t0)return t.abrupt("return",!1);t.next=37;break;case 37:return this.stopPreloader(),this.step=o,u=this.step,h=u.element,f=u.position,d=u.buttons,p=this.getStepElement(h),this.scrollParentToChildElement(p),this.scrollTo(p),g=this.showHighlightLayer(),v=this.showInteractionLayer(),y=this.showControlLayer(),this.setHighlightLayerPosition(g,p),this.setInteractionLayerPosition(v,p),this.setControlLayerPosition(y,p),m=this.showTooltipLayer(),this.showTooltipTail(),this.showProgressbar(),this.showTitle(this.step.title),this.showDescription(this.step.description),this.showClose(),this.showCustomButtonsLayer(d),b=this.showNavigation(),this.showNavigationPrev(),this.showPagination(),this.showNavigationNext(),Array.from(b.children).every(function(t){return t.classList.contains(w.constructor.getHiddenClass())})?b.classList.add(this.constructor.getHiddenClass()):b.classList.remove(this.constructor.getHiddenClass()),this.showCopyright(),this.setTooltipLayerPosition(m,p,{position:f,boundary:document.documentElement}),this.highlightElement(p),this.observeResizeStepElement(p),setTimeout(function(){w.scrollTo(m,"smooth")},300),this.emit("onAfterChange",o,i),l&&l.call(this,o,i),t.abrupt("return",!0);case 70:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"previous",value:(n=(0,s.default)(L.default.mark(function t(){var e,n,r,i=this;return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.step){t.next=2;break}return t.abrupt("return",!1);case 2:if(e=this.step.onPrevious,n=this.steps.indexOf(this.step)-1,r=this.steps[n]){t.next=7;break}return t.abrupt("return",!1);case 7:return t.next=9,this.emit("onPrevious",r,this.step);case 9:if(t.sent.some(function(t){return!1===t}))return t.abrupt("return",!1);t.next=12;break;case 12:if(e)return t.next=15,Promise.resolve().then(function(){return e.call(i,r,i.step)});t.next=18;break;case 15:if(t.t0=t.sent,!1===t.t0)return t.abrupt("return",!1);t.next=18;break;case 18:return t.abrupt("return",this.go(n,!0));case 19:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"next",value:(e=(0,s.default)(L.default.mark(function t(){var e,n,r,i=this;return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.step){t.next=2;break}return t.abrupt("return",!1);case 2:if(e=this.step.onNext,n=this.steps.indexOf(this.step)+1,r=this.steps[n]){t.next=7;break}return t.abrupt("return",!1);case 7:return t.next=9,this.emit("onNext",r,this.step);case 9:if(t.sent.some(function(t){return!1===t}))return t.abrupt("return",!1);t.next=12;break;case 12:if(e)return t.next=15,Promise.resolve().then(function(){return e.call(i,r,i.step)});t.next=18;break;case 15:if(t.t0=t.sent,!1===t.t0)return t.abrupt("return",!1);t.next=18;break;case 18:return t.abrupt("return",this.go(n,!0));case 19:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"stop",value:(t=(0,s.default)(L.default.mark(function t(){return L.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.steps.indexOf(this.step)===this.steps.length-1)return t.next=4,this.emit("onComplete");t.next=4;break;case 4:return t.next=6,this.emit("onStop");case 6:return this.step=null,document.body.classList.remove(this.constructor.getBodyClass()),this.removeOnKeydownListener(),this.removeOnWindowResizeListener(),this.unobserveResizeAllStepsElements(),this.removePreloaderElement(),this.removeOverlayLayer(),this.removeControlLayer(),this.removeHighlightLayer(),this.removeInteractionLayer(),this.resetElementsHighlighting(),this.cache.clear(),t.abrupt("return",this);case 19:case"end":return t.stop()}},t,this)})),function(){return t.apply(this,arguments)})},{key:"getSteps",value:function(t){return t&&t.length?"string"==typeof t?this.getDataSteps(t):this.getJsSteps(t):[]}},{key:"getDataSteps",value:function(u){var h=this,f="data-guidechimp",t=Array.from(document.querySelectorAll("[".concat(f,"-tour*='").concat(u,"']")));t=t.filter(function(t){return t.getAttribute("".concat(f,"-tour")).split(",").includes(h.tour)});var d=new RegExp("^".concat(f,"-").concat(u,"-[^-]+$")),p=new RegExp("^".concat(f,"-[^-]+$"));return t.map(function(t,e){for(var n={},r=0;r<t.attributes.length;r++){var i=t.attributes[r],o=i.name,s=i.value,a=d.test(o),c=!a&&p.test(o);if(a||c){var l=a?o.replace("".concat(f,"-").concat(u,"-"),""):o.replace("".concat(f,"-"),"");"tour"!==l&&(a||c&&!n[l])&&(n[l]=s)}}return C(C({step:e,title:"",description:"",position:h.options.position,interaction:h.options.interaction},n),{},{element:t})})}},{key:"getJsSteps",value:function(t){return t.map(function(t,e){return C(C({},t),{},{step:t.step||e})})}},{key:"sortSteps",value:function(t){return(0,a.default)(t).sort(function(t,e){return t.step<e.step?-1:t.step>e.step?1:0})}},{key:"getStepElement",value:function(t){var e=t instanceof HTMLElement?t:document.querySelector(t);return e&&"none"!==e.style.display&&"hidden"!==e.style.visibility||(e=this.showDefaultElement()),e}},{key:"getScrollableParentElement",value:function(t,e){var i=1<arguments.length&&void 0!==e?e:["x","y"],o=/(auto|scroll)/,s=getComputedStyle(t);return"fixed"===s.getPropertyValue("position")?document.body:function t(e){if(!e||e===document.body)return document.body;var n=getComputedStyle(e);if("fixed"===s.getPropertyValue("position")&&"static"===n.getPropertyValue("position"))return t(e.parentElement);var r="";return(Array.isArray(i)?i:[i]).forEach(function(t){r+=n.getPropertyValue("overflow-".concat(t))}),o.test(r)?e:t(e.parentElement)}(t.parentElement)}},{key:"scrollParentToChildElement",value:function(t){var e=this.getScrollableParentElement(t,"x"),n=this.getScrollableParentElement(t,"y"),r=this.options.scrollPadding;return n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop-r),e!==document.body&&(e.scrollLeft=t.offsetLeft-e.offsetLeft-r),this}},{key:"scrollTo",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:"auto",r=t.getBoundingClientRect(),i=r.top,o=r.bottom,s=r.left,a=r.right,c=window,l=c.innerWidth,u=c.innerHeight,h=this.options.scrollPadding;return 0<=i&&0<=s&&o<=u&&a<=l||window.scrollBy({behavior:n,top:i-h,left:s-h}),this}},{key:"highlightElement",value:function(t){for(var e=t.parentElement;e&&e!==document.body;){t instanceof SVGElement&&"svg"===e.tagName.toLowerCase()&&(this.constructor.addElementClass(e,"".concat(this.constructor.getHighlightElementClass())),this.constructor.addElementClass(e,this.constructor.getRelativePositionClass()));var n=getComputedStyle(e),r=n.getPropertyValue("z-index"),i=n.getPropertyValue("opacity"),o=n.getPropertyValue("transform");(/[0-9]+/.test(r)||i<1||o&&"none"!==o)&&this.constructor.addElementClass(e,this.constructor.getFixStackingContext()),e=e.parentElement}this.constructor.addElementClass(t,this.constructor.getHighlightElementClass());var s=getComputedStyle(t);["absolute","relative","fixed"].includes(s.getPropertyValue("position"))||this.constructor.addElementClass(t,this.constructor.getRelativePositionClass());var a=this.cache.get("highlightEls")||new Set;return a.add(t),this.cache.set("highlightEls",a),this}},{key:"resetElementHighlighting",value:function(t){if(t){var e=this.cache.get("highlightEls");e&&e.delete(t),t.classList.remove(this.constructor.getHighlightElementClass()),t.classList.remove(this.constructor.getRelativePositionClass());for(var n=t.parentElement;n&&n!==document.body;)n.classList.remove(this.constructor.getFixStackingContext()),n=n.parentElement}return this}},{key:"resetElementsHighlighting",value:function(){var e=this,t=this.cache.get("highlightEls");t&&Array.from(t).length&&t.forEach(function(t){e.resetElementHighlighting(t)});return this}},{key:"setLayerPosition",value:function(t,e){if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=this.constructor.getElementOffset(e),i=r.width,o=r.height,s=r.top,a=r.left;return this.constructor.isElementFixed(e)?this.constructor.addElementClass(t,this.constructor.getFixedClass()):this.constructor.removeElementClass(t,this.constructor.getFixedClass()),t.style.cssText="width: ".concat(i+n,"px;\n height: ").concat(o+n,"px;\n top: ").concat(s-n/2,"px;\n left: ").concat(a-n/2,"px;"),this}},{key:"setHighlightLayerPosition",value:function(){return this.setLayerPosition.apply(this,arguments)}},{key:"setInteractionLayerPosition",value:function(){return this.setLayerPosition.apply(this,arguments)}},{key:"setControlLayerPosition",value:function(t,e){if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=window.pageXOffset,i=document.documentElement.getBoundingClientRect().width,o=this.constructor.getElementOffset(e),s=o.height,a=o.top,c=o.left,l=o.right,u=s+n,h=a-n/2,f=r<r+(c-n/2)?r:c-n/2,d=r+(l+n/2)<r+i?i:l+n/2;return this.constructor.isElementFixed(e)?this.constructor.addElementClass(t,this.constructor.getFixedClass()):this.constructor.removeElementClass(t,this.constructor.getFixedClass()),t.style.cssText="width: ".concat(d,"px;\n height: ").concat(u,"px;\n top: ").concat(h,"px;\n left: ").concat(f,"px;"),this}},{key:"setTooltipLayerPosition",value:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{},i=r.position,o=r.boundary;i=i||this.options.position;var s=null;o=o||window;var a=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(a=0);var c=t.style;c.top=null,c.right=null,c.bottom=null,c.left=null,c.transform=null;var l=e.getBoundingClientRect(),u=l.top,h=l.bottom,f=l.left,d=l.right,p=l.width,g=l.height,v=t.getBoundingClientRect(),y=v.height,m=v.width,b=t.cloneNode();b.style.visibility="hidden",b.innerHTML="",t.parentElement.appendChild(b);var w=b.getBoundingClientRect().width;b.parentElement.removeChild(b);var x={};if(o===window)x=new DOMRect(0,0,window.innerWidth,window.innerHeight);else{var L=o.getBoundingClientRect(),C=L.x,E=L.y;x=new DOMRect(C,E,o.scrollWidth,o.scrollHeight)}var k=x.top,O=x.bottom,P=x.left,_=x.right;if(e.classList.contains(this.constructor.getDefaultElementClass()))i="floating";else{var S=["bottom","right","left","top"];t.setAttribute("data-guidechimp-position","top");var R=getComputedStyle(t),A=R.marginTop,j=R.marginBottom;u-k<y+(A=parseInt(A,10))+(j=parseInt(j,10))&&S.splice(S.indexOf("top"),1),t.setAttribute("data-guidechimp-position","bottom");var N=getComputedStyle(t),T=N.marginTop,B=N.marginBottom;O-h<y+(T=parseInt(T,10))+(B=parseInt(B,10))&&S.splice(S.indexOf("bottom"),1),t.setAttribute("data-guidechimp-position","left");var z=getComputedStyle(t),D=z.marginLeft,H=z.marginRight;f-P<w+(D=parseInt(D,10))+(H=parseInt(H,10))&&S.splice(S.indexOf("left"),1),t.setAttribute("data-guidechimp-position","right");var I=getComputedStyle(t),W=I.marginLeft,q=I.marginRight;if(_-d<w+(W=parseInt(W,10))+(q=parseInt(q,10))&&S.splice(S.indexOf("right"),1),"top"===(i=S.length?S.includes(i)?i:S[0]:"floating")||"bottom"===i){var M=["left","right","middle"];_-f<w&&M.splice(M.indexOf("left"),1),d-P<w&&M.splice(M.indexOf("right"),1),(f+p/2-P<w/2||_-(d-p/2)<w/2)&&M.splice(M.indexOf("middle"),1),s=M.length?M[0]:"middle"}}var F=document.documentElement;switch(t.removeAttribute("data-guidechimp-position"),t.setAttribute("data-guidechimp-position",i),i){case"top":c.bottom="".concat(g+a,"px");break;case"right":c.left="".concat(d+a/2-F.clientLeft,"px");break;case"left":c.right="".concat(F.clientWidth-(f-a/2),"px");break;case"bottom":c.top="".concat(g+a,"px");break;default:c.left="50%",c.top="50%",c.transform="translate(-50%,-50%)"}if(t.removeAttribute("data-guidechimp-alignment"),s)switch(t.setAttribute("data-guidechimp-alignment",s),s){case"left":c.left="".concat(f-a/2,"px");break;case"right":c.right="".concat(F.clientWidth-d-a/2,"px");break;default:f+p/2<m/2||f+p/2+m/2>F.clientWidth?c.left="".concat(F.clientWidth/2-m/2,"px"):c.left="".concat(f+p/2-m/2,"px")}return this}},{key:"startPreloader",value:function(){var t=this.cache.has("highlightLayer")?this.cache.get("highlightLayer"):document.body.querySelector(".".concat(this.constructor.getHighlightLayerClass()));t&&(t.style.visibility="hidden");var e=this.cache.has("controlLayer")?this.cache.get("controlLayer"):document.body.querySelector(".".concat(this.constructor.getControlLayerClass()));e&&(e.style.visibility="hidden");var n=this.cache.has("interactionLayer")?this.cache.get("interactionLayer"):document.body.querySelector(".".concat(this.constructor.getInteractionLayerClass()));n&&(n.style.visibility="hidden");var r=this.cache.has("tooltipLayer")?this.cache.get("tooltipLayer"):document.body.querySelector(".".concat(this.constructor.getTooltipLayerClass()));return r&&(r.style.visibility="hidden"),this.showPreloaderElement(),this}},{key:"stopPreloader",value:function(){var t=this.cache.has("highlightLayer")?this.cache.get("highlightLayer"):document.body.querySelector(".".concat(this.constructor.getHighlightLayerClass()));t&&(t.style.visibility="visible");var e=this.cache.has("controlLayer")?this.cache.get("controlLayer"):document.body.querySelector(".".concat(this.constructor.getControlLayerClass()));e&&(e.style.visibility="visible");var n=this.cache.has("interactionLayer")?this.cache.get("interactionLayer"):document.body.querySelector(".".concat(this.constructor.getInteractionLayerClass()));n&&(n.style.visibility="visible");var r=this.cache.has("tooltipLayer")?this.cache.get("tooltipLayer"):document.body.querySelector(".".concat(this.constructor.getTooltipLayerClass()));return r&&(r.style.visibility="visible"),this.removePreloaderElement(),this}},{key:"showDefaultElement",value:function(){var t=this.cache.get("defaultEl");return t||(t=document.createElement("div"),document.body.appendChild(t)),t.className=this.constructor.getDefaultElementClass(),this.cache.set("defaultEl",t),t}},{key:"showPreloaderElement",value:function(){var t=this.cache.get("preloaderEl");return t||((t=document.createElement("div")).className=this.constructor.getPreloaderClass(),document.body.appendChild(t)),this.cache.set("preloaderEl",t),t}},{key:"removePreloaderElement",value:function(){var t=this.cache.get("preloaderEl");return t&&t.parentElement.removeChild(t),this.cache.delete("preloaderEl"),this}},{key:"showOverlayLayer",value:function(){var t=this,e=this.cache.get("overlayLayer");return e||((e=document.createElement("div")).className=this.constructor.getOverlayLayerClass(),e.addEventListener("click",function(){t.options.exitOverlay&&t.stop()}),document.body.appendChild(e)),this.cache.set("overlayLayer",e),e}},{key:"removeOverlayLayer",value:function(){var t=this.cache.get("overlayLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("overlayLayer"),this}},{key:"showHighlightLayer",value:function(){var t=this.cache.get("highlightLayer");return t||((t=document.createElement("div")).className=this.constructor.getHighlightLayerClass(),document.body.appendChild(t)),this.cache.set("highlightLayer",t),t}},{key:"removeHighlightLayer",value:function(){var t=this.cache.get("highlightLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("highlightLayer"),this}},{key:"showControlLayer",value:function(){var t=this.cache.get("controlLayer");return t||((t=document.createElement("div")).className=this.constructor.getControlLayerClass(),document.body.appendChild(t)),this.cache.set("controlLayer",t),t}},{key:"removeControlLayer",value:function(){var t=this.cache.get("controlLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("controlLayer"),this}},{key:"showInteractionLayer",value:function(){var t=this.cache.get("interactionLayer");t||(t=document.createElement("div"),document.body.appendChild(t)),t.className=this.constructor.getInteractionLayerClass();var e=this.options.interaction;return this.step&&"boolean"==typeof this.step.interaction&&(e=this.step.interaction),e||t.classList.add(this.constructor.getDisableInteractionClass()),this.cache.set("interactionLayer",t),t}},{key:"removeInteractionLayer",value:function(){var t=this.cache.get("interactionLayer");return t&&t.parentElement.removeChild(t),this.cache.delete("interactionLayer"),this}},{key:"showTooltipLayer",value:function(){var t=this.showControlLayer(),e=this.cache.get("tooltipLayer");return e||((e=document.createElement("div")).setAttribute("role","dialog"),t.appendChild(e)),e.className=this.constructor.getTooltipLayerClass(),this.cache.set("tooltipLayer",e),e}},{key:"showTooltipTail",value:function(){var t=this.showTooltipLayer(),e=this.cache.get("tooltipTailEl");return e||(e=document.createElement("div"),t.appendChild(e)),e.className=this.constructor.getTooltipTailClass(),this.cache.set("tooltipTailEl",e),e}},{key:"showClose",value:function(){var t=this,e=this.showTooltipLayer(),n=this.cache.get("closeEl");return n||((n=document.createElement("div")).addEventListener("click",function(){return t.stop()}),e.appendChild(n)),n.className=this.constructor.getCloseClass(),this.cache.set("closeEl",n),n}},{key:"showProgressbar",value:function(){var t=this.showTooltipLayer(),e=this.cache.get("progressbarEl");e||((e=document.createElement("div")).setAttribute("role","progress"),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuemax",100),t.appendChild(e));var n=this.steps.indexOf(this.step);if(0<=n&&this.steps.length){var r=(n+1)/this.steps.length*100;e.setAttribute("aria-valuenow",r),e.style.cssText="width: ".concat(r,"%;")}return e.className=this.constructor.getProgressbarClass(),this.options.showProgressbar||e.classList.add(this.constructor.getHiddenClass()),this.cache.set("progressbarEl",e),e}},{key:"showTitle",value:function(t){var e=this.cache.get("titleEl");return e||(e=document.createElement("div"),this.showTooltipLayer().appendChild(e)),e.className=this.constructor.getTitleClass(),t||e.classList.add(this.constructor.getHiddenClass()),e.innerHTML=t||"",this.cache.set("titleEl",e),e}},{key:"showDescription",value:function(t){var e=this.cache.get("descriptionEl");return e||(e=document.createElement("div"),this.showTooltipLayer().appendChild(e)),e.className=this.constructor.getDescriptionClass(),t||e.classList.add(this.constructor.getHiddenClass()),e.innerHTML=t||"",this.cache.set("descriptionEl",e),e}},{key:"showCustomButtonsLayer",value:function(t){var c=this,e=0<arguments.length&&void 0!==t?t:[],l=this.cache.get("customButtonsLayer");for(l||(l=document.createElement("div"),this.showTooltipLayer().appendChild(l)),l.className=this.constructor.getCustomButtonsLayerClass(),e.length||l.classList.add(this.constructor.getHiddenClass());l.firstChild;)l.removeChild(l.firstChild);return e.forEach(function(t){if(t instanceof HTMLElement)l.appendChild(t);else{var e=t.tagName,n=void 0===e?"button":e,r=t.title,i=void 0===r?"":r,o=t.class,s=t.onClick,a=document.createElement(n);a.innerHTML=i,o&&(a.className=o),s&&a.addEventListener("click",function(t){return s.call(c,t)}),l.appendChild(a)}}),this.cache.set("customButtonsLayer",l),l}},{key:"showNavigation",value:function(){var t=this.cache.get("navigationLayer");return t||(t=document.createElement("div"),this.showTooltipLayer().appendChild(t)),t.className=this.constructor.getNavigationClass(),this.cache.set("navigationLayer",t),t}},{key:"showPagination",value:function(){var r=this,i=this.cache.get("paginationLayer");for(i||(i=document.createElement("div"),this.showNavigation().appendChild(i)),i.className=this.constructor.getPaginationLayerClass(),(!this.options.showPagination||this.steps.length<2)&&i.classList.add(this.constructor.getHiddenClass());i.firstChild;)i.removeChild(i.firstChild);return this.steps.forEach(function(t,e){var n=document.createElement("div");n.className=r.constructor.getPaginationItemClass(),r.step===t&&n.classList.add(r.constructor.getPaginationCurrentItemClass()),n.addEventListener("click",function(){return r.go(e,!0)}),i.appendChild(n)}),this.cache.set("paginationLayer",i),i}},{key:"showNavigationPrev",value:function(){var t=this,e=this.cache.get("navigationPrevEl");return e||(e=document.createElement("div"),this.showNavigation().appendChild(e),e.addEventListener("click",function(){t.previous()})),e.className=this.constructor.getNavigationPrevClass(),this.steps.indexOf(this.step)<=0&&e.classList.add(this.constructor.getHiddenClass()),this.cache.set("navigationPrevEl",e),e}},{key:"showNavigationNext",value:function(){var t=this,e=this.cache.get("navigationNextEl");e||(e=document.createElement("div"),this.showNavigation().appendChild(e),e.addEventListener("click",function(){t.next()}));var n=this.steps.indexOf(this.step);return e.className=this.constructor.getNavigationNextClass(),(n<0||n===this.steps.length-1||1===this.steps.length)&&e.classList.add(this.constructor.getHiddenClass()),this.cache.set("navigationNextEl",e),e}},{key:"showCopyright",value:function(){var t=this.cache.get("copyrightEl");return t||(t=document.createElement("div"),this.showTooltipLayer().appendChild(t)),t.className=this.constructor.getCopyrightClass(),t.innerHTML="Made with GuideChimp",this.cache.set("copyrightEl",t),t}},{key:"on",value:function(t,e){var n=this;t.split(",").map(function(t){return t.trim()}).forEach(function(t){n.listeners[t]=n.listeners[t]||[],n.listeners[t].push(e)})}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=this.listeners[t];return o?Promise.all(o.map(function(t){return Promise.resolve().then(function(){return t.apply(e,r)})})):[]}},{key:"addOnKeydownListener",value:function(){return this.cache.set("onKeydownListener",this.getOnKeydownListener()),window.addEventListener("keydown",this.cache.get("onKeydownListener"),!0),this}},{key:"getOnKeydownListener",value:function(){var s=this;return function(t){var e=t.keyCode,n=C(C({},s.constructor.getDefaultKeyboardCodes()),s.options.useKeyboard),r=n.previous,i=n.next,o=n.stop;o&&o.includes(e)?s.stop():r&&r.includes(e)?s.previous():i&&i.includes(e)&&s.next()}}},{key:"removeOnKeydownListener",value:function(){return this.cache.has("onKeydownListener")&&(window.removeEventListener("keydown",this.cache.get("onKeydownListener"),!0),this.cache.delete("onKeydownListener")),this}},{key:"addOnWindowResizeListener",value:function(){return this.cache.set("onWindowResizeListener",this.getOnWindowResizeListener()),window.addEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this}},{key:"getOnWindowResizeListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowResizeListener",value:function(){return this.cache.has("onWindowResizeListener")&&(window.removeEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this.cache.delete("onWindowResizeListener")),this}},{key:"observeResizeStepElement",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:{box:"border-box"},r=this.observers.stepElementResizeObserver;return r&&r.observe(t,n),this}},{key:"unobserveResizeStepElement",value:function(t){var e=this.observers.stepElementResizeObserver;return e&&e.unobserve(t),this}},{key:"unobserveResizeAllStepsElements",value:function(){var t=this.observers.stepElementResizeObserver;return t&&t.disconnect(),this}},{key:"refresh",value:function(){if(!this.step)return this;var t=this.step,e=t.element,n=t.position,r=this.getStepElement(e);return this.cache.has("highlightLayer")&&this.setHighlightLayerPosition(this.cache.get("highlightLayer"),r),this.cache.has("controlLayer")&&this.setControlLayerPosition(this.cache.get("controlLayer"),r),this.cache.has("interactionLayer")&&this.setInteractionLayerPosition(this.cache.get("interactionLayer"),r),this.cache.has("tooltipLayer")&&this.setTooltipLayerPosition(this.cache.get("tooltipLayer"),r,{position:n,boundary:window}),this}}],[{key:"getDefaultOptions",value:function(){return{position:"bottom",useKeyboard:!0,exitEscape:!0,exitOverlay:!0,showPagination:!0,showProgressbar:!0,interaction:!0,padding:10,scrollPadding:10}}},{key:"getDefaultKeyboardCodes",value:function(){return{previous:[37],next:[39,13,32],stop:[27]}}},{key:"getBodyClass",value:function(){return"gc"}},{key:"getDefaultElementClass",value:function(){return"gc-default"}},{key:"getFixStackingContext",value:function(){return"gc-fix-stacking-context"}},{key:"getHighlightElementClass",value:function(){return"gc-highlighted"}},{key:"getPreloaderClass",value:function(){return"gc-preloader"}},{key:"getOverlayLayerClass",value:function(){return"gc-overlay"}},{key:"getFixedClass",value:function(){return"gc-fixed"}},{key:"getHighlightLayerClass",value:function(){return"gc-highlight"}},{key:"getControlLayerClass",value:function(){return"gc-control"}},{key:"getInteractionLayerClass",value:function(){return"gc-interaction"}},{key:"getTooltipLayerClass",value:function(){return"gc-tooltip"}},{key:"getTooltipTailClass",value:function(){return"gc-tooltip-tail"}},{key:"getTitleClass",value:function(){return"gc-title"}},{key:"getDescriptionClass",value:function(){return"gc-description"}},{key:"getCustomButtonsLayerClass",value:function(){return"gc-custom-buttons"}},{key:"getNavigationClass",value:function(){return"gc-navigation"}},{key:"getNavigationPrevClass",value:function(){return"gc-navigation-prev"}},{key:"getNavigationNextClass",value:function(){return"gc-navigation-next"}},{key:"getCloseClass",value:function(){return"gc-close"}},{key:"getPaginationLayerClass",value:function(){return"gc-pagination"}},{key:"getPaginationItemClass",value:function(){return"gc-pagination-item"}},{key:"getPaginationCurrentItemClass",value:function(){return"gc-pagination-active"}},{key:"getProgressbarClass",value:function(){return"gc-progressbar"}},{key:"getDisableInteractionClass",value:function(){return"gc-disable"}},{key:"getCopyrightClass",value:function(){return"gc-copyright"}},{key:"getHiddenClass",value:function(){return"gc-hidden"}},{key:"getRelativePositionClass",value:function(){return"gc-relative"}},{key:"getElementOffset",value:function(t){var e=document,n=e.body,r=e.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,o=window.pageXOffset||r.scrollLeft||n.scrollLeft,s=t.getBoundingClientRect(),a=s.top,c=s.right,l=s.bottom,u=s.left;return{right:c,bottom:l,width:s.width,height:s.height,x:s.x,y:s.y,top:a+i,left:u+o}}},{key:"isElementFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isElementFixed(e))}},{key:"addElementClass",value:function(t,e){t instanceof SVGElement?t.setAttribute("class","".concat(t.getAttribute("class")||""," ").concat(e)):t.classList.add(e)}},{key:"removeElementClass",value:function(t,e){if(t instanceof SVGElement){var n=t.getAttribute("class")||"";return n.replace(e,""),void t.setAttribute("class",n)}t.classList.remove(e)}}]),r}();e.default=h},function(t,e,n){t.exports=n(18)},function(t,e,n){var r=function(s){"use strict";var c,t=Object.prototype,u=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},i=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",r=e.toStringTag||"@@toStringTag";function a(t,e,n,r){var o,s,a,c,i=e&&e.prototype instanceof y?e:y,l=Object.create(i.prototype),u=new P(r||[]);return l._invoke=(o=t,s=n,a=u,c=f,function(t,e){if(c===p)throw new Error("Generator is already running");if(c===g){if("throw"===t)throw e;return S()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){var r=E(n,a);if(r){if(r===v)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===f)throw c=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=p;var i=h(o,s,a);if("normal"===i.type){if(c=a.done?g:d,i.arg===v)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(c=g,a.method="throw",a.arg=i.arg)}}),l}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}s.wrap=a;var f="suspendedStart",d="suspendedYield",p="executing",g="completed",v={};function y(){}function o(){}function l(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(_([])));w&&w!==t&&u.call(w,i)&&(m=w);var x=l.prototype=y.prototype=Object.create(m);function L(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function C(c,l){var e;this._invoke=function(n,r){function t(){return new l(function(t,e){!function e(t,n,r,i){var o=h(c[t],c,n);if("throw"!==o.type){var s=o.arg,a=s.value;return a&&"object"==typeof a&&u.call(a,"__await")?l.resolve(a.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):l.resolve(a).then(function(t){s.value=t,r(s)},function(t){return e("throw",t,r,i)})}i(o.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function E(t,e){var n=t.iterator[e.method];if(n===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,E(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var r=h(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,v;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function _(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(u.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t};return r.next=r}}return{next:S}}function S(){return{value:c,done:!0}}return o.prototype=x.constructor=l,l.constructor=o,l[r]=o.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===o||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,r in t||(t[r]="GeneratorFunction")),t.prototype=Object.create(x),t},s.awrap=function(t){return{__await:t}},L(C.prototype),C.prototype[n]=function(){return this},s.AsyncIterator=C,s.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new C(a(t,e,n,r),i);return s.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},L(x),x[r]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},s.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},s.values=_,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=u.call(i,"catchLoc"),a=u.call(i,"finallyLoc");if(s&&a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&u.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),v}},s}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){function c(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}t.exports=function(a){return function(){var t=this,s=arguments;return new Promise(function(e,n){var r=a.apply(t,s);function i(t){c(r,e,n,i,o,"next",t)}function o(t){c(r,e,n,i,o,"throw",t)}i(void 0)})}}},function(t,e,n){var r=n(21),i=n(22),o=n(7),s=n(23);t.exports=function(t){return r(t)||i(t)||o(t)||s()}},function(t,e,n){var r=n(6);t.exports=function(t){if(Array.isArray(t))return r(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _typeof2=_interopRequireDefault(__webpack_require__(1)),_slicedToArray2=_interopRequireDefault(__webpack_require__(25)),_defineProperty2=_interopRequireDefault(__webpack_require__(5)),_classCallCheck2=_interopRequireDefault(__webpack_require__(2)),_createClass2=_interopRequireDefault(__webpack_require__(3));function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,_defineProperty2.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var cache=new Map,Beacons=function(){function Beacons(t){var e=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};(0,_classCallCheck2.default)(this,Beacons),this.beacons=[],this.options={},this.observers={},"undefined"!=typeof ResizeObserver&&(this.observers.elementResizeObserver=new ResizeObserver(function(){return e.refresh()})),this.cache=cache,this.setOptions(n),this.setBeacons(t),this.init()}return(0,_createClass2.default)(Beacons,[{key:"init",value:function(){}},{key:"setOptions",value:function(t){return this.options=_objectSpread(_objectSpread({},this.constructor.getDefaultOptions()),t),this}},{key:"setBeacons",value:function(t){var i=this;return this.removeAll(),this.beacons=!t||"string"==typeof t||Array.isArray(t)&&t.every(function(t){return"string"==typeof t})?this.getDataBeacons(t):this.getJsBeacons(t),this.beacons.length&&(this.beacons.forEach(function(t){var e=t.element;if(e){var n=i.getElement(e),r=i.createBeaconEl(t);r.classList.add(i.constructor.getHiddenClass()),i.constructor.isElementFixed(n)&&r.classList.add(i.constructor.getFixedClass()),document.body.append(r),i.cache.set(t,r),i.setBeaconPosition(n,r,t),i.observeResizeElement(n)}}),this.addOnWindowResizeListener()),this}},{key:"getBeacons",value:function(){return this.beacons}},{key:"getBeacon",value:function(e,t){var n=e&&"object"===(0,_typeof2.default)(e)?[e]:this.beacons.filter(function(t){return t.id===e});return(0,_slicedToArray2.default)(n,1)[0]||t}},{key:"getDataBeacons",value:function getDataBeacons(ids){var _this3=this,beaconsIds="string"==typeof ids?ids.split(",").map(function(t){return t.trim()}):ids,beaconsSelector=["[".concat(this.constructor.getBeaconDataPrefix(),"]")];beaconsIds&&(beaconsSelector=[],beaconsIds.forEach(function(t){beaconsSelector.push("[".concat(_this3.constructor.getBeaconDataPrefix(),"*='").concat(t,"']"))}));var beaconsEl=Array.from(document.querySelectorAll(beaconsSelector.join(","))),dataGlobalRegExp=new RegExp("^".concat(this.constructor.getBeaconDataPrefix(),"-([^-]+)$")),beacons=[];return beaconsEl.forEach(function(el){var beaconsIdsAttrValue=el.attributes[_this3.constructor.getBeaconDataPrefix()].value;if(beaconsIdsAttrValue){var elBeaconsIds=beaconsIdsAttrValue.split(",");elBeaconsIds.forEach(function(id){if(!beaconsIds||beaconsIds.includes(id)){for(var globalBeaconAttrs={},beaconAttrs={},dataBeaconRegExp=new RegExp("^".concat(_this3.constructor.getBeaconDataPrefix(),"-").concat(id,"-([^-]+)$")),j=0;j<el.attributes.length;j++){var _el$attributes$j=el.attributes[j],attrName=_el$attributes$j.name,attrValue=_el$attributes$j.value,isGlobalAttr=dataGlobalRegExp.test(attrName),isBeaconAttr=dataBeaconRegExp.test(attrName);if(isGlobalAttr){var _attrName$match=attrName.match(dataGlobalRegExp),_attrName$match2=(0,_slicedToArray2.default)(_attrName$match,2),shortAttrName=_attrName$match2[1];globalBeaconAttrs[shortAttrName]=attrValue}else if(isBeaconAttr){var _attrName$match3=attrName.match(dataBeaconRegExp),_attrName$match4=(0,_slicedToArray2.default)(_attrName$match3,2),_shortAttrName=_attrName$match4[1];beaconAttrs[_shortAttrName]=attrValue}}var beacon=_objectSpread(_objectSpread(_objectSpread({id:id,position:_this3.options.position},globalBeaconAttrs),beaconAttrs),{},{element:el}),onClick=beacon.onclick||beacon.onClick;onClick&&(delete beacon.onclick,beacon.onClick=function(e){var onClickCode=eval(onClick);"function"==typeof onClickCode&&onClickCode.call(e,beacon)}),beacons.push(beacon)}})}}),beacons}},{key:"getJsBeacons",value:function(t){return(Array.isArray(t)?t:[t]).map(function(t,e){return _objectSpread(_objectSpread({},t),{},{id:t.id||e})})}},{key:"createBeaconEl",value:function(e){var n=this,t=document.createElement("div"),r=e.class,i=e.onClick;return r&&(t.className=r),i&&(t.onclick=function(t){t.stopPropagation(),i.call(n,t,e)}),t.classList.add(this.constructor.getBeaconClass()),t}},{key:"getElement",value:function(t){return t instanceof HTMLElement?t:document.querySelector(t)}},{key:"setBeaconPosition",value:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{},i=r.position,o=r.boundary;i=i||this.options.position,o="inner"===(o=o||this.options.boundary)?"inner":"outer";var s=this.constructor.getElementOffset(t),a=s.width,c=s.height,l=s.top,u=s.left,h=e.style,f=getComputedStyle(e),d=f.width,p=f.height;switch(d=parseInt(d,10),p=parseInt(p,10),e.removeAttribute("data-beacon-position"),e.removeAttribute("data-beacon-boundary"),e.setAttribute("data-beacon-position",i),e.setAttribute("data-beacon-boundary",o),i){case"top-left":"inner"===o?(h.left="".concat(u,"px"),h.top="".concat(l,"px")):(h.left="".concat(u-d,"px"),h.top="".concat(l-p,"px"));break;case"top":h.left="".concat(u+(a-d)/2,"px"),h.top="".concat("inner"===o?l:l-p,"px");break;case"top-right":"inner"===o?(h.left="".concat(a+u-d,"px"),h.top="".concat(l,"px")):(h.left="".concat(a+u,"px"),h.top="".concat(l-p,"px"));break;case"left":h.left="".concat("inner"===o?u:u-d,"px"),h.top="".concat(l+(c-p)/2,"px");break;default:case"center":e.setAttribute("data-beacon-position","center"),h.left="".concat(u+(a-d)/2,"px"),h.top="".concat(l+(c-p)/2,"px");break;case"right":h.left="".concat("inner"===o?u+a-d:u+a,"px"),h.top="".concat(l+(c-p)/2,"px");break;case"bottom-left":"inner"===o?(h.left="".concat(u,"px"),h.top="".concat(l+c-p,"px")):(h.left="".concat(u-d,"px"),h.top="".concat(l+c,"px"));break;case"bottom":h.left="".concat(u+(a-d)/2,"px"),h.top="".concat("inner"===o?l+c-p:l+c,"px");break;case"bottom-right":"inner"===o?(h.left="".concat(a+u-d,"px"),h.top="".concat(l+c-p,"px")):(h.left="".concat(a+u,"px"),h.top="".concat(l+c,"px"))}return this}},{key:"isCanShowBeacon",value:function(t){var e=t.canShow;return!(void 0!==e&&(!e||"function"==typeof e&&!1===e()))}},{key:"showAll",value:function(t){var e=this,n=0<arguments.length&&void 0!==t&&t;return this.beacons.forEach(function(t){e.show(t,n)}),this}},{key:"show",value:function(t,e){var n=1<arguments.length&&void 0!==e&&e,r=this.getBeacon(t);if(r){var i=this.cache.get(r);i&&(n||this.isCanShowBeacon(r))&&i.classList.remove(this.constructor.getHiddenClass())}return this}},{key:"hideAll",value:function(){var e=this;return this.beacons.forEach(function(t){e.hide(t)}),this}},{key:"hide",value:function(t){var e=this.getBeacon(t);if(e){var n=this.cache.get(e);n&&n.classList.add(this.constructor.getHiddenClass())}return this}},{key:"removeAll",value:function(){var e=this;return this.beacons.forEach(function(t){e.remove(t)}),this.beacons=[],this.unobserveResizeAllElements(),this.removeOnWindowResizeListener(),this}},{key:"remove",value:function(t){var e=this.getBeacon(t),n=this.cache.get(e);if(n){n.parentNode.removeChild(n),-1!==this.beacons.indexOf(e)&&this.beacons.splice(this.beacons.indexOf(e),1),this.cache.delete(e);var r=this.getElement(e.element);r&&this.unobserveResizeElement(r)}return this.beacons.length||this.removeOnWindowResizeListener(),this}},{key:"refresh",value:function(){var i=this;return this.beacons.forEach(function(t){var e=t.element;if(e){var n=i.getElement(e),r=i.cache.get(t);n&&r&&i.setBeaconPosition(n,r,t)}}),this}},{key:"addOnWindowResizeListener",value:function(){return this.cache.set("onWindowResizeListener",this.getOnWindowResizeListener()),window.addEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this}},{key:"getOnWindowResizeListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowResizeListener",value:function(){return this.cache.has("onWindowResizeListener")&&(window.removeEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this.cache.delete("onWindowResizeListener")),this}},{key:"observeResizeElement",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:{box:"border-box"},r=this.observers.elementResizeObserver;return r&&r.observe(t,n),this}},{key:"unobserveResizeElement",value:function(t){var e=this.observers.elementResizeObserver;return e&&e.unobserve(t),this}},{key:"unobserveResizeAllElements",value:function(){var t=this.observers.elementResizeObserver;return t&&t.disconnect(),this}}],[{key:"getDefaultOptions",value:function(){return{position:"center",boundary:"inner"}}},{key:"getBeaconClass",value:function(){return"gc-beacon"}},{key:"getFixedClass",value:function(){return"gc-beacon-fixed"}},{key:"getHiddenClass",value:function(){return"gc-beacon-hidden"}},{key:"getBeaconDataPrefix",value:function(){return"data-beacon"}},{key:"isElementFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isElementFixed(e))}},{key:"getElementOffset",value:function(t){var e=document,n=e.body,r=e.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,o=window.pageXOffset||r.scrollLeft||n.scrollLeft,s=t.getBoundingClientRect(),a=s.top,c=s.right,l=s.bottom,u=s.left;return{right:c,bottom:l,width:s.width,height:s.height,x:s.x,y:s.y,top:a+i,left:u+o}}}]),Beacons}();exports.default=Beacons},function(t,e,n){var r=n(26),i=n(27),o=n(7),s=n(28);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){}],f={},g.m=d,g.c=f,g.d=function(t,e,n){g.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},g.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},g.t=function(e,t){if(1&t&&(e=g(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(g.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)g.d(n,r,function(t){return e[t]}.bind(null,r));return n},g.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return g.d(e,"a",e),e},g.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},g.p="",g(g.s=8);function g(t){if(f[t])return f[t].exports;var e=f[t]={i:t,l:!1,exports:{}};return d[t].call(e.exports,e,e.exports,g),e.l=!0,e.exports}var d,f}); | ||
//# sourceMappingURL=beacons.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,3 +0,3 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.guideChimpPluginGoogleAnalytics=e():t.guideChimpPluginGoogleAnalytics=e()}(window,function(){return n={},o.m=r=[function(t,e,r){var n=r(1);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e,r){"use strict";var n=r(3),i=n(r(4)),f=n(r(8)),a=n(r(12)),o=n(r(14)),l=n(r(15));function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){(0,o.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var p=new Map;t.exports=function(t,e){function o(o,i,t){var a=2<arguments.length&&void 0!==t?t:{};return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n="function"==typeof a?a.apply(this,e):a;n.event_category=n.event_category||o,c(i,n)}}function u(t,e,r){var o=2<arguments.length&&void 0!==r?r:{},i=null,a=[],u=[];return{startEventListener:function(){i=(new Date).getTime();for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];a=[].concat(e)},endEventListener:function(){if(i){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];u=[].concat(e);var n="function"==typeof o?o.apply(this,[].concat((0,f.default)(a),(0,f.default)(u))):o;n.name=n.name||"load",n.value=(new Date).getTime()-i,c("timing_complete",n)}}}}var c=function(){var e=(0,l.default)(a.default.mark(function t(e){var r,n=arguments;return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1<n.length&&void 0!==n[1]?n[1]:{},"function"!=typeof gtag)return console.warn("GuideChimp [Google Analytics Plugin]: Function gtag is undefined"),t.abrupt("return",!1);t.next=4;break;case 4:return t.abrupt("return",new Promise(function(t){gtag("event",e,s(s({},r),{},{event_callback:function(){return t(!0)}}))}));case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}();e.gaOn=function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=p.get(t)||[];return n.push(o(t,e,r)),p.set(t,n),this},e.gaTiming=function(t,e){var r=u(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}),n=r.startEventListener,o=r.endEventListener,i=p.get(t)||[],a=p.get(e)||[];return i.push(n),a.push(o),p.set(t,i),p.set(e,a),this};var r=t.prototype.init;t.prototype.init=function(){var n=this;r.call(this),Array.from(p).forEach(function(t){var e=(0,i.default)(t,2),r=e[0];e[1].forEach(function(t){n.on(r,t)})})},t.prototype.gaOn=function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return this.on(t,o(t,e,r)),this},t.prototype.gaTiming=function(t,e){var r=u(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}),n=r.startEventListener,o=r.endEventListener;return this.on(t,n),this.on(e,o),this},t.prototype.gaEvent=function(){var e=(0,l.default)(a.default.mark(function t(e){var r,n=arguments;return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=1<n.length&&void 0!==n[1]?n[1]:{},t.abrupt("return",c(e,r));case 2:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()}},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){var n=r(5),o=r(6),i=r(0),a=r(7);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){var n=r(9),o=r(10),i=r(0),a=r(11);t.exports=function(t){return n(t)||o(t)||i(t)||a()}},function(t,e,r){var n=r(1);t.exports=function(t){if(Array.isArray(t))return n(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){t.exports=r(13)},function(t,e,r){var n=function(a){"use strict";var c,t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function u(t,e,r,n){var i,a,u,c,o=e&&e.prototype instanceof g?e:g,f=Object.create(o.prototype),l=new P(n||[]);return f._invoke=(i=t,a=r,u=l,c=p,function(t,e){if(c===y)throw new Error("Generator is already running");if(c===v){if("throw"===t)throw e;return A()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=E(r,u);if(n){if(n===d)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(c===p)throw c=v,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c=y;var o=s(i,a,u);if("normal"===o.type){if(c=u.done?v:h,o.arg===d)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c=v,u.method="throw",u.arg=o.arg)}}),f}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var p="suspendedStart",h="suspendedYield",y="executing",v="completed",d={};function g(){}function i(){}function f(){}var m={};m[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(S([])));w&&w!==t&&l.call(w,o)&&(m=w);var x=f.prototype=g.prototype=Object.create(m);function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function j(c,f){var e;this._invoke=function(r,n){function t(){return new f(function(t,e){!function e(t,r,n,o){var i=s(c[t],c,r);if("throw"!==i.type){var a=i.arg,u=a.value;return u&&"object"==typeof u&&l.call(u,"__await")?f.resolve(u.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):f.resolve(u).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function E(t,e){var r=t.iterator[e.method];if(r===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,E(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(l.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=c,t.done=!0,t};return n.next=n}}return{next:A}}function A(){return{value:c,done:!0}}return i.prototype=x.constructor=f,f.constructor=i,f[n]=i.displayName="GeneratorFunction",a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,n in t||(t[n]="GeneratorFunction")),t.prototype=Object.create(x),t},a.awrap=function(t){return{__await:t}},O(j.prototype),j.prototype[r]=function(){return this},a.AsyncIterator=j,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new j(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(x),x[n]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},a.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=S,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=l.call(o,"catchLoc"),u=l.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&l.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=c),d}},a}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e){function c(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){c(n,e,r,o,i,"next",t)}function i(t){c(n,e,r,o,i,"throw",t)}o(void 0)})}}}],o.c=n,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=2);function o(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var r,n}); | ||
//# sourceMappingURL=googleAnalytics.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,3 +0,3 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.guideChimpPluginMultiPage=e():t.guideChimpPluginMultiPage=e()}(window,function(){return n={},o.m=r=[function(t,e,r){"use strict";var n=r(1),o=n(r(2)),a=n(r(4));t.exports=function(t){var i="GUIDECHIMP_MULTIPAGE_STEP",e=t.prototype.init;t.prototype.init=function(){var o=this;e.call(this),this.on("onBeforeChange",function(t){var e=t.multiPage;if(e&&"string"!=typeof o.tour){var r=e.page;if(r){var n=document.createElement("a");if(n.href=r,n.href!==window.location.href)return sessionStorage.setItem(i,o.steps.indexOf(t)),window.location.href=r,!1}}return!0})},t.prototype.continue=(0,a.default)(o.default.mark(function t(){var e;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(e=sessionStorage.getItem(i)))return sessionStorage.removeItem(i),t.abrupt("return",this.start(e,!0));t.next=4;break;case 4:return t.abrupt("return",!1);case 5:case"end":return t.stop()}},t,this)}))}},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){t.exports=r(3)},function(t,e,r){var n=function(a){"use strict";var c,t=Object.prototype,s=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function u(t,e,r,n){var i,a,u,c,o=e&&e.prototype instanceof g?e:g,f=Object.create(o.prototype),s=new O(n||[]);return f._invoke=(i=t,a=r,u=s,c=h,function(t,e){if(c===y)throw new Error("Generator is already running");if(c===d){if("throw"===t)throw e;return k()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=_(r,u);if(n){if(n===v)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(c===h)throw c=d,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c=y;var o=l(i,a,u);if("normal"===o.type){if(c=u.done?d:p,o.arg===v)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c=d,u.method="throw",u.arg=o.arg)}}),f}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function g(){}function i(){}function f(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,x=w&&w(w(S([])));x&&x!==t&&s.call(x,o)&&(m=x);var b=f.prototype=g.prototype=Object.create(m);function L(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function E(c,f){var e;this._invoke=function(r,n){function t(){return new f(function(t,e){!function e(t,r,n,o){var i=l(c[t],c,r);if("throw"!==i.type){var a=i.arg,u=a.value;return u&&"object"==typeof u&&s.call(u,"__await")?f.resolve(u.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):f.resolve(u).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function _(t,e){var r=t.iterator[e.method];if(r===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,_(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,v;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(s.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=c,t.done=!0,t};return n.next=n}}return{next:k}}function k(){return{value:c,done:!0}}return i.prototype=b.constructor=f,f.constructor=i,f[n]=i.displayName="GeneratorFunction",a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,n in t||(t[n]="GeneratorFunction")),t.prototype=Object.create(b),t},a.awrap=function(t){return{__await:t}},L(E.prototype),E.prototype[r]=function(){return this},a.AsyncIterator=E,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new E(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},L(b),b[n]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},a.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=s.call(o,"catchLoc"),u=s.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=c),v}},a}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e){function c(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){c(n,e,r,o,i,"next",t)}function i(t){c(n,e,r,o,i,"throw",t)}o(void 0)})}}}],o.c=n,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0);function o(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var r,n}); | ||
//# sourceMappingURL=multiPage.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,3 +0,3 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.guideChimpPluginRemoveAttribution=t():e.guideChimpPluginRemoveAttribution=t()}(window,function(){return o={},r.m=n=[function(e,t,n){"use strict";e.exports=function(e){e.prototype.showCopyright=function(){return document.createElement("div")}}}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,o}); | ||
//# sourceMappingURL=removeAttribution.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,3 +0,3 @@ | ||
/*! GuideChimp v1.7.0 | Copyright (C) 2020 Labs64 GmbH */ | ||
/*! GuideChimp v1.7.1 | Copyright (C) 2020 Labs64 GmbH */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.guideChimpPluginTriggers=e():t.guideChimpPluginTriggers=e()}(window,function(){return r={},o.m=n=[function(t,e,n){"use strict";var u=n(1)(n(2));t.exports=function(t){var e=t.prototype.init,o="triggersListeners",i="stepTriggersListeners";t.prototype.init=function(){var c=this;e.call(this),this.on("onTrigger.next",function(){return c.next()}),this.on("onTrigger.previous",function(){return c.previous()}),this.on("onTrigger.stop",function(){return c.stop()});function n(e){var u=[];return Object.keys(e).forEach(function(i){var t=e[i];(t=Array.isArray(t)?t:[t]).forEach(function(t){var r=t,e="click",o=null;null!==t&&"[object Object]"===Object.prototype.toString.call(t)&&(r=t.element,e=t.event||e,o=t.listener||o);function n(t){var e=t.target,n=[];"string"==typeof r?n=Array.from(document.querySelectorAll(r)):r instanceof NodeList?n=Array.from(r):r instanceof HTMLElement&&(n=[r]),n.length&&n.includes(e)&&(o&&"function"==typeof o?o.call(c,t):c.emit("onTrigger.".concat(i),t))}u.push([e,n]),document.body.addEventListener(e,n,!0)})}),u}function r(t){return t&&t.forEach(function(t){var e=(0,u.default)(t,2),n=e[0],r=e[1];document.body.removeEventListener(n,r,!0)}),c}this.on("onStart",function(){var t=c.getOptions().triggers;t&&c.cache.set(o,n(t))}),this.on("onBeforeChange",function(t){r(c.cache.get(i)),c.cache.delete(i);var e=t.triggers;return e&&c.cache.set(i,n(e)),!0}),this.on("onStop",function(){r(c.cache.get(o)),r(c.cache.get(i)),c.cache.delete(o),c.cache.delete(i)})}}},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){var r=n(3),o=n(4),i=n(5),u=n(7);t.exports=function(t,e){return r(t)||o(t,e)||i(t,e)||u()}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}}],o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0);function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var n,r}); | ||
//# sourceMappingURL=triggers.min.js.map |
{ | ||
"name": "guidechimp", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "Deliver the perfect product experience & simplify user onboarding with step by step interactive walkthroughs.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -49,3 +49,3 @@ <a href="https://www.linkedin.com/showcase/guidechimp/"><p align="center"><img src="https://io.labs64.com/GuideChimp/docs/img/guidechimp-logo-transparent.png" alt="GuideChimp - Logo"></p></a> | ||
- Ability to set callback ("onBeforeChange", "onAfterChange") functions for each step in the tour | ||
- Lightweight (~ 35KB) and good performance | ||
- Lightweight (< 45KB) and good performance | ||
- **Last But Not Least:** :point_up: Dual-Licensed - [Apache 2.0](LICENSE) and Commercial (including great support, maintenance and customized implementation) | ||
@@ -52,0 +52,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
9152
0.01%1353637
-0.03%