@crossmint/client-sdk-react-ui 2.4.9 → 2.4.10

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.
Files changed (156) hide show
  1. package/dist/{chunk-6TMNNSYP.js → chunk-345ENAUC.js} +1 -1
  2. package/dist/{chunk-GZUP3NNT.js → chunk-3NMRVOY6.js} +1 -1
  3. package/dist/{chunk-UWI5ROHW.js → chunk-3YPQAKAI.js} +1 -1
  4. package/dist/{chunk-CBP7TWQD.cjs → chunk-4XMUXRLE.cjs} +1 -1
  5. package/dist/{chunk-QPTJFQXE.js → chunk-5H3WVTOV.js} +1 -1
  6. package/dist/{chunk-IMHX5FRF.js → chunk-5KJ2KALX.js} +1 -1
  7. package/dist/{chunk-QQP4GR7V.js → chunk-5Y4MVXO3.js} +1 -1
  8. package/dist/{chunk-UUQU4IKI.cjs → chunk-624L3FXV.cjs} +1 -1
  9. package/dist/{chunk-XCEHVKTJ.js → chunk-6K7XVDVI.js} +1 -1
  10. package/dist/{chunk-BHDLWLW6.js → chunk-7XH6DK4Q.js} +1 -1
  11. package/dist/{chunk-DJZOP4MT.cjs → chunk-ATDERG4O.cjs} +1 -1
  12. package/dist/{chunk-V6ICEZQS.cjs → chunk-BE7RGTT7.cjs} +1 -1
  13. package/dist/{chunk-57IWJ7QC.cjs → chunk-BHBQRNYR.cjs} +1 -1
  14. package/dist/{chunk-SFALUIYN.cjs → chunk-CVTTOXFF.cjs} +1 -1
  15. package/dist/{chunk-HJGCM4XH.js → chunk-D3MVZSMW.js} +1 -1
  16. package/dist/{chunk-XNNGBVFG.cjs → chunk-DMBRTNOC.cjs} +2 -2
  17. package/dist/{chunk-GGGQABDX.cjs → chunk-DUZHNEJF.cjs} +1 -1
  18. package/dist/{chunk-PDQRQ7UO.js → chunk-ECQOSJPK.js} +1 -1
  19. package/dist/{chunk-WHUNYZQD.js → chunk-GTWWEDRN.js} +1 -1
  20. package/dist/{chunk-QQ24JZJV.cjs → chunk-GU7BZ6S4.cjs} +1 -1
  21. package/dist/{chunk-ZOUOVKYT.cjs → chunk-H2NNL44D.cjs} +1 -1
  22. package/dist/{chunk-5AMDRL3A.js → chunk-H6PKK57A.js} +1 -1
  23. package/dist/{chunk-5VDUIODV.cjs → chunk-HVJJR7LZ.cjs} +1 -1
  24. package/dist/{chunk-QZHJH22E.js → chunk-JCV5F5P2.js} +1 -1
  25. package/dist/{chunk-JL7YHC7D.js → chunk-KXET5JJK.js} +1 -1
  26. package/dist/{chunk-LH6KXJSA.cjs → chunk-M47FVX6J.cjs} +1 -1
  27. package/dist/{chunk-6GJWVLAZ.js → chunk-M7YXRJP3.js} +1 -1
  28. package/dist/{chunk-MS75EYBH.js → chunk-MDPX34P6.js} +1 -1
  29. package/dist/{chunk-U7W3V4AV.js → chunk-MLLK43GG.js} +1 -1
  30. package/dist/{chunk-FAUXH2II.cjs → chunk-MVBCKSSL.cjs} +1 -1
  31. package/dist/{chunk-7ZAT35XW.js → chunk-P4T3QE7U.js} +1 -1
  32. package/dist/{chunk-CD6E2BGD.cjs → chunk-PNO4Y65F.cjs} +1 -1
  33. package/dist/{chunk-RV2X7AFS.js → chunk-QU7VSBN2.js} +1 -1
  34. package/dist/{chunk-7WGCMUOL.cjs → chunk-RAZOSQP6.cjs} +1 -1
  35. package/dist/{chunk-VKLZD4KR.js → chunk-RHYGVGUL.js} +1 -1
  36. package/dist/{chunk-NB4ENN4K.cjs → chunk-S3EP642Q.cjs} +1 -1
  37. package/dist/chunk-SNGPAN52.js +1 -0
  38. package/dist/{chunk-VUM4VV6B.cjs → chunk-TGSHZZKK.cjs} +6 -6
  39. package/dist/{chunk-WK3BTTQG.cjs → chunk-UR7K2LG3.cjs} +2 -2
  40. package/dist/{chunk-7U6Q4ELB.cjs → chunk-WHOJW5RE.cjs} +1 -1
  41. package/dist/{chunk-YEXRA5WE.cjs → chunk-WRVBSINT.cjs} +2 -2
  42. package/dist/{chunk-FU7BPPGX.js → chunk-WVDQLXUX.js} +1 -1
  43. package/dist/{chunk-3IRE2QDL.cjs → chunk-WW4QOF32.cjs} +1 -1
  44. package/dist/{chunk-O3H2EYFA.cjs → chunk-XDNHO57L.cjs} +1 -1
  45. package/dist/{chunk-TD7Y5ILY.js → chunk-XG376MHH.js} +1 -1
  46. package/dist/{chunk-AEMXKW6F.js → chunk-YKYVRGXF.js} +1 -1
  47. package/dist/{chunk-DFLQL2LX.cjs → chunk-ZIZ25SMX.cjs} +1 -1
  48. package/dist/{chunk-JV6SCCNC.cjs → chunk-ZTCUGHEW.cjs} +1 -1
  49. package/dist/components/CrossmintNFTCollectionView.cjs +1 -1
  50. package/dist/components/CrossmintNFTCollectionView.js +1 -1
  51. package/dist/components/CrossmintNFTDetail.cjs +1 -1
  52. package/dist/components/CrossmintNFTDetail.js +1 -1
  53. package/dist/components/auth/AuthForm.cjs +1 -1
  54. package/dist/components/auth/AuthForm.js +1 -1
  55. package/dist/components/auth/AuthFormBackButton.cjs +1 -1
  56. package/dist/components/auth/AuthFormBackButton.js +1 -1
  57. package/dist/components/auth/AuthFormDialog.cjs +1 -1
  58. package/dist/components/auth/AuthFormDialog.js +1 -1
  59. package/dist/components/auth/EmbeddedAuthForm.cjs +1 -1
  60. package/dist/components/auth/EmbeddedAuthForm.js +1 -1
  61. package/dist/components/auth/PasskeyPrompt.cjs +1 -1
  62. package/dist/components/auth/PasskeyPrompt.js +1 -1
  63. package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -1
  64. package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -1
  65. package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -1
  66. package/dist/components/auth/methods/email/EmailOTPInput.js +1 -1
  67. package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -1
  68. package/dist/components/auth/methods/email/EmailSignIn.js +1 -1
  69. package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +1 -1
  70. package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -1
  71. package/dist/components/auth/methods/google/ContinueWithGoogle.cjs +1 -1
  72. package/dist/components/auth/methods/google/ContinueWithGoogle.js +1 -1
  73. package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -1
  74. package/dist/components/auth/methods/google/GoogleSignIn.js +1 -1
  75. package/dist/components/auth/methods/twitter/TwitterSignIn.cjs +1 -1
  76. package/dist/components/auth/methods/twitter/TwitterSignIn.js +1 -1
  77. package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +1 -1
  78. package/dist/components/auth/methods/web3/Web3AuthFlow.js +1 -1
  79. package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +1 -1
  80. package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +1 -1
  81. package/dist/components/auth/methods/web3/Web3Connectors.cjs +1 -1
  82. package/dist/components/auth/methods/web3/Web3Connectors.js +1 -1
  83. package/dist/components/common/CountdownButton.cjs +1 -1
  84. package/dist/components/common/CountdownButton.js +1 -1
  85. package/dist/components/common/Dialog.cjs +1 -1
  86. package/dist/components/common/Dialog.js +1 -1
  87. package/dist/components/common/Divider.cjs +1 -1
  88. package/dist/components/common/Divider.js +1 -1
  89. package/dist/components/common/InputOTP.cjs +1 -1
  90. package/dist/components/common/InputOTP.js +1 -1
  91. package/dist/components/common/OAuthButton.cjs +1 -1
  92. package/dist/components/common/OAuthButton.js +1 -1
  93. package/dist/components/common/SecuredByCrossmint.cjs +1 -1
  94. package/dist/components/common/SecuredByCrossmint.js +1 -1
  95. package/dist/components/common/Spinner.cjs +1 -1
  96. package/dist/components/common/Spinner.js +1 -1
  97. package/dist/components/embed/index.cjs +1 -1
  98. package/dist/components/embed/index.js +1 -1
  99. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -1
  100. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
  101. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -1
  102. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -1
  103. package/dist/components/embed/v3/index.cjs +1 -1
  104. package/dist/components/embed/v3/index.js +1 -1
  105. package/dist/components/hosted/index.cjs +1 -1
  106. package/dist/components/hosted/index.js +1 -1
  107. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -1
  108. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -1
  109. package/dist/components/hosted/v3/index.cjs +1 -1
  110. package/dist/components/hosted/v3/index.js +1 -1
  111. package/dist/components/index.cjs +1 -1
  112. package/dist/components/index.js +1 -1
  113. package/dist/components/signers/BaseCodeInput.cjs +1 -1
  114. package/dist/components/signers/BaseCodeInput.js +1 -1
  115. package/dist/components/signers/BaseConfirmation.cjs +1 -1
  116. package/dist/components/signers/BaseConfirmation.js +1 -1
  117. package/dist/components/signers/EmailSignersDialog.cjs +1 -1
  118. package/dist/components/signers/EmailSignersDialog.js +1 -1
  119. package/dist/components/signers/PhoneSignersDialog.cjs +1 -1
  120. package/dist/components/signers/PhoneSignersDialog.js +1 -1
  121. package/dist/components/signers/index.cjs +1 -1
  122. package/dist/components/signers/index.js +1 -1
  123. package/dist/consts/version.cjs +1 -1
  124. package/dist/consts/version.js +1 -1
  125. package/dist/hooks/index.cjs +1 -1
  126. package/dist/hooks/index.js +1 -1
  127. package/dist/hooks/useAuth.cjs +1 -1
  128. package/dist/hooks/useAuth.js +1 -1
  129. package/dist/hooks/useCrossmintAuth.cjs +1 -1
  130. package/dist/hooks/useCrossmintAuth.js +1 -1
  131. package/dist/hooks/useCrossmintCheckout.cjs +1 -1
  132. package/dist/hooks/useCrossmintCheckout.js +1 -1
  133. package/dist/hooks/useOAuthWindowListener.cjs +1 -1
  134. package/dist/hooks/useOAuthWindowListener.js +1 -1
  135. package/dist/icons/phoneOTP.cjs +1 -1
  136. package/dist/icons/phoneOTP.js +1 -1
  137. package/dist/index.cjs +1 -1
  138. package/dist/index.js +1 -1
  139. package/dist/providers/CrossmintAuthProvider.cjs +1 -1
  140. package/dist/providers/CrossmintAuthProvider.js +1 -1
  141. package/dist/providers/CrossmintAuthProviderInternal.cjs +1 -1
  142. package/dist/providers/CrossmintAuthProviderInternal.js +1 -1
  143. package/dist/providers/CrossmintWalletProvider.cjs +1 -1
  144. package/dist/providers/CrossmintWalletProvider.js +1 -1
  145. package/dist/providers/auth/OAuthFlowProvider.cjs +1 -1
  146. package/dist/providers/auth/OAuthFlowProvider.js +1 -1
  147. package/dist/providers/dynamic/DynamicWalletProvider.cjs +1 -1
  148. package/dist/providers/dynamic/DynamicWalletProvider.js +1 -1
  149. package/dist/providers/index.cjs +1 -1
  150. package/dist/providers/index.js +1 -1
  151. package/dist/styles/index.cjs +1 -1
  152. package/dist/styles/index.js +1 -1
  153. package/dist/utils/createCrossmintApiClient.cjs +1 -1
  154. package/dist/utils/createCrossmintApiClient.js +1 -1
  155. package/package.json +7 -7
  156. package/dist/chunk-5DZHDRT6.js +0 -1
@@ -1 +1 @@
1
- import{a as n}from"./chunk-5DZHDRT6.js";import{CrossmintApiClient as e}from"@crossmint/common-sdk-base";function m(t,i){return new e(t,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-ui",version:n},apiKeyExpectations:i}})}export{m as a};
1
+ import{a as n}from"./chunk-SNGPAN52.js";import{CrossmintApiClient as e}from"@crossmint/common-sdk-base";function m(t,i){return new e(t,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-ui",version:n},apiKeyExpectations:i}})}export{m as a};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-5DZHDRT6.js";import{assertValidNFTCollectionViewProps as r,getNFTCollectionViewSrc as t}from"@crossmint/client-sdk-base";import{jsx as n}from"react/jsx-runtime";function w(o){r(o);let i=t(o,e);return n("iframe",{src:i,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-collection-view"})}export{w as a};
1
+ import{a as e}from"./chunk-SNGPAN52.js";import{assertValidNFTCollectionViewProps as r,getNFTCollectionViewSrc as t}from"@crossmint/client-sdk-base";import{jsx as n}from"react/jsx-runtime";function w(o){r(o);let i=t(o,e);return n("iframe",{src:i,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-collection-view"})}export{w as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-6TMNNSYP.js";import{createContext as p,useContext as h,useEffect as l,useState as i}from"react";import{useCrossmint as g}from"@crossmint/client-sdk-react-base";import{jsx as k}from"react/jsx-runtime";var s=p(void 0);function b({children:e}){let[r,d]=i(void 0),[c,u]=i(void 0),{crossmint:C}=g(),m=o(C,{usageOrigin:"client"});return l(()=>{let n=t=>{if(t.origin!==new URL(m.baseUrl).origin||t.data.event!=="order:updated")return;let{order:a,orderClientSecret:f}=t.data.data;d(a),u(f)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[r]),k(s.Provider,{value:{order:r,orderClientSecret:c},children:e})}function S(){let e=h(s);if(!e)throw new Error("useCrossmintCheckout must be used within a CrossmintCheckoutProvider");return e}export{b as a,S as b};
1
+ import{a as o}from"./chunk-345ENAUC.js";import{createContext as p,useContext as h,useEffect as l,useState as i}from"react";import{useCrossmint as g}from"@crossmint/client-sdk-react-base";import{jsx as k}from"react/jsx-runtime";var s=p(void 0);function b({children:e}){let[r,d]=i(void 0),[c,u]=i(void 0),{crossmint:C}=g(),m=o(C,{usageOrigin:"client"});return l(()=>{let n=t=>{if(t.origin!==new URL(m.baseUrl).origin||t.data.event!=="order:updated")return;let{order:a,orderClientSecret:f}=t.data.data;d(a),u(f)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[r]),k(s.Provider,{value:{order:r,orderClientSecret:c},children:e})}function S(){let e=h(s);if(!e)throw new Error("useCrossmintCheckout must be used within a CrossmintCheckoutProvider");return e}export{b as a,S as b};
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYEXRA5WEcjs = require('./chunk-YEXRA5WE.cjs');var _chunkOVJIGWD7cjs = require('./chunk-OVJIGWD7.cjs');var _chunkEDALAJ5Icjs = require('./chunk-EDALAJ5I.cjs');var _chunkYGN7O63Xcjs = require('./chunk-YGN7O63X.cjs');var _chunkO3H2EYFAcjs = require('./chunk-O3H2EYFA.cjs');var _jsxruntime = require('react/jsx-runtime');function B({phone:i,open:r,setOpen:v,step:s,onSubmitOTP:D,onResendOTPCode:h,onSubmitPhone:y,rejectRef:n,appearance:o}){var m,c;function l(O){var g;(r||O)&&((g=n.current)==null||g.call(n,new Error),v(!1))}return _jsxruntime.jsxs.call(void 0, _chunkO3H2EYFAcjs.a,{open:r,setDialogOpen:l,appearance:o,style:{overflow:"hidden"},children:[s==="initial"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.b,{appearance:o,children:"Confirm it's you"}),_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.c,{appearance:o,children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code via SMS."})]}):null,s==="otp"?_jsxruntime.jsx.call(void 0, _chunkYEXRA5WEcjs.a,{contactInfo:i!=null?i:"",contactType:"phone",icon:_jsxruntime.jsx.call(void 0, _chunkYGN7O63Xcjs.a,{customAccentColor:(m=o==null?void 0:o.colors)==null?void 0:m.accent,customBackgroundColor:(c=o==null?void 0:o.colors)==null?void 0:c.background}),title:"Check your phone",description:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:["A temporary login code has been sent via SMS to ",_jsxruntime.jsx.call(void 0, "strong",{children:i})]}),helpText:`Can't receive the SMS? Check your phone number.
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWRVBSINTcjs = require('./chunk-WRVBSINT.cjs');var _chunkOVJIGWD7cjs = require('./chunk-OVJIGWD7.cjs');var _chunkEDALAJ5Icjs = require('./chunk-EDALAJ5I.cjs');var _chunkYGN7O63Xcjs = require('./chunk-YGN7O63X.cjs');var _chunkXDNHO57Lcjs = require('./chunk-XDNHO57L.cjs');var _jsxruntime = require('react/jsx-runtime');function B({phone:i,open:r,setOpen:v,step:s,onSubmitOTP:D,onResendOTPCode:h,onSubmitPhone:y,rejectRef:n,appearance:o}){var m,c;function l(O){var g;(r||O)&&((g=n.current)==null||g.call(n,new Error),v(!1))}return _jsxruntime.jsxs.call(void 0, _chunkXDNHO57Lcjs.a,{open:r,setDialogOpen:l,appearance:o,style:{overflow:"hidden"},children:[s==="initial"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkXDNHO57Lcjs.b,{appearance:o,children:"Confirm it's you"}),_jsxruntime.jsx.call(void 0, _chunkXDNHO57Lcjs.c,{appearance:o,children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code via SMS."})]}):null,s==="otp"?_jsxruntime.jsx.call(void 0, _chunkWRVBSINTcjs.a,{contactInfo:i!=null?i:"",contactType:"phone",icon:_jsxruntime.jsx.call(void 0, _chunkYGN7O63Xcjs.a,{customAccentColor:(m=o==null?void 0:o.colors)==null?void 0:m.accent,customBackgroundColor:(c=o==null?void 0:o.colors)==null?void 0:c.background}),title:"Check your phone",description:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:["A temporary login code has been sent via SMS to ",_jsxruntime.jsx.call(void 0, "strong",{children:i})]}),helpText:`Can't receive the SMS? Check your phone number.
2
2
  Some messages may take several minutes to arrive.`,onSubmitOTP:D,onResendCode:h,appearance:o}):_jsxruntime.jsx.call(void 0, _chunkOVJIGWD7cjs.a,{contactInfo:i!=null?i:"",icon:_jsxruntime.jsx.call(void 0, _chunkEDALAJ5Icjs.a,{}),onConfirm:y,onCancel:l,appearance:o})]})}exports.a = B;
@@ -1 +1 @@
1
- import{a}from"./chunk-EA7H4AXL.js";import{a as C}from"./chunk-6TMNNSYP.js";import{a as m,b as u,c as s}from"./chunk-PXDN3KFO.js";import{useEffect as M,useState as N}from"react";import{useCrossmint as R}from"@crossmint/client-sdk-react-base";import{crossmintHostedCheckoutV3Service as T,crossmintHostedCheckoutV3StylesService as j}from"@crossmint/client-sdk-base";import w from"clsx";import{jsx as l,jsxs as D}from"react/jsx-runtime";function F(d){let[f,h]=N(!1),{crossmint:k}=R(),y=C(k),c=d,{recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v}=c,b=s(c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v},x=T({apiClient:y,hostedCheckoutProps:n}),t=j(n),p=b,{onClick:r,className:E,children:o}=p,I=s(p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),x.createWindow(),r&&r(e)}let i=t.generateCss();return M(()=>{let{cleanup:e}=t.injectCss(i);return h(!0),e},[i]),f?D("button",u(m({onClick:B,className:w(t.identifiers.buttonClassNames,E)},I),{children:[l(a,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:l("p",{style:{margin:0},children:t.getButtonText()})]})):null}export{F as a};
1
+ import{a}from"./chunk-EA7H4AXL.js";import{a as C}from"./chunk-345ENAUC.js";import{a as m,b as u,c as s}from"./chunk-PXDN3KFO.js";import{useEffect as M,useState as N}from"react";import{useCrossmint as R}from"@crossmint/client-sdk-react-base";import{crossmintHostedCheckoutV3Service as T,crossmintHostedCheckoutV3StylesService as j}from"@crossmint/client-sdk-base";import w from"clsx";import{jsx as l,jsxs as D}from"react/jsx-runtime";function F(d){let[f,h]=N(!1),{crossmint:k}=R(),y=C(k),c=d,{recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v}=c,b=s(c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v},x=T({apiClient:y,hostedCheckoutProps:n}),t=j(n),p=b,{onClick:r,className:E,children:o}=p,I=s(p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),x.createWindow(),r&&r(e)}let i=t.generateCss();return M(()=>{let{cleanup:e}=t.injectCss(i);return h(!0),e},[i]),f?D("button",u(m({onClick:B,className:w(t.identifiers.buttonClassNames,E)},I),{children:[l(a,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:l("p",{style:{margin:0},children:t.getButtonText()})]})):null}export{F as a};
@@ -1,4 +1,4 @@
1
- import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js";import{b as St}from"./chunk-4KDASQO6.js";import{a as Pt}from"./chunk-LTY4MYLM.js";import{a as Bt}from"./chunk-TBD7RAFW.js";import{a as Ut,b as Lt,c as Rt}from"./chunk-O5IPDCMT.js";import{a as Q}from"./chunk-WHUNYZQD.js";import{a as et}from"./chunk-QQP4GR7V.js";import{a as w,b as Tt}from"./chunk-WK7PY5WL.js";import{a as Ft}from"./chunk-JL7YHC7D.js";import{a as Wt}from"./chunk-23YVHBPI.js";import{a as K}from"./chunk-AOBO3CEQ.js";import{a as Ot,b as Et,c as It}from"./chunk-RV2X7AFS.js";import{a as Mt}from"./chunk-UG5R7IPH.js";import{a as q}from"./chunk-NZUCXN2O.js";import{a as c}from"./chunk-DFSB3TWF.js";import{a as zt}from"./chunk-KFFPM6JM.js";import{a as kt}from"./chunk-C3JRTLQP.js";import{a as Dt}from"./chunk-UHFCB2EY.js";import{a as ot}from"./chunk-OAHZHKRR.js";import{a as tt}from"./chunk-UAFW3OWA.js";import{a as G,b as H,c as Z,d as x}from"./chunk-PXDN3KFO.js";import Po from"color";import pe from"@emotion/styled";import{useState as so}from"react";import{useState as dt}from"react";import L from"@emotion/styled";import{useContext as He}from"react";import{createContext as Le,useEffect as ut,useMemo as Zt,useRef as te,useState as $,useCallback as z}from"react";import{CrossmintAuth as Re,getCookie as Be}from"@crossmint/client-sdk-auth";import{validateApiKeyAndGetCrossmintBaseUrl as De}from"@crossmint/common-sdk-base";import{SESSION_PREFIX as Me}from"@crossmint/common-sdk-auth";import{useCrossmint as $e}from"@crossmint/client-sdk-react-base";import{createContext as Se,useCallback as Ht,useContext as Oe,useEffect as Ee,useState as Kt}from"react";import{ChildWindow as ye,PopupWindow as Ce}from"@crossmint/client-sdk-window";import{useEffect as ve,useRef as we,useState as Ae,useCallback as be}from"react";import{z as rt}from"zod";var Gt=(o,e)=>{let{crossmintAuth:t}=O(),[r,i]=Ae(null),n=we(null);return ve(()=>(n.current==null&&(n.current=new ye(window.opener||window.parent,"*",{incomingEvents:Pe})),()=>{n.current!=null&&n.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:be((u,y)=>x(void 0,null,function*(){if(n.current==null)throw new Error("Child window not initialized");i(u),e(null);let a=new URL(o[u]);if(y!=null){let m=Array.from(a.searchParams.entries());a.search="",y&&a.searchParams.append("provider_login_hint",y),m.forEach(([s,f])=>{a.searchParams.append(s,f)})}let C=yield Ce.init(a.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),d=m=>x(void 0,null,function*(){var s,f;yield t==null?void 0:t.handleRefreshAuthMaterial(m.oneTimeSecret),(s=n.current)==null||s.off("authMaterialFromPopupCallback"),(f=C.window)==null||f.close(),i(null)}),l=m=>{var s,f;e(m.error),(s=n.current)==null||s.off("errorFromPopupCallback"),(f=C.window)==null||f.close(),i(null)};n.current.on("authMaterialFromPopupCallback",d),n.current.on("errorFromPopupCallback",l);let g=setInterval(()=>{var m,s;(m=C.window)!=null&&m.closed&&(clearInterval(g),i(null),(s=n.current)==null||s.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},Pe={authMaterialFromPopupCallback:rt.object({oneTimeSecret:rt.string()}),errorFromPopupCallback:rt.object({error:rt.string()})};import{jsx as Ie}from"react/jsx-runtime";var Qt={google:"",twitter:""},Nt=Se(void 0);function U(){let o=Oe(Nt);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function jt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=O(),{setError:i}=w(),[n,p]=Kt(Qt),[u,y]=Kt(!0),{createPopupAndSetupListeners:a,isLoading:C,activeOAuthProvider:d}=Gt(n,i),l=Ht(()=>x(this,null,function*(){y(!0);try{let f=(r||[]).filter(h=>h in Qt).map(h=>x(this,null,function*(){let A=yield t==null?void 0:t.getOAuthUrl(h);return{[h]:A}})),v=Object.assign({},...yield Promise.all(f));p(v)}catch(s){i(s instanceof Error?s.message:"Unable to load oauth providers. Please try again later.")}finally{y(!1)}}),[r,t,i]);Ee(()=>{e&&l()},[l,e]);let m={startOAuthLogin:Ht((s,f)=>x(this,null,function*(){yield a(s,f)}),[a]),isLoading:u||C,activeOAuthProvider:d};return Ie(Nt.Provider,{value:m,children:o})}import{useEffect as ct,useMemo as Vt}from"react";import{useDynamicContext as Fe}from"@dynamic-labs/sdk-react-core";import{isEthereumWallet as We}from"@dynamic-labs/ethereum";import{isSolanaWallet as ke}from"@dynamic-labs/solana";import{EthereumWalletConnectors as qt}from"@dynamic-labs/ethereum";import{SolanaWalletConnectors as Jt}from"@dynamic-labs/solana";import Te from"bs58";import{jsx as Xt}from"react/jsx-runtime";function Ue({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:i}){let{primaryWallet:n,sdkHasLoaded:p,removeWallet:u,handleUnlinkWallet:y}=Fe(),a=!e||p;return ct(()=>{a&&(t==null||t(a))},[a,t]),ct(()=>{i==null&&a&&n!=null&&(u(n.id),y(n.id))},[i,a,n,u,y]),ct(()=>{function C(){return x(this,null,function*(){try{if(We(n)){let d=yield n.getWalletClient(),l={type:"external-wallet",address:d.account.address,viemAccount:H(G({},d.account),{signMessage:g=>x(this,null,function*(){return yield d.signMessage({message:g.message})})})};r(l)}else if(ke(n)){let d=yield n.getSigner(),l={type:"external-wallet",address:n.address,onSignTransaction:g=>x(this,null,function*(){return yield d.signTransaction(g)})};r(l)}else throw new Error("Unsupported wallet type")}catch(d){throw console.error("Failed to get admin signer",d),new Error("Failed to get admin signer")}})}n!=null&&i!=null&&C()},[n,i,r]),o}function Yt({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:i,onSdkLoaded:n,onWalletConnected:p}){var d,l;let{crossmintAuth:u,jwt:y}=O(),a=Vt(()=>{var g,m;return`.powered-by-dynamic { display: none !important; }
1
+ import{a as _t}from"./chunk-MLLK43GG.js";import{a as $t}from"./chunk-JSNUJJQJ.js";import{b as St}from"./chunk-4KDASQO6.js";import{a as Pt}from"./chunk-LTY4MYLM.js";import{a as Bt}from"./chunk-TBD7RAFW.js";import{a as Ut,b as Lt,c as Rt}from"./chunk-O5IPDCMT.js";import{a as Q}from"./chunk-GTWWEDRN.js";import{a as et}from"./chunk-5Y4MVXO3.js";import{a as w,b as Tt}from"./chunk-WK7PY5WL.js";import{a as Ft}from"./chunk-KXET5JJK.js";import{a as Wt}from"./chunk-23YVHBPI.js";import{a as K}from"./chunk-AOBO3CEQ.js";import{a as Ot,b as Et,c as It}from"./chunk-QU7VSBN2.js";import{a as Mt}from"./chunk-UG5R7IPH.js";import{a as c}from"./chunk-DFSB3TWF.js";import{a as zt}from"./chunk-KFFPM6JM.js";import{a as q}from"./chunk-NZUCXN2O.js";import{a as kt}from"./chunk-C3JRTLQP.js";import{a as Dt}from"./chunk-UHFCB2EY.js";import{a as ot}from"./chunk-OAHZHKRR.js";import{a as tt}from"./chunk-UAFW3OWA.js";import{a as G,b as H,c as Z,d as x}from"./chunk-PXDN3KFO.js";import Po from"color";import pe from"@emotion/styled";import{useState as so}from"react";import{useState as dt}from"react";import L from"@emotion/styled";import{useContext as He}from"react";import{createContext as Le,useEffect as ut,useMemo as Zt,useRef as te,useState as $,useCallback as z}from"react";import{CrossmintAuth as Re,getCookie as Be}from"@crossmint/client-sdk-auth";import{validateApiKeyAndGetCrossmintBaseUrl as De}from"@crossmint/common-sdk-base";import{SESSION_PREFIX as Me}from"@crossmint/common-sdk-auth";import{useCrossmint as $e}from"@crossmint/client-sdk-react-base";import{createContext as Se,useCallback as Ht,useContext as Oe,useEffect as Ee,useState as Kt}from"react";import{ChildWindow as ye,PopupWindow as Ce}from"@crossmint/client-sdk-window";import{useEffect as ve,useRef as we,useState as Ae,useCallback as be}from"react";import{z as rt}from"zod";var Gt=(o,e)=>{let{crossmintAuth:t}=O(),[r,i]=Ae(null),n=we(null);return ve(()=>(n.current==null&&(n.current=new ye(window.opener||window.parent,"*",{incomingEvents:Pe})),()=>{n.current!=null&&n.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:be((u,y)=>x(void 0,null,function*(){if(n.current==null)throw new Error("Child window not initialized");i(u),e(null);let a=new URL(o[u]);if(y!=null){let m=Array.from(a.searchParams.entries());a.search="",y&&a.searchParams.append("provider_login_hint",y),m.forEach(([s,f])=>{a.searchParams.append(s,f)})}let C=yield Ce.init(a.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),d=m=>x(void 0,null,function*(){var s,f;yield t==null?void 0:t.handleRefreshAuthMaterial(m.oneTimeSecret),(s=n.current)==null||s.off("authMaterialFromPopupCallback"),(f=C.window)==null||f.close(),i(null)}),l=m=>{var s,f;e(m.error),(s=n.current)==null||s.off("errorFromPopupCallback"),(f=C.window)==null||f.close(),i(null)};n.current.on("authMaterialFromPopupCallback",d),n.current.on("errorFromPopupCallback",l);let g=setInterval(()=>{var m,s;(m=C.window)!=null&&m.closed&&(clearInterval(g),i(null),(s=n.current)==null||s.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},Pe={authMaterialFromPopupCallback:rt.object({oneTimeSecret:rt.string()}),errorFromPopupCallback:rt.object({error:rt.string()})};import{jsx as Ie}from"react/jsx-runtime";var Qt={google:"",twitter:""},Nt=Se(void 0);function U(){let o=Oe(Nt);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function jt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=O(),{setError:i}=w(),[n,p]=Kt(Qt),[u,y]=Kt(!0),{createPopupAndSetupListeners:a,isLoading:C,activeOAuthProvider:d}=Gt(n,i),l=Ht(()=>x(this,null,function*(){y(!0);try{let f=(r||[]).filter(h=>h in Qt).map(h=>x(this,null,function*(){let A=yield t==null?void 0:t.getOAuthUrl(h);return{[h]:A}})),v=Object.assign({},...yield Promise.all(f));p(v)}catch(s){i(s instanceof Error?s.message:"Unable to load oauth providers. Please try again later.")}finally{y(!1)}}),[r,t,i]);Ee(()=>{e&&l()},[l,e]);let m={startOAuthLogin:Ht((s,f)=>x(this,null,function*(){yield a(s,f)}),[a]),isLoading:u||C,activeOAuthProvider:d};return Ie(Nt.Provider,{value:m,children:o})}import{useEffect as ct,useMemo as Vt}from"react";import{useDynamicContext as Fe}from"@dynamic-labs/sdk-react-core";import{isEthereumWallet as We}from"@dynamic-labs/ethereum";import{isSolanaWallet as ke}from"@dynamic-labs/solana";import{EthereumWalletConnectors as qt}from"@dynamic-labs/ethereum";import{SolanaWalletConnectors as Jt}from"@dynamic-labs/solana";import Te from"bs58";import{jsx as Xt}from"react/jsx-runtime";function Ue({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:i}){let{primaryWallet:n,sdkHasLoaded:p,removeWallet:u,handleUnlinkWallet:y}=Fe(),a=!e||p;return ct(()=>{a&&(t==null||t(a))},[a,t]),ct(()=>{i==null&&a&&n!=null&&(u(n.id),y(n.id))},[i,a,n,u,y]),ct(()=>{function C(){return x(this,null,function*(){try{if(We(n)){let d=yield n.getWalletClient(),l={type:"external-wallet",address:d.account.address,viemAccount:H(G({},d.account),{signMessage:g=>x(this,null,function*(){return yield d.signMessage({message:g.message})})})};r(l)}else if(ke(n)){let d=yield n.getSigner(),l={type:"external-wallet",address:n.address,onSignTransaction:g=>x(this,null,function*(){return yield d.signTransaction(g)})};r(l)}else throw new Error("Unsupported wallet type")}catch(d){throw console.error("Failed to get admin signer",d),new Error("Failed to get admin signer")}})}n!=null&&i!=null&&C()},[n,i,r]),o}function Yt({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:i,onSdkLoaded:n,onWalletConnected:p}){var d,l;let{crossmintAuth:u,jwt:y}=O(),a=Vt(()=>{var g,m;return`.powered-by-dynamic { display: none !important; }
2
2
  .wallet-list__scroll-container { padding: 0px !important; }
3
3
  .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; }
4
4
  .dynamic-footer { display: none !important; }
@@ -1,4 +1,4 @@
1
- import{a as m}from"./chunk-WK7PY5WL.js";import{a as s}from"./chunk-NZUCXN2O.js";import{a}from"./chunk-DFSB3TWF.js";import{a as p}from"./chunk-QFUZG5YR.js";import{a as c,b as i,c as l}from"./chunk-PXDN3KFO.js";import h from"@emotion/styled";import{jsx as d}from"react/jsx-runtime";var f=h.button`
1
+ import{a as m}from"./chunk-WK7PY5WL.js";import{a}from"./chunk-DFSB3TWF.js";import{a as s}from"./chunk-NZUCXN2O.js";import{a as p}from"./chunk-QFUZG5YR.js";import{a as c,b as i,c as l}from"./chunk-PXDN3KFO.js";import h from"@emotion/styled";import{jsx as d}from"react/jsx-runtime";var f=h.button`
2
2
  ${s}
3
3
 
4
4
  position: absolute;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk56YL3XJWcjs = require('./chunk-56YL3XJW.cjs');var _chunkJV6SCCNCcjs = require('./chunk-JV6SCCNC.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsdkbase = require('@crossmint/client-sdk-base');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _jsxruntime = require('react/jsx-runtime');function z(d){let[f,h]=_react.useState.call(void 0, !1),{crossmint:k}=_clientsdkreactbase.useCrossmint.call(void 0, ),y=_chunkJV6SCCNCcjs.a.call(void 0, k),c=d,{recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v}=c,b=_chunk2WSEHVNPcjs.c.call(void 0, c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v},x=_clientsdkbase.crossmintHostedCheckoutV3Service.call(void 0, {apiClient:y,hostedCheckoutProps:n}),t=_clientsdkbase.crossmintHostedCheckoutV3StylesService.call(void 0, n),p=b,{onClick:r,className:E,children:o}=p,I=_chunk2WSEHVNPcjs.c.call(void 0, p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),x.createWindow(),r&&r(e)}let i=t.generateCss();return _react.useEffect.call(void 0, ()=>{let{cleanup:e}=t.injectCss(i);return h(!0),e},[i]),f?_jsxruntime.jsxs.call(void 0, "button",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {onClick:B,className:_clsx2.default.call(void 0, t.identifiers.buttonClassNames,E)},I),{children:[_jsxruntime.jsx.call(void 0, _chunk56YL3XJWcjs.a,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:_jsxruntime.jsx.call(void 0, "p",{style:{margin:0},children:t.getButtonText()})]})):null}exports.a = z;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk56YL3XJWcjs = require('./chunk-56YL3XJW.cjs');var _chunkZTCUGHEWcjs = require('./chunk-ZTCUGHEW.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsdkbase = require('@crossmint/client-sdk-base');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _jsxruntime = require('react/jsx-runtime');function z(d){let[f,h]=_react.useState.call(void 0, !1),{crossmint:k}=_clientsdkreactbase.useCrossmint.call(void 0, ),y=_chunkZTCUGHEWcjs.a.call(void 0, k),c=d,{recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v}=c,b=_chunk2WSEHVNPcjs.c.call(void 0, c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v},x=_clientsdkbase.crossmintHostedCheckoutV3Service.call(void 0, {apiClient:y,hostedCheckoutProps:n}),t=_clientsdkbase.crossmintHostedCheckoutV3StylesService.call(void 0, n),p=b,{onClick:r,className:E,children:o}=p,I=_chunk2WSEHVNPcjs.c.call(void 0, p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),x.createWindow(),r&&r(e)}let i=t.generateCss();return _react.useEffect.call(void 0, ()=>{let{cleanup:e}=t.injectCss(i);return h(!0),e},[i]),f?_jsxruntime.jsxs.call(void 0, "button",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {onClick:B,className:_clsx2.default.call(void 0, t.identifiers.buttonClassNames,E)},I),{children:[_jsxruntime.jsx.call(void 0, _chunk56YL3XJWcjs.a,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:_jsxruntime.jsx.call(void 0, "p",{style:{margin:0},children:t.getButtonText()})]})):null}exports.a = z;
@@ -1 +1 @@
1
- import{a as o}from"./chunk-FU7BPPGX.js";import{a as e}from"./chunk-PXDN3KFO.js";import{jsx as t}from"react/jsx-runtime";function i(d){return t(o,e({},d))}export{i as a};
1
+ import{a as o}from"./chunk-WVDQLXUX.js";import{a as e}from"./chunk-PXDN3KFO.js";import{jsx as t}from"react/jsx-runtime";function i(d){return t(o,e({},d))}export{i as a};
@@ -1 +1 @@
1
- import{a}from"./chunk-PDQRQ7UO.js";import{g as u}from"./chunk-IMHX5FRF.js";import{a as l,b as s,c as m}from"./chunk-PXDN3KFO.js";import{useEffect as p}from"react";import{useCrossmint as d}from"@crossmint/client-sdk-react-base";import{jsx as f}from"react/jsx-runtime";function h({children:o}){let{experimental_setCustomAuth:r,experimental_customAuth:e}=d(),{user:t,jwt:n,experimental_externalWalletSigner:i}=a();return p(()=>{n==null&&(e==null?void 0:e.jwt)!=null&&r(void 0),i!=null||(t==null?void 0:t.email)!=null?r({jwt:n,email:t==null?void 0:t.email,externalWalletSigner:i}):r({jwt:n})},[i,n,t]),o}function S(e){var t=e,{children:o}=t,r=m(t,["children"]);return f(u,s(l({},r),{children:f(h,{children:o})}))}export{S as a};
1
+ import{a}from"./chunk-ECQOSJPK.js";import{g as u}from"./chunk-5KJ2KALX.js";import{a as l,b as s,c as m}from"./chunk-PXDN3KFO.js";import{useEffect as p}from"react";import{useCrossmint as d}from"@crossmint/client-sdk-react-base";import{jsx as f}from"react/jsx-runtime";function h({children:o}){let{experimental_setCustomAuth:r,experimental_customAuth:e}=d(),{user:t,jwt:n,experimental_externalWalletSigner:i}=a();return p(()=>{n==null&&(e==null?void 0:e.jwt)!=null&&r(void 0),i!=null||(t==null?void 0:t.email)!=null?r({jwt:n,email:t==null?void 0:t.email,externalWalletSigner:i}):r({jwt:n})},[i,n,t]),o}function S(e){var t=e,{children:o}=t,r=m(t,["children"]);return f(u,s(l({},r),{children:f(h,{children:o})}))}export{S as a};
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var L=_styled2.default.button`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var L=_styled2.default.button`
2
2
  ${_chunk3X24JZVGcjs.a}
3
3
 
4
4
  /* Button styles */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkQLPV72AEcjs = require('./chunk-QLPV72AE.cjs');var _chunkJV6SCCNCcjs = require('./chunk-JV6SCCNC.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _react = require('react');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');var V=_react.lazy.call(void 0, ()=>Promise.resolve().then(() => _interopRequireWildcard(require("./components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs"))).then(r=>({default:r.CryptoWalletConnectionHandler})));function J(r){var m;let[e,C]=_react.useState.call(void 0, null),[P,b]=_react.useState.call(void 0, 0),g=_react.useRef.call(void 0, (m=r.payment.crypto.payer)==null?void 0:m.initialChain),n=_react.useRef.call(void 0, r);if(I(r,n.current)){let t=_chunk2WSEHVNPcjs.a.call(void 0, {},r),u=w(r,g.current);u.shouldPreserve&&(t.payment.crypto.payer=u.updatedPayer),n.current=t}let{crossmint:k}=_clientsdkreactbase.useCrossmint.call(void 0, ),c=_chunkJV6SCCNCcjs.a.call(void 0, k,{usageOrigin:"client"}),d=_clientsdkbase.crossmintEmbeddedCheckoutV3Service.call(void 0, {apiClient:c}),i=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>{let t=i.current;!t||e||C(d.iframe.createClient(t))},[i.current,e]),_react.useEffect.call(void 0, ()=>{if(e!=null)return e.on("ui:height.changed",t=>b(t.height)),()=>{e.off("ui:height.changed")}},[e]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "iframe",{ref:i,src:d.iframe.getUrl(n.current),id:"crossmint-embedded-checkout.iframe",role:"crossmint-embedded-checkout.iframe",allow:"payment *; microphone; camera",style:{boxShadow:"none",border:"none",padding:"0px",width:"100%",minWidth:"100%",overflow:"hidden",display:"block",userSelect:"none",transform:"translate(0px)",opacity:"1",transition:"ease 0s, opacity 0.4s ease 0.1s",height:`${P}px`,backgroundColor:"transparent"}}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?_jsxruntime.jsx.call(void 0, _chunkQLPV72AEcjs.a,{payer:n.current.payment.crypto.payer,iframeClient:e}):_jsxruntime.jsx.call(void 0, V,{iframeClient:e,apiKeyEnvironment:c.parsedAPIKey.environment}):null,_jsxruntime.jsx.call(void 0, "span",{id:"crossmint-focus-target",tabIndex:-1})]})}function I(r,e){return JSON.stringify(r)!==JSON.stringify(e)}function w(r,e){return r.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},r.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}exports.a = J;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkQLPV72AEcjs = require('./chunk-QLPV72AE.cjs');var _chunkZTCUGHEWcjs = require('./chunk-ZTCUGHEW.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _react = require('react');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');var V=_react.lazy.call(void 0, ()=>Promise.resolve().then(() => _interopRequireWildcard(require("./components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs"))).then(r=>({default:r.CryptoWalletConnectionHandler})));function J(r){var m;let[e,C]=_react.useState.call(void 0, null),[P,b]=_react.useState.call(void 0, 0),g=_react.useRef.call(void 0, (m=r.payment.crypto.payer)==null?void 0:m.initialChain),n=_react.useRef.call(void 0, r);if(I(r,n.current)){let t=_chunk2WSEHVNPcjs.a.call(void 0, {},r),u=w(r,g.current);u.shouldPreserve&&(t.payment.crypto.payer=u.updatedPayer),n.current=t}let{crossmint:k}=_clientsdkreactbase.useCrossmint.call(void 0, ),c=_chunkZTCUGHEWcjs.a.call(void 0, k,{usageOrigin:"client"}),d=_clientsdkbase.crossmintEmbeddedCheckoutV3Service.call(void 0, {apiClient:c}),i=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>{let t=i.current;!t||e||C(d.iframe.createClient(t))},[i.current,e]),_react.useEffect.call(void 0, ()=>{if(e!=null)return e.on("ui:height.changed",t=>b(t.height)),()=>{e.off("ui:height.changed")}},[e]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "iframe",{ref:i,src:d.iframe.getUrl(n.current),id:"crossmint-embedded-checkout.iframe",role:"crossmint-embedded-checkout.iframe",allow:"payment *; microphone; camera",style:{boxShadow:"none",border:"none",padding:"0px",width:"100%",minWidth:"100%",overflow:"hidden",display:"block",userSelect:"none",transform:"translate(0px)",opacity:"1",transition:"ease 0s, opacity 0.4s ease 0.1s",height:`${P}px`,backgroundColor:"transparent"}}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?_jsxruntime.jsx.call(void 0, _chunkQLPV72AEcjs.a,{payer:n.current.payment.crypto.payer,iframeClient:e}):_jsxruntime.jsx.call(void 0, V,{iframeClient:e,apiKeyEnvironment:c.parsedAPIKey.environment}):null,_jsxruntime.jsx.call(void 0, "span",{id:"crossmint-focus-target",tabIndex:-1})]})}function I(r,e){return JSON.stringify(r)!==JSON.stringify(e)}function w(r,e){return r.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},r.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}exports.a = J;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSFALUIYNcjs = require('./chunk-SFALUIYN.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function n(r){_clientsdkbase.assertValidValidateNFTDetailProps.call(void 0, r);let o=_clientsdkbase.getNFTDetailSrc.call(void 0, r,_chunkSFALUIYNcjs.a);return _jsxruntime.jsx.call(void 0, "iframe",{src:o,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-details"})}exports.a = n;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCVTTOXFFcjs = require('./chunk-CVTTOXFF.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function n(r){_clientsdkbase.assertValidValidateNFTDetailProps.call(void 0, r);let o=_clientsdkbase.getNFTDetailSrc.call(void 0, r,_chunkCVTTOXFFcjs.a);return _jsxruntime.jsx.call(void 0, "iframe",{src:o,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-details"})}exports.a = n;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="2.4.9";var o=s;exports.a = o;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="2.4.10";var o=s;exports.a = o;
@@ -1,4 +1,4 @@
1
- import{a as l}from"./chunk-QQP4GR7V.js";import{a as r}from"./chunk-WK7PY5WL.js";import n from"@emotion/styled";import{DynamicEmbeddedWidget as m}from"@dynamic-labs/sdk-react-core";import{Fragment as u,jsx as o,jsxs as g}from"react/jsx-runtime";var s=n.div`
1
+ import{a as l}from"./chunk-5Y4MVXO3.js";import{a as r}from"./chunk-WK7PY5WL.js";import n from"@emotion/styled";import{DynamicEmbeddedWidget as m}from"@dynamic-labs/sdk-react-core";import{Fragment as u,jsx as o,jsxs as g}from"react/jsx-runtime";var s=n.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkQYQERFYLcjs = require('./chunk-QYQERFYL.cjs');var _chunkVI6TW7JTcjs = require('./chunk-VI6TW7JT.cjs');var _chunkTWX7ZBKZcjs = require('./chunk-TWX7ZBKZ.cjs');var _chunkO3H2EYFAcjs = require('./chunk-O3H2EYFA.cjs');var _chunkSCHRLC2Icjs = require('./chunk-SCHRLC2I.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var v=_styled2.default.div`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkQYQERFYLcjs = require('./chunk-QYQERFYL.cjs');var _chunkVI6TW7JTcjs = require('./chunk-VI6TW7JT.cjs');var _chunkTWX7ZBKZcjs = require('./chunk-TWX7ZBKZ.cjs');var _chunkXDNHO57Lcjs = require('./chunk-XDNHO57L.cjs');var _chunkSCHRLC2Icjs = require('./chunk-SCHRLC2I.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var v=_styled2.default.div`
2
2
  position: relative;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -95,4 +95,4 @@
95
95
  &:hover {
96
96
  opacity: 0.8;
97
97
  }
98
- `;function p({title:o,content:e,primaryButton:n,secondaryAction:k,open:h,appearance:c}){var m;return _jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.a,{open:h,appearance:c,showCloseButton:!1,children:_jsxruntime.jsxs.call(void 0, v,{children:[_jsxruntime.jsx.call(void 0, P,{children:_jsxruntime.jsx.call(void 0, _chunkTWX7ZBKZcjs.a,{appearance:c})}),_jsxruntime.jsx.call(void 0, b,{children:_jsxruntime.jsx.call(void 0, w,{appearance:c,children:o})}),_jsxruntime.jsx.call(void 0, B,{children:_jsxruntime.jsx.call(void 0, T,{appearance:c,children:e})}),_jsxruntime.jsxs.call(void 0, I,{children:[n,k]}),_jsxruntime.jsx.call(void 0, S,{children:_jsxruntime.jsx.call(void 0, _chunkSCHRLC2Icjs.a,{color:(m=c==null?void 0:c.colors)==null?void 0:m.textSecondary})})]})})}var s=({appearance:o,onClick:e,children:n})=>_jsxruntime.jsxs.call(void 0, A,{appearance:o,onClick:e,children:[_jsxruntime.jsx.call(void 0, F,{appearance:o,children:n}),_jsxruntime.jsx.call(void 0, $,{children:n})]});function _({state:o,appearance:e}){if(!o.open||o.type==null)return null;switch(o.type){case"create-wallet":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Create Your Wallet",appearance:e,content:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, U,{children:"You're about to create a wallet."}),_jsxruntime.jsxs.call(void 0, x,{children:[_jsxruntime.jsxs.call(void 0, d,{children:[_jsxruntime.jsx.call(void 0, u,{children:_jsxruntime.jsx.call(void 0, _chunkVI6TW7JTcjs.a,{})}),"Your wallet will be secured with a passkey"]}),_jsxruntime.jsxs.call(void 0, d,{children:[_jsxruntime.jsx.call(void 0, u,{children:_jsxruntime.jsx.call(void 0, _chunkQYQERFYLcjs.a,{})}),"Your device will ask you for your fingerprint, face, or screen lock to set it up"]})]})]}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Create Wallet"})});case"create-wallet-error":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Wallet Creation Failed",appearance:e,content:_jsxruntime.jsx.call(void 0, "div",{children:"We couldn't create your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Try again"})});case"transaction":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Use Your Wallet",appearance:e,content:_jsxruntime.jsx.call(void 0, x,{children:_jsxruntime.jsxs.call(void 0, d,{children:[_jsxruntime.jsx.call(void 0, u,{children:_jsxruntime.jsx.call(void 0, _chunkQYQERFYLcjs.a,{})}),_jsxruntime.jsx.call(void 0, "span",{children:"Your device will ask you for your fingerprint, face, or screen lock to authorize this action."})]})}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Use Wallet"})});case"transaction-error":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Wallet Access Failed",appearance:e,content:_jsxruntime.jsx.call(void 0, "div",{children:"We couldn't access your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Try again"}),secondaryAction:_jsxruntime.jsx.call(void 0, L,{href:"https://docs.crossmint.com/wallets/signers-and-custody#passkey",rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Troubleshoot"})});case"not-supported":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Passkeys Not Supported on This Device",appearance:e,content:_jsxruntime.jsx.call(void 0, "div",{children:"To access your wallet with a passkey, switch to a device or browser that supports passkeys, such as Chrome or Safari on a smartphone, tablet, or modern computer"}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Understood"})});default:return null}}exports.a = _;
98
+ `;function p({title:o,content:e,primaryButton:n,secondaryAction:k,open:h,appearance:c}){var m;return _jsxruntime.jsx.call(void 0, _chunkXDNHO57Lcjs.a,{open:h,appearance:c,showCloseButton:!1,children:_jsxruntime.jsxs.call(void 0, v,{children:[_jsxruntime.jsx.call(void 0, P,{children:_jsxruntime.jsx.call(void 0, _chunkTWX7ZBKZcjs.a,{appearance:c})}),_jsxruntime.jsx.call(void 0, b,{children:_jsxruntime.jsx.call(void 0, w,{appearance:c,children:o})}),_jsxruntime.jsx.call(void 0, B,{children:_jsxruntime.jsx.call(void 0, T,{appearance:c,children:e})}),_jsxruntime.jsxs.call(void 0, I,{children:[n,k]}),_jsxruntime.jsx.call(void 0, S,{children:_jsxruntime.jsx.call(void 0, _chunkSCHRLC2Icjs.a,{color:(m=c==null?void 0:c.colors)==null?void 0:m.textSecondary})})]})})}var s=({appearance:o,onClick:e,children:n})=>_jsxruntime.jsxs.call(void 0, A,{appearance:o,onClick:e,children:[_jsxruntime.jsx.call(void 0, F,{appearance:o,children:n}),_jsxruntime.jsx.call(void 0, $,{children:n})]});function _({state:o,appearance:e}){if(!o.open||o.type==null)return null;switch(o.type){case"create-wallet":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Create Your Wallet",appearance:e,content:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, U,{children:"You're about to create a wallet."}),_jsxruntime.jsxs.call(void 0, x,{children:[_jsxruntime.jsxs.call(void 0, d,{children:[_jsxruntime.jsx.call(void 0, u,{children:_jsxruntime.jsx.call(void 0, _chunkVI6TW7JTcjs.a,{})}),"Your wallet will be secured with a passkey"]}),_jsxruntime.jsxs.call(void 0, d,{children:[_jsxruntime.jsx.call(void 0, u,{children:_jsxruntime.jsx.call(void 0, _chunkQYQERFYLcjs.a,{})}),"Your device will ask you for your fingerprint, face, or screen lock to set it up"]})]})]}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Create Wallet"})});case"create-wallet-error":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Wallet Creation Failed",appearance:e,content:_jsxruntime.jsx.call(void 0, "div",{children:"We couldn't create your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Try again"})});case"transaction":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Use Your Wallet",appearance:e,content:_jsxruntime.jsx.call(void 0, x,{children:_jsxruntime.jsxs.call(void 0, d,{children:[_jsxruntime.jsx.call(void 0, u,{children:_jsxruntime.jsx.call(void 0, _chunkQYQERFYLcjs.a,{})}),_jsxruntime.jsx.call(void 0, "span",{children:"Your device will ask you for your fingerprint, face, or screen lock to authorize this action."})]})}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Use Wallet"})});case"transaction-error":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Wallet Access Failed",appearance:e,content:_jsxruntime.jsx.call(void 0, "div",{children:"We couldn't access your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Try again"}),secondaryAction:_jsxruntime.jsx.call(void 0, L,{href:"https://docs.crossmint.com/wallets/signers-and-custody#passkey",rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Troubleshoot"})});case"not-supported":return _jsxruntime.jsx.call(void 0, p,{open:o.open,title:"Passkeys Not Supported on This Device",appearance:e,content:_jsxruntime.jsx.call(void 0, "div",{children:"To access your wallet with a passkey, switch to a device or browser that supports passkeys, such as Chrome or Safari on a smartphone, tablet, or modern computer"}),primaryButton:_jsxruntime.jsx.call(void 0, s,{appearance:e,onClick:o.primaryActionOnClick,children:"Understood"})});default:return null}}exports.a = _;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3IRE2QDLcjs = require('./chunk-3IRE2QDL.cjs');var _chunkWK3BTTQGcjs = require('./chunk-WK3BTTQG.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _jsxruntime = require('react/jsx-runtime');function l(){let{step:t}=_chunkKT4LGFPNcjs.a.call(void 0, );return t.startsWith("web3")?_jsxruntime.jsx.call(void 0, _chunkWK3BTTQGcjs.a,{}):t==="initial"?_jsxruntime.jsx.call(void 0, _chunk3IRE2QDLcjs.a,{}):null}exports.a = l;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWW4QOF32cjs = require('./chunk-WW4QOF32.cjs');var _chunkUR7K2LG3cjs = require('./chunk-UR7K2LG3.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _jsxruntime = require('react/jsx-runtime');function l(){let{step:t}=_chunkKT4LGFPNcjs.a.call(void 0, );return t.startsWith("web3")?_jsxruntime.jsx.call(void 0, _chunkUR7K2LG3cjs.a,{}):t==="initial"?_jsxruntime.jsx.call(void 0, _chunkWW4QOF32cjs.a,{}):null}exports.a = l;
@@ -1 +1 @@
1
- import{f as e}from"./chunk-IMHX5FRF.js";import{useContext as o}from"react";function h(){let t=o(e);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}export{h as a};
1
+ import{f as e}from"./chunk-5KJ2KALX.js";import{useContext as o}from"react";function h(){let t=o(e);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}export{h as a};
@@ -1,4 +1,4 @@
1
- import{a as g}from"./chunk-23YVHBPI.js";import{a as y}from"./chunk-AOBO3CEQ.js";import{a as f}from"./chunk-NZUCXN2O.js";import{a as r}from"./chunk-DFSB3TWF.js";import{a as l,b as m,c as p}from"./chunk-PXDN3KFO.js";import a from"@emotion/styled";import{jsx as c,jsxs as k}from"react/jsx-runtime";var x=a.button`
1
+ import{a as g}from"./chunk-23YVHBPI.js";import{a as y}from"./chunk-AOBO3CEQ.js";import{a as r}from"./chunk-DFSB3TWF.js";import{a as f}from"./chunk-NZUCXN2O.js";import{a as l,b as m,c as p}from"./chunk-PXDN3KFO.js";import a from"@emotion/styled";import{jsx as c,jsxs as k}from"react/jsx-runtime";var x=a.button`
2
2
  ${f}
3
3
 
4
4
  /* Base button styles */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVUM4VV6Bcjs = require('./chunk-VUM4VV6B.cjs');var _react = require('react');function i(){let t=_react.useContext.call(void 0, _chunkVUM4VV6Bcjs.f);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}exports.a = i;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTGSHZZKKcjs = require('./chunk-TGSHZZKK.cjs');var _react = require('react');function i(){let t=_react.useContext.call(void 0, _chunkTGSHZZKKcjs.f);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}exports.a = i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJV6SCCNCcjs = require('./chunk-JV6SCCNC.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var s=_react.createContext.call(void 0, void 0);function O({children:e}){let[r,d]=_react.useState.call(void 0, void 0),[c,u]=_react.useState.call(void 0, void 0),{crossmint:C}=_clientsdkreactbase.useCrossmint.call(void 0, ),m=_chunkJV6SCCNCcjs.a.call(void 0, C,{usageOrigin:"client"});return _react.useEffect.call(void 0, ()=>{let n=t=>{if(t.origin!==new URL(m.baseUrl).origin||t.data.event!=="order:updated")return;let{order:a,orderClientSecret:f}=t.data.data;d(a),u(f)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[r]),_jsxruntime.jsx.call(void 0, s.Provider,{value:{order:r,orderClientSecret:c},children:e})}function b(){let e=_react.useContext.call(void 0, s);if(!e)throw new Error("useCrossmintCheckout must be used within a CrossmintCheckoutProvider");return e}exports.a = O; exports.b = b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZTCUGHEWcjs = require('./chunk-ZTCUGHEW.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var s=_react.createContext.call(void 0, void 0);function O({children:e}){let[r,d]=_react.useState.call(void 0, void 0),[c,u]=_react.useState.call(void 0, void 0),{crossmint:C}=_clientsdkreactbase.useCrossmint.call(void 0, ),m=_chunkZTCUGHEWcjs.a.call(void 0, C,{usageOrigin:"client"});return _react.useEffect.call(void 0, ()=>{let n=t=>{if(t.origin!==new URL(m.baseUrl).origin||t.data.event!=="order:updated")return;let{order:a,orderClientSecret:f}=t.data.data;d(a),u(f)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[r]),_jsxruntime.jsx.call(void 0, s.Provider,{value:{order:r,orderClientSecret:c},children:e})}function b(){let e=_react.useContext.call(void 0, s);if(!e)throw new Error("useCrossmintCheckout must be used within a CrossmintCheckoutProvider");return e}exports.a = O; exports.b = b;
@@ -1,4 +1,4 @@
1
- import{a as p}from"./chunk-WK7PY5WL.js";import{a as l}from"./chunk-23YVHBPI.js";import{a as s}from"./chunk-NZUCXN2O.js";import{a as n}from"./chunk-DFSB3TWF.js";import{a as u}from"./chunk-HHI2XRKR.js";import{a as m}from"./chunk-H3CPTTQQ.js";import i from"@emotion/styled";import{jsx as r,jsxs as y}from"react/jsx-runtime";var f=i.button`
1
+ import{a as p}from"./chunk-WK7PY5WL.js";import{a as l}from"./chunk-23YVHBPI.js";import{a as n}from"./chunk-DFSB3TWF.js";import{a as u}from"./chunk-HHI2XRKR.js";import{a as s}from"./chunk-NZUCXN2O.js";import{a as m}from"./chunk-H3CPTTQQ.js";import i from"@emotion/styled";import{jsx as r,jsxs as y}from"react/jsx-runtime";var f=i.button`
2
2
  ${s}
3
3
 
4
4
  /* Base button styles */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkV6ICEZQScjs = require('./chunk-V6ICEZQS.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _jsxruntime = require('react/jsx-runtime');function s(d){return _jsxruntime.jsx.call(void 0, _chunkV6ICEZQScjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},d))}exports.a = s;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBE7RGTT7cjs = require('./chunk-BE7RGTT7.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _jsxruntime = require('react/jsx-runtime');function s(d){return _jsxruntime.jsx.call(void 0, _chunkBE7RGTT7cjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},d))}exports.a = s;
@@ -1,4 +1,4 @@
1
- import{a as T}from"./chunk-JL7YHC7D.js";import{a as P}from"./chunk-23YVHBPI.js";import{a as k}from"./chunk-AOBO3CEQ.js";import{a as u}from"./chunk-NZUCXN2O.js";import{a as n}from"./chunk-DFSB3TWF.js";import{a as E}from"./chunk-UAFW3OWA.js";import{d as v}from"./chunk-PXDN3KFO.js";import{useState as x}from"react";import a from"@emotion/styled";import B from"color";import{jsx as i,jsxs as f}from"react/jsx-runtime";var z=a.div`
1
+ import{a as T}from"./chunk-KXET5JJK.js";import{a as P}from"./chunk-23YVHBPI.js";import{a as k}from"./chunk-AOBO3CEQ.js";import{a as n}from"./chunk-DFSB3TWF.js";import{a as u}from"./chunk-NZUCXN2O.js";import{a as E}from"./chunk-UAFW3OWA.js";import{d as v}from"./chunk-PXDN3KFO.js";import{useState as x}from"react";import a from"@emotion/styled";import B from"color";import{jsx as i,jsxs as f}from"react/jsx-runtime";var z=a.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{a as m}from"./chunk-NZUCXN2O.js";import{a as g}from"./chunk-DFSB3TWF.js";import{d as b}from"./chunk-PXDN3KFO.js";import{useState as d,useEffect as x}from"react";import h from"@emotion/styled";import{jsx as k}from"react/jsx-runtime";var L=h.button`
1
+ import{a as g}from"./chunk-DFSB3TWF.js";import{a as m}from"./chunk-NZUCXN2O.js";import{d as b}from"./chunk-PXDN3KFO.js";import{useState as d,useEffect as x}from"react";import h from"@emotion/styled";import{jsx as k}from"react/jsx-runtime";var L=h.button`
2
2
  ${m}
3
3
 
4
4
  /* Button styles */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVUM4VV6Bcjs = require('./chunk-VUM4VV6B.cjs');var _jsxruntime = require('react/jsx-runtime');function m(){return _jsxruntime.jsx.call(void 0, _chunkVUM4VV6Bcjs.p,{style:{width:"100%"}})}exports.a = m;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTGSHZZKKcjs = require('./chunk-TGSHZZKK.cjs');var _jsxruntime = require('react/jsx-runtime');function m(){return _jsxruntime.jsx.call(void 0, _chunkTGSHZZKKcjs.p,{style:{width:"100%"}})}exports.a = m;
@@ -1 +1 @@
1
- import{p as o}from"./chunk-IMHX5FRF.js";import{jsx as t}from"react/jsx-runtime";function e(){return t(o,{style:{width:"100%"}})}export{e as a};
1
+ import{p as o}from"./chunk-5KJ2KALX.js";import{jsx as t}from"react/jsx-runtime";function e(){return t(o,{style:{width:"100%"}})}export{e as a};
@@ -1,4 +1,4 @@
1
- import{a as l}from"./chunk-OOLXYAO7.js";import{a as C}from"./chunk-77PBG2JJ.js";import{a as g}from"./chunk-HVZ5M3FY.js";import{a as y}from"./chunk-RV2X7AFS.js";import{a as f}from"./chunk-UG5R7IPH.js";import{a}from"./chunk-DFSB3TWF.js";import r from"@emotion/styled";import{Fragment as R,jsx as t,jsxs as i}from"react/jsx-runtime";var v=r.div`
1
+ import{a as l}from"./chunk-OOLXYAO7.js";import{a as C}from"./chunk-77PBG2JJ.js";import{a as g}from"./chunk-HVZ5M3FY.js";import{a as y}from"./chunk-QU7VSBN2.js";import{a as f}from"./chunk-UG5R7IPH.js";import{a}from"./chunk-DFSB3TWF.js";import r from"@emotion/styled";import{Fragment as R,jsx as t,jsxs as i}from"react/jsx-runtime";var v=r.div`
2
2
  position: relative;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{a as r}from"./chunk-5AMDRL3A.js";import{a as n}from"./chunk-HJGCM4XH.js";import{a as o}from"./chunk-WK7PY5WL.js";import{jsx as e}from"react/jsx-runtime";function p(){let{step:t}=o();return t.startsWith("web3")?e(n,{}):t==="initial"?e(r,{}):null}export{p as a};
1
+ import{a as r}from"./chunk-H6PKK57A.js";import{a as n}from"./chunk-D3MVZSMW.js";import{a as o}from"./chunk-WK7PY5WL.js";import{jsx as e}from"react/jsx-runtime";function p(){let{step:t}=o();return t.startsWith("web3")?e(n,{}):t==="initial"?e(r,{}):null}export{p as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQQ24JZJVcjs = require('./chunk-QQ24JZJV.cjs');var _chunkVUM4VV6Bcjs = require('./chunk-VUM4VV6B.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');function h({children:o}){let{experimental_setCustomAuth:r,experimental_customAuth:e}=_clientsdkreactbase.useCrossmint.call(void 0, ),{user:t,jwt:n,experimental_externalWalletSigner:i}=_chunkQQ24JZJVcjs.a.call(void 0, );return _react.useEffect.call(void 0, ()=>{n==null&&(e==null?void 0:e.jwt)!=null&&r(void 0),i!=null||(t==null?void 0:t.email)!=null?r({jwt:n,email:t==null?void 0:t.email,externalWalletSigner:i}):r({jwt:n})},[i,n,t]),o}function y(e){var t=e,{children:o}=t,r=_chunk2WSEHVNPcjs.c.call(void 0, t,["children"]);return _jsxruntime.jsx.call(void 0, _chunkVUM4VV6Bcjs.g,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},r),{children:_jsxruntime.jsx.call(void 0, h,{children:o})}))}exports.a = y;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGU7BZ6S4cjs = require('./chunk-GU7BZ6S4.cjs');var _chunkTGSHZZKKcjs = require('./chunk-TGSHZZKK.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');function h({children:o}){let{experimental_setCustomAuth:r,experimental_customAuth:e}=_clientsdkreactbase.useCrossmint.call(void 0, ),{user:t,jwt:n,experimental_externalWalletSigner:i}=_chunkGU7BZ6S4cjs.a.call(void 0, );return _react.useEffect.call(void 0, ()=>{n==null&&(e==null?void 0:e.jwt)!=null&&r(void 0),i!=null||(t==null?void 0:t.email)!=null?r({jwt:n,email:t==null?void 0:t.email,externalWalletSigner:i}):r({jwt:n})},[i,n,t]),o}function y(e){var t=e,{children:o}=t,r=_chunk2WSEHVNPcjs.c.call(void 0, t,["children"]);return _jsxruntime.jsx.call(void 0, _chunkTGSHZZKKcjs.g,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},r),{children:_jsxruntime.jsx.call(void 0, h,{children:o})}))}exports.a = y;
@@ -1,2 +1,2 @@
1
- import{a as b}from"./chunk-QZHJH22E.js";import{a as D}from"./chunk-LUSXGZYB.js";import{a as h}from"./chunk-BAXCSO7J.js";import{a as g,b as u,c as C}from"./chunk-RV2X7AFS.js";import{a as v}from"./chunk-C3JRTLQP.js";import{Fragment as k,jsx as i,jsxs as r}from"react/jsx-runtime";function x({email:t,open:e,setOpen:y,step:l,onSubmitOTP:O,onResendOTPCode:a,onSubmitEmail:P,rejectRef:n,appearance:o}){var m,d,c;function s(S){var f;(e||S)&&((f=n.current)==null||f.call(n,new Error),y(!1))}return r(g,{open:e,setDialogOpen:s,appearance:o,style:{overflow:"hidden"},children:[l==="initial"?r(k,{children:[i(u,{appearance:o,children:"Confirm it's you"}),i(C,{appearance:o,children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code."})]}):null,l==="otp"?i(b,{contactInfo:t!=null?t:"",contactType:"email",icon:i("div",{style:{position:"relative",left:"12px"},children:i(v,{customAccentColor:(m=o==null?void 0:o.colors)==null?void 0:m.accent,customButtonBackgroundColor:(d=o==null?void 0:o.colors)==null?void 0:d.buttonBackground,customBackgroundColor:(c=o==null?void 0:o.colors)==null?void 0:c.background})}),title:"Check your email",description:r(k,{children:["A temporary login code has been sent to ",i("strong",{children:t})]}),helpText:`Can't find the email? Check spam folder.
1
+ import{a as b}from"./chunk-JCV5F5P2.js";import{a as D}from"./chunk-LUSXGZYB.js";import{a as h}from"./chunk-BAXCSO7J.js";import{a as g,b as u,c as C}from"./chunk-QU7VSBN2.js";import{a as v}from"./chunk-C3JRTLQP.js";import{Fragment as k,jsx as i,jsxs as r}from"react/jsx-runtime";function x({email:t,open:e,setOpen:y,step:l,onSubmitOTP:O,onResendOTPCode:a,onSubmitEmail:P,rejectRef:n,appearance:o}){var m,d,c;function s(S){var f;(e||S)&&((f=n.current)==null||f.call(n,new Error),y(!1))}return r(g,{open:e,setDialogOpen:s,appearance:o,style:{overflow:"hidden"},children:[l==="initial"?r(k,{children:[i(u,{appearance:o,children:"Confirm it's you"}),i(C,{appearance:o,children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code."})]}):null,l==="otp"?i(b,{contactInfo:t!=null?t:"",contactType:"email",icon:i("div",{style:{position:"relative",left:"12px"},children:i(v,{customAccentColor:(m=o==null?void 0:o.colors)==null?void 0:m.accent,customButtonBackgroundColor:(d=o==null?void 0:o.colors)==null?void 0:d.buttonBackground,customBackgroundColor:(c=o==null?void 0:o.colors)==null?void 0:c.background})}),title:"Check your email",description:r(k,{children:["A temporary login code has been sent to ",i("strong",{children:t})]}),helpText:`Can't find the email? Check spam folder.
2
2
  Some emails may take several minutes to arrive.`,onSubmitOTP:O,onResendCode:a,appearance:o}):i(D,{contactInfo:t!=null?t:"",icon:i(h,{}),onConfirm:P,onCancel:s,appearance:o})]})}export{x as a};
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var x=_styled2.default.button`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var x=_styled2.default.button`
2
2
  ${_chunk3X24JZVGcjs.a}
3
3
 
4
4
  /* Base button styles */
@@ -1,4 +1,4 @@
1
- import{a as l}from"./chunk-NZUCXN2O.js";import{a as o}from"./chunk-DFSB3TWF.js";import{a as p}from"./chunk-PXDN3KFO.js";import*as n from"react";import{createPortal as h}from"react-dom";import c from"@emotion/styled";import{CSSTransition as v}from"react-transition-group";import{jsx as r,jsxs as m}from"react/jsx-runtime";var C=c.div`
1
+ import{a as o}from"./chunk-DFSB3TWF.js";import{a as l}from"./chunk-NZUCXN2O.js";import{a as p}from"./chunk-PXDN3KFO.js";import*as n from"react";import{createPortal as h}from"react-dom";import c from"@emotion/styled";import{CSSTransition as v}from"react-transition-group";import{jsx as r,jsxs as m}from"react/jsx-runtime";var C=c.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 999;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXNNGBVFGcjs = require('./chunk-XNNGBVFG.cjs');var _chunkNB4ENN4Kcjs = require('./chunk-NB4ENN4K.cjs');var _chunkCBP7TWQDcjs = require('./chunk-CBP7TWQD.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var p=P=>()=>{throw new Error(`${P} is not available. Make sure you're using an email or phone signer wallet.`)};function x({children:P,showPasskeyHelpers:d=!0,appearance:m,createOnLogin:o,callbacks:i}){let{experimental_customAuth:t}=_clientsdkreactbase.useCrossmint.call(void 0, ),[W,c]=_react.useState.call(void 0, {open:!1}),[D,y]=_react.useState.call(void 0, !1),[F,N]=_react.useState.call(void 0, "initial"),[j,f]=_react.useState.call(void 0, !1),[q,V]=_react.useState.call(void 0, "initial"),A=_react.useRef.call(void 0, !1),S=_react.useRef.call(void 0, p("sendEmailWithOtp")),u=_react.useRef.call(void 0, p("verifyOtp")),v=_react.useRef.call(void 0, p("sendPhoneWithOtp")),g=_react.useRef.call(void 0, p("verifyPhoneOtp")),n=_react.useRef.call(void 0, p("reject")),C=(o==null?void 0:o.signer.type)==="phone"&&(o==null?void 0:o.signer.phone)!=null?o.signer.phone:t==null?void 0:t.phone,T=_react.useCallback.call(void 0, e=>()=>new Promise(r=>{if(!d){r();return}c({type:e,open:!0,primaryActionOnClick:()=>{c({open:!1}),r()},secondaryActionOnClick:()=>{c({open:!1}),r()}})}),[d]),R=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield S.current(),N("otp")}catch(e){console.error("Failed to send email OTP",e),n.current(new Error("Failed to send email OTP"))}}),B=e=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield u.current(e),y(!1)}catch(r){console.error("Failed to verify OTP",r),n.current(new Error("Failed to verify OTP"))}}),w=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield v.current(),V("otp")}catch(e){console.error("Failed to send phone OTP",e),n.current(new Error("Failed to send phone OTP"))}}),I=e=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield g.current(e),f(!1)}catch(r){console.error("Failed to verify phone OTP",r),n.current(new Error("Failed to verify phone OTP"))}});return _jsxruntime.jsxs.call(void 0, _clientsdkreactbase.CrossmintWalletBaseProvider,{createOnLogin:o,onAuthRequired:(e,r,O,U)=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){(o==null?void 0:o.signer.type)==="phone"&&o.signer.phone?(f(e),v.current=r,g.current=O):(y(e),S.current=r,u.current=O),A.current=e,n.current=U}),callbacks:(()=>{let e=i==null?void 0:i.onWalletCreationStart,r=i==null?void 0:i.onTransactionStart;return(o==null?void 0:o.signer.type)==="passkey"&&d&&(e=T("create-wallet"),r=T("transaction")),{onWalletCreationStart:e,onTransactionStart:r}})(),children:[P,_jsxruntime.jsx.call(void 0, _chunkNB4ENN4Kcjs.a,{rejectRef:n,email:t==null?void 0:t.email,open:D&&(t==null?void 0:t.email)!=null,setOpen:y,step:F,onSubmitOTP:B,onResendOTPCode:R,onSubmitEmail:R,appearance:m}),_jsxruntime.jsx.call(void 0, _chunkCBP7TWQDcjs.a,{rejectRef:n,phone:C,open:j&&C!=null,setOpen:f,step:q,onSubmitOTP:I,onResendOTPCode:w,onSubmitPhone:w,appearance:m}),_jsxruntime.jsx.call(void 0, _chunkXNNGBVFGcjs.a,{state:W,appearance:m})]})}exports.a = x;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDMBRTNOCcjs = require('./chunk-DMBRTNOC.cjs');var _chunkS3EP642Qcjs = require('./chunk-S3EP642Q.cjs');var _chunk4XMUXRLEcjs = require('./chunk-4XMUXRLE.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var p=P=>()=>{throw new Error(`${P} is not available. Make sure you're using an email or phone signer wallet.`)};function x({children:P,showPasskeyHelpers:d=!0,appearance:m,createOnLogin:o,callbacks:i}){let{experimental_customAuth:t}=_clientsdkreactbase.useCrossmint.call(void 0, ),[W,c]=_react.useState.call(void 0, {open:!1}),[D,y]=_react.useState.call(void 0, !1),[F,N]=_react.useState.call(void 0, "initial"),[j,f]=_react.useState.call(void 0, !1),[q,V]=_react.useState.call(void 0, "initial"),A=_react.useRef.call(void 0, !1),S=_react.useRef.call(void 0, p("sendEmailWithOtp")),u=_react.useRef.call(void 0, p("verifyOtp")),v=_react.useRef.call(void 0, p("sendPhoneWithOtp")),g=_react.useRef.call(void 0, p("verifyPhoneOtp")),n=_react.useRef.call(void 0, p("reject")),C=(o==null?void 0:o.signer.type)==="phone"&&(o==null?void 0:o.signer.phone)!=null?o.signer.phone:t==null?void 0:t.phone,T=_react.useCallback.call(void 0, e=>()=>new Promise(r=>{if(!d){r();return}c({type:e,open:!0,primaryActionOnClick:()=>{c({open:!1}),r()},secondaryActionOnClick:()=>{c({open:!1}),r()}})}),[d]),R=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield S.current(),N("otp")}catch(e){console.error("Failed to send email OTP",e),n.current(new Error("Failed to send email OTP"))}}),B=e=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield u.current(e),y(!1)}catch(r){console.error("Failed to verify OTP",r),n.current(new Error("Failed to verify OTP"))}}),w=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield v.current(),V("otp")}catch(e){console.error("Failed to send phone OTP",e),n.current(new Error("Failed to send phone OTP"))}}),I=e=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield g.current(e),f(!1)}catch(r){console.error("Failed to verify phone OTP",r),n.current(new Error("Failed to verify phone OTP"))}});return _jsxruntime.jsxs.call(void 0, _clientsdkreactbase.CrossmintWalletBaseProvider,{createOnLogin:o,onAuthRequired:(e,r,O,U)=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){(o==null?void 0:o.signer.type)==="phone"&&o.signer.phone?(f(e),v.current=r,g.current=O):(y(e),S.current=r,u.current=O),A.current=e,n.current=U}),callbacks:(()=>{let e=i==null?void 0:i.onWalletCreationStart,r=i==null?void 0:i.onTransactionStart;return(o==null?void 0:o.signer.type)==="passkey"&&d&&(e=T("create-wallet"),r=T("transaction")),{onWalletCreationStart:e,onTransactionStart:r}})(),children:[P,_jsxruntime.jsx.call(void 0, _chunkS3EP642Qcjs.a,{rejectRef:n,email:t==null?void 0:t.email,open:D&&(t==null?void 0:t.email)!=null,setOpen:y,step:F,onSubmitOTP:B,onResendOTPCode:R,onSubmitEmail:R,appearance:m}),_jsxruntime.jsx.call(void 0, _chunk4XMUXRLEcjs.a,{rejectRef:n,phone:C,open:j&&C!=null,setOpen:f,step:q,onSubmitOTP:I,onResendOTPCode:w,onSubmitPhone:w,appearance:m}),_jsxruntime.jsx.call(void 0, _chunkDMBRTNOCcjs.a,{state:W,appearance:m})]})}exports.a = x;
@@ -1 +1 @@
1
- import{a as k}from"./chunk-MS75EYBH.js";import{a as E}from"./chunk-7ZAT35XW.js";import{a as b}from"./chunk-TD7Y5ILY.js";import{d as s}from"./chunk-PXDN3KFO.js";import{useState as l,useCallback as $,useRef as a}from"react";import{CrossmintWalletBaseProvider as z,useCrossmint as G}from"@crossmint/client-sdk-react-base";import{jsx as h,jsxs as J}from"react/jsx-runtime";var p=P=>()=>{throw new Error(`${P} is not available. Make sure you're using an email or phone signer wallet.`)};function L({children:P,showPasskeyHelpers:d=!0,appearance:m,createOnLogin:o,callbacks:i}){let{experimental_customAuth:t}=G(),[W,c]=l({open:!1}),[D,y]=l(!1),[F,N]=l("initial"),[j,f]=l(!1),[q,V]=l("initial"),A=a(!1),S=a(p("sendEmailWithOtp")),u=a(p("verifyOtp")),v=a(p("sendPhoneWithOtp")),g=a(p("verifyPhoneOtp")),n=a(p("reject")),C=(o==null?void 0:o.signer.type)==="phone"&&(o==null?void 0:o.signer.phone)!=null?o.signer.phone:t==null?void 0:t.phone,T=$(e=>()=>new Promise(r=>{if(!d){r();return}c({type:e,open:!0,primaryActionOnClick:()=>{c({open:!1}),r()},secondaryActionOnClick:()=>{c({open:!1}),r()}})}),[d]),R=()=>s(this,null,function*(){try{yield S.current(),N("otp")}catch(e){console.error("Failed to send email OTP",e),n.current(new Error("Failed to send email OTP"))}}),B=e=>s(this,null,function*(){try{yield u.current(e),y(!1)}catch(r){console.error("Failed to verify OTP",r),n.current(new Error("Failed to verify OTP"))}}),w=()=>s(this,null,function*(){try{yield v.current(),V("otp")}catch(e){console.error("Failed to send phone OTP",e),n.current(new Error("Failed to send phone OTP"))}}),I=e=>s(this,null,function*(){try{yield g.current(e),f(!1)}catch(r){console.error("Failed to verify phone OTP",r),n.current(new Error("Failed to verify phone OTP"))}});return J(z,{createOnLogin:o,onAuthRequired:(e,r,O,U)=>s(this,null,function*(){(o==null?void 0:o.signer.type)==="phone"&&o.signer.phone?(f(e),v.current=r,g.current=O):(y(e),S.current=r,u.current=O),A.current=e,n.current=U}),callbacks:(()=>{let e=i==null?void 0:i.onWalletCreationStart,r=i==null?void 0:i.onTransactionStart;return(o==null?void 0:o.signer.type)==="passkey"&&d&&(e=T("create-wallet"),r=T("transaction")),{onWalletCreationStart:e,onTransactionStart:r}})(),children:[P,h(E,{rejectRef:n,email:t==null?void 0:t.email,open:D&&(t==null?void 0:t.email)!=null,setOpen:y,step:F,onSubmitOTP:B,onResendOTPCode:R,onSubmitEmail:R,appearance:m}),h(b,{rejectRef:n,phone:C,open:j&&C!=null,setOpen:f,step:q,onSubmitOTP:I,onResendOTPCode:w,onSubmitPhone:w,appearance:m}),h(k,{state:W,appearance:m})]})}export{L as a};
1
+ import{a as k}from"./chunk-MDPX34P6.js";import{a as E}from"./chunk-P4T3QE7U.js";import{a as b}from"./chunk-XG376MHH.js";import{d as s}from"./chunk-PXDN3KFO.js";import{useState as l,useCallback as $,useRef as a}from"react";import{CrossmintWalletBaseProvider as z,useCrossmint as G}from"@crossmint/client-sdk-react-base";import{jsx as h,jsxs as J}from"react/jsx-runtime";var p=P=>()=>{throw new Error(`${P} is not available. Make sure you're using an email or phone signer wallet.`)};function L({children:P,showPasskeyHelpers:d=!0,appearance:m,createOnLogin:o,callbacks:i}){let{experimental_customAuth:t}=G(),[W,c]=l({open:!1}),[D,y]=l(!1),[F,N]=l("initial"),[j,f]=l(!1),[q,V]=l("initial"),A=a(!1),S=a(p("sendEmailWithOtp")),u=a(p("verifyOtp")),v=a(p("sendPhoneWithOtp")),g=a(p("verifyPhoneOtp")),n=a(p("reject")),C=(o==null?void 0:o.signer.type)==="phone"&&(o==null?void 0:o.signer.phone)!=null?o.signer.phone:t==null?void 0:t.phone,T=$(e=>()=>new Promise(r=>{if(!d){r();return}c({type:e,open:!0,primaryActionOnClick:()=>{c({open:!1}),r()},secondaryActionOnClick:()=>{c({open:!1}),r()}})}),[d]),R=()=>s(this,null,function*(){try{yield S.current(),N("otp")}catch(e){console.error("Failed to send email OTP",e),n.current(new Error("Failed to send email OTP"))}}),B=e=>s(this,null,function*(){try{yield u.current(e),y(!1)}catch(r){console.error("Failed to verify OTP",r),n.current(new Error("Failed to verify OTP"))}}),w=()=>s(this,null,function*(){try{yield v.current(),V("otp")}catch(e){console.error("Failed to send phone OTP",e),n.current(new Error("Failed to send phone OTP"))}}),I=e=>s(this,null,function*(){try{yield g.current(e),f(!1)}catch(r){console.error("Failed to verify phone OTP",r),n.current(new Error("Failed to verify phone OTP"))}});return J(z,{createOnLogin:o,onAuthRequired:(e,r,O,U)=>s(this,null,function*(){(o==null?void 0:o.signer.type)==="phone"&&o.signer.phone?(f(e),v.current=r,g.current=O):(y(e),S.current=r,u.current=O),A.current=e,n.current=U}),callbacks:(()=>{let e=i==null?void 0:i.onWalletCreationStart,r=i==null?void 0:i.onTransactionStart;return(o==null?void 0:o.signer.type)==="passkey"&&d&&(e=T("create-wallet"),r=T("transaction")),{onWalletCreationStart:e,onTransactionStart:r}})(),children:[P,h(E,{rejectRef:n,email:t==null?void 0:t.email,open:D&&(t==null?void 0:t.email)!=null,setOpen:y,step:F,onSubmitOTP:B,onResendOTPCode:R,onSubmitEmail:R,appearance:m}),h(b,{rejectRef:n,phone:C,open:j&&C!=null,setOpen:f,step:q,onSubmitOTP:I,onResendOTPCode:w,onSubmitPhone:w,appearance:m}),h(k,{state:W,appearance:m})]})}export{L as a};
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYEXRA5WEcjs = require('./chunk-YEXRA5WE.cjs');var _chunkOVJIGWD7cjs = require('./chunk-OVJIGWD7.cjs');var _chunkBPEDL7VVcjs = require('./chunk-BPEDL7VV.cjs');var _chunkO3H2EYFAcjs = require('./chunk-O3H2EYFA.cjs');var _chunkI4GMMHQRcjs = require('./chunk-I4GMMHQR.cjs');var _jsxruntime = require('react/jsx-runtime');function M({email:t,open:e,setOpen:y,step:l,onSubmitOTP:O,onResendOTPCode:a,onSubmitEmail:P,rejectRef:n,appearance:o}){var m,d,c;function s(S){var f;(e||S)&&((f=n.current)==null||f.call(n,new Error),y(!1))}return _jsxruntime.jsxs.call(void 0, _chunkO3H2EYFAcjs.a,{open:e,setDialogOpen:s,appearance:o,style:{overflow:"hidden"},children:[l==="initial"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.b,{appearance:o,children:"Confirm it's you"}),_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.c,{appearance:o,children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code."})]}):null,l==="otp"?_jsxruntime.jsx.call(void 0, _chunkYEXRA5WEcjs.a,{contactInfo:t!=null?t:"",contactType:"email",icon:_jsxruntime.jsx.call(void 0, "div",{style:{position:"relative",left:"12px"},children:_jsxruntime.jsx.call(void 0, _chunkI4GMMHQRcjs.a,{customAccentColor:(m=o==null?void 0:o.colors)==null?void 0:m.accent,customButtonBackgroundColor:(d=o==null?void 0:o.colors)==null?void 0:d.buttonBackground,customBackgroundColor:(c=o==null?void 0:o.colors)==null?void 0:c.background})}),title:"Check your email",description:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:["A temporary login code has been sent to ",_jsxruntime.jsx.call(void 0, "strong",{children:t})]}),helpText:`Can't find the email? Check spam folder.
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWRVBSINTcjs = require('./chunk-WRVBSINT.cjs');var _chunkOVJIGWD7cjs = require('./chunk-OVJIGWD7.cjs');var _chunkBPEDL7VVcjs = require('./chunk-BPEDL7VV.cjs');var _chunkXDNHO57Lcjs = require('./chunk-XDNHO57L.cjs');var _chunkI4GMMHQRcjs = require('./chunk-I4GMMHQR.cjs');var _jsxruntime = require('react/jsx-runtime');function M({email:t,open:e,setOpen:y,step:l,onSubmitOTP:O,onResendOTPCode:a,onSubmitEmail:P,rejectRef:n,appearance:o}){var m,d,c;function s(S){var f;(e||S)&&((f=n.current)==null||f.call(n,new Error),y(!1))}return _jsxruntime.jsxs.call(void 0, _chunkXDNHO57Lcjs.a,{open:e,setDialogOpen:s,appearance:o,style:{overflow:"hidden"},children:[l==="initial"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkXDNHO57Lcjs.b,{appearance:o,children:"Confirm it's you"}),_jsxruntime.jsx.call(void 0, _chunkXDNHO57Lcjs.c,{appearance:o,children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code."})]}):null,l==="otp"?_jsxruntime.jsx.call(void 0, _chunkWRVBSINTcjs.a,{contactInfo:t!=null?t:"",contactType:"email",icon:_jsxruntime.jsx.call(void 0, "div",{style:{position:"relative",left:"12px"},children:_jsxruntime.jsx.call(void 0, _chunkI4GMMHQRcjs.a,{customAccentColor:(m=o==null?void 0:o.colors)==null?void 0:m.accent,customButtonBackgroundColor:(d=o==null?void 0:o.colors)==null?void 0:d.buttonBackground,customBackgroundColor:(c=o==null?void 0:o.colors)==null?void 0:c.background})}),title:"Check your email",description:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:["A temporary login code has been sent to ",_jsxruntime.jsx.call(void 0, "strong",{children:t})]}),helpText:`Can't find the email? Check spam folder.
2
2
  Some emails may take several minutes to arrive.`,onSubmitOTP:O,onResendCode:a,appearance:o}):_jsxruntime.jsx.call(void 0, _chunkOVJIGWD7cjs.a,{contactInfo:t!=null?t:"",icon:_jsxruntime.jsx.call(void 0, _chunkBPEDL7VVcjs.a,{}),onConfirm:P,onCancel:s,appearance:o})]})}exports.a = M;
@@ -0,0 +1 @@
1
+ var s="2.4.10";var r=s;export{r as a};
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkGGGQABDXcjs = require('./chunk-GGGQABDX.cjs');var _chunkBR77Q3PKcjs = require('./chunk-BR77Q3PK.cjs');var _chunkPZ3KXKJDcjs = require('./chunk-PZ3KXKJD.cjs');var _chunkKSUMPQNDcjs = require('./chunk-KSUMPQND.cjs');var _chunk2SBA4RZZcjs = require('./chunk-2SBA4RZZ.cjs');var _chunkXBXL7GMYcjs = require('./chunk-XBXL7GMY.cjs');var _chunkCD6E2BGDcjs = require('./chunk-CD6E2BGD.cjs');var _chunk7U6Q4ELBcjs = require('./chunk-7U6Q4ELB.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunkDJZOP4MTcjs = require('./chunk-DJZOP4MT.cjs');var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunkO3H2EYFAcjs = require('./chunk-O3H2EYFA.cjs');var _chunkSCHRLC2Icjs = require('./chunk-SCHRLC2I.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunkUMWTEGO6cjs = require('./chunk-UMWTEGO6.cjs');var _chunkI4GMMHQRcjs = require('./chunk-I4GMMHQR.cjs');var _chunkW5RDCN5Gcjs = require('./chunk-W5RDCN5G.cjs');var _chunkVXAHFAP4cjs = require('./chunk-VXAHFAP4.cjs');var _chunkNRN4WNQLcjs = require('./chunk-NRN4WNQL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _color = require('color'); var _color2 = _interopRequireDefault(_color);var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _react = require('react');var _clientsdkauth = require('@crossmint/client-sdk-auth');var _commonsdkbase = require('@crossmint/common-sdk-base');var _commonsdkauth = require('@crossmint/common-sdk-auth');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsdkwindow = require('@crossmint/client-sdk-window');var _zod = require('zod');var _t=(o,e)=>{let{crossmintAuth:t}=O(),[r,i]=_react.useState.call(void 0, null),n=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>(n.current==null&&(n.current=new (0, _clientsdkwindow.ChildWindow)(window.opener||window.parent,"*",{incomingEvents:be})),()=>{n.current!=null&&n.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:_react.useCallback.call(void 0, (u,y)=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){if(n.current==null)throw new Error("Child window not initialized");i(u),e(null);let a=new URL(o[u]);if(y!=null){let m=Array.from(a.searchParams.entries());a.search="",y&&a.searchParams.append("provider_login_hint",y),m.forEach(([s,f])=>{a.searchParams.append(s,f)})}let C=yield _clientsdkwindow.PopupWindow.init(a.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),d=m=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){var s,f;yield t==null?void 0:t.handleRefreshAuthMaterial(m.oneTimeSecret),(s=n.current)==null||s.off("authMaterialFromPopupCallback"),(f=C.window)==null||f.close(),i(null)}),l=m=>{var s,f;e(m.error),(s=n.current)==null||s.off("errorFromPopupCallback"),(f=C.window)==null||f.close(),i(null)};n.current.on("authMaterialFromPopupCallback",d),n.current.on("errorFromPopupCallback",l);let g=setInterval(()=>{var m,s;(m=C.window)!=null&&m.closed&&(clearInterval(g),i(null),(s=n.current)==null||s.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},be={authMaterialFromPopupCallback:_zod.z.object({oneTimeSecret:_zod.z.string()}),errorFromPopupCallback:_zod.z.object({error:_zod.z.string()})};var _jsxruntime = require('react/jsx-runtime');var Kt={google:"",twitter:""},Qt=_react.createContext.call(void 0, void 0);function T(){let o=_react.useContext.call(void 0, Qt);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function Nt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=O(),{setError:i}=_chunkKT4LGFPNcjs.a.call(void 0, ),[n,p]=_react.useState.call(void 0, Kt),[u,y]=_react.useState.call(void 0, !0),{createPopupAndSetupListeners:a,isLoading:C,activeOAuthProvider:d}=_t(n,i),l=_react.useCallback.call(void 0, ()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){y(!0);try{let f=(r||[]).filter(h=>h in Kt).map(h=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){let A=yield t==null?void 0:t.getOAuthUrl(h);return{[h]:A}})),v=Object.assign({},...yield Promise.all(f));p(v)}catch(s){i(s instanceof Error?s.message:"Unable to load oauth providers. Please try again later.")}finally{y(!1)}}),[r,t,i]);_react.useEffect.call(void 0, ()=>{e&&l()},[l,e]);let m={startOAuthLogin:_react.useCallback.call(void 0, (s,f)=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){yield a(s,f)}),[a]),isLoading:u||C,activeOAuthProvider:d};return _jsxruntime.jsx.call(void 0, Qt.Provider,{value:m,children:o})}var _sdkreactcore = require('@dynamic-labs/sdk-react-core');var _ethereum = require('@dynamic-labs/ethereum');var _solana = require('@dynamic-labs/solana');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);function Te({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:i}){let{primaryWallet:n,sdkHasLoaded:p,removeWallet:u,handleUnlinkWallet:y}=_sdkreactcore.useDynamicContext.call(void 0, ),a=!e||p;return _react.useEffect.call(void 0, ()=>{a&&(t==null||t(a))},[a,t]),_react.useEffect.call(void 0, ()=>{i==null&&a&&n!=null&&(u(n.id),y(n.id))},[i,a,n,u,y]),_react.useEffect.call(void 0, ()=>{function C(){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{if(_ethereum.isEthereumWallet.call(void 0, n)){let d=yield n.getWalletClient(),l={type:"external-wallet",address:d.account.address,viemAccount:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},d.account),{signMessage:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield d.signMessage({message:g.message})})})};r(l)}else if(_solana.isSolanaWallet.call(void 0, n)){let d=yield n.getSigner(),l={type:"external-wallet",address:n.address,onSignTransaction:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield d.signTransaction(g)})};r(l)}else throw new Error("Unsupported wallet type")}catch(d){throw console.error("Failed to get admin signer",d),new Error("Failed to get admin signer")}})}n!=null&&i!=null&&C()},[n,i,r]),o}function Xt({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:i,onSdkLoaded:n,onWalletConnected:p}){var d,l;let{crossmintAuth:u,jwt:y}=O(),a=_react.useMemo.call(void 0, ()=>{var g,m;return`.powered-by-dynamic { display: none !important; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkDUZHNEJFcjs = require('./chunk-DUZHNEJF.cjs');var _chunkBR77Q3PKcjs = require('./chunk-BR77Q3PK.cjs');var _chunkPZ3KXKJDcjs = require('./chunk-PZ3KXKJD.cjs');var _chunkKSUMPQNDcjs = require('./chunk-KSUMPQND.cjs');var _chunk2SBA4RZZcjs = require('./chunk-2SBA4RZZ.cjs');var _chunkXBXL7GMYcjs = require('./chunk-XBXL7GMY.cjs');var _chunkPNO4Y65Fcjs = require('./chunk-PNO4Y65F.cjs');var _chunkWHOJW5REcjs = require('./chunk-WHOJW5RE.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunkATDERG4Ocjs = require('./chunk-ATDERG4O.cjs');var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunkXDNHO57Lcjs = require('./chunk-XDNHO57L.cjs');var _chunkSCHRLC2Icjs = require('./chunk-SCHRLC2I.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunkUMWTEGO6cjs = require('./chunk-UMWTEGO6.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkI4GMMHQRcjs = require('./chunk-I4GMMHQR.cjs');var _chunkW5RDCN5Gcjs = require('./chunk-W5RDCN5G.cjs');var _chunkVXAHFAP4cjs = require('./chunk-VXAHFAP4.cjs');var _chunkNRN4WNQLcjs = require('./chunk-NRN4WNQL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _color = require('color'); var _color2 = _interopRequireDefault(_color);var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _react = require('react');var _clientsdkauth = require('@crossmint/client-sdk-auth');var _commonsdkbase = require('@crossmint/common-sdk-base');var _commonsdkauth = require('@crossmint/common-sdk-auth');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsdkwindow = require('@crossmint/client-sdk-window');var _zod = require('zod');var _t=(o,e)=>{let{crossmintAuth:t}=O(),[r,i]=_react.useState.call(void 0, null),n=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>(n.current==null&&(n.current=new (0, _clientsdkwindow.ChildWindow)(window.opener||window.parent,"*",{incomingEvents:be})),()=>{n.current!=null&&n.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:_react.useCallback.call(void 0, (u,y)=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){if(n.current==null)throw new Error("Child window not initialized");i(u),e(null);let a=new URL(o[u]);if(y!=null){let m=Array.from(a.searchParams.entries());a.search="",y&&a.searchParams.append("provider_login_hint",y),m.forEach(([s,f])=>{a.searchParams.append(s,f)})}let C=yield _clientsdkwindow.PopupWindow.init(a.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),d=m=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){var s,f;yield t==null?void 0:t.handleRefreshAuthMaterial(m.oneTimeSecret),(s=n.current)==null||s.off("authMaterialFromPopupCallback"),(f=C.window)==null||f.close(),i(null)}),l=m=>{var s,f;e(m.error),(s=n.current)==null||s.off("errorFromPopupCallback"),(f=C.window)==null||f.close(),i(null)};n.current.on("authMaterialFromPopupCallback",d),n.current.on("errorFromPopupCallback",l);let g=setInterval(()=>{var m,s;(m=C.window)!=null&&m.closed&&(clearInterval(g),i(null),(s=n.current)==null||s.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},be={authMaterialFromPopupCallback:_zod.z.object({oneTimeSecret:_zod.z.string()}),errorFromPopupCallback:_zod.z.object({error:_zod.z.string()})};var _jsxruntime = require('react/jsx-runtime');var Kt={google:"",twitter:""},Qt=_react.createContext.call(void 0, void 0);function T(){let o=_react.useContext.call(void 0, Qt);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function Nt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=O(),{setError:i}=_chunkKT4LGFPNcjs.a.call(void 0, ),[n,p]=_react.useState.call(void 0, Kt),[u,y]=_react.useState.call(void 0, !0),{createPopupAndSetupListeners:a,isLoading:C,activeOAuthProvider:d}=_t(n,i),l=_react.useCallback.call(void 0, ()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){y(!0);try{let f=(r||[]).filter(h=>h in Kt).map(h=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){let A=yield t==null?void 0:t.getOAuthUrl(h);return{[h]:A}})),v=Object.assign({},...yield Promise.all(f));p(v)}catch(s){i(s instanceof Error?s.message:"Unable to load oauth providers. Please try again later.")}finally{y(!1)}}),[r,t,i]);_react.useEffect.call(void 0, ()=>{e&&l()},[l,e]);let m={startOAuthLogin:_react.useCallback.call(void 0, (s,f)=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){yield a(s,f)}),[a]),isLoading:u||C,activeOAuthProvider:d};return _jsxruntime.jsx.call(void 0, Qt.Provider,{value:m,children:o})}var _sdkreactcore = require('@dynamic-labs/sdk-react-core');var _ethereum = require('@dynamic-labs/ethereum');var _solana = require('@dynamic-labs/solana');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);function Te({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:i}){let{primaryWallet:n,sdkHasLoaded:p,removeWallet:u,handleUnlinkWallet:y}=_sdkreactcore.useDynamicContext.call(void 0, ),a=!e||p;return _react.useEffect.call(void 0, ()=>{a&&(t==null||t(a))},[a,t]),_react.useEffect.call(void 0, ()=>{i==null&&a&&n!=null&&(u(n.id),y(n.id))},[i,a,n,u,y]),_react.useEffect.call(void 0, ()=>{function C(){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{if(_ethereum.isEthereumWallet.call(void 0, n)){let d=yield n.getWalletClient(),l={type:"external-wallet",address:d.account.address,viemAccount:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},d.account),{signMessage:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield d.signMessage({message:g.message})})})};r(l)}else if(_solana.isSolanaWallet.call(void 0, n)){let d=yield n.getSigner(),l={type:"external-wallet",address:n.address,onSignTransaction:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield d.signTransaction(g)})};r(l)}else throw new Error("Unsupported wallet type")}catch(d){throw console.error("Failed to get admin signer",d),new Error("Failed to get admin signer")}})}n!=null&&i!=null&&C()},[n,i,r]),o}function Xt({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:i,onSdkLoaded:n,onWalletConnected:p}){var d,l;let{crossmintAuth:u,jwt:y}=O(),a=_react.useMemo.call(void 0, ()=>{var g,m;return`.powered-by-dynamic { display: none !important; }
2
2
  .wallet-list__scroll-container { padding: 0px !important; }
3
3
  .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; }
4
4
  .dynamic-footer { display: none !important; }
@@ -42,7 +42,7 @@
42
42
  line-height: 1.3;
43
43
  text-align: center;
44
44
  color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}};
45
- `;function ee({otpEmailData:o,setOtpEmailData:e}){var f,v,h,A,W;let{crossmintAuth:t}=O(),{appearance:r,setDialogOpen:i,setStep:n,setError:p}=_chunkKT4LGFPNcjs.a.call(void 0, ),[u,y]=_react.useState.call(void 0, ""),[a,C]=_react.useState.call(void 0, !1),[d,l]=_react.useState.call(void 0, !1),g=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var b,B;l(!0);try{let D=yield t==null?void 0:t.confirmEmailOtp((b=o==null?void 0:o.email)!=null?b:"",(B=o==null?void 0:o.emailId)!=null?B:"",u);yield t==null?void 0:t.handleRefreshAuthMaterial(D),i(!1,!0),n("initial")}catch(D){console.error("Error confirming email OTP",D),p("Invalid code. Please try again."),C(!0)}finally{l(!1)}}),m=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var b;try{yield t==null?void 0:t.sendEmailOtp((b=o==null?void 0:o.email)!=null?b:"")}catch(B){p("Failed to resend code. Please try again.")}});return _jsxruntime.jsxs.call(void 0, He,{children:[_jsxruntime.jsx.call(void 0, _chunk7U6Q4ELBcjs.a,{onClick:()=>{n("initial"),e(null)},iconColor:(f=r==null?void 0:r.colors)==null?void 0:f.textPrimary,ringColor:(v=r==null?void 0:r.colors)==null?void 0:v.accent}),_jsxruntime.jsxs.call(void 0, Ke,{children:[_jsxruntime.jsx.call(void 0, Qe,{children:_jsxruntime.jsx.call(void 0, _chunkI4GMMHQRcjs.a,{customAccentColor:(h=r==null?void 0:r.colors)==null?void 0:h.accent,customButtonBackgroundColor:(A=r==null?void 0:r.colors)==null?void 0:A.buttonBackground,customBackgroundColor:(W=r==null?void 0:r.colors)==null?void 0:W.background})}),_jsxruntime.jsx.call(void 0, Ne,{appearance:r,children:"Check your email"}),_jsxruntime.jsxs.call(void 0, je,{appearance:r,children:["A temporary login code has been sent to",_jsxruntime.jsx.call(void 0, "br",{}),o!=null&&o.email?_jsxruntime.jsx.call(void 0, "strong",{children:o.email}):"your email address"]}),_jsxruntime.jsx.call(void 0, Ve,{children:_jsxruntime.jsx.call(void 0, _chunkXBXL7GMYcjs.a,{maxLength:6,value:u,onChange:b=>{y(b),C(!1),p(null)},onComplete:g,disabled:d,appearance:r,children:_jsxruntime.jsxs.call(void 0, _chunkXBXL7GMYcjs.b,{children:[_jsxruntime.jsx.call(void 0, N,{index:0,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:1,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:2,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:3,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:4,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:5,hasError:a})]})})}),_jsxruntime.jsxs.call(void 0, qe,{appearance:r,children:["Can't find the email? Check spam folder.",_jsxruntime.jsx.call(void 0, "br",{}),"Some emails may take several minutes to arrive."]}),_jsxruntime.jsx.call(void 0, _chunkDJZOP4MTcjs.a,{initialSeconds:60,appearance:r,countdownText:b=>`Re-send code in ${b}s`,countdownCompleteText:"Re-send code",handleOnClick:m})]})]})}var Je=_styled2.default.button`
45
+ `;function ee({otpEmailData:o,setOtpEmailData:e}){var f,v,h,A,W;let{crossmintAuth:t}=O(),{appearance:r,setDialogOpen:i,setStep:n,setError:p}=_chunkKT4LGFPNcjs.a.call(void 0, ),[u,y]=_react.useState.call(void 0, ""),[a,C]=_react.useState.call(void 0, !1),[d,l]=_react.useState.call(void 0, !1),g=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var b,B;l(!0);try{let D=yield t==null?void 0:t.confirmEmailOtp((b=o==null?void 0:o.email)!=null?b:"",(B=o==null?void 0:o.emailId)!=null?B:"",u);yield t==null?void 0:t.handleRefreshAuthMaterial(D),i(!1,!0),n("initial")}catch(D){console.error("Error confirming email OTP",D),p("Invalid code. Please try again."),C(!0)}finally{l(!1)}}),m=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var b;try{yield t==null?void 0:t.sendEmailOtp((b=o==null?void 0:o.email)!=null?b:"")}catch(B){p("Failed to resend code. Please try again.")}});return _jsxruntime.jsxs.call(void 0, He,{children:[_jsxruntime.jsx.call(void 0, _chunkWHOJW5REcjs.a,{onClick:()=>{n("initial"),e(null)},iconColor:(f=r==null?void 0:r.colors)==null?void 0:f.textPrimary,ringColor:(v=r==null?void 0:r.colors)==null?void 0:v.accent}),_jsxruntime.jsxs.call(void 0, Ke,{children:[_jsxruntime.jsx.call(void 0, Qe,{children:_jsxruntime.jsx.call(void 0, _chunkI4GMMHQRcjs.a,{customAccentColor:(h=r==null?void 0:r.colors)==null?void 0:h.accent,customButtonBackgroundColor:(A=r==null?void 0:r.colors)==null?void 0:A.buttonBackground,customBackgroundColor:(W=r==null?void 0:r.colors)==null?void 0:W.background})}),_jsxruntime.jsx.call(void 0, Ne,{appearance:r,children:"Check your email"}),_jsxruntime.jsxs.call(void 0, je,{appearance:r,children:["A temporary login code has been sent to",_jsxruntime.jsx.call(void 0, "br",{}),o!=null&&o.email?_jsxruntime.jsx.call(void 0, "strong",{children:o.email}):"your email address"]}),_jsxruntime.jsx.call(void 0, Ve,{children:_jsxruntime.jsx.call(void 0, _chunkXBXL7GMYcjs.a,{maxLength:6,value:u,onChange:b=>{y(b),C(!1),p(null)},onComplete:g,disabled:d,appearance:r,children:_jsxruntime.jsxs.call(void 0, _chunkXBXL7GMYcjs.b,{children:[_jsxruntime.jsx.call(void 0, N,{index:0,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:1,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:2,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:3,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:4,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:5,hasError:a})]})})}),_jsxruntime.jsxs.call(void 0, qe,{appearance:r,children:["Can't find the email? Check spam folder.",_jsxruntime.jsx.call(void 0, "br",{}),"Some emails may take several minutes to arrive."]}),_jsxruntime.jsx.call(void 0, _chunkATDERG4Ocjs.a,{initialSeconds:60,appearance:r,countdownText:b=>`Re-send code in ${b}s`,countdownCompleteText:"Re-send code",handleOnClick:m})]})]})}var Je=_styled2.default.button`
46
46
  ${_chunk3X24JZVGcjs.a}
47
47
 
48
48
  display: flex;
@@ -158,7 +158,7 @@
158
158
  font-size: 12px;
159
159
  color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||_chunkEAWYV5ZOcjs.a["cm-danger"]}};
160
160
  margin: 8px 0 8px 0;
161
- `;function ie({setOtpEmailData:o}){var s,f,v;let{crossmintAuth:e}=O(),{appearance:t,defaultEmail:r,setStep:i,setError:n,loginMethods:p}=_chunkKT4LGFPNcjs.a.call(void 0, ),[u,y]=_react.useState.call(void 0, r!=null?r:""),[a,C]=_react.useState.call(void 0, ""),[d,l]=_react.useState.call(void 0, !1),g=u.toLowerCase().includes("@gmail.com")&&!u.toLowerCase().includes("+")&&_commonsdkauth.isEmailValid.call(void 0, u)&&!d&&p.includes("google");function m(h){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){h.preventDefault(),l(!0);try{let A=u.trim().toLowerCase(),W=yield e==null?void 0:e.sendEmailOtp(A);o({email:A,emailId:W.emailId}),i("otp")}catch(A){l(!1),n("Failed to send email. Please try again or contact support.")}})}return _jsxruntime.jsx.call(void 0, Ze,{children:_jsxruntime.jsxs.call(void 0, to,{children:[_jsxruntime.jsx.call(void 0, eo,{appearance:t,children:"Email"}),_jsxruntime.jsxs.call(void 0, oo,{role:"form",onSubmit:h=>{if(g){h.preventDefault();return}_commonsdkauth.isEmailValid.call(void 0, u)?m(h):h.preventDefault()},noValidate:!0,children:[_jsxruntime.jsx.call(void 0, _chunkS4BKL6MRcjs.a,{children:"Email"}),_jsxruntime.jsx.call(void 0, ro,{id:"emailInput",appearance:t,hasError:!!a,showGoogleButton:g,type:"email",placeholder:"your@email.com",value:u,onChange:h=>{y(h.target.value),C(""),n(null)},readOnly:d,"aria-describedby":"emailError"}),_jsxruntime.jsxs.call(void 0, no,{children:[a&&_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(s=t==null?void 0:t.colors)==null?void 0:s.danger}),d&&_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary,fill:(v=t==null?void 0:t.colors)==null?void 0:v.textPrimary}}),g?_jsxruntime.jsx.call(void 0, re,{emailInput:u,appearance:t}):!a&&!d?_jsxruntime.jsx.call(void 0, io,{type:"submit",appearance:t,disabled:!_commonsdkauth.isEmailValid.call(void 0, u)||d,children:"Submit"}):null]})]}),a&&_jsxruntime.jsx.call(void 0, ao,{appearance:t,id:"emailError",children:a})]})})}function le(){let{step:o}=_chunkKT4LGFPNcjs.a.call(void 0, ),[e,t]=_react.useState.call(void 0, null);return o==="otp"?_jsxruntime.jsx.call(void 0, ee,{otpEmailData:e,setOtpEmailData:t}):o==="initial"?_jsxruntime.jsx.call(void 0, ie,{setOtpEmailData:t}):null}function se(e){var o=_chunk2WSEHVNPcjs.c.call(void 0, e,[]);var u;let{step:t,appearance:r}=_chunkKT4LGFPNcjs.a.call(void 0, ),{startOAuthLogin:i,activeOAuthProvider:n}=T(),p=n==="google";return t!=="initial"?null:_jsxruntime.jsx.call(void 0, _chunkCD6E2BGDcjs.a,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {icon:_jsxruntime.jsx.call(void 0, _chunkVXAHFAP4cjs.a,{style:{height:"25px",width:"25px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("google")},o),{children:_jsxruntime.jsx.call(void 0, "span",{style:{color:(u=r==null?void 0:r.colors)==null?void 0:u.textPrimary},children:"Sign in with Google"})}))}var _authkit = require('@farcaster/auth-kit');var po=_styled2.default.div`
161
+ `;function ie({setOtpEmailData:o}){var s,f,v;let{crossmintAuth:e}=O(),{appearance:t,defaultEmail:r,setStep:i,setError:n,loginMethods:p}=_chunkKT4LGFPNcjs.a.call(void 0, ),[u,y]=_react.useState.call(void 0, r!=null?r:""),[a,C]=_react.useState.call(void 0, ""),[d,l]=_react.useState.call(void 0, !1),g=u.toLowerCase().includes("@gmail.com")&&!u.toLowerCase().includes("+")&&_commonsdkauth.isEmailValid.call(void 0, u)&&!d&&p.includes("google");function m(h){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){h.preventDefault(),l(!0);try{let A=u.trim().toLowerCase(),W=yield e==null?void 0:e.sendEmailOtp(A);o({email:A,emailId:W.emailId}),i("otp")}catch(A){l(!1),n("Failed to send email. Please try again or contact support.")}})}return _jsxruntime.jsx.call(void 0, Ze,{children:_jsxruntime.jsxs.call(void 0, to,{children:[_jsxruntime.jsx.call(void 0, eo,{appearance:t,children:"Email"}),_jsxruntime.jsxs.call(void 0, oo,{role:"form",onSubmit:h=>{if(g){h.preventDefault();return}_commonsdkauth.isEmailValid.call(void 0, u)?m(h):h.preventDefault()},noValidate:!0,children:[_jsxruntime.jsx.call(void 0, _chunkS4BKL6MRcjs.a,{children:"Email"}),_jsxruntime.jsx.call(void 0, ro,{id:"emailInput",appearance:t,hasError:!!a,showGoogleButton:g,type:"email",placeholder:"your@email.com",value:u,onChange:h=>{y(h.target.value),C(""),n(null)},readOnly:d,"aria-describedby":"emailError"}),_jsxruntime.jsxs.call(void 0, no,{children:[a&&_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(s=t==null?void 0:t.colors)==null?void 0:s.danger}),d&&_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary,fill:(v=t==null?void 0:t.colors)==null?void 0:v.textPrimary}}),g?_jsxruntime.jsx.call(void 0, re,{emailInput:u,appearance:t}):!a&&!d?_jsxruntime.jsx.call(void 0, io,{type:"submit",appearance:t,disabled:!_commonsdkauth.isEmailValid.call(void 0, u)||d,children:"Submit"}):null]})]}),a&&_jsxruntime.jsx.call(void 0, ao,{appearance:t,id:"emailError",children:a})]})})}function le(){let{step:o}=_chunkKT4LGFPNcjs.a.call(void 0, ),[e,t]=_react.useState.call(void 0, null);return o==="otp"?_jsxruntime.jsx.call(void 0, ee,{otpEmailData:e,setOtpEmailData:t}):o==="initial"?_jsxruntime.jsx.call(void 0, ie,{setOtpEmailData:t}):null}function se(e){var o=_chunk2WSEHVNPcjs.c.call(void 0, e,[]);var u;let{step:t,appearance:r}=_chunkKT4LGFPNcjs.a.call(void 0, ),{startOAuthLogin:i,activeOAuthProvider:n}=T(),p=n==="google";return t!=="initial"?null:_jsxruntime.jsx.call(void 0, _chunkPNO4Y65Fcjs.a,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {icon:_jsxruntime.jsx.call(void 0, _chunkVXAHFAP4cjs.a,{style:{height:"25px",width:"25px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("google")},o),{children:_jsxruntime.jsx.call(void 0, "span",{style:{color:(u=r==null?void 0:r.colors)==null?void 0:u.textPrimary},children:"Sign in with Google"})}))}var _authkit = require('@farcaster/auth-kit');var po=_styled2.default.div`
162
162
  display: flex;
163
163
  flex-direction: column;
164
164
  align-items: center;
@@ -203,7 +203,7 @@
203
203
  &:hover {
204
204
  text-decoration: underline;
205
205
  }
206
- `;function ce(){let{step:o,appearance:e,setStep:t,setError:r}=_chunkKT4LGFPNcjs.a.call(void 0, );return o==="initial"?_jsxruntime.jsx.call(void 0, _chunkCD6E2BGDcjs.a,{icon:_jsxruntime.jsx.call(void 0, _chunkW5RDCN5Gcjs.a,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{t("qrCode"),r(null)},children:"Sign in with Farcaster"}):o==="qrCode"?_jsxruntime.jsx.call(void 0, wo,{}):null}function wo(){var m,s,f,v;let{crossmintAuth:o}=O(),{appearance:e,setStep:t,setDialogOpen:r,setError:i}=_chunkKT4LGFPNcjs.a.call(void 0, ),[n,p]=_react.useState.call(void 0, null),u=_react.useMemo.call(void 0, ()=>({onSuccess:h=>{p(h)}}),[]),{signIn:y,url:a,connect:C,signOut:d,isConnected:l}=_authkit.useSignIn.call(void 0, u),g=h=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){i(null);try{let A=yield o==null?void 0:o.signInWithFarcaster(h);yield o==null?void 0:o.handleRefreshAuthMaterial(A),r(!1),t("initial")}catch(A){console.error("Error during Farcaster sign-in:",A),i("Failed to sign in with Farcaster")}});return _react.useEffect.call(void 0, ()=>{n!=null&&g(n)},[n]),_react.useEffect.call(void 0, ()=>{l&&y()},[l]),_react.useEffect.call(void 0, ()=>{C()},[]),_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, _chunk7U6Q4ELBcjs.a,{onClick:()=>{d(),t("initial")},iconColor:(m=e==null?void 0:e.colors)==null?void 0:m.textPrimary,ringColor:(s=e==null?void 0:e.colors)==null?void 0:s.accent}),_jsxruntime.jsxs.call(void 0, po,{children:[_jsxruntime.jsxs.call(void 0, go,{children:[_jsxruntime.jsx.call(void 0, fo,{appearance:e,children:"Sign in with Farcaster"}),_jsxruntime.jsx.call(void 0, ho,{appearance:e,children:"Scan with your phone's camera to continue."})]}),_jsxruntime.jsx.call(void 0, xo,{appearance:e,children:a!=null?_jsxruntime.jsx.call(void 0, _authkit.QRCode,{uri:a,size:280}):_jsxruntime.jsx.call(void 0, yo,{children:_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:(f=e==null?void 0:e.colors)==null?void 0:f.textSecondary,fill:(v=e==null?void 0:e.colors)==null?void 0:v.textPrimary}})})}),a?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, Co,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),_jsxruntime.jsx.call(void 0, vo,{href:a,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):_jsxruntime.jsx.call(void 0, "div",{style:{height:"66px"}})]})]})}function me(e){var o=_chunk2WSEHVNPcjs.c.call(void 0, e,[]);let{step:t,appearance:r}=_chunkKT4LGFPNcjs.a.call(void 0, ),{startOAuthLogin:i,activeOAuthProvider:n}=T(),p=n==="twitter";return t!=="initial"?null:_jsxruntime.jsx.call(void 0, _chunkCD6E2BGDcjs.a,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {icon:_jsxruntime.jsx.call(void 0, _chunkUMWTEGO6cjs.a,{style:{height:"22px",width:"22px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("twitter")},o),{children:"Sign in with X"}))}var Po=_styled2.default.div`
206
+ `;function ce(){let{step:o,appearance:e,setStep:t,setError:r}=_chunkKT4LGFPNcjs.a.call(void 0, );return o==="initial"?_jsxruntime.jsx.call(void 0, _chunkPNO4Y65Fcjs.a,{icon:_jsxruntime.jsx.call(void 0, _chunkW5RDCN5Gcjs.a,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{t("qrCode"),r(null)},children:"Sign in with Farcaster"}):o==="qrCode"?_jsxruntime.jsx.call(void 0, wo,{}):null}function wo(){var m,s,f,v;let{crossmintAuth:o}=O(),{appearance:e,setStep:t,setDialogOpen:r,setError:i}=_chunkKT4LGFPNcjs.a.call(void 0, ),[n,p]=_react.useState.call(void 0, null),u=_react.useMemo.call(void 0, ()=>({onSuccess:h=>{p(h)}}),[]),{signIn:y,url:a,connect:C,signOut:d,isConnected:l}=_authkit.useSignIn.call(void 0, u),g=h=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){i(null);try{let A=yield o==null?void 0:o.signInWithFarcaster(h);yield o==null?void 0:o.handleRefreshAuthMaterial(A),r(!1),t("initial")}catch(A){console.error("Error during Farcaster sign-in:",A),i("Failed to sign in with Farcaster")}});return _react.useEffect.call(void 0, ()=>{n!=null&&g(n)},[n]),_react.useEffect.call(void 0, ()=>{l&&y()},[l]),_react.useEffect.call(void 0, ()=>{C()},[]),_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, _chunkWHOJW5REcjs.a,{onClick:()=>{d(),t("initial")},iconColor:(m=e==null?void 0:e.colors)==null?void 0:m.textPrimary,ringColor:(s=e==null?void 0:e.colors)==null?void 0:s.accent}),_jsxruntime.jsxs.call(void 0, po,{children:[_jsxruntime.jsxs.call(void 0, go,{children:[_jsxruntime.jsx.call(void 0, fo,{appearance:e,children:"Sign in with Farcaster"}),_jsxruntime.jsx.call(void 0, ho,{appearance:e,children:"Scan with your phone's camera to continue."})]}),_jsxruntime.jsx.call(void 0, xo,{appearance:e,children:a!=null?_jsxruntime.jsx.call(void 0, _authkit.QRCode,{uri:a,size:280}):_jsxruntime.jsx.call(void 0, yo,{children:_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:(f=e==null?void 0:e.colors)==null?void 0:f.textSecondary,fill:(v=e==null?void 0:e.colors)==null?void 0:v.textPrimary}})})}),a?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, Co,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),_jsxruntime.jsx.call(void 0, vo,{href:a,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):_jsxruntime.jsx.call(void 0, "div",{style:{height:"66px"}})]})]})}function me(e){var o=_chunk2WSEHVNPcjs.c.call(void 0, e,[]);let{step:t,appearance:r}=_chunkKT4LGFPNcjs.a.call(void 0, ),{startOAuthLogin:i,activeOAuthProvider:n}=T(),p=n==="twitter";return t!=="initial"?null:_jsxruntime.jsx.call(void 0, _chunkPNO4Y65Fcjs.a,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {icon:_jsxruntime.jsx.call(void 0, _chunkUMWTEGO6cjs.a,{style:{height:"22px",width:"22px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("twitter")},o),{children:"Sign in with X"}))}var Po=_styled2.default.div`
207
207
  position: relative;
208
208
  padding: 40px 24px 30px 24px;
209
209
  display: flex;
@@ -224,8 +224,8 @@
224
224
  gap: 8px;
225
225
  margin-top: 34px;
226
226
  background-color: ${o=>{var e,t,r;return new (0, _color2.default)((r=(t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)!=null?r:_chunkEAWYV5ZOcjs.a["cm-danger"]).alpha(.12).toString()}};
227
- `;function pe({style:o}){var y,a,C,d,l,g,m,s,f,v;let{step:e,appearance:t,loginMethods:r,baseUrl:i,error:n,termsOfServiceText:p,authModalTitle:u}=_chunkKT4LGFPNcjs.a.call(void 0, );return _jsxruntime.jsxs.call(void 0, Po,{style:o,children:[n!=null?_jsxruntime.jsxs.call(void 0, So,{appearance:t,children:[_jsxruntime.jsx.call(void 0, "div",{style:{minWidth:"20px"},children:_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(a=(y=t==null?void 0:t.colors)==null?void 0:y.danger)!=null?a:_chunkEAWYV5ZOcjs.a["cm-danger"]})}),_jsxruntime.jsx.call(void 0, "p",{style:{fontSize:"14px",margin:0,color:(d=(C=t==null?void 0:t.colors)==null?void 0:C.danger)!=null?d:_chunkEAWYV5ZOcjs.a["cm-danger"]},children:n})]}):null,e==="initial"?_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.b,{appearance:t,children:u!=null?u:"Sign in to Crossmint"}),_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.c,{appearance:t,children:"Access using one of the options below."})]}):null,r.includes("google")?_jsxruntime.jsx.call(void 0, se,{}):null,r.includes("farcaster")?_jsxruntime.jsx.call(void 0, _chunkBR77Q3PKcjs.a,{baseUrl:i,children:_jsxruntime.jsx.call(void 0, ce,{})}):null,r.includes("twitter")?_jsxruntime.jsx.call(void 0, me,{}):null,r.some(h=>h.startsWith("web3"))?_jsxruntime.jsx.call(void 0, _chunkGGGQABDXcjs.a,{}):null,r.includes("email")?_jsxruntime.jsxs.call(void 0, "div",{children:[r.length>1?_jsxruntime.jsx.call(void 0, _chunk2SBA4RZZcjs.a,{appearance:t,text:"OR"}):null,_jsxruntime.jsx.call(void 0, le,{})]}):null,e==="initial"&&p!=null?_jsxruntime.jsxs.call(void 0, "div",{style:{fontSize:"0.875rem",textAlign:"center",marginTop:"0.5rem",color:(g=(l=t==null?void 0:t.colors)==null?void 0:l.textSecondary)!=null?g:_chunkEAWYV5ZOcjs.a["cm-text-secondary"]},children:[_jsxruntime.jsx.call(void 0, "style",{children:`
227
+ `;function pe({style:o}){var y,a,C,d,l,g,m,s,f,v;let{step:e,appearance:t,loginMethods:r,baseUrl:i,error:n,termsOfServiceText:p,authModalTitle:u}=_chunkKT4LGFPNcjs.a.call(void 0, );return _jsxruntime.jsxs.call(void 0, Po,{style:o,children:[n!=null?_jsxruntime.jsxs.call(void 0, So,{appearance:t,children:[_jsxruntime.jsx.call(void 0, "div",{style:{minWidth:"20px"},children:_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(a=(y=t==null?void 0:t.colors)==null?void 0:y.danger)!=null?a:_chunkEAWYV5ZOcjs.a["cm-danger"]})}),_jsxruntime.jsx.call(void 0, "p",{style:{fontSize:"14px",margin:0,color:(d=(C=t==null?void 0:t.colors)==null?void 0:C.danger)!=null?d:_chunkEAWYV5ZOcjs.a["cm-danger"]},children:n})]}):null,e==="initial"?_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, _chunkXDNHO57Lcjs.b,{appearance:t,children:u!=null?u:"Sign in to Crossmint"}),_jsxruntime.jsx.call(void 0, _chunkXDNHO57Lcjs.c,{appearance:t,children:"Access using one of the options below."})]}):null,r.includes("google")?_jsxruntime.jsx.call(void 0, se,{}):null,r.includes("farcaster")?_jsxruntime.jsx.call(void 0, _chunkBR77Q3PKcjs.a,{baseUrl:i,children:_jsxruntime.jsx.call(void 0, ce,{})}):null,r.includes("twitter")?_jsxruntime.jsx.call(void 0, me,{}):null,r.some(h=>h.startsWith("web3"))?_jsxruntime.jsx.call(void 0, _chunkDUZHNEJFcjs.a,{}):null,r.includes("email")?_jsxruntime.jsxs.call(void 0, "div",{children:[r.length>1?_jsxruntime.jsx.call(void 0, _chunk2SBA4RZZcjs.a,{appearance:t,text:"OR"}):null,_jsxruntime.jsx.call(void 0, le,{})]}):null,e==="initial"&&p!=null?_jsxruntime.jsxs.call(void 0, "div",{style:{fontSize:"0.875rem",textAlign:"center",marginTop:"0.5rem",color:(g=(l=t==null?void 0:t.colors)==null?void 0:l.textSecondary)!=null?g:_chunkEAWYV5ZOcjs.a["cm-text-secondary"]},children:[_jsxruntime.jsx.call(void 0, "style",{children:`
228
228
  p a {
229
229
  color: ${(s=(m=t==null?void 0:t.colors)==null?void 0:m.textLink)!=null?s:_chunkEAWYV5ZOcjs.a["cm-link"]};
230
230
  }
231
- `}),p]}):null,e==="initial"||e==="otp"?_jsxruntime.jsx.call(void 0, _chunkSCHRLC2Icjs.a,{style:{marginTop:"1rem",justifyContent:"center"},color:(v=(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary)!=null?v:_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}):null]})}function rt({open:o}){let{appearance:e,setDialogOpen:t}=_chunkKT4LGFPNcjs.a.call(void 0, );return _jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.a,{open:o,setDialogOpen:t,appearance:e,children:_jsxruntime.jsx.call(void 0, pe,{style:{maxWidth:"448px",padding:"0px"}})})}exports.a = rt; exports.b = _t; exports.c = T; exports.d = Nt; exports.e = Xt; exports.f = ut; exports.g = mr; exports.h = O; exports.i = ee; exports.j = re; exports.k = ie; exports.l = le; exports.m = se; exports.n = ce; exports.o = me; exports.p = pe;
231
+ `}),p]}):null,e==="initial"||e==="otp"?_jsxruntime.jsx.call(void 0, _chunkSCHRLC2Icjs.a,{style:{marginTop:"1rem",justifyContent:"center"},color:(v=(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary)!=null?v:_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}):null]})}function rt({open:o}){let{appearance:e,setDialogOpen:t}=_chunkKT4LGFPNcjs.a.call(void 0, );return _jsxruntime.jsx.call(void 0, _chunkXDNHO57Lcjs.a,{open:o,setDialogOpen:t,appearance:e,children:_jsxruntime.jsx.call(void 0, pe,{style:{maxWidth:"448px",padding:"0px"}})})}exports.a = rt; exports.b = _t; exports.c = T; exports.d = Nt; exports.e = Xt; exports.f = ut; exports.g = mr; exports.h = O; exports.i = ee; exports.j = re; exports.k = ie; exports.l = le; exports.m = se; exports.n = ce; exports.o = me; exports.p = pe;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk7U6Q4ELBcjs = require('./chunk-7U6Q4ELB.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _sdkreactcore = require('@dynamic-labs/sdk-react-core');var _jsxruntime = require('react/jsx-runtime');var s=_styled2.default.div`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkWHOJW5REcjs = require('./chunk-WHOJW5RE.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _sdkreactcore = require('@dynamic-labs/sdk-react-core');var _jsxruntime = require('react/jsx-runtime');var s=_styled2.default.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -10,4 +10,4 @@
10
10
  `,f=_styled2.default.div`
11
11
  /* Widget container styles */
12
12
  min-height: 325px;
13
- `;function W(){var i,e;let{appearance:t,step:c,setStep:d}=_chunkKT4LGFPNcjs.a.call(void 0, );return c==="web3"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk7U6Q4ELBcjs.a,{onClick:()=>d("initial"),iconColor:(i=t==null?void 0:t.colors)==null?void 0:i.textPrimary,ringColor:(e=t==null?void 0:t.colors)==null?void 0:e.accent}),_jsxruntime.jsx.call(void 0, s,{children:_jsxruntime.jsx.call(void 0, C,{children:_jsxruntime.jsx.call(void 0, f,{children:_jsxruntime.jsx.call(void 0, _sdkreactcore.DynamicEmbeddedWidget,{background:"none"})})})})]}):null}exports.a = W;
13
+ `;function W(){var i,e;let{appearance:t,step:c,setStep:d}=_chunkKT4LGFPNcjs.a.call(void 0, );return c==="web3"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkWHOJW5REcjs.a,{onClick:()=>d("initial"),iconColor:(i=t==null?void 0:t.colors)==null?void 0:i.textPrimary,ringColor:(e=t==null?void 0:t.colors)==null?void 0:e.accent}),_jsxruntime.jsx.call(void 0, s,{children:_jsxruntime.jsx.call(void 0, C,{children:_jsxruntime.jsx.call(void 0, f,{children:_jsxruntime.jsx.call(void 0, _sdkreactcore.DynamicEmbeddedWidget,{background:"none"})})})})]}):null}exports.a = W;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunkEO53B7LLcjs = require('./chunk-EO53B7LL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var f=_styled2.default.button`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEO53B7LLcjs = require('./chunk-EO53B7LL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var f=_styled2.default.button`
2
2
  ${_chunk3X24JZVGcjs.a}
3
3
 
4
4
  position: absolute;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkDJZOP4MTcjs = require('./chunk-DJZOP4MT.cjs');var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunkNRN4WNQLcjs = require('./chunk-NRN4WNQL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _color = require('color'); var _color2 = _interopRequireDefault(_color);var _jsxruntime = require('react/jsx-runtime');var z=_styled2.default.div`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkATDERG4Ocjs = require('./chunk-ATDERG4O.cjs');var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkNRN4WNQLcjs = require('./chunk-NRN4WNQL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _color = require('color'); var _color2 = _interopRequireDefault(_color);var _jsxruntime = require('react/jsx-runtime');var z=_styled2.default.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -101,4 +101,4 @@
101
101
  text-align: center;
102
102
  color: ${t=>{var o,e;return((e=(o=t.appearance)==null?void 0:o.colors)==null?void 0:e.textSecondary)||_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}};
103
103
  margin-bottom: 16px;
104
- `;function _({contactType:t,icon:o,title:e,description:s,onSubmitOTP:l,onResendCode:b,appearance:r,otpLength:h=9,helpText:O}){var I,$,S;let[m,R]=_react.useState.call(void 0, ""),[d,y]=_react.useState.call(void 0, !1),[C,g]=_react.useState.call(void 0, null),p=C!=null,w=m.length===h,U=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){y(!0);try{yield l(m),g(null)}catch(c){console.error(`Error confirming ${t} OTP:`,c),g("Invalid code. Please try again.")}finally{y(!1)}});return _jsxruntime.jsxs.call(void 0, z,{children:[o,_jsxruntime.jsx.call(void 0, A,{appearance:r,children:e}),_jsxruntime.jsx.call(void 0, D,{appearance:r,children:s}),_jsxruntime.jsx.call(void 0, L,{children:_jsxruntime.jsxs.call(void 0, N,{role:"form",onSubmit:c=>{w&&(c.preventDefault(),U())},noValidate:!0,children:[_jsxruntime.jsx.call(void 0, _chunkS4BKL6MRcjs.a,{children:"OTP Code"}),_jsxruntime.jsx.call(void 0, F,{id:"otpInput",maxLength:h,appearance:r,hasError:p,type:"text",placeholder:"Enter code",value:m,onChange:c=>{R(c.target.value),g(null)},readOnly:d,"aria-describedby":"otpError"}),_jsxruntime.jsxs.call(void 0, H,{children:[p&&_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(I=r==null?void 0:r.colors)==null?void 0:I.danger}),d&&_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:($=r==null?void 0:r.colors)==null?void 0:$.textSecondary,fill:(S=r==null?void 0:r.colors)==null?void 0:S.textPrimary}}),!p&&!d?_jsxruntime.jsx.call(void 0, M,{type:"submit",appearance:r,disabled:!w||d,children:"Submit"}):null]})]})}),p&&_jsxruntime.jsx.call(void 0, V,{appearance:r,children:C}),_jsxruntime.jsx.call(void 0, j,{appearance:r,children:O}),b&&_jsxruntime.jsx.call(void 0, _chunkDJZOP4MTcjs.a,{initialSeconds:60,appearance:r,countdownText:c=>`Re-send code in ${c}s`,countdownCompleteText:"Re-send code",handleOnClick:b})]})}exports.a = _;
104
+ `;function _({contactType:t,icon:o,title:e,description:s,onSubmitOTP:l,onResendCode:b,appearance:r,otpLength:h=9,helpText:O}){var I,$,S;let[m,R]=_react.useState.call(void 0, ""),[d,y]=_react.useState.call(void 0, !1),[C,g]=_react.useState.call(void 0, null),p=C!=null,w=m.length===h,U=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){y(!0);try{yield l(m),g(null)}catch(c){console.error(`Error confirming ${t} OTP:`,c),g("Invalid code. Please try again.")}finally{y(!1)}});return _jsxruntime.jsxs.call(void 0, z,{children:[o,_jsxruntime.jsx.call(void 0, A,{appearance:r,children:e}),_jsxruntime.jsx.call(void 0, D,{appearance:r,children:s}),_jsxruntime.jsx.call(void 0, L,{children:_jsxruntime.jsxs.call(void 0, N,{role:"form",onSubmit:c=>{w&&(c.preventDefault(),U())},noValidate:!0,children:[_jsxruntime.jsx.call(void 0, _chunkS4BKL6MRcjs.a,{children:"OTP Code"}),_jsxruntime.jsx.call(void 0, F,{id:"otpInput",maxLength:h,appearance:r,hasError:p,type:"text",placeholder:"Enter code",value:m,onChange:c=>{R(c.target.value),g(null)},readOnly:d,"aria-describedby":"otpError"}),_jsxruntime.jsxs.call(void 0, H,{children:[p&&_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(I=r==null?void 0:r.colors)==null?void 0:I.danger}),d&&_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:($=r==null?void 0:r.colors)==null?void 0:$.textSecondary,fill:(S=r==null?void 0:r.colors)==null?void 0:S.textPrimary}}),!p&&!d?_jsxruntime.jsx.call(void 0, M,{type:"submit",appearance:r,disabled:!w||d,children:"Submit"}):null]})]})}),p&&_jsxruntime.jsx.call(void 0, V,{appearance:r,children:C}),_jsxruntime.jsx.call(void 0, j,{appearance:r,children:O}),b&&_jsxruntime.jsx.call(void 0, _chunkATDERG4Ocjs.a,{initialSeconds:60,appearance:r,countdownText:c=>`Re-send code in ${c}s`,countdownCompleteText:"Re-send code",handleOnClick:b})]})}exports.a = _;