UNPKG

clever-onboarding

Version:

Framework agnostic onboarding widget for your web apps.

4 lines 68.9 kB
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.CleverOnboarding=n()}(this,function(){"use strict";function t(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ai.hasOwnProperty(n)?{space:Ai[n],local:t}:t}function n(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Ii&&n.documentElement.namespaceURI===Ii?n.createElement(t):n.createElementNS(e,t)}}function e(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function i(i){var r=t(i);return(r.local?e:n)(r)}function r(){}function o(t){return null==t?r:function(){return this.querySelector(t)}}function s(t){"function"!=typeof t&&(t=o(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var s,a,u=n[r],l=u.length,h=i[r]=new Array(l),c=0;c<l;++c)(s=u[c])&&(a=t.call(s,s.__data__,c,u))&&("__data__"in s&&(a.__data__=s.__data__),h[c]=a);return new Tt(i,this._parents)}function a(){return[]}function u(t){return null==t?a:function(){return this.querySelectorAll(t)}}function l(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,i=[],r=[],o=0;o<e;++o)for(var s,a=n[o],l=a.length,h=0;h<l;++h)(s=a[h])&&(i.push(t.call(s,s.__data__,h,a)),r.push(s));return new Tt(i,r)}function h(t){return function(){return this.matches(t)}}function c(t){"function"!=typeof t&&(t=h(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,s=n[r],a=s.length,u=i[r]=[],l=0;l<a;++l)(o=s[l])&&t.call(o,o.__data__,l,s)&&u.push(o);return new Tt(i,this._parents)}function d(t){return new Array(t.length)}function f(){return new Tt(this._enter||this._groups.map(d),this._parents)}function p(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function _(t){return function(){return t}}function g(t,n,e,i,r,o){for(var s,a=0,u=n.length,l=o.length;a<l;++a)(s=n[a])?(s.__data__=o[a],i[a]=s):e[a]=new p(t,o[a]);for(;a<u;++a)(s=n[a])&&(r[a]=s)}function w(t,n,e,i,r,o,s){var a,u,l,h={},c=n.length,d=o.length,f=new Array(c);for(a=0;a<c;++a)(u=n[a])&&(f[a]=l=Ni+s.call(u,u.__data__,a,n),l in h?r[a]=u:h[l]=u);for(a=0;a<d;++a)l=Ni+s.call(t,o[a],a,o),(u=h[l])?(i[a]=u,u.__data__=o[a],h[l]=null):e[a]=new p(t,o[a]);for(a=0;a<c;++a)(u=n[a])&&h[f[a]]===u&&(r[a]=u)}function v(t,n){if(!t)return f=new Array(this.size()),l=-1,this.each(function(t){f[++l]=t}),f;var e=n?w:g,i=this._parents,r=this._groups;"function"!=typeof t&&(t=_(t));for(var o=r.length,s=new Array(o),a=new Array(o),u=new Array(o),l=0;l<o;++l){var h=i[l],c=r[l],d=c.length,f=t.call(h,h&&h.__data__,l,i),p=f.length,v=a[l]=new Array(p),y=s[l]=new Array(p);e(h,c,v,y,u[l]=new Array(d),f,n);for(var m,b,x=0,k=0;x<p;++x)if(m=v[x]){for(x>=k&&(k=x+1);!(b=y[k])&&++k<p;);m._next=b||null}}return s=new Tt(s,i),s._enter=a,s._exit=u,s}function y(){return new Tt(this._exit||this._groups.map(d),this._parents)}function m(t,n,e){var i=this.enter(),r=this,o=this.exit();return i="function"==typeof t?t(i):i.append(t+""),null!=n&&(r=n(r)),null==e?o.remove():e(o),i&&r?i.merge(r).order():r}function b(t){for(var n=this._groups,e=t._groups,i=n.length,r=e.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var u,l=n[a],h=e[a],c=l.length,d=s[a]=new Array(c),f=0;f<c;++f)(u=l[f]||h[f])&&(d[f]=u);for(;a<i;++a)s[a]=n[a];return new Tt(s,this._parents)}function x(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var i,r=t[n],o=r.length-1,s=r[o];--o>=0;)(i=r[o])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this}function k(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=S);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o<i;++o){for(var s,a=e[o],u=a.length,l=r[o]=new Array(u),h=0;h<u;++h)(s=a[h])&&(l[h]=s);l.sort(n)}return new Tt(r,this._parents).order()}function S(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function E(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function I(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function A(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var i=t[n],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null}function N(){var t=0;return this.each(function(){++t}),t}function M(){return!this.node()}function C(t){for(var n=this._groups,e=0,i=n.length;e<i;++e)for(var r,o=n[e],s=0,a=o.length;s<a;++s)(r=o[s])&&t.call(r,r.__data__,s,o);return this}function P(t){return function(){this.removeAttribute(t)}}function B(t){return function(){this.removeAttributeNS(t.space,t.local)}}function R(t,n){return function(){this.setAttribute(t,n)}}function T(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function z(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function W(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function D(n,e){var i=t(n);if(arguments.length<2){var r=this.node();return i.local?r.getAttributeNS(i.space,i.local):r.getAttribute(i)}return this.each((null==e?i.local?B:P:"function"==typeof e?i.local?W:z:i.local?T:R)(i,e))}function j(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function L(t){return function(){this.style.removeProperty(t)}}function O(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Z(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function H(t,n,e){return arguments.length>1?this.each((null==n?L:"function"==typeof n?Z:O)(t,n,null==e?"":e)):G(this.node(),t)}function G(t,n){return t.style.getPropertyValue(n)||j(t).getComputedStyle(t,null).getPropertyValue(n)}function X(t){return function(){delete this[t]}}function Y(t,n){return function(){this[t]=n}}function q(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function V(t,n){return arguments.length>1?this.each((null==n?X:"function"==typeof n?q:Y)(t,n)):this.node()[t]}function K(t){return t.trim().split(/^|\s+/)}function U(t){return t.classList||new J(t)}function J(t){this._node=t,this._names=K(t.getAttribute("class")||"")}function F(t,n){for(var e=U(t),i=-1,r=n.length;++i<r;)e.add(n[i])}function $(t,n){for(var e=U(t),i=-1,r=n.length;++i<r;)e.remove(n[i])}function Q(t){return function(){F(this,t)}}function tt(t){return function(){$(this,t)}}function nt(t,n){return function(){(n.apply(this,arguments)?F:$)(this,t)}}function et(t,n){var e=K(t+"");if(arguments.length<2){for(var i=U(this.node()),r=-1,o=e.length;++r<o;)if(!i.contains(e[r]))return!1;return!0}return this.each(("function"==typeof n?nt:n?Q:tt)(e,n))}function it(){this.textContent=""}function rt(t){return function(){this.textContent=t}}function ot(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function st(t){return arguments.length?this.each(null==t?it:("function"==typeof t?ot:rt)(t)):this.node().textContent}function at(){this.innerHTML=""}function ut(t){return function(){this.innerHTML=t}}function lt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function ht(t){return arguments.length?this.each(null==t?at:("function"==typeof t?lt:ut)(t)):this.node().innerHTML}function ct(){this.nextSibling&&this.parentNode.appendChild(this)}function dt(){return this.each(ct)}function ft(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pt(){return this.each(ft)}function _t(t){var n="function"==typeof t?t:i(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function gt(){return null}function wt(t,n){var e="function"==typeof t?t:i(t),r=null==n?gt:"function"==typeof n?n:o(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function vt(){var t=this.parentNode;t&&t.removeChild(this)}function yt(){return this.each(vt)}function mt(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function bt(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function xt(t){return this.select(t?bt:mt)}function kt(t){return arguments.length?this.property("__data__",t):this.node().__data__}function St(t,n,e){return t=Et(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function Et(t,n,e){return function(i){var r=Ci;Ci=i;try{t.call(this,this.__data__,n,e)}finally{Ci=r}}}function It(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function At(t){return function(){var n=this.__on;if(n){for(var e,i=0,r=-1,o=n.length;i<o;++i)e=n[i],t.type&&e.type!==t.type||e.name!==t.name?n[++r]=e:this.removeEventListener(e.type,e.listener,e.capture);++r?n.length=r:delete this.__on}}}function Nt(t,n,e){var i=Mi.hasOwnProperty(t.type)?St:Et;return function(r,o,s){var a,u=this.__on,l=i(n,o,s);if(u)for(var h=0,c=u.length;h<c;++h)if((a=u[h]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=l,a.capture=e),void(a.value=n);this.addEventListener(t.type,l,e),a={type:t.type,name:t.name,value:n,listener:l,capture:e},u?u.push(a):this.__on=[a]}}function Mt(t,n,e){var i,r,o=It(t+""),s=o.length;{if(!(arguments.length<2)){for(a=n?Nt:At,null==e&&(e=!1),i=0;i<s;++i)this.each(a(o[i],n,e));return this}var a=this.node().__on;if(a)for(var u,l=0,h=a.length;l<h;++l)for(i=0,u=a[l];i<s;++i)if((r=o[i]).type===u.type&&r.name===u.name)return u.value}}function Ct(t,n,e){var i=j(t),r=i.CustomEvent;"function"==typeof r?r=new r(n,e):(r=i.document.createEvent("Event"),e?(r.initEvent(n,e.bubbles,e.cancelable),r.detail=e.detail):r.initEvent(n,!1,!1)),t.dispatchEvent(r)}function Pt(t,n){return function(){return Ct(this,t,n)}}function Bt(t,n){return function(){return Ct(this,t,n.apply(this,arguments))}}function Rt(t,n){return this.each(("function"==typeof n?Bt:Pt)(t,n))}function Tt(t,n){this._groups=t,this._parents=n}function zt(){return new Tt([[document.documentElement]],Pi)}function Wt(t){return"string"==typeof t?new Tt([[document.querySelector(t)]],[document.documentElement]):new Tt([[t]],Pi)}function Dt(t){return"string"==typeof t?new Tt([document.querySelectorAll(t)],[document.documentElement]):new Tt([null==t?[]:t],Pi)}function jt(t){var n=void 0===t?"undefined":fi(t);return null!=t&&("object"==n||"function"==n)}function Lt(t){var n=ji.call(t,Oi),e=t[Oi];try{t[Oi]=void 0}catch(t){}var i=Li.call(t);return n?t[Oi]=e:delete t[Oi],i}function Ot(t){return Hi.call(t)}function Zt(t){return null==t?void 0===t?Xi:Gi:Yi&&Yi in Object(t)?Lt(t):Ot(t)}function Ht(t){return null!=t&&"object"==(void 0===t?"undefined":fi(t))}function Gt(t){return"symbol"==(void 0===t?"undefined":fi(t))||Ht(t)&&Zt(t)==qi}function Xt(t){if("number"==typeof t)return t;if(Gt(t))return Vi;if(jt(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=jt(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Ki,"");var e=Ji.test(t);return e||Fi.test(t)?$i(t.slice(2),e?2:8):Ui.test(t)?Vi:+t}function Yt(t,n,e){function i(n){var e=d,i=f;return d=f=void 0,v=n,_=t.apply(i,e)}function r(t){return v=t,g=setTimeout(a,n),y?i(t):_}function o(t){var e=t-w,i=t-v,r=n-e;return m?nr(r,p-i):r}function s(t){var e=t-w,i=t-v;return void 0===w||e>=n||e<0||m&&i>=p}function a(){var t=zi();if(s(t))return u(t);g=setTimeout(a,o(t))}function u(t){return g=void 0,b&&d?i(t):(d=f=void 0,_)}function l(){void 0!==g&&clearTimeout(g),v=0,d=w=f=g=void 0}function h(){return void 0===g?_:u(zi())}function c(){var t=zi(),e=s(t);if(d=arguments,f=this,w=t,e){if(void 0===g)return r(w);if(m)return clearTimeout(g),g=setTimeout(a,n),i(w)}return void 0===g&&(g=setTimeout(a,n)),_}var d,f,p,_,g,w,v=0,y=!1,m=!1,b=!0;if("function"!=typeof t)throw new TypeError(Qi);return n=Xt(n)||0,jt(e)&&(y=!!e.leading,m="maxWait"in e,p=m?tr(Xt(e.maxWait)||0,n):p,b="trailing"in e?!!e.trailing:b),c.cancel=l,c.flush=h,c}function qt(){for(var t,n=0,e=arguments.length,i={};n<e;++n){if(!(t=arguments[n]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Vt(i)}function Vt(t){this._=t}function Kt(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");if(i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function Ut(t,n){for(var e,i=0,r=t.length;i<r;++i)if((e=t[i]).name===n)return e.value}function Jt(t,n,e){for(var i=0,r=t.length;i<r;++i)if(t[i].name===n){t[i]=ir,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=e&&t.push({name:n,value:e}),t}function Ft(){return cr||(pr($t),cr=fr.now()+dr)}function $t(){cr=0}function Qt(){this._call=this._time=this._next=null}function tn(t,n,e){var i=new Qt;return i.restart(t,n,e),i}function nn(){Ft(),++sr;for(var t,n=rr;n;)(t=cr-n._time)>=0&&n._call.call(null,t),n=n._next;--sr}function en(){cr=(hr=fr.now())+dr,sr=ar=0;try{nn()}finally{sr=0,on(),cr=0}}function rn(){var t=fr.now(),n=t-hr;n>lr&&(dr-=n,hr=t)}function on(){for(var t,n,e=rr,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:rr=n);or=t,sn(i)}function sn(t){if(!sr){ar&&(ar=clearTimeout(ar));t-cr>24?(t<1/0&&(ar=setTimeout(en,t-fr.now()-dr)),ur&&(ur=clearInterval(ur))):(ur||(hr=fr.now(),ur=setInterval(rn,lr)),sr=1,pr(en))}}function an(t,n,e){var i=new Qt;return n=null==n?0:+n,i.restart(function(e){i.stop(),t(e+n)},n,e),i}function un(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};dn(t,e,{name:n,index:i,group:r,on:_r,tween:gr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:wr})}function ln(t,n){var e=cn(t,n);if(e.state>wr)throw new Error("too late; already scheduled");return e}function hn(t,n){var e=cn(t,n);if(e.state>mr)throw new Error("too late; already running");return e}function cn(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function dn(t,n,e){function i(t){e.state=vr,e.timer.restart(r,e.delay,e.time),e.delay<=t&&r(t-e.delay)}function r(i){var l,h,c,d;if(e.state!==vr)return s();for(l in u)if(d=u[l],d.name===e.name){if(d.state===mr)return an(r);d.state===br?(d.state=kr,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete u[l]):+l<n&&(d.state=kr,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete u[l])}if(an(function(){e.state===mr&&(e.state=br,e.timer.restart(o,e.delay,e.time),o(i))}),e.state=yr,e.on.call("start",t,t.__data__,e.index,e.group),e.state===yr){for(e.state=mr,a=new Array(c=e.tween.length),l=0,h=-1;l<c;++l)(d=e.tween[l].value.call(t,t.__data__,e.index,e.group))&&(a[++h]=d);a.length=h+1}}function o(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(s),e.state=xr,1),r=-1,o=a.length;++r<o;)a[r].call(t,i);e.state===xr&&(e.on.call("end",t,t.__data__,e.index,e.group),s())}function s(){e.state=kr,e.timer.stop(),delete u[n];for(var i in u)return;delete t.__transition}var a,u=t.__transition;u[n]=e,e.timer=tn(i,0,e.time)}function fn(t,n){var e,i,r,o=t.__transition,s=!0;if(o){n=null==n?null:n+"";for(r in o)(e=o[r]).name===n?(i=e.state>yr&&e.state<xr,e.state=kr,e.timer.stop(),e.on.call(i?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[r]):s=!1;s&&delete t.__transition}}function pn(t){return this.each(function(){fn(this,t)})}function _n(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function gn(t,n){var e=Object.create(t.prototype);for(var i in n)e[i]=n[i];return e}function wn(){}function vn(){return this.rgb().formatHex()}function yn(){return Pn(this).formatHsl()}function mn(){return this.rgb().formatRgb()}function bn(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Ar.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?xn(n):3===e?new In(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?kn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?kn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Nr.exec(t))?new In(n[1],n[2],n[3],1):(n=Mr.exec(t))?new In(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Cr.exec(t))?kn(n[1],n[2],n[3],n[4]):(n=Pr.exec(t))?kn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Br.exec(t))?Cn(n[1],n[2]/100,n[3]/100,1):(n=Rr.exec(t))?Cn(n[1],n[2]/100,n[3]/100,n[4]):Tr.hasOwnProperty(t)?xn(Tr[t]):"transparent"===t?new In(NaN,NaN,NaN,0):null}function xn(t){return new In(t>>16&255,t>>8&255,255&t,1)}function kn(t,n,e,i){return i<=0&&(t=n=e=NaN),new In(t,n,e,i)}function Sn(t){return t instanceof wn||(t=bn(t)),t?(t=t.rgb(),new In(t.r,t.g,t.b,t.opacity)):new In}function En(t,n,e,i){return 1===arguments.length?Sn(t):new In(t,n,e,null==i?1:i)}function In(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function An(){return"#"+Mn(this.r)+Mn(this.g)+Mn(this.b)}function Nn(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Mn(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function Cn(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Rn(t,n,e,i)}function Pn(t){if(t instanceof Rn)return new Rn(t.h,t.s,t.l,t.opacity);if(t instanceof wn||(t=bn(t)),!t)return new Rn;if(t instanceof Rn)return t;t=t.rgb();var n=t.r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,u=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e<i):e===o?(i-n)/a+2:(n-e)/a+4,a/=u<.5?o+r:2-o-r,s*=60):a=u>0&&u<1?0:s,new Rn(s,a,u,t.opacity)}function Bn(t,n,e,i){return 1===arguments.length?Pn(t):new Rn(t,n,e,null==i?1:i)}function Rn(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Tn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function zn(t){if(t instanceof Dn)return new Dn(t.l,t.a,t.b,t.opacity);if(t instanceof Xn)return Yn(t);t instanceof In||(t=Sn(t));var n,e,i=Zn(t.r),r=Zn(t.g),o=Zn(t.b),s=jn((.2225045*i+.7168786*r+.0606169*o)/jr);return i===r&&r===o?n=e=s:(n=jn((.4360747*i+.3850649*r+.1430804*o)/Dr),e=jn((.0139322*i+.0971045*r+.7141733*o)/Lr)),new Dn(116*s-16,500*(n-s),200*(s-e),t.opacity)}function Wn(t,n,e,i){return 1===arguments.length?zn(t):new Dn(t,n,e,null==i?1:i)}function Dn(t,n,e,i){this.l=+t,this.a=+n,this.b=+e,this.opacity=+i}function jn(t){return t>Gr?Math.pow(t,1/3):t/Hr+Or}function Ln(t){return t>Zr?t*t*t:Hr*(t-Or)}function On(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Zn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Hn(t){if(t instanceof Xn)return new Xn(t.h,t.c,t.l,t.opacity);if(t instanceof Dn||(t=zn(t)),0===t.a&&0===t.b)return new Xn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*Wr;return new Xn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Gn(t,n,e,i){return 1===arguments.length?Hn(t):new Xn(t,n,e,null==i?1:i)}function Xn(t,n,e,i){this.h=+t,this.c=+n,this.l=+e,this.opacity=+i}function Yn(t){if(isNaN(t.h))return new Dn(t.l,0,0,t.opacity);var n=t.h*zr;return new Dn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}function qn(t){if(t instanceof Kn)return new Kn(t.h,t.s,t.l,t.opacity);t instanceof In||(t=Sn(t));var n=t.r/255,e=t.g/255,i=t.b/255,r=(Fr*i+Ur*n-Jr*e)/(Fr+Ur-Jr),o=i-r,s=(Kr*(e-r)-qr*o)/Vr,a=Math.sqrt(s*s+o*o)/(Kr*r*(1-r)),u=a?Math.atan2(s,o)*Wr-120:NaN;return new Kn(u<0?u+360:u,a,r,t.opacity)}function Vn(t,n,e,i){return 1===arguments.length?qn(t):new Kn(t,n,e,null==i?1:i)}function Kn(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Un(t){return function(){return t}}function Jn(t,n){return function(e){return t+e*n}}function Fn(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}function $n(t){return 1==(t=+t)?Qn:function(n,e){return e-n?Fn(n,e,t):Un(isNaN(n)?e:n)}}function Qn(t,n){var e=n-t;return e?Jn(t,e):Un(isNaN(t)?n:t)}function te(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function ne(t){return function(){return t}}function ee(t){return function(n){return t(n)+""}}function ie(t,n){var e,i,r,o=io.lastIndex=ro.lastIndex=0,s=-1,a=[],u=[];for(t+="",n+="";(e=io.exec(t))&&(i=ro.exec(n));)(r=i.index)>o&&(r=n.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(e=e[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:te(e,i)})),o=ro.lastIndex;return o<n.length&&(r=n.slice(o),a[s]?a[s]+=r:a[++s]=r),a.length<2?u[0]?ee(u[0].x):ne(n):(n=u.length,function(t){for(var e,i=0;i<n;++i)a[(e=u[i]).i]=e.x(t);return a.join("")})}function re(t,n,e,i,r,o){var s,a,u;return(s=Math.sqrt(t*t+n*n))&&(t/=s,n/=s),(u=t*e+n*i)&&(e-=t*u,i-=n*u),(a=Math.sqrt(e*e+i*i))&&(e/=a,i/=a,u/=a),t*i<n*e&&(t=-t,n=-n,u=-u,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(n,t)*oo,skewX:Math.atan(u)*oo,scaleX:s,scaleY:a}}function oe(t){return"none"===t?so:($r||($r=document.createElement("DIV"),Qr=document.documentElement,to=document.defaultView),$r.style.transform=t,t=to.getComputedStyle(Qr.appendChild($r),null).getPropertyValue("transform"),Qr.removeChild($r),t=t.slice(7,-1).split(","),re(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function se(t){return null==t?so:(no||(no=document.createElementNS("http://www.w3.org/2000/svg","g")),no.setAttribute("transform",t),(t=no.transform.baseVal.consolidate())?(t=t.matrix,re(t.a,t.b,t.c,t.d,t.e,t.f)):so)}function ae(t,n,e,i){function r(t){return t.length?t.pop()+" ":""}function o(t,i,r,o,s,a){if(t!==r||i!==o){var u=s.push("translate(",null,n,null,e);a.push({i:u-4,x:te(t,r)},{i:u-2,x:te(i,o)})}else(r||o)&&s.push("translate("+r+n+o+e)}function s(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(r(e)+"rotate(",null,i)-2,x:te(t,n)})):n&&e.push(r(e)+"rotate("+n+i)}function a(t,n,e,o){t!==n?o.push({i:e.push(r(e)+"skewX(",null,i)-2,x:te(t,n)}):n&&e.push(r(e)+"skewX("+n+i)}function u(t,n,e,i,o,s){if(t!==e||n!==i){var a=o.push(r(o)+"scale(",null,",",null,")");s.push({i:a-4,x:te(t,e)},{i:a-2,x:te(n,i)})}else 1===e&&1===i||o.push(r(o)+"scale("+e+","+i+")")}return function(n,e){var i=[],r=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,i,r),s(n.rotate,e.rotate,i,r),a(n.skewX,e.skewX,i,r),u(n.scaleX,n.scaleY,e.scaleX,e.scaleY,i,r),n=e=null,function(t){for(var n,e=-1,o=r.length;++e<o;)i[(n=r[e]).i]=n.x(t);return i.join("")}}}function ue(t,n){var e,i;return function(){var r=hn(this,t),o=r.tween;if(o!==e){i=e=o;for(var s=0,a=i.length;s<a;++s)if(i[s].name===n){i=i.slice(),i.splice(s,1);break}}r.tween=i}}function le(t,n,e){var i,r;if("function"!=typeof e)throw new Error;return function(){var o=hn(this,t),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:n,value:e},u=0,l=r.length;u<l;++u)if(r[u].name===n){r[u]=a;break}u===l&&r.push(a)}o.tween=r}}function he(t,n){var e=this._id;if(t+="",arguments.length<2){for(var i,r=cn(this.node(),e).tween,o=0,s=r.length;o<s;++o)if((i=r[o]).name===t)return i.value;return null}return this.each((null==n?ue:le)(e,t,n))}function ce(t,n,e){var i=t._id;return t.each(function(){var t=hn(this,i);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return cn(t,i).value[n]}}function de(t,n){var e;return("number"==typeof n?te:n instanceof bn?eo:(e=bn(n))?(n=e,eo):ie)(t,n)}function fe(t){return function(){this.removeAttribute(t)}}function pe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _e(t,n,e){var i,r,o=e+"";return function(){var s=this.getAttribute(t);return s===o?null:s===i?r:r=n(i=s,e)}}function ge(t,n,e){var i,r,o=e+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===o?null:s===i?r:r=n(i=s,e)}}function we(t,n,e){var i,r,o;return function(){var s,a,u=e(this);return null==u?void this.removeAttribute(t):(s=this.getAttribute(t),a=u+"",s===a?null:s===i&&a===r?o:(r=a,o=n(i=s,u)))}}function ve(t,n,e){var i,r,o;return function(){var s,a,u=e(this);return null==u?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),a=u+"",s===a?null:s===i&&a===r?o:(r=a,o=n(i=s,u)))}}function ye(n,e){var i=t(n),r="transform"===i?uo:de;return this.attrTween(n,"function"==typeof e?(i.local?ve:we)(i,r,ce(this,"attr."+n,e)):null==e?(i.local?pe:fe)(i):(i.local?ge:_e)(i,r,e))}function me(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function be(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function xe(t,n){function e(){var e=n.apply(this,arguments);return e!==r&&(i=(r=e)&&be(t,e)),i}var i,r;return e._value=n,e}function ke(t,n){function e(){var e=n.apply(this,arguments);return e!==r&&(i=(r=e)&&me(t,e)),i}var i,r;return e._value=n,e}function Se(n,e){var i="attr."+n;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;var r=t(n);return this.tween(i,(r.local?xe:ke)(r,e))}function Ee(t,n){return function(){ln(this,t).delay=+n.apply(this,arguments)}}function Ie(t,n){return n=+n,function(){ln(this,t).delay=n}}function Ae(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Ee:Ie)(n,t)):cn(this.node(),n).delay}function Ne(t,n){return function(){hn(this,t).duration=+n.apply(this,arguments)}}function Me(t,n){return n=+n,function(){hn(this,t).duration=n}}function Ce(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Ne:Me)(n,t)):cn(this.node(),n).duration}function Pe(t,n){if("function"!=typeof n)throw new Error;return function(){hn(this,t).ease=n}}function Be(t){var n=this._id;return arguments.length?this.each(Pe(n,t)):cn(this.node(),n).ease}function Re(t){"function"!=typeof t&&(t=h(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,s=n[r],a=s.length,u=i[r]=[],l=0;l<a;++l)(o=s[l])&&t.call(o,o.__data__,l,s)&&u.push(o);return new si(i,this._parents,this._name,this._id)}function Te(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,i=n.length,r=e.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var u,l=n[a],h=e[a],c=l.length,d=s[a]=new Array(c),f=0;f<c;++f)(u=l[f]||h[f])&&(d[f]=u);for(;a<i;++a)s[a]=n[a];return new si(s,this._parents,this._name,this._id)}function ze(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}function We(t,n,e){var i,r,o=ze(n)?ln:hn;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}function De(t,n){var e=this._id;return arguments.length<2?cn(this.node(),e).on.on(t):this.each(We(e,t,n))}function je(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Le(){return this.on("end.remove",je(this._id))}function Oe(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=o(t));for(var i=this._groups,r=i.length,s=new Array(r),a=0;a<r;++a)for(var u,l,h=i[a],c=h.length,d=s[a]=new Array(c),f=0;f<c;++f)(u=h[f])&&(l=t.call(u,u.__data__,f,h))&&("__data__"in u&&(l.__data__=u.__data__),d[f]=l,un(d[f],n,e,f,d,cn(u,e)));return new si(s,this._parents,n,e)}function Ze(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=u(t));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var l,h=i[a],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var f,p=t.call(l,l.__data__,d,h),_=cn(l,e),g=0,w=p.length;g<w;++g)(f=p[g])&&un(f,n,e,g,p,_);o.push(p),s.push(l)}return new si(o,s,n,e)}function He(){return new lo(this._groups,this._parents)}function Ge(t,n){var e,i,r;return function(){var o=G(this,t),s=(this.style.removeProperty(t),G(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}function Xe(t){return function(){this.style.removeProperty(t)}}function Ye(t,n,e){var i,r,o=e+"";return function(){var s=G(this,t);return s===o?null:s===i?r:r=n(i=s,e)}}function qe(t,n,e){var i,r,o;return function(){var s=G(this,t),a=e(this),u=a+"";return null==a&&(this.style.removeProperty(t),u=a=G(this,t)),s===u?null:s===i&&u===r?o:(r=u,o=n(i=s,a))}}function Ve(t,n){var e,i,r,o,s="style."+n,a="end."+s;return function(){var u=hn(this,t),l=u.on,h=null==u.value[s]?o||(o=Xe(n)):void 0;l===e&&r===h||(i=(e=l).copy()).on(a,r=h),u.on=i}}function Ke(t,n,e){var i="transform"==(t+="")?ao:de;return null==n?this.styleTween(t,Ge(t,i)).on("end.style."+t,Xe(t)):"function"==typeof n?this.styleTween(t,qe(t,i,ce(this,"style."+t,n))).each(Ve(this._id,t)):this.styleTween(t,Ye(t,i,n),e).on("end.style."+t,null)}function Ue(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}function Je(t,n,e){function i(){var i=n.apply(this,arguments);return i!==o&&(r=(o=i)&&Ue(t,i,e)),r}var r,o;return i._value=n,i}function Fe(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,Je(t,n,null==e?"":e))}function $e(t){return function(){this.textContent=t}}function Qe(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function ti(t){return this.tween("text","function"==typeof t?Qe(ce(this,"text",t)):$e(null==t?"":t+""))}function ni(t){return function(n){this.textContent=t.call(this,n)}}function ei(t){function n(){var n=t.apply(this,arguments);return n!==i&&(e=(i=n)&&ni(n)),e}var e,i;return n._value=t,n}function ii(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,ei(t))}function ri(){for(var t=this._name,n=this._id,e=ui(),i=this._groups,r=i.length,o=0;o<r;++o)for(var s,a=i[o],u=a.length,l=0;l<u;++l)if(s=a[l]){var h=cn(s,n);un(s,t,e,l,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new si(i,this._parents,t,e)}function oi(){var t,n,e=this,i=e._id,r=e.size();return new Promise(function(o,s){var a={value:s},u={value:function(){0==--r&&o()}};e.each(function(){var e=hn(this,i),r=e.on;r!==t&&(n=(t=r).copy(),n._.cancel.push(a),n._.interrupt.push(a),n._.end.push(u)),e.on=n})})}function si(t,n,e,i){this._groups=t,this._parents=n,this._name=e,this._id=i}function ai(t){return zt().transition(t)}function ui(){return++ho}function li(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function hi(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return fo.time=Ft(),fo;return e}function ci(t){var n,e;t instanceof si?(n=t._id,t=t._name):(n=ui(),(e=fo).time=Ft(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var s,a=i[o],u=a.length,l=0;l<u;++l)(s=a[l])&&un(s,t,n,l,a,e||hi(s,n));return new si(i,this._parents,t,n)}function di(t,n){return void 0===t?n:t}var fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")},_i=function(){function t(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(n,e,i){return e&&t(n.prototype,e),i&&t(n,i),n}}(),gi=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},wi=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];pi(this,t),this._handlers=n.reduce(function(t,n){return t[n]=[],t},{})}return _i(t,[{key:"on",value:function(t,n){var e=this;if(!(t in this._handlers))throw"No such event: "+t;return this._handlers[t].push(n),{destroy:function(){e.off(t,n)}}}},{key:"off",value:function(t,n){if(!(t in this._handlers))throw"No such event: "+t;if(n){var e=this._handlers[t],i=e.indexOf(n);-1!=i&&e.splice(i,1)}else this._handlers[t]=[];return this}},{key:"fire",
value:function(t){if(!(t in this._handlers))throw"No such event: "+t;for(var n=this._handlers[t],e=arguments.length,i=Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];for(var o=0;o<n.length;o++)n[o].apply(this,i);return this}},{key:"destroy",value:function(){return this._handlers=null,this}}]),t}(),vi="#343A3D",yi=.5,mi=200,bi="Next",xi="",ki=400,Si=50,Ei=function(t,n){if("undefined"==typeof document)return n;t=t||"";var e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");return i.type="text/css",e.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t)),n}("._svg_13lgt_7 {\n    position:absolute;\n    top:0;\n    left:0;\n    display: none;\n    z-index:10;\n}\n\n._bg_13lgt_15 {\n\n}\n\n._mask_13lgt_19 {\n\n}\n\n._window_13lgt_23 {\n    display: none;\n    position:absolute;\n    z-index:11;\n    padding-bottom:90px;\n    border-radius: 5px;\n    background-color: #ffffff;\n    box-shadow: 0 15px 20px 0 rgba(0, 0, 0, .2);\n    font-family: Roboto;\n    overflow: hidden;\n}\n\n._window-next-btn_13lgt_35 {\n    display: block;\n    position: absolute;\n    right:30px;\n    text-align: left;\n    bottom:30px;\n    padding:6px 15px 6px 15px;\n    text-transform: uppercase;\n    cursor: pointer;\n    box-sizing: border-box;\n    border-radius: 5px;\n    font-size: 10px;\n    background-color:white;\n    font-weight: bold;\n    letter-spacing: 1px;\n    -webkit-user-select: none;\n       -moz-user-select: none;\n        -ms-user-select: none;\n            user-select: none;\n    color:#49ace2;\n    border:solid 2px #49ace2    \n}\n\n._window-next-btn_13lgt_35 span {\n    font-weight:bold;\n}\n\n._window-next-btn_13lgt_35 ._window-btn-icon_13lgt_58 {\n    font-size:19px;\n    position:absolute;\n    display:none;\n    right:15px;\n    top:5px;\n}\n\n._window-next-btn-hover_13lgt_67 {\n    color:white;\n    background-color:#49ace2;\n}\n\n._window-button-has-next_13lgt_72 {\n    padding: 6px 50px 6px 15px\n}\n\n._window-button-has-next_13lgt_72 ._window-btn-icon_13lgt_58 {\n    display:block;\n}\n\n._window-prev-btn_13lgt_80 {\n    display: none;\n    position: absolute;\n    left:30px;\n    bottom:30px;\n    text-transform: uppercase;\n    padding:5px 0px;\n    color:#cacaca;\n    pointer-events: none;\n    cursor: default\n}\n\n._window-prev-btn_13lgt_80 >._window-btn-icon_13lgt_58 {\n    font-size:19px;\n}\n\n._window-title_13lgt_96 {\n    position:relative;\n    margin-top:25px;\n    margin-left:30px;\n    font-size: 16px;\n    font-weight: bold;\n}\n\n._window-body_13lgt_104 {\n    position:relative;\n    margin-top:19px;\n    margin-left:30px;\n    margin-right: 30px;\n    font-size: 12px;\n    line-height: 1.5;\n}\n\n._window-button-has-prev_13lgt_113 {\n    color:#cacaca;\n    display: block;\n    pointer-events: all;\n    cursor: pointer;\n}\n\n._window-button-has-prev_13lgt_113:hover {\n    color:#49ace2;\n}\n\n._arrow_13lgt_124 {\n    position: absolute;\n    z-index:11;\n    visibility: hidden;\n    width:71px;\n    top:0px;\n    left:0px;\n    height: 63px;\n    background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNzFweCIgaGVpZ2h0PSI2M3B4IiB2aWV3Qm94PSIwIDAgNzEgNjMiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQzLjIgKDM5MDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5Hcm91cCAyPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj4KICAgICAgICA8ZyBpZD0iM18xX0ZJTFRSWSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTc5MC4wMDAwMDAsIC03Ni4wMDAwMDApIiBzdHJva2U9IiNGRkZGRkYiIHN0cm9rZS13aWR0aD0iMyI+CiAgICAgICAgICAgIDxnIGlkPSJJTkZPIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0MzEuNTEzNzY1LCA3OC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNTkuNDg2MjM1LCAwLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLjQ4NjIzNTI1LDU5IEM0LjI2OTE5MTY5LDIwLjI5MzE0OCAyNC42Nzk1NDEyLDYuMDEyNzE4NjEgNjAsNi4wMTI3MTg2MSIgaWQ9IlBhdGgtMiIgc3Ryb2tlLWRhc2hhcnJheT0iMSw3Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlsaW5lIGlkPSJQYXRoLTMiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHBvaW50cz0iNjIgMS40MjEwODU0N2UtMTQgNjguNDg5MTgyNyA1Ljg3MDc3NzgyIDYyLjM0ODc4ODMgMTEuODUyNTczNSI+PC9wb2x5bGluZT4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+');\n}\n\n._constrained_13lgt_135 + ._arrow_13lgt_124 {\n    display: none !important;\n}\n\n._arrow-right-top_13lgt_139 {\n    transform: rotate(0deg);\n    margin-left: -20px;\n    margin-top: -8px;\n}\n\n._arrow-right-bottom_13lgt_145 {\n    transform: scaleY(-1);\n    margin-left: -20px;\n    margin-top: 8px;\n}\n\n._arrow-left-top_13lgt_151 {\n    transform: rotate(-90deg);\n    margin-left: -8px;\n    margin-top: 20px;\n}\n\n._arrow-left-bottom_13lgt_157 {\n    margin-left: -8px;\n    margin-top: -20px;\n    transform: scaleY(-1) rotate(-90deg);\n}\n\n._window-right-top_13lgt_163 {\n    \n}\n\n._window-close_13lgt_167 {\n    position:absolute;\n    right:30px;\n    top:25px;\n    font-size: 18px;\n    width:15px;\n    height:15px;\n    color:#cacaca;\n    cursor: pointer;\n}\n\n._window-close_13lgt_167:hover {\n    color:black;\n}\n\n._window-progress-ct_13lgt_182 {\n    background-color:#49ace2;\n    height: 5px;\n    left: 0px;\n    top: 0px;\n    overflow: hidden;\n    width:0px;\n    position: absolute;\n}\n\n._window-progress-step_13lgt_192 {\n    position: relative;\n    height:5px;\n    border-right:2px solid white;\n    background-color: transparent;\n    float:left;\n}\n",{svg:"_svg_13lgt_7",bg:"_bg_13lgt_15","-webkit-mask":"_mask_13lgt_19",mask:"_mask_13lgt_19",window:"_window_13lgt_23","window-next-btn":"_window-next-btn_13lgt_35","window-btn-icon":"_window-btn-icon_13lgt_58","window-next-btn-hover":"_window-next-btn-hover_13lgt_67","window-button-has-next":"_window-button-has-next_13lgt_72","window-prev-btn":"_window-prev-btn_13lgt_80","window-title":"_window-title_13lgt_96","window-body":"_window-body_13lgt_104","window-button-has-prev":"_window-button-has-prev_13lgt_113",arrow:"_arrow_13lgt_124",constrained:"_constrained_13lgt_135","arrow-right-top":"_arrow-right-top_13lgt_139","arrow-right-bottom":"_arrow-right-bottom_13lgt_145","arrow-left-top":"_arrow-left-top_13lgt_151","arrow-left-bottom":"_arrow-left-bottom_13lgt_157","window-right-top":"_window-right-top_13lgt_163","window-close":"_window-close_13lgt_167","window-progress-ct":"_window-progress-ct_13lgt_182","window-progress-step":"_window-progress-step_13lgt_192"}),Ii="http://www.w3.org/1999/xhtml",Ai={svg:"http://www.w3.org/2000/svg",xhtml:Ii,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};p.prototype={constructor:p,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Ni="$";J.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Mi={},Ci=null;if("undefined"!=typeof document){"onmouseenter"in document.documentElement||(Mi={mouseenter:"mouseover",mouseleave:"mouseout"})}var Pi=[null];Tt.prototype=zt.prototype={constructor:Tt,select:s,selectAll:l,filter:c,data:v,enter:f,exit:y,join:m,merge:b,order:x,sort:k,call:E,nodes:I,node:A,size:N,empty:M,each:C,attr:D,style:H,property:V,classed:et,text:st,html:ht,raise:dt,lower:pt,append:_t,insert:wt,remove:yt,clone:xt,datum:kt,on:Mt,dispatch:Rt};var Bi="object"==("undefined"==typeof global?"undefined":fi(global))&&global&&global.Object===Object&&global,Ri="object"==("undefined"==typeof self?"undefined":fi(self))&&self&&self.Object===Object&&self,Ti=Bi||Ri||Function("return this")(),zi=function(){return Ti.Date.now()},Wi=Ti.Symbol,Di=Object.prototype,ji=Di.hasOwnProperty,Li=Di.toString,Oi=Wi?Wi.toStringTag:void 0,Zi=Object.prototype,Hi=Zi.toString,Gi="[object Null]",Xi="[object Undefined]",Yi=Wi?Wi.toStringTag:void 0,qi="[object Symbol]",Vi=NaN,Ki=/^\s+|\s+$/g,Ui=/^[-+]0x[0-9a-f]+$/i,Ji=/^0b[01]+$/i,Fi=/^0o[0-7]+$/i,$i=parseInt,Qi="Expected a function",tr=Math.max,nr=Math.min,er=function(){function t(n,e){pi(this,t),this._options=n,this._containerEl=null,this._svgEl=null,this._stepElements=[],this._rendered=!1,this._model=e,this._onStartBinding=this._model.on("start",this._onStart.bind(this)),this._onStepBinding=this._model.on("step",this._onStep.bind(this)),this._onStopBinding=this._model.on("stop",this._onStop.bind(this))}return _i(t,[{key:"isRendered",value:function(){return this._rendered}},{key:"render",value:function(t){return this._containerEl=Wt(t||document.body),this._renderMask(),this._rendered=!0,this}},{key:"_getViewSize",value:function(){return{width:Math.max(document.documentElement.offsetWidth,document.documentElement.clientWidth),height:Math.max(document.documentElement.offsetHeight,document.documentElement.clientHeight)}}},{key:"_renderMask",value:function(){var t=this,n=this._getViewSize();this._svgEl=this._containerEl.append("svg").attr("class",Ei.svg).attr("width",n.width).attr("height",n.height),this._defsEl=this._svgEl.append("defs"),this._maskEl=this._defsEl.append("mask").attr("class",Ei.mask).attr("id","onboarding-mask").attr("width","100%").attr("height","100%").attr("x",0).attr("y",0),this._maskBg=this._maskEl.append("rect").attr("class",Ei.bg).attr("x",0).attr("y",0).attr("width","100%").attr("height","100%").attr("fill","white"),this._bgEl=this._svgEl.append("rect").attr("class",Ei.bg).attr("width","100%").attr("height","100%").attr("x",0).attr("y",0).attr("mask","url(#onboarding-mask)").attr("fill",this._options.fillColor).attr("fill-opacity",this._options.fillOpacity),this._onWindowResize=Yt(function(){var n=t._getViewSize();t._svgEl.attr("width",n.width),t._svgEl.attr("height",n.height),t._step&&t._onStep(t._step)},Si),window.addEventListener("resize",this._onWindowResize)}},{key:"_clearSteps",value:function(){this._stepElements.forEach(function(t){return t.remove()})}},{key:"_renderStep",value:function(t){var n=this;if(t.selector){Dt(t.selector).nodes().forEach(function(e){n._stepElements.push(n._renderStepElement(e,t))})}}},{key:"_renderStepElement",value:function(t,n){var e=n.shape||{type:"rectangle"};return"path"==t.tagName?this._renderPathMask(t,n):"circle"==e.type?this._renderCircleMask(t,n):this._renderRectangleMask(t,n)}},{key:"_getBorderRadius",value:function(t){return parseFloat(window.getComputedStyle(t,null).getPropertyValue("border-top-left-radius"))}},{key:"_getBox",value:function(t){var n=t.getBoundingClientRect();return{top:n.top+ +document.body.scrollTop,left:n.left+ +document.body.scrollLeft,width:n.width,height:n.height}}},{key:"_renderRectangleMask",value:function(t,n){var e=this._getBox(t),i=this._getBorderRadius(t),r=n.shape||{},o=r.offset||[0,0];return n.shape&&n.shape.radius&&(i=n.shape.radius),this._maskEl.append("rect").attr("fill","black").attr("x",e.left+o[0]).attr("y",e.top+o[1]).attr("rx",i).attr("ry",i).attr("width",r.width||e.width).attr("fill-opacity",1).attr("stroke-opacity",1).attr("stroke-width",r.strokeWidth||0).attr("stroke","black").attr("height",r.height||e.height)}},{key:"_renderCircleMask",value:function(t,n){var e=this._getBox(t),i=e.left+e.width/2,r=e.top+e.height/2,o=n.shape||{},s=o.offset||[0,0];return this._maskEl.append("circle").attr("r",n.shape.radius||e.width/2).attr("fill","black").attr("fill-opacity",1).attr("stroke-width",o.strokeWidth||0).attr("stroke-opacity",1).attr("stroke","black").attr("cx",i+s[0]).attr("cy",r+s[1])}},{key:"_renderPathMask",value:function(t,n){for(var e=t.parentElement;e&&"svg"!=e.tagName;)e=e.parentElement;var i=this._getBox(e);return this._maskEl.append("g").attr("transform","translate("+i.left+", "+i.top+")").append("path").attr("fill","black").attr("fill-opacity",1).attr("stroke-width",n.shape?n.shape.strokeWidth||0:0).attr("stroke","black").attr("d",Wt(t).attr("d"))}},{key:"_onStart",value:function(){this._svgEl.style("display","block")}},{key:"_onStep",value:function(t){this._step=t,this._clearSteps(),this._renderStep(t)}},{key:"_onStop",value:function(){this._step=null,this._svgEl.style("display","none")}},{key:"destroy",value:function(){return this._rendered&&(window.removeEventListener("resize",this._onWindowResize),this._svgEl.remove()),this._clearSteps(),this._step=null,this._onStartBinding.destroy(),this._onStepBinding.destroy(),this._onStopBinding.destroy(),this}}]),t}(),ir={value:function(){}};Vt.prototype=qt.prototype={constructor:Vt,on:function(t,n){var e,i=this._,r=Kt(t+"",i),o=-1,s=r.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<s;)if(e=(t=r[o]).type)i[e]=Jt(i[e],t.name,n);else if(null==n)for(e in i)i[e]=Jt(i[e],t.name,null);return this}for(;++o<s;)if((e=(t=r[o]).type)&&(e=Ut(i[e],t.name)))return e}},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new Vt(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,i,r=new Array(e),o=0;o<e;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],o=0,e=i.length;o<e;++o)i[o].value.apply(n,r)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(n,e)}};var rr,or,sr=0,ar=0,ur=0,lr=1e3,hr=0,cr=0,dr=0,fr="object"===("undefined"==typeof performance?"undefined":fi(performance))&&performance.now?performance:Date,pr="object"===("undefined"==typeof window?"undefined":fi(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};Qt.prototype=tn.prototype={constructor:Qt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Ft():+e)+(null==n?0:+n),this._next||or===this||(or?or._next=this:rr=this,or=this),this._call=t,this._time=e,sn()},stop:function(){this._call&&(this._call=null,this._time=1/0,sn())}};var _r=qt("start","end","cancel","interrupt"),gr=[],wr=0,vr=1,yr=2,mr=3,br=4,xr=5,kr=6,Sr="\\s*([+-]?\\d+)\\s*",Er="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ir="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ar=/^#([0-9a-f]{3,8})$/,Nr=new RegExp("^rgb\\("+[Sr,Sr,Sr]+"\\)$"),Mr=new RegExp("^rgb\\("+[Ir,Ir,Ir]+"\\)$"),Cr=new RegExp("^rgba\\("+[Sr,Sr,Sr,Er]+"\\)$"),Pr=new RegExp("^rgba\\("+[Ir,Ir,Ir,Er]+"\\)$"),Br=new RegExp("^hsl\\("+[Er,Ir,Ir]+"\\)$"),Rr=new RegExp("^hsla\\("+[Er,Ir,Ir,Er]+"\\)$"),Tr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_n(wn,bn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:vn,formatHex:vn,formatHsl:yn,formatRgb:mn,toString:mn}),_n(In,En,gn(wn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new In(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new In(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:An,formatHex:An,formatRgb:Nn,toString:Nn})),_n(Rn,Bn,gn(wn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new In(Tn(t>=240?t-240:t+120,r,i),Tn(t,r,i),Tn(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var zr=Math.PI/180,Wr=180/Math.PI,Dr=.96422,jr=1,Lr=.82521,Or=4/29,Zr=6/29,Hr=3*Zr*Zr,Gr=Zr*Zr*Zr;_n(Dn,Wn,gn(wn,{brighter:function(t){return new Dn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Dn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return n=Dr*Ln(n),t=jr*Ln(t),e=Lr*Ln(e),new In(On(3.1338561*n-1.6168667*t-.4906146*e),On(-.9787684*n+1.9161415*t+.033454*e),On(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),_n(Xn,Gn,gn(wn,{brighter:function(t){return new Xn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Xn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Yn(this).rgb()}}));var Xr=-.14861,Yr=1.78277,qr=-.29227,Vr=-.90649,Kr=1.97294,Ur=Kr*Vr,Jr=Kr*Yr,Fr=Yr*qr-Vr*Xr;_n(Kn,Vn,gn(wn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Kn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Kn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*zr,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),i=Math.cos(t),r=Math.sin(t);return new In(255*(n+e*(Xr*i+Yr*r)),255*(n+e*(qr*i+Vr*r)),255*(n+e*(Kr*i)),this.opacity)}}));var $r,Qr,to,no,eo=function t(n){function e(t,n){var e=i((t=En(t)).r,(n=En(n)).r),r=i(t.g,n.g),o=i(t.b,n.b),s=Qn(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=r(n),t.b=o(n),t.opacity=s(n),t+""}}var i=$n(n);return e.gamma=t,e}(1),io=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ro=new RegExp(io.source,"g"),oo=180/Math.PI,so={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ao=ae(oe,"px, ","px)","deg)"),uo=ae(se,", ",")",")"),lo=(Math.SQRT2,zt.prototype.constructor),ho=0,co=zt.prototype;si.prototype=ai.prototype={constructor:si,select:Oe,selectAll:Ze,filter:Re,merge:Te,selection:He,transition:ri,call:co.call,nodes:co.nodes,node:co.node,size:co.size,empty:co.empty,each:co.each,on:De,attr:ye,attrTween:Se,style:Ke,styleTween:Fe,text:ti,textTween:ii,remove:Le,tween:he,delay:Ae,duration:Ce,ease:Be,end:oi};var fo=(Math.PI,Math.PI,{time:null,delay:0,duration:250,ease:li});zt.prototype.interrupt=pn,zt.prototype.transition=ci;var po=function(t){if(!t)return null;var n=t.getBoundingClientRect();return{top:n.top+document.body.scrollTop,left:n.left+document.body.scrollLeft,right:n.left+document.body.scrollTop+n.width,bottom:n.top+document.body.scrollTop+n.height,width:n.width,height:n.height}},_o=function(t){var n=t.map(function(t){return po(t)}),e={top:Math.min.apply(Math,n.map(function(t){return t.top})),left:Math.min.apply(Math,n.map(function(t){return t.left})),right:Math.max.apply(Math,n.map(function(t){return t.right})),bottom:Math.max.apply(Math,n.map(function(t){return t.bottom}))};return e.width=e.right-e.left,e.height=e.bottom-e.top,e},go=function(t){var n=t.nodes();return n[0]&&"path"==n[0].tagName?_o(n):po(n[0])},wo=function(){function t(){pi(this,t)}return _i(t,[{key:"getWindowPosition",value:function(t,n,e){var i=this._getTargetPosition(t,e),r=this._getLeftWindowPosition(i,t,e,n),o=this._getTopWindowPosition(i,t,e,n);return this._getConstrainedWindowPosition({position:i,left:r,top:o},n)}},{key:"_getConstrainedWindowPosition",value:function(t,n){var e=po(document.body),i=e.bottom-n.height-5,r=t.top>i&&t.top<5;return gi({},t,{constrained:r,top:Math.max(5,Math.min(i,t.top))})}},{key:"getArrowPosition",value:function(t,n){var e=this._getTargetPosition(t,n);return{position:e,left:this._getLeftArrowPosition(e,t,n),top:this._getTopArrowPosition(e,t,n)}}},{key:"_getLeftWindowPosition",value:function(t,n,e,i){return{"left-top":n.left+n.width/2+e.width,"right-top":n.left-e.width-i.width,"left-bottom":n.left+n.width/2+e.width,"right-bottom":n.left-i.width-e.width}[t]}},{key:"_getTopWindowPosition",value:function(t,n,e,i){var r=25;return n.height<50&&(r=n.height/2),{"left-top":n.top+n.height+e.height,"right-top":n.top+r+e.height,"left-bottom":n.top-i.height-e.height,"right-bottom":n.top-i.height-e.height+r}[t]}},{key:"_getLeftArrowPosition",value:function(t,n,e){return{"left-top":n.left+n.width/2,"right-top":n.left-e.width,"left-bottom":n.left+n.width/2,"right-bottom":n.left-e.width}[t]}},{key:"_getTopArrowPosition",value:function(t,n,e){var i=25;return n.height<50&&(i=n.height/2),{"left-top":n.top+n.height,"right-top":n.top+i,"left-bottom":n.top-e.height,"right-bottom":n.top-e.height+i}[t]}},{key:"_getTargetPosition",value:function(t){var n=[t.left,t.top],e=[.5*document.documentElement.clientWidth,.5*document.documentElement.clientHeight],i=["left","top"];return["right","bottom"].forEach(function(t,r){n[r]>e[r]&&(i[r]=t)}),i.join("-")}}]),t}(),vo=function(){function t(n,e){var i=this;pi(this,t),this._options=n,this._containerEl=null,this._rendered=!1,this._model=e,this._onStartBinding=this._model.on("start",this._onStart.bind(this)),this._onStepBinding=this._model.on("step",this._onStep.bind(this)),this._onStopBinding=this._model.on("stop",this._onStop.bind(this)),this._positionResolver=new wo,this._onWindowResize=Yt(function(){i._step&&i._onStep(i._step)},Si),window.addEventListener("resize",this._onWindowResize)}return _i(t,[{key:"getArrowBox",value:function(){return this._arrowBox}},{key:"isRendered",value:function(){return this._rendered}},{key:"render",value:function(t){return this._containerEl=Wt(t||document.body),this._renderArrow(),this._rendered=!0,this}},{key:"_renderArrow",value:function(){this._arrowEl=this._containerEl.append("div").attr("class",Ei.arrow+" "+Ei["arrow-bottom-right"]),this._arrowBox=po(this._arrowEl.node())}},{key:"_onStart",value:function(){this._arrowEl.style("display","block")}},{key:"_onStep",value:function(t){if(!t.selector)return void this._arrowEl.style("visibility","hidden");this._arrowEl.style("visibility","visible"),this._step=t;var n=Dt(t.selector),e=go(n);if(!e)return void this._arrowEl.style("display","none");var i=this._positionResolver.getArrowPosition(e,this._arrowBox);this._arrowEl.transition().duration(0).style("top",i.top+"px").style("left",i.left+"px"),this._arrowEl.style("opacity",0).transition("2").duration(this._options.animationDuration).style("opacity",1),this._arrowEl.attr("class",Ei.arrow+" "+Ei["arrow-"+i.position])}},{key:"_onStop",value:function(){this._arrowEl.style("display","none"),this._step=null}},{key:"destroy",value:function(){return this._onStartBinding.destroy(),this._onStepBinding.destroy(),this._onStopBinding.destroy(),this._step=null,window.removeEventListener("resize",this._onWindowResize),this._arrowEl&&this._arrowEl.remove(),this}}]),t}(),yo=function(){function t(n,e){pi(this,t),this._options=n,this._containerEl=null,this._rendered=!1,this._model=e,this._steps=e.getSteps().filter(function(t){return!1!==t.showProgress}),this._numOfSteps=this._steps.length,this._onStepBinding=this._model.on("step",this._onStep.bind(this)),this._onStartBinding=this._model.on("start",this._onStart.bind(this)),this._onStopBinding=this._model.on("stop",this._onStop.bind(this))}return _i(t,[{key:"_onStart",value:function(){this._steps=this._model.getSteps().filter(function(t){return!1!==t.showProgress}),this._numOfSteps=this._steps.length,this._renderSteps()}},{key:"_onStop",value:function(){this._progressEl.node().innerHTML=""}},{key:"isRendered",value:function(){return this._rendered}},{key:"render",value:function(t){return this._containerEl=Wt(t),this._renderProgress(),this._renderSteps(),this._rendered=!0,this}},{key:"_renderProgress",value:function(){this._progressEl=this._containerEl.append("div").classed(Ei["window-progress-ct"],!0)}},{key:"_renderSteps",value:function(){var t=this;this._steps.slice(1).forEach(function(){t._progressEl.append("div").classed(Ei["window-progress-step"],!0)})}},{key:"_resizeSteps",value:function(t){var n=this._getStepWidth(t);Dt("."+Ei["window-progress-step"]).transition().duration(this._options.animationDuration).style("width",n+"px")}},{key:"_getStepWidth",value:function(t){return(t.windowWidth||this._options.windowWidth)/this._numOfSteps}},{key:"_getProgressWidth",value:function(t,n){return(n.windowWidth||this._options.windowWidth)*(t+1)/this._numOfSteps}},{key:"_onStep",value:function(t){if(!1===t.showProgress||this._steps.length<2)return void this._progressEl.transition().duration(this._options.animationDuration).style("width","0px");var n=this._steps.indexOf(t),e=this._getProgressWidth(n,t);this._progressEl.transition().duration(this._options.animationDuration).style("width",e+"px"),this._resizeSteps(t)}},{key:"destroy",value:function(){return this._rendered&&this._progressEl.remove(),this._onStartBinding.destroy(),this._onStepBinding.destroy(),this._onStopBinding.destroy(),this}}]),t}(),mo=function(){function t(n,e){var i=this;pi(this,t),this._options=n,this._containerEl=null,this._rendered=!1,this._observable=new wi(["closeClick"]),this._model=e,this._onStartBinding=this._model.on("start",this._onStart.bind(this)),this._onStepBinding=this._model.on("step",this._onStep.bind(this)),this._onStopBinding=this._model.on("stop",this._onStop.bind(this)),this._positionResolver=new wo,this._arrowRenderer=new vo(n,e),this._progressRenderer=new yo(n,e),this._onWindowResize=Yt(function(){i._step&&i._onStep(i._step)},Si),window.addEventListener("resize",this._onWindowResize)}return _i(t,[{key:"isRendered",value:function(){return this._rendered}},{key:"on",value:function(t,n){return this._observable.on(t,n),this}},{key:"off",value:function(t,n){return this._observable.off(t,n),this}},{key:"render",value:function(t){return this._containerEl=Wt(t||document.body),this._renderWindow(),this._arrowRenderer.render(t),this._progressRenderer.render(this._windowEl.node()),this._rendered=!0,this}},{key:"_renderWindow",value:function(){var t=this;this._windowEl=this._containerEl.append("div").attr("class",Ei.window+" "+this._options.windowClassName).style("width",this._options.windowWidth+"px"),this._nextBtnEl=this._windowEl.append("div").on("click",this._onNextClick.bind(this)).attr("class",Ei["window-next-btn"]+" onboard-window-next-btn"),this._nextBtnTextEl=this._nextBtnEl.append("span").attr("class",Ei["window-next-btn-text"]).html(this._options.nextText),this._nextBtnEl.on("mouseover",function(){t._nextBtnEl.classed(Ei["window-next-btn-hover"],!0)}),this._nextBtnEl.on("mouseout",function(){t._nextBtnEl.classed(Ei["window-next-btn-hover"],!1)}),this._nextBtnIconEl=this._nextBtnEl.append("div").attr("class",Ei["window-btn-icon"]+" zmdi zmdi-long-arrow-right"),this._prevBtnEl=this._windowEl.append("div").attr("class",Ei["window-prev-btn"]+" onboard-window-prev-btn").on("click",this._onPrevClick.bind(this)).html(this._options.prevText),this._prevBtnEl.append("div").attr("class",Ei["window-btn-icon"]+" zmdi zmdi-long-arrow-left"),this._titleEl=this._windowEl.append("div").attr("class",Ei["window-title"]+" onboard-window-title"),this._bodyEl=this._windowEl.append("div").attr("class",Ei["window-body"]+" onboard-window-body"),this._closeEl=this._windowEl.append("div").attr("class",Ei["window-close"]+" zmdi zmdi-close").on("click",this._onCloseClick.bind(this))}},{key:"_onCloseClick",value:function(){this._observable.fire("closeClick"),this._model.stop()}},{key:"_onNextClick",value:function(){this._nextBtnEl.classed(Ei["window-next-btn-hover"],!1),this._model.hasNext()?this._model.next():this._model.stop()}},{key:"_onPrevClick",value:function(){this._model.prev()}},{key:"_onStart",value:function(){return this._windowEl.style("display","block"),this}},{key:"_onStep",value:function(t){this._step=t,this._titleEl.html(t.title),this._bodyEl.html(t.text),this._prevBtnEl.classed(Ei["window-button-has-prev"],this._model.hasPrev()),this._nextBtnEl.classed(Ei["window-button-has-next"],this._model.hasNext()),this._nextBtnTextEl.html(t.nextText||this._options.nextText),this._windowEl.attr("class",Ei.window+" "+(t.windowClassName||this._options.windowClassName)),this._windowEl.style("width",(t.windowWidth||this._options.windowWidth)+"px");var n=po(this._windowEl.node());if(!t.selector)return void this._windowEl.style("left","calc(50vw - "+n.width/2+"px").style("top","calc(50vh - "+n.height/2+"px)");var e=Dt(t.selector),i=go(e);if(i){var r=this._positionResolver.getWindowPosition(i,n,this._arrowRenderer.getArrowBox());this._windowEl.style("left",n.left+"px").style("top",n.top+"px").transition().duration(this._options.animationDuration).style("left",r.left+"px").style("top",r.top+"px");return Ei["window-"+r.position]&&this._windowEl.classed(Ei["window-"+r.position],!0),this._windowEl.classed(Ei.constrained,r.constrained),this}}},{key:"_onStop",value:function(){return this._windowEl.style("display","none"),this._step=null,this}},{key:"destroy",value:function(){return this._onStartBinding.destroy(),this._onStepBinding.destroy(),
this._onStopBinding.destroy(),this._step=null,this._rendered&&this._windowEl.remove(),this._progressRenderer.destroy(),this._arrowRenderer.destroy(),window.removeEventListener("resize",this._onWindowResize),this}}]),t}(),bo=function(){function t(n,e){var i=this;pi(this,t),this._options=n,this._containerEl=null,this._rendered=!1,this._model=e,this._maskRenderer=new er(n,e),this._windowRenderer=new mo(n,e),this._observable=new wi(["closeClick"]),this._windowRenderer.on("closeClick",function(){i._observable.fire("closeClick",e._currentStep,e._currentStepIndex)})}return _i(t,[{key:"on",value:function(t,n){return this._observable.on(t,n),this}},{key:"off",value:function(t,n){return this._observable.off(t,n),this}},{key:"isRendered",value:function(){return this._rendered}},{key:"render",value:function(t){return this._containerEl=Wt(t||document.body),this._maskRenderer.render(t),this._windowRenderer.render(t),this._rendered=!0,this}},{key:"destroy",value:function(){return this._maskRenderer.destroy(),this._windowRenderer.destroy(),this}}]),t}(),xo=function(){function t(n){pi(this,t),this._steps=n.steps||[],this._currentStep=null,this._currentStepIndex=-1,this._observable=new wi(["start","stop","step"])}return _i(t,[{key:"getSteps",value:function(){return this._steps}},{key:"start",value:function(t){t&&(this._steps=t),this._currentStepIndex=0,this._currentStep=this._steps[this._currentStepIndex],this._observable.fire("start",this._currentStep,this._currentStepIndex),this._observable.fire("step",this._currentStep,this._currentStepIndex)}},{key:"stop",value:function(){this._observable.fire("stop",this._currentStep,this._currentStepIndex),this._currentStep=null,this._currentStepIndex=-1}},{key:"next",value:function(){if(this.hasNext()){var t=this._currentStep,n=this._currentStepIndex;this._currentStep=this._steps[++this._currentStepIndex],this._observable.fire("step",this._currentStep,this._currentStepIndex,t,n)}}},{key:"prev",value:function(){if(this.hasPrev()){var t=this._currentStep,n=this._currentStepIndex;this._currentStep=this._steps[--this._currentStepIndex],this._observable.fire("step",this._currentStep,this._currentStepIndex,t,n)}}},{key:"hasNext",value:function(){return this._steps.length>this._currentStepIndex+1}},{key:"hasPrev",value:function(){return this._currentStepIndex>0}},{key:"on",value:function(t,n){return this._observable.on(t,n),this}},{key:"off",value:function(t,n){return this._observable.off(t,n),this}},{key:"destroy",value:function(){return this._observable.destroy(),this._currentStep=null,this}}]),t}(),ko=function(){function t(n,e){pi(this,t),this._options=n,this._model=e,this._onStartBinding=this._model.on("start",this._onStart.bind(this)),this._onStopBinding=this._model.on("stop",this._onStop.bind(this))}return _i(t,[{key:"_onStart",value:function(){return Wt(document).on("keydown.onboard",this._onKeyDown.bind(this)),this}},{key:"_onKeyDown",value:function(){if("ArrowLeft"==Ci.key||"Backspace"==Ci.key)this._model.hasPrev()?this._model.prev():this._model.stop();else if("ArrowRight"==Ci.key||"Enter"==Ci.key)this._model.hasNext()?this._model.next():this._model.stop();else{if("Escape"!=Ci.key)return;this._model.stop()}Ci.preventDefault()}},{key:"_onStop",value:function(){return Wt(document).on("keydown.onboard",null),this}},{key:"destroy",value:function(){return this._onStop(),this._onStartBinding.destroy(),this._onStopBinding.destroy(),this}}]),t}();return function(){function t(n){var e=this;pi(this,t),this._options={},this._options.fillColor=di(n.fillColor,vi),this._options.fillOpacity=di(n.fillOpacity,yi),this._options.nextText=di(n.nextText,bi),this._options.windowClassName=di(n.windowClassName,xi),this._options.animationDuration=di(n.animationDuration,mi),this._options.windowWidth=di(n.windowWidth,ki),this._options.steps=n.steps,this._observable=new wi(["start","step","closeClick","stop"]),this._model=new xo(this._options),this._model.on("start",function(t,n){e._observable.fire("start",{step:t,index:n})}),this._model.on("stop",function(t,n){e._observable.fire("stop",{step:t,index:n})}),this._model.on("step",function(t,n,i,r){e._observable.fire("step",{step:t,index:n,lastStep:i,lastIndex:r})}),this._onboardRenderer=new bo(this._options,this._model),this._onboardKeyHandler=new ko(this._options,this._model),this._onboardRenderer.on("closeClick",function(t,n){e._observable.fire("closeClick",{step:t,index:n})}),this.render()}return _i(t,[{key:"on",value:function(t,n){return this._observable.on(t,n),this}},{key:"off",value:function(t,n){return this._observable.off(t,n),this}},{key:"destroy",value:function(){return this._observable.destroy(),this._onboardRenderer.destroy(),this._options=null,this._model.destroy(),this._onboardKeyHandler.destroy(),this}},{key:"render",value:function(t){return this._onboardRenderer.render(t),this}},{key:"start",value:function(t){return this._model.start(t),this}},{key:"stop",value:function(){return this._model.stop(),this}}]),t}()});