react-shepherd 6.1.0 → 6.1.1

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.js CHANGED
@@ -629,7 +629,7 @@ React keys must be passed directly to JSX without using spread:
629
629
  }
630
630
  process.env.NODE_ENV === "production" ? Ct.exports = Ar() : Ct.exports = Pr();
631
631
  var kr = Ct.exports;
632
- /*! shepherd.js 13.0.2 */
632
+ /*! shepherd.js 13.0.3 */
633
633
  function Ir(e) {
634
634
  return e instanceof Element;
635
635
  }
@@ -27,4 +27,4 @@ Check the top-level render call using <`+b+">.")}return p}}function Gn(l,p){{if(
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,qt,Pe,Vo,Pe),Qn[Pe+qt]=!0}}return l===r?jo(j):Lo(j),j}}function Do(l,p,b){return er(l,p,b,!0)}function Bo(l,p,b){return er(l,p,b,!1)}var No=Bo,Wo=Do;ze.Fragment=r,ze.jsx=No,ze.jsxs=Wo}()),ze}process.env.NODE_ENV==="production"?vt.exports=tr():vt.exports=nr();var rr=vt.exports;/*! shepherd.js 13.0.2 */function ir(e){return e instanceof Element}function qe(e){return e instanceof HTMLElement}function ge(e){return typeof e=="function"}function Je(e){return typeof e=="string"}function N(e){return e===void 0}class yt{on(t,n,r,i=!1){var s;return N(this.bindings)&&(this.bindings={}),N(this.bindings[t])&&(this.bindings[t]=[]),(s=this.bindings[t])==null||s.push({handler:n,ctx:r,once:i}),this}once(t,n,r){return this.on(t,n,r,!0)}off(t,n){if(N(this.bindings)||N(this.bindings[t]))return this;if(N(n))delete this.bindings[t];else{var r;(r=this.bindings[t])==null||r.forEach((i,s)=>{if(i.handler===n){var o;(o=this.bindings[t])==null||o.splice(s,1)}})}return this}trigger(t,...n){if(!N(this.bindings)&&this.bindings[t]){var r;(r=this.bindings[t])==null||r.forEach((i,s)=>{const{ctx:o,handler:c,once:a}=i,u=o||this;if(c.apply(u,n),a){var f;(f=this.bindings[t])==null||f.splice(s,1)}})}return this}}function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(null,arguments)}function Xt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}const me={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};me.defaultMerge;function or(e,t){return t}function Gt(e){return typeof e!="object"||e===null?0:Array.isArray(e)?2:cr(e)?1:e instanceof Set?3:e instanceof Map?4:5}function sr(e){const t=new Set;for(const n of e)for(const r of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(r);return t}function lr(e,t){return typeof e=="object"&&Object.prototype.propertyIsEnumerable.call(e,t)}function Zt(e){return{*[Symbol.iterator](){for(const t of e)for(const n of t)yield n}}}const Qt=new Set(["[object Object]","[object Module]"]);function cr(e){if(!Qt.has(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(t===void 0)return!0;const n=t.prototype;return!(n===null||typeof n!="object"||!Qt.has(Object.prototype.toString.call(n))||!n.hasOwnProperty("isPrototypeOf"))}function ar(e,t,n){const r={};for(const i of sr(e)){const s=[];for(const a of e)lr(a,i)&&s.push(a[i]);if(s.length===0)continue;const o=t.metaDataUpdater(n,{key:i,parents:e}),c=tn(s,t,o);c!==me.skip&&(i==="__proto__"?Object.defineProperty(r,i,{value:c,configurable:!0,enumerable:!0,writable:!0}):r[i]=c)}return r}function ur(e){return e.flat()}function fr(e){return new Set(Zt(e))}function dr(e){return new Map(Zt(e))}function en(e){return e.at(-1)}var _t=Object.freeze({__proto__:null,mergeArrays:ur,mergeMaps:dr,mergeOthers:en,mergeRecords:ar,mergeSets:fr});function wt(...e){return hr({})(...e)}function hr(e,t){const n=pr(e,r);function r(...i){return tn(i,n,t)}return r}function pr(e,t){var n,r;return{defaultMergeFunctions:_t,mergeFunctions:W({},_t,Object.fromEntries(Object.entries(e).filter(([i,s])=>Object.hasOwn(_t,i)).map(([i,s])=>s===!1?[i,en]:[i,s]))),metaDataUpdater:(n=e.metaDataUpdater)!=null?n:or,deepmerge:t,useImplicitDefaultMerging:(r=e.enableImplicitDefaultMerging)!=null?r:!1,actions:me}}function tn(e,t,n){if(e.length===0)return;if(e.length===1)return xt(e,t,n);const r=Gt(e[0]);if(r!==0&&r!==5){for(let i=1;i<e.length;i++)if(Gt(e[i])!==r)return xt(e,t,n)}switch(r){case 1:return gr(e,t,n);case 2:return mr(e,t,n);case 3:return br(e,t,n);case 4:return vr(e,t,n);default:return xt(e,t,n)}}function gr(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,n):r}function mr(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):r}function br(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):r}function vr(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):r}function xt(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}function Et(e){const t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n<t.length;n++){const r=t[n],i=e[r];r!=="constructor"&&typeof i=="function"&&(e[r]=i.bind(e))}return e}function yr(e,t){return n=>{if(e.isOpen()){const r=e.el&&n.currentTarget===e.el;(!N(t)&&n.currentTarget.matches(t)||r)&&e.tour.next()}}}function _r(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const r=yr(e,n);let i=null;if(!N(n)&&(i=document.querySelector(n),!i))return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);i?(i.addEventListener(t,r),e.on("destroy",()=>i.removeEventListener(t,r))):(document.body.addEventListener(t,r,!0),e.on("destroy",()=>document.body.removeEventListener(t,r,!0)))}else return console.error("advanceOn was defined, but no event name was passed.")}class wr{constructor(t){}}class xr{constructor(t,n){}}function nn(e){return!Je(e)||e===""?"":e.charAt(e.length-1)!=="-"?`${e}-`:e}function Er(e){const t=e.options.attachTo||{},n=Object.assign({},t);if(ge(n.element)&&(n.element=n.element.call(e)),Je(n.element)){try{n.element=document.querySelector(n.element)}catch{}n.element||console.error(`The element for this Shepherd step was not found ${t.element}`)}return n}function rn(e){return e==null?!0:!e.element||!e.on}function on(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t=="x"?n:n&3|8).toString(16)})}const ke=Math.min,xe=Math.max,nt=Math.round,rt=Math.floor,be=e=>({x:e,y:e}),Sr={left:"right",right:"left",bottom:"top",top:"bottom"},Or={start:"end",end:"start"};function St(e,t,n){return xe(e,ke(t,n))}function Ie(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function it(e){return e.split("-")[1]}function Ot(e){return e==="x"?"y":"x"}function Rt(e){return e==="y"?"height":"width"}function Me(e){return["top","bottom"].includes(Ee(e))?"y":"x"}function Tt(e){return Ot(Me(e))}function Rr(e,t,n){n===void 0&&(n=!1);const r=it(e),i=Tt(e),s=Rt(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=ot(o)),[o,ot(o)]}function Tr(e){const t=ot(e);return[Ct(e),t,Ct(t)]}function Ct(e){return e.replace(/start|end/g,t=>Or[t])}function Cr(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function Ar(e,t,n,r){const i=it(e);let s=Cr(Ee(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ct)))),s}function ot(e){return e.replace(/left|right|bottom|top/g,t=>Sr[t])}function Pr(e){return W({top:0,right:0,bottom:0,left:0},e)}function sn(e){return typeof e!="number"?Pr(e):{top:e,right:e,bottom:e,left:e}}function st(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const kr=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],Ir=["mainAxis","crossAxis","limiter"];function ln(e,t,n){let{reference:r,floating:i}=e;const s=Me(t),o=Tt(t),c=Rt(o),a=Ee(t),u=s==="y",f=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,d=r[c]/2-i[c]/2;let g;switch(a){case"top":g={x:f,y:r.y-i.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-i.width,y:h};break;default:g={x:r.x,y:r.y}}switch(it(t)){case"start":g[o]-=d*(n&&u?-1:1);break;case"end":g[o]+=d*(n&&u?-1:1);break}return g}const Mr=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,c=s.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=ln(u,r,a),d=r,g={},v=0;for(let x=0;x<c.length;x++){const{name:S,fn:w}=c[x],{x:_,y:R,data:y,reset:m}=await w({x:f,y:h,initialPlacement:r,placement:d,strategy:i,middlewareData:g,rects:u,platform:o,elements:{reference:e,floating:t}});f=_??f,h=R??h,g=W({},g,{[S]:W({},g[S],y)}),m&&v<=50&&(v++,typeof m=="object"&&(m.placement&&(d=m.placement),m.rects&&(u=m.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):m.rects),{x:f,y:h}=ln(u,d,a)),x=-1)}return{x:f,y:h,placement:d,strategy:i,middlewareData:g}};async function cn(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:c,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:d=!1,padding:g=0}=Ie(t,e),v=sn(g),S=c[d?h==="floating"?"reference":"floating":h],w=st(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:a})),_=h==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},m=st(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:R,strategy:a}):_);return{top:(w.top-m.top+v.top)/y.y,bottom:(m.bottom-w.bottom+v.bottom)/y.y,left:(w.left-m.left+v.left)/y.x,right:(m.right-w.right+v.right)/y.x}}const Fr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:c,middlewareData:a}=t,{element:u,padding:f=0}=Ie(e,t)||{};if(u==null)return{};const h=sn(f),d={x:n,y:r},g=Tt(i),v=Rt(g),x=await o.getDimensions(u),S=g==="y",w=S?"top":"left",_=S?"bottom":"right",R=S?"clientHeight":"clientWidth",y=s.reference[v]+s.reference[g]-d[g]-s.floating[v],m=d[g]-s.reference[g],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let B=T?T[R]:0;(!B||!await(o.isElement==null?void 0:o.isElement(T)))&&(B=c.floating[R]||s.floating[v]);const le=y/2-m/2,$=B/2-x[v]/2-1,X=ke(h[w],$),U=ke(h[_],$),V=X,D=B-x[v]-U,L=B/2-x[v]/2+le,G=St(V,L,D),Y=!a.arrow&&it(i)!=null&&L!==G&&s.reference[v]/2-(L<V?X:U)-x[v]/2<0,de=Y?L<V?L-V:L-D:0;return{[g]:d[g]+de,data:W({[g]:G,centerOffset:L-G-de},Y&&{alignmentOffset:de}),reset:Y}}}),Lr=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var r,i;const{placement:s,middlewareData:o,rects:c,initialPlacement:a,platform:u,elements:f}=n,h=Ie(t,n),{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0}=h,_=Xt(h,kr);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const R=Ee(s),y=Me(a),m=Ee(a)===a,T=await(u.isRTL==null?void 0:u.isRTL(f.floating)),B=v||(m||!w?[ot(a)]:Tr(a)),le=S!=="none";!v&&le&&B.push(...Ar(a,w,S,T));const $=[a,...B],X=await cn(n,_),U=[];let V=((i=o.flip)==null?void 0:i.overflows)||[];if(d&&U.push(X[R]),g){const Y=Rr(s,c,T);U.push(X[Y[0]],X[Y[1]])}if(V=[...V,{placement:s,overflows:U}],!U.every(Y=>Y<=0)){var D,L;const Y=(((D=o.flip)==null?void 0:D.index)||0)+1,de=$[Y];if(de)return{data:{index:Y,overflows:V},reset:{placement:de}};let we=(L=V.filter(he=>he.overflows[0]<=0).sort((he,ne)=>he.overflows[1]-ne.overflows[1])[0])==null?void 0:L.placement;if(!we)switch(x){case"bestFit":{var G;const he=(G=V.filter(ne=>{if(le){const re=Me(ne.placement);return re===y||re==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(re=>re>0).reduce((re,ht)=>re+ht,0)]).sort((ne,re)=>ne[1]-re[1])[0])==null?void 0:G[0];he&&(we=he);break}case"initialPlacement":we=a;break}if(s!==we)return{reset:{placement:we}}}return{}}}},jr=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:r,y:i,placement:s}=n,o=Ie(t,n),{mainAxis:c=!0,crossAxis:a=!1,limiter:u={fn:_=>{let{x:R,y}=_;return{x:R,y}}}}=o,f=Xt(o,Ir),h={x:r,y:i},d=await cn(n,f),g=Me(Ee(s)),v=Ot(g);let x=h[v],S=h[g];if(c){const _=v==="y"?"top":"left",R=v==="y"?"bottom":"right",y=x+d[_],m=x-d[R];x=St(y,x,m)}if(a){const _=g==="y"?"top":"left",R=g==="y"?"bottom":"right",y=S+d[_],m=S-d[R];S=St(y,S,m)}const w=u.fn(W({},n,{[v]:x,[g]:S}));return W({},w,{data:{x:w.x-r,y:w.y-i}})}}},Dr=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:r,y:i,placement:s,rects:o,middlewareData:c}=n,{offset:a=0,mainAxis:u=!0,crossAxis:f=!0}=Ie(t,n),h={x:r,y:i},d=Me(s),g=Ot(d);let v=h[g],x=h[d];const S=Ie(a,n),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:W({mainAxis:0,crossAxis:0},S);if(u){const y=g==="y"?"height":"width",m=o.reference[g]-o.floating[y]+w.mainAxis,T=o.reference[g]+o.reference[y]-w.mainAxis;v<m?v=m:v>T&&(v=T)}if(f){var _,R;const y=g==="y"?"width":"height",m=["top","left"].includes(Ee(s)),T=o.reference[d]-o.floating[y]+(m&&((_=c.offset)==null?void 0:_[d])||0)+(m?0:w.crossAxis),B=o.reference[d]+o.reference[y]+(m?0:((R=c.offset)==null?void 0:R[d])||0)-(m?w.crossAxis:0);x<T?x=T:x>B&&(x=B)}return{[g]:v,[d]:x}}}};function Fe(e){return an(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ce(e){var t;return(t=(an(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function an(e){return e instanceof Node||e instanceof q(e).Node}function Q(e){return e instanceof Element||e instanceof q(e).Element}function oe(e){return e instanceof HTMLElement||e instanceof q(e).HTMLElement}function un(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}function Ke(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Br(e){return["table","td","th"].includes(Fe(e))}function lt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function At(e){const t=Pt(),n=Q(e)?ee(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(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Nr(e){let t=ve(e);for(;oe(t)&&!Le(t);){if(At(t))return t;if(lt(t))return null;t=ve(t)}return null}function Pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Le(e){return["html","body","#document"].includes(Fe(e))}function ee(e){return q(e).getComputedStyle(e)}function ct(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(Fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||un(e)&&e.host||ce(e);return un(t)?t.host:t}function fn(e){const t=ve(e);return Le(t)?e.ownerDocument?e.ownerDocument.body:e.body:oe(t)&&Ke(t)?t:fn(t)}function Xe(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=fn(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=q(i);return s?t.concat(o,o.visualViewport||[],Ke(i)?i:[],o.frameElement&&n?Xe(o.frameElement):[]):t.concat(i,Xe(i,[],n))}function dn(e){const t=ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=oe(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,c=nt(n)!==s||nt(r)!==o;return c&&(n=s,r=o),{width:n,height:r,$:c}}function kt(e){return Q(e)?e:e.contextElement}function je(e){const t=kt(e);if(!oe(t))return be(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=dn(t);let o=(s?nt(n.width):n.width)/r,c=(s?nt(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!c||!Number.isFinite(c))&&(c=1),{x:o,y:c}}const Wr=be(0);function hn(e){const t=q(e);return!Pt()||!t.visualViewport?Wr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Se(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=kt(e);let o=be(1);t&&(r?Q(r)&&(o=je(r)):o=je(e));const c=Vr(s,n,r)?hn(s):be(0);let a=(i.left+c.x)/o.x,u=(i.top+c.y)/o.y,f=i.width/o.x,h=i.height/o.y;if(s){const d=q(s),g=r&&Q(r)?q(r):r;let v=d,x=v.frameElement;for(;x&&r&&g!==v;){const S=je(x),w=x.getBoundingClientRect(),_=ee(x),R=w.left+(x.clientLeft+parseFloat(_.paddingLeft))*S.x,y=w.top+(x.clientTop+parseFloat(_.paddingTop))*S.y;a*=S.x,u*=S.y,f*=S.x,h*=S.y,a+=R,u+=y,v=q(x),x=v.frameElement}}return st({width:f,height:h,x:a,y:u})}function Hr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=ce(r),c=t?lt(t.floating):!1;if(r===o||c&&s)return n;let a={scrollLeft:0,scrollTop:0},u=be(1);const f=be(0),h=oe(r);if((h||!h&&!s)&&((Fe(r)!=="body"||Ke(o))&&(a=ct(r)),oe(r))){const d=Se(r);u=je(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+f.x,y:n.y*u.y-a.scrollTop*u.y+f.y}}function $r(e){return Array.from(e.getClientRects())}function pn(e){return Se(ce(e)).left+ct(e).scrollLeft}function Ur(e){const t=ce(e),n=ct(e),r=e.ownerDocument.body,i=xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+pn(e);const c=-n.scrollTop;return ee(r).direction==="rtl"&&(o+=xe(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:c}}function Yr(e,t){const n=q(e),r=ce(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,c=0,a=0;if(i){s=i.width,o=i.height;const u=Pt();(!u||u&&t==="fixed")&&(c=i.offsetLeft,a=i.offsetTop)}return{width:s,height:o,x:c,y:a}}function zr(e,t){const n=Se(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=oe(e)?je(e):be(1),o=e.clientWidth*s.x,c=e.clientHeight*s.y,a=i*s.x,u=r*s.y;return{width:o,height:c,x:a,y:u}}function gn(e,t,n){let r;if(t==="viewport")r=Yr(e,n);else if(t==="document")r=Ur(ce(e));else if(Q(t))r=zr(t,n);else{const i=hn(e);r=W({},t,{x:t.x-i.x,y:t.y-i.y})}return st(r)}function mn(e,t){const n=ve(e);return n===t||!Q(n)||Le(n)?!1:ee(n).position==="fixed"||mn(n,t)}function qr(e,t){const n=t.get(e);if(n)return n;let r=Xe(e,[],!1).filter(c=>Q(c)&&Fe(c)!=="body"),i=null;const s=ee(e).position==="fixed";let o=s?ve(e):e;for(;Q(o)&&!Le(o);){const c=ee(o),a=At(o);!a&&c.position==="fixed"&&(i=null),(s?!a&&!i:!a&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ke(o)&&!a&&mn(e,o))?r=r.filter(f=>f!==o):i=c,o=ve(o)}return t.set(e,r),r}function Jr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?lt(t)?[]:qr(t,this._c):[].concat(n),r],c=o[0],a=o.reduce((u,f)=>{const h=gn(t,f,i);return u.top=xe(h.top,u.top),u.right=ke(h.right,u.right),u.bottom=ke(h.bottom,u.bottom),u.left=xe(h.left,u.left),u},gn(t,c,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Kr(e){const{width:t,height:n}=dn(e);return{width:t,height:n}}function Xr(e,t,n){const r=oe(t),i=ce(t),s=n==="fixed",o=Se(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const a=be(0);if(r||!r&&!s)if((Fe(t)!=="body"||Ke(i))&&(c=ct(t)),r){const h=Se(t,!0,s,t);a.x=h.x+t.clientLeft,a.y=h.y+t.clientTop}else i&&(a.x=pn(i));const u=o.left+c.scrollLeft-a.x,f=o.top+c.scrollTop-a.y;return{x:u,y:f,width:o.width,height:o.height}}function It(e){return ee(e).position==="static"}function bn(e,t){return!oe(e)||ee(e).position==="fixed"?null:t?t(e):e.offsetParent}function vn(e,t){const n=q(e);if(lt(e))return n;if(!oe(e)){let i=ve(e);for(;i&&!Le(i);){if(Q(i)&&!It(i))return i;i=ve(i)}return n}let r=bn(e,t);for(;r&&Br(r)&&It(r);)r=bn(r,t);return r&&Le(r)&&It(r)&&!At(r)?n:r||Nr(e)||n}const Gr=async function(t){const n=this.getOffsetParent||vn,r=this.getDimensions,i=await r(t.floating);return{reference:Xr(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Zr(e){return ee(e).direction==="rtl"}const Qr={convertOffsetParentRelativeRectToViewportRelativeRect:Hr,getDocumentElement:ce,getClippingRect:Jr,getOffsetParent:vn,getElementRects:Gr,getClientRects:$r,getDimensions:Kr,getScale:je,isElement:Q,isRTL:Zr};function ei(e,t){let n=null,r;const i=ce(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function o(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),s();const{left:u,top:f,width:h,height:d}=e.getBoundingClientRect();if(c||t(),!h||!d)return;const g=rt(f),v=rt(i.clientWidth-(u+h)),x=rt(i.clientHeight-(f+d)),S=rt(u),_={rootMargin:-g+"px "+-v+"px "+-x+"px "+-S+"px",threshold:xe(0,ke(1,a))||1};let R=!0;function y(m){const T=m[0].intersectionRatio;if(T!==a){if(!R)return o();T?o(!1,T):r=setTimeout(()=>{o(!1,1e-7)},1e3)}R=!1}try{n=new IntersectionObserver(y,W({},_,{root:i.ownerDocument}))}catch{n=new IntersectionObserver(y,_)}n.observe(e)}return o(!0),s}function ti(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=kt(e),f=i||s?[...u?Xe(u):[],...Xe(t)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const h=u&&c?ei(u,n):null;let d=-1,g=null;o&&(g=new ResizeObserver(w=>{let[_]=w;_&&_.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var R;(R=g)==null||R.observe(t)})),n()}),u&&!a&&g.observe(u),g.observe(t));let v,x=a?Se(e):null;a&&S();function S(){const w=Se(e);x&&(w.x!==x.x||w.y!==x.y||w.width!==x.width||w.height!==x.height)&&n(),x=w,v=requestAnimationFrame(S)}return n(),()=>{var w;f.forEach(_=>{i&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),h==null||h(),(w=g)==null||w.disconnect(),g=null,a&&cancelAnimationFrame(v)}}const ni=jr,ri=Lr,ii=Fr,oi=Dr,si=(e,t,n)=>{const r=new Map,i=W({platform:Qr},n),s=W({},i.platform,{_c:r});return Mr(e,t,W({},i,{platform:s}))};function li(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const r=hi(t,e),i=rn(t);return i&&(n=document.body,e.shepherdElementComponent.getElement().classList.add("shepherd-centered")),e.cleanup=ti(n,e.el,()=>{if(!e.el){e.cleanup==null||e.cleanup();return}ui(n,e,r,i)}),e.target=t.element,r}function ci(e,t){return{floatingUIOptions:wt(e.floatingUIOptions||{},t.floatingUIOptions||{})}}function ai(e){e.cleanup&&e.cleanup(),e.cleanup=null}function ui(e,t,n,r){return si(e,t.el,n).then(fi(t,r)).then(i=>new Promise(s=>{setTimeout(()=>s(i),300)})).then(i=>{i!=null&&i.el&&i.el.focus({preventScroll:!0})})}function fi(e,t){return({x:n,y:r,placement:i,middlewareData:s})=>(e.el&&(t?Object.assign(e.el.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}):Object.assign(e.el.style,{position:"absolute",left:`${n}px`,top:`${r}px`}),e.el.dataset.popperPlacement=i,di(e.el,s)),e)}function di(e,t){const n=e.querySelector(".shepherd-arrow");if(qe(n)&&t.arrow){const{x:r,y:i}=t.arrow;Object.assign(n.style,{left:r!=null?`${r}px`:"",top:i!=null?`${i}px`:""})}}function hi(e,t){const n={strategy:"absolute"};n.middleware=[];const r=pi(t);if(!rn(e)){if(n.middleware.push(ri(),ni({limiter:oi(),crossAxis:!0})),r){var s,o;const c=(e==null||(s=e.on)==null?void 0:s.includes("-start"))||(e==null||(o=e.on)==null?void 0:o.includes("-end"));n.middleware.push(ii({element:r,padding:c?4:0}))}n.placement=e.on}return wt(t.options.floatingUIOptions||{},n)}function pi(e){return e.options.arrow&&e.el?e.el.querySelector(".shepherd-arrow"):!1}function J(){}function gi(e,t){for(const n in t)e[n]=t[n];return e}function yn(e){return e()}function _n(){return Object.create(null)}function Ge(e){e.forEach(yn)}function Mt(e){return typeof e=="function"}function ae(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function mi(e){return Object.keys(e).length===0}function De(e,t){e.appendChild(t)}function te(e,t,n){e.insertBefore(t,n||null)}function K(e){e.parentNode&&e.parentNode.removeChild(e)}function bi(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function se(e){return document.createElement(e)}function wn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function xn(e){return document.createTextNode(e)}function at(){return xn(" ")}function vi(){return xn("")}function ut(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function k(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const yi=["width","height"];function En(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&yi.indexOf(r)===-1?e[r]=t[r]:k(e,r,t[r])}function _i(e){return Array.from(e.childNodes)}function Be(e,t,n){e.classList.toggle(t,!!n)}let Ze;function Qe(e){Ze=e}function Sn(){if(!Ze)throw new Error("Function called outside component initialization");return Ze}function wi(e){Sn().$$.on_mount.push(e)}function Ft(e){Sn().$$.after_update.push(e)}const Ne=[],We=[];let Ve=[];const On=[],xi=Promise.resolve();let Lt=!1;function Ei(){Lt||(Lt=!0,xi.then(Rn))}function jt(e){Ve.push(e)}const Dt=new Set;let He=0;function Rn(){if(He!==0)return;const e=Ze;do{try{for(;He<Ne.length;){const t=Ne[He];He++,Qe(t),Si(t.$$)}}catch(t){throw Ne.length=0,He=0,t}for(Qe(null),Ne.length=0,He=0;We.length;)We.pop()();for(let t=0;t<Ve.length;t+=1){const n=Ve[t];Dt.has(n)||(Dt.add(n),n())}Ve.length=0}while(Ne.length);for(;On.length;)On.pop()();Lt=!1,Dt.clear(),Qe(e)}function Si(e){if(e.fragment!==null){e.update(),Ge(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(jt)}}function Oi(e){const t=[],n=[];Ve.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Ve=t}const ft=new Set;let Oe;function Re(){Oe={r:0,c:[],p:Oe}}function Te(){Oe.r||Ge(Oe.c),Oe=Oe.p}function P(e,t){e&&e.i&&(ft.delete(e),e.i(t))}function M(e,t,n,r){if(e&&e.o){if(ft.has(e))return;ft.add(e),Oe.c.push(()=>{ft.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function Tn(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Ri(e,t){const n={},r={},i={$$scope:1};let s=e.length;for(;s--;){const o=e[s],c=t[s];if(c){for(const a in o)a in c||(r[a]=1);for(const a in c)i[a]||(n[a]=c[a],i[a]=1);e[s]=c}else for(const a in o)i[a]=1}for(const o in r)o in n||(n[o]=void 0);return n}function Ce(e){e&&e.c()}function ye(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),jt(()=>{const s=e.$$.on_mount.map(yn).filter(Mt);e.$$.on_destroy?e.$$.on_destroy.push(...s):Ge(s),e.$$.on_mount=[]}),i.forEach(jt)}function _e(e,t){const n=e.$$;n.fragment!==null&&(Oi(n.after_update),Ge(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ti(e,t){e.$$.dirty[0]===-1&&(Ne.push(e),Ei(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ue(e,t,n,r,i,s,o=null,c=[-1]){const a=Ze;Qe(e);const u=e.$$={fragment:null,ctx:[],props:s,update:J,not_equal:i,bound:_n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:_n(),dirty:c,skip_bound:!1,root:t.target||a.$$.root};o&&o(u.root);let f=!1;if(u.ctx=n?n(e,t.props||{},(h,d,...g)=>{const v=g.length?g[0]:d;return u.ctx&&i(u.ctx[h],u.ctx[h]=v)&&(!u.skip_bound&&u.bound[h]&&u.bound[h](v),f&&Ti(e,h)),d}):[],u.update(),f=!0,Ge(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const h=_i(t.target);u.fragment&&u.fragment.l(h),h.forEach(K)}else u.fragment&&u.fragment.c();t.intro&&P(e.$$.fragment),ye(e,t.target,t.anchor),Rn()}Qe(a)}class fe{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){_e(this,1),this.$destroy=J}$on(t,n){if(!Mt(n))return J;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!mi(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ci="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ci);function Ai(e){let t,n,r,i,s;return{c(){t=se("button"),k(t,"aria-label",n=e[3]?e[3]:null),k(t,"class",r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],k(t,"tabindex","0"),k(t,"type","button")},m(o,c){te(o,t,c),t.innerHTML=e[5],i||(s=ut(t,"click",function(){Mt(e[0])&&e[0].apply(this,arguments)}),i=!0)},p(o,[c]){e=o,c&32&&(t.innerHTML=e[5]),c&8&&n!==(n=e[3]?e[3]:null)&&k(t,"aria-label",n),c&18&&r!==(r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&k(t,"class",r),c&4&&(t.disabled=e[2])},i:J,o:J,d(o){o&&K(t),i=!1,s()}}}function Pi(e,t,n){let{config:r,step:i}=t,s,o,c,a,u,f;function h(d){return ge(d)?d=d.call(i):d}return e.$$set=d=>{"config"in d&&n(6,r=d.config),"step"in d&&n(7,i=d.step)},e.$$.update=()=>{e.$$.dirty&192&&(n(0,s=r.action?r.action.bind(i.tour):null),n(1,o=r.classes),n(2,c=r.disabled?h(r.disabled):!1),n(3,a=r.label?h(r.label):null),n(4,u=r.secondary),n(5,f=r.text?h(r.text):null))},[s,o,c,a,u,f,r,i]}class ki extends fe{constructor(t){super(),ue(this,t,Pi,Ai,ae,{config:6,step:7})}}function Cn(e,t,n){const r=e.slice();return r[2]=t[n],r}function An(e){let t,n,r=Tn(e[1]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Pn(Cn(e,r,o));const s=o=>M(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();t=vi()},m(o,c){for(let a=0;a<i.length;a+=1)i[a]&&i[a].m(o,c);te(o,t,c),n=!0},p(o,c){if(c&3){r=Tn(o[1]);let a;for(a=0;a<r.length;a+=1){const u=Cn(o,r,a);i[a]?(i[a].p(u,c),P(i[a],1)):(i[a]=Pn(u),i[a].c(),P(i[a],1),i[a].m(t.parentNode,t))}for(Re(),a=r.length;a<i.length;a+=1)s(a);Te()}},i(o){if(!n){for(let c=0;c<r.length;c+=1)P(i[c]);n=!0}},o(o){i=i.filter(Boolean);for(let c=0;c<i.length;c+=1)M(i[c]);n=!1},d(o){o&&K(t),bi(i,o)}}}function Pn(e){let t,n;return t=new ki({props:{config:e[2],step:e[0]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&2&&(s.config=r[2]),i&1&&(s.step=r[0]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function Ii(e){let t,n,r=e[1]&&An(e);return{c(){t=se("footer"),r&&r.c(),k(t,"class","shepherd-footer")},m(i,s){te(i,t,s),r&&r.m(t,null),n=!0},p(i,[s]){i[1]?r?(r.p(i,s),s&2&&P(r,1)):(r=An(i),r.c(),P(r,1),r.m(t,null)):r&&(Re(),M(r,1,1,()=>{r=null}),Te())},i(i){n||(P(r),n=!0)},o(i){M(r),n=!1},d(i){i&&K(t),r&&r.d()}}}function Mi(e,t,n){let r,{step:i}=t;return e.$$set=s=>{"step"in s&&n(0,i=s.step)},e.$$.update=()=>{e.$$.dirty&1&&n(1,r=i.options.buttons)},[i,r]}class Fi extends fe{constructor(t){super(),ue(this,t,Mi,Ii,ae,{step:0})}}function Li(e){let t,n,r,i,s;return{c(){t=se("button"),n=se("span"),n.textContent="×",k(n,"aria-hidden","true"),k(t,"aria-label",r=e[0].label?e[0].label:"Close Tour"),k(t,"class","shepherd-cancel-icon"),k(t,"type","button")},m(o,c){te(o,t,c),De(t,n),i||(s=ut(t,"click",e[1]),i=!0)},p(o,[c]){c&1&&r!==(r=o[0].label?o[0].label:"Close Tour")&&k(t,"aria-label",r)},i:J,o:J,d(o){o&&K(t),i=!1,s()}}}function ji(e,t,n){let{cancelIcon:r,step:i}=t;const s=o=>{o.preventDefault(),i.cancel()};return e.$$set=o=>{"cancelIcon"in o&&n(0,r=o.cancelIcon),"step"in o&&n(2,i=o.step)},[r,s,i]}class Di extends fe{constructor(t){super(),ue(this,t,ji,Li,ae,{cancelIcon:0,step:2})}}function Bi(e){let t;return{c(){t=se("h3"),k(t,"id",e[1]),k(t,"class","shepherd-title")},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:J,o:J,d(n){n&&K(t),e[3](null)}}}function Ni(e,t,n){let{labelId:r,element:i,title:s}=t;Ft(()=>{ge(s)&&n(2,s=s()),n(0,i.innerHTML=s,i)});function o(c){We[c?"unshift":"push"](()=>{i=c,n(0,i)})}return e.$$set=c=>{"labelId"in c&&n(1,r=c.labelId),"element"in c&&n(0,i=c.element),"title"in c&&n(2,s=c.title)},[i,r,s,o]}class Wi extends fe{constructor(t){super(),ue(this,t,Ni,Bi,ae,{labelId:1,element:0,title:2})}}function kn(e){let t,n;return t=new Wi({props:{labelId:e[0],title:e[2]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&1&&(s.labelId=r[0]),i&4&&(s.title=r[2]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function In(e){let t,n;return t=new Di({props:{cancelIcon:e[3],step:e[1]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&8&&(s.cancelIcon=r[3]),i&2&&(s.step=r[1]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function Vi(e){let t,n,r,i=e[2]&&kn(e),s=e[3]&&e[3].enabled&&In(e);return{c(){t=se("header"),i&&i.c(),n=at(),s&&s.c(),k(t,"class","shepherd-header")},m(o,c){te(o,t,c),i&&i.m(t,null),De(t,n),s&&s.m(t,null),r=!0},p(o,[c]){o[2]?i?(i.p(o,c),c&4&&P(i,1)):(i=kn(o),i.c(),P(i,1),i.m(t,n)):i&&(Re(),M(i,1,1,()=>{i=null}),Te()),o[3]&&o[3].enabled?s?(s.p(o,c),c&8&&P(s,1)):(s=In(o),s.c(),P(s,1),s.m(t,null)):s&&(Re(),M(s,1,1,()=>{s=null}),Te())},i(o){r||(P(i),P(s),r=!0)},o(o){M(i),M(s),r=!1},d(o){o&&K(t),i&&i.d(),s&&s.d()}}}function Hi(e,t,n){let{labelId:r,step:i}=t,s,o;return e.$$set=c=>{"labelId"in c&&n(0,r=c.labelId),"step"in c&&n(1,i=c.step)},e.$$.update=()=>{e.$$.dirty&2&&(n(2,s=i.options.title),n(3,o=i.options.cancelIcon))},[r,i,s,o]}class $i extends fe{constructor(t){super(),ue(this,t,Hi,Vi,ae,{labelId:0,step:1})}}function Ui(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-text"),k(t,"id",e[1])},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:J,o:J,d(n){n&&K(t),e[3](null)}}}function Yi(e,t,n){let{descriptionId:r,element:i,step:s}=t;Ft(()=>{let{text:c}=s.options;ge(c)&&(c=c.call(s)),qe(c)?i.appendChild(c):n(0,i.innerHTML=c,i)});function o(c){We[c?"unshift":"push"](()=>{i=c,n(0,i)})}return e.$$set=c=>{"descriptionId"in c&&n(1,r=c.descriptionId),"element"in c&&n(0,i=c.element),"step"in c&&n(2,s=c.step)},[i,r,s,o]}class zi extends fe{constructor(t){super(),ue(this,t,Yi,Ui,ae,{descriptionId:1,element:0,step:2})}}function Mn(e){let t,n;return t=new $i({props:{labelId:e[1],step:e[2]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&2&&(s.labelId=r[1]),i&4&&(s.step=r[2]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function Fn(e){let t,n;return t=new zi({props:{descriptionId:e[0],step:e[2]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&1&&(s.descriptionId=r[0]),i&4&&(s.step=r[2]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function Ln(e){let t,n;return t=new Fi({props:{step:e[2]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&4&&(s.step=r[2]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function qi(e){let t,n=!N(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,r,i=!N(e[2].options.text),s,o=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,c,a=n&&Mn(e),u=i&&Fn(e),f=o&&Ln(e);return{c(){t=se("div"),a&&a.c(),r=at(),u&&u.c(),s=at(),f&&f.c(),k(t,"class","shepherd-content")},m(h,d){te(h,t,d),a&&a.m(t,null),De(t,r),u&&u.m(t,null),De(t,s),f&&f.m(t,null),c=!0},p(h,[d]){d&4&&(n=!N(h[2].options.title)||h[2].options.cancelIcon&&h[2].options.cancelIcon.enabled),n?a?(a.p(h,d),d&4&&P(a,1)):(a=Mn(h),a.c(),P(a,1),a.m(t,r)):a&&(Re(),M(a,1,1,()=>{a=null}),Te()),d&4&&(i=!N(h[2].options.text)),i?u?(u.p(h,d),d&4&&P(u,1)):(u=Fn(h),u.c(),P(u,1),u.m(t,s)):u&&(Re(),M(u,1,1,()=>{u=null}),Te()),d&4&&(o=Array.isArray(h[2].options.buttons)&&h[2].options.buttons.length),o?f?(f.p(h,d),d&4&&P(f,1)):(f=Ln(h),f.c(),P(f,1),f.m(t,null)):f&&(Re(),M(f,1,1,()=>{f=null}),Te())},i(h){c||(P(a),P(u),P(f),c=!0)},o(h){M(a),M(u),M(f),c=!1},d(h){h&&K(t),a&&a.d(),u&&u.d(),f&&f.d()}}}function Ji(e,t,n){let{descriptionId:r,labelId:i,step:s}=t;return e.$$set=o=>{"descriptionId"in o&&n(0,r=o.descriptionId),"labelId"in o&&n(1,i=o.labelId),"step"in o&&n(2,s=o.step)},[r,i,s]}class Ki extends fe{constructor(t){super(),ue(this,t,Ji,qi,ae,{descriptionId:0,labelId:1,step:2})}}function jn(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-arrow"),k(t,"data-popper-arrow","")},m(n,r){te(n,t,r)},d(n){n&&K(t)}}}function Xi(e){let t,n,r,i,s,o,c,a,u=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&jn();r=new Ki({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let f=[{"aria-describedby":i=N(e[4].options.text)?null:e[2]},{"aria-labelledby":s=e[4].options.title?e[3]:null},e[1],{role:"dialog"},{tabindex:"0"}],h={};for(let d=0;d<f.length;d+=1)h=gi(h,f[d]);return{c(){t=se("div"),u&&u.c(),n=at(),Ce(r.$$.fragment),En(t,h),Be(t,"shepherd-has-cancel-icon",e[5]),Be(t,"shepherd-has-title",e[6]),Be(t,"shepherd-element",!0)},m(d,g){te(d,t,g),u&&u.m(t,null),De(t,n),ye(r,t,null),e[13](t),o=!0,c||(a=ut(t,"keydown",e[7]),c=!0)},p(d,[g]){d[4].options.arrow&&d[4].options.attachTo&&d[4].options.attachTo.element&&d[4].options.attachTo.on?u||(u=jn(),u.c(),u.m(t,n)):u&&(u.d(1),u=null);const v={};g&4&&(v.descriptionId=d[2]),g&8&&(v.labelId=d[3]),g&16&&(v.step=d[4]),r.$set(v),En(t,h=Ri(f,[(!o||g&20&&i!==(i=N(d[4].options.text)?null:d[2]))&&{"aria-describedby":i},(!o||g&24&&s!==(s=d[4].options.title?d[3]:null))&&{"aria-labelledby":s},g&2&&d[1],{role:"dialog"},{tabindex:"0"}])),Be(t,"shepherd-has-cancel-icon",d[5]),Be(t,"shepherd-has-title",d[6]),Be(t,"shepherd-element",!0)},i(d){o||(P(r.$$.fragment,d),o=!0)},o(d){M(r.$$.fragment,d),o=!1},d(d){d&&K(t),u&&u.d(),_e(r),e[13](null),c=!1,a()}}}const Gi=9,Zi=27,Qi=37,eo=39;function Dn(e){return e.split(" ").filter(t=>!!t.length)}function to(e,t,n){let{classPrefix:r,element:i,descriptionId:s,firstFocusableElement:o,focusableElements:c,labelId:a,lastFocusableElement:u,step:f,dataStepId:h}=t,d,g,v;const x=()=>i;wi(()=>{n(1,h={[`data-${r}shepherd-step-id`]:f.id}),n(9,c=i.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,o=c[0]),n(10,u=c[c.length-1])}),Ft(()=>{v!==f.options.classes&&S()});function S(){w(v),v=f.options.classes,_(v)}function w(m){if(Je(m)){const T=Dn(m);T.length&&i.classList.remove(...T)}}function _(m){if(Je(m)){const T=Dn(m);T.length&&i.classList.add(...T)}}const R=m=>{const{tour:T}=f;switch(m.keyCode){case Gi:if(c.length===0){m.preventDefault();break}m.shiftKey?(document.activeElement===o||document.activeElement.classList.contains("shepherd-element"))&&(m.preventDefault(),u.focus()):document.activeElement===u&&(m.preventDefault(),o.focus());break;case Zi:T.options.exitOnEsc&&(m.preventDefault(),m.stopPropagation(),f.cancel());break;case Qi:T.options.keyboardNavigation&&(m.preventDefault(),m.stopPropagation(),T.back());break;case eo:T.options.keyboardNavigation&&(m.preventDefault(),m.stopPropagation(),T.next());break}};function y(m){We[m?"unshift":"push"](()=>{i=m,n(0,i)})}return e.$$set=m=>{"classPrefix"in m&&n(11,r=m.classPrefix),"element"in m&&n(0,i=m.element),"descriptionId"in m&&n(2,s=m.descriptionId),"firstFocusableElement"in m&&n(8,o=m.firstFocusableElement),"focusableElements"in m&&n(9,c=m.focusableElements),"labelId"in m&&n(3,a=m.labelId),"lastFocusableElement"in m&&n(10,u=m.lastFocusableElement),"step"in m&&n(4,f=m.step),"dataStepId"in m&&n(1,h=m.dataStepId)},e.$$.update=()=>{e.$$.dirty&16&&(n(5,d=f.options&&f.options.cancelIcon&&f.options.cancelIcon.enabled),n(6,g=f.options&&f.options.title))},[i,h,s,a,f,d,g,R,o,c,u,r,x,y]}class no extends fe{constructor(t){super(),ue(this,t,to,Xi,ae,{classPrefix:11,element:0,descriptionId:2,firstFocusableElement:8,focusableElements:9,labelId:3,lastFocusableElement:10,step:4,dataStepId:1,getElement:12})}get getElement(){return this.$$.ctx[12]}}class Bt extends yt{constructor(t,n={}){return super(),this._resolvedAttachTo=void 0,this.classPrefix=void 0,this.el=void 0,this.target=void 0,this.tour=void 0,this.tour=t,this.classPrefix=this.tour.options?nn(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,Et(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){ai(this),qe(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this.trigger("destroy")}getTour(){return this.tour}hide(){var t;(t=this.tour.modal)==null||t.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveAttachToOptions(){return this._resolvedAttachTo=Er(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return ge(this.options.beforeShowPromise)?Promise.resolve(this.options.beforeShowPromise()).then(()=>this._show()):Promise.resolve(this._show())}updateStepOptions(t){Object.assign(this.options,t),this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})}getElement(){return this.el}getTarget(){return this.target}_createTooltipContent(){const t=`${this.id}-description`,n=`${this.id}-label`;return this.shepherdElementComponent=new no({target:this.tour.options.stepsContainer||document.body,props:{classPrefix:this.classPrefix,descriptionId:t,labelId:n,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()}_scrollTo(t){const{element:n}=this._getResolvedAttachToOptions();ge(this.options.scrollToHandler)?this.options.scrollToHandler(n):ir(n)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView(t)}_getClassOptions(t){const n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,r=t.classes?t.classes:"",i=n&&n.classes?n.classes:"",s=[...r.split(" "),...i.split(" ")],o=new Set(s);return Array.from(o).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=wt({},n||{}),this.options=Object.assign({arrow:!0},n,t,ci(n,t));const{when:r}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${on()}`,r&&Object.keys(r).forEach(i=>{this.on(i,r[i],this)})}_setupElements(){N(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&_r(this),li(this)}_show(){var t;this.trigger("before-show"),this._resolveAttachToOptions(),this._setupElements(),this.tour.modal||this.tour.setupModal(),(t=this.tour.modal)==null||t.setupForStep(this),this._styleTargetElementForStep(this),this.el&&(this.el.hidden=!1),this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),this.el&&(this.el.hidden=!1);const n=this.shepherdElementComponent.getElement(),r=this.target||document.body;r.classList.add(`${this.classPrefix}shepherd-enabled`),r.classList.add(`${this.classPrefix}shepherd-target`),n.classList.add("shepherd-enabled"),this.trigger("show")}_styleTargetElementForStep(t){const n=t.target;n&&(t.options.highlightClass&&n.classList.add(t.options.highlightClass),n.classList.remove("shepherd-target-click-disabled"),t.options.canClickTarget===!1&&n.classList.add("shepherd-target-click-disabled"))}_updateStepTargetOnHide(){const t=this.target||document.body;this.options.highlightClass&&t.classList.remove(this.options.highlightClass),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}}function ro(e){if(e){const{steps:t}=e;t.forEach(n=>{n.options&&n.options.canClickTarget===!1&&n.options.attachTo&&qe(n.target)&&n.target.classList.remove("shepherd-target-click-disabled")})}}function io({width:e,height:t,x:n=0,y:r=0,r:i=0}){const{innerWidth:s,innerHeight:o}=window,{topLeft:c=0,topRight:a=0,bottomRight:u=0,bottomLeft:f=0}=typeof i=="number"?{topLeft:i,topRight:i,bottomRight:i,bottomLeft:i}:i;return`M${s},${o}H0V0H${s}V${o}ZM${n+c},${r}a${c},${c},0,0,0-${c},${c}V${t+r-f}a${f},${f},0,0,0,${f},${f}H${e+n-u}a${u},${u},0,0,0,${u}-${u}V${r+a}a${a},${a},0,0,0-${a}-${a}Z`}function oo(e){let t,n,r,i,s;return{c(){t=wn("svg"),n=wn("path"),k(n,"d",e[2]),k(t,"class",r=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(o,c){te(o,t,c),De(t,n),e[11](t),i||(s=ut(t,"touchmove",e[3]),i=!0)},p(o,[c]){c&4&&k(n,"d",o[2]),c&2&&r!==(r=`${o[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&k(t,"class",r)},i:J,o:J,d(o){o&&K(t),e[11](null),i=!1,s()}}}function Bn(e){if(!e)return null;const n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return n!=="hidden"&&n!=="visible"&&e.scrollHeight>=e.clientHeight?e:Bn(e.parentElement)}function so(e){let t={top:0,left:0};if(!e)return t;let n=e.ownerDocument.defaultView;for(;n!==window.top;){var r;const o=(r=n)==null?void 0:r.frameElement;if(o){var i,s;const c=o.getBoundingClientRect();t.top+=c.top+((i=c.scrollTop)!=null?i:0),t.left+=c.left+((s=c.scrollLeft)!=null?s:0)}n=n.parent}return t}function lo(e,t){const n=e.getBoundingClientRect();let r=n.y||n.top,i=n.bottom||r+n.height;if(t){const o=t.getBoundingClientRect(),c=o.y||o.top,a=o.bottom||c+o.height;r=Math.max(r,c),i=Math.min(i,a)}const s=Math.max(i-r,0);return{y:r,height:s}}function co(e,t,n){let{element:r,openingProperties:i}=t,s=!1,o,c;u();const a=()=>r;function u(){n(4,i={width:0,height:0,x:0,y:0,r:0})}function f(){n(1,s=!1),w()}function h(y=0,m=0,T=0,B=0,le,$){if($){const{y:X,height:U}=lo($,le),{x:V,width:D,left:L}=$.getBoundingClientRect();n(4,i={width:D+y*2,height:U+y*2,x:(V||L)+T-y,y:X+B-y,r:m})}else u()}function d(y){w(),y.tour.options.useModalOverlay?(_(y),g()):f()}function g(){n(1,s=!0)}const v=y=>{y.preventDefault()},x=y=>{y.stopPropagation()};function S(){window.addEventListener("touchmove",v,{passive:!1})}function w(){o&&(cancelAnimationFrame(o),o=void 0),window.removeEventListener("touchmove",v,{passive:!1})}function _(y){const{modalOverlayOpeningPadding:m,modalOverlayOpeningRadius:T,modalOverlayOpeningXOffset:B=0,modalOverlayOpeningYOffset:le=0}=y.options,$=so(y.target),X=Bn(y.target),U=()=>{o=void 0,h(m,T,B+$.left,le+$.top,X,y.target),o=requestAnimationFrame(U)};U(),S()}function R(y){We[y?"unshift":"push"](()=>{r=y,n(0,r)})}return e.$$set=y=>{"element"in y&&n(0,r=y.element),"openingProperties"in y&&n(4,i=y.openingProperties)},e.$$.update=()=>{e.$$.dirty&16&&n(2,c=io(i))},[r,s,c,x,i,a,u,f,h,d,g,R]}class ao extends fe{constructor(t){super(),ue(this,t,co,oo,ae,{element:0,openingProperties:4,getElement:5,closeModalOpening:6,hide:7,positionModal:8,setupForStep:9,show:10})}get getElement(){return this.$$.ctx[5]}get closeModalOpening(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[7]}get positionModal(){return this.$$.ctx[8]}get setupForStep(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}}class uo extends yt{constructor(){super(),this.activeTour=void 0,Et(this)}}class fo extends yt{constructor(t={}){super(),this.trackedEvents=["active","cancel","complete","show"],this.classPrefix=void 0,this.currentStep=void 0,this.focusedElBeforeOpen=void 0,this.id=void 0,this.modal=void 0,this.options=void 0,this.steps=void 0,Et(this);const n={exitOnEsc:!0,keyboardNavigation:!0};return this.options=Object.assign({},n,t),this.classPrefix=nn(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(i=>{(s=>{this.on(s,o=>{o=o||{},o.tour=this,Ae.trigger(s,o)})})(i)}),this._setTourID(t.id),this}addStep(t,n){let r=t;return r instanceof Bt?r.tour=this:r=new Bt(this,r),N(n)?this.steps.push(r):this.steps.splice(n,0,r),r}addSteps(t){return Array.isArray(t)&&t.forEach(n=>{this.addStep(n)}),this}back(){const t=this.steps.indexOf(this.currentStep);this.show(t-1,!1)}async cancel(){if(this.options.confirmCancel){const t=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";let n;ge(this.options.confirmCancel)?n=await this.options.confirmCancel():n=window.confirm(t),n&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(t){return this.steps.find(n=>n.id===t)}getCurrentStep(){return this.currentStep}hide(){const t=this.getCurrentStep();if(t)return t.hide()}isActive(){return Ae.activeTour===this}next(){const t=this.steps.indexOf(this.currentStep);t===this.steps.length-1?this.complete():this.show(t+1,!0)}removeStep(t){const n=this.getCurrentStep();this.steps.some((r,i)=>{if(r.id===t)return r.isOpen()&&r.hide(),r.destroy(),this.steps.splice(i,1),!0}),n&&n.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(t=0,n=!0){const r=Je(t)?this.getById(t):this.steps[t];r&&(this._updateStateBeforeShow(),ge(r.options.showOn)&&!r.options.showOn()?this._skipStep(r,n):(this.trigger("show",{step:r,previous:this.currentStep}),this.currentStep=r,r.show()))}async start(){this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this.setupModal(),this._setupActiveTour(),this.next()}_done(t){const n=this.steps.indexOf(this.currentStep);if(Array.isArray(this.steps)&&this.steps.forEach(r=>r.destroy()),ro(this),this.trigger(t,{index:n}),Ae.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),(t==="cancel"||t==="complete")&&this.modal){const r=document.querySelector(".shepherd-modal-overlay-container");r&&(r.remove(),this.modal=null)}qe(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),Ae.activeTour=this}setupModal(){this.modal=new ao({target:this.options.modalContainer||document.body,props:{styles:this.styles}})}_skipStep(t,n){const r=this.steps.indexOf(t);if(r===this.steps.length-1)this.complete();else{const i=n?r+1:r-1;this.show(i,n)}}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(t){const n=this.options.tourName||"tour",r=t||on();this.id=`${n}--${r}`}}const Ae=new uo,Nn=typeof window>"u";Ae.Step=Nn?wr:Bt,Ae.Tour=Nn?xr:fo;const dt=pe.createContext(void 0),ho=dt.Consumer,po=()=>{const e=pe.useContext(dt);if(!e)throw new Error("useShepherd must be used within a ShepherdJourneyProvider");const{Shepherd:t}=e;return t},go=({children:e})=>rr.jsx(dt.Provider,{value:{Shepherd:Ae},children:e});ie.JourneyMethods=ho,ie.ShepherdJourneyContext=dt,ie.ShepherdJourneyProvider=go,ie.useShepherd=po,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
30
+ <%s key={someKey} {...props} />`,qt,Pe,Vo,Pe),Qn[Pe+qt]=!0}}return l===r?jo(j):Lo(j),j}}function Do(l,p,b){return er(l,p,b,!0)}function Bo(l,p,b){return er(l,p,b,!1)}var No=Bo,Wo=Do;ze.Fragment=r,ze.jsx=No,ze.jsxs=Wo}()),ze}process.env.NODE_ENV==="production"?vt.exports=tr():vt.exports=nr();var rr=vt.exports;/*! shepherd.js 13.0.3 */function ir(e){return e instanceof Element}function qe(e){return e instanceof HTMLElement}function ge(e){return typeof e=="function"}function Je(e){return typeof e=="string"}function N(e){return e===void 0}class yt{on(t,n,r,i=!1){var s;return N(this.bindings)&&(this.bindings={}),N(this.bindings[t])&&(this.bindings[t]=[]),(s=this.bindings[t])==null||s.push({handler:n,ctx:r,once:i}),this}once(t,n,r){return this.on(t,n,r,!0)}off(t,n){if(N(this.bindings)||N(this.bindings[t]))return this;if(N(n))delete this.bindings[t];else{var r;(r=this.bindings[t])==null||r.forEach((i,s)=>{if(i.handler===n){var o;(o=this.bindings[t])==null||o.splice(s,1)}})}return this}trigger(t,...n){if(!N(this.bindings)&&this.bindings[t]){var r;(r=this.bindings[t])==null||r.forEach((i,s)=>{const{ctx:o,handler:c,once:a}=i,u=o||this;if(c.apply(u,n),a){var f;(f=this.bindings[t])==null||f.splice(s,1)}})}return this}}function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(null,arguments)}function Xt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}const me={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};me.defaultMerge;function or(e,t){return t}function Gt(e){return typeof e!="object"||e===null?0:Array.isArray(e)?2:cr(e)?1:e instanceof Set?3:e instanceof Map?4:5}function sr(e){const t=new Set;for(const n of e)for(const r of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(r);return t}function lr(e,t){return typeof e=="object"&&Object.prototype.propertyIsEnumerable.call(e,t)}function Zt(e){return{*[Symbol.iterator](){for(const t of e)for(const n of t)yield n}}}const Qt=new Set(["[object Object]","[object Module]"]);function cr(e){if(!Qt.has(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(t===void 0)return!0;const n=t.prototype;return!(n===null||typeof n!="object"||!Qt.has(Object.prototype.toString.call(n))||!n.hasOwnProperty("isPrototypeOf"))}function ar(e,t,n){const r={};for(const i of sr(e)){const s=[];for(const a of e)lr(a,i)&&s.push(a[i]);if(s.length===0)continue;const o=t.metaDataUpdater(n,{key:i,parents:e}),c=tn(s,t,o);c!==me.skip&&(i==="__proto__"?Object.defineProperty(r,i,{value:c,configurable:!0,enumerable:!0,writable:!0}):r[i]=c)}return r}function ur(e){return e.flat()}function fr(e){return new Set(Zt(e))}function dr(e){return new Map(Zt(e))}function en(e){return e.at(-1)}var _t=Object.freeze({__proto__:null,mergeArrays:ur,mergeMaps:dr,mergeOthers:en,mergeRecords:ar,mergeSets:fr});function wt(...e){return hr({})(...e)}function hr(e,t){const n=pr(e,r);function r(...i){return tn(i,n,t)}return r}function pr(e,t){var n,r;return{defaultMergeFunctions:_t,mergeFunctions:W({},_t,Object.fromEntries(Object.entries(e).filter(([i,s])=>Object.hasOwn(_t,i)).map(([i,s])=>s===!1?[i,en]:[i,s]))),metaDataUpdater:(n=e.metaDataUpdater)!=null?n:or,deepmerge:t,useImplicitDefaultMerging:(r=e.enableImplicitDefaultMerging)!=null?r:!1,actions:me}}function tn(e,t,n){if(e.length===0)return;if(e.length===1)return xt(e,t,n);const r=Gt(e[0]);if(r!==0&&r!==5){for(let i=1;i<e.length;i++)if(Gt(e[i])!==r)return xt(e,t,n)}switch(r){case 1:return gr(e,t,n);case 2:return mr(e,t,n);case 3:return br(e,t,n);case 4:return vr(e,t,n);default:return xt(e,t,n)}}function gr(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,n):r}function mr(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):r}function br(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):r}function vr(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):r}function xt(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===me.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}function Et(e){const t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n<t.length;n++){const r=t[n],i=e[r];r!=="constructor"&&typeof i=="function"&&(e[r]=i.bind(e))}return e}function yr(e,t){return n=>{if(e.isOpen()){const r=e.el&&n.currentTarget===e.el;(!N(t)&&n.currentTarget.matches(t)||r)&&e.tour.next()}}}function _r(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const r=yr(e,n);let i=null;if(!N(n)&&(i=document.querySelector(n),!i))return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);i?(i.addEventListener(t,r),e.on("destroy",()=>i.removeEventListener(t,r))):(document.body.addEventListener(t,r,!0),e.on("destroy",()=>document.body.removeEventListener(t,r,!0)))}else return console.error("advanceOn was defined, but no event name was passed.")}class wr{constructor(t){}}class xr{constructor(t,n){}}function nn(e){return!Je(e)||e===""?"":e.charAt(e.length-1)!=="-"?`${e}-`:e}function Er(e){const t=e.options.attachTo||{},n=Object.assign({},t);if(ge(n.element)&&(n.element=n.element.call(e)),Je(n.element)){try{n.element=document.querySelector(n.element)}catch{}n.element||console.error(`The element for this Shepherd step was not found ${t.element}`)}return n}function rn(e){return e==null?!0:!e.element||!e.on}function on(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t=="x"?n:n&3|8).toString(16)})}const ke=Math.min,xe=Math.max,nt=Math.round,rt=Math.floor,be=e=>({x:e,y:e}),Sr={left:"right",right:"left",bottom:"top",top:"bottom"},Or={start:"end",end:"start"};function St(e,t,n){return xe(e,ke(t,n))}function Ie(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function it(e){return e.split("-")[1]}function Ot(e){return e==="x"?"y":"x"}function Rt(e){return e==="y"?"height":"width"}function Me(e){return["top","bottom"].includes(Ee(e))?"y":"x"}function Tt(e){return Ot(Me(e))}function Rr(e,t,n){n===void 0&&(n=!1);const r=it(e),i=Tt(e),s=Rt(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=ot(o)),[o,ot(o)]}function Tr(e){const t=ot(e);return[Ct(e),t,Ct(t)]}function Ct(e){return e.replace(/start|end/g,t=>Or[t])}function Cr(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function Ar(e,t,n,r){const i=it(e);let s=Cr(Ee(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ct)))),s}function ot(e){return e.replace(/left|right|bottom|top/g,t=>Sr[t])}function Pr(e){return W({top:0,right:0,bottom:0,left:0},e)}function sn(e){return typeof e!="number"?Pr(e):{top:e,right:e,bottom:e,left:e}}function st(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const kr=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],Ir=["mainAxis","crossAxis","limiter"];function ln(e,t,n){let{reference:r,floating:i}=e;const s=Me(t),o=Tt(t),c=Rt(o),a=Ee(t),u=s==="y",f=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,d=r[c]/2-i[c]/2;let g;switch(a){case"top":g={x:f,y:r.y-i.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-i.width,y:h};break;default:g={x:r.x,y:r.y}}switch(it(t)){case"start":g[o]-=d*(n&&u?-1:1);break;case"end":g[o]+=d*(n&&u?-1:1);break}return g}const Mr=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,c=s.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=ln(u,r,a),d=r,g={},v=0;for(let x=0;x<c.length;x++){const{name:S,fn:w}=c[x],{x:_,y:R,data:y,reset:m}=await w({x:f,y:h,initialPlacement:r,placement:d,strategy:i,middlewareData:g,rects:u,platform:o,elements:{reference:e,floating:t}});f=_??f,h=R??h,g=W({},g,{[S]:W({},g[S],y)}),m&&v<=50&&(v++,typeof m=="object"&&(m.placement&&(d=m.placement),m.rects&&(u=m.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):m.rects),{x:f,y:h}=ln(u,d,a)),x=-1)}return{x:f,y:h,placement:d,strategy:i,middlewareData:g}};async function cn(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:c,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:d=!1,padding:g=0}=Ie(t,e),v=sn(g),S=c[d?h==="floating"?"reference":"floating":h],w=st(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:a})),_=h==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},m=st(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:R,strategy:a}):_);return{top:(w.top-m.top+v.top)/y.y,bottom:(m.bottom-w.bottom+v.bottom)/y.y,left:(w.left-m.left+v.left)/y.x,right:(m.right-w.right+v.right)/y.x}}const Fr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:c,middlewareData:a}=t,{element:u,padding:f=0}=Ie(e,t)||{};if(u==null)return{};const h=sn(f),d={x:n,y:r},g=Tt(i),v=Rt(g),x=await o.getDimensions(u),S=g==="y",w=S?"top":"left",_=S?"bottom":"right",R=S?"clientHeight":"clientWidth",y=s.reference[v]+s.reference[g]-d[g]-s.floating[v],m=d[g]-s.reference[g],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let B=T?T[R]:0;(!B||!await(o.isElement==null?void 0:o.isElement(T)))&&(B=c.floating[R]||s.floating[v]);const le=y/2-m/2,$=B/2-x[v]/2-1,X=ke(h[w],$),U=ke(h[_],$),V=X,D=B-x[v]-U,L=B/2-x[v]/2+le,G=St(V,L,D),Y=!a.arrow&&it(i)!=null&&L!==G&&s.reference[v]/2-(L<V?X:U)-x[v]/2<0,de=Y?L<V?L-V:L-D:0;return{[g]:d[g]+de,data:W({[g]:G,centerOffset:L-G-de},Y&&{alignmentOffset:de}),reset:Y}}}),Lr=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var r,i;const{placement:s,middlewareData:o,rects:c,initialPlacement:a,platform:u,elements:f}=n,h=Ie(t,n),{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0}=h,_=Xt(h,kr);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const R=Ee(s),y=Me(a),m=Ee(a)===a,T=await(u.isRTL==null?void 0:u.isRTL(f.floating)),B=v||(m||!w?[ot(a)]:Tr(a)),le=S!=="none";!v&&le&&B.push(...Ar(a,w,S,T));const $=[a,...B],X=await cn(n,_),U=[];let V=((i=o.flip)==null?void 0:i.overflows)||[];if(d&&U.push(X[R]),g){const Y=Rr(s,c,T);U.push(X[Y[0]],X[Y[1]])}if(V=[...V,{placement:s,overflows:U}],!U.every(Y=>Y<=0)){var D,L;const Y=(((D=o.flip)==null?void 0:D.index)||0)+1,de=$[Y];if(de)return{data:{index:Y,overflows:V},reset:{placement:de}};let we=(L=V.filter(he=>he.overflows[0]<=0).sort((he,ne)=>he.overflows[1]-ne.overflows[1])[0])==null?void 0:L.placement;if(!we)switch(x){case"bestFit":{var G;const he=(G=V.filter(ne=>{if(le){const re=Me(ne.placement);return re===y||re==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(re=>re>0).reduce((re,ht)=>re+ht,0)]).sort((ne,re)=>ne[1]-re[1])[0])==null?void 0:G[0];he&&(we=he);break}case"initialPlacement":we=a;break}if(s!==we)return{reset:{placement:we}}}return{}}}},jr=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:r,y:i,placement:s}=n,o=Ie(t,n),{mainAxis:c=!0,crossAxis:a=!1,limiter:u={fn:_=>{let{x:R,y}=_;return{x:R,y}}}}=o,f=Xt(o,Ir),h={x:r,y:i},d=await cn(n,f),g=Me(Ee(s)),v=Ot(g);let x=h[v],S=h[g];if(c){const _=v==="y"?"top":"left",R=v==="y"?"bottom":"right",y=x+d[_],m=x-d[R];x=St(y,x,m)}if(a){const _=g==="y"?"top":"left",R=g==="y"?"bottom":"right",y=S+d[_],m=S-d[R];S=St(y,S,m)}const w=u.fn(W({},n,{[v]:x,[g]:S}));return W({},w,{data:{x:w.x-r,y:w.y-i}})}}},Dr=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:r,y:i,placement:s,rects:o,middlewareData:c}=n,{offset:a=0,mainAxis:u=!0,crossAxis:f=!0}=Ie(t,n),h={x:r,y:i},d=Me(s),g=Ot(d);let v=h[g],x=h[d];const S=Ie(a,n),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:W({mainAxis:0,crossAxis:0},S);if(u){const y=g==="y"?"height":"width",m=o.reference[g]-o.floating[y]+w.mainAxis,T=o.reference[g]+o.reference[y]-w.mainAxis;v<m?v=m:v>T&&(v=T)}if(f){var _,R;const y=g==="y"?"width":"height",m=["top","left"].includes(Ee(s)),T=o.reference[d]-o.floating[y]+(m&&((_=c.offset)==null?void 0:_[d])||0)+(m?0:w.crossAxis),B=o.reference[d]+o.reference[y]+(m?0:((R=c.offset)==null?void 0:R[d])||0)-(m?w.crossAxis:0);x<T?x=T:x>B&&(x=B)}return{[g]:v,[d]:x}}}};function Fe(e){return an(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ce(e){var t;return(t=(an(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function an(e){return e instanceof Node||e instanceof q(e).Node}function Q(e){return e instanceof Element||e instanceof q(e).Element}function oe(e){return e instanceof HTMLElement||e instanceof q(e).HTMLElement}function un(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}function Ke(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Br(e){return["table","td","th"].includes(Fe(e))}function lt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function At(e){const t=Pt(),n=Q(e)?ee(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(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Nr(e){let t=ve(e);for(;oe(t)&&!Le(t);){if(At(t))return t;if(lt(t))return null;t=ve(t)}return null}function Pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Le(e){return["html","body","#document"].includes(Fe(e))}function ee(e){return q(e).getComputedStyle(e)}function ct(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(Fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||un(e)&&e.host||ce(e);return un(t)?t.host:t}function fn(e){const t=ve(e);return Le(t)?e.ownerDocument?e.ownerDocument.body:e.body:oe(t)&&Ke(t)?t:fn(t)}function Xe(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=fn(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=q(i);return s?t.concat(o,o.visualViewport||[],Ke(i)?i:[],o.frameElement&&n?Xe(o.frameElement):[]):t.concat(i,Xe(i,[],n))}function dn(e){const t=ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=oe(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,c=nt(n)!==s||nt(r)!==o;return c&&(n=s,r=o),{width:n,height:r,$:c}}function kt(e){return Q(e)?e:e.contextElement}function je(e){const t=kt(e);if(!oe(t))return be(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=dn(t);let o=(s?nt(n.width):n.width)/r,c=(s?nt(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!c||!Number.isFinite(c))&&(c=1),{x:o,y:c}}const Wr=be(0);function hn(e){const t=q(e);return!Pt()||!t.visualViewport?Wr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Se(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=kt(e);let o=be(1);t&&(r?Q(r)&&(o=je(r)):o=je(e));const c=Vr(s,n,r)?hn(s):be(0);let a=(i.left+c.x)/o.x,u=(i.top+c.y)/o.y,f=i.width/o.x,h=i.height/o.y;if(s){const d=q(s),g=r&&Q(r)?q(r):r;let v=d,x=v.frameElement;for(;x&&r&&g!==v;){const S=je(x),w=x.getBoundingClientRect(),_=ee(x),R=w.left+(x.clientLeft+parseFloat(_.paddingLeft))*S.x,y=w.top+(x.clientTop+parseFloat(_.paddingTop))*S.y;a*=S.x,u*=S.y,f*=S.x,h*=S.y,a+=R,u+=y,v=q(x),x=v.frameElement}}return st({width:f,height:h,x:a,y:u})}function Hr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=ce(r),c=t?lt(t.floating):!1;if(r===o||c&&s)return n;let a={scrollLeft:0,scrollTop:0},u=be(1);const f=be(0),h=oe(r);if((h||!h&&!s)&&((Fe(r)!=="body"||Ke(o))&&(a=ct(r)),oe(r))){const d=Se(r);u=je(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+f.x,y:n.y*u.y-a.scrollTop*u.y+f.y}}function $r(e){return Array.from(e.getClientRects())}function pn(e){return Se(ce(e)).left+ct(e).scrollLeft}function Ur(e){const t=ce(e),n=ct(e),r=e.ownerDocument.body,i=xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+pn(e);const c=-n.scrollTop;return ee(r).direction==="rtl"&&(o+=xe(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:c}}function Yr(e,t){const n=q(e),r=ce(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,c=0,a=0;if(i){s=i.width,o=i.height;const u=Pt();(!u||u&&t==="fixed")&&(c=i.offsetLeft,a=i.offsetTop)}return{width:s,height:o,x:c,y:a}}function zr(e,t){const n=Se(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=oe(e)?je(e):be(1),o=e.clientWidth*s.x,c=e.clientHeight*s.y,a=i*s.x,u=r*s.y;return{width:o,height:c,x:a,y:u}}function gn(e,t,n){let r;if(t==="viewport")r=Yr(e,n);else if(t==="document")r=Ur(ce(e));else if(Q(t))r=zr(t,n);else{const i=hn(e);r=W({},t,{x:t.x-i.x,y:t.y-i.y})}return st(r)}function mn(e,t){const n=ve(e);return n===t||!Q(n)||Le(n)?!1:ee(n).position==="fixed"||mn(n,t)}function qr(e,t){const n=t.get(e);if(n)return n;let r=Xe(e,[],!1).filter(c=>Q(c)&&Fe(c)!=="body"),i=null;const s=ee(e).position==="fixed";let o=s?ve(e):e;for(;Q(o)&&!Le(o);){const c=ee(o),a=At(o);!a&&c.position==="fixed"&&(i=null),(s?!a&&!i:!a&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ke(o)&&!a&&mn(e,o))?r=r.filter(f=>f!==o):i=c,o=ve(o)}return t.set(e,r),r}function Jr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?lt(t)?[]:qr(t,this._c):[].concat(n),r],c=o[0],a=o.reduce((u,f)=>{const h=gn(t,f,i);return u.top=xe(h.top,u.top),u.right=ke(h.right,u.right),u.bottom=ke(h.bottom,u.bottom),u.left=xe(h.left,u.left),u},gn(t,c,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Kr(e){const{width:t,height:n}=dn(e);return{width:t,height:n}}function Xr(e,t,n){const r=oe(t),i=ce(t),s=n==="fixed",o=Se(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const a=be(0);if(r||!r&&!s)if((Fe(t)!=="body"||Ke(i))&&(c=ct(t)),r){const h=Se(t,!0,s,t);a.x=h.x+t.clientLeft,a.y=h.y+t.clientTop}else i&&(a.x=pn(i));const u=o.left+c.scrollLeft-a.x,f=o.top+c.scrollTop-a.y;return{x:u,y:f,width:o.width,height:o.height}}function It(e){return ee(e).position==="static"}function bn(e,t){return!oe(e)||ee(e).position==="fixed"?null:t?t(e):e.offsetParent}function vn(e,t){const n=q(e);if(lt(e))return n;if(!oe(e)){let i=ve(e);for(;i&&!Le(i);){if(Q(i)&&!It(i))return i;i=ve(i)}return n}let r=bn(e,t);for(;r&&Br(r)&&It(r);)r=bn(r,t);return r&&Le(r)&&It(r)&&!At(r)?n:r||Nr(e)||n}const Gr=async function(t){const n=this.getOffsetParent||vn,r=this.getDimensions,i=await r(t.floating);return{reference:Xr(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Zr(e){return ee(e).direction==="rtl"}const Qr={convertOffsetParentRelativeRectToViewportRelativeRect:Hr,getDocumentElement:ce,getClippingRect:Jr,getOffsetParent:vn,getElementRects:Gr,getClientRects:$r,getDimensions:Kr,getScale:je,isElement:Q,isRTL:Zr};function ei(e,t){let n=null,r;const i=ce(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function o(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),s();const{left:u,top:f,width:h,height:d}=e.getBoundingClientRect();if(c||t(),!h||!d)return;const g=rt(f),v=rt(i.clientWidth-(u+h)),x=rt(i.clientHeight-(f+d)),S=rt(u),_={rootMargin:-g+"px "+-v+"px "+-x+"px "+-S+"px",threshold:xe(0,ke(1,a))||1};let R=!0;function y(m){const T=m[0].intersectionRatio;if(T!==a){if(!R)return o();T?o(!1,T):r=setTimeout(()=>{o(!1,1e-7)},1e3)}R=!1}try{n=new IntersectionObserver(y,W({},_,{root:i.ownerDocument}))}catch{n=new IntersectionObserver(y,_)}n.observe(e)}return o(!0),s}function ti(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=kt(e),f=i||s?[...u?Xe(u):[],...Xe(t)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const h=u&&c?ei(u,n):null;let d=-1,g=null;o&&(g=new ResizeObserver(w=>{let[_]=w;_&&_.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var R;(R=g)==null||R.observe(t)})),n()}),u&&!a&&g.observe(u),g.observe(t));let v,x=a?Se(e):null;a&&S();function S(){const w=Se(e);x&&(w.x!==x.x||w.y!==x.y||w.width!==x.width||w.height!==x.height)&&n(),x=w,v=requestAnimationFrame(S)}return n(),()=>{var w;f.forEach(_=>{i&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),h==null||h(),(w=g)==null||w.disconnect(),g=null,a&&cancelAnimationFrame(v)}}const ni=jr,ri=Lr,ii=Fr,oi=Dr,si=(e,t,n)=>{const r=new Map,i=W({platform:Qr},n),s=W({},i.platform,{_c:r});return Mr(e,t,W({},i,{platform:s}))};function li(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const r=hi(t,e),i=rn(t);return i&&(n=document.body,e.shepherdElementComponent.getElement().classList.add("shepherd-centered")),e.cleanup=ti(n,e.el,()=>{if(!e.el){e.cleanup==null||e.cleanup();return}ui(n,e,r,i)}),e.target=t.element,r}function ci(e,t){return{floatingUIOptions:wt(e.floatingUIOptions||{},t.floatingUIOptions||{})}}function ai(e){e.cleanup&&e.cleanup(),e.cleanup=null}function ui(e,t,n,r){return si(e,t.el,n).then(fi(t,r)).then(i=>new Promise(s=>{setTimeout(()=>s(i),300)})).then(i=>{i!=null&&i.el&&i.el.focus({preventScroll:!0})})}function fi(e,t){return({x:n,y:r,placement:i,middlewareData:s})=>(e.el&&(t?Object.assign(e.el.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}):Object.assign(e.el.style,{position:"absolute",left:`${n}px`,top:`${r}px`}),e.el.dataset.popperPlacement=i,di(e.el,s)),e)}function di(e,t){const n=e.querySelector(".shepherd-arrow");if(qe(n)&&t.arrow){const{x:r,y:i}=t.arrow;Object.assign(n.style,{left:r!=null?`${r}px`:"",top:i!=null?`${i}px`:""})}}function hi(e,t){const n={strategy:"absolute"};n.middleware=[];const r=pi(t);if(!rn(e)){if(n.middleware.push(ri(),ni({limiter:oi(),crossAxis:!0})),r){var s,o;const c=(e==null||(s=e.on)==null?void 0:s.includes("-start"))||(e==null||(o=e.on)==null?void 0:o.includes("-end"));n.middleware.push(ii({element:r,padding:c?4:0}))}n.placement=e.on}return wt(t.options.floatingUIOptions||{},n)}function pi(e){return e.options.arrow&&e.el?e.el.querySelector(".shepherd-arrow"):!1}function J(){}function gi(e,t){for(const n in t)e[n]=t[n];return e}function yn(e){return e()}function _n(){return Object.create(null)}function Ge(e){e.forEach(yn)}function Mt(e){return typeof e=="function"}function ae(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function mi(e){return Object.keys(e).length===0}function De(e,t){e.appendChild(t)}function te(e,t,n){e.insertBefore(t,n||null)}function K(e){e.parentNode&&e.parentNode.removeChild(e)}function bi(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function se(e){return document.createElement(e)}function wn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function xn(e){return document.createTextNode(e)}function at(){return xn(" ")}function vi(){return xn("")}function ut(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function k(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const yi=["width","height"];function En(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&yi.indexOf(r)===-1?e[r]=t[r]:k(e,r,t[r])}function _i(e){return Array.from(e.childNodes)}function Be(e,t,n){e.classList.toggle(t,!!n)}let Ze;function Qe(e){Ze=e}function Sn(){if(!Ze)throw new Error("Function called outside component initialization");return Ze}function wi(e){Sn().$$.on_mount.push(e)}function Ft(e){Sn().$$.after_update.push(e)}const Ne=[],We=[];let Ve=[];const On=[],xi=Promise.resolve();let Lt=!1;function Ei(){Lt||(Lt=!0,xi.then(Rn))}function jt(e){Ve.push(e)}const Dt=new Set;let He=0;function Rn(){if(He!==0)return;const e=Ze;do{try{for(;He<Ne.length;){const t=Ne[He];He++,Qe(t),Si(t.$$)}}catch(t){throw Ne.length=0,He=0,t}for(Qe(null),Ne.length=0,He=0;We.length;)We.pop()();for(let t=0;t<Ve.length;t+=1){const n=Ve[t];Dt.has(n)||(Dt.add(n),n())}Ve.length=0}while(Ne.length);for(;On.length;)On.pop()();Lt=!1,Dt.clear(),Qe(e)}function Si(e){if(e.fragment!==null){e.update(),Ge(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(jt)}}function Oi(e){const t=[],n=[];Ve.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Ve=t}const ft=new Set;let Oe;function Re(){Oe={r:0,c:[],p:Oe}}function Te(){Oe.r||Ge(Oe.c),Oe=Oe.p}function P(e,t){e&&e.i&&(ft.delete(e),e.i(t))}function M(e,t,n,r){if(e&&e.o){if(ft.has(e))return;ft.add(e),Oe.c.push(()=>{ft.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function Tn(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Ri(e,t){const n={},r={},i={$$scope:1};let s=e.length;for(;s--;){const o=e[s],c=t[s];if(c){for(const a in o)a in c||(r[a]=1);for(const a in c)i[a]||(n[a]=c[a],i[a]=1);e[s]=c}else for(const a in o)i[a]=1}for(const o in r)o in n||(n[o]=void 0);return n}function Ce(e){e&&e.c()}function ye(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),jt(()=>{const s=e.$$.on_mount.map(yn).filter(Mt);e.$$.on_destroy?e.$$.on_destroy.push(...s):Ge(s),e.$$.on_mount=[]}),i.forEach(jt)}function _e(e,t){const n=e.$$;n.fragment!==null&&(Oi(n.after_update),Ge(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ti(e,t){e.$$.dirty[0]===-1&&(Ne.push(e),Ei(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ue(e,t,n,r,i,s,o=null,c=[-1]){const a=Ze;Qe(e);const u=e.$$={fragment:null,ctx:[],props:s,update:J,not_equal:i,bound:_n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:_n(),dirty:c,skip_bound:!1,root:t.target||a.$$.root};o&&o(u.root);let f=!1;if(u.ctx=n?n(e,t.props||{},(h,d,...g)=>{const v=g.length?g[0]:d;return u.ctx&&i(u.ctx[h],u.ctx[h]=v)&&(!u.skip_bound&&u.bound[h]&&u.bound[h](v),f&&Ti(e,h)),d}):[],u.update(),f=!0,Ge(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const h=_i(t.target);u.fragment&&u.fragment.l(h),h.forEach(K)}else u.fragment&&u.fragment.c();t.intro&&P(e.$$.fragment),ye(e,t.target,t.anchor),Rn()}Qe(a)}class fe{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){_e(this,1),this.$destroy=J}$on(t,n){if(!Mt(n))return J;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!mi(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ci="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ci);function Ai(e){let t,n,r,i,s;return{c(){t=se("button"),k(t,"aria-label",n=e[3]?e[3]:null),k(t,"class",r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],k(t,"tabindex","0"),k(t,"type","button")},m(o,c){te(o,t,c),t.innerHTML=e[5],i||(s=ut(t,"click",function(){Mt(e[0])&&e[0].apply(this,arguments)}),i=!0)},p(o,[c]){e=o,c&32&&(t.innerHTML=e[5]),c&8&&n!==(n=e[3]?e[3]:null)&&k(t,"aria-label",n),c&18&&r!==(r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&k(t,"class",r),c&4&&(t.disabled=e[2])},i:J,o:J,d(o){o&&K(t),i=!1,s()}}}function Pi(e,t,n){let{config:r,step:i}=t,s,o,c,a,u,f;function h(d){return ge(d)?d=d.call(i):d}return e.$$set=d=>{"config"in d&&n(6,r=d.config),"step"in d&&n(7,i=d.step)},e.$$.update=()=>{e.$$.dirty&192&&(n(0,s=r.action?r.action.bind(i.tour):null),n(1,o=r.classes),n(2,c=r.disabled?h(r.disabled):!1),n(3,a=r.label?h(r.label):null),n(4,u=r.secondary),n(5,f=r.text?h(r.text):null))},[s,o,c,a,u,f,r,i]}class ki extends fe{constructor(t){super(),ue(this,t,Pi,Ai,ae,{config:6,step:7})}}function Cn(e,t,n){const r=e.slice();return r[2]=t[n],r}function An(e){let t,n,r=Tn(e[1]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Pn(Cn(e,r,o));const s=o=>M(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();t=vi()},m(o,c){for(let a=0;a<i.length;a+=1)i[a]&&i[a].m(o,c);te(o,t,c),n=!0},p(o,c){if(c&3){r=Tn(o[1]);let a;for(a=0;a<r.length;a+=1){const u=Cn(o,r,a);i[a]?(i[a].p(u,c),P(i[a],1)):(i[a]=Pn(u),i[a].c(),P(i[a],1),i[a].m(t.parentNode,t))}for(Re(),a=r.length;a<i.length;a+=1)s(a);Te()}},i(o){if(!n){for(let c=0;c<r.length;c+=1)P(i[c]);n=!0}},o(o){i=i.filter(Boolean);for(let c=0;c<i.length;c+=1)M(i[c]);n=!1},d(o){o&&K(t),bi(i,o)}}}function Pn(e){let t,n;return t=new ki({props:{config:e[2],step:e[0]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&2&&(s.config=r[2]),i&1&&(s.step=r[0]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function Ii(e){let t,n,r=e[1]&&An(e);return{c(){t=se("footer"),r&&r.c(),k(t,"class","shepherd-footer")},m(i,s){te(i,t,s),r&&r.m(t,null),n=!0},p(i,[s]){i[1]?r?(r.p(i,s),s&2&&P(r,1)):(r=An(i),r.c(),P(r,1),r.m(t,null)):r&&(Re(),M(r,1,1,()=>{r=null}),Te())},i(i){n||(P(r),n=!0)},o(i){M(r),n=!1},d(i){i&&K(t),r&&r.d()}}}function Mi(e,t,n){let r,{step:i}=t;return e.$$set=s=>{"step"in s&&n(0,i=s.step)},e.$$.update=()=>{e.$$.dirty&1&&n(1,r=i.options.buttons)},[i,r]}class Fi extends fe{constructor(t){super(),ue(this,t,Mi,Ii,ae,{step:0})}}function Li(e){let t,n,r,i,s;return{c(){t=se("button"),n=se("span"),n.textContent="×",k(n,"aria-hidden","true"),k(t,"aria-label",r=e[0].label?e[0].label:"Close Tour"),k(t,"class","shepherd-cancel-icon"),k(t,"type","button")},m(o,c){te(o,t,c),De(t,n),i||(s=ut(t,"click",e[1]),i=!0)},p(o,[c]){c&1&&r!==(r=o[0].label?o[0].label:"Close Tour")&&k(t,"aria-label",r)},i:J,o:J,d(o){o&&K(t),i=!1,s()}}}function ji(e,t,n){let{cancelIcon:r,step:i}=t;const s=o=>{o.preventDefault(),i.cancel()};return e.$$set=o=>{"cancelIcon"in o&&n(0,r=o.cancelIcon),"step"in o&&n(2,i=o.step)},[r,s,i]}class Di extends fe{constructor(t){super(),ue(this,t,ji,Li,ae,{cancelIcon:0,step:2})}}function Bi(e){let t;return{c(){t=se("h3"),k(t,"id",e[1]),k(t,"class","shepherd-title")},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:J,o:J,d(n){n&&K(t),e[3](null)}}}function Ni(e,t,n){let{labelId:r,element:i,title:s}=t;Ft(()=>{ge(s)&&n(2,s=s()),n(0,i.innerHTML=s,i)});function o(c){We[c?"unshift":"push"](()=>{i=c,n(0,i)})}return e.$$set=c=>{"labelId"in c&&n(1,r=c.labelId),"element"in c&&n(0,i=c.element),"title"in c&&n(2,s=c.title)},[i,r,s,o]}class Wi extends fe{constructor(t){super(),ue(this,t,Ni,Bi,ae,{labelId:1,element:0,title:2})}}function kn(e){let t,n;return t=new Wi({props:{labelId:e[0],title:e[2]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&1&&(s.labelId=r[0]),i&4&&(s.title=r[2]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function In(e){let t,n;return t=new Di({props:{cancelIcon:e[3],step:e[1]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&8&&(s.cancelIcon=r[3]),i&2&&(s.step=r[1]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function Vi(e){let t,n,r,i=e[2]&&kn(e),s=e[3]&&e[3].enabled&&In(e);return{c(){t=se("header"),i&&i.c(),n=at(),s&&s.c(),k(t,"class","shepherd-header")},m(o,c){te(o,t,c),i&&i.m(t,null),De(t,n),s&&s.m(t,null),r=!0},p(o,[c]){o[2]?i?(i.p(o,c),c&4&&P(i,1)):(i=kn(o),i.c(),P(i,1),i.m(t,n)):i&&(Re(),M(i,1,1,()=>{i=null}),Te()),o[3]&&o[3].enabled?s?(s.p(o,c),c&8&&P(s,1)):(s=In(o),s.c(),P(s,1),s.m(t,null)):s&&(Re(),M(s,1,1,()=>{s=null}),Te())},i(o){r||(P(i),P(s),r=!0)},o(o){M(i),M(s),r=!1},d(o){o&&K(t),i&&i.d(),s&&s.d()}}}function Hi(e,t,n){let{labelId:r,step:i}=t,s,o;return e.$$set=c=>{"labelId"in c&&n(0,r=c.labelId),"step"in c&&n(1,i=c.step)},e.$$.update=()=>{e.$$.dirty&2&&(n(2,s=i.options.title),n(3,o=i.options.cancelIcon))},[r,i,s,o]}class $i extends fe{constructor(t){super(),ue(this,t,Hi,Vi,ae,{labelId:0,step:1})}}function Ui(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-text"),k(t,"id",e[1])},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:J,o:J,d(n){n&&K(t),e[3](null)}}}function Yi(e,t,n){let{descriptionId:r,element:i,step:s}=t;Ft(()=>{let{text:c}=s.options;ge(c)&&(c=c.call(s)),qe(c)?i.appendChild(c):n(0,i.innerHTML=c,i)});function o(c){We[c?"unshift":"push"](()=>{i=c,n(0,i)})}return e.$$set=c=>{"descriptionId"in c&&n(1,r=c.descriptionId),"element"in c&&n(0,i=c.element),"step"in c&&n(2,s=c.step)},[i,r,s,o]}class zi extends fe{constructor(t){super(),ue(this,t,Yi,Ui,ae,{descriptionId:1,element:0,step:2})}}function Mn(e){let t,n;return t=new $i({props:{labelId:e[1],step:e[2]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&2&&(s.labelId=r[1]),i&4&&(s.step=r[2]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function Fn(e){let t,n;return t=new zi({props:{descriptionId:e[0],step:e[2]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&1&&(s.descriptionId=r[0]),i&4&&(s.step=r[2]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function Ln(e){let t,n;return t=new Fi({props:{step:e[2]}}),{c(){Ce(t.$$.fragment)},m(r,i){ye(t,r,i),n=!0},p(r,i){const s={};i&4&&(s.step=r[2]),t.$set(s)},i(r){n||(P(t.$$.fragment,r),n=!0)},o(r){M(t.$$.fragment,r),n=!1},d(r){_e(t,r)}}}function qi(e){let t,n=!N(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,r,i=!N(e[2].options.text),s,o=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,c,a=n&&Mn(e),u=i&&Fn(e),f=o&&Ln(e);return{c(){t=se("div"),a&&a.c(),r=at(),u&&u.c(),s=at(),f&&f.c(),k(t,"class","shepherd-content")},m(h,d){te(h,t,d),a&&a.m(t,null),De(t,r),u&&u.m(t,null),De(t,s),f&&f.m(t,null),c=!0},p(h,[d]){d&4&&(n=!N(h[2].options.title)||h[2].options.cancelIcon&&h[2].options.cancelIcon.enabled),n?a?(a.p(h,d),d&4&&P(a,1)):(a=Mn(h),a.c(),P(a,1),a.m(t,r)):a&&(Re(),M(a,1,1,()=>{a=null}),Te()),d&4&&(i=!N(h[2].options.text)),i?u?(u.p(h,d),d&4&&P(u,1)):(u=Fn(h),u.c(),P(u,1),u.m(t,s)):u&&(Re(),M(u,1,1,()=>{u=null}),Te()),d&4&&(o=Array.isArray(h[2].options.buttons)&&h[2].options.buttons.length),o?f?(f.p(h,d),d&4&&P(f,1)):(f=Ln(h),f.c(),P(f,1),f.m(t,null)):f&&(Re(),M(f,1,1,()=>{f=null}),Te())},i(h){c||(P(a),P(u),P(f),c=!0)},o(h){M(a),M(u),M(f),c=!1},d(h){h&&K(t),a&&a.d(),u&&u.d(),f&&f.d()}}}function Ji(e,t,n){let{descriptionId:r,labelId:i,step:s}=t;return e.$$set=o=>{"descriptionId"in o&&n(0,r=o.descriptionId),"labelId"in o&&n(1,i=o.labelId),"step"in o&&n(2,s=o.step)},[r,i,s]}class Ki extends fe{constructor(t){super(),ue(this,t,Ji,qi,ae,{descriptionId:0,labelId:1,step:2})}}function jn(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-arrow"),k(t,"data-popper-arrow","")},m(n,r){te(n,t,r)},d(n){n&&K(t)}}}function Xi(e){let t,n,r,i,s,o,c,a,u=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&jn();r=new Ki({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let f=[{"aria-describedby":i=N(e[4].options.text)?null:e[2]},{"aria-labelledby":s=e[4].options.title?e[3]:null},e[1],{role:"dialog"},{tabindex:"0"}],h={};for(let d=0;d<f.length;d+=1)h=gi(h,f[d]);return{c(){t=se("div"),u&&u.c(),n=at(),Ce(r.$$.fragment),En(t,h),Be(t,"shepherd-has-cancel-icon",e[5]),Be(t,"shepherd-has-title",e[6]),Be(t,"shepherd-element",!0)},m(d,g){te(d,t,g),u&&u.m(t,null),De(t,n),ye(r,t,null),e[13](t),o=!0,c||(a=ut(t,"keydown",e[7]),c=!0)},p(d,[g]){d[4].options.arrow&&d[4].options.attachTo&&d[4].options.attachTo.element&&d[4].options.attachTo.on?u||(u=jn(),u.c(),u.m(t,n)):u&&(u.d(1),u=null);const v={};g&4&&(v.descriptionId=d[2]),g&8&&(v.labelId=d[3]),g&16&&(v.step=d[4]),r.$set(v),En(t,h=Ri(f,[(!o||g&20&&i!==(i=N(d[4].options.text)?null:d[2]))&&{"aria-describedby":i},(!o||g&24&&s!==(s=d[4].options.title?d[3]:null))&&{"aria-labelledby":s},g&2&&d[1],{role:"dialog"},{tabindex:"0"}])),Be(t,"shepherd-has-cancel-icon",d[5]),Be(t,"shepherd-has-title",d[6]),Be(t,"shepherd-element",!0)},i(d){o||(P(r.$$.fragment,d),o=!0)},o(d){M(r.$$.fragment,d),o=!1},d(d){d&&K(t),u&&u.d(),_e(r),e[13](null),c=!1,a()}}}const Gi=9,Zi=27,Qi=37,eo=39;function Dn(e){return e.split(" ").filter(t=>!!t.length)}function to(e,t,n){let{classPrefix:r,element:i,descriptionId:s,firstFocusableElement:o,focusableElements:c,labelId:a,lastFocusableElement:u,step:f,dataStepId:h}=t,d,g,v;const x=()=>i;wi(()=>{n(1,h={[`data-${r}shepherd-step-id`]:f.id}),n(9,c=i.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,o=c[0]),n(10,u=c[c.length-1])}),Ft(()=>{v!==f.options.classes&&S()});function S(){w(v),v=f.options.classes,_(v)}function w(m){if(Je(m)){const T=Dn(m);T.length&&i.classList.remove(...T)}}function _(m){if(Je(m)){const T=Dn(m);T.length&&i.classList.add(...T)}}const R=m=>{const{tour:T}=f;switch(m.keyCode){case Gi:if(c.length===0){m.preventDefault();break}m.shiftKey?(document.activeElement===o||document.activeElement.classList.contains("shepherd-element"))&&(m.preventDefault(),u.focus()):document.activeElement===u&&(m.preventDefault(),o.focus());break;case Zi:T.options.exitOnEsc&&(m.preventDefault(),m.stopPropagation(),f.cancel());break;case Qi:T.options.keyboardNavigation&&(m.preventDefault(),m.stopPropagation(),T.back());break;case eo:T.options.keyboardNavigation&&(m.preventDefault(),m.stopPropagation(),T.next());break}};function y(m){We[m?"unshift":"push"](()=>{i=m,n(0,i)})}return e.$$set=m=>{"classPrefix"in m&&n(11,r=m.classPrefix),"element"in m&&n(0,i=m.element),"descriptionId"in m&&n(2,s=m.descriptionId),"firstFocusableElement"in m&&n(8,o=m.firstFocusableElement),"focusableElements"in m&&n(9,c=m.focusableElements),"labelId"in m&&n(3,a=m.labelId),"lastFocusableElement"in m&&n(10,u=m.lastFocusableElement),"step"in m&&n(4,f=m.step),"dataStepId"in m&&n(1,h=m.dataStepId)},e.$$.update=()=>{e.$$.dirty&16&&(n(5,d=f.options&&f.options.cancelIcon&&f.options.cancelIcon.enabled),n(6,g=f.options&&f.options.title))},[i,h,s,a,f,d,g,R,o,c,u,r,x,y]}class no extends fe{constructor(t){super(),ue(this,t,to,Xi,ae,{classPrefix:11,element:0,descriptionId:2,firstFocusableElement:8,focusableElements:9,labelId:3,lastFocusableElement:10,step:4,dataStepId:1,getElement:12})}get getElement(){return this.$$.ctx[12]}}class Bt extends yt{constructor(t,n={}){return super(),this._resolvedAttachTo=void 0,this.classPrefix=void 0,this.el=void 0,this.target=void 0,this.tour=void 0,this.tour=t,this.classPrefix=this.tour.options?nn(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,Et(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){ai(this),qe(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this.trigger("destroy")}getTour(){return this.tour}hide(){var t;(t=this.tour.modal)==null||t.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveAttachToOptions(){return this._resolvedAttachTo=Er(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return ge(this.options.beforeShowPromise)?Promise.resolve(this.options.beforeShowPromise()).then(()=>this._show()):Promise.resolve(this._show())}updateStepOptions(t){Object.assign(this.options,t),this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})}getElement(){return this.el}getTarget(){return this.target}_createTooltipContent(){const t=`${this.id}-description`,n=`${this.id}-label`;return this.shepherdElementComponent=new no({target:this.tour.options.stepsContainer||document.body,props:{classPrefix:this.classPrefix,descriptionId:t,labelId:n,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()}_scrollTo(t){const{element:n}=this._getResolvedAttachToOptions();ge(this.options.scrollToHandler)?this.options.scrollToHandler(n):ir(n)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView(t)}_getClassOptions(t){const n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,r=t.classes?t.classes:"",i=n&&n.classes?n.classes:"",s=[...r.split(" "),...i.split(" ")],o=new Set(s);return Array.from(o).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=wt({},n||{}),this.options=Object.assign({arrow:!0},n,t,ci(n,t));const{when:r}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${on()}`,r&&Object.keys(r).forEach(i=>{this.on(i,r[i],this)})}_setupElements(){N(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&_r(this),li(this)}_show(){var t;this.trigger("before-show"),this._resolveAttachToOptions(),this._setupElements(),this.tour.modal||this.tour.setupModal(),(t=this.tour.modal)==null||t.setupForStep(this),this._styleTargetElementForStep(this),this.el&&(this.el.hidden=!1),this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),this.el&&(this.el.hidden=!1);const n=this.shepherdElementComponent.getElement(),r=this.target||document.body;r.classList.add(`${this.classPrefix}shepherd-enabled`),r.classList.add(`${this.classPrefix}shepherd-target`),n.classList.add("shepherd-enabled"),this.trigger("show")}_styleTargetElementForStep(t){const n=t.target;n&&(t.options.highlightClass&&n.classList.add(t.options.highlightClass),n.classList.remove("shepherd-target-click-disabled"),t.options.canClickTarget===!1&&n.classList.add("shepherd-target-click-disabled"))}_updateStepTargetOnHide(){const t=this.target||document.body;this.options.highlightClass&&t.classList.remove(this.options.highlightClass),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}}function ro(e){if(e){const{steps:t}=e;t.forEach(n=>{n.options&&n.options.canClickTarget===!1&&n.options.attachTo&&qe(n.target)&&n.target.classList.remove("shepherd-target-click-disabled")})}}function io({width:e,height:t,x:n=0,y:r=0,r:i=0}){const{innerWidth:s,innerHeight:o}=window,{topLeft:c=0,topRight:a=0,bottomRight:u=0,bottomLeft:f=0}=typeof i=="number"?{topLeft:i,topRight:i,bottomRight:i,bottomLeft:i}:i;return`M${s},${o}H0V0H${s}V${o}ZM${n+c},${r}a${c},${c},0,0,0-${c},${c}V${t+r-f}a${f},${f},0,0,0,${f},${f}H${e+n-u}a${u},${u},0,0,0,${u}-${u}V${r+a}a${a},${a},0,0,0-${a}-${a}Z`}function oo(e){let t,n,r,i,s;return{c(){t=wn("svg"),n=wn("path"),k(n,"d",e[2]),k(t,"class",r=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(o,c){te(o,t,c),De(t,n),e[11](t),i||(s=ut(t,"touchmove",e[3]),i=!0)},p(o,[c]){c&4&&k(n,"d",o[2]),c&2&&r!==(r=`${o[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&k(t,"class",r)},i:J,o:J,d(o){o&&K(t),e[11](null),i=!1,s()}}}function Bn(e){if(!e)return null;const n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return n!=="hidden"&&n!=="visible"&&e.scrollHeight>=e.clientHeight?e:Bn(e.parentElement)}function so(e){let t={top:0,left:0};if(!e)return t;let n=e.ownerDocument.defaultView;for(;n!==window.top;){var r;const o=(r=n)==null?void 0:r.frameElement;if(o){var i,s;const c=o.getBoundingClientRect();t.top+=c.top+((i=c.scrollTop)!=null?i:0),t.left+=c.left+((s=c.scrollLeft)!=null?s:0)}n=n.parent}return t}function lo(e,t){const n=e.getBoundingClientRect();let r=n.y||n.top,i=n.bottom||r+n.height;if(t){const o=t.getBoundingClientRect(),c=o.y||o.top,a=o.bottom||c+o.height;r=Math.max(r,c),i=Math.min(i,a)}const s=Math.max(i-r,0);return{y:r,height:s}}function co(e,t,n){let{element:r,openingProperties:i}=t,s=!1,o,c;u();const a=()=>r;function u(){n(4,i={width:0,height:0,x:0,y:0,r:0})}function f(){n(1,s=!1),w()}function h(y=0,m=0,T=0,B=0,le,$){if($){const{y:X,height:U}=lo($,le),{x:V,width:D,left:L}=$.getBoundingClientRect();n(4,i={width:D+y*2,height:U+y*2,x:(V||L)+T-y,y:X+B-y,r:m})}else u()}function d(y){w(),y.tour.options.useModalOverlay?(_(y),g()):f()}function g(){n(1,s=!0)}const v=y=>{y.preventDefault()},x=y=>{y.stopPropagation()};function S(){window.addEventListener("touchmove",v,{passive:!1})}function w(){o&&(cancelAnimationFrame(o),o=void 0),window.removeEventListener("touchmove",v,{passive:!1})}function _(y){const{modalOverlayOpeningPadding:m,modalOverlayOpeningRadius:T,modalOverlayOpeningXOffset:B=0,modalOverlayOpeningYOffset:le=0}=y.options,$=so(y.target),X=Bn(y.target),U=()=>{o=void 0,h(m,T,B+$.left,le+$.top,X,y.target),o=requestAnimationFrame(U)};U(),S()}function R(y){We[y?"unshift":"push"](()=>{r=y,n(0,r)})}return e.$$set=y=>{"element"in y&&n(0,r=y.element),"openingProperties"in y&&n(4,i=y.openingProperties)},e.$$.update=()=>{e.$$.dirty&16&&n(2,c=io(i))},[r,s,c,x,i,a,u,f,h,d,g,R]}class ao extends fe{constructor(t){super(),ue(this,t,co,oo,ae,{element:0,openingProperties:4,getElement:5,closeModalOpening:6,hide:7,positionModal:8,setupForStep:9,show:10})}get getElement(){return this.$$.ctx[5]}get closeModalOpening(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[7]}get positionModal(){return this.$$.ctx[8]}get setupForStep(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}}class uo extends yt{constructor(){super(),this.activeTour=void 0,Et(this)}}class fo extends yt{constructor(t={}){super(),this.trackedEvents=["active","cancel","complete","show"],this.classPrefix=void 0,this.currentStep=void 0,this.focusedElBeforeOpen=void 0,this.id=void 0,this.modal=void 0,this.options=void 0,this.steps=void 0,Et(this);const n={exitOnEsc:!0,keyboardNavigation:!0};return this.options=Object.assign({},n,t),this.classPrefix=nn(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(i=>{(s=>{this.on(s,o=>{o=o||{},o.tour=this,Ae.trigger(s,o)})})(i)}),this._setTourID(t.id),this}addStep(t,n){let r=t;return r instanceof Bt?r.tour=this:r=new Bt(this,r),N(n)?this.steps.push(r):this.steps.splice(n,0,r),r}addSteps(t){return Array.isArray(t)&&t.forEach(n=>{this.addStep(n)}),this}back(){const t=this.steps.indexOf(this.currentStep);this.show(t-1,!1)}async cancel(){if(this.options.confirmCancel){const t=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";let n;ge(this.options.confirmCancel)?n=await this.options.confirmCancel():n=window.confirm(t),n&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(t){return this.steps.find(n=>n.id===t)}getCurrentStep(){return this.currentStep}hide(){const t=this.getCurrentStep();if(t)return t.hide()}isActive(){return Ae.activeTour===this}next(){const t=this.steps.indexOf(this.currentStep);t===this.steps.length-1?this.complete():this.show(t+1,!0)}removeStep(t){const n=this.getCurrentStep();this.steps.some((r,i)=>{if(r.id===t)return r.isOpen()&&r.hide(),r.destroy(),this.steps.splice(i,1),!0}),n&&n.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(t=0,n=!0){const r=Je(t)?this.getById(t):this.steps[t];r&&(this._updateStateBeforeShow(),ge(r.options.showOn)&&!r.options.showOn()?this._skipStep(r,n):(this.trigger("show",{step:r,previous:this.currentStep}),this.currentStep=r,r.show()))}async start(){this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this.setupModal(),this._setupActiveTour(),this.next()}_done(t){const n=this.steps.indexOf(this.currentStep);if(Array.isArray(this.steps)&&this.steps.forEach(r=>r.destroy()),ro(this),this.trigger(t,{index:n}),Ae.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),(t==="cancel"||t==="complete")&&this.modal){const r=document.querySelector(".shepherd-modal-overlay-container");r&&(r.remove(),this.modal=null)}qe(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),Ae.activeTour=this}setupModal(){this.modal=new ao({target:this.options.modalContainer||document.body,props:{styles:this.styles}})}_skipStep(t,n){const r=this.steps.indexOf(t);if(r===this.steps.length-1)this.complete();else{const i=n?r+1:r-1;this.show(i,n)}}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(t){const n=this.options.tourName||"tour",r=t||on();this.id=`${n}--${r}`}}const Ae=new uo,Nn=typeof window>"u";Ae.Step=Nn?wr:Bt,Ae.Tour=Nn?xr:fo;const dt=pe.createContext(void 0),ho=dt.Consumer,po=()=>{const e=pe.useContext(dt);if(!e)throw new Error("useShepherd must be used within a ShepherdJourneyProvider");const{Shepherd:t}=e;return t},go=({children:e})=>rr.jsx(dt.Provider,{value:{Shepherd:Ae},children:e});ie.JourneyMethods=ho,ie.ShepherdJourneyContext=dt,ie.ShepherdJourneyProvider=go,ie.useShepherd=po,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-shepherd",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -24,7 +24,7 @@
24
24
  "src"
25
25
  ],
26
26
  "dependencies": {
27
- "shepherd.js": "13.0.2"
27
+ "shepherd.js": "13.0.3"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@testing-library/jest-dom": "^6.2.0",