siteguide.js 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -339,9 +339,9 @@ export declare type TourConfig = {
339
339
  text?: string;
340
340
  };
341
341
  /**
342
- * Configuration for the intersection
342
+ * Configuration for the interaction
343
343
  */
344
- intersection: {
344
+ interaction?: {
345
345
  /**
346
346
  * Disabling interaction with host element
347
347
  * @default false
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var Xt=Object.defineProperty,Zt=Object.defineProperties;var Gt=Object.getOwnPropertyDescriptors;var et=Object.getOwnPropertySymbols;var St=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable;var Lt=Math.pow,dt=(e,t,n)=>t in e?Xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t)=>{for(var n in t||(t={}))St.call(t,n)&&dt(e,n,t[n]);if(et)for(var n of et(t))Ct.call(t,n)&&dt(e,n,t[n]);return e},X=(e,t)=>Zt(e,Gt(t));var Pt=(e,t)=>{var n={};for(var i in e)St.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&et)for(var i of et(e))t.indexOf(i)<0&&Ct.call(e,i)&&(n[i]=e[i]);return n};var y=(e,t,n)=>dt(e,typeof t!="symbol"?t+"":t,n);var $=(e,t,n)=>new Promise((i,o)=>{var s=a=>{try{c(n.next(a))}catch(l){o(l)}},r=a=>{try{c(n.throw(a))}catch(l){o(l)}},c=a=>a.done?i(a.value):Promise.resolve(a.value).then(s,r);c((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Jt=["top","right","bottom","left"],Tt=["start","end"],Et=Jt.reduce((e,t)=>e.concat(t,t+"-"+Tt[0],t+"-"+Tt[1]),[]),Z=Math.min,Y=Math.max,it=Math.round,N=e=>({x:e,y:e}),Qt={left:"right",right:"left",bottom:"top",top:"bottom"},te={start:"end",end:"start"};function ee(e,t,n){return Y(e,Z(t,n))}function st(e,t){return typeof e=="function"?e(t):e}function J(e){return e.split("-")[0]}function M(e){return e.split("-")[1]}function ne(e){return e==="x"?"y":"x"}function xt(e){return e==="y"?"height":"width"}function yt(e){return["top","bottom"].includes(J(e))?"y":"x"}function wt(e){return ne(yt(e))}function ie(e,t,n){n===void 0&&(n=!1);const i=M(e),o=wt(e),s=xt(o);let r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Rt(r)),[r,Rt(r)]}function oe(e){return e.replace(/start|end/g,t=>te[t])}function Rt(e){return e.replace(/left|right|bottom|top/g,t=>Qt[t])}function se(e){return O({top:0,right:0,bottom:0,left:0},e)}function Bt(e){return typeof e!="number"?se(e):{top:e,right:e,bottom:e,left:e}}function ot(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function Ot(e,t,n){let{reference:i,floating:o}=e;const s=yt(t),r=wt(t),c=xt(r),a=J(t),l=s==="y",h=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,g=i[c]/2-o[c]/2;let d;switch(a){case"top":d={x:h,y:i.y-o.height};break;case"bottom":d={x:h,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-o.width,y:f};break;default:d={x:i.x,y:i.y}}switch(M(t)){case"start":d[r]-=g*(n&&l?-1:1);break;case"end":d[r]+=g*(n&&l?-1:1);break}return d}const re=(e,t,n)=>$(exports,null,function*(){const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,c=s.filter(Boolean),a=yield r.isRTL==null?void 0:r.isRTL(t);let l=yield r.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:f}=Ot(l,i,a),g=i,d={},u=0;for(let p=0;p<c.length;p++){const{name:m,fn:x}=c[p],{x:b,y:v,data:S,reset:_}=yield x({x:h,y:f,initialPlacement:i,placement:g,strategy:o,middlewareData:d,rects:l,platform:r,elements:{reference:e,floating:t}});h=b!=null?b:h,f=v!=null?v:f,d=X(O({},d),{[m]:O(O({},d[m]),S)}),_&&u<=50&&(u++,typeof _=="object"&&(_.placement&&(g=_.placement),_.rects&&(l=_.rects===!0?yield r.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:h,y:f}=Ot(l,g,a)),p=-1)}return{x:h,y:f,placement:g,strategy:o,middlewareData:d}});function ce(e,t){return $(this,null,function*(){var n;t===void 0&&(t={});const{x:i,y:o,platform:s,rects:r,elements:c,strategy:a}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:g=!1,padding:d=0}=st(t,e),u=Bt(d),m=c[g?f==="floating"?"reference":"floating":f],x=ot(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(m))==null||n?m:m.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:h,strategy:a})),b=f==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=yield s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating),S=(yield s.isElement==null?void 0:s.isElement(v))?(yield s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},_=ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:v,strategy:a}):b);return{top:(x.top-_.top+u.top)/S.y,bottom:(_.bottom-x.bottom+u.bottom)/S.y,left:(x.left-_.left+u.left)/S.x,right:(_.right-x.right+u.right)/S.x}})}const le=e=>({name:"arrow",options:e,fn(n){return $(this,null,function*(){const{x:i,y:o,placement:s,rects:r,platform:c,elements:a,middlewareData:l}=n,{element:h,padding:f=0}=st(e,n)||{};if(h==null)return{};const g=Bt(f),d={x:i,y:o},u=wt(s),p=xt(u),m=yield c.getDimensions(h),x=u==="y",b=x?"top":"left",v=x?"bottom":"right",S=x?"clientHeight":"clientWidth",_=r.reference[p]+r.reference[u]-d[u]-r.floating[p],w=d[u]-r.reference[u],C=yield c.getOffsetParent==null?void 0:c.getOffsetParent(h);let L=C?C[S]:0;(!L||!(yield c.isElement==null?void 0:c.isElement(C)))&&(L=a.floating[S]||r.floating[p]);const I=_/2-w/2,F=L/2-m[p]/2-1,z=Z(g[b],F),P=Z(g[v],F),k=z,tt=L-m[p]-P,H=L/2-m[p]/2+I,at=ee(k,H,tt),ft=!l.arrow&&M(s)!=null&&H!==at&&r.reference[p]/2-(H<k?z:P)-m[p]/2<0,ht=ft?H<k?H-k:H-tt:0;return{[u]:d[u]+ht,data:O({[u]:at,centerOffset:H-at-ht},ft&&{alignmentOffset:ht}),reset:ft}})}});function ae(e,t,n){return(e?[...n.filter(o=>M(o)===e),...n.filter(o=>M(o)!==e)]:n.filter(o=>J(o)===o)).filter(o=>e?M(o)===e||(t?oe(o)!==o:!1):!0)}const fe=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,fn(n){return $(this,null,function*(){var i,o,s;const{rects:r,middlewareData:c,placement:a,platform:l,elements:h}=n,z=st(e,n),{crossAxis:f=!1,alignment:g,allowedPlacements:d=Et,autoAlignment:u=!0}=z,p=Pt(z,["crossAxis","alignment","allowedPlacements","autoAlignment"]),m=g!==void 0||d===Et?ae(g||null,u,d):d,x=yield ce(n,p),b=((i=c.autoPlacement)==null?void 0:i.index)||0,v=m[b];if(v==null)return{};const S=ie(v,r,yield l.isRTL==null?void 0:l.isRTL(h.floating));if(a!==v)return{reset:{placement:m[0]}};const _=[x[J(v)],x[S[0]],x[S[1]]],w=[...((o=c.autoPlacement)==null?void 0:o.overflows)||[],{placement:v,overflows:_}],C=m[b+1];if(C)return{data:{index:b+1,overflows:w},reset:{placement:C}};const L=w.map(P=>{const k=M(P.placement);return[P.placement,k&&f?P.overflows.slice(0,2).reduce((tt,H)=>tt+H,0):P.overflows[0],P.overflows]}).sort((P,k)=>P[1]-k[1]),F=((s=L.filter(P=>P[2].slice(0,M(P[0])?2:3).every(k=>k<=0))[0])==null?void 0:s[0])||L[0][0];return F!==a?{data:{index:b+1,overflows:w},reset:{placement:F}}:{}})}}};function he(e,t){return $(this,null,function*(){const{placement:n,platform:i,elements:o}=e,s=yield i.isRTL==null?void 0:i.isRTL(o.floating),r=J(n),c=M(n),a=yt(n)==="y",l=["left","top"].includes(r)?-1:1,h=s&&a?-1:1,f=st(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:u}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof u=="number"&&(d=c==="end"?u*-1:u),a?{x:d*h,y:g*l}:{x:g*l,y:d*h}})}const de=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return $(this,null,function*(){var i,o;const{x:s,y:r,placement:c,middlewareData:a}=n,l=yield he(n,e);return c===((i=a.offset)==null?void 0:i.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:X(O({},l),{placement:c})}})}}};function rt(){return typeof window!="undefined"}function K(e){return Ft(e)?(e.nodeName||"").toLowerCase():"#document"}function R(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function W(e){var t;return(t=(Ft(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ft(e){return rt()?e instanceof Node||e instanceof R(e).Node:!1}function A(e){return rt()?e instanceof Element||e instanceof R(e).Element:!1}function B(e){return rt()?e instanceof HTMLElement||e instanceof R(e).HTMLElement:!1}function $t(e){return!rt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof R(e).ShadowRoot}function Q(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=D(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function ue(e){return["table","td","th"].includes(K(e))}function ct(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function vt(e){const t=_t(),n=A(e)?D(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function ge(e){let t=j(e);for(;B(t)&&!U(t);){if(vt(t))return t;if(ct(t))return null;t=j(t)}return null}function _t(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U(e){return["html","body","#document"].includes(K(e))}function D(e){return R(e).getComputedStyle(e)}function lt(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function j(e){if(K(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$t(e)&&e.host||W(e);return $t(t)?t.host:t}function Ht(e){const t=j(e);return U(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&Q(t)?t:Ht(t)}function pt(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ht(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),r=R(o);if(s){const c=mt(r);return t.concat(r,r.visualViewport||[],Q(o)?o:[],c&&n?pt(c):[])}return t.concat(o,pt(o,[],n))}function mt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mt(e){const t=D(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=B(e),s=o?e.offsetWidth:n,r=o?e.offsetHeight:i,c=it(n)!==s||it(i)!==r;return c&&(n=s,i=r),{width:n,height:i,$:c}}function Vt(e){return A(e)?e:e.contextElement}function q(e){const t=Vt(e);if(!B(t))return N(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:s}=Mt(t);let r=(s?it(n.width):n.width)/i,c=(s?it(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const pe=N(0);function Wt(e){const t=R(e);return!_t()||!t.visualViewport?pe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function me(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==R(e)?!1:t}function G(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Vt(e);let r=N(1);t&&(i?A(i)&&(r=q(i)):r=q(e));const c=me(s,n,i)?Wt(s):N(0);let a=(o.left+c.x)/r.x,l=(o.top+c.y)/r.y,h=o.width/r.x,f=o.height/r.y;if(s){const g=R(s),d=i&&A(i)?R(i):i;let u=g,p=mt(u);for(;p&&i&&d!==u;){const m=q(p),x=p.getBoundingClientRect(),b=D(p),v=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*m.x,S=x.top+(p.clientTop+parseFloat(b.paddingTop))*m.y;a*=m.x,l*=m.y,h*=m.x,f*=m.y,a+=v,l+=S,u=R(p),p=mt(u)}}return ot({width:h,height:f,x:a,y:l})}function bt(e,t){const n=lt(e).scrollLeft;return t?t.left+n:G(W(e)).left+n}function It(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=i.left+t.scrollLeft-(n?0:bt(e,i)),s=i.top+t.scrollTop;return{x:o,y:s}}function xe(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const s=o==="fixed",r=W(i),c=t?ct(t.floating):!1;if(i===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=N(1);const h=N(0),f=B(i);if((f||!f&&!s)&&((K(i)!=="body"||Q(r))&&(a=lt(i)),B(i))){const d=G(i);l=q(i),h.x=d.x+i.clientLeft,h.y=d.y+i.clientTop}const g=r&&!f&&!s?It(r,a,!0):N(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+h.x+g.x,y:n.y*l.y-a.scrollTop*l.y+h.y+g.y}}function ye(e){return Array.from(e.getClientRects())}function we(e){const t=W(e),n=lt(e),i=e.ownerDocument.body,o=Y(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=Y(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+bt(e);const c=-n.scrollTop;return D(i).direction==="rtl"&&(r+=Y(t.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:c}}function ve(e,t){const n=R(e),i=W(e),o=n.visualViewport;let s=i.clientWidth,r=i.clientHeight,c=0,a=0;if(o){s=o.width,r=o.height;const l=_t();(!l||l&&t==="fixed")&&(c=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:c,y:a}}function _e(e,t){const n=G(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,s=B(e)?q(e):N(1),r=e.clientWidth*s.x,c=e.clientHeight*s.y,a=o*s.x,l=i*s.y;return{width:r,height:c,x:a,y:l}}function At(e,t,n){let i;if(t==="viewport")i=ve(e,n);else if(t==="document")i=we(W(e));else if(A(t))i=_e(t,n);else{const o=Wt(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ot(i)}function zt(e,t){const n=j(e);return n===t||!A(n)||U(n)?!1:D(n).position==="fixed"||zt(n,t)}function be(e,t){const n=t.get(e);if(n)return n;let i=pt(e,[],!1).filter(c=>A(c)&&K(c)!=="body"),o=null;const s=D(e).position==="fixed";let r=s?j(e):e;for(;A(r)&&!U(r);){const c=D(r),a=vt(r);!a&&c.position==="fixed"&&(o=null),(s?!a&&!o:!a&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Q(r)&&!a&&zt(e,r))?i=i.filter(h=>h!==r):o=c,r=j(r)}return t.set(e,i),i}function Se(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const r=[...n==="clippingAncestors"?ct(t)?[]:be(t,this._c):[].concat(n),i],c=r[0],a=r.reduce((l,h)=>{const f=At(t,h,o);return l.top=Y(f.top,l.top),l.right=Z(f.right,l.right),l.bottom=Z(f.bottom,l.bottom),l.left=Y(f.left,l.left),l},At(t,c,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Ce(e){const{width:t,height:n}=Mt(e);return{width:t,height:n}}function Le(e,t,n){const i=B(t),o=W(t),s=n==="fixed",r=G(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const a=N(0);if(i||!i&&!s)if((K(t)!=="body"||Q(o))&&(c=lt(t)),i){const g=G(t,!0,s,t);a.x=g.x+t.clientLeft,a.y=g.y+t.clientTop}else o&&(a.x=bt(o));const l=o&&!i&&!s?It(o,c):N(0),h=r.left+c.scrollLeft-a.x-l.x,f=r.top+c.scrollTop-a.y-l.y;return{x:h,y:f,width:r.width,height:r.height}}function ut(e){return D(e).position==="static"}function Dt(e,t){if(!B(e)||D(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return W(e)===n&&(n=n.ownerDocument.body),n}function jt(e,t){const n=R(e);if(ct(e))return n;if(!B(e)){let o=j(e);for(;o&&!U(o);){if(A(o)&&!ut(o))return o;o=j(o)}return n}let i=Dt(e,t);for(;i&&ue(i)&&ut(i);)i=Dt(i,t);return i&&U(i)&&ut(i)&&!vt(i)?n:i||ge(e)||n}const Pe=function(e){return $(this,null,function*(){const t=this.getOffsetParent||jt,n=this.getDimensions,i=yield n(e.floating);return{reference:Le(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})};function Te(e){return D(e).direction==="rtl"}const Ee={convertOffsetParentRelativeRectToViewportRelativeRect:xe,getDocumentElement:W,getClippingRect:Se,getOffsetParent:jt,getElementRects:Pe,getClientRects:ye,getDimensions:Ce,getScale:q,isElement:A,isRTL:Te},Re=de,Oe=fe,$e=le,Ae=(e,t,n)=>{const i=new Map,o=O({platform:Ee},n),s=X(O({},o.platform),{_c:i});return re(e,t,X(O({},o),{platform:s}))};function V(e){return e===null||typeof e=="undefined"}function E(e){return!V(e)}function kt(e){return new Promise(t=>setTimeout(t,e))}function Yt(e){var i;const t=e.parentElement;return!t||t.nodeName==="HTML"?!1:((i=document.defaultView)==null?void 0:i.getComputedStyle(e,null).getPropertyValue("position"))==="fixed"?!0:Yt(t)}function qt(e){return Yt(e)?"fixed":"absolute"}class De{renderContent(t,n,i){t.querySelector(`.${i.classPrefix}-content`).appendChild(n.node)}}function T(e,t){const n=document.createElement(e);return t&&t.length>0&&(t=t.filter(i=>i),n.classList.add(...t)),n}class ke{renderContent(t,n,i){var s,r,c,a;const o=t.querySelector(`.${i.classPrefix}-content`);if(n.imgSrc){const l=T("img",[`${i.classPrefix}-image`,`${(r=(s=n.customization)==null?void 0:s.imageClass)!=null?r:""}`]);l.src=n.imgSrc,o.appendChild(l)}if(n.text){const l=T("p",[`${i.classPrefix}-description`,`${(a=(c=n.customization)==null?void 0:c.descriptionClass)!=null?a:""}`]);l.innerHTML=i.translateFn(n.text),o.appendChild(l)}}}function Ne(e,t,n){var c,a,l,h,f,g,d,u,p,m,x,b,v,S,_;if(e.innerHTML="",e.className=`${(c=n.config.class)!=null?c:""} ${n.config.classPrefix} ${n.config.animationClass}`,!n.config.arrow.disable&&((a=n.activeStep)!=null&&a.hasHost)){const w=T("div",[(l=n.config.arrow.class)!=null?l:"",`${n.config.classPrefix}-arrow`]);e.appendChild(w)}(h=t.customization)!=null&&h.class&&e.classList.add(t.customization.class);const i=T("div",[`${n.config.classPrefix}-header`,`${(g=(f=t.customization)==null?void 0:f.headerClass)!=null?g:""}`]);e.appendChild(i);const o=T("h1",[`${n.config.classPrefix}-title`,`${(u=(d=t.customization)==null?void 0:d.titleClass)!=null?u:""}`]);o.innerHTML=n.config.translateFn((p=t.title)!=null?p:""),i.appendChild(o),n.config.close.button&&(n.config.closeIcon.onclick=n.complete.bind(n),i.appendChild(n.config.closeIcon));const s=T("div",[`${n.config.classPrefix}-content`,`${(x=(m=t.customization)==null?void 0:m.contentClass)!=null?x:""}`]);e.appendChild(s);const r=T("div",[`${n.config.classPrefix}-footer`,`${(v=(b=t.customization)==null?void 0:b.footerClass)!=null?v:""}`]);if(V(t.buttonList)&&(t.buttonList=Be(n)),t.buttonList.forEach(w=>{var I;const C=[`${n.config.classPrefix}-button`,(I=w.class)!=null?I:""];V(w.type)||w.type==="secondary"?C.push(`${n.config.classPrefix}-button-secondary`):w.type==="primary"?C.push(`${n.config.classPrefix}-button-primary`):w.type==="link"&&C.push(`${n.config.classPrefix}-button-link`),!V(w.class)&&w.class!==""&&C.push(w.class);const L=T("button",C);L.innerHTML=n.config.translateFn(w.text),L.onclick=F=>{w.action.call(n)},r.appendChild(L)}),!n.config.progress.disable&&n.config.progress.text&&E(n.activeStepIndex)){const w=T("p",[`${n.config.classPrefix}-progress`,`${(_=(S=t.customization)==null?void 0:S.progressClass)!=null?_:""}`]);w.innerHTML=n.config.translateFn(Fe(n.config.progress.text,n.activeStepIndex+1,n.stepList.length)),r.appendChild(w)}e.appendChild(r)}function Be(e){return[{text:"Back",action:e.prev},{text:"Next",type:"primary",action:e.next}]}function Fe(e,t,n){return e.replace("{{currentStep}}",t.toString()).replace("{{totalSteps}}",n.toString())}class He{constructor(){y(this,"_renderContentStrategy",new Map);y(this,"_staticSides",{top:"bottom",right:"left",bottom:"top",left:"right"});this.setUpStrategies()}render(t,n){return new Promise(i=>{var o,s;if(!this._renderContentStrategy.has(n.popupData.type))throw new Error("Missing popup creator strategy");t.style.display="none",t.classList.remove(n.tour.config.animationClass),n.hostElement?t.style.position=qt(n.hostElement):t.style.position="fixed",Ne(t,n.popupData,n.tour),(o=this._renderContentStrategy.get(n.popupData.type))==null||o.renderContent(t,n.popupData,n.tour.config),(s=n.hostElement)==null||s.scrollIntoView(n.tour.config.scrollTo),i()}).then(()=>n.isFirst&&n.direction==="toNext"?kt(0):kt(400)).then(()=>{t.style.display="flex",this.updatePosition(t,n),t.classList.add(n.tour.config.animationClass)})}updatePosition(t,n){E(n.hostElement)?this.renderFloatingPopup(t,n):this.renderCenterPopup(t)}renderFloatingPopup(t,n){var l;const i=t.style.position==="fixed"?window.scrollY||document.documentElement.scrollTop:0,o=t.querySelector(`.${n.tour.config.classPrefix}-arrow`),s=[],r=E(n.popupData.position)&&n.popupData.position!=="auto"?n.popupData.position:void 0,c=(l=o==null?void 0:o.offsetWidth)!=null?l:10,a=Math.sqrt(2*Lt(c,2))/2+n.tour.config.highlight.padding;s.push(Re(a)),(n.popupData.position==="auto"||V(r))&&s.push(Oe()),!n.tour.config.arrow.disable&&E(o)&&s.push($e({element:o})),Ae(n.hostElement,t,{placement:r,middleware:[...s]}).then(({x:h,y:f,middlewareData:g,placement:d})=>{Object.assign(t.style,{top:`${f-i}px`,left:`${h}px`,marginTop:"0",marginLeft:"0"});const u=d.split("-")[0],p=this._staticSides[u];if(g.arrow&&E(o)){const{x:m,y:x}=g.arrow;Object.assign(o.style,{left:m!=null?`${m}px`:"",top:x!=null?`${x}px`:"",right:"",bottom:"",[p]:`${-c/2}px`,transform:"rotate(45deg)"})}})}renderCenterPopup(t){Object.assign(t.style,{top:"50%",left:"50%",marginTop:`-${t.clientHeight/2}px`,marginLeft:`-${t.clientWidth/2}px`})}setUpStrategies(){this._renderContentStrategy.set("text",new ke),this._renderContentStrategy.set("custom",new De)}}class Nt{render(t,n){return new Promise(i=>{n.hostElement&&(t.style.position=qt(n.hostElement)),i()}).then(()=>{this.updatePosition(t,n)})}updatePosition(t,n){var r,c;if(!n.hostElement){t.style.width="0",t.style.height="0",t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",t.style.opacity="0";return}const i=n.hostElement.getBoundingClientRect(),o=(c=(r=n.tour.config.highlight)==null?void 0:r.padding)!=null?c:8,s=t.style.position==="fixed"?0:window.scrollY||document.documentElement.scrollTop;t.style.transform="",t.style.left=`${i.left-o}px`,t.style.top=`${i.top+s-o}px`,t.style.width=`${i.width+2*o}px`,t.style.height=`${i.height+2*o}px`,t.style.opacity="1"}}class Ut{constructor(t,n){y(this,"popupData");y(this,"tour");y(this,"_index");y(this,"_hostElement",null);y(this,"_direction","toNext");y(this,"_hostData");y(this,"_popupRenderer");y(this,"_highlightRenderer");y(this,"_intersectionRenderer");var i;this.popupData=n.popup,this.tour=t,this._index=(i=n.index)!=null?i:null,this._hostData=n.host,this._popupRenderer=t.popupRenderer,this._highlightRenderer=t.highlightRenderer,this._intersectionRenderer=t.intersectionRenderer}get isFirst(){return this._index===0}get nextStep(){var t;return(t=this.tour.stepList[this.tour.stepList.indexOf(this)+1])!=null?t:null}get prevStep(){var t;return(t=this.tour.stepList[this.tour.stepList.indexOf(this)-1])!=null?t:null}get direction(){return this._direction}get hasHost(){return E(this._hostElement)}get hostElement(){return this._hostElement}get index(){return this._index}set index(t){this._index=t}show(t){return $(this,null,function*(){var i;if(V(this.tour.popup))return;this._direction=t,this._hostData&&(this._hostElement=this.resolveHostElement(typeof this._hostData=="function"?this._hostData():(i=this._hostData)!=null?i:null));const n=[this._popupRenderer.render(this.tour.popup,this)];this.tour.config.intersection.disable&&E(this.tour.intersection)&&n.push(this._intersectionRenderer.render(this.tour.intersection,this)),!this.tour.config.highlight.disable&&!V(this.tour.highlight)&&n.push(this._highlightRenderer.render(this.tour.highlight,this)),this.tour.config.highlight.disable&&E(this.tour.highlight)&&this._highlightRenderer.render(this.tour.highlight,{}),yield Promise.all(n),this.toggleZIndex(!0)})}hide(){return $(this,null,function*(){this.toggleZIndex(!1)})}toggleZIndex(t){V(this._hostElement)||(t?this._hostElement.classList.add("siteguide-host"):this._hostElement.classList.remove("siteguide-host"))}resolveHostElement(t){return typeof this._hostData=="string"?document.querySelector(this._hostData):t}}function gt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Kt(e,t){const n=O({},e);return gt(e)&&gt(t)&&Object.keys(t).forEach(i=>{const o=i,s=i;gt(t[o])?(s in e||Object.assign(n,{[s]:{}}),n[s]=Kt(e[s],t[o])):Object.assign(n,{[s]:t[o]})}),n}function Me(e){const t=T("button",[`${e}-close`]);return t.innerHTML="✖",t}class Ve{constructor(){y(this,"_activeTour",null)}get isActive(){return E(this.activeTour)}get activeTour(){return this._activeTour}setActiveTour(t){this._activeTour=t}}const nt=new Ve;class We{constructor(t){y(this,"popupRenderer",new He);y(this,"highlightRenderer",new Nt);y(this,"intersectionRenderer",new Nt);y(this,"_popup",null);y(this,"_highlight",null);y(this,"_intersection",null);y(this,"_stepList",[]);y(this,"_activeStep",null);y(this,"_bodyResizeObserver");y(this,"_config");y(this,"closeOnEsc",t=>{t.key==="Escape"&&this.complete()});y(this,"keyboardControl",t=>{t.key==="ArrowRight"?this.next():t.key==="ArrowLeft"&&this.prev()});var n,i,o,s,r,c,a,l,h,f,g,d,u,p,m,x,b,v,S,_,w,C,L,I,F,z;this._bodyResizeObserver=this.getBodyResizeObserver(),this._config={classPrefix:(n=t.classPrefix)!=null?n:"siteguide",class:"",animationClass:(i=t.animationClass)!=null?i:"siteguide-animation",close:{button:(s=(o=t.close)==null?void 0:o.button)!=null?s:!0,clickout:(c=(r=t.close)==null?void 0:r.clickout)!=null?c:!1,esc:(l=(a=t.close)==null?void 0:a.esc)!=null?l:!0},scrollTo:(h=t.scrollTo)!=null?h:{behavior:"smooth",block:"center",inline:"center"},closeIcon:(g=t.closeIcon)!=null?g:Me((f=t.classPrefix)!=null?f:"siteguide"),arrow:{disable:(u=(d=t.arrow)==null?void 0:d.disable)!=null?u:!1,class:(m=(p=t.arrow)==null?void 0:p.class)!=null?m:""},highlight:{disable:(b=(x=t.highlight)==null?void 0:x.disable)!=null?b:!1,padding:(S=(v=t.highlight)==null?void 0:v.padding)!=null?S:8,class:(w=(_=t.highlight)==null?void 0:_.class)!=null?w:""},progress:{disable:(L=(C=t.progress)==null?void 0:C.disable)!=null?L:!0,text:"Step {{currentStep}} of {{totalSteps}}"},intersection:{disable:(I=t.intersection.disable)!=null?I:!1},keyboardControl:(F=t.keyboardControl)!=null?F:!1,translateFn:(z=t.translateFn)!=null?z:P=>P}}get stepList(){return this._stepList}get config(){return this._config}get popup(){return this._popup}get highlight(){return this._highlight}get intersection(){return this._intersection}get activeStep(){return this._activeStep}get activeStepIndex(){return this._activeStep?this.stepList.indexOf(this._activeStep):null}addStep(t){if(V(t.index)){const i=this._stepList.reduce((o,s)=>s.index!==null&&s.index!==void 0&&s.index>o?s.index:o,-1);t.index=i+1}const n=new Ut(this,t);this._stepList.push(n),this._stepList.sort((i,o)=>i.index-o.index)}addSteps(t){t.forEach(n=>this.addStep(n))}removeStep(t){this._stepList=this._stepList.filter(n=>t!==n.index)}start(){nt.isActive||(this.config.close.esc&&document.addEventListener("keydown",this.closeOnEsc),this.config.keyboardControl&&document.addEventListener("keydown",this.keyboardControl),nt.setActiveTour(this),this._popup=T("div",[this._config.classPrefix]),document.body.appendChild(this._popup),this._config.highlight.disable||(this._highlight=T("div",[this._config.highlight.class,`${this._config.classPrefix}-highlight`]),document.body.appendChild(this._highlight)),this._config.intersection.disable&&(this._intersection=T("div",["siteguide-intersection"]),document.body.appendChild(this._intersection)),this.next())}complete(){var t;this._popup&&document.body.removeChild(this._popup),this._highlight&&document.body.removeChild(this._highlight),(t=this._activeStep)==null||t.hide(),this._activeStep=null,nt.setActiveTour(null),this.config.close.esc&&document.removeEventListener("keydown",this.closeOnEsc),this.config.keyboardControl&&document.removeEventListener("keydown",this.keyboardControl)}prev(){const t=E(this._activeStep)?this._stepList.indexOf(this._activeStep)-1:this._stepList.indexOf(this._stepList[this._stepList.length-1]);if(t<0){this.complete();return}this.changeStepTo(t,"fromBack")}next(){return $(this,null,function*(){var n,i,o;const t=E(this._activeStep)?this._stepList.indexOf(this._activeStep)+1:this._stepList.indexOf(this._stepList[0]);if(t>=this._stepList.length){this.complete();return}E((n=this._activeStep)==null?void 0:n.popupData.allowNext)&&!((o=yield(i=this._activeStep)==null?void 0:i.popupData.allowNext.call(this))==null||o)||this.changeStepTo(t,"toNext")})}goTo(t){var n;if(t>this._stepList.length-1){console.error("Provided index was larger than steps amount");return}this.changeStepTo(t,t>((n=this.activeStepIndex)!=null?n:-1)?"toNext":"fromBack")}setConfig(t){this._config=Kt(this._config,t)}changeStepTo(t,n){var i;(i=this._activeStep)==null||i.hide(),this._activeStep=this._stepList[t],this._activeStep.show(n)}getBodyResizeObserver(){const t=new ResizeObserver(()=>{this._activeStep&&(E(this._popup)&&this.popupRenderer.updatePosition(this._popup,this._activeStep),E(this._highlight)&&!this.config.highlight.disable&&this.highlightRenderer.updatePosition(this._highlight,this._activeStep))});return t.observe(document.body),t}}const Ie=nt;exports.Siteguide=Ie;exports.Tour=We;exports.TourStep=Ut;exports.createElement=T;
1
+ "use strict";var Xt=Object.defineProperty,Zt=Object.defineProperties;var Gt=Object.getOwnPropertyDescriptors;var et=Object.getOwnPropertySymbols;var St=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable;var Lt=Math.pow,dt=(e,t,n)=>t in e?Xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$=(e,t)=>{for(var n in t||(t={}))St.call(t,n)&&dt(e,n,t[n]);if(et)for(var n of et(t))Ct.call(t,n)&&dt(e,n,t[n]);return e},X=(e,t)=>Zt(e,Gt(t));var Pt=(e,t)=>{var n={};for(var i in e)St.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&et)for(var i of et(e))t.indexOf(i)<0&&Ct.call(e,i)&&(n[i]=e[i]);return n};var y=(e,t,n)=>dt(e,typeof t!="symbol"?t+"":t,n);var A=(e,t,n)=>new Promise((i,o)=>{var s=a=>{try{c(n.next(a))}catch(l){o(l)}},r=a=>{try{c(n.throw(a))}catch(l){o(l)}},c=a=>a.done?i(a.value):Promise.resolve(a.value).then(s,r);c((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Jt=["top","right","bottom","left"],Tt=["start","end"],Et=Jt.reduce((e,t)=>e.concat(t,t+"-"+Tt[0],t+"-"+Tt[1]),[]),Z=Math.min,Y=Math.max,it=Math.round,N=e=>({x:e,y:e}),Qt={left:"right",right:"left",bottom:"top",top:"bottom"},te={start:"end",end:"start"};function ee(e,t,n){return Y(e,Z(t,n))}function st(e,t){return typeof e=="function"?e(t):e}function J(e){return e.split("-")[0]}function M(e){return e.split("-")[1]}function ne(e){return e==="x"?"y":"x"}function xt(e){return e==="y"?"height":"width"}function yt(e){return["top","bottom"].includes(J(e))?"y":"x"}function wt(e){return ne(yt(e))}function ie(e,t,n){n===void 0&&(n=!1);const i=M(e),o=wt(e),s=xt(o);let r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Rt(r)),[r,Rt(r)]}function oe(e){return e.replace(/start|end/g,t=>te[t])}function Rt(e){return e.replace(/left|right|bottom|top/g,t=>Qt[t])}function se(e){return $({top:0,right:0,bottom:0,left:0},e)}function Bt(e){return typeof e!="number"?se(e):{top:e,right:e,bottom:e,left:e}}function ot(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function Ot(e,t,n){let{reference:i,floating:o}=e;const s=yt(t),r=wt(t),c=xt(r),a=J(t),l=s==="y",h=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,g=i[c]/2-o[c]/2;let d;switch(a){case"top":d={x:h,y:i.y-o.height};break;case"bottom":d={x:h,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-o.width,y:f};break;default:d={x:i.x,y:i.y}}switch(M(t)){case"start":d[r]-=g*(n&&l?-1:1);break;case"end":d[r]+=g*(n&&l?-1:1);break}return d}const re=(e,t,n)=>A(exports,null,function*(){const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,c=s.filter(Boolean),a=yield r.isRTL==null?void 0:r.isRTL(t);let l=yield r.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:f}=Ot(l,i,a),g=i,d={},u=0;for(let p=0;p<c.length;p++){const{name:m,fn:x}=c[p],{x:b,y:v,data:S,reset:_}=yield x({x:h,y:f,initialPlacement:i,placement:g,strategy:o,middlewareData:d,rects:l,platform:r,elements:{reference:e,floating:t}});h=b!=null?b:h,f=v!=null?v:f,d=X($({},d),{[m]:$($({},d[m]),S)}),_&&u<=50&&(u++,typeof _=="object"&&(_.placement&&(g=_.placement),_.rects&&(l=_.rects===!0?yield r.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:h,y:f}=Ot(l,g,a)),p=-1)}return{x:h,y:f,placement:g,strategy:o,middlewareData:d}});function ce(e,t){return A(this,null,function*(){var n;t===void 0&&(t={});const{x:i,y:o,platform:s,rects:r,elements:c,strategy:a}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:g=!1,padding:d=0}=st(t,e),u=Bt(d),m=c[g?f==="floating"?"reference":"floating":f],x=ot(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(m))==null||n?m:m.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:h,strategy:a})),b=f==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,v=yield s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating),S=(yield s.isElement==null?void 0:s.isElement(v))?(yield s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},_=ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:v,strategy:a}):b);return{top:(x.top-_.top+u.top)/S.y,bottom:(_.bottom-x.bottom+u.bottom)/S.y,left:(x.left-_.left+u.left)/S.x,right:(_.right-x.right+u.right)/S.x}})}const le=e=>({name:"arrow",options:e,fn(n){return A(this,null,function*(){const{x:i,y:o,placement:s,rects:r,platform:c,elements:a,middlewareData:l}=n,{element:h,padding:f=0}=st(e,n)||{};if(h==null)return{};const g=Bt(f),d={x:i,y:o},u=wt(s),p=xt(u),m=yield c.getDimensions(h),x=u==="y",b=x?"top":"left",v=x?"bottom":"right",S=x?"clientHeight":"clientWidth",_=r.reference[p]+r.reference[u]-d[u]-r.floating[p],w=d[u]-r.reference[u],L=yield c.getOffsetParent==null?void 0:c.getOffsetParent(h);let P=L?L[S]:0;(!P||!(yield c.isElement==null?void 0:c.isElement(L)))&&(P=a.floating[S]||r.floating[p]);const I=_/2-w/2,F=P/2-m[p]/2-1,z=Z(g[b],F),C=Z(g[v],F),O=z,tt=P-m[p]-C,H=P/2-m[p]/2+I,at=ee(O,H,tt),ft=!l.arrow&&M(s)!=null&&H!==at&&r.reference[p]/2-(H<O?z:C)-m[p]/2<0,ht=ft?H<O?H-O:H-tt:0;return{[u]:d[u]+ht,data:$({[u]:at,centerOffset:H-at-ht},ft&&{alignmentOffset:ht}),reset:ft}})}});function ae(e,t,n){return(e?[...n.filter(o=>M(o)===e),...n.filter(o=>M(o)!==e)]:n.filter(o=>J(o)===o)).filter(o=>e?M(o)===e||(t?oe(o)!==o:!1):!0)}const fe=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,fn(n){return A(this,null,function*(){var i,o,s;const{rects:r,middlewareData:c,placement:a,platform:l,elements:h}=n,z=st(e,n),{crossAxis:f=!1,alignment:g,allowedPlacements:d=Et,autoAlignment:u=!0}=z,p=Pt(z,["crossAxis","alignment","allowedPlacements","autoAlignment"]),m=g!==void 0||d===Et?ae(g||null,u,d):d,x=yield ce(n,p),b=((i=c.autoPlacement)==null?void 0:i.index)||0,v=m[b];if(v==null)return{};const S=ie(v,r,yield l.isRTL==null?void 0:l.isRTL(h.floating));if(a!==v)return{reset:{placement:m[0]}};const _=[x[J(v)],x[S[0]],x[S[1]]],w=[...((o=c.autoPlacement)==null?void 0:o.overflows)||[],{placement:v,overflows:_}],L=m[b+1];if(L)return{data:{index:b+1,overflows:w},reset:{placement:L}};const P=w.map(C=>{const O=M(C.placement);return[C.placement,O&&f?C.overflows.slice(0,2).reduce((tt,H)=>tt+H,0):C.overflows[0],C.overflows]}).sort((C,O)=>C[1]-O[1]),F=((s=P.filter(C=>C[2].slice(0,M(C[0])?2:3).every(O=>O<=0))[0])==null?void 0:s[0])||P[0][0];return F!==a?{data:{index:b+1,overflows:w},reset:{placement:F}}:{}})}}};function he(e,t){return A(this,null,function*(){const{placement:n,platform:i,elements:o}=e,s=yield i.isRTL==null?void 0:i.isRTL(o.floating),r=J(n),c=M(n),a=yt(n)==="y",l=["left","top"].includes(r)?-1:1,h=s&&a?-1:1,f=st(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:u}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof u=="number"&&(d=c==="end"?u*-1:u),a?{x:d*h,y:g*l}:{x:g*l,y:d*h}})}const de=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return A(this,null,function*(){var i,o;const{x:s,y:r,placement:c,middlewareData:a}=n,l=yield he(n,e);return c===((i=a.offset)==null?void 0:i.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:X($({},l),{placement:c})}})}}};function rt(){return typeof window!="undefined"}function K(e){return Ft(e)?(e.nodeName||"").toLowerCase():"#document"}function R(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function W(e){var t;return(t=(Ft(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ft(e){return rt()?e instanceof Node||e instanceof R(e).Node:!1}function D(e){return rt()?e instanceof Element||e instanceof R(e).Element:!1}function B(e){return rt()?e instanceof HTMLElement||e instanceof R(e).HTMLElement:!1}function $t(e){return!rt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof R(e).ShadowRoot}function Q(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=k(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function ue(e){return["table","td","th"].includes(K(e))}function ct(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function vt(e){const t=_t(),n=D(e)?k(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function ge(e){let t=j(e);for(;B(t)&&!U(t);){if(vt(t))return t;if(ct(t))return null;t=j(t)}return null}function _t(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U(e){return["html","body","#document"].includes(K(e))}function k(e){return R(e).getComputedStyle(e)}function lt(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function j(e){if(K(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$t(e)&&e.host||W(e);return $t(t)?t.host:t}function Ht(e){const t=j(e);return U(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&Q(t)?t:Ht(t)}function pt(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ht(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),r=R(o);if(s){const c=mt(r);return t.concat(r,r.visualViewport||[],Q(o)?o:[],c&&n?pt(c):[])}return t.concat(o,pt(o,[],n))}function mt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mt(e){const t=k(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=B(e),s=o?e.offsetWidth:n,r=o?e.offsetHeight:i,c=it(n)!==s||it(i)!==r;return c&&(n=s,i=r),{width:n,height:i,$:c}}function Vt(e){return D(e)?e:e.contextElement}function q(e){const t=Vt(e);if(!B(t))return N(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:s}=Mt(t);let r=(s?it(n.width):n.width)/i,c=(s?it(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const pe=N(0);function Wt(e){const t=R(e);return!_t()||!t.visualViewport?pe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function me(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==R(e)?!1:t}function G(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Vt(e);let r=N(1);t&&(i?D(i)&&(r=q(i)):r=q(e));const c=me(s,n,i)?Wt(s):N(0);let a=(o.left+c.x)/r.x,l=(o.top+c.y)/r.y,h=o.width/r.x,f=o.height/r.y;if(s){const g=R(s),d=i&&D(i)?R(i):i;let u=g,p=mt(u);for(;p&&i&&d!==u;){const m=q(p),x=p.getBoundingClientRect(),b=k(p),v=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*m.x,S=x.top+(p.clientTop+parseFloat(b.paddingTop))*m.y;a*=m.x,l*=m.y,h*=m.x,f*=m.y,a+=v,l+=S,u=R(p),p=mt(u)}}return ot({width:h,height:f,x:a,y:l})}function bt(e,t){const n=lt(e).scrollLeft;return t?t.left+n:G(W(e)).left+n}function It(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=i.left+t.scrollLeft-(n?0:bt(e,i)),s=i.top+t.scrollTop;return{x:o,y:s}}function xe(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const s=o==="fixed",r=W(i),c=t?ct(t.floating):!1;if(i===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=N(1);const h=N(0),f=B(i);if((f||!f&&!s)&&((K(i)!=="body"||Q(r))&&(a=lt(i)),B(i))){const d=G(i);l=q(i),h.x=d.x+i.clientLeft,h.y=d.y+i.clientTop}const g=r&&!f&&!s?It(r,a,!0):N(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+h.x+g.x,y:n.y*l.y-a.scrollTop*l.y+h.y+g.y}}function ye(e){return Array.from(e.getClientRects())}function we(e){const t=W(e),n=lt(e),i=e.ownerDocument.body,o=Y(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=Y(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+bt(e);const c=-n.scrollTop;return k(i).direction==="rtl"&&(r+=Y(t.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:c}}function ve(e,t){const n=R(e),i=W(e),o=n.visualViewport;let s=i.clientWidth,r=i.clientHeight,c=0,a=0;if(o){s=o.width,r=o.height;const l=_t();(!l||l&&t==="fixed")&&(c=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:c,y:a}}function _e(e,t){const n=G(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,s=B(e)?q(e):N(1),r=e.clientWidth*s.x,c=e.clientHeight*s.y,a=o*s.x,l=i*s.y;return{width:r,height:c,x:a,y:l}}function At(e,t,n){let i;if(t==="viewport")i=ve(e,n);else if(t==="document")i=we(W(e));else if(D(t))i=_e(t,n);else{const o=Wt(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ot(i)}function zt(e,t){const n=j(e);return n===t||!D(n)||U(n)?!1:k(n).position==="fixed"||zt(n,t)}function be(e,t){const n=t.get(e);if(n)return n;let i=pt(e,[],!1).filter(c=>D(c)&&K(c)!=="body"),o=null;const s=k(e).position==="fixed";let r=s?j(e):e;for(;D(r)&&!U(r);){const c=k(r),a=vt(r);!a&&c.position==="fixed"&&(o=null),(s?!a&&!o:!a&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Q(r)&&!a&&zt(e,r))?i=i.filter(h=>h!==r):o=c,r=j(r)}return t.set(e,i),i}function Se(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const r=[...n==="clippingAncestors"?ct(t)?[]:be(t,this._c):[].concat(n),i],c=r[0],a=r.reduce((l,h)=>{const f=At(t,h,o);return l.top=Y(f.top,l.top),l.right=Z(f.right,l.right),l.bottom=Z(f.bottom,l.bottom),l.left=Y(f.left,l.left),l},At(t,c,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Ce(e){const{width:t,height:n}=Mt(e);return{width:t,height:n}}function Le(e,t,n){const i=B(t),o=W(t),s=n==="fixed",r=G(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const a=N(0);if(i||!i&&!s)if((K(t)!=="body"||Q(o))&&(c=lt(t)),i){const g=G(t,!0,s,t);a.x=g.x+t.clientLeft,a.y=g.y+t.clientTop}else o&&(a.x=bt(o));const l=o&&!i&&!s?It(o,c):N(0),h=r.left+c.scrollLeft-a.x-l.x,f=r.top+c.scrollTop-a.y-l.y;return{x:h,y:f,width:r.width,height:r.height}}function ut(e){return k(e).position==="static"}function Dt(e,t){if(!B(e)||k(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return W(e)===n&&(n=n.ownerDocument.body),n}function jt(e,t){const n=R(e);if(ct(e))return n;if(!B(e)){let o=j(e);for(;o&&!U(o);){if(D(o)&&!ut(o))return o;o=j(o)}return n}let i=Dt(e,t);for(;i&&ue(i)&&ut(i);)i=Dt(i,t);return i&&U(i)&&ut(i)&&!vt(i)?n:i||ge(e)||n}const Pe=function(e){return A(this,null,function*(){const t=this.getOffsetParent||jt,n=this.getDimensions,i=yield n(e.floating);return{reference:Le(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}})};function Te(e){return k(e).direction==="rtl"}const Ee={convertOffsetParentRelativeRectToViewportRelativeRect:xe,getDocumentElement:W,getClippingRect:Se,getOffsetParent:jt,getElementRects:Pe,getClientRects:ye,getDimensions:Ce,getScale:q,isElement:D,isRTL:Te},Re=de,Oe=fe,$e=le,Ae=(e,t,n)=>{const i=new Map,o=$({platform:Ee},n),s=X($({},o.platform),{_c:i});return re(e,t,X($({},o),{platform:s}))};function V(e){return e===null||typeof e=="undefined"}function E(e){return!V(e)}function kt(e){return new Promise(t=>setTimeout(t,e))}function Yt(e){var i;const t=e.parentElement;return!t||t.nodeName==="HTML"?!1:((i=document.defaultView)==null?void 0:i.getComputedStyle(e,null).getPropertyValue("position"))==="fixed"?!0:Yt(t)}function qt(e){return Yt(e)?"fixed":"absolute"}class De{renderContent(t,n,i){t.querySelector(`.${i.classPrefix}-content`).appendChild(n.node)}}function T(e,t){const n=document.createElement(e);return t&&t.length>0&&(t=t.filter(i=>i),n.classList.add(...t)),n}class ke{renderContent(t,n,i){var s,r,c,a;const o=t.querySelector(`.${i.classPrefix}-content`);if(n.imgSrc){const l=T("img",[`${i.classPrefix}-image`,`${(r=(s=n.customization)==null?void 0:s.imageClass)!=null?r:""}`]);l.src=n.imgSrc,o.appendChild(l)}if(n.text){const l=T("p",[`${i.classPrefix}-description`,`${(a=(c=n.customization)==null?void 0:c.descriptionClass)!=null?a:""}`]);l.innerHTML=i.translateFn(n.text),o.appendChild(l)}}}function Ne(e,t,n){var c,a,l,h,f,g,d,u,p,m,x,b,v,S,_;if(e.innerHTML="",e.className=`${(c=n.config.class)!=null?c:""} ${n.config.classPrefix} ${n.config.animationClass}`,!n.config.arrow.disable&&((a=n.activeStep)!=null&&a.hasHost)){const w=T("div",[(l=n.config.arrow.class)!=null?l:"",`${n.config.classPrefix}-arrow`]);e.appendChild(w)}(h=t.customization)!=null&&h.class&&e.classList.add(t.customization.class);const i=T("div",[`${n.config.classPrefix}-header`,`${(g=(f=t.customization)==null?void 0:f.headerClass)!=null?g:""}`]);e.appendChild(i);const o=T("h1",[`${n.config.classPrefix}-title`,`${(u=(d=t.customization)==null?void 0:d.titleClass)!=null?u:""}`]);o.innerHTML=n.config.translateFn((p=t.title)!=null?p:""),i.appendChild(o),n.config.close.button&&(n.config.closeIcon.onclick=n.complete.bind(n),i.appendChild(n.config.closeIcon));const s=T("div",[`${n.config.classPrefix}-content`,`${(x=(m=t.customization)==null?void 0:m.contentClass)!=null?x:""}`]);e.appendChild(s);const r=T("div",[`${n.config.classPrefix}-footer`,`${(v=(b=t.customization)==null?void 0:b.footerClass)!=null?v:""}`]);if(V(t.buttonList)&&(t.buttonList=Be(n)),t.buttonList.forEach(w=>{var I;const L=[`${n.config.classPrefix}-button`,(I=w.class)!=null?I:""];V(w.type)||w.type==="secondary"?L.push(`${n.config.classPrefix}-button-secondary`):w.type==="primary"?L.push(`${n.config.classPrefix}-button-primary`):w.type==="link"&&L.push(`${n.config.classPrefix}-button-link`),!V(w.class)&&w.class!==""&&L.push(w.class);const P=T("button",L);P.innerHTML=n.config.translateFn(w.text),P.onclick=F=>{w.action.call(n)},r.appendChild(P)}),!n.config.progress.disable&&n.config.progress.text&&E(n.activeStepIndex)){const w=T("p",[`${n.config.classPrefix}-progress`,`${(_=(S=t.customization)==null?void 0:S.progressClass)!=null?_:""}`]);w.innerHTML=n.config.translateFn(Fe(n.config.progress.text,n.activeStepIndex+1,n.stepList.length)),r.appendChild(w)}e.appendChild(r)}function Be(e){return[{text:"Back",action:e.prev},{text:"Next",type:"primary",action:e.next}]}function Fe(e,t,n){return e.replace("{{currentStep}}",t.toString()).replace("{{totalSteps}}",n.toString())}class He{constructor(){y(this,"_renderContentStrategy",new Map);y(this,"_staticSides",{top:"bottom",right:"left",bottom:"top",left:"right"});this.setUpStrategies()}render(t,n){return new Promise(i=>{var o,s;if(!this._renderContentStrategy.has(n.popupData.type))throw new Error("Missing popup creator strategy");t.style.display="none",t.classList.remove(n.tour.config.animationClass),n.hostElement?t.style.position=qt(n.hostElement):t.style.position="fixed",Ne(t,n.popupData,n.tour),(o=this._renderContentStrategy.get(n.popupData.type))==null||o.renderContent(t,n.popupData,n.tour.config),(s=n.hostElement)==null||s.scrollIntoView(n.tour.config.scrollTo),i()}).then(()=>n.isFirst&&n.direction==="toNext"?kt(0):kt(400)).then(()=>{t.style.display="flex",this.updatePosition(t,n),t.classList.add(n.tour.config.animationClass)})}updatePosition(t,n){E(n.hostElement)?this.renderFloatingPopup(t,n):this.renderCenterPopup(t)}renderFloatingPopup(t,n){var l;const i=t.style.position==="fixed"?window.scrollY||document.documentElement.scrollTop:0,o=t.querySelector(`.${n.tour.config.classPrefix}-arrow`),s=[],r=E(n.popupData.position)&&n.popupData.position!=="auto"?n.popupData.position:void 0,c=(l=o==null?void 0:o.offsetWidth)!=null?l:10,a=Math.sqrt(2*Lt(c,2))/2+n.tour.config.highlight.padding;s.push(Re(a)),(n.popupData.position==="auto"||V(r))&&s.push(Oe()),!n.tour.config.arrow.disable&&E(o)&&s.push($e({element:o})),Ae(n.hostElement,t,{placement:r,middleware:[...s]}).then(({x:h,y:f,middlewareData:g,placement:d})=>{Object.assign(t.style,{top:`${f-i}px`,left:`${h}px`,marginTop:"0",marginLeft:"0"});const u=d.split("-")[0],p=this._staticSides[u];if(g.arrow&&E(o)){const{x:m,y:x}=g.arrow;Object.assign(o.style,{left:m!=null?`${m}px`:"",top:x!=null?`${x}px`:"",right:"",bottom:"",[p]:`${-c/2}px`,transform:"rotate(45deg)"})}})}renderCenterPopup(t){Object.assign(t.style,{top:"50%",left:"50%",marginTop:`-${t.clientHeight/2}px`,marginLeft:`-${t.clientWidth/2}px`})}setUpStrategies(){this._renderContentStrategy.set("text",new ke),this._renderContentStrategy.set("custom",new De)}}class Nt{render(t,n){return new Promise(i=>{n.hostElement&&(t.style.position=qt(n.hostElement)),i()}).then(()=>{this.updatePosition(t,n)})}updatePosition(t,n){var r,c;if(!n.hostElement){t.style.width="0",t.style.height="0",t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",t.style.opacity="0";return}const i=n.hostElement.getBoundingClientRect(),o=(c=(r=n.tour.config.highlight)==null?void 0:r.padding)!=null?c:8,s=t.style.position==="fixed"?0:window.scrollY||document.documentElement.scrollTop;t.style.transform="",t.style.left=`${i.left-o}px`,t.style.top=`${i.top+s-o}px`,t.style.width=`${i.width+2*o}px`,t.style.height=`${i.height+2*o}px`,t.style.opacity="1"}}class Ut{constructor(t,n){y(this,"popupData");y(this,"tour");y(this,"_index");y(this,"_hostElement",null);y(this,"_direction","toNext");y(this,"_hostData");y(this,"_popupRenderer");y(this,"_highlightRenderer");y(this,"_intersectionRenderer");var i;this.popupData=n.popup,this.tour=t,this._index=(i=n.index)!=null?i:null,this._hostData=n.host,this._popupRenderer=t.popupRenderer,this._highlightRenderer=t.highlightRenderer,this._intersectionRenderer=t.intersectionRenderer}get isFirst(){return this._index===0}get nextStep(){var t;return(t=this.tour.stepList[this.tour.stepList.indexOf(this)+1])!=null?t:null}get prevStep(){var t;return(t=this.tour.stepList[this.tour.stepList.indexOf(this)-1])!=null?t:null}get direction(){return this._direction}get hasHost(){return E(this._hostElement)}get hostElement(){return this._hostElement}get index(){return this._index}set index(t){this._index=t}show(t){return A(this,null,function*(){var i;if(V(this.tour.popup))return;this._direction=t,this._hostData&&(this._hostElement=this.resolveHostElement(typeof this._hostData=="function"?this._hostData():(i=this._hostData)!=null?i:null));const n=[this._popupRenderer.render(this.tour.popup,this)];!this.tour.config.interaction.disable&&E(this.tour.intersection)&&n.push(this._intersectionRenderer.render(this.tour.intersection,this)),!this.tour.config.highlight.disable&&!V(this.tour.highlight)&&n.push(this._highlightRenderer.render(this.tour.highlight,this)),this.tour.config.highlight.disable&&E(this.tour.highlight)&&this._highlightRenderer.render(this.tour.highlight,{}),yield Promise.all(n),this.toggleZIndex(!0)})}hide(){return A(this,null,function*(){this.toggleZIndex(!1)})}toggleZIndex(t){V(this._hostElement)||(t?this._hostElement.classList.add("siteguide-host"):this._hostElement.classList.remove("siteguide-host"))}resolveHostElement(t){return typeof this._hostData=="string"?document.querySelector(this._hostData):t}}function gt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Kt(e,t){const n=$({},e);return gt(e)&&gt(t)&&Object.keys(t).forEach(i=>{const o=i,s=i;gt(t[o])?(s in e||Object.assign(n,{[s]:{}}),n[s]=Kt(e[s],t[o])):Object.assign(n,{[s]:t[o]})}),n}function Me(e){const t=T("button",[`${e}-close`]);return t.innerHTML="✖",t}class Ve{constructor(){y(this,"_activeTour",null)}get isActive(){return E(this.activeTour)}get activeTour(){return this._activeTour}setActiveTour(t){this._activeTour=t}}const nt=new Ve;class We{constructor(t){y(this,"popupRenderer",new He);y(this,"highlightRenderer",new Nt);y(this,"intersectionRenderer",new Nt);y(this,"_popup",null);y(this,"_highlight",null);y(this,"_intersection",null);y(this,"_stepList",[]);y(this,"_activeStep",null);y(this,"_bodyResizeObserver");y(this,"_config");y(this,"closeOnEsc",t=>{t.key==="Escape"&&this.complete()});y(this,"keyboardControl",t=>{t.key==="ArrowRight"?this.next():t.key==="ArrowLeft"&&this.prev()});var n,i,o,s,r,c,a,l,h,f,g,d,u,p,m,x,b,v,S,_,w,L,P,I,F,z,C;this._bodyResizeObserver=this.getBodyResizeObserver(),this._config={classPrefix:(n=t.classPrefix)!=null?n:"siteguide",class:"",animationClass:(i=t.animationClass)!=null?i:"siteguide-animation",close:{button:(s=(o=t.close)==null?void 0:o.button)!=null?s:!0,clickout:(c=(r=t.close)==null?void 0:r.clickout)!=null?c:!1,esc:(l=(a=t.close)==null?void 0:a.esc)!=null?l:!0},scrollTo:(h=t.scrollTo)!=null?h:{behavior:"smooth",block:"center",inline:"center"},closeIcon:(g=t.closeIcon)!=null?g:Me((f=t.classPrefix)!=null?f:"siteguide"),arrow:{disable:(u=(d=t.arrow)==null?void 0:d.disable)!=null?u:!1,class:(m=(p=t.arrow)==null?void 0:p.class)!=null?m:""},highlight:{disable:(b=(x=t.highlight)==null?void 0:x.disable)!=null?b:!1,padding:(S=(v=t.highlight)==null?void 0:v.padding)!=null?S:8,class:(w=(_=t.highlight)==null?void 0:_.class)!=null?w:""},progress:{disable:(P=(L=t.progress)==null?void 0:L.disable)!=null?P:!0,text:"Step {{currentStep}} of {{totalSteps}}"},interaction:{disable:(F=(I=t.interaction)==null?void 0:I.disable)!=null?F:!1},keyboardControl:(z=t.keyboardControl)!=null?z:!1,translateFn:(C=t.translateFn)!=null?C:O=>O}}get stepList(){return this._stepList}get config(){return this._config}get popup(){return this._popup}get highlight(){return this._highlight}get intersection(){return this._intersection}get activeStep(){return this._activeStep}get activeStepIndex(){return this._activeStep?this.stepList.indexOf(this._activeStep):null}addStep(t){if(V(t.index)){const i=this._stepList.reduce((o,s)=>s.index!==null&&s.index!==void 0&&s.index>o?s.index:o,-1);t.index=i+1}const n=new Ut(this,t);this._stepList.push(n),this._stepList.sort((i,o)=>i.index-o.index)}addSteps(t){t.forEach(n=>this.addStep(n))}removeStep(t){this._stepList=this._stepList.filter(n=>t!==n.index)}start(){nt.isActive||(this.config.close.esc&&document.addEventListener("keydown",this.closeOnEsc),this.config.keyboardControl&&document.addEventListener("keydown",this.keyboardControl),nt.setActiveTour(this),this._popup=T("div",[this._config.classPrefix]),document.body.appendChild(this._popup),this._config.highlight.disable||(this._highlight=T("div",[this._config.highlight.class,`${this._config.classPrefix}-highlight`]),document.body.appendChild(this._highlight)),this._config.interaction.disable||(this._intersection=T("div",["siteguide-intersection"]),document.body.appendChild(this._intersection)),this.next())}complete(){var t;this._popup&&document.body.removeChild(this._popup),this._highlight&&document.body.removeChild(this._highlight),(t=this._activeStep)==null||t.hide(),this._activeStep=null,nt.setActiveTour(null),this.config.close.esc&&document.removeEventListener("keydown",this.closeOnEsc),this.config.keyboardControl&&document.removeEventListener("keydown",this.keyboardControl)}prev(){const t=E(this._activeStep)?this._stepList.indexOf(this._activeStep)-1:this._stepList.indexOf(this._stepList[this._stepList.length-1]);if(t<0){this.complete();return}this.changeStepTo(t,"fromBack")}next(){return A(this,null,function*(){var n,i,o;const t=E(this._activeStep)?this._stepList.indexOf(this._activeStep)+1:this._stepList.indexOf(this._stepList[0]);if(t>=this._stepList.length){this.complete();return}E((n=this._activeStep)==null?void 0:n.popupData.allowNext)&&!((o=yield(i=this._activeStep)==null?void 0:i.popupData.allowNext.call(this))==null||o)||this.changeStepTo(t,"toNext")})}goTo(t){var n;if(t>this._stepList.length-1){console.error("Provided index was larger than steps amount");return}this.changeStepTo(t,t>((n=this.activeStepIndex)!=null?n:-1)?"toNext":"fromBack")}setConfig(t){this._config=Kt(this._config,t)}changeStepTo(t,n){var i;(i=this._activeStep)==null||i.hide(),this._activeStep=this._stepList[t],this._activeStep.show(n)}getBodyResizeObserver(){const t=new ResizeObserver(()=>{this._activeStep&&(E(this._popup)&&this.popupRenderer.updatePosition(this._popup,this._activeStep),E(this._highlight)&&!this.config.highlight.disable&&this.highlightRenderer.updatePosition(this._highlight,this._activeStep))});return t.observe(document.body),t}}const Ie=nt;exports.Siteguide=Ie;exports.Tour=We;exports.TourStep=Ut;exports.createElement=T;
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ var Kt = Object.defineProperty, Xt = Object.defineProperties;
2
2
  var Zt = Object.getOwnPropertyDescriptors;
3
3
  var et = Object.getOwnPropertySymbols;
4
4
  var St = Object.prototype.hasOwnProperty, Ct = Object.prototype.propertyIsEnumerable;
5
- var Lt = Math.pow, dt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, O = (e, t) => {
5
+ var Lt = Math.pow, dt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, $ = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
7
  St.call(t, n) && dt(e, n, t[n]);
8
8
  if (et)
@@ -20,7 +20,7 @@ var Pt = (e, t) => {
20
20
  return n;
21
21
  };
22
22
  var y = (e, t, n) => dt(e, typeof t != "symbol" ? t + "" : t, n);
23
- var $ = (e, t, n) => new Promise((i, o) => {
23
+ var A = (e, t, n) => new Promise((i, o) => {
24
24
  var s = (a) => {
25
25
  try {
26
26
  c(n.next(a));
@@ -85,7 +85,7 @@ function Rt(e) {
85
85
  return e.replace(/left|right|bottom|top/g, (t) => Jt[t]);
86
86
  }
87
87
  function oe(e) {
88
- return O({
88
+ return $({
89
89
  top: 0,
90
90
  right: 0,
91
91
  bottom: 0,
@@ -166,7 +166,7 @@ function Ot(e, t, n) {
166
166
  }
167
167
  return d;
168
168
  }
169
- const se = (e, t, n) => $(void 0, null, function* () {
169
+ const se = (e, t, n) => A(void 0, null, function* () {
170
170
  const {
171
171
  placement: i = "bottom",
172
172
  strategy: o = "absolute",
@@ -204,8 +204,8 @@ const se = (e, t, n) => $(void 0, null, function* () {
204
204
  floating: t
205
205
  }
206
206
  });
207
- h = b != null ? b : h, f = v != null ? v : f, d = X(O({}, d), {
208
- [m]: O(O({}, d[m]), S)
207
+ h = b != null ? b : h, f = v != null ? v : f, d = X($({}, d), {
208
+ [m]: $($({}, d[m]), S)
209
209
  }), _ && u <= 50 && (u++, typeof _ == "object" && (_.placement && (g = _.placement), _.rects && (l = _.rects === !0 ? yield r.getElementRects({
210
210
  reference: e,
211
211
  floating: t,
@@ -224,7 +224,7 @@ const se = (e, t, n) => $(void 0, null, function* () {
224
224
  };
225
225
  });
226
226
  function re(e, t) {
227
- return $(this, null, function* () {
227
+ return A(this, null, function* () {
228
228
  var n;
229
229
  t === void 0 && (t = {});
230
230
  const {
@@ -274,7 +274,7 @@ const ce = (e) => ({
274
274
  name: "arrow",
275
275
  options: e,
276
276
  fn(n) {
277
- return $(this, null, function* () {
277
+ return A(this, null, function* () {
278
278
  const {
279
279
  x: i,
280
280
  y: o,
@@ -292,13 +292,13 @@ const ce = (e) => ({
292
292
  const g = Bt(f), d = {
293
293
  x: i,
294
294
  y: o
295
- }, u = wt(s), p = xt(u), m = yield c.getDimensions(h), x = u === "y", b = x ? "top" : "left", v = x ? "bottom" : "right", S = x ? "clientHeight" : "clientWidth", _ = r.reference[p] + r.reference[u] - d[u] - r.floating[p], w = d[u] - r.reference[u], C = yield c.getOffsetParent == null ? void 0 : c.getOffsetParent(h);
296
- let L = C ? C[S] : 0;
297
- (!L || !(yield c.isElement == null ? void 0 : c.isElement(C))) && (L = a.floating[S] || r.floating[p]);
298
- const I = _ / 2 - w / 2, F = L / 2 - m[p] / 2 - 1, z = Z(g[b], F), P = Z(g[v], F), k = z, tt = L - m[p] - P, H = L / 2 - m[p] / 2 + I, at = te(k, H, tt), ft = !l.arrow && M(s) != null && H !== at && r.reference[p] / 2 - (H < k ? z : P) - m[p] / 2 < 0, ht = ft ? H < k ? H - k : H - tt : 0;
295
+ }, u = wt(s), p = xt(u), m = yield c.getDimensions(h), x = u === "y", b = x ? "top" : "left", v = x ? "bottom" : "right", S = x ? "clientHeight" : "clientWidth", _ = r.reference[p] + r.reference[u] - d[u] - r.floating[p], w = d[u] - r.reference[u], L = yield c.getOffsetParent == null ? void 0 : c.getOffsetParent(h);
296
+ let P = L ? L[S] : 0;
297
+ (!P || !(yield c.isElement == null ? void 0 : c.isElement(L))) && (P = a.floating[S] || r.floating[p]);
298
+ const I = _ / 2 - w / 2, F = P / 2 - m[p] / 2 - 1, z = Z(g[b], F), C = Z(g[v], F), O = z, tt = P - m[p] - C, H = P / 2 - m[p] / 2 + I, at = te(O, H, tt), ft = !l.arrow && M(s) != null && H !== at && r.reference[p] / 2 - (H < O ? z : C) - m[p] / 2 < 0, ht = ft ? H < O ? H - O : H - tt : 0;
299
299
  return {
300
300
  [u]: d[u] + ht,
301
- data: O({
301
+ data: $({
302
302
  [u]: at,
303
303
  centerOffset: H - at - ht
304
304
  }, ft && {
@@ -317,7 +317,7 @@ const ae = function(e) {
317
317
  name: "autoPlacement",
318
318
  options: e,
319
319
  fn(n) {
320
- return $(this, null, function* () {
320
+ return A(this, null, function* () {
321
321
  var i, o, s;
322
322
  const {
323
323
  rects: r,
@@ -348,32 +348,32 @@ const ae = function(e) {
348
348
  const _ = [x[J(v)], x[S[0]], x[S[1]]], w = [...((o = c.autoPlacement) == null ? void 0 : o.overflows) || [], {
349
349
  placement: v,
350
350
  overflows: _
351
- }], C = m[b + 1];
352
- if (C)
351
+ }], L = m[b + 1];
352
+ if (L)
353
353
  return {
354
354
  data: {
355
355
  index: b + 1,
356
356
  overflows: w
357
357
  },
358
358
  reset: {
359
- placement: C
359
+ placement: L
360
360
  }
361
361
  };
362
- const L = w.map((P) => {
363
- const k = M(P.placement);
364
- return [P.placement, k && f ? (
362
+ const P = w.map((C) => {
363
+ const O = M(C.placement);
364
+ return [C.placement, O && f ? (
365
365
  // Check along the mainAxis and main crossAxis side.
366
- P.overflows.slice(0, 2).reduce((tt, H) => tt + H, 0)
366
+ C.overflows.slice(0, 2).reduce((tt, H) => tt + H, 0)
367
367
  ) : (
368
368
  // Check only the mainAxis.
369
- P.overflows[0]
370
- ), P.overflows];
371
- }).sort((P, k) => P[1] - k[1]), F = ((s = L.filter((P) => P[2].slice(
369
+ C.overflows[0]
370
+ ), C.overflows];
371
+ }).sort((C, O) => C[1] - O[1]), F = ((s = P.filter((C) => C[2].slice(
372
372
  0,
373
373
  // Aligned placements should not check their opposite crossAxis
374
374
  // side.
375
- M(P[0]) ? 2 : 3
376
- ).every((k) => k <= 0))[0]) == null ? void 0 : s[0]) || L[0][0];
375
+ M(C[0]) ? 2 : 3
376
+ ).every((O) => O <= 0))[0]) == null ? void 0 : s[0]) || P[0][0];
377
377
  return F !== a ? {
378
378
  data: {
379
379
  index: b + 1,
@@ -388,7 +388,7 @@ const ae = function(e) {
388
388
  };
389
389
  };
390
390
  function fe(e, t) {
391
- return $(this, null, function* () {
391
+ return A(this, null, function* () {
392
392
  const {
393
393
  placement: n,
394
394
  platform: i,
@@ -421,7 +421,7 @@ const he = function(e) {
421
421
  name: "offset",
422
422
  options: e,
423
423
  fn(n) {
424
- return $(this, null, function* () {
424
+ return A(this, null, function* () {
425
425
  var i, o;
426
426
  const {
427
427
  x: s,
@@ -432,7 +432,7 @@ const he = function(e) {
432
432
  return c === ((i = a.offset) == null ? void 0 : i.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
433
433
  x: s + l.x,
434
434
  y: r + l.y,
435
- data: X(O({}, l), {
435
+ data: X($({}, l), {
436
436
  placement: c
437
437
  })
438
438
  };
@@ -457,7 +457,7 @@ function W(e) {
457
457
  function Ft(e) {
458
458
  return rt() ? e instanceof Node || e instanceof R(e).Node : !1;
459
459
  }
460
- function A(e) {
460
+ function D(e) {
461
461
  return rt() ? e instanceof Element || e instanceof R(e).Element : !1;
462
462
  }
463
463
  function B(e) {
@@ -472,7 +472,7 @@ function Q(e) {
472
472
  overflowX: n,
473
473
  overflowY: i,
474
474
  display: o
475
- } = D(e);
475
+ } = k(e);
476
476
  return /auto|scroll|overlay|hidden|clip/.test(t + i + n) && !["inline", "contents"].includes(o);
477
477
  }
478
478
  function de(e) {
@@ -488,7 +488,7 @@ function ct(e) {
488
488
  });
489
489
  }
490
490
  function vt(e) {
491
- const t = _t(), n = A(e) ? D(e) : e;
491
+ const t = _t(), n = D(e) ? k(e) : e;
492
492
  return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (n.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (n.contain || "").includes(i));
493
493
  }
494
494
  function ue(e) {
@@ -508,11 +508,11 @@ function _t() {
508
508
  function U(e) {
509
509
  return ["html", "body", "#document"].includes(K(e));
510
510
  }
511
- function D(e) {
511
+ function k(e) {
512
512
  return R(e).getComputedStyle(e);
513
513
  }
514
514
  function lt(e) {
515
- return A(e) ? {
515
+ return D(e) ? {
516
516
  scrollLeft: e.scrollLeft,
517
517
  scrollTop: e.scrollTop
518
518
  } : {
@@ -550,7 +550,7 @@ function mt(e) {
550
550
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
551
551
  }
552
552
  function Mt(e) {
553
- const t = D(e);
553
+ const t = k(e);
554
554
  let n = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
555
555
  const o = B(e), s = o ? e.offsetWidth : n, r = o ? e.offsetHeight : i, c = it(n) !== s || it(i) !== r;
556
556
  return c && (n = s, i = r), {
@@ -560,7 +560,7 @@ function Mt(e) {
560
560
  };
561
561
  }
562
562
  function Vt(e) {
563
- return A(e) ? e : e.contextElement;
563
+ return D(e) ? e : e.contextElement;
564
564
  }
565
565
  function q(e) {
566
566
  const t = Vt(e);
@@ -592,14 +592,14 @@ function G(e, t, n, i) {
592
592
  t === void 0 && (t = !1), n === void 0 && (n = !1);
593
593
  const o = e.getBoundingClientRect(), s = Vt(e);
594
594
  let r = N(1);
595
- t && (i ? A(i) && (r = q(i)) : r = q(e));
595
+ t && (i ? D(i) && (r = q(i)) : r = q(e));
596
596
  const c = pe(s, n, i) ? Wt(s) : N(0);
597
597
  let a = (o.left + c.x) / r.x, l = (o.top + c.y) / r.y, h = o.width / r.x, f = o.height / r.y;
598
598
  if (s) {
599
- const g = R(s), d = i && A(i) ? R(i) : i;
599
+ const g = R(s), d = i && D(i) ? R(i) : i;
600
600
  let u = g, p = mt(u);
601
601
  for (; p && i && d !== u; ) {
602
- const m = q(p), x = p.getBoundingClientRect(), b = D(p), v = x.left + (p.clientLeft + parseFloat(b.paddingLeft)) * m.x, S = x.top + (p.clientTop + parseFloat(b.paddingTop)) * m.y;
602
+ const m = q(p), x = p.getBoundingClientRect(), b = k(p), v = x.left + (p.clientLeft + parseFloat(b.paddingLeft)) * m.x, S = x.top + (p.clientTop + parseFloat(b.paddingTop)) * m.y;
603
603
  a *= m.x, l *= m.y, h *= m.x, f *= m.y, a += v, l += S, u = R(p), p = mt(u);
604
604
  }
605
605
  }
@@ -659,7 +659,7 @@ function ye(e) {
659
659
  const t = W(e), n = lt(e), i = e.ownerDocument.body, o = Y(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), s = Y(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
660
660
  let r = -n.scrollLeft + bt(e);
661
661
  const c = -n.scrollTop;
662
- return D(i).direction === "rtl" && (r += Y(t.clientWidth, i.clientWidth) - o), {
662
+ return k(i).direction === "rtl" && (r += Y(t.clientWidth, i.clientWidth) - o), {
663
663
  width: o,
664
664
  height: s,
665
665
  x: r,
@@ -696,7 +696,7 @@ function At(e, t, n) {
696
696
  i = we(e, n);
697
697
  else if (t === "document")
698
698
  i = ye(W(e));
699
- else if (A(t))
699
+ else if (D(t))
700
700
  i = ve(t, n);
701
701
  else {
702
702
  const o = Wt(e);
@@ -711,17 +711,17 @@ function At(e, t, n) {
711
711
  }
712
712
  function zt(e, t) {
713
713
  const n = j(e);
714
- return n === t || !A(n) || U(n) ? !1 : D(n).position === "fixed" || zt(n, t);
714
+ return n === t || !D(n) || U(n) ? !1 : k(n).position === "fixed" || zt(n, t);
715
715
  }
716
716
  function _e(e, t) {
717
717
  const n = t.get(e);
718
718
  if (n)
719
719
  return n;
720
- let i = pt(e, [], !1).filter((c) => A(c) && K(c) !== "body"), o = null;
721
- const s = D(e).position === "fixed";
720
+ let i = pt(e, [], !1).filter((c) => D(c) && K(c) !== "body"), o = null;
721
+ const s = k(e).position === "fixed";
722
722
  let r = s ? j(e) : e;
723
- for (; A(r) && !U(r); ) {
724
- const c = D(r), a = vt(r);
723
+ for (; D(r) && !U(r); ) {
724
+ const c = k(r), a = vt(r);
725
725
  !a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Q(r) && !a && zt(e, r)) ? i = i.filter((h) => h !== r) : o = c, r = j(r);
726
726
  }
727
727
  return t.set(e, i), i;
@@ -775,10 +775,10 @@ function Ce(e, t, n) {
775
775
  };
776
776
  }
777
777
  function ut(e) {
778
- return D(e).position === "static";
778
+ return k(e).position === "static";
779
779
  }
780
780
  function Dt(e, t) {
781
- if (!B(e) || D(e).position === "fixed")
781
+ if (!B(e) || k(e).position === "fixed")
782
782
  return null;
783
783
  if (t)
784
784
  return t(e);
@@ -792,7 +792,7 @@ function jt(e, t) {
792
792
  if (!B(e)) {
793
793
  let o = j(e);
794
794
  for (; o && !U(o); ) {
795
- if (A(o) && !ut(o))
795
+ if (D(o) && !ut(o))
796
796
  return o;
797
797
  o = j(o);
798
798
  }
@@ -804,7 +804,7 @@ function jt(e, t) {
804
804
  return i && U(i) && ut(i) && !vt(i) ? n : i || ue(e) || n;
805
805
  }
806
806
  const Le = function(e) {
807
- return $(this, null, function* () {
807
+ return A(this, null, function* () {
808
808
  const t = this.getOffsetParent || jt, n = this.getDimensions, i = yield n(e.floating);
809
809
  return {
810
810
  reference: Ce(e.reference, yield t(e.floating), e.strategy),
@@ -818,7 +818,7 @@ const Le = function(e) {
818
818
  });
819
819
  };
820
820
  function Pe(e) {
821
- return D(e).direction === "rtl";
821
+ return k(e).direction === "rtl";
822
822
  }
823
823
  const Te = {
824
824
  convertOffsetParentRelativeRectToViewportRelativeRect: me,
@@ -829,15 +829,15 @@ const Te = {
829
829
  getClientRects: xe,
830
830
  getDimensions: Se,
831
831
  getScale: q,
832
- isElement: A,
832
+ isElement: D,
833
833
  isRTL: Pe
834
834
  }, Ee = he, Re = ae, Oe = ce, $e = (e, t, n) => {
835
- const i = /* @__PURE__ */ new Map(), o = O({
835
+ const i = /* @__PURE__ */ new Map(), o = $({
836
836
  platform: Te
837
- }, n), s = X(O({}, o.platform), {
837
+ }, n), s = X($({}, o.platform), {
838
838
  _c: i
839
839
  });
840
- return se(e, t, X(O({}, o), {
840
+ return se(e, t, X($({}, o), {
841
841
  platform: s
842
842
  }));
843
843
  };
@@ -920,12 +920,12 @@ function ke(e, t, n) {
920
920
  ]);
921
921
  if (V(t.buttonList) && (t.buttonList = Ne(n)), t.buttonList.forEach((w) => {
922
922
  var I;
923
- const C = [`${n.config.classPrefix}-button`, (I = w.class) != null ? I : ""];
924
- V(w.type) || w.type === "secondary" ? C.push(`${n.config.classPrefix}-button-secondary`) : w.type === "primary" ? C.push(`${n.config.classPrefix}-button-primary`) : w.type === "link" && C.push(`${n.config.classPrefix}-button-link`), !V(w.class) && w.class !== "" && C.push(w.class);
925
- const L = E("button", C);
926
- L.innerHTML = n.config.translateFn(w.text), L.onclick = (F) => {
923
+ const L = [`${n.config.classPrefix}-button`, (I = w.class) != null ? I : ""];
924
+ V(w.type) || w.type === "secondary" ? L.push(`${n.config.classPrefix}-button-secondary`) : w.type === "primary" ? L.push(`${n.config.classPrefix}-button-primary`) : w.type === "link" && L.push(`${n.config.classPrefix}-button-link`), !V(w.class) && w.class !== "" && L.push(w.class);
925
+ const P = E("button", L);
926
+ P.innerHTML = n.config.translateFn(w.text), P.onclick = (F) => {
927
927
  w.action.call(n);
928
- }, r.appendChild(L);
928
+ }, r.appendChild(P);
929
929
  }), !n.config.progress.disable && n.config.progress.text && T(n.activeStepIndex)) {
930
930
  const w = E("p", [
931
931
  `${n.config.classPrefix}-progress`,
@@ -1079,7 +1079,7 @@ class He {
1079
1079
  this._index = t;
1080
1080
  }
1081
1081
  show(t) {
1082
- return $(this, null, function* () {
1082
+ return A(this, null, function* () {
1083
1083
  var i;
1084
1084
  if (V(this.tour.popup))
1085
1085
  return;
@@ -1087,11 +1087,11 @@ class He {
1087
1087
  typeof this._hostData == "function" ? this._hostData() : (i = this._hostData) != null ? i : null
1088
1088
  ));
1089
1089
  const n = [this._popupRenderer.render(this.tour.popup, this)];
1090
- this.tour.config.intersection.disable && T(this.tour.intersection) && n.push(this._intersectionRenderer.render(this.tour.intersection, this)), !this.tour.config.highlight.disable && !V(this.tour.highlight) && n.push(this._highlightRenderer.render(this.tour.highlight, this)), this.tour.config.highlight.disable && T(this.tour.highlight) && this._highlightRenderer.render(this.tour.highlight, {}), yield Promise.all(n), this.toggleZIndex(!0);
1090
+ !this.tour.config.interaction.disable && T(this.tour.intersection) && n.push(this._intersectionRenderer.render(this.tour.intersection, this)), !this.tour.config.highlight.disable && !V(this.tour.highlight) && n.push(this._highlightRenderer.render(this.tour.highlight, this)), this.tour.config.highlight.disable && T(this.tour.highlight) && this._highlightRenderer.render(this.tour.highlight, {}), yield Promise.all(n), this.toggleZIndex(!0);
1091
1091
  });
1092
1092
  }
1093
1093
  hide() {
1094
- return $(this, null, function* () {
1094
+ return A(this, null, function* () {
1095
1095
  this.toggleZIndex(!1);
1096
1096
  });
1097
1097
  }
@@ -1106,7 +1106,7 @@ function gt(e) {
1106
1106
  return e && typeof e == "object" && !Array.isArray(e);
1107
1107
  }
1108
1108
  function Ut(e, t) {
1109
- const n = O({}, e);
1109
+ const n = $({}, e);
1110
1110
  return gt(e) && gt(t) && Object.keys(t).forEach((i) => {
1111
1111
  const o = i, s = i;
1112
1112
  gt(t[o]) ? (s in e || Object.assign(n, { [s]: {} }), n[s] = Ut(e[s], t[o])) : Object.assign(n, { [s]: t[o] });
@@ -1149,7 +1149,7 @@ class Ie {
1149
1149
  y(this, "keyboardControl", (t) => {
1150
1150
  t.key === "ArrowRight" ? this.next() : t.key === "ArrowLeft" && this.prev();
1151
1151
  });
1152
- var n, i, o, s, r, c, a, l, h, f, g, d, u, p, m, x, b, v, S, _, w, C, L, I, F, z;
1152
+ var n, i, o, s, r, c, a, l, h, f, g, d, u, p, m, x, b, v, S, _, w, L, P, I, F, z, C;
1153
1153
  this._bodyResizeObserver = this.getBodyResizeObserver(), this._config = {
1154
1154
  classPrefix: (n = t.classPrefix) != null ? n : "siteguide",
1155
1155
  class: "",
@@ -1177,14 +1177,14 @@ class Ie {
1177
1177
  class: (w = (_ = t.highlight) == null ? void 0 : _.class) != null ? w : ""
1178
1178
  },
1179
1179
  progress: {
1180
- disable: (L = (C = t.progress) == null ? void 0 : C.disable) != null ? L : !0,
1180
+ disable: (P = (L = t.progress) == null ? void 0 : L.disable) != null ? P : !0,
1181
1181
  text: "Step {{currentStep}} of {{totalSteps}}"
1182
1182
  },
1183
- intersection: {
1184
- disable: (I = t.intersection.disable) != null ? I : !1
1183
+ interaction: {
1184
+ disable: (F = (I = t.interaction) == null ? void 0 : I.disable) != null ? F : !1
1185
1185
  },
1186
- keyboardControl: (F = t.keyboardControl) != null ? F : !1,
1187
- translateFn: (z = t.translateFn) != null ? z : (P) => P
1186
+ keyboardControl: (z = t.keyboardControl) != null ? z : !1,
1187
+ translateFn: (C = t.translateFn) != null ? C : (O) => O
1188
1188
  };
1189
1189
  }
1190
1190
  get stepList() {
@@ -1226,7 +1226,7 @@ class Ie {
1226
1226
  nt.isActive || (this.config.close.esc && document.addEventListener("keydown", this.closeOnEsc), this.config.keyboardControl && document.addEventListener("keydown", this.keyboardControl), nt.setActiveTour(this), this._popup = E("div", [this._config.classPrefix]), document.body.appendChild(this._popup), this._config.highlight.disable || (this._highlight = E("div", [
1227
1227
  this._config.highlight.class,
1228
1228
  `${this._config.classPrefix}-highlight`
1229
- ]), document.body.appendChild(this._highlight)), this._config.intersection.disable && (this._intersection = E("div", ["siteguide-intersection"]), document.body.appendChild(this._intersection)), this.next());
1229
+ ]), document.body.appendChild(this._highlight)), this._config.interaction.disable || (this._intersection = E("div", ["siteguide-intersection"]), document.body.appendChild(this._intersection)), this.next());
1230
1230
  }
1231
1231
  complete() {
1232
1232
  var t;
@@ -1241,7 +1241,7 @@ class Ie {
1241
1241
  this.changeStepTo(t, "fromBack");
1242
1242
  }
1243
1243
  next() {
1244
- return $(this, null, function* () {
1244
+ return A(this, null, function* () {
1245
1245
  var n, i, o;
1246
1246
  const t = T(this._activeStep) ? this._stepList.indexOf(this._activeStep) + 1 : this._stepList.indexOf(this._stepList[0]);
1247
1247
  if (t >= this._stepList.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siteguide.js",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Open source library made with vanilla Javascript and CSS to help you build website guides and onboarding tours.",
5
5
  "license": "MIT",
6
6
  "keywords": [