"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Shepherd=t()}(this,(function(){function e(e,t){return!1!==t.clone&&t.isMergeableObject(e)?r(Array.isArray(e)?[]:{},e,t):e}function t(t,n,o){return t.concat(n).map((function(t){return e(t,o)}))}function n(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function r(i,s,l){(l=l||{}).arrayMerge=l.arrayMerge||t,l.isMergeableObject=l.isMergeableObject||Ue,l.cloneUnlessOtherwiseSpecified=e;var a=Array.isArray(s);return a!==Array.isArray(i)?e(s,l):a?l.arrayMerge(i,s,l):function(t,i,s){var l={};return s.isMergeableObject(t)&&n(t).forEach((function(n){l[n]=e(t[n],s)})),n(i).forEach((function(n){if(!o(t,n)||Object.hasOwnProperty.call(t,n)&&Object.propertyIsEnumerable.call(t,n))if(o(t,n)&&s.isMergeableObject(i[n])){if(s.customMerge){var a=s.customMerge(n);a="function"==typeof a?a:r}else a=r;l[n]=a(t[n],i[n],s)}else l[n]=e(i[n],s)})),l}(i,s,l)}function i(e){return"function"==typeof e}function s(e){return"string"==typeof e}function l(e){let t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-o)&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function g(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&f(n))do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function b(e){return c(e).getComputedStyle(e)}function v(e){return((p(e)?e.ownerDocument:e.document)||window.document).documentElement}function y(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||(f(e)?e.host:null)||v(e)}function x(e){return d(e)&&"fixed"!==b(e).position?e.offsetParent:null}function w(e){for(var t=c(e),n=x(e);n&&0<=["table","td","th"].indexOf(a(n))&&"static"===b(n).position;)n=x(n);if(n&&("html"===a(n)||"body"===a(n)&&"static"===b(n).position))return t;if(!n)e:{if(n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!d(e)||"fixed"!==b(e).position)for(e=y(e);d(e)&&0>["html","body"].indexOf(a(e));){var o=b(e);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||n&&"filter"===o.willChange||n&&o.filter&&"none"!==o.filter){n=e;break e}e=e.parentNode}n=null}return n||t}function $(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function O(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function E(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function S(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.offsets,s=e.position,l=e.gpuAcceleration,a=e.adaptive;if(!0===(e=e.roundOffsets)){e=i.y;var p=window.devicePixelRatio||1;e={x:ot(ot(i.x*p)/p)||0,y:ot(ot(e*p)/p)||0}}else e="function"==typeof e?e(i):i;e=void 0===(e=(p=e).x)?0:e,p=void 0===(p=p.y)?0:p;var d=i.hasOwnProperty("x");i=i.hasOwnProperty("y");var f,u="left",h="top",m=window;if(a){var g=w(n),y="clientHeight",x="clientWidth";g===c(n)&&("static"!==b(g=v(n)).position&&(y="scrollHeight",x="scrollWidth")),"top"===r&&(h="bottom",p-=g[y]-o.height,p*=l?1:-1),"left"===r&&(u="right",e-=g[x]-o.width,e*=l?1:-1)}return n=Object.assign({position:s},a&&rt),l?Object.assign({},n,((f={})[h]=i?"0":"",f[u]=d?"0":"",f.transform=2>(m.devicePixelRatio||1)?"translate("+e+"px, "+p+"px)":"translate3d("+e+"px, "+p+"px, 0)",f)):Object.assign({},n,((t={})[h]=i?p+"px":"",t[u]=d?e+"px":"",t.transform="",t))}function T(e){return e.replace(/left|right|bottom|top/g,(function(e){return st[e]}))}function I(e){return e.replace(/start|end/g,(function(e){return lt[e]}))}function j(e){return{scrollLeft:(e=c(e)).pageXOffset,scrollTop:e.pageYOffset}}function _(e){return h(v(e)).left+j(e).scrollLeft}function L(e){return e=b(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function M(e){return 0<=["html","body","#document"].indexOf(a(e))?e.ownerDocument.body:d(e)&&L(e)?e:M(y(e))}function A(e,t){var n;void 0===t&&(t=[]);var o=M(e);return e=o===(null==(n=e.ownerDocument)?void 0:n.body),n=c(o),o=e?[n].concat(n.visualViewport||[],L(o)?o:[]):o,t=t.concat(o),e?t:t.concat(A(y(o)))}function C(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function k(e,t){if("viewport"===t){t=c(e);var n=v(e);t=t.visualViewport;var o=n.clientWidth;n=n.clientHeight;var r=0,i=0;t&&(o=t.width,n=t.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=t.offsetLeft,i=t.offsetTop)),e=C(e={width:o,height:n,x:r+_(e),y:i})}else d(t)?((e=h(t)).top+=t.clientTop,e.left+=t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top):(i=v(e),e=v(i),o=j(i),t=null==(n=i.ownerDocument)?void 0:n.body,n=tt(e.scrollWidth,e.clientWidth,t?t.scrollWidth:0,t?t.clientWidth:0),r=tt(e.scrollHeight,e.clientHeight,t?t.scrollHeight:0,t?t.clientHeight:0),i=-o.scrollLeft+_(i),o=-o.scrollTop,"rtl"===b(t||e).direction&&(i+=tt(e.clientWidth,t?t.clientWidth:0)-n),e=C({width:n,height:r,x:i,y:o}));return e}function P(e,t,n){return t="clippingParents"===t?function(e){var t=A(y(e)),n=0<=["absolute","fixed"].indexOf(b(e).position)&&d(e)?w(e):e;return p(n)?t.filter((function(e){return p(e)&&g(e,n)&&"body"!==a(e)})):[]}(e):[].concat(t),n=(n=[].concat(t,[n])).reduce((function(t,n){return n=k(e,n),t.top=tt(n.top,t.top),t.right=nt(n.right,t.right),t.bottom=nt(n.bottom,t.bottom),t.left=tt(n.left,t.left),t}),k(e,n[0])),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function B(e){var t=e.reference,n=e.element,o=(e=e.placement)?u(e):null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?$(o):null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function D(e,t){void 0===t&&(t={});var n=t;t=void 0===(t=n.placement)?e.placement:t;var o=n.boundary,r=void 0===o?"clippingParents":o,i=void 0===(o=n.rootBoundary)?"viewport":o;o=void 0===(o=n.elementContext)?"popper":o;var s=n.altBoundary,l=void 0!==s&&s;n=O("number"!=typeof(n=void 0===(n=n.padding)?0:n)?n:E(n,Ge));var a=e.elements.reference;s=e.rects.popper,r=P(p(l=e.elements[l?"popper"===o?"reference":"popper":o])?l:l.contextElement||v(e.elements.popper),r,i),l=B({reference:i=h(a),element:s,strategy:"absolute",placement:t}),s=C(Object.assign({},s,l)),i="popper"===o?s:i;var c={top:r.top-i.top+n.top,bottom:i.bottom-r.bottom+n.bottom,left:r.left-i.left+n.left,right:i.right-r.right+n.right};if(e=e.modifiersData.offset,"popper"===o&&e){var d=e[t];Object.keys(c).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";c[e]+=d[n]*t}))}return c}function H(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function N(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}function R(e,t,n){void 0===n&&(n=!1);var o=v(t);e=h(e);var r=d(t),i={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&(("body"!==a(t)||L(o))&&(i=t!==c(t)&&d(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:j(t)),d(t)?((s=h(t)).x+=t.clientLeft,s.y+=t.clientTop):o&&(s.x=_(o))),{x:e.left+i.scrollLeft-s.x,y:e.top+i.scrollTop-s.y,width:e.width,height:e.height}}function W(e){function t(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){o.has(e)||(e=n.get(e))&&t(e)})),r.push(e)}var n=new Map,o=new Set,r=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||t(e)})),r}function F(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function q(){for(var e=arguments.length,t=Array(e),n=0;n{if("popper"===t){var n=e.attributes[t]||{},o=e.elements[t];Object.assign(o.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}),Object.keys(n).forEach((e=>{let t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))}}))}},{name:"computeStyles",options:{adaptive:!1}}],n={placement:"top",strategy:"fixed",modifiers:[{name:"focusAfterRender",enabled:!0,phase:"afterWrite",fn(){setTimeout((()=>{e.el&&e.el.focus()}),300)}}]};return V({},n,{modifiers:Array.from(new Set([...n.modifiers,...t]))})}function X(e){return s(e)&&""!==e?"-"!==e.charAt(e.length-1)?`${e}-`:e:""}function U(e){e=e.options.attachTo||{};let t=Object.assign({},e);if(s(e.element)){try{t.element=document.querySelector(e.element)}catch(e){}t.element||console.error(`The element for this Shepherd step was not found ${e.element}`)}return t}function z(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{let n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}function Z(e,t){if(e.popperOptions){let n=Object.assign({},t,e.popperOptions);if(e.popperOptions.modifiers&&0e.name));t=t.modifiers.filter((e=>!o.includes(e.name))),n.modifiers=Array.from(new Set([...t,...e.popperOptions.modifiers]))}return n}return t}function K(){}function G(e,t){for(let n in t)e[n]=t[n];return e}function J(e){return e()}function Q(e){return"function"==typeof e}function ee(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function te(e){e.parentNode.removeChild(e)}function ne(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function oe(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function re(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ie(e,t){let n=Object.getOwnPropertyDescriptors(e.__proto__);for(let o in t)null==t[o]?e.removeAttribute(o):"style"===o?e.style.cssText=t[o]:"__value"===o?e.value=e[o]=t[o]:n[o]&&n[o].set?e[o]=t[o]:re(e,o,t[o])}function se(e,t,n){e.classList[n?"add":"remove"](t)}function le(){if(!pt)throw Error("Function called outside component initialization");return pt}function ae(e){ht.push(e)}function ce(){if(!vt){vt=!0;do{for(var e=0;e{xt.delete(e),o&&(n&&e.d(1),o())})),e.o(t))}function he(e){e&&e.c()}function me(e,t,n,o){let{fragment:r,on_mount:i,on_destroy:s,after_update:l}=e.$$;r&&r.m(t,n),o||ae((()=>{let t=i.map(J).filter(Q);s?s.push(...t):t.forEach(J),e.$$.on_mount=[]})),l.forEach(ae)}function ge(e,t){null!==(e=e.$$).fragment&&(e.on_destroy.forEach(J),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function be(e,t,n,o,r,i,s=[-1]){let l=pt;pt=e;let a=e.$$={fragment:null,ctx:null,props:i,update:K,not_equal:r,bound:Object.create(null),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:Object.create(null),dirty:s,skip_bound:!1},c=!1;a.ctx=n?n(e,t.props||{},((t,n,...o)=>(o=o.length?o[0]:n,a.ctx&&r(a.ctx[t],a.ctx[t]=o)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](o),c&&(-1===e.$$.dirty[0]&&(ft.push(e),bt||(bt=!0,gt.then(ce)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{"config"in e&&n(6,p=e.config),"step"in e&&n(7,d=e.step)},e.$$.update=()=>{if(192&e.$$.dirty){if(n(0,o=p.action?p.action.bind(d.tour):null),n(1,r=p.classes),p.disabled){var t=p.disabled;t=i(t)?t.call(d):t}else t=!1;n(2,s=t),n(3,l=p.label),n(4,a=p.secondary),n(5,c=p.text)}},[o,r,s,l,a,c,p,d]}function xe(e,t,n){return(e=e.slice())[2]=t[n],e}function we(e){let t,n,o=e[1],r=[];for(let t=0;tue(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e{o=null})),de())},i(e){n||(fe(o),n=!0)},o(e){ue(o),n=!1},d(e){e&&te(t),o&&o.d()}}}function Ee(e,t,n){let o,{step:r}=t;return e.$$set=e=>{"step"in e&&n(0,r=e.step)},e.$$.update=()=>{1&e.$$.dirty&&n(1,o=r.options.buttons)},[r,o]}function Se(e){let t,n,o,r,i;return{c(){t=document.createElement("button"),n=document.createElement("span"),n.textContent="×",re(n,"aria-hidden","true"),re(t,"aria-label",o=e[0].label?e[0].label:"Close Tour"),re(t,"class","shepherd-cancel-icon"),re(t,"type","button")},m(o,s){o.insertBefore(t,s||null),t.appendChild(n),r||(i=oe(t,"click",e[1]),r=!0)},p(e,[n]){1&n&&o!==(o=e[0].label?e[0].label:"Close Tour")&&re(t,"aria-label",o)},i:K,o:K,d(e){e&&te(t),r=!1,i()}}}function Te(e,t,n){let{cancelIcon:o}=t,{step:r}=t;return e.$$set=e=>{"cancelIcon"in e&&n(0,o=e.cancelIcon),"step"in e&&n(2,r=e.step)},[o,e=>{e.preventDefault(),r.cancel()},r]}function Ie(e){let t;return{c(){t=document.createElement("h3"),re(t,"id",e[1]),re(t,"class","shepherd-title")},m(n,o){n.insertBefore(t,o||null),e[3](t)},p(e,[n]){2&n&&re(t,"id",e[1])},i:K,o:K,d(n){n&&te(t),e[3](null)}}}function je(e,t,n){let{labelId:o}=t,{element:r}=t,{title:s}=t;return le().$$.after_update.push((()=>{i(s)&&n(2,s=s()),n(0,r.innerHTML=s,r)})),e.$$set=e=>{"labelId"in e&&n(1,o=e.labelId),"element"in e&&n(0,r=e.element),"title"in e&&n(2,s=e.title)},[r,o,s,function(e){ut[e?"unshift":"push"]((()=>{r=e,n(0,r)}))}]}function _e(e){let t,n;return t=new St({props:{labelId:e[0],title:e[2]}}),{c(){he(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){let o={};1&n&&(o.labelId=e[0]),4&n&&(o.title=e[2]),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Le(e){let t,n;return t=new Et({props:{cancelIcon:e[3],step:e[1]}}),{c(){he(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){let o={};8&n&&(o.cancelIcon=e[3]),2&n&&(o.step=e[1]),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Me(e){let t,n,o,r=e[2]&&_e(e),i=e[3]&&e[3].enabled&&Le(e);return{c(){t=document.createElement("header"),r&&r.c(),n=document.createTextNode(" "),i&&i.c(),re(t,"class","shepherd-header")},m(e,s){e.insertBefore(t,s||null),r&&r.m(t,null),t.appendChild(n),i&&i.m(t,null),o=!0},p(e,[o]){e[2]?r?(r.p(e,o),4&o&&fe(r,1)):(r=_e(e),r.c(),fe(r,1),r.m(t,n)):r&&(pe(),ue(r,1,1,(()=>{r=null})),de()),e[3]&&e[3].enabled?i?(i.p(e,o),8&o&&fe(i,1)):(i=Le(e),i.c(),fe(i,1),i.m(t,null)):i&&(pe(),ue(i,1,1,(()=>{i=null})),de())},i(e){o||(fe(r),fe(i),o=!0)},o(e){ue(r),ue(i),o=!1},d(e){e&&te(t),r&&r.d(),i&&i.d()}}}function Ae(e,t,n){let o,r,{labelId:i}=t,{step:s}=t;return e.$$set=e=>{"labelId"in e&&n(0,i=e.labelId),"step"in e&&n(1,s=e.step)},e.$$.update=()=>{2&e.$$.dirty&&(n(2,o=s.options.title),n(3,r=s.options.cancelIcon))},[i,s,o,r]}function Ce(e){let t;return{c(){t=document.createElement("div"),re(t,"class","shepherd-text"),re(t,"id",e[1])},m(n,o){n.insertBefore(t,o||null),e[3](t)},p(e,[n]){2&n&&re(t,"id",e[1])},i:K,o:K,d(n){n&&te(t),e[3](null)}}}function ke(e,t,n){let{descriptionId:o}=t,{element:r}=t,{step:s}=t;return le().$$.after_update.push((()=>{let{text:e}=s.options;i(e)&&(e=e.call(s)),e instanceof HTMLElement?r.appendChild(e):n(0,r.innerHTML=e,r)})),e.$$set=e=>{"descriptionId"in e&&n(1,o=e.descriptionId),"element"in e&&n(0,r=e.element),"step"in e&&n(2,s=e.step)},[r,o,s,function(e){ut[e?"unshift":"push"]((()=>{r=e,n(0,r)}))}]}function Pe(e){let t,n;return t=new Tt({props:{labelId:e[1],step:e[2]}}),{c(){he(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){let o={};2&n&&(o.labelId=e[1]),4&n&&(o.step=e[2]),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Be(e){let t,n;return t=new It({props:{descriptionId:e[0],step:e[2]}}),{c(){he(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){let o={};1&n&&(o.descriptionId=e[0]),4&n&&(o.step=e[2]),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function De(e){let t,n;return t=new Ot({props:{step:e[2]}}),{c(){he(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){let o={};4&n&&(o.step=e[2]),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function He(e){let t,n,o,r,i=void 0!==e[2].options.title||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,s=void 0!==e[2].options.text,l=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,a=i&&Pe(e),c=s&&Be(e),p=l&&De(e);return{c(){t=document.createElement("div"),a&&a.c(),n=document.createTextNode(" "),c&&c.c(),o=document.createTextNode(" "),p&&p.c(),re(t,"class","shepherd-content")},m(e,i){e.insertBefore(t,i||null),a&&a.m(t,null),t.appendChild(n),c&&c.m(t,null),t.appendChild(o),p&&p.m(t,null),r=!0},p(e,[r]){4&r&&(i=void 0!==e[2].options.title||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled),i?a?(a.p(e,r),4&r&&fe(a,1)):(a=Pe(e),a.c(),fe(a,1),a.m(t,n)):a&&(pe(),ue(a,1,1,(()=>{a=null})),de()),4&r&&(s=void 0!==e[2].options.text),s?c?(c.p(e,r),4&r&&fe(c,1)):(c=Be(e),c.c(),fe(c,1),c.m(t,o)):c&&(pe(),ue(c,1,1,(()=>{c=null})),de()),4&r&&(l=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length),l?p?(p.p(e,r),4&r&&fe(p,1)):(p=De(e),p.c(),fe(p,1),p.m(t,null)):p&&(pe(),ue(p,1,1,(()=>{p=null})),de())},i(e){r||(fe(a),fe(c),fe(p),r=!0)},o(e){ue(a),ue(c),ue(p),r=!1},d(e){e&&te(t),a&&a.d(),c&&c.d(),p&&p.d()}}}function Ne(e,t,n){let{descriptionId:o}=t,{labelId:r}=t,{step:i}=t;return e.$$set=e=>{"descriptionId"in e&&n(0,o=e.descriptionId),"labelId"in e&&n(1,r=e.labelId),"step"in e&&n(2,i=e.step)},[o,r,i]}function Re(e){let t;return{c(){t=document.createElement("div"),re(t,"class","shepherd-arrow"),re(t,"data-popper-arrow","")},m(e,n){e.insertBefore(t,n||null)},d(e){e&&te(t)}}}function We(e){let t,n,o,r,i,s,l,a,c=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&Re();o=new jt({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let p=[{"aria-describedby":r=void 0!==e[4].options.text?e[2]:null},{"aria-labelledby":i=e[4].options.title?e[3]:null},e[1],{role:"dialog"},{tabindex:"0"}],d={};for(let e=0;e!!e.length))}function qe(e,t,n){let o,r,i,{classPrefix:l}=t,{element:a}=t,{descriptionId:c}=t,{firstFocusableElement:p}=t,{focusableElements:d}=t,{labelId:f}=t,{lastFocusableElement:u}=t,{step:h}=t,{dataStepId:m}=t;return le().$$.on_mount.push((()=>{n(1,m={[`data-${l}shepherd-step-id`]:h.id}),n(9,d=a.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,p=d[0]),n(10,u=d[d.length-1])})),le().$$.after_update.push((()=>{if(i!==h.options.classes){var e=i;s(e)&&((e=Fe(e)).length&&a.classList.remove(...e)),s(e=i=h.options.classes)&&((e=Fe(e)).length&&a.classList.add(...e))}})),e.$$set=e=>{"classPrefix"in e&&n(11,l=e.classPrefix),"element"in e&&n(0,a=e.element),"descriptionId"in e&&n(2,c=e.descriptionId),"firstFocusableElement"in e&&n(8,p=e.firstFocusableElement),"focusableElements"in e&&n(9,d=e.focusableElements),"labelId"in e&&n(3,f=e.labelId),"lastFocusableElement"in e&&n(10,u=e.lastFocusableElement),"step"in e&&n(4,h=e.step),"dataStepId"in e&&n(1,m=e.dataStepId)},e.$$.update=()=>{16&e.$$.dirty&&(n(5,o=h.options&&h.options.cancelIcon&&h.options.cancelIcon.enabled),n(6,r=h.options&&h.options.title))},[a,m,c,f,h,o,r,e=>{const{tour:t}=h;switch(e.keyCode){case 9:if(0===d.length){e.preventDefault();break}e.shiftKey?(document.activeElement===p||document.activeElement.classList.contains("shepherd-element"))&&(e.preventDefault(),u.focus()):document.activeElement===u&&(e.preventDefault(),p.focus());break;case 27:t.options.exitOnEsc&&h.cancel();break;case 37:t.options.keyboardNavigation&&t.back();break;case 39:t.options.keyboardNavigation&&t.next()}},p,d,u,l,()=>a,function(e){ut[e?"unshift":"push"]((()=>{a=e,n(0,a)}))}]}function Ve(e){let t,n,o,r,i;return{c(){t=ne("svg"),n=ne("path"),re(n,"d",e[2]),re(t,"class",o=(e[1]?"shepherd-modal-is-visible":"")+" shepherd-modal-overlay-container")},m(o,s){o.insertBefore(t,s||null),t.appendChild(n),e[11](t),r||(i=oe(t,"touchmove",e[3]),r=!0)},p(e,[r]){4&r&&re(n,"d",e[2]),2&r&&o!==(o=(e[1]?"shepherd-modal-is-visible":"")+" shepherd-modal-overlay-container")&&re(t,"class",o)},i:K,o:K,d(n){n&&te(t),e[11](null),r=!1,i()}}}function Ye(e){if(!e)return null;let t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return"hidden"!==t&&"visible"!==t&&e.scrollHeight>=e.clientHeight?e:Ye(e.parentElement)}function Xe(e,t,n){function o(){n(4,p={width:0,height:0,x:0,y:0,r:0})}function r(){n(1,u=!1),l()}function i(e=0,t=0,r,i){if(i){var s=i.getBoundingClientRect(),l=s.y||s.top;if(s=s.bottom||l+s.height,r){var a=r.getBoundingClientRect();r=a.y||a.top,a=a.bottom||r+a.height,l=Math.max(l,r),s=Math.min(s,a)}l={y:l,height:Math.max(s-l,0)};let{y:o,height:c}=l,{x:d,width:f,left:u}=i.getBoundingClientRect();n(4,p={width:f+2*e,height:c+2*e,x:(d||u)-e,y:o-e,r:t})}else o()}function s(){n(1,u=!0)}function l(){d&&(cancelAnimationFrame(d),d=void 0),window.removeEventListener("touchmove",h,{passive:!1})}function a(e){let{modalOverlayOpeningPadding:t,modalOverlayOpeningRadius:n}=e.options,o=Ye(e.target),r=()=>{d=void 0,i(t,n,o,e.target),d=requestAnimationFrame(r)};r(),window.addEventListener("touchmove",h,{passive:!1})}let{element:c}=t,{openingProperties:p}=t;z();let d,f,u=!1;o();let h=e=>{e.preventDefault()};return e.$$set=e=>{"element"in e&&n(0,c=e.element),"openingProperties"in e&&n(4,p=e.openingProperties)},e.$$.update=()=>{16&e.$$.dirty&&n(2,f=function({width:e,height:t,x:n=0,y:o=0,r:r=0}){let{innerWidth:i,innerHeight:s}=window;return`M${i},${s}H0V0H${i}V${s}ZM${n+r},${o}a${r},${r},0,0,0-${r},${r}V${t+o-r}a${r},${r},0,0,0,${r},${r}H${e+n-r}a${r},${r},0,0,0,${r}-${r}V${o+r}a${r},${r},0,0,0-${r}-${r}Z`}(p))},[c,u,f,e=>{e.stopPropagation()},p,()=>c,o,r,i,function(e){l(),e.tour.options.useModalOverlay?(a(e),s()):r()},s,function(e){ut[e?"unshift":"push"]((()=>{c=e,n(0,c)}))}]}var Ue=function(e){var t;return(t=!!e&&"object"==typeof e)&&(t=!("[object RegExp]"===(t=Object.prototype.toString.call(e))||"[object Date]"===t||e.$$typeof===ze)),t},ze="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;r.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce((function(e,n){return r(e,n,t)}),{})};var Ze=r;class Ke{on(e,t,n,o=!1){return void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[e]&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:n,once:o}),this}once(e,t,n){return this.on(e,t,n,!0)}off(e,t){return void 0===this.bindings||void 0===this.bindings[e]||(void 0===t?delete this.bindings[e]:this.bindings[e].forEach(((n,o)=>{n.handler===t&&this.bindings[e].splice(o,1)}))),this}trigger(e,...t){return void 0!==this.bindings&&this.bindings[e]&&this.bindings[e].forEach(((n,o)=>{let{ctx:r,handler:i,once:s}=n;i.apply(r||this,t),s&&this.bindings[e].splice(o,1)})),this}}var Ge=["top","bottom","right","left"],Je=Ge.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),Qe=[].concat(Ge,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),et="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),tt=Math.max,nt=Math.min,ot=Math.round,rt={top:"auto",right:"auto",bottom:"auto",left:"auto"},it={passive:!0},st={left:"right",right:"left",bottom:"top",top:"bottom"},lt={start:"end",end:"start"},at={placement:"bottom",modifiers:[],strategy:"absolute"},ct=function(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,o=void 0===(e=e.defaultOptions)?at:e;return function(e,t,r){function i(){l.forEach((function(e){return e()})),l=[]}void 0===r&&(r=o);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},at,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],a=!1,c={state:s,setOptions:function(r){return i(),s.options=Object.assign({},o,s.options,r),s.scrollParents={reference:p(e)?A(e):e.contextElement?A(e.contextElement):[],popper:A(t)},r=function(e){var t=W(e);return et.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=r.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:c,options:n}),l.push(t||function(){}))})),c.update()},forceUpdate:function(){if(!a){var e=s.elements,t=e.reference;if(q(t,e=e.popper))for(s.rects={reference:R(t,w(e),"fixed"===s.options.strategy),popper:m(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;ti[$]&&(x=T(x)),$=T(x),w=[],o&&w.push(0>=O[y]),r&&w.push(0>=O[x],0>=O[$]),w.every((function(e){return e}))){g=v,p=!1;break}m.set(v,w)}if(p)for(o=function(e){var t=h.find((function(t){if(t=m.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return g=t,"break"},r=d?3:1;0{let e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&0!==Object.keys(e).length&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}class $t extends wt{constructor(e){super(),be(this,e,ye,ve,ee,{config:6,step:7})}}class Ot extends wt{constructor(e){super(),be(this,e,Ee,Oe,ee,{step:0})}}class Et extends wt{constructor(e){super(),be(this,e,Te,Se,ee,{cancelIcon:0,step:2})}}class St extends wt{constructor(e){super(),be(this,e,je,Ie,ee,{labelId:1,element:0,title:2})}}class Tt extends wt{constructor(e){super(),be(this,e,Ae,Me,ee,{labelId:0,step:1})}}class It extends wt{constructor(e){super(),be(this,e,ke,Ce,ee,{descriptionId:1,element:0,step:2})}}class jt extends wt{constructor(e){super(),be(this,e,Ne,He,ee,{descriptionId:0,labelId:1,step:2})}}class _t extends wt{constructor(e){super(),be(this,e,qe,We,ee,{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]}}var Lt,Mt=(void((Lt={exports:{}}).exports={polyfill:function(){function e(e,t){this.scrollLeft=e,this.scrollTop=t}function t(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function n(e,t){return"Y"===t?e.clientHeight+fthis._show()))}this._show()}updateStepOptions(e){Object.assign(this.options,e),this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})}getElement(){return this.el}getTarget(){return this.target}_createTooltipContent(){return this.shepherdElementComponent=new _t({target:this.tour.options.stepsContainer||document.body,props:{classPrefix:this.classPrefix,descriptionId:`${this.id}-description`,labelId:`${this.id}-label`,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()}_scrollTo(e){let{element:t}=U(this);i(this.options.scrollToHandler)?this.options.scrollToHandler(t):t instanceof Element&&"function"==typeof t.scrollIntoView&&t.scrollIntoView(e)}_getClassOptions(e){var t=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;return t=t&&t.classes?t.classes:"",e=[...(e.classes?e.classes:"").split(" "),...t.split(" ")],e=new Set(e),Array.from(e).join(" ").trim()}_setOptions(e={}){let t=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;t=Ze({},t||{}),this.options=Object.assign({arrow:!0},t,e);let{when:n}=this.options;this.options.classes=this._getClassOptions(e),this.destroy(),this.id=this.options.id||`step-${z()}`,n&&Object.keys(n).forEach((e=>{this.on(e,n[e],this)}))}_setupElements(){void 0!==this.el&&this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&function(e){let{event:t,selector:n}=e.options.advanceOn||{};if(!t)return console.error("advanceOn was defined, but no event name was passed.");{let o,r=function(e,t){return n=>{if(t.isOpen()){let o=t.el&&n.currentTarget===t.el;(void 0!==e&&n.currentTarget.matches(e)||o)&&t.tour.next()}}}(n,e);try{o=document.querySelector(n)}catch(e){}if(void 0!==n&&!o)return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);o?(o.addEventListener(t,r),e.on("destroy",(()=>o.removeEventListener(t,r)))):(document.body.addEventListener(t,r,!0),e.on("destroy",(()=>document.body.removeEventListener(t,r,!0))))}}(this);{this.tooltip&&this.tooltip.destroy();let e=U(this),t=e.element,n=function(e,t){let n={modifiers:[{name:"preventOverflow",options:{altAxis:!0,tether:!1}},{name:"focusAfterRender",enabled:!0,phase:"afterWrite",fn(){setTimeout((()=>{t.el&&t.el.focus()}),300)}}],strategy:"absolute"};return t.isCentered()?n=Y(t):n.placement=e.on,(e=t.tour&&t.tour.options&&t.tour.options.defaultStepOptions)&&(n=Z(e,n)),Z(t.options,n)}(e,this);this.isCentered()&&(t=document.body,this.shepherdElementComponent.getElement().classList.add("shepherd-centered")),this.tooltip=ct(t,this.el,n),this.target=e.element}}_show(){this.trigger("before-show"),this._setupElements(),this.tour.modal||this.tour._setupModal(),this.tour.modal.setupForStep(this),this._styleTargetElementForStep(this),this.el.hidden=!1,this.options.scrollTo&&setTimeout((()=>{this._scrollTo(this.options.scrollTo)})),this.el.hidden=!1;let e=this.shepherdElementComponent.getElement(),t=this.target||document.body;t.classList.add(`${this.classPrefix}shepherd-enabled`),t.classList.add(`${this.classPrefix}shepherd-target`),e.classList.add("shepherd-enabled"),this.trigger("show")}_styleTargetElementForStep(e){let t=e.target;t&&(e.options.highlightClass&&t.classList.add(e.options.highlightClass),!1===e.options.canClickTarget&&t.classList.add("shepherd-target-click-disabled"))}_updateStepTargetOnHide(){let e=this.target||document.body;this.options.highlightClass&&e.classList.remove(this.options.highlightClass),e.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}}class Ct extends wt{constructor(e){super(),be(this,e,Xe,Ve,ee,{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]}}let kt=new Ke;return Object.assign(kt,{Tour:class extends Ke{constructor(e={}){return super(e),l(this),this.options=Object.assign({},{exitOnEsc:!0,keyboardNavigation:!0},e),this.classPrefix=X(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),"active cancel complete inactive show start".split(" ").map((e=>{(e=>{this.on(e,(t=>{(t=t||{}).tour=this,kt.trigger(e,t)}))})(e)})),this._setTourID(),this}addStep(e,t){return e instanceof At?e.tour=this:e=new At(this,e),void 0!==t?this.steps.splice(t,0,e):this.steps.push(e),e}addSteps(e){return Array.isArray(e)&&e.forEach((e=>{this.addStep(e)})),this}back(){let e=this.steps.indexOf(this.currentStep);this.show(e-1,!1)}cancel(){this.options.confirmCancel?window.confirm(this.options.confirmCancelMessage||"Are you sure you want to stop the tour?")&&this._done("cancel"):this._done("cancel")}complete(){this._done("complete")}getById(e){return this.steps.find((t=>t.id===e))}getCurrentStep(){return this.currentStep}hide(){let e=this.getCurrentStep();if(e)return e.hide()}isActive(){return kt.activeTour===this}next(){let e=this.steps.indexOf(this.currentStep);e===this.steps.length-1?this.complete():this.show(e+1,!0)}removeStep(e){let t=this.getCurrentStep();this.steps.some(((t,n)=>{if(t.id===e)return t.isOpen()&&t.hide(),t.destroy(),this.steps.splice(n,1),!0})),t&&t.id===e&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(e=0,t=!0){(e=s(e)?this.getById(e):this.steps[e])&&(this._updateStateBeforeShow(),i(e.options.showOn)&&!e.options.showOn()?this._skipStep(e,t):(this.trigger("show",{step:e,previous:this.currentStep}),this.currentStep=e,e.show()))}start(){this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this._setupModal(),this._setupActiveTour(),this.next()}_done(e){let t=this.steps.indexOf(this.currentStep);Array.isArray(this.steps)&&this.steps.forEach((e=>e.destroy())),function(e){e&&(({steps:e}=e),e.forEach((e=>{e.options&&!1===e.options.canClickTarget&&e.options.attachTo&&e.target instanceof HTMLElement&&e.target.classList.remove("shepherd-target-click-disabled")})))}(this),this.trigger(e,{index:t}),kt.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),"cancel"!==e&&"complete"!==e||!this.modal||(e=document.querySelector(".shepherd-modal-overlay-container"))&&e.remove(),this.focusedElBeforeOpen instanceof HTMLElement&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),kt.activeTour=this}_setupModal(){this.modal=new Ct({target:this.options.modalContainer||document.body,props:{classPrefix:this.classPrefix,styles:this.styles}})}_skipStep(e,t){e=this.steps.indexOf(e),this.show(t?e+1:e-1,t)}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(){this.id=`${this.options.tourName||"tour"}--${z()}`}},Step:At}),kt}));