UNPKG

guidechimp

Version:

Deliver the perfect product experience & simplify user onboarding with step by step interactive walkthroughs.

2 lines 70.4 kB
/*! For license information please see guidechimp.min.js.LICENSE.txt */ !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()}(self,(function(){return function(){var t={4823:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4756)),i=n(r(5715)),s=n(r(1132)),a=n(r(3693)),u=n(r(9293)),c=n(r(7383)),l=n(r(4579)),p=n(r(7200)),f=n(r(1882)),h=n(r(5364)),d=n(r(5135)),v=n(r(8534)),g=n(r(4576)),y=n(r(3534)),m=n(r(3783)),b=n(r(7137)),x=n(r(3566)),S=n(r(804)),w=n(r(1920)),E=n(r(4290)),_=n(r(7869)),k=n(r(2880)),O=n(r(9289)),P=n(r(8126)),j=n(r(4531)),L=n(r(4175)),A=n(r(2411));function M(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function T(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?M(Object(r),!0).forEach((function(e){(0,a.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e.default=function(){return(0,l.default)((function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,c.default)(this,t),Object.defineProperty(this,"uid",{value:(0,p.default)(),enumerable:!1,configurable:!1,writable:!1}),this.setDefaults(),this.cache=new Map,this.listeners={},this.observers={},this.options={},this.setOptions(r),this.tour=null,this.setTour(e),this.notifications=[],this.elements=new Map,this.init()}),[{key:"init",value:function(){}},{key:"setDefaults",value:function(){return this.previousStep=null,this.currentStep=null,this.nextStep=null,this.fromStep=null,this.toStep=null,this.previousStepIndex=-1,this.currentStepIndex=-1,this.nextStepIndex=-1,this.fromStepIndex=-1,this.toStepIndex=-1,this.steps=[],this.isDisplayed=!1,this}},{key:"setTour",value:function(t){return this.tour=t,this}},{key:"getTour",value:function(){return this.tour}},{key:"setOptions",value:function(t){return this.options=(0,h.default)(this.constructor.getDefaultOptions(),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(a=(0,u.default)(o.default.mark((function t(){var e,r,n,i,s,a,u=arguments;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=u.length>0&&void 0!==u[0]?u[0]:0,r=!(u.length>1&&void 0!==u[1])||u[1],this.isDisplayed=!0,this.mountOverlayEl(),this.startPreloader(),n=u.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=u[s];return t.next=8,this.emit.apply(this,["onStart"].concat(i));case 8:if(this.stopPreloader(),this.tour&&this.tour.length){t.next=13;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 13:if(this.steps=this.sortSteps(this.getSteps(this.tour)),this.steps.length){t.next=18;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 18:return document.body.classList.add(this.constructor.getBodyClass()),t.next=21,this.go.apply(this,[e,r].concat(i));case 21:return a=t.sent,this.isDisplayed=a,document.body.classList.toggle(this.constructor.getBodyClass(),a),a&&(this.options.useKeyboard&&this.addOnKeydownListener(),this.addOnWindowResizeListener(),this.addOnWindowScrollListener()),t.abrupt("return",a);case 26:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"go",value:(n=(0,u.default)(o.default.mark((function t(e){var r,n,i,s,a,u,c,l,p,f,h,d,v,g,y,m,b,x=this,S=arguments;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=!(S.length>1&&void 0!==S[1])||S[1],n=S.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=S[s];if(this.isDisplayed&&this.steps.length){t.next=4;break}return t.abrupt("return",!1);case 4:if(a=r?parseInt(e,10):e,!this.currentStep){t.next=9;break}if(!(r?this.currentStepIndex===a:this.currentStep.step===a)){t.next=9;break}return t.abrupt("return",!1);case 9:if(u=this.currentStep,c=this.currentStepIndex,l=r?this.steps[a]:this.steps.filter((function(t){return t.step===a}))[0]){t.next=14;break}return t.abrupt("return",!1);case 14:if(p=this.steps.indexOf(l),h=p,d=(f=l).onBeforeChange,v=f.onAfterChange,this.startPreloader(),g=!1,!d){t.next=26;break}return t.next=23,Promise.resolve().then((function(){return d.call.apply(d,[x,f,u].concat(i))}));case 23:if(t.t0=t.sent,!1!==t.t0){t.next=26;break}g=!0;case 26:return t.next=28,this.emit.apply(this,["onBeforeChange",f,u].concat(i));case 28:if(!t.sent.some((function(t){return!1===t}))){t.next=30;break}g=!0;case 30:if(this.stopPreloader(),!g){t.next=33;break}return t.abrupt("return",!1);case 33:return this.beforeChangeStep({toStep:f,toStepIndex:h,currentStep:l,currentStepIndex:p,fromStep:u,fromStepIndex:c}),this.toStep=f,this.toStepIndex=h,this.currentStep=l,this.currentStepIndex=p,this.fromStep=u,this.fromStepIndex=c,this.previousStep=this.steps[this.currentStepIndex-1]||null,this.previousStepIndex=this.previousStep?this.currentStepIndex-1:-1,this.nextStep=this.steps[this.currentStepIndex+1]||null,this.nextStepIndex=this.nextStep?this.currentStepIndex+1:-1,y=this.options.scrollBehavior,m=this.currentStep.scrollPadding,b=void 0===m?this.options.scrollPadding:m,this.scrollParentsToStepEl(),this.scrollTo(this.getStepEl(this.currentStep,!0),y,b),this.mountStep(),setTimeout((function(){x.getEl("tooltip")&&x.scrollTo(x.getEl("tooltip"),y,b)}),300),v&&v.call.apply(v,[this,this.toStep,this.fromStep].concat(i)),this.emit.apply(this,["onAfterChange",this.toStep,this.fromStep].concat(i)),t.abrupt("return",!0);case 53:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"previous",value:(r=(0,u.default)(o.default.mark((function t(){var e,r,n,i,s=this,a=arguments;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=a.length,r=new Array(e),n=0;n<e;n++)r[n]=a[n];if(this.isDisplayed&&this.currentStep&&this.previousStep){t.next=3;break}return t.abrupt("return",!1);case 3:if(i=this.currentStep.onPrevious,this.startPreloader(),!i){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return i.call.apply(i,[s,s.previousStep,s.currentStep].concat(r))}));case 8:if(t.t0=t.sent,!1!==t.t0){t.next=12;break}return this.stopPreloader(),t.abrupt("return",!1);case 12:return t.next=14,this.emit.apply(this,["onPrevious",this.previousStep,this.currentStep].concat(r));case 14:if(!t.sent.some((function(t){return!1===t}))){t.next=17;break}return this.stopPreloader(),t.abrupt("return",!1);case 17:return this.stopPreloader(),t.abrupt("return",this.go.apply(this,[this.previousStepIndex,!0].concat(r)));case 19:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"next",value:(e=(0,u.default)(o.default.mark((function t(){var e,r,n,i,s=this,a=arguments;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=a.length,r=new Array(e),n=0;n<e;n++)r[n]=a[n];if(this.isDisplayed&&this.currentStep&&this.nextStep){t.next=3;break}return t.abrupt("return",!1);case 3:if(i=this.currentStep.onNext,this.startPreloader(),!i){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return i.call.apply(i,[s,s.nextStep,s.currentStep].concat(r))}));case 8:if(t.t0=t.sent,!1!==t.t0){t.next=12;break}return this.stopPreloader(),t.abrupt("return",!1);case 12:return t.next=14,this.emit.apply(this,["onNext",this.nextStep,this.currentStep].concat(r));case 14:if(!t.sent.some((function(t){return!1===t}))){t.next=17;break}return this.stopPreloader(),t.abrupt("return",!1);case 17:return this.stopPreloader(),t.abrupt("return",this.go.apply(this,[this.nextStepIndex,!0].concat(r)));case 19:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"stop",value:(t=(0,u.default)(o.default.mark((function t(){var e,r,n,i=arguments;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isDisplayed){t.next=2;break}return t.abrupt("return",this);case 2:for(e=i.length,r=new Array(e),n=0;n<e;n++)r[n]=i[n];if(this.currentStepIndex!==this.steps.length-1){t.next=8;break}return this.startPreloader(),t.next=7,this.emit.apply(this,["onComplete"].concat(r));case 7:this.stopPreloader();case 8:return this.startPreloader(),t.next=11,this.emit.apply(this,["onStop"].concat(r));case 11:return this.stopPreloader(),document.body.classList.remove(this.constructor.getBodyClass()),this.removeListeners(),this.unobserveStep(),this.unmountStep(),this.removeOverlayEl(),this.cache.clear(),this.elements.clear(),this.setDefaults(),t.abrupt("return",this);case 21: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(t){var e=this,r="data-guidechimp",n=Array.from(document.querySelectorAll("[".concat(r,"-tour*='").concat(t,"']")));n=n.filter((function(t){return t.getAttribute("".concat(r,"-tour")).split(",").includes(e.tour)}));var o=new RegExp("^".concat(r,"-").concat(t,"-[^-]+$")),i=new RegExp("^".concat(r,"-[^-]+$"));return n.map((function(n,s){for(var a={},u=0;u<n.attributes.length;u++){var c=n.attributes[u],l=c.name,p=c.value,f=o.test(l),h=!f&&i.test(l);if(f||h){var d=f?l.replace("".concat(r,"-").concat(t,"-"),""):l.replace("".concat(r,"-"),"");"tour"!==d&&(f||h&&!a[d])&&(a[d]=p)}}return T(T({step:s,title:"",description:"",position:e.options.position,interaction:e.options.interaction},a),{},{element:n})}))}},{key:"getJsSteps",value:function(t){return t.map((function(t,e){return T(T({},t),{},{step:t.step||e})}))}},{key:"sortSteps",value:function(t){return(0,s.default)(t).sort((function(t,e){return t.step<e.step?-1:t.step>e.step?1:0}))}},{key:"getStepEl",value:function(t){var e=(t||{}).element;if(!e)return this.mountFakeStepEl();var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return("string"==typeof t?document.querySelector(t):t)||e}(e);return r&&"none"!==r.style.display&&"hidden"!==r.style.visibility||(r=this.getEl("fakeStep")?this.getEl("fakeStep"):this.mountFakeStepEl()),r}},{key:"scrollParentsToStepEl",value:function(){var t=this.currentStep.scrollPadding,e=void 0===t?this.options.scrollPadding:t;return this.scrollParentsToEl(this.getStepEl(this.currentStep),e)}},{key:"getScrollableParentsEls",value:function(t){for(var e=[],r=t;r&&r!==r.ownerDocument.body;)r=this.getScrollableParentEl(r),e.push(r);return e}},{key:"getScrollableParentEl",value:function(t){var e=/(auto|scroll)/,r=getComputedStyle(t),n=t.ownerDocument;return"fixed"===r.getPropertyValue("position")?n.body:function t(o){if(!o||o===n.body)return n.body;var i=getComputedStyle(o);if("fixed"===r.getPropertyValue("position")&&"static"===i.getPropertyValue("position"))return t(o.parentElement);var s=i.getPropertyValue("overflow-x"),a=i.getPropertyValue("overflow-y");return e.test(s)||e.test(a)?o:t(o.parentElement)}(t.parentElement)}},{key:"scrollParentsToEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.getScrollableParentsEls(t).forEach((function(r){r!==document.body&&(r.scrollTop=t.offsetTop-r.offsetTop-e,r.scrollLeft=t.offsetLeft-r.offsetLeft-e)})),this}},{key:"scrollTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=t.getBoundingClientRect(),o=n.top,i=n.bottom,s=n.left,a=n.right,u=window,c=u.innerWidth,l=u.innerHeight;return s>=0&&a<=c||window.scrollBy({behavior:e,left:s-r}),o>=0&&i<=l||window.scrollBy({behavior:e,top:o-r}),this}},{key:"highlightStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.getStepEl(this.currentStep),r=this.getEl("overlay");if(r){var n=r.querySelector("path"),o=n.querySelector("animate"),i=this.isEl(e,"fakeStep"),s=i?this.getOverlayDocumentPath():this.getOverlayStepPath(this.currentStep);if(n.setAttribute("d",s),o){if(o.getAttribute("lock")||(o.setAttribute("from",s),o.setAttribute("to",s)),t){var a=this.isEl(this.getStepEl(this.fromStep),"fakeStep"),u=!this.fromStep||a||i?null:this.getOverlayStepPath(this.fromStep);u&&(o.setAttribute("from",u),o.setAttribute("to",s)),o.setAttribute("lock","true")}o.onend=function(){o.removeAttribute("lock")},o.beginElement()}}var c=getComputedStyle(e);return["absolute","relative","fixed"].includes(c.getPropertyValue("position"))||e.classList.add(this.constructor.getRelativePositionClass()),e.classList.add(this.constructor.getHighlightClass()),e.setAttribute("data-guidechimp-".concat(this.uid),"highlight"),this.elements.set("highlight",e),this}},{key:"resetHighlightStepEl",value:function(){var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),r=t.querySelector("animate");e.setAttribute("d",this.getOverlayDocumentPath()),r&&(r.removeAttribute("from"),r.removeAttribute("to"))}var n=this.getStepEl(this.currentStep);return n.classList.remove(this.constructor.getRelativePositionClass()),n.classList.remove(this.constructor.getHighlightClass()),n.removeAttribute("data-guidechimp-".concat(this.uid)),this.elements.delete("highlight"),this}},{key:"setInteractionPosition",value:function(t){var e=this.getStepEl(this.currentStep);if(!t||!e)return this;var r=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(r=0);var n=this.constructor.getOffset(e),o=n.width,i=n.height,s=n.top,a=n.left;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(e)),t.style.cssText="width: ".concat(o+r,"px;\n height: ").concat(i+r,"px;\n top: ").concat(s-r/2,"px;\n left: ").concat(a-r/2,"px;"),this}},{key:"setControlPosition",value:function(t){var e=this.getStepEl(this.currentStep);if(!t||!e)return this;var r=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(r=0);var n=e.ownerDocument.defaultView.scrollX,o=e.ownerDocument.documentElement.getBoundingClientRect().width,i=this.constructor.getOffset(e),s=i.height,a=i.top,u=i.left,c=i.right,l=s+r,p=a-r/2,f=n<n+(u-r/2)?n:u-r/2,h=n+o>n+(c+r/2)?o:c+r/2;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(e)),t.style.cssText="width: ".concat(h,"px;\n height: ").concat(l,"px;\n top: ").concat(p,"px;\n left: ").concat(f,"px;"),this}},{key:"setTooltipPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.currentStep)return this;var r=this.getStepEl(this.currentStep);if(!t||!r)return this;var n=e.boundary,o=e.position,s=this.options.padding;n=n||window;var a=(o=(o=o||this.currentStep.position)||this.options.position).split("-"),u=(0,i.default)(a,2),c=u[0],l=u[1];"floating"===getComputedStyle(r).getPropertyValue("position")&&(s=0);var p=t.style;p.top=null,p.right=null,p.bottom=null,p.left=null,p.transform=null;var f=r.getBoundingClientRect(),h=f.top,d=f.bottom,v=f.left,g=f.right,y=f.width,m=f.height,b=t.getBoundingClientRect(),x=b.height,S=b.width,w=t.cloneNode(!0);w.style.visibility="hidden",w.innerHTML="",t.parentElement.appendChild(w);var E=w.getBoundingClientRect().width;w.parentElement.removeChild(w);var _=new DOMRect(0,0,window.innerWidth,window.innerHeight);if(!(n instanceof Window)){var k=n.getBoundingClientRect(),O=k.x,P=k.y;_=new DOMRect(O,P,n.scrollWidth,n.scrollHeight)}var j=_,L=j.top,A=j.bottom,M=j.left,T=j.right;if(this.isEl(r,"fakeStep"))c="floating";else{var C=["bottom","right","left","top"],D=getComputedStyle(t),I=D.marginTop,z=D.marginLeft,R=D.marginRight,N=D.marginBottom;if(I=parseInt(I,10),z=parseInt(z,10),R=parseInt(R,10),x+I+(N=parseInt(N,10))>h-L&&C.splice(C.indexOf("top"),1),x+I+N>A-d&&C.splice(C.indexOf("bottom"),1),E+z+R>v-M&&C.splice(C.indexOf("left"),1),E+z+R>T-g&&C.splice(C.indexOf("right"),1),"top"===(c=C.length?C.includes(c)?c:C[0]:"floating")||"bottom"===c){var B=["left","right","middle"];T-v<E&&B.splice(B.indexOf("left"),1),g-M<E&&B.splice(B.indexOf("right"),1),(v+y/2-M<E/2||T-(g-y/2)<E/2)&&B.splice(B.indexOf("middle"),1),l=B.length?B.includes(l)?l:B[0]:"middle"}}t.setAttribute("data-guidechimp-position",c);var W=document.documentElement;switch(c){case"top":p.bottom="".concat(m+s,"px");break;case"right":p.left="".concat(g+s/2-W.clientLeft,"px");break;case"left":p.right="".concat(W.clientWidth-(v-s/2),"px");break;case"bottom":p.top="".concat(m+s,"px");break;default:p.left="50%",p.top="50%",p.transform="translate(-50%,-50%)"}if(t.removeAttribute("data-guidechimp-alignment"),l)switch(t.setAttribute("data-guidechimp-alignment",l),l){case"left":p.left="".concat(v-s/2,"px");break;case"right":p.right="".concat(W.clientWidth-g-s/2,"px");break;default:v+y/2<S/2||v+y/2+S/2>W.clientWidth?p.left="".concat(W.clientWidth/2-S/2,"px"):p.left="".concat(v+y/2-S/2,"px")}return this}},{key:"startPreloader",value:function(){document.body.classList.add(this.constructor.getLoadingClass());var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),r=t.querySelector("animate"),n=new Map;n.set("d",e.getAttribute("d")),e.setAttribute("d",this.getOverlayDocumentPath()),r&&(n.set("from",r.getAttribute("from")),n.set("to",r.getAttribute("to")),r.removeAttribute("from"),r.removeAttribute("to")),this.cache.set("preloaderCache",n)}var o=this.mountPreloaderEl();return o.hidden=!0,setTimeout((function(){o.hidden=!1}),100),this}},{key:"stopPreloader",value:function(){document.body.classList.remove(this.constructor.getLoadingClass());var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),r=t.querySelector("animate"),n=this.cache.get("preloaderCache")||new Map;n.has("d")&&e.setAttribute("d",n.get("d")),r&&(n.has("from")&&r.setAttribute("from",n.get("from")),n.has("to")&&r.setAttribute("to",n.get("to"))),this.cache.delete("preloaderCache")}return this.removePreloaderEl(),this}},{key:"getDefaultTmplData",value:function(){var t=this;return{previousStep:this.previousStep,currentStep:this.currentStep,nextStep:this.nextStep,fromStep:this.fromStep,toStep:this.toStep,previousStepIndex:this.previousStepIndex,currentStepIndex:this.currentStepIndex,nextStepIndex:this.nextStepIndex,fromStepIndex:this.fromStepIndex,toStepIndex:this.toStepIndex,steps:this.steps,go:function(){return t.go.apply(t,arguments)},previous:function(){return t.previous.apply(t,arguments)},next:function(){return t.next.apply(t,arguments)},stop:function(){return t.stop.apply(t,arguments)}}}},{key:"mountStep",value:function(){var t=this.mountInteractionEl(),e=this.mountControlEl();return this.setInteractionPosition(t),this.setControlPosition(e),this.setTooltipPosition(this.getEl("tooltip")),this.observeStep(),this.highlightStepEl(!0),this}},{key:"unmountStep",value:function(){return this.resetHighlightStepEl(),this.removeInteractionEl(),this.removeControlEl(),this.removePreloaderEl(),this.removeFakeStepEl(),this}},{key:"createEl",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||!(0,f.default)(e))throw Error('"'.concat(t,'" template is missing or is not a function, \n please check your templates.').concat(t," option"));var n=e.call(this,r);return n&&n.setAttribute("data-quidechimp-".concat(this.uid),t),n}},{key:"getEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.elements.get(t);return r||(r=document.querySelector("[data-quidechimp-".concat(this.uid,'="').concat(t,'"]'))),r||e}},{key:"mountEl",value:function(t,e){var r=this;if(t){var n=t.querySelectorAll("[data-quidechimp-".concat(this.uid,"]"));[t].concat((0,s.default)(n)).forEach((function(t){var e=t.getAttribute("data-quidechimp-".concat(r.uid));e&&(r.removeEl(e),r.elements.set(e,t))})),e.appendChild(t)}return t}},{key:"removeEl",value:function(t){var e=this.getEl(t);return e&&e.parentElement.removeChild(e),this.elements.delete(t),this}},{key:"isEl",value:function(t,e){return this.getEl(e)?t===this.getEl(e):t.getAttribute("data-quidechimp-".concat(this.uid))===e}},{key:"createFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("fakeStep",this.options.templates.fakeStep,T(T({},this.getDefaultTmplData()),t))}},{key:"mountFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createFakeStepEl(t),document.body)}},{key:"removeFakeStepEl",value:function(){return this.removeEl("fakeStep")}},{key:"createPreloaderEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("preloader",this.options.templates.preloader,t)}},{key:"mountPreloaderEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createPreloaderEl(t),document.body)}},{key:"removePreloaderEl",value:function(){return this.removeEl("preloader")}},{key:"getOverlayDocumentPath",value:function(){var t=window,e=t.innerWidth,r=t.innerHeight,n=document.body,o=n.scrollWidth,i=n.scrollHeight,s=r>i?r:i;return"M 0 0 H ".concat(e>o?e:o," V ").concat(s," H 0 V 0 Z")}},{key:"getOverlayStepPath",value:function(t){return this.getOverlayElPath(this.getStepEl(t))}},{key:"getOverlayElPath",value:function(t){var e=this.options.padding;e=e?e/2:0;var r=t.getBoundingClientRect(),n=r.left,o=r.top,i=r.width,s=r.height,a=this.getOverlayDocumentPath();return a+="M ".concat(n-e+4," ").concat(o-e,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(s+o+e-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(i+n+e-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(o-e+4,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",-").concat(4,"Z")}},{key:"createOverlayEl",value:function(){var t,e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={stop:(t=(0,u.default)(o.default.mark((function t(){var r=arguments;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.options.exitOverlay){t.next=3;break}return t.next=3,e.stop.apply(e,r);case 3:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),path:this.getOverlayDocumentPath()};return this.createEl("overlay",this.options.templates.overlay,T(T({},n),r))}},{key:"mountOverlayEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createOverlayEl(t),document.body)}},{key:"removeOverlayEl",value:function(){return this.removeEl("overlay")}},{key:"createInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.interaction;"boolean"==typeof this.currentStep.interaction&&(e=this.currentStep.interaction);var r=T(T({},this.getDefaultTmplData()),{},{interaction:e});return this.createEl("interaction",this.options.templates.interaction,T(T({},r),t))}},{key:"mountInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createInteractionEl(t),document.body)}},{key:"removeInteractionEl",value:function(){return this.removeEl("interaction")}},{key:"createControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("control",this.options.templates.control,T(T({},this.getDefaultTmplData()),{},{tooltip:this.createTooltipEl(t)},t))}},{key:"mountControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createControlEl(t),document.body)}},{key:"removeControlEl",value:function(){return this.removeEl("control")}},{key:"createTooltipEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=T(T({},this.getDefaultTmplData()),{},{progressbar:this.createProgressbarEl(t),title:this.createTitleEl(t),description:this.createDescriptionEl(t),close:this.createCloseEl(t),customButtons:this.createCustomButtonsEl(t),previous:this.createPreviousEl(t),pagination:this.createPaginationEl(t),next:this.createNextEl(t),copyright:this.createCopyrightEl(t),notification:this.createNotificationEl(t)});return this.createEl("tooltip",this.options.templates.tooltip,T(T({},e),t))}},{key:"createCloseEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("close",this.options.templates.close,T(T({},this.getDefaultTmplData()),t))}},{key:"createProgressbarEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showProgressbar;"boolean"==typeof this.currentStep.showProgressbar&&(e=this.currentStep.showProgressbar);var r=(this.currentStepIndex+1)/this.steps.length*100,n=T(T({},this.getDefaultTmplData()),{},{showProgressbar:e,progressMax:100,progressMin:0,progress:r});return this.createEl("progressbar",this.options.templates.progressbar,T(T({},n),t))}},{key:"createTitleEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.title,r=void 0===e?"":e;return this.createEl("title",this.options.templates.title,T(T({},this.getDefaultTmplData()),{},{title:r},t))}},{key:"createDescriptionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.description,r=void 0===e?"":e;return this.createEl("description",this.options.templates.description,T(T({},this.getDefaultTmplData()),{},{description:r},t))}},{key:"createCustomButtonsEl",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];return this.currentStep.buttons&&this.currentStep.buttons.forEach((function(e){var n=e;if(!(0,d.default)(n)){var o=e.onClick,i=e.tagName,s=void 0===i?"button":i,a=e.title,u=void 0===a?"":a,c=e.class;(n=document.createElement(s)).innerHTML=u,c&&(n.className=c),o&&n.addEventListener("click",(function(e){o.call(t,e)}))}r.push(n)})),this.createEl("customButtons",this.options.templates.customButtons,T(T({},this.getDefaultTmplData()),{},{buttons:r},e))}},{key:"createPaginationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.pagination,r=void 0===e?this.options.pagination:e,n=this.options.showPagination;return"boolean"==typeof this.currentStep.showPagination&&(n=this.currentStep.showPagination),this.createEl("pagination",this.options.templates.pagination,T(T({},this.getDefaultTmplData()),{},{showPagination:n,pagination:r},t))}},{key:"createPreviousEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("previous",this.options.templates.previous,T(T({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"createNextEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("next",this.options.templates.next,T(T({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"createCopyrightEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("copyright",this.constructor.getDefaultOptions().templates.copyright,T(T({},this.getDefaultTmplData()),t))}},{key:"createNotificationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("notification",this.options.templates.notification,T(T({},this.getDefaultTmplData()),{},{messages:this.notifications},t))}},{key:"notify",value:function(t){this.notifications.push(t);var e=this.getEl("notification");return e&&this.mountEl(this.createNotificationEl(),e.parentElement),this}},{key:"on",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.constructor.getEventListenersPriorities(),o=(0,i.default)(n,1)[0];r.priority&&n.includes(r.priority)&&(o=r.priority);var s=t.trim();return this.listeners[s]=this.listeners[s]||{},this.listeners[s][o]=this.listeners[s][o]||[],this.listeners[s][o].push(e),this}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var i=(0,s.default)(this.constructor.getEventListenersPriorities()).reverse(),a=t.trim(),u=[],c=Promise.resolve(u);return this.listeners[a]&&i.forEach((function(t){var r=e.listeners[a][t];r&&(c=c.then((function(){return Promise.all(r.map((function(t){return Promise.resolve().then((function(){return t.apply(e,n)}))})))})).then((function(t){return u=[].concat((0,s.default)(u),(0,s.default)(t))})))})),c}},{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 t=this;return function(e){var r=e.keyCode,n=T(T({},t.constructor.getDefaultKeyboardCodes()),t.options.useKeyboard),o=n.previous,i=n.next,s=n.stop;s&&s.includes(r)?t.stop({event:e}):o&&o.includes(r)?t.previous({event:e}):i&&i.includes(r)&&t.next({event:e})}}},{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:"addOnWindowScrollListener",value:function(){return this.cache.set("onWindowScrollListener",this.getOnWindowScrollListener()),window.addEventListener("scroll",this.cache.get("onWindowScrollListener"),!0),this}},{key:"getOnWindowScrollListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowScrollListener",value:function(){return this.cache.has("onWindowScrollListener")&&(window.removeEventListener("scroll",this.cache.get("onWindowScrollListener"),!0),this.cache.delete("onWindowScrollListener")),this}},{key:"removeListeners",value:function(){this.removeOnKeydownListener(),this.removeOnWindowResizeListener(),this.removeOnWindowScrollListener()}},{key:"observeStep",value:function(){this.observeResizing(),this.observeMutation()}},{key:"observeResizing",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{box:"border-box"},r=this.observers.resizingObserver;return r||"undefined"==typeof ResizeObserver||(r=new ResizeObserver((function(){(t||t.currentStep)&&t.refresh()})),this.observers.resizingObserver=r),!!r&&(r.observe(this.getStepEl(this.currentStep),e),!0)}},{key:"unobserveResizing",value:function(){var t=this.observers.resizingObserver;return!!t&&(t.disconnect(),!0)}},{key:"observeMutation",value:function(){var t=this,e=this.observers.mutationObserver;return e||(e=new MutationObserver((function(e){if((t||t.currentStep)&&t.currentStep.element){var r=t.getStepEl(t.currentStep),n=function(){return r&&!t.isEl(r,"fakeStep")};e.forEach((function(e){n()?"childList"===e.type&&e.removedNodes.length&&e.removedNodes.forEach((function(e){(e===r||e.contains(r))&&(r=t.getStepEl(t.currentStep),t.scrollParentsToStepEl(),t.refresh())})):"childList"===e.type&&e.addedNodes.length&&(r=t.getStepEl(t.currentStep),n()&&(t.scrollParentsToStepEl(),t.refresh()))}))}})),this.observers.mutationObserver=e),e.observe(this.getStepEl(this.currentStep).ownerDocument.body,{childList:!0,subtree:!0}),!0}},{key:"unobserveMutation",value:function(){var t=this.observers.mutationObserver;return!!t&&(t.disconnect(),!0)}},{key:"unobserveStep",value:function(){this.unobserveResizing(),this.unobserveMutation()}},{key:"beforeChangeStep",value:function(){this.unmountStep(),this.unobserveStep()}},{key:"refresh",value:function(){return this.currentStep?(this.highlightStepEl(),this.setControlPosition(this.getEl("control")),this.setInteractionPosition(this.getEl("interaction")),this.setTooltipPosition(this.getEl("tooltip")),this):this}}],[{key:"getDefaultOptions",value:function(){return{position:"bottom",useKeyboard:!0,exitEscape:!0,exitOverlay:!0,showPagination:!0,showNavigation:!0,showProgressbar:!0,pagination:{theme:"circles",circles:{maxItems:10},numbers:{delimiter:"...",visibleSteps:5}},interaction:!0,padding:8,scrollPadding:10,scrollBehavior:"auto",templates:{close:P.default,copyright:j.default,next:O.default,previous:_.default,progressbar:x.default,title:S.default,description:w.default,customButtons:E.default,pagination:k.default,notification:L.default,tooltip:b.default,fakeStep:A.default,control:m.default,interaction:y.default,preloader:g.default,overlay:v.default}}}},{key:"getDefaultKeyboardCodes",value:function(){return{previous:[37],next:[39,13,32],stop:[27]}}},{key:"getEventListenersPriorities",value:function(){return["low","medium","high","critical"]}},{key:"getBodyClass",value:function(){return"gc"}},{key:"getLoadingClass",value:function(){return"gc-loading"}},{key:"getHighlightClass",value:function(){return"gc-highlight"}},{key:"getFixedClass",value:function(){return"gc-fixed"}},{key:"getRelativePositionClass",value:function(){return"gc-relative"}},{key:"getOffset",value:function(t){var e=t.ownerDocument,r=e.body,n=e.documentElement,o=e.defaultView,i=o.scrollY||n.scrollTop||r.scrollTop,s=o.scrollX||n.scrollLeft||r.scrollLeft,a=t.getBoundingClientRect(),u=a.top,c=a.right,l=a.bottom,p=a.left;return{right:c,bottom:l,width:a.width,height:a.height,x:a.x,y:a.y,top:u+i,left:p+s}}},{key:"isFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isFixed(e))}}]);var t,e,r,n,a}()},1478:function(t,e,r){"use strict";var n=r(4994),o=n(r(9646)),i=n(r(4823));r(9960);var s=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return(0,o.default)(i.default,e)};s.prototype=i.default.prototype,s.plugins=new Set,s.extend=function(t){if(!s.plugins.has(t)){s.plugins.add(t);for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];t.apply(void 0,[i.default,s].concat(r))}return s},t.exports=s},8126:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.stop,r=(0,o.default)('<div class="gc-close" />').element;return r.addEventListener("click",(function(t){e(t)})),r}},3783:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.tooltip,r=(0,o.default)('<div class="gc-control" />').element;return r.append(e),r}},4531:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(){return(0,o.default)('<div class="gc-copyright">Made with GuideChimp</div>').element}},4290:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.buttons;if(e&&e.length){var r=(0,o.default)('<div ref="buttonsEl" class="gc-custom-buttons" />'),n=r.refs.buttonsEl,i=r.element;return e.forEach((function(t){n.append(t)})),i}return null}},1920:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.description;return e?(0,o.default)('<div class="gc-description">'.concat(e,"</div>")).element:null}},2411:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(){return(0,o.default)('<div class="gc-fake-step"></div>').element}},3534:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){return t.interaction?null:(0,o.default)('<div class="gc-interaction gc-disable"/>').element}},9289:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.nextStep,r=t.showNavigation,n=t.next,i=e&&r?"":"gc-hidden",s=(0,o.default)('<div class="gc-navigation-next '.concat(i,'" />')).element;return s.addEventListener("click",(function(t){n(t)})),s}},4175:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.messages;return e.length?(0,o.default)('<div class="gc-notification">'.concat(e[0],"</div>")).element:null}},8534:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.path,r=t.stop,n=(0,o.default)('\n <div class="gc-overlay">\n <svg class="svg-overlay">\n <path d="'.concat(e,'">\n <animate attributeName="d"\n dur="200ms" />\n </path>\n </svg>\n </div>\n ')).element;return n.addEventListener("click",(function(t){r(t)})),n}},2880:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.showPagination,r=t.steps,n=t.pagination,i=t.currentStepIndex,s=t.previousStepIndex,a=t.nextStepIndex,u=t.previous,c=t.next,l=t.go;if(e&&r.length>1){var p=n.theme,f=n.circles,h=n.numbers,d="numbers"===p||r.length>=f.maxItems,v=r.length-1,g=(0,o.default)('<div class="gc-pagination" />').element,y=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=(0,o.default)("<".concat(t,' class="gc-pagination-item">').concat(r,"</").concat(t,">")).element;return e===s?(n.classList.add("gc-pagination-item-previous"),n.addEventListener("click",(function(t){u(t)}))):e===a?(n.classList.add("gc-pagination-item-next"),n.addEventListener("click",(function(t){c(t)}))):(e===i&&n.classList.add("gc-pagination-item-current","gc-pagination-active"),n.addEventListener("click",(function(t){l(e,!0,t)}))),n};if(d){var m=(0,o.default)('<ul class="gc-pagination-theme-numbers" />').element,b=Math.floor(h.visibleSteps/2),x=i-b;v-i<b&&(x=v-h.visibleSteps);var S=i+b;S<h.visibleSteps-1&&(S=h.visibleSteps-1);for(var w=0;w<r.length;)w>0&&w<r.length-1&&(w<x||w>S)?(m.append((0,o.default)('<li class="gc-pagination-dots">'.concat(h.delimiter,"</li>")).element),w=w<x?x:r.length-1):(m.append(y("li",w,String(w+1))),w+=1);g.append(m)}else{var E=(0,o.default)('<div class="gc-pagination-theme-circles" />').element;r.forEach((function(t,e){E.append(y("div",e))})),g.append(E)}return g}return null}},4576:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(){return(0,o.default)('<div class="gc-preloader" />').element}},7869:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.showNavigation,r=t.previousStep,n=t.previous,i=r&&e?"":"gc-hidden",s=(0,o.default)('<div ref="prevEl" class="gc-navigation-prev '.concat(i,'"/>')),a=s.refs.prevEl,u=s.element;return a.addEventListener("click",(function(t){n(t)})),u}},3566:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.showProgressbar,r=t.progressMin,n=t.progressMax,i=t.progress;return e?(0,o.default)(' \n <div class="gc-progressbar"\n role="progressbar"\n aria-valuemin="'.concat(r,'"\n aria-valuemax="').concat(n,'"\n aria-valuenow="').concat(i,'"\n style="width:').concat(i,'%;"\n />')).element:null}},804:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.title;return e?(0,o.default)('<div class="gc-title">'.concat(e,"</div>")).element:null}},7137:function(t,e,r){"use strict";var n=r(4994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(4702));e.default=function(t){var e=t.progressbar,r=t.title,n=t.description,i=t.close,s=t.customButtons,a=t.previous,u=t.pagination,c=t.next,l=t.copyright,p=t.notification,f=(0,o.default)('\n <div class="gc-tooltip">\n <div class="gc-tooltip-tail">\n </div>\n ').element;if(e&&f.append(e),r&&f.append(r),n&&f.append(n),i&&f.append(i),s&&f.append(s),a||u||c){var h=(0,o.default)('<div class="gc-navigation" />').element;a&&h.append(a),u&&h.append(u),c&&h.append(c),f.append(h)}return l&&f.append(l),p&&f.append(p),f}},5135:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){return t instanceof HTMLElement||/^\[object HTML(.+)Element\]$/.test("".concat(t))}},4702:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){var e=(new DOMParser).parseFromString(t,"text/html"),r=e.body.firstElementChild,n={};return r&&e.body.querySelectorAll("[ref]").forEach((function(t){n[t.getAttribute("ref")]=t,t.removeAttribute("ref")})),{refs:n,element:r}}},1549:function(t,e,r){var n=r(2032),o=r(3862),i=r(6721),s=r(2749),a=r(5749);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,t.exports=u},2460:function(t,e,r){var n=r(3702),o=r(80),i=r(4739),s=r(8655),a=r(1175);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,t.exports=u},8223:function(t,e,r){var n=r(6110)(r(9325),"Map");t.exports=n},3661:function(t,e,r){var n=r(3040),o=r(7670),i=r(289),s=r(4509),a=r(2949);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,t.exports=u},7217:function(t,e,r){var n=r(2460),o=r(1420),i=r(938),s=r(3605),a=r(9817),u=r(945);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,t.exports=c},1873:function(t,e,r){var n=r(9325).Symbol;t.exports=n},7828:function(t,e,r){var n=r(9325).Uint8Array;t.exports=n},1033:function(t){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},695:function(t,e,r){var n=r(8096),o=r(2428),i=r(6449),s=r(3656),a=r(361),u=r(7167),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=i(t),l=!r&&o(t),p=!r&&!l&&s(t),f=!r&&!l&&!p&&u(t),h=r||l||p||f,d=h?n(t.length,String):[],v=d.length;for(var g in t)!e&&!c.call(t,g)||h&&("length"==g||p&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,v))||d.push(g);return d}},4932:function(t){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}},7805:function(t,e,r){var n=r(3360),o=r(5288);t.exports=function(t,e,r){(void 0!==r&&!o(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},6547:function(t,e,r){var n=r(3360),o=r(5288),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var s=t[e];i.call(t,e)&&o(s,r)&&(void 0!==r||e in t)||n(t,e,r)}},6025:function(t,e,r){var n=r(5288);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},3360:function(t,e,r){var n=r(3243);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},9344:function(t,e,r){var n=r(3805),o=Object.create,i=function(){function t(){}return function(e){if(!n(e))return{};if(o)return o(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=i},6649:function(t,e,r){var n=r(3221)();t.exports=n},2552:function(t,e,r){var n=r(1873),o=r(659),i=r(9350),s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):i(t)}},7534:function(t,e,r){var n=r(2552),o=r(346);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},5083:function(t,e,r){var n=r(1882),o=r(7296),i=r(3805),s=r(7473),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,p=c.hasOwnProperty,f=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?f:a).test(s(t))}},4901:function(t,e,r){var n=r(2552),o=r(294),i=r(346),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!s[n(t)]}},2903:function(t,e,r){var n=r(3805),o=r(5527),i=r(181),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=o(t),r=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&r.push(a);return r}},5250:function(t,e,r){var n=r(7217),o=r(7805),i=r(6649),s=r(2824),a=r(3805),u=r(7241),c=r(4974);t.exports=function t(e,r,l,p,f){e!==r&&i(r,(function(i,u){if(f||(f=new n),a(i))s(e,r,u,l,t,p,f);else{var h=p?p(c(e,u),i,u+"",e,r,f):void 0;void 0===h&&(h=i),o(e,u,h)}}),u)}},2824:function(t,e,r){var n=r(7805),o=r(3290),i=r(1961),s=r(3007),a=r(5529),u=r(2428),c=r(6449),l=r(6074),p=r(3656),f=r(1882),h=r(3805),d=r(1331),v=r(7167),g=r(4974),y=r(9884);t.exports=function(t,e,r,m,b,x,S){var w=g(t,r),E=g(e,r),_=S.get(E);if(_)n(t,r,_);else{var k=x?x(w,E,r+"",t,e,S):void 0,O=void 0===k;if(O){var P=c(E),j=!P&&p(E),L=!P&&!j&&v(E);k=E,P||j||L?c(w)?k=w:l(w)?k=s(w):j?(O=!1,k=o(E,!0)):L?(O=!1,k=i(E,!0)):k=[]:d(E)||u(E)?(k=w,u(w)?k=y(w):h(w)&&!f(w)||(k=a(E))):O=!1}O&&(S.set(E,k),b(k,E,m,x,S),S.delete(E)),n(t,r,k)}}},9302:function(t,e,r){var n=r(3488),o=r(6757),i=r(2865);t.exports=function(t,e){return i(o(t,e,n),t+"")}},9570:function(t,e,r){var n=r(7334),o=r(3243),i=r(3488),s=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=s},8096:function(t){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},7556:function(t,e,r){var n=r(1873),o=r(4932),i=r(6449),s=r(4394),a=n?n.prototype:void 0,u=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(s(e))return u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},7301:function(t){t.exports=function(t){return function(e){return t(e)}}},9653:function(t,e,r){var n=r(7828);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},3290:function(t,e,r){t=r.nmd(t);var n=r(9325),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,s=i&&i.exports===o?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}},1961:function(t,e,r){var n=r(9653);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},3007:function(t){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},1791:function(t,e,r){var n=r(6547),o=r(3360);t.exports=function(t,e,r,i){var s=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var c=e[a],l=i?i(r[c],t[c],c,r,t):void 0;void 0===l&&(l=t[c]),s?o(r,c,l):n(r,c,l)}return r}},5481:function(t,e,r){var n=r(9325)["__core-js_shared__"];t.exports=n},999:function(t,e,r){var n=r(9302),o=r(6800);t.exports=function(t){return n((function(e,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(i--,s):void 0,a&&o(r[0],r[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++n<i;){var u=r[n];u&&t(e,u,n,s)}return e}))}},3221:function(t){t.exports=function(t){return function(e,r,n){for(var o=-1,i=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++o];if(!1===r(i[u],u,i))break}return e}}},3243:function(t,e,r){var n=r(6110),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},4840:function(t,e,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},2651:function(t,e,r){var n=r(4218);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},6110:function(t,e,r){var n=r(5083),o=r(392);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},8879:function(t,e,r){var n=r(4335)(Object.getPrototypeOf,Object);t.exports=n},659:function(t,e,r){var n=r(1873),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n?n.toStringTag:vo