@nexus-cross/crossx-sdk-core 2.0.2-beta.2 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var CROSSx=function(j){"use strict";var oa=Object.defineProperty;var ia=(j,h,_)=>h in j?oa(j,h,{enumerable:!0,configurable:!0,writable:!0,value:_}):j[h]=_;var P=(j,h,_)=>ia(j,typeof h!="symbol"?h+"":h,_);var bt,Hr;var h=(r=>(r.AUTH_NOT_INITIALIZED="AUTH_NOT_INITIALIZED",r.AUTH_FAILED="AUTH_FAILED",r.AUTH_TOKEN_INVALID="AUTH_TOKEN_INVALID",r.AUTH_TOKEN_EXPIRED="AUTH_TOKEN_EXPIRED",r.AUTH_NOT_AUTHENTICATED="AUTH_NOT_AUTHENTICATED",r.ALREADY_AUTHENTICATED="ALREADY_AUTHENTICATED",r.SESSION_EXPIRED="SESSION_EXPIRED",r.OAUTH_POPUP_BLOCKED="OAUTH_POPUP_BLOCKED",r.WALLET_NOT_FOUND="WALLET_NOT_FOUND",r.WALLET_CREATION_FAILED="WALLET_CREATION_FAILED",r.WALLET_ALREADY_EXISTS="WALLET_ALREADY_EXISTS",r.SIGN_FAILED="SIGN_FAILED",r.SIGN_REJECTED="SIGN_REJECTED",r.TX_FAILED="TX_FAILED",r.TX_REJECTED="TX_REJECTED",r.BROADCAST_FAILED="BROADCAST_FAILED",r.USER_REJECTED="USER_REJECTED",r.TX_INVALID_PARAMS="TX_INVALID_PARAMS",r.NETWORK_ERROR="NETWORK_ERROR",r.NETWORK_NOT_CONFIGURED="NETWORK_NOT_CONFIGURED",r.INVALID_CHAIN="INVALID_CHAIN",r.CHAIN_NOT_SUPPORTED="CHAIN_NOT_SUPPORTED",r.CHAIN_ADAPTER_NOT_FOUND="CHAIN_ADAPTER_NOT_FOUND",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.SIGNATURE_FAILED="SIGNATURE_FAILED",r.TRANSACTION_FAILED="TRANSACTION_FAILED",r.PREPARE_FAILED="PREPARE_FAILED",r.PREPARE_EXPIRED="PREPARE_EXPIRED",r.PREPARE_MISMATCH="PREPARE_MISMATCH",r.MIGRATION_FAILED="MIGRATION_FAILED",r.MIGRATION_BACKUP_EXISTS="MIGRATION_BACKUP_EXISTS",r.MIGRATION_PIN_LOCKED="MIGRATION_PIN_LOCKED",r.GATEWAY_INTERNAL_ERROR="GATEWAY_INTERNAL_ERROR",r.GATEWAY_LOCK_CONFLICT="GATEWAY_LOCK_CONFLICT",r.WALLET_INCONSISTENT_STATE="WALLET_INCONSISTENT_STATE",r.PROJECT_ID_MISSING="PROJECT_ID_MISSING",r.ORIGIN_NOT_ALLOWED="ORIGIN_NOT_ALLOWED",r.APP_IDENTIFIER_MISSING="APP_IDENTIFIER_MISSING",r.INVALID_APP_TYPE="INVALID_APP_TYPE",r.PROJECT_NOT_REGISTERED="PROJECT_NOT_REGISTERED",r.SIGNATURE_SIGNER_MISMATCH="SIGNATURE_SIGNER_MISMATCH",r.GAS_ESTIMATION_FAILED="GAS_ESTIMATION_FAILED",r.TYPED_DATA_CHAIN_ID_MISMATCH="TYPED_DATA_CHAIN_ID_MISMATCH",r.PIN_NOT_SET="PIN_NOT_SET",r.PIN_WRONG="PIN_WRONG",r.PIN_INVALID="PIN_INVALID",r.PIN_REPEATED_PATTERN="PIN_REPEATED_PATTERN",r.PIN_CANCELLED="PIN_CANCELLED",r.EXTERNAL_WALLET_REQUESTED="EXTERNAL_WALLET_REQUESTED",r.PIN_LOCKED="PIN_LOCKED",r.HMAC_REQUIRED="HMAC_REQUIRED",r.HMAC_VERIFICATION_FAILED="HMAC_VERIFICATION_FAILED",r.WITHDRAW_FAILED="WITHDRAW_FAILED",r.USER_NOT_FOUND="USER_NOT_FOUND",r.INVALID_CONFIG="INVALID_CONFIG",r.UNKNOWN_ERROR="UNKNOWN_ERROR",r))(h||{});class _ extends Error{constructor(e,s,t){super(s),this.code=e,this.details=t,this.name="CROSSxError",Object.setPrototypeOf(this,_.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}}var We=(r=>(r.MetaMask="io.metamask",r.Binance="com.binance.wallet",r.CROSSx="crossx",r))(We||{});const Kr={"io.metamask":"MetaMask","com.binance.wallet":"Binance Wallet",crossx:"CROSSx"},ss=["crossx","io.metamask","com.binance.wallet"];function rs(r){return Kr[r]??r}function Gr(r){return Array.isArray(r.connectOtherWallets)&&r.connectOtherWallets.length>0?[...r.connectOtherWallets]:r.showConnectOtherWallets===!0?[...ss]:[]}const rt={CROSS_MAINNET:{caipId:"eip155:612055",chainId:612055,name:"CROSS Mainnet",nativeCurrency:{symbol:"CROSS",decimals:18},rpcUrl:"https://mainnet.crosstoken.io:22001"},CROSS_TESTNET:{caipId:"eip155:612044",chainId:612044,name:"CROSS Testnet",nativeCurrency:{symbol:"tCROSS",decimals:18},rpcUrl:"https://testnet.crosstoken.io:22001",testnet:!0},BSC_MAINNET:{caipId:"eip155:56",chainId:56,name:"BNB Smart Chain",nativeCurrency:{symbol:"BNB",decimals:18},rpcUrl:"https://bsc-mainnet.crosstoken.io/2272489872e4f1475ff25d57ce93b51989f933c7"},BSC_TESTNET:{caipId:"eip155:97",chainId:97,name:"BNB Smart Chain Testnet",nativeCurrency:{symbol:"BNB",decimals:18},rpcUrl:"https://bsc-testnet.crosstoken.io/110ea3628b77f244e5dbab16790d81bba874b962",testnet:!0},RONIN_MAINNET:{caipId:"eip155:2020",chainId:2020,name:"Ronin",nativeCurrency:{symbol:"RON",decimals:18},rpcUrl:"https://api.roninchain.com/rpc"},RONIN_SAIGON:{caipId:"eip155:202601",chainId:202601,name:"Ronin Saigon",nativeCurrency:{symbol:"RON",decimals:18},rpcUrl:"https://saigon-testnet.roninchain.com/rpc",testnet:!0}},qr=Object.fromEntries(Object.entries(rt).map(([r,e])=>[r,e.caipId])),Vr=new Map(Object.values(rt).map(r=>[r.caipId,r]));new Map(Object.values(rt).map(r=>[r.chainId,r]));const Jr={symbol:"",decimals:18};function St(r){var e;return((e=Vr.get(r))==null?void 0:e.nativeCurrency)??Jr}class ns{constructor(e,s){this.sdk=e,this.chainId=s,this._listeners=new Map}async request({method:e,params:s=[]}){switch(e){case"eth_accounts":case"eth_requestAccounts":{const t=await this.sdk.getAddress();return t?[t.address]:[]}case"eth_chainId":return this._caip2ToHex(this.chainId);case"net_version":return this.chainId.split(":")[1]??"1";case"eth_signTransaction":{const t=this._normalizeEIP1193Tx(s[0]);return(await this.sdk.signTransaction(this.chainId,t)).signedTx}case"eth_sendTransaction":{const t=this._normalizeEIP1193Tx(s[0]);return(await this.sdk.sendTransaction(this.chainId,t)).txHash}case"personal_sign":case"eth_sign":throw new _(h.NOT_IMPLEMENTED,`${e}은(는) 아직 지원되지 않습니다. sdk.signMessage()를 직접 사용하세요.`);case"eth_signTypedData":case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":throw new _(h.NOT_IMPLEMENTED,`${e}은(는) 아직 지원되지 않습니다. sdk.signTypedData() 또는 sdk.signTypedDataOffchain()을 직접 사용하세요.`);default:return this.sdk.walletRpc(e,s,this.chainId)}}on(e,s){return this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(s),this}removeListener(e,s){var t;return(t=this._listeners.get(e))==null||t.delete(s),this}emit(e,...s){var t;(t=this._listeners.get(e))==null||t.forEach(n=>n(...s))}_caip2ToHex(e){const s=e.split(":");return`0x${parseInt(s[1]??"1",10).toString(16)}`}_normalizeEIP1193Tx(e){return{from:e.from,to:e.to,value:e.value,data:e.data,gasLimit:e.gasLimit??e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce!==void 0?parseInt(String(e.nonce),16):void 0,chainId:parseInt(this.chainId.split(":")[1]??"1",10)}}}let be=null;function aa(r){}function os(r){be=r}const u={info(...r){if(be){be.log(...r);return}console.log(...r)},log(...r){if(be){be.log(...r);return}},warn(...r){if(be){be.warn(...r);return}},error(...r){if(be){be.error(...r);return}}},zr={confirm:"확인",cancel:"취소",close:"닫기",signMessage_title:"메시지 서명",signTypedData_title:"데이터 서명",signTransaction_title:"트랜잭션 서명",sendTransaction_title:"트랜잭션 전송",tx_pending:"트랜잭션 처리 중...",tx_success:"트랜잭션이 완료되었습니다",tx_failed:"트랜잭션이 실패했습니다",tx_timeout:"트랜잭션 확인 시간이 초과되었습니다",loginSelector_title:"로그인 방법 선택",loginSelector_google:"Google로 계속하기",loginSelector_apple:"Apple로 계속하기",loginSelector_connectOtherWallets:"다른 지갑으로 연결",loginSelector_connectOtherWalletsDesc:"기존 Web3 지갑을 연결하여 자산을 관리하세요.",migration_foundTitle:"기존 지갑 발견",migration_foundDescription:"기존 CROSSx 지갑이 발견되었습니다. 복구하시겠습니까?",migration_recoverButton:"복구하기",migration_skipButton:"건너뛰기",recoveryPinInput_title:"PIN 입력",recoveryPinInput_placeholder:"4자리 PIN을 입력하세요",recoveryPinInput_error:"PIN이 올바르지 않습니다. 다시 시도해 주세요.",walletSelector_title:"지갑 선택",walletSelector_addButton:"지갑 추가",walletSelector_selected:"선택됨",pinNotice_headerSubtitle:"트랜잭션, PK/니모닉 내보내기 및 계정 삭제 시 필요합니다.",pinNotice_title:"PIN 설정 주의사항",pinNotice_description:"보안을 위해 이 PIN은 재설정하거나 복구할 수 없습니다. 반드시 기억해 두거나 안전한 곳에 보관하세요.",pinNotice_check1:"이 PIN을 분실하면 지갑과 자산에 영구적으로 접근이 불가능해진다는 것을 이해합니다.",pinNotice_check2:"지원팀을 포함한 어느 누구도 이 PIN을 복구하거나 재설정해 줄 수 없다는 것을 이해합니다.",pinNotice_nextButton:"다음",pinNotice_submitButton:"동의합니다",pinSetup_title:"PIN 만들기",pinSetup_headerSubtitle:"이 PIN은 거래 승인에 사용됩니다.",pinSetup_subtitle:"거래 승인을 위한 6자리 PIN을 설정하세요.",pinSetup_confirmTitle:"PIN 확인",pinSetup_confirmSubtitle:"확인을 위해 PIN을 다시 입력하세요.",pinSetup_mismatchError:"PIN이 일치하지 않습니다. 다시 시도해 주세요.",pinValidation_tooShort:"6자리 PIN을 입력해 주세요.",pinValidation_numbersOnly:"숫자(0-9)만 입력할 수 있습니다.",pinValidation_repeatingDigit:"같은 숫자를 연속으로 3번 이상 사용할 수 없습니다.",pinValidation_sequential:"연속된 숫자(예: 123456)는 사용할 수 없습니다.",pinValidation_alternatingPattern:"반복 패턴(예: 121212)은 사용할 수 없습니다.",pinInput_title:"PIN 입력",pinInput_subtitle:"계속하려면 6자리 PIN을 입력하세요.",pinInput_error:"PIN이 올바르지 않습니다. 다시 시도해 주세요.",verifyPin_title:"PIN 확인",verifyPin_subtitle:"계속하려면 PIN을 확인해 주세요.",pinLocked_message:"잠금이 해제된 후 다시 시도해 주세요.",pinLocked_availableFrom:"이용 가능 시간",pinLocked_failureWarning:"추가 실패 시 계정이 잠금됩니다.",pinLocked_permanent:"너무 많은 시도 실패로 계정이 영구 잠금되었습니다.",alert_sessionExpired:"세션이 만료되었습니다. 다시 로그인해 주세요.",alert_accountWithdrawn:"계정이 탈퇴 처리되었거나 더 이상 사용할 수 없습니다. 다시 로그인해 주세요.",alert_walletNotFound:"지갑 정보를 찾을 수 없습니다. 다시 로그인해 주세요.",alert_differentAccount:`이전에 사용하던 계정이 아닌 다른 계정으로 로그인되었습니다.
1
+ var CROSSx=function(j){"use strict";var ia=Object.defineProperty;var aa=(j,h,_)=>h in j?ia(j,h,{enumerable:!0,configurable:!0,writable:!0,value:_}):j[h]=_;var P=(j,h,_)=>aa(j,typeof h!="symbol"?h+"":h,_);var bt,Hr;var h=(r=>(r.AUTH_NOT_INITIALIZED="AUTH_NOT_INITIALIZED",r.AUTH_FAILED="AUTH_FAILED",r.AUTH_TOKEN_INVALID="AUTH_TOKEN_INVALID",r.AUTH_TOKEN_EXPIRED="AUTH_TOKEN_EXPIRED",r.AUTH_NOT_AUTHENTICATED="AUTH_NOT_AUTHENTICATED",r.ALREADY_AUTHENTICATED="ALREADY_AUTHENTICATED",r.SESSION_EXPIRED="SESSION_EXPIRED",r.OAUTH_POPUP_BLOCKED="OAUTH_POPUP_BLOCKED",r.WALLET_NOT_FOUND="WALLET_NOT_FOUND",r.WALLET_CREATION_FAILED="WALLET_CREATION_FAILED",r.WALLET_ALREADY_EXISTS="WALLET_ALREADY_EXISTS",r.SIGN_FAILED="SIGN_FAILED",r.SIGN_REJECTED="SIGN_REJECTED",r.TX_FAILED="TX_FAILED",r.TX_REJECTED="TX_REJECTED",r.BROADCAST_FAILED="BROADCAST_FAILED",r.USER_REJECTED="USER_REJECTED",r.TX_INVALID_PARAMS="TX_INVALID_PARAMS",r.NETWORK_ERROR="NETWORK_ERROR",r.NETWORK_NOT_CONFIGURED="NETWORK_NOT_CONFIGURED",r.INVALID_CHAIN="INVALID_CHAIN",r.CHAIN_NOT_SUPPORTED="CHAIN_NOT_SUPPORTED",r.CHAIN_ADAPTER_NOT_FOUND="CHAIN_ADAPTER_NOT_FOUND",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.SIGNATURE_FAILED="SIGNATURE_FAILED",r.TRANSACTION_FAILED="TRANSACTION_FAILED",r.PREPARE_FAILED="PREPARE_FAILED",r.PREPARE_EXPIRED="PREPARE_EXPIRED",r.PREPARE_MISMATCH="PREPARE_MISMATCH",r.MIGRATION_FAILED="MIGRATION_FAILED",r.MIGRATION_BACKUP_EXISTS="MIGRATION_BACKUP_EXISTS",r.MIGRATION_PIN_LOCKED="MIGRATION_PIN_LOCKED",r.GATEWAY_INTERNAL_ERROR="GATEWAY_INTERNAL_ERROR",r.GATEWAY_LOCK_CONFLICT="GATEWAY_LOCK_CONFLICT",r.WALLET_INCONSISTENT_STATE="WALLET_INCONSISTENT_STATE",r.PROJECT_ID_MISSING="PROJECT_ID_MISSING",r.ORIGIN_NOT_ALLOWED="ORIGIN_NOT_ALLOWED",r.APP_IDENTIFIER_MISSING="APP_IDENTIFIER_MISSING",r.INVALID_APP_TYPE="INVALID_APP_TYPE",r.PROJECT_NOT_REGISTERED="PROJECT_NOT_REGISTERED",r.SIGNATURE_SIGNER_MISMATCH="SIGNATURE_SIGNER_MISMATCH",r.GAS_ESTIMATION_FAILED="GAS_ESTIMATION_FAILED",r.TYPED_DATA_CHAIN_ID_MISMATCH="TYPED_DATA_CHAIN_ID_MISMATCH",r.PIN_NOT_SET="PIN_NOT_SET",r.PIN_WRONG="PIN_WRONG",r.PIN_INVALID="PIN_INVALID",r.PIN_REPEATED_PATTERN="PIN_REPEATED_PATTERN",r.PIN_CANCELLED="PIN_CANCELLED",r.EXTERNAL_WALLET_REQUESTED="EXTERNAL_WALLET_REQUESTED",r.PIN_LOCKED="PIN_LOCKED",r.HMAC_REQUIRED="HMAC_REQUIRED",r.HMAC_VERIFICATION_FAILED="HMAC_VERIFICATION_FAILED",r.WITHDRAW_FAILED="WITHDRAW_FAILED",r.USER_NOT_FOUND="USER_NOT_FOUND",r.INVALID_CONFIG="INVALID_CONFIG",r.UNKNOWN_ERROR="UNKNOWN_ERROR",r))(h||{});class _ extends Error{constructor(e,s,t){super(s),this.code=e,this.details=t,this.name="CROSSxError",Object.setPrototypeOf(this,_.prototype)}toJSON(){return{name:this.name,code:this.code,message:this.message,details:this.details}}}var We=(r=>(r.MetaMask="io.metamask",r.Binance="com.binance.wallet",r.CROSSx="crossx",r))(We||{});const Kr={"io.metamask":"MetaMask","com.binance.wallet":"Binance Wallet",crossx:"CROSSx"},ss=["crossx","io.metamask","com.binance.wallet"];function rs(r){return Kr[r]??r}function Gr(r){return Array.isArray(r.connectOtherWallets)&&r.connectOtherWallets.length>0?[...r.connectOtherWallets]:r.showConnectOtherWallets===!0?[...ss]:[]}const rt={CROSS_MAINNET:{caipId:"eip155:612055",chainId:612055,name:"CROSS Mainnet",nativeCurrency:{symbol:"CROSS",decimals:18},rpcUrl:"https://mainnet.crosstoken.io:22001"},CROSS_TESTNET:{caipId:"eip155:612044",chainId:612044,name:"CROSS Testnet",nativeCurrency:{symbol:"tCROSS",decimals:18},rpcUrl:"https://testnet.crosstoken.io:22001",testnet:!0},BSC_MAINNET:{caipId:"eip155:56",chainId:56,name:"BNB Smart Chain",nativeCurrency:{symbol:"BNB",decimals:18},rpcUrl:"https://bsc-mainnet.crosstoken.io/2272489872e4f1475ff25d57ce93b51989f933c7"},BSC_TESTNET:{caipId:"eip155:97",chainId:97,name:"BNB Smart Chain Testnet",nativeCurrency:{symbol:"BNB",decimals:18},rpcUrl:"https://bsc-testnet.crosstoken.io/110ea3628b77f244e5dbab16790d81bba874b962",testnet:!0},RONIN_MAINNET:{caipId:"eip155:2020",chainId:2020,name:"Ronin",nativeCurrency:{symbol:"RON",decimals:18},rpcUrl:"https://api.roninchain.com/rpc"},RONIN_SAIGON:{caipId:"eip155:202601",chainId:202601,name:"Ronin Saigon",nativeCurrency:{symbol:"RON",decimals:18},rpcUrl:"https://saigon-testnet.roninchain.com/rpc",testnet:!0}},qr=Object.fromEntries(Object.entries(rt).map(([r,e])=>[r,e.caipId])),Vr=new Map(Object.values(rt).map(r=>[r.caipId,r]));new Map(Object.values(rt).map(r=>[r.chainId,r]));const Jr={symbol:"",decimals:18};function St(r){var e;return((e=Vr.get(r))==null?void 0:e.nativeCurrency)??Jr}class ns{constructor(e,s){this.sdk=e,this.chainId=s,this._listeners=new Map}async request({method:e,params:s=[]}){switch(e){case"eth_accounts":case"eth_requestAccounts":{const t=await this.sdk.getAddress();return t?[t.address]:[]}case"eth_chainId":return this._caip2ToHex(this.chainId);case"net_version":return this.chainId.split(":")[1]??"1";case"eth_signTransaction":{const t=this._normalizeEIP1193Tx(s[0]);return(await this.sdk.signTransaction(this.chainId,t)).signedTx}case"eth_sendTransaction":{const t=this._normalizeEIP1193Tx(s[0]);return(await this.sdk.sendTransaction(this.chainId,t)).txHash}case"personal_sign":case"eth_sign":throw new _(h.NOT_IMPLEMENTED,`${e}은(는) 아직 지원되지 않습니다. sdk.signMessage()를 직접 사용하세요.`);case"eth_signTypedData":case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":throw new _(h.NOT_IMPLEMENTED,`${e}은(는) 아직 지원되지 않습니다. sdk.signTypedData() 또는 sdk.signTypedDataOffchain()을 직접 사용하세요.`);default:return this.sdk.walletRpc(e,s,this.chainId)}}on(e,s){return this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(s),this}removeListener(e,s){var t;return(t=this._listeners.get(e))==null||t.delete(s),this}emit(e,...s){var t;(t=this._listeners.get(e))==null||t.forEach(n=>n(...s))}_caip2ToHex(e){const s=e.split(":");return`0x${parseInt(s[1]??"1",10).toString(16)}`}_normalizeEIP1193Tx(e){return{from:e.from,to:e.to,value:e.value,data:e.data,gasLimit:e.gasLimit??e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce!==void 0?parseInt(String(e.nonce),16):void 0,chainId:parseInt(this.chainId.split(":")[1]??"1",10)}}}let be=null;function ca(r){}function os(r){be=r}const u={info(...r){if(be){be.log(...r);return}console.log(...r)},log(...r){if(be){be.log(...r);return}},warn(...r){if(be){be.warn(...r);return}},error(...r){if(be){be.error(...r);return}}},zr={confirm:"확인",cancel:"취소",close:"닫기",signMessage_title:"메시지 서명",signTypedData_title:"데이터 서명",signTransaction_title:"트랜잭션 서명",sendTransaction_title:"트랜잭션 전송",tx_pending:"트랜잭션 처리 중...",tx_success:"트랜잭션이 완료되었습니다",tx_failed:"트랜잭션이 실패했습니다",tx_timeout:"트랜잭션 확인 시간이 초과되었습니다",loginSelector_title:"로그인 방법 선택",loginSelector_google:"Google로 계속하기",loginSelector_apple:"Apple로 계속하기",loginSelector_connectOtherWallets:"다른 지갑으로 연결",loginSelector_connectOtherWalletsDesc:"기존 Web3 지갑을 연결하여 자산을 관리하세요.",migration_foundTitle:"기존 지갑 발견",migration_foundDescription:"기존 CROSSx 지갑이 발견되었습니다. 복구하시겠습니까?",migration_recoverButton:"복구하기",migration_skipButton:"건너뛰기",recoveryPinInput_title:"PIN 입력",recoveryPinInput_placeholder:"4자리 PIN을 입력하세요",recoveryPinInput_error:"PIN이 올바르지 않습니다. 다시 시도해 주세요.",walletSelector_title:"지갑 선택",walletSelector_addButton:"지갑 추가",walletSelector_selected:"선택됨",pinNotice_headerSubtitle:"트랜잭션, PK/니모닉 내보내기 및 계정 삭제 시 필요합니다.",pinNotice_title:"PIN 설정 주의사항",pinNotice_description:"보안을 위해 이 PIN은 재설정하거나 복구할 수 없습니다. 반드시 기억해 두거나 안전한 곳에 보관하세요.",pinNotice_check1:"이 PIN을 분실하면 지갑과 자산에 영구적으로 접근이 불가능해진다는 것을 이해합니다.",pinNotice_check2:"지원팀을 포함한 어느 누구도 이 PIN을 복구하거나 재설정해 줄 수 없다는 것을 이해합니다.",pinNotice_nextButton:"다음",pinNotice_submitButton:"동의합니다",pinSetup_title:"PIN 만들기",pinSetup_headerSubtitle:"이 PIN은 거래 승인에 사용됩니다.",pinSetup_subtitle:"거래 승인을 위한 6자리 PIN을 설정하세요.",pinSetup_confirmTitle:"PIN 확인",pinSetup_confirmSubtitle:"확인을 위해 PIN을 다시 입력하세요.",pinSetup_mismatchError:"PIN이 일치하지 않습니다. 다시 시도해 주세요.",pinValidation_tooShort:"6자리 PIN을 입력해 주세요.",pinValidation_numbersOnly:"숫자(0-9)만 입력할 수 있습니다.",pinValidation_repeatingDigit:"같은 숫자를 연속으로 3번 이상 사용할 수 없습니다.",pinValidation_sequential:"연속된 숫자(예: 123456)는 사용할 수 없습니다.",pinValidation_alternatingPattern:"반복 패턴(예: 121212)은 사용할 수 없습니다.",pinInput_title:"PIN 입력",pinInput_subtitle:"계속하려면 6자리 PIN을 입력하세요.",pinInput_error:"PIN이 올바르지 않습니다. 다시 시도해 주세요.",verifyPin_title:"PIN 확인",verifyPin_subtitle:"계속하려면 PIN을 확인해 주세요.",pinLocked_message:"잠금이 해제된 후 다시 시도해 주세요.",pinLocked_availableFrom:"이용 가능 시간",pinLocked_failureWarning:"추가 실패 시 계정이 잠금됩니다.",pinLocked_permanent:"너무 많은 시도 실패로 계정이 영구 잠금되었습니다.",alert_sessionExpired:"세션이 만료되었습니다. 다시 로그인해 주세요.",alert_accountWithdrawn:"계정이 탈퇴 처리되었거나 더 이상 사용할 수 없습니다. 다시 로그인해 주세요.",alert_walletNotFound:"지갑 정보를 찾을 수 없습니다. 다시 로그인해 주세요.",alert_differentAccount:`이전에 사용하던 계정이 아닌 다른 계정으로 로그인되었습니다.
2
2
 
3
3
  보안을 위해 동일한 Google/Apple 계정으로만 이어서 사용할 수 있습니다.`,sessionAlert_title:"세션 만료",sessionAlert_accountLabel:"계정",sessionAlert_appleAccount:"Apple 계정",sessionAlert_signOutButton:"로그아웃",sessionAlert_signInAgainButton:"다시 로그인"},is={confirm:"Confirm",cancel:"Cancel",close:"Close",signMessage_title:"Sign Message",signTypedData_title:"Sign Data",signTransaction_title:"Sign Transaction",sendTransaction_title:"Send Transaction",tx_pending:"Processing transaction...",tx_success:"Transaction completed",tx_failed:"Transaction failed",tx_timeout:"Transaction confirmation timed out",loginSelector_title:"Choose a sign-in method",loginSelector_google:"Continue with Google",loginSelector_apple:"Continue with Apple",loginSelector_connectOtherWallets:"Connect with Other Wallets",loginSelector_connectOtherWalletsDesc:"Connect your existing Web3 wallet to manage your assets.",migration_foundTitle:"Existing Wallet Found",migration_foundDescription:"An existing CROSSx wallet was found. Would you like to recover it?",migration_recoverButton:"Recover",migration_skipButton:"Skip",recoveryPinInput_title:"Enter PIN",recoveryPinInput_placeholder:"Enter your 4-digit PIN",recoveryPinInput_error:"Incorrect PIN. Please try again.",walletSelector_title:"Select Wallet",walletSelector_addButton:"Add Wallet",walletSelector_selected:"Selected",pinNotice_headerSubtitle:"Required for transactions, PK/mnemonic export & account deletion.",pinNotice_title:"PIN Setup Notice",pinNotice_description:"For your security, this PIN cannot be reset or recovered. Please make sure you remember it or store it in a safe place.",pinNotice_check1:"I understand that losing this PIN will result in permanent loss of access to my wallet and assets.",pinNotice_check2:"I understand that no one, including the support team, can recover or reset this PIN on my behalf.",pinNotice_nextButton:"Next",pinNotice_submitButton:"I Understand",pinSetup_title:"Create PIN",pinSetup_headerSubtitle:"This PIN is used to authorize your transactions.",pinSetup_subtitle:"Set a 6-digit PIN to authorize transactions.",pinSetup_confirmTitle:"Confirm PIN",pinSetup_confirmSubtitle:"Enter your PIN again to confirm.",pinSetup_mismatchError:"PINs do not match. Please try again.",pinValidation_tooShort:"Please enter a 6-digit PIN.",pinValidation_numbersOnly:"Only numbers (0-9) are allowed.",pinValidation_repeatingDigit:"Cannot use the same number 3+ times in a row.",pinValidation_sequential:"Sequential numbers (e.g., 123456) are not allowed.",pinValidation_alternatingPattern:"Repeating patterns (e.g., 121212) are not allowed.",pinInput_title:"Enter PIN",pinInput_subtitle:"Enter your 6-digit PIN to continue.",pinInput_error:"Incorrect PIN. Please try again.",verifyPin_title:"Verify Your PIN",verifyPin_subtitle:"To continue, please confirm your PIN.",pinLocked_message:"Please try again after the lock expires.",pinLocked_availableFrom:"Available from",pinLocked_failureWarning:"Your account will be locked after further failures.",pinLocked_permanent:"Your account has been permanently locked due to too many failed attempts.",alert_sessionExpired:"Your session has expired. Please sign in again.",alert_accountWithdrawn:"This account is no longer available or has been withdrawn. Please sign in again.",alert_walletNotFound:"Wallet data could not be found. Please sign in again.",alert_differentAccount:`You signed in with a different Google/Apple account than before.
4
4
 
@@ -2030,22 +2030,22 @@ button.__crossx-connect-other-block:active {
2030
2030
  color: var(--cx-title);
2031
2031
  margin: 0;
2032
2032
  }
2033
- `;function fe(){let r=document.getElementById(Pr);r||(r=document.createElement("style"),r.id=Pr,document.head.appendChild(r)),r.textContent=pi}function _e(r){const e=r.querySelector(".__crossx-card");if(e){const n=(e.getAttribute("style")??"").match(/--cx-bg:\s*([^;]+)/);if(n){const o=n[1].trim();r.style.setProperty("--cx-bg",o);const i=document.createElement("div");i.className="__crossx-safe-area-fill",i.style.background=o,r.appendChild(i)}}const s=t=>t.stopPropagation();for(const t of["pointerdown","pointerup","mousedown","mouseup","click"])r.addEventListener(t,s);r.setAttribute("data-vaul-no-drag","");for(const t of["touchstart","touchend"])r.addEventListener(t,s);r.addEventListener("touchmove",t=>{t.stopPropagation();let n=t.target;for(;n&&n!==r;){const o=window.getComputedStyle(n);if((o.overflowY==="auto"||o.overflowY==="scroll")&&n.scrollHeight>n.clientHeight)return;n=n.parentElement}t.preventDefault()},{passive:!1});for(const t of["focusin","focusout"])r.addEventListener(t,s);document.body.appendChild(r)}const fi=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;function Ye(){if(fi()){const e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.left="0",document.body.style.right="0",()=>{document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",window.scrollTo(0,e)}}const r=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=r}}function oe(r){return r?r.length<=13?r:`${r.slice(0,6)}…${r.slice(-4)}`:"—"}function Nr(r,e="CROSS",s=18){if(!r||r==="0x"||r==="0x0")return null;try{const t=BigInt(r);if(t===0n)return null;const n=Xt(t,s);return n==="0"?null:`${n} ${e}`}catch{return null}}const Lr={1:"Ethereum Mainnet",5:"Goerli Testnet",11155111:"Ethereum Sepolia",17e3:"Ethereum Holesky",10:"Optimism",420:"Optimism Goerli",42161:"Arbitrum One",421614:"Arbitrum Sepolia",8453:"Base",84532:"Base Sepolia",137:"Polygon",80002:"Polygon Amoy",56:"BNB Smart Chain",97:"BNB Testnet",43114:"Avalanche C-Chain",43113:"Avalanche Fuji",250:"Fantom Opera",2020:"Ronin",202601:"Ronin Saigon",612044:"CROSS Testnet",612055:"CROSS Mainnet"};function Dr(r){const e=parseInt(r.split(":")[1]??"",10);return!isNaN(e)&&Lr[e]?Lr[e]:r}function Xt(r,e){if(r===0n)return"0";const s=10n**BigInt(e),t=r/s,i=(r%s).toString().padStart(e,"0").slice(0,6).replace(/0+$/,"");return i?`${t}.${i}`:`${t}`}function Zt(r){try{const e=BigInt(r),s=e/1000000000n,n=(e%1000000000n).toString().padStart(9,"0").slice(0,2).replace(/0+$/,"");return n?`${s}.${n}`:`${s}`}catch{return r}}function _i(r){try{return BigInt(r).toLocaleString()}catch{return r}}function gi(r){const{gasLimit:e,gasPrice:s,maxFeePerGas:t,maxPriorityFeePerGas:n,nativeSymbol:o="ETH",nativeDecimals:i=18}=r;if(!e)return null;try{const a=BigInt(e),c=_i(e);if(t){const l=a*BigInt(t);return{isDynamic:!0,estTxFee:`${Xt(l,i)} ${o}`,maxFeeGwei:Zt(t),maxPriorityFeeGwei:n?Zt(n):void 0,gasLimitFormatted:c}}if(s){const l=a*BigInt(s);return{isDynamic:!1,estTxFee:`${Xt(l,i)} ${o}`,gasPriceGwei:Zt(s),gasLimitFormatted:c}}return{isDynamic:!1,estTxFee:`${a.toLocaleString()} gas`,gasLimitFormatted:c}}catch{return null}}function $r(r){const e=gi(r);if(!e)return z("Estimated fee","<span>—</span>");let s=z("Est. Tx Fee",`<span>${e.estTxFee}</span>`);return e.isDynamic?(e.maxPriorityFeeGwei!==void 0&&(s+=z("Max Priority Fee",`<span>${e.maxPriorityFeeGwei} Gwei</span>`)),e.maxFeeGwei!==void 0&&(s+=z("Max Gas Fee",`<span>${e.maxFeeGwei} Gwei</span>`))):e.gasPriceGwei!==void 0&&(s+=z("Gas Price",`<span>${e.gasPriceGwei} Gwei</span>`)),e.gasLimitFormatted&&(s+=z("Gas Limit",`<span>${e.gasLimitFormatted}</span>`)),s}const Te=`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2033
+ `;function fe(){let r=document.getElementById(Pr);r||(r=document.createElement("style"),r.id=Pr,document.head.appendChild(r)),r.textContent=pi}function fi(){const r=`#${te}`,e=t=>{var n,o;(o=(n=t.target)==null?void 0:n.closest)!=null&&o.call(n,r)&&t.stopImmediatePropagation()},s=t=>{var n,o;(o=(n=t.relatedTarget)==null?void 0:n.closest)!=null&&o.call(n,r)&&t.stopImmediatePropagation()};return document.addEventListener("focusin",e,!0),document.addEventListener("focusout",s,!0),()=>{document.removeEventListener("focusin",e,!0),document.removeEventListener("focusout",s,!0)}}function _e(r){const e=r.querySelector(".__crossx-card");if(e){const i=(e.getAttribute("style")??"").match(/--cx-bg:\s*([^;]+)/);if(i){const a=i[1].trim();r.style.setProperty("--cx-bg",a);const c=document.createElement("div");c.className="__crossx-safe-area-fill",c.style.background=a,r.appendChild(c)}}const s=o=>o.stopPropagation();for(const o of["pointerdown","pointerup","mousedown","mouseup","click"])r.addEventListener(o,s);r.setAttribute("data-vaul-no-drag","");for(const o of["touchstart","touchend"])r.addEventListener(o,s);r.addEventListener("touchmove",o=>{o.stopPropagation();let i=o.target;for(;i&&i!==r;){const a=window.getComputedStyle(i);if((a.overflowY==="auto"||a.overflowY==="scroll")&&i.scrollHeight>i.clientHeight)return;i=i.parentElement}o.preventDefault()},{passive:!1});const t=fi(),n=r.remove.bind(r);r.remove=()=>{t(),n()},document.body.appendChild(r)}const _i=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;function Ye(){if(_i()){const e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.left="0",document.body.style.right="0",()=>{document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",window.scrollTo(0,e)}}const r=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=r}}function oe(r){return r?r.length<=13?r:`${r.slice(0,6)}…${r.slice(-4)}`:"—"}function Nr(r,e="CROSS",s=18){if(!r||r==="0x"||r==="0x0")return null;try{const t=BigInt(r);if(t===0n)return null;const n=Xt(t,s);return n==="0"?null:`${n} ${e}`}catch{return null}}const Lr={1:"Ethereum Mainnet",5:"Goerli Testnet",11155111:"Ethereum Sepolia",17e3:"Ethereum Holesky",10:"Optimism",420:"Optimism Goerli",42161:"Arbitrum One",421614:"Arbitrum Sepolia",8453:"Base",84532:"Base Sepolia",137:"Polygon",80002:"Polygon Amoy",56:"BNB Smart Chain",97:"BNB Testnet",43114:"Avalanche C-Chain",43113:"Avalanche Fuji",250:"Fantom Opera",2020:"Ronin",202601:"Ronin Saigon",612044:"CROSS Testnet",612055:"CROSS Mainnet"};function Dr(r){const e=parseInt(r.split(":")[1]??"",10);return!isNaN(e)&&Lr[e]?Lr[e]:r}function Xt(r,e){if(r===0n)return"0";const s=10n**BigInt(e),t=r/s,i=(r%s).toString().padStart(e,"0").slice(0,6).replace(/0+$/,"");return i?`${t}.${i}`:`${t}`}function Zt(r){try{const e=BigInt(r),s=e/1000000000n,n=(e%1000000000n).toString().padStart(9,"0").slice(0,2).replace(/0+$/,"");return n?`${s}.${n}`:`${s}`}catch{return r}}function gi(r){try{return BigInt(r).toLocaleString()}catch{return r}}function xi(r){const{gasLimit:e,gasPrice:s,maxFeePerGas:t,maxPriorityFeePerGas:n,nativeSymbol:o="ETH",nativeDecimals:i=18}=r;if(!e)return null;try{const a=BigInt(e),c=gi(e);if(t){const l=a*BigInt(t);return{isDynamic:!0,estTxFee:`${Xt(l,i)} ${o}`,maxFeeGwei:Zt(t),maxPriorityFeeGwei:n?Zt(n):void 0,gasLimitFormatted:c}}if(s){const l=a*BigInt(s);return{isDynamic:!1,estTxFee:`${Xt(l,i)} ${o}`,gasPriceGwei:Zt(s),gasLimitFormatted:c}}return{isDynamic:!1,estTxFee:`${a.toLocaleString()} gas`,gasLimitFormatted:c}}catch{return null}}function $r(r){const e=xi(r);if(!e)return z("Estimated fee","<span>—</span>");let s=z("Est. Tx Fee",`<span>${e.estTxFee}</span>`);return e.isDynamic?(e.maxPriorityFeeGwei!==void 0&&(s+=z("Max Priority Fee",`<span>${e.maxPriorityFeeGwei} Gwei</span>`)),e.maxFeeGwei!==void 0&&(s+=z("Max Gas Fee",`<span>${e.maxFeeGwei} Gwei</span>`))):e.gasPriceGwei!==void 0&&(s+=z("Gas Price",`<span>${e.gasPriceGwei} Gwei</span>`)),e.gasLimitFormatted&&(s+=z("Gas Limit",`<span>${e.gasLimitFormatted}</span>`)),s}const Te=`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2034
2034
  <rect x="9" y="9" width="13" height="13" rx="2"/>
2035
2035
  <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
2036
2036
  </svg>`,ce=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round">
2037
2037
  <line x1="18" y1="6" x2="6" y2="18"/>
2038
2038
  <line x1="6" y1="6" x2="18" y2="18"/>
2039
- </svg>`,xi=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2039
+ </svg>`,mi=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2040
2040
  <circle cx="20" cy="20" r="20" fill="#00D5AA"/>
2041
2041
  <path fill-rule="evenodd" clip-rule="evenodd" d="M20.3225 2.85742L23.7249 6.25982V11.8301L28.1175 7.43757L32.9292 12.2493L28.5806 16.5979H20.3225C18.4435 16.5979 16.9201 18.1212 16.9201 20.0003C16.9201 21.8794 18.4434 23.4027 20.3225 23.4027H28.5372L32.9293 27.7948L28.1176 32.6066L23.7249 28.2139V33.7407L20.3225 37.1431L16.9201 33.7407V28.2584L12.5719 32.6066L7.76022 27.7948L12.1524 23.4027H6.58209L3.17969 20.0003L6.58209 16.5979H12.1089L7.76035 12.2493L12.5721 7.43757L16.9201 11.7857V6.25982L20.3225 2.85742Z" fill="#121212"/>
2042
- </svg>`,mi='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 318.6 318.6" aria-hidden="true"><style>.st1,.st6{fill:#e4761b;stroke:#e4761b;stroke-linecap:round;stroke-linejoin:round}.st6{fill:#f6851b;stroke:#f6851b}</style><path fill="#e2761b" stroke="#e2761b" stroke-linecap="round" stroke-linejoin="round" d="m274.1 35.5-99.5 73.9L193 65.8z"/><path d="m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z" class="st1"/><path d="m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z" class="st1"/><path fill="#d7c1b3" stroke="#d7c1b3" stroke-linecap="round" stroke-linejoin="round" d="m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"/><path fill="#233447" stroke="#233447" stroke-linecap="round" stroke-linejoin="round" d="m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"/><path fill="#cd6116" stroke="#cd6116" stroke-linecap="round" stroke-linejoin="round" d="m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"/><path fill="#e4751f" stroke="#e4751f" stroke-linecap="round" stroke-linejoin="round" d="m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"/><path d="m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z" class="st6"/><path fill="#c0ad9e" stroke="#c0ad9e" stroke-linecap="round" stroke-linejoin="round" d="m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"/><path fill="#161616" stroke="#161616" stroke-linecap="round" stroke-linejoin="round" d="m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"/><path fill="#763d16" stroke="#763d16" stroke-linecap="round" stroke-linejoin="round" d="m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"/><path d="m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z" class="st6"/></svg>',wi='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 126.611 126.611" aria-hidden="true"><polygon fill="#F3BA2F" points="38.171,53.203 62.759,28.616 87.36,53.216 101.667,38.909 62.759,0 23.864,38.896 "/><rect x="3.644" y="53.188" transform="matrix(0.7071 0.7071 -0.7071 0.7071 48.7933 8.8106)" fill="#F3BA2F" width="20.233" height="20.234"/><polygon fill="#F3BA2F" points="38.171,73.408 62.759,97.995 87.359,73.396 101.674,87.695 101.667,87.703 62.759,126.611 23.863,87.716 23.843,87.696 "/><rect x="101.64" y="53.189" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 235.5457 29.0503)" fill="#F3BA2F" width="20.234" height="20.233"/><polygon fill="#F3BA2F" points="77.271,63.298 77.277,63.298 62.759,48.78 52.03,59.509 52.029,59.509 50.797,60.742 48.254,63.285 48.254,63.285 48.234,63.305 48.254,63.326 62.759,77.831 77.277,63.313 77.284,63.305 "/></svg>',yi='<svg width="16" height="16" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><circle cx="20" cy="20" r="20" fill="#00D5AA"/><path fill-rule="evenodd" clip-rule="evenodd" d="M20.3225 2.85742L23.7249 6.25982V11.8301L28.1175 7.43757L32.9292 12.2493L28.5806 16.5979H20.3225C18.4435 16.5979 16.9201 18.1212 16.9201 20.0003C16.9201 21.8794 18.4434 23.4027 20.3225 23.4027H28.5372L32.9293 27.7948L28.1176 32.6066L23.7249 28.2139V33.7407L20.3225 37.1431L16.9201 33.7407V28.2584L12.5719 32.6066L7.76022 27.7948L12.1524 23.4027H6.58209L3.17969 20.0003L6.58209 16.5979H12.1089L7.76035 12.2493L12.5721 7.43757L16.9201 11.7857V6.25982L20.3225 2.85742Z" fill="#121212"/></svg>',bi={[We.MetaMask]:mi,[We.Binance]:wi,[We.CROSSx]:yi},Qt=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
2042
+ </svg>`,wi='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 318.6 318.6" aria-hidden="true"><style>.st1,.st6{fill:#e4761b;stroke:#e4761b;stroke-linecap:round;stroke-linejoin:round}.st6{fill:#f6851b;stroke:#f6851b}</style><path fill="#e2761b" stroke="#e2761b" stroke-linecap="round" stroke-linejoin="round" d="m274.1 35.5-99.5 73.9L193 65.8z"/><path d="m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z" class="st1"/><path d="m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z" class="st1"/><path fill="#d7c1b3" stroke="#d7c1b3" stroke-linecap="round" stroke-linejoin="round" d="m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"/><path fill="#233447" stroke="#233447" stroke-linecap="round" stroke-linejoin="round" d="m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"/><path fill="#cd6116" stroke="#cd6116" stroke-linecap="round" stroke-linejoin="round" d="m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"/><path fill="#e4751f" stroke="#e4751f" stroke-linecap="round" stroke-linejoin="round" d="m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"/><path d="m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z" class="st6"/><path fill="#c0ad9e" stroke="#c0ad9e" stroke-linecap="round" stroke-linejoin="round" d="m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"/><path fill="#161616" stroke="#161616" stroke-linecap="round" stroke-linejoin="round" d="m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"/><path fill="#763d16" stroke="#763d16" stroke-linecap="round" stroke-linejoin="round" d="m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"/><path d="m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z" class="st6"/></svg>',yi='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 126.611 126.611" aria-hidden="true"><polygon fill="#F3BA2F" points="38.171,53.203 62.759,28.616 87.36,53.216 101.667,38.909 62.759,0 23.864,38.896 "/><rect x="3.644" y="53.188" transform="matrix(0.7071 0.7071 -0.7071 0.7071 48.7933 8.8106)" fill="#F3BA2F" width="20.233" height="20.234"/><polygon fill="#F3BA2F" points="38.171,73.408 62.759,97.995 87.359,73.396 101.674,87.695 101.667,87.703 62.759,126.611 23.863,87.716 23.843,87.696 "/><rect x="101.64" y="53.189" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 235.5457 29.0503)" fill="#F3BA2F" width="20.234" height="20.233"/><polygon fill="#F3BA2F" points="77.271,63.298 77.277,63.298 62.759,48.78 52.03,59.509 52.029,59.509 50.797,60.742 48.254,63.285 48.254,63.285 48.234,63.305 48.254,63.326 62.759,77.831 77.277,63.313 77.284,63.305 "/></svg>',bi='<svg width="16" height="16" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><circle cx="20" cy="20" r="20" fill="#00D5AA"/><path fill-rule="evenodd" clip-rule="evenodd" d="M20.3225 2.85742L23.7249 6.25982V11.8301L28.1175 7.43757L32.9292 12.2493L28.5806 16.5979H20.3225C18.4435 16.5979 16.9201 18.1212 16.9201 20.0003C16.9201 21.8794 18.4434 23.4027 20.3225 23.4027H28.5372L32.9293 27.7948L28.1176 32.6066L23.7249 28.2139V33.7407L20.3225 37.1431L16.9201 33.7407V28.2584L12.5719 32.6066L7.76022 27.7948L12.1524 23.4027H6.58209L3.17969 20.0003L6.58209 16.5979H12.1089L7.76035 12.2493L12.5721 7.43757L16.9201 11.7857V6.25982L20.3225 2.85742Z" fill="#121212"/></svg>',Si={[We.MetaMask]:wi,[We.Binance]:yi,[We.CROSSx]:bi},Qt=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
2043
2043
  <rect x="2" y="5" width="16" height="12" rx="2" stroke="currentColor" stroke-width="1.5"/>
2044
2044
  <path d="M2 9h16" stroke="currentColor" stroke-width="1.5"/>
2045
2045
  <rect x="12.5" y="11.5" width="3.5" height="2.5" rx="0.75" fill="currentColor"/>
2046
- </svg>`,Si=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
2047
- <path d="M12 0C18.6274 0 24 5.37258 24 12C23.9999 18.6273 18.6274 24 12 24C5.37264 24 9.89594e-05 18.6273 0 12C0 5.37258 5.37258 0 12 0ZM10.875 15.127V17.377H13.125V15.127H10.875ZM10.875 6.62207V13.627H13.125V6.62207H10.875Z" fill="var(--cx-error)"/>
2048
2046
  </svg>`,vi=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
2047
+ <path d="M12 0C18.6274 0 24 5.37258 24 12C23.9999 18.6273 18.6274 24 12 24C5.37264 24 9.89594e-05 18.6273 0 12C0 5.37258 5.37258 0 12 0ZM10.875 15.127V17.377H13.125V15.127H10.875ZM10.875 6.62207V13.627H13.125V6.62207H10.875Z" fill="var(--cx-error)"/>
2048
+ </svg>`,Ei=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
2049
2049
  <circle cx="12" cy="12" r="12" fill="var(--cx-error)"/>
2050
2050
  <circle cx="12" cy="12" r="5.5" stroke="white" stroke-width="1.5"/>
2051
2051
  <path d="M12 9.5v3l2 1.5" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
@@ -2053,7 +2053,7 @@ button.__crossx-connect-other-block:active {
2053
2053
  <div class="__crossx-row">
2054
2054
  <span class="__crossx-row-label">${r}</span>
2055
2055
  <div class="__crossx-row-value">${e}</div>
2056
- </div>`}function Ei(r,e){const s=e,t=r.nativeSymbol??"ETH",n=r.nativeDecimals??18,o=wt(r.dappName),i=r.to?`<span class="__crossx-addr-text">${oe(r.to)}</span>
2056
+ </div>`}function Ai(r,e){const s=e,t=r.nativeSymbol??"ETH",n=r.nativeDecimals??18,o=wt(r.dappName),i=r.to?`<span class="__crossx-addr-text">${oe(r.to)}</span>
2057
2057
  <button class="__crossx-copy-btn" data-copy="${C(r.to)}" title="Copy address">${Te}</button>`:"<span>—</span>",a=$r(r),c=Nr(r.value,t,n),l=c?z("Value",`<span>${c}</span>`):"",d=r.data??"0x",f=document.createElement("div");return f.id=te,f.innerHTML=`
2058
2058
  <div class="__crossx-card __crossx-card--migration __crossx-card--sign-tx" style="${le(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
2059
2059
  <div class="__crossx-header">
@@ -2090,7 +2090,7 @@ button.__crossx-connect-other-block:active {
2090
2090
  </div>
2091
2091
  </div>
2092
2092
  </div>
2093
- `,f}function Ai(r,e){const s=e,t=r.nativeSymbol??"ETH",n=r.nativeDecimals??18,o=wt(r.dappName),i=r.to?`<span class="__crossx-addr-text">${oe(r.to)}</span>
2093
+ `,f}function Ii(r,e){const s=e,t=r.nativeSymbol??"ETH",n=r.nativeDecimals??18,o=wt(r.dappName),i=r.to?`<span class="__crossx-addr-text">${oe(r.to)}</span>
2094
2094
  <button class="__crossx-copy-btn" data-copy="${C(r.to)}" title="Copy address">${Te}</button>`:"<span>—</span>",a=$r(r),l=Nr(r.value,t,n)??"—",d=document.createElement("div");return d.id=te,d.innerHTML=`
2095
2095
  <div class="__crossx-card __crossx-card--migration __crossx-card--send-tx" style="${le(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
2096
2096
  <div class="__crossx-header">
@@ -2116,7 +2116,7 @@ button.__crossx-connect-other-block:active {
2116
2116
  <button class="__crossx-approve-btn" id="__crossx-confirm-btn">Approve</button>
2117
2117
  </div>
2118
2118
  </div>
2119
- `,d}function wt(r){var e;if(r)return r;try{return((e=window.location)==null?void 0:e.hostname)||"This site"}catch{return"This site"}}function C(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Ii(r){return typeof r=="string"&&/^0x[0-9a-fA-F]{40}$/i.test(r)}function Ti(r){if(typeof r=="string")return C(r);if(typeof r=="number"||typeof r=="bigint"||typeof r=="boolean")return String(r);try{return C(JSON.stringify(r))}catch{return String(r)}}function Ri(r,e){const s=z("From",`<span class="__crossx-addr-text">${oe(r.from)}</span>
2119
+ `,d}function wt(r){var e;if(r)return r;try{return((e=window.location)==null?void 0:e.hostname)||"This site"}catch{return"This site"}}function C(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Ti(r){return typeof r=="string"&&/^0x[0-9a-fA-F]{40}$/i.test(r)}function Ri(r){if(typeof r=="string")return C(r);if(typeof r=="number"||typeof r=="bigint"||typeof r=="boolean")return String(r);try{return C(JSON.stringify(r))}catch{return String(r)}}function ki(r,e){const s=z("From",`<span class="__crossx-addr-text">${oe(r.from)}</span>
2120
2120
  <button class="__crossx-copy-btn" data-copy="${C(r.from)}" title="Copy address">${Te}</button>`),t=r.to?z("To",`<span class="__crossx-addr-text">${oe(r.to)}</span>
2121
2121
  <button class="__crossx-copy-btn" data-copy="${C(r.to)}" title="Copy address">${Te}</button>`):"",n=r.amount?z("Transfer",`<span>${C(r.amount)}</span>`):"",o=r.fees?z("Tx Fee",`<span>${C(r.fees)}</span>`):"",i=r.txHash?z("Tx Hash",`<span class="__crossx-addr-text">${oe(r.txHash)}</span>
2122
2122
  <button class="__crossx-copy-btn" data-copy="${C(r.txHash)}" title="Copy hash">${Te}</button>`):"",a=r.total?`<div class="__crossx-total-pill">
@@ -2141,7 +2141,7 @@ button.__crossx-connect-other-block:active {
2141
2141
  <button class="__crossx-approve-btn" id="__crossx-done-btn">All Done</button>
2142
2142
  </div>
2143
2143
  </div>
2144
- `,c}function ki(r,e){const s=document.createElement("div");return s.id=te,s.innerHTML=`
2144
+ `,c}function Oi(r,e){const s=document.createElement("div");return s.id=te,s.innerHTML=`
2145
2145
  <div class="__crossx-card __crossx-card--migration" style="${le(e)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
2146
2146
  <div class="__crossx-header">
2147
2147
  <p class="__crossx-title" id="__crossx-ttl">Waiting for confirmation</p>
@@ -2154,7 +2154,7 @@ button.__crossx-connect-other-block:active {
2154
2154
  </div>
2155
2155
  </div>
2156
2156
  </div>
2157
- `,s}function Oi(r,e,s){const t=e.status!=="reverted"&&e.status!=="timeout",n=e.status==="timeout",o=r.querySelector("#__crossx-ttl"),i=r.querySelector(".__crossx-header");if(o){const x=n?vi:t?"":Si,E=n?"Transaction timeout":t?"Transaction complete":"Transaction failed";x?(o.style.display="flex",o.style.alignItems="center",o.style.gap="8px",o.innerHTML=`${x}<span>${E}</span>`):o.textContent=E}if(i&&!r.querySelector("#__crossx-close-btn")){const x=document.createElement("button");x.className="__crossx-close",x.id="__crossx-close-btn",x.setAttribute("aria-label","Close"),x.innerHTML=ce,i.appendChild(x)}const a=r.querySelector("#__crossx-progress-body");if(!a)return;const c=e.from?z("From",`<span class="__crossx-addr-text">${oe(e.from)}</span>
2157
+ `,s}function Pi(r,e,s){const t=e.status!=="reverted"&&e.status!=="timeout",n=e.status==="timeout",o=r.querySelector("#__crossx-ttl"),i=r.querySelector(".__crossx-header");if(o){const x=n?Ei:t?"":vi,E=n?"Transaction timeout":t?"Transaction complete":"Transaction failed";x?(o.style.display="flex",o.style.alignItems="center",o.style.gap="8px",o.innerHTML=`${x}<span>${E}</span>`):o.textContent=E}if(i&&!r.querySelector("#__crossx-close-btn")){const x=document.createElement("button");x.className="__crossx-close",x.id="__crossx-close-btn",x.setAttribute("aria-label","Close"),x.innerHTML=ce,i.appendChild(x)}const a=r.querySelector("#__crossx-progress-body");if(!a)return;const c=e.from?z("From",`<span class="__crossx-addr-text">${oe(e.from)}</span>
2158
2158
  <button class="__crossx-copy-btn" data-copy="${C(e.from)}" title="Copy address">${Te}</button>`):"",l=e.to?z("To",`<span class="__crossx-addr-text">${oe(e.to)}</span>
2159
2159
  <button class="__crossx-copy-btn" data-copy="${C(e.to)}" title="Copy address">${Te}</button>`):"",d=e.amount?z("Transfer",`<span>${C(e.amount)}</span>`):"",f=e.fees?z("Tx Fee",`<span>${C(e.fees)}</span>`):"",g=e.txHash?z("Tx Hash",`<span class="__crossx-addr-text">${oe(e.txHash)}</span>
2160
2160
  <button class="__crossx-copy-btn" data-copy="${C(e.txHash)}" title="Copy hash">${Te}</button>`):"",p=e.total?`<div class="__crossx-total-pill">
@@ -2170,7 +2170,7 @@ button.__crossx-connect-other-block:active {
2170
2170
  </div>
2171
2171
  ${p}
2172
2172
  <button class="__crossx-approve-btn" id="__crossx-done-btn">${t?"All Done":"Done"}</button>
2173
- `,a.querySelectorAll(".__crossx-copy-btn").forEach(x=>{x.addEventListener("click",E=>{var I;E.stopPropagation();const S=x.dataset.copy;S&&((I=navigator.clipboard)==null||I.writeText(S).catch(()=>{}))})})}function Pi(r,e){const s=e,t=wt(r.dappName),n=C(r.message),o=document.createElement("div");return o.id=te,o.innerHTML=`
2173
+ `,a.querySelectorAll(".__crossx-copy-btn").forEach(x=>{x.addEventListener("click",E=>{var I;E.stopPropagation();const S=x.dataset.copy;S&&((I=navigator.clipboard)==null||I.writeText(S).catch(()=>{}))})})}function Ci(r,e){const s=e,t=wt(r.dappName),n=C(r.message),o=document.createElement("div");return o.id=te,o.innerHTML=`
2174
2174
  <div class="__crossx-card __crossx-card--migration __crossx-card--sign-msg" style="${le(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
2175
2175
  <div class="__crossx-header">
2176
2176
  <p class="__crossx-title" id="__crossx-ttl">Signature Request</p>
@@ -2198,11 +2198,11 @@ button.__crossx-connect-other-block:active {
2198
2198
  </div>
2199
2199
  </div>
2200
2200
  </div>
2201
- `,o}function Ci(r,e){const s=e,t=wt(r.dappName);let n={};if(typeof r.typedData=="string")try{n=JSON.parse(r.typedData)}catch{}else r.typedData&&typeof r.typedData=="object"&&(n=r.typedData);const o=n.primaryType??"—",i=n.message??{};let a=`
2201
+ `,o}function Ni(r,e){const s=e,t=wt(r.dappName);let n={};if(typeof r.typedData=="string")try{n=JSON.parse(r.typedData)}catch{}else r.typedData&&typeof r.typedData=="object"&&(n=r.typedData);const o=n.primaryType??"—",i=n.message??{};let a=`
2202
2202
  <div class="__crossx-td-row">
2203
2203
  <span class="__crossx-td-label">Primary Type</span>
2204
2204
  <span class="__crossx-td-value">${C(o)}</span>
2205
- </div>`;for(const[l,d]of Object.entries(i)){const f=Ti(d),p=Ii(d)?`<span class="__crossx-addr-text">${oe(d)}</span>
2205
+ </div>`;for(const[l,d]of Object.entries(i)){const f=Ri(d),p=Ti(d)?`<span class="__crossx-addr-text">${oe(d)}</span>
2206
2206
  <button class="__crossx-copy-btn" data-copy="${C(String(d))}" title="Copy">${Te}</button>`:`<span>${f}</span>`;a+=`
2207
2207
  <div class="__crossx-td-row">
2208
2208
  <span class="__crossx-td-label">${C(l)}</span>
@@ -2235,10 +2235,10 @@ button.__crossx-connect-other-block:active {
2235
2235
  </div>
2236
2236
  </div>
2237
2237
  </div>
2238
- `,c}const Ni=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
2238
+ `,c}const Li=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
2239
2239
  <line x1="12" y1="5" x2="12" y2="19"/>
2240
2240
  <line x1="5" y1="12" x2="19" y2="12"/>
2241
- </svg>`;function Li(r,e,s){const t=s==null?void 0:s.toLowerCase(),n=r.map(i=>{const a=t&&i.address.toLowerCase()===t;return`<button class="__crossx-wallet-item" data-wallet-index="${i.index}" data-wallet-address="${C(i.address)}">
2241
+ </svg>`;function Di(r,e,s){const t=s==null?void 0:s.toLowerCase(),n=r.map(i=>{const a=t&&i.address.toLowerCase()===t;return`<button class="__crossx-wallet-item" data-wallet-index="${i.index}" data-wallet-address="${C(i.address)}">
2242
2242
  <span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">Account ${i.index+1}</span><span class="__crossx-wallet-addr">${oe(i.address)}</span></span>${a?'<span class="__crossx-wallet-selected">selected</span>':""}
2243
2243
  </button>`}).join(""),o=document.createElement("div");return o.id=te,o.innerHTML=`
2244
2244
  <div class="__crossx-card __crossx-card--migration __crossx-card--wallet-selector" style="${le(e)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -2264,29 +2264,29 @@ button.__crossx-connect-other-block:active {
2264
2264
  ${n}
2265
2265
  </div>
2266
2266
  <button class="__crossx-wallet-add" id="__crossx-add-wallet-btn" type="button">
2267
- <span class="__crossx-wallet-add-icon">${Ni}</span>
2267
+ <span class="__crossx-wallet-add-icon">${Li}</span>
2268
2268
  <span class="__crossx-wallet-add-label">add a wallet</span>
2269
2269
  </button>
2270
2270
  </div>
2271
2271
  </div>
2272
2272
  </div>
2273
2273
  </div>
2274
- `,o}const Di=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2274
+ `,o}const $i=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2275
2275
  <path d="M26.693 21.193c-.028-3.168 2.587-4.712 2.706-4.786-1.477-2.16-3.77-2.454-4.58-2.484-1.944-.197-3.804 1.148-4.793 1.148-.992 0-2.52-1.12-4.147-1.09-2.13.032-4.1 1.239-5.198 3.133-2.222 3.855-.569 9.562 1.593 12.69 1.061 1.535 2.318 3.258 3.975 3.196 1.6-.064 2.2-1.03 4.133-1.03 1.928 0 2.48 1.03 4.172.997 1.72-.03 2.806-1.56 3.862-3.1 1.211-1.779 1.713-3.495 1.74-3.583-.037-.017-3.427-1.316-3.463-5.09z" fill="currentColor"/>
2276
2276
  <path d="M23.527 11.876c.877-1.065 1.471-2.545 1.31-4.024-1.266.053-2.807.845-3.718 1.907-.813.946-1.53 2.468-1.34 3.915 1.41.107 2.852-.716 3.748-1.798z" fill="currentColor"/>
2277
- </svg>`,$i=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2277
+ </svg>`,Mi=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2278
2278
  <path d="M38.06 20.44c0-1.34-.12-2.63-.34-3.87H20.5v7.32h9.84c-.42 2.28-1.71 4.21-3.65 5.51v4.57h5.91c3.46-3.19 5.46-7.88 5.46-13.53z" fill="#4285F4"/>
2279
2279
  <path d="M20.5 38.5c4.94 0 9.09-1.64 12.12-4.44l-5.91-4.57c-1.64 1.1-3.73 1.75-6.21 1.75-4.77 0-8.82-3.22-10.26-7.55H4.16v4.72A18.49 18.49 0 0 0 20.5 38.5z" fill="#34A853"/>
2280
2280
  <path d="M10.24 23.69A11.16 11.16 0 0 1 9.66 20c0-1.28.22-2.52.58-3.69v-4.72H4.16A18.49 18.49 0 0 0 2 20c0 2.97.71 5.78 1.97 8.28l6.27-4.59z" fill="#FBBC05"/>
2281
2281
  <path d="M20.5 8.76c2.69 0 5.1.92 7 2.73l5.24-5.24C29.58 3.36 25.43 1.5 20.5 1.5A18.49 18.49 0 0 0 4.16 11.59l6.08 4.72C11.68 11.98 15.73 8.76 20.5 8.76z" fill="#EA4335"/>
2282
- </svg>`;function Mi(r){const e=rs(r);return`<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${bi[r]??""}</span><span class="__crossx-connect-other-wallet-name">${C(e)}</span></span>`}function Wi(r){if(r.length===0)return"";const e=n=>Mi(r[n]),s="Supported wallets include ";if(r.length===1)return`${s}${e(0)}.`;if(r.length===2)return`${s}${e(0)} and ${e(1)}.`;if(r.length===3)return`${s}${e(0)}, ${e(1)} and ${e(2)}.`;const t=r.length-3;return`${s}${e(0)}, ${e(1)}, ${e(2)}, and ${t} more.`}function Ui(r,e=[]){const s=r,t=C(String(e[0])),n=e.length>0?`
2282
+ </svg>`;function Wi(r){const e=rs(r);return`<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${Si[r]??""}</span><span class="__crossx-connect-other-wallet-name">${C(e)}</span></span>`}function Ui(r){if(r.length===0)return"";const e=n=>Wi(r[n]),s="Supported wallets include ";if(r.length===1)return`${s}${e(0)}.`;if(r.length===2)return`${s}${e(0)} and ${e(1)}.`;if(r.length===3)return`${s}${e(0)}, ${e(1)} and ${e(2)}.`;const t=r.length-3;return`${s}${e(0)}, ${e(1)}, ${e(2)}, and ${t} more.`}function Hi(r,e=[]){const s=r,t=C(String(e[0])),n=e.length>0?`
2283
2283
  <div class="__crossx-login-or-divider">
2284
2284
  <hr><span>or</span><hr>
2285
2285
  </div>
2286
2286
  <button type="button" class="__crossx-connect-other-block" id="__crossx-connect-other-wallet-btn" data-wallet-id="${t}" aria-labelledby="__crossx-connect-other-heading">
2287
2287
  <span class="__crossx-connect-other-text">
2288
2288
  <span class="__crossx-connect-other-title" id="__crossx-connect-other-heading">Connect with Other Wallets</span>
2289
- <span class="__crossx-connect-other-desc __crossx-connect-other-summary">${Wi(e)}</span>
2289
+ <span class="__crossx-connect-other-desc __crossx-connect-other-summary">${Ui(e)}</span>
2290
2290
  </span>
2291
2291
  </button>`:"",o=document.createElement("div");return o.id=te,o.innerHTML=`
2292
2292
  <div class="__crossx-card __crossx-card--migration" style="${le(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -2301,11 +2301,11 @@ button.__crossx-connect-other-block:active {
2301
2301
  <div class="__crossx-body">
2302
2302
  <div class="__crossx-login-btn-row">
2303
2303
  <button class="__crossx-login-btn" id="__crossx-apple-btn" type="button">
2304
- <span class="__crossx-login-icon" style="color:var(--cx-value);">${Di}</span>
2304
+ <span class="__crossx-login-icon" style="color:var(--cx-value);">${$i}</span>
2305
2305
  <span class="__crossx-login-btn-label">Sign in with&nbsp;&nbsp;Apple</span>
2306
2306
  </button>
2307
2307
  <button class="__crossx-login-btn" id="__crossx-google-btn" type="button">
2308
- <span class="__crossx-login-icon">${$i}</span>
2308
+ <span class="__crossx-login-icon">${Mi}</span>
2309
2309
  <span class="__crossx-login-btn-label">Sign in with&nbsp;&nbsp;Google</span>
2310
2310
  </button>
2311
2311
  </div>${n}
@@ -2314,7 +2314,7 @@ button.__crossx-connect-other-block:active {
2314
2314
  </p>
2315
2315
  </div>
2316
2316
  </div>
2317
- `,o}function Hi(r,e){const s=r,t=document.createElement("div");t.id=te;const n=C(e.message).replace(/\n/g,"<br>"),o=e.email?`<div class="__crossx-session-account-card">
2317
+ `,o}function Bi(r,e){const s=r,t=document.createElement("div");t.id=te;const n=C(e.message).replace(/\n/g,"<br>"),o=e.email?`<div class="__crossx-session-account-card">
2318
2318
  <p class="__crossx-session-account-label">${C(e.accountLabel)}</p>
2319
2319
  <p class="__crossx-session-account-email">${C(e.email)}</p>
2320
2320
  </div>`:"";return t.innerHTML=`
@@ -2336,7 +2336,7 @@ button.__crossx-connect-other-block:active {
2336
2336
  </div>
2337
2337
  </div>
2338
2338
  </div>
2339
- `,t}function Bi(r,e=!0){const s=r,t=e?`<button class="__crossx-close" id="__crossx-close-btn" aria-label="Close">${ce}</button>`:"",n=e?'<button class="__crossx-skip-btn" id="__crossx-skip-btn">Skip for Now</button>':"",o=document.createElement("div");return o.id=te,o.innerHTML=`
2339
+ `,t}function Fi(r,e=!0){const s=r,t=e?`<button class="__crossx-close" id="__crossx-close-btn" aria-label="Close">${ce}</button>`:"",n=e?'<button class="__crossx-skip-btn" id="__crossx-skip-btn">Skip for Now</button>':"",o=document.createElement("div");return o.id=te,o.innerHTML=`
2340
2340
  <div class="__crossx-card __crossx-card--migration" style="${le(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
2341
2341
  <div class="__crossx-header">
2342
2342
  <p class="__crossx-title" id="__crossx-ttl">Wallet Found on Social Account 🎉</p>
@@ -2350,13 +2350,13 @@ button.__crossx-connect-other-block:active {
2350
2350
  <p class="__crossx-mig-info-desc">It safely restores and integrates all your previous assets. Simply verify your PIN to get started.</p>
2351
2351
  </div>
2352
2352
  <button class="__crossx-recover-btn" id="__crossx-recover-btn">
2353
- <span class="__crossx-recover-icon">${xi}</span>
2353
+ <span class="__crossx-recover-icon">${mi}</span>
2354
2354
  <span class="__crossx-recover-label">Import from Social Backup</span>
2355
2355
  </button>
2356
2356
  ${n}
2357
2357
  </div>
2358
2358
  </div>
2359
- `,o}function Fi(r,e){const s=r,{errorMessage:t,attemptCount:n,maxAttempts:o=5}=e??{},i=!!t,a=i?" --error":"",c=n!=null&&n>0?`<p class="__crossx-pin-attempt">${n}/${o}</p>`:"",l=n!=null&&n>=3?'<p class="__crossx-pin-warning">Your account will be locked after further failures.</p>':"",d=i?`<p class="__crossx-pin-error-text">${t}</p>`:"",f=document.createElement("div");return f.id=te,f.innerHTML=`
2359
+ `,o}function Ki(r,e){const s=r,{errorMessage:t,attemptCount:n,maxAttempts:o=5}=e??{},i=!!t,a=i?" --error":"",c=n!=null&&n>0?`<p class="__crossx-pin-attempt">${n}/${o}</p>`:"",l=n!=null&&n>=3?'<p class="__crossx-pin-warning">Your account will be locked after further failures.</p>':"",d=i?`<p class="__crossx-pin-error-text">${t}</p>`:"",f=document.createElement("div");return f.id=te,f.innerHTML=`
2360
2360
  <div class="__crossx-card __crossx-card--migration" style="${le(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
2361
2361
  <div class="__crossx-header">
2362
2362
  <p class="__crossx-title" id="__crossx-ttl">Import from Social Backup</p>
@@ -2376,7 +2376,7 @@ button.__crossx-connect-other-block:active {
2376
2376
  ${d}
2377
2377
  </div>
2378
2378
  </div>
2379
- `,f}function Ki(r){const e=new Date(r),s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n=s[e.getDay()],o=t[e.getMonth()],i=e.getDate(),a=String(e.getHours()).padStart(2,"0"),c=String(e.getMinutes()).padStart(2,"0");return`${n}, ${o} ${i} ${a}:${c}`}function Gi(r,e,s){const t=r,n=e<=0,o=n?null:Date.now()+e*1e3,i=o?Ki(o):null,a=document.createElement("div");return a.id=te,a.innerHTML=`
2379
+ `,f}function Gi(r){const e=new Date(r),s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n=s[e.getDay()],o=t[e.getMonth()],i=e.getDate(),a=String(e.getHours()).padStart(2,"0"),c=String(e.getMinutes()).padStart(2,"0");return`${n}, ${o} ${i} ${a}:${c}`}function qi(r,e,s){const t=r,n=e<=0,o=n?null:Date.now()+e*1e3,i=o?Gi(o):null,a=document.createElement("div");return a.id=te,a.innerHTML=`
2380
2380
  <div class="__crossx-card __crossx-card--migration" style="${le(t)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
2381
2381
  <div class="__crossx-header">
2382
2382
  <p class="__crossx-title" id="__crossx-ttl">Import from Social Backup</p>
@@ -2396,9 +2396,9 @@ button.__crossx-connect-other-block:active {
2396
2396
  </div>
2397
2397
  </div>
2398
2398
  </div>
2399
- `,{overlay:a,startCountdown:l=>{if(n||!o)return()=>{};const f=setInterval(()=>{Date.now()>=o&&(clearInterval(f),l())},1e3);return()=>clearInterval(f)}}}function qi(r){const s=[r.check1,r.check2].map((t,n)=>`
2399
+ `,{overlay:a,startCountdown:l=>{if(n||!o)return()=>{};const f=setInterval(()=>{Date.now()>=o&&(clearInterval(f),l())},1e3);return()=>clearInterval(f)}}}function Vi(r){const s=[r.check1,r.check2].map((t,n)=>`
2400
2400
  <div class="__crossx-pw-notice-item" data-check-index="${n}" role="checkbox" aria-checked="false" tabindex="0">
2401
- <div class="__crossx-pw-notice-check" id="__crossx-notice-check-${n}">${Yi}</div>
2401
+ <div class="__crossx-pw-notice-check" id="__crossx-notice-check-${n}">${ji}</div>
2402
2402
  <span class="__crossx-pw-notice-item-text">${C(t)}</span>
2403
2403
  </div>
2404
2404
  `).join("");return`
@@ -2412,7 +2412,7 @@ button.__crossx-connect-other-block:active {
2412
2412
  <div class="__crossx-pw-fields __crossx-pw-fields--notice">
2413
2413
  <div class="__crossx-pw-notice-header">
2414
2414
  <div class="__crossx-pw-notice-title-row">
2415
- <span class="__crossx-pw-notice-icon">${ji}</span>
2415
+ <span class="__crossx-pw-notice-icon">${Xi}</span>
2416
2416
  <p class="__crossx-pw-notice-title">${C(r.noticeTitle)}</p>
2417
2417
  </div>
2418
2418
  <p class="__crossx-pw-notice-desc">${C(r.noticeDesc)}</p>
@@ -2451,7 +2451,7 @@ button.__crossx-connect-other-block:active {
2451
2451
  <div class="__crossx-pin6-numpad-row">
2452
2452
  <button type="button" class="__crossx-pin6-numpad-key --empty" aria-hidden="true"></button>
2453
2453
  <button type="button" class="__crossx-pin6-numpad-key${p}" data-key="0">0</button>
2454
- <button type="button" class="__crossx-pin6-numpad-key --delete${p}" data-key="backspace" aria-label="Delete">${zi}</button>
2454
+ <button type="button" class="__crossx-pin6-numpad-key --delete${p}" data-key="backspace" aria-label="Delete">${Yi}</button>
2455
2455
  </div>
2456
2456
  </div>`;return`
2457
2457
  <div class="__crossx-header">
@@ -2478,14 +2478,14 @@ button.__crossx-connect-other-block:active {
2478
2478
  <div class="__crossx-card __crossx-card--pin6" style="${le(r)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
2479
2479
  ${e}
2480
2480
  </div>
2481
- `,s}function Vi(r,e){if(r.length!==6)return e.tooShort;if(!/^\d+$/.test(r))return e.numbersOnly;if(/(.)\1{2}/.test(r))return e.repeatingDigit;const s=r.split("").map(Number),t=s.every((o,i)=>i===0||o===(s[i-1]+1)%10),n=s.every((o,i)=>i===0||o===(s[i-1]+9)%10);return t||n?e.sequential:r[0]!==r[1]&&r===r.slice(0,2).repeat(3)?e.alternatingPattern:null}function Ji(r){const e=Math.max(0,Math.ceil(r/1e3)),s=Math.floor(e/3600),t=Math.floor(e%3600/60),n=e%60;return s>0?`${s}h ${String(t).padStart(2,"0")}m`:`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}`}function ts(r,e,s,t,n,o,i){var O,D;let a=!!(o&&o>Date.now()),c=!1;const l=()=>Array.from(r.querySelectorAll(".__crossx-pin6-box")),d=()=>r.querySelector("#__crossx-pin6-boxes"),f=()=>r.querySelector("#__crossx-pin6-error"),g=()=>r.querySelector("#__crossx-pin6-lock-msg"),p=()=>r.querySelector("#__crossx-pin6-lock-countdown"),x=()=>r.querySelector(".__crossx-pin6-body"),E=()=>l().map(y=>y.value).join(""),S=()=>Array.from(r.querySelectorAll(".__crossx-pin6-dot")),I=()=>{var v;const y=l(),b=S();if(b.length&&(b.forEach((A,k)=>{const H=!!(y[k]&&y[k].value);A.classList.toggle("--filled",H),A.classList.toggle("--active",!1)}),!a&&!c)){const A=y.findIndex(H=>!H.value);(v=b[A===-1?5:A])==null||v.classList.add("--active")}},R=()=>{r.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach(b=>b.classList.toggle("--disabled",a)),S().forEach(b=>b.classList.toggle("--locked",a)),I()},B=y=>{a=y,l().forEach(b=>{b.disabled=y,b.classList.toggle("--locked",y)})},M=()=>r.querySelector("#__crossx-pin6-attempt"),V=()=>{const y=f();y&&(y.textContent="")},G=()=>i??"Your account will be locked after further failures.",se=()=>r.querySelector("#__crossx-pin6-warning"),F=y=>{var v;let b=se();if(!b){b=document.createElement("p"),b.className="__crossx-pin6-warning",b.id="__crossx-pin6-warning";const A=f();A?A.insertAdjacentElement("afterend",b):(v=x())==null||v.appendChild(b)}b.textContent=y},Z=()=>{const y=se();y&&(y.textContent="")},re=(y,b)=>{var A;let v=M();if(!v){v=document.createElement("p"),v.className="__crossx-pin6-attempt",v.id="__crossx-pin6-attempt";const k=se()??f();k?k.insertAdjacentElement("afterend",v):(A=x())==null||A.appendChild(v)}v.textContent=`${y}/${b}`},U=()=>{const y=M();y&&(y.textContent="")},N=y=>{const b=f();b&&(b.textContent=y);const v=d();v==null||v.classList.add("--shake"),setTimeout(()=>v==null?void 0:v.classList.remove("--shake"),500),l().forEach(A=>{A.value=""}),setTimeout(()=>{var A;(A=l()[0])==null||A.focus(),I()},50)},$=y=>{var H;B(!0),l().forEach(W=>{W.value=""}),R();const b=f();if(b&&(b.textContent="Too many failed attempts. Please wait."),!g()){const W=document.createElement("p");W.className="__crossx-pin6-lock-msg",W.id="__crossx-pin6-lock-msg",W.innerHTML=`${Wr}<span id="__crossx-pin6-lock-countdown"></span>`;const L=f();L?L.insertAdjacentElement("afterend",W):(H=x())==null||H.appendChild(W)}const v=()=>{var K;const W=y-Date.now(),L=p();W<=0?(clearInterval(A),B(!1),(K=g())==null||K.remove(),b&&(b.textContent=""),R(),setTimeout(()=>{var X;return(X=l()[0])==null?void 0:X.focus()},50)):L&&(L.textContent=` ${Ji(W)}`)},A=setInterval(v,1e3);v();const k=new MutationObserver(()=>{document.contains(r)||(clearInterval(A),k.disconnect())});k.observe(document.body,{childList:!0,subtree:!1})},m=async()=>{if(a||c)return;const y=E();if(y.length===6){c=!0,l().forEach(b=>{b.disabled=!0});try{if(n){const b=await n(y);b.ok?e(y):b.lockExpiresAt?(U(),$(b.lockExpiresAt)):(N(b.error??"Incorrect PIN. Please try again."),b.attemptCount!=null&&b.maxAttempts!=null?(F(G()),re(b.attemptCount,b.maxAttempts)):(Z(),U()))}else e(y)}catch(b){t&&t(b)}finally{c=!1,a||l().forEach(b=>{b.disabled=!1}),I()}}};o&&o>Date.now()?$(o):setTimeout(()=>{var y;return(y=l()[0])==null?void 0:y.focus()},100);const w=()=>{if(a||c)return;const y=l(),b=y.find(v=>!v.value)??y[y.length-1];b==null||b.focus()};(O=d())==null||O.addEventListener("click",y=>{y.target.classList.contains("__crossx-pin6-box")||w()}),(D=x())==null||D.addEventListener("click",y=>{const b=y.target;b.classList.contains("__crossx-pin6-box")||b.closest("button")||w()}),l().forEach((y,b)=>{y.addEventListener("input",()=>{var A;const v=y.value.replace(/\D/g,"").slice(-1);y.value=v,V(),v&&b<5&&((A=l()[b+1])==null||A.focus()),I(),E().length===6&&setTimeout(m,80)}),y.addEventListener("keydown",v=>{var A,k;if(v.key==="Backspace"){if(v.preventDefault(),y.value)y.value="";else if(b>0){const H=l()[b-1];H.value="",H.focus()}I()}else v.key==="ArrowLeft"&&b>0?(v.preventDefault(),(A=l()[b-1])==null||A.focus()):v.key==="ArrowRight"&&b<5?(v.preventDefault(),(k=l()[b+1])==null||k.focus()):v.key==="Escape"&&s()}),y.addEventListener("paste",v=>{var H,W;v.preventDefault();const A=(((H=v.clipboardData)==null?void 0:H.getData("text"))??"").replace(/\D/g,"").slice(0,6);if(!A)return;const k=l();A.split("").forEach((L,K)=>{k[K]&&(k[K].value=L)}),(W=k[Math.min(A.length-1,5)])==null||W.focus(),V(),I(),E().length===6&&setTimeout(m,80)}),y.addEventListener("focus",()=>y.select())});const T=r.querySelector("#__crossx-pin6-numpad");if(T){let y=null;const b=()=>{y&&(y.classList.remove("--pressed"),y=null)};T.addEventListener("pointerdown",A=>{const k=A.target.closest(".__crossx-pin6-numpad-key");!k||a||c||(b(),y=k,k.classList.add("--pressed"),k.setPointerCapture(A.pointerId))});const v=A=>{const k=A.dataset.key;if(!k)return;if(k==="backspace"){const K=[...l()].reverse().find(X=>X.value);K&&(K.value="",V()),I();return}if(!/^\d$/.test(k))return;const W=l().find(L=>!L.value);W&&(W.value=k,V(),I(),E().length===6&&setTimeout(m,80))};T.addEventListener("pointerup",A=>{if(!y)return;const k=y;b();const H=k.getBoundingClientRect();A.clientX>=H.left&&A.clientX<=H.right&&A.clientY>=H.top&&A.clientY<=H.bottom&&!a&&!c&&v(k)}),T.addEventListener("pointercancel",b),T.addEventListener("pointerleave",b,!0),I(),o&&o>Date.now()&&R()}}const zi=`<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
2481
+ `,s}function Ji(r,e){if(r.length!==6)return e.tooShort;if(!/^\d+$/.test(r))return e.numbersOnly;if(/(.)\1{2}/.test(r))return e.repeatingDigit;const s=r.split("").map(Number),t=s.every((o,i)=>i===0||o===(s[i-1]+1)%10),n=s.every((o,i)=>i===0||o===(s[i-1]+9)%10);return t||n?e.sequential:r[0]!==r[1]&&r===r.slice(0,2).repeat(3)?e.alternatingPattern:null}function zi(r){const e=Math.max(0,Math.ceil(r/1e3)),s=Math.floor(e/3600),t=Math.floor(e%3600/60),n=e%60;return s>0?`${s}h ${String(t).padStart(2,"0")}m`:`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}`}function ts(r,e,s,t,n,o,i){var O,D;let a=!!(o&&o>Date.now()),c=!1;const l=()=>Array.from(r.querySelectorAll(".__crossx-pin6-box")),d=()=>r.querySelector("#__crossx-pin6-boxes"),f=()=>r.querySelector("#__crossx-pin6-error"),g=()=>r.querySelector("#__crossx-pin6-lock-msg"),p=()=>r.querySelector("#__crossx-pin6-lock-countdown"),x=()=>r.querySelector(".__crossx-pin6-body"),E=()=>l().map(y=>y.value).join(""),S=()=>Array.from(r.querySelectorAll(".__crossx-pin6-dot")),I=()=>{var v;const y=l(),b=S();if(b.length&&(b.forEach((A,k)=>{const H=!!(y[k]&&y[k].value);A.classList.toggle("--filled",H),A.classList.toggle("--active",!1)}),!a&&!c)){const A=y.findIndex(H=>!H.value);(v=b[A===-1?5:A])==null||v.classList.add("--active")}},R=()=>{r.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach(b=>b.classList.toggle("--disabled",a)),S().forEach(b=>b.classList.toggle("--locked",a)),I()},B=y=>{a=y,l().forEach(b=>{b.disabled=y,b.classList.toggle("--locked",y)})},M=()=>r.querySelector("#__crossx-pin6-attempt"),V=()=>{const y=f();y&&(y.textContent="")},G=()=>i??"Your account will be locked after further failures.",se=()=>r.querySelector("#__crossx-pin6-warning"),F=y=>{var v;let b=se();if(!b){b=document.createElement("p"),b.className="__crossx-pin6-warning",b.id="__crossx-pin6-warning";const A=f();A?A.insertAdjacentElement("afterend",b):(v=x())==null||v.appendChild(b)}b.textContent=y},Z=()=>{const y=se();y&&(y.textContent="")},re=(y,b)=>{var A;let v=M();if(!v){v=document.createElement("p"),v.className="__crossx-pin6-attempt",v.id="__crossx-pin6-attempt";const k=se()??f();k?k.insertAdjacentElement("afterend",v):(A=x())==null||A.appendChild(v)}v.textContent=`${y}/${b}`},U=()=>{const y=M();y&&(y.textContent="")},N=y=>{const b=f();b&&(b.textContent=y);const v=d();v==null||v.classList.add("--shake"),setTimeout(()=>v==null?void 0:v.classList.remove("--shake"),500),l().forEach(A=>{A.value=""}),setTimeout(()=>{var A;(A=l()[0])==null||A.focus(),I()},50)},$=y=>{var H;B(!0),l().forEach(W=>{W.value=""}),R();const b=f();if(b&&(b.textContent="Too many failed attempts. Please wait."),!g()){const W=document.createElement("p");W.className="__crossx-pin6-lock-msg",W.id="__crossx-pin6-lock-msg",W.innerHTML=`${Wr}<span id="__crossx-pin6-lock-countdown"></span>`;const L=f();L?L.insertAdjacentElement("afterend",W):(H=x())==null||H.appendChild(W)}const v=()=>{var K;const W=y-Date.now(),L=p();W<=0?(clearInterval(A),B(!1),(K=g())==null||K.remove(),b&&(b.textContent=""),R(),setTimeout(()=>{var X;return(X=l()[0])==null?void 0:X.focus()},50)):L&&(L.textContent=` ${zi(W)}`)},A=setInterval(v,1e3);v();const k=new MutationObserver(()=>{document.contains(r)||(clearInterval(A),k.disconnect())});k.observe(document.body,{childList:!0,subtree:!1})},m=async()=>{if(a||c)return;const y=E();if(y.length===6){c=!0,l().forEach(b=>{b.disabled=!0});try{if(n){const b=await n(y);b.ok?e(y):b.lockExpiresAt?(U(),$(b.lockExpiresAt)):(N(b.error??"Incorrect PIN. Please try again."),b.attemptCount!=null&&b.maxAttempts!=null?(F(G()),re(b.attemptCount,b.maxAttempts)):(Z(),U()))}else e(y)}catch(b){t&&t(b)}finally{c=!1,a||l().forEach(b=>{b.disabled=!1}),I()}}};o&&o>Date.now()?$(o):setTimeout(()=>{var y;return(y=l()[0])==null?void 0:y.focus()},100);const w=()=>{if(a||c)return;const y=l(),b=y.find(v=>!v.value)??y[y.length-1];b==null||b.focus()};(O=d())==null||O.addEventListener("click",y=>{y.target.classList.contains("__crossx-pin6-box")||w()}),(D=x())==null||D.addEventListener("click",y=>{const b=y.target;b.classList.contains("__crossx-pin6-box")||b.closest("button")||w()}),l().forEach((y,b)=>{y.addEventListener("input",()=>{var A;const v=y.value.replace(/\D/g,"").slice(-1);y.value=v,V(),v&&b<5&&((A=l()[b+1])==null||A.focus()),I(),E().length===6&&setTimeout(m,80)}),y.addEventListener("keydown",v=>{var A,k;if(v.key==="Backspace"){if(v.preventDefault(),y.value)y.value="";else if(b>0){const H=l()[b-1];H.value="",H.focus()}I()}else v.key==="ArrowLeft"&&b>0?(v.preventDefault(),(A=l()[b-1])==null||A.focus()):v.key==="ArrowRight"&&b<5?(v.preventDefault(),(k=l()[b+1])==null||k.focus()):v.key==="Escape"&&s()}),y.addEventListener("paste",v=>{var H,W;v.preventDefault();const A=(((H=v.clipboardData)==null?void 0:H.getData("text"))??"").replace(/\D/g,"").slice(0,6);if(!A)return;const k=l();A.split("").forEach((L,K)=>{k[K]&&(k[K].value=L)}),(W=k[Math.min(A.length-1,5)])==null||W.focus(),V(),I(),E().length===6&&setTimeout(m,80)}),y.addEventListener("focus",()=>y.select())});const T=r.querySelector("#__crossx-pin6-numpad");if(T){let y=null;const b=()=>{y&&(y.classList.remove("--pressed"),y=null)};T.addEventListener("pointerdown",A=>{const k=A.target.closest(".__crossx-pin6-numpad-key");!k||a||c||(b(),y=k,k.classList.add("--pressed"),k.setPointerCapture(A.pointerId))});const v=A=>{const k=A.dataset.key;if(!k)return;if(k==="backspace"){const K=[...l()].reverse().find(X=>X.value);K&&(K.value="",V()),I();return}if(!/^\d$/.test(k))return;const W=l().find(L=>!L.value);W&&(W.value=k,V(),I(),E().length===6&&setTimeout(m,80))};T.addEventListener("pointerup",A=>{if(!y)return;const k=y;b();const H=k.getBoundingClientRect();A.clientX>=H.left&&A.clientX<=H.right&&A.clientY>=H.top&&A.clientY<=H.bottom&&!a&&!c&&v(k)}),T.addEventListener("pointercancel",b),T.addEventListener("pointerleave",b,!0),I(),o&&o>Date.now()&&R()}}const Yi=`<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
2482
2482
  <path d="M7.36 0.5H19.5C20.6046 0.5 21.5 1.39543 21.5 2.5V14.5C21.5 15.6046 20.6046 16.5 19.5 16.5H7.36C6.76 16.5 6.19 16.24 5.8 15.79L0.94 10.02C0.35 9.32 0.35 8.3 0.94 7.6L5.8 1.71C6.19 1.26 6.76 0.5 7.36 0.5Z" stroke="currentColor" stroke-width="1.2" fill="none"/>
2483
2483
  <line x1="10" y1="5.5" x2="16" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
2484
2484
  <line x1="16" y1="5.5" x2="10" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
2485
2485
  </svg>`,Wr=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2486
2486
  <path d="M14.5 8.5H14V6.5C14 4.015 11.985 2 9.5 2C7.015 2 5 4.015 5 6.5V8.5H4.5C3.672 8.5 3 9.172 3 10V16.5C3 17.328 3.672 18 4.5 18H14.5C15.328 18 16 17.328 16 16.5V10C16 9.172 15.328 8.5 14.5 8.5ZM10.5 13.415V15C10.5 15.276 10.276 15.5 10 15.5H9C8.724 15.5 8.5 15.276 8.5 15V13.415C8.187 13.196 8 12.847 8 12.5C8 11.672 8.672 11 9.5 11C10.328 11 11 11.672 11 12.5C11 12.847 10.813 13.196 10.5 13.415ZM12.5 8.5H6.5V6.5C6.5 4.843 7.843 3.5 9.5 3.5C11.157 3.5 12.5 4.843 12.5 6.5V8.5Z" fill="currentColor"/>
2487
- </svg>`,Yi=`<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg">
2487
+ </svg>`,ji=`<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg">
2488
2488
  <path d="M1 4.5L4 7.5L10 1" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2489
- </svg>`,ji=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2489
+ </svg>`,Xi=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2490
2490
  <path d="M12 0C18.6274 0 24 5.37258 24 12C23.9999 18.6273 18.6274 24 12 24C5.37264 24 9.89594e-05 18.6273 0 12C0 5.37258 5.37258 0 12 0ZM10.875 15.127V17.377H13.125V15.127H10.875ZM10.875 6.62207V13.627H13.125V6.62207H10.875Z" fill="currentColor"/>
2491
- </svg>`;function Xi(r,e,s){var o;const t=r.querySelectorAll(".__crossx-pin-input");t.forEach((i,a)=>{i.addEventListener("input",()=>{const c=i.value.replace(/\D/g,"");i.value=c?c[0]:"",c&&a<3&&t[a+1].focus();const l=Array.from(t).map(d=>d.value).join("");l.length===4&&setTimeout(()=>e(l),200)}),i.addEventListener("keydown",c=>{c.key==="Backspace"&&!i.value&&a>0&&(t[a-1].focus(),t[a-1].value=""),c.key==="Escape"&&s()}),i.addEventListener("keypress",c=>{/[0-9]/.test(c.key)||c.preventDefault()}),i.addEventListener("paste",c=>{var f;c.preventDefault();const l=(((f=c.clipboardData)==null?void 0:f.getData("text"))??"").replace(/\D/g,"").slice(0,4);if(!l)return;l.split("").forEach((g,p)=>{t[p]&&(t[p].value=g)});const d=Math.min(l.length,3);t[d].focus(),l.length===4&&setTimeout(()=>e(l),200)})});const n=r.querySelector(".__crossx-pin-inputs");n==null||n.addEventListener("click",i=>{if(!i.target.classList.contains("__crossx-pin-input")){const a=Array.from(t).find(c=>!c.value)??t[t.length-1];a==null||a.focus()}}),(o=t[0])==null||o.focus()}class Zi{constructor(e="light",s){this.theme=e,this.overrides=s,this.tokens=Cr(e,s)}setTheme(e,s){this.theme=e,s!==void 0&&(this.overrides=s),this.tokens=Cr(e,this.overrides)}setMessages(e){this.messages=e}getTheme(){return this.theme}showWalletSelector(e,s,t){return new Promise(n=>{var E;fe();const o=[...e],i=Li(o,this.tokens,t),a=Ye();_e(i);let c=!1;const l=()=>{c||(c=!0,i.remove(),a())},d=S=>{l(),n(S)},f=()=>{l(),n(null)};(()=>{i.querySelectorAll(".__crossx-wallet-item").forEach(S=>{S.addEventListener("click",()=>{const I=S.dataset.walletAddress??"",R=parseInt(S.dataset.walletIndex??"0",10);d({address:I,index:R})})})})();const p=i.querySelector("#__crossx-add-wallet-btn");p&&p.addEventListener("click",async()=>{p.disabled=!0;try{const S=await s();o.push(S);const I=i.querySelector("#__crossx-wallet-list");if(I){const R=document.createElement("button");R.className="__crossx-wallet-item",R.dataset.walletIndex=String(S.index),R.dataset.walletAddress=S.address,R.innerHTML=`<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">Account ${S.index+1}</span><span class="__crossx-wallet-addr">${oe(S.address)}</span></span>`,R.addEventListener("click",()=>d(S)),I.appendChild(R),R.scrollIntoView({behavior:"smooth",block:"nearest"})}}catch{}finally{p.disabled=!1}}),(E=i.querySelector("#__crossx-close-btn"))==null||E.addEventListener("click",f),i.addEventListener("click",S=>{S.target===i&&f()});const x=S=>{S.key==="Escape"&&(document.removeEventListener("keydown",x),f())};document.addEventListener("keydown",x)})}showLoginSelector(e){var t;const s=((t=e==null?void 0:e.connectOtherWallets)==null?void 0:t.filter(n=>Object.values(We).includes(n)&&String(n).trim()!==""))??[];return new Promise(n=>{var g,p,x,E;fe();const o=Ui(this.tokens,s),i=Ye();_e(o);const a=()=>{o.remove(),i()},c=S=>{a(),n({type:"oauth",provider:S})},l=S=>{a(),n({type:"external",walletId:S})},d=()=>{a(),n(null)};(g=o.querySelector("#__crossx-apple-btn"))==null||g.addEventListener("click",()=>c("apple")),(p=o.querySelector("#__crossx-google-btn"))==null||p.addEventListener("click",()=>c("google")),(x=o.querySelector("#__crossx-connect-other-wallet-btn"))==null||x.addEventListener("click",S=>{const R=S.currentTarget.dataset.walletId??"";R&&l(R)}),(E=o.querySelector("#__crossx-close-btn"))==null||E.addEventListener("click",d),o.addEventListener("click",S=>{S.target===o&&d()}),o.querySelectorAll(".__crossx-login-terms-link").forEach(S=>{S.addEventListener("click",I=>I.stopPropagation())});const f=S=>{S.key==="Escape"&&(document.removeEventListener("keydown",f),d())};document.addEventListener("keydown",f)})}showSessionAlert(e){return new Promise(s=>{var d,f,g;fe();const t=this.messages,n=Hi(this.tokens,{title:e.title,message:e.message,email:e.email,accountLabel:(t==null?void 0:t.sessionAlert_accountLabel)??"Account",signOutLabel:(t==null?void 0:t.sessionAlert_signOutButton)??"Sign out",signInAgainLabel:(t==null?void 0:t.sessionAlert_signInAgainButton)??"Sign in again"}),o=Ye();_e(n);let i=!1;const a=()=>{i||(i=!0,n.remove(),o())},c=()=>{a(),s("signout")},l=()=>{a(),s("signin-again")};(d=n.querySelector("#__crossx-session-signout"))==null||d.addEventListener("click",c),(f=n.querySelector("#__crossx-session-signin"))==null||f.addEventListener("click",l),(g=n.querySelector("#__crossx-close-btn"))==null||g.addEventListener("click",c)})}showMigrationFoundPrompt(e){const s=(e==null?void 0:e.allowSkip)??!0;return new Promise(t=>{var a,c,l;fe();const n=Bi(this.tokens,s);_e(n);const o=()=>n.remove(),i=()=>{o(),t("recover")};if((a=n.querySelector("#__crossx-recover-btn"))==null||a.addEventListener("click",i),s){const d=()=>{o(),t("skip")};(c=n.querySelector("#__crossx-skip-btn"))==null||c.addEventListener("click",d),(l=n.querySelector("#__crossx-close-btn"))==null||l.addEventListener("click",d),n.addEventListener("click",g=>{g.target===n&&d()});const f=g=>{g.key==="Escape"&&(document.removeEventListener("keydown",f),d())};document.addEventListener("keydown",f)}})}showPinSetupPrompt(e){return new Promise(s=>{fe();const t=this.messages,n={title:(t==null?void 0:t.pinSetup_title)??"Create PIN",headerSubtitle:(t==null?void 0:t.pinNotice_headerSubtitle)??"Required for transactions, PK/mnemonic export & account deletion.",noticeTitle:(t==null?void 0:t.pinNotice_title)??"PIN Setup Notice",noticeDesc:(t==null?void 0:t.pinNotice_description)??"For your security, this PIN cannot be reset or recovered. Please make sure you remember it or store it in a safe place.",check1:(t==null?void 0:t.pinNotice_check1)??"I understand that losing this PIN will result in permanent loss of access to my wallet and assets.",check2:(t==null?void 0:t.pinNotice_check2)??"I understand that no one, including the support team, can recover or reset this PIN on my behalf.",nextButton:(t==null?void 0:t.pinNotice_nextButton)??"Next",submitButton:(t==null?void 0:t.pinNotice_submitButton)??"I Understand"},o={title:(t==null?void 0:t.pinSetup_title)??"Create PIN",headerSubtitle:(t==null?void 0:t.pinSetup_headerSubtitle)??"This PIN is used to authorize your transactions.",subtitle:(t==null?void 0:t.pinSetup_subtitle)??"Set a 6-digit PIN to authorize transactions.",mismatchError:(t==null?void 0:t.pinSetup_mismatchError)??"PINs do not match. Please try again."},i={title:(t==null?void 0:t.pinSetup_confirmTitle)??"Confirm PIN",headerSubtitle:(t==null?void 0:t.pinSetup_confirmSubtitle)??"Enter your PIN again to confirm."},a=Mr(this.tokens,qi(n)),c=Ye();_e(a);let l=!1;const d=()=>{l||(l=!0,a.remove(),c())},f=R=>{d(),s(R)},g=()=>{d(),s(null)},p=a.querySelector(".__crossx-card"),x={tooShort:(t==null?void 0:t.pinValidation_tooShort)??"Please enter a 6-digit PIN.",numbersOnly:(t==null?void 0:t.pinValidation_numbersOnly)??"Only numbers (0-9) are allowed.",repeatingDigit:(t==null?void 0:t.pinValidation_repeatingDigit)??"Cannot use the same number 3+ times in a row.",sequential:(t==null?void 0:t.pinValidation_sequential)??"Sequential numbers (e.g., 123456) are not allowed.",alternatingPattern:(t==null?void 0:t.pinValidation_alternatingPattern)??"Repeating patterns (e.g., 121212) are not allowed."},E=R=>{var B;p.innerHTML=es({title:i.title,headerSubtitle:i.headerSubtitle}),(B=p.querySelector("#__crossx-close-btn"))==null||B.addEventListener("click",g),ts(p,M=>{M===R?f(R):S(o.mismatchError)},g)},S=R=>{var B;p.innerHTML=es({title:o.title,headerSubtitle:o.headerSubtitle,subtitle:o.subtitle,errorMessage:R}),(B=p.querySelector("#__crossx-close-btn"))==null||B.addEventListener("click",g),ts(p,M=>{const V=Vi(M,x);V?S(V):E(M)},g)};(()=>{var re;const R=Array.from(p.querySelectorAll(".__crossx-pw-notice-item")),B=p.querySelector("#__crossx-pin-notice-next"),M=new Set;B.removeAttribute("disabled");const V=B.dataset.nextLabel??"Next",G=B.dataset.submitLabel??"I Understand",se=()=>{const U=M.size===R.length;B.classList.toggle("--disabled",!U),B.textContent=U?G:V},F=(U,N)=>{if(M.has(N))return;const $=U.querySelector(`#__crossx-notice-check-${N}`);M.add(N),$.classList.add("--checked"),U.setAttribute("aria-checked","true"),se()},Z=(U,N)=>{if(!M.has(N))return;const $=U.querySelector(`#__crossx-notice-check-${N}`);M.delete(N),$.classList.remove("--checked"),U.setAttribute("aria-checked","false"),se()};R.forEach(U=>{const N=parseInt(U.dataset.checkIndex??"0",10);U.addEventListener("click",()=>{M.has(N)?Z(U,N):F(U,N)}),U.addEventListener("keydown",$=>{($.key===" "||$.key==="Enter")&&($.preventDefault(),M.has(N)?Z(U,N):F(U,N))})}),B.addEventListener("click",()=>{if(M.size===R.length){S(e==null?void 0:e.errorMessage);return}const U=R.find($=>{const m=parseInt($.dataset.checkIndex??"0",10);return!M.has(m)});if(!U)return;const N=parseInt(U.dataset.checkIndex??"0",10);U.scrollIntoView({behavior:"smooth",block:"nearest"}),U.classList.add("--highlight"),setTimeout(()=>{U.classList.remove("--highlight"),F(U,N)},400)}),(re=p.querySelector("#__crossx-close-btn"))==null||re.addEventListener("click",g)})(),a.addEventListener("click",R=>{R.target===a&&g()})})}showPinInputPrompt(e){return new Promise((s,t)=>{var I;fe();const n=this.messages,o=(e==null?void 0:e.verifyMode)===!0,i=o?(n==null?void 0:n.verifyPin_title)??"Verify Your PIN":(n==null?void 0:n.pinInput_title)??"Enter PIN",a=o?(n==null?void 0:n.verifyPin_subtitle)??"Enter your PIN to authorize this transaction.":(n==null?void 0:n.pinInput_subtitle)??"Enter your 6-digit PIN to continue.",c=(n==null?void 0:n.pinLocked_failureWarning)??"Your account will be locked after further failures.",l=Mr(this.tokens,es({title:i,headerSubtitle:a,errorMessage:e==null?void 0:e.errorMessage,warningMessage:c,lockExpiresAt:e==null?void 0:e.lockExpiresAt,attemptCount:e==null?void 0:e.attemptCount,maxAttempts:e==null?void 0:e.maxAttempts})),d=Ye();_e(l);let f=!1;const g=()=>{f||(f=!0,l.remove(),d())},p=R=>{g(),s(R)},x=()=>{g(),s(null)},E=R=>{g(),t(R)},S=l.querySelector(".__crossx-card");(I=S.querySelector("#__crossx-close-btn"))==null||I.addEventListener("click",x),ts(S,p,x,E,e==null?void 0:e.onSubmit,e==null?void 0:e.lockExpiresAt,c),l.addEventListener("click",R=>{R.target===l&&x()})})}showRecoveryPinInputPrompt(e){return new Promise(s=>{var a;fe();const t=Fi(this.tokens,e);_e(t);const n=()=>t.remove(),o=c=>{n(),s(c)},i=()=>{n(),s(null)};Xi(t,o,i),(a=t.querySelector("#__crossx-close-btn"))==null||a.addEventListener("click",i),t.addEventListener("click",c=>{c.target===t&&i()})})}showRecoveryPinLockedPrompt(e,s){return new Promise(t=>{var l;fe();const{overlay:n,startCountdown:o}=Gi(this.tokens,e,s);_e(n);const i=()=>{c(),n.remove()},a=()=>{i(),t()},c=o(a);(l=n.querySelector("#__crossx-close-btn"))==null||l.addEventListener("click",a),n.addEventListener("click",d=>{d.target===n&&a()})})}showTransactionComplete(e){return new Promise(s=>{var a,c;fe();const t=Ri(e,this.tokens);_e(t);const n=()=>t.remove(),o=()=>{n(),s()};(a=t.querySelector("#__crossx-done-btn"))==null||a.addEventListener("click",o),(c=t.querySelector("#__crossx-close-btn"))==null||c.addEventListener("click",o),t.querySelectorAll(".__crossx-copy-btn").forEach(l=>{l.addEventListener("click",d=>{var g;d.stopPropagation();const f=l.dataset.copy;f&&((g=navigator.clipboard)==null||g.writeText(f).catch(()=>{}))})}),t.addEventListener("click",l=>{l.target===t&&o()});const i=l=>{l.key==="Escape"&&(document.removeEventListener("keydown",i),o())};document.addEventListener("keydown",i)})}showTransactionProgress(e,s){return new Promise(t=>{fe();const n=ki(e,this.tokens);_e(n);const o=()=>n.remove();let i=!1;const a=()=>{i||(i=!0,o(),t())},c=()=>{var d,f;(d=n.querySelector("#__crossx-done-btn"))==null||d.addEventListener("click",a),(f=n.querySelector("#__crossx-close-btn"))==null||f.addEventListener("click",a),n.addEventListener("click",g=>{g.target===n&&a()});const l=g=>{g.key==="Escape"&&(document.removeEventListener("keydown",l),a())};document.addEventListener("keydown",l)};s.then(l=>{i||(Oi(n,l,this.tokens),c())})})}requestConfirmation(e){return new Promise(s=>{var l,d,f;fe();let t;e.type==="sign-message"?t=Pi(e,this.tokens):e.type==="sign-typed-data"?t=Ci(e,this.tokens):e.type==="sign"?t=Ei(e,this.tokens):t=Ai(e,this.tokens);const n=Ye();_e(t);const o=()=>{t.remove(),n()},i=()=>{o(),s(!0)},a=()=>{o(),s(!1)};(l=t.querySelector("#__crossx-confirm-btn"))==null||l.addEventListener("click",i),(d=t.querySelector("#__crossx-cancel-btn"))==null||d.addEventListener("click",a),(f=t.querySelector("#__crossx-close-btn"))==null||f.addEventListener("click",a),t.querySelectorAll(".__crossx-copy-btn").forEach(g=>{g.addEventListener("click",p=>{var E;p.stopPropagation();const x=g.dataset.copy;x&&((E=navigator.clipboard)==null||E.writeText(x).catch(()=>{}))})}),t.addEventListener("click",g=>{g.target===t&&a()});const c=g=>{g.key==="Escape"&&(document.removeEventListener("keydown",c),a())};document.addEventListener("keydown",c)})}}class Ur{constructor(){this._accessToken=null,this._expiresAt=0}set(e){this._accessToken=e;try{const s=JSON.parse(atob(e.split(".")[1]));this._expiresAt=typeof s.exp=="number"?s.exp*1e3:0}catch{this._expiresAt=0}}get(){return this._accessToken&&this._expiresAt>0&&Date.now()>=this._expiresAt?(this.clear(),null):this._accessToken}clear(){this._accessToken=null,this._expiresAt=0}has(){return this.get()!==null}isExpiringSoon(e=3e4){return!this._accessToken||this._expiresAt<=0?!0:Date.now()>=this._expiresAt-e}}function Qi(r,e){r.debug;const s=Ue.production,t={...r,oauthServiceUrl:s.oauthServiceUrl,authApiUrl:s.authApiUrl,walletGatewayUrl:s.walletGatewayUrl},n={gatewayUrl:s.walletGatewayUrl,projectId:r.projectId},o=t.authMode!=="cookie"&&gs.isAvailable();!o&&t.authMode!=="cookie"&&u.warn("[CROSSx] IndexedDB 사용 불가 — LocalStorage fallback 사용 중.","refresh_token이 평문 저장되지 않도록 세션 영속성이 제한됩니다.","IndexedDB를 지원하는 브라우저 사용을 권장합니다."),t.secureStorageAvailable=o;const i=o?new gs(r.projectId):new ln,a=new oi,c=new li,l=new $e,d=new Ur,f=new Et;let g;r.useMockWallet?(u.log("[CROSSx] Mock Wallet Provider 사용"),g=new ui(i,f)):(u.log("[CROSSx] Remote Wallet Provider 사용"),g=new Me(n,i,c,d,f));const p=new st(n,c),x=new Zi(r.theme??"light",r.themeTokens),E=e!=null&&e.wrapConfirmation?e.wrapConfirmation(x):x,S=new ot(t,n,i,a,c,l,g,d,E,p,f);return typeof window<"u"&&(window.__crossxSDK=S),S}function ea(r){const e=ta(r),s=sa(e),t=JSON.parse(s);na(t);const{data:n}=t;return{status:t.status,state:t.state,firebaseToken:n.accessToken,provider:n.provider,email:n.email,providerSub:n.sub,tokenType:n.tokenType,expiresIn:n.expiresIn,raw:t}}function ta(r){if(r.includes("://")&&r.includes("?")){const e=new URL(r),s=e.searchParams.get("crossx_oauth_result");if(s)return s;const t=e.searchParams.get("data");if(t)return t;throw new Error("Deeplink URL에 crossx_oauth_result 또는 data 파라미터가 없습니다")}return r}function sa(r){if(r.startsWith("{"))return r;if(r.startsWith("%7B")||r.startsWith("%7b"))return decodeURIComponent(r);const e=ra(r);return decodeURIComponent(e)}function ra(r){if(typeof atob=="function")return atob(r);if(typeof Buffer<"u")return Buffer.from(r,"base64").toString("utf-8");throw new Error("Base64 디코딩을 지원하는 환경이 아닙니다")}function na(r){if(typeof r!="object"||r===null)throw new Error("Deeplink payload가 유효한 객체가 아닙니다");const e=r;if(typeof e.status!="string")throw new Error("Deeplink payload에 status 필드가 없습니다");if(typeof e.state!="string")throw new Error("Deeplink payload에 state 필드가 없습니다");if(typeof e.data!="object"||e.data===null)throw new Error("Deeplink payload에 data 필드가 없습니다");const s=e.data;if(typeof s.provider!="string")throw new Error("Deeplink data에 provider 필드가 없습니다");if(typeof s.accessToken!="string")throw new Error("Deeplink data에 accessToken 필드가 없습니다")}return j.CONNECT_OTHER_WALLET_DISPLAY_ORDER=ss,j.CROSSxError=_,j.CROSSxEthereumProvider=ns,j.CROSSxSDK=ot,j.ChainId=qr,j.ConnectOtherWalletItem=We,j.ErrorCode=h,j.PinMemoryStore=Et,j.TokenMemoryStore=Ur,j.createCROSSxSDK=Qi,j.getConnectOtherWalletLabel=rs,j.parseOAuthDeeplink=ea,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"}),j}({});
2491
+ </svg>`;function Zi(r,e,s){var o;const t=r.querySelectorAll(".__crossx-pin-input");t.forEach((i,a)=>{i.addEventListener("input",()=>{const c=i.value.replace(/\D/g,"");i.value=c?c[0]:"",c&&a<3&&t[a+1].focus();const l=Array.from(t).map(d=>d.value).join("");l.length===4&&setTimeout(()=>e(l),200)}),i.addEventListener("keydown",c=>{c.key==="Backspace"&&!i.value&&a>0&&(t[a-1].focus(),t[a-1].value=""),c.key==="Escape"&&s()}),i.addEventListener("keypress",c=>{/[0-9]/.test(c.key)||c.preventDefault()}),i.addEventListener("paste",c=>{var f;c.preventDefault();const l=(((f=c.clipboardData)==null?void 0:f.getData("text"))??"").replace(/\D/g,"").slice(0,4);if(!l)return;l.split("").forEach((g,p)=>{t[p]&&(t[p].value=g)});const d=Math.min(l.length,3);t[d].focus(),l.length===4&&setTimeout(()=>e(l),200)})});const n=r.querySelector(".__crossx-pin-inputs");n==null||n.addEventListener("click",i=>{if(!i.target.classList.contains("__crossx-pin-input")){const a=Array.from(t).find(c=>!c.value)??t[t.length-1];a==null||a.focus()}}),(o=t[0])==null||o.focus()}class Qi{constructor(e="light",s){this.theme=e,this.overrides=s,this.tokens=Cr(e,s)}setTheme(e,s){this.theme=e,s!==void 0&&(this.overrides=s),this.tokens=Cr(e,this.overrides)}setMessages(e){this.messages=e}getTheme(){return this.theme}showWalletSelector(e,s,t){return new Promise(n=>{var E;fe();const o=[...e],i=Di(o,this.tokens,t),a=Ye();_e(i);let c=!1;const l=()=>{c||(c=!0,i.remove(),a())},d=S=>{l(),n(S)},f=()=>{l(),n(null)};(()=>{i.querySelectorAll(".__crossx-wallet-item").forEach(S=>{S.addEventListener("click",()=>{const I=S.dataset.walletAddress??"",R=parseInt(S.dataset.walletIndex??"0",10);d({address:I,index:R})})})})();const p=i.querySelector("#__crossx-add-wallet-btn");p&&p.addEventListener("click",async()=>{p.disabled=!0;try{const S=await s();o.push(S);const I=i.querySelector("#__crossx-wallet-list");if(I){const R=document.createElement("button");R.className="__crossx-wallet-item",R.dataset.walletIndex=String(S.index),R.dataset.walletAddress=S.address,R.innerHTML=`<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">Account ${S.index+1}</span><span class="__crossx-wallet-addr">${oe(S.address)}</span></span>`,R.addEventListener("click",()=>d(S)),I.appendChild(R),R.scrollIntoView({behavior:"smooth",block:"nearest"})}}catch{}finally{p.disabled=!1}}),(E=i.querySelector("#__crossx-close-btn"))==null||E.addEventListener("click",f),i.addEventListener("click",S=>{S.target===i&&f()});const x=S=>{S.key==="Escape"&&(document.removeEventListener("keydown",x),f())};document.addEventListener("keydown",x)})}showLoginSelector(e){var t;const s=((t=e==null?void 0:e.connectOtherWallets)==null?void 0:t.filter(n=>Object.values(We).includes(n)&&String(n).trim()!==""))??[];return new Promise(n=>{var g,p,x,E;fe();const o=Hi(this.tokens,s),i=Ye();_e(o);const a=()=>{o.remove(),i()},c=S=>{a(),n({type:"oauth",provider:S})},l=S=>{a(),n({type:"external",walletId:S})},d=()=>{a(),n(null)};(g=o.querySelector("#__crossx-apple-btn"))==null||g.addEventListener("click",()=>c("apple")),(p=o.querySelector("#__crossx-google-btn"))==null||p.addEventListener("click",()=>c("google")),(x=o.querySelector("#__crossx-connect-other-wallet-btn"))==null||x.addEventListener("click",S=>{const R=S.currentTarget.dataset.walletId??"";R&&l(R)}),(E=o.querySelector("#__crossx-close-btn"))==null||E.addEventListener("click",d),o.addEventListener("click",S=>{S.target===o&&d()}),o.querySelectorAll(".__crossx-login-terms-link").forEach(S=>{S.addEventListener("click",I=>I.stopPropagation())});const f=S=>{S.key==="Escape"&&(document.removeEventListener("keydown",f),d())};document.addEventListener("keydown",f)})}showSessionAlert(e){return new Promise(s=>{var d,f,g;fe();const t=this.messages,n=Bi(this.tokens,{title:e.title,message:e.message,email:e.email,accountLabel:(t==null?void 0:t.sessionAlert_accountLabel)??"Account",signOutLabel:(t==null?void 0:t.sessionAlert_signOutButton)??"Sign out",signInAgainLabel:(t==null?void 0:t.sessionAlert_signInAgainButton)??"Sign in again"}),o=Ye();_e(n);let i=!1;const a=()=>{i||(i=!0,n.remove(),o())},c=()=>{a(),s("signout")},l=()=>{a(),s("signin-again")};(d=n.querySelector("#__crossx-session-signout"))==null||d.addEventListener("click",c),(f=n.querySelector("#__crossx-session-signin"))==null||f.addEventListener("click",l),(g=n.querySelector("#__crossx-close-btn"))==null||g.addEventListener("click",c)})}showMigrationFoundPrompt(e){const s=(e==null?void 0:e.allowSkip)??!0;return new Promise(t=>{var a,c,l;fe();const n=Fi(this.tokens,s);_e(n);const o=()=>n.remove(),i=()=>{o(),t("recover")};if((a=n.querySelector("#__crossx-recover-btn"))==null||a.addEventListener("click",i),s){const d=()=>{o(),t("skip")};(c=n.querySelector("#__crossx-skip-btn"))==null||c.addEventListener("click",d),(l=n.querySelector("#__crossx-close-btn"))==null||l.addEventListener("click",d),n.addEventListener("click",g=>{g.target===n&&d()});const f=g=>{g.key==="Escape"&&(document.removeEventListener("keydown",f),d())};document.addEventListener("keydown",f)}})}showPinSetupPrompt(e){return new Promise(s=>{fe();const t=this.messages,n={title:(t==null?void 0:t.pinSetup_title)??"Create PIN",headerSubtitle:(t==null?void 0:t.pinNotice_headerSubtitle)??"Required for transactions, PK/mnemonic export & account deletion.",noticeTitle:(t==null?void 0:t.pinNotice_title)??"PIN Setup Notice",noticeDesc:(t==null?void 0:t.pinNotice_description)??"For your security, this PIN cannot be reset or recovered. Please make sure you remember it or store it in a safe place.",check1:(t==null?void 0:t.pinNotice_check1)??"I understand that losing this PIN will result in permanent loss of access to my wallet and assets.",check2:(t==null?void 0:t.pinNotice_check2)??"I understand that no one, including the support team, can recover or reset this PIN on my behalf.",nextButton:(t==null?void 0:t.pinNotice_nextButton)??"Next",submitButton:(t==null?void 0:t.pinNotice_submitButton)??"I Understand"},o={title:(t==null?void 0:t.pinSetup_title)??"Create PIN",headerSubtitle:(t==null?void 0:t.pinSetup_headerSubtitle)??"This PIN is used to authorize your transactions.",subtitle:(t==null?void 0:t.pinSetup_subtitle)??"Set a 6-digit PIN to authorize transactions.",mismatchError:(t==null?void 0:t.pinSetup_mismatchError)??"PINs do not match. Please try again."},i={title:(t==null?void 0:t.pinSetup_confirmTitle)??"Confirm PIN",headerSubtitle:(t==null?void 0:t.pinSetup_confirmSubtitle)??"Enter your PIN again to confirm."},a=Mr(this.tokens,Vi(n)),c=Ye();_e(a);let l=!1;const d=()=>{l||(l=!0,a.remove(),c())},f=R=>{d(),s(R)},g=()=>{d(),s(null)},p=a.querySelector(".__crossx-card"),x={tooShort:(t==null?void 0:t.pinValidation_tooShort)??"Please enter a 6-digit PIN.",numbersOnly:(t==null?void 0:t.pinValidation_numbersOnly)??"Only numbers (0-9) are allowed.",repeatingDigit:(t==null?void 0:t.pinValidation_repeatingDigit)??"Cannot use the same number 3+ times in a row.",sequential:(t==null?void 0:t.pinValidation_sequential)??"Sequential numbers (e.g., 123456) are not allowed.",alternatingPattern:(t==null?void 0:t.pinValidation_alternatingPattern)??"Repeating patterns (e.g., 121212) are not allowed."},E=R=>{var B;p.innerHTML=es({title:i.title,headerSubtitle:i.headerSubtitle}),(B=p.querySelector("#__crossx-close-btn"))==null||B.addEventListener("click",g),ts(p,M=>{M===R?f(R):S(o.mismatchError)},g)},S=R=>{var B;p.innerHTML=es({title:o.title,headerSubtitle:o.headerSubtitle,subtitle:o.subtitle,errorMessage:R}),(B=p.querySelector("#__crossx-close-btn"))==null||B.addEventListener("click",g),ts(p,M=>{const V=Ji(M,x);V?S(V):E(M)},g)};(()=>{var re;const R=Array.from(p.querySelectorAll(".__crossx-pw-notice-item")),B=p.querySelector("#__crossx-pin-notice-next"),M=new Set;B.removeAttribute("disabled");const V=B.dataset.nextLabel??"Next",G=B.dataset.submitLabel??"I Understand",se=()=>{const U=M.size===R.length;B.classList.toggle("--disabled",!U),B.textContent=U?G:V},F=(U,N)=>{if(M.has(N))return;const $=U.querySelector(`#__crossx-notice-check-${N}`);M.add(N),$.classList.add("--checked"),U.setAttribute("aria-checked","true"),se()},Z=(U,N)=>{if(!M.has(N))return;const $=U.querySelector(`#__crossx-notice-check-${N}`);M.delete(N),$.classList.remove("--checked"),U.setAttribute("aria-checked","false"),se()};R.forEach(U=>{const N=parseInt(U.dataset.checkIndex??"0",10);U.addEventListener("click",()=>{M.has(N)?Z(U,N):F(U,N)}),U.addEventListener("keydown",$=>{($.key===" "||$.key==="Enter")&&($.preventDefault(),M.has(N)?Z(U,N):F(U,N))})}),B.addEventListener("click",()=>{if(M.size===R.length){S(e==null?void 0:e.errorMessage);return}const U=R.find($=>{const m=parseInt($.dataset.checkIndex??"0",10);return!M.has(m)});if(!U)return;const N=parseInt(U.dataset.checkIndex??"0",10);U.scrollIntoView({behavior:"smooth",block:"nearest"}),U.classList.add("--highlight"),setTimeout(()=>{U.classList.remove("--highlight"),F(U,N)},400)}),(re=p.querySelector("#__crossx-close-btn"))==null||re.addEventListener("click",g)})(),a.addEventListener("click",R=>{R.target===a&&g()})})}showPinInputPrompt(e){return new Promise((s,t)=>{var I;fe();const n=this.messages,o=(e==null?void 0:e.verifyMode)===!0,i=o?(n==null?void 0:n.verifyPin_title)??"Verify Your PIN":(n==null?void 0:n.pinInput_title)??"Enter PIN",a=o?(n==null?void 0:n.verifyPin_subtitle)??"Enter your PIN to authorize this transaction.":(n==null?void 0:n.pinInput_subtitle)??"Enter your 6-digit PIN to continue.",c=(n==null?void 0:n.pinLocked_failureWarning)??"Your account will be locked after further failures.",l=Mr(this.tokens,es({title:i,headerSubtitle:a,errorMessage:e==null?void 0:e.errorMessage,warningMessage:c,lockExpiresAt:e==null?void 0:e.lockExpiresAt,attemptCount:e==null?void 0:e.attemptCount,maxAttempts:e==null?void 0:e.maxAttempts})),d=Ye();_e(l);let f=!1;const g=()=>{f||(f=!0,l.remove(),d())},p=R=>{g(),s(R)},x=()=>{g(),s(null)},E=R=>{g(),t(R)},S=l.querySelector(".__crossx-card");(I=S.querySelector("#__crossx-close-btn"))==null||I.addEventListener("click",x),ts(S,p,x,E,e==null?void 0:e.onSubmit,e==null?void 0:e.lockExpiresAt,c),l.addEventListener("click",R=>{R.target===l&&x()})})}showRecoveryPinInputPrompt(e){return new Promise(s=>{var a;fe();const t=Ki(this.tokens,e);_e(t);const n=()=>t.remove(),o=c=>{n(),s(c)},i=()=>{n(),s(null)};Zi(t,o,i),(a=t.querySelector("#__crossx-close-btn"))==null||a.addEventListener("click",i),t.addEventListener("click",c=>{c.target===t&&i()})})}showRecoveryPinLockedPrompt(e,s){return new Promise(t=>{var l;fe();const{overlay:n,startCountdown:o}=qi(this.tokens,e,s);_e(n);const i=()=>{c(),n.remove()},a=()=>{i(),t()},c=o(a);(l=n.querySelector("#__crossx-close-btn"))==null||l.addEventListener("click",a),n.addEventListener("click",d=>{d.target===n&&a()})})}showTransactionComplete(e){return new Promise(s=>{var a,c;fe();const t=ki(e,this.tokens);_e(t);const n=()=>t.remove(),o=()=>{n(),s()};(a=t.querySelector("#__crossx-done-btn"))==null||a.addEventListener("click",o),(c=t.querySelector("#__crossx-close-btn"))==null||c.addEventListener("click",o),t.querySelectorAll(".__crossx-copy-btn").forEach(l=>{l.addEventListener("click",d=>{var g;d.stopPropagation();const f=l.dataset.copy;f&&((g=navigator.clipboard)==null||g.writeText(f).catch(()=>{}))})}),t.addEventListener("click",l=>{l.target===t&&o()});const i=l=>{l.key==="Escape"&&(document.removeEventListener("keydown",i),o())};document.addEventListener("keydown",i)})}showTransactionProgress(e,s){return new Promise(t=>{fe();const n=Oi(e,this.tokens);_e(n);const o=()=>n.remove();let i=!1;const a=()=>{i||(i=!0,o(),t())},c=()=>{var d,f;(d=n.querySelector("#__crossx-done-btn"))==null||d.addEventListener("click",a),(f=n.querySelector("#__crossx-close-btn"))==null||f.addEventListener("click",a),n.addEventListener("click",g=>{g.target===n&&a()});const l=g=>{g.key==="Escape"&&(document.removeEventListener("keydown",l),a())};document.addEventListener("keydown",l)};s.then(l=>{i||(Pi(n,l,this.tokens),c())})})}requestConfirmation(e){return new Promise(s=>{var l,d,f;fe();let t;e.type==="sign-message"?t=Ci(e,this.tokens):e.type==="sign-typed-data"?t=Ni(e,this.tokens):e.type==="sign"?t=Ai(e,this.tokens):t=Ii(e,this.tokens);const n=Ye();_e(t);const o=()=>{t.remove(),n()},i=()=>{o(),s(!0)},a=()=>{o(),s(!1)};(l=t.querySelector("#__crossx-confirm-btn"))==null||l.addEventListener("click",i),(d=t.querySelector("#__crossx-cancel-btn"))==null||d.addEventListener("click",a),(f=t.querySelector("#__crossx-close-btn"))==null||f.addEventListener("click",a),t.querySelectorAll(".__crossx-copy-btn").forEach(g=>{g.addEventListener("click",p=>{var E;p.stopPropagation();const x=g.dataset.copy;x&&((E=navigator.clipboard)==null||E.writeText(x).catch(()=>{}))})}),t.addEventListener("click",g=>{g.target===t&&a()});const c=g=>{g.key==="Escape"&&(document.removeEventListener("keydown",c),a())};document.addEventListener("keydown",c)})}}class Ur{constructor(){this._accessToken=null,this._expiresAt=0}set(e){this._accessToken=e;try{const s=JSON.parse(atob(e.split(".")[1]));this._expiresAt=typeof s.exp=="number"?s.exp*1e3:0}catch{this._expiresAt=0}}get(){return this._accessToken&&this._expiresAt>0&&Date.now()>=this._expiresAt?(this.clear(),null):this._accessToken}clear(){this._accessToken=null,this._expiresAt=0}has(){return this.get()!==null}isExpiringSoon(e=3e4){return!this._accessToken||this._expiresAt<=0?!0:Date.now()>=this._expiresAt-e}}function ea(r,e){r.debug;const s=Ue.production,t={...r,oauthServiceUrl:s.oauthServiceUrl,authApiUrl:s.authApiUrl,walletGatewayUrl:s.walletGatewayUrl},n={gatewayUrl:s.walletGatewayUrl,projectId:r.projectId},o=t.authMode!=="cookie"&&gs.isAvailable();!o&&t.authMode!=="cookie"&&u.warn("[CROSSx] IndexedDB 사용 불가 — LocalStorage fallback 사용 중.","refresh_token이 평문 저장되지 않도록 세션 영속성이 제한됩니다.","IndexedDB를 지원하는 브라우저 사용을 권장합니다."),t.secureStorageAvailable=o;const i=o?new gs(r.projectId):new ln,a=new oi,c=new li,l=new $e,d=new Ur,f=new Et;let g;r.useMockWallet?(u.log("[CROSSx] Mock Wallet Provider 사용"),g=new ui(i,f)):(u.log("[CROSSx] Remote Wallet Provider 사용"),g=new Me(n,i,c,d,f));const p=new st(n,c),x=new Qi(r.theme??"light",r.themeTokens),E=e!=null&&e.wrapConfirmation?e.wrapConfirmation(x):x,S=new ot(t,n,i,a,c,l,g,d,E,p,f);return typeof window<"u"&&(window.__crossxSDK=S),S}function ta(r){const e=sa(r),s=ra(e),t=JSON.parse(s);oa(t);const{data:n}=t;return{status:t.status,state:t.state,firebaseToken:n.accessToken,provider:n.provider,email:n.email,providerSub:n.sub,tokenType:n.tokenType,expiresIn:n.expiresIn,raw:t}}function sa(r){if(r.includes("://")&&r.includes("?")){const e=new URL(r),s=e.searchParams.get("crossx_oauth_result");if(s)return s;const t=e.searchParams.get("data");if(t)return t;throw new Error("Deeplink URL에 crossx_oauth_result 또는 data 파라미터가 없습니다")}return r}function ra(r){if(r.startsWith("{"))return r;if(r.startsWith("%7B")||r.startsWith("%7b"))return decodeURIComponent(r);const e=na(r);return decodeURIComponent(e)}function na(r){if(typeof atob=="function")return atob(r);if(typeof Buffer<"u")return Buffer.from(r,"base64").toString("utf-8");throw new Error("Base64 디코딩을 지원하는 환경이 아닙니다")}function oa(r){if(typeof r!="object"||r===null)throw new Error("Deeplink payload가 유효한 객체가 아닙니다");const e=r;if(typeof e.status!="string")throw new Error("Deeplink payload에 status 필드가 없습니다");if(typeof e.state!="string")throw new Error("Deeplink payload에 state 필드가 없습니다");if(typeof e.data!="object"||e.data===null)throw new Error("Deeplink payload에 data 필드가 없습니다");const s=e.data;if(typeof s.provider!="string")throw new Error("Deeplink data에 provider 필드가 없습니다");if(typeof s.accessToken!="string")throw new Error("Deeplink data에 accessToken 필드가 없습니다")}return j.CONNECT_OTHER_WALLET_DISPLAY_ORDER=ss,j.CROSSxError=_,j.CROSSxEthereumProvider=ns,j.CROSSxSDK=ot,j.ChainId=qr,j.ConnectOtherWalletItem=We,j.ErrorCode=h,j.PinMemoryStore=Et,j.TokenMemoryStore=Ur,j.createCROSSxSDK=ea,j.getConnectOtherWalletLabel=rs,j.parseOAuthDeeplink=ta,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"}),j}({});