Socket
Socket
Sign inDemoInstall

r-onboarding

Package Overview
Dependencies
6
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

45

dist/r-onboarding.es.js

@@ -44,2 +44,7 @@ import require$$0, { createContext, useState, useRef, useEffect, useContext, useLayoutEffect, forwardRef, useImperativeHandle, Fragment } from "react";

}
},
labels: {
previousButton: "Previous",
nextButton: "Next",
finishButton: "Finish"
}

@@ -826,3 +831,3 @@ };

}) {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e, _f, _g;
const {

@@ -839,2 +844,7 @@ path,

} = useSetClassName();
const [buttonLabels, setButtonLabels] = useState({
previous: (_a = defaultROnboardingWrapperOptions.labels) == null ? void 0 : _a.previousButton,
next: (_b = defaultROnboardingWrapperOptions.labels) == null ? void 0 : _b.nextButton,
finish: (_c = defaultROnboardingWrapperOptions.labels) == null ? void 0 : _c.finishButton
});
useEffect(() => {

@@ -860,5 +870,5 @@ beforeStepStart();

const beforeStepStart = async () => {
var _a2, _b2, _c2, _d2, _e;
var _a2, _b2, _c2, _d2, _e2;
await ((_c2 = (_b2 = (_a2 = context.step) == null ? void 0 : _a2.on) == null ? void 0 : _b2.beforeStep) == null ? void 0 : _c2.call(_b2));
const element = useGetElement((_e = (_d2 = context.step) == null ? void 0 : _d2.attachTo) == null ? void 0 : _e.element);
const element = useGetElement((_e2 = (_d2 = context.step) == null ? void 0 : _d2.attachTo) == null ? void 0 : _e2.element);
if (!element || !stepElement.current)

@@ -869,3 +879,3 @@ return;

const attachElement = () => {
var _a2, _b2, _c2, _d2, _e, _f, _g, _h;
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k;
const element = useGetElement((_b2 = (_a2 = context.step) == null ? void 0 : _a2.attachTo) == null ? void 0 : _b2.element);

@@ -875,10 +885,15 @@ if (!element || !stepElement.current)

const mergedOptions = merge({}, context.options, (_c2 = context.step) == null ? void 0 : _c2.options);
setButtonLabels({
previous: (_d2 = mergedOptions == null ? void 0 : mergedOptions.labels) == null ? void 0 : _d2.previousButton,
next: (_e2 = mergedOptions == null ? void 0 : mergedOptions.labels) == null ? void 0 : _e2.nextButton,
finish: (_f2 = mergedOptions == null ? void 0 : mergedOptions.labels) == null ? void 0 : _f2.finishButton
});
createPopper(element, stepElement.current, mergedOptions.popper);
if ((_d2 = mergedOptions == null ? void 0 : mergedOptions.scrollToStep) == null ? void 0 : _d2.enabled) {
element.scrollIntoView((_e = mergedOptions == null ? void 0 : mergedOptions.scrollToStep) == null ? void 0 : _e.options);
if ((_g2 = mergedOptions == null ? void 0 : mergedOptions.scrollToStep) == null ? void 0 : _g2.enabled) {
element.scrollIntoView((_h = mergedOptions == null ? void 0 : mergedOptions.scrollToStep) == null ? void 0 : _h.options);
}
if ((_f = mergedOptions == null ? void 0 : mergedOptions.overlay) == null ? void 0 : _f.enabled) {
if ((_i = mergedOptions == null ? void 0 : mergedOptions.overlay) == null ? void 0 : _i.enabled) {
updatePath(element, {
padding: (_g = mergedOptions == null ? void 0 : mergedOptions.overlay) == null ? void 0 : _g.padding,
borderRadius: (_h = mergedOptions == null ? void 0 : mergedOptions.overlay) == null ? void 0 : _h.borderRadius
padding: (_j = mergedOptions == null ? void 0 : mergedOptions.overlay) == null ? void 0 : _j.padding,
borderRadius: (_k = mergedOptions == null ? void 0 : mergedOptions.overlay) == null ? void 0 : _k.borderRadius
});

@@ -889,5 +904,5 @@ }

const beforeStepEnd = () => {
var _a2, _b2, _c2, _d2, _e;
var _a2, _b2, _c2, _d2, _e2;
(_c2 = (_b2 = (_a2 = context.step) == null ? void 0 : _a2.on) == null ? void 0 : _b2.afterStep) == null ? void 0 : _c2.call(_b2);
unsetTargetElementClassName(useGetElement((_d2 = context == null ? void 0 : context.step) == null ? void 0 : _d2.attachTo.element), (_e = context == null ? void 0 : context.step) == null ? void 0 : _e.attachTo.classList);
unsetTargetElementClassName(useGetElement((_d2 = context == null ? void 0 : context.step) == null ? void 0 : _d2.attachTo.element), (_e2 = context == null ? void 0 : context.step) == null ? void 0 : _e2.attachTo.classList);
};

@@ -921,3 +936,3 @@ return /* @__PURE__ */ jsxs("div", {

className: "r-onboarding-item__header",
children: [((_b = (_a = context == null ? void 0 : context.step) == null ? void 0 : _a.content) == null ? void 0 : _b.title) && /* @__PURE__ */ jsx("span", {
children: [((_e = (_d = context == null ? void 0 : context.step) == null ? void 0 : _d.content) == null ? void 0 : _e.title) && /* @__PURE__ */ jsx("span", {
className: "r-onboarding-item__header-title",

@@ -942,3 +957,3 @@ children: context.step.content.title

})]
}), ((_d = (_c = context == null ? void 0 : context.step) == null ? void 0 : _c.content) == null ? void 0 : _d.description) && /* @__PURE__ */ jsx("p", {
}), ((_g = (_f = context == null ? void 0 : context.step) == null ? void 0 : _f.content) == null ? void 0 : _g.description) && /* @__PURE__ */ jsx("p", {
className: "r-onboarding-item__description",

@@ -952,3 +967,3 @@ children: context.step.content.description

className: "r-onboarding-btn-secondary",
children: "Previous"
children: buttonLabels.previous
}), /* @__PURE__ */ jsx("button", {

@@ -958,3 +973,3 @@ onClick: onNext,

className: "r-onboarding-btn-primary",
children: context.isLastStep ? "Finish" : "Next"
children: context.isLastStep ? buttonLabels.finish : buttonLabels.next
})]

@@ -961,0 +976,0 @@ })]

@@ -1,12 +0,12 @@

(function(E,p){typeof exports=="object"&&typeof module!="undefined"?p(exports,require("react"),require("@popperjs/core")):typeof define=="function"&&define.amd?define(["exports","react","@popperjs/core"],p):(E=typeof globalThis!="undefined"?globalThis:E||self,p(E["r-onboarding"]={},E.react,E.core))})(this,function(E,p,ce){"use strict";function fe(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var le=fe(p);const zt=p.createContext({});function mt(a){return a?typeof a=="string"?document.querySelector(a):typeof a=="function"?a():null:null}function de(){return{setTargetElementClassName:(y,d)=>{!d||!y||y.classList.add(...d)},unsetTargetElementClassName:(y,d)=>{!d||!y||y.classList.remove(...d)}}}const nt={popper:{},overlay:{enabled:!0,padding:0,borderRadius:0},scrollToStep:{enabled:!0,options:{behavior:"smooth",block:"center",inline:"center"}}};function pe(){var P,B,U,D;const[a,v]=p.useState(""),y=p.useRef(null),d=p.useRef((B=(P=nt.overlay)==null?void 0:P.padding)!=null?B:0),l=p.useRef((D=(U=nt.overlay)==null?void 0:U.borderRadius)!=null?D:0),s=()=>{T(y.current,{padding:d.current,borderRadius:l.current})},T=async(R,m=nt.overlay)=>{var N,H,G,V,W,it,at,st,ut,ct,ft,lt;if(!R)return;const{innerWidth:j,innerHeight:I}=window,{left:L,top:A,width:z,height:S}=R.getBoundingClientRect(),o=typeof m.padding=="number"?{top:m.padding,right:m.padding,bottom:m.padding,left:m.padding}:m.padding,i=typeof m.borderRadius=="number"?{leftTop:m.borderRadius,rightTop:m.borderRadius,rightBottom:m.borderRadius,leftBottom:m.borderRadius}:m.borderRadius,u={top:A-((N=o==null?void 0:o.top)!=null?N:0),right:L+z+((H=o==null?void 0:o.right)!=null?H:0),bottom:A+S+((G=o==null?void 0:o.bottom)!=null?G:0),left:L-((V=o==null?void 0:o.left)!=null?V:0)},x={leftTop:`M${u.left+((W=i==null?void 0:i.leftTop)!=null?W:0)},${u.top} Q${u.left},${u.top} ${u.left},${u.top+((it=i==null?void 0:i.leftTop)!=null?it:0)}`,rightTop:`V${u.top+((at=i==null?void 0:i.rightTop)!=null?at:0)} Q${u.right},${u.top} ${u.right-((st=i==null?void 0:i.rightTop)!=null?st:0)},${u.top}`,rightBottom:`H${u.right-((ut=i==null?void 0:i.rightBottom)!=null?ut:0)} Q${u.right},${u.bottom} ${u.right},${u.bottom-((ct=i==null?void 0:i.rightBottom)!=null?ct:0)}`,leftBottom:`V${u.bottom-((ft=i==null?void 0:i.leftBottom)!=null?ft:0)} Q${u.left},${u.bottom} ${u.left+((lt=i==null?void 0:i.leftBottom)!=null?lt:0)},${u.bottom}`};v(`
M${j},${I}
(function(A,d){typeof exports=="object"&&typeof module!="undefined"?d(exports,require("react"),require("@popperjs/core")):typeof define=="function"&&define.amd?define(["exports","react","@popperjs/core"],d):(A=typeof globalThis!="undefined"?globalThis:A||self,d(A["r-onboarding"]={},A.react,A.core))})(this,function(A,d,le){"use strict";function fe(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var de=fe(d);const zt=d.createContext({});function Tt(o){return o?typeof o=="string"?document.querySelector(o):typeof o=="function"?o():null:null}function pe(){return{setTargetElementClassName:(m,p)=>{!p||!m||m.classList.add(...p)},unsetTargetElementClassName:(m,p)=>{!p||!m||m.classList.remove(...p)}}}const Q={popper:{},overlay:{enabled:!0,padding:0,borderRadius:0},scrollToStep:{enabled:!0,options:{behavior:"smooth",block:"center",inline:"center"}},labels:{previousButton:"Previous",nextButton:"Next",finishButton:"Finish"}};function he(){var L,W,N,K;const[o,v]=d.useState(""),m=d.useRef(null),p=d.useRef((W=(L=Q.overlay)==null?void 0:L.padding)!=null?W:0),f=d.useRef((K=(N=Q.overlay)==null?void 0:N.borderRadius)!=null?K:0),i=()=>{S(m.current,{padding:p.current,borderRadius:f.current})},S=async(z,T=Q.overlay)=>{var C,a,w,O,j,R,Z,J,Y,X,$,q;if(!z)return;const{innerWidth:F,innerHeight:M}=window,{left:P,top:B,width:U,height:D}=z.getBoundingClientRect(),y=typeof T.padding=="number"?{top:T.padding,right:T.padding,bottom:T.padding,left:T.padding}:T.padding,s=typeof T.borderRadius=="number"?{leftTop:T.borderRadius,rightTop:T.borderRadius,rightBottom:T.borderRadius,leftBottom:T.borderRadius}:T.borderRadius,u={top:B-((C=y==null?void 0:y.top)!=null?C:0),right:P+U+((a=y==null?void 0:y.right)!=null?a:0),bottom:B+D+((w=y==null?void 0:y.bottom)!=null?w:0),left:P-((O=y==null?void 0:y.left)!=null?O:0)},H={leftTop:`M${u.left+((j=s==null?void 0:s.leftTop)!=null?j:0)},${u.top} Q${u.left},${u.top} ${u.left},${u.top+((R=s==null?void 0:s.leftTop)!=null?R:0)}`,rightTop:`V${u.top+((Z=s==null?void 0:s.rightTop)!=null?Z:0)} Q${u.right},${u.top} ${u.right-((J=s==null?void 0:s.rightTop)!=null?J:0)},${u.top}`,rightBottom:`H${u.right-((Y=s==null?void 0:s.rightBottom)!=null?Y:0)} Q${u.right},${u.bottom} ${u.right},${u.bottom-((X=s==null?void 0:s.rightBottom)!=null?X:0)}`,leftBottom:`V${u.bottom-(($=s==null?void 0:s.leftBottom)!=null?$:0)} Q${u.left},${u.bottom} ${u.left+((q=s==null?void 0:s.leftBottom)!=null?q:0)},${u.bottom}`};v(`
M${F},${M}
H0V0
H${j}V${I}
H${F}V${M}
Z
${x.leftTop}
${x.leftBottom}
${x.rightBottom}
${x.rightTop}
${H.leftTop}
${H.leftBottom}
${H.rightBottom}
${H.rightTop}
Z
`),y.current=R,d.current=o,l.current=i};return p.useEffect(()=>(window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}),[]),{path:a,updatePath:T}}var rt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Tt={exports:{}};(function(a,v){var y=200,d="__lodash_hash_undefined__",l=800,s=16,T=9007199254740991,P="[object Arguments]",B="[object Array]",U="[object AsyncFunction]",D="[object Boolean]",R="[object Date]",m="[object Error]",j="[object Function]",I="[object GeneratorFunction]",L="[object Map]",A="[object Number]",z="[object Null]",S="[object Object]",o="[object Proxy]",i="[object RegExp]",u="[object Set]",x="[object String]",N="[object Undefined]",H="[object WeakMap]",G="[object ArrayBuffer]",V="[object DataView]",W="[object Float32Array]",it="[object Float64Array]",at="[object Int8Array]",st="[object Int16Array]",ut="[object Int32Array]",ct="[object Uint8Array]",ft="[object Uint8ClampedArray]",lt="[object Uint16Array]",Se="[object Uint32Array]",we=/[\\^$.*+?()[\]{}|]/g,xe=/^\[object .+?Constructor\]$/,Oe=/^(?:0|[1-9]\d*)$/,g={};g[W]=g[it]=g[at]=g[st]=g[ut]=g[ct]=g[ft]=g[lt]=g[Se]=!0,g[P]=g[B]=g[G]=g[D]=g[V]=g[R]=g[m]=g[j]=g[L]=g[A]=g[S]=g[i]=g[u]=g[x]=g[H]=!1;var Ut=typeof rt=="object"&&rt&&rt.Object===Object&&rt,Ce=typeof self=="object"&&self&&self.Object===Object&&self,$=Ut||Ce||Function("return this")(),Dt=v&&!v.nodeType&&v,q=Dt&&!0&&a&&!a.nodeType&&a,Ht=q&&q.exports===Dt,wt=Ht&&Ut.process,Gt=function(){try{var t=q&&q.require&&q.require("util").types;return t||wt&&wt.binding&&wt.binding("util")}catch{}}(),Vt=Gt&&Gt.isTypedArray;function je(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ie(t){return function(e){return t(e)}}function Ae(t,e){return t==null?void 0:t[e]}function Ne(t,e){return function(n){return t(e(n))}}var Pe=Array.prototype,Re=Function.prototype,dt=Object.prototype,xt=$["__core-js_shared__"],pt=Re.toString,F=dt.hasOwnProperty,Wt=function(){var t=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Kt=dt.toString,Le=pt.call(Object),ze=RegExp("^"+pt.call(F).replace(we,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=Ht?$.Buffer:void 0,Qt=$.Symbol,Zt=$.Uint8Array,Jt=ht?ht.allocUnsafe:void 0,Yt=Ne(Object.getPrototypeOf,Object),Xt=Object.create,Fe=dt.propertyIsEnumerable,Me=Pe.splice,K=Qt?Qt.toStringTag:void 0,gt=function(){try{var t=jt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Be=ht?ht.isBuffer:void 0,$t=Math.max,Ue=Date.now,qt=jt($,"Map"),k=jt(Object,"create"),De=function(){function t(){}return function(e){if(!Z(e))return{};if(Xt)return Xt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Q(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function He(){this.__data__=k?k(null):{},this.size=0}function Ge(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Ve(t){var e=this.__data__;if(k){var n=e[t];return n===d?void 0:n}return F.call(e,t)?e[t]:void 0}function We(t){var e=this.__data__;return k?e[t]!==void 0:F.call(e,t)}function Ke(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=k&&e===void 0?d:e,this}Q.prototype.clear=He,Q.prototype.delete=Ge,Q.prototype.get=Ve,Q.prototype.has=We,Q.prototype.set=Ke;function M(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Qe(){this.__data__=[],this.size=0}function Ze(t){var e=this.__data__,n=_t(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Me.call(e,n,1),--this.size,!0}function Je(t){var e=this.__data__,n=_t(e,t);return n<0?void 0:e[n][1]}function Ye(t){return _t(this.__data__,t)>-1}function Xe(t,e){var n=this.__data__,r=_t(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}M.prototype.clear=Qe,M.prototype.delete=Ze,M.prototype.get=Je,M.prototype.has=Ye,M.prototype.set=Xe;function J(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function $e(){this.size=0,this.__data__={hash:new Q,map:new(qt||M),string:new Q}}function qe(t){var e=vt(this,t).delete(t);return this.size-=e?1:0,e}function ke(t){return vt(this,t).get(t)}function tn(t){return vt(this,t).has(t)}function en(t,e){var n=vt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}J.prototype.clear=$e,J.prototype.delete=qe,J.prototype.get=ke,J.prototype.has=tn,J.prototype.set=en;function Y(t){var e=this.__data__=new M(t);this.size=e.size}function nn(){this.__data__=new M,this.size=0}function rn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function on(t){return this.__data__.get(t)}function an(t){return this.__data__.has(t)}function sn(t,e){var n=this.__data__;if(n instanceof M){var r=n.__data__;if(!qt||r.length<y-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(t,e),this.size=n.size,this}Y.prototype.clear=nn,Y.prototype.delete=rn,Y.prototype.get=on,Y.prototype.has=an,Y.prototype.set=sn;function un(t,e){var n=At(t),r=!n&&It(t),f=!n&&!r&&re(t),h=!n&&!r&&!f&&ie(t),_=n||r||f||h,c=_?Ee(t.length,String):[],b=c.length;for(var C in t)(e||F.call(t,C))&&!(_&&(C=="length"||f&&(C=="offset"||C=="parent")||h&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||ee(C,b)))&&c.push(C);return c}function Ot(t,e,n){(n!==void 0&&!yt(t[e],n)||n===void 0&&!(e in t))&&Ct(t,e,n)}function cn(t,e,n){var r=t[e];(!(F.call(t,e)&&yt(r,n))||n===void 0&&!(e in t))&&Ct(t,e,n)}function _t(t,e){for(var n=t.length;n--;)if(yt(t[n][0],e))return n;return-1}function Ct(t,e,n){e=="__proto__"&&gt?gt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var fn=wn();function bt(t){return t==null?t===void 0?N:z:K&&K in Object(t)?xn(t):An(t)}function kt(t){return tt(t)&&bt(t)==P}function ln(t){if(!Z(t)||En(t))return!1;var e=Pt(t)?ze:xe;return e.test(Ln(t))}function dn(t){return tt(t)&&oe(t.length)&&!!g[bt(t)]}function pn(t){if(!Z(t))return In(t);var e=ne(t),n=[];for(var r in t)r=="constructor"&&(e||!F.call(t,r))||n.push(r);return n}function te(t,e,n,r,f){t!==e&&fn(e,function(h,_){if(f||(f=new Y),Z(h))hn(t,e,_,n,te,r,f);else{var c=r?r(Et(t,_),h,_+"",t,e,f):void 0;c===void 0&&(c=h),Ot(t,_,c)}},ae)}function hn(t,e,n,r,f,h,_){var c=Et(t,n),b=Et(e,n),C=_.get(b);if(C){Ot(t,n,C);return}var O=h?h(c,b,n+"",t,e,_):void 0,et=O===void 0;if(et){var Rt=At(b),Lt=!Rt&&re(b),ue=!Rt&&!Lt&&ie(b);O=b,Rt||Lt||ue?At(c)?O=c:zn(c)?O=mn(c):Lt?(et=!1,O=bn(b,!0)):ue?(et=!1,O=yn(b,!0)):O=[]:Fn(b)||It(b)?(O=c,It(c)?O=Mn(c):(!Z(c)||Pt(c))&&(O=On(b))):et=!1}et&&(_.set(b,O),f(O,b,r,h,_),_.delete(b)),Ot(t,n,O)}function gn(t,e){return Pn(Nn(t,e,se),t+"")}var _n=gt?function(t,e){return gt(t,"toString",{configurable:!0,enumerable:!1,value:Un(e),writable:!0})}:se;function bn(t,e){if(e)return t.slice();var n=t.length,r=Jt?Jt(n):new t.constructor(n);return t.copy(r),r}function vn(t){var e=new t.constructor(t.byteLength);return new Zt(e).set(new Zt(t)),e}function yn(t,e){var n=e?vn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function mn(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function Tn(t,e,n,r){var f=!n;n||(n={});for(var h=-1,_=e.length;++h<_;){var c=e[h],b=r?r(n[c],t[c],c,n,t):void 0;b===void 0&&(b=t[c]),f?Ct(n,c,b):cn(n,c,b)}return n}function Sn(t){return gn(function(e,n){var r=-1,f=n.length,h=f>1?n[f-1]:void 0,_=f>2?n[2]:void 0;for(h=t.length>3&&typeof h=="function"?(f--,h):void 0,_&&Cn(n[0],n[1],_)&&(h=f<3?void 0:h,f=1),e=Object(e);++r<f;){var c=n[r];c&&t(e,c,r,h)}return e})}function wn(t){return function(e,n,r){for(var f=-1,h=Object(e),_=r(e),c=_.length;c--;){var b=_[t?c:++f];if(n(h[b],b,h)===!1)break}return e}}function vt(t,e){var n=t.__data__;return jn(e)?n[typeof e=="string"?"string":"hash"]:n.map}function jt(t,e){var n=Ae(t,e);return ln(n)?n:void 0}function xn(t){var e=F.call(t,K),n=t[K];try{t[K]=void 0;var r=!0}catch{}var f=Kt.call(t);return r&&(e?t[K]=n:delete t[K]),f}function On(t){return typeof t.constructor=="function"&&!ne(t)?De(Yt(t)):{}}function ee(t,e){var n=typeof t;return e=e==null?T:e,!!e&&(n=="number"||n!="symbol"&&Oe.test(t))&&t>-1&&t%1==0&&t<e}function Cn(t,e,n){if(!Z(n))return!1;var r=typeof e;return(r=="number"?Nt(n)&&ee(e,n.length):r=="string"&&e in n)?yt(n[e],t):!1}function jn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function En(t){return!!Wt&&Wt in t}function ne(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||dt;return t===n}function In(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function An(t){return Kt.call(t)}function Nn(t,e,n){return e=$t(e===void 0?t.length-1:e,0),function(){for(var r=arguments,f=-1,h=$t(r.length-e,0),_=Array(h);++f<h;)_[f]=r[e+f];f=-1;for(var c=Array(e+1);++f<e;)c[f]=r[f];return c[e]=n(_),je(t,this,c)}}function Et(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Pn=Rn(_n);function Rn(t){var e=0,n=0;return function(){var r=Ue(),f=s-(r-n);if(n=r,f>0){if(++e>=l)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Ln(t){if(t!=null){try{return pt.call(t)}catch{}try{return t+""}catch{}}return""}function yt(t,e){return t===e||t!==t&&e!==e}var It=kt(function(){return arguments}())?kt:function(t){return tt(t)&&F.call(t,"callee")&&!Fe.call(t,"callee")},At=Array.isArray;function Nt(t){return t!=null&&oe(t.length)&&!Pt(t)}function zn(t){return tt(t)&&Nt(t)}var re=Be||Dn;function Pt(t){if(!Z(t))return!1;var e=bt(t);return e==j||e==I||e==U||e==o}function oe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=T}function Z(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function tt(t){return t!=null&&typeof t=="object"}function Fn(t){if(!tt(t)||bt(t)!=S)return!1;var e=Yt(t);if(e===null)return!0;var n=F.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&pt.call(n)==Le}var ie=Vt?Ie(Vt):dn;function Mn(t){return Tn(t,ae(t))}function ae(t){return Nt(t)?un(t,!0):pn(t)}var Bn=Sn(function(t,e,n){te(t,e,n)});function Un(t){return function(){return t}}function se(t){return t}function Dn(){return!1}a.exports=Bn})(Tt,Tt.exports);var Ft=Tt.exports,St={exports:{}},ot={};/**
`),m.current=z,p.current=y,f.current=s};return d.useEffect(()=>(window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}),[]),{path:o,updatePath:S}}var lt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},St={exports:{}};(function(o,v){var m=200,p="__lodash_hash_undefined__",f=800,i=16,S=9007199254740991,L="[object Arguments]",W="[object Array]",N="[object AsyncFunction]",K="[object Boolean]",z="[object Date]",T="[object Error]",F="[object Function]",M="[object GeneratorFunction]",P="[object Map]",B="[object Number]",U="[object Null]",D="[object Object]",y="[object Proxy]",s="[object RegExp]",u="[object Set]",H="[object String]",C="[object Undefined]",a="[object WeakMap]",w="[object ArrayBuffer]",O="[object DataView]",j="[object Float32Array]",R="[object Float64Array]",Z="[object Int8Array]",J="[object Int16Array]",Y="[object Int32Array]",X="[object Uint8Array]",$="[object Uint8ClampedArray]",q="[object Uint16Array]",dt="[object Uint32Array]",xe=/[\\^$.*+?()[\]{}|]/g,we=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,g={};g[j]=g[R]=g[Z]=g[J]=g[Y]=g[X]=g[$]=g[q]=g[dt]=!0,g[L]=g[W]=g[w]=g[K]=g[O]=g[z]=g[T]=g[F]=g[P]=g[B]=g[D]=g[s]=g[u]=g[H]=g[a]=!1;var Dt=typeof lt=="object"&&lt&&lt.Object===Object&&lt,Oe=typeof self=="object"&&self&&self.Object===Object&&self,it=Dt||Oe||Function("return this")(),Ht=v&&!v.nodeType&&v,at=Ht&&!0&&o&&!o.nodeType&&o,Gt=at&&at.exports===Ht,wt=Gt&&Dt.process,Vt=function(){try{var t=at&&at.require&&at.require("util").types;return t||wt&&wt.binding&&wt.binding("util")}catch{}}(),Wt=Vt&&Vt.isTypedArray;function je(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ie(t){return function(e){return t(e)}}function Ae(t,e){return t==null?void 0:t[e]}function Ne(t,e){return function(n){return t(e(n))}}var Pe=Array.prototype,Be=Function.prototype,pt=Object.prototype,Ct=it["__core-js_shared__"],ht=Be.toString,G=pt.hasOwnProperty,Kt=function(){var t=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Qt=pt.toString,Re=ht.call(Object),Le=RegExp("^"+ht.call(G).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gt=Gt?it.Buffer:void 0,Zt=it.Symbol,Jt=it.Uint8Array,Yt=gt?gt.allocUnsafe:void 0,Xt=Ne(Object.getPrototypeOf,Object),$t=Object.create,ze=pt.propertyIsEnumerable,Fe=Pe.splice,k=Zt?Zt.toStringTag:void 0,bt=function(){try{var t=Et(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Me=gt?gt.isBuffer:void 0,qt=Math.max,Ue=Date.now,kt=Et(it,"Map"),st=Et(Object,"create"),De=function(){function t(){}return function(e){if(!et(e))return{};if($t)return $t(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function tt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function He(){this.__data__=st?st(null):{},this.size=0}function Ge(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Ve(t){var e=this.__data__;if(st){var n=e[t];return n===p?void 0:n}return G.call(e,t)?e[t]:void 0}function We(t){var e=this.__data__;return st?e[t]!==void 0:G.call(e,t)}function Ke(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=st&&e===void 0?p:e,this}tt.prototype.clear=He,tt.prototype.delete=Ge,tt.prototype.get=Ve,tt.prototype.has=We,tt.prototype.set=Ke;function V(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Qe(){this.__data__=[],this.size=0}function Ze(t){var e=this.__data__,n=_t(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Fe.call(e,n,1),--this.size,!0}function Je(t){var e=this.__data__,n=_t(e,t);return n<0?void 0:e[n][1]}function Ye(t){return _t(this.__data__,t)>-1}function Xe(t,e){var n=this.__data__,r=_t(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}V.prototype.clear=Qe,V.prototype.delete=Ze,V.prototype.get=Je,V.prototype.has=Ye,V.prototype.set=Xe;function nt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function $e(){this.size=0,this.__data__={hash:new tt,map:new(kt||V),string:new tt}}function qe(t){var e=yt(this,t).delete(t);return this.size-=e?1:0,e}function ke(t){return yt(this,t).get(t)}function tn(t){return yt(this,t).has(t)}function en(t,e){var n=yt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}nt.prototype.clear=$e,nt.prototype.delete=qe,nt.prototype.get=ke,nt.prototype.has=tn,nt.prototype.set=en;function rt(t){var e=this.__data__=new V(t);this.size=e.size}function nn(){this.__data__=new V,this.size=0}function rn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function on(t){return this.__data__.get(t)}function an(t){return this.__data__.has(t)}function sn(t,e){var n=this.__data__;if(n instanceof V){var r=n.__data__;if(!kt||r.length<m-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new nt(r)}return n.set(t,e),this.size=n.size,this}rt.prototype.clear=nn,rt.prototype.delete=rn,rt.prototype.get=on,rt.prototype.has=an,rt.prototype.set=sn;function un(t,e){var n=Nt(t),r=!n&&At(t),l=!n&&!r&&oe(t),h=!n&&!r&&!l&&ae(t),b=n||r||l||h,c=b?Ee(t.length,String):[],_=c.length;for(var I in t)(e||G.call(t,I))&&!(b&&(I=="length"||l&&(I=="offset"||I=="parent")||h&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||ne(I,_)))&&c.push(I);return c}function Ot(t,e,n){(n!==void 0&&!mt(t[e],n)||n===void 0&&!(e in t))&&jt(t,e,n)}function cn(t,e,n){var r=t[e];(!(G.call(t,e)&&mt(r,n))||n===void 0&&!(e in t))&&jt(t,e,n)}function _t(t,e){for(var n=t.length;n--;)if(mt(t[n][0],e))return n;return-1}function jt(t,e,n){e=="__proto__"&&bt?bt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var ln=xn();function vt(t){return t==null?t===void 0?C:U:k&&k in Object(t)?wn(t):An(t)}function te(t){return ut(t)&&vt(t)==L}function fn(t){if(!et(t)||En(t))return!1;var e=Bt(t)?Le:we;return e.test(Rn(t))}function dn(t){return ut(t)&&ie(t.length)&&!!g[vt(t)]}function pn(t){if(!et(t))return In(t);var e=re(t),n=[];for(var r in t)r=="constructor"&&(e||!G.call(t,r))||n.push(r);return n}function ee(t,e,n,r,l){t!==e&&ln(e,function(h,b){if(l||(l=new rt),et(h))hn(t,e,b,n,ee,r,l);else{var c=r?r(It(t,b),h,b+"",t,e,l):void 0;c===void 0&&(c=h),Ot(t,b,c)}},se)}function hn(t,e,n,r,l,h,b){var c=It(t,n),_=It(e,n),I=b.get(_);if(I){Ot(t,n,I);return}var E=h?h(c,_,n+"",t,e,b):void 0,ct=E===void 0;if(ct){var Rt=Nt(_),Lt=!Rt&&oe(_),ce=!Rt&&!Lt&&ae(_);E=_,Rt||Lt||ce?Nt(c)?E=c:Ln(c)?E=mn(c):Lt?(ct=!1,E=_n(_,!0)):ce?(ct=!1,E=yn(_,!0)):E=[]:zn(_)||At(_)?(E=c,At(c)?E=Fn(c):(!et(c)||Bt(c))&&(E=Cn(_))):ct=!1}ct&&(b.set(_,E),l(E,_,r,h,b),b.delete(_)),Ot(t,n,E)}function gn(t,e){return Pn(Nn(t,e,ue),t+"")}var bn=bt?function(t,e){return bt(t,"toString",{configurable:!0,enumerable:!1,value:Un(e),writable:!0})}:ue;function _n(t,e){if(e)return t.slice();var n=t.length,r=Yt?Yt(n):new t.constructor(n);return t.copy(r),r}function vn(t){var e=new t.constructor(t.byteLength);return new Jt(e).set(new Jt(t)),e}function yn(t,e){var n=e?vn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function mn(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function Tn(t,e,n,r){var l=!n;n||(n={});for(var h=-1,b=e.length;++h<b;){var c=e[h],_=r?r(n[c],t[c],c,n,t):void 0;_===void 0&&(_=t[c]),l?jt(n,c,_):cn(n,c,_)}return n}function Sn(t){return gn(function(e,n){var r=-1,l=n.length,h=l>1?n[l-1]:void 0,b=l>2?n[2]:void 0;for(h=t.length>3&&typeof h=="function"?(l--,h):void 0,b&&On(n[0],n[1],b)&&(h=l<3?void 0:h,l=1),e=Object(e);++r<l;){var c=n[r];c&&t(e,c,r,h)}return e})}function xn(t){return function(e,n,r){for(var l=-1,h=Object(e),b=r(e),c=b.length;c--;){var _=b[t?c:++l];if(n(h[_],_,h)===!1)break}return e}}function yt(t,e){var n=t.__data__;return jn(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Et(t,e){var n=Ae(t,e);return fn(n)?n:void 0}function wn(t){var e=G.call(t,k),n=t[k];try{t[k]=void 0;var r=!0}catch{}var l=Qt.call(t);return r&&(e?t[k]=n:delete t[k]),l}function Cn(t){return typeof t.constructor=="function"&&!re(t)?De(Xt(t)):{}}function ne(t,e){var n=typeof t;return e=e==null?S:e,!!e&&(n=="number"||n!="symbol"&&Ce.test(t))&&t>-1&&t%1==0&&t<e}function On(t,e,n){if(!et(n))return!1;var r=typeof e;return(r=="number"?Pt(n)&&ne(e,n.length):r=="string"&&e in n)?mt(n[e],t):!1}function jn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function En(t){return!!Kt&&Kt in t}function re(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||pt;return t===n}function In(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function An(t){return Qt.call(t)}function Nn(t,e,n){return e=qt(e===void 0?t.length-1:e,0),function(){for(var r=arguments,l=-1,h=qt(r.length-e,0),b=Array(h);++l<h;)b[l]=r[e+l];l=-1;for(var c=Array(e+1);++l<e;)c[l]=r[l];return c[e]=n(b),je(t,this,c)}}function It(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Pn=Bn(bn);function Bn(t){var e=0,n=0;return function(){var r=Ue(),l=i-(r-n);if(n=r,l>0){if(++e>=f)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Rn(t){if(t!=null){try{return ht.call(t)}catch{}try{return t+""}catch{}}return""}function mt(t,e){return t===e||t!==t&&e!==e}var At=te(function(){return arguments}())?te:function(t){return ut(t)&&G.call(t,"callee")&&!ze.call(t,"callee")},Nt=Array.isArray;function Pt(t){return t!=null&&ie(t.length)&&!Bt(t)}function Ln(t){return ut(t)&&Pt(t)}var oe=Me||Dn;function Bt(t){if(!et(t))return!1;var e=vt(t);return e==F||e==M||e==N||e==y}function ie(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=S}function et(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ut(t){return t!=null&&typeof t=="object"}function zn(t){if(!ut(t)||vt(t)!=D)return!1;var e=Xt(t);if(e===null)return!0;var n=G.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ht.call(n)==Re}var ae=Wt?Ie(Wt):dn;function Fn(t){return Tn(t,se(t))}function se(t){return Pt(t)?un(t,!0):pn(t)}var Mn=Sn(function(t,e,n){ee(t,e,n)});function Un(t){return function(){return t}}function ue(t){return t}function Dn(){return!1}o.exports=Mn})(St,St.exports);var Ft=St.exports,xt={exports:{}},ft={};/**
* @license React

@@ -19,2 +19,2 @@ * react-jsx-runtime.production.min.js

* LICENSE file in the root directory of this source tree.
*/var he=le.default,ge=Symbol.for("react.element"),_e=Symbol.for("react.fragment"),be=Object.prototype.hasOwnProperty,ve=he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ye={key:!0,ref:!0,__self:!0,__source:!0};function Mt(a,v,y){var d,l={},s=null,T=null;y!==void 0&&(s=""+y),v.key!==void 0&&(s=""+v.key),v.ref!==void 0&&(T=v.ref);for(d in v)be.call(v,d)&&!ye.hasOwnProperty(d)&&(l[d]=v[d]);if(a&&a.defaultProps)for(d in v=a.defaultProps,v)l[d]===void 0&&(l[d]=v[d]);return{$$typeof:ge,type:a,key:s,ref:T,props:l,_owner:ve.current}}ot.Fragment=_e,ot.jsx=Mt,ot.jsxs=Mt,St.exports=ot;const w=St.exports.jsx,X=St.exports.jsxs;function Bt({children:a}){var I,L,A,z;const{path:v,updatePath:y}=pe(),[d,l]=p.useState(!1),s=p.useContext(zt),T=p.useRef(null),{setTargetElementClassName:P,unsetTargetElementClassName:B}=de();p.useEffect(()=>(R(),()=>{j()}),[]),p.useLayoutEffect(()=>{!d||m()},[d]);const U=()=>{j(),s.nextStep()},D=()=>{j(),s.previousStep()},R=async()=>{var o,i,u,x,N;await((u=(i=(o=s.step)==null?void 0:o.on)==null?void 0:i.beforeStep)==null?void 0:u.call(i)),!(!mt((N=(x=s.step)==null?void 0:x.attachTo)==null?void 0:N.element)||!T.current)&&l(!0)},m=()=>{var i,u,x,N,H,G,V,W;const S=mt((u=(i=s.step)==null?void 0:i.attachTo)==null?void 0:u.element);if(!S||!T.current)return;const o=Ft({},s.options,(x=s.step)==null?void 0:x.options);ce.createPopper(S,T.current,o.popper),(N=o==null?void 0:o.scrollToStep)!=null&&N.enabled&&S.scrollIntoView((H=o==null?void 0:o.scrollToStep)==null?void 0:H.options),(G=o==null?void 0:o.overlay)!=null&&G.enabled&&y(S,{padding:(V=o==null?void 0:o.overlay)==null?void 0:V.padding,borderRadius:(W=o==null?void 0:o.overlay)==null?void 0:W.borderRadius}),P(S)},j=()=>{var S,o,i,u,x;(i=(o=(S=s.step)==null?void 0:S.on)==null?void 0:o.afterStep)==null||i.call(o),B(mt((u=s==null?void 0:s.step)==null?void 0:u.attachTo.element),(x=s==null?void 0:s.step)==null?void 0:x.attachTo.classList)};return X("div",{className:d?"":"hidden",children:[w("svg",{style:{width:"100%",height:"100%",position:"fixed",top:0,left:0,opacity:"0.5",zIndex:"var(--r-onboarding-overlay-z, 10)",pointerEvents:"none"},children:w("path",{d:v})}),w("div",{style:{position:"relative",zIndex:"var(--r-onboarding-step-z, 20)"},children:X("div",{ref:T,children:[s.step?a||X("div",{className:"r-onboarding-item",children:[X("div",{className:"r-onboarding-item__header",children:[((L=(I=s==null?void 0:s.step)==null?void 0:I.content)==null?void 0:L.title)&&w("span",{className:"r-onboarding-item__header-title",children:s.step.content.title}),w("button",{onClick:()=>s.exit(),className:"r-onboarding-item__header-close",children:w("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:w("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),((z=(A=s==null?void 0:s.step)==null?void 0:A.content)==null?void 0:z.description)&&w("p",{className:"r-onboarding-item__description",children:s.step.content.description}),X("div",{className:"r-onboarding-item__actions",children:[!s.isFirstStep&&w("button",{type:"button",onClick:D,className:"r-onboarding-btn-secondary",children:"Previous"}),w("button",{onClick:U,type:"button",className:"r-onboarding-btn-primary",children:s.isLastStep?"Finish":"Next"})]})]}):null,w("div",{"data-popper-arrow":!0})]})})]})}const me=p.forwardRef(({steps:a,options:v,children:y},d)=>{p.useImperativeHandle(d,()=>({start:S,finish:o,goToStep:i}));const[l,s]=p.useState(-1),[T,P]=p.useState(null),[B,U]=p.useState(!1),[D,R]=p.useState({}),[m,j]=p.useState(!1),[I,L]=p.useState(!1);p.useEffect(()=>{U(l>=a.length||l<0),j(l===0),L(l===a.length-1)},[l]);const A=()=>{const u=l-1;i(u)},z=()=>{const u=l+1;i(u)},S=()=>{i(0)},o=()=>{i(-1)},i=u=>{s(u),P(a==null?void 0:a[u])};return p.useEffect(()=>{R(Ft({},nt,v))},[]),B?null:w("div",{"data-r-onboarding-wrapper":!0,children:w(zt.Provider,{value:{options:D,step:T,nextStep:z,previousStep:A,exit:o,isFirstStep:m,isLastStep:I,index:l},children:y?w(p.Fragment,{children:y({step:T,next:z,previous:A,exit:o,isFirst:m,isLast:I,index:l})},l):w(Bt,{},l)})})});function Te(a){return{start:()=>{var l;return(l=a==null?void 0:a.current)==null?void 0:l.start()},finish:()=>{var l;return(l=a==null?void 0:a.current)==null?void 0:l.finish()},goToStep:l=>{var s;return(s=a==null?void 0:a.current)==null?void 0:s.goToStep(l)}}}var Hn="";E.ROnboardingStep=Bt,E.ROnboardingWrapper=me,E.useROnboarding=Te,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
*/var ge=de.default,be=Symbol.for("react.element"),_e=Symbol.for("react.fragment"),ve=Object.prototype.hasOwnProperty,ye=ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,me={key:!0,ref:!0,__self:!0,__source:!0};function Mt(o,v,m){var p,f={},i=null,S=null;m!==void 0&&(i=""+m),v.key!==void 0&&(i=""+v.key),v.ref!==void 0&&(S=v.ref);for(p in v)ve.call(v,p)&&!me.hasOwnProperty(p)&&(f[p]=v[p]);if(o&&o.defaultProps)for(p in v=o.defaultProps,v)f[p]===void 0&&(f[p]=v[p]);return{$$typeof:be,type:o,key:i,ref:S,props:f,_owner:ye.current}}ft.Fragment=_e,ft.jsx=Mt,ft.jsxs=Mt,xt.exports=ft;const x=xt.exports.jsx,ot=xt.exports.jsxs;function Ut({children:o}){var B,U,D,y,s,u,H;const{path:v,updatePath:m}=he(),[p,f]=d.useState(!1),i=d.useContext(zt),S=d.useRef(null),{setTargetElementClassName:L,unsetTargetElementClassName:W}=pe(),[N,K]=d.useState({previous:(B=Q.labels)==null?void 0:B.previousButton,next:(U=Q.labels)==null?void 0:U.nextButton,finish:(D=Q.labels)==null?void 0:D.finishButton});d.useEffect(()=>(F(),()=>{P()}),[]),d.useLayoutEffect(()=>{!p||M()},[p]);const z=()=>{P(),i.nextStep()},T=()=>{P(),i.previousStep()},F=async()=>{var a,w,O,j,R;await((O=(w=(a=i.step)==null?void 0:a.on)==null?void 0:w.beforeStep)==null?void 0:O.call(w)),!(!Tt((R=(j=i.step)==null?void 0:j.attachTo)==null?void 0:R.element)||!S.current)&&f(!0)},M=()=>{var w,O,j,R,Z,J,Y,X,$,q,dt;const C=Tt((O=(w=i.step)==null?void 0:w.attachTo)==null?void 0:O.element);if(!C||!S.current)return;const a=Ft({},i.options,(j=i.step)==null?void 0:j.options);K({previous:(R=a==null?void 0:a.labels)==null?void 0:R.previousButton,next:(Z=a==null?void 0:a.labels)==null?void 0:Z.nextButton,finish:(J=a==null?void 0:a.labels)==null?void 0:J.finishButton}),le.createPopper(C,S.current,a.popper),(Y=a==null?void 0:a.scrollToStep)!=null&&Y.enabled&&C.scrollIntoView((X=a==null?void 0:a.scrollToStep)==null?void 0:X.options),($=a==null?void 0:a.overlay)!=null&&$.enabled&&m(C,{padding:(q=a==null?void 0:a.overlay)==null?void 0:q.padding,borderRadius:(dt=a==null?void 0:a.overlay)==null?void 0:dt.borderRadius}),L(C)},P=()=>{var C,a,w,O,j;(w=(a=(C=i.step)==null?void 0:C.on)==null?void 0:a.afterStep)==null||w.call(a),W(Tt((O=i==null?void 0:i.step)==null?void 0:O.attachTo.element),(j=i==null?void 0:i.step)==null?void 0:j.attachTo.classList)};return ot("div",{className:p?"":"hidden",children:[x("svg",{style:{width:"100%",height:"100%",position:"fixed",top:0,left:0,opacity:"0.5",zIndex:"var(--r-onboarding-overlay-z, 10)",pointerEvents:"none"},children:x("path",{d:v})}),x("div",{style:{position:"relative",zIndex:"var(--r-onboarding-step-z, 20)"},children:ot("div",{ref:S,children:[i.step?o||ot("div",{className:"r-onboarding-item",children:[ot("div",{className:"r-onboarding-item__header",children:[((s=(y=i==null?void 0:i.step)==null?void 0:y.content)==null?void 0:s.title)&&x("span",{className:"r-onboarding-item__header-title",children:i.step.content.title}),x("button",{onClick:()=>i.exit(),className:"r-onboarding-item__header-close",children:x("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:x("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),((H=(u=i==null?void 0:i.step)==null?void 0:u.content)==null?void 0:H.description)&&x("p",{className:"r-onboarding-item__description",children:i.step.content.description}),ot("div",{className:"r-onboarding-item__actions",children:[!i.isFirstStep&&x("button",{type:"button",onClick:T,className:"r-onboarding-btn-secondary",children:N.previous}),x("button",{onClick:z,type:"button",className:"r-onboarding-btn-primary",children:i.isLastStep?N.finish:N.next})]})]}):null,x("div",{"data-popper-arrow":!0})]})})]})}const Te=d.forwardRef(({steps:o,options:v,children:m},p)=>{d.useImperativeHandle(p,()=>({start:D,finish:y,goToStep:s}));const[f,i]=d.useState(-1),[S,L]=d.useState(null),[W,N]=d.useState(!1),[K,z]=d.useState({}),[T,F]=d.useState(!1),[M,P]=d.useState(!1);d.useEffect(()=>{N(f>=o.length||f<0),F(f===0),P(f===o.length-1)},[f]);const B=()=>{const u=f-1;s(u)},U=()=>{const u=f+1;s(u)},D=()=>{s(0)},y=()=>{s(-1)},s=u=>{i(u),L(o==null?void 0:o[u])};return d.useEffect(()=>{z(Ft({},Q,v))},[]),W?null:x("div",{"data-r-onboarding-wrapper":!0,children:x(zt.Provider,{value:{options:K,step:S,nextStep:U,previousStep:B,exit:y,isFirstStep:T,isLastStep:M,index:f},children:m?x(d.Fragment,{children:m({step:S,next:U,previous:B,exit:y,isFirst:T,isLast:M,index:f})},f):x(Ut,{},f)})})});function Se(o){return{start:()=>{var f;return(f=o==null?void 0:o.current)==null?void 0:f.start()},finish:()=>{var f;return(f=o==null?void 0:o.current)==null?void 0:f.finish()},goToStep:f=>{var i;return(i=o==null?void 0:o.current)==null?void 0:i.goToStep(f)}}}var Hn="";A.ROnboardingStep=Ut,A.ROnboardingWrapper=Te,A.useROnboarding=Se,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
{
"name": "r-onboarding",
"version": "2.0.0",
"version": "2.1.0",
"description": "r-onboarding is a super-slim, fully-typed onboarding component for React",

@@ -75,3 +75,3 @@ "repository": {

"vite": "^2.9.0",
"vitest": "^0.20.1"
"vitest": "^0.22.1"
},

@@ -78,0 +78,0 @@ "peerDependencies": {

@@ -26,2 +26,7 @@ import type { createPopper } from "@popperjs/core/lib/createPopper";

options?: ScrollIntoViewOptions
},
labels?: {
previousButton?: string
nextButton?: string
finishButton?: string
}

@@ -44,2 +49,7 @@ }

}
},
labels: {
previousButton: 'Previous',
nextButton: 'Next',
finishButton: 'Finish'
}

@@ -46,0 +56,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc