droplinked-web3-ui 0.0.15 → 0.0.17
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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +9 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -73,4 +73,4 @@ See more at `+se+".":""))||this).code=void 0,ae.description=void 0,ae.uri=void 0
|
|
|
73
73
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
74
74
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
75
75
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
76
|
-
`);const Ye=Ze.state[de];if(Ye==null)return;JSON.stringify(se.getState())!==JSON.stringify(Ye)&&qe(Ye);return}shouldDispatchFromDevtools(se)&&se.dispatch(Ze)});case"DISPATCH":switch(He.payload.type){case"RESET":return qe(ze),de===void 0?we?.init(se.getState()):we?.init(getTrackedConnectionState(be.name));case"COMMIT":if(de===void 0){we?.init(se.getState());return}return we?.init(getTrackedConnectionState(be.name));case"ROLLBACK":return parseJsonThen(He.state,Ze=>{if(de===void 0){qe(Ze),we?.init(se.getState());return}qe(Ze[de]),we?.init(getTrackedConnectionState(be.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return parseJsonThen(He.state,Ze=>{if(de===void 0){qe(Ze);return}JSON.stringify(se.getState())!==JSON.stringify(Ze[de])&&qe(Ze[de])});case"IMPORT_STATE":{const{nextLiftedState:Ze}=He.payload,Ye=(We=Ze.computedStates.slice(-1)[0])==null?void 0:We.state;if(!Ye)return;qe(de===void 0?Ye:Ye[de]),we?.send(null,Ze);return}case"PAUSE_RECORDING":return Ne=!Ne}return}}),ze},devtools=devtoolsImpl,parseJsonThen=(n,t)=>{let c;try{c=JSON.parse(n)}catch(ie){console.error("[zustand devtools middleware] Could not parse the received json",ie)}c!==void 0&&t(c)},useCartStore=create()(devtools(n=>({cart:null,updateCart:t=>{n({cart:t},!1,"updateCart")}}),{name:"web3-ui-cart-store"}));function useTokenBalances(n){const t=compilerRuntimeExports.c(20),{onError:c,shopId:ie}=usePaymentUiStore(),{cart:se}=useCartStore(),{selectedConnectedWallet:ae}=useWalletStore(),{setAllTokens:ue,setStatus:de,setSelectedToken:be,setFetching:me,setProgress:we}=useTokenStore(),{activeModal:Te}=useModals();let Ne;t[0]!==se?.financialDetails?.amounts?.totalAmount||t[1]!==ae?.currentAccount||t[2]!==me||t[3]!==we||t[4]!==ie?(Ne=async()=>(me(!0),we(100),getTokenBalances({address:ae?.currentAccount??"",network:appDevelopment?"TESTNET":"MAINNET",shopId:ie,amount:se?.financialDetails?.amounts?.totalAmount})),t[0]=se?.financialDetails?.amounts?.totalAmount,t[1]=ae?.currentAccount,t[2]=me,t[3]=we,t[4]=ie,t[5]=Ne):Ne=t[5];let qe;t[6]!==ae?(qe=["tokenBalances",ae],t[6]=ae,t[7]=qe):qe=t[7];const ze=n&&Te!=="paymentProcess";let He;t[8]!==c||t[9]!==ue||t[10]!==me||t[11]!==be||t[12]!==de||t[13]!==Ne||t[14]!==qe||t[15]!==ze?(He={queryFn:Ne,queryKey:qe,enabled:ze,refetchInterval:15e3,select(Ft){return Ft.data.balances},onSuccess(Ft){if(ue(Ft),Ft.length===0){de("no_supported"),be(null);return}const Zt=useTokenStore.getState().selectedToken;if(Zt){const hn=Ft.find(yn=>yn.type===Zt.type&&yn.chain===Zt.chain);if(hn){hn.sufficient?(be(hn),de(null)):(be(hn),de("no_longer_insufficient"));return}}const cn=Ft.find(_temp$2);if(cn){de(null),be(cn);return}de("insufficient_balance"),be(null)},onError(Ft){const Mt=Ft;de("no_supported"),be(null),c(Mt?.message||"An error occurred while fetching token balances")},onSettled(){me(!1)}},t[8]=c,t[9]=ue,t[10]=me,t[11]=be,t[12]=de,t[13]=Ne,t[14]=qe,t[15]=ze,t[16]=He):He=t[16];const{isFetching:We,data:Ze}=useQuery(He);let Ye;return t[17]!==Ze||t[18]!==We?(Ye={allTokens:Ze,isFetching:We},t[17]=Ze,t[18]=We,t[19]=Ye):Ye=t[19],Ye}function _temp$2(n){return n.sufficient}function getActiveConnectedWallets(n){return n.filter(t=>t.isConnected&&t.isInstalled)}function usePayWithCrypto(){const n=compilerRuntimeExports.c(15),{provider:t}=useDropWeb3(),{allWallets:c,setAllWallets:ie,setSelectedConnectedWallet:se,isLoading:ae,setLoading:ue}=useWalletStore();let de;n[0]!==c?(de=getActiveConnectedWallets(c),n[0]=c,n[1]=de):de=n[1];const be=de,me=be.length>0;let we;n[2]!==t||n[3]!==ie||n[4]!==ue||n[5]!==se?(we=async()=>{ue(!0);const We=await await(await t).getAllPaymentWallets();ie(We);const Ze=getActiveConnectedWallets(We);Ze.length>0&&se(Ze[0]),ue(!1)},n[2]=t,n[3]=ie,n[4]=ue,n[5]=se,n[6]=we):we=n[6];const Te=we;let Ne;n[7]!==Te?(Ne=()=>{Te()},n[7]=Te,n[8]=Ne):Ne=n[8];let qe;n[9]===Symbol.for("react.memo_cache_sentinel")?(qe=[],n[9]=qe):qe=n[9],React.useEffect(Ne,qe),useTokenBalances(me);let ze;return n[10]!==be||n[11]!==me||n[12]!==ae||n[13]!==Te?(ze={hasConnectedWallets:me,connectedWallets:be,isLoading:ae,loadWallets:Te},n[10]=be,n[11]=me,n[12]=ae,n[13]=Te,n[14]=ze):ze=n[14],ze}const IconCopy=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{d:"M18.375 21.75h-8.75c-2.177 0-3.375-1.198-3.375-3.375v-8.75c0-2.177 1.198-3.375 3.375-3.375h8.75c2.177 0 3.375 1.198 3.375 3.375v8.75c0 2.177-1.198 3.375-3.375 3.375m-8.75-14c-1.332 0-1.875.543-1.875 1.875v8.75c0 1.332.543 1.875 1.875 1.875h8.75c1.332 0 1.875-.543 1.875-1.875v-8.75c0-1.332-.543-1.875-1.875-1.875zM3.75 15V5.625c0-1.332.543-1.875 1.875-1.875H15a.75.75 0 0 0 0-1.5H5.625c-2.177 0-3.375 1.198-3.375 3.375V15a.75.75 0 0 0 1.5 0"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},IconLinkBroken=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{d:"M17.565 14.296a.75.75 0 0 1-.531-1.279L19 11.039a4.2 4.2 0 0 0 1.249-3.016 4.25 4.25 0 0 0-1.247-3.025 4.276 4.276 0 0 0-6.04 0l-1.967 1.977a.75.75 0 0 1-1.064-1.058L11.9 3.939a5.78 5.78 0 0 1 8.162-.001 5.73 5.73 0 0 1 1.687 4.085c0 1.552-.6 3-1.689 4.078l-1.963 1.974a.75.75 0 0 1-.533.221m-5.466 5.767 1.979-1.968a.75.75 0 0 0-1.059-1.064l-1.979 1.97a4.276 4.276 0 0 1-6.04 0 4.275 4.275 0 0 1-.001-6.038l1.979-1.968a.75.75 0 0 0-1.059-1.064l-1.98 1.97a5.776 5.776 0 0 0 0 8.16 5.76 5.76 0 0 0 4.082 1.687 5.75 5.75 0 0 0 4.078-1.685M21.75 17a.75.75 0 0 0-.75-.75h-2a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 .75-.75m-4 4v-2a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0m-12-14A.75.75 0 0 0 5 6.25H3a.75.75 0 0 0 0 1.5h2A.75.75 0 0 0 5.75 7m2-2V3a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},handleCopyAddress=n=>{n&&navigator.clipboard.writeText(n)},getActionMenuItems=n=>[{icon:IconCopy,title:"Copy Address",onClick:()=>handleCopyAddress(n)},{icon:IconLinkBroken,title:"Disconnect Wallet",onClick:()=>{},variant:"disabled"}];function useFormattedAmount(n){if(n==null)return{formattedAmount:"",fullAmount:"",showEllipsis:!1};const t=String(n),[c,ie=""]=t.split("."),se=ie.replace(/0+$/,"");let ae="",ue=!1;return se?(ue=se.length>4,ae=`${c}.${se.slice(0,4)}${ue?"...":""}`):ae=c,{formattedAmount:ae,fullAmount:t,showEllipsis:ue}}function ManageWallets(){const n=compilerRuntimeExports.c(47),{activeModal:t,closeAndOpen:c,closeModal:ie}=useModals(),{modalData:se}=useModalStore(),{selectedConnectedWallet:ae,setSelectedConnectedWallet:ue}=useWalletStore(),{isLoading:de}=useWallets(t==="manageWallets"),{connectedWallets:be}=usePayWithCrypto(),me=t==="manageWallets",we=se?.mode==="claim";let Te;n[0]!==be[0]||n[1]!==be.length||n[2]!==we||n[3]!==me||n[4]!==ae||n[5]!==ue?(Te=()=>{if(me&&we&&be.length>0&&!ae){const pe=be[0];ue(pe)}},n[0]=be[0],n[1]=be.length,n[2]=we,n[3]=me,n[4]=ae,n[5]=ue,n[6]=Te):Te=n[6];let Ne;n[7]!==be||n[8]!==we||n[9]!==me?(Ne=[me,we,be],n[7]=be,n[8]=we,n[9]=me,n[10]=Ne):Ne=n[10],React.useEffect(Te,Ne);let qe;n[11]!==ie||n[12]!==we||n[13]!==ue?(qe=pe=>{ue(pe),we||ie()},n[11]=ie,n[12]=we,n[13]=ue,n[14]=qe):qe=n[14];const ze=qe;let He;n[15]!==c||n[16]!==we?(He=()=>{c("manageWallets","connectWallet",we?{mode:"claim"}:void 0)},n[15]=c,n[16]=we,n[17]=He):He=n[17];const We=He;let Ze;n[18]!==c?(Ze=()=>{c("manageWallets","claimProcess")},n[18]=c,n[19]=Ze):Ze=n[19];const Ye=Ze,Ft=we?"Select Wallet":"Manage Wallets";let Mt;n[20]!==Ye||n[21]!==we||n[22]!==ae?(Mt=we&&ae&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(kn,{}),jsxRuntimeExports.jsx(ee$1,{variant:"primary",onClick:Ye,width:"100%",children:"Continue"})]}),n[20]=Ye,n[21]=we,n[22]=ae,n[23]=Mt):Mt=n[23];let Zt;n[24]!==de?(Zt=de&&jsxRuntimeExports.jsx(Box,{m:"auto",children:jsxRuntimeExports.jsx(Spinner,{})}),n[24]=de,n[25]=Zt):Zt=n[25];let cn;n[26]!==be||n[27]!==ze||n[28]!==de||n[29]!==ae?.currentAccount?(cn=!de&&jsxRuntimeExports.jsx(Flex,{flexDirection:"column",gap:2,children:be.map(pe=>jsxRuntimeExports.jsx(_n,{title:pe.walletName,subtitle:pe.currentAccount?.slice(0,4)+"..."+pe.currentAccount?.slice(-4),icon:walletIcons(pe.walletName),networkIcon:BlockchainDisplay({show:"icon",blockchain:pe.group}),isSelected:ae?.currentAccount===pe.currentAccount,chipsLabel:"Connected",chipsVariant:"success",onClick:()=>ze(pe),rightContent:jsxRuntimeExports.jsx(Box,{onClick:_temp$1,children:jsxRuntimeExports.jsx(pt$2,{buttonVariant:"transparent",items:getActionMenuItems(pe.currentAccount),buttonProps:{_hover:{cursor:"pointer"}}})})},pe.currentAccount))}),n[26]=be,n[27]=ze,n[28]=de,n[29]=ae?.currentAccount,n[30]=cn):cn=n[30];let hn;n[31]!==be.length?(hn=!!be.length&&jsxRuntimeExports.jsx(kn,{}),n[31]=be.length,n[32]=hn):hn=n[32];let yn;n[33]===Symbol.for("react.memo_cache_sentinel")?(yn=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,variant:"transparent"}),n[33]=yn):yn=n[33];let Ht;n[34]!==We?(Ht=jsxRuntimeExports.jsx(_n,{title:"Connect New Wallet",icon:IconWallet,rightContent:yn,onClick:We}),n[34]=We,n[35]=Ht):Ht=n[35];let Cn;n[36]!==Ht||n[37]!==Zt||n[38]!==cn||n[39]!==hn?(Cn=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,p:4,children:[Zt,cn,hn,Ht]}),n[36]=Ht,n[37]=Zt,n[38]=cn,n[39]=hn,n[40]=Cn):Cn=n[40];let le;return n[41]!==ie||n[42]!==me||n[43]!==Cn||n[44]!==Ft||n[45]!==Mt?(le=jsxRuntimeExports.jsx(Oe,{open:me,onOpenChange:ie,title:Ft,icon:IconWallet,footerContent:Mt,children:Cn}),n[41]=ie,n[42]=me,n[43]=Cn,n[44]=Ft,n[45]=Mt,n[46]=le):le=n[46],le}function _temp$1(n){return n.stopPropagation()}function SelectNetwork(){const n=compilerRuntimeExports.c(37),{activeModal:t,closeModal:c,closeAndOpen:ie,setSelectedWallet:se,selectedWallet:ae}=useModals(),{modalData:ue}=useModalStore(),{resetSelection:de}=useWalletStore(),be=t==="selectNetwork",me=ue?.mode==="claim";let we;n[0]!==ie||n[1]!==me||n[2]!==de?(we=()=>{ie("selectNetwork","connectWallet",me?{mode:"claim"}:void 0),de()},n[0]=ie,n[1]=me,n[2]=de,n[3]=we):we=n[3];const Te=we;let Ne;n[4]!==ie||n[5]!==ae||n[6]!==se?(Ne=async ge=>{await se({...ae,group:ge}),ie("selectNetwork","walletConnection")},n[4]=ie,n[5]=ae,n[6]=se,n[7]=Ne):Ne=n[7];const qe=Ne;let ze;n[8]!==c||n[9]!==de?(ze=()=>{c(),de()},n[8]=c,n[9]=de,n[10]=ze):ze=n[10];const He=ze;let We;n[11]!==Te?(We=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleLeft,onClick:Te}),n[11]=Te,n[12]=We):We=n[12];const Ze=ae?.walletName??"";let Ye;n[13]!==Ze?(Ye=walletIcons(Ze),n[13]=Ze,n[14]=Ye):Ye=n[14];let Ft;n[15]!==Ye?(Ft=jsxRuntimeExports.jsx(te$1,{icon:Ye}),n[15]=Ye,n[16]=Ft):Ft=n[16];let Mt;n[17]===Symbol.for("react.memo_cache_sentinel")?(Mt=jsxRuntimeExports.jsxs(Flex,{gap:1,alignItems:"center",justifyContent:"center",flexDirection:"column",children:[jsxRuntimeExports.jsx(Text,{color:"text.main",textStyle:"body2Regular",children:"Select Network"}),jsxRuntimeExports.jsx(Text,{color:"text.subtext",textStyle:"body3Regular",children:"Choose which network to connect with your wallet"})]}),n[17]=Mt):Mt=n[17];let Zt;n[18]!==Ft?(Zt=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",justifyContent:"center",children:[Ft,Mt]}),n[18]=Ft,n[19]=Zt):Zt=n[19];let cn;n[20]===Symbol.for("react.memo_cache_sentinel")?(cn=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,variant:"transparent"}),n[20]=cn):cn=n[20];let hn;n[21]!==qe?(hn=jsxRuntimeExports.jsx(_n,{title:"EVM Networks",icon:EthereumLogo,rightContent:cn,onClick:()=>qe("EVM")}),n[21]=qe,n[22]=hn):hn=n[22];let yn;n[23]===Symbol.for("react.memo_cache_sentinel")?(yn=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,variant:"transparent"}),n[23]=yn):yn=n[23];let Ht;n[24]!==qe?(Ht=jsxRuntimeExports.jsx(_n,{title:"Solana",icon:SolanaLogo,rightContent:yn,onClick:()=>qe("SOL")}),n[24]=qe,n[25]=Ht):Ht=n[25];let Cn;n[26]!==hn||n[27]!==Ht?(Cn=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",justifyContent:"center",children:[hn,Ht]}),n[26]=hn,n[27]=Ht,n[28]=Cn):Cn=n[28];let le;n[29]!==Cn||n[30]!==Zt?(le=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:8,p:4,mt:8,children:[Zt,Cn]}),n[29]=Cn,n[30]=Zt,n[31]=le):le=n[31];let pe;return n[32]!==He||n[33]!==be||n[34]!==le||n[35]!==We?(pe=jsxRuntimeExports.jsx(Oe,{open:be,onOpenChange:He,title:"Select Network",iconType:"button",iconButton:We,minHeight:"560px",maxHeight:"560px",children:le}),n[32]=He,n[33]=be,n[34]=le,n[35]=We,n[36]=pe):pe=n[36],pe}const IconExchangeHorizontal=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{d:"m21.53 14.53-5 5a.75.75 0 0 1-1.06 0 .75.75 0 0 1 0-1.061l3.72-3.72H6a.75.75 0 0 1 0-1.5h15a.75.75 0 0 1 .53 1.281M18.75 9a.75.75 0 0 0-.75-.75H4.811l3.72-3.72A.75.75 0 1 0 7.47 3.469l-5 5A.75.75 0 0 0 3 9.749h15A.75.75 0 0 0 18.75 9"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},Drop3=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M80.166 40C80.166 62.0914 62.2574 80 40.166 80C18.0746 80 0.166016 62.0914 0.166016 40C0.166016 17.9086 18.0746 0 40.166 0C62.2574 0 80.166 17.9086 80.166 40ZM25.5832 40C25.5832 31.9203 32.0863 25.4171 40.166 25.4171C48.2457 25.4171 54.7489 32.1174 54.7489 40.1971V54.5829H40.166C32.0863 54.5829 25.5832 48.0797 25.5832 40Z",fill:"currentColor"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{viewBox:"0 0 81 80",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},useConnectWallet=({reGetWallets:n})=>{const[t,c]=React.useState("loading"),{provider:ie}=useDropWeb3(),{currentDescription:se,currentErrorDescription:ae}=usePaymentUiStore(),{activeModal:ue,closeModal:de,closeAndOpen:be}=useModals(),{modalData:me}=useModalStore(),{selectedWallet:we,resetSelection:Te}=useWalletStore(),Ne=ue==="walletConnection",qe=me?.mode==="claim",ze=async()=>{if(we===null)return;c("loading");const Ze=we.group==="SOL"?Chains.SOLANA:we.group==="EVM"?Chains.ETH:we.group;try{const Ye=(await ie).login(we?.walletName,{chain:Ze}),{address:Ft}=await Ye;qe||await n(),c(Ft?"success":"error"),setTimeout(()=>{We()},2e3)}catch(Ye){qe||await n(),c("error"),console.error("Login failed:",Ye.message)}},He=()=>{t==="loading"?ze():(We(),be("walletConnection","connectWallet"))},We=()=>{de(),Te()};return React.useEffect(()=>{Ne&&(async()=>await ze())()},[Ne]),{status:t,isOpen:Ne,selectedWallet:we,currentDescription:se,currentErrorDescription:ae,handleRetry:He,handleClose:We}};function WalletConnection(n){const t=compilerRuntimeExports.c(29),{reGetWallets:c}=n;let ie;t[0]!==c?(ie={reGetWallets:c},t[0]=c,t[1]=ie):ie=t[1];const{status:se,isOpen:ae,selectedWallet:ue,currentDescription:de,currentErrorDescription:be,handleRetry:me,handleClose:we}=useConnectWallet(ie),Te=ue?.walletName??"";let Ne;t[2]!==Te?(Ne=walletIcons(Te),t[2]=Te,t[3]=Ne):Ne=t[3];let qe;t[4]!==se||t[5]!==Ne?(qe=jsxRuntimeExports.jsx(Box,{width:"min-content",children:jsxRuntimeExports.jsx(Tn,{centerIcon:IconExchangeHorizontal,leftIcon:Drop3,rightIcon:Ne,status:se})}),t[4]=se,t[5]=Ne,t[6]=qe):qe=t[6];const ze=se==="loading"&&"Opening Wallet...",He=se==="success"&&"Wallet Connected!",We=se==="error"&&"Connection Failed";let Ze;t[7]!==ze||t[8]!==He||t[9]!==We?(Ze=jsxRuntimeExports.jsxs(Text,{textStyle:"body2Medium",color:"text.main",textAlign:"center",children:[ze,He,We]}),t[7]=ze,t[8]=He,t[9]=We,t[10]=Ze):Ze=t[10];const Ye=se==="loading"&&de,Ft=se==="error"&&be,Mt=se==="success"&&"Your wallet has been successfully linked";let Zt;t[11]!==Ft||t[12]!==Mt||t[13]!==Ye?(Zt=jsxRuntimeExports.jsxs(Text,{mt:1,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:[Ye,Ft,Mt]}),t[11]=Ft,t[12]=Mt,t[13]=Ye,t[14]=Zt):Zt=t[14];let cn;t[15]!==Zt||t[16]!==Ze?(cn=jsxRuntimeExports.jsxs(Box,{children:[Ze,Zt]}),t[15]=Zt,t[16]=Ze,t[17]=cn):cn=t[17];let hn;t[18]!==cn||t[19]!==qe?(hn=jsxRuntimeExports.jsx(Flex,{flexDirection:"column",my:"auto",height:"100%",p:4,children:jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",children:[qe,cn]})}),t[18]=cn,t[19]=qe,t[20]=hn):hn=t[20];let yn;t[21]!==me||t[22]!==se?(yn=se!=="success"&&jsxRuntimeExports.jsxs(Text,{mb:4,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:[se==="loading"&&"Extension didn't open? ",jsxRuntimeExports.jsx(Span,{onClick:me,color:"primary.main",cursor:"pointer",children:se==="loading"?"Retry":"Select a Different Wallet"})]}),t[21]=me,t[22]=se,t[23]=yn):yn=t[23];let Ht;return t[24]!==we||t[25]!==ae||t[26]!==hn||t[27]!==yn?(Ht=jsxRuntimeExports.jsxs(Oe,{open:ae,onOpenChange:we,title:"Wallet Connection",icon:IconWallet,minHeight:"560px",maxHeight:"560px",children:[hn,yn]}),t[24]=we,t[25]=ae,t[26]=hn,t[27]=yn,t[28]=Ht):Ht=t[28],Ht}const IconRotateLeft=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{d:"M21.75 12c0 5.376-4.374 9.75-9.75 9.75a9.69 9.69 0 0 1-8.731-5.417.75.75 0 1 1 1.344-.667 8.2 8.2 0 0 0 7.388 4.583c4.549 0 8.25-3.701 8.25-8.25s-3.701-8.25-8.25-8.25a8.24 8.24 0 0 0-7.33 4.5H8a.75.75 0 0 1 0 1.5H3a.75.75 0 0 1-.75-.75v-5a.75.75 0 0 1 1.5 0v2.814A9.75 9.75 0 0 1 12 2.249c5.376.001 9.75 4.375 9.75 9.751"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},getStatusTitle=(n,t)=>{switch(t){case"loading":return"Opening Wallet and Claiming NFT...";case"success":return"Transfer Completed";case"error":return n||"Claim Interrupted";default:return""}},getStatusDescription=(n,t,c)=>{switch(c){case"loading":return n;case"success":return n;case"error":return t;default:return""}},useClaimNft=()=>{const n=compilerRuntimeExports.c(25),[t,c]=React.useState("loading"),{provider:ie}=useDropWeb3(),{activeModal:se,closeModal:ae,closeAndOpen:ue}=useModals(),{selectedConnectedWallet:de,resetSelection:be}=useWalletStore(),{orderId:me,skuId:we,onMainProcessSuccess:Te,currentDescription:Ne,currentError:qe,currentErrorDescription:ze}=useClaimNftStore(),He=se==="claimProcess";let We,Ze,Ye;n[0]!==ue||n[1]!==ae||n[2]!==Te||n[3]!==me||n[4]!==ie||n[5]!==be||n[6]!==de||n[7]!==we?(We=async()=>{if(de!==null){c("loading");try{const hn=(await(await ie).claimNFT(de.walletName,{orderId:me,skuId:we})).transactionHash;Te(hn),c("success"),setTimeout(()=>{Ze()},3e3)}catch(cn){const hn=cn;c("error"),console.error("Error claiming NFT:",hn)}}},Ye=cn=>{if(cn){ue("claimProcess","manageWallets",{mode:"claim"});return}We()},Ze=()=>{ae(),be()},n[0]=ue,n[1]=ae,n[2]=Te,n[3]=me,n[4]=ie,n[5]=be,n[6]=de,n[7]=we,n[8]=We,n[9]=Ze,n[10]=Ye):(We=n[8],Ze=n[9],Ye=n[10]);let Ft;n[11]!==We||n[12]!==He?(Ft=()=>{He&&(async()=>await We())()},n[11]=We,n[12]=He,n[13]=Ft):Ft=n[13];let Mt;n[14]!==He?(Mt=[He],n[14]=He,n[15]=Mt):Mt=n[15],React.useEffect(Ft,Mt);let Zt;return n[16]!==Ne||n[17]!==qe||n[18]!==ze||n[19]!==Ze||n[20]!==Ye||n[21]!==He||n[22]!==de||n[23]!==t?(Zt={status:t,isOpen:He,selectedConnectedWallet:de,currentDescription:Ne,currentError:qe,currentErrorDescription:ze,handleRetry:Ye,handleClose:Ze},n[16]=Ne,n[17]=qe,n[18]=ze,n[19]=Ze,n[20]=Ye,n[21]=He,n[22]=de,n[23]=t,n[24]=Zt):Zt=n[24],Zt};function ClaimProcess(){const n=compilerRuntimeExports.c(34),{status:t,isOpen:c,selectedConnectedWallet:ie,currentDescription:se,currentError:ae,currentErrorDescription:ue,handleRetry:de,handleClose:be}=useClaimNft(),me=ie?.walletName??"";let we;n[0]!==me?(we=walletIcons(me),n[0]=me,n[1]=we):we=n[1];let Te;n[2]!==t||n[3]!==we?(Te=jsxRuntimeExports.jsx(Box,{width:"min-content",children:jsxRuntimeExports.jsx(Tn,{centerIcon:IconExchangeHorizontal,leftIcon:Drop3,rightIcon:we,status:t})}),n[2]=t,n[3]=we,n[4]=Te):Te=n[4];let Ne;n[5]!==ae||n[6]!==t?(Ne=getStatusTitle(ae,t),n[5]=ae,n[6]=t,n[7]=Ne):Ne=n[7];let qe;n[8]!==Ne?(qe=jsxRuntimeExports.jsx(Text,{textStyle:"body2Medium",color:"text.main",textAlign:"center",children:Ne}),n[8]=Ne,n[9]=qe):qe=n[9];let ze;n[10]!==se||n[11]!==ue||n[12]!==t?(ze=getStatusDescription(se,ue,t),n[10]=se,n[11]=ue,n[12]=t,n[13]=ze):ze=n[13];let He;n[14]!==ze?(He=jsxRuntimeExports.jsx(Text,{mt:1,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:ze}),n[14]=ze,n[15]=He):He=n[15];let We;n[16]!==qe||n[17]!==He?(We=jsxRuntimeExports.jsxs(Box,{children:[qe,He]}),n[16]=qe,n[17]=He,n[18]=We):We=n[18];let Ze;n[19]!==de||n[20]!==t?(Ze=t==="error"&&jsxRuntimeExports.jsx(ee$1,{onClick:()=>de(),leftIcon:IconRotateLeft,children:"Try Again"}),n[19]=de,n[20]=t,n[21]=Ze):Ze=n[21];let Ye;n[22]!==Te||n[23]!==We||n[24]!==Ze?(Ye=jsxRuntimeExports.jsx(Flex,{flexDirection:"column",my:"auto",height:"100%",p:4,children:jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",children:[Te,We,Ze]})}),n[22]=Te,n[23]=We,n[24]=Ze,n[25]=Ye):Ye=n[25];let Ft;n[26]!==de||n[27]!==t?(Ft=t!=="success"&&jsxRuntimeExports.jsxs(Text,{mb:4,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:[t==="loading"&&"Extension didn't open? ",jsxRuntimeExports.jsx(Span,{onClick:()=>de(t!=="loading"),color:"primary.main",cursor:"pointer",children:t==="loading"?"Retry":"Select a Different Wallet"})]}),n[26]=de,n[27]=t,n[28]=Ft):Ft=n[28];let Mt;return n[29]!==be||n[30]!==c||n[31]!==Ft||n[32]!==Ye?(Mt=jsxRuntimeExports.jsxs(Oe,{open:c,onOpenChange:be,title:"Claim NFT",icon:IconWallet,minHeight:"560px",maxHeight:"560px",children:[Ye,Ft]}),n[29]=be,n[30]=c,n[31]=Ft,n[32]=Ye,n[33]=Mt):Mt=n[33],Mt}function ClaimNftModals(){const n=compilerRuntimeExports.c(10),{loadWallets:t}=useWallets();let c,ie,se,ae,ue;n[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx(ManageWallets,{}),ie=jsxRuntimeExports.jsx(ConnectWalletModal,{}),se=jsxRuntimeExports.jsx(BrowseWallets,{}),ae=jsxRuntimeExports.jsx(GetWallet,{}),ue=jsxRuntimeExports.jsx(SelectNetwork,{}),n[0]=c,n[1]=ie,n[2]=se,n[3]=ae,n[4]=ue):(c=n[0],ie=n[1],se=n[2],ae=n[3],ue=n[4]);let de;n[5]!==t?(de=jsxRuntimeExports.jsx(WalletConnection,{reGetWallets:t}),n[5]=t,n[6]=de):de=n[6];let be;n[7]===Symbol.for("react.memo_cache_sentinel")?(be=jsxRuntimeExports.jsx(ClaimProcess,{}),n[7]=be):be=n[7];let me;return n[8]!==de?(me=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[c,ie,se,ae,ue,de,be]}),n[8]=de,n[9]=me):me=n[9],me}function ClaimNftButton(){const n=compilerRuntimeExports.c(9),{buttonText:t,isButtonDisabled:c}=useClaimNftStore(),{openModal:ie}=useModalStore();let se;n[0]!==ie?(se=()=>{ie("manageWallets",{mode:"claim"})},n[0]=ie,n[1]=se):se=n[1];const ae=se;let ue;n[2]!==t||n[3]!==ae||n[4]!==c?(ue=jsxRuntimeExports.jsx(ee$1,{variant:"primary",disabled:c,onClick:ae,children:t}),n[2]=t,n[3]=ae,n[4]=c,n[5]=ue):ue=n[5];let de;n[6]===Symbol.for("react.memo_cache_sentinel")?(de=jsxRuntimeExports.jsx(ClaimNftModals,{}),n[6]=de):de=n[6];let be;return n[7]!==ue?(be=jsxRuntimeExports.jsxs(Box,{children:[ue,de]}),n[7]=ue,n[8]=be):be=n[8],be}function ClaimNftUi(n){const t=compilerRuntimeExports.c(10),{orderId:c,skuId:ie,onError:se,onMainProcessSuccess:ae,buttonText:ue,isButtonDisabled:de}=n,{setClaimNftData:be}=useClaimNftStore();let me,we;t[0]!==ue||t[1]!==de||t[2]!==se||t[3]!==ae||t[4]!==c||t[5]!==be||t[6]!==ie?(me=()=>{be({orderId:c,skuId:ie,onError:se,onMainProcessSuccess:ae,buttonText:ue,isButtonDisabled:de})},we=[c,ie,se,ae,ue,de,be],t[0]=ue,t[1]=de,t[2]=se,t[3]=ae,t[4]=c,t[5]=be,t[6]=ie,t[7]=me,t[8]=we):(me=t[7],we=t[8]),React.useEffect(me,we);let Te;return t[9]===Symbol.for("react.memo_cache_sentinel")?(Te=jsxRuntimeExports.jsx(DropWeb3Provider,{children:jsxRuntimeExports.jsx(ClaimNftButton,{})}),t[9]=Te):Te=t[9],Te}const queryClient$1=new QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function DroplinkedClaimNFT(n){const t=compilerRuntimeExports.c(7),{orderId:c,skuId:ie,onError:se,onSuccess:ae,buttonText:ue,isButtonDisabled:de}=n;let be;return t[0]!==ue||t[1]!==de||t[2]!==se||t[3]!==ae||t[4]!==c||t[5]!==ie?(be=jsxRuntimeExports.jsx(Dn,{system:an,children:jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient$1,children:jsxRuntimeExports.jsx(ClaimNftUi,{orderId:c,skuId:ie,onError:se,onMainProcessSuccess:ae,buttonText:ue,isButtonDisabled:de})})}),t[0]=ue,t[1]=de,t[2]=se,t[3]=ae,t[4]=c,t[5]=ie,t[6]=be):be=t[6],be}const Tooltip=React__namespace.forwardRef(function n(t,c){const ie=compilerRuntimeExports.c(26);let se,ae,ue,de,be,me,we,Te;ie[0]!==t?({showArrow:we,children:se,disabled:de,portalled:Te,content:ae,contentProps:ue,portalRef:be,...me}=t,ie[0]=t,ie[1]=se,ie[2]=ae,ie[3]=ue,ie[4]=de,ie[5]=be,ie[6]=me,ie[7]=we,ie[8]=Te):(se=ie[1],ae=ie[2],ue=ie[3],de=ie[4],be=ie[5],me=ie[6],we=ie[7],Te=ie[8]);const Ne=Te===void 0?!0:Te;if(de)return se;let qe;ie[9]!==se?(qe=jsxRuntimeExports.jsx(TooltipTrigger,{asChild:!0,children:se}),ie[9]=se,ie[10]=qe):qe=ie[10];const ze=!Ne;let He;ie[11]!==we?(He=we&&jsxRuntimeExports.jsx(TooltipArrow,{children:jsxRuntimeExports.jsx(TooltipArrowTip,{})}),ie[11]=we,ie[12]=He):He=ie[12];let We;ie[13]!==ae||ie[14]!==ue||ie[15]!==c||ie[16]!==He?(We=jsxRuntimeExports.jsx(TooltipPositioner,{children:jsxRuntimeExports.jsxs(TooltipContent,{background:"neutral.bgLight",ref:c,...ue,children:[He,ae]})}),ie[13]=ae,ie[14]=ue,ie[15]=c,ie[16]=He,ie[17]=We):We=ie[17];let Ze;ie[18]!==be||ie[19]!==ze||ie[20]!==We?(Ze=jsxRuntimeExports.jsx(Portal,{disabled:ze,container:be,children:We}),ie[18]=be,ie[19]=ze,ie[20]=We,ie[21]=Ze):Ze=ie[21];let Ye;return ie[22]!==me||ie[23]!==qe||ie[24]!==Ze?(Ye=jsxRuntimeExports.jsxs(TooltipRoot,{...me,children:[qe,Ze]}),ie[22]=me,ie[23]=qe,ie[24]=Ze,ie[25]=Ye):Ye=ie[25],Ye}),useShopStore=create()(devtools(n=>({shop:null,updateShop:t=>{n({shop:t},!1,"updateShop")}}),{name:"web3-ui-shop-store"})),currencyConvertion=(n,t,c)=>isNaN(n)||isNaN(t)?0:(n*t).toFixed(2),formatPrice=(n,t,c={showCurrency:!0,showAbbreviation:!1,roundToWhole:!1})=>{const se={...{decimalPlaces:t.abbreviation==="JPY"?0:2,thousandsSeparator:",",decimalSeparator:".",symbolPosition:"before",spaceBetweenAmountAndSymbol:!1,locale:"en-US"},...t},ae=c.roundToWhole?0:se.decimalPlaces,ue=new Intl.NumberFormat(se.locale,{minimumFractionDigits:ae,maximumFractionDigits:ae}),de=+currencyConvertion(n,t.conversionRateToUSD);let be=ue.format(de);if(c.showCurrency&&t.symbol){const me=se.spaceBetweenAmountAndSymbol?" ":"";se.symbolPosition==="before"?be=`${t.symbol}${me}${be}`:be=`${be}${me}${t.symbol}`}return`${be} ${c.showAbbreviation?t.abbreviation:""}`};function DotSeparatedList(n){const t=compilerRuntimeExports.c(21);let c,ie,se;t[0]!==n?({children:c,dotColor:ie,...se}=n,t[0]=n,t[1]=c,t[2]=ie,t[3]=se):(c=t[1],ie=t[2],se=t[3]);let ae,ue,de,be,me,we,Te;if(t[4]!==c||t[5]!==ie||t[6]!==se){Te=Symbol.for("react.early_return_sentinel");e:{const qe=React.Children.toArray(c).filter(Boolean);if(qe.length===0){Te=null;break e}ae=Flex,ue="wrap",de="center",be=2,me=se,we=qe.map((ze,He)=>jsxRuntimeExports.jsxs(React.Fragment,{children:[ze,He<qe.length-1&&jsxRuntimeExports.jsx(Circle,{className:"dot-separator",size:1,bg:ie||"neutral.30"})]},He))}t[4]=c,t[5]=ie,t[6]=se,t[7]=ae,t[8]=ue,t[9]=de,t[10]=be,t[11]=me,t[12]=we,t[13]=Te}else ae=t[7],ue=t[8],de=t[9],be=t[10],me=t[11],we=t[12],Te=t[13];if(Te!==Symbol.for("react.early_return_sentinel"))return Te;let Ne;return t[14]!==ae||t[15]!==ue||t[16]!==de||t[17]!==be||t[18]!==me||t[19]!==we?(Ne=jsxRuntimeExports.jsx(ae,{flexWrap:ue,alignItems:de,gap:be,...me,children:we}),t[14]=ae,t[15]=ue,t[16]=de,t[17]=be,t[18]=me,t[19]=we,t[20]=Ne):Ne=t[20],Ne}const ProgressCircle=React__namespace.forwardRef(function n(t,c){const ie=compilerRuntimeExports.c(27);let se,ae,ue,de,be,me,we;ie[0]!==t?({showValueText:de,valueText:we,trackColor:me,color:ae,cap:se,thickness:be,...ue}=t,ie[0]=t,ie[1]=se,ie[2]=ae,ie[3]=ue,ie[4]=de,ie[5]=be,ie[6]=me,ie[7]=we):(se=ie[1],ae=ie[2],ue=ie[3],de=ie[4],be=ie[5],me=ie[6],we=ie[7]);let Te;ie[8]!==be?(Te={"--thickness":be,"--size":"20px"},ie[8]=be,ie[9]=Te):Te=ie[9];let Ne;ie[10]!==me?(Ne=jsxRuntimeExports.jsx(ProgressCircleTrack,{stroke:me}),ie[10]=me,ie[11]=Ne):Ne=ie[11];let qe;ie[12]!==se||ie[13]!==ae?(qe=jsxRuntimeExports.jsx(ProgressCircleRange,{stroke:ae,strokeLinecap:se}),ie[12]=se,ie[13]=ae,ie[14]=qe):qe=ie[14];let ze;ie[15]!==Te||ie[16]!==Ne||ie[17]!==qe?(ze=jsxRuntimeExports.jsxs(ProgressCircleCircle,{css:Te,children:[Ne,qe]}),ie[15]=Te,ie[16]=Ne,ie[17]=qe,ie[18]=ze):ze=ie[18];let He;ie[19]!==de||ie[20]!==we?(He=de&&jsxRuntimeExports.jsx(AbsoluteCenter,{children:jsxRuntimeExports.jsx(ProgressCircleValueText,{children:we})}),ie[19]=de,ie[20]=we,ie[21]=He):He=ie[21];let We;return ie[22]!==c||ie[23]!==ue||ie[24]!==ze||ie[25]!==He?(We=jsxRuntimeExports.jsxs(ProgressCircleRoot,{...ue,ref:c,children:[ze,He]}),ie[22]=c,ie[23]=ue,ie[24]=ze,ie[25]=He,ie[26]=We):We=ie[26],We});function ConnectWalletSection(n){const t=compilerRuntimeExports.c(4),{isLoading:c,openConnectModal:ie}=n;let se;t[0]===Symbol.for("react.memo_cache_sentinel")?(se={icon:IconWallet},t[0]=se):se=t[0];let ae;return t[1]!==c||t[2]!==ie?(ae=jsxRuntimeExports.jsx(fn,{title:"Connect Wallet",iconContainerProps:se,rightContent:jsxRuntimeExports.jsx(ee$1,{disabled:c,onClick:ie,buttonType:"icon",icon:IconAngleRight})}),t[1]=c,t[2]=ie,t[3]=ae):ae=t[3],ae}const initializeOrderService=n=>axiosInstance.post("/v2/orders",{cartId:n}),createPaymentIntent=({orderId:n,paymentMethod:t})=>axiosInstance.post(`/v2/orders/${n}/payment-intent`,{paymentMethod:t});function PaymentProcess(){const n=compilerRuntimeExports.c(46),[t,c]=React.useState("loading"),{currentDescription:ie,currentErrorDescription:se,currentError:ae,shopId:ue,cartId:de,onMainProcessSuccess:be}=usePaymentUiStore(),{activeModal:me,closeModal:we}=useModals(),{selectedConnectedWallet:Te}=useWalletStore(),{selectedToken:Ne}=useTokenStore(),{provider:qe}=useDropWeb3(),ze=me==="paymentProcess";let He;n[0]!==de||n[1]!==we||n[2]!==be||n[3]!==qe||n[4]!==Te||n[5]!==Ne||n[6]!==ue?(He=async()=>{if(!(!Ne||!Te)){c("loading");try{const Ge=(await initializeOrderService(de)).data.data.orderId;await createPaymentIntent({orderId:Ge,paymentMethod:`${Ne.type}-${Ne.chain}`}),await(await qe).payment(Te.walletName,{shopId:ue,orderID:Ge,chain:Ne.chain,paymentToken:Ne.type}),console.log("Payment successful for order ID:",Ge),c("success"),be(Ge),setTimeout(()=>{we()},3e3)}catch(Ge){const $t=Ge;c("error"),console.log("Payment failed:",$t)}}},n[0]=de,n[1]=we,n[2]=be,n[3]=qe,n[4]=Te,n[5]=Ne,n[6]=ue,n[7]=He):He=n[7];const We=He;let Ze;n[8]!==We||n[9]!==ze?(Ze=()=>{ze&&(async()=>await We())()},n[8]=We,n[9]=ze,n[10]=Ze):Ze=n[10];let Ye;n[11]!==ze?(Ye=[ze],n[11]=ze,n[12]=Ye):Ye=n[12],React.useEffect(Ze,Ye);const Ft=Te?.walletName??"";let Mt;n[13]!==Ft?(Mt=walletIcons(Ft),n[13]=Ft,n[14]=Mt):Mt=n[14];let Zt;n[15]!==t||n[16]!==Mt?(Zt=jsxRuntimeExports.jsx(Box,{width:"min-content",children:jsxRuntimeExports.jsx(Tn,{centerIcon:IconExchangeHorizontal,leftIcon:Drop3,rightIcon:Mt,status:t})}),n[15]=t,n[16]=Mt,n[17]=Zt):Zt=n[17];const cn=t==="loading"&&"Starting Transaction...",hn=t==="success"&&"Payment Successful",yn=t==="error"&&ae;let Ht;n[18]!==cn||n[19]!==hn||n[20]!==yn?(Ht=jsxRuntimeExports.jsxs(Text,{textStyle:"body2Medium",color:"text.main",textAlign:"center",children:[cn,hn,yn]}),n[18]=cn,n[19]=hn,n[20]=yn,n[21]=Ht):Ht=n[21];const Cn=t==="loading"&&ie,le=t==="error"&&se,pe=t==="success"&&"Your payment has been processed successfully";let ge;n[22]===Symbol.for("react.memo_cache_sentinel")?(ge=jsxRuntimeExports.jsx("br",{}),n[22]=ge):ge=n[22];const xe=t==="success"&&"Redirecting you to the order confirmation...";let _e;n[23]!==Cn||n[24]!==le||n[25]!==pe||n[26]!==xe?(_e=jsxRuntimeExports.jsxs(Text,{mt:1,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:[Cn,le,pe,ge,xe]}),n[23]=Cn,n[24]=le,n[25]=pe,n[26]=xe,n[27]=_e):_e=n[27];let De;n[28]!==_e||n[29]!==Ht?(De=jsxRuntimeExports.jsxs(Box,{children:[Ht,_e]}),n[28]=_e,n[29]=Ht,n[30]=De):De=n[30];let Fe;n[31]!==We||n[32]!==t?(Fe=t==="error"&&jsxRuntimeExports.jsx(ee$1,{onClick:We,leftIcon:IconRotateLeft,children:"Try Again"}),n[31]=We,n[32]=t,n[33]=Fe):Fe=n[33];let $e;n[34]!==De||n[35]!==Fe||n[36]!==Zt?($e=jsxRuntimeExports.jsx(Flex,{flexDirection:"column",my:"auto",height:"100%",p:4,children:jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",children:[Zt,De,Fe]})}),n[34]=De,n[35]=Fe,n[36]=Zt,n[37]=$e):$e=n[37];let ce;n[38]!==We||n[39]!==t?(ce=t==="loading"&&jsxRuntimeExports.jsxs(Text,{mb:4,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:["Extension didn't open?"," ",jsxRuntimeExports.jsx(Span,{onClick:We,color:"primary.main",cursor:"pointer",children:"Retry"})]}),n[38]=We,n[39]=t,n[40]=ce):ce=n[40];let Me;return n[41]!==we||n[42]!==ze||n[43]!==$e||n[44]!==ce?(Me=jsxRuntimeExports.jsxs(Oe,{open:ze,onOpenChange:we,title:"Payment in Progress",icon:IconWallet,minHeight:"560px",maxHeight:"560px",children:[$e,ce]}),n[41]=we,n[42]=ze,n[43]=$e,n[44]=ce,n[45]=Me):Me=n[45],Me}const TokenRightContent=n=>{const t=compilerRuntimeExports.c(8),{token:c,isSelected:ie}=n,{formattedAmount:se,fullAmount:ae,showEllipsis:ue}=useFormattedAmount(+c.formatted);if(!c?.sufficient)return null;let de;t[0]===Symbol.for("react.memo_cache_sentinel")?(de={placement:"top"},t[0]=de):de=t[0];const be=!ue,me=`${se} ${c.type}`,we=ie?"information":"transparent";let Te;t[1]!==me||t[2]!==we?(Te=jsxRuntimeExports.jsx(oe$1,{label:me,variant:we,cursor:"pointer"}),t[1]=me,t[2]=we,t[3]=Te):Te=t[3];let Ne;return t[4]!==ae||t[5]!==be||t[6]!==Te?(Ne=jsxRuntimeExports.jsx(Tooltip,{content:ae,positioning:de,disabled:be,children:Te}),t[4]=ae,t[5]=be,t[6]=Te,t[7]=Ne):Ne=t[7],Ne};function SelectToken(){const n=compilerRuntimeExports.c(41),{activeModal:t,closeModal:c}=useModals(),{allTokens:ie,isFetching:se,selectedToken:ae,setSelectedToken:ue,setStatus:de}=useTokenStore(),be=t==="selectToken";let me,we,Te,Ne,qe,ze,He,We,Ze,Ye,Ft,Mt,Zt;if(n[0]!==ie||n[1]!==c||n[2]!==se||n[3]!==be||n[4]!==ae?.chain||n[5]!==ae?.type||n[6]!==ue||n[7]!==de){const yn=ie?.filter(_temp)||[],Ht=ie?.filter(_temp2)||[],Cn=yn.length>0,le=Ht.length>0;let pe;n[21]!==c||n[22]!==ue||n[23]!==de?(pe=xe=>{ue(xe),de(null),c()},n[21]=c,n[22]=ue,n[23]=de,n[24]=pe):pe=n[24];const ge=pe;we=Oe,Ze=be,Ye=c,Ft="Tokens",Mt="560px",Zt="560px",qe=IconCoins,me=Flex,Te="column",Ne=6,ze=4,He=Cn&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Flex,{flexDirection:"column",gap:2,children:yn.map(xe=>{const _e=ae?.chain===xe.chain&&ae?.type===xe.type;return jsxRuntimeExports.jsx(Bn,{title:xe.type,subtitle:xe.chain,icon:BlockchainDisplay({show:"icon",blockchain:xe.type}),networkIcon:BlockchainDisplay({show:"icon",blockchain:xe.chain}),isSelected:_e,isDisabled:se,onClick:()=>ge(xe),rightContent:jsxRuntimeExports.jsx(TokenRightContent,{token:xe,isSelected:_e})},`${xe.chain}-${xe.type}`)})}),jsxRuntimeExports.jsx(kn,{})]}),We=le&&jsxRuntimeExports.jsx(Flex,{flexDirection:"column",gap:2,children:Ht.map(_temp3)}),n[0]=ie,n[1]=c,n[2]=se,n[3]=be,n[4]=ae?.chain,n[5]=ae?.type,n[6]=ue,n[7]=de,n[8]=me,n[9]=we,n[10]=Te,n[11]=Ne,n[12]=qe,n[13]=ze,n[14]=He,n[15]=We,n[16]=Ze,n[17]=Ye,n[18]=Ft,n[19]=Mt,n[20]=Zt}else me=n[8],we=n[9],Te=n[10],Ne=n[11],qe=n[12],ze=n[13],He=n[14],We=n[15],Ze=n[16],Ye=n[17],Ft=n[18],Mt=n[19],Zt=n[20];let cn;n[25]!==me||n[26]!==Te||n[27]!==Ne||n[28]!==ze||n[29]!==He||n[30]!==We?(cn=jsxRuntimeExports.jsxs(me,{flexDirection:Te,gap:Ne,p:ze,children:[He,We]}),n[25]=me,n[26]=Te,n[27]=Ne,n[28]=ze,n[29]=He,n[30]=We,n[31]=cn):cn=n[31];let hn;return n[32]!==we||n[33]!==qe||n[34]!==cn||n[35]!==Ze||n[36]!==Ye||n[37]!==Ft||n[38]!==Mt||n[39]!==Zt?(hn=jsxRuntimeExports.jsx(we,{open:Ze,onOpenChange:Ye,title:Ft,minHeight:Mt,maxHeight:Zt,icon:qe,children:cn}),n[32]=we,n[33]=qe,n[34]=cn,n[35]=Ze,n[36]=Ye,n[37]=Ft,n[38]=Mt,n[39]=Zt,n[40]=hn):hn=n[40],hn}function _temp3(n){return jsxRuntimeExports.jsx(Bn,{title:n.type,subtitle:n.chain,chipsLabel:"Insufficient Balance",icon:BlockchainDisplay({show:"icon",blockchain:n.type}),networkIcon:BlockchainDisplay({show:"icon",blockchain:n.chain}),rightContent:jsxRuntimeExports.jsx(TokenRightContent,{token:n,isSelected:!1}),isDisabled:!0},`${n.chain}-${n.type}`)}function _temp2(n){return!n.sufficient}function _temp(n){return n.sufficient}function PayWithCryptoModals(){const n=compilerRuntimeExports.c(11),{loadWallets:t}=usePayWithCrypto();let c,ie,se,ae;n[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx(ConnectWalletModal,{}),ie=jsxRuntimeExports.jsx(BrowseWallets,{}),se=jsxRuntimeExports.jsx(GetWallet,{}),ae=jsxRuntimeExports.jsx(SelectNetwork,{}),n[0]=c,n[1]=ie,n[2]=se,n[3]=ae):(c=n[0],ie=n[1],se=n[2],ae=n[3]);let ue;n[4]!==t?(ue=jsxRuntimeExports.jsx(WalletConnection,{reGetWallets:t}),n[4]=t,n[5]=ue):ue=n[5];let de,be,me;n[6]===Symbol.for("react.memo_cache_sentinel")?(de=jsxRuntimeExports.jsx(ManageWallets,{}),be=jsxRuntimeExports.jsx(SelectToken,{}),me=jsxRuntimeExports.jsx(PaymentProcess,{}),n[6]=de,n[7]=be,n[8]=me):(de=n[6],be=n[7],me=n[8]);let we;return n[9]!==ue?(we=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[c,ie,se,ae,ue,de,be,me]}),n[9]=ue,n[10]=we):we=n[10],we}const INSUFFICIENT_BALANCE_MESSAGE="Your wallet balance is insufficient to complete this transaction. Please top up or connect a different wallet.",NO_TOKENS_MESSAGE="No supported tokens found in this wallet. Please switch to a different wallet.",NO_LONGER_SUFFICIENT_MESSAGE="Your balance for the selected token is no longer sufficient, Choose another.";function WalletTokenSelector(n){const t=compilerRuntimeExports.c(63),{openTokensModal:c,openManageWalletsModal:ie}=n,{selectedToken:se,status:ae,isFetching:ue}=useTokenStore(),{selectedConnectedWallet:de}=useWalletStore(),be=ae==="insufficient_balance",me=ae==="no_longer_insufficient",we=ae==="no_supported",Te=be||me||we;if(ue){let $t;return t[0]===Symbol.for("react.memo_cache_sentinel")?($t=jsxRuntimeExports.jsx(Flex,{justifyContent:"center",alignItems:"center",children:jsxRuntimeExports.jsx(Spinner,{})}),t[0]=$t):$t=t[0],$t}let Ne;t[1]!==de?(Ne=de?.currentAccount?`${de.currentAccount.slice(0,4)}...${de.currentAccount.slice(-4)}`:"",t[1]=de,t[2]=Ne):Ne=t[2];const qe=Ne;let ze;t[3]!==be||t[4]!==me||t[5]!==we||t[6]!==se?.type?(ze=be||we||me?IconCoins:BlockchainDisplay({show:"icon",blockchain:se?.type}),t[3]=be,t[4]=me,t[5]=we,t[6]=se?.type,t[7]=ze):ze=t[7];const He=se?.chain;let We;t[8]!==He?(We=BlockchainDisplay({show:"icon",blockchain:He}),t[8]=He,t[9]=We):We=t[9];const Ze=!be&&!we&&!me;let Ye;t[10]!==ze||t[11]!==We||t[12]!==Ze?(Ye=jsxRuntimeExports.jsx(Ae,{icon:ze,networkIcon:We,showNetwork:Ze}),t[10]=ze,t[11]=We,t[12]=Ze,t[13]=Ye):Ye=t[13];let Ft;t[14]!==be||t[15]!==me?(Ft=(be||me)&&jsxRuntimeExports.jsx(Text,{textStyle:"body2Medium",color:"text.main",children:"Browse Tokens"}),t[14]=be,t[15]=me,t[16]=Ft):Ft=t[16];let Mt;t[17]!==we?(Mt=we&&jsxRuntimeExports.jsx(Text,{textStyle:"body2Medium",color:"text.main",children:"No tokens found"}),t[17]=we,t[18]=Mt):Mt=t[18];let Zt;t[19]!==be||t[20]!==me||t[21]!==we||t[22]!==de?.walletName||t[23]!==se?.type?(Zt=!be&&!we&&!me&&jsxRuntimeExports.jsxs(Text,{textStyle:"body2Medium",color:"text.main",children:[se?.type," (",de?.walletName,")"]}),t[19]=be,t[20]=me,t[21]=we,t[22]=de?.walletName,t[23]=se?.type,t[24]=Zt):Zt=t[24];let cn;t[25]!==Ye||t[26]!==Ft||t[27]!==Mt||t[28]!==Zt?(cn=jsxRuntimeExports.jsxs(Flex,{gap:3,alignItems:"center",children:[Ye,Ft,Mt,Zt]}),t[25]=Ye,t[26]=Ft,t[27]=Mt,t[28]=Zt,t[29]=cn):cn=t[29];let hn;t[30]!==c?(hn=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,onClick:c}),t[30]=c,t[31]=hn):hn=t[31];let yn;t[32]!==cn||t[33]!==hn?(yn=jsxRuntimeExports.jsxs(Flex,{gap:4,justifyContent:"space-between",alignItems:"center",children:[cn,hn]}),t[32]=cn,t[33]=hn,t[34]=yn):yn=t[34];let Ht;t[35]!==Te||t[36]!==be||t[37]!==me||t[38]!==ae?(Ht=Te&&jsxRuntimeExports.jsx(pn,{message:me?NO_LONGER_SUFFICIENT_MESSAGE:be?INSUFFICIENT_BALANCE_MESSAGE:NO_TOKENS_MESSAGE,state:ae==="no_longer_insufficient"?"warning":"error"}),t[35]=Te,t[36]=be,t[37]=me,t[38]=ae,t[39]=Ht):Ht=t[39];let Cn;t[40]===Symbol.for("react.memo_cache_sentinel")?(Cn=jsxRuntimeExports.jsx(kn,{}),t[40]=Cn):Cn=t[40];const le=de?.walletName||"";let pe;t[41]!==le?(pe=walletIcons(le),t[41]=le,t[42]=pe):pe=t[42];const ge=de?.group;let xe;t[43]!==ge?(xe=BlockchainDisplay({show:"icon",blockchain:ge}),t[43]=ge,t[44]=xe):xe=t[44];let _e;t[45]!==pe||t[46]!==xe?(_e=jsxRuntimeExports.jsx(Ae,{icon:pe,networkIcon:xe,showNetwork:!0}),t[45]=pe,t[46]=xe,t[47]=_e):_e=t[47];const De=de?.walletName;let Fe;t[48]!==qe||t[49]!==De?(Fe=jsxRuntimeExports.jsxs(Text,{textStyle:"body2Medium",color:"text.main",children:[De," (",qe,")"]}),t[48]=qe,t[49]=De,t[50]=Fe):Fe=t[50];let $e;t[51]!==_e||t[52]!==Fe?($e=jsxRuntimeExports.jsxs(Flex,{gap:3,alignItems:"center",children:[_e,Fe]}),t[51]=_e,t[52]=Fe,t[53]=$e):$e=t[53];let ce;t[54]!==ie?(ce=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,onClick:ie}),t[54]=ie,t[55]=ce):ce=t[55];let Me;t[56]!==$e||t[57]!==ce?(Me=jsxRuntimeExports.jsxs(Flex,{gap:4,justifyContent:"space-between",alignItems:"center",children:[$e,ce]}),t[56]=$e,t[57]=ce,t[58]=Me):Me=t[58];let Ge;return t[59]!==yn||t[60]!==Ht||t[61]!==Me?(Ge=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,children:[yn,Ht,Cn,Me]}),t[59]=yn,t[60]=Ht,t[61]=Me,t[62]=Ge):Ge=t[62],Ge}function PayWithCrypto(){const n=compilerRuntimeExports.c(50),{shop:t}=useShopStore(),{cart:c}=useCartStore(),{hasConnectedWallets:ie,isLoading:se}=usePayWithCrypto(),{selectedConnectedWallet:ae}=useWalletStore(),{selectedToken:ue,status:de,isFetching:be,progress:me,setProgress:we}=useTokenStore(),{openConnectModal:Te,openManageWalletsModal:Ne,openSelectTokenModal:qe,openPaymentProcessModal:ze}=useModals(),{formattedAmount:He,fullAmount:We,showEllipsis:Ze}=useFormattedAmount(ue?.requiredTokenAmount);let Ye;n[0]!==t.currency?(Ye=t?.currency??{},n[0]=t.currency,n[1]=Ye):Ye=n[1];const{abbreviation:Ft,symbol:Mt}=Ye,Zt=c?.financialDetails?.amounts?.totalAmount;let cn;n[2]!==t.currency||n[3]!==Zt?(cn=formatPrice(Zt,t.currency,{showAbbreviation:!1,showCurrency:!1}),n[2]=t.currency,n[3]=Zt,n[4]=cn):cn=n[4];const hn=cn;let yn,Ht;n[5]!==we?(yn=()=>{const Sn=setInterval(()=>{const{isFetching:un,progress:Pt}=useTokenStore.getState();if(!un){const mn=Pt-6.666666666666667;we(mn<=0?100:mn)}},1e3);return()=>clearInterval(Sn)},Ht=[we],n[5]=we,n[6]=yn,n[7]=Ht):(yn=n[6],Ht=n[7]),React.useEffect(yn,Ht);let Cn;n[8]===Symbol.for("react.memo_cache_sentinel")?(Cn=jsxRuntimeExports.jsx(fn,{title:"Pay with Crypto",iconContainerProps:{icon:IconCoins,variant:"secondary"}}),n[8]=Cn):Cn=n[8];let le;n[9]===Symbol.for("react.memo_cache_sentinel")?(le=jsxRuntimeExports.jsx(Text,{textStyle:"body3Regular",color:"text.subtext",children:"Total"}),n[9]=le):le=n[9];const pe=`${Mt}${hn}`,ge=`${Ft}`;let xe;n[10]!==pe||n[11]!==ge?(xe=jsxRuntimeExports.jsx(qt$1,{variant:"subtext",text:pe,subtext:ge}),n[10]=pe,n[11]=ge,n[12]=xe):xe=n[12];let _e;n[13]!==He||n[14]!==We||n[15]!==ue||n[16]!==Ze?(_e=ue?.sufficient&&jsxRuntimeExports.jsx(Tooltip,{content:We,positioning:{placement:"top"},disabled:!Ze,children:jsxRuntimeExports.jsx(qt$1,{variant:"subtext",text:He,subtext:ue.type})}),n[13]=He,n[14]=We,n[15]=ue,n[16]=Ze,n[17]=_e):_e=n[17];let De;n[18]!==_e||n[19]!==xe?(De=jsxRuntimeExports.jsx(Rn,{columns:1,px:4,py:3,children:jsxRuntimeExports.jsxs(Flex,{justifyContent:"space-between",alignItems:"center",gap:3,children:[le,jsxRuntimeExports.jsx(Flex,{alignItems:"center",children:jsxRuntimeExports.jsxs(DotSeparatedList,{children:[xe,_e]})})]})}),n[18]=_e,n[19]=xe,n[20]=De):De=n[20];let Fe;n[21]===Symbol.for("react.memo_cache_sentinel")?(Fe=jsxRuntimeExports.jsx(kn,{}),n[21]=Fe):Fe=n[21];let $e;n[22]!==ie||n[23]!==se||n[24]!==Te||n[25]!==ae||n[26]!==ue||n[27]!==de?($e=(!ie||!ue&&ae&&!de)&&jsxRuntimeExports.jsx(ConnectWalletSection,{isLoading:se,openConnectModal:Te}),n[22]=ie,n[23]=se,n[24]=Te,n[25]=ae,n[26]=ue,n[27]=de,n[28]=$e):$e=n[28];let ce;n[29]!==ie||n[30]!==Ne||n[31]!==qe||n[32]!==ae||n[33]!==ue||n[34]!==de?(ce=ie&&(ue&&ae||de)&&jsxRuntimeExports.jsx(WalletTokenSelector,{openTokensModal:qe,openManageWalletsModal:Ne}),n[29]=ie,n[30]=Ne,n[31]=qe,n[32]=ae,n[33]=ue,n[34]=de,n[35]=ce):ce=n[35];let Me;n[36]!==De||n[37]!==$e||n[38]!==ce?(Me=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,children:[De,Fe,$e,ce]}),n[36]=De,n[37]=$e,n[38]=ce,n[39]=Me):Me=n[39];const Ge=se||!ie||be||!ue?.sufficient;let $t;n[40]!==me?($t=jsxRuntimeExports.jsx(ProgressCircle,{trackColor:"transparent",thickness:"3px",cap:"round",value:me}),n[40]=me,n[41]=$t):$t=n[41];let dn;n[42]!==ze||n[43]!==Ge||n[44]!==$t?(dn=jsxRuntimeExports.jsxs(ee$1,{variant:"primary",disabled:Ge,onClick:ze,children:[$t,"Pay Now"]}),n[42]=ze,n[43]=Ge,n[44]=$t,n[45]=dn):dn=n[45];let gn;n[46]===Symbol.for("react.memo_cache_sentinel")?(gn=jsxRuntimeExports.jsx(PayWithCryptoModals,{}),n[46]=gn):gn=n[46];let Vt;return n[47]!==Me||n[48]!==dn?(Vt=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",p:4,gap:6,background:"neutral.bgLight",borderRadius:"dynamic.xl",width:"400px",children:[Cn,Me,dn,gn]}),n[47]=Me,n[48]=dn,n[49]=Vt):Vt=n[49],Vt}const getShopByIdService=({shopId:n})=>axiosInstance.get(`shops/v2/public/${n}`),getCartService=({cartID:n})=>axiosInstance.get(`/v2/carts/${n}`);function PaymentUi(n){const t=compilerRuntimeExports.c(27),{onError:c,onMainProcessSuccess:ie,cartId:se,shopId:ae}=n,{setPaymentUiData:ue}=usePaymentUiStore(),{updateShop:de}=useShopStore(),{updateCart:be}=useCartStore();let me,we;t[0]!==ae?(me=["paymentUiData",ae],we=()=>getShopByIdService({shopId:ae}),t[0]=ae,t[1]=me,t[2]=we):(me=t[1],we=t[2]);const Te=!!ae;let Ne;t[3]!==c||t[4]!==me||t[5]!==we||t[6]!==Te||t[7]!==de?(Ne={queryKey:me,queryFn:we,enabled:Te,select(yn){return yn.data.data},onSuccess(yn){de(yn)},onError(yn){c(yn?.response?.data?.data?.message||"Failed to fetch shop data")}},t[3]=c,t[4]=me,t[5]=we,t[6]=Te,t[7]=de,t[8]=Ne):Ne=t[8];const{isError:qe,isFetching:ze}=useQuery(Ne);let He,We;t[9]!==se?(He=["paymentUiData",se],We=()=>getCartService({cartID:se}),t[9]=se,t[10]=He,t[11]=We):(He=t[10],We=t[11]);const Ze=!!se;let Ye;t[12]!==c||t[13]!==He||t[14]!==We||t[15]!==Ze||t[16]!==be?(Ye={queryKey:He,queryFn:We,enabled:Ze,select(yn){return yn.data.data},onSuccess(yn){be(yn)},onError(yn){c(yn?.response?.data?.data?.message||"Failed to fetch cart data")}},t[12]=c,t[13]=He,t[14]=We,t[15]=Ze,t[16]=be,t[17]=Ye):Ye=t[17];const{isError:Ft,isFetching:Mt}=useQuery(Ye);let Zt,cn;if(t[18]!==se||t[19]!==c||t[20]!==ie||t[21]!==ue||t[22]!==ae?(cn=()=>{ue({onError:c,onMainProcessSuccess:ie,cartId:se,shopId:ae})},Zt=[c,ie,se,ae,ue],t[18]=se,t[19]=c,t[20]=ie,t[21]=ue,t[22]=ae,t[23]=Zt,t[24]=cn):(Zt=t[23],cn=t[24]),React.useEffect(cn,Zt),ze||Mt){let yn;return t[25]===Symbol.for("react.memo_cache_sentinel")?(yn=jsxRuntimeExports.jsx(Spinner,{}),t[25]=yn):yn=t[25],yn}if(qe||Ft)return null;let hn;return t[26]===Symbol.for("react.memo_cache_sentinel")?(hn=jsxRuntimeExports.jsx(DropWeb3Provider,{children:jsxRuntimeExports.jsx(PayWithCrypto,{})}),t[26]=hn):hn=t[26],hn}const queryClient=new QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function DroplinkedWeb3Payment(n){const t=compilerRuntimeExports.c(5),{cartId:c,onError:ie,onSuccess:se,shopId:ae}=n;let ue;return t[0]!==c||t[1]!==ie||t[2]!==se||t[3]!==ae?(ue=jsxRuntimeExports.jsx(Dn,{system:an,children:jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports.jsx(PaymentUi,{cartId:c,onError:ie,onMainProcessSuccess:se,shopId:ae})})}),t[0]=c,t[1]=ie,t[2]=se,t[3]=ae,t[4]=ue):ue=t[4],ue}const Actions={Payment:"payment",ClaimNFT:"claimNFT"};function DroplinkedWeb3Ui(n){const t=compilerRuntimeExports.c(4),{action:c,inputs:ie}=n;if(c===Actions.Payment){const se=ie;let ae;return t[0]!==se?(ae=jsxRuntimeExports.jsx(DroplinkedWeb3Payment,{...se}),t[0]=se,t[1]=ae):ae=t[1],ae}else{const se=ie;let ae;return t[2]!==se?(ae=jsxRuntimeExports.jsx(DroplinkedClaimNFT,{...se}),t[2]=se,t[3]=ae):ae=t[3],ae}}exports.Actions=Actions;exports.DroplinkedWeb3Ui=DroplinkedWeb3Ui;
|
|
76
|
+
`);const Ye=Ze.state[de];if(Ye==null)return;JSON.stringify(se.getState())!==JSON.stringify(Ye)&&qe(Ye);return}shouldDispatchFromDevtools(se)&&se.dispatch(Ze)});case"DISPATCH":switch(He.payload.type){case"RESET":return qe(ze),de===void 0?we?.init(se.getState()):we?.init(getTrackedConnectionState(be.name));case"COMMIT":if(de===void 0){we?.init(se.getState());return}return we?.init(getTrackedConnectionState(be.name));case"ROLLBACK":return parseJsonThen(He.state,Ze=>{if(de===void 0){qe(Ze),we?.init(se.getState());return}qe(Ze[de]),we?.init(getTrackedConnectionState(be.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return parseJsonThen(He.state,Ze=>{if(de===void 0){qe(Ze);return}JSON.stringify(se.getState())!==JSON.stringify(Ze[de])&&qe(Ze[de])});case"IMPORT_STATE":{const{nextLiftedState:Ze}=He.payload,Ye=(We=Ze.computedStates.slice(-1)[0])==null?void 0:We.state;if(!Ye)return;qe(de===void 0?Ye:Ye[de]),we?.send(null,Ze);return}case"PAUSE_RECORDING":return Ne=!Ne}return}}),ze},devtools=devtoolsImpl,parseJsonThen=(n,t)=>{let c;try{c=JSON.parse(n)}catch(ie){console.error("[zustand devtools middleware] Could not parse the received json",ie)}c!==void 0&&t(c)},useCartStore=create()(devtools(n=>({cart:null,updateCart:t=>{n({cart:t},!1,"updateCart")}}),{name:"web3-ui-cart-store"}));function useTokenBalances(n){const t=compilerRuntimeExports.c(20),{onError:c,shopId:ie}=usePaymentUiStore(),{cart:se}=useCartStore(),{selectedConnectedWallet:ae}=useWalletStore(),{setAllTokens:ue,setStatus:de,setSelectedToken:be,setFetching:me,setProgress:we}=useTokenStore(),{activeModal:Te}=useModals();let Ne;t[0]!==se?.financialDetails?.amounts?.totalAmount||t[1]!==ae?.currentAccount||t[2]!==me||t[3]!==we||t[4]!==ie?(Ne=async()=>(me(!0),we(100),getTokenBalances({address:ae?.currentAccount??"",network:appDevelopment?"TESTNET":"MAINNET",shopId:ie,amount:se?.financialDetails?.amounts?.totalAmount})),t[0]=se?.financialDetails?.amounts?.totalAmount,t[1]=ae?.currentAccount,t[2]=me,t[3]=we,t[4]=ie,t[5]=Ne):Ne=t[5];let qe;t[6]!==ae?(qe=["tokenBalances",ae],t[6]=ae,t[7]=qe):qe=t[7];const ze=n&&Te!=="paymentProcess"&&!!ie&&!!se?.id;let He;t[8]!==c||t[9]!==ue||t[10]!==me||t[11]!==be||t[12]!==de||t[13]!==Ne||t[14]!==qe||t[15]!==ze?(He={queryFn:Ne,queryKey:qe,enabled:ze,refetchInterval:15e3,select(Ft){return Ft.data.balances},onSuccess(Ft){if(ue(Ft),Ft.length===0){de("no_supported"),be(null);return}const Zt=useTokenStore.getState().selectedToken;if(Zt){const hn=Ft.find(yn=>yn.type===Zt.type&&yn.chain===Zt.chain);if(hn){hn.sufficient?(be(hn),de(null)):(be(hn),de("no_longer_insufficient"));return}}const cn=Ft.find(_temp$2);if(cn){de(null),be(cn);return}de("insufficient_balance"),be(null)},onError(Ft){const Mt=Ft;de("no_supported"),be(null),c(Mt?.message||"An error occurred while fetching token balances")},onSettled(){me(!1)}},t[8]=c,t[9]=ue,t[10]=me,t[11]=be,t[12]=de,t[13]=Ne,t[14]=qe,t[15]=ze,t[16]=He):He=t[16];const{isFetching:We,data:Ze}=useQuery(He);let Ye;return t[17]!==Ze||t[18]!==We?(Ye={allTokens:Ze,isFetching:We},t[17]=Ze,t[18]=We,t[19]=Ye):Ye=t[19],Ye}function _temp$2(n){return n.sufficient}function getActiveConnectedWallets(n){return n.filter(t=>t.isConnected&&t.isInstalled)}function usePayWithCrypto(){const n=compilerRuntimeExports.c(15),{provider:t}=useDropWeb3(),{allWallets:c,setAllWallets:ie,setSelectedConnectedWallet:se,isLoading:ae,setLoading:ue}=useWalletStore();let de;n[0]!==c?(de=getActiveConnectedWallets(c),n[0]=c,n[1]=de):de=n[1];const be=de,me=be.length>0;let we;n[2]!==t||n[3]!==ie||n[4]!==ue||n[5]!==se?(we=async()=>{ue(!0);const We=await await(await t).getAllPaymentWallets();ie(We);const Ze=getActiveConnectedWallets(We);Ze.length>0&&se(Ze[0]),ue(!1)},n[2]=t,n[3]=ie,n[4]=ue,n[5]=se,n[6]=we):we=n[6];const Te=we;let Ne;n[7]!==Te?(Ne=()=>{Te()},n[7]=Te,n[8]=Ne):Ne=n[8];let qe;n[9]===Symbol.for("react.memo_cache_sentinel")?(qe=[],n[9]=qe):qe=n[9],React.useEffect(Ne,qe),useTokenBalances(me);let ze;return n[10]!==be||n[11]!==me||n[12]!==ae||n[13]!==Te?(ze={hasConnectedWallets:me,connectedWallets:be,isLoading:ae,loadWallets:Te},n[10]=be,n[11]=me,n[12]=ae,n[13]=Te,n[14]=ze):ze=n[14],ze}const IconCopy=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{d:"M18.375 21.75h-8.75c-2.177 0-3.375-1.198-3.375-3.375v-8.75c0-2.177 1.198-3.375 3.375-3.375h8.75c2.177 0 3.375 1.198 3.375 3.375v8.75c0 2.177-1.198 3.375-3.375 3.375m-8.75-14c-1.332 0-1.875.543-1.875 1.875v8.75c0 1.332.543 1.875 1.875 1.875h8.75c1.332 0 1.875-.543 1.875-1.875v-8.75c0-1.332-.543-1.875-1.875-1.875zM3.75 15V5.625c0-1.332.543-1.875 1.875-1.875H15a.75.75 0 0 0 0-1.5H5.625c-2.177 0-3.375 1.198-3.375 3.375V15a.75.75 0 0 0 1.5 0"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},IconLinkBroken=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{d:"M17.565 14.296a.75.75 0 0 1-.531-1.279L19 11.039a4.2 4.2 0 0 0 1.249-3.016 4.25 4.25 0 0 0-1.247-3.025 4.276 4.276 0 0 0-6.04 0l-1.967 1.977a.75.75 0 0 1-1.064-1.058L11.9 3.939a5.78 5.78 0 0 1 8.162-.001 5.73 5.73 0 0 1 1.687 4.085c0 1.552-.6 3-1.689 4.078l-1.963 1.974a.75.75 0 0 1-.533.221m-5.466 5.767 1.979-1.968a.75.75 0 0 0-1.059-1.064l-1.979 1.97a4.276 4.276 0 0 1-6.04 0 4.275 4.275 0 0 1-.001-6.038l1.979-1.968a.75.75 0 0 0-1.059-1.064l-1.98 1.97a5.776 5.776 0 0 0 0 8.16 5.76 5.76 0 0 0 4.082 1.687 5.75 5.75 0 0 0 4.078-1.685M21.75 17a.75.75 0 0 0-.75-.75h-2a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 .75-.75m-4 4v-2a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0m-12-14A.75.75 0 0 0 5 6.25H3a.75.75 0 0 0 0 1.5h2A.75.75 0 0 0 5.75 7m2-2V3a.75.75 0 0 0-1.5 0v2a.75.75 0 0 0 1.5 0"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},handleCopyAddress=n=>{n&&navigator.clipboard.writeText(n)},getActionMenuItems=n=>[{icon:IconCopy,title:"Copy Address",onClick:()=>handleCopyAddress(n)},{icon:IconLinkBroken,title:"Disconnect Wallet",onClick:()=>{},variant:"disabled"}];function useFormattedAmount(n){if(n==null)return{formattedAmount:"",fullAmount:"",showEllipsis:!1};const t=String(n),[c,ie=""]=t.split("."),se=ie.replace(/0+$/,"");let ae="",ue=!1;return se?(ue=se.length>4,ae=`${c}.${se.slice(0,4)}${ue?"...":""}`):ae=c,{formattedAmount:ae,fullAmount:t,showEllipsis:ue}}function ManageWallets(){const n=compilerRuntimeExports.c(47),{activeModal:t,closeAndOpen:c,closeModal:ie}=useModals(),{modalData:se}=useModalStore(),{selectedConnectedWallet:ae,setSelectedConnectedWallet:ue}=useWalletStore(),{isLoading:de}=useWallets(t==="manageWallets"),{connectedWallets:be}=usePayWithCrypto(),me=t==="manageWallets",we=se?.mode==="claim";let Te;n[0]!==be[0]||n[1]!==be.length||n[2]!==we||n[3]!==me||n[4]!==ae||n[5]!==ue?(Te=()=>{if(me&&we&&be.length>0&&!ae){const pe=be[0];ue(pe)}},n[0]=be[0],n[1]=be.length,n[2]=we,n[3]=me,n[4]=ae,n[5]=ue,n[6]=Te):Te=n[6];let Ne;n[7]!==be||n[8]!==we||n[9]!==me?(Ne=[me,we,be],n[7]=be,n[8]=we,n[9]=me,n[10]=Ne):Ne=n[10],React.useEffect(Te,Ne);let qe;n[11]!==ie||n[12]!==we||n[13]!==ue?(qe=pe=>{ue(pe),we||ie()},n[11]=ie,n[12]=we,n[13]=ue,n[14]=qe):qe=n[14];const ze=qe;let He;n[15]!==c||n[16]!==we?(He=()=>{c("manageWallets","connectWallet",we?{mode:"claim"}:void 0)},n[15]=c,n[16]=we,n[17]=He):He=n[17];const We=He;let Ze;n[18]!==c?(Ze=()=>{c("manageWallets","claimProcess")},n[18]=c,n[19]=Ze):Ze=n[19];const Ye=Ze,Ft=we?"Select Wallet":"Manage Wallets";let Mt;n[20]!==Ye||n[21]!==we||n[22]!==ae?(Mt=we&&ae&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(kn,{}),jsxRuntimeExports.jsx(ee$1,{variant:"primary",onClick:Ye,width:"100%",children:"Continue"})]}),n[20]=Ye,n[21]=we,n[22]=ae,n[23]=Mt):Mt=n[23];let Zt;n[24]!==de?(Zt=de&&jsxRuntimeExports.jsx(Box,{m:"auto",children:jsxRuntimeExports.jsx(Spinner,{})}),n[24]=de,n[25]=Zt):Zt=n[25];let cn;n[26]!==be||n[27]!==ze||n[28]!==de||n[29]!==ae?.currentAccount?(cn=!de&&jsxRuntimeExports.jsx(Flex,{flexDirection:"column",gap:2,children:be.map(pe=>jsxRuntimeExports.jsx(_n,{title:pe.walletName,subtitle:pe.currentAccount?.slice(0,4)+"..."+pe.currentAccount?.slice(-4),icon:walletIcons(pe.walletName),networkIcon:BlockchainDisplay({show:"icon",blockchain:pe.group}),isSelected:ae?.currentAccount===pe.currentAccount,chipsLabel:"Connected",chipsVariant:"success",onClick:()=>ze(pe),rightContent:jsxRuntimeExports.jsx(Box,{onClick:_temp$1,children:jsxRuntimeExports.jsx(pt$2,{buttonVariant:"transparent",items:getActionMenuItems(pe.currentAccount),buttonProps:{_hover:{cursor:"pointer"}}})})},pe.currentAccount))}),n[26]=be,n[27]=ze,n[28]=de,n[29]=ae?.currentAccount,n[30]=cn):cn=n[30];let hn;n[31]!==be.length?(hn=!!be.length&&jsxRuntimeExports.jsx(kn,{}),n[31]=be.length,n[32]=hn):hn=n[32];let yn;n[33]===Symbol.for("react.memo_cache_sentinel")?(yn=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,variant:"transparent"}),n[33]=yn):yn=n[33];let Ht;n[34]!==We?(Ht=jsxRuntimeExports.jsx(_n,{title:"Connect New Wallet",icon:IconWallet,rightContent:yn,onClick:We}),n[34]=We,n[35]=Ht):Ht=n[35];let Cn;n[36]!==Ht||n[37]!==Zt||n[38]!==cn||n[39]!==hn?(Cn=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,p:4,children:[Zt,cn,hn,Ht]}),n[36]=Ht,n[37]=Zt,n[38]=cn,n[39]=hn,n[40]=Cn):Cn=n[40];let le;return n[41]!==ie||n[42]!==me||n[43]!==Cn||n[44]!==Ft||n[45]!==Mt?(le=jsxRuntimeExports.jsx(Oe,{open:me,onOpenChange:ie,title:Ft,icon:IconWallet,footerContent:Mt,children:Cn}),n[41]=ie,n[42]=me,n[43]=Cn,n[44]=Ft,n[45]=Mt,n[46]=le):le=n[46],le}function _temp$1(n){return n.stopPropagation()}function SelectNetwork(){const n=compilerRuntimeExports.c(37),{activeModal:t,closeModal:c,closeAndOpen:ie,setSelectedWallet:se,selectedWallet:ae}=useModals(),{modalData:ue}=useModalStore(),{resetSelection:de}=useWalletStore(),be=t==="selectNetwork",me=ue?.mode==="claim";let we;n[0]!==ie||n[1]!==me||n[2]!==de?(we=()=>{ie("selectNetwork","connectWallet",me?{mode:"claim"}:void 0),de()},n[0]=ie,n[1]=me,n[2]=de,n[3]=we):we=n[3];const Te=we;let Ne;n[4]!==ie||n[5]!==ae||n[6]!==se?(Ne=async ge=>{await se({...ae,group:ge}),ie("selectNetwork","walletConnection")},n[4]=ie,n[5]=ae,n[6]=se,n[7]=Ne):Ne=n[7];const qe=Ne;let ze;n[8]!==c||n[9]!==de?(ze=()=>{c(),de()},n[8]=c,n[9]=de,n[10]=ze):ze=n[10];const He=ze;let We;n[11]!==Te?(We=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleLeft,onClick:Te}),n[11]=Te,n[12]=We):We=n[12];const Ze=ae?.walletName??"";let Ye;n[13]!==Ze?(Ye=walletIcons(Ze),n[13]=Ze,n[14]=Ye):Ye=n[14];let Ft;n[15]!==Ye?(Ft=jsxRuntimeExports.jsx(te$1,{icon:Ye}),n[15]=Ye,n[16]=Ft):Ft=n[16];let Mt;n[17]===Symbol.for("react.memo_cache_sentinel")?(Mt=jsxRuntimeExports.jsxs(Flex,{gap:1,alignItems:"center",justifyContent:"center",flexDirection:"column",children:[jsxRuntimeExports.jsx(Text,{color:"text.main",textStyle:"body2Regular",children:"Select Network"}),jsxRuntimeExports.jsx(Text,{color:"text.subtext",textStyle:"body3Regular",children:"Choose which network to connect with your wallet"})]}),n[17]=Mt):Mt=n[17];let Zt;n[18]!==Ft?(Zt=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",justifyContent:"center",children:[Ft,Mt]}),n[18]=Ft,n[19]=Zt):Zt=n[19];let cn;n[20]===Symbol.for("react.memo_cache_sentinel")?(cn=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,variant:"transparent"}),n[20]=cn):cn=n[20];let hn;n[21]!==qe?(hn=jsxRuntimeExports.jsx(_n,{title:"EVM Networks",icon:EthereumLogo,rightContent:cn,onClick:()=>qe("EVM")}),n[21]=qe,n[22]=hn):hn=n[22];let yn;n[23]===Symbol.for("react.memo_cache_sentinel")?(yn=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,variant:"transparent"}),n[23]=yn):yn=n[23];let Ht;n[24]!==qe?(Ht=jsxRuntimeExports.jsx(_n,{title:"Solana",icon:SolanaLogo,rightContent:yn,onClick:()=>qe("SOL")}),n[24]=qe,n[25]=Ht):Ht=n[25];let Cn;n[26]!==hn||n[27]!==Ht?(Cn=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",justifyContent:"center",children:[hn,Ht]}),n[26]=hn,n[27]=Ht,n[28]=Cn):Cn=n[28];let le;n[29]!==Cn||n[30]!==Zt?(le=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:8,p:4,mt:8,children:[Zt,Cn]}),n[29]=Cn,n[30]=Zt,n[31]=le):le=n[31];let pe;return n[32]!==He||n[33]!==be||n[34]!==le||n[35]!==We?(pe=jsxRuntimeExports.jsx(Oe,{open:be,onOpenChange:He,title:"Select Network",iconType:"button",iconButton:We,minHeight:"560px",maxHeight:"560px",children:le}),n[32]=He,n[33]=be,n[34]=le,n[35]=We,n[36]=pe):pe=n[36],pe}const IconExchangeHorizontal=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{d:"m21.53 14.53-5 5a.75.75 0 0 1-1.06 0 .75.75 0 0 1 0-1.061l3.72-3.72H6a.75.75 0 0 1 0-1.5h15a.75.75 0 0 1 .53 1.281M18.75 9a.75.75 0 0 0-.75-.75H4.811l3.72-3.72A.75.75 0 1 0 7.47 3.469l-5 5A.75.75 0 0 0 3 9.749h15A.75.75 0 0 0 18.75 9"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},Drop3=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M80.166 40C80.166 62.0914 62.2574 80 40.166 80C18.0746 80 0.166016 62.0914 0.166016 40C0.166016 17.9086 18.0746 0 40.166 0C62.2574 0 80.166 17.9086 80.166 40ZM25.5832 40C25.5832 31.9203 32.0863 25.4171 40.166 25.4171C48.2457 25.4171 54.7489 32.1174 54.7489 40.1971V54.5829H40.166C32.0863 54.5829 25.5832 48.0797 25.5832 40Z",fill:"currentColor"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{viewBox:"0 0 81 80",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},useConnectWallet=({reGetWallets:n})=>{const[t,c]=React.useState("loading"),{provider:ie}=useDropWeb3(),{currentDescription:se,currentErrorDescription:ae}=usePaymentUiStore(),{activeModal:ue,closeModal:de,closeAndOpen:be}=useModals(),{modalData:me}=useModalStore(),{selectedWallet:we,resetSelection:Te}=useWalletStore(),Ne=ue==="walletConnection",qe=me?.mode==="claim",ze=async()=>{if(we===null)return;c("loading");const Ze=we.group==="SOL"?Chains.SOLANA:we.group==="EVM"?Chains.ETH:we.group;try{const Ye=(await ie).login(we?.walletName,{chain:Ze}),{address:Ft}=await Ye;qe||await n(),c(Ft?"success":"error"),setTimeout(()=>{We()},2e3)}catch(Ye){qe||await n(),c("error"),console.error("Login failed:",Ye.message)}},He=()=>{t==="loading"?ze():(We(),be("walletConnection","connectWallet"))},We=()=>{de(),Te()};return React.useEffect(()=>{Ne&&(async()=>await ze())()},[Ne]),{status:t,isOpen:Ne,selectedWallet:we,currentDescription:se,currentErrorDescription:ae,handleRetry:He,handleClose:We}};function WalletConnection(n){const t=compilerRuntimeExports.c(29),{reGetWallets:c}=n;let ie;t[0]!==c?(ie={reGetWallets:c},t[0]=c,t[1]=ie):ie=t[1];const{status:se,isOpen:ae,selectedWallet:ue,currentDescription:de,currentErrorDescription:be,handleRetry:me,handleClose:we}=useConnectWallet(ie),Te=ue?.walletName??"";let Ne;t[2]!==Te?(Ne=walletIcons(Te),t[2]=Te,t[3]=Ne):Ne=t[3];let qe;t[4]!==se||t[5]!==Ne?(qe=jsxRuntimeExports.jsx(Box,{width:"min-content",children:jsxRuntimeExports.jsx(Tn,{centerIcon:IconExchangeHorizontal,leftIcon:Drop3,rightIcon:Ne,status:se})}),t[4]=se,t[5]=Ne,t[6]=qe):qe=t[6];const ze=se==="loading"&&"Opening Wallet...",He=se==="success"&&"Wallet Connected!",We=se==="error"&&"Connection Failed";let Ze;t[7]!==ze||t[8]!==He||t[9]!==We?(Ze=jsxRuntimeExports.jsxs(Text,{textStyle:"body2Medium",color:"text.main",textAlign:"center",children:[ze,He,We]}),t[7]=ze,t[8]=He,t[9]=We,t[10]=Ze):Ze=t[10];const Ye=se==="loading"&&de,Ft=se==="error"&&be,Mt=se==="success"&&"Your wallet has been successfully linked";let Zt;t[11]!==Ft||t[12]!==Mt||t[13]!==Ye?(Zt=jsxRuntimeExports.jsxs(Text,{mt:1,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:[Ye,Ft,Mt]}),t[11]=Ft,t[12]=Mt,t[13]=Ye,t[14]=Zt):Zt=t[14];let cn;t[15]!==Zt||t[16]!==Ze?(cn=jsxRuntimeExports.jsxs(Box,{children:[Ze,Zt]}),t[15]=Zt,t[16]=Ze,t[17]=cn):cn=t[17];let hn;t[18]!==cn||t[19]!==qe?(hn=jsxRuntimeExports.jsx(Flex,{flexDirection:"column",my:"auto",height:"100%",p:4,children:jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",children:[qe,cn]})}),t[18]=cn,t[19]=qe,t[20]=hn):hn=t[20];let yn;t[21]!==me||t[22]!==se?(yn=se!=="success"&&jsxRuntimeExports.jsxs(Text,{mb:4,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:[se==="loading"&&"Extension didn't open? ",jsxRuntimeExports.jsx(Span,{onClick:me,color:"primary.main",cursor:"pointer",children:se==="loading"?"Retry":"Select a Different Wallet"})]}),t[21]=me,t[22]=se,t[23]=yn):yn=t[23];let Ht;return t[24]!==we||t[25]!==ae||t[26]!==hn||t[27]!==yn?(Ht=jsxRuntimeExports.jsxs(Oe,{open:ae,onOpenChange:we,title:"Wallet Connection",icon:IconWallet,minHeight:"560px",maxHeight:"560px",children:[hn,yn]}),t[24]=we,t[25]=ae,t[26]=hn,t[27]=yn,t[28]=Ht):Ht=t[28],Ht}const IconRotateLeft=n=>{const t=compilerRuntimeExports.c(3);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx("path",{d:"M21.75 12c0 5.376-4.374 9.75-9.75 9.75a9.69 9.69 0 0 1-8.731-5.417.75.75 0 1 1 1.344-.667 8.2 8.2 0 0 0 7.388 4.583c4.549 0 8.25-3.701 8.25-8.25s-3.701-8.25-8.25-8.25a8.24 8.24 0 0 0-7.33 4.5H8a.75.75 0 0 1 0 1.5H3a.75.75 0 0 1-.75-.75v-5a.75.75 0 0 1 1.5 0v2.814A9.75 9.75 0 0 1 12 2.249c5.376.001 9.75 4.375 9.75 9.751"}),t[0]=c):c=t[0];let ie;return t[1]!==n?(ie=jsxRuntimeExports.jsx("svg",{fill:"currentColor",viewBox:"0 0 24 24",...n,children:c}),t[1]=n,t[2]=ie):ie=t[2],ie},getStatusTitle=(n,t)=>{switch(t){case"loading":return"Opening Wallet and Claiming NFT...";case"success":return"Transfer Completed";case"error":return n||"Claim Interrupted";default:return""}},getStatusDescription=(n,t,c)=>{switch(c){case"loading":return n;case"success":return n;case"error":return t;default:return""}},useClaimNft=()=>{const n=compilerRuntimeExports.c(25),[t,c]=React.useState("loading"),{provider:ie}=useDropWeb3(),{activeModal:se,closeModal:ae,closeAndOpen:ue}=useModals(),{selectedConnectedWallet:de,resetSelection:be}=useWalletStore(),{orderId:me,skuId:we,onMainProcessSuccess:Te,currentDescription:Ne,currentError:qe,currentErrorDescription:ze}=useClaimNftStore(),He=se==="claimProcess";let We,Ze,Ye;n[0]!==ue||n[1]!==ae||n[2]!==Te||n[3]!==me||n[4]!==ie||n[5]!==be||n[6]!==de||n[7]!==we?(We=async()=>{if(de!==null){c("loading");try{const hn=(await(await ie).claimNFT(de.walletName,{orderId:me,skuId:we})).transactionHash;Te(hn),c("success"),setTimeout(()=>{Ze()},3e3)}catch(cn){const hn=cn;c("error"),console.error("Error claiming NFT:",hn)}}},Ye=cn=>{if(cn){ue("claimProcess","manageWallets",{mode:"claim"});return}We()},Ze=()=>{ae(),be()},n[0]=ue,n[1]=ae,n[2]=Te,n[3]=me,n[4]=ie,n[5]=be,n[6]=de,n[7]=we,n[8]=We,n[9]=Ze,n[10]=Ye):(We=n[8],Ze=n[9],Ye=n[10]);let Ft;n[11]!==We||n[12]!==He?(Ft=()=>{He&&(async()=>await We())()},n[11]=We,n[12]=He,n[13]=Ft):Ft=n[13];let Mt;n[14]!==He?(Mt=[He],n[14]=He,n[15]=Mt):Mt=n[15],React.useEffect(Ft,Mt);let Zt;return n[16]!==Ne||n[17]!==qe||n[18]!==ze||n[19]!==Ze||n[20]!==Ye||n[21]!==He||n[22]!==de||n[23]!==t?(Zt={status:t,isOpen:He,selectedConnectedWallet:de,currentDescription:Ne,currentError:qe,currentErrorDescription:ze,handleRetry:Ye,handleClose:Ze},n[16]=Ne,n[17]=qe,n[18]=ze,n[19]=Ze,n[20]=Ye,n[21]=He,n[22]=de,n[23]=t,n[24]=Zt):Zt=n[24],Zt};function ClaimProcess(){const n=compilerRuntimeExports.c(34),{status:t,isOpen:c,selectedConnectedWallet:ie,currentDescription:se,currentError:ae,currentErrorDescription:ue,handleRetry:de,handleClose:be}=useClaimNft(),me=ie?.walletName??"";let we;n[0]!==me?(we=walletIcons(me),n[0]=me,n[1]=we):we=n[1];let Te;n[2]!==t||n[3]!==we?(Te=jsxRuntimeExports.jsx(Box,{width:"min-content",children:jsxRuntimeExports.jsx(Tn,{centerIcon:IconExchangeHorizontal,leftIcon:Drop3,rightIcon:we,status:t})}),n[2]=t,n[3]=we,n[4]=Te):Te=n[4];let Ne;n[5]!==ae||n[6]!==t?(Ne=getStatusTitle(ae,t),n[5]=ae,n[6]=t,n[7]=Ne):Ne=n[7];let qe;n[8]!==Ne?(qe=jsxRuntimeExports.jsx(Text,{textStyle:"body2Medium",color:"text.main",textAlign:"center",children:Ne}),n[8]=Ne,n[9]=qe):qe=n[9];let ze;n[10]!==se||n[11]!==ue||n[12]!==t?(ze=getStatusDescription(se,ue,t),n[10]=se,n[11]=ue,n[12]=t,n[13]=ze):ze=n[13];let He;n[14]!==ze?(He=jsxRuntimeExports.jsx(Text,{mt:1,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:ze}),n[14]=ze,n[15]=He):He=n[15];let We;n[16]!==qe||n[17]!==He?(We=jsxRuntimeExports.jsxs(Box,{children:[qe,He]}),n[16]=qe,n[17]=He,n[18]=We):We=n[18];let Ze;n[19]!==de||n[20]!==t?(Ze=t==="error"&&jsxRuntimeExports.jsx(ee$1,{onClick:()=>de(),leftIcon:IconRotateLeft,children:"Try Again"}),n[19]=de,n[20]=t,n[21]=Ze):Ze=n[21];let Ye;n[22]!==Te||n[23]!==We||n[24]!==Ze?(Ye=jsxRuntimeExports.jsx(Flex,{flexDirection:"column",my:"auto",height:"100%",p:4,children:jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",children:[Te,We,Ze]})}),n[22]=Te,n[23]=We,n[24]=Ze,n[25]=Ye):Ye=n[25];let Ft;n[26]!==de||n[27]!==t?(Ft=t!=="success"&&jsxRuntimeExports.jsxs(Text,{mb:4,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:[t==="loading"&&"Extension didn't open? ",jsxRuntimeExports.jsx(Span,{onClick:()=>de(t!=="loading"),color:"primary.main",cursor:"pointer",children:t==="loading"?"Retry":"Select a Different Wallet"})]}),n[26]=de,n[27]=t,n[28]=Ft):Ft=n[28];let Mt;return n[29]!==be||n[30]!==c||n[31]!==Ft||n[32]!==Ye?(Mt=jsxRuntimeExports.jsxs(Oe,{open:c,onOpenChange:be,title:"Claim NFT",icon:IconWallet,minHeight:"560px",maxHeight:"560px",children:[Ye,Ft]}),n[29]=be,n[30]=c,n[31]=Ft,n[32]=Ye,n[33]=Mt):Mt=n[33],Mt}function ClaimNftModals(){const n=compilerRuntimeExports.c(10),{loadWallets:t}=useWallets();let c,ie,se,ae,ue;n[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx(ManageWallets,{}),ie=jsxRuntimeExports.jsx(ConnectWalletModal,{}),se=jsxRuntimeExports.jsx(BrowseWallets,{}),ae=jsxRuntimeExports.jsx(GetWallet,{}),ue=jsxRuntimeExports.jsx(SelectNetwork,{}),n[0]=c,n[1]=ie,n[2]=se,n[3]=ae,n[4]=ue):(c=n[0],ie=n[1],se=n[2],ae=n[3],ue=n[4]);let de;n[5]!==t?(de=jsxRuntimeExports.jsx(WalletConnection,{reGetWallets:t}),n[5]=t,n[6]=de):de=n[6];let be;n[7]===Symbol.for("react.memo_cache_sentinel")?(be=jsxRuntimeExports.jsx(ClaimProcess,{}),n[7]=be):be=n[7];let me;return n[8]!==de?(me=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[c,ie,se,ae,ue,de,be]}),n[8]=de,n[9]=me):me=n[9],me}function ClaimNftButton(){const n=compilerRuntimeExports.c(9),{buttonText:t,isButtonDisabled:c}=useClaimNftStore(),{openModal:ie}=useModalStore();let se;n[0]!==ie?(se=()=>{ie("manageWallets",{mode:"claim"})},n[0]=ie,n[1]=se):se=n[1];const ae=se;let ue;n[2]!==t||n[3]!==ae||n[4]!==c?(ue=jsxRuntimeExports.jsx(ee$1,{variant:"primary",disabled:c,onClick:ae,children:t}),n[2]=t,n[3]=ae,n[4]=c,n[5]=ue):ue=n[5];let de;n[6]===Symbol.for("react.memo_cache_sentinel")?(de=jsxRuntimeExports.jsx(ClaimNftModals,{}),n[6]=de):de=n[6];let be;return n[7]!==ue?(be=jsxRuntimeExports.jsxs(Box,{children:[ue,de]}),n[7]=ue,n[8]=be):be=n[8],be}function ClaimNftUi(n){const t=compilerRuntimeExports.c(10),{orderId:c,skuId:ie,onError:se,onMainProcessSuccess:ae,buttonText:ue,isButtonDisabled:de}=n,{setClaimNftData:be}=useClaimNftStore();let me,we;t[0]!==ue||t[1]!==de||t[2]!==se||t[3]!==ae||t[4]!==c||t[5]!==be||t[6]!==ie?(me=()=>{be({orderId:c,skuId:ie,onError:se,onMainProcessSuccess:ae,buttonText:ue,isButtonDisabled:de})},we=[c,ie,se,ae,ue,de,be],t[0]=ue,t[1]=de,t[2]=se,t[3]=ae,t[4]=c,t[5]=be,t[6]=ie,t[7]=me,t[8]=we):(me=t[7],we=t[8]),React.useEffect(me,we);let Te;return t[9]===Symbol.for("react.memo_cache_sentinel")?(Te=jsxRuntimeExports.jsx(DropWeb3Provider,{children:jsxRuntimeExports.jsx(ClaimNftButton,{})}),t[9]=Te):Te=t[9],Te}const queryClient$1=new QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function DroplinkedClaimNFT(n){const t=compilerRuntimeExports.c(7),{orderId:c,skuId:ie,onError:se,onSuccess:ae,buttonText:ue,isButtonDisabled:de}=n;let be;return t[0]!==ue||t[1]!==de||t[2]!==se||t[3]!==ae||t[4]!==c||t[5]!==ie?(be=jsxRuntimeExports.jsx(Dn,{system:an,children:jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient$1,children:jsxRuntimeExports.jsx(ClaimNftUi,{orderId:c,skuId:ie,onError:se,onMainProcessSuccess:ae,buttonText:ue,isButtonDisabled:de})})}),t[0]=ue,t[1]=de,t[2]=se,t[3]=ae,t[4]=c,t[5]=ie,t[6]=be):be=t[6],be}const Tooltip=React__namespace.forwardRef(function n(t,c){const ie=compilerRuntimeExports.c(26);let se,ae,ue,de,be,me,we,Te;ie[0]!==t?({showArrow:we,children:se,disabled:de,portalled:Te,content:ae,contentProps:ue,portalRef:be,...me}=t,ie[0]=t,ie[1]=se,ie[2]=ae,ie[3]=ue,ie[4]=de,ie[5]=be,ie[6]=me,ie[7]=we,ie[8]=Te):(se=ie[1],ae=ie[2],ue=ie[3],de=ie[4],be=ie[5],me=ie[6],we=ie[7],Te=ie[8]);const Ne=Te===void 0?!0:Te;if(de)return se;let qe;ie[9]!==se?(qe=jsxRuntimeExports.jsx(TooltipTrigger,{asChild:!0,children:se}),ie[9]=se,ie[10]=qe):qe=ie[10];const ze=!Ne;let He;ie[11]!==we?(He=we&&jsxRuntimeExports.jsx(TooltipArrow,{children:jsxRuntimeExports.jsx(TooltipArrowTip,{})}),ie[11]=we,ie[12]=He):He=ie[12];let We;ie[13]!==ae||ie[14]!==ue||ie[15]!==c||ie[16]!==He?(We=jsxRuntimeExports.jsx(TooltipPositioner,{children:jsxRuntimeExports.jsxs(TooltipContent,{background:"neutral.bgLight",ref:c,...ue,children:[He,ae]})}),ie[13]=ae,ie[14]=ue,ie[15]=c,ie[16]=He,ie[17]=We):We=ie[17];let Ze;ie[18]!==be||ie[19]!==ze||ie[20]!==We?(Ze=jsxRuntimeExports.jsx(Portal,{disabled:ze,container:be,children:We}),ie[18]=be,ie[19]=ze,ie[20]=We,ie[21]=Ze):Ze=ie[21];let Ye;return ie[22]!==me||ie[23]!==qe||ie[24]!==Ze?(Ye=jsxRuntimeExports.jsxs(TooltipRoot,{...me,children:[qe,Ze]}),ie[22]=me,ie[23]=qe,ie[24]=Ze,ie[25]=Ye):Ye=ie[25],Ye}),useShopStore=create()(devtools(n=>({shop:null,updateShop:t=>{n({shop:t},!1,"updateShop")}}),{name:"web3-ui-shop-store"})),currencyConvertion=(n,t,c)=>isNaN(n)||isNaN(t)?0:(n*t).toFixed(2),formatPrice=(n,t,c={showCurrency:!0,showAbbreviation:!1,roundToWhole:!1})=>{const se={...{decimalPlaces:t.abbreviation==="JPY"?0:2,thousandsSeparator:",",decimalSeparator:".",symbolPosition:"before",spaceBetweenAmountAndSymbol:!1,locale:"en-US"},...t},ae=c.roundToWhole?0:se.decimalPlaces,ue=new Intl.NumberFormat(se.locale,{minimumFractionDigits:ae,maximumFractionDigits:ae}),de=+currencyConvertion(n,t.conversionRateToUSD);let be=ue.format(de);if(c.showCurrency&&t.symbol){const me=se.spaceBetweenAmountAndSymbol?" ":"";se.symbolPosition==="before"?be=`${t.symbol}${me}${be}`:be=`${be}${me}${t.symbol}`}return`${be} ${c.showAbbreviation?t.abbreviation:""}`};function DotSeparatedList(n){const t=compilerRuntimeExports.c(21);let c,ie,se;t[0]!==n?({children:c,dotColor:ie,...se}=n,t[0]=n,t[1]=c,t[2]=ie,t[3]=se):(c=t[1],ie=t[2],se=t[3]);let ae,ue,de,be,me,we,Te;if(t[4]!==c||t[5]!==ie||t[6]!==se){Te=Symbol.for("react.early_return_sentinel");e:{const qe=React.Children.toArray(c).filter(Boolean);if(qe.length===0){Te=null;break e}ae=Flex,ue="wrap",de="center",be=2,me=se,we=qe.map((ze,He)=>jsxRuntimeExports.jsxs(React.Fragment,{children:[ze,He<qe.length-1&&jsxRuntimeExports.jsx(Circle,{className:"dot-separator",size:1,bg:ie||"neutral.30"})]},He))}t[4]=c,t[5]=ie,t[6]=se,t[7]=ae,t[8]=ue,t[9]=de,t[10]=be,t[11]=me,t[12]=we,t[13]=Te}else ae=t[7],ue=t[8],de=t[9],be=t[10],me=t[11],we=t[12],Te=t[13];if(Te!==Symbol.for("react.early_return_sentinel"))return Te;let Ne;return t[14]!==ae||t[15]!==ue||t[16]!==de||t[17]!==be||t[18]!==me||t[19]!==we?(Ne=jsxRuntimeExports.jsx(ae,{flexWrap:ue,alignItems:de,gap:be,...me,children:we}),t[14]=ae,t[15]=ue,t[16]=de,t[17]=be,t[18]=me,t[19]=we,t[20]=Ne):Ne=t[20],Ne}const ProgressCircle=React__namespace.forwardRef(function n(t,c){const ie=compilerRuntimeExports.c(27);let se,ae,ue,de,be,me,we;ie[0]!==t?({showValueText:de,valueText:we,trackColor:me,color:ae,cap:se,thickness:be,...ue}=t,ie[0]=t,ie[1]=se,ie[2]=ae,ie[3]=ue,ie[4]=de,ie[5]=be,ie[6]=me,ie[7]=we):(se=ie[1],ae=ie[2],ue=ie[3],de=ie[4],be=ie[5],me=ie[6],we=ie[7]);let Te;ie[8]!==be?(Te={"--thickness":be,"--size":"20px"},ie[8]=be,ie[9]=Te):Te=ie[9];let Ne;ie[10]!==me?(Ne=jsxRuntimeExports.jsx(ProgressCircleTrack,{stroke:me}),ie[10]=me,ie[11]=Ne):Ne=ie[11];let qe;ie[12]!==se||ie[13]!==ae?(qe=jsxRuntimeExports.jsx(ProgressCircleRange,{stroke:ae,strokeLinecap:se}),ie[12]=se,ie[13]=ae,ie[14]=qe):qe=ie[14];let ze;ie[15]!==Te||ie[16]!==Ne||ie[17]!==qe?(ze=jsxRuntimeExports.jsxs(ProgressCircleCircle,{css:Te,children:[Ne,qe]}),ie[15]=Te,ie[16]=Ne,ie[17]=qe,ie[18]=ze):ze=ie[18];let He;ie[19]!==de||ie[20]!==we?(He=de&&jsxRuntimeExports.jsx(AbsoluteCenter,{children:jsxRuntimeExports.jsx(ProgressCircleValueText,{children:we})}),ie[19]=de,ie[20]=we,ie[21]=He):He=ie[21];let We;return ie[22]!==c||ie[23]!==ue||ie[24]!==ze||ie[25]!==He?(We=jsxRuntimeExports.jsxs(ProgressCircleRoot,{...ue,ref:c,children:[ze,He]}),ie[22]=c,ie[23]=ue,ie[24]=ze,ie[25]=He,ie[26]=We):We=ie[26],We});function ConnectWalletSection(n){const t=compilerRuntimeExports.c(4),{isLoading:c,openConnectModal:ie}=n;let se;t[0]===Symbol.for("react.memo_cache_sentinel")?(se={icon:IconWallet},t[0]=se):se=t[0];let ae;return t[1]!==c||t[2]!==ie?(ae=jsxRuntimeExports.jsx(fn,{title:"Connect Wallet",iconContainerProps:se,rightContent:jsxRuntimeExports.jsx(ee$1,{disabled:c,onClick:ie,buttonType:"icon",icon:IconAngleRight})}),t[1]=c,t[2]=ie,t[3]=ae):ae=t[3],ae}const initializeOrderService=n=>axiosInstance.post("/v2/orders",{cartId:n}),createPaymentIntent=({orderId:n,paymentMethod:t})=>axiosInstance.post(`/v2/orders/${n}/payment-intent`,{paymentMethod:t});function PaymentProcess(){const n=compilerRuntimeExports.c(46),[t,c]=React.useState("loading"),{currentDescription:ie,currentErrorDescription:se,currentError:ae,shopId:ue,cartId:de,onMainProcessSuccess:be}=usePaymentUiStore(),{activeModal:me,closeModal:we}=useModals(),{selectedConnectedWallet:Te}=useWalletStore(),{selectedToken:Ne}=useTokenStore(),{provider:qe}=useDropWeb3(),ze=me==="paymentProcess";let He;n[0]!==de||n[1]!==we||n[2]!==be||n[3]!==qe||n[4]!==Te||n[5]!==Ne||n[6]!==ue?(He=async()=>{if(!(!Ne||!Te)){c("loading");try{const Ge=(await initializeOrderService(de)).data.data.orderId;await createPaymentIntent({orderId:Ge,paymentMethod:`${Ne.type}-${Ne.chain}`}),await(await qe).payment(Te.walletName,{shopId:ue,orderID:Ge,chain:Ne.chain,paymentToken:Ne.type}),console.log("Payment successful for order ID:",Ge),c("success"),be(Ge),setTimeout(()=>{we()},3e3)}catch(Ge){const $t=Ge;c("error"),console.log("Payment failed:",$t)}}},n[0]=de,n[1]=we,n[2]=be,n[3]=qe,n[4]=Te,n[5]=Ne,n[6]=ue,n[7]=He):He=n[7];const We=He;let Ze;n[8]!==We||n[9]!==ze?(Ze=()=>{ze&&(async()=>await We())()},n[8]=We,n[9]=ze,n[10]=Ze):Ze=n[10];let Ye;n[11]!==ze?(Ye=[ze],n[11]=ze,n[12]=Ye):Ye=n[12],React.useEffect(Ze,Ye);const Ft=Te?.walletName??"";let Mt;n[13]!==Ft?(Mt=walletIcons(Ft),n[13]=Ft,n[14]=Mt):Mt=n[14];let Zt;n[15]!==t||n[16]!==Mt?(Zt=jsxRuntimeExports.jsx(Box,{width:"min-content",children:jsxRuntimeExports.jsx(Tn,{centerIcon:IconExchangeHorizontal,leftIcon:Drop3,rightIcon:Mt,status:t})}),n[15]=t,n[16]=Mt,n[17]=Zt):Zt=n[17];const cn=t==="loading"&&"Starting Transaction...",hn=t==="success"&&"Payment Successful",yn=t==="error"&&ae;let Ht;n[18]!==cn||n[19]!==hn||n[20]!==yn?(Ht=jsxRuntimeExports.jsxs(Text,{textStyle:"body2Medium",color:"text.main",textAlign:"center",children:[cn,hn,yn]}),n[18]=cn,n[19]=hn,n[20]=yn,n[21]=Ht):Ht=n[21];const Cn=t==="loading"&&ie,le=t==="error"&&se,pe=t==="success"&&"Your payment has been processed successfully";let ge;n[22]===Symbol.for("react.memo_cache_sentinel")?(ge=jsxRuntimeExports.jsx("br",{}),n[22]=ge):ge=n[22];const xe=t==="success"&&"Redirecting you to the order confirmation...";let _e;n[23]!==Cn||n[24]!==le||n[25]!==pe||n[26]!==xe?(_e=jsxRuntimeExports.jsxs(Text,{mt:1,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:[Cn,le,pe,ge,xe]}),n[23]=Cn,n[24]=le,n[25]=pe,n[26]=xe,n[27]=_e):_e=n[27];let De;n[28]!==_e||n[29]!==Ht?(De=jsxRuntimeExports.jsxs(Box,{children:[Ht,_e]}),n[28]=_e,n[29]=Ht,n[30]=De):De=n[30];let Fe;n[31]!==We||n[32]!==t?(Fe=t==="error"&&jsxRuntimeExports.jsx(ee$1,{onClick:We,leftIcon:IconRotateLeft,children:"Try Again"}),n[31]=We,n[32]=t,n[33]=Fe):Fe=n[33];let $e;n[34]!==De||n[35]!==Fe||n[36]!==Zt?($e=jsxRuntimeExports.jsx(Flex,{flexDirection:"column",my:"auto",height:"100%",p:4,children:jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,alignItems:"center",children:[Zt,De,Fe]})}),n[34]=De,n[35]=Fe,n[36]=Zt,n[37]=$e):$e=n[37];let ce;n[38]!==We||n[39]!==t?(ce=t==="loading"&&jsxRuntimeExports.jsxs(Text,{mb:4,textStyle:"body3Regular",color:"text.subtext",textAlign:"center",children:["Extension didn't open?"," ",jsxRuntimeExports.jsx(Span,{onClick:We,color:"primary.main",cursor:"pointer",children:"Retry"})]}),n[38]=We,n[39]=t,n[40]=ce):ce=n[40];let Me;return n[41]!==we||n[42]!==ze||n[43]!==$e||n[44]!==ce?(Me=jsxRuntimeExports.jsxs(Oe,{open:ze,onOpenChange:we,title:"Payment in Progress",icon:IconWallet,minHeight:"560px",maxHeight:"560px",children:[$e,ce]}),n[41]=we,n[42]=ze,n[43]=$e,n[44]=ce,n[45]=Me):Me=n[45],Me}const TokenRightContent=n=>{const t=compilerRuntimeExports.c(8),{token:c,isSelected:ie}=n,{formattedAmount:se,fullAmount:ae,showEllipsis:ue}=useFormattedAmount(+c.formatted);if(!c?.sufficient)return null;let de;t[0]===Symbol.for("react.memo_cache_sentinel")?(de={placement:"top"},t[0]=de):de=t[0];const be=!ue,me=`${se} ${c.type}`,we=ie?"information":"transparent";let Te;t[1]!==me||t[2]!==we?(Te=jsxRuntimeExports.jsx(oe$1,{label:me,variant:we,cursor:"pointer"}),t[1]=me,t[2]=we,t[3]=Te):Te=t[3];let Ne;return t[4]!==ae||t[5]!==be||t[6]!==Te?(Ne=jsxRuntimeExports.jsx(Tooltip,{content:ae,positioning:de,disabled:be,children:Te}),t[4]=ae,t[5]=be,t[6]=Te,t[7]=Ne):Ne=t[7],Ne};function SelectToken(){const n=compilerRuntimeExports.c(41),{activeModal:t,closeModal:c}=useModals(),{allTokens:ie,isFetching:se,selectedToken:ae,setSelectedToken:ue,setStatus:de}=useTokenStore(),be=t==="selectToken";let me,we,Te,Ne,qe,ze,He,We,Ze,Ye,Ft,Mt,Zt;if(n[0]!==ie||n[1]!==c||n[2]!==se||n[3]!==be||n[4]!==ae?.chain||n[5]!==ae?.type||n[6]!==ue||n[7]!==de){const yn=ie?.filter(_temp)||[],Ht=ie?.filter(_temp2)||[],Cn=yn.length>0,le=Ht.length>0;let pe;n[21]!==c||n[22]!==ue||n[23]!==de?(pe=xe=>{ue(xe),de(null),c()},n[21]=c,n[22]=ue,n[23]=de,n[24]=pe):pe=n[24];const ge=pe;we=Oe,Ze=be,Ye=c,Ft="Tokens",Mt="560px",Zt="560px",qe=IconCoins,me=Flex,Te="column",Ne=6,ze=4,He=Cn&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Flex,{flexDirection:"column",gap:2,children:yn.map(xe=>{const _e=ae?.chain===xe.chain&&ae?.type===xe.type;return jsxRuntimeExports.jsx(Bn,{title:xe.type,subtitle:xe.chain,icon:BlockchainDisplay({show:"icon",blockchain:xe.type}),networkIcon:BlockchainDisplay({show:"icon",blockchain:xe.chain}),isSelected:_e,isDisabled:se,onClick:()=>ge(xe),rightContent:jsxRuntimeExports.jsx(TokenRightContent,{token:xe,isSelected:_e})},`${xe.chain}-${xe.type}`)})}),jsxRuntimeExports.jsx(kn,{})]}),We=le&&jsxRuntimeExports.jsx(Flex,{flexDirection:"column",gap:2,children:Ht.map(_temp3)}),n[0]=ie,n[1]=c,n[2]=se,n[3]=be,n[4]=ae?.chain,n[5]=ae?.type,n[6]=ue,n[7]=de,n[8]=me,n[9]=we,n[10]=Te,n[11]=Ne,n[12]=qe,n[13]=ze,n[14]=He,n[15]=We,n[16]=Ze,n[17]=Ye,n[18]=Ft,n[19]=Mt,n[20]=Zt}else me=n[8],we=n[9],Te=n[10],Ne=n[11],qe=n[12],ze=n[13],He=n[14],We=n[15],Ze=n[16],Ye=n[17],Ft=n[18],Mt=n[19],Zt=n[20];let cn;n[25]!==me||n[26]!==Te||n[27]!==Ne||n[28]!==ze||n[29]!==He||n[30]!==We?(cn=jsxRuntimeExports.jsxs(me,{flexDirection:Te,gap:Ne,p:ze,children:[He,We]}),n[25]=me,n[26]=Te,n[27]=Ne,n[28]=ze,n[29]=He,n[30]=We,n[31]=cn):cn=n[31];let hn;return n[32]!==we||n[33]!==qe||n[34]!==cn||n[35]!==Ze||n[36]!==Ye||n[37]!==Ft||n[38]!==Mt||n[39]!==Zt?(hn=jsxRuntimeExports.jsx(we,{open:Ze,onOpenChange:Ye,title:Ft,minHeight:Mt,maxHeight:Zt,icon:qe,children:cn}),n[32]=we,n[33]=qe,n[34]=cn,n[35]=Ze,n[36]=Ye,n[37]=Ft,n[38]=Mt,n[39]=Zt,n[40]=hn):hn=n[40],hn}function _temp3(n){return jsxRuntimeExports.jsx(Bn,{title:n.type,subtitle:n.chain,chipsLabel:"Insufficient Balance",icon:BlockchainDisplay({show:"icon",blockchain:n.type}),networkIcon:BlockchainDisplay({show:"icon",blockchain:n.chain}),rightContent:jsxRuntimeExports.jsx(TokenRightContent,{token:n,isSelected:!1}),isDisabled:!0},`${n.chain}-${n.type}`)}function _temp2(n){return!n.sufficient}function _temp(n){return n.sufficient}function PayWithCryptoModals(){const n=compilerRuntimeExports.c(11),{loadWallets:t}=usePayWithCrypto();let c,ie,se,ae;n[0]===Symbol.for("react.memo_cache_sentinel")?(c=jsxRuntimeExports.jsx(ConnectWalletModal,{}),ie=jsxRuntimeExports.jsx(BrowseWallets,{}),se=jsxRuntimeExports.jsx(GetWallet,{}),ae=jsxRuntimeExports.jsx(SelectNetwork,{}),n[0]=c,n[1]=ie,n[2]=se,n[3]=ae):(c=n[0],ie=n[1],se=n[2],ae=n[3]);let ue;n[4]!==t?(ue=jsxRuntimeExports.jsx(WalletConnection,{reGetWallets:t}),n[4]=t,n[5]=ue):ue=n[5];let de,be,me;n[6]===Symbol.for("react.memo_cache_sentinel")?(de=jsxRuntimeExports.jsx(ManageWallets,{}),be=jsxRuntimeExports.jsx(SelectToken,{}),me=jsxRuntimeExports.jsx(PaymentProcess,{}),n[6]=de,n[7]=be,n[8]=me):(de=n[6],be=n[7],me=n[8]);let we;return n[9]!==ue?(we=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[c,ie,se,ae,ue,de,be,me]}),n[9]=ue,n[10]=we):we=n[10],we}const INSUFFICIENT_BALANCE_MESSAGE="Your wallet balance is insufficient to complete this transaction. Please top up or connect a different wallet.",NO_TOKENS_MESSAGE="No supported tokens found in this wallet. Please switch to a different wallet.",NO_LONGER_SUFFICIENT_MESSAGE="Your balance for the selected token is no longer sufficient, Choose another.";function WalletTokenSelector(n){const t=compilerRuntimeExports.c(63),{openTokensModal:c,openManageWalletsModal:ie}=n,{selectedToken:se,status:ae,isFetching:ue}=useTokenStore(),{selectedConnectedWallet:de}=useWalletStore(),be=ae==="insufficient_balance",me=ae==="no_longer_insufficient",we=ae==="no_supported",Te=be||me||we;if(ue){let $t;return t[0]===Symbol.for("react.memo_cache_sentinel")?($t=jsxRuntimeExports.jsx(Flex,{justifyContent:"center",alignItems:"center",children:jsxRuntimeExports.jsx(Spinner,{})}),t[0]=$t):$t=t[0],$t}let Ne;t[1]!==de?(Ne=de?.currentAccount?`${de.currentAccount.slice(0,4)}...${de.currentAccount.slice(-4)}`:"",t[1]=de,t[2]=Ne):Ne=t[2];const qe=Ne;let ze;t[3]!==be||t[4]!==me||t[5]!==we||t[6]!==se?.type?(ze=be||we||me?IconCoins:BlockchainDisplay({show:"icon",blockchain:se?.type}),t[3]=be,t[4]=me,t[5]=we,t[6]=se?.type,t[7]=ze):ze=t[7];const He=se?.chain;let We;t[8]!==He?(We=BlockchainDisplay({show:"icon",blockchain:He}),t[8]=He,t[9]=We):We=t[9];const Ze=!be&&!we&&!me;let Ye;t[10]!==ze||t[11]!==We||t[12]!==Ze?(Ye=jsxRuntimeExports.jsx(Ae,{icon:ze,networkIcon:We,showNetwork:Ze}),t[10]=ze,t[11]=We,t[12]=Ze,t[13]=Ye):Ye=t[13];let Ft;t[14]!==be||t[15]!==me?(Ft=(be||me)&&jsxRuntimeExports.jsx(Text,{textStyle:"body2Medium",color:"text.main",children:"Browse Tokens"}),t[14]=be,t[15]=me,t[16]=Ft):Ft=t[16];let Mt;t[17]!==we?(Mt=we&&jsxRuntimeExports.jsx(Text,{textStyle:"body2Medium",color:"text.main",children:"No tokens found"}),t[17]=we,t[18]=Mt):Mt=t[18];let Zt;t[19]!==be||t[20]!==me||t[21]!==we||t[22]!==de?.walletName||t[23]!==se?.type?(Zt=!be&&!we&&!me&&jsxRuntimeExports.jsxs(Text,{textStyle:"body2Medium",color:"text.main",children:[se?.type," (",de?.walletName,")"]}),t[19]=be,t[20]=me,t[21]=we,t[22]=de?.walletName,t[23]=se?.type,t[24]=Zt):Zt=t[24];let cn;t[25]!==Ye||t[26]!==Ft||t[27]!==Mt||t[28]!==Zt?(cn=jsxRuntimeExports.jsxs(Flex,{gap:3,alignItems:"center",children:[Ye,Ft,Mt,Zt]}),t[25]=Ye,t[26]=Ft,t[27]=Mt,t[28]=Zt,t[29]=cn):cn=t[29];let hn;t[30]!==c?(hn=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,onClick:c}),t[30]=c,t[31]=hn):hn=t[31];let yn;t[32]!==cn||t[33]!==hn?(yn=jsxRuntimeExports.jsxs(Flex,{gap:4,justifyContent:"space-between",alignItems:"center",children:[cn,hn]}),t[32]=cn,t[33]=hn,t[34]=yn):yn=t[34];let Ht;t[35]!==Te||t[36]!==be||t[37]!==me||t[38]!==ae?(Ht=Te&&jsxRuntimeExports.jsx(pn,{message:me?NO_LONGER_SUFFICIENT_MESSAGE:be?INSUFFICIENT_BALANCE_MESSAGE:NO_TOKENS_MESSAGE,state:ae==="no_longer_insufficient"?"warning":"error"}),t[35]=Te,t[36]=be,t[37]=me,t[38]=ae,t[39]=Ht):Ht=t[39];let Cn;t[40]===Symbol.for("react.memo_cache_sentinel")?(Cn=jsxRuntimeExports.jsx(kn,{}),t[40]=Cn):Cn=t[40];const le=de?.walletName||"";let pe;t[41]!==le?(pe=walletIcons(le),t[41]=le,t[42]=pe):pe=t[42];const ge=de?.group;let xe;t[43]!==ge?(xe=BlockchainDisplay({show:"icon",blockchain:ge}),t[43]=ge,t[44]=xe):xe=t[44];let _e;t[45]!==pe||t[46]!==xe?(_e=jsxRuntimeExports.jsx(Ae,{icon:pe,networkIcon:xe,showNetwork:!0}),t[45]=pe,t[46]=xe,t[47]=_e):_e=t[47];const De=de?.walletName;let Fe;t[48]!==qe||t[49]!==De?(Fe=jsxRuntimeExports.jsxs(Text,{textStyle:"body2Medium",color:"text.main",children:[De," (",qe,")"]}),t[48]=qe,t[49]=De,t[50]=Fe):Fe=t[50];let $e;t[51]!==_e||t[52]!==Fe?($e=jsxRuntimeExports.jsxs(Flex,{gap:3,alignItems:"center",children:[_e,Fe]}),t[51]=_e,t[52]=Fe,t[53]=$e):$e=t[53];let ce;t[54]!==ie?(ce=jsxRuntimeExports.jsx(ee$1,{buttonType:"icon",icon:IconAngleRight,onClick:ie}),t[54]=ie,t[55]=ce):ce=t[55];let Me;t[56]!==$e||t[57]!==ce?(Me=jsxRuntimeExports.jsxs(Flex,{gap:4,justifyContent:"space-between",alignItems:"center",children:[$e,ce]}),t[56]=$e,t[57]=ce,t[58]=Me):Me=t[58];let Ge;return t[59]!==yn||t[60]!==Ht||t[61]!==Me?(Ge=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,children:[yn,Ht,Cn,Me]}),t[59]=yn,t[60]=Ht,t[61]=Me,t[62]=Ge):Ge=t[62],Ge}function PayWithCrypto(){const n=compilerRuntimeExports.c(50),{shop:t}=useShopStore(),{cart:c}=useCartStore(),{hasConnectedWallets:ie,isLoading:se}=usePayWithCrypto(),{selectedConnectedWallet:ae}=useWalletStore(),{selectedToken:ue,status:de,isFetching:be,progress:me,setProgress:we}=useTokenStore(),{openConnectModal:Te,openManageWalletsModal:Ne,openSelectTokenModal:qe,openPaymentProcessModal:ze}=useModals(),{formattedAmount:He,fullAmount:We,showEllipsis:Ze}=useFormattedAmount(ue?.requiredTokenAmount);let Ye;n[0]!==t.currency?(Ye=t?.currency??{},n[0]=t.currency,n[1]=Ye):Ye=n[1];const{abbreviation:Ft,symbol:Mt}=Ye,Zt=c?.financialDetails?.amounts?.totalAmount;let cn;n[2]!==t.currency||n[3]!==Zt?(cn=formatPrice(Zt,t.currency,{showAbbreviation:!1,showCurrency:!1}),n[2]=t.currency,n[3]=Zt,n[4]=cn):cn=n[4];const hn=cn;let yn,Ht;n[5]!==we?(yn=()=>{const Sn=setInterval(()=>{const{isFetching:un,progress:Pt}=useTokenStore.getState();if(!un){const mn=Pt-6.666666666666667;we(mn<=0?100:mn)}},1e3);return()=>clearInterval(Sn)},Ht=[we],n[5]=we,n[6]=yn,n[7]=Ht):(yn=n[6],Ht=n[7]),React.useEffect(yn,Ht);let Cn;n[8]===Symbol.for("react.memo_cache_sentinel")?(Cn=jsxRuntimeExports.jsx(fn,{title:"Pay with Crypto",iconContainerProps:{icon:IconCoins,variant:"secondary"}}),n[8]=Cn):Cn=n[8];let le;n[9]===Symbol.for("react.memo_cache_sentinel")?(le=jsxRuntimeExports.jsx(Text,{textStyle:"body3Regular",color:"text.subtext",children:"Total"}),n[9]=le):le=n[9];const pe=`${Mt}${hn}`,ge=`${Ft}`;let xe;n[10]!==pe||n[11]!==ge?(xe=jsxRuntimeExports.jsx(qt$1,{variant:"subtext",text:pe,subtext:ge}),n[10]=pe,n[11]=ge,n[12]=xe):xe=n[12];let _e;n[13]!==He||n[14]!==We||n[15]!==ue||n[16]!==Ze?(_e=ue?.sufficient&&jsxRuntimeExports.jsx(Tooltip,{content:We,positioning:{placement:"top"},disabled:!Ze,children:jsxRuntimeExports.jsx(qt$1,{variant:"subtext",text:He,subtext:ue.type})}),n[13]=He,n[14]=We,n[15]=ue,n[16]=Ze,n[17]=_e):_e=n[17];let De;n[18]!==_e||n[19]!==xe?(De=jsxRuntimeExports.jsx(Rn,{columns:1,px:4,py:3,children:jsxRuntimeExports.jsxs(Flex,{justifyContent:"space-between",alignItems:"center",gap:3,children:[le,jsxRuntimeExports.jsx(Flex,{alignItems:"center",children:jsxRuntimeExports.jsxs(DotSeparatedList,{children:[xe,_e]})})]})}),n[18]=_e,n[19]=xe,n[20]=De):De=n[20];let Fe;n[21]===Symbol.for("react.memo_cache_sentinel")?(Fe=jsxRuntimeExports.jsx(kn,{}),n[21]=Fe):Fe=n[21];let $e;n[22]!==ie||n[23]!==se||n[24]!==Te||n[25]!==ae||n[26]!==ue||n[27]!==de?($e=(!ie||!ue&&ae&&!de)&&jsxRuntimeExports.jsx(ConnectWalletSection,{isLoading:se,openConnectModal:Te}),n[22]=ie,n[23]=se,n[24]=Te,n[25]=ae,n[26]=ue,n[27]=de,n[28]=$e):$e=n[28];let ce;n[29]!==ie||n[30]!==Ne||n[31]!==qe||n[32]!==ae||n[33]!==ue||n[34]!==de?(ce=ie&&(ue&&ae||de)&&jsxRuntimeExports.jsx(WalletTokenSelector,{openTokensModal:qe,openManageWalletsModal:Ne}),n[29]=ie,n[30]=Ne,n[31]=qe,n[32]=ae,n[33]=ue,n[34]=de,n[35]=ce):ce=n[35];let Me;n[36]!==De||n[37]!==$e||n[38]!==ce?(Me=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",gap:4,children:[De,Fe,$e,ce]}),n[36]=De,n[37]=$e,n[38]=ce,n[39]=Me):Me=n[39];const Ge=se||!ie||be||!ue?.sufficient;let $t;n[40]!==me?($t=jsxRuntimeExports.jsx(ProgressCircle,{trackColor:"transparent",thickness:"3px",cap:"round",value:me}),n[40]=me,n[41]=$t):$t=n[41];let dn;n[42]!==ze||n[43]!==Ge||n[44]!==$t?(dn=jsxRuntimeExports.jsxs(ee$1,{variant:"primary",disabled:Ge,onClick:ze,children:[$t,"Pay Now"]}),n[42]=ze,n[43]=Ge,n[44]=$t,n[45]=dn):dn=n[45];let gn;n[46]===Symbol.for("react.memo_cache_sentinel")?(gn=jsxRuntimeExports.jsx(PayWithCryptoModals,{}),n[46]=gn):gn=n[46];let Vt;return n[47]!==Me||n[48]!==dn?(Vt=jsxRuntimeExports.jsxs(Flex,{flexDirection:"column",p:4,gap:6,background:"neutral.bgLight",borderRadius:"dynamic.xl",width:"400px",children:[Cn,Me,dn,gn]}),n[47]=Me,n[48]=dn,n[49]=Vt):Vt=n[49],Vt}const getShopByIdService=({shopId:n})=>axiosInstance.get(`shops/v2/public/${n}`),getCartService=({cartID:n})=>axiosInstance.get(`/v2/carts/${n}`);function PaymentUi(n){const t=compilerRuntimeExports.c(27),{onError:c,onMainProcessSuccess:ie,cartId:se,shopId:ae}=n,{setPaymentUiData:ue}=usePaymentUiStore(),{updateShop:de}=useShopStore(),{updateCart:be}=useCartStore();let me,we;t[0]!==ae?(me=["paymentUiData",ae],we=()=>getShopByIdService({shopId:ae}),t[0]=ae,t[1]=me,t[2]=we):(me=t[1],we=t[2]);const Te=!!ae;let Ne;t[3]!==c||t[4]!==me||t[5]!==we||t[6]!==Te||t[7]!==de?(Ne={queryKey:me,queryFn:we,enabled:Te,select(yn){return yn.data.data},onSuccess(yn){de({...yn,currency:yn?.currency||{conversionRateToUSD:1,symbol:"$",abbreviation:"USD"}})},onError(yn){c(yn?.response?.data?.data?.message||"Failed to fetch shop data")}},t[3]=c,t[4]=me,t[5]=we,t[6]=Te,t[7]=de,t[8]=Ne):Ne=t[8];const{isError:qe,isFetching:ze}=useQuery(Ne);let He,We;t[9]!==se?(He=["paymentUiData",se],We=()=>getCartService({cartID:se}),t[9]=se,t[10]=He,t[11]=We):(He=t[10],We=t[11]);const Ze=!!se;let Ye;t[12]!==c||t[13]!==He||t[14]!==We||t[15]!==Ze||t[16]!==be?(Ye={queryKey:He,queryFn:We,enabled:Ze,select(yn){return yn.data.data},onSuccess(yn){be(yn)},onError(yn){c(yn?.response?.data?.data?.message||"Failed to fetch cart data")}},t[12]=c,t[13]=He,t[14]=We,t[15]=Ze,t[16]=be,t[17]=Ye):Ye=t[17];const{isError:Ft,isFetching:Mt}=useQuery(Ye);let Zt,cn;if(t[18]!==se||t[19]!==c||t[20]!==ie||t[21]!==ue||t[22]!==ae?(cn=()=>{ue({onError:c,onMainProcessSuccess:ie,cartId:se,shopId:ae})},Zt=[c,ie,se,ae,ue],t[18]=se,t[19]=c,t[20]=ie,t[21]=ue,t[22]=ae,t[23]=Zt,t[24]=cn):(Zt=t[23],cn=t[24]),React.useEffect(cn,Zt),ze||Mt){let yn;return t[25]===Symbol.for("react.memo_cache_sentinel")?(yn=jsxRuntimeExports.jsx(Spinner,{}),t[25]=yn):yn=t[25],yn}if(qe||Ft)return null;let hn;return t[26]===Symbol.for("react.memo_cache_sentinel")?(hn=jsxRuntimeExports.jsx(DropWeb3Provider,{children:jsxRuntimeExports.jsx(PayWithCrypto,{})}),t[26]=hn):hn=t[26],hn}const queryClient=new QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function DroplinkedWeb3Payment(n){const t=compilerRuntimeExports.c(5),{cartId:c,onError:ie,onSuccess:se,shopId:ae}=n;let ue;return t[0]!==c||t[1]!==ie||t[2]!==se||t[3]!==ae?(ue=jsxRuntimeExports.jsx(Dn,{system:an,children:jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports.jsx(PaymentUi,{cartId:c,onError:ie,onMainProcessSuccess:se,shopId:ae})})}),t[0]=c,t[1]=ie,t[2]=se,t[3]=ae,t[4]=ue):ue=t[4],ue}const Actions={Payment:"payment",ClaimNFT:"claimNFT"};function DroplinkedWeb3Ui(n){const t=compilerRuntimeExports.c(4),{action:c,inputs:ie}=n;if(c===Actions.Payment){const se=ie;let ae;return t[0]!==se?(ae=jsxRuntimeExports.jsx(DroplinkedWeb3Payment,{...se}),t[0]=se,t[1]=ae):ae=t[1],ae}else{const se=ie;let ae;return t[2]!==se?(ae=jsxRuntimeExports.jsx(DroplinkedClaimNFT,{...se}),t[2]=se,t[3]=ae):ae=t[3],ae}}exports.Actions=Actions;exports.DroplinkedWeb3Ui=DroplinkedWeb3Ui;
|
package/dist/index.js
CHANGED
|
@@ -106199,7 +106199,7 @@ function useTokenBalances(n) {
|
|
|
106199
106199
|
})), t[0] = se?.financialDetails?.amounts?.totalAmount, t[1] = ae?.currentAccount, t[2] = me, t[3] = we, t[4] = ie, t[5] = Ne) : Ne = t[5];
|
|
106200
106200
|
let qe;
|
|
106201
106201
|
t[6] !== ae ? (qe = ["tokenBalances", ae], t[6] = ae, t[7] = qe) : qe = t[7];
|
|
106202
|
-
const ze = n && Te !== "paymentProcess";
|
|
106202
|
+
const ze = n && Te !== "paymentProcess" && !!ie && !!se?.id;
|
|
106203
106203
|
let He;
|
|
106204
106204
|
t[8] !== c || t[9] !== ue || t[10] !== me || t[11] !== be || t[12] !== de || t[13] !== Ne || t[14] !== qe || t[15] !== ze ? (He = {
|
|
106205
106205
|
queryFn: Ne,
|
|
@@ -107409,7 +107409,14 @@ function PaymentUi(n) {
|
|
|
107409
107409
|
return yn.data.data;
|
|
107410
107410
|
},
|
|
107411
107411
|
onSuccess(yn) {
|
|
107412
|
-
de(
|
|
107412
|
+
de({
|
|
107413
|
+
...yn,
|
|
107414
|
+
currency: yn?.currency || {
|
|
107415
|
+
conversionRateToUSD: 1,
|
|
107416
|
+
symbol: "$",
|
|
107417
|
+
abbreviation: "USD"
|
|
107418
|
+
}
|
|
107419
|
+
});
|
|
107413
107420
|
},
|
|
107414
107421
|
onError(yn) {
|
|
107415
107422
|
c(yn?.response?.data?.data?.message || "Failed to fetch shop data");
|