@tap-payments/connect-v2 0.0.25-test → 0.0.27-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),f=require("react"),L=require("react-dom");function S(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const l=S(f);var v=(e=>(e.PAGE="page",e.POPUP="popup",e.CONTENT="content",e))(v||{}),b=(e=>(e.AUTH="auth",e.MERCHANT="merchant",e))(b||{}),O=(e=>(e.SET_PASSWORD="set_password",e.RESET_PASSWORD="reset_password",e))(O||{}),y=(e=>(e.DARK="dark",e.LIGHT="light",e))(y||{}),C=(e=>(e.AR="ar",e.EN="en",e))(C||{}),x=(e=>(e.STRAIGHT="straight",e.CURVED="curved",e))(x||{}),j=(e=>(e.LEFT="left",e.RIGHT="right",e.UP="up",e.DOWN="down",e))(j||{}),d=(e=>(e.ON_CLOSE="connect:onClose",e.ON_ERROR="connect:onError",e.ON_SUCCESS="connect:onSuccess",e.ON_READY="connect:onReady",e.ON_LOADED="connect:onLoaded",e))(d||{}),g=(e=>(e.PROFILE_TOKEN="profile_token",e.THEME="theme",e.LANGUAGE="lang",e))(g||{});const T=({outerColor:e="white",innerColor:r="white",duration:t=3,toggleAnimation:n=!1})=>o.jsx("div",{style:{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:o.jsx("div",{style:{position:"relative",width:"60px",height:"60px"},children:o.jsxs("svg",{viewBox:"25 25 50 50",style:{transformOrigin:"center center",position:"absolute",top:0,left:0,margin:"auto"},children:[o.jsx("circle",{cx:"50",cy:"50",r:"20",fill:"none",stroke:e,strokeWidth:"3.6px",strokeLinecap:"round",strokeDasharray:"125, 124",children:n&&o.jsxs(o.Fragment,{children:[o.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:`${t||0/3}s`,repeatCount:"indefinite"}),o.jsx("animate",{attributeName:"stroke-dashoffset",values:"0; 122; 122; 0; 0",keyTimes:"0; 0.45; 0.55; 0.9; 1",dur:`${t}s`,repeatCount:"indefinite"})]})}),o.jsx("circle",{cx:"50",cy:"50",r:"14",fill:"none",stroke:r,strokeWidth:"3.6px",strokeLinecap:"round",strokeDasharray:"88, 124",children:n&&o.jsxs(o.Fragment,{children:[o.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"360 50 50",to:"0 50 50",dur:`${t||0/3}s`,repeatCount:"indefinite"}),o.jsx("animate",{attributeName:"stroke-dashoffset",values:"0; -85; -85; 0; 0",keyTimes:"0; 0.45; 0.55; 0.9; 1",dur:`${t}s`,repeatCount:"indefinite"})]})})]})})}),A=f.memo(T),w=f.createContext({}),E=()=>f.useContext(w);function P({children:e,props:r}){const[t,n]=f.useState(!1),a=s=>{n(s)},i=()=>{n(!1)};return o.jsx(w.Provider,{value:{...r,onLoadingHandler:a,loading:t,onLoaded:i},children:e})}const U="https://68b564fae5dc090291aeddd7.mockapi.io/api/config",I="https://68b564fae5dc090291aeddd7.mockapi.io/api/config",D="https://68b564fae5dc090291aeddd7.mockapi.io/api/config",G="tap-connect-sdk-iframe",h="https://connect.alpha.tap.company",$=({src:e})=>{const{loading:r}=E();return o.jsxs(o.Fragment,{children:[r&&o.jsx(A,{toggleAnimation:!0}),e&&o.jsx("iframe",{id:G,title:"connect",src:e,style:{width:"100%",height:"100%",border:"none",position:"absolute",top:0,left:0}})]})};var F=function(e){var r,t;return((t=(r=e==null?void 0:e.response)===null||r===void 0?void 0:r.data)===null||t===void 0?void 0:t.errors)!==void 0},H=function(e){return e instanceof Error},W=function(e){return typeof e=="string"},K=function(e){try{var r=e.response.data.errors,t=r[0],n=t.description,a=t.code;return{message:n,code:a}}catch(i){return{message:i.message,code:"UNKNOWN"}}},M=function(e){try{var r=e.message,t=r.split("::"),n=t[0],a=t[1];return{message:a,code:n}}catch(i){return{message:i.message,code:"UNKNOWN"}}},q=function(e){try{var r=e.split("::"),t=r[0],n=r[1];return{message:n,code:t}}catch(a){return{message:a,code:"UNKNOWN"}}},B=function(){function e(r){if(Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"message",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),F(r)){var t=K(r);this.code=t.code,this.message=t.message}else if(H(r)){var t=M(r);this.code=t.code,this.message=t.message}else if(W(r)){var t=q(r);this.code=t.code,this.message=t.message}else this.code="UNKNOWN",this.message="Unknown error"}return Object.defineProperty(e.prototype,"getCode",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.code}}),Object.defineProperty(e.prototype,"getMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.message}}),Object.defineProperty(e.prototype,"getClientError",{enumerable:!1,configurable:!0,writable:!0,value:function(){return{message:this.message,code:this.code}}}),e}();const Y=(e="tap-connect-sdk-element")=>{const r=document.getElementById(e);if(r)return r;const t=document.createElement("div");return t.setAttribute("id",e),document.body.prepend(t),t},z=e=>e?["sa","sau"].includes(e.toLowerCase()):!1,J=e=>e==="dr",V=(e="")=>{const[r,t]=e.split("-");return z(r)?J(t)?D:I:U},Q=()=>{const[e,r]=l.useState(""),{onError:t,onLoadingHandler:n,loginMode:a,region:i,...s}=E(),m=async()=>{n(!0);try{const c=await fetch(V(i),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!c.ok)throw new Error(`${c.status}::${c.statusText}`);const u=await c.json();if(!u.redirect_url){const p=new URLSearchParams;s!=null&&s.theme&&p.append(g.THEME,s.theme),s!=null&&s.language&&p.append(g.LANGUAGE,s.language),p.append(g.PROFILE_TOKEN,u.id);const R=a?`${h}/auth`:h;u.redirect_url=`${R}?${p.toString()}`}if(s.mode!==v.PAGE)return r(u.redirect_url);window.location.href=u.redirect_url}catch(c){const u=new B(c);t==null||t(u.getClientError()),n(!1)}};return l.useEffect(()=>{m()},[]),{connectLink:e}},X=()=>{const{onSuccess:e,onClose:r,onError:t,onReady:n,onLoaded:a}=E(),i=l.useCallback(async s=>{if(s.origin!==h)return;const{data:m,event:c}=s.data;switch(c){case d.ON_CLOSE:r==null||r();break;case d.ON_ERROR:t==null||t(m);break;case d.ON_SUCCESS:e(m);break;case d.ON_LOADED:a();break;case d.ON_READY:n==null||n();break}},[r,t,a,n,e]);l.useEffect(()=>(window.addEventListener("message",i,!1),()=>{window.removeEventListener("message",i)}),[i])},Z=()=>{const{connectLink:e}=Q();return X(),o.jsx("div",{id:"tap-connect-main-container",style:{display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0, 0, 0, 0.5)",position:"fixed",top:0,left:0,width:"100%",height:"100%"},children:o.jsx($,{src:e})})},ee=e=>o.jsx(P,{props:e,children:e.open&&o.jsx(Z,{})}),_=l.memo(ee);var k,N=L;k=N.createRoot,N.hydrateRoot;const te=(e,r)=>{const t=Y(e),n=k(t);return n.render(o.jsx(_,{...r})),{unmount:()=>n.unmount()}};exports.ConnectDialogEdgeFormat=x;exports.ConnectDialogTransition=j;exports.ConnectElement=_;exports.ConnectLanguage=C;exports.ConnectMode=v;exports.ConnectPasswordOperationType=O;exports.ConnectScope=b;exports.ConnectTheme=y;exports.renderConnectElement=te;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),f=require("react"),A=require("react-dom");function R(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const u=R(f);var g=(e=>(e.PAGE="page",e.POPUP="popup",e.CONTENT="content",e))(g||{}),_=(e=>(e.AUTH="auth",e.MERCHANT="merchant",e))(_||{}),y=(e=>(e.SET_PASSWORD="set_password",e.RESET_PASSWORD="reset_password",e))(y||{}),C=(e=>(e.DARK="dark",e.LIGHT="light",e))(C||{}),O=(e=>(e.AR="ar",e.EN="en",e))(O||{}),E=(e=>(e.STRAIGHT="straight",e.CURVED="curved",e))(E||{}),b=(e=>(e.LEFT="left",e.RIGHT="right",e.UP="up",e.DOWN="down",e))(b||{}),l=(e=>(e.ON_CLOSE="connect:onClose",e.ON_ERROR="connect:onError",e.ON_SUCCESS="connect:onSuccess",e.ON_READY="connect:onReady",e.ON_LOADED="connect:onLoaded",e))(l||{}),h=(e=>(e.PROFILE_TOKEN="profile_token",e.THEME="theme",e.LANGUAGE="lang",e))(h||{});const L=({outerStartColor:e="rgba(244, 244, 244, 1)",outerEndColor:n="rgba(238, 238, 238, 1)",innerStartColor:r="rgba(244, 244, 244, 1)",innerEndColor:o="rgba(238, 238, 238, 1)",duration:s=3,toggleAnimation:i=!1})=>t.jsx("div",{style:{position:"relative",width:"135px",height:"135px"},children:t.jsx("div",{style:{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",opacity:.9},children:t.jsxs("svg",{width:"199",height:"197",viewBox:"0 0 199 197",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsxs("g",{children:[t.jsx("circle",{cx:"89.5",cy:"86.5",r:"67.5",fill:"none",stroke:"url(#strokeGradientOuter_1427_22275)",strokeWidth:"9.6",strokeLinecap:"round",strokeDasharray:"425 125",children:i&&t.jsxs(t.Fragment,{children:[t.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 89.5 86.5",to:"360 89.5 86.5",dur:`${s/3}s`,repeatCount:"indefinite"}),t.jsx("animate",{attributeName:"stroke-dashoffset",values:"0; 425; 425; 0; 0",keyTimes:"0; 0.45; 0.55; 0.9; 1",dur:`${s}s`,repeatCount:"indefinite"})]})}),t.jsx("circle",{cx:"89.5",cy:"86.5",r:"48",fill:"none",stroke:"url(#strokeGradientInner_1427_22275)",strokeWidth:"9.6",strokeLinecap:"round",strokeDasharray:"300 100",children:i&&t.jsxs(t.Fragment,{children:[t.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"360 89.5 86.5",to:"0 89.5 86.5",dur:`${s/3}s`,repeatCount:"indefinite"}),t.jsx("animate",{attributeName:"stroke-dashoffset",values:"0; -300; -300; 0; 0",keyTimes:"0; 0.45; 0.55; 0.9; 1",dur:`${s}s`,repeatCount:"indefinite"})]})})]}),t.jsxs("defs",{children:[t.jsxs("filter",{id:"filter0_dddi_1427_22275",x:"0.882668",y:"0.899429",width:"198.08",height:"195.314",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[t.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),t.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),t.jsx("feOffset",{dy:"1.68224"}),t.jsx("feGaussianBlur",{stdDeviation:"4.20656"}),t.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),t.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.824495 0 0 0 0 0.824495 0 0 0 0 0.824495 0 0 0 1 0"}),t.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1427_22275"}),t.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),t.jsx("feOffset",{dx:"22.3542",dy:"22.6047"}),t.jsx("feGaussianBlur",{stdDeviation:"9.80447"}),t.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),t.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.740723 0 0 0 0 0.740723 0 0 0 0 0.740723 0 0 0 0.6 0"}),t.jsx("feBlend",{mode:"normal",in2:"effect1_dropShadow_1427_22275",result:"effect2_dropShadow_1427_22275"}),t.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),t.jsx("feOffset",{dx:"-6.03352",dy:"-3.01676"}),t.jsx("feGaussianBlur",{stdDeviation:"7.5419"}),t.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),t.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0"}),t.jsx("feBlend",{mode:"normal",in2:"effect2_dropShadow_1427_22275",result:"effect3_dropShadow_1427_22275"}),t.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow_1427_22275",result:"shape"}),t.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),t.jsx("feOffset",{dy:"1.50838"}),t.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),t.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"}),t.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect4_innerShadow_1427_22275"})]}),t.jsxs("linearGradient",{id:"strokeGradientOuter_1427_22275",x1:"89.5",y1:"19",x2:"89.5",y2:"154",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{stopColor:e}),t.jsx("stop",{offset:"1",stopColor:n})]}),t.jsxs("linearGradient",{id:"strokeGradientInner_1427_22275",x1:"89.4991",y1:"38.2849",x2:"89.4991",y2:"134.713",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{stopColor:r}),t.jsx("stop",{offset:"1",stopColor:o})]})]})]})})}),T=f.memo(L),N=f.createContext({}),v=()=>f.useContext(N);function U({children:e,props:n}){const[r,o]=f.useState(!1),s=a=>{o(a)},i=()=>{o(!1)};return t.jsx(N.Provider,{value:{...n,onLoadingHandler:s,loading:r,onLoaded:i},children:e})}const G="https://68b564fae5dc090291aeddd7.mockapi.io/api/config",I="https://68b564fae5dc090291aeddd7.mockapi.io/api/config",P="https://68b564fae5dc090291aeddd7.mockapi.io/api/config",D="tap-connect-sdk-iframe",x="https://connect.alpha.tap.company",F=({src:e})=>{const{loading:n}=v();return t.jsxs(t.Fragment,{children:[n&&t.jsx(T,{toggleAnimation:!0}),e&&t.jsx("iframe",{id:D,title:"connect",src:e,style:{width:"100%",height:"100%",border:"none",position:"absolute",top:0,left:0}})]})};var M=function(e){var n,r;return((r=(n=e==null?void 0:e.response)===null||n===void 0?void 0:n.data)===null||r===void 0?void 0:r.errors)!==void 0},B=function(e){return e instanceof Error},$=function(e){return typeof e=="string"},H=function(e){try{var n=e.response.data.errors,r=n[0],o=r.description,s=r.code;return{message:o,code:s}}catch(i){return{message:i.message,code:"UNKNOWN"}}},W=function(e){try{var n=e.message,r=n.split("::"),o=r[0],s=r[1];return{message:s,code:o}}catch(i){return{message:i.message,code:"UNKNOWN"}}},K=function(e){try{var n=e.split("::"),r=n[0],o=n[1];return{message:o,code:r}}catch(s){return{message:s,code:"UNKNOWN"}}},q=function(){function e(n){if(Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"message",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),M(n)){var r=H(n);this.code=r.code,this.message=r.message}else if(B(n)){var r=W(n);this.code=r.code,this.message=r.message}else if($(n)){var r=K(n);this.code=r.code,this.message=r.message}else this.code="UNKNOWN",this.message="Unknown error"}return Object.defineProperty(e.prototype,"getCode",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.code}}),Object.defineProperty(e.prototype,"getMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.message}}),Object.defineProperty(e.prototype,"getClientError",{enumerable:!1,configurable:!0,writable:!0,value:function(){return{message:this.message,code:this.code}}}),e}();const Y=(e="tap-connect-sdk-element")=>{const n=document.getElementById(e);if(n)return n;const r=document.createElement("div");return r.setAttribute("id",e),document.body.prepend(r),r},z=e=>e?["sa","sau"].includes(e.toLowerCase()):!1,J=e=>e==="dr",V=(e="")=>{const[n,r]=e.split("-");return z(n)?J(r)?P:I:G},Q=()=>{const[e,n]=u.useState(""),{onError:r,onLoadingHandler:o,loginMode:s,region:i,...a}=v(),p=async()=>{o(!0);try{const c=await fetch(V(i),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!c.ok)throw new Error(`${c.status}::${c.statusText}`);const d=await c.json();if(!d.redirect_url){const m=new URLSearchParams;a!=null&&a.theme&&m.append(h.THEME,a.theme),a!=null&&a.language&&m.append(h.LANGUAGE,a.language),m.append(h.PROFILE_TOKEN,d.id);const k=s?`${x}/auth`:x;d.redirect_url=`${k}?${m.toString()}`}if(a.mode!==g.PAGE)return n(d.redirect_url);window.location.href=d.redirect_url}catch(c){const d=new q(c);r==null||r(d.getClientError()),o(!1)}};return u.useEffect(()=>{p()},[]),{connectLink:e}},X=()=>{const{onSuccess:e,onClose:n,onError:r,onReady:o,onLoaded:s}=v(),i=u.useCallback(async a=>{if(a.origin!==x)return;const{data:p,event:c}=a.data;switch(c){case l.ON_CLOSE:n==null||n();break;case l.ON_ERROR:r==null||r(p);break;case l.ON_SUCCESS:e(p);break;case l.ON_LOADED:s();break;case l.ON_READY:o==null||o();break}},[n,r,s,o,e]);u.useEffect(()=>(window.addEventListener("message",i,!1),()=>{window.removeEventListener("message",i)}),[i])},Z=()=>{const{connectLink:e}=Q();return X(),t.jsx("div",{id:"tap-connect-main-container",style:{display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0, 0, 0, 0.5)",position:"fixed",top:0,left:0,width:"100%",height:"100%"},children:t.jsx(F,{src:e})})},ee=e=>t.jsx(U,{props:e,children:e.open&&t.jsx(Z,{})}),w=u.memo(ee);var S,j=A;S=j.createRoot,j.hydrateRoot;const te=(e,n)=>{const r=Y(e),o=S(r);return o.render(t.jsx(w,{...n})),{unmount:()=>o.unmount()}};exports.ConnectDialogEdgeFormat=E;exports.ConnectDialogTransition=b;exports.ConnectElement=w;exports.ConnectLanguage=O;exports.ConnectMode=g;exports.ConnectPasswordOperationType=y;exports.ConnectScope=_;exports.ConnectTheme=C;exports.renderConnectElement=te;
@@ -1,134 +1,234 @@
1
- import { jsx as o, jsxs as p, Fragment as v } from "react/jsx-runtime";
2
- import * as l from "react";
1
+ import { jsx as t, jsxs as c, Fragment as v } from "react/jsx-runtime";
2
+ import * as f from "react";
3
3
  import g from "react";
4
- import k from "react-dom";
5
- var O = /* @__PURE__ */ ((e) => (e.PAGE = "page", e.POPUP = "popup", e.CONTENT = "content", e))(O || {}), w = /* @__PURE__ */ ((e) => (e.AUTH = "auth", e.MERCHANT = "merchant", e))(w || {}), R = /* @__PURE__ */ ((e) => (e.SET_PASSWORD = "set_password", e.RESET_PASSWORD = "reset_password", e))(R || {}), L = /* @__PURE__ */ ((e) => (e.DARK = "dark", e.LIGHT = "light", e))(L || {}), S = /* @__PURE__ */ ((e) => (e.AR = "ar", e.EN = "en", e))(S || {}), A = /* @__PURE__ */ ((e) => (e.STRAIGHT = "straight", e.CURVED = "curved", e))(A || {}), T = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.RIGHT = "right", e.UP = "up", e.DOWN = "down", e))(T || {}), u = /* @__PURE__ */ ((e) => (e.ON_CLOSE = "connect:onClose", e.ON_ERROR = "connect:onError", e.ON_SUCCESS = "connect:onSuccess", e.ON_READY = "connect:onReady", e.ON_LOADED = "connect:onLoaded", e))(u || {}), h = /* @__PURE__ */ ((e) => (e.PROFILE_TOKEN = "profile_token", e.THEME = "theme", e.LANGUAGE = "lang", e))(h || {});
6
- const x = ({ outerColor: e = "white", innerColor: r = "white", duration: t = 3, toggleAnimation: n = !1 }) => /* @__PURE__ */ o(
4
+ import w from "react-dom";
5
+ var O = /* @__PURE__ */ ((e) => (e.PAGE = "page", e.POPUP = "popup", e.CONTENT = "content", e))(O || {}), x = /* @__PURE__ */ ((e) => (e.AUTH = "auth", e.MERCHANT = "merchant", e))(x || {}), k = /* @__PURE__ */ ((e) => (e.SET_PASSWORD = "set_password", e.RESET_PASSWORD = "reset_password", e))(k || {}), S = /* @__PURE__ */ ((e) => (e.DARK = "dark", e.LIGHT = "light", e))(S || {}), A = /* @__PURE__ */ ((e) => (e.AR = "ar", e.EN = "en", e))(A || {}), R = /* @__PURE__ */ ((e) => (e.STRAIGHT = "straight", e.CURVED = "curved", e))(R || {}), L = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.RIGHT = "right", e.UP = "up", e.DOWN = "down", e))(L || {}), u = /* @__PURE__ */ ((e) => (e.ON_CLOSE = "connect:onClose", e.ON_ERROR = "connect:onError", e.ON_SUCCESS = "connect:onSuccess", e.ON_READY = "connect:onReady", e.ON_LOADED = "connect:onLoaded", e))(u || {}), h = /* @__PURE__ */ ((e) => (e.PROFILE_TOKEN = "profile_token", e.THEME = "theme", e.LANGUAGE = "lang", e))(h || {});
6
+ const U = ({
7
+ outerStartColor: e = "rgba(244, 244, 244, 1)",
8
+ outerEndColor: n = "rgba(238, 238, 238, 1)",
9
+ innerStartColor: r = "rgba(244, 244, 244, 1)",
10
+ innerEndColor: o = "rgba(238, 238, 238, 1)",
11
+ duration: a = 3,
12
+ toggleAnimation: i = !1
13
+ }) => /* @__PURE__ */ t(
7
14
  "div",
8
15
  {
9
16
  style: {
10
- position: "absolute",
11
- display: "flex",
12
- justifyContent: "center",
13
- alignItems: "center",
14
- width: "100%",
15
- height: "100%"
17
+ position: "relative",
18
+ width: "135px",
19
+ height: "135px"
16
20
  },
17
- children: /* @__PURE__ */ o(
21
+ children: /* @__PURE__ */ t(
18
22
  "div",
19
23
  {
20
24
  style: {
21
- position: "relative",
22
- width: "60px",
23
- height: "60px"
25
+ position: "absolute",
26
+ display: "flex",
27
+ justifyContent: "center",
28
+ alignItems: "center",
29
+ width: "100%",
30
+ height: "100%",
31
+ opacity: 0.9
24
32
  },
25
- children: /* @__PURE__ */ p(
26
- "svg",
27
- {
28
- viewBox: "25 25 50 50",
29
- style: {
30
- transformOrigin: "center center",
31
- position: "absolute",
32
- top: 0,
33
- left: 0,
34
- margin: "auto"
35
- },
36
- children: [
37
- /* @__PURE__ */ o(
38
- "circle",
39
- {
40
- cx: "50",
41
- cy: "50",
42
- r: "20",
43
- fill: "none",
44
- stroke: e,
45
- strokeWidth: "3.6px",
46
- strokeLinecap: "round",
47
- strokeDasharray: "125, 124",
48
- children: n && /* @__PURE__ */ p(v, { children: [
49
- /* @__PURE__ */ o(
50
- "animateTransform",
51
- {
52
- attributeName: "transform",
53
- type: "rotate",
54
- from: "0 50 50",
55
- to: "360 50 50",
56
- dur: `${t || 0 / 3}s`,
57
- repeatCount: "indefinite"
58
- }
59
- ),
60
- /* @__PURE__ */ o(
61
- "animate",
62
- {
63
- attributeName: "stroke-dashoffset",
64
- values: "0; 122; 122; 0; 0",
65
- keyTimes: "0; 0.45; 0.55; 0.9; 1",
66
- dur: `${t}s`,
67
- repeatCount: "indefinite"
68
- }
69
- )
70
- ] })
71
- }
72
- ),
73
- /* @__PURE__ */ o(
74
- "circle",
75
- {
76
- cx: "50",
77
- cy: "50",
78
- r: "14",
79
- fill: "none",
80
- stroke: r,
81
- strokeWidth: "3.6px",
82
- strokeLinecap: "round",
83
- strokeDasharray: "88, 124",
84
- children: n && /* @__PURE__ */ p(v, { children: [
85
- /* @__PURE__ */ o(
86
- "animateTransform",
87
- {
88
- attributeName: "transform",
89
- type: "rotate",
90
- from: "360 50 50",
91
- to: "0 50 50",
92
- dur: `${t || 0 / 3}s`,
93
- repeatCount: "indefinite"
94
- }
95
- ),
96
- /* @__PURE__ */ o(
97
- "animate",
98
- {
99
- attributeName: "stroke-dashoffset",
100
- values: "0; -85; -85; 0; 0",
101
- keyTimes: "0; 0.45; 0.55; 0.9; 1",
102
- dur: `${t}s`,
103
- repeatCount: "indefinite"
104
- }
105
- )
106
- ] })
107
- }
108
- )
109
- ]
110
- }
111
- )
33
+ children: /* @__PURE__ */ c("svg", { width: "199", height: "197", viewBox: "0 0 199 197", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
34
+ /* @__PURE__ */ c("g", { children: [
35
+ /* @__PURE__ */ t(
36
+ "circle",
37
+ {
38
+ cx: "89.5",
39
+ cy: "86.5",
40
+ r: "67.5",
41
+ fill: "none",
42
+ stroke: "url(#strokeGradientOuter_1427_22275)",
43
+ strokeWidth: "9.6",
44
+ strokeLinecap: "round",
45
+ strokeDasharray: "425 125",
46
+ children: i && /* @__PURE__ */ c(v, { children: [
47
+ /* @__PURE__ */ t(
48
+ "animateTransform",
49
+ {
50
+ attributeName: "transform",
51
+ type: "rotate",
52
+ from: "0 89.5 86.5",
53
+ to: "360 89.5 86.5",
54
+ dur: `${a / 3}s`,
55
+ repeatCount: "indefinite"
56
+ }
57
+ ),
58
+ /* @__PURE__ */ t(
59
+ "animate",
60
+ {
61
+ attributeName: "stroke-dashoffset",
62
+ values: "0; 425; 425; 0; 0",
63
+ keyTimes: "0; 0.45; 0.55; 0.9; 1",
64
+ dur: `${a}s`,
65
+ repeatCount: "indefinite"
66
+ }
67
+ )
68
+ ] })
69
+ }
70
+ ),
71
+ /* @__PURE__ */ t(
72
+ "circle",
73
+ {
74
+ cx: "89.5",
75
+ cy: "86.5",
76
+ r: "48",
77
+ fill: "none",
78
+ stroke: "url(#strokeGradientInner_1427_22275)",
79
+ strokeWidth: "9.6",
80
+ strokeLinecap: "round",
81
+ strokeDasharray: "300 100",
82
+ children: i && /* @__PURE__ */ c(v, { children: [
83
+ /* @__PURE__ */ t(
84
+ "animateTransform",
85
+ {
86
+ attributeName: "transform",
87
+ type: "rotate",
88
+ from: "360 89.5 86.5",
89
+ to: "0 89.5 86.5",
90
+ dur: `${a / 3}s`,
91
+ repeatCount: "indefinite"
92
+ }
93
+ ),
94
+ /* @__PURE__ */ t(
95
+ "animate",
96
+ {
97
+ attributeName: "stroke-dashoffset",
98
+ values: "0; -300; -300; 0; 0",
99
+ keyTimes: "0; 0.45; 0.55; 0.9; 1",
100
+ dur: `${a}s`,
101
+ repeatCount: "indefinite"
102
+ }
103
+ )
104
+ ] })
105
+ }
106
+ )
107
+ ] }),
108
+ /* @__PURE__ */ c("defs", { children: [
109
+ /* @__PURE__ */ c(
110
+ "filter",
111
+ {
112
+ id: "filter0_dddi_1427_22275",
113
+ x: "0.882668",
114
+ y: "0.899429",
115
+ width: "198.08",
116
+ height: "195.314",
117
+ filterUnits: "userSpaceOnUse",
118
+ colorInterpolationFilters: "sRGB",
119
+ children: [
120
+ /* @__PURE__ */ t("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
121
+ /* @__PURE__ */ t(
122
+ "feColorMatrix",
123
+ {
124
+ in: "SourceAlpha",
125
+ type: "matrix",
126
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
127
+ result: "hardAlpha"
128
+ }
129
+ ),
130
+ /* @__PURE__ */ t("feOffset", { dy: "1.68224" }),
131
+ /* @__PURE__ */ t("feGaussianBlur", { stdDeviation: "4.20656" }),
132
+ /* @__PURE__ */ t("feComposite", { in2: "hardAlpha", operator: "out" }),
133
+ /* @__PURE__ */ t("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.824495 0 0 0 0 0.824495 0 0 0 0 0.824495 0 0 0 1 0" }),
134
+ /* @__PURE__ */ t("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_1427_22275" }),
135
+ /* @__PURE__ */ t(
136
+ "feColorMatrix",
137
+ {
138
+ in: "SourceAlpha",
139
+ type: "matrix",
140
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
141
+ result: "hardAlpha"
142
+ }
143
+ ),
144
+ /* @__PURE__ */ t("feOffset", { dx: "22.3542", dy: "22.6047" }),
145
+ /* @__PURE__ */ t("feGaussianBlur", { stdDeviation: "9.80447" }),
146
+ /* @__PURE__ */ t("feComposite", { in2: "hardAlpha", operator: "out" }),
147
+ /* @__PURE__ */ t("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.740723 0 0 0 0 0.740723 0 0 0 0 0.740723 0 0 0 0.6 0" }),
148
+ /* @__PURE__ */ t("feBlend", { mode: "normal", in2: "effect1_dropShadow_1427_22275", result: "effect2_dropShadow_1427_22275" }),
149
+ /* @__PURE__ */ t(
150
+ "feColorMatrix",
151
+ {
152
+ in: "SourceAlpha",
153
+ type: "matrix",
154
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
155
+ result: "hardAlpha"
156
+ }
157
+ ),
158
+ /* @__PURE__ */ t("feOffset", { dx: "-6.03352", dy: "-3.01676" }),
159
+ /* @__PURE__ */ t("feGaussianBlur", { stdDeviation: "7.5419" }),
160
+ /* @__PURE__ */ t("feComposite", { in2: "hardAlpha", operator: "out" }),
161
+ /* @__PURE__ */ t("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.7 0" }),
162
+ /* @__PURE__ */ t("feBlend", { mode: "normal", in2: "effect2_dropShadow_1427_22275", result: "effect3_dropShadow_1427_22275" }),
163
+ /* @__PURE__ */ t("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect3_dropShadow_1427_22275", result: "shape" }),
164
+ /* @__PURE__ */ t(
165
+ "feColorMatrix",
166
+ {
167
+ in: "SourceAlpha",
168
+ type: "matrix",
169
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
170
+ result: "hardAlpha"
171
+ }
172
+ ),
173
+ /* @__PURE__ */ t("feOffset", { dy: "1.50838" }),
174
+ /* @__PURE__ */ t("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
175
+ /* @__PURE__ */ t("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0" }),
176
+ /* @__PURE__ */ t("feBlend", { mode: "normal", in2: "shape", result: "effect4_innerShadow_1427_22275" })
177
+ ]
178
+ }
179
+ ),
180
+ /* @__PURE__ */ c(
181
+ "linearGradient",
182
+ {
183
+ id: "strokeGradientOuter_1427_22275",
184
+ x1: "89.5",
185
+ y1: "19",
186
+ x2: "89.5",
187
+ y2: "154",
188
+ gradientUnits: "userSpaceOnUse",
189
+ children: [
190
+ /* @__PURE__ */ t("stop", { stopColor: e }),
191
+ /* @__PURE__ */ t("stop", { offset: "1", stopColor: n })
192
+ ]
193
+ }
194
+ ),
195
+ /* @__PURE__ */ c(
196
+ "linearGradient",
197
+ {
198
+ id: "strokeGradientInner_1427_22275",
199
+ x1: "89.4991",
200
+ y1: "38.2849",
201
+ x2: "89.4991",
202
+ y2: "134.713",
203
+ gradientUnits: "userSpaceOnUse",
204
+ children: [
205
+ /* @__PURE__ */ t("stop", { stopColor: r }),
206
+ /* @__PURE__ */ t("stop", { offset: "1", stopColor: o })
207
+ ]
208
+ }
209
+ )
210
+ ] })
211
+ ] })
112
212
  }
113
213
  )
114
214
  }
115
- ), U = g.memo(x), y = g.createContext({}), N = () => g.useContext(y);
116
- function I({ children: e, props: r }) {
117
- const [t, n] = g.useState(!1), a = (s) => {
118
- n(s);
215
+ ), G = g.memo(U), C = g.createContext({}), y = () => g.useContext(C);
216
+ function T({ children: e, props: n }) {
217
+ const [r, o] = g.useState(!1), a = (s) => {
218
+ o(s);
119
219
  }, i = () => {
120
- n(!1);
220
+ o(!1);
121
221
  };
122
- return /* @__PURE__ */ o(y.Provider, { value: { ...r, onLoadingHandler: a, loading: t, onLoaded: i }, children: e });
222
+ return /* @__PURE__ */ t(C.Provider, { value: { ...n, onLoadingHandler: a, loading: r, onLoaded: i }, children: e });
123
223
  }
124
- const P = "https://68b564fae5dc090291aeddd7.mockapi.io/api/config", G = "https://68b564fae5dc090291aeddd7.mockapi.io/api/config", $ = "https://68b564fae5dc090291aeddd7.mockapi.io/api/config", j = "tap-connect-sdk-iframe", E = "https://connect.alpha.tap.company", D = ({ src: e }) => {
125
- const { loading: r } = N();
126
- return /* @__PURE__ */ p(v, { children: [
127
- r && /* @__PURE__ */ o(U, { toggleAnimation: !0 }),
128
- e && /* @__PURE__ */ o(
224
+ const I = "https://68b564fae5dc090291aeddd7.mockapi.io/api/config", P = "https://68b564fae5dc090291aeddd7.mockapi.io/api/config", D = "https://68b564fae5dc090291aeddd7.mockapi.io/api/config", B = "tap-connect-sdk-iframe", _ = "https://connect.alpha.tap.company", $ = ({ src: e }) => {
225
+ const { loading: n } = y();
226
+ return /* @__PURE__ */ c(v, { children: [
227
+ n && /* @__PURE__ */ t(G, { toggleAnimation: !0 }),
228
+ e && /* @__PURE__ */ t(
129
229
  "iframe",
130
230
  {
131
- id: j,
231
+ id: B,
132
232
  title: "connect",
133
233
  src: e,
134
234
  style: {
@@ -143,18 +243,18 @@ const P = "https://68b564fae5dc090291aeddd7.mockapi.io/api/config", G = "https:/
143
243
  )
144
244
  ] });
145
245
  };
146
- var H = function(e) {
147
- var r, t;
148
- return ((t = (r = e == null ? void 0 : e.response) === null || r === void 0 ? void 0 : r.data) === null || t === void 0 ? void 0 : t.errors) !== void 0;
149
- }, W = function(e) {
150
- return e instanceof Error;
246
+ var j = function(e) {
247
+ var n, r;
248
+ return ((r = (n = e == null ? void 0 : e.response) === null || n === void 0 ? void 0 : n.data) === null || r === void 0 ? void 0 : r.errors) !== void 0;
151
249
  }, F = function(e) {
250
+ return e instanceof Error;
251
+ }, M = function(e) {
152
252
  return typeof e == "string";
153
- }, K = function(e) {
253
+ }, H = function(e) {
154
254
  try {
155
- var r = e.response.data.errors, t = r[0], n = t.description, a = t.code;
255
+ var n = e.response.data.errors, r = n[0], o = r.description, a = r.code;
156
256
  return {
157
- message: n,
257
+ message: o,
158
258
  code: a
159
259
  };
160
260
  } catch (i) {
@@ -163,12 +263,12 @@ var H = function(e) {
163
263
  code: "UNKNOWN"
164
264
  };
165
265
  }
166
- }, M = function(e) {
266
+ }, W = function(e) {
167
267
  try {
168
- var r = e.message, t = r.split("::"), n = t[0], a = t[1];
268
+ var n = e.message, r = n.split("::"), o = r[0], a = r[1];
169
269
  return {
170
270
  message: a,
171
- code: n
271
+ code: o
172
272
  };
173
273
  } catch (i) {
174
274
  return {
@@ -176,12 +276,12 @@ var H = function(e) {
176
276
  code: "UNKNOWN"
177
277
  };
178
278
  }
179
- }, B = function(e) {
279
+ }, K = function(e) {
180
280
  try {
181
- var r = e.split("::"), t = r[0], n = r[1];
281
+ var n = e.split("::"), r = n[0], o = n[1];
182
282
  return {
183
- message: n,
184
- code: t
283
+ message: o,
284
+ code: r
185
285
  };
186
286
  } catch (a) {
187
287
  return {
@@ -190,7 +290,7 @@ var H = function(e) {
190
290
  };
191
291
  }
192
292
  }, Y = function() {
193
- function e(r) {
293
+ function e(n) {
194
294
  if (Object.defineProperty(this, "code", {
195
295
  enumerable: !0,
196
296
  configurable: !0,
@@ -201,15 +301,15 @@ var H = function(e) {
201
301
  configurable: !0,
202
302
  writable: !0,
203
303
  value: void 0
204
- }), H(r)) {
205
- var t = K(r);
206
- this.code = t.code, this.message = t.message;
207
- } else if (W(r)) {
208
- var t = M(r);
209
- this.code = t.code, this.message = t.message;
210
- } else if (F(r)) {
211
- var t = B(r);
212
- this.code = t.code, this.message = t.message;
304
+ }), j(n)) {
305
+ var r = H(n);
306
+ this.code = r.code, this.message = r.message;
307
+ } else if (F(n)) {
308
+ var r = W(n);
309
+ this.code = r.code, this.message = r.message;
310
+ } else if (M(n)) {
311
+ var r = K(n);
312
+ this.code = r.code, this.message = r.message;
213
313
  } else
214
314
  this.code = "UNKNOWN", this.message = "Unknown error";
215
315
  }
@@ -240,74 +340,74 @@ var H = function(e) {
240
340
  }), e;
241
341
  }();
242
342
  const q = (e = "tap-connect-sdk-element") => {
243
- const r = document.getElementById(e);
244
- if (r) return r;
245
- const t = document.createElement("div");
246
- return t.setAttribute("id", e), document.body.prepend(t), t;
343
+ const n = document.getElementById(e);
344
+ if (n) return n;
345
+ const r = document.createElement("div");
346
+ return r.setAttribute("id", e), document.body.prepend(r), r;
247
347
  }, J = (e) => e ? ["sa", "sau"].includes(e.toLowerCase()) : !1, V = (e) => e === "dr", z = (e = "") => {
248
- const [r, t] = e.split("-");
249
- return J(r) ? V(t) ? $ : G : P;
348
+ const [n, r] = e.split("-");
349
+ return J(n) ? V(r) ? D : P : I;
250
350
  }, Q = () => {
251
- const [e, r] = l.useState(""), { onError: t, onLoadingHandler: n, loginMode: a, region: i, ...s } = N(), f = async () => {
252
- n(!0);
351
+ const [e, n] = f.useState(""), { onError: r, onLoadingHandler: o, loginMode: a, region: i, ...s } = y(), p = async () => {
352
+ o(!0);
253
353
  try {
254
- const c = await fetch(z(i), {
354
+ const d = await fetch(z(i), {
255
355
  method: "POST",
256
356
  headers: {
257
357
  "Content-Type": "application/json"
258
358
  },
259
359
  body: JSON.stringify(s)
260
360
  });
261
- if (!c.ok)
262
- throw new Error(`${c.status}::${c.statusText}`);
263
- const d = await c.json();
264
- if (!d.redirect_url) {
361
+ if (!d.ok)
362
+ throw new Error(`${d.status}::${d.statusText}`);
363
+ const l = await d.json();
364
+ if (!l.redirect_url) {
265
365
  const m = new URLSearchParams();
266
- s != null && s.theme && m.append(h.THEME, s.theme), s != null && s.language && m.append(h.LANGUAGE, s.language), m.append(h.PROFILE_TOKEN, d.id);
267
- const _ = a ? `${E}/auth` : E;
268
- d.redirect_url = `${_}?${m.toString()}`;
366
+ s != null && s.theme && m.append(h.THEME, s.theme), s != null && s.language && m.append(h.LANGUAGE, s.language), m.append(h.PROFILE_TOKEN, l.id);
367
+ const b = a ? `${_}/auth` : _;
368
+ l.redirect_url = `${b}?${m.toString()}`;
269
369
  }
270
- if (s.mode !== O.PAGE) return r(d.redirect_url);
271
- window.location.href = d.redirect_url;
272
- } catch (c) {
273
- const d = new Y(c);
274
- t == null || t(d.getClientError()), n(!1);
370
+ if (s.mode !== O.PAGE) return n(l.redirect_url);
371
+ window.location.href = l.redirect_url;
372
+ } catch (d) {
373
+ const l = new Y(d);
374
+ r == null || r(l.getClientError()), o(!1);
275
375
  }
276
376
  };
277
- return l.useEffect(() => {
278
- f();
377
+ return f.useEffect(() => {
378
+ p();
279
379
  }, []), { connectLink: e };
280
380
  }, X = () => {
281
- const { onSuccess: e, onClose: r, onError: t, onReady: n, onLoaded: a } = N(), i = l.useCallback(
381
+ const { onSuccess: e, onClose: n, onError: r, onReady: o, onLoaded: a } = y(), i = f.useCallback(
282
382
  async (s) => {
283
- if (s.origin !== E) return;
284
- const { data: f, event: c } = s.data;
285
- switch (c) {
383
+ if (s.origin !== _) return;
384
+ const { data: p, event: d } = s.data;
385
+ switch (d) {
286
386
  case u.ON_CLOSE:
287
- r == null || r();
387
+ n == null || n();
288
388
  break;
289
389
  case u.ON_ERROR:
290
- t == null || t(f);
390
+ r == null || r(p);
291
391
  break;
292
392
  case u.ON_SUCCESS:
293
- e(f);
393
+ e(p);
294
394
  break;
295
395
  case u.ON_LOADED:
296
396
  a();
297
397
  break;
298
398
  case u.ON_READY:
299
- n == null || n();
399
+ o == null || o();
300
400
  break;
301
401
  }
302
402
  },
303
- [r, t, a, n, e]
403
+ [n, r, a, o, e]
304
404
  );
305
- l.useEffect(() => (window.addEventListener("message", i, !1), () => {
405
+ f.useEffect(() => (window.addEventListener("message", i, !1), () => {
306
406
  window.removeEventListener("message", i);
307
407
  }), [i]);
308
408
  }, Z = () => {
309
409
  const { connectLink: e } = Q();
310
- return X(), /* @__PURE__ */ o(
410
+ return X(), /* @__PURE__ */ t(
311
411
  "div",
312
412
  {
313
413
  id: "tap-connect-main-container",
@@ -322,24 +422,24 @@ const q = (e = "tap-connect-sdk-element") => {
322
422
  width: "100%",
323
423
  height: "100%"
324
424
  },
325
- children: /* @__PURE__ */ o(D, { src: e })
425
+ children: /* @__PURE__ */ t($, { src: e })
326
426
  }
327
427
  );
328
- }, ee = (e) => /* @__PURE__ */ o(I, { props: e, children: e.open && /* @__PURE__ */ o(Z, {}) }), te = l.memo(ee);
329
- var C, b = k;
330
- C = b.createRoot, b.hydrateRoot;
331
- const se = (e, r) => {
332
- const t = q(e), n = C(t);
333
- return n.render(/* @__PURE__ */ o(te, { ...r })), { unmount: () => n.unmount() };
428
+ }, ee = (e) => /* @__PURE__ */ t(T, { props: e, children: e.open && /* @__PURE__ */ t(Z, {}) }), te = f.memo(ee);
429
+ var N, E = w;
430
+ N = E.createRoot, E.hydrateRoot;
431
+ const ae = (e, n) => {
432
+ const r = q(e), o = N(r);
433
+ return o.render(/* @__PURE__ */ t(te, { ...n })), { unmount: () => o.unmount() };
334
434
  };
335
435
  export {
336
- A as ConnectDialogEdgeFormat,
337
- T as ConnectDialogTransition,
436
+ R as ConnectDialogEdgeFormat,
437
+ L as ConnectDialogTransition,
338
438
  te as ConnectElement,
339
- S as ConnectLanguage,
439
+ A as ConnectLanguage,
340
440
  O as ConnectMode,
341
- R as ConnectPasswordOperationType,
342
- w as ConnectScope,
343
- L as ConnectTheme,
344
- se as renderConnectElement
441
+ k as ConnectPasswordOperationType,
442
+ x as ConnectScope,
443
+ S as ConnectTheme,
444
+ ae as renderConnectElement
345
445
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/connect-v2",
3
3
  "private": false,
4
- "version": "0.0.25-test",
4
+ "version": "0.0.27-test",
5
5
  "type": "module",
6
6
  "main": "build/index.cjs.js",
7
7
  "module": "build/index.esm.js",