Created
October 9, 2024 11:11
-
-
Save dalechyn/8775d3f26a7b6b7fe4f44adee8885bee to your computer and use it in GitHub Desktop.
asdasd
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| jsxs as e, | |
| jsx as t, | |
| Fragment as r | |
| } from "react/jsx-runtime"; | |
| import { | |
| getAddress as n | |
| } from "@ethersproject/address"; | |
| import { | |
| Web3Provider as i | |
| } from "@ethersproject/providers"; | |
| import { | |
| createStore as a | |
| } from "mipd"; | |
| import o, { | |
| useRef as l, | |
| useState as s, | |
| useMemo as d, | |
| useContext as c, | |
| createContext as h, | |
| useEffect as p, | |
| useCallback as m, | |
| useReducer as f, | |
| forwardRef as y | |
| } from "react"; | |
| import * | |
| as w from "react-device-detect"; | |
| import { | |
| isMobile as v, | |
| isIOS as C, | |
| isSafari as b, | |
| isAndroid as E | |
| } from "react-device-detect"; | |
| import { | |
| P as $, | |
| f as x, | |
| a as A, | |
| b as k, | |
| n as T, | |
| c as _, | |
| d as S, | |
| e as N, | |
| g as I, | |
| u as P, | |
| h as O, | |
| i as R, | |
| j as M, | |
| k as L, | |
| l as D, | |
| m as F, | |
| I as U | |
| } from "./privy-context.mjs"; | |
| import * as W from "jose"; | |
| import { | |
| base64url as B | |
| } from "jose"; | |
| import { | |
| g as G, | |
| C as H, | |
| H as z, | |
| O as j, | |
| S as q, | |
| D as V, | |
| a as K, | |
| b as Q, | |
| c as J, | |
| d as ee, | |
| V as te, | |
| T as re, | |
| R as ne, | |
| F as ie, | |
| e as ae, | |
| f as oe, | |
| h as le, | |
| i as se, | |
| j as de, | |
| I as ce, | |
| k as ue, | |
| l as he, | |
| m as pe, | |
| n as me, | |
| u as fe, | |
| o as ge, | |
| p as ye, | |
| W as we, | |
| q as ve, | |
| r as Ce, | |
| s as be, | |
| t as Ee, | |
| v as $e, | |
| w as xe, | |
| x as Ae, | |
| y as ke, | |
| z as Te, | |
| A as _e, | |
| B as Se, | |
| E as Ne, | |
| G as Ie, | |
| M as Pe, | |
| J as Oe, | |
| K as Re, | |
| L as Me, | |
| N as Le, | |
| P as De, | |
| Q as Fe, | |
| U as Ue, | |
| X as We, | |
| Y as Be, | |
| Z as Ge, | |
| _ as He, | |
| $ as ze | |
| } from "./useWallets.mjs"; | |
| export { | |
| a0 as SUPPORTED_CHAINS, | |
| a2 as addPrivyRpcToChain, | |
| a1 as addRpcUrlOverrideToChain | |
| } | |
| from "./useWallets.mjs"; | |
| import { | |
| t as je, | |
| r as qe, | |
| i as Ve, | |
| e as Ke, | |
| a as Ye, | |
| p as Ze, | |
| g as Xe, | |
| b as Qe, | |
| c as Je, | |
| f as et, | |
| d as tt, | |
| s as rt, | |
| h as nt, | |
| j as it, | |
| k as at, | |
| u as ot, | |
| A as lt, | |
| B as st, | |
| M as dt, | |
| l as ct, | |
| m as ut, | |
| C as ht, | |
| n as pt, | |
| T as mt, | |
| o as ft, | |
| q as gt, | |
| W as yt, | |
| v as wt, | |
| w as vt, | |
| x as Ct, | |
| y as bt, | |
| z as Et, | |
| L as $t, | |
| D as xt, | |
| E as At, | |
| F as kt, | |
| G as Tt, | |
| H as _t, | |
| I as St, | |
| J as Nt, | |
| K as It, | |
| N as Pt, | |
| O as Ot, | |
| P as Rt, | |
| Q as Mt, | |
| R as Lt, | |
| S as Dt, | |
| U as Ft, | |
| V as Ut | |
| } from "./useFundWallet.mjs"; | |
| export { | |
| Y as useConnectWallet, | |
| Z as useFundWallet, X as useLogin | |
| } | |
| from "./useFundWallet.mjs"; | |
| import { | |
| v4 as Wt | |
| } from "uuid"; | |
| import { | |
| c as Bt, | |
| s as Gt, | |
| g as Ht, | |
| a as zt, | |
| b as jt, | |
| d as qt, | |
| e as Vt | |
| } from "./user.mjs"; | |
| import { | |
| isHexString as Kt | |
| } from "@ethersproject/bytes"; | |
| import Yt from "eventemitter3"; | |
| import { | |
| CoinbaseWalletSDK as Zt | |
| } from "@coinbase/wallet-sdk"; | |
| import { | |
| l as Xt, | |
| f as Qt, | |
| W as Jt, | |
| a as er, | |
| U as tr, | |
| i as rr, | |
| C as nr, | |
| P as ir, | |
| b as ar, | |
| E as or, | |
| c as lr | |
| } from "./useSolanaWallets.mjs"; | |
| export { | |
| u as useSolanaWallets | |
| } | |
| from "./useSolanaWallets.mjs"; | |
| import { | |
| EthereumProvider as sr, | |
| OPTIONAL_EVENTS as dr, | |
| OPTIONAL_METHODS as cr | |
| } from "@walletconnect/ethereum-provider"; | |
| import { | |
| u as ur, | |
| M as hr, | |
| a as pr | |
| } from "./getEmbeddedConnectedWallet.mjs"; | |
| export { | |
| g as getEmbeddedConnectedWallet | |
| } | |
| from "./getEmbeddedConnectedWallet.mjs"; | |
| import { | |
| ofetch as mr | |
| } from "ofetch"; | |
| import fr from "js-cookie"; | |
| import { | |
| Turnstile as gr | |
| } from "@marsidev/react-turnstile"; | |
| import { | |
| styled as yr, | |
| css as wr, | |
| keyframes as vr, | |
| createGlobalStyle as Cr | |
| } from "styled-components"; | |
| import br from "@heroicons/react/24/outline/QuestionMarkCircleIcon"; | |
| import Er from "@heroicons/react/24/outline/ArrowLeftIcon"; | |
| import $r from "@heroicons/react/24/outline/ArrowRightIcon"; | |
| import xr from "@heroicons/react/24/outline/XMarkIcon"; | |
| import Ar from "@heroicons/react/24/outline/ExclamationTriangleIcon"; | |
| import kr from "@heroicons/react/24/outline/WalletIcon"; | |
| import { | |
| ExclamationCircleIcon as Tr, | |
| Square2StackIcon as _r, | |
| WalletIcon as Sr, | |
| CheckCircleIcon as Nr, | |
| ExclamationTriangleIcon as Ir, | |
| ChevronDownIcon as Pr | |
| } from "@heroicons/react/24/outline"; | |
| import Or from "@heroicons/react/24/outline/ArrowTopRightOnSquareIcon"; | |
| import Rr from "@heroicons/react/24/solid/DocumentCheckIcon"; | |
| import Mr from "@heroicons/react/20/solid/CheckIcon"; | |
| import Lr from "@heroicons/react/24/outline/EnvelopeIcon"; | |
| import Dr from "@heroicons/react/24/outline/PhoneIcon"; | |
| import Fr from "@heroicons/react/24/solid/CheckCircleIcon"; | |
| import Ur from "@heroicons/react/24/solid/XCircleIcon"; | |
| import Wr from "fast-password-entropy"; | |
| import * | |
| as Br from "secure-password-utilities"; | |
| import { | |
| DEFAULT_WORDLIST as Gr | |
| } from "secure-password-utilities/wordlists"; | |
| import Hr from "@heroicons/react/24/outline/ArrowPathIcon"; | |
| import zr from "@heroicons/react/24/outline/EyeIcon"; | |
| import jr from "@heroicons/react/24/outline/EyeSlashIcon"; | |
| import qr from "@heroicons/react/24/outline/KeyIcon"; | |
| import Vr from "@heroicons/react/24/outline/ArrowDownTrayIcon"; | |
| import Kr from "@heroicons/react/24/outline/ClipboardDocumentCheckIcon"; | |
| import Yr from "@heroicons/react/24/outline/DocumentDuplicateIcon"; | |
| import Zr from "@heroicons/react/24/outline/UserCircleIcon"; | |
| import Xr from "@heroicons/react/24/solid/LockClosedIcon"; | |
| import Qr from "qrcode"; | |
| import Jr from "@heroicons/react/24/outline/CheckCircleIcon"; | |
| import { | |
| createPublicClient as en, | |
| http as tn, | |
| parseEther as rn, | |
| createWalletClient as nn, | |
| custom as an, | |
| publicActions as on, | |
| encodeFunctionData as ln, | |
| decodeFunctionData as sn | |
| } from "viem"; | |
| import dn from "@heroicons/react/24/outline/GlobeAltIcon"; | |
| import { | |
| Menu as cn, | |
| Transition as un, | |
| Dialog as hn | |
| } from "@headlessui/react"; | |
| import pn from "@heroicons/react/24/outline/ClockIcon"; | |
| import mn from "@heroicons/react/24/outline/TrashIcon"; | |
| import fn from "@heroicons/react/24/solid/CheckBadgeIcon"; | |
| import gn from "@heroicons/react/24/solid/ArrowsRightLeftIcon"; | |
| import yn from "@heroicons/react/24/outline/PencilIcon"; | |
| import { | |
| parseUnits as wn, | |
| formatUnits as vn | |
| } from "@ethersproject/units"; | |
| import Cn from "@heroicons/react/24/outline/InformationCircleIcon"; | |
| import bn from "@heroicons/react/24/outline/QrCodeIcon"; | |
| import En from "@heroicons/react/24/outline/LinkIcon"; | |
| import $n from "@heroicons/react/24/outline/ChevronRightIcon"; | |
| import xn from "@heroicons/react/24/solid/DevicePhoneMobileIcon"; | |
| import An from "@heroicons/react/24/solid/IdentificationIcon"; | |
| import kn from "@heroicons/react/24/solid/PhoneIcon"; | |
| import Tn from "@heroicons/react/24/solid/QuestionMarkCircleIcon"; | |
| import _n from "@heroicons/react/24/solid/ShieldCheckIcon"; | |
| import Sn from "@heroicons/react/24/outline/DevicePhoneMobileIcon"; | |
| import Nn from "@heroicons/react/24/outline/FingerPrintIcon"; | |
| import In from "@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon"; | |
| import Pn from "@heroicons/react/24/outline/ShieldCheckIcon"; | |
| import { | |
| VoidSigner as On | |
| } from "@ethersproject/abstract-signer"; | |
| import { | |
| BigNumber as Rn | |
| } from "@ethersproject/bignumber"; | |
| import { | |
| Contract as Mn | |
| } from "@ethersproject/contracts"; | |
| import { | |
| serialize as Ln | |
| } from "@ethersproject/transactions"; | |
| import Dn from "fetch-retry"; | |
| import Fn from "@heroicons/react/24/outline/ChevronDownIcon"; | |
| import Un from "@heroicons/react/24/outline/CalendarIcon"; | |
| import Wn from "@heroicons/react/24/outline/LockClosedIcon"; | |
| import Bn from "@heroicons/react/24/outline/PencilSquareIcon"; | |
| import { | |
| isVersionedTransaction as Gn | |
| } from "@solana/wallet-adapter-base"; | |
| import Hn from "@heroicons/react/24/outline/ClipboardDocumentIcon"; | |
| import zn from "@heroicons/react/24/outline/ExclamationCircleIcon"; | |
| import { | |
| ErrorCode as jn | |
| } from "@ethersproject/logger"; | |
| import { | |
| toUtf8String as qn | |
| } from "@ethersproject/strings"; | |
| import "tinycolor2"; | |
| import "@heroicons/react/24/outline/Square2StackIcon"; | |
| let Vn = { | |
| id: 42161, | |
| name: "Arbitrum One", | |
| network: "arbitrum", | |
| nativeCurrency: { | |
| name: "Ether", | |
| symbol: "ETH", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| privy: { | |
| http: [ | |
| "https://arbitrum-mainnet.rpc.privy.systems"] | |
| }, | |
| alchemy: { | |
| http: [ | |
| "https://arb-mainnet.g.alchemy.com/v2"], | |
| webSocket: [ | |
| "wss://arb-mainnet.g.alchemy.com/v2" | |
| ] | |
| }, | |
| infura: { | |
| http: [ | |
| "https://arbitrum-mainnet.infura.io/v3"], | |
| webSocket: [ | |
| "wss://arbitrum-mainnet.infura.io/ws/v3" | |
| ] | |
| }, | |
| default: { | |
| http: [ | |
| "https://arb1.arbitrum.io/rpc"] | |
| }, | |
| public: { | |
| http: [ | |
| "https://arb1.arbitrum.io/rpc"] | |
| } | |
| }, | |
| blockExplorers: { | |
| etherscan: { | |
| name: "Arbiscan", | |
| url: "https://arbiscan.io" | |
| }, | |
| default: { | |
| name: "Arbiscan", | |
| url: "https://arbiscan.io" | |
| } | |
| } | |
| }, | |
| Kn = { | |
| id: 421613, | |
| name: "Arbitrum Goerli", | |
| network: "arbitrum-goerli", | |
| nativeCurrency: { | |
| name: "Goerli Ether", | |
| symbol: "AGOR", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| default: { | |
| http: [ | |
| "https://goerli-rollup.arbitrum.io/rpc"] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "Arbiscan", | |
| url: "https://goerli.arbiscan.io/" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| Yn = { | |
| id: 421614, | |
| name: "Arbitrum Sepolia", | |
| network: "arbitrum-sepolia", | |
| nativeCurrency: { | |
| name: "Arbitrum Sepolia Ether", | |
| symbol: "ETH", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| privy: { | |
| http: [ | |
| "https://arbitrum-sepolia.rpc.privy.systems"] | |
| }, | |
| default: { | |
| http: [ | |
| "https://sepolia-rollup.arbitrum.io/rpc"] | |
| }, | |
| public: { | |
| http: [ | |
| "https://sepolia-rollup.arbitrum.io/rpc"] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "Blockscout", | |
| url: "https://sepolia-explorer.arbitrum.io" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| Zn = { | |
| id: 8453, | |
| network: "base", | |
| name: "Base", | |
| nativeCurrency: { | |
| name: "Ether", | |
| symbol: "ETH", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| privy: { | |
| http: [ | |
| "https://base-mainnet.rpc.privy.systems"] | |
| }, | |
| blast: { | |
| http: [ | |
| "https://base-mainnet.blastapi.io"], | |
| webSocket: [ | |
| "wss://base-mainnet.blastapi.io" | |
| ] | |
| }, | |
| default: { | |
| http: [ | |
| "https://mainnet.base.org"] | |
| }, | |
| public: { | |
| http: [ | |
| "https://mainnet.base.org"] | |
| } | |
| }, | |
| blockExplorers: { | |
| etherscan: { | |
| name: "Basescan", | |
| url: "https://basescan.org" | |
| }, | |
| default: { | |
| name: "Basescan", | |
| url: "https://basescan.org" | |
| } | |
| } | |
| }, | |
| Xn = { | |
| id: 84531, | |
| network: "base-goerli", | |
| name: "Base Goerli Testnet", | |
| nativeCurrency: { | |
| name: "Goerli Ether", | |
| symbol: "ETH", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| default: { | |
| http: [ | |
| "https://goerli.base.org"] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "Basescan", | |
| url: "https://goerli.basescan.org" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| Qn = { | |
| id: 84532, | |
| network: "base-sepolia", | |
| name: "Base Sepolia", | |
| nativeCurrency: { | |
| name: "Sepolia Ether", | |
| symbol: "ETH", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| privy: { | |
| http: [ | |
| "https://base-sepolia.rpc.privy.systems"] | |
| }, | |
| default: { | |
| http: [ | |
| "https://sepolia.base.org"] | |
| }, | |
| public: { | |
| http: [ | |
| "https://sepolia.base.org"] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "Blockscout", | |
| url: "https://base-sepolia.blockscout.com" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| Jn = { | |
| id: 10, | |
| name: "OP Mainnet", | |
| network: "optimism", | |
| nativeCurrency: { | |
| name: "Ether", | |
| symbol: "ETH", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| privy: { | |
| http: [ | |
| "https://optimism-mainnet.rpc.privy.systems"] | |
| }, | |
| alchemy: { | |
| http: [ | |
| "https://opt-mainnet.g.alchemy.com/v2"], | |
| webSocket: [ | |
| "wss://opt-mainnet.g.alchemy.com/v2" | |
| ] | |
| }, | |
| infura: { | |
| http: [ | |
| "https://optimism-mainnet.infura.io/v3"], | |
| webSocket: [ | |
| "wss://optimism-mainnet.infura.io/ws/v3" | |
| ] | |
| }, | |
| default: { | |
| http: [ | |
| "https://mainnet.optimism.io"] | |
| }, | |
| public: { | |
| http: [ | |
| "https://mainnet.optimism.io"] | |
| } | |
| }, | |
| blockExplorers: { | |
| etherscan: { | |
| name: "Etherscan", | |
| url: "https://optimistic.etherscan.io" | |
| }, | |
| default: { | |
| name: "Optimism Explorer", | |
| url: "https://explorer.optimism.io" | |
| } | |
| } | |
| }, | |
| ei = { | |
| id: 420, | |
| name: "Optimism Goerli Testnet", | |
| network: "optimism-goerli", | |
| nativeCurrency: { | |
| name: "Goerli Ether", | |
| symbol: "ETH", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| default: { | |
| http: [ | |
| "https://goerli.optimism.io"] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "Etherscan", | |
| url: "https://goerli-optimism.etherscan.io" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| ti = { | |
| id: 11155420, | |
| name: "Optimism Sepolia", | |
| network: "optimism-sepolia", | |
| nativeCurrency: { | |
| name: "Sepolia Ether", | |
| symbol: "ETH", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| privy: { | |
| http: [ | |
| "https://optimism-sepolia.rpc.privy.systems"] | |
| }, | |
| default: { | |
| http: [ | |
| "https://sepolia.optimism.io"] | |
| }, | |
| public: { | |
| http: [ | |
| "https://sepolia.optimism.io"] | |
| }, | |
| infura: { | |
| http: [ | |
| "https://optimism-sepolia.infura.io/v3"] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "Blockscout", | |
| url: "https://optimism-sepolia.blockscout.com" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| ri = { | |
| id: 137, | |
| name: "Polygon Mainnet", | |
| network: "polygon", | |
| nativeCurrency: { | |
| name: "POL", | |
| symbol: "POL", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| privy: { | |
| http: [ | |
| "https://polygon-mainnet.rpc.privy.systems"] | |
| }, | |
| alchemy: { | |
| http: [ | |
| "https://polygon-mainnet.g.alchemy.com/v2"], | |
| webSocket: [ | |
| "wss://polygon-mainnet.g.alchemy.com/v2" | |
| ] | |
| }, | |
| infura: { | |
| http: [ | |
| "https://polygon-mainnet.infura.io/v3"], | |
| webSocket: [ | |
| "wss://polygon-mainnet.infura.io/ws/v3" | |
| ] | |
| }, | |
| default: { | |
| http: [ | |
| "https://polygon-rpc.com"] | |
| }, | |
| public: { | |
| http: [ | |
| "https://polygon-rpc.com"] | |
| } | |
| }, | |
| blockExplorers: { | |
| etherscan: { | |
| name: "PolygonScan", | |
| url: "https://polygonscan.com" | |
| }, | |
| default: { | |
| name: "PolygonScan", | |
| url: "https://polygonscan.com" | |
| } | |
| } | |
| }, | |
| ni = { | |
| id: 80001, | |
| name: "Mumbai", | |
| network: "maticmum", | |
| nativeCurrency: { | |
| name: "MATIC", | |
| symbol: "MATIC", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| default: { | |
| http: [ | |
| "https://matic-mumbai.chainstacklabs.com"] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "PolygonScan", | |
| url: "https://mumbai.polygonscan.com" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| ii = { | |
| id: 7777777, | |
| name: "Zora", | |
| network: "zora", | |
| nativeCurrency: { | |
| decimals: 18, | |
| name: "Ether", | |
| symbol: "ETH" | |
| }, | |
| rpcUrls: { | |
| default: { | |
| http: [ | |
| "https://rpc.zora.energy"], | |
| webSocket: [ | |
| "wss://rpc.zora.energy" | |
| ] | |
| }, | |
| public: { | |
| http: [ | |
| "https://rpc.zora.energy"], | |
| webSocket: [ | |
| "wss://rpc.zora.energy" | |
| ] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "Explorer", | |
| url: "https://explorer.zora.energy" | |
| } | |
| } | |
| }, | |
| ai = { | |
| id: 999999999, | |
| name: "Zora Sepolia", | |
| network: "zora-sepolia", | |
| nativeCurrency: { | |
| decimals: 18, | |
| name: "Zora Sepolia", | |
| symbol: "ETH" | |
| }, | |
| rpcUrls: { | |
| default: { | |
| http: [ | |
| "https://sepolia.rpc.zora.energy"], | |
| webSocket: [ | |
| "wss://sepolia.rpc.zora.energy" | |
| ] | |
| }, | |
| public: { | |
| http: [ | |
| "https://sepolia.rpc.zora.energy"], | |
| webSocket: [ | |
| "wss://sepolia.rpc.zora.energy" | |
| ] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "Zora Sepolia Explorer", | |
| url: "https://sepolia.explorer.zora.energy/" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| oi = { | |
| id: 999, | |
| name: "Zora Goerli Testnet", | |
| network: "zora-testnet", | |
| nativeCurrency: { | |
| decimals: 18, | |
| name: "Zora Goerli", | |
| symbol: "ETH" | |
| }, | |
| rpcUrls: { | |
| default: { | |
| http: [ | |
| "https://testnet.rpc.zora.energy"], | |
| webSocket: [ | |
| "wss://testnet.rpc.zora.energy" | |
| ] | |
| }, | |
| public: { | |
| http: [ | |
| "https://testnet.rpc.zora.energy"], | |
| webSocket: [ | |
| "wss://testnet.rpc.zora.energy" | |
| ] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "Explorer", | |
| url: "https://testnet.explorer.zora.energy" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| li = e => [Vn.id, Kn.id, Yn.id] | |
| .includes(e), | |
| si = e => [56, 97].includes(e), | |
| di = | |
| "0x420000000000000000000000000000000000000F", | |
| ci = [ | |
| "function getL1Fee(bytes memory _data) external view returns (uint256)" | |
| ], | |
| ui = e => [Zn.id, Xn.id, Qn.id, Jn | |
| .id, ei.id, ti.id, ii.id, oi.id, | |
| ai.id, 81457, 168587773 | |
| ].includes(e); | |
| let hi = { | |
| id: 80002, | |
| name: "Polygon Amoy", | |
| network: "polygon-amoy", | |
| nativeCurrency: { | |
| name: "POL", | |
| symbol: "POL", | |
| decimals: 18 | |
| }, | |
| rpcUrls: { | |
| privy: { | |
| http: [ | |
| "https://polygon-amoy.rpc.privy.systems"] | |
| }, | |
| infura: { | |
| http: [ | |
| "https://polygon-amoy.infura.io/v3"], | |
| webSocket: [ | |
| "wss://polygon-amoy.infura.io/ws/v3" | |
| ] | |
| }, | |
| default: { | |
| http: [ | |
| "https://rpc-amoy.polygon.technology"] | |
| } | |
| }, | |
| blockExplorers: { | |
| default: { | |
| name: "OK LINK", | |
| url: "https://www.oklink.com/amoy" | |
| } | |
| }, | |
| testnet: !0 | |
| }, | |
| pi = Dn(fetch, { | |
| retries: 3, | |
| retryDelay: 500 | |
| }), | |
| mi = e => [ri.id, ni.id, hi.id] | |
| .includes(e), | |
| fi = e => ({ | |
| maxPriorityFee: wn(e | |
| .maxPriorityFee | |
| .toFixed(9), "gwei") | |
| .toHexString(), | |
| maxFee: wn(e.maxFee.toFixed( | |
| 9), "gwei") | |
| .toHexString() | |
| }), | |
| gi = async e => { | |
| let t = ""; | |
| switch (e) { | |
| case ri.id: | |
| t = | |
| "https://gasstation.polygon.technology/v2"; | |
| break; | |
| case ni.id: | |
| t = | |
| "https://gasstation-testnet.polygon.technology/v2"; | |
| break; | |
| case hi.id: | |
| t = | |
| "https://gasstation.polygon.technology/amoy"; | |
| break; | |
| default: | |
| throw Error( | |
| `chainId ${e} does not support polygon gas stations` | |
| ) | |
| } | |
| let r = await pi(t), | |
| n = await r.json(); | |
| if (r.status > 399) throw n; | |
| return { | |
| safeLow: fi(n.safeLow), | |
| standard: fi(n | |
| .standard), | |
| fast: fi(n.fast) | |
| } | |
| }; | |
| async function yi(e, t) { | |
| if (!e.gasLimit) throw new Xt( | |
| "gasLimit was not successfully set for transaction." | |
| ); | |
| let r = Ve(e.gasLimit), | |
| n = Rn.from(0); | |
| if (2 == e.type) { | |
| if (!e.maxFeePerGas) | |
| throw new Xt( | |
| "maxFeePerGas was not successfully set for transaction of type 2." | |
| ); | |
| n = Ve(e.maxFeePerGas) | |
| } else { | |
| if (!e.gasPrice) | |
| throw new Xt( | |
| "gasPrice was not successfully set for transaction of type 0 or 1." | |
| ); | |
| n = Ve(e.gasPrice) | |
| } | |
| let i = r.mul(n), | |
| a = Rn.from(0); | |
| if (e.chainId && ui(e.chainId)) | |
| try { | |
| a = await async function( | |
| e, t) { | |
| if (!e | |
| .chainId || | |
| e | |
| .chainId && | |
| !ui(e | |
| .chainId | |
| )) | |
| return Rn | |
| .from( | |
| 0 | |
| ); | |
| let r = Rn | |
| .from( | |
| 0); | |
| try { | |
| let n = | |
| new Mn( | |
| di, | |
| ci, | |
| t | |
| ), | |
| i = | |
| qe( | |
| e), | |
| a = | |
| Ln( | |
| i); | |
| r = await n | |
| .getL1Fee( | |
| a | |
| ) | |
| } catch ( | |
| e) {} | |
| return r | |
| }(e, t), i = i | |
| .add(a) | |
| } catch (e) {} | |
| return { | |
| totalGasEstimate: i, | |
| l1ExecutionFeeEstimate: a | |
| } | |
| } | |
| function wi(e) { | |
| return /^-?0x[a-f0-9]+$/i.test(e) | |
| } | |
| async function vi(e, t, r) { | |
| if (t.chainId = Number(t | |
| .chainId), function(e) { | |
| for (let t of [ | |
| "gasLimit", | |
| "gasPrice", | |
| "value", | |
| "maxPriorityFeePerGas", | |
| "maxFeePerGas" | |
| ]) { | |
| let r = e[t]; | |
| if (void 0 !== r && | |
| ! function(e) { | |
| let t = | |
| "number" == | |
| typeof e, | |
| r = | |
| "bigint" == | |
| typeof e, | |
| n = | |
| "string" == | |
| typeof e && | |
| wi(e); | |
| return t || | |
| r || n | |
| }(r)) | |
| throw Error( | |
| `Transaction request property '${t}' must be a valid number, bigint, or hex string representing a quantity` | |
| ) | |
| } | |
| if ("number" != typeof e | |
| .chainId) | |
| throw Error( | |
| "Transaction request property 'chainId' must be a number" | |
| ) | |
| }(t), t.from || (t.from = | |
| e), !t.nonce) { | |
| let n = new On(e, r); | |
| t.nonce = await n | |
| .getTransactionCount( | |
| "pending") | |
| } | |
| return t.gasLimit || (t.gas ? (t | |
| .gasLimit = t.gas, | |
| delete t.gas) : t | |
| .gasLimit = | |
| await async function(e, | |
| t) { | |
| try { | |
| return (await t | |
| .estimateGas( | |
| e | |
| ) | |
| ) | |
| .toHexString() | |
| } catch (r) { | |
| let n; | |
| if ("message" in | |
| r && r | |
| .message | |
| .includes( | |
| "insufficient funds" | |
| ) && | |
| (console | |
| .warn( | |
| `Gas estimation failed with error: ${r}. Retrying gas estimation by omitting the 'value'` | |
| ), | |
| n = | |
| await async function({ | |
| txRequest: e, | |
| provider: t | |
| }) { | |
| try { | |
| let r = { | |
| ... | |
| e, | |
| value: void 0 | |
| }; | |
| return (await t | |
| .estimateGas( | |
| r | |
| ) | |
| ) | |
| .toHexString() | |
| } catch ( | |
| e | |
| ) { | |
| return console | |
| .warn( | |
| `Gas estimation failed with error: ${e} when omitting the 'value'` | |
| ), | |
| null | |
| } | |
| } | |
| ({ | |
| txRequest: e, | |
| provider: t | |
| })), | |
| n || ( | |
| console | |
| .warn( | |
| `Gas estimation failed with error: ${r}. Retrying gas estimation by omitting the 'from'` | |
| ), | |
| n = | |
| await async function({ | |
| txRequest: e, | |
| provider: t | |
| }) { | |
| try { | |
| let r = { | |
| ... | |
| e, | |
| from: void 0 | |
| }; | |
| return (await t | |
| .estimateGas( | |
| r | |
| ) | |
| ) | |
| .toHexString() | |
| } catch ( | |
| e | |
| ) { | |
| return console | |
| .warn( | |
| `Gas estimation failed with error: ${e} when omitting the 'from' address` | |
| ), | |
| null | |
| } | |
| } | |
| ({ | |
| txRequest: e, | |
| provider: t | |
| })), | |
| !n) | |
| throw r; | |
| return n | |
| } | |
| }(t, r)), | |
| "string" == typeof t.type && | |
| wi(t.type) && (t.type = | |
| Number(t.type)), [23294, | |
| 23295 | |
| ].includes(t.chainId) && (t | |
| .type = 0), 0 === (t = | |
| mi(t.chainId) ? | |
| await async function( | |
| e) { | |
| if (!mi(e | |
| .chainId | |
| )) | |
| throw Error( | |
| "Invalid chain ID for Polygon gas estimation." | |
| ); | |
| if (void 0 === e | |
| .type && (e | |
| .type = | |
| 2), e | |
| .maxPriorityFeePerGas && | |
| e | |
| .maxFeePerGas | |
| ) return e; | |
| try { | |
| let { | |
| standard: t | |
| } = await gi | |
| (e | |
| .chainId); | |
| e.maxPriorityFeePerGas || | |
| (e.maxPriorityFeePerGas = | |
| t | |
| .maxPriorityFee | |
| ), e | |
| .maxFeePerGas || | |
| (e.maxFeePerGas = | |
| t | |
| .maxFee | |
| ), e | |
| .gasPrice && | |
| (console | |
| .warn( | |
| "`gasPrice` is not supported on this chain and will be ignored. Use `maxPriorityFeePerGas` and/or `maxFeePerGas` instead." | |
| ), | |
| delete e | |
| .gasPrice | |
| ) | |
| } catch (e) { | |
| throw Error( | |
| `Failed to set gas prices from Polygon gas station with error: ${e}.` | |
| ) | |
| } | |
| return e | |
| }(t): li(t | |
| .chainId) ? await ( | |
| async (e, | |
| t) => { | |
| if (!li(e | |
| .chainId | |
| )) | |
| throw Error( | |
| "Invalid chain ID for Arbitrum gas estimation." | |
| ); | |
| if (void 0 === | |
| e | |
| .type && | |
| (e.type = | |
| 2 | |
| ), | |
| e | |
| .maxFeePerGas | |
| ) | |
| return e; | |
| try { | |
| let { | |
| lastBaseFeePerGas: r | |
| } = | |
| await t | |
| .getFeeData(); | |
| if ( | |
| r) { | |
| let t = | |
| r | |
| .mul( | |
| Rn | |
| .from( | |
| 120 | |
| ) | |
| ) | |
| .div( | |
| Rn | |
| .from( | |
| 100 | |
| ) | |
| ); | |
| e.maxFeePerGas = | |
| je( | |
| t), | |
| e | |
| .maxPriorityFeePerGas = | |
| je(Rn | |
| .from( | |
| 0 | |
| ) | |
| ) | |
| } | |
| } catch ( | |
| e) { | |
| throw Error( | |
| `Failed to set gas price for Arbitrum transaction: ${e}.` | |
| ) | |
| } | |
| return e | |
| })(t, r) : ui(t | |
| .chainId) ? | |
| await (async (e, | |
| t) => { | |
| if (!ui(e | |
| .chainId | |
| )) | |
| throw Error( | |
| "Invalid chain ID for OP Stack gas estimation." | |
| ); | |
| if (void 0 === | |
| e | |
| .type && | |
| (e.type = | |
| 2 | |
| ), | |
| e | |
| .gasPrice && | |
| (console | |
| .warn( | |
| "`gasPrice` is not supported on this chain and will be ignored. Use `maxPriorityFeePerGas` and/or `maxFeePerGas` instead." | |
| ), | |
| delete e | |
| .gasPrice | |
| ), | |
| e | |
| .maxPriorityFeePerGas && | |
| e | |
| .maxFeePerGas | |
| ) | |
| return e; | |
| try { | |
| if (! | |
| e | |
| .maxPriorityFeePerGas | |
| ) { | |
| let r = | |
| await t | |
| .send( | |
| "eth_maxPriorityFeePerGas", | |
| [] | |
| ); | |
| e.maxPriorityFeePerGas = | |
| r | |
| } | |
| if (e | |
| .maxFeePerGas && | |
| (console | |
| .warn( | |
| "maxFeePerGas is specified without maxPriorityFeePerGas - this can result in hung transactions." | |
| ), | |
| e | |
| .maxPriorityFeePerGas >= | |
| e | |
| .maxFeePerGas | |
| ) | |
| ) | |
| throw Error( | |
| "Overridden maxFeePerGas is less than or equal to the calculated maxPriorityFeePerGas. Please set both values or maxPriorityFeePerGas alone for correct gas estimation." | |
| ); | |
| if (! | |
| e | |
| .maxFeePerGas | |
| ) { | |
| let { | |
| lastBaseFeePerGas: r | |
| } = | |
| await t | |
| .getFeeData(); | |
| if (! | |
| r | |
| ) | |
| throw Error( | |
| "Unable to fetch baseFee for last block." | |
| ); | |
| let n = | |
| Rn | |
| .from( | |
| r | |
| ) | |
| .mul( | |
| Rn | |
| .from( | |
| 126 | |
| ) | |
| ) | |
| .div( | |
| Rn | |
| .from( | |
| 100 | |
| ) | |
| ) | |
| .add( | |
| Rn | |
| .from( | |
| e | |
| .maxPriorityFeePerGas | |
| ) | |
| ); | |
| e.maxFeePerGas = | |
| je( | |
| n) | |
| } | |
| } catch ( | |
| e) { | |
| throw Error( | |
| `Failed to set gas price for OP stack transaction: ${e}.` | |
| ) | |
| } | |
| return e | |
| })(t, r) : si(t | |
| .chainId) ? | |
| await (async (e, | |
| t) => { | |
| if (!si(e | |
| .chainId | |
| )) | |
| throw Error( | |
| "Invalid chain ID for BSC gas estimation." | |
| ); | |
| if (void 0 === | |
| e | |
| .type ? | |
| e | |
| .type = | |
| 0 : | |
| 1 != | |
| e | |
| .type && | |
| 2 != | |
| e | |
| .type || | |
| console | |
| .warn( | |
| "Transaction request type specified is incompatible for chain and will result in undefined behavior. Please use transaction type 0." | |
| ), | |
| !e | |
| .gasPrice | |
| ) { | |
| let r = | |
| await t | |
| .getFeeData(); | |
| e.gasPrice = | |
| r | |
| .gasPrice | |
| ?.toHexString() | |
| } | |
| return e | |
| })(t, r) : | |
| await (async (e, | |
| t) => { | |
| if (void 0 === | |
| e | |
| .type && | |
| (e.type = | |
| 2 | |
| ), | |
| 2 === | |
| e | |
| .type | |
| ) { | |
| if (! | |
| e | |
| .maxFeePerGas || | |
| ! | |
| e | |
| .maxPriorityFeePerGas | |
| ) { | |
| let r = | |
| await t | |
| .getFeeData(); | |
| e.maxFeePerGas || | |
| (e.maxFeePerGas = | |
| r | |
| .maxFeePerGas | |
| ?.toHexString() | |
| ), | |
| e | |
| .maxPriorityFeePerGas || | |
| (e.maxPriorityFeePerGas = | |
| r | |
| .maxPriorityFeePerGas | |
| ?.toHexString() | |
| ) | |
| } | |
| } else if ( | |
| !e | |
| .gasPrice | |
| ) { | |
| let r = | |
| await t | |
| .getFeeData(); | |
| e.gasPrice = | |
| r | |
| .gasPrice | |
| ?.toHexString() | |
| } | |
| return e | |
| })(t, r)) | |
| .type && delete t | |
| .accessList, 2 !== t.type && | |
| (delete t | |
| .maxPriorityFeePerGas, | |
| delete t.maxFeePerGas), | |
| t | |
| } | |
| var Ci = { | |
| AC: "40123", | |
| AD: "312345", | |
| AE: "501234567", | |
| AF: "701234567", | |
| AG: "2684641234", | |
| AI: "2642351234", | |
| AL: "672123456", | |
| AM: "77123456", | |
| AO: "923123456", | |
| AR: "91123456789", | |
| AS: "6847331234", | |
| AT: "664123456", | |
| AU: "412345678", | |
| AW: "5601234", | |
| AX: "412345678", | |
| AZ: "401234567", | |
| BA: "61123456", | |
| BB: "2462501234", | |
| BD: "1812345678", | |
| BE: "470123456", | |
| BF: "70123456", | |
| BG: "43012345", | |
| BH: "36001234", | |
| BI: "79561234", | |
| BJ: "90011234", | |
| BL: "690001234", | |
| BM: "4413701234", | |
| BN: "7123456", | |
| BO: "71234567", | |
| BQ: "3181234", | |
| BR: "11961234567", | |
| BS: "2423591234", | |
| BT: "17123456", | |
| BW: "71123456", | |
| BY: "294911911", | |
| BZ: "6221234", | |
| CA: "5062345678", | |
| CC: "412345678", | |
| CD: "991234567", | |
| CF: "70012345", | |
| CG: "061234567", | |
| CH: "781234567", | |
| CI: "0123456789", | |
| CK: "71234", | |
| CL: "221234567", | |
| CM: "671234567", | |
| CN: "13123456789", | |
| CO: "3211234567", | |
| CR: "83123456", | |
| CU: "51234567", | |
| CV: "9911234", | |
| CW: "95181234", | |
| CX: "412345678", | |
| CY: "96123456", | |
| CZ: "601123456", | |
| DE: "15123456789", | |
| DJ: "77831001", | |
| DK: "32123456", | |
| DM: "7672251234", | |
| DO: "8092345678", | |
| DZ: "551234567", | |
| EC: "991234567", | |
| EE: "51234567", | |
| EG: "1001234567", | |
| EH: "650123456", | |
| ER: "7123456", | |
| ES: "612345678", | |
| ET: "911234567", | |
| FI: "412345678", | |
| FJ: "7012345", | |
| FK: "51234", | |
| FM: "3501234", | |
| FO: "211234", | |
| FR: "612345678", | |
| GA: "06031234", | |
| GB: "7400123456", | |
| GD: "4734031234", | |
| GE: "555123456", | |
| GF: "694201234", | |
| GG: "7781123456", | |
| GH: "231234567", | |
| GI: "57123456", | |
| GL: "221234", | |
| GM: "3012345", | |
| GN: "601123456", | |
| GP: "690001234", | |
| GQ: "222123456", | |
| GR: "6912345678", | |
| GT: "51234567", | |
| GU: "6713001234", | |
| GW: "955012345", | |
| GY: "6091234", | |
| HK: "51234567", | |
| HN: "91234567", | |
| HR: "921234567", | |
| HT: "34101234", | |
| HU: "201234567", | |
| ID: "812345678", | |
| IE: "850123456", | |
| IL: "502345678", | |
| IM: "7924123456", | |
| IN: "8123456789", | |
| IO: "3801234", | |
| IQ: "7912345678", | |
| IR: "9123456789", | |
| IS: "6111234", | |
| IT: "3123456789", | |
| JE: "7797712345", | |
| JM: "8762101234", | |
| JO: "790123456", | |
| JP: "9012345678", | |
| KE: "712123456", | |
| KG: "700123456", | |
| KH: "91234567", | |
| KI: "72001234", | |
| KM: "3212345", | |
| KN: "8697652917", | |
| KP: "1921234567", | |
| KR: "1020000000", | |
| KW: "50012345", | |
| KY: "3453231234", | |
| KZ: "7710009998", | |
| LA: "2023123456", | |
| LB: "71123456", | |
| LC: "7582845678", | |
| LI: "660234567", | |
| LK: "712345678", | |
| LR: "770123456", | |
| LS: "50123456", | |
| LT: "61234567", | |
| LU: "628123456", | |
| LV: "21234567", | |
| LY: "912345678", | |
| MA: "650123456", | |
| MC: "612345678", | |
| MD: "62112345", | |
| ME: "67622901", | |
| MF: "690001234", | |
| MG: "321234567", | |
| MH: "2351234", | |
| MK: "72345678", | |
| ML: "65012345", | |
| MM: "92123456", | |
| MN: "88123456", | |
| MO: "66123456", | |
| MP: "6702345678", | |
| MQ: "696201234", | |
| MR: "22123456", | |
| MS: "6644923456", | |
| MT: "96961234", | |
| MU: "52512345", | |
| MV: "7712345", | |
| MW: "991234567", | |
| MX: "12221234567", | |
| MY: "123456789", | |
| MZ: "821234567", | |
| NA: "811234567", | |
| NC: "751234", | |
| NE: "93123456", | |
| NF: "381234", | |
| NG: "8021234567", | |
| NI: "81234567", | |
| NL: "612345678", | |
| NO: "40612345", | |
| NP: "9841234567", | |
| NR: "5551234", | |
| NU: "8884012", | |
| NZ: "211234567", | |
| OM: "92123456", | |
| PA: "61234567", | |
| PE: "912345678", | |
| PF: "87123456", | |
| PG: "70123456", | |
| PH: "9051234567", | |
| PK: "3012345678", | |
| PL: "512345678", | |
| PM: "551234", | |
| PR: "7872345678", | |
| PS: "599123456", | |
| PT: "912345678", | |
| PW: "6201234", | |
| PY: "961456789", | |
| QA: "33123456", | |
| RE: "692123456", | |
| RO: "712034567", | |
| RS: "601234567", | |
| RU: "9123456789", | |
| RW: "720123456", | |
| SA: "512345678", | |
| SB: "7421234", | |
| SC: "2510123", | |
| SD: "911231234", | |
| SE: "701234567", | |
| SG: "81234567", | |
| SH: "51234", | |
| SI: "31234567", | |
| SJ: "41234567", | |
| SK: "912123456", | |
| SL: "25123456", | |
| SM: "66661212", | |
| SN: "701234567", | |
| SO: "71123456", | |
| SR: "7412345", | |
| SS: "977123456", | |
| ST: "9812345", | |
| SV: "70123456", | |
| SX: "7215205678", | |
| SY: "944567890", | |
| SZ: "76123456", | |
| TA: "8999", | |
| TC: "6492311234", | |
| TD: "63012345", | |
| TG: "90112345", | |
| TH: "812345678", | |
| TJ: "917123456", | |
| TK: "7290", | |
| TL: "77212345", | |
| TM: "66123456", | |
| TN: "20123456", | |
| TO: "7715123", | |
| TR: "5012345678", | |
| TT: "8682911234", | |
| TV: "901234", | |
| TW: "912345678", | |
| TZ: "621234567", | |
| UA: "501234567", | |
| UG: "712345678", | |
| US: "2015550123", | |
| UY: "94231234", | |
| UZ: "912345678", | |
| VA: "3123456789", | |
| VC: "7844301234", | |
| VE: "4121234567", | |
| VG: "2843001234", | |
| VI: "3406421234", | |
| VN: "912345678", | |
| VU: "5912345", | |
| WF: "821234", | |
| WS: "7212345", | |
| XK: "43201234", | |
| YE: "712345678", | |
| YT: "639012345", | |
| ZA: "711234567", | |
| ZM: "955123456", | |
| ZW: "712345678" | |
| }, | |
| bi = { | |
| version: 4, | |
| country_calling_codes: { | |
| 1: ["US", "AG", "AI", "AS", | |
| "BB", "BM", "BS", | |
| "CA", "DM", "DO", | |
| "GD", "GU", "JM", | |
| "KN", "KY", "LC", | |
| "MP", "MS", "PR", | |
| "SX", "TC", "TT", | |
| "VC", "VG", "VI" | |
| ], | |
| 7: ["RU", "KZ"], | |
| 20: ["EG"], | |
| 27: ["ZA"], | |
| 30: ["GR"], | |
| 31: ["NL"], | |
| 32: ["BE"], | |
| 33: ["FR"], | |
| 34: ["ES"], | |
| 36: ["HU"], | |
| 39: ["IT", "VA"], | |
| 40: ["RO"], | |
| 41: ["CH"], | |
| 43: ["AT"], | |
| 44: ["GB", "GG", "IM", | |
| "JE"], | |
| 45: ["DK"], | |
| 46: ["SE"], | |
| 47: ["NO", "SJ"], | |
| 48: ["PL"], | |
| 49: ["DE"], | |
| 51: ["PE"], | |
| 52: ["MX"], | |
| 53: ["CU"], | |
| 54: ["AR"], | |
| 55: ["BR"], | |
| 56: ["CL"], | |
| 57: ["CO"], | |
| 58: ["VE"], | |
| 60: ["MY"], | |
| 61: ["AU", "CC", "CX"], | |
| 62: ["ID"], | |
| 63: ["PH"], | |
| 64: ["NZ"], | |
| 65: ["SG"], | |
| 66: ["TH"], | |
| 81: ["JP"], | |
| 82: ["KR"], | |
| 84: ["VN"], | |
| 86: ["CN"], | |
| 90: ["TR"], | |
| 91: ["IN"], | |
| 92: ["PK"], | |
| 93: ["AF"], | |
| 94: ["LK"], | |
| 95: ["MM"], | |
| 98: ["IR"], | |
| 211: ["SS"], | |
| 212: ["MA", "EH"], | |
| 213: ["DZ"], | |
| 216: ["TN"], | |
| 218: ["LY"], | |
| 220: ["GM"], | |
| 221: ["SN"], | |
| 222: ["MR"], | |
| 223: ["ML"], | |
| 224: ["GN"], | |
| 225: ["CI"], | |
| 226: ["BF"], | |
| 227: ["NE"], | |
| 228: ["TG"], | |
| 229: ["BJ"], | |
| 230: ["MU"], | |
| 231: ["LR"], | |
| 232: ["SL"], | |
| 233: ["GH"], | |
| 234: ["NG"], | |
| 235: ["TD"], | |
| 236: ["CF"], | |
| 237: ["CM"], | |
| 238: ["CV"], | |
| 239: ["ST"], | |
| 240: ["GQ"], | |
| 241: ["GA"], | |
| 242: ["CG"], | |
| 243: ["CD"], | |
| 244: ["AO"], | |
| 245: ["GW"], | |
| 246: ["IO"], | |
| 247: ["AC"], | |
| 248: ["SC"], | |
| 249: ["SD"], | |
| 250: ["RW"], | |
| 251: ["ET"], | |
| 252: ["SO"], | |
| 253: ["DJ"], | |
| 254: ["KE"], | |
| 255: ["TZ"], | |
| 256: ["UG"], | |
| 257: ["BI"], | |
| 258: ["MZ"], | |
| 260: ["ZM"], | |
| 261: ["MG"], | |
| 262: ["RE", "YT"], | |
| 263: ["ZW"], | |
| 264: ["NA"], | |
| 265: ["MW"], | |
| 266: ["LS"], | |
| 267: ["BW"], | |
| 268: ["SZ"], | |
| 269: ["KM"], | |
| 290: ["SH", "TA"], | |
| 291: ["ER"], | |
| 297: ["AW"], | |
| 298: ["FO"], | |
| 299: ["GL"], | |
| 350: ["GI"], | |
| 351: ["PT"], | |
| 352: ["LU"], | |
| 353: ["IE"], | |
| 354: ["IS"], | |
| 355: ["AL"], | |
| 356: ["MT"], | |
| 357: ["CY"], | |
| 358: ["FI", "AX"], | |
| 359: ["BG"], | |
| 370: ["LT"], | |
| 371: ["LV"], | |
| 372: ["EE"], | |
| 373: ["MD"], | |
| 374: ["AM"], | |
| 375: ["BY"], | |
| 376: ["AD"], | |
| 377: ["MC"], | |
| 378: ["SM"], | |
| 380: ["UA"], | |
| 381: ["RS"], | |
| 382: ["ME"], | |
| 383: ["XK"], | |
| 385: ["HR"], | |
| 386: ["SI"], | |
| 387: ["BA"], | |
| 389: ["MK"], | |
| 420: ["CZ"], | |
| 421: ["SK"], | |
| 423: ["LI"], | |
| 500: ["FK"], | |
| 501: ["BZ"], | |
| 502: ["GT"], | |
| 503: ["SV"], | |
| 504: ["HN"], | |
| 505: ["NI"], | |
| 506: ["CR"], | |
| 507: ["PA"], | |
| 508: ["PM"], | |
| 509: ["HT"], | |
| 590: ["GP", "BL", "MF"], | |
| 591: ["BO"], | |
| 592: ["GY"], | |
| 593: ["EC"], | |
| 594: ["GF"], | |
| 595: ["PY"], | |
| 596: ["MQ"], | |
| 597: ["SR"], | |
| 598: ["UY"], | |
| 599: ["CW", "BQ"], | |
| 670: ["TL"], | |
| 672: ["NF"], | |
| 673: ["BN"], | |
| 674: ["NR"], | |
| 675: ["PG"], | |
| 676: ["TO"], | |
| 677: ["SB"], | |
| 678: ["VU"], | |
| 679: ["FJ"], | |
| 680: ["PW"], | |
| 681: ["WF"], | |
| 682: ["CK"], | |
| 683: ["NU"], | |
| 685: ["WS"], | |
| 686: ["KI"], | |
| 687: ["NC"], | |
| 688: ["TV"], | |
| 689: ["PF"], | |
| 690: ["TK"], | |
| 691: ["FM"], | |
| 692: ["MH"], | |
| 850: ["KP"], | |
| 852: ["HK"], | |
| 853: ["MO"], | |
| 855: ["KH"], | |
| 856: ["LA"], | |
| 880: ["BD"], | |
| 886: ["TW"], | |
| 960: ["MV"], | |
| 961: ["LB"], | |
| 962: ["JO"], | |
| 963: ["SY"], | |
| 964: ["IQ"], | |
| 965: ["KW"], | |
| 966: ["SA"], | |
| 967: ["YE"], | |
| 968: ["OM"], | |
| 970: ["PS"], | |
| 971: ["AE"], | |
| 972: ["IL"], | |
| 973: ["BH"], | |
| 974: ["QA"], | |
| 975: ["BT"], | |
| 976: ["MN"], | |
| 977: ["NP"], | |
| 992: ["TJ"], | |
| 993: ["TM"], | |
| 994: ["AZ"], | |
| 995: ["GE"], | |
| 996: ["KG"], | |
| 998: ["UZ"] | |
| }, | |
| countries: { | |
| AC: ["247", "00", | |
| "(?:[01589]\\d|[46])\\d{4}", | |
| [5, 6] | |
| ], | |
| AD: ["376", "00", | |
| "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", | |
| [6, 8, 9], | |
| [ | |
| ["(\\d{3})(\\d{3})", | |
| "$1 $2", [ | |
| "[135-9]" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "1" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["6"] | |
| ] | |
| ] | |
| ], | |
| AE: ["971", "00", | |
| "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", | |
| [5, 6, 7, 8, 9, 10, | |
| 11, 12 | |
| ], | |
| [ | |
| ["(\\d{3})(\\d{2,9})", | |
| "$1 $2", [ | |
| "60|8" | |
| ] | |
| ], | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "[236]|[479][2-8]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d)(\\d{5})", | |
| "$1 $2 $3", | |
| ["[479]"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["5"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| AF: ["93", "00", | |
| "[2-7]\\d{8}", [9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[2-7]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| AG: ["1", "011", | |
| "(?:268|[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([457]\\d{6})$|1", | |
| "268$1", 0, "268" | |
| ], | |
| AI: ["1", "011", | |
| "(?:264|[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2457]\\d{6})$|1", | |
| "264$1", 0, "264" | |
| ], | |
| AL: ["355", "00", | |
| "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", | |
| [6, 7, 8, 9], | |
| [ | |
| ["(\\d{3})(\\d{3,4})", | |
| "$1 $2", [ | |
| "80|9" | |
| ], "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["4[2-6]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[2358][2-5]|4"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "[23578]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["6"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| AM: ["374", "00", | |
| "(?:[1-489]\\d|55|60|77)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[89]0"], | |
| "0 $1" | |
| ], | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "2|3[12]" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{6})", | |
| "$1 $2", [ | |
| "1|47" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{6})", | |
| "$1 $2", [ | |
| "[3-9]" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| AO: ["244", "00", | |
| "[29]\\d{8}", [9], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[29]"] | |
| ] | |
| ] | |
| ], | |
| AR: ["54", "00", | |
| "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", | |
| [10, 11], | |
| [ | |
| ["(\\d{4})(\\d{2})(\\d{4})", | |
| "$1 $2-$3", | |
| ["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", | |
| "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", | |
| "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", | |
| "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]" | |
| ], "0$1", 1 | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2-$3", | |
| ["1"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1-$2-$3", | |
| ["[68]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2-$3", | |
| ["[23]"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d)(\\d{4})(\\d{2})(\\d{4})", | |
| "$2 15-$3-$4", | |
| ["9(?:2[2-469]|3[3-578])", | |
| "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", | |
| "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", | |
| "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", | |
| "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]" | |
| ], "0$1", 0, | |
| "$1 $2 $3-$4" | |
| ], | |
| ["(\\d)(\\d{2})(\\d{4})(\\d{4})", | |
| "$2 15-$3-$4", | |
| ["91"], | |
| "0$1", 0, | |
| "$1 $2 $3-$4" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{5})", | |
| "$1-$2-$3", | |
| ["8"], "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{3})(\\d{4})", | |
| "$2 15-$3-$4", | |
| ["9"], | |
| "0$1", 0, | |
| "$1 $2 $3-$4" | |
| ] | |
| ], "0", 0, | |
| "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", | |
| "9$1" | |
| ], | |
| AS: ["1", "011", | |
| "(?:[58]\\d\\d|684|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([267]\\d{6})$|1", | |
| "684$1", 0, "684" | |
| ], | |
| AT: ["43", "00", | |
| "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", | |
| [4, 5, 6, 7, 8, 9, | |
| 10, 11, 12, 13 | |
| ], | |
| [ | |
| ["(\\d)(\\d{3,12})", | |
| "$1 $2", [ | |
| "1(?:11|[2-9])" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})", | |
| "$1 $2", [ | |
| "517" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3,5})", | |
| "$1 $2", [ | |
| "5[079]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3,10})", | |
| "$1 $2", [ | |
| "(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3,9})", | |
| "$1 $2", [ | |
| "[2-467]|5[2-6]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["5"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4,7})", | |
| "$1 $2 $3", | |
| ["5"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| AU: ["61", | |
| "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", | |
| "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", | |
| [5, 6, 7, 8, 9, 10, | |
| 12 | |
| ], | |
| [ | |
| ["(\\d{2})(\\d{3,4})", | |
| "$1 $2", [ | |
| "16" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2,4})", | |
| "$1 $2 $3", | |
| ["16"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["14|4"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[2378]"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "1(?:30|[89])"] | |
| ] | |
| ], "0", 0, | |
| "(183[12])|0", 0, 0, | |
| 0, [ | |
| ["(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8]))\\d{3}|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4]))|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}", | |
| [9] | |
| ], | |
| ["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", | |
| [9] | |
| ], | |
| ["180(?:0\\d{3}|2)\\d{3}", | |
| [7, 10] | |
| ], | |
| ["190[0-26]\\d{6}", | |
| [10] | |
| ], 0, 0, 0, [ | |
| "163\\d{2,6}", | |
| [5, 6, 7, 8, | |
| 9 | |
| ] | |
| ], | |
| ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", | |
| [9] | |
| ], | |
| ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", | |
| [6, 8, 10, | |
| 12 | |
| ] | |
| ] | |
| ], "0011" | |
| ], | |
| AW: ["297", "00", | |
| "(?:[25-79]\\d\\d|800)\\d{4}", | |
| [7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[25-9]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| AX: ["358", | |
| "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", | |
| "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", | |
| [5, 6, 7, 8, 9, 10, | |
| 11, 12 | |
| ], 0, "0", 0, 0, 0, | |
| 0, "18", 0, "00" | |
| ], | |
| AZ: ["994", "00", | |
| "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["90"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["1[28]|2|365|46", | |
| "1[28]|2|365[45]|46", | |
| "1[28]|2|365(?:4|5[02])|46" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[13-9]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| BA: ["387", "00", | |
| "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", | |
| [8, 9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "6[1-3]|[7-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2-$3", | |
| [ | |
| "[3-5]|6[56]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["6"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| BB: ["1", "011", | |
| "(?:246|[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-9]\\d{6})$|1", | |
| "246$1", 0, "246" | |
| ], | |
| BD: ["880", "00", | |
| "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", | |
| [6, 7, 8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{4,6})", | |
| "$1-$2", [ | |
| "31[5-8]|[459]1" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3,7})", | |
| "$1-$2", [ | |
| "3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3,6})", | |
| "$1-$2", [ | |
| "[13-9]|22" | |
| ], "0$1" | |
| ], | |
| ["(\\d)(\\d{7,8})", | |
| "$1-$2", [ | |
| "2" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| BE: ["32", "00", | |
| "4\\d{8}|[1-9]\\d{7}", | |
| [8, 9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "(?:80|9)0"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "[239]|4[23]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[15-8]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["4"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| BF: ["226", "00", | |
| "[025-7]\\d{7}", [ | |
| 8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[025-7]"] | |
| ] | |
| ] | |
| ], | |
| BG: ["359", "00", | |
| "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", | |
| [6, 7, 8, 9, 12], | |
| [ | |
| ["(\\d)(\\d)(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["2"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "43[1-6]|70[1-9]" | |
| ], "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["2"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2,3})", | |
| "$1 $2 $3", | |
| [ | |
| "[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "(?:70|8)0"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{2})", | |
| "$1 $2 $3", | |
| [ | |
| "43[1-7]|7"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "[48]|9[08]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["9"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| BH: ["973", "00", | |
| "[136-9]\\d{7}", [ | |
| 8], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[13679]|8[02-4679]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| BI: ["257", "00", | |
| "(?:[267]\\d|31)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[2367]"] | |
| ] | |
| ] | |
| ], | |
| BJ: ["229", "00", | |
| "[24-689]\\d{7}", [ | |
| 8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[24-689]"] | |
| ] | |
| ] | |
| ], | |
| BL: ["590", "00", | |
| "590\\d{6}|(?:69|80|9\\d)\\d{7}", | |
| [9], 0, "0", 0, 0, | |
| 0, 0, 0, [ | |
| [ | |
| "590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"], | |
| [ | |
| "69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"], | |
| [ | |
| "80[0-5]\\d{6}"], | |
| 0, 0, 0, 0, 0, [ | |
| "9(?:(?:395|76[018])\\d|475[0-5])\\d{4}" | |
| ] | |
| ] | |
| ], | |
| BM: ["1", "011", | |
| "(?:441|[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-9]\\d{6})$|1", | |
| "441$1", 0, "441" | |
| ], | |
| BN: ["673", "00", | |
| "[2-578]\\d{6}", [ | |
| 7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[2-578]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| BO: ["591", "00(?:1\\d)?", | |
| "(?:[2-467]\\d\\d|8001)\\d{5}", | |
| [8, 9], | |
| [ | |
| ["(\\d)(\\d{7})", | |
| "$1 $2", [ | |
| "[23]|4[46]" | |
| ] | |
| ], | |
| ["(\\d{8})", | |
| "$1", [ | |
| "[67]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{4})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ] | |
| ], "0", 0, | |
| "0(1\\d)?" | |
| ], | |
| BQ: ["599", "00", | |
| "(?:[34]1|7\\d)\\d{5}", | |
| [7], 0, 0, 0, 0, 0, | |
| 0, "[347]" | |
| ], | |
| BR: ["55", | |
| "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", | |
| "(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}", | |
| [8, 9, 10, 11], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1-$2", [ | |
| "300|4(?:0[02]|37)", | |
| "4(?:02|37)0|[34]00" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{2,3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "(?:[358]|90)0"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2-$3", | |
| [ | |
| "(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], | |
| "($1)" | |
| ], | |
| ["(\\d{2})(\\d{5})(\\d{4})", | |
| "$1 $2-$3", | |
| [ | |
| "[16][1-9]|[2-57-9]"], | |
| "($1)" | |
| ] | |
| ], "0", 0, | |
| "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", | |
| "$2" | |
| ], | |
| BS: ["1", "011", | |
| "(?:242|[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([3-8]\\d{6})$|1", | |
| "242$1", 0, "242" | |
| ], | |
| BT: ["975", "00", | |
| "[17]\\d{7}|[2-8]\\d{6}", | |
| [7, 8], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[2-68]|7[246]"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["1[67]|7"] | |
| ] | |
| ] | |
| ], | |
| BW: ["267", "00", | |
| "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", | |
| [7, 8, 10], | |
| [ | |
| ["(\\d{2})(\\d{5})", | |
| "$1 $2", [ | |
| "90" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[24-6]|3[15-9]" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[37]"] | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["0"] | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{3})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ] | |
| ] | |
| ], | |
| BY: ["375", "810", | |
| "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", | |
| [6, 7, 8, 9, 10, | |
| 11], | |
| [ | |
| ["(\\d{3})(\\d{3})", | |
| "$1 $2", [ | |
| "800" | |
| ], "8 $1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2,4})", | |
| "$1 $2 $3", | |
| ["800"], | |
| "8 $1" | |
| ], | |
| ["(\\d{4})(\\d{2})(\\d{3})", | |
| "$1 $2-$3", | |
| ["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", | |
| "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])" | |
| ], "8 0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2-$3-$4", | |
| [ | |
| "1(?:[56]|7[467])|2[1-3]"], | |
| "8 0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2-$3-$4", | |
| ["[1-4]"], | |
| "8 0$1" | |
| ], | |
| ["(\\d{3})(\\d{3,4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[89]"], | |
| "8 $1" | |
| ] | |
| ], "8", 0, "0|80?", | |
| 0, 0, 0, 0, "8~10" | |
| ], | |
| BZ: ["501", "00", | |
| "(?:0800\\d|[2-8])\\d{6}", | |
| [7, 11], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1-$2", [ | |
| "[2-8]" | |
| ] | |
| ], | |
| ["(\\d)(\\d{3})(\\d{4})(\\d{3})", | |
| "$1-$2-$3-$4", | |
| ["0"] | |
| ] | |
| ] | |
| ], | |
| CA: ["1", "011", | |
| "(?:[2-8]\\d|90)\\d{8}|3\\d{6}", | |
| [7, 10], 0, "1", 0, | |
| 0, 0, 0, 0, [ | |
| ["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}", | |
| [10] | |
| ], | |
| ["", [10]], | |
| ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", | |
| [10] | |
| ], | |
| ["900[2-9]\\d{6}", | |
| [10] | |
| ], | |
| ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}", | |
| [10] | |
| ], 0, [ | |
| "310\\d{4}", | |
| [7] | |
| ], 0, [ | |
| "600[2-9]\\d{6}", | |
| [10] | |
| ] | |
| ] | |
| ], | |
| CC: ["61", | |
| "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", | |
| "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", | |
| [6, 7, 8, 9, 10, | |
| 12], 0, "0", 0, | |
| "([59]\\d{7})$|0", | |
| "8$1", 0, 0, [ | |
| ["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", | |
| [9] | |
| ], | |
| ["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", | |
| [9] | |
| ], | |
| ["180(?:0\\d{3}|2)\\d{3}", | |
| [7, 10] | |
| ], | |
| ["190[0-26]\\d{6}", | |
| [10] | |
| ], 0, 0, 0, 0, [ | |
| "14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", | |
| [9] | |
| ], | |
| ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", | |
| [6, 8, 10, | |
| 12 | |
| ] | |
| ] | |
| ], "0011" | |
| ], | |
| CD: ["243", "00", | |
| "[189]\\d{8}|[1-68]\\d{6}", | |
| [7, 9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| ["88"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{5})", | |
| "$1 $2", [ | |
| "[1-6]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[89]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| CF: ["236", "00", | |
| "(?:[27]\\d{3}|8776)\\d{4}", | |
| [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[278]"] | |
| ] | |
| ] | |
| ], | |
| CG: ["242", "00", | |
| "222\\d{6}|(?:0\\d|80)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[02]"] | |
| ] | |
| ] | |
| ], | |
| CH: ["41", "00", | |
| "8\\d{11}|[2-9]\\d{8}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "8[047]|90"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "[2-79]|81"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4 $5", | |
| ["8"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| CI: ["225", "00", | |
| "[02]\\d{9}", [10], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d)(\\d{5})", | |
| "$1 $2 $3 $4", | |
| ["2"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{4})", | |
| "$1 $2 $3 $4", | |
| ["0"] | |
| ] | |
| ] | |
| ], | |
| CK: ["682", "00", | |
| "[2-578]\\d{4}", [ | |
| 5], | |
| [ | |
| ["(\\d{2})(\\d{3})", | |
| "$1 $2", [ | |
| "[2-578]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| CL: ["56", | |
| "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", | |
| "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", | |
| [9, 10, 11], | |
| [ | |
| ["(\\d{5})(\\d{4})", | |
| "$1 $2", [ | |
| "219", | |
| "2196" | |
| ], "($1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["44"] | |
| ], | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["2[1-36]"], | |
| "($1)" | |
| ], | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["9[2-9]"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"], | |
| "($1)" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["60|8"] | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{2})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["60"] | |
| ] | |
| ] | |
| ], | |
| CM: ["237", "00", | |
| "[26]\\d{8}|88\\d{6,7}", | |
| [8, 9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["88"] | |
| ], | |
| ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4 $5", | |
| ["[26]|88"] | |
| ] | |
| ] | |
| ], | |
| CN: ["86", | |
| "00|1(?:[12]\\d|79)\\d\\d00", | |
| "1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}", | |
| [7, 8, 9, 10, 11, | |
| 12], | |
| [ | |
| ["(\\d{2})(\\d{5,6})", | |
| "$1 $2", [ | |
| "(?:10|2[0-57-9])[19]", | |
| "(?:10|2[0-57-9])(?:10|9[56])", | |
| "10(?:10|9[56])|2[0-57-9](?:100|9[56])" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{5,6})", | |
| "$1 $2", [ | |
| "3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", | |
| "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", | |
| "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", | |
| "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "(?:4|80)0"] | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["10|2(?:[02-57-9]|1[1-9])", | |
| "10|2(?:[02-57-9]|1[1-9])", | |
| "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])" | |
| ], "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{7,8})", | |
| "$1 $2", [ | |
| "9" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["80"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[3-578]"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1[3-9]"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3 $4", | |
| ["[12]"], | |
| "0$1", 1 | |
| ] | |
| ], "0", 0, | |
| "(1(?:[12]\\d|79)\\d\\d)|0", | |
| 0, 0, 0, 0, "00" | |
| ], | |
| CO: ["57", | |
| "00(?:4(?:[14]4|56)|[579])", | |
| "(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}", | |
| [10, 11], | |
| [ | |
| ["(\\d{3})(\\d{7})", | |
| "$1 $2", [ | |
| "6" | |
| ], "($1)" | |
| ], | |
| ["(\\d{3})(\\d{7})", | |
| "$1 $2", [ | |
| "3[0-357]|91" | |
| ] | |
| ], | |
| ["(\\d)(\\d{3})(\\d{7})", | |
| "$1-$2-$3", | |
| ["1"], | |
| "0$1", 0, | |
| "$1 $2 $3" | |
| ] | |
| ], "0", 0, | |
| "0(4(?:[14]4|56)|[579])?" | |
| ], | |
| CR: ["506", "00", | |
| "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", | |
| [8, 10], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[2-7]|8[3-9]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1-$2-$3", | |
| ["[89]"] | |
| ] | |
| ], 0, 0, | |
| "(19(?:0[0-2468]|1[09]|20|66|77|99))" | |
| ], | |
| CU: ["53", "119", | |
| "[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}", | |
| [6, 7, 8, 10], | |
| [ | |
| ["(\\d{2})(\\d{4,6})", | |
| "$1 $2", [ | |
| "2[1-4]|[34]" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d)(\\d{6,7})", | |
| "$1 $2", [ | |
| "7" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d)(\\d{7})", | |
| "$1 $2", [ | |
| "[56]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{7})", | |
| "$1 $2", [ | |
| "8" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| CV: ["238", "0", | |
| "(?:[2-59]\\d\\d|800)\\d{4}", | |
| [7], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3", | |
| ["[2-589]"] | |
| ] | |
| ] | |
| ], | |
| CW: ["599", "00", | |
| "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", | |
| [7, 8], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[3467]" | |
| ] | |
| ], | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["9[4-8]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, | |
| "[69]" | |
| ], | |
| CX: ["61", | |
| "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", | |
| "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", | |
| [6, 7, 8, 9, 10, | |
| 12], 0, "0", 0, | |
| "([59]\\d{7})$|0", | |
| "8$1", 0, 0, [ | |
| ["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}", | |
| [9] | |
| ], | |
| ["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", | |
| [9] | |
| ], | |
| ["180(?:0\\d{3}|2)\\d{3}", | |
| [7, 10] | |
| ], | |
| ["190[0-26]\\d{6}", | |
| [10] | |
| ], 0, 0, 0, 0, [ | |
| "14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", | |
| [9] | |
| ], | |
| ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", | |
| [6, 8, 10, | |
| 12 | |
| ] | |
| ] | |
| ], "0011" | |
| ], | |
| CY: ["357", "00", | |
| "(?:[279]\\d|[58]0)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{2})(\\d{6})", | |
| "$1 $2", [ | |
| "[257-9]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| CZ: ["420", "00", | |
| "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[2-8]|9[015-7]"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["96"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["9"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["9"] | |
| ] | |
| ] | |
| ], | |
| DE: ["49", "00", | |
| "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", | |
| [4, 5, 6, 7, 8, 9, | |
| 10, 11, 12, 13, | |
| 14, 15 | |
| ], | |
| [ | |
| ["(\\d{2})(\\d{3,13})", | |
| "$1 $2", [ | |
| "3[02]|40|[68]9" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3,12})", | |
| "$1 $2", [ | |
| "2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", | |
| "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{2,11})", | |
| "$1 $2", [ | |
| "[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", | |
| "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "138" | |
| ], "0$1" | |
| ], | |
| ["(\\d{5})(\\d{2,10})", | |
| "$1 $2", [ | |
| "3" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{5,11})", | |
| "$1 $2", [ | |
| "181" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d)(\\d{4,10})", | |
| "$1 $2 $3", | |
| [ | |
| "1(?:3|80)|9"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{7,8})", | |
| "$1 $2", [ | |
| "1[67]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{7,12})", | |
| "$1 $2", [ | |
| "8" | |
| ], "0$1" | |
| ], | |
| ["(\\d{5})(\\d{6})", | |
| "$1 $2", [ | |
| "185", | |
| "1850", | |
| "18500" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["7"], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{7})", | |
| "$1 $2", [ | |
| "18[68]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{5})(\\d{6})", | |
| "$1 $2", [ | |
| "15[0568]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{7})", | |
| "$1 $2", [ | |
| "15[1279]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{8})", | |
| "$1 $2", [ | |
| "18" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{7,8})", | |
| "$1 $2 $3", | |
| [ | |
| "1(?:6[023]|7)"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{2})(\\d{7})", | |
| "$1 $2 $3", | |
| ["15[279]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{8})", | |
| "$1 $2 $3", | |
| ["15"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| DJ: ["253", "00", | |
| "(?:2\\d|77)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[27]"] | |
| ] | |
| ] | |
| ], | |
| DK: ["45", "00", | |
| "[2-9]\\d{7}", [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[2-9]"] | |
| ] | |
| ] | |
| ], | |
| DM: ["1", "011", | |
| "(?:[58]\\d\\d|767|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-7]\\d{6})$|1", | |
| "767$1", 0, "767" | |
| ], | |
| DO: ["1", "011", | |
| "(?:[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, 0, | |
| 0, 0, "8001|8[024]9" | |
| ], | |
| DZ: ["213", "00", | |
| "(?:[1-4]|[5-79]\\d|80)\\d{7}", | |
| [8, 9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[1-4]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["9"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[5-8]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| EC: ["593", "00", | |
| "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", | |
| [8, 9, 10, 11], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2-$3", | |
| ["[2-7]"], | |
| "(0$1)", 0, | |
| "$1-$2-$3" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["9"], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ] | |
| ], "0" | |
| ], | |
| EE: ["372", "00", | |
| "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", | |
| [7, 8, 10], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88", | |
| "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{3,4})", | |
| "$1 $2", [ | |
| "[45]|8(?:00|[1-49])", | |
| "[45]|8(?:00[1-9]|[1-49])" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{4})", | |
| "$1 $2 $3", | |
| ["7"] | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ] | |
| ] | |
| ], | |
| EG: ["20", "00", | |
| "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", | |
| [8, 9, 10], | |
| [ | |
| ["(\\d)(\\d{7,8})", | |
| "$1 $2", [ | |
| "[23]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{6,7})", | |
| "$1 $2", [ | |
| "1[35]|[4-6]|8[2468]|9[235-7]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[89]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{8})", | |
| "$1 $2", [ | |
| "1" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| EH: ["212", "00", | |
| "[5-8]\\d{8}", [9], | |
| 0, "0", 0, 0, 0, 0, | |
| "528[89]" | |
| ], | |
| ER: ["291", "00", | |
| "[178]\\d{6}", [7], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[178]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| ES: ["34", "00", | |
| "[5-9]\\d{8}", [9], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[89]00"] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[5-9]"] | |
| ] | |
| ] | |
| ], | |
| ET: ["251", "00", | |
| "(?:11|[2-579]\\d)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[1-579]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| FI: ["358", | |
| "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", | |
| "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", | |
| [5, 6, 7, 8, 9, 10, | |
| 11, 12 | |
| ], | |
| [ | |
| ["(\\d)(\\d{4,9})", | |
| "$1 $2", [ | |
| "[2568][1-8]|3(?:0[1-9]|[1-9])|9" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3,7})", | |
| "$1 $2", [ | |
| "[12]00|[368]|70[07-9]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4,8})", | |
| "$1 $2", [ | |
| "[1245]|7[135]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{6,10})", | |
| "$1 $2", [ | |
| "7" | |
| ], "0$1" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| "1[03-79]|[2-9]", 0, | |
| "00" | |
| ], | |
| FJ: ["679", "0(?:0|52)", | |
| "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", | |
| [7, 11], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[235-9]|45" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["0"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| 0, "00" | |
| ], | |
| FK: ["500", "00", | |
| "[2-7]\\d{4}", [5] | |
| ], | |
| FM: ["691", "00", | |
| "(?:[39]\\d\\d|820)\\d{4}", | |
| [7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[389]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| FO: ["298", "00", | |
| "[2-9]\\d{5}", [6], | |
| [ | |
| ["(\\d{6})", | |
| "$1", [ | |
| "[2-9]" | |
| ] | |
| ] | |
| ], 0, 0, | |
| "(10(?:01|[12]0|88))" | |
| ], | |
| FR: ["33", "00", | |
| "[1-9]\\d{8}", [9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["8"], | |
| "0 $1" | |
| ], | |
| ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4 $5", | |
| ["[1-79]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| GA: ["241", "00", | |
| "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", | |
| [7, 8], | |
| [ | |
| ["(\\d)(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[2-7]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["0"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["11|[67]"], | |
| "0$1" | |
| ] | |
| ], 0, 0, | |
| "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", | |
| "$1" | |
| ], | |
| GB: ["44", "00", | |
| "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", | |
| [7, 9, 10], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "800", | |
| "8001", | |
| "80011", | |
| "800111", | |
| "8001111" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3", | |
| ["845", | |
| "8454", | |
| "84546", | |
| "845464" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{6})", | |
| "$1 $2", [ | |
| "800" | |
| ], "0$1" | |
| ], | |
| ["(\\d{5})(\\d{4,5})", | |
| "$1 $2", [ | |
| "1(?:38|5[23]|69|76|94)", | |
| "1(?:(?:38|69)7|5(?:24|39)|768|946)", | |
| "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{5,6})", | |
| "$1 $2", [ | |
| "1(?:[2-69][02-9]|[78])" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[25]|7(?:0|6[02-9])", | |
| "[25]|7(?:0|6(?:[03-9]|2[356]))" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{6})", | |
| "$1 $2", [ | |
| "7" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[1389]"], | |
| "0$1" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, [ | |
| ["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}", | |
| [9, 10] | |
| ], | |
| ["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", | |
| [10] | |
| ], | |
| [ | |
| "80[08]\\d{7}|800\\d{6}|8001111"], | |
| ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d", | |
| [7, 10] | |
| ], | |
| ["70\\d{8}", [ | |
| 10]], 0, [ | |
| "(?:3[0347]|55)\\d{8}", | |
| [10] | |
| ], | |
| ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", | |
| [10] | |
| ], | |
| ["56\\d{8}", [ | |
| 10]] | |
| ], 0, " x" | |
| ], | |
| GD: ["1", "011", | |
| "(?:473|[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-9]\\d{6})$|1", | |
| "473$1", 0, "473" | |
| ], | |
| GE: ["995", "00", | |
| "(?:[3-57]\\d\\d|800)\\d{6}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["70"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["32"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[57]"] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[348]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| GF: ["594", "00", | |
| "[56]94\\d{6}|(?:80|9\\d)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "[56]|9[47]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[89]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| GG: ["44", "00", | |
| "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", | |
| [7, 9, 10], 0, "0", | |
| 0, | |
| "([25-9]\\d{5})$|0", | |
| "1481$1", 0, 0, [ | |
| ["1481[25-9]\\d{5}", | |
| [10] | |
| ], | |
| ["7(?:(?:781|839)\\d|911[17])\\d{5}", | |
| [10] | |
| ], | |
| [ | |
| "80[08]\\d{7}|800\\d{6}|8001111"], | |
| ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d", | |
| [7, 10] | |
| ], | |
| ["70\\d{8}", [ | |
| 10]], 0, [ | |
| "(?:3[0347]|55)\\d{8}", | |
| [10] | |
| ], | |
| ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", | |
| [10] | |
| ], | |
| ["56\\d{8}", [ | |
| 10]] | |
| ] | |
| ], | |
| GH: ["233", "00", | |
| "(?:[235]\\d{3}|800)\\d{5}", | |
| [8, 9], | |
| [ | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "8" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[235]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| GI: ["350", "00", | |
| "(?:[25]\\d|60)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "2" | |
| ] | |
| ] | |
| ] | |
| ], | |
| GL: ["299", "00", | |
| "(?:19|[2-689]\\d|70)\\d{4}", | |
| [6], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3", | |
| ["19|[2-9]"] | |
| ] | |
| ] | |
| ], | |
| GM: ["220", "00", | |
| "[2-9]\\d{6}", [7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[2-9]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| GN: ["224", "00", | |
| "722\\d{6}|(?:3|6\\d)\\d{7}", | |
| [8, 9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["3"] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[67]"] | |
| ] | |
| ] | |
| ], | |
| GP: ["590", "00", | |
| "590\\d{6}|(?:69|80|9\\d)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[569]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["8"], "0$1" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, [ | |
| [ | |
| "590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"], | |
| [ | |
| "69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"], | |
| [ | |
| "80[0-5]\\d{6}"], | |
| 0, 0, 0, 0, 0, [ | |
| "9(?:(?:395|76[018])\\d|475[0-5])\\d{4}" | |
| ] | |
| ] | |
| ], | |
| GQ: ["240", "00", | |
| "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[235]"] | |
| ], | |
| ["(\\d{3})(\\d{6})", | |
| "$1 $2", [ | |
| "[89]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| GR: ["30", "00", | |
| "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", | |
| [10, 11, 12], | |
| [ | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["21|7"] | |
| ], | |
| ["(\\d{4})(\\d{6})", | |
| "$1 $2", [ | |
| "2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[2689]"] | |
| ], | |
| ["(\\d{3})(\\d{3,4})(\\d{5})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ] | |
| ] | |
| ], | |
| GT: ["502", "00", | |
| "(?:1\\d{3}|[2-7])\\d{7}", | |
| [8, 11], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[2-7]" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ] | |
| ] | |
| ], | |
| GU: ["1", "011", | |
| "(?:[58]\\d\\d|671|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([3-9]\\d{6})$|1", | |
| "671$1", 0, "671" | |
| ], | |
| GW: ["245", "00", | |
| "[49]\\d{8}|4\\d{6}", | |
| [7, 9], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "40" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[49]"] | |
| ] | |
| ] | |
| ], | |
| GY: ["592", "001", | |
| "9008\\d{3}|(?:[2-467]\\d\\d|510|862)\\d{4}", | |
| [7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[2-9]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| HK: ["852", | |
| "00(?:30|5[09]|[126-9]?)", | |
| "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", | |
| [5, 6, 7, 8, 9, 11], | |
| [ | |
| ["(\\d{3})(\\d{2,5})", | |
| "$1 $2", [ | |
| "900", | |
| "9003" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[2-7]|8[1-4]|9(?:0[1-9]|[1-8])" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["9"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| 0, "00" | |
| ], | |
| HN: ["504", "00", | |
| "8\\d{10}|[237-9]\\d{7}", | |
| [8, 11], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1-$2", [ | |
| "[237-9]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| HR: ["385", "00", | |
| "(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}", | |
| [6, 7, 8, 9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2,3})", | |
| "$1 $2 $3", | |
| ["6[01]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2,3})", | |
| "$1 $2 $3", | |
| ["8"], "0$1" | |
| ], | |
| ["(\\d)(\\d{4})(\\d{3})", | |
| "$1 $2 $3", | |
| ["1"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[67]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["9"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[2-5]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["8"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| HT: ["509", "00", | |
| "(?:[2-489]\\d|55)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[2-589]"] | |
| ] | |
| ] | |
| ], | |
| HU: ["36", "00", | |
| "[235-7]\\d{8}|[1-9]\\d{7}", | |
| [8, 9], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"], | |
| "(06 $1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], | |
| "(06 $1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[2-9]"], | |
| "06 $1" | |
| ] | |
| ], "06" | |
| ], | |
| ID: ["62", "00[89]", | |
| "(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}", | |
| [7, 8, 9, 10, 11, | |
| 12, 13 | |
| ], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["15"] | |
| ], | |
| ["(\\d{2})(\\d{5,9})", | |
| "$1 $2", [ | |
| "2[124]|[36]1" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{5,7})", | |
| "$1 $2", [ | |
| "800" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{5,8})", | |
| "$1 $2", [ | |
| "[2-79]" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{3,4})(\\d{3})", | |
| "$1-$2-$3", | |
| [ | |
| "8[1-35-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{6,8})", | |
| "$1 $2", [ | |
| "1" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["804"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d)(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["80"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{4,5})", | |
| "$1-$2-$3", | |
| ["8"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| IE: ["353", "00", | |
| "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", | |
| [7, 8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{5})", | |
| "$1 $2", [ | |
| "2[24-9]|47|58|6[237-9]|9[35-9]" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "[45]0" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d)(\\d{3,4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "[2569]|4[1-69]|7[14]"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["70"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["81"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[78]"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["4"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3 $4", | |
| ["8"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| IL: ["972", "0(?:0|1[2-9])", | |
| "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", | |
| [7, 8, 9, 10, 11, | |
| 12], | |
| [ | |
| ["(\\d{4})(\\d{3})", | |
| "$1-$2", [ | |
| "125" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{2})(\\d{2})", | |
| "$1-$2-$3", | |
| ["121"] | |
| ], | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1-$2-$3", | |
| ["[2-489]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1-$2-$3", | |
| ["[57]"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})", | |
| "$1-$2-$3", | |
| ["12"] | |
| ], | |
| ["(\\d{4})(\\d{6})", | |
| "$1-$2", [ | |
| "159" | |
| ] | |
| ], | |
| ["(\\d)(\\d{3})(\\d{3})(\\d{3})", | |
| "$1-$2-$3-$4", | |
| ["1[7-9]"] | |
| ], | |
| ["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", | |
| "$1-$2 $3-$4", | |
| ["15"] | |
| ] | |
| ], "0" | |
| ], | |
| IM: ["44", "00", | |
| "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", | |
| [10], 0, "0", 0, | |
| "([25-8]\\d{5})$|0", | |
| "1624$1", 0, | |
| "74576|(?:16|7[56])24" | |
| ], | |
| IN: ["91", "00", | |
| "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", | |
| [8, 9, 10, 11, 12, | |
| 13 | |
| ], | |
| [ | |
| ["(\\d{8})", | |
| "$1", [ | |
| "5(?:0|2[23]|3[03]|[67]1|88)", | |
| "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", | |
| "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)" | |
| ], 0, 1 | |
| ], | |
| ["(\\d{4})(\\d{4,5})", | |
| "$1 $2", [ | |
| "180", | |
| "1800" | |
| ], 0, 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["140"], 0, | |
| 1 | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", | |
| "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", | |
| "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])" | |
| ], "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", | |
| "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", | |
| "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]" | |
| ], "0$1", 1 | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", | |
| "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", | |
| "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]" | |
| ], "0$1", 1 | |
| ], | |
| ["(\\d{5})(\\d{5})", | |
| "$1 $2", [ | |
| "[6-9]" | |
| ], "0$1", 1 | |
| ], | |
| ["(\\d{4})(\\d{2,4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1(?:6|8[06])", | |
| "1(?:6|8[06]0)" | |
| ], 0, 1 | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["18"], 0, 1 | |
| ] | |
| ], "0" | |
| ], | |
| IO: ["246", "00", "3\\d{6}", | |
| [7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "3" | |
| ] | |
| ] | |
| ] | |
| ], | |
| IQ: ["964", "00", | |
| "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", | |
| [8, 9, 10], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[2-6]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["7"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| IR: ["98", "00", | |
| "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", | |
| [4, 5, 6, 7, 10], | |
| [ | |
| ["(\\d{4,5})", | |
| "$1", [ | |
| "96"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4,5})", | |
| "$1 $2", [ | |
| "(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["9"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[1-8]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| IS: ["354", | |
| "00|1(?:0(?:01|[12]0)|100)", | |
| "(?:38\\d|[4-9])\\d{6}", | |
| [7, 9], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[4-9]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["3"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| 0, "00" | |
| ], | |
| IT: ["39", "00", | |
| "0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", | |
| [6, 7, 8, 9, 10, | |
| 11], | |
| [ | |
| ["(\\d{2})(\\d{4,6})", | |
| "$1 $2", [ | |
| "0[26]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3,6})", | |
| "$1 $2", [ | |
| "0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", | |
| "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{2,6})", | |
| "$1 $2", [ | |
| "0(?:[13-579][2-46-8]|8[236-8])" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "894" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{3,4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["0[26]|5"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "1(?:44|[679])|[378]"] | |
| ], | |
| ["(\\d{3})(\\d{3,4})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "0[13-57-9][0159]|14"] | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{5})", | |
| "$1 $2 $3", | |
| ["0[26]"] | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["0"] | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{4,5})", | |
| "$1 $2 $3", | |
| ["3"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [ | |
| [ | |
| "0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"], | |
| ["3[1-9]\\d{8}|3[2-9]\\d{7}", | |
| [9, 10] | |
| ], | |
| ["80(?:0\\d{3}|3)\\d{3}", | |
| [6, 9] | |
| ], | |
| ["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", | |
| [6, 8, 9, | |
| 10] | |
| ], | |
| ["1(?:78\\d|99)\\d{6}", | |
| [9, 10] | |
| ], 0, 0, 0, [ | |
| "55\\d{8}", | |
| [10] | |
| ], | |
| ["84(?:[08]\\d{3}|[17])\\d{3}", | |
| [6, 9] | |
| ] | |
| ] | |
| ], | |
| JE: ["44", "00", | |
| "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", | |
| [10], 0, "0", 0, | |
| "([0-24-8]\\d{5})$|0", | |
| "1534$1", 0, 0, [ | |
| [ | |
| "1534[0-24-8]\\d{5}"], | |
| [ | |
| "7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}"], | |
| [ | |
| "80(?:07(?:35|81)|8901)\\d{4}"], | |
| [ | |
| "(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"], | |
| [ | |
| "701511\\d{4}"], | |
| 0, [ | |
| "(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"], | |
| [ | |
| "76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"], | |
| ["56\\d{8}"] | |
| ] | |
| ], | |
| JM: ["1", "011", | |
| "(?:[58]\\d\\d|658|900)\\d{7}", | |
| [10], 0, "1", 0, 0, | |
| 0, 0, "658|876" | |
| ], | |
| JO: ["962", "00", | |
| "(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}", | |
| [8, 9], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "[2356]|87"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{5,6})", | |
| "$1 $2", [ | |
| "[89]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{7})", | |
| "$1 $2", [ | |
| "70" | |
| ], "0$1" | |
| ], | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["7"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| JP: ["81", "010", | |
| "00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", | |
| [8, 9, 10, 11, 12, | |
| 13, 14, 15, 16, | |
| 17 | |
| ], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1-$2-$3", | |
| [ | |
| "(?:12|57|99)0"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d)(\\d{4})", | |
| "$1-$2-$3", | |
| ["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", | |
| "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", | |
| "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1-$2-$3", | |
| ["60"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1-$2-$3", | |
| ["[36]|4(?:2[09]|7[01])", | |
| "[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1-$2-$3", | |
| ["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", | |
| "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", | |
| "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{4})", | |
| "$1-$2-$3", | |
| [ | |
| "[14]|[289][2-9]|5[3-9]|7[2-4679]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1-$2-$3", | |
| ["800"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1-$2-$3", | |
| ["[257-9]"], | |
| "0$1" | |
| ] | |
| ], "0", 0, | |
| "(000[259]\\d{6})$|(?:(?:003768)0?)|0", | |
| "$1" | |
| ], | |
| KE: ["254", "000", | |
| "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", | |
| [7, 8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{5,7})", | |
| "$1 $2", [ | |
| "[24-6]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{6})", | |
| "$1 $2", [ | |
| "[17]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[89]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| KG: ["996", "00", | |
| "8\\d{9}|[235-9]\\d{8}", | |
| [9, 10], | |
| [ | |
| ["(\\d{4})(\\d{5})", | |
| "$1 $2", [ | |
| "3(?:1[346]|[24-79])" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[235-79]|88"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d)(\\d{2,3})", | |
| "$1 $2 $3 $4", | |
| ["8"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| KH: ["855", "00[14-9]", | |
| "1\\d{9}|[1-9]\\d{7,8}", | |
| [8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[1-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ] | |
| ], "0" | |
| ], | |
| KI: ["686", "00", | |
| "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", | |
| [5, 8], 0, "0" | |
| ], | |
| KM: ["269", "00", | |
| "[3478]\\d{6}", [7], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3", | |
| ["[3478]"] | |
| ] | |
| ] | |
| ], | |
| KN: ["1", "011", | |
| "(?:[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-7]\\d{6})$|1", | |
| "869$1", 0, "869" | |
| ], | |
| KP: ["850", "00|99", | |
| "85\\d{6}|(?:19\\d|[2-7])\\d{7}", | |
| [8, 10], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["8"], "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[2-7]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| KR: ["82", | |
| "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", | |
| "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", | |
| [5, 6, 8, 9, 10, 11, | |
| 12, 13, 14 | |
| ], | |
| [ | |
| ["(\\d{2})(\\d{3,4})", | |
| "$1-$2", [ | |
| "(?:3[1-3]|[46][1-4]|5[1-5])1" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1-$2", [ | |
| "1" | |
| ] | |
| ], | |
| ["(\\d)(\\d{3,4})(\\d{4})", | |
| "$1-$2-$3", | |
| ["2"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1-$2-$3", | |
| ["60|8"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3,4})(\\d{4})", | |
| "$1-$2-$3", | |
| [ | |
| "[1346]|5[1-5]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1-$2-$3", | |
| ["[57]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{5})(\\d{4})", | |
| "$1-$2-$3", | |
| ["5"], "0$1" | |
| ] | |
| ], "0", 0, | |
| "0(8(?:[1-46-8]|5\\d\\d))?" | |
| ], | |
| KW: ["965", "00", | |
| "18\\d{5}|(?:[2569]\\d|41)\\d{6}", | |
| [7, 8], | |
| [ | |
| ["(\\d{4})(\\d{3,4})", | |
| "$1 $2", [ | |
| "[169]|2(?:[235]|4[1-35-9])|52" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "[245]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| KY: ["1", "011", | |
| "(?:345|[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-9]\\d{6})$|1", | |
| "345$1", 0, "345" | |
| ], | |
| KZ: ["7", "810", | |
| "(?:33622|8\\d{8})\\d{5}|[78]\\d{9}", | |
| [10, 14], 0, "8", 0, | |
| 0, 0, 0, "33|7", 0, | |
| "8~10" | |
| ], | |
| LA: ["856", "00", | |
| "[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}", | |
| [8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "2[13]|3[14]|[4-8]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "30[013-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["[23]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| LB: ["961", "00", | |
| "[27-9]\\d{7}|[13-9]\\d{6}", | |
| [7, 8], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[27-9]"] | |
| ] | |
| ], "0" | |
| ], | |
| LC: ["1", "011", | |
| "(?:[58]\\d\\d|758|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-8]\\d{6})$|1", | |
| "758$1", 0, "758" | |
| ], | |
| LI: ["423", "00", | |
| "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", | |
| [7, 9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3", | |
| ["[2379]|8(?:0[09]|7)", | |
| "[2379]|8(?:0(?:02|9)|7)" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["69"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["6"] | |
| ] | |
| ], "0", 0, | |
| "(1001)|0" | |
| ], | |
| LK: ["94", "00", | |
| "[1-9]\\d{8}", [9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["7"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[1-689]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| LR: ["231", "00", | |
| "(?:[25]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", | |
| [7, 8, 9], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[4-6]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["2"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[23578]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| LS: ["266", "00", | |
| "(?:[256]\\d\\d|800)\\d{5}", | |
| [8], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[2568]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| LT: ["370", "00", | |
| "(?:[3469]\\d|52|[78]0)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["52[0-7]"], | |
| "(8-$1)", 1 | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[7-9]"], | |
| "8 $1", 1 | |
| ], | |
| ["(\\d{2})(\\d{6})", | |
| "$1 $2", [ | |
| "37|4(?:[15]|6[1-8])" | |
| ], "(8-$1)", | |
| 1 | |
| ], | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "[3-6]" | |
| ], "(8-$1)", | |
| 1 | |
| ] | |
| ], "8", 0, "[08]" | |
| ], | |
| LU: ["352", "00", | |
| "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", | |
| [4, 5, 6, 7, 8, 9, | |
| 10, 11 | |
| ], | |
| [ | |
| ["(\\d{2})(\\d{3})", | |
| "$1 $2", [ | |
| "2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3", | |
| [ | |
| "2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "20[2-689]"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "2(?:[0367]|4[3-8])"] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "80[01]|90[015]"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["20"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["6"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", | |
| "$1 $2 $3 $4 $5", | |
| [ | |
| "2(?:[0367]|4[3-8])"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"] | |
| ] | |
| ], 0, 0, | |
| "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)" | |
| ], | |
| LV: ["371", "00", | |
| "(?:[268]\\d|90)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[269]|8[01]"] | |
| ] | |
| ] | |
| ], | |
| LY: ["218", "00", | |
| "[2-9]\\d{8}", [9], | |
| [ | |
| ["(\\d{2})(\\d{7})", | |
| "$1-$2", [ | |
| "[2-9]" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| MA: ["212", "00", | |
| "[5-8]\\d{8}", [9], | |
| [ | |
| ["(\\d{5})(\\d{4})", | |
| "$1-$2", [ | |
| "5(?:29|38)", | |
| "5(?:29[1289]|389)", | |
| "529(?:1[1-46-9]|2[013-8]|90)|5(?:298|389)[0-46-9]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["5[45]"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{5})", | |
| "$1-$2", [ | |
| "5(?:2[2-489]|3[5-9]|9)|892", | |
| "5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{7})", | |
| "$1-$2", [ | |
| "8" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{6})", | |
| "$1-$2", [ | |
| "[5-7]" | |
| ], "0$1" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, [ | |
| [ | |
| "5293[01]\\d{4}|5(?:2(?:[0-25-7]\\d|3[1-578]|4[02-46-8]|8[0235-7]|9[0-289])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[0189]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"], | |
| [ | |
| "(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|2[0-2]|6[0-8]|8[0-3]))\\d{6}"], | |
| ["80\\d{7}"], | |
| ["89\\d{7}"], 0, | |
| 0, 0, 0, [ | |
| "592(?:4[0-2]|93)\\d{4}" | |
| ] | |
| ] | |
| ], | |
| MC: ["377", "00", | |
| "(?:[3489]|6\\d)\\d{7}", | |
| [8, 9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["4"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[389]"] | |
| ], | |
| ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4 $5", | |
| ["6"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| MD: ["373", "00", | |
| "(?:[235-7]\\d|[89]0)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "[89]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["22|3"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[25-7]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| ME: ["382", "00", | |
| "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", | |
| [8, 9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[2-9]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| MF: ["590", "00", | |
| "590\\d{6}|(?:69|80|9\\d)\\d{7}", | |
| [9], 0, "0", 0, 0, | |
| 0, 0, 0, [ | |
| [ | |
| "590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"], | |
| [ | |
| "69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"], | |
| [ | |
| "80[0-5]\\d{6}"], | |
| 0, 0, 0, 0, 0, [ | |
| "9(?:(?:395|76[018])\\d|475[0-5])\\d{4}" | |
| ] | |
| ] | |
| ], | |
| MG: ["261", "00", | |
| "[23]\\d{8}", [9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{3})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[23]"], | |
| "0$1" | |
| ] | |
| ], "0", 0, | |
| "([24-9]\\d{6})$|0", | |
| "20$1" | |
| ], | |
| MH: ["692", "011", | |
| "329\\d{4}|(?:[256]\\d|45)\\d{5}", | |
| [7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1-$2", [ | |
| "[2-6]" | |
| ] | |
| ] | |
| ], "1" | |
| ], | |
| MK: ["389", "00", | |
| "[2-578]\\d{7}", [ | |
| 8], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "2|34[47]|4(?:[37]7|5[47]|64)"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[347]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d)(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[58]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| ML: ["223", "00", | |
| "[24-9]\\d{7}", [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[24-9]"] | |
| ] | |
| ] | |
| ], | |
| MM: ["95", "00", | |
| "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", | |
| [6, 7, 8, 9, 10], | |
| [ | |
| ["(\\d)(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| ["16|2"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[12]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "[4-7]|8[1-35]"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{4,6})", | |
| "$1 $2 $3", | |
| [ | |
| "9(?:2[0-4]|[35-9]|4[137-9])"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["2"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["8"], "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["92"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{5})(\\d{4})", | |
| "$1 $2 $3", | |
| ["9"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| MN: ["976", "001", | |
| "[12]\\d{7,9}|[5-9]\\d{7}", | |
| [8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[12]1"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[5-9]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{5,6})", | |
| "$1 $2", [ | |
| "[12]2[1-3]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{5,6})", | |
| "$1 $2", [ | |
| "[12](?:27|3[2-8]|4[2-68]|5[1-4689])", | |
| "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{5})(\\d{4,5})", | |
| "$1 $2", [ | |
| "[12]" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| MO: ["853", "00", | |
| "0800\\d{3}|(?:28|[68]\\d)\\d{6}", | |
| [7, 8], | |
| [ | |
| ["(\\d{4})(\\d{3})", | |
| "$1 $2", [ | |
| "0" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[268]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| MP: ["1", "011", | |
| "[58]\\d{9}|(?:67|90)0\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-9]\\d{6})$|1", | |
| "670$1", 0, "670" | |
| ], | |
| MQ: ["596", "00", | |
| "596\\d{6}|(?:69|80|9\\d)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[569]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["8"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| MR: ["222", "00", | |
| "(?:[2-4]\\d\\d|800)\\d{5}", | |
| [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[2-48]"] | |
| ] | |
| ] | |
| ], | |
| MS: ["1", "011", | |
| "(?:[58]\\d\\d|664|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([34]\\d{6})$|1", | |
| "664$1", 0, "664" | |
| ], | |
| MT: ["356", "00", | |
| "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", | |
| [8], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[2357-9]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| MU: ["230", | |
| "0(?:0|[24-7]0|3[03])", | |
| "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", | |
| [7, 8, 10], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[2-46]|8[013]" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[57]" | |
| ] | |
| ], | |
| ["(\\d{5})(\\d{5})", | |
| "$1 $2", [ | |
| "8" | |
| ] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| 0, "020" | |
| ], | |
| MV: ["960", "0(?:0|19)", | |
| "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", | |
| [7, 10], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1-$2", [ | |
| "[34679]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[89]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| 0, "00" | |
| ], | |
| MW: ["265", "00", | |
| "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", | |
| [7, 9], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["1[2-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["2"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[137-9]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| MX: ["52", "0[09]", | |
| "1(?:(?:[27]2|44|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-9]|8[1-79]|9[1-8])|[2-9]\\d)\\d{8}", | |
| [10, 11], | |
| [ | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "33|5[56]|81"], | |
| 0, 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[2-9]"], | |
| 0, 1 | |
| ], | |
| ["(\\d)(\\d{2})(\\d{4})(\\d{4})", | |
| "$2 $3 $4", | |
| [ | |
| "1(?:33|5[56]|81)"], | |
| 0, 1 | |
| ], | |
| ["(\\d)(\\d{3})(\\d{3})(\\d{4})", | |
| "$2 $3 $4", | |
| ["1"], 0, 1 | |
| ] | |
| ], "01", 0, | |
| "0(?:[12]|4[45])|1", | |
| 0, 0, 0, 0, "00" | |
| ], | |
| MY: ["60", "00", | |
| "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", | |
| [8, 9, 10], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1-$2 $3", | |
| ["[4-79]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1-$2 $3", | |
| ["1(?:[02469]|[378][1-9]|53)|8", | |
| "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8" | |
| ], "0$1" | |
| ], | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1-$2 $3", | |
| ["3"], "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{2})(\\d{4})", | |
| "$1-$2-$3-$4", | |
| [ | |
| "1(?:[367]|80)"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1-$2 $3", | |
| ["15"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1-$2 $3", | |
| ["1"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| MZ: ["258", "00", | |
| "(?:2|8\\d)\\d{7}", | |
| [8, 9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "2|8[2-79]"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ] | |
| ] | |
| ], | |
| NA: ["264", "00", | |
| "[68]\\d{7,8}", [8, | |
| 9 | |
| ], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["88"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["6"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["87"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["8"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| NC: ["687", "00", | |
| "(?:050|[2-57-9]\\d\\d)\\d{3}", | |
| [6], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})", | |
| "$1.$2.$3", | |
| [ | |
| "[02-57-9]"] | |
| ] | |
| ] | |
| ], | |
| NE: ["227", "00", | |
| "[027-9]\\d{7}", [ | |
| 8], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["08"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "[089]|2[013]|7[047]"] | |
| ] | |
| ] | |
| ], | |
| NF: ["672", "00", | |
| "[13]\\d{5}", [6], | |
| [ | |
| ["(\\d{2})(\\d{4})", | |
| "$1 $2", [ | |
| "1[0-3]" | |
| ] | |
| ], | |
| ["(\\d)(\\d{5})", | |
| "$1 $2", [ | |
| "[13]" | |
| ] | |
| ] | |
| ], 0, 0, | |
| "([0-258]\\d{4})$", | |
| "3$1" | |
| ], | |
| NG: ["234", "009", | |
| "(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}", | |
| [7, 8, 10, 11, 12, | |
| 13, 14 | |
| ], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| ["78"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "[12]|9(?:0[3-9]|[1-9])"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2,3})", | |
| "$1 $2 $3", | |
| [ | |
| "[3-7]|8[2-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[7-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{4,5})", | |
| "$1 $2 $3", | |
| ["[78]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{5})(\\d{5,6})", | |
| "$1 $2 $3", | |
| ["[78]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| NI: ["505", "00", | |
| "(?:1800|[25-8]\\d{3})\\d{4}", | |
| [8], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[125-8]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| NL: ["31", "00", | |
| "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", | |
| [5, 6, 7, 8, 9, 10, | |
| 11 | |
| ], | |
| [ | |
| ["(\\d{3})(\\d{4,7})", | |
| "$1 $2", [ | |
| "[89]0" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{7})", | |
| "$1 $2", [ | |
| "66" | |
| ], "0$1" | |
| ], | |
| ["(\\d)(\\d{8})", | |
| "$1 $2", [ | |
| "6" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "[1-578]|91"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{5})", | |
| "$1 $2 $3", | |
| ["9"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| NO: ["47", "00", | |
| "(?:0|[2-9]\\d{3})\\d{4}", | |
| [5, 8], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[2-79]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, | |
| "[02-689]|7[0-8]" | |
| ], | |
| NP: ["977", "00", | |
| "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", | |
| [8, 10, 11], | |
| [ | |
| ["(\\d)(\\d{7})", | |
| "$1-$2", [ | |
| "1[2-6]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{6})", | |
| "$1-$2", [ | |
| "1[01]|[2-8]|9(?:[1-59]|[67][2-6])" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{7})", | |
| "$1-$2", [ | |
| "9" | |
| ] | |
| ] | |
| ], "0" | |
| ], | |
| NR: ["674", "00", | |
| "(?:444|(?:55|8\\d)\\d|666)\\d{4}", | |
| [7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[4-68]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| NU: ["683", "00", | |
| "(?:[47]|888\\d)\\d{3}", | |
| [4, 7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "8" | |
| ] | |
| ] | |
| ] | |
| ], | |
| NZ: ["64", "0(?:0|161)", | |
| "[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}", | |
| [5, 6, 7, 8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{3,8})", | |
| "$1 $2", [ | |
| "8[1-79]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2,3})", | |
| "$1 $2 $3", | |
| ["50[036-8]|8|90", | |
| "50(?:[0367]|88)|8|90" | |
| ], "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "24|[346]|7[2-57-9]|9[2-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "2(?:10|74)|[589]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3,4})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "1|2[028]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,5})", | |
| "$1 $2 $3", | |
| [ | |
| "2(?:[169]|7[0-35-9])|7"], | |
| "0$1" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, 0, "00" | |
| ], | |
| OM: ["968", "00", | |
| "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", | |
| [7, 8, 9], | |
| [ | |
| ["(\\d{3})(\\d{4,6})", | |
| "$1 $2", [ | |
| "[58]" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{6})", | |
| "$1 $2", [ | |
| "2" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[179]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| PA: ["507", "00", | |
| "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", | |
| [7, 8, 10, 11], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1-$2", [ | |
| "[1-57-9]" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1-$2", [ | |
| "[68]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ] | |
| ] | |
| ], | |
| PE: ["51", | |
| "00|19(?:1[124]|77|90)00", | |
| "(?:[14-8]|9\\d)\\d{7}", | |
| [8, 9], | |
| [ | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "80" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d)(\\d{7})", | |
| "$1 $2", [ | |
| "1" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{6})", | |
| "$1 $2", [ | |
| "[4-8]" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["9"] | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, 0, "00", | |
| " Anexo " | |
| ], | |
| PF: ["689", "00", | |
| "4\\d{5}(?:\\d{2})?|8\\d{7,8}", | |
| [6, 8, 9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3", | |
| ["44"] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["4|8[7-9]"] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["8"] | |
| ] | |
| ] | |
| ], | |
| PG: ["675", "00|140[1-3]", | |
| "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", | |
| [7, 8], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "18|[2-69]|85" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[78]" | |
| ] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| 0, "00" | |
| ], | |
| PH: ["63", "00", | |
| "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", | |
| [6, 8, 9, 10, 11, | |
| 12, 13 | |
| ], | |
| [ | |
| ["(\\d)(\\d{5})", | |
| "$1 $2", [ | |
| "2" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{4})(\\d{4,6})", | |
| "$1 $2", [ | |
| "3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", | |
| "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{5})(\\d{4})", | |
| "$1 $2", [ | |
| "346|4(?:27|9[35])|883", | |
| "3469|4(?:279|9(?:30|56))|8834" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["2"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "[3-7]|8[2-8]"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[89]"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ], | |
| ["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3 $4", | |
| ["1"] | |
| ] | |
| ], "0" | |
| ], | |
| PK: ["92", "00", | |
| "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", | |
| [8, 9, 10, 11, 12], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{2,7})", | |
| "$1 $2 $3", | |
| ["[89]0"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{5})", | |
| "$1 $2", [ | |
| "1" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{6,7})", | |
| "$1 $2", [ | |
| "2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", | |
| "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{7,8})", | |
| "$1 $2", [ | |
| "(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{5})(\\d{5})", | |
| "$1 $2", [ | |
| "58" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{7})", | |
| "$1 $2", [ | |
| "3" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["[24-9]"], | |
| "(0$1)" | |
| ] | |
| ], "0" | |
| ], | |
| PL: ["48", "00", | |
| "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", | |
| [6, 7, 8, 9, 10], | |
| [ | |
| ["(\\d{5})", | |
| "$1", ["19"] | |
| ], | |
| ["(\\d{3})(\\d{3})", | |
| "$1 $2", [ | |
| "11|20|64" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{3})", | |
| "$1 $2 $3", | |
| ["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", | |
| "(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2,3})", | |
| "$1 $2 $3", | |
| ["64"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "1[2-8]|[2-7]|8[1-79]|9[145]"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ] | |
| ] | |
| ], | |
| PM: ["508", "00", | |
| "[45]\\d{5}|(?:708|80\\d)\\d{6}", | |
| [6, 9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3", | |
| ["[45]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["7"] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["8"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| PR: ["1", "011", | |
| "(?:[589]\\d\\d|787)\\d{7}", | |
| [10], 0, "1", 0, 0, | |
| 0, 0, "787|939" | |
| ], | |
| PS: ["970", "00", | |
| "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", | |
| [8, 9, 10], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[2489]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["5"], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ] | |
| ], "0" | |
| ], | |
| PT: ["351", "00", | |
| "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["2[12]"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "16|[236-9]"] | |
| ] | |
| ] | |
| ], | |
| PW: ["680", "01[12]", | |
| "(?:[24-8]\\d\\d|345|900)\\d{4}", | |
| [7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[2-9]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| PY: ["595", "00", | |
| "59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}", | |
| [6, 7, 8, 9, 10, | |
| 11], | |
| [ | |
| ["(\\d{3})(\\d{3,6})", | |
| "$1 $2", [ | |
| "[2-9]0" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{5})", | |
| "$1 $2", [ | |
| "[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{3})(\\d{4,5})", | |
| "$1 $2", [ | |
| "2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], | |
| "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["87"] | |
| ], | |
| ["(\\d{3})(\\d{6})", | |
| "$1 $2", [ | |
| "9(?:[5-79]|8[1-6])" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[2-8]"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["9"] | |
| ] | |
| ], "0" | |
| ], | |
| QA: ["974", "00", | |
| "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", | |
| [7, 8, 9, 11], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "2[16]|8" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[3-7]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| RE: ["262", "00", | |
| "(?:26|[689]\\d)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[2689]"], | |
| "0$1" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, [ | |
| [ | |
| "26(?:2\\d\\d|3(?:0\\d|1[0-5]))\\d{4}"], | |
| [ | |
| "69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-27]|8[0-8]|9[0-479]))\\d{4}"], | |
| ["80\\d{7}"], | |
| [ | |
| "89[1-37-9]\\d{6}"], | |
| 0, 0, 0, 0, [ | |
| "9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}" | |
| ], | |
| [ | |
| "8(?:1[019]|2[0156]|84|90)\\d{6}"] | |
| ] | |
| ], | |
| RO: ["40", "00", | |
| "(?:[2378]\\d|90)\\d{7}|[23]\\d{5}", | |
| [6, 9], | |
| [ | |
| ["(\\d{3})(\\d{3})", | |
| "$1 $2", [ | |
| "2[3-6]", | |
| "2[3-6]\\d9" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4})", | |
| "$1 $2", [ | |
| "219|31" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[23]1"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[237-9]"], | |
| "0$1" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, 0, 0, " int " | |
| ], | |
| RS: ["381", "00", | |
| "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", | |
| [6, 7, 8, 9, 10, 11, | |
| 12 | |
| ], | |
| [ | |
| ["(\\d{3})(\\d{3,9})", | |
| "$1 $2", [ | |
| "(?:2[389]|39)0|[7-9]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{5,10})", | |
| "$1 $2", [ | |
| "[1-36]" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| RU: ["7", "810", | |
| "8\\d{13}|[347-9]\\d{9}", | |
| [10, 14], | |
| [ | |
| ["(\\d{4})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["7(?:1[0-8]|2[1-9])", | |
| "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", | |
| "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2" | |
| ], "8 ($1)", | |
| 1 | |
| ], | |
| ["(\\d{5})(\\d)(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["7(?:1[0-68]|2[1-9])", | |
| "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", | |
| "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]" | |
| ], "8 ($1)", | |
| 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["7"], | |
| "8 ($1)", 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2-$3-$4", | |
| [ | |
| "[349]|8(?:[02-7]|1[1-8])"], | |
| "8 ($1)", 1 | |
| ], | |
| ["(\\d{4})(\\d{4})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["8"], | |
| "8 ($1)" | |
| ] | |
| ], "8", 0, 0, 0, 0, | |
| "3[04-689]|[489]", | |
| 0, "8~10" | |
| ], | |
| RW: ["250", "00", | |
| "(?:06|[27]\\d\\d|[89]00)\\d{6}", | |
| [8, 9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["0"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["2"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[7-9]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| SA: ["966", "00", | |
| "92\\d{7}|(?:[15]|8\\d)\\d{8}", | |
| [9, 10], | |
| [ | |
| ["(\\d{4})(\\d{5})", | |
| "$1 $2", [ | |
| "9" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["5"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["81"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ] | |
| ], "0" | |
| ], | |
| SB: ["677", "0[01]", | |
| "(?:[1-6]|[7-9]\\d\\d)\\d{4}", | |
| [5, 7], | |
| [ | |
| ["(\\d{2})(\\d{5})", | |
| "$1 $2", [ | |
| "7|8[4-9]|9(?:[1-8]|9[0-8])" | |
| ] | |
| ] | |
| ] | |
| ], | |
| SC: ["248", "010|0[0-2]", | |
| "800\\d{4}|(?:[249]\\d|64)\\d{5}", | |
| [7], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[246]|9[57]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| 0, "00" | |
| ], | |
| SD: ["249", "00", | |
| "[19]\\d{8}", [9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[19]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| SE: ["46", "00", | |
| "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", | |
| [6, 7, 8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{2,3})(\\d{2})", | |
| "$1-$2 $3", | |
| ["20"], | |
| "0$1", 0, | |
| "$1 $2 $3" | |
| ], | |
| ["(\\d{3})(\\d{4})", | |
| "$1-$2", [ | |
| "9(?:00|39|44|9)" | |
| ], "0$1", 0, | |
| "$1 $2" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})", | |
| "$1-$2 $3", | |
| [ | |
| "[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], | |
| "0$1", 0, | |
| "$1 $2 $3" | |
| ], | |
| ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", | |
| "$1-$2 $3 $4", | |
| ["8"], | |
| "0$1", 0, | |
| "$1 $2 $3 $4" | |
| ], | |
| ["(\\d{3})(\\d{2,3})(\\d{2})", | |
| "$1-$2 $3", | |
| [ | |
| "1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], | |
| "0$1", 0, | |
| "$1 $2 $3" | |
| ], | |
| ["(\\d{3})(\\d{2,3})(\\d{3})", | |
| "$1-$2 $3", | |
| [ | |
| "9(?:00|39|44)"], | |
| "0$1", 0, | |
| "$1 $2 $3" | |
| ], | |
| ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", | |
| "$1-$2 $3 $4", | |
| [ | |
| "1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], | |
| "0$1", 0, | |
| "$1 $2 $3 $4" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1-$2 $3 $4", | |
| ["10|7"], | |
| "0$1", 0, | |
| "$1 $2 $3 $4" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{3})(\\d{2})", | |
| "$1-$2 $3 $4", | |
| ["8"], | |
| "0$1", 0, | |
| "$1 $2 $3 $4" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1-$2 $3 $4", | |
| [ | |
| "[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], | |
| "0$1", 0, | |
| "$1 $2 $3 $4" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", | |
| "$1-$2 $3 $4", | |
| ["9"], | |
| "0$1", 0, | |
| "$1 $2 $3 $4" | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1-$2 $3 $4 $5", | |
| ["[26]"], | |
| "0$1", 0, | |
| "$1 $2 $3 $4 $5" | |
| ] | |
| ], "0" | |
| ], | |
| SG: ["65", "0[0-3]\\d", | |
| "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", | |
| [8, 10, 11], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[369]|8(?:0[1-8]|[1-9])" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["8"] | |
| ], | |
| ["(\\d{4})(\\d{4})(\\d{3})", | |
| "$1 $2 $3", | |
| ["7"] | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ] | |
| ] | |
| ], | |
| SH: ["290", "00", | |
| "(?:[256]\\d|8)\\d{3}", | |
| [4, 5], 0, 0, 0, 0, | |
| 0, 0, "[256]" | |
| ], | |
| SI: ["386", | |
| "00|10(?:22|66|88|99)", | |
| "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", | |
| [5, 6, 7, 8], | |
| [ | |
| ["(\\d{2})(\\d{3,6})", | |
| "$1 $2", [ | |
| "8[09]|9" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "59|8" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[37][01]|4[0139]|51|6"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[1-57]"], | |
| "(0$1)" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, 0, "00" | |
| ], | |
| SJ: ["47", "00", | |
| "0\\d{4}|(?:[489]\\d|79)\\d{6}", | |
| [5, 8], 0, 0, 0, 0, | |
| 0, 0, "79" | |
| ], | |
| SK: ["421", "00", | |
| "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", | |
| [6, 7, 9], | |
| [ | |
| ["(\\d)(\\d{2})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["21"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{2,3})", | |
| "$1 $2 $3", | |
| ["[3-5][1-8]1", | |
| "[3-5][1-8]1[67]" | |
| ], "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{3})(\\d{2})", | |
| "$1/$2 $3 $4", | |
| ["2"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[689]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1/$2 $3 $4", | |
| ["[3-5]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| SL: ["232", "00", | |
| "(?:[237-9]\\d|66)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{2})(\\d{6})", | |
| "$1 $2", [ | |
| "[236-9]" | |
| ], "(0$1)" | |
| ] | |
| ], "0" | |
| ], | |
| SM: ["378", "00", | |
| "(?:0549|[5-7]\\d)\\d{6}", | |
| [8, 10], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[5-7]"] | |
| ], | |
| ["(\\d{4})(\\d{6})", | |
| "$1 $2", [ | |
| "0" | |
| ] | |
| ] | |
| ], 0, 0, | |
| "([89]\\d{5})$", | |
| "0549$1" | |
| ], | |
| SN: ["221", "00", | |
| "(?:[378]\\d|93)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["8"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[379]"] | |
| ] | |
| ] | |
| ], | |
| SO: ["252", "00", | |
| "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", | |
| [6, 7, 8, 9], | |
| [ | |
| ["(\\d{2})(\\d{4})", | |
| "$1 $2", [ | |
| "8[125]" | |
| ] | |
| ], | |
| ["(\\d{6})", | |
| "$1", [ | |
| "[134]" | |
| ] | |
| ], | |
| ["(\\d)(\\d{6})", | |
| "$1 $2", [ | |
| "[15]|2[0-79]|3[0-46-8]|4[0-7]" | |
| ] | |
| ], | |
| ["(\\d)(\\d{7})", | |
| "$1 $2", [ | |
| "(?:2|90)4|[67]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| [ | |
| "[348]|64|79|90"] | |
| ], | |
| ["(\\d{2})(\\d{5,7})", | |
| "$1 $2", [ | |
| "1|28|6[0-35-9]|77|9[2-9]" | |
| ] | |
| ] | |
| ], "0" | |
| ], | |
| SR: ["597", "00", | |
| "(?:[2-5]|68|[78]\\d)\\d{5}", | |
| [6, 7], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})", | |
| "$1-$2-$3", | |
| ["56"] | |
| ], | |
| ["(\\d{3})(\\d{3})", | |
| "$1-$2", [ | |
| "[2-5]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{4})", | |
| "$1-$2", [ | |
| "[6-8]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| SS: ["211", "00", | |
| "[19]\\d{8}", [9], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[19]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| ST: ["239", "00", | |
| "(?:22|9\\d)\\d{5}", | |
| [7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[29]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| SV: ["503", "00", | |
| "[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?", | |
| [7, 8, 11], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[89]" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[267]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[89]"] | |
| ] | |
| ] | |
| ], | |
| SX: ["1", "011", | |
| "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "(5\\d{6})$|1", | |
| "721$1", 0, "721" | |
| ], | |
| SY: ["963", "00", | |
| "[1-39]\\d{8}|[1-5]\\d{7}", | |
| [8, 9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[1-5]"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["9"], | |
| "0$1", 1 | |
| ] | |
| ], "0" | |
| ], | |
| SZ: ["268", "00", | |
| "0800\\d{4}|(?:[237]\\d|900)\\d{6}", | |
| [8, 9], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[0237]" | |
| ] | |
| ], | |
| ["(\\d{5})(\\d{4})", | |
| "$1 $2", [ | |
| "9" | |
| ] | |
| ] | |
| ] | |
| ], | |
| TA: ["290", "00", "8\\d{3}", | |
| [4], 0, 0, 0, 0, 0, | |
| 0, "8" | |
| ], | |
| TC: ["1", "011", | |
| "(?:[58]\\d\\d|649|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-479]\\d{6})$|1", | |
| "649$1", 0, "649" | |
| ], | |
| TD: ["235", "00|16", | |
| "(?:22|[69]\\d|77)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[2679]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| 0, "00" | |
| ], | |
| TG: ["228", "00", | |
| "[279]\\d{7}", [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[279]"] | |
| ] | |
| ] | |
| ], | |
| TH: ["66", "00[1-9]", | |
| "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", | |
| [8, 9, 10, 13], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["2"], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[13-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ] | |
| ], "0" | |
| ], | |
| TJ: ["992", "810", | |
| "[0-57-9]\\d{8}", [ | |
| 9], | |
| [ | |
| ["(\\d{6})(\\d)(\\d{2})", | |
| "$1 $2 $3", | |
| ["331", | |
| "3317" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "44[04]|[34]7"] | |
| ], | |
| ["(\\d{4})(\\d)(\\d{4})", | |
| "$1 $2 $3", | |
| ["3[1-5]"] | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[0-57-9]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| 0, "8~10" | |
| ], | |
| TK: ["690", "00", | |
| "[2-47]\\d{3,6}", [ | |
| 4, 5, 6, 7 | |
| ] | |
| ], | |
| TL: ["670", "00", | |
| "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", | |
| [7, 8], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[2-489]|70" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "7" | |
| ] | |
| ] | |
| ] | |
| ], | |
| TM: ["993", "810", | |
| "[1-6]\\d{7}", [8], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2-$3-$4", | |
| ["12"], | |
| "(8 $1)" | |
| ], | |
| ["(\\d{3})(\\d)(\\d{2})(\\d{2})", | |
| "$1 $2-$3-$4", | |
| ["[1-5]"], | |
| "(8 $1)" | |
| ], | |
| ["(\\d{2})(\\d{6})", | |
| "$1 $2", [ | |
| "6" | |
| ], "8 $1" | |
| ] | |
| ], "8", 0, 0, 0, 0, | |
| 0, 0, "8~10" | |
| ], | |
| TN: ["216", "00", | |
| "[2-57-9]\\d{7}", [ | |
| 8], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[2-57-9]"] | |
| ] | |
| ] | |
| ], | |
| TO: ["676", "00", | |
| "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", | |
| [5, 7], | |
| [ | |
| ["(\\d{2})(\\d{3})", | |
| "$1-$2", [ | |
| "[2-4]|50|6[09]|7[0-24-69]|8[05]" | |
| ] | |
| ], | |
| ["(\\d{4})(\\d{3})", | |
| "$1 $2", [ | |
| "0" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[5-9]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| TR: ["90", "00", | |
| "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", | |
| [7, 10, 12, 13], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "512|8[01589]|90"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["5(?:[0-59]|61)", | |
| "5(?:[0-59]|616)", | |
| "5(?:[0-59]|6161)" | |
| ], "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| [ | |
| "[24][1-8]|3[1-9]"], | |
| "(0$1)", 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{6,7})", | |
| "$1 $2 $3", | |
| ["80"], | |
| "0$1", 1 | |
| ] | |
| ], "0" | |
| ], | |
| TT: ["1", "011", | |
| "(?:[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-46-8]\\d{6})$|1", | |
| "868$1", 0, "868" | |
| ], | |
| TV: ["688", "00", | |
| "(?:2|7\\d\\d|90)\\d{4}", | |
| [5, 6, 7], | |
| [ | |
| ["(\\d{2})(\\d{3})", | |
| "$1 $2", [ | |
| "2" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{4})", | |
| "$1 $2", [ | |
| "90" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{5})", | |
| "$1 $2", [ | |
| "7" | |
| ] | |
| ] | |
| ] | |
| ], | |
| TW: ["886", | |
| "0(?:0[25-79]|19)", | |
| "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", | |
| [7, 8, 9, 10, 11], | |
| [ | |
| ["(\\d{2})(\\d)(\\d{4})", | |
| "$1 $2 $3", | |
| ["202"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[258]0"], | |
| "0$1" | |
| ], | |
| ["(\\d)(\\d{3,4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]", | |
| "[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[49]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4,5})", | |
| "$1 $2 $3", | |
| ["7"], "0$1" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, 0, 0, "#" | |
| ], | |
| TZ: ["255", "00[056]", | |
| "(?:[25-8]\\d|41|90)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{2})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[89]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[24]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{7})", | |
| "$1 $2", [ | |
| "5" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[67]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| UA: ["380", "00", | |
| "[89]\\d{9}|[3-9]\\d{8}", | |
| [9, 10], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", | |
| "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{5})", | |
| "$1 $2", [ | |
| "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", | |
| "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "[3-7]|89|9[1-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["[89]"], | |
| "0$1" | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, 0, "0~0" | |
| ], | |
| UG: ["256", "00[057]", | |
| "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{4})(\\d{5})", | |
| "$1 $2", [ | |
| "202", | |
| "2024" | |
| ], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{6})", | |
| "$1 $2", [ | |
| "[27-9]|4(?:6[45]|[7-9])" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{7})", | |
| "$1 $2", [ | |
| "[34]" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| US: ["1", "011", | |
| "[2-9]\\d{9}|3\\d{6}", | |
| [10], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1-$2", [ | |
| "310" | |
| ], 0, 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "($1) $2-$3", | |
| ["[2-9]"], | |
| 0, 1, | |
| "$1-$2-$3" | |
| ] | |
| ], "1", 0, 0, 0, 0, | |
| 0, [ | |
| [ | |
| "5056(?:[0-35-9]\\d|4[46])\\d{4}|(?:4722|505[2-57-9]|983[29])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[0-2]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"], | |
| [""], | |
| [ | |
| "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], | |
| [ | |
| "900[2-9]\\d{6}"], | |
| [ | |
| "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"] | |
| ] | |
| ], | |
| UY: ["598", | |
| "0(?:0|1[3-9]\\d)", | |
| "(?:0004|4)\\d{9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", | |
| [7, 8, 10, 13], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "405|8|90" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["9"], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[124]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["4"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3 $4", | |
| ["0"] | |
| ] | |
| ], "0", 0, 0, 0, 0, | |
| 0, 0, "00", " int. " | |
| ], | |
| UZ: ["998", "810", | |
| "200\\d{6}|(?:33|[5-79]\\d|88)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["[235-9]"], | |
| "8 $1" | |
| ] | |
| ], "8", 0, 0, 0, 0, | |
| 0, 0, "8~10" | |
| ], | |
| VA: ["39", "00", | |
| "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", | |
| [6, 7, 8, 9, 10, | |
| 11], 0, 0, 0, 0, 0, | |
| 0, "06698" | |
| ], | |
| VC: ["1", "011", | |
| "(?:[58]\\d\\d|784|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-7]\\d{6})$|1", | |
| "784$1", 0, "784" | |
| ], | |
| VE: ["58", "00", | |
| "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", | |
| [10], | |
| [ | |
| ["(\\d{3})(\\d{7})", | |
| "$1-$2", [ | |
| "[24-689]" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| VG: ["1", "011", | |
| "(?:284|[58]\\d\\d|900)\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-578]\\d{6})$|1", | |
| "284$1", 0, "284" | |
| ], | |
| VI: ["1", "011", | |
| "[58]\\d{9}|(?:34|90)0\\d{7}", | |
| [10], 0, "1", 0, | |
| "([2-9]\\d{6})$|1", | |
| "340$1", 0, "340" | |
| ], | |
| VN: ["84", "00", | |
| "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}", | |
| [7, 8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{5})", | |
| "$1 $2", [ | |
| "80" | |
| ], "0$1", 1 | |
| ], | |
| ["(\\d{4})(\\d{4,6})", | |
| "$1 $2", [ | |
| "1" | |
| ], 0, 1 | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["6"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[357-9]"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["2[48]"], | |
| "0$1", 1 | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{3})", | |
| "$1 $2 $3", | |
| ["2"], | |
| "0$1", 1 | |
| ] | |
| ], "0" | |
| ], | |
| VU: ["678", "00", | |
| "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", | |
| [5, 7], | |
| [ | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "[57-9]" | |
| ] | |
| ] | |
| ] | |
| ], | |
| WF: ["681", "00", | |
| "(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?", | |
| [6, 9], | |
| [ | |
| ["(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3", | |
| ["[478]"] | |
| ], | |
| ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", | |
| "$1 $2 $3 $4", | |
| ["8"] | |
| ] | |
| ] | |
| ], | |
| WS: ["685", "0", | |
| "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", | |
| [5, 6, 7, 10], | |
| [ | |
| ["(\\d{5})", | |
| "$1", [ | |
| "[2-5]|6[1-9]" | |
| ] | |
| ], | |
| ["(\\d{3})(\\d{3,7})", | |
| "$1 $2", [ | |
| "[68]" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{5})", | |
| "$1 $2", [ | |
| "7" | |
| ] | |
| ] | |
| ] | |
| ], | |
| XK: ["383", "00", | |
| "[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}", | |
| [8, 9], | |
| [ | |
| ["(\\d{3})(\\d{5})", | |
| "$1 $2", [ | |
| "[89]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[2-4]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[23]"], | |
| "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| YE: ["967", "00", | |
| "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", | |
| [7, 8, 9], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "[1-6]|7(?:[24-6]|8[0-7])"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["7"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| YT: ["262", "00", | |
| "(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}", | |
| [9], 0, "0", 0, 0, | |
| 0, 0, 0, [ | |
| [ | |
| "269(?:0[0-467]|5[0-4]|6\\d|[78]0)\\d{4}"], | |
| [ | |
| "639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"], | |
| ["80\\d{7}"], 0, | |
| 0, 0, 0, 0, [ | |
| "9(?:(?:39|47)8[01]|769\\d)\\d{4}" | |
| ] | |
| ] | |
| ], | |
| ZA: ["27", "00", | |
| "[1-79]\\d{8}|8\\d{4,9}", | |
| [5, 6, 7, 8, 9, 10], | |
| [ | |
| ["(\\d{2})(\\d{3,4})", | |
| "$1 $2", [ | |
| "8[1-4]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{2,3})", | |
| "$1 $2 $3", | |
| ["8[1-4]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["860"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[1-9]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["8"], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| ZM: ["260", "00", | |
| "800\\d{6}|(?:21|63|[79]\\d)\\d{7}", | |
| [9], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[28]"], | |
| "0$1" | |
| ], | |
| ["(\\d{2})(\\d{7})", | |
| "$1 $2", [ | |
| "[79]" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ], | |
| ZW: ["263", "00", | |
| "2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}", | |
| [5, 6, 7, 8, 9, 10], | |
| [ | |
| ["(\\d{3})(\\d{3,5})", | |
| "$1 $2", [ | |
| "2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]" | |
| ], "0$1" | |
| ], | |
| ["(\\d)(\\d{3})(\\d{2,4})", | |
| "$1 $2 $3", | |
| ["[49]"], | |
| "0$1" | |
| ], | |
| ["(\\d{3})(\\d{4})", | |
| "$1 $2", [ | |
| "80" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{7})", | |
| "$1 $2", [ | |
| "24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2", | |
| "2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]" | |
| ], "(0$1)" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["7"], "0$1" | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| ["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)", | |
| "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)" | |
| ], "0$1" | |
| ], | |
| ["(\\d{4})(\\d{6})", | |
| "$1 $2", [ | |
| "8" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3,5})", | |
| "$1 $2", [ | |
| "1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]" | |
| ], "0$1" | |
| ], | |
| ["(\\d{2})(\\d{3})(\\d{3,4})", | |
| "$1 $2 $3", | |
| [ | |
| "29[013-9]|39|54"], | |
| "0$1" | |
| ], | |
| ["(\\d{4})(\\d{3,5})", | |
| "$1 $2", [ | |
| "(?:25|54)8", | |
| "258|5483" | |
| ], "0$1" | |
| ] | |
| ], "0" | |
| ] | |
| }, | |
| nonGeographic: { | |
| 800: ["800", 0, | |
| "(?:00|[1-9]\\d)\\d{6}", | |
| [8], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "\\d" | |
| ] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [0, 0, [ | |
| "(?:00|[1-9]\\d)\\d{6}"]] | |
| ], | |
| 808: ["808", 0, | |
| "[1-9]\\d{7}", [8], | |
| [ | |
| ["(\\d{4})(\\d{4})", | |
| "$1 $2", [ | |
| "[1-9]" | |
| ] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [0, 0, 0, 0, 0, 0, | |
| 0, 0, 0, [ | |
| "[1-9]\\d{7}" | |
| ] | |
| ] | |
| ], | |
| 870: ["870", 0, | |
| "7\\d{11}|[35-7]\\d{8}", | |
| [9, 12], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["[35-7]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [0, [ | |
| "(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]] | |
| ], | |
| 878: ["878", 0, "10\\d{10}", | |
| [12], | |
| [ | |
| ["(\\d{2})(\\d{5})(\\d{5})", | |
| "$1 $2 $3", | |
| ["1"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [0, 0, 0, 0, 0, 0, | |
| 0, 0, [ | |
| "10\\d{10}" | |
| ] | |
| ] | |
| ], | |
| 881: ["881", 0, | |
| "[0-36-9]\\d{8}", [ | |
| 9], | |
| [ | |
| ["(\\d)(\\d{3})(\\d{5})", | |
| "$1 $2 $3", | |
| ["[0-36-9]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [0, [ | |
| "[0-36-9]\\d{8}"]] | |
| ], | |
| 882: ["882", 0, | |
| "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", | |
| [7, 8, 9, 10, 11, | |
| 12], | |
| [ | |
| ["(\\d{2})(\\d{5})", | |
| "$1 $2", [ | |
| "16|342" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{6})", | |
| "$1 $2", [ | |
| "49" | |
| ] | |
| ], | |
| ["(\\d{2})(\\d{2})(\\d{4})", | |
| "$1 $2 $3", | |
| ["1[36]|9"] | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{3})", | |
| "$1 $2 $3", | |
| ["3[23]"] | |
| ], | |
| ["(\\d{2})(\\d{3,4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["16"] | |
| ], | |
| ["(\\d{2})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| [ | |
| "10|23|3(?:[15]|4[57])|4|51"] | |
| ], | |
| ["(\\d{3})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["34"] | |
| ], | |
| ["(\\d{2})(\\d{4,5})(\\d{5})", | |
| "$1 $2 $3", | |
| ["[1-35]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [0, ["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}", | |
| [7, 8, 9, | |
| 10, 12 | |
| ] | |
| ], 0, 0, 0, 0, | |
| 0, 0, [ | |
| "1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}" | |
| ] | |
| ] | |
| ], | |
| 883: ["883", 0, | |
| "(?:[1-4]\\d|51)\\d{6,10}", | |
| [8, 9, 10, 11, 12], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{2,8})", | |
| "$1 $2 $3", | |
| [ | |
| "[14]|2[24-689]|3[02-689]|51[24-9]"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3", | |
| ["510"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{4})", | |
| "$1 $2 $3", | |
| ["21"] | |
| ], | |
| ["(\\d{4})(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["51[13]"] | |
| ], | |
| ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", | |
| "$1 $2 $3 $4", | |
| ["[235]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [0, 0, 0, 0, 0, 0, | |
| 0, 0, [ | |
| "(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[013-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}" | |
| ] | |
| ] | |
| ], | |
| 888: ["888", 0, "\\d{11}", [ | |
| 11 | |
| ], | |
| [ | |
| ["(\\d{3})(\\d{3})(\\d{5})", | |
| "$1 $2 $3" | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [0, 0, 0, 0, 0, 0, [ | |
| "\\d{11}" | |
| ]] | |
| ], | |
| 979: ["979", 0, | |
| "[1359]\\d{8}", [9], | |
| [ | |
| ["(\\d)(\\d{4})(\\d{4})", | |
| "$1 $2 $3", | |
| ["[1359]"] | |
| ] | |
| ], 0, 0, 0, 0, 0, 0, | |
| [0, 0, 0, [ | |
| "[1359]\\d{8}" | |
| ]] | |
| ] | |
| } | |
| }; | |
| function Ei(e, t) { | |
| var r = Array.prototype.slice.call( | |
| t); | |
| return r.push(bi), e.apply(this, r) | |
| } | |
| function $i(e) { | |
| return ($i = "function" == | |
| typeof Symbol && "symbol" == | |
| typeof Symbol.iterator ? | |
| function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && | |
| "function" == | |
| typeof Symbol && e | |
| .constructor === | |
| Symbol && e !== | |
| Symbol.prototype ? | |
| "symbol" : typeof e | |
| })(e) | |
| } | |
| function xi(e) { | |
| if (void 0 === e) | |
| throw ReferenceError( | |
| "this hasn't been initialised - super() hasn't been called" | |
| ); | |
| return e | |
| } | |
| function Ai(e) { | |
| var t = "function" == typeof Map ? | |
| new Map : void 0; | |
| return (Ai = function(e) { | |
| if (null === e || -1 === | |
| Function.toString | |
| .call(e).indexOf( | |
| "[native code]") | |
| ) return e; | |
| if ("function" != | |
| typeof e) | |
| throw TypeError( | |
| "Super expression must either be null or a function" | |
| ); | |
| if (void 0 !== t) { | |
| if (t.has(e)) | |
| return t.get(e); | |
| t.set(e, r) | |
| } | |
| function r() { | |
| return ki(e, | |
| arguments, | |
| Si(this) | |
| .constructor | |
| ) | |
| } | |
| return r.prototype = | |
| Object.create(e | |
| .prototype, { | |
| constructor: { | |
| value: r, | |
| enumerable: | |
| !1, | |
| writable: | |
| !0, | |
| configurable: | |
| !0 | |
| } | |
| }), _i(r, e) | |
| })(e) | |
| } | |
| function ki(e, t, r) { | |
| return (ki = Ti() ? Reflect | |
| .construct : function(e, t, | |
| r) { | |
| var n = [null]; | |
| n.push.apply(n, t); | |
| var i = new(Function | |
| .bind.apply(e, | |
| n)); | |
| return r && _i(i, r | |
| .prototype), i | |
| }).apply(null, arguments) | |
| } | |
| function Ti() { | |
| if ("undefined" == typeof Reflect || | |
| !Reflect.construct || Reflect | |
| .construct.sham) return !1; | |
| if ("function" == typeof Proxy) | |
| return !0; | |
| try { | |
| return Boolean.prototype.valueOf | |
| .call(Reflect.construct( | |
| Boolean, [], ( | |
| function() {}))), !0 | |
| } catch (e) { | |
| return !1 | |
| } | |
| } | |
| function _i(e, t) { | |
| return (_i = Object | |
| .setPrototypeOf || function( | |
| e, t) { | |
| return e.__proto__ = t, | |
| e | |
| })(e, t) | |
| } | |
| function Si(e) { | |
| return (Si = Object.setPrototypeOf ? | |
| Object.getPrototypeOf : | |
| function(e) { | |
| return e.__proto__ || | |
| Object | |
| .getPrototypeOf(e) | |
| })(e) | |
| } | |
| var Ni = function(e) { | |
| ! function(e, t) { | |
| if ("function" != | |
| typeof t && null !== t) | |
| throw TypeError( | |
| "Super expression must either be null or a function" | |
| ); | |
| e.prototype = Object.create( | |
| t && t.prototype, { | |
| constructor: { | |
| value: e, | |
| writable: ! | |
| 0, | |
| configurable: | |
| !0 | |
| } | |
| }), Object | |
| .defineProperty(e, | |
| "prototype", { | |
| writable: !1 | |
| }), t && _i(e, t) | |
| }(n, Ai(Error)); | |
| var t, r = (t = Ti(), | |
| function() { | |
| var e = Si(n); | |
| return function(e, | |
| t) { | |
| if (t && ( | |
| "object" === | |
| $i( | |
| t) || | |
| "function" == | |
| typeof t | |
| )) | |
| return t; | |
| if (void 0 !== | |
| t) throw TypeError( | |
| "Derived constructors may only return object or undefined" | |
| ); | |
| return xi(e) | |
| }(this, t ? | |
| Reflect | |
| .construct( | |
| e, | |
| arguments, | |
| Si(this) | |
| .constructor | |
| ) : e | |
| .apply(this, | |
| arguments | |
| )) | |
| }); | |
| function n(e) { | |
| var t; | |
| return function(e, t) { | |
| if (!( | |
| e instanceof t)) | |
| throw TypeError( | |
| "Cannot call a class as a function" | |
| ) | |
| }(this, n), Object | |
| .setPrototypeOf(xi(t = r | |
| .call(this, e)), | |
| n.prototype), t | |
| .name = t.constructor | |
| .name, t | |
| } | |
| return Object.defineProperty(n, | |
| "prototype", { | |
| writable: !1 | |
| }), n | |
| }(), | |
| Ii = "0-90-9٠-٩۰-۹", | |
| Pi = "".concat("-‐-―−ー-").concat( | |
| "//").concat("..").concat( | |
| " ").concat("()()[]\\[\\]") | |
| .concat("~⁓∼~"); | |
| function Oi(e, t) { | |
| e = e.split("-"), t = t.split("-"); | |
| for (var r = e[0].split("."), n = t[ | |
| 0].split("."), i = 0; i < | |
| 3; i++) { | |
| var a = Number(r[i]), | |
| o = Number(n[i]); | |
| if (a > o) return 1; | |
| if (o > a) return -1; | |
| if (!isNaN(a) && isNaN(o)) | |
| return 1; | |
| if (isNaN(a) && !isNaN(o)) | |
| return -1 | |
| } | |
| return e[1] && t[1] ? e[1] > t[1] ? | |
| 1 : e[1] < t[1] ? -1 : 0 : !e[ | |
| 1] && t[1] ? 1 : e[1] && !t[1] ? | |
| -1 : 0 | |
| } | |
| function Ri(e) { | |
| return (Ri = "function" == | |
| typeof Symbol && "symbol" == | |
| typeof Symbol.iterator ? | |
| function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && | |
| "function" == | |
| typeof Symbol && e | |
| .constructor === | |
| Symbol && e !== | |
| Symbol.prototype ? | |
| "symbol" : typeof e | |
| })(e) | |
| } | |
| function Mi(e, t) { | |
| if (!(e instanceof t)) | |
| throw TypeError( | |
| "Cannot call a class as a function" | |
| ) | |
| } | |
| function Li(e, t, r) { | |
| return t && function(e, t) { | |
| for (var r = 0; r < t | |
| .length; r++) { | |
| var n = t[r]; | |
| n.enumerable = n | |
| .enumerable || !1, n | |
| .configurable = !0, | |
| "value" in n && (n | |
| .writable = !0), | |
| Object | |
| .defineProperty(e, n | |
| .key, n) | |
| } | |
| }(e.prototype, t), Object | |
| .defineProperty(e, | |
| "prototype", { | |
| writable: !1 | |
| }), e | |
| } | |
| var Di = " ext. ", | |
| Fi = /^\d+$/, | |
| Ui = function() { | |
| function e(t) { | |
| Mi(this, e), | |
| function(e) { | |
| if (!e) throw Error( | |
| "[libphonenumber-js] `metadata` argument not passed. Check your arguments." | |
| ); | |
| if (!ji(e) || !ji(e | |
| .countries)) | |
| throw Error( | |
| "[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got " | |
| .concat( | |
| ji( | |
| e) ? | |
| "an object of shape: { " + | |
| Object | |
| .keys( | |
| e | |
| ) | |
| .join( | |
| ", " | |
| ) + | |
| " }" : | |
| "a " + | |
| qi( | |
| e) + | |
| ": " + | |
| e, | |
| ".") | |
| ) | |
| }(t), this.metadata = t, | |
| Ki.call(this, t) | |
| } | |
| return Li(e, [{ | |
| key: "getCountries", | |
| value: function() { | |
| return Object | |
| .keys( | |
| this | |
| .metadata | |
| .countries | |
| ) | |
| .filter( | |
| (function( | |
| e | |
| ) { | |
| return "001" !== | |
| e | |
| }) | |
| ) | |
| } | |
| }, { | |
| key: "getCountryMetadata", | |
| value: function( | |
| e) { | |
| return this | |
| .metadata | |
| .countries[ | |
| e | |
| ] | |
| } | |
| }, { | |
| key: "nonGeographic", | |
| value: function() { | |
| if (!(this | |
| .v1 || | |
| this | |
| .v2 || | |
| this | |
| .v3 | |
| )) | |
| return this | |
| .metadata | |
| .nonGeographic || | |
| this | |
| .metadata | |
| .nonGeographical | |
| } | |
| }, { | |
| key: "hasCountry", | |
| value: function( | |
| e) { | |
| return void 0 !== | |
| this | |
| .getCountryMetadata( | |
| e | |
| ) | |
| } | |
| }, { | |
| key: "hasCallingCode", | |
| value: function( | |
| e) { | |
| if (this | |
| .getCountryCodesForCallingCode( | |
| e | |
| ) | |
| ) | |
| return ! | |
| 0; | |
| if (this | |
| .nonGeographic() | |
| ) { | |
| if (this | |
| .nonGeographic()[ | |
| e | |
| ] | |
| ) | |
| return ! | |
| 0 | |
| } else { | |
| var t = | |
| this | |
| .countryCallingCodes()[ | |
| e | |
| ]; | |
| if (t && | |
| 1 === | |
| t | |
| .length && | |
| "001" === | |
| t[ | |
| 0] | |
| ) | |
| return ! | |
| 0 | |
| } | |
| } | |
| }, { | |
| key: "isNonGeographicCallingCode", | |
| value: function( | |
| e) { | |
| return this | |
| .nonGeographic() ? | |
| !! | |
| this | |
| .nonGeographic()[ | |
| e | |
| ] : | |
| ! | |
| this | |
| .getCountryCodesForCallingCode( | |
| e | |
| ) | |
| } | |
| }, { | |
| key: "country", | |
| value: function( | |
| e) { | |
| return this | |
| .selectNumberingPlan( | |
| e | |
| ) | |
| } | |
| }, { | |
| key: "selectNumberingPlan", | |
| value: function( | |
| e, t) { | |
| if (e && | |
| Fi | |
| .test( | |
| e | |
| ) && | |
| (t = e, | |
| e = | |
| null | |
| ), | |
| e && | |
| "001" !== | |
| e) { | |
| if (! | |
| this | |
| .hasCountry( | |
| e | |
| ) | |
| ) | |
| throw Error( | |
| "Unknown country: " | |
| .concat( | |
| e | |
| ) | |
| ); | |
| this.numberingPlan = | |
| new Wi( | |
| this | |
| .getCountryMetadata( | |
| e | |
| ), | |
| this | |
| ) | |
| } else if ( | |
| t) { | |
| if (! | |
| this | |
| .hasCallingCode( | |
| t | |
| ) | |
| ) | |
| throw Error( | |
| "Unknown calling code: " | |
| .concat( | |
| t | |
| ) | |
| ); | |
| this.numberingPlan = | |
| new Wi( | |
| this | |
| .getNumberingPlanMetadata( | |
| t | |
| ), | |
| this | |
| ) | |
| } else | |
| this | |
| .numberingPlan = | |
| void 0; | |
| return this | |
| } | |
| }, { | |
| key: "getCountryCodesForCallingCode", | |
| value: function( | |
| e) { | |
| var t = | |
| this | |
| .countryCallingCodes()[ | |
| e | |
| ]; | |
| if (t) { | |
| if (1 === | |
| t | |
| .length && | |
| 3 === | |
| t[ | |
| 0] | |
| .length | |
| ) | |
| return; | |
| return t | |
| } | |
| } | |
| }, { | |
| key: "getCountryCodeForCallingCode", | |
| value: function( | |
| e) { | |
| var t = | |
| this | |
| .getCountryCodesForCallingCode( | |
| e | |
| ); | |
| if (t) | |
| return t[ | |
| 0 | |
| ] | |
| } | |
| }, { | |
| key: "getNumberingPlanMetadata", | |
| value: function( | |
| e) { | |
| var t = | |
| this | |
| .getCountryCodeForCallingCode( | |
| e | |
| ); | |
| if (t) | |
| return this | |
| .getCountryMetadata( | |
| t | |
| ); | |
| if (this | |
| .nonGeographic() | |
| ) { | |
| var r = | |
| this | |
| .nonGeographic()[ | |
| e | |
| ]; | |
| if ( | |
| r) | |
| return r | |
| } else { | |
| var n = | |
| this | |
| .countryCallingCodes()[ | |
| e | |
| ]; | |
| if (n && | |
| 1 === | |
| n | |
| .length && | |
| "001" === | |
| n[ | |
| 0] | |
| ) | |
| return this | |
| .metadata | |
| .countries[ | |
| "001" | |
| ] | |
| } | |
| } | |
| }, { | |
| key: "countryCallingCode", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .callingCode() | |
| } | |
| }, { | |
| key: "IDDPrefix", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .IDDPrefix() | |
| } | |
| }, { | |
| key: "defaultIDDPrefix", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .defaultIDDPrefix() | |
| } | |
| }, { | |
| key: "nationalNumberPattern", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .nationalNumberPattern() | |
| } | |
| }, { | |
| key: "possibleLengths", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .possibleLengths() | |
| } | |
| }, { | |
| key: "formats", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .formats() | |
| } | |
| }, { | |
| key: "nationalPrefixForParsing", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .nationalPrefixForParsing() | |
| } | |
| }, { | |
| key: "nationalPrefixTransformRule", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .nationalPrefixTransformRule() | |
| } | |
| }, { | |
| key: "leadingDigits", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .leadingDigits() | |
| } | |
| }, { | |
| key: "hasTypes", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .hasTypes() | |
| } | |
| }, { | |
| key: "type", | |
| value: function( | |
| e) { | |
| return this | |
| .numberingPlan | |
| .type( | |
| e | |
| ) | |
| } | |
| }, { | |
| key: "ext", | |
| value: function() { | |
| return this | |
| .numberingPlan | |
| .ext() | |
| } | |
| }, { | |
| key: "countryCallingCodes", | |
| value: function() { | |
| return this | |
| .v1 ? | |
| this | |
| .metadata | |
| .country_phone_code_to_countries : | |
| this | |
| .metadata | |
| .country_calling_codes | |
| } | |
| }, { | |
| key: "chooseCountryByCountryCallingCode", | |
| value: function( | |
| e) { | |
| return this | |
| .selectNumberingPlan( | |
| e | |
| ) | |
| } | |
| }, { | |
| key: "hasSelectedNumberingPlan", | |
| value: function() { | |
| return void 0 !== | |
| this | |
| .numberingPlan | |
| } | |
| }]), e | |
| }(), | |
| Wi = function() { | |
| function e(t, r) { | |
| Mi(this, e), this | |
| .globalMetadataObject = | |
| r, this.metadata = t, Ki | |
| .call(this, r.metadata) | |
| } | |
| return Li(e, [{ | |
| key: "callingCode", | |
| value: function() { | |
| return this | |
| .metadata[ | |
| 0 | |
| ] | |
| } | |
| }, { | |
| key: "getDefaultCountryMetadataForRegion", | |
| value: function() { | |
| return this | |
| .globalMetadataObject | |
| .getNumberingPlanMetadata( | |
| this | |
| .callingCode() | |
| ) | |
| } | |
| }, { | |
| key: "IDDPrefix", | |
| value: function() { | |
| if (! | |
| this | |
| .v1 && | |
| ! | |
| this | |
| .v2) | |
| return this | |
| .metadata[ | |
| 1 | |
| ] | |
| } | |
| }, { | |
| key: "defaultIDDPrefix", | |
| value: function() { | |
| if (! | |
| this | |
| .v1 && | |
| ! | |
| this | |
| .v2) | |
| return this | |
| .metadata[ | |
| 12 | |
| ] | |
| } | |
| }, { | |
| key: "nationalNumberPattern", | |
| value: function() { | |
| return this | |
| .v1 || | |
| this | |
| .v2 ? | |
| this | |
| .metadata[ | |
| 1 | |
| ] : | |
| this | |
| .metadata[ | |
| 2 | |
| ] | |
| } | |
| }, { | |
| key: "possibleLengths", | |
| value: function() { | |
| if (! | |
| this | |
| .v1) | |
| return this | |
| .metadata[ | |
| this | |
| .v2 ? | |
| 2 : | |
| 3 | |
| ] | |
| } | |
| }, { | |
| key: "_getFormats", | |
| value: function( | |
| e) { | |
| return e[ | |
| this | |
| .v1 ? | |
| 2 : | |
| this | |
| .v2 ? | |
| 3 : | |
| 4 | |
| ] | |
| } | |
| }, { | |
| key: "formats", | |
| value: function() { | |
| var e = | |
| this; | |
| return (this | |
| ._getFormats( | |
| this | |
| .metadata | |
| ) || | |
| this | |
| ._getFormats( | |
| this | |
| .getDefaultCountryMetadataForRegion() | |
| ) || | |
| [] | |
| ) | |
| .map( | |
| (function( | |
| t | |
| ) { | |
| return new Bi( | |
| t, | |
| e | |
| ) | |
| }) | |
| ) | |
| } | |
| }, { | |
| key: "nationalPrefix", | |
| value: function() { | |
| return this | |
| .metadata[ | |
| this | |
| .v1 ? | |
| 3 : | |
| this | |
| .v2 ? | |
| 4 : | |
| 5 | |
| ] | |
| } | |
| }, { | |
| key: "_getNationalPrefixFormattingRule", | |
| value: function( | |
| e) { | |
| return e[ | |
| this | |
| .v1 ? | |
| 4 : | |
| this | |
| .v2 ? | |
| 5 : | |
| 6 | |
| ] | |
| } | |
| }, { | |
| key: "nationalPrefixFormattingRule", | |
| value: function() { | |
| return this | |
| ._getNationalPrefixFormattingRule( | |
| this | |
| .metadata | |
| ) || | |
| this | |
| ._getNationalPrefixFormattingRule( | |
| this | |
| .getDefaultCountryMetadataForRegion() | |
| ) | |
| } | |
| }, { | |
| key: "_nationalPrefixForParsing", | |
| value: function() { | |
| return this | |
| .metadata[ | |
| this | |
| .v1 ? | |
| 5 : | |
| this | |
| .v2 ? | |
| 6 : | |
| 7 | |
| ] | |
| } | |
| }, { | |
| key: "nationalPrefixForParsing", | |
| value: function() { | |
| return this | |
| ._nationalPrefixForParsing() || | |
| this | |
| .nationalPrefix() | |
| } | |
| }, { | |
| key: "nationalPrefixTransformRule", | |
| value: function() { | |
| return this | |
| .metadata[ | |
| this | |
| .v1 ? | |
| 6 : | |
| this | |
| .v2 ? | |
| 7 : | |
| 8 | |
| ] | |
| } | |
| }, { | |
| key: "_getNationalPrefixIsOptionalWhenFormatting", | |
| value: function() { | |
| return ! | |
| ! | |
| this | |
| .metadata[ | |
| this | |
| .v1 ? | |
| 7 : | |
| this | |
| .v2 ? | |
| 8 : | |
| 9 | |
| ] | |
| } | |
| }, { | |
| key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat", | |
| value: function() { | |
| return this | |
| ._getNationalPrefixIsOptionalWhenFormatting( | |
| this | |
| .metadata | |
| ) || | |
| this | |
| ._getNationalPrefixIsOptionalWhenFormatting( | |
| this | |
| .getDefaultCountryMetadataForRegion() | |
| ) | |
| } | |
| }, { | |
| key: "leadingDigits", | |
| value: function() { | |
| return this | |
| .metadata[ | |
| this | |
| .v1 ? | |
| 8 : | |
| this | |
| .v2 ? | |
| 9 : | |
| 10 | |
| ] | |
| } | |
| }, { | |
| key: "types", | |
| value: function() { | |
| return this | |
| .metadata[ | |
| this | |
| .v1 ? | |
| 9 : | |
| this | |
| .v2 ? | |
| 10 : | |
| 11 | |
| ] | |
| } | |
| }, { | |
| key: "hasTypes", | |
| value: function() { | |
| return ! | |
| (this | |
| .types() && | |
| 0 === | |
| this | |
| .types() | |
| .length || | |
| ! | |
| this | |
| .types() | |
| ) | |
| } | |
| }, { | |
| key: "type", | |
| value: function( | |
| e) { | |
| if (this | |
| .hasTypes() && | |
| zi(this | |
| .types(), | |
| e | |
| ) | |
| ) | |
| return new Hi( | |
| zi(this | |
| .types(), | |
| e | |
| ), | |
| this | |
| ) | |
| } | |
| }, { | |
| key: "ext", | |
| value: function() { | |
| return this | |
| .v1 || | |
| this | |
| .v2 ? | |
| Di : | |
| this | |
| .metadata[ | |
| 13 | |
| ] || | |
| Di | |
| } | |
| }]), e | |
| }(), | |
| Bi = function() { | |
| function e(t, r) { | |
| Mi(this, e), this._format = | |
| t, this.metadata = r | |
| } | |
| return Li(e, [{ | |
| key: "pattern", | |
| value: function() { | |
| return this | |
| ._format[ | |
| 0 | |
| ] | |
| } | |
| }, { | |
| key: "format", | |
| value: function() { | |
| return this | |
| ._format[ | |
| 1 | |
| ] | |
| } | |
| }, { | |
| key: "leadingDigitsPatterns", | |
| value: function() { | |
| return this | |
| ._format[ | |
| 2 | |
| ] || | |
| [] | |
| } | |
| }, { | |
| key: "nationalPrefixFormattingRule", | |
| value: function() { | |
| return this | |
| ._format[ | |
| 3 | |
| ] || | |
| this | |
| .metadata | |
| .nationalPrefixFormattingRule() | |
| } | |
| }, { | |
| key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat", | |
| value: function() { | |
| return ! | |
| ! | |
| this | |
| ._format[ | |
| 4 | |
| ] || | |
| this | |
| .metadata | |
| .nationalPrefixIsOptionalWhenFormattingInNationalFormat() | |
| } | |
| }, { | |
| key: "nationalPrefixIsMandatoryWhenFormattingInNationalFormat", | |
| value: function() { | |
| return this | |
| .usesNationalPrefix() && | |
| ! | |
| this | |
| .nationalPrefixIsOptionalWhenFormattingInNationalFormat() | |
| } | |
| }, { | |
| key: "usesNationalPrefix", | |
| value: function() { | |
| return ! | |
| (!this | |
| .nationalPrefixFormattingRule() || | |
| Gi | |
| .test( | |
| this | |
| .nationalPrefixFormattingRule() | |
| ) | |
| ) | |
| } | |
| }, { | |
| key: "internationalFormat", | |
| value: function() { | |
| return this | |
| ._format[ | |
| 5 | |
| ] || | |
| this | |
| .format() | |
| } | |
| }]), e | |
| }(), | |
| Gi = /^\(?\$1\)?$/, | |
| Hi = function() { | |
| function e(t, r) { | |
| Mi(this, e), this.type = t, | |
| this.metadata = r | |
| } | |
| return Li(e, [{ | |
| key: "pattern", | |
| value: function() { | |
| return this | |
| .metadata | |
| .v1 ? | |
| this | |
| .type : | |
| this | |
| .type[ | |
| 0 | |
| ] | |
| } | |
| }, { | |
| key: "possibleLengths", | |
| value: function() { | |
| if (! | |
| this | |
| .metadata | |
| .v1) | |
| return this | |
| .type[ | |
| 1 | |
| ] || | |
| this | |
| .metadata | |
| .possibleLengths() | |
| } | |
| }]), e | |
| }(); | |
| function zi(e, t) { | |
| switch (t) { | |
| case "FIXED_LINE": | |
| return e[0]; | |
| case "MOBILE": | |
| return e[1]; | |
| case "TOLL_FREE": | |
| return e[2]; | |
| case "PREMIUM_RATE": | |
| return e[3]; | |
| case "PERSONAL_NUMBER": | |
| return e[4]; | |
| case "VOICEMAIL": | |
| return e[5]; | |
| case "UAN": | |
| return e[6]; | |
| case "PAGER": | |
| return e[7]; | |
| case "VOIP": | |
| return e[8]; | |
| case "SHARED_COST": | |
| return e[9] | |
| } | |
| } | |
| var ji = function(e) { | |
| return "object" === Ri(e) | |
| }, | |
| qi = function(e) { | |
| return Ri(e) | |
| }; | |
| function Vi(e, t) { | |
| if ((t = new Ui(t)).hasCountry(e)) | |
| return t.country(e) | |
| .countryCallingCode(); | |
| throw Error("Unknown country: " | |
| .concat(e)) | |
| } | |
| function Ki(e) { | |
| var t = e.version; | |
| "number" == typeof t ? (this.v1 = | |
| 1 === t, this.v2 = 2 === t, | |
| this.v3 = 3 === t, this.v4 = | |
| 4 === t) : t ? -1 === Oi(t, | |
| "1.2.0") ? this.v2 = !0 : - | |
| 1 === Oi(t, "1.7.35") ? this | |
| .v3 = !0 : this.v4 = !0 : this | |
| .v1 = !0 | |
| } | |
| var Yi = function(e) { | |
| return "([".concat(Ii, "]{1,") | |
| .concat(e, "})") | |
| }; | |
| function Zi(e) { | |
| var t = "[ \\t,]*", | |
| r = "[:\\..]?[ \\t,-]*", | |
| n = "[ \\t]*"; | |
| return ";ext=" + Yi("20") + "|" + | |
| t + | |
| "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)" + | |
| r + Yi("20") + "#?|" + t + | |
| "(?:[xx##~~]|int|int)" + r + Yi( | |
| "9") + "#?|[- ]+" + Yi( | |
| "6") + "#|" + n + "(?:,{2}|;)" + | |
| r + Yi("15") + "#?|" + n + | |
| "(?:,)+" + r + Yi("9") + "#?" | |
| } | |
| var Xi = RegExp("^[++]{0,1}(?:[" + Pi + | |
| "]*[" + Ii + "]){1,2}$", "i"), | |
| Qi = "[++]{0,1}(?:[" + Pi + "]*[" + | |
| Ii + "]){3,}[" + Pi + Ii + "]*(?:" + | |
| Zi() + ")?", | |
| Ji = RegExp("^[" + Ii + "]{2}$|^" + | |
| Qi + "$", "i"), | |
| ea = RegExp("(?:" + Zi() + ")$", | |
| "i"); | |
| function ta(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| var ra = { | |
| 0: "0", | |
| 1: "1", | |
| 2: "2", | |
| 3: "3", | |
| 4: "4", | |
| 5: "5", | |
| 6: "6", | |
| 7: "7", | |
| 8: "8", | |
| 9: "9", | |
| "0": "0", | |
| "1": "1", | |
| "2": "2", | |
| "3": "3", | |
| "4": "4", | |
| "5": "5", | |
| "6": "6", | |
| "7": "7", | |
| "8": "8", | |
| "9": "9", | |
| "٠": "0", | |
| "١": "1", | |
| "٢": "2", | |
| "٣": "3", | |
| "٤": "4", | |
| "٥": "5", | |
| "٦": "6", | |
| "٧": "7", | |
| "٨": "8", | |
| "٩": "9", | |
| "۰": "0", | |
| "۱": "1", | |
| "۲": "2", | |
| "۳": "3", | |
| "۴": "4", | |
| "۵": "5", | |
| "۶": "6", | |
| "۷": "7", | |
| "۸": "8", | |
| "۹": "9" | |
| }; | |
| function na(e) { | |
| for (var t, r = "", n = function(e, | |
| t) { | |
| var r = "undefined" != | |
| typeof Symbol && e[ | |
| Symbol.iterator | |
| ] || e[ | |
| "@@iterator"]; | |
| if (r) return (r = r | |
| .call(e)) | |
| .next.bind(r); | |
| if (Array.isArray(e) || | |
| (r = function(e, | |
| t) { | |
| if (e) { | |
| if ("string" == | |
| typeof e | |
| ) | |
| return ta( | |
| e, | |
| void 0 | |
| ); | |
| var r = | |
| Object | |
| .prototype | |
| .toString | |
| .call( | |
| e | |
| ) | |
| .slice( | |
| 8, | |
| - | |
| 1 | |
| ); | |
| if ("Object" === | |
| r && | |
| e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name | |
| ), | |
| "Map" === | |
| r || | |
| "Set" === | |
| r) | |
| return Array | |
| .from( | |
| e | |
| ); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test( | |
| r | |
| ) | |
| ) | |
| return ta( | |
| e, | |
| void 0 | |
| ) | |
| } | |
| }(e))) { | |
| r && (e = r); | |
| var n = 0; | |
| return function() { | |
| return n >= | |
| e | |
| .length ? | |
| { | |
| done: | |
| ! | |
| 0 | |
| } : { | |
| done: | |
| ! | |
| 1, | |
| value: e[ | |
| n++ | |
| ] | |
| } | |
| } | |
| } | |
| throw TypeError( | |
| "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| }(e.split("")); !(t = n()) | |
| .done;) { | |
| var i = ra[t.value]; | |
| i && (r += i) | |
| } | |
| return r | |
| } | |
| function ia(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| function aa(e) { | |
| for (var t, r = "", n = function(e, | |
| t) { | |
| var r = "undefined" != | |
| typeof Symbol && e[ | |
| Symbol.iterator | |
| ] || e[ | |
| "@@iterator"]; | |
| if (r) return (r = r | |
| .call(e)) | |
| .next.bind(r); | |
| if (Array.isArray(e) || | |
| (r = function(e, | |
| t) { | |
| if (e) { | |
| if ("string" == | |
| typeof e | |
| ) | |
| return ia( | |
| e, | |
| void 0 | |
| ); | |
| var r = | |
| Object | |
| .prototype | |
| .toString | |
| .call( | |
| e | |
| ) | |
| .slice( | |
| 8, | |
| - | |
| 1 | |
| ); | |
| if ("Object" === | |
| r && | |
| e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name | |
| ), | |
| "Map" === | |
| r || | |
| "Set" === | |
| r) | |
| return Array | |
| .from( | |
| e | |
| ); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test( | |
| r | |
| ) | |
| ) | |
| return ia( | |
| e, | |
| void 0 | |
| ) | |
| } | |
| }(e))) { | |
| r && (e = r); | |
| var n = 0; | |
| return function() { | |
| return n >= | |
| e | |
| .length ? | |
| { | |
| done: | |
| ! | |
| 0 | |
| } : { | |
| done: | |
| ! | |
| 1, | |
| value: e[ | |
| n++ | |
| ] | |
| } | |
| } | |
| } | |
| throw TypeError( | |
| "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| }(e.split("")); !(t = n()) | |
| .done;) r += function(e, t) { | |
| if ("+" === e) { | |
| if (t) return; | |
| return "+" | |
| } | |
| return ra[e] | |
| }(t.value, r) || ""; | |
| return r | |
| } | |
| function oa(e, t) { | |
| return function(e, t, r) { | |
| var n = r.type(t), | |
| i = n && n | |
| .possibleLengths() || r | |
| .possibleLengths(); | |
| if (!i) | |
| return "IS_POSSIBLE"; | |
| var a = e.length, | |
| o = i[0]; | |
| return o === a ? | |
| "IS_POSSIBLE" : o > a ? | |
| "TOO_SHORT" : i[i | |
| .length - 1] < a ? | |
| "TOO_LONG" : i.indexOf( | |
| a, 1) >= 0 ? | |
| "IS_POSSIBLE" : | |
| "INVALID_LENGTH" | |
| }(e, void 0, t) | |
| } | |
| function la(e, t) { | |
| return "IS_POSSIBLE" === oa(e, t) | |
| } | |
| function sa(e, t) { | |
| return e = e || "", RegExp("^(?:" + | |
| t + ")$").test(e) | |
| } | |
| function da(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| var ca = ["MOBILE", "PREMIUM_RATE", | |
| "TOLL_FREE", "SHARED_COST", | |
| "VOIP", "PERSONAL_NUMBER", | |
| "PAGER", "UAN", "VOICEMAIL" | |
| ]; | |
| function ua(e, t, r) { | |
| if (t = t || {}, e.country) { | |
| (r = new Ui(r)) | |
| .selectNumberingPlan(e.country, | |
| e.countryCallingCode); | |
| var n = t.v2 ? e | |
| .nationalNumber : e.phone; | |
| if (sa(n, r | |
| .nationalNumberPattern() | |
| )) { | |
| if (ha(n, "FIXED_LINE", r)) | |
| return r.type( | |
| "MOBILE") && "" === | |
| r.type("MOBILE") | |
| .pattern() ? | |
| "FIXED_LINE_OR_MOBILE" : | |
| r.type("MOBILE") ? | |
| ha(n, "MOBILE", r) ? | |
| "FIXED_LINE_OR_MOBILE" : | |
| "FIXED_LINE" : | |
| "FIXED_LINE_OR_MOBILE"; | |
| for (var i, a = function(e, | |
| t) { | |
| var r = | |
| "undefined" != | |
| typeof Symbol && | |
| e[Symbol | |
| .iterator | |
| ] || e[ | |
| "@@iterator" | |
| ]; | |
| if (r) return ( | |
| r = | |
| r | |
| .call( | |
| e | |
| ) | |
| ) | |
| .next | |
| .bind(r); | |
| if (Array | |
| .isArray( | |
| e) || (r = | |
| function( | |
| e, t | |
| ) { | |
| if ( | |
| e) { | |
| if ("string" == | |
| typeof e | |
| ) | |
| return da( | |
| e, | |
| void 0 | |
| ); | |
| var r = | |
| Object | |
| .prototype | |
| .toString | |
| .call( | |
| e | |
| ) | |
| .slice( | |
| 8, | |
| - | |
| 1 | |
| ); | |
| if ("Object" === | |
| r && | |
| e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name | |
| ), | |
| "Map" === | |
| r || | |
| "Set" === | |
| r | |
| ) | |
| return Array | |
| .from( | |
| e | |
| ); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test( | |
| r | |
| ) | |
| ) | |
| return da( | |
| e, | |
| void 0 | |
| ) | |
| } | |
| }(e))) { | |
| r && (e = | |
| r); | |
| var n = 0; | |
| return function() { | |
| return n >= | |
| e | |
| .length ? | |
| { | |
| done: | |
| ! | |
| 0 | |
| } : | |
| { | |
| done: | |
| ! | |
| 1, | |
| value: e[ | |
| n++ | |
| ] | |
| } | |
| } | |
| } | |
| throw TypeError( | |
| "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| }(ca); !(i = a()) | |
| .done;) { | |
| var o = i.value; | |
| if (ha(n, o, r)) | |
| return o | |
| } | |
| } | |
| } | |
| } | |
| function ha(e, t, r) { | |
| return !(!(t = r.type(t)) || !t | |
| .pattern()) && !(t | |
| .possibleLengths() && 0 > t | |
| .possibleLengths().indexOf(e | |
| .length)) && sa(e, t | |
| .pattern()) | |
| } | |
| function pa(e) { | |
| return e.replace(RegExp("[".concat( | |
| Pi, "]+"), "g"), " ").trim() | |
| } | |
| var ma = /(\$\d)/; | |
| function fa(e, t, r) { | |
| var n = r.useInternationalFormat, | |
| i = r.withNationalPrefix; | |
| r.carrierCode, r.metadata; | |
| var a = e.replace(new RegExp(t | |
| .pattern()), n ? t | |
| .internationalFormat() : | |
| i && t | |
| .nationalPrefixFormattingRule() ? | |
| t.format().replace(ma, t | |
| .nationalPrefixFormattingRule() | |
| ) : t.format()); | |
| return n ? pa(a) : a | |
| } | |
| var ga = | |
| /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/; | |
| function ya(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| function wa(e, t) { | |
| var r = Object.keys(e); | |
| if (Object.getOwnPropertySymbols) { | |
| var n = Object | |
| .getOwnPropertySymbols(e); | |
| t && (n = n.filter((function( | |
| t) { | |
| return Object | |
| .getOwnPropertyDescriptor( | |
| e, t | |
| ) | |
| .enumerable | |
| }))), r.push.apply(r, n) | |
| } | |
| return r | |
| } | |
| function va(e) { | |
| for (var t = 1; t < arguments | |
| .length; t++) { | |
| var r = null != arguments[t] ? | |
| arguments[t] : {}; | |
| t % 2 ? wa(Object(r), !0) | |
| .forEach((function(t) { | |
| var n; | |
| n = r[t], t in | |
| e ? Object | |
| .defineProperty( | |
| e, t, { | |
| value: n, | |
| enumerable: | |
| ! | |
| 0, | |
| configurable: | |
| ! | |
| 0, | |
| writable: | |
| ! | |
| 0 | |
| }) : e[ | |
| t] = n | |
| })) : Object | |
| .getOwnPropertyDescriptors ? | |
| Object.defineProperties(e, | |
| Object | |
| .getOwnPropertyDescriptors( | |
| r)) : wa(Object(r)) | |
| .forEach((function(t) { | |
| Object | |
| .defineProperty( | |
| e, t, | |
| Object | |
| .getOwnPropertyDescriptor( | |
| r, t | |
| )) | |
| })) | |
| } | |
| return e | |
| } | |
| var Ca = { | |
| formatExtension: function(e, t, | |
| r) { | |
| return "".concat(e) | |
| .concat(r.ext()) | |
| .concat(t) | |
| } | |
| }; | |
| function ba(e, t, r, n, i) { | |
| var a = function(e, t) { | |
| for (var r, n = function(e, | |
| t) { | |
| var r = | |
| "undefined" != | |
| typeof Symbol && | |
| e[Symbol | |
| .iterator | |
| ] || e[ | |
| "@@iterator" | |
| ]; | |
| if (r) return ( | |
| r = | |
| r | |
| .call( | |
| e | |
| ) | |
| ) | |
| .next | |
| .bind(r); | |
| if (Array | |
| .isArray( | |
| e) || (r = | |
| function( | |
| e, t | |
| ) { | |
| if ( | |
| e) { | |
| if ("string" == | |
| typeof e | |
| ) | |
| return ya( | |
| e, | |
| void 0 | |
| ); | |
| var r = | |
| Object | |
| .prototype | |
| .toString | |
| .call( | |
| e | |
| ) | |
| .slice( | |
| 8, | |
| - | |
| 1 | |
| ); | |
| if ("Object" === | |
| r && | |
| e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name | |
| ), | |
| "Map" === | |
| r || | |
| "Set" === | |
| r | |
| ) | |
| return Array | |
| .from( | |
| e | |
| ); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test( | |
| r | |
| ) | |
| ) | |
| return ya( | |
| e, | |
| void 0 | |
| ) | |
| } | |
| }(e))) { | |
| r && (e = | |
| r); | |
| var n = 0; | |
| return function() { | |
| return n >= | |
| e | |
| .length ? | |
| { | |
| done: | |
| ! | |
| 0 | |
| } : | |
| { | |
| done: | |
| ! | |
| 1, | |
| value: e[ | |
| n++ | |
| ] | |
| } | |
| } | |
| } | |
| throw TypeError( | |
| "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| }(e); !(r = n()) | |
| .done;) { | |
| var i = r.value; | |
| if (i | |
| .leadingDigitsPatterns() | |
| .length > 0) { | |
| var a = i | |
| .leadingDigitsPatterns()[ | |
| i | |
| .leadingDigitsPatterns() | |
| .length - 1 | |
| ]; | |
| if (0 !== t.search( | |
| a)) continue | |
| } | |
| if (sa(t, i.pattern())) | |
| return i | |
| } | |
| }(n.formats(), e); | |
| return a ? fa(e, a, { | |
| useInternationalFormat: "INTERNATIONAL" === | |
| r, | |
| withNationalPrefix: !a | |
| .nationalPrefixIsOptionalWhenFormattingInNationalFormat() || | |
| !i || !1 !== i | |
| .nationalPrefix, | |
| carrierCode: t, | |
| metadata: n | |
| }) : e | |
| } | |
| function Ea(e, t) { | |
| var r = Object.keys(e); | |
| if (Object.getOwnPropertySymbols) { | |
| var n = Object | |
| .getOwnPropertySymbols(e); | |
| t && (n = n.filter((function( | |
| t) { | |
| return Object | |
| .getOwnPropertyDescriptor( | |
| e, t | |
| ) | |
| .enumerable | |
| }))), r.push.apply(r, n) | |
| } | |
| return r | |
| } | |
| function $a(e) { | |
| for (var t = 1; t < arguments | |
| .length; t++) { | |
| var r = null != arguments[t] ? | |
| arguments[t] : {}; | |
| t % 2 ? Ea(Object(r), !0) | |
| .forEach((function(t) { | |
| var n; | |
| n = r[t], t in | |
| e ? Object | |
| .defineProperty( | |
| e, t, { | |
| value: n, | |
| enumerable: | |
| ! | |
| 0, | |
| configurable: | |
| ! | |
| 0, | |
| writable: | |
| ! | |
| 0 | |
| }) : e[ | |
| t] = n | |
| })) : Object | |
| .getOwnPropertyDescriptors ? | |
| Object.defineProperties(e, | |
| Object | |
| .getOwnPropertyDescriptors( | |
| r)) : Ea(Object(r)) | |
| .forEach((function(t) { | |
| Object | |
| .defineProperty( | |
| e, t, | |
| Object | |
| .getOwnPropertyDescriptor( | |
| r, t | |
| )) | |
| })) | |
| } | |
| return e | |
| } | |
| var xa = function() { | |
| var e; | |
| function t(e, r, n) { | |
| if (function(e, t) { | |
| if (!( | |
| e instanceof t)) | |
| throw TypeError( | |
| "Cannot call a class as a function" | |
| ) | |
| }(this, t), !e) | |
| throw TypeError( | |
| "`country` or `countryCallingCode` not passed" | |
| ); | |
| if (!r) throw TypeError( | |
| "`nationalNumber` not passed" | |
| ); | |
| if (!n) throw TypeError( | |
| "`metadata` not passed" | |
| ); | |
| var i, a, o, l = (o = | |
| new Ui(n), Aa(e) ? ( | |
| i = e, o | |
| .selectNumberingPlan( | |
| i), a = o | |
| .countryCallingCode() | |
| ) : a = e, { | |
| country: i, | |
| countryCallingCode: a | |
| }), | |
| s = l.country, | |
| d = l | |
| .countryCallingCode; | |
| this.country = s, this | |
| .countryCallingCode = d, | |
| this.nationalNumber = r, | |
| this.number = "+" + this | |
| .countryCallingCode + | |
| this.nationalNumber, | |
| this.getMetadata = | |
| function() { | |
| return n | |
| } | |
| } | |
| return e = [{ | |
| key: "setExt", | |
| value: function(e) { | |
| this.ext = e | |
| } | |
| }, { | |
| key: "getPossibleCountries", | |
| value: function() { | |
| var e, t, r, | |
| n; | |
| return this | |
| .country ? | |
| [this | |
| .country | |
| ] : (e = | |
| this | |
| .countryCallingCode, | |
| t = | |
| this | |
| .nationalNumber, | |
| (n = new Ui( | |
| r = | |
| this | |
| .getMetadata() | |
| ) | |
| .getCountryCodesForCallingCode( | |
| e | |
| ) | |
| ) ? | |
| n | |
| .filter( | |
| (function( | |
| e | |
| ) { | |
| var | |
| n; | |
| return (n = | |
| new Ui( | |
| r | |
| ) | |
| ) | |
| .selectNumberingPlan( | |
| e | |
| ), | |
| n | |
| .numberingPlan | |
| .possibleLengths() | |
| .indexOf( | |
| t | |
| .length | |
| ) >= | |
| 0 | |
| }) | |
| ) : | |
| []) | |
| } | |
| }, { | |
| key: "isPossible", | |
| value: function() { | |
| return function( | |
| e, | |
| t, r | |
| ) { | |
| if (void 0 === | |
| t && | |
| ( | |
| t = {}), | |
| r = | |
| new Ui( | |
| r | |
| ), | |
| t | |
| .v2 | |
| ) { | |
| if (! | |
| e | |
| .countryCallingCode | |
| ) | |
| throw Error( | |
| "Invalid phone number object passed" | |
| ); | |
| r.selectNumberingPlan( | |
| e | |
| .countryCallingCode | |
| ) | |
| } else { | |
| if (! | |
| e | |
| .phone | |
| ) | |
| return ! | |
| 1; | |
| if (e | |
| .country | |
| ) { | |
| if (! | |
| r | |
| .hasCountry( | |
| e | |
| .country | |
| ) | |
| ) | |
| throw Error( | |
| "Unknown country: " | |
| .concat( | |
| e | |
| .country | |
| ) | |
| ); | |
| r.country( | |
| e | |
| .country | |
| ) | |
| } else { | |
| if (! | |
| e | |
| .countryCallingCode | |
| ) | |
| throw Error( | |
| "Invalid phone number object passed" | |
| ); | |
| r.selectNumberingPlan( | |
| e | |
| .countryCallingCode | |
| ) | |
| } | |
| } | |
| if (r | |
| .possibleLengths() | |
| ) | |
| return la( | |
| e | |
| .phone || | |
| e | |
| .nationalNumber, | |
| r | |
| ); | |
| if (e | |
| .countryCallingCode && | |
| r | |
| .isNonGeographicCallingCode( | |
| e | |
| .countryCallingCode | |
| ) | |
| ) | |
| return ! | |
| 0; | |
| throw Error( | |
| 'Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.' | |
| ) | |
| }(this, { | |
| v2: ! | |
| 0 | |
| }, | |
| this | |
| .getMetadata() | |
| ) | |
| } | |
| }, { | |
| key: "isValid", | |
| value: function() { | |
| var e, t; | |
| return e = { | |
| v2: ! | |
| 0 | |
| }, t = | |
| this | |
| .getMetadata(), | |
| e = e || | |
| {}, (t = | |
| new Ui( | |
| t | |
| ) | |
| ) | |
| .selectNumberingPlan( | |
| this | |
| .country, | |
| this | |
| .countryCallingCode | |
| ), t | |
| .hasTypes() ? | |
| void 0 !== | |
| ua(this, | |
| e, t | |
| .metadata | |
| ) : | |
| sa(e.v2 ? | |
| this | |
| .nationalNumber : | |
| this | |
| .phone, | |
| t | |
| .nationalNumberPattern() | |
| ) | |
| } | |
| }, { | |
| key: "isNonGeographic", | |
| value: function() { | |
| return new Ui( | |
| this | |
| .getMetadata() | |
| ) | |
| .isNonGeographicCallingCode( | |
| this | |
| .countryCallingCode | |
| ) | |
| } | |
| }, { | |
| key: "isEqual", | |
| value: function(e) { | |
| return this | |
| .number === | |
| e | |
| .number && | |
| this | |
| .ext === | |
| e.ext | |
| } | |
| }, { | |
| key: "getType", | |
| value: function() { | |
| return ua( | |
| this, { | |
| v2: ! | |
| 0 | |
| }, | |
| this | |
| .getMetadata() | |
| ) | |
| } | |
| }, { | |
| key: "format", | |
| value: function(e, | |
| t) { | |
| return function( | |
| e, | |
| t, | |
| r, n | |
| ) { | |
| if (r = | |
| r ? | |
| va(va({}, | |
| Ca | |
| ), | |
| r | |
| ) : | |
| Ca, | |
| n = | |
| new Ui( | |
| n | |
| ), | |
| e | |
| .country && | |
| "001" !== | |
| e | |
| .country | |
| ) { | |
| if (! | |
| n | |
| .hasCountry( | |
| e | |
| .country | |
| ) | |
| ) | |
| throw Error( | |
| "Unknown country: " | |
| .concat( | |
| e | |
| .country | |
| ) | |
| ); | |
| n.country( | |
| e | |
| .country | |
| ) | |
| } else { | |
| if (! | |
| e | |
| .countryCallingCode | |
| ) | |
| return e | |
| .phone || | |
| ""; | |
| n.selectNumberingPlan( | |
| e | |
| .countryCallingCode | |
| ) | |
| } | |
| var i, | |
| a, | |
| o, | |
| l, | |
| s, | |
| d, | |
| c, | |
| u, | |
| h, | |
| p, | |
| m, | |
| f, | |
| g, | |
| y = | |
| n | |
| .countryCallingCode(), | |
| w = | |
| r | |
| .v2 ? | |
| e | |
| .nationalNumber : | |
| e | |
| .phone; | |
| switch ( | |
| t | |
| ) { | |
| case "NATIONAL": | |
| return w ? | |
| (i = g = | |
| ba(w, | |
| e | |
| .carrierCode, | |
| "NATIONAL", | |
| n, | |
| r | |
| ), | |
| a = | |
| e | |
| .ext, | |
| o = | |
| n, | |
| l = | |
| r | |
| .formatExtension, | |
| a ? | |
| l(i, a, | |
| o | |
| ) : | |
| i | |
| ) : | |
| ""; | |
| case "INTERNATIONAL": | |
| return w ? | |
| (g = ba(w, | |
| null, | |
| "INTERNATIONAL", | |
| n, | |
| r | |
| ), | |
| s = | |
| g = | |
| "+" | |
| .concat( | |
| y, | |
| " " | |
| ) | |
| .concat( | |
| g | |
| ), | |
| d = | |
| e | |
| .ext, | |
| c = | |
| n, | |
| u = | |
| r | |
| .formatExtension, | |
| d ? | |
| u(s, d, | |
| c | |
| ) : | |
| s | |
| ) : | |
| "+" | |
| .concat( | |
| y | |
| ); | |
| case "E.164": | |
| return "+" | |
| .concat( | |
| y | |
| ) | |
| .concat( | |
| w | |
| ); | |
| case "RFC3966": | |
| return function( | |
| e | |
| ) { | |
| var t = | |
| e | |
| .number, | |
| r = | |
| e | |
| .ext; | |
| if (! | |
| t | |
| ) | |
| return ""; | |
| if ("+" !== | |
| t[ | |
| 0] | |
| ) | |
| throw Error( | |
| '"formatRFC3966()" expects "number" to be in E.164 format.' | |
| ); | |
| return "tel:" | |
| .concat( | |
| t | |
| ) | |
| .concat( | |
| r ? | |
| ";ext=" + | |
| r : | |
| "" | |
| ) | |
| } | |
| ({ | |
| number: "+" | |
| .concat( | |
| y | |
| ) | |
| .concat( | |
| w | |
| ), | |
| ext: e | |
| .ext | |
| }); | |
| case "IDD": | |
| if (! | |
| r | |
| .fromCountry | |
| ) | |
| return; | |
| return h = | |
| function( | |
| e, | |
| t, | |
| r, | |
| n, | |
| i | |
| ) { | |
| if (Vi(n, | |
| i | |
| .metadata | |
| ) === | |
| r | |
| ) { | |
| var a, | |
| o = | |
| ba(e, | |
| t, | |
| "NATIONAL", | |
| i | |
| ); | |
| return "1" === | |
| r ? | |
| r + | |
| " " + | |
| o : | |
| o | |
| } | |
| var l = | |
| (void 0, | |
| (a = new Ui( | |
| i | |
| .metadata | |
| )) | |
| .selectNumberingPlan( | |
| n, | |
| undefined | |
| ), | |
| a | |
| .defaultIDDPrefix() ? | |
| a | |
| .defaultIDDPrefix() : | |
| ga | |
| .test( | |
| a | |
| .IDDPrefix() | |
| ) ? | |
| a | |
| .IDDPrefix() : | |
| void 0 | |
| ); | |
| if ( | |
| l) | |
| return "" | |
| .concat( | |
| l, | |
| " " | |
| ) | |
| .concat( | |
| r, | |
| " " | |
| ) | |
| .concat( | |
| ba(e, | |
| null, | |
| "INTERNATIONAL", | |
| i | |
| ) | |
| ) | |
| } | |
| (w, e | |
| .carrierCode, | |
| y, | |
| r | |
| .fromCountry, | |
| n | |
| ), | |
| p = | |
| e | |
| .ext, | |
| m = | |
| n, | |
| f = | |
| r | |
| .formatExtension, | |
| p ? | |
| f(h, p, | |
| m | |
| ) : | |
| h; | |
| default: | |
| throw Error( | |
| 'Unknown "format" argument passed to "formatNumber()": "' | |
| .concat( | |
| t, | |
| '"' | |
| ) | |
| ) | |
| } | |
| }(this, | |
| e, | |
| t ? | |
| $a($a({}, | |
| t | |
| ), {}, { | |
| v2: ! | |
| 0 | |
| }) : | |
| { | |
| v2: ! | |
| 0 | |
| }, | |
| this | |
| .getMetadata() | |
| ) | |
| } | |
| }, { | |
| key: "formatNational", | |
| value: function(e) { | |
| return this | |
| .format( | |
| "NATIONAL", | |
| e) | |
| } | |
| }, { | |
| key: "formatInternational", | |
| value: function(e) { | |
| return this | |
| .format( | |
| "INTERNATIONAL", | |
| e) | |
| } | |
| }, { | |
| key: "getURI", | |
| value: function(e) { | |
| return this | |
| .format( | |
| "RFC3966", | |
| e) | |
| } | |
| }], | |
| function(e, t) { | |
| for (var r = 0; r < t | |
| .length; r++) { | |
| var n = t[r]; | |
| n.enumerable = n | |
| .enumerable || ! | |
| 1, n | |
| .configurable = ! | |
| 0, "value" in | |
| n && (n | |
| .writable = ! | |
| 0), Object | |
| .defineProperty( | |
| e, n.key, n) | |
| } | |
| }(t.prototype, e), Object | |
| .defineProperty(t, | |
| "prototype", { | |
| writable: !1 | |
| }), t | |
| }(), | |
| Aa = function(e) { | |
| return /^[A-Z]{2}$/.test(e) | |
| }, | |
| ka = RegExp("([" + Ii + "])"); | |
| function Ta(e, t, r, n) { | |
| if (t) { | |
| var i = new Ui(n); | |
| i.selectNumberingPlan(t, r); | |
| var a = new RegExp(i | |
| .IDDPrefix()); | |
| if (0 === e.search(a)) { | |
| var o = (e = e.slice(e | |
| .match(a)[0] | |
| .length)).match(ka); | |
| if (!(o && null != o[1] && | |
| o[1].length > 0 && | |
| "0" === o[1])) | |
| return e | |
| } | |
| } | |
| } | |
| function _a(e, t) { | |
| if (e && t.numberingPlan | |
| .nationalPrefixForParsing()) { | |
| var r = RegExp("^(?:" + t | |
| .numberingPlan | |
| .nationalPrefixForParsing() + | |
| ")"), | |
| n = r.exec(e); | |
| if (n) { | |
| var i, a, o, l = n.length - | |
| 1, | |
| s = l > 0 && n[l]; | |
| if (t | |
| .nationalPrefixTransformRule() && | |
| s) i = e.replace(r, t | |
| .nationalPrefixTransformRule() | |
| ), l > 1 && (a = n[ | |
| 1]); | |
| else { | |
| var d = n[0]; | |
| i = e.slice(d.length), | |
| s && (a = n[1]) | |
| } | |
| if (s) { | |
| var c = e.indexOf(n[1]); | |
| e.slice(0, c) === t | |
| .numberingPlan | |
| .nationalPrefix() && | |
| (o = t.numberingPlan | |
| .nationalPrefix() | |
| ) | |
| } else o = n[0]; | |
| return { | |
| nationalNumber: i, | |
| nationalPrefix: o, | |
| carrierCode: a | |
| } | |
| } | |
| } | |
| return { | |
| nationalNumber: e | |
| } | |
| } | |
| function Sa(e, t) { | |
| var r = _a(e, t), | |
| n = r.carrierCode, | |
| i = r.nationalNumber; | |
| return i !== e && (sa(e, t | |
| .nationalNumberPattern() | |
| ) && !sa(i, t | |
| .nationalNumberPattern() | |
| ) || t | |
| .possibleLengths() && ! | |
| function(e, t) { | |
| switch (oa(e, t)) { | |
| case "TOO_SHORT": | |
| case "INVALID_LENGTH": | |
| return !1; | |
| default: | |
| return !0 | |
| } | |
| }(i, t)) ? { | |
| nationalNumber: e | |
| } : { | |
| nationalNumber: i, | |
| carrierCode: n | |
| } | |
| } | |
| function Na(e, t, r, n) { | |
| var i = t ? Vi(t, n) : r; | |
| if (0 === e.indexOf(i)) { | |
| (n = new Ui(n)) | |
| .selectNumberingPlan(t, r); | |
| var a = e.slice(i.length), | |
| o = Sa(a, n).nationalNumber, | |
| l = Sa(e, n).nationalNumber; | |
| if (!sa(l, n | |
| .nationalNumberPattern() | |
| ) && sa(o, n | |
| .nationalNumberPattern() | |
| ) || "TOO_LONG" === oa( | |
| l, n)) return { | |
| countryCallingCode: i, | |
| number: a | |
| } | |
| } | |
| return { | |
| number: e | |
| } | |
| } | |
| function Ia(e, t, r, n) { | |
| if (!e) return {}; | |
| if ("+" !== e[0]) { | |
| var i, a = Ta(e, t, r, n); | |
| if (!a || a === e) { | |
| if (t || r) { | |
| var o = Na(e, t, r, n), | |
| l = o | |
| .countryCallingCode, | |
| s = o.number; | |
| if (l) return { | |
| countryCallingCodeSource: "FROM_NUMBER_WITHOUT_PLUS_SIGN", | |
| countryCallingCode: l, | |
| number: s | |
| } | |
| } | |
| return { | |
| number: e | |
| } | |
| } | |
| i = !0, e = "+" + a | |
| } | |
| if ("0" === e[1]) return {}; | |
| n = new Ui(n); | |
| for (var d = 2; d - 1 <= 3 && d <= e | |
| .length;) { | |
| var c = e.slice(1, d); | |
| if (n.hasCallingCode(c)) | |
| return n | |
| .selectNumberingPlan( | |
| c), { | |
| countryCallingCodeSource: i ? | |
| "FROM_NUMBER_WITH_IDD" : | |
| "FROM_NUMBER_WITH_PLUS_SIGN", | |
| countryCallingCode: c, | |
| number: e.slice(d) | |
| }; | |
| d++ | |
| } | |
| return {} | |
| } | |
| function Pa(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| function Oa(e, t) { | |
| var r = t.countries, | |
| n = t.defaultCountry, | |
| i = t.metadata; | |
| i = new Ui(i); | |
| for (var a, o = [], l = function(e, | |
| t) { | |
| var r = "undefined" != | |
| typeof Symbol && e[ | |
| Symbol.iterator | |
| ] || e[ | |
| "@@iterator"]; | |
| if (r) return (r = r | |
| .call(e)) | |
| .next.bind(r); | |
| if (Array.isArray(e) || | |
| (r = function(e, | |
| t) { | |
| if (e) { | |
| if ("string" == | |
| typeof e | |
| ) | |
| return Pa( | |
| e, | |
| void 0 | |
| ); | |
| var r = | |
| Object | |
| .prototype | |
| .toString | |
| .call( | |
| e | |
| ) | |
| .slice( | |
| 8, | |
| - | |
| 1 | |
| ); | |
| if ("Object" === | |
| r && | |
| e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name | |
| ), | |
| "Map" === | |
| r || | |
| "Set" === | |
| r) | |
| return Array | |
| .from( | |
| e | |
| ); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test( | |
| r | |
| ) | |
| ) | |
| return Pa( | |
| e, | |
| void 0 | |
| ) | |
| } | |
| }(e))) { | |
| r && (e = r); | |
| var n = 0; | |
| return function() { | |
| return n >= | |
| e | |
| .length ? | |
| { | |
| done: | |
| ! | |
| 0 | |
| } : { | |
| done: | |
| ! | |
| 1, | |
| value: e[ | |
| n++ | |
| ] | |
| } | |
| } | |
| } | |
| throw TypeError( | |
| "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| }(r); !(a = l()).done;) { | |
| var s = a.value; | |
| if (i.country(s), i | |
| .leadingDigits()) { | |
| if (e && 0 === e.search(i | |
| .leadingDigits())) | |
| return s | |
| } else if (ua({ | |
| phone: e, | |
| country: s | |
| }, void 0, i.metadata)) { | |
| if (!n || s === n) return s; | |
| o.push(s) | |
| } | |
| } | |
| if (o.length > 0) return o[0] | |
| } | |
| function Ra(e, t) { | |
| var r = t.nationalNumber, | |
| n = t.defaultCountry, | |
| i = t.metadata, | |
| a = i | |
| .getCountryCodesForCallingCode( | |
| e); | |
| return a ? 1 === a.length ? a[0] : | |
| Oa(r, { | |
| countries: a, | |
| defaultCountry: n, | |
| metadata: i.metadata | |
| }) : void 0 | |
| } | |
| var Ma = "([" + Ii + | |
| "]|[\\-\\.\\(\\)]?)", | |
| La = RegExp("^\\+" + Ma + "*[" + | |
| Ii + "]" + Ma + "*$", "g"), | |
| Da = RegExp("^([" + Ii + | |
| "]+((\\-)*[" + Ii + | |
| "])*\\.)*[a-zA-Z]+((\\-)*[" + | |
| Ii + "])*\\.?$", "g"), | |
| Fa = "tel:", | |
| Ua = ";phone-context=", | |
| Wa = RegExp("[++" + Ii + "]"), | |
| Ba = RegExp("[^" + Ii + "#]+$"); | |
| function Ga(e, t) { | |
| var r = Object.keys(e); | |
| if (Object.getOwnPropertySymbols) { | |
| var n = Object | |
| .getOwnPropertySymbols(e); | |
| t && (n = n.filter((function( | |
| t) { | |
| return Object | |
| .getOwnPropertyDescriptor( | |
| e, t | |
| ) | |
| .enumerable | |
| }))), r.push.apply(r, n) | |
| } | |
| return r | |
| } | |
| function Ha(e) { | |
| for (var t = 1; t < arguments | |
| .length; t++) { | |
| var r = null != arguments[t] ? | |
| arguments[t] : {}; | |
| t % 2 ? Ga(Object(r), !0) | |
| .forEach((function(t) { | |
| var n; | |
| n = r[t], t in | |
| e ? Object | |
| .defineProperty( | |
| e, t, { | |
| value: n, | |
| enumerable: | |
| ! | |
| 0, | |
| configurable: | |
| ! | |
| 0, | |
| writable: | |
| ! | |
| 0 | |
| }) : e[ | |
| t] = n | |
| })) : Object | |
| .getOwnPropertyDescriptors ? | |
| Object.defineProperties(e, | |
| Object | |
| .getOwnPropertyDescriptors( | |
| r)) : Ga(Object(r)) | |
| .forEach((function(t) { | |
| Object | |
| .defineProperty( | |
| e, t, | |
| Object | |
| .getOwnPropertyDescriptor( | |
| r, t | |
| )) | |
| })) | |
| } | |
| return e | |
| } | |
| function za(e) { | |
| return (za = "function" == | |
| typeof Symbol && "symbol" == | |
| typeof Symbol.iterator ? | |
| function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && | |
| "function" == | |
| typeof Symbol && e | |
| .constructor === | |
| Symbol && e !== | |
| Symbol.prototype ? | |
| "symbol" : typeof e | |
| })(e) | |
| } | |
| function ja(e, t) { | |
| var r = Object.keys(e); | |
| if (Object.getOwnPropertySymbols) { | |
| var n = Object | |
| .getOwnPropertySymbols(e); | |
| t && (n = n.filter((function( | |
| t) { | |
| return Object | |
| .getOwnPropertyDescriptor( | |
| e, t | |
| ) | |
| .enumerable | |
| }))), r.push.apply(r, n) | |
| } | |
| return r | |
| } | |
| function qa(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| function Va(e, t) { | |
| var r = Object.keys(e); | |
| if (Object.getOwnPropertySymbols) { | |
| var n = Object | |
| .getOwnPropertySymbols(e); | |
| t && (n = n.filter((function( | |
| t) { | |
| return Object | |
| .getOwnPropertyDescriptor( | |
| e, t | |
| ) | |
| .enumerable | |
| }))), r.push.apply(r, n) | |
| } | |
| return r | |
| } | |
| function Ka(e) { | |
| for (var t = 1; t < arguments | |
| .length; t++) { | |
| var r = null != arguments[t] ? | |
| arguments[t] : {}; | |
| t % 2 ? Va(Object(r), !0) | |
| .forEach((function(t) { | |
| var n; | |
| n = r[t], t in | |
| e ? Object | |
| .defineProperty( | |
| e, t, { | |
| value: n, | |
| enumerable: | |
| ! | |
| 0, | |
| configurable: | |
| ! | |
| 0, | |
| writable: | |
| ! | |
| 0 | |
| }) : e[ | |
| t] = n | |
| })) : Object | |
| .getOwnPropertyDescriptors ? | |
| Object.defineProperties(e, | |
| Object | |
| .getOwnPropertyDescriptors( | |
| r)) : Va(Object(r)) | |
| .forEach((function(t) { | |
| Object | |
| .defineProperty( | |
| e, t, | |
| Object | |
| .getOwnPropertyDescriptor( | |
| r, t | |
| )) | |
| })) | |
| } | |
| return e | |
| } | |
| function Ya(e, t) { | |
| var r = Object.keys(e); | |
| if (Object.getOwnPropertySymbols) { | |
| var n = Object | |
| .getOwnPropertySymbols(e); | |
| t && (n = n.filter((function( | |
| t) { | |
| return Object | |
| .getOwnPropertyDescriptor( | |
| e, t | |
| ) | |
| .enumerable | |
| }))), r.push.apply(r, n) | |
| } | |
| return r | |
| } | |
| function Za(e) { | |
| for (var t = 1; t < arguments | |
| .length; t++) { | |
| var r = null != arguments[t] ? | |
| arguments[t] : {}; | |
| t % 2 ? Ya(Object(r), !0) | |
| .forEach((function(t) { | |
| var n; | |
| n = r[t], t in | |
| e ? Object | |
| .defineProperty( | |
| e, t, { | |
| value: n, | |
| enumerable: | |
| ! | |
| 0, | |
| configurable: | |
| ! | |
| 0, | |
| writable: | |
| ! | |
| 0 | |
| }) : e[ | |
| t] = n | |
| })) : Object | |
| .getOwnPropertyDescriptors ? | |
| Object.defineProperties(e, | |
| Object | |
| .getOwnPropertyDescriptors( | |
| r)) : Ya(Object(r)) | |
| .forEach((function(t) { | |
| Object | |
| .defineProperty( | |
| e, t, | |
| Object | |
| .getOwnPropertyDescriptor( | |
| r, t | |
| )) | |
| })) | |
| } | |
| return e | |
| } | |
| function Xa() { | |
| var e = function(e) { | |
| var t, r, n, i = function( | |
| e) { | |
| if (Array.isArray( | |
| e)) return e | |
| }(t = Array.prototype | |
| .slice.call(e)) || | |
| function(e, t) { | |
| var r = null == e ? | |
| null : | |
| "undefined" != | |
| typeof Symbol && | |
| e[Symbol | |
| .iterator | |
| ] || e[ | |
| "@@iterator" | |
| ]; | |
| if (null != r) { | |
| var n, i, | |
| a = [], | |
| o = !0, | |
| l = !1; | |
| try { | |
| for (r = r | |
| .call( | |
| e); !( | |
| o = | |
| (n = r | |
| .next() | |
| ) | |
| .done | |
| ) && | |
| (a.push(n | |
| .value | |
| ), | |
| 4 !== | |
| a | |
| .length | |
| ); o = ! | |
| 0); | |
| } catch (e) { | |
| l = !0, i = | |
| e | |
| } finally { | |
| try { | |
| o || null == | |
| r | |
| .return || | |
| r | |
| .return() | |
| } finally { | |
| if (l) | |
| throw i | |
| } | |
| } | |
| return a | |
| } | |
| }(t) || function(e, t) { | |
| if (e) { | |
| if ("string" == | |
| typeof e) | |
| return qa(e, | |
| 4); | |
| var r = Object | |
| .prototype | |
| .toString | |
| .call(e) | |
| .slice(8, - | |
| 1); | |
| if ("Object" === | |
| r && e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name), | |
| "Map" === | |
| r || | |
| "Set" === r) | |
| return Array | |
| .from( | |
| e); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test(r)) | |
| return qa(e, | |
| 4) | |
| } | |
| }(t) || function() { | |
| throw TypeError( | |
| "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| }(), | |
| a = i[0], | |
| o = i[1], | |
| l = i[2], | |
| s = i[3]; | |
| if ("string" != typeof a) | |
| throw TypeError( | |
| "A text for parsing must be a string." | |
| ); | |
| if (o && "string" != | |
| typeof o) { | |
| if ("object" !== za(o)) | |
| throw Error( | |
| "Invalid second argument: " | |
| .concat(o)); | |
| l ? (r = o, n = l) : n = | |
| o | |
| } else s ? (r = l, n = s) : | |
| (r = void 0, n = l), | |
| o && (r = function(e) { | |
| for (var t = | |
| 1; t < | |
| arguments | |
| .length; t++ | |
| ) { | |
| var r = | |
| null != | |
| arguments[ | |
| t] ? | |
| arguments[ | |
| t] : | |
| {}; | |
| t % 2 ? ja( | |
| Object( | |
| r | |
| ), | |
| !0) | |
| .forEach( | |
| (function( | |
| t | |
| ) { | |
| var | |
| n; | |
| n = r[ | |
| t], | |
| t in | |
| e ? | |
| Object | |
| .defineProperty( | |
| e, | |
| t, { | |
| value: n, | |
| enumerable: | |
| ! | |
| 0, | |
| configurable: | |
| ! | |
| 0, | |
| writable: | |
| ! | |
| 0 | |
| } | |
| ) : | |
| e[ | |
| t] = | |
| n | |
| }) | |
| ) : | |
| Object | |
| .getOwnPropertyDescriptors ? | |
| Object | |
| .defineProperties( | |
| e, | |
| Object | |
| .getOwnPropertyDescriptors( | |
| r | |
| ) | |
| ) : | |
| ja(Object( | |
| r | |
| )) | |
| .forEach( | |
| (function( | |
| t | |
| ) { | |
| Object | |
| .defineProperty( | |
| e, | |
| t, | |
| Object | |
| .getOwnPropertyDescriptor( | |
| r, | |
| t | |
| ) | |
| ) | |
| })) | |
| } | |
| return e | |
| }({ | |
| defaultCountry: o | |
| }, r)); | |
| return { | |
| text: a, | |
| options: r, | |
| metadata: n | |
| } | |
| }(arguments), | |
| t = e.text, | |
| r = e.options, | |
| n = e.metadata, | |
| i = function(e, t, r) { | |
| var n; | |
| t && t.defaultCountry && ( | |
| n = t | |
| .defaultCountry, !r | |
| .countries | |
| .hasOwnProperty(n) | |
| ) && (t = Ka(Ka({}, | |
| t), {}, { | |
| defaultCountry: void 0 | |
| })); | |
| try { | |
| return function(e, t, | |
| r) { | |
| if (t = t || {}, | |
| r = new Ui( | |
| r), t | |
| .defaultCountry && | |
| !r | |
| .hasCountry( | |
| t | |
| .defaultCountry | |
| )) { | |
| if (t.v2) | |
| throw new Ni( | |
| "INVALID_COUNTRY" | |
| ); | |
| throw Error( | |
| "Unknown country: " | |
| .concat( | |
| t | |
| .defaultCountry | |
| ) | |
| ) | |
| } | |
| var n, i = | |
| function(e, | |
| t, r) { | |
| var n = | |
| function( | |
| e, | |
| t | |
| ) { | |
| var r, | |
| n = | |
| t | |
| .extractFormattedPhoneNumber, | |
| i = | |
| function( | |
| e | |
| ) { | |
| var t = | |
| e | |
| .indexOf( | |
| Ua | |
| ); | |
| if (t < | |
| 0 | |
| ) | |
| return null; | |
| var r = | |
| t + | |
| 15; | |
| if (r >= | |
| e | |
| .length | |
| ) | |
| return ""; | |
| var n = | |
| e | |
| .indexOf( | |
| ";", | |
| r | |
| ); | |
| return n >= | |
| 0 ? | |
| e | |
| .substring( | |
| r, | |
| n | |
| ) : | |
| e | |
| .substring( | |
| r | |
| ) | |
| } | |
| ( | |
| e); | |
| if (null !== | |
| i && | |
| (0 === | |
| i | |
| .length || | |
| ! | |
| La | |
| .test( | |
| i | |
| ) && | |
| ! | |
| Da | |
| .test( | |
| i | |
| ) | |
| ) | |
| ) | |
| throw new Ni( | |
| "NOT_A_NUMBER" | |
| ); | |
| if (null === | |
| i | |
| ) | |
| r = | |
| n( | |
| e) || | |
| ""; | |
| else { | |
| r = "", | |
| "+" === | |
| i | |
| .charAt( | |
| 0 | |
| ) && | |
| (r += | |
| i | |
| ); | |
| var a, | |
| o = | |
| e | |
| .indexOf( | |
| Fa | |
| ); | |
| a = o >= | |
| 0 ? | |
| o + | |
| 4 : | |
| 0; | |
| var l = | |
| e | |
| .indexOf( | |
| Ua | |
| ); | |
| r += e | |
| .substring( | |
| a, | |
| l | |
| ) | |
| } | |
| var s = | |
| r | |
| .indexOf( | |
| ";isub=" | |
| ); | |
| if (s > | |
| 0 && | |
| (r = r | |
| .substring( | |
| 0, | |
| s | |
| ) | |
| ), | |
| "" !== | |
| r | |
| ) | |
| return r | |
| }(e, { | |
| extractFormattedPhoneNumber: function( | |
| e | |
| ) { | |
| return function( | |
| e, | |
| t, | |
| r | |
| ) { | |
| if ( | |
| e) { | |
| if (e | |
| .length > | |
| 250 | |
| ) { | |
| if ( | |
| r) | |
| throw new Ni( | |
| "TOO_LONG" | |
| ); | |
| return | |
| } | |
| if (! | |
| 1 === | |
| t | |
| ) | |
| return e; | |
| var n = | |
| e | |
| .search( | |
| Wa | |
| ); | |
| if (! | |
| (n < | |
| 0) | |
| ) | |
| return e | |
| .slice( | |
| n | |
| ) | |
| .replace( | |
| Ba, | |
| "" | |
| ) | |
| } | |
| } | |
| (e, r, | |
| t | |
| ) | |
| } | |
| }); | |
| if (!n) | |
| return {}; | |
| if (!(n.length >= | |
| 2 && | |
| Ji | |
| .test( | |
| n | |
| ) | |
| )) | |
| return Xi | |
| .test( | |
| n | |
| ) ? | |
| { | |
| error: "TOO_SHORT" | |
| } : | |
| {}; | |
| var i = | |
| function( | |
| e | |
| ) { | |
| var t = | |
| e | |
| .search( | |
| ea | |
| ); | |
| if (t < | |
| 0 | |
| ) | |
| return {}; | |
| for ( | |
| var r = | |
| e | |
| .slice( | |
| 0, | |
| t | |
| ), | |
| n = | |
| e | |
| .match( | |
| ea | |
| ), | |
| i = | |
| 1; i < | |
| n | |
| .length; | |
| ) { | |
| if (n[ | |
| i]) | |
| return { | |
| number: r, | |
| ext: n[ | |
| i] | |
| }; | |
| i++ | |
| } | |
| }( | |
| n); | |
| return i | |
| .ext ? | |
| i : | |
| { | |
| number: n | |
| } | |
| }(e, t.v2, t | |
| .extract | |
| ), | |
| a = i | |
| .number, | |
| o = i.ext, | |
| l = i.error; | |
| if (!a) { | |
| if (t.v2) { | |
| if ("TOO_SHORT" === | |
| l) | |
| throw new Ni( | |
| "TOO_SHORT" | |
| ); | |
| throw new Ni( | |
| "NOT_A_NUMBER" | |
| ) | |
| } | |
| return {} | |
| } | |
| var s = | |
| function(e, | |
| t, r, n | |
| ) { | |
| var i, | |
| a = | |
| Ia(aa( | |
| e), | |
| t, | |
| r, | |
| n | |
| .metadata | |
| ), | |
| o = | |
| a | |
| .countryCallingCodeSource, | |
| l = | |
| a | |
| .countryCallingCode, | |
| s = | |
| a | |
| .number; | |
| if (l) n | |
| .selectNumberingPlan( | |
| l | |
| ); | |
| else { | |
| if (! | |
| s || | |
| ! | |
| t && | |
| ! | |
| r | |
| ) | |
| return {}; | |
| n.selectNumberingPlan( | |
| t, | |
| r | |
| ), | |
| t && | |
| (i = | |
| t), | |
| l = | |
| r || | |
| Vi(t, | |
| n | |
| .metadata | |
| ) | |
| } | |
| if (!s) | |
| return { | |
| countryCallingCodeSource: o, | |
| countryCallingCode: l | |
| }; | |
| var d = | |
| Sa(aa( | |
| s), | |
| n | |
| ), | |
| c = | |
| d | |
| .nationalNumber, | |
| u = | |
| d | |
| .carrierCode, | |
| h = | |
| Ra(l, { | |
| nationalNumber: c, | |
| defaultCountry: t, | |
| metadata: n | |
| }); | |
| return h && | |
| (i = h, | |
| "001" === | |
| h || | |
| n | |
| .country( | |
| i | |
| ) | |
| ), { | |
| country: i, | |
| countryCallingCode: l, | |
| countryCallingCodeSource: o, | |
| nationalNumber: c, | |
| carrierCode: u | |
| } | |
| }(a, t | |
| .defaultCountry, | |
| t | |
| .defaultCallingCode, | |
| r), | |
| d = s | |
| .country, | |
| c = s | |
| .nationalNumber, | |
| u = s | |
| .countryCallingCode, | |
| h = s | |
| .countryCallingCodeSource, | |
| p = s | |
| .carrierCode; | |
| if (!r | |
| .hasSelectedNumberingPlan() | |
| ) { | |
| if (t.v2) | |
| throw new Ni( | |
| "INVALID_COUNTRY" | |
| ); | |
| return {} | |
| } | |
| if (!c || c | |
| .length < 2 | |
| ) { | |
| if (t.v2) | |
| throw new Ni( | |
| "TOO_SHORT" | |
| ); | |
| return {} | |
| } | |
| if (c.length > | |
| 17) { | |
| if (t.v2) | |
| throw new Ni( | |
| "TOO_LONG" | |
| ); | |
| return {} | |
| } | |
| if (t.v2) { | |
| var m = | |
| new xa( | |
| u, | |
| c, r | |
| .metadata | |
| ); | |
| return d && | |
| (m.country = | |
| d), | |
| p && (m | |
| .carrierCode = | |
| p), | |
| o && (m | |
| .ext = | |
| o), | |
| m | |
| .__countryCallingCodeSource = | |
| h, m | |
| } | |
| var f = !!(t | |
| .extended ? | |
| r | |
| .hasSelectedNumberingPlan() : | |
| d) && | |
| sa(c, r | |
| .nationalNumberPattern() | |
| ); | |
| return t | |
| .extended ? | |
| { | |
| country: d, | |
| countryCallingCode: u, | |
| carrierCode: p, | |
| valid: f, | |
| possible: | |
| !! | |
| f || | |
| !(!0 !== | |
| t | |
| .extended || | |
| ! | |
| r | |
| .possibleLengths() || | |
| ! | |
| la(c, | |
| r | |
| ) | |
| ), | |
| phone: c, | |
| ext: o | |
| } : f ? ( | |
| n = { | |
| country: d, | |
| phone: c | |
| }, o && | |
| (n.ext = | |
| o), | |
| n) : {} | |
| }(e, Ha(Ha({}, | |
| t), {}, { | |
| v2: !0 | |
| }), r) | |
| } catch (e) { | |
| if (!(e instanceof Ni)) | |
| throw e | |
| } | |
| }(t, r = Za(Za({}, r), {}, { | |
| extract: !1 | |
| }), n); | |
| return i && i.isPossible() || !1 | |
| } | |
| var Qa = function() { | |
| var e; | |
| function t(e) { | |
| var r = e.onCountryChange, | |
| n = e | |
| .onCallingCodeChange; | |
| ! function(e, t) { | |
| if (!(e instanceof t)) | |
| throw TypeError( | |
| "Cannot call a class as a function" | |
| ) | |
| }(this, t), this | |
| .onCountryChange = r, | |
| this | |
| .onCallingCodeChange = n | |
| } | |
| return e = [{ | |
| key: "reset", | |
| value: function(e) { | |
| var t = e | |
| .country, | |
| r = e | |
| .callingCode; | |
| this.international = ! | |
| 1, this | |
| .missingPlus = ! | |
| 1, this | |
| .IDDPrefix = | |
| void 0, | |
| this | |
| .callingCode = | |
| void 0, | |
| this | |
| .digits = | |
| "", this | |
| .resetNationalSignificantNumber(), | |
| this | |
| .initCountryAndCallingCode( | |
| t, r | |
| ) | |
| } | |
| }, { | |
| key: "resetNationalSignificantNumber", | |
| value: function() { | |
| this.nationalSignificantNumber = | |
| this | |
| .getNationalDigits(), | |
| this | |
| .nationalSignificantNumberMatchesInput = ! | |
| 0, this | |
| .nationalPrefix = | |
| void 0, | |
| this | |
| .carrierCode = | |
| void 0, | |
| this | |
| .complexPrefixBeforeNationalSignificantNumber = | |
| void 0 | |
| } | |
| }, { | |
| key: "update", | |
| value: function(e) { | |
| for (var t = | |
| 0, | |
| r = | |
| Object | |
| .keys( | |
| e | |
| ); t < | |
| r | |
| .length; t++ | |
| ) { | |
| var n = | |
| r[ | |
| t]; | |
| this[ | |
| n] = | |
| e[n] | |
| } | |
| } | |
| }, { | |
| key: "initCountryAndCallingCode", | |
| value: function(e, | |
| t) { | |
| this.setCountry( | |
| e), | |
| this | |
| .setCallingCode( | |
| t) | |
| } | |
| }, { | |
| key: "setCountry", | |
| value: function(e) { | |
| this.country = | |
| e, this | |
| .onCountryChange( | |
| e) | |
| } | |
| }, { | |
| key: "setCallingCode", | |
| value: function(e) { | |
| this.callingCode = | |
| e, this | |
| .onCallingCodeChange( | |
| e, | |
| this | |
| .country | |
| ) | |
| } | |
| }, { | |
| key: "startInternationalNumber", | |
| value: function(e, | |
| t) { | |
| this.international = ! | |
| 0, this | |
| .initCountryAndCallingCode( | |
| e, t | |
| ) | |
| } | |
| }, { | |
| key: "appendDigits", | |
| value: function(e) { | |
| this.digits += | |
| e | |
| } | |
| }, { | |
| key: "appendNationalSignificantNumberDigits", | |
| value: function(e) { | |
| this.nationalSignificantNumber += | |
| e | |
| } | |
| }, { | |
| key: "getNationalDigits", | |
| value: function() { | |
| return this | |
| .international ? | |
| this | |
| .digits | |
| .slice((this | |
| .IDDPrefix ? | |
| this | |
| .IDDPrefix | |
| .length : | |
| 0 | |
| ) + | |
| (this | |
| .callingCode ? | |
| this | |
| .callingCode | |
| .length : | |
| 0 | |
| ) | |
| ) : | |
| this | |
| .digits | |
| } | |
| }, { | |
| key: "getDigitsWithoutInternationalPrefix", | |
| value: function() { | |
| return this | |
| .international && | |
| this | |
| .IDDPrefix ? | |
| this | |
| .digits | |
| .slice( | |
| this | |
| .IDDPrefix | |
| .length | |
| ) : | |
| this | |
| .digits | |
| } | |
| }], | |
| function(e, t) { | |
| for (var r = 0; r < t | |
| .length; r++) { | |
| var n = t[r]; | |
| n.enumerable = n | |
| .enumerable || ! | |
| 1, n | |
| .configurable = ! | |
| 0, "value" in | |
| n && (n | |
| .writable = ! | |
| 0), Object | |
| .defineProperty( | |
| e, n.key, n) | |
| } | |
| }(t.prototype, e), Object | |
| .defineProperty(t, | |
| "prototype", { | |
| writable: !1 | |
| }), t | |
| }(); | |
| function Ja(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| var eo = /x/; | |
| function to(e, t) { | |
| if (t < 1) return ""; | |
| for (var r = ""; t > 1;) 1 & t && ( | |
| r += e), t >>= 1, e += e; | |
| return r + e | |
| } | |
| function ro(e, t) { | |
| return ")" === e[t] && t++, | |
| function(e) { | |
| for (var t = [], r = 0; r < | |
| e.length;) "(" === e[ | |
| r] ? t.push(r) : ")" === | |
| e[r] && t.pop(), r++; | |
| var n = 0, | |
| i = ""; | |
| t.push(e.length); | |
| for (var a = 0; a < t | |
| .length; a++) { | |
| var o = t[a]; | |
| i += e.slice(n, o), n = | |
| o + 1 | |
| } | |
| return i | |
| }(e.slice(0, t)) | |
| } | |
| function no(e, t, r) { | |
| var n = r.metadata, | |
| i = r | |
| .useNationalPrefixFormattingRule, | |
| a = r | |
| .getSeparatorAfterNationalPrefix, | |
| o = fa(e | |
| .nationalSignificantNumber, | |
| t, { | |
| carrierCode: e | |
| .carrierCode, | |
| useInternationalFormat: e | |
| .international, | |
| withNationalPrefix: i, | |
| metadata: n | |
| }); | |
| if (i || (e.nationalPrefix ? o = e | |
| .nationalPrefix + a(t) + o : | |
| e | |
| .complexPrefixBeforeNationalSignificantNumber && | |
| (o = e | |
| .complexPrefixBeforeNationalSignificantNumber + | |
| " " + o)), na(o) === e | |
| .getNationalDigits()) return o | |
| } | |
| var io = function() { | |
| var e; | |
| function t() { | |
| ! function(e, t) { | |
| if (!(e instanceof t)) | |
| throw TypeError( | |
| "Cannot call a class as a function" | |
| ) | |
| }(this, t) | |
| } | |
| return e = [{ | |
| key: "parse", | |
| value: function(e) { | |
| if (this | |
| .context = [{ | |
| or: ! | |
| 0, | |
| instructions: [] | |
| }], this | |
| .parsePattern( | |
| e), | |
| 1 !== | |
| this | |
| .context | |
| .length) | |
| throw Error( | |
| "Non-finalized contexts left when pattern parse ended" | |
| ); | |
| var t = this | |
| .context[ | |
| 0], | |
| r = t | |
| .branches, | |
| n = t | |
| .instructions; | |
| if (r) | |
| return { | |
| op: "|", | |
| args: r | |
| .concat( | |
| [lo( | |
| n)] | |
| ) | |
| }; | |
| if (0 === n | |
| .length) | |
| throw Error( | |
| "Pattern is required" | |
| ); | |
| return 1 === | |
| n | |
| .length ? | |
| n[0] : n | |
| } | |
| }, { | |
| key: "startContext", | |
| value: function(e) { | |
| this.context | |
| .push(e) | |
| } | |
| }, { | |
| key: "endContext", | |
| value: function() { | |
| this.context | |
| .pop() | |
| } | |
| }, { | |
| key: "getContext", | |
| value: function() { | |
| return this | |
| .context[ | |
| this | |
| .context | |
| .length - | |
| 1] | |
| } | |
| }, { | |
| key: "parsePattern", | |
| value: function(e) { | |
| if (!e) | |
| throw Error( | |
| "Pattern is required" | |
| ); | |
| var t = e | |
| .match( | |
| oo); | |
| if (t) { | |
| var r = | |
| t[ | |
| 1], | |
| n = | |
| e | |
| .slice( | |
| 0, | |
| t | |
| .index | |
| ), | |
| i = | |
| e | |
| .slice( | |
| t | |
| .index + | |
| r | |
| .length | |
| ); | |
| switch ( | |
| r) { | |
| case "(?:": | |
| n && this | |
| .parsePattern( | |
| n | |
| ), | |
| this | |
| .startContext({ | |
| or: ! | |
| 0, | |
| instructions: [], | |
| branches: [] | |
| }); | |
| break; | |
| case ")": | |
| if (! | |
| this | |
| .getContext() | |
| .or | |
| ) | |
| throw Error( | |
| '")" operator must be preceded by "(?:" operator' | |
| ); | |
| if (n && | |
| this | |
| .parsePattern( | |
| n | |
| ), | |
| 0 === | |
| this | |
| .getContext() | |
| .instructions | |
| .length | |
| ) | |
| throw Error( | |
| 'No instructions found after "|" operator in an "or" group' | |
| ); | |
| var a = | |
| this | |
| .getContext() | |
| .branches; | |
| a.push(lo(this | |
| .getContext() | |
| .instructions | |
| )), | |
| this | |
| .endContext(), | |
| this | |
| .getContext() | |
| .instructions | |
| .push({ | |
| op: "|", | |
| args: a | |
| }); | |
| break; | |
| case "|": | |
| if (! | |
| this | |
| .getContext() | |
| .or | |
| ) | |
| throw Error( | |
| '"|" operator can only be used inside "or" groups' | |
| ); | |
| if (n && | |
| this | |
| .parsePattern( | |
| n | |
| ), | |
| ! | |
| this | |
| .getContext() | |
| .branches | |
| ) { | |
| if (1 !== | |
| this | |
| .context | |
| .length | |
| ) | |
| throw Error( | |
| '"branches" not found in an "or" group context' | |
| ); | |
| this.getContext() | |
| .branches = [] | |
| } | |
| this.getContext() | |
| .branches | |
| .push( | |
| lo(this | |
| .getContext() | |
| .instructions | |
| ) | |
| ), | |
| this | |
| .getContext() | |
| .instructions = []; | |
| break; | |
| case "[": | |
| n && this | |
| .parsePattern( | |
| n | |
| ), | |
| this | |
| .startContext({ | |
| oneOfSet: | |
| ! | |
| 0 | |
| }); | |
| break; | |
| case "]": | |
| if (! | |
| this | |
| .getContext() | |
| .oneOfSet | |
| ) | |
| throw Error( | |
| '"]" operator must be preceded by "[" operator' | |
| ); | |
| this.endContext(), | |
| this | |
| .getContext() | |
| .instructions | |
| .push({ | |
| op: "[]", | |
| args: function( | |
| e | |
| ) { | |
| for ( | |
| var t = [], | |
| r = | |
| 0; r < | |
| e | |
| .length; | |
| ) { | |
| if ("-" === | |
| e[ | |
| r] | |
| ) { | |
| if (0 === | |
| r || | |
| r === | |
| e | |
| .length - | |
| 1 | |
| ) | |
| throw Error( | |
| "Couldn't parse a one-of set pattern: " | |
| .concat( | |
| e | |
| ) | |
| ); | |
| for ( | |
| var n = | |
| e[r - | |
| 1 | |
| ] | |
| .charCodeAt( | |
| 0 | |
| ) + | |
| 1, | |
| i = | |
| e[r + | |
| 1 | |
| ] | |
| .charCodeAt( | |
| 0 | |
| ) - | |
| 1, | |
| a = | |
| n; a <= | |
| i; | |
| ) | |
| t | |
| .push( | |
| String | |
| .fromCharCode( | |
| a | |
| ) | |
| ), | |
| a++ | |
| } else | |
| t | |
| .push( | |
| e[ | |
| r] | |
| ); | |
| r++ | |
| } | |
| return t | |
| } | |
| ( | |
| n) | |
| }); | |
| break; | |
| default: | |
| throw Error( | |
| "Unknown operator: " | |
| .concat( | |
| r | |
| ) | |
| ) | |
| } | |
| i && this | |
| .parsePattern( | |
| i | |
| ) | |
| } else { | |
| if (ao | |
| .test( | |
| e | |
| ) | |
| ) | |
| throw Error( | |
| "Illegal characters found in a pattern: " | |
| .concat( | |
| e | |
| ) | |
| ); | |
| this.getContext() | |
| .instructions = | |
| this | |
| .getContext() | |
| .instructions | |
| .concat( | |
| e | |
| .split( | |
| "" | |
| ) | |
| ) | |
| } | |
| } | |
| }], | |
| function(e, t) { | |
| for (var r = 0; r < t | |
| .length; r++) { | |
| var n = t[r]; | |
| n.enumerable = n | |
| .enumerable || ! | |
| 1, n | |
| .configurable = ! | |
| 0, "value" in | |
| n && (n | |
| .writable = ! | |
| 0), Object | |
| .defineProperty( | |
| e, n.key, n) | |
| } | |
| }(t.prototype, e), Object | |
| .defineProperty(t, | |
| "prototype", { | |
| writable: !1 | |
| }), t | |
| }(), | |
| ao = /[\(\)\[\]\?\:\|]/, | |
| oo = RegExp( | |
| "(\\||\\(\\?\\:|\\)|\\[|\\])"); | |
| function lo(e) { | |
| return 1 === e.length ? e[0] : e | |
| } | |
| function so(e, t) { | |
| var r = "undefined" != | |
| typeof Symbol && e[Symbol | |
| .iterator] || e[ | |
| "@@iterator"]; | |
| if (r) return (r = r.call(e)).next | |
| .bind(r); | |
| if (Array.isArray(e) || (r = | |
| function(e, t) { | |
| if (e) { | |
| if ("string" == | |
| typeof e) | |
| return co(e, | |
| void 0); | |
| var r = Object | |
| .prototype | |
| .toString.call( | |
| e).slice(8, | |
| -1); | |
| if ("Object" === | |
| r && e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name), | |
| "Map" === r || | |
| "Set" === r) | |
| return Array | |
| .from(e); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test(r)) | |
| return co(e, | |
| void 0) | |
| } | |
| }(e)) || t) { | |
| r && (e = r); | |
| var n = 0; | |
| return function() { | |
| return n >= e.length ? { | |
| done: !0 | |
| } : { | |
| done: !1, | |
| value: e[n++] | |
| } | |
| } | |
| } | |
| throw TypeError( | |
| "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| } | |
| function co(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| var uo = function() { | |
| var e; | |
| function t(e) { | |
| ! function(e, t) { | |
| if (!(e instanceof t)) | |
| throw TypeError( | |
| "Cannot call a class as a function" | |
| ) | |
| }(this, t), this.matchTree = | |
| (new io).parse(e) | |
| } | |
| return e = [{ | |
| key: "match", | |
| value: function(e) { | |
| var t = ( | |
| arguments | |
| .length > | |
| 1 && | |
| void 0 !== | |
| arguments[ | |
| 1 | |
| ] ? | |
| arguments[ | |
| 1 | |
| ] : | |
| {}) | |
| .allowOverflow; | |
| if (!e) | |
| throw Error( | |
| "String is required" | |
| ); | |
| var r = | |
| function e( | |
| t, | |
| r, n | |
| ) { | |
| if ("string" == | |
| typeof r | |
| ) { | |
| var i = | |
| t | |
| .join( | |
| "" | |
| ); | |
| return 0 === | |
| r | |
| .indexOf( | |
| i | |
| ) ? | |
| t | |
| .length === | |
| r | |
| .length ? | |
| { | |
| match: | |
| ! | |
| 0, | |
| matchedChars: t | |
| } : | |
| { | |
| partialMatch: | |
| ! | |
| 0 | |
| } : | |
| 0 === | |
| i | |
| .indexOf( | |
| r | |
| ) ? | |
| n && | |
| t | |
| .length > | |
| r | |
| .length ? | |
| { | |
| overflow: | |
| ! | |
| 0 | |
| } : | |
| { | |
| match: | |
| ! | |
| 0, | |
| matchedChars: t | |
| .slice( | |
| 0, | |
| r | |
| .length | |
| ) | |
| } : | |
| void 0 | |
| } | |
| if (Array | |
| .isArray( | |
| r | |
| ) | |
| ) { | |
| for ( | |
| var a = | |
| t | |
| .slice(), | |
| o = | |
| 0; o < | |
| r | |
| .length; | |
| ) { | |
| var l = | |
| e(a, r[ | |
| o], | |
| n && | |
| o === | |
| r | |
| .length - | |
| 1 | |
| ); | |
| if (! | |
| l | |
| ) | |
| return; | |
| if (l | |
| .overflow | |
| ) | |
| return l; | |
| if (! | |
| l | |
| .match | |
| ) { | |
| if (l | |
| .partialMatch | |
| ) | |
| return { | |
| partialMatch: | |
| ! | |
| 0 | |
| }; | |
| throw Error( | |
| "Unsupported match result:\n" | |
| .concat( | |
| JSON | |
| .stringify( | |
| l, | |
| null, | |
| 2 | |
| ) | |
| ) | |
| ) | |
| } | |
| if (0 === | |
| (a = a | |
| .slice( | |
| l | |
| .matchedChars | |
| .length | |
| ) | |
| ) | |
| .length | |
| ) | |
| return o === | |
| r | |
| .length - | |
| 1 ? | |
| { | |
| match: | |
| ! | |
| 0, | |
| matchedChars: t | |
| } : | |
| { | |
| partialMatch: | |
| ! | |
| 0 | |
| }; | |
| o++ | |
| } | |
| return n ? | |
| { | |
| overflow: | |
| ! | |
| 0 | |
| } : | |
| { | |
| match: | |
| ! | |
| 0, | |
| matchedChars: t | |
| .slice( | |
| 0, | |
| t | |
| .length - | |
| a | |
| .length | |
| ) | |
| } | |
| } | |
| switch ( | |
| r | |
| .op | |
| ) { | |
| case "|": | |
| for ( | |
| var s, | |
| d, | |
| c = | |
| so(r | |
| .args); ! | |
| (d = | |
| c()) | |
| .done; | |
| ) { | |
| var u = | |
| e(t, d | |
| .value, | |
| n | |
| ); | |
| if ( | |
| u) { | |
| if (u | |
| .overflow | |
| ) | |
| return u; | |
| if (u | |
| .match | |
| ) | |
| return { | |
| match: | |
| ! | |
| 0, | |
| matchedChars: u | |
| .matchedChars | |
| }; | |
| if (! | |
| u | |
| .partialMatch | |
| ) | |
| throw Error( | |
| "Unsupported match result:\n" | |
| .concat( | |
| JSON | |
| .stringify( | |
| u, | |
| null, | |
| 2 | |
| ) | |
| ) | |
| ); | |
| s = ! | |
| 0 | |
| } | |
| } | |
| return s ? | |
| { | |
| partialMatch: | |
| ! | |
| 0 | |
| } : | |
| void 0; | |
| case "[]": | |
| for ( | |
| var h, | |
| p = | |
| so(r | |
| .args); ! | |
| (h = | |
| p()) | |
| .done; | |
| ) { | |
| var m = | |
| h | |
| .value; | |
| if (t[ | |
| 0] === | |
| m | |
| ) | |
| return 1 === | |
| t | |
| .length ? | |
| { | |
| match: | |
| ! | |
| 0, | |
| matchedChars: t | |
| } : | |
| n ? | |
| { | |
| overflow: | |
| ! | |
| 0 | |
| } : | |
| { | |
| match: | |
| ! | |
| 0, | |
| matchedChars: [ | |
| m | |
| ] | |
| } | |
| } | |
| return; | |
| default: | |
| throw Error( | |
| "Unsupported instruction tree: " | |
| .concat( | |
| r | |
| ) | |
| ) | |
| } | |
| }(e.split( | |
| "" | |
| ), | |
| this | |
| .matchTree, | |
| !0); | |
| if (r && r | |
| .match && | |
| delete r | |
| .matchedChars, | |
| !r || !r | |
| .overflow || | |
| t) | |
| return r | |
| } | |
| }], | |
| function(e, t) { | |
| for (var r = 0; r < t | |
| .length; r++) { | |
| var n = t[r]; | |
| n.enumerable = n | |
| .enumerable || ! | |
| 1, n | |
| .configurable = ! | |
| 0, "value" in | |
| n && (n | |
| .writable = ! | |
| 0), Object | |
| .defineProperty( | |
| e, n.key, n) | |
| } | |
| }(t.prototype, e), Object | |
| .defineProperty(t, | |
| "prototype", { | |
| writable: !1 | |
| }), t | |
| }(); | |
| function ho(e, t) { | |
| var r = "undefined" != | |
| typeof Symbol && e[Symbol | |
| .iterator] || e[ | |
| "@@iterator"]; | |
| if (r) return (r = r.call(e)).next | |
| .bind(r); | |
| if (Array.isArray(e) || (r = | |
| function(e, t) { | |
| if (e) { | |
| if ("string" == | |
| typeof e) | |
| return po(e, | |
| void 0); | |
| var r = Object | |
| .prototype | |
| .toString.call( | |
| e).slice(8, | |
| -1); | |
| if ("Object" === | |
| r && e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name), | |
| "Map" === r || | |
| "Set" === r) | |
| return Array | |
| .from(e); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test(r)) | |
| return po(e, | |
| void 0) | |
| } | |
| }(e)) || t) { | |
| r && (e = r); | |
| var n = 0; | |
| return function() { | |
| return n >= e.length ? { | |
| done: !0 | |
| } : { | |
| done: !1, | |
| value: e[n++] | |
| } | |
| } | |
| } | |
| throw TypeError( | |
| "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| } | |
| function po(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| var mo = to("9", 15), | |
| fo = /[- ]/, | |
| go = RegExp("[" + Pi + "]*\\$1[" + | |
| Pi + "]*(\\$\\d[" + Pi + "]*)*$" | |
| ), | |
| yo = function() { | |
| var e; | |
| function t(e) { | |
| e.state; | |
| var r = e.metadata; | |
| ! function(e, t) { | |
| if (!(e instanceof t)) | |
| throw TypeError( | |
| "Cannot call a class as a function" | |
| ) | |
| }(this, t), this.metadata = | |
| r, this.resetFormat() | |
| } | |
| return e = [{ | |
| key: "resetFormat", | |
| value: function() { | |
| this.chosenFormat = | |
| void 0, | |
| this | |
| .template = | |
| void 0, | |
| this | |
| .nationalNumberTemplate = | |
| void 0, | |
| this | |
| .populatedNationalNumberTemplate = | |
| void 0, | |
| this | |
| .populatedNationalNumberTemplatePosition = - | |
| 1 | |
| } | |
| }, { | |
| key: "reset", | |
| value: function(e, | |
| t) { | |
| this.resetFormat(), | |
| e ? ( | |
| this | |
| .isNANP = | |
| "1" === | |
| e | |
| .callingCode(), | |
| this | |
| .matchingFormats = | |
| e | |
| .formats(), | |
| t | |
| .nationalSignificantNumber && | |
| this | |
| .narrowDownMatchingFormats( | |
| t | |
| ) | |
| ) : | |
| (this | |
| .isNANP = | |
| void 0, | |
| this | |
| .matchingFormats = [] | |
| ) | |
| } | |
| }, { | |
| key: "format", | |
| value: function(e, | |
| t) { | |
| var r = | |
| this; | |
| if ("IS_POSSIBLE" === | |
| oa(t.nationalSignificantNumber, | |
| this | |
| .metadata | |
| )) | |
| for (var n, | |
| i = | |
| ho(this | |
| .matchingFormats | |
| ); ! | |
| (n = | |
| i()) | |
| .done; | |
| ) { | |
| var a = | |
| n | |
| .value, | |
| o = | |
| function( | |
| e, | |
| t, | |
| r | |
| ) { | |
| var n = | |
| r | |
| .metadata, | |
| i = | |
| r | |
| .shouldTryNationalPrefixFormattingRule, | |
| a = | |
| r | |
| .getSeparatorAfterNationalPrefix; | |
| if (new RegExp( | |
| "^(?:" | |
| .concat( | |
| t | |
| .pattern(), | |
| ")$" | |
| ) | |
| ) | |
| .test( | |
| e | |
| .nationalSignificantNumber | |
| ) | |
| ) | |
| return function( | |
| e, | |
| t, | |
| r | |
| ) { | |
| var n = | |
| r | |
| .metadata, | |
| i = | |
| r | |
| .shouldTryNationalPrefixFormattingRule, | |
| a = | |
| r | |
| .getSeparatorAfterNationalPrefix; | |
| if (e | |
| .nationalSignificantNumber, | |
| e | |
| .international, | |
| e | |
| .nationalPrefix, | |
| e | |
| .carrierCode, | |
| i( | |
| t) | |
| ) { | |
| var o = | |
| no(e, | |
| t, { | |
| useNationalPrefixFormattingRule: | |
| ! | |
| 0, | |
| getSeparatorAfterNationalPrefix: a, | |
| metadata: n | |
| } | |
| ); | |
| if ( | |
| o) | |
| return o | |
| } | |
| return no( | |
| e, | |
| t, { | |
| useNationalPrefixFormattingRule: | |
| ! | |
| 1, | |
| getSeparatorAfterNationalPrefix: a, | |
| metadata: n | |
| } | |
| ) | |
| } | |
| (e, t, { | |
| metadata: n, | |
| shouldTryNationalPrefixFormattingRule: i, | |
| getSeparatorAfterNationalPrefix: a | |
| }) | |
| } | |
| (t, a, { | |
| metadata: this | |
| .metadata, | |
| shouldTryNationalPrefixFormattingRule: function( | |
| e | |
| ) { | |
| return r | |
| .shouldTryNationalPrefixFormattingRule( | |
| e, { | |
| international: t | |
| .international, | |
| nationalPrefix: t | |
| .nationalPrefix | |
| } | |
| ) | |
| }, | |
| getSeparatorAfterNationalPrefix: function( | |
| e | |
| ) { | |
| return r | |
| .getSeparatorAfterNationalPrefix( | |
| e | |
| ) | |
| } | |
| }); | |
| if ( | |
| o) | |
| return this | |
| .resetFormat(), | |
| this | |
| .chosenFormat = | |
| a, | |
| this | |
| .setNationalNumberTemplate( | |
| o | |
| .replace( | |
| /\d/g, | |
| "x" | |
| ), | |
| t | |
| ), | |
| this | |
| .populatedNationalNumberTemplate = | |
| o, | |
| this | |
| .populatedNationalNumberTemplatePosition = | |
| this | |
| .template | |
| .lastIndexOf( | |
| "x" | |
| ), | |
| o | |
| } | |
| return this | |
| .formatNationalNumberWithNextDigits( | |
| e, t | |
| ) | |
| } | |
| }, { | |
| key: "formatNationalNumberWithNextDigits", | |
| value: function(e, | |
| t) { | |
| var r = this | |
| .chosenFormat, | |
| n = this | |
| .chooseFormat( | |
| t); | |
| if (n) | |
| return n === | |
| r ? | |
| this | |
| .formatNextNationalNumberDigits( | |
| e | |
| ) : | |
| this | |
| .formatNextNationalNumberDigits( | |
| t | |
| .getNationalDigits() | |
| ) | |
| } | |
| }, { | |
| key: "narrowDownMatchingFormats", | |
| value: function(e) { | |
| var t = | |
| this, | |
| r = e | |
| .nationalSignificantNumber, | |
| n = e | |
| .nationalPrefix, | |
| i = e | |
| .international, | |
| a = r | |
| .length - | |
| 3; | |
| a < 0 && ( | |
| a = | |
| 0), | |
| this | |
| .matchingFormats = | |
| this | |
| .matchingFormats | |
| .filter( | |
| (function( | |
| e | |
| ) { | |
| return t | |
| .formatSuits( | |
| e, | |
| i, | |
| n | |
| ) && | |
| t | |
| .formatMatches( | |
| e, | |
| r, | |
| a | |
| ) | |
| })), | |
| this | |
| .chosenFormat && | |
| -1 === | |
| this | |
| .matchingFormats | |
| .indexOf( | |
| this | |
| .chosenFormat | |
| ) && | |
| this | |
| .resetFormat() | |
| } | |
| }, { | |
| key: "formatSuits", | |
| value: function(e, | |
| t, r) { | |
| return !( | |
| r && | |
| !e | |
| .usesNationalPrefix() && | |
| !e | |
| .nationalPrefixIsOptionalWhenFormattingInNationalFormat() || | |
| ! | |
| t && | |
| ! | |
| r && | |
| e | |
| .nationalPrefixIsMandatoryWhenFormattingInNationalFormat() | |
| ) | |
| } | |
| }, { | |
| key: "formatMatches", | |
| value: function(e, | |
| t, r) { | |
| var n = e | |
| .leadingDigitsPatterns() | |
| .length; | |
| if (0 === n) | |
| return ! | |
| 0; | |
| r = Math | |
| .min(r, | |
| n - | |
| 1); | |
| var i = e | |
| .leadingDigitsPatterns()[ | |
| r]; | |
| if (t | |
| .length < | |
| 3) try { | |
| return void 0 !== | |
| new uo( | |
| i | |
| ) | |
| .match( | |
| t, { | |
| allowOverflow: | |
| ! | |
| 0 | |
| } | |
| ) | |
| } catch ( | |
| e) { | |
| return console | |
| .error( | |
| e | |
| ), | |
| ! | |
| 0 | |
| } | |
| return new RegExp( | |
| "^(" | |
| .concat( | |
| i, | |
| ")" | |
| ) | |
| ) | |
| .test(t) | |
| } | |
| }, { | |
| key: "getFormatFormat", | |
| value: function(e, | |
| t) { | |
| return t ? e | |
| .internationalFormat() : | |
| e | |
| .format() | |
| } | |
| }, { | |
| key: "chooseFormat", | |
| value: function(e) { | |
| for (var t, | |
| r, | |
| n = | |
| ho(this | |
| .matchingFormats | |
| .slice() | |
| ); ! | |
| (r = | |
| n()) | |
| .done && | |
| "break" != | |
| (t = r | |
| .value, | |
| this | |
| .chosenFormat === | |
| t ? | |
| "break" : | |
| go | |
| .test( | |
| this | |
| .getFormatFormat( | |
| t, | |
| e | |
| .international | |
| ) | |
| ) ? | |
| this | |
| .createTemplateForFormat( | |
| t, | |
| e | |
| ) ? | |
| (this | |
| .chosenFormat = | |
| t, | |
| "break" | |
| ) : | |
| (this | |
| .matchingFormats = | |
| this | |
| .matchingFormats | |
| .filter( | |
| (function( | |
| e | |
| ) { | |
| return e !== | |
| t | |
| }) | |
| ), | |
| "continue" | |
| ) : | |
| "continue" | |
| );); | |
| return this | |
| .chosenFormat || | |
| this | |
| .resetFormat(), | |
| this | |
| .chosenFormat | |
| } | |
| }, { | |
| key: "createTemplateForFormat", | |
| value: function(e, | |
| t) { | |
| if (!(e.pattern() | |
| .indexOf( | |
| "|" | |
| ) >= | |
| 0 | |
| )) { | |
| var r = | |
| this | |
| .getTemplateForFormat( | |
| e, | |
| t | |
| ); | |
| return r ? | |
| (this | |
| .setNationalNumberTemplate( | |
| r, | |
| t | |
| ), | |
| ! | |
| 0 | |
| ) : | |
| void 0 | |
| } | |
| } | |
| }, { | |
| key: "getSeparatorAfterNationalPrefix", | |
| value: function(e) { | |
| return this | |
| .isNANP || | |
| e && e | |
| .nationalPrefixFormattingRule() && | |
| fo.test( | |
| e | |
| .nationalPrefixFormattingRule() | |
| ) ? | |
| " " : "" | |
| } | |
| }, { | |
| key: "getInternationalPrefixBeforeCountryCallingCode", | |
| value: function(e, | |
| t) { | |
| var r = e | |
| .IDDPrefix, | |
| n = e | |
| .missingPlus; | |
| return r ? | |
| t && ! | |
| 1 === t | |
| .spacing ? | |
| r : r + | |
| " " : | |
| n ? "" : | |
| "+" | |
| } | |
| }, { | |
| key: "getTemplate", | |
| value: function(e) { | |
| if (this | |
| .template | |
| ) { | |
| for (var t = - | |
| 1, | |
| r = | |
| 0, | |
| n = | |
| e | |
| .international ? | |
| this | |
| .getInternationalPrefixBeforeCountryCallingCode( | |
| e, { | |
| spacing: | |
| ! | |
| 1 | |
| } | |
| ) : | |
| ""; r < | |
| n | |
| .length + | |
| e | |
| .getDigitsWithoutInternationalPrefix() | |
| .length; | |
| ) | |
| t = | |
| this | |
| .template | |
| .indexOf( | |
| "x", | |
| t + | |
| 1 | |
| ), | |
| r++; | |
| return ro( | |
| this | |
| .template, | |
| t + | |
| 1 | |
| ) | |
| } | |
| } | |
| }, { | |
| key: "setNationalNumberTemplate", | |
| value: function(e, | |
| t) { | |
| this.nationalNumberTemplate = | |
| e, this | |
| .populatedNationalNumberTemplate = | |
| e, this | |
| .populatedNationalNumberTemplatePosition = - | |
| 1, t | |
| .international ? | |
| this | |
| .template = | |
| this | |
| .getInternationalPrefixBeforeCountryCallingCode( | |
| t) | |
| .replace( | |
| /[\d\+]/g, | |
| "x" | |
| ) + | |
| to("x", | |
| t | |
| .callingCode | |
| .length | |
| ) + | |
| " " + | |
| e : this | |
| .template = | |
| e | |
| } | |
| }, { | |
| key: "getTemplateForFormat", | |
| value: function(e, | |
| t) { | |
| var r = t | |
| .nationalSignificantNumber, | |
| n = t | |
| .international, | |
| i = t | |
| .nationalPrefix, | |
| a = t | |
| .complexPrefixBeforeNationalSignificantNumber, | |
| o = e | |
| .pattern(); | |
| o = o | |
| .replace( | |
| /\[([^\[\]])*\]/g, | |
| "\\d" | |
| ) | |
| .replace( | |
| /\d(?=[^,}][^,}])/g, | |
| "\\d" | |
| ); | |
| var l = mo | |
| .match( | |
| o)[ | |
| 0]; | |
| if (!(r.length > | |
| l | |
| .length | |
| )) { | |
| var s = | |
| RegExp( | |
| "^" + | |
| o + | |
| "$" | |
| ), | |
| d = | |
| r | |
| .replace( | |
| /\d/g, | |
| "9" | |
| ); | |
| s.test( | |
| d) && | |
| (l = | |
| d); | |
| var c, | |
| u = | |
| this | |
| .getFormatFormat( | |
| e, | |
| n | |
| ); | |
| if (this | |
| .shouldTryNationalPrefixFormattingRule( | |
| e, { | |
| international: n, | |
| nationalPrefix: i | |
| } | |
| ) | |
| ) { | |
| var h = | |
| u | |
| .replace( | |
| ma, | |
| e | |
| .nationalPrefixFormattingRule() | |
| ); | |
| if (na(e | |
| .nationalPrefixFormattingRule()) === | |
| (i || | |
| "" | |
| ) + | |
| na( | |
| "$1") && | |
| (u = h, | |
| c = ! | |
| 0, | |
| i | |
| ) | |
| ) | |
| for ( | |
| var p = | |
| i | |
| .length; p > | |
| 0; | |
| ) | |
| u = | |
| u | |
| .replace( | |
| /\d/, | |
| "x" | |
| ), | |
| p-- | |
| } | |
| var m = | |
| l | |
| .replace( | |
| new RegExp( | |
| o | |
| ), | |
| u | |
| ) | |
| .replace( | |
| /9/g, | |
| "x" | |
| ); | |
| return c || | |
| (a ? m = | |
| to("x", | |
| a | |
| .length | |
| ) + | |
| " " + | |
| m : | |
| i && | |
| (m = to("x", | |
| i | |
| .length | |
| ) + | |
| this | |
| .getSeparatorAfterNationalPrefix( | |
| e | |
| ) + | |
| m | |
| ) | |
| ), | |
| n && | |
| (m = pa( | |
| m)), | |
| m | |
| } | |
| } | |
| }, { | |
| key: "formatNextNationalNumberDigits", | |
| value: function(e) { | |
| var t = | |
| function( | |
| e, | |
| t, r | |
| ) { | |
| for ( | |
| var n, | |
| i = | |
| function( | |
| e, | |
| t | |
| ) { | |
| var r = | |
| "undefined" != | |
| typeof Symbol && | |
| e[Symbol | |
| .iterator | |
| ] || | |
| e[ | |
| "@@iterator"]; | |
| if ( | |
| r) | |
| return (r = | |
| r | |
| .call( | |
| e | |
| ) | |
| ) | |
| .next | |
| .bind( | |
| r | |
| ); | |
| if (Array | |
| .isArray( | |
| e | |
| ) || | |
| (r = function( | |
| e, | |
| t | |
| ) { | |
| if ( | |
| e) { | |
| if ("string" == | |
| typeof e | |
| ) | |
| return Ja( | |
| e, | |
| void 0 | |
| ); | |
| var r = | |
| Object | |
| .prototype | |
| .toString | |
| .call( | |
| e | |
| ) | |
| .slice( | |
| 8, | |
| - | |
| 1 | |
| ); | |
| if ("Object" === | |
| r && | |
| e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name | |
| ), | |
| "Map" === | |
| r || | |
| "Set" === | |
| r | |
| ) | |
| return Array | |
| .from( | |
| e | |
| ); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test( | |
| r | |
| ) | |
| ) | |
| return Ja( | |
| e, | |
| void 0 | |
| ) | |
| } | |
| } | |
| ( | |
| e) | |
| ) | |
| ) { | |
| r && (e = | |
| r | |
| ); | |
| var n = | |
| 0; | |
| return function() { | |
| return n >= | |
| e | |
| .length ? | |
| { | |
| done: | |
| ! | |
| 0 | |
| } : | |
| { | |
| done: | |
| ! | |
| 1, | |
| value: e[ | |
| n++ | |
| ] | |
| } | |
| } | |
| } | |
| throw TypeError( | |
| "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| } | |
| (r.split( | |
| "" | |
| )); ! | |
| (n = | |
| i()) | |
| .done; | |
| ) { | |
| var a = | |
| n | |
| .value; | |
| if (0 > | |
| e | |
| .slice( | |
| t + | |
| 1 | |
| ) | |
| .search( | |
| eo | |
| ) | |
| ) | |
| return; | |
| t = e | |
| .search( | |
| eo | |
| ), | |
| e = | |
| e | |
| .replace( | |
| eo, | |
| a | |
| ) | |
| } | |
| return [e, | |
| t | |
| ] | |
| }(this | |
| .populatedNationalNumberTemplate, | |
| this | |
| .populatedNationalNumberTemplatePosition, | |
| e); | |
| if (t) | |
| return this | |
| .populatedNationalNumberTemplate = | |
| t[ | |
| 0], | |
| this | |
| .populatedNationalNumberTemplatePosition = | |
| t[ | |
| 1], | |
| ro(this | |
| .populatedNationalNumberTemplate, | |
| this | |
| .populatedNationalNumberTemplatePosition + | |
| 1 | |
| ); | |
| this.resetFormat() | |
| } | |
| }, { | |
| key: "shouldTryNationalPrefixFormattingRule", | |
| value: function(e, | |
| t) { | |
| var r = t | |
| .international, | |
| n = t | |
| .nationalPrefix; | |
| if (e | |
| .nationalPrefixFormattingRule() | |
| ) { | |
| var i = | |
| e | |
| .usesNationalPrefix(); | |
| if (i && | |
| n || | |
| ! | |
| i && | |
| !r) | |
| return ! | |
| 0 | |
| } | |
| } | |
| }], | |
| function(e, t) { | |
| for (var r = 0; r < t | |
| .length; r++) { | |
| var n = t[r]; | |
| n.enumerable = n | |
| .enumerable || ! | |
| 1, n | |
| .configurable = ! | |
| 0, "value" in | |
| n && (n | |
| .writable = ! | |
| 0), Object | |
| .defineProperty( | |
| e, n.key, n) | |
| } | |
| }(t.prototype, e), Object | |
| .defineProperty(t, | |
| "prototype", { | |
| writable: !1 | |
| }), t | |
| }(); | |
| function wo(e, t) { | |
| return function(e) { | |
| if (Array.isArray(e)) | |
| return e | |
| }(e) || function(e, t) { | |
| var r = null == e ? null : | |
| "undefined" != | |
| typeof Symbol && e[ | |
| Symbol.iterator] || | |
| e["@@iterator"]; | |
| if (null != r) { | |
| var n, i, a = [], | |
| o = !0, | |
| l = !1; | |
| try { | |
| for (r = r.call( | |
| e); !(o = (n = r | |
| .next()) | |
| .done) && (a | |
| .push(n | |
| .value), | |
| !t || a | |
| .length !== | |
| t); o = !0); | |
| } catch (e) { | |
| l = !0, i = e | |
| } finally { | |
| try { | |
| o || null == r | |
| .return || r | |
| .return() | |
| } finally { | |
| if (l) throw i | |
| } | |
| } | |
| return a | |
| } | |
| }(e, t) || function(e, t) { | |
| if (e) { | |
| if ("string" == | |
| typeof e) return vo( | |
| e, t); | |
| var r = Object.prototype | |
| .toString.call(e) | |
| .slice(8, -1); | |
| if ("Object" === r && e | |
| .constructor && (r = | |
| e.constructor | |
| .name), | |
| "Map" === r || | |
| "Set" === r) | |
| return Array.from(e); | |
| if ("Arguments" === r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test(r)) return vo( | |
| e, t) | |
| } | |
| }(e, t) || function() { | |
| throw TypeError( | |
| "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| }() | |
| } | |
| function vo(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| var Co = RegExp("^[" + Pi + Ii + "]+$", | |
| "i"), | |
| bo = "(?:[++][" + Pi + Ii + "]*|[" + | |
| Pi + Ii + "]+)", | |
| Eo = RegExp("[^" + Pi + Ii + | |
| "]+.*$"), | |
| $o = /[^\d\[\]]/, | |
| xo = function() { | |
| var e; | |
| function t(e) { | |
| var r = e.defaultCountry, | |
| n = e | |
| .defaultCallingCode, | |
| i = e.metadata, | |
| a = e | |
| .onNationalSignificantNumberChange; | |
| ! function(e, t) { | |
| if (!(e instanceof t)) | |
| throw TypeError( | |
| "Cannot call a class as a function" | |
| ) | |
| }(this, t), this | |
| .defaultCountry = r, | |
| this | |
| .defaultCallingCode = n, | |
| this.metadata = i, this | |
| .onNationalSignificantNumberChange = | |
| a | |
| } | |
| return e = [{ | |
| key: "input", | |
| value: function(e, | |
| t) { | |
| var r, n, i, | |
| a, o, | |
| l = (i = | |
| (n = wo("+" === | |
| (r = function( | |
| e | |
| ) { | |
| var t, | |
| r = | |
| e | |
| .search( | |
| bo | |
| ); | |
| if (! | |
| (r < | |
| 0) | |
| ) | |
| return "+" === | |
| (e = e | |
| .slice( | |
| r | |
| ) | |
| )[ | |
| 0 | |
| ] && | |
| (t = ! | |
| 0, | |
| e = | |
| e | |
| .slice( | |
| 1 | |
| ) | |
| ), | |
| e = | |
| e | |
| .replace( | |
| Eo, | |
| "" | |
| ), | |
| t && | |
| (e = "+" + | |
| e | |
| ), | |
| e | |
| } | |
| ( | |
| e) || | |
| "" | |
| )[ | |
| 0 | |
| ] ? | |
| [r.slice( | |
| 1 | |
| ), | |
| ! | |
| 0 | |
| ] : | |
| [ | |
| r], | |
| 2 | |
| ))[ | |
| 0 | |
| ], | |
| a = | |
| n[ | |
| 1], | |
| Co | |
| .test( | |
| i | |
| ) || | |
| (i = | |
| ""), | |
| [i, | |
| a] | |
| ), | |
| s = wo( | |
| l, 2 | |
| ), | |
| d = s[ | |
| 0], | |
| c = s[ | |
| 1], | |
| u = na( | |
| d); | |
| return c && | |
| (t.digits || | |
| (t.startInternationalNumber(), | |
| u || | |
| (o = ! | |
| 0 | |
| ) | |
| ) | |
| ), | |
| u && | |
| this | |
| .inputDigits( | |
| u, t | |
| ), { | |
| digits: u, | |
| justLeadingPlus: o | |
| } | |
| } | |
| }, { | |
| key: "inputDigits", | |
| value: function(e, | |
| t) { | |
| var r = t | |
| .digits, | |
| n = r | |
| .length < | |
| 3 && r | |
| .length + | |
| e | |
| .length >= | |
| 3; | |
| if (t | |
| .appendDigits( | |
| e), | |
| n && | |
| this | |
| .extractIddPrefix( | |
| t), | |
| this | |
| .isWaitingForCountryCallingCode( | |
| t) | |
| ) { | |
| if (! | |
| this | |
| .extractCountryCallingCode( | |
| t | |
| ) | |
| ) | |
| return | |
| } else t | |
| .appendNationalSignificantNumberDigits( | |
| e); | |
| t.international || | |
| this | |
| .hasExtractedNationalSignificantNumber || | |
| this | |
| .extractNationalSignificantNumber( | |
| t | |
| .getNationalDigits(), | |
| (function( | |
| e | |
| ) { | |
| return t | |
| .update( | |
| e | |
| ) | |
| })) | |
| } | |
| }, { | |
| key: "isWaitingForCountryCallingCode", | |
| value: function(e) { | |
| var t = e | |
| .international, | |
| r = e | |
| .callingCode; | |
| return t && | |
| !r | |
| } | |
| }, { | |
| key: "extractCountryCallingCode", | |
| value: function(e) { | |
| var t = Ia( | |
| "+" + | |
| e | |
| .getDigitsWithoutInternationalPrefix(), | |
| this | |
| .defaultCountry, | |
| this | |
| .defaultCallingCode, | |
| this | |
| .metadata | |
| .metadata | |
| ), | |
| r = t | |
| .countryCallingCode, | |
| n = t | |
| .number; | |
| if (r) | |
| return e | |
| .setCallingCode( | |
| r | |
| ), | |
| e | |
| .update({ | |
| nationalSignificantNumber: n | |
| }), | |
| !0 | |
| } | |
| }, { | |
| key: "reset", | |
| value: function(e) { | |
| if (e) { | |
| this.hasSelectedNumberingPlan = ! | |
| 0; | |
| var t = | |
| e | |
| ._nationalPrefixForParsing(); | |
| this.couldPossiblyExtractAnotherNationalSignificantNumber = | |
| t && | |
| $o | |
| .test( | |
| t | |
| ) | |
| } else this | |
| .hasSelectedNumberingPlan = | |
| void 0, | |
| this | |
| .couldPossiblyExtractAnotherNationalSignificantNumber = | |
| void 0 | |
| } | |
| }, { | |
| key: "extractNationalSignificantNumber", | |
| value: function(e, | |
| t) { | |
| if (this | |
| .hasSelectedNumberingPlan | |
| ) { | |
| var r = | |
| _a(e, | |
| this | |
| .metadata | |
| ), | |
| n = | |
| r | |
| .nationalPrefix, | |
| i = | |
| r | |
| .nationalNumber, | |
| a = | |
| r | |
| .carrierCode; | |
| if (i !== | |
| e) | |
| return this | |
| .onExtractedNationalNumber( | |
| n, | |
| a, | |
| i, | |
| e, | |
| t | |
| ), | |
| ! | |
| 0 | |
| } | |
| } | |
| }, { | |
| key: "extractAnotherNationalSignificantNumber", | |
| value: function(e, | |
| t, r) { | |
| if (!this | |
| .hasExtractedNationalSignificantNumber | |
| ) return this | |
| .extractNationalSignificantNumber( | |
| e, | |
| r | |
| ); | |
| if (this | |
| .couldPossiblyExtractAnotherNationalSignificantNumber | |
| ) { | |
| var n = | |
| _a(e, | |
| this | |
| .metadata | |
| ), | |
| i = | |
| n | |
| .nationalPrefix, | |
| a = | |
| n | |
| .nationalNumber, | |
| o = | |
| n | |
| .carrierCode; | |
| if (a !== | |
| t) | |
| return this | |
| .onExtractedNationalNumber( | |
| i, | |
| o, | |
| a, | |
| e, | |
| r | |
| ), | |
| ! | |
| 0 | |
| } | |
| } | |
| }, { | |
| key: "onExtractedNationalNumber", | |
| value: function(e, | |
| t, r, n, i | |
| ) { | |
| var a, o, | |
| l = n | |
| .lastIndexOf( | |
| r); | |
| if (l >= | |
| 0 && | |
| l === n | |
| .length - | |
| r.length | |
| ) { | |
| o = !0; | |
| var s = | |
| n | |
| .slice( | |
| 0, | |
| l | |
| ); | |
| s !== | |
| e && | |
| (a = | |
| s) | |
| } | |
| i({ | |
| nationalPrefix: e, | |
| carrierCode: t, | |
| nationalSignificantNumber: r, | |
| nationalSignificantNumberMatchesInput: o, | |
| complexPrefixBeforeNationalSignificantNumber: a | |
| }), this | |
| .hasExtractedNationalSignificantNumber = ! | |
| 0, this | |
| .onNationalSignificantNumberChange() | |
| } | |
| }, { | |
| key: "reExtractNationalSignificantNumber", | |
| value: function(e) { | |
| return !! | |
| this | |
| .extractAnotherNationalSignificantNumber( | |
| e | |
| .getNationalDigits(), | |
| e | |
| .nationalSignificantNumber, | |
| (function( | |
| t | |
| ) { | |
| return e | |
| .update( | |
| t | |
| ) | |
| }) | |
| ) || | |
| (this | |
| .extractIddPrefix( | |
| e | |
| ) || | |
| this | |
| .fixMissingPlus( | |
| e | |
| ) ? | |
| (this | |
| .extractCallingCodeAndNationalSignificantNumber( | |
| e | |
| ), | |
| ! | |
| 0 | |
| ) : | |
| void 0 | |
| ) | |
| } | |
| }, { | |
| key: "extractIddPrefix", | |
| value: function(e) { | |
| var t = e | |
| .international, | |
| r = e | |
| .IDDPrefix, | |
| n = e | |
| .digits; | |
| if (e | |
| .nationalSignificantNumber, | |
| !t && !r | |
| ) { | |
| var i = | |
| Ta(n, | |
| this | |
| .defaultCountry, | |
| this | |
| .defaultCallingCode, | |
| this | |
| .metadata | |
| .metadata | |
| ); | |
| return void 0 !== | |
| i && | |
| i !== | |
| n ? | |
| (e.update({ | |
| IDDPrefix: n | |
| .slice( | |
| 0, | |
| n | |
| .length - | |
| i | |
| .length | |
| ) | |
| }), | |
| this | |
| .startInternationalNumber( | |
| e, { | |
| country: void 0, | |
| callingCode: void 0 | |
| } | |
| ), | |
| ! | |
| 0 | |
| ) : | |
| void 0 | |
| } | |
| } | |
| }, { | |
| key: "fixMissingPlus", | |
| value: function(e) { | |
| if (!e | |
| .international | |
| ) { | |
| var t = | |
| Na(e.digits, | |
| this | |
| .defaultCountry, | |
| this | |
| .defaultCallingCode, | |
| this | |
| .metadata | |
| .metadata | |
| ), | |
| r = | |
| t | |
| .countryCallingCode; | |
| if (t | |
| .number, | |
| r) | |
| return e | |
| .update({ | |
| missingPlus: | |
| ! | |
| 0 | |
| }), | |
| this | |
| .startInternationalNumber( | |
| e, { | |
| country: e | |
| .country, | |
| callingCode: r | |
| } | |
| ), | |
| ! | |
| 0 | |
| } | |
| } | |
| }, { | |
| key: "startInternationalNumber", | |
| value: function(e, | |
| t) { | |
| var r = t | |
| .country, | |
| n = t | |
| .callingCode; | |
| e.startInternationalNumber( | |
| r, n | |
| ), e | |
| .nationalSignificantNumber && | |
| (e.resetNationalSignificantNumber(), | |
| this | |
| .onNationalSignificantNumberChange(), | |
| this | |
| .hasExtractedNationalSignificantNumber = | |
| void 0 | |
| ) | |
| } | |
| }, { | |
| key: "extractCallingCodeAndNationalSignificantNumber", | |
| value: function(e) { | |
| this.extractCountryCallingCode( | |
| e | |
| ) && | |
| this | |
| .extractNationalSignificantNumber( | |
| e | |
| .getNationalDigits(), | |
| (function( | |
| t | |
| ) { | |
| return e | |
| .update( | |
| t | |
| ) | |
| })) | |
| } | |
| }], | |
| function(e, t) { | |
| for (var r = 0; r < t | |
| .length; r++) { | |
| var n = t[r]; | |
| n.enumerable = n | |
| .enumerable || ! | |
| 1, n | |
| .configurable = ! | |
| 0, "value" in | |
| n && (n | |
| .writable = ! | |
| 0), Object | |
| .defineProperty( | |
| e, n.key, n) | |
| } | |
| }(t.prototype, e), Object | |
| .defineProperty(t, | |
| "prototype", { | |
| writable: !1 | |
| }), t | |
| }(); | |
| function Ao(e) { | |
| return (Ao = "function" == | |
| typeof Symbol && "symbol" == | |
| typeof Symbol.iterator ? | |
| function(e) { | |
| return typeof e | |
| } : function(e) { | |
| return e && | |
| "function" == | |
| typeof Symbol && e | |
| .constructor === | |
| Symbol && e !== | |
| Symbol.prototype ? | |
| "symbol" : typeof e | |
| })(e) | |
| } | |
| function ko(e, t) { | |
| (null == t || t > e.length) && (t = | |
| e.length); | |
| for (var r = 0, n = Array(t); r < | |
| t; r++) n[r] = e[r]; | |
| return n | |
| } | |
| var To = function() { | |
| var e; | |
| function t(e, r) { | |
| ! function(e, t) { | |
| if (!(e instanceof t)) | |
| throw TypeError( | |
| "Cannot call a class as a function" | |
| ) | |
| }(this, t), this.metadata = | |
| new Ui(r); | |
| var n, i = function(e) { | |
| if (Array.isArray( | |
| e)) return e | |
| }(n = this | |
| .getCountryAndCallingCode( | |
| e)) || function( | |
| e, t) { | |
| var r = null == e ? | |
| null : | |
| "undefined" != | |
| typeof Symbol && | |
| e[Symbol | |
| .iterator | |
| ] || e[ | |
| "@@iterator" | |
| ]; | |
| if (null != r) { | |
| var n, i, | |
| a = [], | |
| o = !0, | |
| l = !1; | |
| try { | |
| for (r = r | |
| .call( | |
| e); !( | |
| o = | |
| (n = r | |
| .next() | |
| ) | |
| .done | |
| ) && | |
| (a.push(n | |
| .value | |
| ), | |
| 2 !== | |
| a | |
| .length | |
| ); o = ! | |
| 0); | |
| } catch (e) { | |
| l = !0, i = | |
| e | |
| } finally { | |
| try { | |
| o || null == | |
| r | |
| .return || | |
| r | |
| .return() | |
| } finally { | |
| if (l) | |
| throw i | |
| } | |
| } | |
| return a | |
| } | |
| }(n) || function(e, t) { | |
| if (e) { | |
| if ("string" == | |
| typeof e) | |
| return ko(e, | |
| 2); | |
| var r = Object | |
| .prototype | |
| .toString | |
| .call(e) | |
| .slice(8, - | |
| 1); | |
| if ("Object" === | |
| r && e | |
| .constructor && | |
| (r = e | |
| .constructor | |
| .name), | |
| "Map" === | |
| r || | |
| "Set" === r) | |
| return Array | |
| .from( | |
| e); | |
| if ("Arguments" === | |
| r || | |
| /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ | |
| .test(r)) | |
| return ko(e, | |
| 2) | |
| } | |
| }(n) || function() { | |
| throw TypeError( | |
| "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." | |
| ) | |
| }(), | |
| a = i[0], | |
| o = i[1]; | |
| this.defaultCountry = a, | |
| this | |
| .defaultCallingCode = o, | |
| this.reset() | |
| } | |
| return e = [{ | |
| key: "getCountryAndCallingCode", | |
| value: function(e) { | |
| var t, r; | |
| return e && | |
| ("object" === | |
| Ao( | |
| e) ? | |
| (t = e | |
| .defaultCountry, | |
| r = | |
| e | |
| .defaultCallingCode | |
| ) : | |
| t = | |
| e), | |
| t && ! | |
| this | |
| .metadata | |
| .hasCountry( | |
| t | |
| ) && | |
| (t = | |
| void 0), | |
| [t, r] | |
| } | |
| }, { | |
| key: "input", | |
| value: function(e) { | |
| var t, r = | |
| this | |
| .parser | |
| .input( | |
| e, | |
| this | |
| .state | |
| ), | |
| n = r | |
| .digits; | |
| if (r | |
| .justLeadingPlus | |
| ) this | |
| .formattedOutput = | |
| "+"; | |
| else if ( | |
| n) { | |
| if (this | |
| .determineTheCountryIfNeeded(), | |
| this | |
| .state | |
| .nationalSignificantNumber && | |
| this | |
| .formatter | |
| .narrowDownMatchingFormats( | |
| this | |
| .state | |
| ), | |
| this | |
| .metadata | |
| .hasSelectedNumberingPlan() && | |
| (t = this | |
| .formatter | |
| .format( | |
| n, | |
| this | |
| .state | |
| ) | |
| ), | |
| void 0 === | |
| t && | |
| this | |
| .parser | |
| .reExtractNationalSignificantNumber( | |
| this | |
| .state | |
| ) | |
| ) { | |
| this | |
| .determineTheCountryIfNeeded(); | |
| var i = | |
| this | |
| .state | |
| .getNationalDigits(); | |
| i && (t = | |
| this | |
| .formatter | |
| .format( | |
| i, | |
| this | |
| .state | |
| ) | |
| ) | |
| } | |
| this.formattedOutput = | |
| t ? | |
| this | |
| .getFullNumber( | |
| t | |
| ) : | |
| this | |
| .getNonFormattedNumber() | |
| } | |
| return this | |
| .formattedOutput | |
| } | |
| }, { | |
| key: "reset", | |
| value: function() { | |
| var e = | |
| this; | |
| return this | |
| .state = | |
| new Qa({ | |
| onCountryChange: function( | |
| t | |
| ) { | |
| e.country = | |
| t | |
| }, | |
| onCallingCodeChange: function( | |
| t, | |
| r | |
| ) { | |
| e.metadata | |
| .selectNumberingPlan( | |
| r, | |
| t | |
| ), | |
| e | |
| .formatter | |
| .reset( | |
| e | |
| .metadata | |
| .numberingPlan, | |
| e | |
| .state | |
| ), | |
| e | |
| .parser | |
| .reset( | |
| e | |
| .metadata | |
| .numberingPlan | |
| ) | |
| } | |
| }), this | |
| .formatter = | |
| new yo({ | |
| state: this | |
| .state, | |
| metadata: this | |
| .metadata | |
| }), this | |
| .parser = | |
| new xo({ | |
| defaultCountry: this | |
| .defaultCountry, | |
| defaultCallingCode: this | |
| .defaultCallingCode, | |
| metadata: this | |
| .metadata, | |
| state: this | |
| .state, | |
| onNationalSignificantNumberChange: function() { | |
| e.determineTheCountryIfNeeded(), | |
| e | |
| .formatter | |
| .reset( | |
| e | |
| .metadata | |
| .numberingPlan, | |
| e | |
| .state | |
| ) | |
| } | |
| }), this | |
| .state | |
| .reset({ | |
| country: this | |
| .defaultCountry, | |
| callingCode: this | |
| .defaultCallingCode | |
| }), this | |
| .formattedOutput = | |
| "", this | |
| } | |
| }, { | |
| key: "isInternational", | |
| value: function() { | |
| return this | |
| .state | |
| .international | |
| } | |
| }, { | |
| key: "getCallingCode", | |
| value: function() { | |
| if (this | |
| .isInternational() | |
| ) return this | |
| .state | |
| .callingCode | |
| } | |
| }, { | |
| key: "getCountryCallingCode", | |
| value: function() { | |
| return this | |
| .getCallingCode() | |
| } | |
| }, { | |
| key: "getCountry", | |
| value: function() { | |
| if (this | |
| .state | |
| .digits) | |
| return this | |
| ._getCountry() | |
| } | |
| }, { | |
| key: "_getCountry", | |
| value: function() { | |
| return this | |
| .state | |
| .country | |
| } | |
| }, { | |
| key: "determineTheCountryIfNeeded", | |
| value: function() { | |
| this.state | |
| .country && | |
| !this | |
| .isCountryCallingCodeAmbiguous() || | |
| this | |
| .determineTheCountry() | |
| } | |
| }, { | |
| key: "getFullNumber", | |
| value: function(e) { | |
| if (this | |
| .isInternational() | |
| ) { | |
| var t, | |
| r = | |
| this | |
| .state | |
| .callingCode; | |
| return t = | |
| r ? | |
| e ? | |
| "" | |
| .concat( | |
| r, | |
| " " | |
| ) | |
| .concat( | |
| e | |
| ) : | |
| r : | |
| "" | |
| .concat( | |
| this | |
| .state | |
| .getDigitsWithoutInternationalPrefix() | |
| ), | |
| this | |
| .formatter | |
| .getInternationalPrefixBeforeCountryCallingCode( | |
| this | |
| .state, { | |
| spacing: | |
| ! | |
| ! | |
| t | |
| } | |
| ) + | |
| t | |
| } | |
| return e | |
| } | |
| }, { | |
| key: "getNonFormattedNationalNumberWithPrefix", | |
| value: function() { | |
| var e = this | |
| .state, | |
| t = e | |
| .nationalSignificantNumber, | |
| r = e | |
| .complexPrefixBeforeNationalSignificantNumber, | |
| n = e | |
| .nationalPrefix, | |
| i = t, | |
| a = r || | |
| n; | |
| return a && | |
| (i = a + | |
| i), | |
| i | |
| } | |
| }, { | |
| key: "getNonFormattedNumber", | |
| value: function() { | |
| var e = this | |
| .state | |
| .nationalSignificantNumberMatchesInput; | |
| return this | |
| .getFullNumber( | |
| e ? | |
| this | |
| .getNonFormattedNationalNumberWithPrefix() : | |
| this | |
| .state | |
| .getNationalDigits() | |
| ) | |
| } | |
| }, { | |
| key: "getNonFormattedTemplate", | |
| value: function() { | |
| var e = this | |
| .getNonFormattedNumber(); | |
| if (e) | |
| return e | |
| .replace( | |
| /[\+\d]/g, | |
| "x" | |
| ) | |
| } | |
| }, { | |
| key: "isCountryCallingCodeAmbiguous", | |
| value: function() { | |
| var e = this | |
| .state | |
| .callingCode, | |
| t = this | |
| .metadata | |
| .getCountryCodesForCallingCode( | |
| e); | |
| return t && | |
| t | |
| .length > | |
| 1 | |
| } | |
| }, { | |
| key: "determineTheCountry", | |
| value: function() { | |
| this.state | |
| .setCountry( | |
| Ra(this | |
| .isInternational() ? | |
| this | |
| .state | |
| .callingCode : | |
| this | |
| .defaultCallingCode, { | |
| nationalNumber: this | |
| .state | |
| .nationalSignificantNumber, | |
| defaultCountry: this | |
| .defaultCountry, | |
| metadata: this | |
| .metadata | |
| } | |
| ) | |
| ) | |
| } | |
| }, { | |
| key: "getNumberValue", | |
| value: function() { | |
| var e = this | |
| .state, | |
| t = e | |
| .digits, | |
| r = e | |
| .callingCode, | |
| n = e | |
| .country, | |
| i = e | |
| .nationalSignificantNumber; | |
| if (t) | |
| return this | |
| .isInternational() ? | |
| r ? | |
| "+" + | |
| r + | |
| i : | |
| "+" + | |
| t : | |
| n || | |
| r ? | |
| "+" + | |
| (n ? this | |
| .metadata | |
| .countryCallingCode() : | |
| r | |
| ) + | |
| i : | |
| void 0 | |
| } | |
| }, { | |
| key: "getNumber", | |
| value: function() { | |
| var e = this | |
| .state, | |
| t = e | |
| .nationalSignificantNumber, | |
| r = e | |
| .carrierCode, | |
| n = e | |
| .callingCode, | |
| i = this | |
| ._getCountry(); | |
| if (t && ( | |
| i || | |
| n | |
| )) { | |
| if (i && | |
| i === | |
| this | |
| .defaultCountry | |
| ) { | |
| var a = | |
| new Ui( | |
| this | |
| .metadata | |
| .metadata | |
| ); | |
| a.selectNumberingPlan( | |
| i | |
| ); | |
| var o = | |
| a | |
| .numberingPlan | |
| .callingCode(), | |
| l = | |
| this | |
| .metadata | |
| .getCountryCodesForCallingCode( | |
| o | |
| ); | |
| if (l | |
| .length > | |
| 1 | |
| ) { | |
| var s = | |
| Oa(t, { | |
| countries: l, | |
| defaultCountry: this | |
| .defaultCountry, | |
| metadata: this | |
| .metadata | |
| .metadata | |
| }); | |
| s && (i = | |
| s | |
| ) | |
| } | |
| } | |
| var d = | |
| new xa( | |
| i || | |
| n, | |
| t, | |
| this | |
| .metadata | |
| .metadata | |
| ); | |
| return r && | |
| (d.carrierCode = | |
| r | |
| ), | |
| d | |
| } | |
| } | |
| }, { | |
| key: "isPossible", | |
| value: function() { | |
| var e = this | |
| .getNumber(); | |
| return !! | |
| e && e | |
| .isPossible() | |
| } | |
| }, { | |
| key: "isValid", | |
| value: function() { | |
| var e = this | |
| .getNumber(); | |
| return !! | |
| e && e | |
| .isValid() | |
| } | |
| }, { | |
| key: "getNationalNumber", | |
| value: function() { | |
| return this | |
| .state | |
| .nationalSignificantNumber | |
| } | |
| }, { | |
| key: "getChars", | |
| value: function() { | |
| return (this | |
| .state | |
| .international ? | |
| "+" : | |
| "" | |
| ) + | |
| this | |
| .state | |
| .digits | |
| } | |
| }, { | |
| key: "getTemplate", | |
| value: function() { | |
| return this | |
| .formatter | |
| .getTemplate( | |
| this | |
| .state | |
| ) || | |
| this | |
| .getNonFormattedTemplate() || | |
| "" | |
| } | |
| }], | |
| function(e, t) { | |
| for (var r = 0; r < t | |
| .length; r++) { | |
| var n = t[r]; | |
| n.enumerable = n | |
| .enumerable || ! | |
| 1, n | |
| .configurable = ! | |
| 0, "value" in | |
| n && (n | |
| .writable = ! | |
| 0), Object | |
| .defineProperty( | |
| e, n.key, n) | |
| } | |
| }(t.prototype, e), Object | |
| .defineProperty(t, | |
| "prototype", { | |
| writable: !1 | |
| }), t | |
| }(); | |
| function _o(e) { | |
| return new Ui(e).getCountries() | |
| } | |
| function So(e, t, r) { | |
| if (t[e]) return new xa(e, t[e], r) | |
| } | |
| function No(e) { | |
| return To.call(this, e, bi) | |
| } | |
| function Io() { | |
| return Ei(Vi, arguments) | |
| } | |
| No.prototype = Object.create(To | |
| .prototype, {}), No.prototype | |
| .constructor = No; | |
| let Po = (e, t) => function() { | |
| return Ei(Xa, arguments) | |
| }(String(e), t), | |
| Oo = (e, t) => `+${Io(t)} ${e}`, | |
| Ro = e => | |
| `*${e.replaceAll("-","").slice(-4)}`, | |
| Mo = function() { | |
| return Ei(_o, arguments) | |
| }().map((e => ({ | |
| code: e, | |
| callCode: Io(e) | |
| }))); | |
| const Lo = "/api/v1/sessions", | |
| Do = "/api/v1/sessions/logout", | |
| Fo = | |
| "/api/v1/sessions/fork/recover", | |
| Uo = "/api/v1/oauth/init", | |
| Wo = "/api/v1/oauth/authenticate", | |
| Bo = "/api/v1/oauth/link", | |
| Go = "/api/v1/analytics_events"; | |
| class Ho { | |
| async authenticate() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| try { | |
| let e = await this.api | |
| .post( | |
| "/api/v1/custom_jwt_account/authenticate", { | |
| token: this | |
| .meta | |
| .token | |
| }); | |
| return { | |
| user: e.user, | |
| token: e.token, | |
| refresh_token: e | |
| .refresh_token, | |
| identity_token: e | |
| .identity_token, | |
| is_new_user: e | |
| .is_new_user | |
| } | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async link() { | |
| throw Error("Unimplemented") | |
| } | |
| constructor(e) { | |
| this.meta = { | |
| token: e | |
| } | |
| } | |
| } | |
| class zo { | |
| async authenticate() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta.email || ! | |
| this.meta.emailCode) | |
| throw new $( | |
| "Email and email code must be set prior to calling authenticate." | |
| ); | |
| try { | |
| let e = await this.api | |
| .post( | |
| "/api/v1/passwordless/authenticate", { | |
| email: this | |
| .meta | |
| .email, | |
| code: this | |
| .meta | |
| .emailCode, | |
| mode: this | |
| .meta | |
| .disableSignup ? | |
| "no-signup" : | |
| "login-or-sign-up" | |
| }); | |
| return { | |
| user: e.user, | |
| token: e.token, | |
| refresh_token: e | |
| .refresh_token, | |
| identity_token: e | |
| .identity_token, | |
| is_new_user: e | |
| .is_new_user | |
| } | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async link() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta.email || ! | |
| this.meta.emailCode) | |
| throw new $( | |
| "Email and email code must be set prior to calling authenticate." | |
| ); | |
| try { | |
| return await this.api | |
| .post( | |
| "/api/v1/passwordless/link", { | |
| email: this | |
| .meta | |
| .email, | |
| code: this | |
| .meta | |
| .emailCode | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async sendCodeEmail(e, t) { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (e && (this.meta.email = | |
| e), t && (this.meta | |
| .captchaToken = t), | |
| !this.meta.email) | |
| throw new $( | |
| "Email must be set when initialzing authentication." | |
| ); | |
| try { | |
| return await this.api | |
| .post( | |
| "/api/v1/passwordless/init", { | |
| email: this | |
| .meta | |
| .email, | |
| token: this | |
| .meta | |
| .captchaToken | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| constructor(e, t, r = !1) { | |
| this.meta = { | |
| email: e, | |
| captchaToken: t, | |
| disableSignup: r | |
| } | |
| } | |
| } | |
| class jo extends zo { | |
| async link() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta.email || ! | |
| this.meta.emailCode || ! | |
| this.meta.oldAddress) | |
| throw new $( | |
| "Email, email code, and an old email address must be set prior to calling update." | |
| ); | |
| try { | |
| return await this.api | |
| .post( | |
| "/api/v1/passwordless/update", { | |
| oldAddress: this | |
| .meta | |
| .oldAddress, | |
| newAddress: this | |
| .meta | |
| .email, | |
| code: this | |
| .meta | |
| .emailCode | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| constructor(e, t, r) { | |
| super(t, r), this.meta = { | |
| email: t, | |
| captchaToken: r, | |
| oldAddress: e, | |
| disableSignup: !1 | |
| } | |
| } | |
| } | |
| const qo = e => { | |
| let t; | |
| try { | |
| t = new URL(e).hostname | |
| } catch (e) { | |
| return | |
| } | |
| for (let [e, r] of Object | |
| .entries(Vo)) | |
| if (t.includes(r.hostname)) | |
| return { | |
| walletClientType: e, | |
| entry: r | |
| } | |
| }, | |
| Vo = { | |
| metamask: { | |
| id: "c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96", | |
| displayName: "MetaMask", | |
| hostname: "metamask.io", | |
| mobile: { | |
| native: "metamask://", | |
| universal: "https://metamask.app.link" | |
| } | |
| }, | |
| trust: { | |
| id: "4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0", | |
| displayName: "Trust", | |
| hostname: "trustwallet.com", | |
| mobile: { | |
| universal: "https://link.trustwallet.com" | |
| } | |
| }, | |
| safe: { | |
| id: "225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f", | |
| displayName: "Safe", | |
| hostname: "safe.global", | |
| mobile: { | |
| universal: "https://app.safe.global/" | |
| } | |
| }, | |
| rainbow: { | |
| id: "1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369", | |
| displayName: "Rainbow", | |
| hostname: "rainbow.me", | |
| mobile: { | |
| native: "rainbow://", | |
| universal: "https://rnbwapp.com" | |
| } | |
| }, | |
| uniswap: { | |
| id: "c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a", | |
| displayName: "Uniswap", | |
| hostname: "uniswap.org", | |
| mobile: { | |
| universal: "https://uniswap.org/app", | |
| native: "uniswap://" | |
| } | |
| }, | |
| zerion: { | |
| id: "ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18", | |
| displayName: "Zerion", | |
| hostname: "zerion.io", | |
| mobile: { | |
| native: "zerion://", | |
| universal: "https://wallet.zerion.io" | |
| } | |
| }, | |
| argent: { | |
| id: "bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6", | |
| displayName: "Argent", | |
| hostname: "www.argent.xyz", | |
| mobile: { | |
| universal: "https://www.argent.xyz/app" | |
| } | |
| }, | |
| spot: { | |
| id: "74f8092562bd79675e276d8b2062a83601a4106d30202f2d509195e30e19673d", | |
| displayName: "Spot", | |
| hostname: "www.spot-wallet.com", | |
| mobile: { | |
| universal: "https://spot.so" | |
| } | |
| }, | |
| omni: { | |
| id: "afbd95522f4041c71dd4f1a065f971fd32372865b416f95a0b1db759ae33f2a7", | |
| displayName: "Omni", | |
| hostname: "omni.app", | |
| mobile: { | |
| universal: "https://links.omni.app" | |
| } | |
| }, | |
| cryptocom: { | |
| id: "f2436c67184f158d1beda5df53298ee84abfc367581e4505134b5bcf5f46697d", | |
| displayName: "Crypto.com", | |
| hostname: "crypto.com", | |
| mobile: { | |
| universal: "https://wallet.crypto.com", | |
| native: "dfw://" | |
| } | |
| }, | |
| blockchain: { | |
| id: "84b43e8ddfcd18e5fcb5d21e7277733f9cccef76f7d92c836d0e481db0c70c04", | |
| displayName: "Blockchain", | |
| hostname: "www.blockchain.com", | |
| mobile: { | |
| universal: "https://www.blockchain.com" | |
| } | |
| }, | |
| safepal: { | |
| id: "0b415a746fb9ee99cce155c2ceca0c6f6061b1dbca2d722b3ba16381d0562150", | |
| displayName: "SafePal", | |
| hostname: "safepal.com", | |
| mobile: { | |
| universal: "https://link.safepal.io" | |
| } | |
| }, | |
| bitkeep: { | |
| id: "38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662", | |
| displayName: "BitKeep", | |
| hostname: "bitkeep.com", | |
| mobile: { | |
| universal: "https://bkapp.vip" | |
| } | |
| }, | |
| zengo: { | |
| id: "9414d5a85c8f4eabc1b5b15ebe0cd399e1a2a9d35643ab0ad22a6e4a32f596f0", | |
| displayName: "ZenGo", | |
| hostname: "zengo.com", | |
| mobile: { | |
| universal: "https://get.zengo.com/" | |
| } | |
| }, | |
| "1inch": { | |
| id: "c286eebc742a537cd1d6818363e9dc53b21759a1e8e5d9b263d0c03ec7703576", | |
| displayName: "1inch", | |
| hostname: "wallet.1inch.io", | |
| mobile: { | |
| universal: "https://wallet.1inch.io/wc/" | |
| } | |
| }, | |
| binance: { | |
| id: "8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4", | |
| displayName: "Binance", | |
| hostname: "www.binance.com", | |
| mobile: { | |
| universal: "https://app.binance.com/cedefi" | |
| } | |
| }, | |
| exodus: { | |
| id: "e9ff15be73584489ca4a66f64d32c4537711797e30b6660dbcb71ea72a42b1f4", | |
| displayName: "Exodus", | |
| hostname: "exodus.com", | |
| mobile: { | |
| universal: "https://exodus.com/m" | |
| } | |
| }, | |
| mew_wallet: { | |
| id: "f5b4eeb6015d66be3f5940a895cbaa49ef3439e518cd771270e6b553b48f31d2", | |
| displayName: "MEW wallet", | |
| hostname: "mewwallet.com", | |
| mobile: { | |
| universal: "https://mewwallet.com" | |
| } | |
| }, | |
| alphawallet: { | |
| id: "138f51c8d00ac7b9ac9d8dc75344d096a7dfe370a568aa167eabc0a21830ed98", | |
| displayName: "AlphaWallet", | |
| hostname: "alphawallet.com", | |
| mobile: { | |
| universal: "https://aw.app" | |
| } | |
| }, | |
| keyring_pro: { | |
| id: "47bb07617af518642f3413a201ec5859faa63acb1dd175ca95085d35d38afb83", | |
| displayName: "KEYRING PRO", | |
| hostname: "keyring.app", | |
| mobile: { | |
| universal: "https://keyring.app/" | |
| } | |
| }, | |
| mathwallet: { | |
| id: "7674bb4e353bf52886768a3ddc2a4562ce2f4191c80831291218ebd90f5f5e26", | |
| displayName: "MathWallet", | |
| hostname: "mathwallet.org", | |
| mobile: { | |
| universal: "https://www.mathwallet.org" | |
| } | |
| }, | |
| unstoppable: { | |
| id: "8308656f4548bb81b3508afe355cfbb7f0cb6253d1cc7f998080601f838ecee3", | |
| displayName: "Unstoppable", | |
| hostname: "unstoppabledomains.com", | |
| mobile: { | |
| universal: "https://unstoppabledomains.com/mobile" | |
| } | |
| }, | |
| obvious: { | |
| id: "031f0187049b7f96c6f039d1c9c8138ff7a17fd75d38b34350c7182232cc29aa", | |
| displayName: "Obvious", | |
| hostname: "obvious.technology", | |
| mobile: { | |
| universal: "https://wallet.obvious.technology" | |
| } | |
| }, | |
| ambire: { | |
| id: "2c81da3add65899baeac53758a07e652eea46dbb5195b8074772c62a77bbf568", | |
| displayName: "Ambire", | |
| hostname: "www.ambire.com", | |
| mobile: { | |
| universal: "https://mobile.ambire.com" | |
| } | |
| }, | |
| internet_money_wallet: { | |
| id: "dd43441a6368ec9046540c46c5fdc58f79926d17ce61a176444568ca7c970dcd", | |
| displayName: "Internet Money Wallet", | |
| hostname: "internetmoney.io", | |
| mobile: { | |
| universal: "https://internetmoney.io" | |
| } | |
| }, | |
| coin98: { | |
| id: "2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01", | |
| displayName: "Coin98", | |
| hostname: "coin98.com", | |
| mobile: { | |
| universal: "https://coin98.services" | |
| } | |
| }, | |
| abc_wallet: { | |
| id: "b956da9052132e3dabdcd78feb596d5194c99b7345d8c4bd7a47cabdcb69a25f", | |
| displayName: "ABC Wallet", | |
| hostname: "myabcwallet.io", | |
| mobile: { | |
| universal: "https://abcwalletconnect.page.link" | |
| } | |
| }, | |
| arculus_wallet: { | |
| id: "0e4915107da5b3408b38e248f7a710f4529d54cd30e9d12ff0eb886d45c18e92", | |
| displayName: "Arculus Wallet", | |
| hostname: "www.getarculus.com", | |
| mobile: { | |
| universal: "https://gw.arculus.co/app" | |
| } | |
| }, | |
| haha: { | |
| id: "719bd888109f5e8dd23419b20e749900ce4d2fc6858cf588395f19c82fd036b3", | |
| displayName: "HaHa", | |
| hostname: "www.haha.me", | |
| mobile: { | |
| universal: "https://haha.me" | |
| } | |
| }, | |
| cling_wallet: { | |
| id: "942d0e22a7e6b520b0a03abcafc4dbe156a1fc151876e3c4a842f914277278ef", | |
| displayName: "Cling Wallet", | |
| hostname: "clingon.io", | |
| mobile: { | |
| universal: "https://cling.carrieverse.com/apple-app-site-association" | |
| } | |
| }, | |
| broearn: { | |
| id: "8ff6eccefefa7506339201bc33346f92a43118d6ff7d6e71d499d8187a1c56a2", | |
| displayName: "Broearn", | |
| hostname: "www.broearn.com", | |
| mobile: { | |
| universal: "https://www.broearn.com/link/wallet/" | |
| } | |
| }, | |
| copiosa: { | |
| id: "07f99a5d9849bb049d74830012b286f8b238e72b0337933ef22b84947409db80", | |
| displayName: "Copiosa", | |
| hostname: "copiosa.io", | |
| mobile: { | |
| universal: "https://copiosa.io/action/" | |
| } | |
| }, | |
| burrito_wallet: { | |
| id: "8821748c25de9dbc4f72a691b25a6ddad9d7df12fa23333fd9c8b5fdc14cc819", | |
| displayName: "Burrito Wallet", | |
| hostname: "burritowallet.com", | |
| mobile: { | |
| universal: "https://burritowallet.com/wc?uri=" | |
| } | |
| }, | |
| enjin_wallet: { | |
| id: "bdc9433ffdaee55d31737d83b931caa1f17e30666f5b8e03eea794bac960eb4a", | |
| displayName: "Enjin Wallet", | |
| hostname: "enjin.io", | |
| mobile: { | |
| universal: "https://deeplink.wallet.enjin.io/" | |
| } | |
| }, | |
| plasma_wallet: { | |
| id: "cbe13eb482c76f1fa401ff4c84d9acd0b8bc9af311ca0620a0b192fb28359b4e", | |
| displayName: "Plasma Wallet", | |
| hostname: "plasma-wallet.com", | |
| mobile: { | |
| universal: "https://plasma-wallet.com" | |
| } | |
| }, | |
| avacus: { | |
| id: "94f785c0c8fb8c4f38cd9cd704416430bcaa2137f27e1468782d624bcd155a43", | |
| displayName: "Avacus", | |
| hostname: "avacus.cc", | |
| mobile: { | |
| universal: "https://avacus.app.link" | |
| } | |
| }, | |
| bee: { | |
| id: "2cca8c1b0bea04ba37dee4017991d348cdb7b826804ab2bd31073254f345b715", | |
| displayName: "Bee", | |
| hostname: "www.beewallet.app", | |
| mobile: { | |
| universal: "https://beewallet.app/wc" | |
| } | |
| }, | |
| pitaka: { | |
| id: "14e5d957c6eb62d3ee8fc6239703ac2d537d7e3552154836ca0beef775f630bc", | |
| displayName: "Pitaka", | |
| hostname: "pitaka.io", | |
| mobile: { | |
| universal: "https://app.pitaka.io" | |
| } | |
| }, | |
| pltwallet: { | |
| id: "576c90ceaea34f29ff0104837cf2b2e23d201be43be1433feeb18d375430e1fd", | |
| displayName: "PLTwallet", | |
| hostname: "pltwallet.io", | |
| mobile: { | |
| universal: "https://pltwallet.io/" | |
| } | |
| }, | |
| minerva: { | |
| id: "49bb9d698dbdf2c3d4627d66f99dd9fe90bba1eec84b143f56c64a51473c60bd", | |
| displayName: "Minerva", | |
| hostname: "minerva.digital", | |
| mobile: { | |
| universal: "https://minerva.digital" | |
| } | |
| }, | |
| kryptogo: { | |
| id: "19418ecfd44963883e4d6abca1adeb2036f3b5ffb9bee0ec61f267a9641f878b", | |
| displayName: "KryptoGO", | |
| hostname: "kryptogo.com", | |
| mobile: { | |
| universal: "https://kryptogo.page.link" | |
| } | |
| }, | |
| prema: { | |
| id: "5b8e33346dfb2a532748c247876db8d596734da8977905a27b947ba1e2cf465b", | |
| displayName: "PREMA", | |
| hostname: "premanft.com", | |
| mobile: { | |
| universal: "https://premanft.com" | |
| } | |
| }, | |
| slingshot: { | |
| id: "d23de318f0f56038c5edb730a083216ff0cce00c1514e619ab32231cc9ec484b", | |
| displayName: "Slingshot", | |
| hostname: "slingshot.finance", | |
| mobile: { | |
| universal: "https://app.slingshot.finance" | |
| } | |
| }, | |
| kriptonio: { | |
| id: "50df7da345f84e5a79aaf617df5167335a4b6751626df2e8a38f07029b3dde7b", | |
| displayName: "Kriptonio", | |
| hostname: "kriptonio.com", | |
| mobile: { | |
| universal: "https://app.kriptonio.com/mobile" | |
| } | |
| }, | |
| timeless: { | |
| id: "9751385960bca290c13b443155288f892f62ee920337eda8c5a8874135daaea8", | |
| displayName: "Timeless", | |
| hostname: "timelesswallet.xyz", | |
| mobile: { | |
| universal: "https://timelesswallet.xyz" | |
| } | |
| }, | |
| secux: { | |
| id: "6464873279d46030c0b6b005b33da6be5ed57a752be3ef1f857dc10eaf8028aa", | |
| displayName: "SecuX", | |
| hostname: "secuxtech.com", | |
| mobile: { | |
| universal: "https://wsweb.secuxtech.com" | |
| } | |
| }, | |
| bitizen: { | |
| id: "41f20106359ff63cf732adf1f7dc1a157176c9b02fd266b50da6dcc1e9b86071", | |
| displayName: "Bitizen", | |
| hostname: "bitizen.org", | |
| mobile: { | |
| universal: "https://bitizen.org/wallet" | |
| } | |
| }, | |
| blocto: { | |
| id: "14e7176536cb3706e221daaa3cfd7b88b7da8c7dfb64d1d241044164802c6bdd", | |
| displayName: "Blocto", | |
| hostname: "blocto.io", | |
| mobile: { | |
| universal: "https://blocto.app" | |
| } | |
| }, | |
| safemoon: { | |
| id: "a0e04f1086aac204d4ebdd5f985c12ed226cd0006323fd8143715f9324da58d1", | |
| displayName: "SafeMoon", | |
| hostname: "safemoon.com", | |
| mobile: { | |
| universal: "https://safemoon.com/wc" | |
| } | |
| }, | |
| okx_wallet: { | |
| id: "971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709", | |
| displayName: "OKX Wallet", | |
| hostname: "okx.com", | |
| mobile: { | |
| native: "okex://main" | |
| } | |
| }, | |
| rabby_wallet: { | |
| id: "18388be9ac2d02726dbac9777c96efaac06d744b2f6d580fccdd4127a6d01fd1", | |
| displayName: "Rabby Wallet", | |
| hostname: "rabby.io", | |
| mobile: {} | |
| } | |
| }; | |
| function Ko(e) { | |
| return { | |
| name: e.displayName || "", | |
| universalLink: e.mobile | |
| .universal, | |
| deepLink: e.mobile.native | |
| } | |
| } | |
| let Yo = | |
| "WALLETCONNECT_DEEPLINK_CHOICE"; | |
| function Zo(e) { | |
| return e.startsWith("http://") || e | |
| .startsWith("https://") | |
| } | |
| function Xo(e, t) { | |
| if (Zo(e)) return Qo(e, t); | |
| let r = e; | |
| return r.includes("://") || (r = e | |
| .replaceAll("/", "") | |
| .replaceAll(":", ""), r = | |
| `${r}://`), r.endsWith( | |
| "/") || (r = `${r}/`), { | |
| redirect: `${r}wc?uri=${encodeURIComponent(t)}`, | |
| href: r | |
| } | |
| } | |
| function Qo(e, t) { | |
| if (!Zo(e)) return Xo(e, t); | |
| let r = e; | |
| return r.endsWith("/") || (r = | |
| `${r}/`), { | |
| redirect: `${r}wc?uri=${encodeURIComponent(t)}`, | |
| href: r | |
| } | |
| } | |
| function Jo(e, t) { | |
| window.open(e, t, | |
| "noreferrer noopener") | |
| } | |
| class el { | |
| execute(e) { | |
| return null === this | |
| .promise && (this | |
| .promise = ( | |
| async () => { | |
| try { | |
| return await this | |
| .fn( | |
| e) | |
| } finally { | |
| this.promise = | |
| null | |
| } | |
| })()), this | |
| .promise | |
| } | |
| constructor(e) { | |
| this.promise = null, this | |
| .fn = e | |
| } | |
| } | |
| class tl { | |
| get meta() { | |
| return this._meta | |
| } | |
| async authenticate() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta.channelToken) | |
| throw new $( | |
| "Auth flow must be initialized first" | |
| ); | |
| try { | |
| let e = await this.api | |
| .post( | |
| "/api/v1/farcaster/authenticate", { | |
| channel_token: this | |
| .meta | |
| .channelToken, | |
| message: this | |
| .message, | |
| signature: this | |
| .signature, | |
| fid: this | |
| .fid, | |
| mode: this | |
| .meta | |
| .disableSignup ? | |
| "no-signup" : | |
| "login-or-sign-up" | |
| }); | |
| if (!e) throw new $( | |
| "No response from authentication" | |
| ); | |
| return { | |
| user: e.user, | |
| token: e.token, | |
| refresh_token: e | |
| .refresh_token, | |
| identity_token: e | |
| .identity_token, | |
| is_new_user: e | |
| .is_new_user | |
| } | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async link() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| try { | |
| return await this.api | |
| .post( | |
| "/api/v1/farcaster/link", { | |
| channel_token: this | |
| .meta | |
| .channelToken, | |
| message: this | |
| .message, | |
| signature: this | |
| .signature, | |
| fid: this | |
| .fid | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async _startChannelOnce() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| let e = await this.api.post( | |
| "/api/v1/farcaster/init", { | |
| token: this | |
| .captchaToken | |
| }); | |
| v && !C && e.connect_uri && | |
| Jo(e.connect_uri, | |
| "_blank"), this | |
| ._meta = { | |
| ...this._meta, | |
| connectUri: e | |
| .connect_uri, | |
| channelToken: e | |
| .channel_token | |
| } | |
| } | |
| async initializeFarcasterConnect() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| await this.startChannelOnce | |
| .execute() | |
| } | |
| async _pollForReady() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta.channelToken) | |
| throw new $( | |
| "Auth flow must be initialized first" | |
| ); | |
| let e = await this.api.get( | |
| "/api/v1/farcaster/status", { | |
| headers: { | |
| "farcaster-channel-token": this | |
| .meta | |
| .channelToken | |
| } | |
| }); | |
| return "completed" === e | |
| .state && (this | |
| .message = e | |
| .message, this | |
| .signature = e | |
| .signature, this | |
| .fid = e.fid, !0) | |
| } | |
| constructor(e, t = !1) { | |
| this._meta = { | |
| disableSignup: !1 | |
| }, this.captchaToken = | |
| e, this | |
| .startChannelOnce = | |
| new el(this | |
| ._startChannelOnce | |
| .bind(this)), this | |
| .pollForReady = new el( | |
| this._pollForReady | |
| .bind(this)), this | |
| ._meta.disableSignup = t | |
| } | |
| } | |
| function rl(e) { | |
| return crypto.getRandomValues( | |
| new Uint8Array(e)) | |
| } | |
| class nl { | |
| getOrCreateGuestCredential(e) { | |
| let t = G(e); | |
| if (Ke()) { | |
| if (Ye.get(t)) return Ye | |
| .get(t); | |
| { | |
| let e = B.encode(rl( | |
| 32)); | |
| return Ye.put(t, e), | |
| e | |
| } | |
| } | |
| return B.encode(rl(32)) | |
| } | |
| async authenticate() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| try { | |
| let e = await this.api | |
| .post( | |
| "/api/v1/guest/authenticate", { | |
| guest_credential: this | |
| .meta | |
| .guestCredential | |
| }); | |
| return { | |
| user: e.user, | |
| token: e.token, | |
| refresh_token: e | |
| .refresh_token, | |
| identity_token: e | |
| .identity_token, | |
| is_new_user: e | |
| .is_new_user | |
| } | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async link() { | |
| throw Error( | |
| "Linking is not supported for the guest flow" | |
| ) | |
| } | |
| constructor(e) { | |
| this.meta = { | |
| guestCredential: this | |
| .getOrCreateGuestCredential( | |
| e) | |
| } | |
| } | |
| } | |
| function il() { | |
| return B.encode(rl(36)) | |
| } | |
| function al() { | |
| return il() | |
| } | |
| async function ol(e, t = "S256") { | |
| if ("S256" != t) return e; | |
| { | |
| let t = await async function( | |
| e) { | |
| let t = ( | |
| new TextEncoder | |
| ) | |
| .encode(e); | |
| return new Uint8Array( | |
| await crypto | |
| .subtle | |
| .digest( | |
| "SHA-256", | |
| t)) | |
| }(e); | |
| return B.encode(t) | |
| } | |
| } | |
| function ll() { | |
| return !!Ye.get(z) | |
| } | |
| class sl { | |
| addCaptchaToken(e) { | |
| this.meta.captchaToken = e | |
| } | |
| isActive() { | |
| return !!(this.meta | |
| .authorizationCode && | |
| this.meta | |
| .stateCode && this | |
| .meta.provider) | |
| } | |
| async authenticate() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta | |
| .authorizationCode || ! | |
| this.meta.stateCode) | |
| throw new $( | |
| "[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate." | |
| ); | |
| if ("undefined" === this | |
| .meta.authorizationCode) | |
| throw new $( | |
| "User denied confirmation during OAuth flow" | |
| ); | |
| let e = function() { | |
| let e = Ye.get(H); | |
| if (!e) throw new $( | |
| "Authentication error." | |
| ); | |
| return e | |
| }(); | |
| try { | |
| let t = await this.api | |
| .post(Wo, { | |
| authorization_code: this | |
| .meta | |
| .authorizationCode, | |
| state_code: this | |
| .meta | |
| .stateCode, | |
| code_verifier: e, | |
| mode: this | |
| .meta | |
| .disableSignup ? | |
| "no-signup" : | |
| "login-or-sign-up" | |
| }); | |
| return Ye.del(H), Ye | |
| .del(z), Ye.del( | |
| j), { | |
| user: t.user, | |
| token: t.token, | |
| refresh_token: t | |
| .refresh_token, | |
| identity_token: t | |
| .identity_token, | |
| is_new_user: t | |
| .is_new_user, | |
| oauth_tokens: t | |
| .oauth_tokens | |
| } | |
| } catch (e) { | |
| let t = x(e); | |
| if (t.privyErrorCode) | |
| throw new $(t | |
| .message || | |
| "Invalid code during OAuth flow.", | |
| void 0, t | |
| .privyErrorCode | |
| ); | |
| if ("User denied confirmation during OAuth flow" === | |
| t.message) | |
| throw new $( | |
| "Invalid code during oauth flow.", | |
| void 0, A | |
| .OAUTH_USER_DENIED | |
| ); | |
| throw new $( | |
| "Invalid code during OAuth flow.", | |
| void 0, A | |
| .UNKNOWN_AUTH_ERROR | |
| ) | |
| } | |
| } | |
| async link() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta | |
| .authorizationCode || ! | |
| this.meta.stateCode) | |
| throw new $( | |
| "[OAuth AuthFlow] Authorization and state codes code must be set prior to calling link." | |
| ); | |
| if ("undefined" === this | |
| .meta.authorizationCode) | |
| throw new $( | |
| "User denied confirmation during OAuth flow" | |
| ); | |
| let e = Ye.get(H); | |
| if (!e) throw new $( | |
| "Authentication error." | |
| ); | |
| try { | |
| let t = await this.api | |
| .post(Bo, { | |
| authorization_code: this | |
| .meta | |
| .authorizationCode, | |
| state_code: this | |
| .meta | |
| .stateCode, | |
| code_verifier: e | |
| }); | |
| return Ye.del(H), t | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async getAuthorizationUrl() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta.provider) | |
| throw new $( | |
| "Provider must be set when initializing OAuth authentication." | |
| ); | |
| let e = il(); | |
| Ye.put(H, e); | |
| let t = al(); | |
| Ye.put(q, t); | |
| let r = await ol(e); | |
| this.meta.headless && Ye | |
| .put(z, !0), this.meta | |
| .disableSignup && Ye | |
| .put(j, !0); | |
| try { | |
| return await this.api | |
| .post(Uo, { | |
| provider: this | |
| .meta | |
| .provider, | |
| redirect_to: window | |
| .location | |
| .href, | |
| token: this | |
| .meta | |
| .captchaToken, | |
| code_challenge: r, | |
| state_code: t | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| constructor(e) { | |
| let t = "boolean" == | |
| typeof e.headless ? e | |
| .headless : ll(); | |
| this.meta = { | |
| ...e, | |
| headless: t | |
| } | |
| } | |
| } | |
| function dl(e) { | |
| return e.charAt(0).toUpperCase() + e | |
| .slice(1) | |
| } | |
| const cl = ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| version: "1.1", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| x: "0px", | |
| y: "0px", | |
| viewBox: "0 0 24 24", | |
| style: { | |
| height: "24px", | |
| ...r | |
| }, | |
| ...n, | |
| children: [t("path", { | |
| d: "M17.0722 11.6888C17.0471 8.90571 19.3263 7.56847 19.429 7.50274C18.1466 5.60938 16.153 5.35154 15.4417 5.3212C13.7461 5.14678 12.1306 6.32982 11.269 6.32982C10.4074 6.32982 9.08004 5.34648 7.67246 5.37429C5.82158 5.40209 4.11595 6.45874 3.16171 8.13218C1.24068 11.4942 2.6708 16.4817 4.54423 19.2143C5.46091 20.549 6.55041 22.0531 7.98554 21.9975C9.36803 21.9419 9.88905 21.095 11.5571 21.095C13.2251 21.095 13.696 21.9975 15.1537 21.9697C16.6389 21.9393 17.5806 20.6046 18.4897 19.2648C19.5392 17.7153 19.9725 16.2137 19.9975 16.1354C19.965 16.1228 17.1022 15.0155 17.0722 11.6888Z", | |
| fill: "currentColor" | |
| }), t("path", { | |
| d: "M14.3295 3.51373C15.0909 2.58347 15.6043 1.28921 15.4641 0C14.3671 0.0455014 13.0396 0.738135 12.2532 1.66838C11.5494 2.48994 10.9307 3.80695 11.0986 5.07089C12.3183 5.16694 13.5681 4.44145 14.3295 3.51373Z", | |
| fill: "currentColor" | |
| })] | |
| }), | |
| ul = ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| version: "1.1", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| x: "0px", | |
| y: "0px", | |
| viewBox: "0 0 71 55", | |
| style: { | |
| height: "24px", | |
| ...r | |
| }, | |
| ...n, | |
| children: [t("g", { | |
| clipPath: "url(#clip0)", | |
| children: t( | |
| "path", { | |
| d: "M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z", | |
| fill: "#5865F2" | |
| }) | |
| }), t("defs", { | |
| children: t( | |
| "clipPath", { | |
| id: "clip0", | |
| children: t( | |
| "rect", { | |
| width: "71", | |
| height: "55", | |
| fill: "white" | |
| } | |
| ) | |
| }) | |
| })] | |
| }), | |
| hl = ({ | |
| style: e, | |
| ...r | |
| }) => t("svg", { | |
| version: "1.1", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| x: "24", | |
| y: "24", | |
| viewBox: "0 0 98 96", | |
| style: { | |
| height: "24px", | |
| ...e | |
| }, | |
| ...r, | |
| children: t("path", { | |
| d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z", | |
| fill: "currentColor" | |
| }) | |
| }), | |
| pl = ({ | |
| style: e | |
| }) => t(dn, { | |
| style: { | |
| color: "var(--privy-color-error)", | |
| ...e | |
| } | |
| }), | |
| ml = ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| width: "24", | |
| height: "24", | |
| viewBox: "0 0 24 24", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: "26px", | |
| width: "26px", | |
| ...r | |
| }, | |
| ...n, | |
| children: [t("path", { | |
| d: "M22.56 12.25C22.56 11.47 22.49 10.72 22.36 10H12V14.255H17.92C17.665 15.63 16.89 16.795 15.725 17.575V20.335H19.28C21.36 18.42 22.56 15.6 22.56 12.25Z", | |
| fill: "#4285F4" | |
| }), t("path", { | |
| d: "M12 23C14.97 23 17.46 22.015 19.28 20.335L15.725 17.575C14.74 18.235 13.48 18.625 12 18.625C9.13504 18.625 6.71004 16.69 5.84504 14.09H2.17004V16.94C3.98004 20.535 7.70004 23 12 23Z", | |
| fill: "#34A853" | |
| }), t("path", { | |
| d: "M5.845 14.09C5.625 13.43 5.5 12.725 5.5 12C5.5 11.275 5.625 10.57 5.845 9.91V7.06H2.17C1.4 8.59286 0.999321 10.2846 1 12C1 13.775 1.425 15.455 2.17 16.94L5.845 14.09Z", | |
| fill: "#FBBC05" | |
| }), t("path", { | |
| d: "M12 5.375C13.615 5.375 15.065 5.93 16.205 7.02L19.36 3.865C17.455 2.09 14.965 1 12 1C7.70004 1 3.98004 3.465 2.17004 7.06L5.84504 9.91C6.71004 7.31 9.13504 5.375 12 5.375Z", | |
| fill: "#EA4335" | |
| })] | |
| }); | |
| function fl(r) { | |
| return e("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| xmlnsXlink: "http://www.w3.org/1999/xlink", | |
| width: 26, | |
| height: 26, | |
| viewBox: "0 0 140 140", | |
| x: "0px", | |
| y: "0px", | |
| fill: "none", | |
| ...r, | |
| children: [e("defs", { | |
| children: [ | |
| e("linearGradient", { | |
| id: "b", | |
| children: [ | |
| t("stop", { | |
| offset: "0", | |
| stopColor: "#3771c8" | |
| }), | |
| t("stop", { | |
| stopColor: "#3771c8", | |
| offset: ".128" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#60f", | |
| stopOpacity: "0" | |
| }) | |
| ] | |
| }), | |
| e("linearGradient", { | |
| id: "a", | |
| children: [ | |
| t("stop", { | |
| offset: "0", | |
| stopColor: "#fd5" | |
| }), | |
| t("stop", { | |
| offset: ".1", | |
| stopColor: "#fd5" | |
| }), | |
| t("stop", { | |
| offset: ".5", | |
| stopColor: "#ff543e" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#c837ab" | |
| }) | |
| ] | |
| }), | |
| t("radialGradient", { | |
| id: "c", | |
| cx: "158.429", | |
| cy: "578.088", | |
| r: "65", | |
| xlinkHref: "#a", | |
| gradientUnits: "userSpaceOnUse", | |
| gradientTransform: "matrix(0 -1.98198 1.8439 0 -1031.402 454.004)", | |
| fx: "158.429", | |
| fy: "578.088" | |
| }), | |
| t("radialGradient", { | |
| id: "d", | |
| cx: "147.694", | |
| cy: "473.455", | |
| r: "65", | |
| xlinkHref: "#b", | |
| gradientUnits: "userSpaceOnUse", | |
| gradientTransform: "matrix(.17394 .86872 -3.5818 .71718 1648.348 -458.493)", | |
| fx: "147.694", | |
| fy: "473.455" | |
| }) | |
| ] | |
| }), t("path", { | |
| fill: "url(#c)", | |
| d: "M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z", | |
| transform: "translate(1.004 1)" | |
| }), t("path", { | |
| fill: "url(#d)", | |
| d: "M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z", | |
| transform: "translate(1.004 1)" | |
| }), t("path", { | |
| fill: "#fff", | |
| d: "M66.004 18c-13.036 0-14.672.057-19.792.29-5.11.234-8.598 1.043-11.65 2.23-3.157 1.226-5.835 2.866-8.503 5.535-2.67 2.668-4.31 5.346-5.54 8.502-1.19 3.053-2 6.542-2.23 11.65C18.06 51.327 18 52.964 18 66s.058 14.667.29 19.787c.235 5.11 1.044 8.598 2.23 11.65 1.227 3.157 2.867 5.835 5.536 8.503 2.667 2.67 5.345 4.314 8.5 5.54 3.054 1.187 6.543 1.996 11.652 2.23 5.12.233 6.755.29 19.79.29 13.037 0 14.668-.057 19.788-.29 5.11-.234 8.602-1.043 11.656-2.23 3.156-1.226 5.83-2.87 8.497-5.54 2.67-2.668 4.31-5.346 5.54-8.502 1.18-3.053 1.99-6.542 2.23-11.65.23-5.12.29-6.752.29-19.788 0-13.036-.06-14.672-.29-19.792-.24-5.11-1.05-8.598-2.23-11.65-1.23-3.157-2.87-5.835-5.54-8.503-2.67-2.67-5.34-4.31-8.5-5.535-3.06-1.187-6.55-1.996-11.66-2.23-5.12-.233-6.75-.29-19.79-.29zm-4.306 8.65c1.278-.002 2.704 0 4.306 0 12.816 0 14.335.046 19.396.276 4.68.214 7.22.996 8.912 1.653 2.24.87 3.837 1.91 5.516 3.59 1.68 1.68 2.72 3.28 3.592 5.52.657 1.69 1.44 4.23 1.653 8.91.23 5.06.28 6.58.28 19.39s-.05 14.33-.28 19.39c-.214 4.68-.996 7.22-1.653 8.91-.87 2.24-1.912 3.835-3.592 5.514-1.68 1.68-3.275 2.72-5.516 3.59-1.69.66-4.232 1.44-8.912 1.654-5.06.23-6.58.28-19.396.28-12.817 0-14.336-.05-19.396-.28-4.68-.216-7.22-.998-8.913-1.655-2.24-.87-3.84-1.91-5.52-3.59-1.68-1.68-2.72-3.276-3.592-5.517-.657-1.69-1.44-4.23-1.653-8.91-.23-5.06-.276-6.58-.276-19.398s.046-14.33.276-19.39c.214-4.68.996-7.22 1.653-8.912.87-2.24 1.912-3.84 3.592-5.52 1.68-1.68 3.28-2.72 5.52-3.592 1.692-.66 4.233-1.44 8.913-1.655 4.428-.2 6.144-.26 15.09-.27zm29.928 7.97c-3.18 0-5.76 2.577-5.76 5.758 0 3.18 2.58 5.76 5.76 5.76 3.18 0 5.76-2.58 5.76-5.76 0-3.18-2.58-5.76-5.76-5.76zm-25.622 6.73c-13.613 0-24.65 11.037-24.65 24.65 0 13.613 11.037 24.645 24.65 24.645C79.617 90.645 90.65 79.613 90.65 66S79.616 41.35 66.003 41.35zm0 8.65c8.836 0 16 7.163 16 16 0 8.836-7.164 16-16 16-8.837 0-16-7.164-16-16 0-8.837 7.163-16 16-16z" | |
| })] | |
| }) | |
| } | |
| function gl({ | |
| style: e, | |
| ...r | |
| }) { | |
| return t("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| xmlnsXlink: "http://www.w3.org/1999/xlink", | |
| viewBox: "0,0,256,256", | |
| style: { | |
| height: "26px", | |
| width: "26px", | |
| ...e | |
| }, | |
| ...r, | |
| children: t("g", { | |
| fill: "#0077b5", | |
| strokeWidth: "1", | |
| strokeLinecap: "butt", | |
| strokeLinejoin: "miter", | |
| strokeMiterlimit: "10", | |
| style: { | |
| mixBlendMode: "normal" | |
| }, | |
| children: t( | |
| "g", { | |
| transform: "scale(5.12,5.12)", | |
| children: t( | |
| "path", { | |
| d: "M41,4h-32c-2.76,0 -5,2.24 -5,5v32c0,2.76 2.24,5 5,5h32c2.76,0 5,-2.24 5,-5v-32c0,-2.76 -2.24,-5 -5,-5zM17,20v19h-6v-19zM11,14.47c0,-1.4 1.2,-2.47 3,-2.47c1.8,0 2.93,1.07 3,2.47c0,1.4 -1.12,2.53 -3,2.53c-1.8,0 -3,-1.13 -3,-2.53zM39,39h-6c0,0 0,-9.26 0,-10c0,-2 -1,-4 -3.5,-4.04h-0.08c-2.42,0 -3.42,2.06 -3.42,4.04c0,0.91 0,10 0,10h-6v-19h6v2.56c0,0 1.93,-2.56 5.81,-2.56c3.97,0 7.19,2.73 7.19,8.26z" | |
| } | |
| ) | |
| }) | |
| }) | |
| }) | |
| } | |
| function yl(r) { | |
| return e("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| viewBox: "0 0 496 512", | |
| ...r, | |
| children: [t("path", { | |
| fill: "#1ed760", | |
| d: "M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8Z" | |
| }), t("path", { | |
| d: "M406.6 231.1c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3zm-31 76.2c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm-26.9 65.6c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4z" | |
| })] | |
| }) | |
| } | |
| function wl(r) { | |
| return e("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| imageRendering: "optimizeQuality", | |
| shapeRendering: "geometricPrecision", | |
| textRendering: "geometricPrecision", | |
| viewBox: "0 0 293768 333327", | |
| width: 24, | |
| height: 24, | |
| ...r, | |
| children: [t("path", { | |
| fill: "#26f4ee", | |
| d: "M204958 0c5369 45832 32829 78170 77253 81022v43471l-287 27V87593c-44424-2850-69965-30183-75333-76015l-47060-1v192819c6791 86790-60835 89368-86703 56462 30342 18977 79608 6642 73766-68039V0h58365zM78515 319644c-26591-5471-50770-21358-64969-44588-34496-56437-3401-148418 96651-157884v54345l-164 27v-40773C17274 145544 7961 245185 33650 286633c9906 15984 26169 27227 44864 33011z" | |
| }), t("path", { | |
| fill: "#fb2c53", | |
| d: "M218434 11587c3505 29920 15609 55386 35948 70259-27522-10602-43651-34934-47791-70262l11843 3zm63489 82463c3786 804 7734 1348 11844 1611v51530c-25770 2537-48321-5946-74600-21749l4034 88251c0 28460 106 41467-15166 67648-34260 58734-95927 63376-137628 35401 54529 22502 137077-4810 136916-103049v-96320c26279 15803 48830 24286 74600 21748V94050zm-171890 37247c5390-1122 11048-1985 16998-2548v54345c-21666 3569-35427 10222-41862 22528-20267 38754 5827 69491 35017 74111-33931 5638-73721-28750-49999-74111 6434-12304 18180-18959 39846-22528v-51797zm64479-119719h1808-1808z" | |
| }), t("path", { | |
| d: "M206590 11578c5369 45832 30910 73164 75333 76015v51528c-25770 2539-48321-5945-74600-21748v96320c206 125717-135035 135283-173673 72939-25688-41449-16376-141089 76383-155862v52323c-21666 3569-33412 10224-39846 22528-39762 76035 98926 121273 89342-1225V11577l47060 1z", | |
| fill: "#000000" | |
| })] | |
| }) | |
| } | |
| const vl = ({ | |
| style: e, | |
| ...r | |
| }) => t("svg", { | |
| width: "24", | |
| height: "24", | |
| viewBox: "0 0 24 24", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: "24px", | |
| width: "24px", | |
| ...e | |
| }, | |
| ...r, | |
| children: t("path", { | |
| d: "M 14.285156 10.171875 L 23.222656 0 L 21.105469 0 L 13.34375 8.832031 L 7.148438 0 L 0 0 L 9.371094 13.355469 L 0 24.019531 L 2.117188 24.019531 L 10.308594 14.691406 L 16.851562 24.019531 L 24 24.019531 M 2.878906 1.5625 L 6.132812 1.5625 L 21.101562 22.535156 L 17.851562 22.535156", | |
| fill: "currentColor" | |
| }) | |
| }); | |
| let Cl = { | |
| google: { | |
| name: "Google", | |
| component: ml | |
| }, | |
| discord: { | |
| name: "Discord", | |
| component: ul | |
| }, | |
| github: { | |
| name: "Github", | |
| component: hl | |
| }, | |
| linkedin: { | |
| name: "LinkedIn", | |
| component: gl | |
| }, | |
| twitter: { | |
| name: "Twitter", | |
| component: vl | |
| }, | |
| spotify: { | |
| name: "Spotify", | |
| component: yl | |
| }, | |
| instagram: { | |
| name: "Instagram", | |
| component: fl | |
| }, | |
| tiktok: { | |
| name: "Tiktok", | |
| component: wl | |
| }, | |
| apple: { | |
| name: "Apple", | |
| component: cl | |
| } | |
| }; | |
| const bl = e => e in Cl ? Cl[e] : { | |
| name: "Unknown", | |
| component: pl | |
| }; | |
| function El() { | |
| let e = new URLSearchParams(window | |
| .location.search), | |
| t = e.get("privy_oauth_code"), | |
| r = e.get("privy_oauth_state"), | |
| n = e.get( | |
| "privy_oauth_provider"); | |
| if (!t || !r || !n) return { | |
| inProgress: !1 | |
| }; | |
| let i = !1; | |
| try { | |
| i = !!window.opener.location | |
| .origin | |
| } catch {} | |
| return { | |
| inProgress: !0, | |
| authorizationCode: t, | |
| stateCode: r, | |
| provider: n, | |
| headless: ll(), | |
| popupFlow: null !== window | |
| .opener && i, | |
| disableSignup: !!Ye.get(j) | |
| } | |
| } | |
| function $l() { | |
| let e = new URL(window.location | |
| .href); | |
| e.searchParams.delete( | |
| "privy_oauth_code"), e | |
| .searchParams.delete( | |
| "privy_oauth_provider"), e | |
| .searchParams.delete( | |
| "privy_oauth_state"), Ye | |
| .del(q), window.history | |
| .replaceState({}, "", e) | |
| } | |
| class xl { | |
| async initAuthenticationFlow() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| this.meta | |
| .initAuthenticateResponse = | |
| await this | |
| .initAuthenticateOnce | |
| .execute() | |
| } | |
| async initLinkFlow() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| this.meta.initLinkResponse = | |
| await this.initLinkOnce | |
| .execute() | |
| } | |
| async authenticate() { | |
| let e = await import( | |
| "@simplewebauthn/browser" | |
| ); | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!e | |
| .browserSupportsWebAuthn() | |
| ) throw new $( | |
| "WebAuthn is not supported in this browser" | |
| ); | |
| this.meta | |
| .initAuthenticateResponse || | |
| (this.meta | |
| .initAuthenticateResponse = | |
| await this | |
| .initAuthenticateOnce | |
| .execute()); | |
| try { | |
| let t = await e | |
| .startAuthentication( | |
| this | |
| ._transformInitAuthenticateOptionsToCamelCase( | |
| this.meta | |
| .initAuthenticateResponse | |
| .options)); | |
| this.meta | |
| .setPasskeyAuthState | |
| ?.({ | |
| status: "submitting-response" | |
| }); | |
| let r = await this.api | |
| .post( | |
| "/api/v1/passkeys/authenticate", { | |
| relying_party: this | |
| .meta | |
| .initAuthenticateResponse | |
| .relying_party, | |
| challenge: this | |
| .meta | |
| .initAuthenticateResponse | |
| .options | |
| .challenge, | |
| authenticator_response: this | |
| ._transformAuthenticationResponseToSnakeCase( | |
| t) | |
| }); | |
| return { | |
| user: r.user, | |
| token: r.token, | |
| refresh_token: r | |
| .refresh_token, | |
| is_new_user: r | |
| .is_new_user | |
| } | |
| } catch (e) { | |
| if ("NotAllowedError" === | |
| e.name) throw new $( | |
| "Passkey request timed out or rejected by user.", | |
| void 0, A | |
| .PASSKEY_NOT_ALLOWED | |
| ); | |
| throw x(e) | |
| } | |
| } | |
| async link() { | |
| let e = await import( | |
| "@simplewebauthn/browser" | |
| ); | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!e | |
| .browserSupportsWebAuthn() | |
| ) throw new $( | |
| "WebAuthn is not supported in this browser" | |
| ); | |
| this.meta | |
| .initLinkResponse || ( | |
| this.meta | |
| .initLinkResponse = | |
| await this | |
| .initLinkOnce | |
| .execute()); | |
| try { | |
| let t = this.meta | |
| .initLinkResponse | |
| .options, | |
| r = await e | |
| .startRegistration( | |
| this | |
| ._transformInitLinkOptionsToCamelCase( | |
| t)); | |
| return await this.api | |
| .post( | |
| "/api/v1/passkeys/link", { | |
| relying_party: this | |
| .meta | |
| .initLinkResponse | |
| .relying_party, | |
| authenticator_response: this | |
| ._transformRegistrationResponseToSnakeCase( | |
| r) | |
| }) | |
| } catch (e) { | |
| if ("NotAllowedError" === | |
| e.name) throw new $( | |
| "Passkey request timed out or rejected by user.", | |
| void 0, A | |
| .PASSKEY_NOT_ALLOWED | |
| ); | |
| throw x(e) | |
| } | |
| } | |
| async _initAuthenticateOnce() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| return await this.api.post( | |
| "/api/v1/passkeys/authenticate/init", { | |
| token: this.meta | |
| .captchaToken | |
| }) | |
| } | |
| async _initLinkOnce() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| return await this.api.post( | |
| "/api/v1/passkeys/link/init", {} | |
| ) | |
| } | |
| _transformInitLinkOptionsToCamelCase | |
| (e) { | |
| return { | |
| rp: e.rp, | |
| user: { | |
| id: e.user.id, | |
| name: e.user.name, | |
| displayName: e.user | |
| .display_name | |
| }, | |
| challenge: e.challenge, | |
| pubKeyCredParams: e | |
| .pub_key_cred_params | |
| .map((e => ({ | |
| type: e | |
| .type, | |
| alg: e | |
| .alg | |
| }))), | |
| timeout: e.timeout, | |
| excludeCredentials: e | |
| .exclude_credentials | |
| ?.map((e => ({ | |
| id: e | |
| .id, | |
| type: e | |
| .type, | |
| transports: e | |
| .transports | |
| }))), | |
| authenticatorSelection: { | |
| authenticatorAttachment: e | |
| .authenticator_selection | |
| ?.authenticator_attachment, | |
| requireResidentKey: e | |
| .authenticator_selection | |
| ?.require_resident_key, | |
| residentKey: e | |
| .authenticator_selection | |
| ?.resident_key, | |
| userVerification: e | |
| .authenticator_selection | |
| ?.user_verification | |
| }, | |
| attestation: e | |
| .attestation, | |
| extensions: { | |
| appid: e.extensions | |
| ?.app_id, | |
| credProps: e | |
| .extensions | |
| ?.cred_props | |
| ?.rk, | |
| hmacCreateSecret: e | |
| .extensions | |
| ?.hmac_create_secret | |
| } | |
| } | |
| } | |
| _transformRegistrationResponseToSnakeCase | |
| (e) { | |
| return { | |
| id: e.id, | |
| raw_id: e.rawId, | |
| response: { | |
| client_data_json: e | |
| .response | |
| .clientDataJSON, | |
| attestation_object: e | |
| .response | |
| .attestationObject, | |
| authenticator_data: e | |
| .response | |
| .authenticatorData | |
| }, | |
| authenticator_attachment: e | |
| .authenticatorAttachment, | |
| client_extension_results: { | |
| app_id: e | |
| .clientExtensionResults | |
| .appid, | |
| cred_props: e | |
| .clientExtensionResults | |
| .credProps, | |
| hmac_create_secret: e | |
| .clientExtensionResults | |
| .hmacCreateSecret | |
| }, | |
| type: e.type | |
| } | |
| } | |
| _transformInitAuthenticateOptionsToCamelCase | |
| (e) { | |
| return { | |
| challenge: e.challenge, | |
| allowCredentials: e | |
| .allow_credentials | |
| ?.map((e => ({ | |
| id: e | |
| .id, | |
| type: e | |
| .type, | |
| transports: e | |
| .transports | |
| }))) || [], | |
| timeout: e.timeout, | |
| extensions: { | |
| appid: e.extensions | |
| ?.app_id, | |
| credProps: e | |
| .extensions | |
| ?.cred_props, | |
| hmacCreateSecret: e | |
| .extensions | |
| ?.hmac_create_secret | |
| }, | |
| userVerification: e | |
| .user_verification | |
| } | |
| } | |
| _transformAuthenticationResponseToSnakeCase | |
| (e) { | |
| return { | |
| id: e.id, | |
| raw_id: e.rawId, | |
| response: { | |
| client_data_json: e | |
| .response | |
| .clientDataJSON, | |
| authenticator_data: e | |
| .response | |
| .authenticatorData, | |
| signature: e | |
| .response | |
| .signature, | |
| user_handle: e | |
| .response | |
| .userHandle | |
| }, | |
| authenticator_attachment: e | |
| .authenticatorAttachment, | |
| client_extension_results: { | |
| app_id: e | |
| .clientExtensionResults | |
| .appid, | |
| cred_props: e | |
| .clientExtensionResults | |
| .credProps, | |
| hmac_create_secret: e | |
| .clientExtensionResults | |
| .hmacCreateSecret | |
| }, | |
| type: e.type | |
| } | |
| } | |
| constructor(e, t) { | |
| this.initAuthenticateOnce = | |
| new el(this | |
| ._initAuthenticateOnce | |
| .bind(this)), this | |
| .initLinkOnce = new el( | |
| this._initLinkOnce | |
| .bind(this)), this | |
| .meta = { | |
| captchaToken: e, | |
| setPasskeyAuthState: t | |
| } | |
| } | |
| } | |
| const Al = ({ | |
| address: e, | |
| chainId: t, | |
| nonce: r | |
| }) => | |
| `${window.location.host} wants you to sign in with your Ethereum account:\n${e}\n\nBy signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.\n\nURI: ${window.location.origin}\nVersion: 1\nChain ID: ${t}\nNonce: ${r}\nIssued At: ${(new Date).toISOString()}\nResources:\n- https://privy.io`; | |
| class kl { | |
| get meta() { | |
| return { | |
| connectorType: this | |
| .wallet | |
| .connectorType, | |
| walletClientType: this | |
| .wallet | |
| .walletClientType, | |
| chainId: this.wallet | |
| .chainId, | |
| address: this.wallet | |
| .address, | |
| disableSignup: this | |
| ._meta.disableSignup | |
| } | |
| } | |
| async authenticate() { | |
| if (!this.client) | |
| throw new $( | |
| "SiweFlow has no client instance" | |
| ); | |
| try { | |
| let { | |
| message: e, | |
| signature: t | |
| } = await this.sign(), | |
| r = await this | |
| .client | |
| .authenticateWithSiweInternal({ | |
| message: e, | |
| signature: t, | |
| chainId: this | |
| .wallet | |
| .chainId, | |
| walletClientType: this | |
| .wallet | |
| .walletClientType, | |
| connectorType: this | |
| .wallet | |
| .connectorType, | |
| mode: this | |
| .meta | |
| .disableSignup ? | |
| "no-signup" : | |
| "login-or-sign-up" | |
| }); | |
| return { | |
| user: r.user, | |
| token: r.token, | |
| refresh_token: r | |
| .refresh_token, | |
| identity_token: r | |
| .identity_token, | |
| is_new_user: r | |
| .is_new_user | |
| } | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async link() { | |
| if (!this.client) | |
| throw new $( | |
| "SiweFlow has no client instance" | |
| ); | |
| try { | |
| let { | |
| message: e, | |
| signature: t | |
| } = await this.sign(); | |
| return await this.client | |
| .linkWithSiweInternal({ | |
| message: e, | |
| signature: t, | |
| chainId: this | |
| .wallet | |
| .chainId, | |
| walletClientType: this | |
| .wallet | |
| .walletClientType, | |
| connectorType: this | |
| .wallet | |
| .connectorType | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async sign() { | |
| if (!this.client) | |
| throw new $( | |
| "SiweFlow has no client instance" | |
| ); | |
| if (await this | |
| .buildMessage(), !this | |
| .preparedMessage) | |
| throw new $( | |
| "Could not prepare SIWE message" | |
| ); | |
| let e = await this.wallet | |
| .sign(this | |
| .preparedMessage); | |
| return { | |
| message: this | |
| .preparedMessage, | |
| signature: e | |
| } | |
| } | |
| async _getNonceOnce() { | |
| if (!this.client) | |
| throw new $( | |
| "SiweFlow has no client instance" | |
| ); | |
| return await this.client | |
| .generateSiweNonce({ | |
| address: this | |
| .wallet | |
| .address, | |
| captchaToken: this | |
| .captchaToken | |
| }) | |
| } | |
| async buildMessage() { | |
| if (!this.client) | |
| throw new $( | |
| "SiweFlow has no client instance" | |
| ); | |
| let e = this.wallet.address, | |
| t = this.wallet.chainId | |
| .replace("eip155:", ""); | |
| return this.nonce || (this | |
| .nonce = await this | |
| .getNonceOnce | |
| .execute()), this | |
| .preparedMessage = Al({ | |
| address: e, | |
| chainId: t, | |
| nonce: this | |
| .nonce | |
| }), this.preparedMessage | |
| } | |
| constructor(e, t, r, n = !1) { | |
| this._meta = { | |
| disableSignup: !1 | |
| }, this.getNonceOnce = | |
| new el(this | |
| ._getNonceOnce.bind( | |
| this)), this | |
| .wallet = e, this | |
| .captchaToken = r, this | |
| .client = t, this._meta | |
| .disableSignup = n | |
| } | |
| } | |
| class Tl { | |
| get meta() { | |
| return { | |
| connectorType: this | |
| .wallet | |
| .connectorType, | |
| walletClientType: this | |
| .wallet | |
| .walletClientType, | |
| disableSignup: this | |
| ._meta.disableSignup | |
| } | |
| } | |
| async authenticate() { | |
| if (!this.client) | |
| throw new $( | |
| "SiwsFlow has no client instance" | |
| ); | |
| try { | |
| let { | |
| message: e, | |
| signature: t | |
| } = await this.sign(), | |
| r = await this | |
| .client | |
| .authenticateWithSiwsInternal({ | |
| message: e, | |
| signature: t, | |
| walletClientType: this | |
| .wallet | |
| .walletClientType, | |
| connectorType: this | |
| .wallet | |
| .connectorType, | |
| mode: this | |
| .meta | |
| .disableSignup ? | |
| "no-signup" : | |
| "login-or-sign-up" | |
| }); | |
| return { | |
| user: r.user, | |
| token: r.token, | |
| refresh_token: r | |
| .refresh_token, | |
| identity_token: r | |
| .identity_token, | |
| is_new_user: r | |
| .is_new_user | |
| } | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async link() { | |
| if (!this.client) | |
| throw new $( | |
| "SiwsFlow has no client instance" | |
| ); | |
| try { | |
| let { | |
| message: e, | |
| signature: t | |
| } = await this.sign(); | |
| return await this.client | |
| .linkWithSiwsInternal({ | |
| message: e, | |
| signature: t, | |
| walletClientType: this | |
| .wallet | |
| .walletClientType, | |
| connectorType: this | |
| .wallet | |
| .connectorType | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async sign() { | |
| if (!this.client) | |
| throw new $( | |
| "SiwsFlow has no client instance" | |
| ); | |
| if (await this | |
| .buildMessage(), !this | |
| .preparedMessage) | |
| throw new $( | |
| "Could not prepare SIWS message" | |
| ); | |
| if (!this.wallet | |
| .signMessage) | |
| throw new $( | |
| "Wallet does not support signMessage" | |
| ); | |
| let e = await this.wallet | |
| .signMessage(Buffer | |
| .from(this | |
| .preparedMessage | |
| )); | |
| return { | |
| message: this | |
| .preparedMessage, | |
| signature: Buffer.from( | |
| e).toString( | |
| "base64") | |
| } | |
| } | |
| async _getNonceOnce() { | |
| if (!this.client) | |
| throw new $( | |
| "SiwsFlow has no client instance" | |
| ); | |
| return await this.client | |
| .generateSiwsNonce({ | |
| address: this | |
| .wallet | |
| .address, | |
| captchaToken: this | |
| .captchaToken | |
| }) | |
| } | |
| async buildMessage() { | |
| if (!this.client) | |
| throw new $( | |
| "SiwsFlow has no client instance" | |
| ); | |
| let e = this.wallet.address; | |
| return this.nonce || (this | |
| .nonce = await this | |
| .getNonceOnce | |
| .execute()), this | |
| .preparedMessage = (({ | |
| address: e, | |
| nonce: t | |
| }) => | |
| `${window.location.host} wants you to sign in with your Solana account:\n${e}\n\nYou are proving you own ${e}.\n\nURI: ${window.location.origin}\nVersion: 1\nChain ID: mainnet\nNonce: ${t}\nIssued At: ${(new Date).toISOString()}\nResources:\n- https://privy.io` | |
| )({ | |
| address: e, | |
| nonce: this | |
| .nonce | |
| }), this.preparedMessage | |
| } | |
| constructor(e, t, r, n = !1) { | |
| this._meta = { | |
| disableSignup: !1 | |
| }, this.getNonceOnce = | |
| new el(this | |
| ._getNonceOnce.bind( | |
| this)), this | |
| .wallet = e, this | |
| .captchaToken = r, this | |
| .client = t, this._meta | |
| .disableSignup = n | |
| } | |
| } | |
| class _l { | |
| async authenticate() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta | |
| .phoneNumber || !this | |
| .meta.smsCode) | |
| throw new $( | |
| "phone number and sms code must be set prior to calling authenticate." | |
| ); | |
| try { | |
| let e = await this.api | |
| .post( | |
| "/api/v1/passwordless_sms/authenticate", { | |
| phoneNumber: this | |
| .meta | |
| .phoneNumber, | |
| code: this | |
| .meta | |
| .smsCode, | |
| mode: this | |
| .meta | |
| .disableSignup ? | |
| "no-signup" : | |
| "login-or-sign-up" | |
| }); | |
| return { | |
| user: e.user, | |
| token: e.token, | |
| refresh_token: e | |
| .refresh_token, | |
| identity_token: e | |
| .identity_token, | |
| is_new_user: e | |
| .is_new_user | |
| } | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async link() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta | |
| .phoneNumber || !this | |
| .meta.smsCode) | |
| throw new $( | |
| "phone number and sms code must be set prior to calling authenticate." | |
| ); | |
| try { | |
| return await this.api | |
| .post( | |
| "/api/v1/passwordless_sms/link", { | |
| phoneNumber: this | |
| .meta | |
| .phoneNumber, | |
| code: this | |
| .meta | |
| .smsCode | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async sendSmsCode(e, t) { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (e && (this.meta | |
| .phoneNumber = e), | |
| t && (this.meta | |
| .captchaToken = t), | |
| !this.meta.phoneNumber) | |
| throw new $( | |
| "phone nNumber must be set when initialzing authentication." | |
| ); | |
| try { | |
| return await this.api | |
| .post( | |
| "/api/v1/passwordless_sms/init", { | |
| phoneNumber: this | |
| .meta | |
| .phoneNumber, | |
| token: this | |
| .meta | |
| .captchaToken | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| constructor(e, t, r = !1) { | |
| this.meta = { | |
| phoneNumber: e, | |
| captchaToken: t, | |
| disableSignup: r | |
| } | |
| } | |
| } | |
| class Sl extends _l { | |
| async link() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| if (!this.meta | |
| .phoneNumber || !this | |
| .meta.smsCode || !this | |
| .meta.oldPhoneNumber) | |
| throw new $( | |
| "Phone number, sms code, and an old phone number must be set prior to calling update." | |
| ); | |
| try { | |
| return await this.api | |
| .post( | |
| "/api/v1/passwordless_sms/update", { | |
| old_phone_number: this | |
| .meta | |
| .oldPhoneNumber, | |
| new_phone_number: this | |
| .meta | |
| .phoneNumber, | |
| code: this | |
| .meta | |
| .smsCode | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| constructor(e, t, r) { | |
| super(t, r), this.meta = { | |
| phoneNumber: t, | |
| captchaToken: r, | |
| oldPhoneNumber: e, | |
| disableSignup: !1 | |
| } | |
| } | |
| } | |
| const Nl = h({ | |
| siteKey: "", | |
| enabled: !1, | |
| appId: void 0, | |
| token: void 0, | |
| error: void 0, | |
| status: "disabled", | |
| setToken: T, | |
| setError: T, | |
| setExecuting: T, | |
| waitForResult: () => Promise | |
| .resolve(""), | |
| ref: { | |
| current: null | |
| }, | |
| remove: T, | |
| reset: T, | |
| execute: T | |
| }); | |
| class Il extends k { | |
| constructor(e, t, r) { | |
| super(e || | |
| "Captcha failed"), this | |
| .type = "Captcha", | |
| t instanceof Error && ( | |
| this.cause = t), | |
| this.privyErrorCode = r | |
| } | |
| } | |
| const Pl = ({ | |
| children: e, | |
| id: r, | |
| captchaSiteKey: n, | |
| captchaEnabled: i | |
| }) => { | |
| let a = l(null), | |
| [o, c] = s(), | |
| [u, h] = s(), | |
| [p, m] = s(!1), | |
| f = d((() => i ? p || o || | |
| u ? !p || o || u ? | |
| o && !u ? { | |
| status: "success", | |
| token: o | |
| } : u ? { | |
| status: "error", | |
| error: u | |
| } : { | |
| status: "ready" | |
| } : { | |
| status: "loading" | |
| } : { | |
| status: "ready" | |
| } : { | |
| status: "disabled" | |
| }), [i, o, u, p]); | |
| return t(Nl.Provider, { | |
| value: { | |
| ...f, | |
| ref: a, | |
| enabled: i, | |
| siteKey: n, | |
| appId: r, | |
| setToken: c, | |
| setError: h, | |
| setExecuting: m, | |
| remove() { | |
| i && (a.current | |
| ?.remove(), | |
| m(! | |
| 1), | |
| h( | |
| void 0), | |
| c( | |
| void 0) | |
| ) | |
| }, | |
| reset() { | |
| i && (a.current | |
| ?.reset(), | |
| m(! | |
| 1), | |
| h( | |
| void 0), | |
| c( | |
| void 0) | |
| ) | |
| }, | |
| execute() { | |
| i && (m(!0), | |
| a | |
| .current | |
| ?.execute() | |
| ) | |
| }, | |
| async waitForResult() { | |
| if (!i) | |
| return ""; | |
| try { | |
| return await Ze( | |
| (() => | |
| a | |
| .current | |
| ?.getResponse() | |
| ), { | |
| interval: 200, | |
| timeout: 2e4 | |
| } | |
| ) | |
| } catch ( | |
| e) { | |
| throw new Il( | |
| "Captcha failed", | |
| null, | |
| A | |
| .CAPTCHA_TIMEOUT | |
| ) | |
| } | |
| } | |
| }, | |
| children: e | |
| }) | |
| }, | |
| Ol = () => c(Nl); | |
| class Rl { | |
| async authenticate() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| try { | |
| let e = await this.api | |
| .post( | |
| "/api/v1/telegram/authenticate", { | |
| captcha_token: this | |
| .meta | |
| .captchaToken, | |
| telegram_auth_result: this | |
| .meta | |
| .telegramAuthResult, | |
| telegram_web_app_data: this | |
| .meta | |
| .telegramWebAppData, | |
| mode: this | |
| .meta | |
| .disableSignup ? | |
| "no-signup" : | |
| "login-or-sign-up" | |
| }); | |
| return { | |
| user: e.user, | |
| token: e.token, | |
| refresh_token: e | |
| .refresh_token, | |
| identity_token: e | |
| .identity_token, | |
| is_new_user: e | |
| .is_new_user | |
| } | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async link() { | |
| if (!this.api) throw new $( | |
| "Auth flow has no API instance" | |
| ); | |
| try { | |
| return await this.api | |
| .post( | |
| "/api/v1/telegram/link", { | |
| telegram_auth_result: this | |
| .meta | |
| .telegramAuthResult, | |
| telegram_web_app_data: this | |
| .meta | |
| .telegramWebAppData | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| constructor(e, t = !1) { | |
| this.meta = { | |
| disableSignup: !1 | |
| }, this.meta = { | |
| captchaToken: e, | |
| disableSignup: !1 | |
| }, this.meta | |
| .disableSignup = t | |
| } | |
| } | |
| function Ml(e) { | |
| let t = { | |
| detail: "", | |
| retryable: !1 | |
| }; | |
| return e?.privyErrorCode === A | |
| .LINKED_TO_ANOTHER_USER && (t | |
| .detail = | |
| "This account has already been linked to another user." | |
| ), e?.privyErrorCode === A | |
| .DISALLOWED_LOGIN_METHOD && (t | |
| .detail = | |
| "Login with Telegram not allowed." | |
| ), e?.privyErrorCode === A | |
| .INVALID_DATA && (t | |
| .retryable = !0, t.detail = | |
| "Something went wrong. Try again." | |
| ), e?.privyErrorCode === A | |
| .CANNOT_LINK_MORE_OF_TYPE && (t | |
| .retryable = !0, t.detail = | |
| "Something went wrong. Try again." | |
| ), e?.privyErrorCode === A | |
| .INVALID_CREDENTIALS && (t | |
| .retryable = !0, t.detail = | |
| "Something went wrong. Try again." | |
| ), e?.privyErrorCode === A | |
| .TOO_MANY_REQUESTS && (t | |
| .detail = | |
| "Too many requests. Please wait before trying again." | |
| ), e?.privyErrorCode === A | |
| .TOO_MANY_REQUESTS && e.message | |
| .includes("rate limit") && (t | |
| .detail = | |
| "Request limit reached for Telegram. Please wait a moment and try again." | |
| ), e instanceof Il && (t | |
| .retryable = !0, t.detail = | |
| "Something went wrong. Try again." | |
| ), t | |
| } | |
| function Ll() { | |
| let e = new URL(window.location | |
| .href); | |
| e.searchParams.delete("id"), e | |
| .searchParams.delete("hash"), e | |
| .searchParams.delete( | |
| "auth_date"), e.searchParams | |
| .delete("first_name"), e | |
| .searchParams.delete( | |
| "last_name"), e.searchParams | |
| .delete("username"), e | |
| .searchParams.delete( | |
| "photo_url"), e.hash = "", | |
| window.history.replaceState({}, | |
| "", e) | |
| } | |
| const Dl = ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| width: "1024", | |
| height: "1024", | |
| viewBox: "0 0 1024 1024", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: "28px", | |
| width: "28px", | |
| ...r | |
| }, | |
| ...n, | |
| children: [t("rect", { | |
| width: "1024", | |
| height: "1024", | |
| fill: "#0052FF", | |
| rx: 100, | |
| ry: 100 | |
| }), t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z", | |
| fill: "white" | |
| })] | |
| }), | |
| Fl = ["eth_sign", | |
| "eth_populateTransactionRequest", | |
| "eth_signTransaction", | |
| "personal_sign", | |
| "eth_signTypedData_v4", | |
| "csw_signUserOperation" | |
| ]; | |
| class Ul { | |
| on(e, t) { | |
| if (this.walletProvider) | |
| return this | |
| .walletProvider.on( | |
| e, t); | |
| this._subscriptions.push({ | |
| eventName: e, | |
| listener: t | |
| }) | |
| } | |
| async request(e) { | |
| if (!this.walletProvider) | |
| throw new _( | |
| `A wallet request of type ${e.method} was made before setting a wallet provider.` | |
| ); | |
| return Promise.race([this | |
| .walletProvider | |
| .request(e), | |
| this | |
| .walletTimeout() | |
| ]).catch((e => { | |
| throw Qt(e) | |
| })) | |
| } | |
| constructor(e, t) { | |
| this.removeListener = (e, | |
| t) => { | |
| if (this | |
| .walletProvider) | |
| try { | |
| return this | |
| .walletProvider | |
| .removeListener( | |
| e, t | |
| ) | |
| } catch (e) { | |
| console | |
| .warn( | |
| "Unable to remove wallet provider listener" | |
| ) | |
| } | |
| }, this.walletTimeout = | |
| (e = new Jt, t = this | |
| .rpcTimeoutDuration | |
| ) => new Promise((( | |
| r, n) => | |
| setTimeout(( | |
| () => { | |
| n(e) | |
| }), t))), this | |
| .setWalletProvider = | |
| e => { | |
| this.walletProvider && | |
| this | |
| ._subscriptions | |
| .forEach((e => { | |
| this.removeListener( | |
| e | |
| .eventName, | |
| e | |
| .listener | |
| ) | |
| })), this | |
| .walletProvider = | |
| e, this | |
| ._subscriptions | |
| .forEach((e => { | |
| this.walletProvider | |
| ?.on( | |
| e | |
| .eventName, | |
| e | |
| .listener | |
| ) | |
| })) | |
| }, this.walletProvider = | |
| e, this | |
| .rpcTimeoutDuration = | |
| t || V, this | |
| ._subscriptions = [] | |
| } | |
| } | |
| let Wl = class extends Error { | |
| constructor(e, t, r) { | |
| super(e), this.code = t, | |
| this.data = r | |
| } | |
| }; | |
| class Bl extends Yt { | |
| async handleSendTransaction(e) { | |
| if (!e.params || !Array | |
| .isArray(e.params)) | |
| throw new Wl( | |
| `Invalid params for ${e.method}`, | |
| 4200); | |
| let t = e.params[0]; | |
| if (!await Ov() || !this | |
| .address) throw new Wl( | |
| "Disconnected", | |
| 4900); | |
| return (await Lv(t, void 0, | |
| void 0, this | |
| .address)).hash | |
| } | |
| handleSwitchEthereumChain(e) { | |
| let t; | |
| if (!e.params || !Array | |
| .isArray(e.params)) | |
| throw new Wl( | |
| `Invalid params for ${e.method}`, | |
| 4200); | |
| if ("string" == typeof e | |
| .params[0]) t = e | |
| .params[0]; | |
| else { | |
| if (!("chainId" in e | |
| .params[0]) || | |
| "string" != typeof e | |
| .params[0].chainId) | |
| throw new Wl( | |
| `Invalid params for ${e.method}`, | |
| 4200); | |
| t = e.params[0].chainId | |
| } | |
| this.chainId = Number(t), | |
| this.provider = Xe(this | |
| .chainId, this | |
| .chains, this | |
| .rpcConfig, { | |
| appId: this | |
| .appId | |
| }), this.emit( | |
| "chainChanged", t) | |
| } | |
| async handlePersonalSign(e) { | |
| if (!e.params || !Array | |
| .isArray(e.params)) | |
| throw Error( | |
| "Invalid params for personal_sign" | |
| ); | |
| let t = e.params[0], | |
| r = e.params[1]; | |
| return await Rv(t, void 0, | |
| r) | |
| } | |
| async handleSignedTypedData(e) { | |
| if (!e.params || !Array | |
| .isArray(e.params)) | |
| throw Error( | |
| "Invalid params for eth_signTypedData_v4" | |
| ); | |
| let t = e.params[0], | |
| r = "string" == typeof e | |
| .params[1] ? JSON.parse( | |
| e.params[1]) : e | |
| .params[1]; | |
| return await Mv(Qe(r), | |
| void 0, t) | |
| } | |
| async handleEstimateGas(e) { | |
| if (!e.params || !Array | |
| .isArray(e.params)) | |
| throw Error( | |
| "Invalid params for eth_estimateGas" | |
| ); | |
| delete e.params[0].gasPrice, | |
| delete e.params[0] | |
| .maxFeePerGas, delete e | |
| .params[0] | |
| .maxPriorityFeePerGas; | |
| let t = { | |
| ...e.params[0], | |
| chainId: Je(this | |
| .chainId) | |
| }; | |
| try { | |
| return await this | |
| .provider.send( | |
| "eth_estimateGas", | |
| [t]) | |
| } catch (e) { | |
| console.warn( | |
| `Gas estimation failed with error: ${e}. Retrying gas estimation by omitting the 'from' address` | |
| ); | |
| try { | |
| return delete t | |
| .from, | |
| await this | |
| .provider.send( | |
| "eth_estimateGas", | |
| [t]) | |
| } catch (t) { | |
| throw console.warn( | |
| `Gas estimation failed with error: ${t} when omitting the 'from' address` | |
| ), e | |
| } | |
| } | |
| } | |
| async request(e) { | |
| switch (console.debug( | |
| "Embedded1193Provider.request() called with args", | |
| e), e.method) { | |
| case "eth_accounts": | |
| case "eth_requestAccounts": | |
| return this | |
| .address ? [this | |
| .address | |
| ] : []; | |
| case "eth_chainId": | |
| return Je(this | |
| .chainId); | |
| case "eth_estimateGas": | |
| return this | |
| .handleEstimateGas( | |
| e); | |
| case "eth_sendTransaction": | |
| return this | |
| .handleSendTransaction( | |
| e); | |
| case "wallet_switchEthereumChain": | |
| return this | |
| .handleSwitchEthereumChain( | |
| e); | |
| case "personal_sign": | |
| return this | |
| .handlePersonalSign( | |
| e); | |
| case "eth_signTypedData_v4": | |
| return this | |
| .handleSignedTypedData( | |
| e) | |
| } | |
| if (!(e => Fl.includes(e))(e | |
| .method)) | |
| return this.provider | |
| .send(e.method, e | |
| .params); | |
| { | |
| let t = await Ov(); | |
| if (await Dv(), !t || ! | |
| this.address) | |
| throw new Wl( | |
| "Disconnected", | |
| 4900); | |
| try { | |
| return (await this | |
| .walletProxy | |
| .rpc({ | |
| address: this | |
| .rootAddress, | |
| accessToken: t, | |
| hdWalletIndex: this | |
| .walletIndex, | |
| request: { | |
| method: e | |
| .method, | |
| params: e | |
| .params | |
| } | |
| })).response | |
| .data | |
| } catch (e) { | |
| throw console.error( | |
| e), new Wl( | |
| "Disconnected", | |
| 4900) | |
| } | |
| } | |
| } | |
| async connect() { | |
| let e = await Ov(); | |
| if (!e || !this.address) | |
| return null; | |
| try { | |
| return (await this | |
| .walletProxy | |
| .connect({ | |
| address: this | |
| .address, | |
| accessToken: e | |
| })).address | |
| } catch (e) { | |
| return console.error(e), | |
| null | |
| } | |
| } | |
| constructor({ | |
| walletProxy: e, | |
| address: t, | |
| rootAddress: r, | |
| rpcConfig: n, | |
| chains: i, | |
| appId: a, | |
| chainId: o = 1, | |
| walletIndex: l | |
| }) { | |
| super(), this.walletProxy = | |
| e, this.address = t, | |
| this.rootAddress = r, | |
| this.chainId = o, this | |
| .rpcConfig = n, this | |
| .chains = i, this | |
| .provider = Xe(o, this | |
| .chains, n, { | |
| appId: a | |
| }), this | |
| .rpcTimeoutDuration = | |
| ps(n, "privy"), this | |
| .appId = a, this | |
| .walletIndex = l | |
| } | |
| } | |
| class Gl extends Ul { | |
| constructor(e) { | |
| super(e, e | |
| .rpcTimeoutDuration) | |
| } | |
| } | |
| class Hl extends Ul { | |
| sendAsync(e, t) { | |
| throw Error( | |
| "sendAsync is no longer supported by EIP-1193. Use the request method instead." | |
| ) | |
| } | |
| constructor(e) { | |
| super(e, e | |
| .rpcTimeoutDuration) | |
| } | |
| } | |
| let zl; | |
| function jl(e) { | |
| return "ethereum" === e.chainType | |
| } | |
| function ql(e) { | |
| return "ethereum" === e.type | |
| } | |
| class Vl extends er { | |
| buildConnectedWallet(e, t, r, a) { | |
| let o = async () => !!this | |
| .wallets.find((t => | |
| n(t | |
| .address) === | |
| n(e))); | |
| return { | |
| type: "ethereum", | |
| address: n(e), | |
| chainId: t, | |
| meta: r, | |
| imported: a, | |
| switchChain: async r => { | |
| let i, a; | |
| if (!o) throw new _( | |
| "Wallet is not currently connected." | |
| ); | |
| let l = this | |
| .wallets | |
| .find((t => | |
| n(t | |
| .address) === | |
| n(e) | |
| )) | |
| ?.chainId; | |
| if (!l) throw new _( | |
| "Unable to determine current chainId." | |
| ); | |
| if ("number" == | |
| typeof r ? ( | |
| i = | |
| `0x${r.toString(16)}`, | |
| a = r) : | |
| (i = r, a = | |
| Number( | |
| r)), | |
| l === et(i)) | |
| return; | |
| let s = this | |
| .chains | |
| .find((e => | |
| e | |
| .id === | |
| a)); | |
| if (!s) throw new _( | |
| `Unsupported chainId: ${r}` | |
| ); | |
| let d = async () => { | |
| await this | |
| .proxyProvider | |
| .request({ | |
| method: "wallet_switchEthereumChain", | |
| params: [{ | |
| chainId: i | |
| }] | |
| }) | |
| }; | |
| try { | |
| return await d() | |
| } catch (e) { | |
| if (((e, t) => | |
| "coinbase_wallet" === | |
| t ? | |
| e | |
| .message | |
| .includes( | |
| "addEthereumChain" | |
| ) : | |
| 4902 === | |
| e | |
| .code || | |
| e | |
| .message | |
| ?.includes( | |
| "4902" | |
| ) | |
| )(e, | |
| this | |
| .walletClientType | |
| )) | |
| return await this | |
| .proxyProvider | |
| .request({ | |
| method: "wallet_addEthereumChain", | |
| params: [{ | |
| chainId: i, | |
| chainName: s | |
| .name, | |
| nativeCurrency: s | |
| .nativeCurrency, | |
| rpcUrls: [ | |
| s | |
| .rpcUrls | |
| .default | |
| ?.http[ | |
| 0 | |
| ] ?? | |
| "" | |
| ], | |
| blockExplorerUrls: [ | |
| s | |
| .blockExplorers | |
| ?.default | |
| .url ?? | |
| "" | |
| ] | |
| }] | |
| }), | |
| d(); | |
| if ("rainbow" === | |
| this | |
| .walletClientType && | |
| e | |
| .message | |
| ?.includes( | |
| "wallet_switchEthereumChain" | |
| )) | |
| throw new _( | |
| `Rainbow does not support the chainId ${t}` | |
| ); | |
| throw e | |
| } | |
| }, | |
| connectedAt: Date.now(), | |
| walletClientType: this | |
| .walletClientType, | |
| connectorType: this | |
| .connectorType, | |
| isConnected: o, | |
| getEthereumProvider: async () => { | |
| if (!await o()) | |
| throw new _( | |
| "Wallet is not currently connected." | |
| ); | |
| return this | |
| .proxyProvider | |
| }, | |
| getEthersProvider: async () => { | |
| if (!await o()) | |
| throw new _( | |
| "Wallet is not currently connected." | |
| ); | |
| return new i( | |
| new Gl( | |
| this | |
| .proxyProvider | |
| )) | |
| }, | |
| getWeb3jsProvider: async () => { | |
| if (!await o()) | |
| throw new _( | |
| "Wallet is not currently connected." | |
| ); | |
| return new Hl( | |
| this | |
| .proxyProvider | |
| ) | |
| }, | |
| sign: async e => { | |
| if (!await o()) | |
| throw new _( | |
| "Wallet is not currently connected." | |
| ); | |
| return await this | |
| .sign(e) | |
| }, | |
| disconnect: () => { | |
| this.disconnect() | |
| } | |
| } | |
| } | |
| async syncAccounts(e) { | |
| let t, r = e; | |
| try { | |
| if (void 0 === r) { | |
| let e = await tt(( | |
| () => this | |
| .proxyProvider | |
| .request({ | |
| method: "eth_accounts" | |
| })), { | |
| maxAttempts: 10, | |
| delayMs: 500 | |
| }); | |
| console.debug( | |
| `eth_accounts for ${this.walletClientType}:`, | |
| e), Array | |
| .isArray(e) && ( | |
| r = e) | |
| } | |
| } catch (e) { | |
| console.warn( | |
| "Wallet did not respond to eth_accounts. Defaulting to prefetched accounts.", | |
| e) | |
| } | |
| if (!r || !Array.isArray( | |
| r) || r.length <= 0 || ! | |
| r[0]) return; | |
| let i = r[0], | |
| a = n(i), | |
| o = []; | |
| if ("privy" === this | |
| .walletClientType) { | |
| let e = Ye.get(K(a)); | |
| this.chains.find((t => t | |
| .id === | |
| Number(e))) || ( | |
| Ye.del(K(a)), | |
| e = null), t = | |
| e || | |
| `0x${this.defaultChain.id.toString(16)}`; | |
| try { | |
| await this | |
| .proxyProvider | |
| .request({ | |
| method: "wallet_switchEthereumChain", | |
| params: [{ | |
| chainId: t | |
| }] | |
| }) | |
| } catch (e) { | |
| console.warn( | |
| `Unable to switch embedded wallet to chain ID ${t} on initialization` | |
| ) | |
| } | |
| } else try { | |
| let e = await tt(( | |
| () => this | |
| .proxyProvider | |
| .request({ | |
| method: "eth_chainId" | |
| })), { | |
| maxAttempts: 10, | |
| delayMs: 500 | |
| }); | |
| if (console.debug( | |
| `eth_chainId for ${this.walletClientType}:`, | |
| e), | |
| "string" == | |
| typeof e) t = e; | |
| else { | |
| if ("number" != | |
| typeof e) | |
| throw Error( | |
| "Invalid chainId returned from provider" | |
| ); | |
| t = `0x${e.toString(16)}` | |
| } | |
| } catch (e) { | |
| console.warn( | |
| `Failed to get chainId from provider, defaulting to ${Q}`, | |
| e), t = Q | |
| } | |
| let l = et(t); | |
| if (!o.find((e => n(e | |
| .address | |
| ) === a))) { | |
| let e = { | |
| name: this | |
| .walletBranding | |
| .name, | |
| icon: "string" == | |
| typeof this | |
| .walletBranding | |
| .icon ? this | |
| .walletBranding | |
| .icon : | |
| void 0, | |
| id: this | |
| .walletBranding | |
| .id | |
| }; | |
| o.push(this | |
| .buildConnectedWallet( | |
| n(i), l, e, | |
| "embedded_imported" === | |
| this | |
| .connectorType | |
| )) | |
| } | |
| fs(o, this.wallets) || (this | |
| .wallets = o, this | |
| .emit( | |
| "walletsUpdated" | |
| )) | |
| } | |
| async getConnectedWallet() { | |
| let e = await this | |
| .proxyProvider.request({ | |
| method: "eth_accounts" | |
| }); | |
| return this.wallets.sort((( | |
| e, t) => t | |
| .connectedAt - e | |
| .connectedAt)).find( | |
| (t => e.find((e => | |
| n(e) === | |
| n(t | |
| .address) | |
| )))) || null | |
| } | |
| async isConnected() { | |
| let e = await this | |
| .proxyProvider.request({ | |
| method: "eth_accounts" | |
| }); | |
| return Array.isArray(e) && e | |
| .length > 0 | |
| } | |
| async sign(e) { | |
| return await this.connect({ | |
| showPrompt: !1 | |
| }), new i(new Gl(this | |
| .proxyProvider)) | |
| .getSigner() | |
| .signMessage(e) | |
| } | |
| subscribeListeners() { | |
| this.proxyProvider.on( | |
| "accountsChanged", | |
| this | |
| .onAccountsChanged), | |
| this.proxyProvider.on( | |
| "chainChanged", this | |
| .onChainChanged), | |
| this.proxyProvider.on( | |
| "disconnect", this | |
| .onDisconnect), this | |
| .proxyProvider.on( | |
| "connect", this | |
| .onConnect) | |
| } | |
| unsubscribeListeners() { | |
| this.proxyProvider | |
| .removeListener( | |
| "accountsChanged", | |
| this | |
| .onAccountsChanged), | |
| this.proxyProvider | |
| .removeListener( | |
| "chainChanged", this | |
| .onChainChanged), | |
| this.proxyProvider | |
| .removeListener( | |
| "disconnect", this | |
| .onDisconnect), this | |
| .proxyProvider | |
| .removeListener( | |
| "connect", this | |
| .onConnect) | |
| } | |
| constructor(e, t, r, n) { | |
| super(e), this.chainType = | |
| "ethereum", this | |
| .onAccountsChanged = | |
| e => { | |
| 0 === e.length ? | |
| this | |
| .onDisconnect() : | |
| this | |
| .syncAccounts(e) | |
| }, this.onChainChanged = | |
| e => { | |
| this.wallets | |
| .forEach((t => { | |
| t.chainId = | |
| et( | |
| e), | |
| "privy" === | |
| this | |
| .walletClientType && | |
| Ye | |
| .put( | |
| K(t | |
| .address), | |
| e | |
| ) | |
| })), this.emit( | |
| "walletsUpdated" | |
| ) | |
| }, this.onDisconnect = | |
| () => { | |
| this.connected = !1, | |
| this | |
| .wallets = [], | |
| this.emit( | |
| "walletsUpdated" | |
| ) | |
| }, this.onConnect = | |
| () => { | |
| this.connected = !0, | |
| this | |
| .syncAccounts() | |
| }, this.wallets = [], | |
| this.walletClientType = | |
| e, this.chains = t, this | |
| .defaultChain = r, this | |
| .rpcConfig = n, this | |
| .rpcTimeoutDuration = | |
| ps(n, e), this | |
| .connected = !1, this | |
| .initialized = !1 | |
| } | |
| } | |
| let Kl = [1, 11155111, 137, 10, 8453, | |
| 84532, 42161, 7777777, 43114, 56 | |
| ], | |
| Yl = (e, t) => e.makeWeb3Provider({ | |
| options: t | |
| }); | |
| class Zl extends Vl { | |
| async initialize() { | |
| await this.syncAccounts(), | |
| this.initialized = !0, | |
| this.emit("initialized") | |
| } | |
| async connect(e) { | |
| return e.showPrompt && | |
| await this | |
| .promptConnection(), | |
| await this | |
| .isConnected() ? this | |
| .getConnectedWallet() : | |
| null | |
| } | |
| disconnect() { | |
| this.proxyProvider | |
| .walletProvider | |
| .disconnect(), this | |
| .onDisconnect() | |
| } | |
| get walletBranding() { | |
| return { | |
| name: this.displayName, | |
| icon: Dl, | |
| id: "com.coinbase.wallet" | |
| } | |
| } | |
| async promptConnection() { | |
| try { | |
| let e = await this | |
| .proxyProvider | |
| .request({ | |
| method: "eth_requestAccounts" | |
| }); | |
| if (!e || 0 === e | |
| .length || !e[0]) | |
| throw new _( | |
| "Unable to retrieve accounts" | |
| ); | |
| this.connected = !0, | |
| await this | |
| .syncAccounts([e[ | |
| 0]]) | |
| } catch (e) { | |
| throw Qt(e) | |
| } | |
| } | |
| updateConnectionPreference(e) { | |
| this.connectionOptions = e, | |
| this.walletClientType = | |
| "smartWalletOnly" === | |
| e ? | |
| "coinbase_smart_wallet" : | |
| "coinbase_wallet", this | |
| .proxyProvider | |
| .setWalletProvider(Yl( | |
| zl, this | |
| .connectionOptions | |
| )) | |
| } | |
| constructor(e, t, r, n, i, a) { | |
| if (super("coinbase_wallet", | |
| e, t, r), this | |
| .connectorType = | |
| "coinbase_wallet", this | |
| .displayName = | |
| "Coinbase Wallet", this | |
| .proxyProvider = new Ul( | |
| void 0, this | |
| .rpcTimeoutDuration | |
| ), this | |
| .subscribeListeners(), | |
| this.connectionOptions = | |
| n.coinbaseWallet | |
| .connectionOptions ?? | |
| "all", this | |
| .walletClientType = | |
| "smartWalletOnly" === | |
| this.connectionOptions ? | |
| "coinbase_smart_wallet" : | |
| "coinbase_wallet", | |
| "coinbase_smart_wallet" === | |
| this.walletClientType && | |
| (this.displayName = | |
| "Coinbase Smart Wallet" | |
| ), !zl) { | |
| let r = [t.id].concat(e | |
| .map((e => e | |
| .id))), | |
| n = "eoaOnly" !== | |
| this | |
| .connectionOptions ? | |
| r.filter((e => !Kl | |
| .includes(e) | |
| )) : []; | |
| n.length > 0 && console | |
| .warn( | |
| `The following configured chains are not supported by the Coinbase Smart Wallet: ${n.join(", ")}` | |
| ), zl = new Zt({ | |
| appName: i, | |
| appLogoUrl: a, | |
| appChainIds: r | |
| }) | |
| } | |
| this.proxyProvider | |
| .setWalletProvider(Yl( | |
| zl, this | |
| .connectionOptions | |
| )) | |
| } | |
| } | |
| const Xl = ({ | |
| ...e | |
| }) => t("svg", { | |
| width: "15", | |
| height: "15", | |
| viewBox: "0 0 15 15", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...e, | |
| children: t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M2.37126 11.0323C2.37126 12.696 3.90598 13.4421 5.40654 13.4468C8.91753 13.4468 12.8021 11.2897 12.7819 7.67984C12.7673 5.07728 10.3748 2.86167 7.54357 2.88296C4.8495 2.88296 2.21821 4.6411 2.21803 7.03628C2.21803 7.67951 2.58722 8.30178 3.55231 8.37184C2.74763 9.16826 2.37126 10.1225 2.37126 11.0323ZM7.55283 8.68012C8.11562 8.68012 8.57186 8.13217 8.57186 7.45624C8.57186 6.78032 8.11562 6.23237 7.55283 6.23237C6.99003 6.23237 6.53379 6.78032 6.53379 7.45624C6.53379 8.13217 6.99003 8.68012 7.55283 8.68012ZM10.4747 8.68012C11.0375 8.68012 11.4937 8.13217 11.4937 7.45625C11.4937 6.78032 11.0375 6.23237 10.4747 6.23237C9.91186 6.23237 9.45562 6.78032 9.45562 7.45625C9.45562 8.13217 9.91186 8.68012 10.4747 8.68012Z", | |
| fill: e.color || | |
| "var(--privy-color-foreground-3)" | |
| }) | |
| }); | |
| class Ql extends Vl { | |
| async initialize() { | |
| await this.syncAccounts(), | |
| this.initialized = !0, | |
| this.emit("initialized") | |
| } | |
| async connect(e) { | |
| return await this | |
| .isConnected() ? ( | |
| await this | |
| .proxyProvider | |
| .request({ | |
| method: "wallet_switchEthereumChain", | |
| params: [Je(e | |
| ?.chainId || | |
| "0x1" | |
| )] | |
| }), this | |
| .getConnectedWallet() | |
| ) : null | |
| } | |
| get walletBranding() { | |
| return { | |
| name: "Privy Wallet", | |
| icon: Xl, | |
| id: "io.privy.wallet" | |
| } | |
| } | |
| disconnect() { | |
| this.connected = !1 | |
| } | |
| async promptConnection() {} | |
| constructor({ | |
| provider: e, | |
| chains: t, | |
| defaultChain: r, | |
| rpcConfig: n, | |
| imported: i, | |
| walletIndex: a | |
| }) { | |
| super("privy", t, r, n), | |
| this.connectorType = | |
| "embedded", this | |
| .proxyProvider = e, this | |
| .walletIndex = a, i && ( | |
| this.connectorType = | |
| "embedded_imported" | |
| ), this | |
| .subscribeListeners() | |
| } | |
| } | |
| const Jl = ({ | |
| style: e, | |
| ...r | |
| }) => t("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| fill: "none", | |
| stroke: "currentColor", | |
| strokeWidth: 1.5, | |
| viewBox: "0 0 24 24", | |
| style: { | |
| ...e | |
| }, | |
| ...r, | |
| children: t("path", { | |
| strokeLinecap: "round", | |
| strokeLinejoin: "round", | |
| d: "M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25" | |
| }) | |
| }), | |
| es = ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| xmlSpace: "preserve", | |
| x: 0, | |
| y: 0, | |
| viewBox: "0 0 318.6 318.6", | |
| width: "28", | |
| height: "28", | |
| style: { | |
| height: "28px", | |
| width: "28px", | |
| ...r | |
| }, | |
| ...n, | |
| children: [t("style", { | |
| children: ".s1{stroke-linecap:round;stroke-linejoin:round}.s2{fill:#e4761b;stroke:#e4761b}.s3{fill:#f6851b;stroke:#f6851b}" | |
| }), t("path", { | |
| fill: "#e2761b", | |
| stroke: "#e2761b", | |
| className: "s1", | |
| d: "m274.1 35.5-99.5 73.9L193 65.8z" | |
| }), t("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", | |
| className: "s1 s2" | |
| }), t("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", | |
| className: "s1 s2" | |
| }), t("path", { | |
| fill: "#d7c1b3", | |
| stroke: "#d7c1b3", | |
| className: "s1", | |
| 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" | |
| }), t("path", { | |
| fill: "#233447", | |
| stroke: "#233447", | |
| className: "s1", | |
| d: "m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z" | |
| }), t("path", { | |
| fill: "#cd6116", | |
| stroke: "#cd6116", | |
| className: "s1", | |
| 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" | |
| }), t("path", { | |
| fill: "#e4751f", | |
| stroke: "#e4751f", | |
| className: "s1", | |
| 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" | |
| }), t("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", | |
| className: "s3" | |
| }), t("path", { | |
| fill: "#c0ad9e", | |
| stroke: "#c0ad9e", | |
| className: "s1", | |
| 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" | |
| }), t("path", { | |
| fill: "#161616", | |
| stroke: "#161616", | |
| className: "s1", | |
| 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" | |
| }), t("path", { | |
| fill: "#763d16", | |
| stroke: "#763d16", | |
| className: "s1", | |
| 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" | |
| }), t("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", | |
| className: "s3" | |
| })] | |
| }), | |
| ts = ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| width: "108", | |
| height: "108", | |
| viewBox: "0 0 108 108", | |
| fill: "none", | |
| style: { | |
| height: "28px", | |
| width: "28px", | |
| ...r | |
| }, | |
| ...n, | |
| children: [t("rect", { | |
| width: "108", | |
| height: "108", | |
| rx: "23", | |
| fill: "#AB9FF2" | |
| }), t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M46.5267 69.9229C42.0054 76.8509 34.4292 85.6182 24.348 85.6182C19.5824 85.6182 15 83.6563 15 75.1342C15 53.4305 44.6326 19.8327 72.1268 19.8327C87.768 19.8327 94 30.6846 94 43.0079C94 58.8258 83.7355 76.9122 73.5321 76.9122C70.2939 76.9122 68.7053 75.1342 68.7053 72.314C68.7053 71.5783 68.8275 70.7812 69.0719 69.9229C65.5893 75.8699 58.8685 81.3878 52.5754 81.3878C47.993 81.3878 45.6713 78.5063 45.6713 74.4598C45.6713 72.9884 45.9768 71.4556 46.5267 69.9229ZM83.6761 42.5794C83.6761 46.1704 81.5575 47.9658 79.1875 47.9658C76.7816 47.9658 74.6989 46.1704 74.6989 42.5794C74.6989 38.9885 76.7816 37.1931 79.1875 37.1931C81.5575 37.1931 83.6761 38.9885 83.6761 42.5794ZM70.2103 42.5795C70.2103 46.1704 68.0916 47.9658 65.7216 47.9658C63.3157 47.9658 61.233 46.1704 61.233 42.5795C61.233 38.9885 63.3157 37.1931 65.7216 37.1931C68.0916 37.1931 70.2103 38.9885 70.2103 42.5795Z", | |
| fill: "#FFFDF8" | |
| })] | |
| }); | |
| function rs(e, t) { | |
| if (!Object.prototype.hasOwnProperty | |
| .call(e, t)) throw TypeError( | |
| "attempted to use private field on non-instance" | |
| ); | |
| return e | |
| } | |
| var ns = 0; | |
| class is extends Vl { | |
| async initialize() { | |
| await this.syncAccounts(), | |
| this.initialized = !0, | |
| this.emit("initialized") | |
| } | |
| async connect(e) { | |
| return e.showPrompt && | |
| await this | |
| .promptConnection(), | |
| await this | |
| .isConnected() ? this | |
| .getConnectedWallet() : | |
| null | |
| } | |
| get walletBranding() { | |
| return { | |
| name: this | |
| .providerDetail.info | |
| .name, | |
| icon: this | |
| .providerDetail.info | |
| .icon, | |
| id: this.providerDetail | |
| .info.rdns | |
| } | |
| } | |
| disconnect() { | |
| console.warn( | |
| `Programmatic disconnect with ${this.providerDetail.info.name} is not yet supported.` | |
| ) | |
| } | |
| async promptConnection() { | |
| try { | |
| let e = await this | |
| .proxyProvider | |
| .request({ | |
| method: "eth_requestAccounts" | |
| }); | |
| if (!e || 0 === e | |
| .length || !e[0]) | |
| throw new _( | |
| "Unable to retrieve accounts" | |
| ); | |
| await this.syncAccounts( | |
| [e[0]]) | |
| } catch (e) { | |
| throw Qt(e) | |
| } | |
| } | |
| constructor(e, t, r, n, i) { | |
| super(i || "unknown", e, t, | |
| r), this | |
| .connectorType = | |
| "injected", this | |
| .proxyProvider = new Ul( | |
| void 0, this | |
| .rpcTimeoutDuration | |
| ), this | |
| .subscribeListeners(), | |
| this.providerDetail = n; | |
| let a = n.provider; | |
| this.proxyProvider | |
| .setWalletProvider(a) | |
| } | |
| } | |
| var as = "__private_" + ns++ + | |
| "__walletBranding"; | |
| class os extends Vl { | |
| async initialize() { | |
| await this.syncAccounts(), | |
| this.initialized = !0, | |
| this.emit("initialized") | |
| } | |
| async connect(e) { | |
| return e.showPrompt && | |
| await this | |
| .promptConnection(), | |
| await this | |
| .isConnected() ? this | |
| .getConnectedWallet() : | |
| null | |
| } | |
| get walletBranding() { | |
| return rs(this, as)[as] ?? { | |
| name: "Browser Extension", | |
| icon: Jl, | |
| id: "extension" | |
| } | |
| } | |
| disconnect() { | |
| console.warn( | |
| "Programmatic disconnect with browser wallets is not yet supported." | |
| ) | |
| } | |
| async promptConnection() { | |
| try { | |
| let e = await this | |
| .proxyProvider | |
| .request({ | |
| method: "eth_requestAccounts" | |
| }); | |
| if (!e || 0 === e | |
| .length || !e[0]) | |
| throw new _( | |
| "Unable to retrieve accounts" | |
| ); | |
| await this.syncAccounts( | |
| [e[0]]) | |
| } catch (e) { | |
| throw Qt(e) | |
| } | |
| } | |
| constructor(e, t, r, n, i) { | |
| super(i ?? "unknown", e, t, | |
| r), Object | |
| .defineProperty(this, | |
| as, { | |
| writable: !0, | |
| value: void 0 | |
| }), this | |
| .connectorType = | |
| "injected", this | |
| .proxyProvider = new Ul( | |
| void 0, this | |
| .rpcTimeoutDuration | |
| ), this | |
| .subscribeListeners(), | |
| this.proxyProvider | |
| .setWalletProvider(n), | |
| "metamask" === i ? rs( | |
| this, as)[as] = { | |
| name: "MetaMask", | |
| icon: es, | |
| id: "io.metamask" | |
| } : "phantom" === i && ( | |
| rs(this, as)[as] = { | |
| name: "Phantom", | |
| icon: ts, | |
| id: "phantom" | |
| }) | |
| } | |
| } | |
| class ls extends is { | |
| disconnect() { | |
| console.warn( | |
| "MetaMask does not support programmatic disconnect." | |
| ) | |
| } | |
| async promptConnection() { | |
| try { | |
| v || await this | |
| .proxyProvider | |
| .request({ | |
| method: "wallet_requestPermissions", | |
| params: [{ | |
| eth_accounts: {} | |
| }] | |
| }); | |
| let e = await this | |
| .proxyProvider | |
| .request({ | |
| method: "eth_requestAccounts" | |
| }); | |
| if (!e || 0 === e | |
| .length || !e[0]) | |
| throw new _( | |
| "Unable to retrieve accounts" | |
| ); | |
| await this.syncAccounts( | |
| [e[0]]) | |
| } catch (e) { | |
| throw Qt(e) | |
| } | |
| } | |
| } | |
| class ss extends Vl { | |
| get walletBranding() { | |
| return { | |
| name: "Wallet", | |
| id: "" | |
| } | |
| } | |
| async initialize() { | |
| this.initialized = !0, this | |
| .emit("initialized") | |
| } | |
| async connect() { | |
| throw Error( | |
| "connect called for an uninstalled wallet via the NullConnector" | |
| ) | |
| } | |
| disconnect() { | |
| throw Error( | |
| "disconnect called for an uninstalled wallet via the NullConnector" | |
| ) | |
| } | |
| promptConnection(e) { | |
| throw Error( | |
| `promptConnection called for an uninstalled wallet via the NullConnector for ${e}` | |
| ) | |
| } | |
| constructor(e, t) { | |
| super(e, [], t, {}), this | |
| .connectorType = "null", | |
| this.proxyProvider = new Ul( | |
| void 0, V), this | |
| .connectorType = e | |
| } | |
| } | |
| class ds extends ss { | |
| get walletBranding() { | |
| return { | |
| name: "Phantom", | |
| icon: ts, | |
| id: "phantom" | |
| } | |
| } | |
| constructor(e) { | |
| super("phantom", e) | |
| } | |
| } | |
| const cs = ({ | |
| style: r, | |
| ...n | |
| }) => { | |
| let { | |
| app: i | |
| } = ur(); | |
| return e("svg", { | |
| width: "28", | |
| height: "28", | |
| viewBox: "0 0 28 28", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: "28px", | |
| width: "28px", | |
| ...r | |
| }, | |
| ...n, | |
| children: [t( | |
| "rect", { | |
| width: "28", | |
| height: "28", | |
| rx: "3", | |
| fill: "dark" === | |
| i | |
| ?.appearance | |
| .palette | |
| .colorScheme ? | |
| "#3396ff" : | |
| "#141414" | |
| }), t("g", { | |
| clipPath: "url(#clip0_1765_9946)", | |
| children: t( | |
| "path", { | |
| d: "M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z", | |
| fill: "white" | |
| } | |
| ) | |
| }), t( | |
| "defs", { | |
| children: t( | |
| "clipPath", { | |
| id: "clip0_1765_9946", | |
| children: t( | |
| "rect", { | |
| width: "20", | |
| height: "12.2531", | |
| fill: "white", | |
| transform: "translate(4 8)" | |
| } | |
| ) | |
| } | |
| ) | |
| })] | |
| }) | |
| }; | |
| class us extends Vl { | |
| async initialize() { | |
| let e = await this | |
| .createProvider(); | |
| if (this.provider = e, this | |
| .proxyProvider | |
| .setWalletProvider(e), | |
| this | |
| .subscribeListeners(), e | |
| .session) { | |
| if (this.walletProvider | |
| ?.session?.peer | |
| .metadata.url) { | |
| let e = qo(this | |
| .walletProvider | |
| ?.session | |
| ?.peer | |
| .metadata | |
| .url); | |
| this.walletEntry = e | |
| ?.entry, this | |
| .walletClientType = | |
| e | |
| ?.walletClientType || | |
| "unknown" | |
| } | |
| this.connected = !0, | |
| await this | |
| .syncAccounts() | |
| } | |
| this.initialized = !0, this | |
| .emit("initialized"); | |
| let { | |
| WalletConnectModal: t | |
| } = await import( | |
| "@walletconnect/modal" | |
| ); | |
| this.modal = new t({ | |
| projectId: this | |
| .walletConnectCloudProjectId, | |
| themeVariables: { | |
| "--wcm-z-index": "1000000" | |
| } | |
| }), this.modal | |
| .subscribeModal((e => { | |
| e.open || | |
| this | |
| .walletProvider | |
| ?.session || | |
| !this | |
| .onQrModalClosed || | |
| this | |
| .onQrModalClosed() | |
| })) | |
| } | |
| async connect(e) { | |
| return e.showPrompt && | |
| await this | |
| .promptConnection(), | |
| this | |
| .getConnectedWallet() | |
| } | |
| async isConnected() { | |
| return !!this.walletProvider | |
| ?.connected | |
| } | |
| get walletBranding() { | |
| return "metamask" === this | |
| .walletClientType ? { | |
| name: "MetaMask", | |
| icon: es, | |
| id: "io.metamask" | |
| } : { | |
| name: rt(this | |
| .walletProvider | |
| ?.session | |
| ?.peer | |
| .metadata | |
| .name || "" | |
| ) || | |
| "WalletConnect", | |
| icon: this | |
| .walletProvider | |
| ?.session?.peer | |
| .metadata.icons | |
| ?.[0] || cs, | |
| id: this | |
| .walletProvider | |
| ?.session?.peer | |
| .metadata.name | |
| .toLowerCase() || | |
| "wallet_connect_v2" | |
| } | |
| } | |
| async resetConnection(e) { | |
| this.walletProvider && this | |
| .walletProvider | |
| .connected && ( | |
| await this | |
| .walletProvider | |
| .disconnect(), this | |
| .walletProvider | |
| .signer.session = | |
| void 0, this | |
| .walletEntry = Vo[ | |
| e], this | |
| .walletClientType = | |
| e, this | |
| .redirectUri = | |
| void 0, this | |
| .fallbackUniversalRedirectUri = | |
| void 0, | |
| function() { | |
| try { | |
| localStorage | |
| .removeItem( | |
| Yo) | |
| } catch {} | |
| }(), this | |
| .onDisconnect()) | |
| } | |
| async promptConnection() { | |
| if (this.provider) | |
| return new Promise(((e, | |
| t) => { | |
| this.onQrModalClosed = | |
| () => { | |
| t(new tr) | |
| }, (async () => { | |
| let t = | |
| "", | |
| r = | |
| await Promise | |
| .race( | |
| [this | |
| .walletProvider | |
| ?.enable(), | |
| this | |
| .proxyProvider | |
| .walletTimeout() | |
| ] | |
| ); | |
| if (r | |
| ?.length && | |
| (t = r[ | |
| 0]), | |
| ! | |
| t || | |
| "" === | |
| t | |
| ) | |
| throw new _( | |
| "Unable to retrieve address" | |
| ); | |
| if (this | |
| .walletProvider | |
| ?.session | |
| ?.peer | |
| .metadata | |
| .url | |
| ) { | |
| let e = | |
| qo(this | |
| .walletProvider | |
| ?.session | |
| ?.peer | |
| .metadata | |
| .url | |
| ); | |
| this.walletEntry = | |
| e | |
| ?.entry, | |
| this | |
| .walletClientType = | |
| e | |
| ?.walletClientType || | |
| "unknown", | |
| this | |
| .proxyProvider | |
| .rpcTimeoutDuration = | |
| ps(this | |
| .rpcConfig, | |
| this | |
| .walletClientType | |
| ) | |
| } | |
| this.connected = ! | |
| 0, | |
| await this | |
| .syncAccounts( | |
| r | |
| ), | |
| e() | |
| })() | |
| .catch( | |
| (e => { | |
| t(e ? Qt( | |
| e) : | |
| new _( | |
| "Unknown error during connection" | |
| ) | |
| ) | |
| }) | |
| ) | |
| .finally( | |
| (() => | |
| this | |
| .modal | |
| ?.closeModal() | |
| ) | |
| ) | |
| })) | |
| } | |
| disconnect() { | |
| this.walletProvider | |
| ?.disconnect().then(( | |
| () => this | |
| .onDisconnect() | |
| )).catch((() => | |
| console.warn( | |
| "Unable to disconnect Wallet Connect provider" | |
| ))) | |
| } | |
| get walletProvider() { | |
| return this.proxyProvider | |
| .walletProvider | |
| } | |
| setWalletProvider(e) { | |
| this.proxyProvider | |
| .setWalletProvider(e) | |
| } | |
| async createProvider() { | |
| let e = {}; | |
| for (let t of this.chains) { | |
| let r = nt(t.id, this | |
| .chains, this | |
| .rpcConfig, this | |
| .privyAppId); | |
| r && (e[t.id] = r) | |
| } | |
| let t = this | |
| .shouldEnforceDefaultChainOnConnect ? | |
| [this.defaultChain.id] : | |
| [], | |
| r = this.chains.map(( | |
| e => e.id)), | |
| n = await sr.init({ | |
| projectId: this | |
| .walletConnectCloudProjectId, | |
| chains: t, | |
| optionalChains: r, | |
| optionalEvents: dr, | |
| optionalMethods: cr, | |
| rpcMap: e, | |
| showQrModal: !1, | |
| metadata: { | |
| description: this | |
| .privyAppName, | |
| name: this | |
| .privyAppName, | |
| url: window | |
| .location | |
| .toString(), | |
| icons: [] | |
| } | |
| }); | |
| return n.on("display_uri", ( | |
| e => { | |
| if (n.signer | |
| .abortPairingAttempt(), | |
| v && | |
| this | |
| .walletEntry | |
| ) { | |
| let { | |
| redirect: t, | |
| href: r | |
| } = | |
| function( | |
| e, t | |
| ) { | |
| let r = | |
| Ko( | |
| t); | |
| if (r | |
| .deepLink | |
| ) | |
| return Xo( | |
| r | |
| .deepLink, | |
| e | |
| ); | |
| if (r | |
| .universalLink | |
| ) | |
| return Qo( | |
| r | |
| .universalLink, | |
| e | |
| ); | |
| throw new $( | |
| `Unsupported wallet ${t.id}` | |
| ) | |
| }(e, this | |
| .walletEntry | |
| ); | |
| (function({ | |
| href: e, | |
| name: t | |
| }) { | |
| try { | |
| localStorage | |
| .setItem( | |
| Yo, | |
| JSON | |
| .stringify({ | |
| href: e, | |
| name: t | |
| }) | |
| ) | |
| } catch {} | |
| })({ | |
| href: r, | |
| name: this | |
| .walletEntry | |
| .displayName | |
| }), this | |
| .redirectUri = | |
| t; | |
| let n = | |
| function( | |
| e, | |
| t | |
| ) { | |
| let r = | |
| Ko( | |
| t); | |
| if (r | |
| .universalLink | |
| ) | |
| return Qo( | |
| r | |
| .universalLink, | |
| e | |
| ) | |
| }(e, this | |
| .walletEntry | |
| ); | |
| n?.redirect && | |
| (this | |
| .fallbackUniversalRedirectUri = | |
| n | |
| .redirect | |
| ), | |
| Jo(t, | |
| "_self" | |
| ) | |
| } else this | |
| .modal | |
| ?.openModal({ | |
| uri: e, | |
| chains: [ | |
| this | |
| .defaultChain | |
| .id | |
| ] | |
| }) | |
| })), n.on("connect", | |
| (() => { | |
| if (this | |
| .modal | |
| ?.closeModal(), | |
| n | |
| .session | |
| ?.peer | |
| .metadata | |
| .url) { | |
| let e = | |
| qo(n.session | |
| ?.peer | |
| .metadata | |
| .url | |
| ); | |
| this.walletEntry = | |
| e | |
| ?.entry, | |
| this | |
| .walletClientType = | |
| e | |
| ?.walletClientType || | |
| "unknown" | |
| } | |
| })), n | |
| } | |
| async enableProvider() { | |
| return this.walletProvider | |
| ?.connected ? Promise | |
| .resolve(this | |
| .walletProvider | |
| .accounts) : await ( | |
| this.walletProvider | |
| ?.enable()) | |
| } | |
| constructor(e, t, r, n, i, a, o, | |
| l) { | |
| super(l || "unknown", r, n, | |
| t), this | |
| .connectorType = | |
| "wallet_connect_v2", | |
| this.privyAppId = a, | |
| this.privyAppName = o, | |
| this | |
| .walletConnectCloudProjectId = | |
| e, this.rpcConfig = t, | |
| this | |
| .shouldEnforceDefaultChainOnConnect = | |
| i, this.proxyProvider = | |
| new Ul(void 0, this | |
| .rpcTimeoutDuration | |
| ), l && (this | |
| .walletEntry = Vo[ | |
| l], this | |
| .walletClientType = | |
| l) | |
| } | |
| } | |
| const hs = e => { | |
| let t = localStorage.getItem( | |
| "-walletlink:https://www.walletlink.org:Addresses" | |
| )?.split(" ").filter(( | |
| e => Kt(e))).map((e => | |
| n(e))); | |
| return !!t?.length && !!e | |
| ?.linkedAccounts.filter(( | |
| e => "wallet" == e | |
| .type && t.includes( | |
| e.address))).length | |
| }, | |
| ps = (e, t) => e.rpcTimeouts && e | |
| .rpcTimeouts[t] || V; | |
| class ms extends Yt { | |
| get wallets() { | |
| let e = new Set, | |
| t = this | |
| .walletConnectors | |
| .flatMap((e => e | |
| .wallets)).sort(((e, | |
| t) => e | |
| .connectedAt && | |
| t.connectedAt ? | |
| t.connectedAt - | |
| e.connectedAt : | |
| 0)).filter((t => { | |
| let r = | |
| `${t.address}${t.walletClientType}${t.connectorType}`; | |
| return !e | |
| .has( | |
| r) && (e | |
| .add( | |
| r | |
| ), | |
| !0) | |
| })), | |
| r = t.findIndex((e => e | |
| .address === ( | |
| this | |
| .activeWallet ? | |
| this | |
| .activeWallet : | |
| "unknown"))); | |
| return r >= 0 && t.unshift(t | |
| .splice(r, 1)[0]), t | |
| } | |
| async initialize() { | |
| if (this.initialized) | |
| return; | |
| Ye.get(J) && (Ye.getKeys() | |
| .forEach((e => { | |
| e.startsWith( | |
| "walletconnect" | |
| ) && | |
| Ye | |
| .del( | |
| e | |
| ) | |
| })), Ye.del(J)); | |
| let e = it(this.store, this | |
| .walletList, this | |
| .externalWalletConfig | |
| ).then((e => { | |
| e.forEach((({ | |
| type: e, | |
| eip6963InjectedProvider: t, | |
| legacyInjectedProvider: r | |
| }) => { | |
| this.createEthereumWalletConnector( | |
| "injected", | |
| e, { | |
| eip6963InjectedProvider: t, | |
| legacyInjectedProvider: r | |
| } | |
| ) | |
| })) | |
| })); | |
| this.walletList.includes( | |
| "coinbase_wallet" | |
| ) && this | |
| .createEthereumWalletConnector( | |
| "coinbase_wallet", | |
| "coinbase_wallet"), | |
| !at() && this.walletList | |
| .includes("phantom") && | |
| this | |
| .createEthereumWalletConnector( | |
| "phantom", "phantom" | |
| ), this | |
| .externalWalletConfig | |
| .walletConnect | |
| .enabled && this | |
| .createEthereumWalletConnector( | |
| "wallet_connect_v2", | |
| "unknown"), this | |
| .externalWalletConfig | |
| .solana.connectors | |
| ?.get().forEach(this | |
| .addSolanaWalletConnector | |
| ), this | |
| .externalWalletConfig | |
| .solana.connectors | |
| ?._setOnConnectorsUpdated | |
| ?.((e => { | |
| e?.forEach( | |
| this | |
| .addSolanaWalletConnector | |
| ) | |
| })), await e, this | |
| .initialized = !0 | |
| } | |
| findWalletConnector(e, t) { | |
| return "wallet_connect_v2" === | |
| e ? this.walletConnectors | |
| .filter(jl).find((t => t | |
| .connectorType === e | |
| )) ?? null : this | |
| .walletConnectors.filter(jl) | |
| .find((r => r | |
| .connectorType === | |
| e && r | |
| .walletClientType === | |
| t)) ?? null | |
| } | |
| findSolanaWalletConnector(e, t) { | |
| return this.walletConnectors | |
| .filter(rr).find((r => r | |
| .connectorType === | |
| e && r | |
| .walletClientType === | |
| t)) ?? null | |
| } | |
| findEmbeddedWalletConnectors() { | |
| return this.walletConnectors | |
| .filter((e => "embedded" === | |
| e.connectorType)) | |
| } | |
| onInitialized(e) { | |
| e.wallets.forEach((e => { | |
| let t = this | |
| .storedConnections | |
| .find((t => | |
| t | |
| .address === | |
| e | |
| .address && | |
| t | |
| .connectorType === | |
| e | |
| .connectorType && | |
| t | |
| .walletClientType === | |
| e | |
| .walletClientType | |
| )); | |
| t && (e.connectedAt = | |
| t | |
| .connectedAt | |
| ) | |
| })), this | |
| .saveConnectionHistory(), | |
| this.emit("walletsUpdated"), | |
| this.emit( | |
| "connectorInitialized") | |
| } | |
| onWalletsUpdated(e) { | |
| e.initialized && (this | |
| .saveConnectionHistory(), | |
| this.emit( | |
| "walletsUpdated")) | |
| } | |
| addEmbeddedWalletConnectors({ | |
| walletProxy: e, | |
| rootWallet: t, | |
| embeddedWallets: r, | |
| defaultChain: n, | |
| appId: i | |
| }) { | |
| for (let a of r) { | |
| let r = this | |
| .findEmbeddedWalletConnectors() | |
| .find((e => e | |
| .walletIndex === | |
| a.walletIndex)); | |
| if (r && jl(r)) r | |
| .proxyProvider | |
| .walletProxy = e; | |
| else { | |
| let r = new Ql({ | |
| provider: new Bl({ | |
| walletProxy: e, | |
| address: a | |
| .address, | |
| rootAddress: t | |
| .address, | |
| rpcConfig: this | |
| .rpcConfig, | |
| chains: this | |
| .chains, | |
| appId: i, | |
| chainId: n | |
| .id, | |
| walletIndex: a | |
| .walletIndex | |
| }), | |
| chains: this | |
| .chains, | |
| defaultChain: n, | |
| rpcConfig: this | |
| .rpcConfig, | |
| imported: ! | |
| 1, | |
| walletIndex: a | |
| .walletIndex | |
| }); | |
| this.addWalletConnector( | |
| r) | |
| } | |
| } | |
| } | |
| addImportedWalletConnector(e, t, r, | |
| n) { | |
| let i = this | |
| .findWalletConnector( | |
| "embedded_imported", | |
| "privy"); | |
| if (i && jl(i)) i.proxyProvider | |
| .walletProxy = e; | |
| else { | |
| let i = new Ql({ | |
| provider: new Bl({ | |
| walletProxy: e, | |
| rootAddress: t, | |
| address: t, | |
| walletIndex: 0, | |
| rpcConfig: this | |
| .rpcConfig, | |
| chains: this | |
| .chains, | |
| appId: n, | |
| chainId: r | |
| .id | |
| }), | |
| chains: this | |
| .chains, | |
| walletIndex: 0, | |
| defaultChain: r, | |
| rpcConfig: this | |
| .rpcConfig, | |
| imported: !0 | |
| }); | |
| this.addWalletConnector(i) | |
| } | |
| } | |
| removeEmbeddedWalletConnectors() { | |
| this.walletConnectors = this | |
| .walletConnectors.filter(( | |
| e => "embedded" !== | |
| e.connectorType)), this | |
| .saveConnectionHistory(), | |
| this.storedConnections = | |
| gs(), this.emit( | |
| "walletsUpdated") | |
| } | |
| removeImportedWalletConnector() { | |
| let e = this | |
| .findWalletConnector( | |
| "embedded_imported", | |
| "privy"); | |
| if (e) { | |
| let t = this | |
| .walletConnectors | |
| .indexOf(e); | |
| this.walletConnectors | |
| .splice(t, 1), this | |
| .saveConnectionHistory(), | |
| this.storedConnections = | |
| gs(), this.emit( | |
| "walletsUpdated") | |
| } | |
| } | |
| async createEthereumWalletConnector( | |
| e, t, r) { | |
| let n = this | |
| .findWalletConnector(e, | |
| t); | |
| if (n && jl(n)) | |
| return n instanceof us && | |
| n.resetConnection( | |
| t), n; | |
| let i = (() => | |
| "injected" !== e ? | |
| "coinbase_wallet" === | |
| e ? new Zl(this | |
| .chains, this | |
| .defaultChain, | |
| this.rpcConfig, | |
| this | |
| .externalWalletConfig, | |
| this | |
| .privyAppName, | |
| this | |
| .privyAppLogo) : | |
| "phantom" === e ? | |
| new ds(this | |
| .defaultChain) : | |
| new us(this | |
| .walletConnectCloudProjectId, | |
| this.rpcConfig, | |
| this.chains, | |
| this | |
| .defaultChain, | |
| this | |
| .shouldEnforceDefaultChainOnConnect, | |
| this.privyAppId, | |
| this | |
| .privyAppName, t | |
| ) : | |
| "metamask" === t && | |
| r | |
| ?.eip6963InjectedProvider ? | |
| new ls(this.chains, | |
| this | |
| .defaultChain, | |
| this.rpcConfig, | |
| r | |
| ?.eip6963InjectedProvider, | |
| "metamask") : | |
| "metamask" === t && | |
| r | |
| ?.legacyInjectedProvider ? | |
| new os(this.chains, | |
| this | |
| .defaultChain, | |
| this.rpcConfig, | |
| r | |
| ?.legacyInjectedProvider, | |
| "metamask") : | |
| "phantom" === t && r | |
| ?.legacyInjectedProvider ? | |
| new os(this.chains, | |
| this | |
| .defaultChain, | |
| this.rpcConfig, | |
| r | |
| ?.legacyInjectedProvider, | |
| "phantom") : r | |
| ?.legacyInjectedProvider && | |
| "unknown_browser_extension" === | |
| t ? new os(this | |
| .chains, this | |
| .defaultChain, | |
| this.rpcConfig, | |
| r | |
| ?.legacyInjectedProvider | |
| ) : r | |
| ?.eip6963InjectedProvider ? | |
| new is(this.chains, | |
| this | |
| .defaultChain, | |
| this.rpcConfig, | |
| r | |
| ?.eip6963InjectedProvider, | |
| t) : void 0)(); | |
| return i && this | |
| .addWalletConnector(i), | |
| i || null | |
| } | |
| addWalletConnector(e) { | |
| this.walletConnectors.push(e), e | |
| .on("initialized", (() => | |
| this.onInitialized( | |
| e))), e.on( | |
| "walletsUpdated", (() => | |
| this | |
| .onWalletsUpdated(e) | |
| )), e.initialize() | |
| .catch((e => { | |
| console.debug( | |
| "Failed to initialize connector", | |
| e) | |
| })) | |
| } | |
| saveConnectionHistory() { | |
| let e = this.wallets.map((e => | |
| ({ | |
| address: e | |
| .address, | |
| connectorType: e | |
| .connectorType, | |
| walletClientType: e | |
| .walletClientType, | |
| connectedAt: e | |
| .connectedAt | |
| }))); | |
| Ye.put(ee, e) | |
| } | |
| async activeWalletSign(e) { | |
| let t = this.wallets, | |
| r = t.length > 0 ? t[ | |
| 0] : null; | |
| return r && ql(r) ? r.sign( | |
| e) : null | |
| } | |
| setActiveWallet(e) { | |
| this.activeWallet = n(e), this | |
| .emit("walletsUpdated") | |
| } | |
| constructor(e, t, r, n, i, a, o, l, | |
| s, d, c) { | |
| super(), this | |
| .addSolanaWalletConnector = | |
| async e => { | |
| this.findWalletConnector( | |
| "solana_adapter", | |
| e | |
| .walletClientType | |
| ) || this | |
| .addWalletConnector( | |
| e) | |
| }, this | |
| .getEthereumProvider = | |
| () => { | |
| let e = this | |
| .wallets[0], | |
| t = this | |
| .walletConnectors | |
| .find((t => t | |
| .wallets | |
| .find((t => | |
| t | |
| .address === | |
| e | |
| ?.address | |
| )))); | |
| return e && t ? t | |
| .proxyProvider : | |
| new Ul | |
| }, this.privyAppId = e, | |
| this | |
| .walletConnectCloudProjectId = | |
| t, this.rpcConfig = r, | |
| this.chains = n, this | |
| .defaultChain = i, this | |
| .walletConnectors = [], | |
| this.initialized = !1, | |
| this.store = a, this | |
| .walletList = o, this | |
| .shouldEnforceDefaultChainOnConnect = | |
| l, this | |
| .externalWalletConfig = | |
| s, this.privyAppName = | |
| d, this.privyAppLogo = | |
| c, this | |
| .storedConnections = | |
| gs() | |
| } | |
| } | |
| function fs(e, t) { | |
| if (e.length !== t.length) return ! | |
| 1; | |
| for (let r = 0; r < e.length; r++) { | |
| let n = e[r], | |
| i = t[r]; | |
| if (n?.address !== i?.address || | |
| n && i && ql(n) && ql(i) && | |
| n?.chainId !== i?.chainId || | |
| n?.connectorType !== i | |
| ?.connectorType || n | |
| ?.connectedAt !== i | |
| ?.connectedAt || n | |
| ?.walletClientType !== i | |
| ?.walletClientType || n | |
| ?.isConnected !== i | |
| ?.isConnected || n | |
| ?.linked !== i?.linked) | |
| return !1 | |
| } | |
| return !0 | |
| } | |
| const gs = () => { | |
| let e = Ye.get(ee); | |
| return e && Array.isArray(e) && | |
| e.map((e => (e => e && | |
| "string" == | |
| typeof e | |
| .address && | |
| "string" == | |
| typeof e | |
| .connectorType && | |
| "string" == | |
| typeof e | |
| .walletClientType && | |
| "number" == | |
| typeof e | |
| .connectedAt)( | |
| e))).every(Boolean) ? | |
| e : [] | |
| }; | |
| let ys = [Lo, Fo, Do, Go]; | |
| class ws { | |
| async get(e, t) { | |
| try { | |
| return await this | |
| .baseFetch(e, t) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async post(e, t, r) { | |
| try { | |
| return await this | |
| .baseFetch(e, { | |
| method: "POST", | |
| ...t ? { | |
| body: t | |
| } : {}, | |
| ...r | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async delete(e, t) { | |
| try { | |
| return await this | |
| .baseFetch(e, { | |
| method: "DELETE", | |
| ...t | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| constructor({ | |
| appId: e, | |
| appClientId: t, | |
| client: r, | |
| defaults: n | |
| }) { | |
| this.appId = e, this | |
| .appClientId = t, this | |
| .clientAnalyticsId = r | |
| .clientAnalyticsId, this | |
| .sdkVersion = te, this | |
| .client = r, this | |
| .defaults = n, this | |
| .fallbackApiUrl = r | |
| .fallbackApiUrl, this | |
| .baseFetch = mr.create({ | |
| baseURL: this | |
| .defaults | |
| .baseURL, | |
| timeout: this | |
| .defaults | |
| .timeout, | |
| retry: 3, | |
| retryDelay: 500, | |
| retryStatusCodes: [ | |
| 408, | |
| 409, | |
| 425, | |
| 500, | |
| 502, | |
| 503, 504 | |
| ], | |
| credentials: "include", | |
| onRequest: async ({ | |
| request: e, | |
| options: t | |
| }) => { | |
| let r = | |
| new Headers( | |
| t | |
| .headers | |
| ); | |
| r.set("privy-app-id", | |
| this | |
| .appId | |
| ), | |
| this | |
| .appClientId && | |
| r | |
| .set( | |
| "privy-client-id", | |
| this | |
| .appClientId | |
| ), | |
| r | |
| .set( | |
| "privy-ca-id", | |
| this | |
| .clientAnalyticsId || | |
| "" | |
| ), | |
| r | |
| .set( | |
| "privy-client", | |
| `react-auth:${this.sdkVersion}` | |
| ); | |
| let n = | |
| ys | |
| .includes( | |
| e | |
| .toString() | |
| ); | |
| if (!r | |
| .has( | |
| "authorization" | |
| ) | |
| ) { | |
| let e = | |
| await this | |
| .client | |
| .getAccessToken({ | |
| disableAutoRefresh: n | |
| }); | |
| null !== | |
| e && | |
| r | |
| .set( | |
| "authorization", | |
| `Bearer ${e}` | |
| ) | |
| } | |
| t.headers = | |
| r, t | |
| .retryDelay && | |
| (t.retryDelay = | |
| 3 * | |
| t | |
| .retryDelay | |
| ) | |
| }, | |
| onRequestError: ({ | |
| error: e | |
| }) => { | |
| if (e instanceof DOMException && | |
| "AbortError" === | |
| e | |
| .name | |
| ) | |
| throw new S | |
| } | |
| }) | |
| } | |
| } | |
| function vs() { | |
| return !(b && window.location.origin | |
| .startsWith( | |
| "http://localhost")) | |
| } | |
| class Cs { | |
| static parse(e) { | |
| try { | |
| return new Cs(e) | |
| } catch (e) { | |
| return null | |
| } | |
| } | |
| get subject() { | |
| return this._decoded.sub | |
| } | |
| get expiration() { | |
| return this._decoded.exp | |
| } | |
| get issuer() { | |
| return this._decoded.iss | |
| } | |
| get audience() { | |
| return this._decoded.aud | |
| } | |
| isExpired(e = 0) { | |
| return Date.now() >= 1e3 * ( | |
| this.expiration - e) | |
| } | |
| constructor(e) { | |
| this.value = e, this | |
| ._decoded = W.decodeJwt( | |
| e) | |
| } | |
| } | |
| class bs { | |
| get token() { | |
| try { | |
| let e = Ye.get(re); | |
| return "string" == | |
| typeof e ? new Cs(e) | |
| .value : null | |
| } catch (e) { | |
| return console.error(e), | |
| this | |
| .destroyLocalState(), | |
| null | |
| } | |
| } | |
| get refreshToken() { | |
| try { | |
| let e = Ye.get(ne); | |
| return "string" == | |
| typeof e ? e : null | |
| } catch (e) { | |
| return console.error(e), | |
| this | |
| .destroyLocalState(), | |
| null | |
| } | |
| } | |
| get forkedToken() { | |
| try { | |
| let e = Ye.get(ie); | |
| return "string" == | |
| typeof e ? e : null | |
| } catch (e) { | |
| return console.error(e), | |
| this | |
| .destroyLocalState(), | |
| null | |
| } | |
| } | |
| getProviderAccessToken(e) { | |
| try { | |
| let t = Ye.get(ae(e)); | |
| if ("string" != | |
| typeof t) | |
| return null; | |
| { | |
| let r = new Cs(t); | |
| return r | |
| .isExpired() ? (Ye | |
| .del(ae(e)), | |
| null) : r | |
| .value | |
| } | |
| } catch (e) { | |
| return console.error(e), | |
| null | |
| } | |
| } | |
| get mightHaveServerCookies() { | |
| try { | |
| let e = fr.get(oe); | |
| return void 0 !== e && e | |
| .length > 0 | |
| } catch (e) { | |
| console.error(e) | |
| } | |
| return !1 | |
| } | |
| hasRefreshCredentials() { | |
| return this | |
| .mightHaveServerCookies || | |
| "string" == typeof this | |
| .token && "string" == | |
| typeof this | |
| .refreshToken && this | |
| .refreshToken !== le | |
| } | |
| hasRecoveryCredentials() { | |
| return "string" == | |
| typeof this.forkedToken | |
| } | |
| hasActiveToken() { | |
| let e = Cs.parse(this | |
| .token); | |
| return null !== e && !e | |
| .isExpired(30) | |
| } | |
| authenticate(e) { | |
| return this.authenticateOnce | |
| .execute(e) | |
| } | |
| link(e) { | |
| return this.linkOnce | |
| .execute(e) | |
| } | |
| refresh() { | |
| return this.refreshOnce | |
| .execute() | |
| } | |
| forkSession() { | |
| return this.forkSessionOnce | |
| .execute() | |
| } | |
| destroy() { | |
| return this.destroyOnce | |
| .execute() | |
| } | |
| storeProviderAccessToken(e, t) { | |
| "string" == typeof t ? Ye | |
| .put(ae(e), t) : Ye.del( | |
| ae(e)) | |
| } | |
| async _authenticate(e) { | |
| try { | |
| let t = await e | |
| .authenticate(), | |
| { | |
| user: r, | |
| is_new_user: n, | |
| oauth_tokens: i | |
| } = t; | |
| this.handleTokenResponse( | |
| t); | |
| let a = i ? { | |
| provider: i | |
| .provider, | |
| accessToken: i | |
| .access_token, | |
| accessTokenExpiresInSeconds: i | |
| .access_token_expires_in_seconds, | |
| refreshToken: i | |
| .refresh_token, | |
| refreshTokenExpiresInSeconds: i | |
| .refresh_token_expires_in_seconds, | |
| scopes: i.scopes | |
| } : void 0, | |
| o = function(e) { | |
| return e instanceof zo ? | |
| "email" : | |
| e instanceof _l ? | |
| "sms" : | |
| e instanceof kl ? | |
| "siwe" : | |
| e instanceof nl ? | |
| "guest" : | |
| e instanceof Ho ? | |
| "custom_auth" : | |
| e instanceof sl ? | |
| e.meta | |
| .provider : | |
| null | |
| }(e); | |
| return o && this | |
| .client && this | |
| .client | |
| .createAnalyticsEvent({ | |
| eventName: "sdk_authenticate", | |
| payload: { | |
| method: o, | |
| isNewUser: n | |
| } | |
| }), "siwe" === o && | |
| this.client && this | |
| .client | |
| .createAnalyticsEvent({ | |
| eventName: "sdk_authenticate_siwe", | |
| payload: { | |
| connectorType: e | |
| .meta | |
| .connectorType, | |
| walletClientType: e | |
| .meta | |
| .walletClientType | |
| } | |
| }), { | |
| user: Bt(r), | |
| isNewUser: n, | |
| oAuthTokens: a | |
| } | |
| } catch (e) { | |
| throw console.warn( | |
| "Error authenticating session" | |
| ), N(e) | |
| } | |
| } | |
| async _link(e) { | |
| try { | |
| let t = await e.link(), | |
| r = t.oauth_tokens, | |
| n = r ? { | |
| provider: r | |
| .provider, | |
| accessToken: r | |
| .access_token, | |
| accessTokenExpiresInSeconds: r | |
| .access_token_expires_in_seconds, | |
| refreshToken: r | |
| .refresh_token, | |
| refreshTokenExpiresInSeconds: r | |
| .refresh_token_expires_in_seconds, | |
| scopes: r.scopes | |
| } : void 0; | |
| return { | |
| user: Bt(t), | |
| oAuthTokens: n | |
| } | |
| } catch (e) { | |
| throw console.warn( | |
| "Error linking account" | |
| ), N(e) | |
| } | |
| } | |
| async _refresh() { | |
| if (!this.api) throw new $( | |
| "Session has no API instance" | |
| ); | |
| if (!this.client) | |
| throw new $( | |
| "Session has no PrivyClient instance" | |
| ); | |
| await this.client | |
| .getAccessToken({ | |
| disableAutoRefresh: | |
| !0 | |
| }); | |
| let e = this.token, | |
| t = this.refreshToken, | |
| r = this.forkedToken; | |
| if (this.client | |
| .useServerCookies && ! | |
| this | |
| .mightHaveServerCookies && | |
| this.token && window | |
| .location.origin === | |
| this.client.apiUrl) | |
| return this | |
| .destroyLocalState(), | |
| null; | |
| try { | |
| let n; | |
| if (e && t || this | |
| .mightHaveServerCookies | |
| ) { | |
| let i = {}; | |
| e && (i.authorization = | |
| `Bearer ${e}` | |
| ), n = | |
| await this.api | |
| .post(Lo, t ? { | |
| refresh_token: t | |
| } : {}, { | |
| headers: i | |
| }), r && this | |
| .clearForkedToken() | |
| } else { | |
| if (!r) return null; | |
| n = await this.api | |
| .post(Fo, { | |
| refresh_token: r | |
| }), this | |
| .clearForkedToken() | |
| } | |
| return this | |
| .handleTokenResponse( | |
| n), Bt(n.user) | |
| } catch (e) { | |
| if (e instanceof I && e | |
| .privyErrorCode === | |
| A | |
| .MISSING_OR_INVALID_TOKEN | |
| ) return console | |
| .warn( | |
| "Unable to refresh tokens - token is missing or no longer valid" | |
| ), this | |
| .destroyLocalState(), | |
| null; | |
| throw N(e) | |
| } | |
| } | |
| handleTokenResponse(e) { | |
| e.session_update_action ? | |
| "set" === e | |
| .session_update_action ? | |
| (this.storeRefreshToken( | |
| e.refresh_token | |
| ), this | |
| .storeToken(e | |
| .token), e | |
| .identity_token && | |
| this | |
| .storeIdentityToken( | |
| e.identity_token | |
| )) : "clear" === | |
| e | |
| .session_update_action ? | |
| this | |
| .destroyLocalState() : | |
| "ignore" === e | |
| .session_update_action && | |
| e.token && (this | |
| .storeToken(e | |
| .token), e | |
| .identity_token && | |
| this | |
| .storeIdentityToken( | |
| e.identity_token | |
| )) : (this | |
| .storeRefreshToken(e | |
| .refresh_token), | |
| this.storeToken(e | |
| .token), e | |
| .identity_token && | |
| this | |
| .storeIdentityToken( | |
| e.identity_token | |
| )) | |
| } | |
| async _destroy() { | |
| try { | |
| await (this.api?.post( | |
| Do, { | |
| refresh_token: this | |
| .refreshToken | |
| })) | |
| } catch (e) { | |
| console.warn( | |
| "Error destroying session" | |
| ) | |
| } | |
| this.destroyLocalState() | |
| } | |
| async _forkSession() { | |
| if (!this.api) throw new $( | |
| "Session has no API instance" | |
| ); | |
| let e = this.refreshToken; | |
| try { | |
| let t = await this.api | |
| .post( | |
| "/api/v1/sessions/fork", { | |
| refresh_token: e | |
| }); | |
| return this | |
| .storeRefreshToken(t | |
| .refresh_token), | |
| this.storeToken(t | |
| .token), t | |
| .new_session_refresh_token | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| destroyLocalState() { | |
| this.storeRefreshToken( | |
| null), this.storeToken( | |
| null), this | |
| .clearIdentityToken(), | |
| this.clearForkedToken() | |
| } | |
| storeToken(e) { | |
| if ("string" == typeof e) { | |
| let t = Ye.get(re); | |
| if (Ye.put(re, e), !this | |
| .client | |
| ?.useServerCookies | |
| ) { | |
| let t = Cs.parse(e) | |
| ?.expiration; | |
| fr.set(se, e, { | |
| sameSite: "Strict", | |
| secure: vs(), | |
| expires: t ? | |
| new Date( | |
| 1e3 * | |
| t | |
| ) : | |
| void 0 | |
| }) | |
| } | |
| t !== e && this.client | |
| ?.onStoreToken?.(e) | |
| } else Ye.del(re), fr | |
| .remove(se), this.client | |
| ?.onDeleteToken?.() | |
| } | |
| storeRefreshToken(e) { | |
| "string" == typeof e ? (Ye | |
| .put(ne, e), this | |
| .client | |
| ?.useServerCookies || | |
| fr.set(oe, "t", { | |
| sameSite: "Strict", | |
| secure: vs(), | |
| expires: 30 | |
| })) : (Ye.del(ne), | |
| fr.remove(de), fr | |
| .remove(oe)) | |
| } | |
| storeIdentityToken(e) { | |
| if (this.client | |
| ?.useServerCookies) | |
| return; | |
| Ye.put(ce, e); | |
| let t = Cs.parse(e) | |
| ?.expiration; | |
| fr.set(ue, e, { | |
| sameSite: "Strict", | |
| secure: vs(), | |
| expires: t ? | |
| new Date( | |
| 1e3 * t | |
| ) : | |
| void 0 | |
| }) | |
| } | |
| clearIdentityToken() { | |
| Ye.del(ce), fr.remove(ue) | |
| } | |
| clearForkedToken() { | |
| Ye.del(ie) | |
| } | |
| constructor() { | |
| this.authenticateOnce = | |
| new el((async e => this | |
| ._authenticate( | |
| e))), this | |
| .linkOnce = new el(( | |
| async e => this | |
| ._link(e))), | |
| this.refreshOnce = | |
| new el(this._refresh | |
| .bind(this)), this | |
| .destroyOnce = new el( | |
| this._destroy.bind( | |
| this)), this | |
| .forkSessionOnce = | |
| new el(this._forkSession | |
| .bind(this)) | |
| } | |
| } | |
| let Es; | |
| var $s = 0, | |
| xs = "__private_" + $s++ + | |
| "__getOrGenerateClientAnalyticsId"; | |
| class As { | |
| initializeConnectorManager({ | |
| walletConnectCloudProjectId: e, | |
| rpcConfig: t, | |
| chains: r, | |
| defaultChain: n, | |
| store: i, | |
| walletList: a, | |
| shouldEnforceDefaultChainOnConnect: o, | |
| externalWalletConfig: l, | |
| appName: s | |
| }) { | |
| this.connectors || (this | |
| .connectors = | |
| new ms(this.appId, | |
| e, t, r, n, i, | |
| a, o, l, s)) | |
| } | |
| sessionHasActiveToken() { | |
| return this.session | |
| .hasActiveToken() | |
| } | |
| generateApi() { | |
| let e = new ws({ | |
| appId: this | |
| .appId, | |
| appClientId: this | |
| .appClientId, | |
| client: this, | |
| defaults: { | |
| baseURL: this | |
| .apiUrl, | |
| timeout: this | |
| .timeout | |
| } | |
| }); | |
| return this.session.api = e, | |
| e | |
| } | |
| updateApiUrl(e) { | |
| this.apiUrl = e || this | |
| .fallbackApiUrl, this | |
| .api = this | |
| .generateApi(), e && ( | |
| this | |
| .useServerCookies = ! | |
| 0) | |
| } | |
| authenticate() { | |
| if (!this.authFlow) | |
| throw new $( | |
| "No auth flow in progress." | |
| ); | |
| return this.session | |
| .authenticate(this | |
| .authFlow) | |
| } | |
| async link() { | |
| if (!this.authFlow) | |
| throw new $( | |
| "No auth flow in progress." | |
| ); | |
| let { | |
| oAuthTokens: e | |
| } = await this.session.link( | |
| this.authFlow); | |
| return { | |
| user: await this | |
| .getAuthenticatedUser(), | |
| oAuthTokens: e | |
| } | |
| } | |
| storeProviderAccessToken(e, t) { | |
| this.session | |
| .storeProviderAccessToken( | |
| e, t) | |
| } | |
| getProviderAccessToken(e) { | |
| return this.session | |
| .getProviderAccessToken( | |
| e) | |
| } | |
| async logout() { | |
| await this.session | |
| .destroy(), this.authFlow = | |
| void 0 | |
| } | |
| clearProviderAcccessTokens(e) { | |
| e.linkedAccounts.filter(( | |
| e => | |
| "cross_app" === | |
| e.type)).forEach(( | |
| e => { | |
| this.storeProviderAccessToken( | |
| e | |
| .providerApp | |
| .id, | |
| null | |
| ) | |
| })) | |
| } | |
| startAuthFlow(e) { | |
| return e.api = this.api, | |
| this.authFlow = e, this | |
| .authFlow | |
| } | |
| async initMfaSmsVerification() { | |
| try { | |
| await this.api.post( | |
| "/api/v1/mfa/passwordless_sms/init", { | |
| action: "verify" | |
| }) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async initMfaPasskeyVerification() { | |
| try { | |
| return (e => ({ | |
| challenge: e | |
| .challenge, | |
| allowCredentials: e | |
| .allow_credentials | |
| ?.map( | |
| (e => | |
| ({ | |
| id: e | |
| .id, | |
| type: e | |
| .type, | |
| transports: e | |
| .transports | |
| }) | |
| ) | |
| ) || | |
| [], | |
| timeout: e | |
| .timeout, | |
| extensions: { | |
| appid: e | |
| .extensions | |
| ?.app_id, | |
| credProps: e | |
| .extensions | |
| ?.cred_props, | |
| hmacCreateSecret: e | |
| .extensions | |
| ?.hmac_create_secret | |
| }, | |
| userVerification: e | |
| .user_verification | |
| }))((await this.api | |
| .post( | |
| "/api/v1/mfa/passkeys/init", {} | |
| )) | |
| .options) | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async acceptTerms() { | |
| try { | |
| let e = await this.api | |
| .post( | |
| "/api/v1/users/me/accept_terms", {} | |
| ); | |
| return Bt(e) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async unlinkEmail(e) { | |
| try { | |
| let t = await this.api | |
| .post( | |
| "/api/v1/passwordless/unlink", { | |
| address: e | |
| }); | |
| return await this | |
| .getAuthenticatedUser() ?? | |
| Bt(t) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async unlinkPhone(e) { | |
| try { | |
| let t = await this.api | |
| .post( | |
| "/api/v1/passwordless_sms/unlink", { | |
| phoneNumber: e | |
| }); | |
| return await this | |
| .getAuthenticatedUser() ?? | |
| Bt(t) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async unlinkEthereumWallet(e) { | |
| try { | |
| let t = await this.api | |
| .post( | |
| "/api/v1/siwe/unlink", { | |
| address: e | |
| }); | |
| return await this | |
| .getAuthenticatedUser() ?? | |
| Bt(t) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async unlinkSolanaWallet(e) { | |
| try { | |
| let t = await this.api | |
| .post( | |
| "/api/v1/siws/unlink", { | |
| address: e | |
| }); | |
| return await this | |
| .getAuthenticatedUser() ?? | |
| Bt(t) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async unlinkOAuth(e, t) { | |
| try { | |
| let r = await this.api | |
| .post( | |
| "/api/v1/oauth/unlink", { | |
| provider: e, | |
| subject: t | |
| }); | |
| return await this | |
| .getAuthenticatedUser() ?? | |
| Bt(r) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async unlinkFarcaster(e) { | |
| try { | |
| let t = await this.api | |
| .post( | |
| "/api/v1/farcaster/unlink", { | |
| fid: e | |
| }); | |
| return await this | |
| .getAuthenticatedUser() ?? | |
| Bt(t) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async unlinkTelegram(e) { | |
| try { | |
| let t = await this.api | |
| .post( | |
| "/api/v1/telegram/unlink", { | |
| telegram_user_id: e | |
| }); | |
| return await this | |
| .getAuthenticatedUser() ?? | |
| Bt(t) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async unlinkPasskey(e) { | |
| try { | |
| let t = await this.api | |
| .post( | |
| "/api/v1/passkeys/unlink", { | |
| credential_id: e | |
| }); | |
| return await this | |
| .getAuthenticatedUser() ?? | |
| Bt(t) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async createAnalyticsEvent({ | |
| eventName: e, | |
| payload: t, | |
| timestamp: r, | |
| options: n | |
| }) { | |
| if ("undefined" != | |
| typeof window) try { | |
| this.clientAnalyticsId || | |
| console.warn( | |
| "No client analytics id set, refusing to send analytics event" | |
| ), | |
| await this.api | |
| .post(Go, { | |
| event_name: e, | |
| client_id: this | |
| .clientAnalyticsId, | |
| payload: { | |
| ... | |
| t || | |
| {}, | |
| clientTimestamp: r ? | |
| r | |
| .toISOString() : | |
| ( | |
| new Date) | |
| .toISOString() | |
| } | |
| }, { | |
| retry: -1, | |
| keepalive: n | |
| ?.keepAlive ?? | |
| !1 | |
| }) | |
| } catch (e) {} | |
| } | |
| async signMoonpayOnRampUrl(e) { | |
| try { | |
| return this.api.post( | |
| "/api/v1/plugins/moonpay_on_ramp/sign", | |
| e) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async initCoinbaseOnRamp(e) { | |
| try { | |
| return this.api.post( | |
| "/api/v1/funding/coinbase_on_ramp/init", | |
| e) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async getCoinbaseOnRampStatus({ | |
| partnerUserId: e | |
| }) { | |
| try { | |
| return this.api.get( | |
| `/api/v1/funding/coinbase_on_ramp/status?partnerUserId=${e}` | |
| ) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async getAuthenticatedUser() { | |
| return this.session | |
| .hasRefreshCredentials() || | |
| this.session | |
| .hasRecoveryCredentials() ? | |
| this.session.refresh() : | |
| null | |
| } | |
| async getAccessToken(e) { | |
| return this.session | |
| .hasActiveToken() ? this | |
| .session | |
| .hasRefreshCredentials() ? | |
| Cs.parse(this.session | |
| .token) | |
| ?.audience !== this | |
| .appId ? (await this | |
| .logout(), null) : | |
| this.session.token : ( | |
| this.session | |
| .destroyLocalState(), | |
| null) : !e | |
| ?.disableAutoRefresh && | |
| this.session | |
| .hasRefreshCredentials() ? | |
| (await this.session | |
| .refresh(), this | |
| .session.token) : | |
| null | |
| } | |
| async getSmartWalletsConfig() { | |
| try { | |
| let e = {}, | |
| t = this.session | |
| .token; | |
| t && (e.authorization = | |
| `Bearer ${t}`); | |
| let r = await this.api | |
| .get( | |
| `/api/v1/apps/${this.appId}/smart_wallets`, { | |
| baseURL: this | |
| .fallbackApiUrl, | |
| headers: e | |
| }); | |
| return r.enabled ? { | |
| enabled: r | |
| .enabled, | |
| smartWalletType: r | |
| .smart_wallet_type, | |
| configuredNetworks: r | |
| .configured_networks | |
| .map((e => ({ | |
| chainId: e | |
| .chain_id, | |
| bundlerUrl: e | |
| .bundler_url, | |
| paymasterUrl: e | |
| .paymaster_url | |
| }))) | |
| } : { | |
| enabled: r | |
| .enabled | |
| } | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async getServerConfig() { | |
| try { | |
| let e = {}, | |
| t = this.session | |
| .token; | |
| t && (e.authorization = | |
| `Bearer ${t}`); | |
| let r = await this.api | |
| .get( | |
| `/api/v1/apps/${this.appId}`, { | |
| baseURL: this | |
| .fallbackApiUrl, | |
| headers: e | |
| }), | |
| n = r | |
| .telegram_auth_config ? | |
| { | |
| botId: r | |
| .telegram_auth_config | |
| .bot_id, | |
| botName: r | |
| .telegram_auth_config | |
| .bot_name, | |
| linkEnabled: r | |
| .telegram_auth_config | |
| .link_enabled, | |
| seamlessAuthEnabled: r | |
| .telegram_auth_config | |
| .seamless_auth_enabled | |
| } : void 0, | |
| i = r | |
| .funding_config ? { | |
| methods: r | |
| .funding_config | |
| .methods, | |
| defaultRecommendedAmount: r | |
| .funding_config | |
| .default_recommended_amount, | |
| defaultRecommendedCurrency: r | |
| .funding_config | |
| .default_recommended_currency, | |
| promptFundingOnWalletCreation: r | |
| .funding_config | |
| .prompt_funding_on_wallet_creation | |
| } : void 0; | |
| return { | |
| id: r.id, | |
| name: r.name, | |
| verificationKey: r | |
| .verification_key, | |
| logoUrl: r | |
| .logo_url || | |
| void 0, | |
| accentColor: r | |
| .accent_color || | |
| void 0, | |
| showWalletLoginFirst: r | |
| .show_wallet_login_first, | |
| allowlistConfig: { | |
| errorTitle: r | |
| .allowlist_config | |
| .error_title, | |
| errorDetail: r | |
| .allowlist_config | |
| .error_detail, | |
| errorCtaText: r | |
| .allowlist_config | |
| .cta_text, | |
| errorCtaLink: r | |
| .allowlist_config | |
| .cta_link | |
| }, | |
| walletAuth: r | |
| .wallet_auth, | |
| emailAuth: r | |
| .email_auth, | |
| smsAuth: r.sms_auth, | |
| googleOAuth: r | |
| .google_oauth, | |
| twitterOAuth: r | |
| .twitter_oauth, | |
| discordOAuth: r | |
| .discord_oauth, | |
| githubOAuth: r | |
| .github_oauth, | |
| spotifyOAuth: r | |
| .spotify_oauth, | |
| instagramOAuth: r | |
| .instagram_oauth, | |
| tiktokOAuth: r | |
| .tiktok_oauth, | |
| linkedinOAuth: r | |
| .linkedin_oauth, | |
| appleOAuth: r | |
| .apple_oauth, | |
| farcasterAuth: r | |
| .farcaster_auth, | |
| passkeyAuth: r | |
| .passkey_auth, | |
| telegramAuth: r | |
| .telegram_auth, | |
| termsAndConditionsUrl: r | |
| .terms_and_conditions_url, | |
| embeddedWalletConfig: { | |
| createOnLogin: r | |
| .embedded_wallet_config | |
| ?.create_on_login, | |
| userOwnedRecoveryOptions: r | |
| .embedded_wallet_config | |
| .user_owned_recovery_options, | |
| requireUserOwnedRecoveryOnCreate: r | |
| .embedded_wallet_config | |
| .require_user_owned_recovery_on_create | |
| }, | |
| privacyPolicyUrl: r | |
| .privacy_policy_url, | |
| requireUsersAcceptTerms: r | |
| .require_users_accept_terms, | |
| customApiUrl: r | |
| .custom_api_url, | |
| walletConnectCloudProjectId: r | |
| .wallet_connect_cloud_project_id, | |
| fiatOnRampEnabled: r | |
| .fiat_on_ramp_enabled, | |
| captchaEnabled: r | |
| .captcha_enabled, | |
| captchaSiteKey: r | |
| .captcha_site_key, | |
| createdAt: new Date( | |
| 1e3 * r | |
| .created_at | |
| ), | |
| updatedAt: new Date( | |
| 1e3 * r | |
| .updated_at | |
| ), | |
| mfaMethods: r | |
| .mfa_methods, | |
| enforceWalletUis: r | |
| .enforce_wallet_uis, | |
| legacyWalletUiConfig: r | |
| .legacy_wallet_ui_config, | |
| telegramAuthConfiguration: n, | |
| fundingConfig: i | |
| } | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async getUsdTokenPrice(e) { | |
| try { | |
| return (await this.api | |
| .get( | |
| `/api/v1/token_price?chainId=${e.id}&tokenSymbol=${e.nativeCurrency.symbol}` | |
| )).usd | |
| } catch (t) { | |
| return void console | |
| .error( | |
| `Unable to fetch token price for chain with id ${e.id}` | |
| ) | |
| } | |
| } | |
| async getUsdPriceForSol() { | |
| try { | |
| return (await this.api | |
| .get( | |
| "/api/v1/token_price?chainId=0&tokenSymbol=SOL" | |
| )).usd | |
| } catch (e) { | |
| return void console | |
| .error( | |
| "Unable to fetch token price for SOL" | |
| ) | |
| } | |
| } | |
| async requestFarcasterSignerStatus( | |
| e) { | |
| try { | |
| return await this.api | |
| .post( | |
| "/api/v1/farcaster/signer/status", { | |
| ed25519_public_key: e | |
| }) | |
| } catch (e) { | |
| throw console.error( | |
| "Unable to fetch Farcaster signer status" | |
| ), e | |
| } | |
| } | |
| async forkSession() { | |
| return await this.session | |
| .forkSession() | |
| } | |
| async generateSiweNonce({ | |
| address: e, | |
| captchaToken: t | |
| }) { | |
| try { | |
| return (await this.api | |
| .post( | |
| "/api/v1/siwe/init", { | |
| address: e, | |
| token: t | |
| })).nonce | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async authenticateWithSiweInternal({ | |
| message: e, | |
| signature: t, | |
| chainId: r, | |
| walletClientType: n, | |
| connectorType: i, | |
| mode: a | |
| }) { | |
| return await this.api.post( | |
| "/api/v1/siwe/authenticate", { | |
| message: e, | |
| signature: t, | |
| chainId: r, | |
| walletClientType: n, | |
| connectorType: i, | |
| mode: a | |
| }) | |
| } | |
| async linkWithSiweInternal({ | |
| message: e, | |
| signature: t, | |
| chainId: r, | |
| walletClientType: n, | |
| connectorType: i | |
| }) { | |
| return await this.api.post( | |
| "/api/v1/siwe/link", { | |
| message: e, | |
| signature: t, | |
| chainId: r, | |
| walletClientType: n, | |
| connectorType: i | |
| }) | |
| } | |
| async linkSmartWallet({ | |
| message: e, | |
| signature: t, | |
| smartWalletType: r | |
| }) { | |
| try { | |
| let n = await this.api | |
| .post( | |
| "/api/v1/siwe/link_smart_wallet", { | |
| message: e, | |
| signature: t, | |
| smart_wallet_type: r | |
| }); | |
| return Bt(n) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async linkWithSiwe({ | |
| message: e, | |
| signature: t, | |
| chainId: r, | |
| walletClientType: n, | |
| connectorType: i | |
| }) { | |
| try { | |
| let a = await this | |
| .linkWithSiweInternal({ | |
| message: e, | |
| signature: t, | |
| chainId: r, | |
| walletClientType: n, | |
| connectorType: i | |
| }); | |
| return Bt(a) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async generateSiwsNonce({ | |
| address: e, | |
| captchaToken: t | |
| }) { | |
| try { | |
| return (await this.api | |
| .post( | |
| "/api/v1/siws/init", { | |
| address: e, | |
| token: t | |
| })).nonce | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async authenticateWithSiwsInternal({ | |
| message: e, | |
| signature: t, | |
| walletClientType: r, | |
| connectorType: n, | |
| mode: i | |
| }) { | |
| return await this.api.post( | |
| "/api/v1/siws/authenticate", { | |
| message: e, | |
| signature: t, | |
| walletClientType: r, | |
| connectorType: n, | |
| mode: i | |
| }) | |
| } | |
| async sendAccountTransferRequest({ | |
| nonce: e, | |
| account: t, | |
| accountType: r, | |
| externalWalletMetadata: n, | |
| telegramAuthResult: i, | |
| farcasterEmbeddedAddress: a, | |
| oAuthUserInfo: o | |
| }) { | |
| try { | |
| let l, s; | |
| switch (r) { | |
| case "email": | |
| l = "/api/v1/passwordless/transfer", | |
| s = { | |
| nonce: e, | |
| email: t | |
| }; | |
| break; | |
| case "sms": | |
| l = "/api/v1/passwordless_sms/transfer", | |
| s = { | |
| nonce: e, | |
| phoneNumber: t | |
| }; | |
| break; | |
| case "siwe": | |
| if (l = | |
| "/api/v1/siwe/transfer", | |
| !n) throw Error( | |
| "Wallet parameters must be defined" | |
| ); | |
| s = { | |
| nonce: e, | |
| address: t, | |
| ...n | |
| }; | |
| break; | |
| case "farcaster": | |
| l = "/api/v1/farcaster/transfer", | |
| s = { | |
| nonce: e, | |
| farcaster_id: t, | |
| farcaster_embedded_address: a | |
| }; | |
| break; | |
| case "telegram": | |
| l = "/api/v1/telegram/transfer", | |
| s = { | |
| nonce: e, | |
| telegram_auth_result: i | |
| }; | |
| break; | |
| case "custom": | |
| case "guest": | |
| case "passkey": | |
| throw Error( | |
| "Invalid transfer account type" | |
| ); | |
| default: | |
| l = "/api/v1/oauth/transfer", | |
| s = { | |
| nonce: e, | |
| userInfo: o | |
| } | |
| } | |
| let d = await this.api | |
| .post(l, s); | |
| return await this | |
| .getAuthenticatedUser() ?? | |
| Bt(d) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| async linkWithSiwsInternal({ | |
| message: e, | |
| signature: t, | |
| walletClientType: r, | |
| connectorType: n | |
| }) { | |
| return await this.api.post( | |
| "/api/v1/siws/link", { | |
| message: e, | |
| signature: t, | |
| walletClientType: r, | |
| connectorType: n | |
| }) | |
| } | |
| async linkWithSiws({ | |
| message: e, | |
| signature: t, | |
| walletClientType: r, | |
| connectorType: n | |
| }) { | |
| try { | |
| let i = await this | |
| .linkWithSiwsInternal({ | |
| message: e, | |
| signature: t, | |
| walletClientType: r, | |
| connectorType: n | |
| }); | |
| return Bt(i) | |
| } catch (e) { | |
| throw N(e) | |
| } | |
| } | |
| constructor(e) { | |
| Object.defineProperty(this, | |
| xs, { | |
| value: ks | |
| }), this.apiUrl = e | |
| .apiUrl || he, this | |
| .fallbackApiUrl = this | |
| .apiUrl, this | |
| .useServerCookies = !!e | |
| .apiUrl && e.apiUrl | |
| .startsWith( | |
| "https://privy."), | |
| this.timeout = e | |
| .timeout || pe, this | |
| .appId = e.appId, this | |
| .appClientId = e | |
| .appClientId, this | |
| .clientAnalyticsId = | |
| function(e, t) { | |
| if (!Object | |
| .prototype | |
| .hasOwnProperty | |
| .call(e, t)) | |
| throw TypeError( | |
| "attempted to use private field on non-instance" | |
| ); | |
| return e | |
| }(this, xs)[xs](), Es || | |
| (Es = new bs), this | |
| .session = Es, this | |
| .api = this | |
| .generateApi(), this | |
| .session.client = this | |
| } | |
| } | |
| function ks() { | |
| if ("undefined" == typeof window) | |
| return null; | |
| try { | |
| let e = Ye.get(me); | |
| if ("string" == typeof e && e | |
| .length > 0) return e | |
| } catch (e) {} | |
| let e = Wt(); | |
| try { | |
| return Ye.put(me, e), e | |
| } catch (t) { | |
| return e | |
| } | |
| } | |
| const Ts = e => { | |
| let { | |
| enabled: r, | |
| siteKey: n, | |
| appId: i, | |
| setError: a, | |
| setToken: o, | |
| setExecuting: l, | |
| ref: s | |
| } = Ol(), [, c] = d((() => n | |
| ?.split("t:") || [] | |
| ), [n]); | |
| if (p((() => s.current?.remove), | |
| []), !r) return null; | |
| if (!c) throw Error( | |
| "Unsupported captcha site key" | |
| ); | |
| return t("div", { | |
| className: "hidden h-0 w-0", | |
| children: t(gr, { | |
| ...e, | |
| ref: s, | |
| siteKey: c, | |
| options: { | |
| action: i, | |
| size: "invisible", | |
| ...e | |
| .delayedExecution ? | |
| { | |
| appearance: "execute", | |
| execution: "execute" | |
| } : | |
| { | |
| appearance: "always", | |
| execution: "render" | |
| } | |
| }, | |
| onUnsupported: () => { | |
| e.onUnsupported | |
| ?. | |
| (), | |
| console | |
| .warn( | |
| "Browser does not support Turnstile." | |
| ) | |
| }, | |
| onError: () => { | |
| e.onError | |
| ?. | |
| (), | |
| a( | |
| "Captcha failed"), | |
| l(! | |
| 1) | |
| }, | |
| onSuccess: t => { | |
| e.onSuccess | |
| ?. | |
| ( | |
| t), | |
| o( | |
| t), | |
| l(! | |
| 1) | |
| }, | |
| onExpire: () => { | |
| e.onExpire | |
| ?. | |
| (); | |
| try { | |
| s.current | |
| ?.reset(), | |
| a( | |
| void 0), | |
| o( | |
| void 0) | |
| } catch ( | |
| e | |
| ) { | |
| a("expired_and_failed_reset") | |
| } | |
| } | |
| }) | |
| }) | |
| }; | |
| function _s(e) { | |
| ot("configureMfa", e) | |
| } | |
| const Ss = ({ | |
| success: n, | |
| fail: i | |
| }) => e(r, { | |
| children: [t(Ns, { | |
| className: n ? | |
| "success" : | |
| i ? | |
| "fail" : | |
| "" | |
| }), t(Is, { | |
| className: n ? | |
| "success" : | |
| i ? | |
| "fail" : | |
| "" | |
| })] | |
| }), | |
| Ns = yr.span` | |
| && { | |
| width: 82px; | |
| height: 82px; | |
| border-width: 4px; | |
| border-style: solid; | |
| border-color: ${e=>e.color??"var(--privy-color-accent)"}; | |
| border-bottom-color: transparent; | |
| border-radius: 50%; | |
| display: inline-block; | |
| box-sizing: border-box; | |
| animation: rotation 1.2s linear infinite; | |
| transition: border-color 800ms; | |
| } | |
| @keyframes rotation { | |
| 0% { | |
| transform: rotate(0deg); | |
| } | |
| 100% { | |
| transform: rotate(360deg); | |
| } | |
| } | |
| &&&.success { | |
| border-color: var(--privy-color-success); | |
| border-bottom-color: var(--privy-color-success); | |
| } | |
| &&&.fail { | |
| border-color: var(--privy-color-error); | |
| border-bottom-color: var(--privy-color-error); | |
| } | |
| `, | |
| Is = yr(Ns)` | |
| && { | |
| border-bottom-color: ${e=>e.color??"var(--privy-color-accent)"}; | |
| animation: none; | |
| opacity: 0.5; | |
| } | |
| `, | |
| Ps = e => t(Os, { | |
| color: e.color || | |
| "var(--privy-color-foreground-3)" | |
| }); | |
| let Os = yr(Ns)` | |
| && { | |
| height: 1rem; | |
| width: 1rem; | |
| margin: 2px 0; | |
| border-width: 1.5px; | |
| /* Override default Loader to match button transitions */ | |
| transition: border-color 200ms ease; | |
| } | |
| `; | |
| const Rs = yr.button` | |
| display: flex; | |
| flex-direction: row; | |
| align-items: center; | |
| justify-content: center; | |
| user-select: none; | |
| & { | |
| width: 100%; | |
| cursor: pointer; | |
| border-radius: var(--privy-border-radius-md); | |
| font-size: 1rem; | |
| font-style: normal; | |
| font-weight: 500; | |
| line-height: 22px; /* 137.5% */ | |
| letter-spacing: -0.016px; | |
| } | |
| && { | |
| padding: 12px 16px; | |
| } | |
| `, | |
| Ms = ({ | |
| children: r, | |
| loading: n, | |
| disabled: i, | |
| success: a, | |
| loadingText: o = | |
| "Loading...", | |
| ...l | |
| }) => t(Us, { | |
| disabled: n || i, | |
| success: a, | |
| ...l, | |
| children: n ? e("span", { | |
| children: [t( | |
| Ps, {}), | |
| o ? t( | |
| "span", { | |
| children: o | |
| }) : | |
| null | |
| ] | |
| }) : r | |
| }), | |
| Ls = ({ | |
| children: e, | |
| loading: r, | |
| disabled: n, | |
| ...i | |
| }) => t(Ds, { | |
| disabled: n, | |
| ...i, | |
| children: r ? t(Ps, { | |
| color: "var(--privy-color-foreground-accent)" | |
| }) : e | |
| }); | |
| let Ds = yr(Rs)` | |
| position: relative; | |
| && { | |
| background-color: var(--privy-color-accent); | |
| color: var(--privy-color-foreground-accent); | |
| transition: background-color 200ms ease; | |
| } | |
| &:hover { | |
| background-color: var(--privy-color-accent-dark); | |
| } | |
| &:active { | |
| background-color: var(--privy-color-accent-dark); | |
| } | |
| &:disabled, | |
| &:hover:disabled, | |
| &:active:disabled { | |
| cursor: not-allowed; | |
| pointer-events: none; | |
| color: var(--privy-color-foreground-accent); | |
| background-color: var(--privy-color-accent-dark); | |
| } | |
| `; | |
| const Fs = ({ | |
| children: r, | |
| loading: n, | |
| disabled: i, | |
| loadingText: a = | |
| "Loading...", | |
| ...o | |
| }) => t(Us, { | |
| as: "a", | |
| disabled: n || i, | |
| ...o, | |
| children: n ? e("span", { | |
| children: [t( | |
| Ps, {}), | |
| a ? t( | |
| "span", { | |
| children: a | |
| }) : | |
| null | |
| ] | |
| }) : r | |
| }); | |
| let Us = yr(Rs)` | |
| position: relative; | |
| && { | |
| background-color: ${e=>e.warn?"var(--privy-color-error)":e.success?"var(--privy-color-success)":"var(--privy-color-accent)"}; | |
| color: var(--privy-color-foreground-accent); | |
| transition: background-color 200ms ease; | |
| } | |
| &:hover { | |
| background-color: ${e=>e.warn?"var(--privy-color-error)":e.success?"var(--privy-color-success)":"var(--privy-color-accent-dark)"}; | |
| } | |
| &:active { | |
| background-color: ${e=>e.warn?"var(--privy-color-error)":e.success?"var(--privy-color-success)":"var(--privy-color-accent-dark)"}; | |
| } | |
| &:hover:disabled, | |
| &:active:disabled { | |
| background-color: var(--privy-color-background-2); | |
| color: var(--privy-color-foreground-3); | |
| cursor: not-allowed; | |
| } | |
| /* If an anchor tag, :disabled isn't a thing, so manually set state */ | |
| ${e=>e.disabled?wr` | |
| &&&, | |
| &&&:hover, | |
| &&&:active { | |
| background-color: var(--privy-color-background-2); | |
| color: var(--privy-color-foreground-3); | |
| cursor: not-allowed; | |
| pointer-events: none; | |
| } | |
| `:""} | |
| > span { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| opacity: 1; | |
| animation: fadein 200ms ease; | |
| } | |
| `; | |
| const Ws = ({ | |
| children: r, | |
| loading: n, | |
| disabled: i, | |
| loadingText: a = | |
| "Loading...", | |
| ...o | |
| }) => t(Bs, { | |
| disabled: n || i, | |
| ...o, | |
| children: n ? e("span", { | |
| children: [t( | |
| Ps, {}), | |
| a ? t( | |
| "span", { | |
| children: a | |
| }) : | |
| null | |
| ] | |
| }) : r | |
| }); | |
| let Bs = yr(Rs)` | |
| && { | |
| border-width: 1px; | |
| border-color: ${e=>e.warn?"var(--privy-color-error)":"var(--privy-color-foreground-4)"}; | |
| color: var(--privy-color-foreground); | |
| transition: border-color 200ms ease; | |
| } | |
| &:hover, | |
| &:active { | |
| border-color: ${e=>e.warn?"var(--privy-color-error)":"var(--privy-color-foreground-3)"}; | |
| } | |
| &:hover:disabled, | |
| &:active:disabled { | |
| border-color: var(--privy-color-foreground-accent); | |
| color: var(--privy-color-foreground-3); | |
| cursor: not-allowed; | |
| } | |
| > span { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| opacity: 1; | |
| animation: fadein 200ms ease; | |
| } | |
| `; | |
| const Gs = yr.button` | |
| && { | |
| padding: 12px 16px; | |
| font-weight: 500; | |
| text-align: center; | |
| color: var(--privy-color-foreground-accent); | |
| background-color: var(--privy-color-accent); | |
| border-radius: var(--privy-border-radius-sm); | |
| min-width: 144px; | |
| opacity: ${e=>e.invisible?"0":"1"}; | |
| transition: opacity 200ms ease, background-color 200ms ease, color 200ms ease; | |
| user-select: none; | |
| ${e=>e.invisible&&wr` | |
| pointer-events: none; | |
| `} | |
| &:hover { | |
| background-color: var(--privy-color-accent-dark); | |
| } | |
| &:active { | |
| background-color: var(--privy-color-accent-dark); | |
| } | |
| &:hover:disabled, | |
| &:active:disabled { | |
| background-color: var(--privy-color-background-2); | |
| color: var(--privy-color-foreground-3); | |
| cursor: not-allowed; | |
| } | |
| } | |
| `; | |
| yr.div` | |
| /* Set to match height of SoftCtaButton to avoid reflow if conditionally rendered */ | |
| height: 44px; | |
| `; | |
| const Hs = ({ | |
| children: r, | |
| onClick: n, | |
| disabled: i, | |
| isSubmitting: a, | |
| ...o | |
| }) => e(zs, { | |
| isSubmitting: a, | |
| onClick: n, | |
| disabled: i, | |
| ...o, | |
| children: [t("span", { | |
| children: r | |
| }), t("span", { | |
| children: t( | |
| Ps, {} | |
| ) | |
| })] | |
| }); | |
| let zs = yr.button` | |
| && { | |
| color: var(--privy-color-accent); | |
| font-size: 16px; | |
| font-style: normal; | |
| font-weight: 500; | |
| line-height: 24px; | |
| cursor: pointer; | |
| border-radius: 0px var(--privy-border-radius-mdlg) var(--privy-border-radius-mdlg) 0px; | |
| border: none; | |
| transition: color 200ms ease; | |
| /* Tablet and Up */ | |
| @media (min-width: 441px) { | |
| font-size: 14px; | |
| } | |
| :hover { | |
| color: var(--privy-color-accent-dark); | |
| } | |
| && > :first-child { | |
| opacity: ${e=>e.isSubmitting?0:1}; | |
| } | |
| && > :last-child { | |
| position: absolute; | |
| display: flex; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate3d(-50%, -50%, 0); | |
| /** Will map to the opposite of first span */ | |
| opacity: ${e=>e.isSubmitting?1:0}; | |
| } | |
| :disabled, | |
| :hover:disabled { | |
| color: var(--privy-color-foreground-3); | |
| cursor: not-allowed; | |
| } | |
| } | |
| `; | |
| const js = yr.span` | |
| && { | |
| width: 82px; | |
| height: 82px; | |
| border-width: 4px; | |
| border-style: solid; | |
| border-color: ${e=>e.color??"var(--privy-color-accent)"}; | |
| background-color: ${e=>e.color??"var(--privy-color-accent)"}; | |
| border-radius: 50%; | |
| display: inline-block; | |
| box-sizing: border-box; | |
| } | |
| `, | |
| qs = ({ | |
| backFn: e | |
| }) => t("div", { | |
| children: t(Xs, { | |
| onClick: e, | |
| children: t( | |
| Er, { | |
| height: "16px", | |
| width: "16px", | |
| strokeWidth: 2 | |
| }) | |
| }) | |
| }), | |
| Vs = ({ | |
| nextFn: e | |
| }) => t("div", { | |
| children: t(Xs, { | |
| onClick: e, | |
| children: t( | |
| $r, { | |
| height: "16px", | |
| width: "16px", | |
| strokeWidth: 2 | |
| }) | |
| }) | |
| }), | |
| Ks = ({ | |
| infoFn: e | |
| }) => t("div", { | |
| children: t(Qs, { | |
| "aria-label": "info", | |
| onClick: e, | |
| children: t( | |
| br, { | |
| height: "22px", | |
| width: "22px", | |
| strokeWidth: 2 | |
| }) | |
| }) | |
| }), | |
| Ys = e => t("div", { | |
| children: t(Xs, { | |
| "aria-label": "close modal", | |
| onClick: e | |
| .onClose, | |
| children: t( | |
| xr, { | |
| height: "16px", | |
| width: "16px", | |
| strokeWidth: 2 | |
| }) | |
| }) | |
| }), | |
| Zs = ({ | |
| backFn: r, | |
| infoFn: n, | |
| onClose: i, | |
| title: a, | |
| closeable: o = !0 | |
| }) => { | |
| let { | |
| closePrivyModal: l | |
| } = P(), s = fe(); | |
| return e(Js, { | |
| children: [e(ed, { | |
| children: [ | |
| r && | |
| t(qs, { | |
| backFn: r | |
| }), | |
| n && | |
| t(Ks, { | |
| infoFn: n | |
| }) | |
| ] | |
| }), a && t( | |
| rd, { | |
| id: "privy-dialog-title", | |
| children: a | |
| }), t( | |
| td, { | |
| children: | |
| ! | |
| s | |
| .render | |
| .standalone && | |
| o && | |
| t(Ys, { | |
| onClose: i || | |
| (() => | |
| l() | |
| ) | |
| }) | |
| })] | |
| }) | |
| }; | |
| let Xs = yr.button` | |
| && { | |
| cursor: pointer; | |
| display: flex; | |
| opacity: 0.6; | |
| background-color: var(--privy-color-background-2); | |
| border-radius: var(--privy-border-radius-full); | |
| padding: 4px; | |
| > svg { | |
| margin: auto; | |
| color: var(--privy-color-foreground); | |
| } | |
| :hover { | |
| opacity: 1; | |
| } | |
| } | |
| `, | |
| Qs = yr(Xs)` | |
| && { | |
| background-color: transparent; | |
| } | |
| `, | |
| Js = yr.div` | |
| padding: 16px 0; | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| h2 { | |
| font-size: 16px; | |
| line-height: 24px; | |
| font-weight: 600; | |
| color: var(--privy-color-foreground); | |
| } | |
| `, | |
| ed = yr.div` | |
| flex: 1; | |
| align-items: center; | |
| display: flex; | |
| gap: 8px; | |
| `, | |
| td = yr.div` | |
| flex: 1; | |
| display: flex; | |
| justify-content: flex-end; | |
| `, | |
| rd = yr.div` | |
| overflow: hidden; | |
| white-space: nowrap; | |
| max-width: 100%; | |
| text-overflow: ellipsis; | |
| text-align: center; | |
| color: var(--privy-color-foreground-2); | |
| `, | |
| nd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| align-items: center; | |
| width: 100%; | |
| height: 82px; | |
| > div { | |
| position: relative; | |
| } | |
| > div > span { | |
| position: absolute; | |
| left: -41px; | |
| top: -41px; | |
| } | |
| > div > :last-child { | |
| position: absolute; | |
| left: -19px; | |
| top: -19px; | |
| } | |
| `; | |
| const id = yr.div` | |
| text-align: left; | |
| flex-grow: 1; | |
| `, | |
| ad = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: flex-end; | |
| flex-grow: 1; | |
| `, | |
| od = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| gap: 12px; | |
| /* for Internet Explorer, Edge */ | |
| -ms-overflow-style: none; | |
| /* for Firefox */ | |
| scrollbar-width: none; | |
| /* for Chrome, Safari, and Opera */ | |
| &::-webkit-scrollbar { | |
| display: none; | |
| } | |
| `, | |
| ld = yr(od)` | |
| ${e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0} | |
| background-repeat: no-repeat; | |
| background-size: 100% 32px, 100% 16px; | |
| background-attachment: local, scroll; | |
| `; | |
| let sd = wr` | |
| && { | |
| width: 100%; | |
| font-size: 16px; | |
| line-height: 24px; | |
| /* Tablet and Up */ | |
| @media (min-width: 440px) { | |
| font-size: 14px; | |
| } | |
| display: flex; | |
| gap: 12px; | |
| align-items: center; | |
| padding: 12px 16px; | |
| border: 1px solid var(--privy-color-foreground-4) !important; | |
| border-radius: var(--privy-border-radius-mdlg); | |
| transition: background-color 200ms ease; | |
| cursor: pointer; | |
| &:hover { | |
| background-color: var(--privy-color-background-2); | |
| } | |
| &:disabled { | |
| cursor: pointer; | |
| background-color: var(--privy-color-background-2); | |
| } | |
| svg { | |
| height: 24px; | |
| max-height: 24px; | |
| max-width: 24px; | |
| } | |
| } | |
| `; | |
| const dd = yr.div` | |
| text-align: center; | |
| font-size: 14px; | |
| margin-bottom: 24px; | |
| `, | |
| cd = yr.button` | |
| ${sd} | |
| `, | |
| ud = yr.a` | |
| ${sd} | |
| `, | |
| hd = yr.div` | |
| width: 100%; | |
| height: 100%; | |
| min-height: inherit; | |
| display: flex; | |
| flex-direction: column; | |
| ${e=>e.$if?"display: none;":""} | |
| `; | |
| let pd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 24px; | |
| width: 100%; | |
| padding-bottom: 16px; | |
| margin-top: 24px; | |
| `, | |
| md = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| `; | |
| const fd = yr.span` | |
| && { | |
| width: 82px; | |
| height: 82px; | |
| border-width: 4px; | |
| border-style: solid; | |
| border-color: ${e=>e.color??"var(--privy-color-accent)"}; | |
| border-bottom-color: transparent; | |
| border-radius: 50%; | |
| display: inline-block; | |
| box-sizing: border-box; | |
| animation: rotation 1.2s linear infinite; | |
| transition: border-color 800ms; | |
| border-bottom-color: ${e=>e.color??"var(--privy-color-accent)"}; | |
| } | |
| `, | |
| gd = ({ | |
| onTransfer: e, | |
| isTransferring: r, | |
| transferSuccess: n | |
| }) => t(Ms, { | |
| ...n ? { | |
| success: !0, | |
| children: "Success!" | |
| } : { | |
| warn: !0, | |
| loading: r, | |
| onClick: e, | |
| children: "Transfer and delete account" | |
| } | |
| }), | |
| yd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 8px; | |
| width: 100%; | |
| padding-bottom: 16px; | |
| `, | |
| wd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| && p { | |
| font-size: 14px; | |
| } | |
| width: 100%; | |
| gap: 16px; | |
| `, | |
| vd = yr.div` | |
| display: flex; | |
| cursor: pointer; | |
| align-items: center; | |
| width: 100%; | |
| border: 1px solid var(--privy-color-foreground-4) !important; | |
| border-radius: var(--privy-border-radius-md); | |
| padding: 8px 10px; | |
| font-size: 14px; | |
| font-weight: 500; | |
| gap: 8px; | |
| `, | |
| Cd = yr(Tr)` | |
| position: relative; | |
| width: ${e=>`${e.iconSize}px`}; | |
| height: ${e=>`${e.iconSize}px`}; | |
| color: var(--privy-color-foreground-3); | |
| margin-left: auto; | |
| `, | |
| bd = yr(_r)` | |
| position: relative; | |
| width: 15px; | |
| height: 15px; | |
| color: var(--privy-color-foreground-3); | |
| margin-left: auto; | |
| `, | |
| Ed = yr.ol` | |
| display: flex; | |
| flex-direction: column; | |
| font-size: 14px; | |
| width: 100%; | |
| text-align: left; | |
| `, | |
| $d = yr.li` | |
| font-size: 14px; | |
| list-style-type: auto; | |
| list-style-position: outside; | |
| margin-left: 1rem; | |
| margin-bottom: 0.5rem; /* Adjust the margin as needed */ | |
| &:last-child { | |
| margin-bottom: 0; /* Remove margin from the last item */ | |
| } | |
| `, | |
| xd = yr.div` | |
| position: relative; | |
| width: 60px; | |
| height: 60px; | |
| margin: 10px; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| `; | |
| let Ad = () => t(xd, { | |
| children: t(Cd, { | |
| iconSize: 60 | |
| }) | |
| }); | |
| const kd = ({ | |
| address: n, | |
| onClose: i, | |
| onRetry: a, | |
| onTransfer: o, | |
| isTransferring: l, | |
| transferSuccess: s | |
| }) => { | |
| let { | |
| defaultChain: d | |
| } = fe(), c = d.blockExplorers | |
| ?.default.url ?? | |
| "https://etherscan.io"; | |
| return e(r, { | |
| children: [t(Zs, { | |
| onClose: i, | |
| backFn: a | |
| }), e(yd, { | |
| children: [ | |
| t( | |
| Ad, {}), | |
| e(wd, { | |
| children: [ | |
| t("h3", { | |
| children: "Check account assets before transferring" | |
| }), | |
| t("p", { | |
| children: "Before transferring, ensure there are no assets in the other account. Assets in that account will not transfer automatically and may be lost." | |
| }), | |
| e(Ed, { | |
| children: [ | |
| t("p", { | |
| children: " To check your balance, you can:" | |
| }), | |
| t($d, { | |
| children: "Log out and log back into the other account, or " | |
| }), | |
| e($d, { | |
| children: [ | |
| "Copy your wallet address and use a", | |
| " ", | |
| t("u", { | |
| children: t( | |
| "a", { | |
| target: "_blank", | |
| href: c, | |
| children: "block explorer" | |
| } | |
| ) | |
| }), | |
| " ", | |
| "to see if the account holds any assets." | |
| ] | |
| }) | |
| ] | |
| }), | |
| e(vd, { | |
| onClick: () => | |
| navigator | |
| .clipboard | |
| .writeText( | |
| n | |
| ) | |
| .catch( | |
| console | |
| .error | |
| ), | |
| children: [ | |
| t(Sr, { | |
| color: "var(--privy-color-foreground-1)", | |
| strokeWidth: 2, | |
| height: "28px", | |
| width: "28px" | |
| }), | |
| t(lt, { | |
| address: n, | |
| showCopyIcon: | |
| ! | |
| 1 | |
| }), | |
| t( | |
| bd, {}) | |
| ] | |
| }), | |
| t(gd, { | |
| onTransfer: o, | |
| isTransferring: l, | |
| transferSuccess: s | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), t( | |
| st, {})] | |
| }) | |
| }, | |
| Td = ({ | |
| onClose: n, | |
| onContinue: i, | |
| onInfo: a, | |
| onTransfer: o, | |
| transferSuccess: l, | |
| isTransferring: s, | |
| data: d | |
| }) => { | |
| if (!d?.accountTransfer | |
| ?.linkMethod || !d | |
| ?.accountTransfer | |
| ?.displayName) return; | |
| let c = { | |
| method: d | |
| ?.accountTransfer | |
| ?.linkMethod, | |
| handle: d | |
| ?.accountTransfer | |
| ?.displayName, | |
| disclosedAccount: d | |
| ?.accountTransfer | |
| ?.embeddedWalletAddress ? | |
| { | |
| type: "wallet", | |
| handle: d | |
| ?.accountTransfer | |
| ?.embeddedWalletAddress | |
| } : void 0 | |
| }; | |
| return e(r, { | |
| children: [t(Zs, { | |
| closeable: | |
| ! | |
| 0 | |
| }), e(yd, { | |
| children: [ | |
| t(nd, { | |
| children: e( | |
| "div", { | |
| children: [ | |
| t(fd, { | |
| color: "var(--privy-color-error)" | |
| }), | |
| t(Ar, { | |
| height: 38, | |
| width: 38, | |
| stroke: "var(--privy-color-error)" | |
| }) | |
| ] | |
| } | |
| ) | |
| }), | |
| e(wd, { | |
| children: [ | |
| e("h3", { | |
| children: [ | |
| function( | |
| e | |
| ) { | |
| switch ( | |
| e | |
| ) { | |
| case "sms": | |
| return "Phone number"; | |
| case "email": | |
| return "Email address"; | |
| case "siwe": | |
| return "Wallet address"; | |
| case "linkedin": | |
| return "LinkedIn profile"; | |
| case "google": | |
| case "apple": | |
| case "discord": | |
| case "github": | |
| case "instagram": | |
| case "spotify": | |
| case "tiktok": | |
| case "twitter": | |
| case "telegram": | |
| case "farcaster": | |
| return `${dl(e.replace("_oauth",""))} profile`; | |
| default: | |
| return e | |
| } | |
| } | |
| (c | |
| .method), | |
| " is associated with another account" | |
| ] | |
| }), | |
| e("p", { | |
| children: [ | |
| "Do you want to transfer", | |
| t("b", { | |
| children: c | |
| .handle ? | |
| ` ${c.handle}` : | |
| "" | |
| }), | |
| " to this account instead? This will delete your other account." | |
| ] | |
| }), | |
| t(_d, { | |
| onClick: a, | |
| disclosedAccount: c | |
| .disclosedAccount | |
| }) | |
| ] | |
| }), | |
| e(wd, { | |
| style: { | |
| gap: 12, | |
| marginTop: 12 | |
| }, | |
| children: [ | |
| d | |
| ?.accountTransfer | |
| ?.embeddedWalletAddress ? | |
| t(Ms, { | |
| onClick: i, | |
| children: "Continue" | |
| }) : | |
| t(gd, { | |
| onTransfer: o, | |
| transferSuccess: l, | |
| isTransferring: s | |
| }), | |
| t(Ws, { | |
| onClick: n, | |
| children: "No thanks" | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), t( | |
| st, {})] | |
| }) | |
| }; | |
| function _d({ | |
| disclosedAccount: r, | |
| onClick: n | |
| }) { | |
| return r ? e(vd, { | |
| onClick: n, | |
| children: [t(kr, { | |
| color: "var(--privy-color-foreground-1)", | |
| strokeWidth: 2, | |
| height: "28px", | |
| width: "28px" | |
| }), t(lt, { | |
| address: r | |
| .handle, | |
| showCopyIcon: | |
| !1 | |
| }), t(Cd, { | |
| iconSize: 15 | |
| })] | |
| }) : null | |
| } | |
| const Sd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| padding: 0px 0px 30px; | |
| @media (max-width: 440px) { | |
| padding: 10px 10px 20px; | |
| } | |
| `, | |
| Nd = yr.div` | |
| font-size: 18px; | |
| line-height: 30px; | |
| text-align: center; | |
| font-weight: 600; | |
| margin-bottom: 10px; | |
| `, | |
| Id = yr.div` | |
| font-size: 0.875rem; | |
| text-align: center; | |
| `, | |
| Pd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 10px; | |
| flex-grow: 1; | |
| padding: 20px 0; | |
| @media (max-width: 440px) { | |
| padding: 10px 10px 20px; | |
| } | |
| `, | |
| Od = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: stretch; | |
| gap: 0.75rem; | |
| padding: 1rem 0rem 0rem; | |
| flex-grow: 1; | |
| width: 100%; | |
| `, | |
| Rd = yr.div` | |
| width: 25px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: flex-start; | |
| > svg { | |
| z-index: 2; | |
| height: 25px !important; | |
| width: 25px !important; | |
| color: var(--privy-color-accent); | |
| } | |
| `, | |
| Md = yr.div` | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| font-size: 0.875rem; | |
| line-height: 1rem; | |
| text-align: left; | |
| `, | |
| Ld = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| gap: 10px; | |
| padding-top: 20px; | |
| `, | |
| Dd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: stretch; | |
| gap: 1rem; | |
| padding: 1rem 0rem 0rem; | |
| flex-grow: 1; | |
| width: 100%; | |
| `, | |
| Fd = yr.div` | |
| display: flex; | |
| gap: 5px; | |
| width: 100%; | |
| `, | |
| Ud = yr.button` | |
| && { | |
| background-color: transparent; | |
| color: var(--privy-color-foreground-3); | |
| padding: 0 10px; | |
| display: flex; | |
| align-items: center; | |
| > svg { | |
| z-index: 2; | |
| height: 20px !important; | |
| width: 20px !important; | |
| } | |
| } | |
| &&:hover { | |
| color: var(--privy-color-error); | |
| } | |
| `, | |
| Wd = yr.div` | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| > svg { | |
| z-index: 2; | |
| height: 20px !important; | |
| width: 20px !important; | |
| } | |
| `, | |
| Bd = yr.div` | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| font-weight: 400 !important; | |
| color: ${e=>e.isAccent?"var(--privy-color-accent)":"var(--privy-color-foreground-3)"}; | |
| > svg { | |
| z-index: 2; | |
| height: 18px !important; | |
| width: 18px !important; | |
| display: flex !important; | |
| align-items: flex-end; | |
| } | |
| `, | |
| Gd = yr.div` | |
| width: 100%; | |
| display: flex; | |
| justify-content: space-between; | |
| `, | |
| Hd = yr.p` | |
| text-align: left; | |
| width: 100%; | |
| color: var(--privy-color-foreground-3) !important; | |
| `, | |
| zd = yr.button` | |
| display: flex; | |
| flex-direction: row; | |
| align-items: center; | |
| justify-content: center; | |
| user-select: none; | |
| & { | |
| width: 100%; | |
| cursor: pointer; | |
| border-radius: var(--privy-border-radius-md); | |
| font-size: 0.875rem; | |
| line-height: 1rem; | |
| font-style: normal; | |
| font-weight: 500; | |
| line-height: 22px; /* 137.5% */ | |
| letter-spacing: -0.016px; | |
| } | |
| && { | |
| color: ${e=>"dark"===e.theme?"var(--privy-color-foreground-2)":"var(--privy-color-accent)"}; | |
| background-color: transparent; | |
| padding: 0.5rem 0px; | |
| } | |
| &:hover { | |
| text-decoration: underline; | |
| } | |
| `, | |
| jd = yr.div` | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 90px; | |
| height: 90px; | |
| border-radius: 50%; | |
| background-color: ${({status:e})=>"success"===e?"var(--privy-color-success)":"var(--privy-color-accent)"}; | |
| > svg { | |
| z-index: 2; | |
| height: 50px !important; | |
| width: auto !important; | |
| color: white; | |
| } | |
| `, | |
| qd = yr.div` | |
| color: var(--privy-color-error); | |
| `, | |
| Vd = ({ | |
| termsAndConditionsUrl: n, | |
| privacyPolicyUrl: i, | |
| onAccept: a, | |
| onDecline: o | |
| }) => e(r, { | |
| children: [t(Zs, { | |
| closeable: ! | |
| 1 | |
| }), t(Rr, { | |
| width: 56, | |
| height: 56, | |
| fill: "var(--privy-color-accent)", | |
| style: { | |
| margin: "auto" | |
| } | |
| }), t(Nd, { | |
| style: { | |
| marginTop: 24 | |
| }, | |
| children: "One last step" | |
| }), t(Id, { | |
| children: "By signing up, you agree to our terms and privacy policy." | |
| }), e(od, { | |
| style: { | |
| marginTop: 24 | |
| }, | |
| children: [ | |
| n && | |
| e(ud, { | |
| target: "_blank", | |
| href: n, | |
| children: [ | |
| "View Terms ", | |
| t(Or, { | |
| style: { | |
| marginLeft: "auto" | |
| } | |
| }) | |
| ] | |
| }), | |
| i && | |
| e(ud, { | |
| target: "_blank", | |
| href: i, | |
| children: [ | |
| "View Privacy Policy ", | |
| t(Or, { | |
| style: { | |
| marginLeft: "auto" | |
| } | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), e(Kd, { | |
| style: { | |
| marginTop: 24 | |
| }, | |
| children: [ | |
| t(Ws, { | |
| onClick: o, | |
| children: "No thanks" | |
| }), | |
| t(Ms, { | |
| onClick: a, | |
| children: "Accept" | |
| }) | |
| ] | |
| }), t(st, {})] | |
| }); | |
| let Kd = yr.div` | |
| display: flex; | |
| gap: 10px; | |
| `; | |
| const Yd = ({ | |
| style: e, | |
| ...r | |
| }) => t("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| fill: "none", | |
| viewBox: "0 0 24 24", | |
| strokeWidth: "1.5", | |
| stroke: "currentColor", | |
| style: { | |
| height: "1.5rem", | |
| width: "1.5rem", | |
| ...e | |
| }, | |
| ...r, | |
| children: t("path", { | |
| fillRule: "evenodd", | |
| d: "M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 003-3v-6.75a3 3 0 00-3-3v-3c0-2.9-2.35-5.25-5.25-5.25zm3.75 8.25v-3a3.75 3.75 0 10-7.5 0v3h7.5z", | |
| clipRule: "evenodd" | |
| }) | |
| }); | |
| let Zd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 24px; | |
| width: 100%; | |
| padding-bottom: 16px; | |
| `, | |
| Xd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| `; | |
| const Qd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: flex-start; | |
| justify-content: flex-end; | |
| margin-top: auto; | |
| gap: 16px; | |
| flex-grow: 100; | |
| `, | |
| Jd = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| flex-grow: 1; | |
| width: 100%; | |
| `, | |
| ec = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| width: 100%; | |
| `, | |
| tc = yr(Jd)` | |
| padding: 20px 0; | |
| `, | |
| rc = yr(Jd)` | |
| gap: 16px; | |
| `, | |
| nc = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| width: 100%; | |
| `, | |
| ic = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| `; | |
| yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: space-between; | |
| height: 100%; | |
| `; | |
| const ac = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: flex-start; | |
| align-items: flex-start; | |
| text-align: left; | |
| gap: 8px; | |
| padding: 16px; | |
| margin-top: 16px; | |
| margin-bottom: 16px; | |
| width: 100%; | |
| background: var(--privy-color-background-2); | |
| border-radius: var(--privy-border-radius-md); | |
| && h4 { | |
| color: var(--privy-color-foreground-3); | |
| font-size: 14px; | |
| text-decoration: underline; | |
| font-weight: medium; | |
| } | |
| && p { | |
| color: var(--privy-color-foreground-3); | |
| font-size: 14px; | |
| } | |
| `, | |
| oc = yr.div` | |
| height: 16px; | |
| `, | |
| lc = yr.div` | |
| height: 12px; | |
| `, | |
| sc = yr.div` | |
| position: relative; | |
| `, | |
| dc = yr.div` | |
| height: ${e=>e.height??"12"}px; | |
| `, | |
| cc = yr.div` | |
| background-color: var(--privy-color-accent); | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| border-radius: 50%; | |
| border-color: white; | |
| border-width: 2px !important; | |
| `, | |
| uc = ({ | |
| title: n, | |
| description: i, | |
| children: a, | |
| ...o | |
| }) => t(mc, { | |
| ...o, | |
| children: e(r, { | |
| children: [t( | |
| "h3", { | |
| children: n | |
| }), | |
| "string" == | |
| typeof i ? | |
| t("p", { | |
| children: i | |
| }) : i, | |
| a | |
| ] | |
| }) | |
| }), | |
| hc = yr(uc)` | |
| margin-bottom: 24px; | |
| `, | |
| pc = ({ | |
| title: r, | |
| description: n, | |
| icon: i, | |
| children: a, | |
| ...o | |
| }) => e(fc, { | |
| ...o, | |
| children: [i || null, t( | |
| "h3", { | |
| children: r | |
| }), n && | |
| "string" == | |
| typeof n ? t("p", { | |
| children: n | |
| }) : n, a | |
| ] | |
| }); | |
| let mc = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: flex-start; | |
| align-items: flex-start; | |
| text-align: left; | |
| gap: 8px; | |
| width: 100%; | |
| margin-bottom: 24px; | |
| && h3 { | |
| font-size: 17px; | |
| color: var(--privy-color-foreground); | |
| } | |
| /* Sugar assuming children are paragraphs. Otherwise, handling styling on your own */ | |
| && p { | |
| color: var(--privy-color-foreground-2); | |
| font-size: 14px; | |
| } | |
| `, | |
| fc = yr(mc)` | |
| align-items: center; | |
| text-align: center; | |
| gap: 16px; | |
| h3 { | |
| margin-bottom: 24px; | |
| } | |
| `; | |
| var gc, yc, wc, vc; | |
| let Cc = Array(6).fill(""); | |
| (wc = gc || (gc = {}))[wc | |
| .RESET_AFTER_DELAY = 0] = | |
| "RESET_AFTER_DELAY", wc[wc | |
| .CLEAR_ON_NEXT_VALID_INPUT = 1 | |
| ] = "CLEAR_ON_NEXT_VALID_INPUT", | |
| (vc = yc || (yc = {}))[vc.EMAIL = | |
| 0] = "EMAIL", vc[vc.SMS = 1] = | |
| "SMS"; | |
| let bc = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: flex-start; | |
| justify-content: center; | |
| margin: auto; | |
| gap: 16px; | |
| flex-grow: 1; | |
| `, | |
| Ec = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| width: 100%; | |
| gap: 8px; | |
| > div:last-child { | |
| display: flex; | |
| justify-content: center; | |
| gap: 0.5rem; | |
| width: 100%; | |
| border-radius: var(--privy-border-radius-md); | |
| > input { | |
| border: 1px solid var(--privy-color-foreground-4); | |
| background: var(--privy-color-background); | |
| border-radius: var(--privy-border-radius-md); | |
| padding: 8px 10px; | |
| height: 58px; | |
| width: 46px; | |
| text-align: center; | |
| font-size: 18px; | |
| } | |
| > input:focus { | |
| border: 1px solid var(--privy-color-accent); | |
| } | |
| > input:invalid { | |
| border: 1px solid var(--privy-color-error); | |
| } | |
| > input.success { | |
| border: 1px solid var(--privy-color-success); | |
| } | |
| > input.fail { | |
| border: 1px solid var(--privy-color-error); | |
| animation: shake 180ms; | |
| animation-iteration-count: 2; | |
| } | |
| } | |
| @keyframes shake { | |
| 0% { | |
| transform: translate(1px, 0px); | |
| } | |
| 33% { | |
| transform: translate(-1px, 0px); | |
| } | |
| 67% { | |
| transform: translate(-1px, 0px); | |
| } | |
| 100% { | |
| transform: translate(1px, 0px); | |
| } | |
| } | |
| `, | |
| $c = yr.div` | |
| line-height: 20px; | |
| height: 20px; | |
| font-size: 13px; | |
| color: ${e=>e.$success?"var(--privy-color-success)":e.$fail?"var(--privy-color-error)":"var(--privy-color-foreground-3)"}; | |
| display: flex; | |
| justify-content: flex-end; | |
| width: 100%; | |
| `, | |
| xc = yr.div` | |
| font-size: 13px; | |
| color: var(--privy-color-foreground); | |
| display: flex; | |
| gap: 8px; | |
| align-items: center; | |
| width: 100%; | |
| margin-top: 16px; | |
| // Equal opposing size buffer to account for auto margining when the | |
| // success/fail text does not show up | |
| padding-bottom: 32px; | |
| `, | |
| Ac = yr.div` | |
| color: var(--privy-color-accent); | |
| padding: 2px 0; | |
| > button { | |
| text-decoration: underline; | |
| } | |
| `, | |
| kc = yr.div` | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| border-radius: var(--privy-border-radius-sm); | |
| padding: 2px 8px; | |
| gap: 4px; | |
| background: var(--privy-color-background-2); | |
| color: var(--privy-color-foreground-2); | |
| `, | |
| Tc = yr.span` | |
| font-weight: 500; | |
| word-break: break-all; | |
| `; | |
| const _c = ({ | |
| icon: n | |
| }) => t(r, { | |
| children: t(Sc, { | |
| children: e( | |
| "div", { | |
| children: [ | |
| t( | |
| Ss, {}), | |
| "string" == | |
| typeof n ? | |
| t("span", { | |
| style: { | |
| background: `url('${n}')`, | |
| height: "38px", | |
| width: "38px", | |
| borderRadius: "6px", | |
| margin: "auto", | |
| backgroundSize: "cover" | |
| } | |
| }) : | |
| n ? | |
| t(n, { | |
| style: { | |
| width: "38px", | |
| height: "38px" | |
| } | |
| }) : | |
| t( | |
| "span", {}) | |
| ] | |
| }) | |
| }) | |
| }); | |
| let Sc = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| align-items: center; | |
| width: 100%; | |
| height: 82px; | |
| > div { | |
| position: relative; | |
| } | |
| > div > span { | |
| position: absolute; | |
| left: -41px; | |
| top: -41px; | |
| } | |
| > div > :last-child { | |
| position: absolute; | |
| left: -19px; | |
| top: -19px; | |
| } | |
| `; | |
| let Nc = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 24px; | |
| width: 100%; | |
| `; | |
| const Ic = ({ | |
| icon: e, | |
| name: r | |
| }) => "string" == typeof e ? t( | |
| "img", { | |
| alt: `${r||"wallet"} logo`, | |
| src: e, | |
| style: { | |
| height: 24, | |
| width: 24, | |
| borderRadius: 4 | |
| } | |
| }) : e ? t(e, {}) : null, | |
| Pc = { | |
| coinbase_wallet: { | |
| logo: Dl, | |
| displayName: "Coinbase Wallet", | |
| rdns: "com.coinbase.wallet" | |
| }, | |
| coinbase_smart_wallet: { | |
| logo: Dl, | |
| displayName: "Coinbase Smart Wallet", | |
| rdns: "com.coinbase.wallet" | |
| }, | |
| metamask: { | |
| logo: es, | |
| displayName: "MetaMask", | |
| rdns: "io.metamask" | |
| }, | |
| phantom: { | |
| logo: ts, | |
| displayName: "Phantom" | |
| }, | |
| rainbow: { | |
| logo: ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| width: "120", | |
| height: "120", | |
| viewBox: "0 0 120 120", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: 24, | |
| width: 24, | |
| ...r | |
| }, | |
| ...n, | |
| children: [t( | |
| "g", { | |
| clipPath: "url(#clip0_5_32)", | |
| children: e( | |
| "g", { | |
| clipPath: "url(#clip1_5_32)", | |
| children: [ | |
| t("mask", { | |
| id: "mask0_5_32", | |
| style: { | |
| maskType: "alpha" | |
| }, | |
| maskUnits: "userSpaceOnUse", | |
| x: "0", | |
| y: "0", | |
| width: "120", | |
| height: "120", | |
| children: t( | |
| "path", { | |
| d: "M78.163 0H41.837C29.79 0 23.767 0 17.283 2.04999C10.203 4.62701 4.627 10.203 2.05 17.283C0 23.767 0 29.791 0 41.837V78.163C0 90.21 0 96.232 2.05 102.717C4.627 109.797 10.203 115.373 17.283 117.949C23.767 120 29.79 120 41.837 120H78.163C90.21 120 96.232 120 102.717 117.949C109.797 115.373 115.373 109.797 117.95 102.717C120 96.232 120 90.21 120 78.163V41.837C120 29.791 120 23.767 117.95 17.283C115.373 10.203 109.797 4.62701 102.717 2.04999C96.232 0 90.21 0 78.163 0Z", | |
| fill: "black" | |
| } | |
| ) | |
| }), | |
| t("g", { | |
| mask: "url(#mask0_5_32)", | |
| children: t( | |
| "rect", { | |
| width: "120", | |
| height: "120", | |
| fill: "url(#paint0_linear_5_32)" | |
| } | |
| ) | |
| }), | |
| t("path", { | |
| d: "M20 38H26C56.9279 38 82 63.0721 82 94V100H94C97.3137 100 100 97.3137 100 94C100 53.1309 66.8691 20 26 20C22.6863 20 20 22.6863 20 26V38Z", | |
| fill: "url(#paint1_radial_5_32)" | |
| }), | |
| t("path", { | |
| d: "M84 94H100C100 97.3137 97.3137 100 94 100H84V94Z", | |
| fill: "url(#paint2_linear_5_32)" | |
| }), | |
| t("path", { | |
| d: "M26 20L26 36H20L20 26C20 22.6863 22.6863 20 26 20Z", | |
| fill: "url(#paint3_linear_5_32)" | |
| }), | |
| t("path", { | |
| d: "M20 36H26C58.0325 36 84 61.9675 84 94V100H66V94C66 71.9086 48.0914 54 26 54H20V36Z", | |
| fill: "url(#paint4_radial_5_32)" | |
| }), | |
| t("path", { | |
| d: "M68 94H84V100H68V94Z", | |
| fill: "url(#paint5_linear_5_32)" | |
| }), | |
| t("path", { | |
| d: "M20 52L20 36L26 36L26 52H20Z", | |
| fill: "url(#paint6_linear_5_32)" | |
| }), | |
| t("path", { | |
| d: "M20 62C20 65.3137 22.6863 68 26 68C40.3594 68 52 79.6406 52 94C52 97.3137 54.6863 100 58 100H68V94C68 70.804 49.196 52 26 52H20V62Z", | |
| fill: "url(#paint7_radial_5_32)" | |
| }), | |
| t("path", { | |
| d: "M52 94H68V100H58C54.6863 100 52 97.3137 52 94Z", | |
| fill: "url(#paint8_radial_5_32)" | |
| }), | |
| t("path", { | |
| d: "M26 68C22.6863 68 20 65.3137 20 62L20 52L26 52L26 68Z", | |
| fill: "url(#paint9_radial_5_32)" | |
| }) | |
| ] | |
| } | |
| ) | |
| }), | |
| e("defs", { | |
| children: [ | |
| e("linearGradient", { | |
| id: "paint0_linear_5_32", | |
| x1: "60", | |
| y1: "0", | |
| x2: "60", | |
| y2: "120", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#174299" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#001E59" | |
| }) | |
| ] | |
| }), | |
| e("radialGradient", { | |
| id: "paint1_radial_5_32", | |
| cx: "0", | |
| cy: "0", | |
| r: "1", | |
| gradientUnits: "userSpaceOnUse", | |
| gradientTransform: "translate(26 94) rotate(-90) scale(74)", | |
| children: [ | |
| t("stop", { | |
| offset: "0.770277", | |
| stopColor: "#FF4000" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#8754C9" | |
| }) | |
| ] | |
| }), | |
| e("linearGradient", { | |
| id: "paint2_linear_5_32", | |
| x1: "83", | |
| y1: "97", | |
| x2: "100", | |
| y2: "97", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#FF4000" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#8754C9" | |
| }) | |
| ] | |
| }), | |
| e("linearGradient", { | |
| id: "paint3_linear_5_32", | |
| x1: "23", | |
| y1: "20", | |
| x2: "23", | |
| y2: "37", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#8754C9" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#FF4000" | |
| }) | |
| ] | |
| }), | |
| e("radialGradient", { | |
| id: "paint4_radial_5_32", | |
| cx: "0", | |
| cy: "0", | |
| r: "1", | |
| gradientUnits: "userSpaceOnUse", | |
| gradientTransform: "translate(26 94) rotate(-90) scale(58)", | |
| children: [ | |
| t("stop", { | |
| offset: "0.723929", | |
| stopColor: "#FFF700" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#FF9901" | |
| }) | |
| ] | |
| }), | |
| e("linearGradient", { | |
| id: "paint5_linear_5_32", | |
| x1: "68", | |
| y1: "97", | |
| x2: "84", | |
| y2: "97", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#FFF700" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#FF9901" | |
| }) | |
| ] | |
| }), | |
| e("linearGradient", { | |
| id: "paint6_linear_5_32", | |
| x1: "23", | |
| y1: "52", | |
| x2: "23", | |
| y2: "36", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#FFF700" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#FF9901" | |
| }) | |
| ] | |
| }), | |
| e("radialGradient", { | |
| id: "paint7_radial_5_32", | |
| cx: "0", | |
| cy: "0", | |
| r: "1", | |
| gradientUnits: "userSpaceOnUse", | |
| gradientTransform: "translate(26 94) rotate(-90) scale(42)", | |
| children: [ | |
| t("stop", { | |
| offset: "0.59513", | |
| stopColor: "#00AAFF" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#01DA40" | |
| }) | |
| ] | |
| }), | |
| e("radialGradient", { | |
| id: "paint8_radial_5_32", | |
| cx: "0", | |
| cy: "0", | |
| r: "1", | |
| gradientUnits: "userSpaceOnUse", | |
| gradientTransform: "translate(51 97) scale(17 45.3333)", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#00AAFF" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#01DA40" | |
| }) | |
| ] | |
| }), | |
| e("radialGradient", { | |
| id: "paint9_radial_5_32", | |
| cx: "0", | |
| cy: "0", | |
| r: "1", | |
| gradientUnits: "userSpaceOnUse", | |
| gradientTransform: "translate(23 69) rotate(-90) scale(17 322.37)", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#00AAFF" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#01DA40" | |
| }) | |
| ] | |
| }), | |
| t("clipPath", { | |
| id: "clip0_5_32", | |
| children: t( | |
| "rect", { | |
| width: "120", | |
| height: "120", | |
| fill: "white" | |
| } | |
| ) | |
| }), | |
| t("clipPath", { | |
| id: "clip1_5_32", | |
| children: t( | |
| "rect", { | |
| width: "120", | |
| height: "120", | |
| fill: "white" | |
| } | |
| ) | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), | |
| displayName: "Rainbow", | |
| rdns: "me.rainbow" | |
| }, | |
| wallet_connect: { | |
| logo: cs, | |
| displayName: "WalletConnect" | |
| }, | |
| zerion: { | |
| logo: ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| width: "176", | |
| height: "176", | |
| viewBox: "0 0 176 176", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: 24, | |
| width: 24, | |
| ...r | |
| }, | |
| ...n, | |
| children: [e( | |
| "g", { | |
| clipPath: "url(#clip0_1704_1423)", | |
| children: [ | |
| t("path", { | |
| d: "M126.233 176H49.7672C22.287 176 0 153.723 0 126.233V49.7673C0 22.287 22.2769 0 49.7672 0H126.233C153.713 0 176 22.277 176 49.7673V126.233C176 153.723 153.713 176 126.233 176Z", | |
| fill: "#2461ED" | |
| }), | |
| t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M100.667 85.6591C83.4133 76.3353 62.4196 64.2443 46.6192 54.3891C41.9573 51.0306 44.3234 43.9023 49.9578 43.9023H128.138C132.499 43.9023 135.416 48.7648 133.231 52.4442C127.977 61.5174 120.308 73.0368 113.901 82.1702C110.462 87.0727 104.858 87.9149 100.667 85.6591ZM75.5031 88.6867C92.1858 97.5795 115.566 111.104 132.178 121.33C137.311 124.498 135.266 132.098 129.271 132.098C119.46 132.098 103.518 132.1 87.6592 132.103C71.9639 132.105 56.3497 132.108 46.8398 132.108C42.0476 132.108 39.5913 127.135 41.6265 123.666C48.5041 111.946 56.2338 100.116 62.6603 91.2834C65.5176 87.3433 71.3325 86.461 75.5031 88.6867Z", | |
| fill: "white" | |
| }) | |
| ] | |
| }), | |
| t("defs", { | |
| children: t( | |
| "clipPath", { | |
| id: "clip0_1704_1423", | |
| children: t( | |
| "rect", { | |
| width: "176", | |
| height: "176", | |
| fill: "white" | |
| } | |
| ) | |
| } | |
| ) | |
| }) | |
| ] | |
| }), | |
| displayName: "Zerion", | |
| rdns: "io.zerion.wallet" | |
| }, | |
| brave_wallet: { | |
| logo: ({ | |
| ...r | |
| }) => e("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| viewBox: "0 0 436.49 511.97", | |
| height: "24", | |
| width: "24", | |
| ...r, | |
| children: [t( | |
| "defs", { | |
| children: e( | |
| "linearGradient", { | |
| id: "brave-linear-gradient", | |
| x1: "-18.79", | |
| y1: "359.73", | |
| x2: "194.32", | |
| y2: "359.73", | |
| gradientTransform: "matrix(2.05, 0, 0, -2.05, 38.49, 992.77)", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| offset: "0", | |
| stopColor: "#f1562b" | |
| }), | |
| t("stop", { | |
| offset: "0.3", | |
| stopColor: "#f1542b" | |
| }), | |
| t("stop", { | |
| offset: "0.41", | |
| stopColor: "#f04d2a" | |
| }), | |
| t("stop", { | |
| offset: "0.49", | |
| stopColor: "#ef4229" | |
| }), | |
| t("stop", { | |
| offset: "0.5", | |
| stopColor: "#ef4029" | |
| }), | |
| t("stop", { | |
| offset: "0.56", | |
| stopColor: "#e83e28" | |
| }), | |
| t("stop", { | |
| offset: "0.67", | |
| stopColor: "#e13c26" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#df3c26" | |
| }) | |
| ] | |
| } | |
| ) | |
| }), | |
| t("path", { | |
| style: { | |
| fill: "url(#brave-linear-gradient)" | |
| }, | |
| d: "M436.49,165.63,420.7,122.75l11-24.6A8.47,8.47,0,0,0,430,88.78L400.11,58.6a48.16,48.16,0,0,0-50.23-11.66l-8.19,2.89L296.09.43,218.25,0,140.4.61,94.85,50.41l-8.11-2.87A48.33,48.33,0,0,0,36.19,59.3L5.62,90.05a6.73,6.73,0,0,0-1.36,7.47l11.47,25.56L0,165.92,56.47,380.64a89.7,89.7,0,0,0,34.7,50.23l111.68,75.69a24.73,24.73,0,0,0,30.89,0l111.62-75.8A88.86,88.86,0,0,0,380,380.53l46.07-176.14Z" | |
| }), t( | |
| "path", { | |
| style: { | |
| fill: "#fff" | |
| }, | |
| d: "M231,317.33a65.61,65.61,0,0,0-9.11-3.3h-5.49a66.08,66.08,0,0,0-9.11,3.3l-13.81,5.74-15.6,7.18-25.4,13.24a4.84,4.84,0,0,0-.62,9l22.06,15.49q7,5,13.55,10.76l6.21,5.35,13,11.37,5.89,5.2a10.15,10.15,0,0,0,12.95,0l25.39-22.18,13.6-10.77,22.06-15.79a4.8,4.8,0,0,0-.68-8.93l-25.36-12.8L244.84,323ZM387.4,175.2l.8-2.3a61.26,61.26,0,0,0-.57-9.18,73.51,73.51,0,0,0-8.19-15.44l-14.35-21.06-10.22-13.88-19.23-24a69.65,69.65,0,0,0-5.7-6.67h-.4L321,84.25l-42.27,8.14a33.49,33.49,0,0,1-12.59-1.84l-23.21-7.5-16.61-4.59a70.52,70.52,0,0,0-14.67,0L195,83.1l-23.21,7.54a33.89,33.89,0,0,1-12.59,1.84l-42.22-8-8.54-1.58h-.4a65.79,65.79,0,0,0-5.7,6.67l-19.2,24Q77.81,120.32,73,127.45L58.61,148.51l-6.78,11.31a51,51,0,0,0-1.94,13.35l.8,2.3A34.51,34.51,0,0,0,52,179.81l11.33,13,50.23,53.39a14.31,14.31,0,0,1,2.55,14.34L107.68,280a25.23,25.23,0,0,0-.39,16l1.64,4.52a43.58,43.58,0,0,0,13.39,18.76l7.89,6.43a15,15,0,0,0,14.35,1.72L172.62,314A70.38,70.38,0,0,0,187,304.52l22.46-20.27a9,9,0,0,0,3-6.36,9.08,9.08,0,0,0-2.5-6.56L159.2,237.18a9.83,9.83,0,0,1-3.09-12.45l19.66-36.95a19.21,19.21,0,0,0,1-14.67A22.37,22.37,0,0,0,165.58,163L103.94,139.8c-4.44-1.6-4.2-3.6.51-3.88l36.2-3.59a55.9,55.9,0,0,1,16.9,1.5l31.5,8.8a9.64,9.64,0,0,1,6.74,10.76L183.42,221a34.72,34.72,0,0,0-.61,11.41c.5,1.61,4.73,3.6,9.36,4.73l19.19,4a46.38,46.38,0,0,0,16.86,0l17.26-4c4.64-1,8.82-3.23,9.35-4.85a34.94,34.94,0,0,0-.63-11.4l-12.45-67.59a9.66,9.66,0,0,1,6.74-10.76l31.5-8.83a55.87,55.87,0,0,1,16.9-1.5l36.2,3.37c4.74.44,5,2.2.54,3.88L272,162.79a22.08,22.08,0,0,0-11.16,10.12,19.3,19.3,0,0,0,1,14.67l19.69,36.95A9.84,9.84,0,0,1,278.45,237l-50.66,34.23a9,9,0,0,0,.32,12.78l.15.14,22.49,20.27a71.46,71.46,0,0,0,14.35,9.47l28.06,13.35a14.89,14.89,0,0,0,14.34-1.76l7.9-6.45a43.53,43.53,0,0,0,13.38-18.8l1.65-4.52a25.27,25.27,0,0,0-.39-16l-8.26-19.49a14.4,14.4,0,0,1,2.55-14.35l50.23-53.45,11.3-13a35.8,35.8,0,0,0,1.54-4.24Z" | |
| }) | |
| ] | |
| }), | |
| displayName: "Brave Wallet", | |
| rdns: "com.brave.wallet" | |
| }, | |
| cryptocom: { | |
| logo: ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| width: "400", | |
| height: "400", | |
| viewBox: "0 0 400 400", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: 24, | |
| width: 24, | |
| ...r | |
| }, | |
| ...n, | |
| children: [t( | |
| "path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M260.543 0C300.7 0 320.773 0 342.39 6.83333C365.99 15.4233 384.577 34.01 393.167 57.61C400 79.2233 400 99.3033 400 139.457V260.543C400 300.7 400 320.773 393.167 342.39C384.577 365.99 365.99 384.577 342.39 393.163C320.773 400 300.7 400 260.543 400H139.457C99.3 400 79.2233 400 57.61 393.163C34.01 384.577 15.4233 365.99 6.83333 342.39C0 320.773 0 300.7 0 260.543V139.457C0 99.3033 0 79.2233 6.83333 57.61C15.4233 34.01 34.01 15.4233 57.61 6.83333C79.2233 0 99.3 0 139.457 0H260.543Z", | |
| fill: "white" | |
| }), | |
| t("mask", { | |
| id: "mask0_16909_31415", | |
| style: { | |
| maskType: "luminance" | |
| }, | |
| maskUnits: "userSpaceOnUse", | |
| x: "0", | |
| y: "0", | |
| width: "400", | |
| height: "400", | |
| children: t( | |
| "path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M260.543 0C300.7 0 320.773 0 342.39 6.83333C365.99 15.4233 384.577 34.01 393.167 57.61C400 79.2233 400 99.3033 400 139.457V260.543C400 300.7 400 320.773 393.167 342.39C384.577 365.99 365.99 384.577 342.39 393.163C320.773 400 300.7 400 260.543 400H139.457C99.3 400 79.2233 400 57.61 393.163C34.01 384.577 15.4233 365.99 6.83333 342.39C0 320.773 0 300.7 0 260.543V139.457C0 99.3033 0 79.2233 6.83333 57.61C15.4233 34.01 34.01 15.4233 57.61 6.83333C79.2233 0 99.3 0 139.457 0H260.543Z", | |
| fill: "white" | |
| } | |
| ) | |
| }), e( | |
| "g", { | |
| mask: "url(#mask0_16909_31415)", | |
| children: [ | |
| t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M199.804 39.8501L59.3756 119.957V280.18L199.804 360.297L340.23 280.18V119.957L199.804 39.8501Z", | |
| fill: "#FEFEFE" | |
| }), | |
| t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M199.804 39.8501L59.3756 119.957V280.18L199.804 360.297L340.23 280.18V119.957L199.804 39.8501ZM144.359 109.116H254.873L268.197 164.788H131.538L144.359 109.116ZM176.201 204.291L164.148 173.197H235.711L223.913 204.291L227.339 239.028L199.804 239.154H172.522L176.201 204.291ZM211.354 275.892V264.862L236.093 241.414V204.417L268.451 183.607L305.376 211.066L255.119 297.589H235.203L211.354 275.892ZM94.2395 211.066L131.282 183.857L164.021 204.417V241.414L188.76 264.862V275.892L164.913 297.84H144.734L94.2395 211.066Z", | |
| fill: "#002D72" | |
| }), | |
| t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M255.12 297.589H235.202L211.355 275.892V264.862L236.094 241.414V204.417L268.45 183.607L305.377 211.066L255.12 297.589ZM199.803 39.8498V109.117H254.872L268.198 164.789H199.803V173.199H235.712L223.914 204.291L227.338 239.028L199.803 239.153V360.296L340.231 280.181V119.957L199.803 39.8498Z", | |
| fill: "url(#paint0_linear_16909_31415)", | |
| style: { | |
| mixBlendMode: "multiply" | |
| } | |
| }), | |
| t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M188.761 275.892L164.912 297.84H144.734L94.2389 211.066L131.283 183.858L164.022 204.417V241.414L188.761 264.862V275.892ZM172.522 239.153L176.2 204.291L164.149 173.199H199.803V164.789H131.537L144.36 109.117H199.803V39.8498L59.375 119.957V280.181L199.803 360.296V239.153H172.522Z", | |
| fill: "url(#paint1_linear_16909_31415)", | |
| style: { | |
| mixBlendMode: "multiply" | |
| } | |
| }) | |
| ] | |
| }), | |
| e("defs", { | |
| children: [ | |
| e("linearGradient", { | |
| id: "paint0_linear_16909_31415", | |
| x1: "325.255", | |
| y1: "325.727", | |
| x2: "325.255", | |
| y2: "73.6291", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#002D72" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#002D72", | |
| stopOpacity: "0.01" | |
| }) | |
| ] | |
| }), | |
| e("linearGradient", { | |
| id: "paint1_linear_16909_31415", | |
| x1: "184.827", | |
| y1: "325.727", | |
| x2: "184.827", | |
| y2: "73.6291", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#002D72", | |
| stopOpacity: "0.01" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#002D72" | |
| }) | |
| ] | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), | |
| displayName: "Crypto.com DeFi Wallet", | |
| rdns: "com.crypto.wallet" | |
| }, | |
| uniswap: { | |
| logo: ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| width: "96", | |
| height: "96", | |
| viewBox: "0 0 96 96", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: 24, | |
| width: 24, | |
| ...r | |
| }, | |
| ...n, | |
| children: [t( | |
| "rect", { | |
| width: "96", | |
| height: "96", | |
| rx: "18", | |
| fill: "#FEF4FF" | |
| }), | |
| e("g", { | |
| children: [ | |
| t("path", { | |
| d: "M71.9367 18.39C72.0482 16.4526 72.3145 15.1746 72.8497 14.0075C73.0616 13.5456 73.2601 13.1675 73.2907 13.1675C73.3214 13.1675 73.2293 13.5085 73.086 13.9252C72.6969 15.0578 72.633 16.607 72.901 18.4094C73.2413 20.6963 73.4348 21.0263 75.8841 23.4967C77.0329 24.6554 78.3692 26.1168 78.8536 26.7443L79.7343 27.8851L78.8536 27.0698C77.7764 26.0728 75.2992 24.1283 74.7521 23.8503C74.3852 23.6639 74.3306 23.6671 74.1043 23.8894C73.8958 24.0943 73.8519 24.4021 73.8229 25.8572C73.7778 28.125 73.4646 29.5807 72.7087 31.0362C72.2998 31.8234 72.2354 31.6554 72.6053 30.7668C72.8816 30.1034 72.9096 29.8117 72.9076 27.6163C72.9033 23.2052 72.3727 22.1447 69.2607 20.3281C68.4724 19.8678 67.1734 19.2041 66.3742 18.8531C65.575 18.502 64.9401 18.1962 64.9633 18.1734C65.0514 18.0868 68.0863 18.961 69.3077 19.4247C71.1247 20.1145 71.4247 20.2039 71.6454 20.1207C71.7933 20.0649 71.8648 19.6398 71.9367 18.39Z", | |
| fill: "#F50DB4" | |
| }), | |
| t("path", { | |
| d: "M33.5466 11.9727C32.4688 11.808 32.4233 11.7887 32.9306 11.7119C33.9026 11.5647 36.1979 11.7653 37.7796 12.1358C41.4722 13.0004 44.8322 15.2153 48.4188 19.1488L49.3717 20.1938L50.7348 19.978C56.4773 19.0689 62.3192 19.7914 67.2054 22.0148C68.5495 22.6265 70.6689 23.8441 70.9337 24.157C71.018 24.2568 71.173 24.8987 71.2779 25.5837C71.6408 27.9534 71.4591 29.7699 70.7234 31.1265C70.3229 31.8648 70.3006 32.0988 70.5698 32.7306C70.7847 33.2348 71.3838 33.608 71.9771 33.6072C73.1913 33.6056 74.4983 31.6721 75.1038 28.9818L75.3443 27.9131L75.8209 28.4448C78.4346 31.3619 80.4876 35.34 80.8403 38.1716L80.9321 38.9099L80.4928 38.2387C79.7366 37.0838 78.9769 36.2976 78.0041 35.6635C76.2504 34.5205 74.3961 34.1315 69.4853 33.8766C65.0501 33.6464 62.5399 33.2732 60.0509 32.4737C55.816 31.1137 53.6812 29.3023 48.6508 22.8012C46.4164 19.9135 45.0354 18.3159 43.6616 17.0293C40.5401 14.1058 37.4729 12.5726 33.5466 11.9727Z", | |
| fill: "#F50DB4" | |
| }), | |
| t("path", { | |
| d: "M35.6404 25.9564C33.4522 22.9889 32.0983 18.4391 32.3914 15.0379L32.482 13.9854L32.9801 14.0749C33.9155 14.243 35.5283 14.8343 36.2835 15.2861C38.3559 16.5259 39.253 18.1582 40.1658 22.3496C40.4332 23.5773 40.7839 24.9666 40.9454 25.437C41.2052 26.194 42.1871 27.9624 42.9854 29.1109C43.5605 29.938 43.1785 30.33 41.9074 30.217C39.9662 30.0444 37.3367 28.2568 35.6404 25.9564Z", | |
| fill: "#F50DB4" | |
| }), | |
| t("path", { | |
| d: "M69.2799 48.0419C59.0538 43.9862 55.4521 40.4658 55.4521 34.5259C55.4521 33.6517 55.4827 32.9365 55.5199 32.9365C55.5572 32.9365 55.9528 33.225 56.3991 33.5776C58.4728 35.216 60.7949 35.9157 67.2233 36.8395C71.0061 37.3831 73.1349 37.8222 75.0986 38.4637C81.3402 40.5027 85.2018 44.6406 86.1227 50.2766C86.3903 51.9143 86.2334 54.9854 85.7995 56.6039C85.457 57.8824 84.4118 60.1868 84.1346 60.2751C84.0578 60.2996 83.9824 60.0094 83.9626 59.6147C83.8575 57.4983 82.7718 55.438 80.9485 53.8946C78.8754 52.1399 76.0901 50.7428 69.2799 48.0419Z", | |
| fill: "#F50DB4" | |
| }), | |
| t("path", { | |
| d: "M62.1008 49.7268C61.9727 48.9758 61.7505 48.0167 61.607 47.5954L61.3461 46.8296L61.8307 47.3655C62.5014 48.107 63.0314 49.0559 63.4806 50.3197C63.8234 51.2843 63.862 51.5711 63.8594 53.1386C63.8568 54.6774 63.814 55 63.4974 55.8682C62.9983 57.2373 62.3788 58.208 61.3392 59.2501C59.4712 61.1228 57.0696 62.1596 53.6039 62.5896C53.0015 62.6643 51.2456 62.7902 49.7019 62.8693C45.8118 63.0686 43.2515 63.4803 40.9508 64.276C40.6201 64.3905 40.3247 64.4601 40.2948 64.4305C40.2017 64.3393 41.768 63.4195 43.0618 62.8056C44.8862 61.94 46.7021 61.4676 50.7709 60.8002C52.7809 60.4704 54.8566 60.0704 55.3837 59.9112C60.3612 58.4079 62.9197 54.5286 62.1008 49.7268Z", | |
| fill: "#F50DB4" | |
| }), | |
| t("path", { | |
| d: "M66.7886 57.9275C65.4299 55.0505 65.1179 52.2726 65.8623 49.6821C65.942 49.4053 66.07 49.1787 66.1471 49.1787C66.224 49.1787 66.5447 49.3495 66.8594 49.5581C67.4855 49.9732 68.7412 50.6725 72.0866 52.4692C76.2612 54.7111 78.6414 56.4472 80.2599 58.4306C81.6775 60.1677 82.5547 62.1459 82.9769 64.5583C83.2159 65.9248 83.0759 69.2128 82.7199 70.5889C81.5975 74.9275 78.9889 78.3356 75.2682 80.3242C74.7231 80.6155 74.2337 80.8547 74.1807 80.8558C74.1278 80.8569 74.3264 80.3594 74.6222 79.7503C75.8738 77.173 76.0163 74.6661 75.07 71.8756C74.4906 70.1671 73.3092 68.0823 70.924 64.5588C68.1507 60.4623 67.4708 59.3721 66.7886 57.9275Z", | |
| fill: "#F50DB4" | |
| }), | |
| t("path", { | |
| d: "M28.3782 73.4506C32.173 70.2943 36.8948 68.0521 41.1958 67.3639C43.0494 67.0672 46.1372 67.185 47.8537 67.6178C50.605 68.3113 53.0662 69.8648 54.3462 71.7156C55.5971 73.5245 56.1338 75.1008 56.6925 78.6081C56.913 79.9916 57.1527 81.3809 57.2252 81.6954C57.6449 83.5131 58.4614 84.966 59.4733 85.6957C61.0805 86.8544 63.8479 86.9265 66.5704 85.8804C67.0325 85.7028 67.4336 85.5801 67.4618 85.6078C67.5605 85.7044 66.1896 86.6083 65.2225 87.0842C63.9212 87.7245 62.8864 87.972 61.5115 87.972C59.0181 87.972 56.948 86.7226 55.2206 84.175C54.8807 83.6736 54.1167 82.1718 53.5228 80.8378C51.699 76.7403 50.7984 75.4921 48.6809 74.126C46.8381 72.9374 44.4615 72.7245 42.6736 73.588C40.325 74.7223 39.6698 77.6786 41.3518 79.5521C42.0204 80.2967 43.2671 80.939 44.2865 81.0638C46.1936 81.2975 47.8326 79.8684 47.8326 77.9717C47.8326 76.7402 47.352 76.0374 46.1423 75.4996C44.4901 74.7652 42.7141 75.6237 42.7226 77.1526C42.7263 77.8045 43.0145 78.214 43.6779 78.5097C44.1036 78.6994 44.1134 78.7144 43.7664 78.6434C42.2504 78.3337 41.8952 76.5335 43.1141 75.3383C44.5776 73.9036 47.6037 74.5367 48.6428 76.4951C49.0794 77.3177 49.1301 78.956 48.7495 79.9452C47.8976 82.1593 45.4138 83.3237 42.8941 82.6901C41.1787 82.2587 40.4801 81.7915 38.4119 79.6931C34.8179 76.0462 33.4226 75.3396 28.2413 74.5428L27.2484 74.3902L28.3782 73.4506Z", | |
| fill: "#F50DB4" | |
| }), | |
| t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M11.5147 8.18128C23.517 22.5305 31.7835 28.4507 32.7022 29.7015C33.4607 30.7343 33.1752 31.6628 31.8758 32.3905C31.1532 32.7951 29.6676 33.205 28.9238 33.205C28.0825 33.205 27.7936 32.8853 27.7936 32.8853C27.3058 32.4296 27.0311 32.5093 24.5261 28.1293C21.0483 22.8137 18.1379 18.4041 18.0585 18.3303C17.8749 18.1596 17.878 18.1653 24.1715 29.2574C25.1883 31.5693 24.3737 32.4179 24.3737 32.7471C24.3737 33.417 24.1882 33.7691 23.3494 34.6907C21.951 36.2274 21.3259 37.954 20.8746 41.5274C20.3687 45.5332 18.9462 48.3629 15.0041 53.2057C12.6965 56.0406 12.3189 56.5602 11.7366 57.7028C11.0032 59.1416 10.8015 59.9475 10.7198 61.7645C10.6334 63.6855 10.8016 64.9265 11.3975 66.7632C11.9191 68.3712 12.4636 69.433 13.8555 71.5567C15.0568 73.3894 15.7484 74.7513 15.7484 75.2841C15.7484 75.708 15.8306 75.7085 17.692 75.2945C22.1466 74.3036 25.7638 72.5609 27.7981 70.4252C29.0571 69.1033 29.3527 68.3733 29.3623 66.5619C29.3686 65.377 29.3263 65.1289 29.0011 64.4473C28.4718 63.3379 27.5083 62.4154 25.3845 60.9853C22.6019 59.1115 21.4133 57.603 21.085 55.5285C20.8157 53.8263 21.1282 52.6253 22.6676 49.4472C24.2609 46.1575 24.6558 44.7557 24.9229 41.4399C25.0954 39.2977 25.3343 38.4528 25.9591 37.7747C26.6108 37.0676 27.1975 36.8281 28.8103 36.611C31.4396 36.2572 33.1139 35.5871 34.4901 34.3379C35.6839 33.2543 36.1835 32.2101 36.2602 30.6382L36.3184 29.4468L35.6512 28.6806C33.2352 25.9057 9.89667 6 9.74799 6C9.71623 6 10.5113 6.98164 11.5147 8.18128ZM17.1047 63.9381C17.6509 62.9852 17.3607 61.7601 16.447 61.1617C15.5836 60.5962 14.2424 60.8625 14.2424 61.5994C14.2424 61.8243 14.3687 61.9879 14.6532 62.1322C15.1322 62.375 15.167 62.648 14.7901 63.2061C14.4084 63.7712 14.4392 64.2681 14.877 64.6057C15.5826 65.15 16.5815 64.8507 17.1047 63.9381Z", | |
| fill: "#F50DB4" | |
| }), | |
| t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M37.9777 37.236C36.7433 37.6095 35.5435 38.8981 35.172 40.2493C34.9454 41.0736 35.074 42.5196 35.4134 42.9662C35.9617 43.6874 36.492 43.8774 37.9277 43.8675C40.7388 43.8482 43.1825 42.6606 43.4666 41.176C43.6994 39.9591 42.6262 38.2726 41.1478 37.5321C40.385 37.1502 38.7626 36.9987 37.9777 37.236ZM41.2638 39.7671C41.6973 39.1604 41.5076 38.5047 40.7704 38.0611C39.3664 37.2167 37.2432 37.9155 37.2432 39.222C37.2432 39.8724 38.3504 40.5819 39.3653 40.5819C40.0408 40.5819 40.9652 40.1851 41.2638 39.7671Z", | |
| fill: "#F50DB4" | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), | |
| displayName: "Uniswap Wallet", | |
| rdns: "org.uniswap.app" | |
| }, | |
| okx_wallet: { | |
| displayName: "OKX Wallet", | |
| rdns: "com.okex.wallet", | |
| logo: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJDSURBVHgB7Zq9jtpAEMfHlhEgQLiioXEkoAGECwoKxMcTRHmC5E3IoyRPkPAEkI7unJYmTgEFTYwA8a3NTKScLnCHN6c9r1e3P2llWQy7M/s1Gv1twCP0ej37dDq9x+Zut1t3t9vZjDEHIiSRSPg4ZpDL5fxkMvn1cDh8m0wmfugfO53OoFQq/crn8wxfY9EymQyrVCqMfHvScZx1p9ls3pFxXBy/bKlUipGPrVbLuQqAfsCliq3zl0H84zwtjQrOw4Mt1W63P5LvBm2d+Xz+YzqdgkqUy+WgWCy+Mc/nc282m4FqLBYL+3g8fjDxenq72WxANZbLJeA13zDX67UDioL5ybXwafMYu64Ltn3bdDweQ5R97fd7GyhBQMipx4POeEDHIu2LfDdBIGGz+hJ9CQ1ABjoA2egAZPM6AgiCAEQhsi/C4jHyPA/6/f5NG3Ks2+3CYDC4aTccDrn6ojG54MnEvG00GoVmWLIRNZ7wTCwDHYBsdACy0QHIhiuRETxlICWpMMhGZHmqS8qH6JLyGegAZKMDkI0uKf8X4SWlaZo+Pp1bRrwlJU8ZKLIvUjKh0WiQ3sRUbNVq9c5Ebew7KEo2m/1p4jJ4qAmDaqDQBzj5XyiAT4VCQezJigAU+IDU+z8vJFnGWeC+bKQV/5VZ71FV6L7PA3gg3tXrdQ+DgLhC+75Wq3no69P3MC0NFQpx2lL04Ql9gHK1bRDjsSBIvScBnDTk1WrlGIZBorIDEYJj+rhdgnQ67VmWRe0zlplXl81vcyEt0rSoYDUAAAAASUVORK5CYII=" | |
| }, | |
| rabby_wallet: { | |
| logo: r => e("svg", { | |
| width: "52", | |
| height: "52", | |
| viewBox: "0 0 52 52", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...r, | |
| children: [t( | |
| "rect", { | |
| width: "52", | |
| height: "52", | |
| rx: "26", | |
| fill: "#7084FF" | |
| }), | |
| t("path", { | |
| d: "M43.6781 28.2954C45.1053 25.0988 38.0498 16.168 31.3094 12.4472C27.0608 9.56481 22.6337 9.96081 21.737 11.2264C19.7693 14.0039 28.2527 16.3574 33.9263 19.1037C32.7067 19.6348 31.5574 20.5879 30.8816 21.8067C28.7664 19.4915 24.1239 17.4977 18.6765 19.1037C15.0056 20.186 11.9547 22.7374 10.7756 26.5911C10.4891 26.4635 10.1719 26.3925 9.83814 26.3925C8.56192 26.3925 7.52734 27.4298 7.52734 28.7094C7.52734 29.989 8.56192 31.0263 9.83814 31.0263C10.0747 31.0263 10.8143 30.8672 10.8143 30.8672L22.6337 30.953C17.9068 38.4713 14.1713 39.5704 14.1713 40.8729C14.1713 42.1754 17.7455 41.8224 19.0876 41.3369C25.5121 39.0127 32.4123 31.7692 33.5964 29.6841C38.5688 30.3061 42.7476 30.3796 43.6781 28.2954Z", | |
| fill: "url(#paint0_linear_81034_11443)" | |
| }), t( | |
| "path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M33.8741 19.076C33.8926 19.084 33.911 19.092 33.9294 19.1001C34.1923 18.9962 34.1498 18.6068 34.0776 18.301C33.9116 17.5981 31.0479 14.7629 28.3588 13.493C24.6934 11.762 21.9946 11.8518 21.5972 12.65C22.3407 14.1849 25.8031 15.6258 29.4193 17.1308C30.9407 17.7639 32.4893 18.4084 33.8741 19.076Z", | |
| fill: "url(#paint1_linear_81034_11443)" | |
| }), | |
| t("path", { | |
| fillRule: "evenodd", | |
| clipRule: "evenodd", | |
| d: "M29.272 34.5374C28.5323 34.2543 27.697 33.9945 26.7477 33.7587C27.7625 31.9382 27.9754 29.2432 27.0171 27.5392C25.6721 25.1478 23.9838 23.875 20.0605 23.875C17.9027 23.875 12.093 24.6037 11.9899 29.4663C11.9791 29.9743 11.9895 30.44 12.026 30.8685L22.6335 30.9456C21.2017 33.2229 19.8609 34.9113 18.6873 36.1947C20.0979 36.5571 21.2615 36.8612 22.3297 37.1404C23.3394 37.4043 24.2638 37.646 25.2309 37.8934C26.6941 36.8249 28.0698 35.6597 29.272 34.5374Z", | |
| fill: "url(#paint2_linear_81034_11443)" | |
| }), t( | |
| "path", { | |
| d: "M10.6324 30.3712C11.0658 34.065 13.1596 35.5127 17.4381 35.9411C21.7166 36.3695 24.1708 36.0821 27.4381 36.3801C30.167 36.6291 32.6036 38.0233 33.5075 37.5415C34.321 37.1079 33.8659 35.5412 32.7774 34.5361C31.3663 33.2333 29.4135 32.3274 25.9773 32.006C26.6621 30.1261 26.4702 27.4903 25.4067 26.0562C23.8689 23.9827 21.0305 23.0453 17.4381 23.4549C13.6848 23.8828 10.0885 25.7354 10.6324 30.3712Z", | |
| fill: "url(#paint3_linear_81034_11443)" | |
| }), | |
| e("defs", { | |
| children: [ | |
| e("linearGradient", { | |
| id: "paint0_linear_81034_11443", | |
| x1: "18.249", | |
| y1: "25.4646", | |
| x2: "43.3806", | |
| y2: "32.5728", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "white" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "white" | |
| }) | |
| ] | |
| }), | |
| e("linearGradient", { | |
| id: "paint1_linear_81034_11443", | |
| x1: "39.1432", | |
| y1: "24.9813", | |
| x2: "20.9691", | |
| y2: "6.81008", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#8697FF" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#8697FF", | |
| stopOpacity: "0" | |
| }) | |
| ] | |
| }), | |
| e("linearGradient", { | |
| id: "paint2_linear_81034_11443", | |
| x1: "29.7761", | |
| y1: "35.1727", | |
| x2: "12.345", | |
| y2: "25.1792", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "#8697FF" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| stopColor: "#8697FF", | |
| stopOpacity: "0" | |
| }) | |
| ] | |
| }), | |
| e("linearGradient", { | |
| id: "paint3_linear_81034_11443", | |
| x1: "19.7472", | |
| y1: "25.2716", | |
| x2: "31.5549", | |
| y2: "40.2352", | |
| gradientUnits: "userSpaceOnUse", | |
| children: [ | |
| t("stop", { | |
| stopColor: "white" | |
| }), | |
| t("stop", { | |
| offset: "0.983895", | |
| stopColor: "#D1D8FF" | |
| }) | |
| ] | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), | |
| displayName: "Rabby Wallet", | |
| rdns: "io.rabby.wallet" | |
| }, | |
| safe: { | |
| displayName: "Safe", | |
| logo: ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| width: "28", | |
| height: "28", | |
| viewBox: "0 0 28 28", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: "28px", | |
| width: "28px", | |
| ...r | |
| }, | |
| ...n, | |
| children: [t( | |
| "rect", { | |
| width: "28", | |
| height: "28", | |
| rx: "3", | |
| fill: "#12FF80" | |
| }), | |
| t("path", { | |
| d: "M22.5151 13.9979H20.4244C19.7981 13.9979 19.2945 14.5058 19.2945 15.128V18.163C19.2945 18.7894 18.7866 19.2931 18.1645 19.2931H9.8398C9.21344 19.2931 8.70981 19.8011 8.70981 20.4233V22.5185C8.70981 23.145 9.21767 23.6487 9.8398 23.6487H18.6427C19.2691 23.6487 19.7642 23.1407 19.7642 22.5185V20.8423C19.7642 20.2159 20.2721 19.7757 20.8942 19.7757H22.5151C23.1415 19.7757 23.6451 19.2677 23.6451 18.6455V15.1196C23.6451 14.4889 23.1373 13.9979 22.5151 13.9979Z", | |
| fill: "black" | |
| }), t( | |
| "path", { | |
| d: "M8.7098 9.84127C8.7098 9.21481 9.21766 8.71111 9.83978 8.71111H18.156C18.7823 8.71111 19.286 8.20317 19.286 7.58095V5.48995C19.286 4.86349 18.7781 4.35979 18.156 4.35979H9.35732C8.73096 4.35979 8.22733 4.86772 8.22733 5.48995V7.10264C8.22733 7.7291 7.71947 8.2328 7.09734 8.2328H5.48912C4.86276 8.2328 4.35913 8.74074 4.35913 9.36296V12.8931C4.35913 13.5196 4.86699 13.9979 5.49335 13.9979H7.58404C8.2104 13.9979 8.71403 13.4899 8.71403 12.8677L8.7098 9.84127Z", | |
| fill: "black" | |
| }), | |
| t("path", { | |
| d: "M13.0139 11.8011H15.0242C15.6802 11.8011 16.2092 12.3344 16.2092 12.9862V14.9968C16.2092 15.6529 15.6759 16.182 15.0242 16.182H13.0139C12.3579 16.182 11.8289 15.6487 11.8289 14.9968V12.9862C11.8289 12.3302 12.3621 11.8011 13.0139 11.8011Z", | |
| fill: "black" | |
| }) | |
| ] | |
| }) | |
| }, | |
| universal_profile: { | |
| displayName: "Universal Profile", | |
| logo: ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| fill: "none", | |
| height: "1024", | |
| width: "1024", | |
| viewBox: "0 0 1024 1024", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: 24, | |
| width: 24, | |
| ...r | |
| }, | |
| ...n, | |
| children: [e( | |
| "filter", { | |
| id: "a", | |
| "color-interpolation-filters": "sRGB", | |
| filterUnits: "userSpaceOnUse", | |
| height: "1228", | |
| width: "1244", | |
| x: "-72", | |
| y: "-72", | |
| children: [ | |
| t("feFlood", { | |
| "flood-opacity": "0", | |
| result: "BackgroundImageFix" | |
| }), | |
| t("feBlend", { | |
| in: "SourceGraphic", | |
| in2: "BackgroundImageFix", | |
| mode: "normal", | |
| result: "shape" | |
| }), | |
| t("feColorMatrix", { | |
| in: "SourceAlpha", | |
| result: "hardAlpha", | |
| type: "matrix", | |
| values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" | |
| }), | |
| t("feOffset", { | |
| dx: "-72", | |
| dy: "-72" | |
| }), | |
| t("feGaussianBlur", { | |
| stdDeviation: "54" | |
| }), | |
| t("feComposite", { | |
| in2: "hardAlpha", | |
| k2: "-1", | |
| k3: "1", | |
| operator: "arithmetic" | |
| }), | |
| t("feColorMatrix", { | |
| type: "matrix", | |
| values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0" | |
| }), | |
| t("feBlend", { | |
| in2: "shape", | |
| mode: "normal", | |
| result: "effect1_innerShadow_3981_20791" | |
| }), | |
| t("feColorMatrix", { | |
| in: "SourceAlpha", | |
| result: "hardAlpha", | |
| type: "matrix", | |
| values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" | |
| }), | |
| t("feOffset", { | |
| dx: "152", | |
| dy: "132" | |
| }), | |
| t("feGaussianBlur", { | |
| stdDeviation: "74" | |
| }), | |
| t("feComposite", { | |
| in2: "hardAlpha", | |
| k2: "-1", | |
| k3: "1", | |
| operator: "arithmetic" | |
| }), | |
| t("feColorMatrix", { | |
| type: "matrix", | |
| values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.15 0" | |
| }), | |
| t("feBlend", { | |
| in2: "effect1_innerShadow_3981_20791", | |
| mode: "normal", | |
| result: "effect2_innerShadow_3981_20791" | |
| }), | |
| t("feColorMatrix", { | |
| in: "SourceAlpha", | |
| result: "hardAlpha", | |
| type: "matrix", | |
| values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" | |
| }), | |
| t("feOffset", { | |
| dx: "32", | |
| dy: "20" | |
| }), | |
| t("feGaussianBlur", { | |
| stdDeviation: "50" | |
| }), | |
| t("feComposite", { | |
| in2: "hardAlpha", | |
| k2: "-1", | |
| k3: "1", | |
| operator: "arithmetic" | |
| }), | |
| t("feColorMatrix", { | |
| type: "matrix", | |
| values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0" | |
| }), | |
| t("feBlend", { | |
| in2: "effect2_innerShadow_3981_20791", | |
| mode: "normal", | |
| result: "effect3_innerShadow_3981_20791" | |
| }) | |
| ] | |
| }), | |
| e("filter", { | |
| id: "b", | |
| "color-interpolation-filters": "sRGB", | |
| filterUnits: "userSpaceOnUse", | |
| height: "352", | |
| width: "747", | |
| x: "142", | |
| y: "352", | |
| children: [ | |
| t("feFlood", { | |
| "flood-opacity": "0", | |
| result: "BackgroundImageFix" | |
| }), | |
| t("feBlend", { | |
| in: "SourceGraphic", | |
| in2: "BackgroundImageFix", | |
| mode: "normal", | |
| result: "shape" | |
| }), | |
| t("feColorMatrix", { | |
| in: "SourceAlpha", | |
| result: "hardAlpha", | |
| type: "matrix", | |
| values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" | |
| }), | |
| t("feOffset", { | |
| dx: "8", | |
| dy: "12" | |
| }), | |
| t("feGaussianBlur", { | |
| stdDeviation: "5" | |
| }), | |
| t("feComposite", { | |
| in2: "hardAlpha", | |
| k2: "-1", | |
| k3: "1", | |
| operator: "arithmetic" | |
| }), | |
| t("feColorMatrix", { | |
| type: "matrix", | |
| values: "0 0 0 0 0.120833 0 0 0 0 0.120833 0 0 0 0 0.120833 0 0 0 0.69 0" | |
| }), | |
| t("feBlend", { | |
| in2: "shape", | |
| mode: "normal", | |
| result: "effect1_innerShadow_3981_20791" | |
| }) | |
| ] | |
| }), e( | |
| "linearGradient", { | |
| id: "c", | |
| gradientUnits: "userSpaceOnUse", | |
| x1: "0", | |
| x2: "1024", | |
| y1: "0", | |
| y2: "1024", | |
| children: [ | |
| t("stop", { | |
| offset: "0", | |
| "stop-color": "#8992d1" | |
| }), | |
| t("stop", { | |
| offset: "1", | |
| "stop-color": "#646c9f" | |
| }) | |
| ] | |
| }), | |
| t("clipPath", { | |
| id: "d", | |
| children: t( | |
| "path", { | |
| d: "m0 0h1024v1024h-1024z" | |
| } | |
| ) | |
| }), e( | |
| "g", { | |
| "clip-path": "url(#d)", | |
| children: [ | |
| t("g", { | |
| filter: "url(#a)", | |
| children: t( | |
| "rect", { | |
| fill: "url(#c)", | |
| height: "1024", | |
| rx: "230", | |
| width: "1024" | |
| } | |
| ) | |
| }), | |
| e("g", { | |
| fill: "#fff", | |
| filter: "url(#b)", | |
| children: [ | |
| t("path", { | |
| d: "m212.459 354h-54.459c-8.837 0-16 7.163-16 16v203c0 66.826 54.174 121 121 121h44c66.826 0 121-54.174 121-121v-203c0-8.837-7.163-16-16-16h-56.548c-8.837 0-16 7.163-16 16v198.829c0 28.607-23.19 51.797-51.797 51.797-32.693 0-59.196-26.503-59.196-59.196v-191.43c0-8.837-7.163-16-16-16z" | |
| }), | |
| t("path", { | |
| d: "m868.426 352h-68.495c-6.98 0-12.487 5.934-11.967 12.895l14.206 190c.468 6.263 5.686 11.105 11.966 11.105h45.412c6.409 0 11.687-5.037 11.987-11.44l8.878-190c.32-6.84-5.14-12.56-11.987-12.56z" | |
| }), | |
| t("ellipse", { | |
| cx: "834", | |
| cy: "649.5", | |
| rx: "47", | |
| ry: "44.5" | |
| }), | |
| t("path", { | |
| "clip-rule": "evenodd", | |
| d: "m522 687h50c8.837 0 16-7.163 16-16v-80c0-8.837 7.163-16 16-16h33.5c61.58 0 111.5-49.92 111.5-111.5s-49.92-111.5-111.5-111.5h-115.5c-8.837 0-16 7.163-16 16v303c0 8.837 7.163 16 16 16zm70-252v58c0 6.627 5.373 12 12 12h14c20.987 0 38-17.013 38-38v-6c0-20.987-17.013-38-38-38h-14c-6.627 0-12 5.373-12 12z", | |
| "fill-rule": "evenodd" | |
| }) | |
| ] | |
| }) | |
| ] | |
| }) | |
| ] | |
| }) | |
| } | |
| }, | |
| Oc = (e, t, r) => Pc[e] | |
| ?.displayName ? | |
| "coinbase_wallet" === e ? Pc[r] | |
| .displayName : Pc[e].displayName : | |
| "wallet_connect_v2" === t && | |
| "wallet_connect" === e ? | |
| "Wallet Connect" : void 0, | |
| Rc = (e, t, r) => Pc[e]?.logo ? | |
| "coinbase_wallet" === e ? Pc[r] | |
| .logo : Pc[e].logo : | |
| "wallet_connect_v2" === t && | |
| "wallet_connect" === e ? cs : | |
| void 0; | |
| function Mc(e) { | |
| let t = e.toLowerCase(); | |
| return !!window?.webkit | |
| ?.messageHandlers | |
| ?.ReactNativeWebView || !!window | |
| ?.ReactNativeWebView || ["fbav", | |
| "fban", "instagram", | |
| "snapchat", "linkedinapp" | |
| ].some((e => t.includes(e))) | |
| } | |
| const Lc = ({ | |
| provider: r, | |
| displayName: n, | |
| logo: i, | |
| connectOnly: a, | |
| connector: o | |
| }) => { | |
| let { | |
| navigate: l | |
| } = ur(), { | |
| connectWallet: s | |
| } = P(), d = ct(), c = | |
| "wallet_connect_v2" === o | |
| .connectorType ? r : o | |
| .walletClientType, u = | |
| window.matchMedia( | |
| "(display-mode: standalone)" | |
| ).matches; | |
| return e(Dc, { | |
| onClick: "phantom" === | |
| o | |
| .connectorType || | |
| "solana_adapter" === | |
| o | |
| .connectorType && | |
| "phantom" === o | |
| .walletClientType ? | |
| () => { | |
| at() || | |
| "solana" === | |
| o | |
| .chainType && | |
| "isInstalled" in | |
| o && o | |
| .isInstalled ? | |
| (s(o, | |
| c), | |
| l(a ? | |
| hr | |
| .AWAITING_CONNECT_ONLY_CONNECTION : | |
| hr | |
| .AWAITING_CONNECTION | |
| ) | |
| ) : | |
| l(v ? hr | |
| .PHANTOM_INTERSTITIAL_SCREEN : | |
| hr | |
| .INSTALL_PHANTOM_SCREEN | |
| ) | |
| } : | |
| "coinbase_wallet" !== | |
| o | |
| .connectorType || | |
| "eoaOnly" !== o | |
| .connectionOptions || | |
| !v || u || | |
| ut() ? () => { | |
| (!Mc(window | |
| .navigator | |
| .userAgent | |
| ) || | |
| event | |
| ?.isTrusted | |
| ) && (s( | |
| o, c | |
| ), | |
| l(a ? hr | |
| .AWAITING_CONNECT_ONLY_CONNECTION : | |
| hr | |
| .AWAITING_CONNECTION | |
| )) | |
| } : () => { | |
| window | |
| .location | |
| .href = | |
| `https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}` | |
| }, | |
| children: [t(Ic, { | |
| icon: Rc( | |
| r, | |
| o | |
| .connectorType, | |
| o | |
| .walletClientType | |
| ) ?? | |
| i, | |
| name: o | |
| .walletClientType | |
| }), t( | |
| "span", { | |
| children: Oc( | |
| r, | |
| o | |
| .connectorType, | |
| o | |
| .walletClientType | |
| ) || | |
| n || | |
| o | |
| .walletClientType | |
| }), e( | |
| Uc, { | |
| id: "chip-container", | |
| children: [ | |
| d | |
| ?.walletClientType === | |
| c && | |
| d | |
| ?.chainType === | |
| o | |
| .chainType ? | |
| t(Fc, { | |
| color: "gray", | |
| children: "Recent" | |
| }) : | |
| t("span", { | |
| id: "connect-text", | |
| children: "Connect" | |
| }), | |
| "solana_adapter" === | |
| o | |
| .connectorType && | |
| t(Fc, { | |
| color: "gray", | |
| children: "Solana" | |
| }) | |
| ] | |
| })] | |
| }) | |
| }; | |
| let Dc = yr(cd)` | |
| /* Show "Connect" on hover */ | |
| > #chip-container > #connect-text { | |
| font-weight: 500; | |
| color: var(--privy-color-accent); | |
| opacity: 0; | |
| transition: opacity 0.1s ease-out; | |
| } | |
| :hover > #chip-container > #connect-text { | |
| opacity: 1; | |
| } | |
| @media (max-width: 440px) { | |
| > #chip-container > #connect-text { | |
| display: none; | |
| } | |
| } | |
| `, | |
| Fc = yr(ht)` | |
| margin-left: auto; | |
| `, | |
| Uc = yr.div` | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 8px; | |
| margin-left: auto; | |
| `; | |
| const Wc = ["coinbase_wallet"]; | |
| let Bc = ["metamask", "okx_wallet", | |
| "rainbow", "uniswap", | |
| "uniswap_extension", "zerion", | |
| "rabby_wallet", "cryptocom" | |
| ]; | |
| const Gc = ["safe"], | |
| Hc = ["phantom", | |
| "universal_profile"], | |
| zc = ({ | |
| connectOnly: t | |
| }) => { | |
| let { | |
| connectors: n | |
| } = P(), { | |
| app: i, | |
| data: a | |
| } = ur(); | |
| return e(r, { | |
| children: [...jc(a | |
| ?.externalConnectWallet | |
| ?.walletList ?? | |
| i | |
| .appearance | |
| .walletList, | |
| i | |
| .appearance | |
| .walletChainType, | |
| n, t, i | |
| .appearance | |
| .walletList, | |
| i | |
| .externalWallets | |
| .walletConnect | |
| .enabled | |
| )] | |
| }) | |
| }, | |
| jc = (e, r, n, i, a, o) => { | |
| let l = [], | |
| s = [], | |
| d = [], | |
| c = n.filter((e => | |
| "ethereum-only" === | |
| r ? "ethereum" === e | |
| .chainType : | |
| "solana-only" !== | |
| r || "solana" === e | |
| .chainType)), | |
| u = c.find((e => | |
| "wallet_connect_v2" === | |
| e.connectorType)); | |
| for (let [n, h] of e | |
| .entries()) { | |
| if ("detected_ethereum_wallets" === | |
| h || | |
| "detected_wallets" === h | |
| ) | |
| for (let [e, r] of c | |
| .filter((({ | |
| chainType: e, | |
| connectorType: t, | |
| walletClientType: r | |
| }) => | |
| "solana" !== | |
| e && ( | |
| "uniswap_wallet_extension" === | |
| r || | |
| "uniswap_extension" === | |
| r ? !a | |
| .includes( | |
| "uniswap" | |
| ) : | |
| "crypto.com_wallet_extension" === | |
| r ? !a | |
| .includes( | |
| "cryptocom" | |
| ) : | |
| "injected" === | |
| t && !a | |
| .includes( | |
| r)) | |
| )).entries() | |
| ) { | |
| let { | |
| walletClientType: a, | |
| walletBranding: o, | |
| chainType: d | |
| } = r; | |
| ("unknown" === a ? | |
| s : l).push(t( | |
| Lc, { | |
| connectOnly: i, | |
| provider: a, | |
| logo: o | |
| .icon, | |
| displayName: o | |
| .name, | |
| connector: r | |
| }, | |
| `${n}-${h}-${a}-${d}-${e}` | |
| )) | |
| } | |
| if ("detected_solana_wallets" === | |
| h || | |
| "detected_wallets" === h | |
| ) | |
| for (let [e, o] of c | |
| .filter((({ | |
| chainType: e, | |
| walletClientType: t | |
| }) => { | |
| if ("solana" === | |
| e) | |
| return "ethereum-only" !== | |
| r && | |
| ! | |
| a | |
| .includes( | |
| t | |
| ) | |
| })).entries()) { | |
| let { | |
| walletClientType: r, | |
| walletBranding: a, | |
| chainType: d | |
| } = o; | |
| ("unknown" === r ? | |
| s : l).push(t( | |
| Lc, { | |
| connectOnly: i, | |
| provider: r, | |
| logo: a | |
| .icon, | |
| displayName: a | |
| .name, | |
| connector: o | |
| }, | |
| `${n}-${h}-${r}-${d}-${e}` | |
| )) | |
| } | |
| if (Hc.includes(h)) { | |
| let e = c.find((e => | |
| "injected" === | |
| e | |
| .connectorType && | |
| e | |
| .walletClientType === | |
| h || e | |
| .connectorType === | |
| h)); | |
| if (e && l.push(t(Lc, { | |
| connectOnly: i, | |
| provider: h, | |
| connector: e | |
| }, | |
| `${n}-${h}` | |
| )), | |
| "solana-only" === | |
| r || | |
| "ethereum-and-solana" === | |
| r) { | |
| let e = c.find((({ | |
| chainType: e, | |
| connectorType: t, | |
| walletClientType: r | |
| }) => | |
| "solana" === | |
| e && | |
| "solana_adapter" === | |
| t && | |
| r === h | |
| )); | |
| e && l.push(t(Lc, { | |
| connectOnly: i, | |
| provider: h, | |
| connector: e | |
| }, | |
| `${h}-solana` | |
| )) | |
| } | |
| } else if (Bc.includes(h)) { | |
| let e = c.find((e => | |
| "uniswap" === | |
| h ? | |
| "uniswap_wallet_extension" === | |
| e | |
| .walletClientType || | |
| "uniswap_extension" === | |
| e | |
| .walletClientType : | |
| "cryptocom" === | |
| h ? | |
| "crypto.com_wallet_extension" === | |
| e | |
| .walletClientType : | |
| "injected" === | |
| e | |
| .connectorType && | |
| e | |
| .walletClientType === | |
| h)); | |
| o && !e && (e = u), e && | |
| l.push(t(Lc, { | |
| connectOnly: i, | |
| provider: h, | |
| connector: e, | |
| logo: "injected" === | |
| e | |
| .connectorType ? | |
| e | |
| .walletBranding | |
| .icon : | |
| void 0, | |
| displayName: "injected" === | |
| e | |
| .connectorType ? | |
| e | |
| .walletBranding | |
| .name : | |
| void 0 | |
| }, | |
| `${n}-${h}` | |
| )) | |
| } else if (Wc.includes(h)) { | |
| let e = c.find((({ | |
| connectorType: e | |
| }) => e === | |
| h)); | |
| e && l.push(t(Lc, { | |
| connectOnly: i, | |
| provider: h, | |
| connector: e | |
| }, | |
| `${n}-${h}` | |
| )) | |
| } else Gc.includes(h) ? u && | |
| d.push(t(Lc, { | |
| connectOnly: i, | |
| provider: h, | |
| connector: u | |
| }, `${n}-${h}`)) : | |
| "wallet_connect" === | |
| h && u && d.push(t(Lc, { | |
| connectOnly: i, | |
| provider: h, | |
| connector: u | |
| }, `${n}-${h}`)) | |
| } | |
| return [...s, ...l, ...d] | |
| }; | |
| const qc = e => e?.privyErrorCode === A | |
| .LINKED_TO_ANOTHER_USER ? nr | |
| .ERROR_USER_EXISTS : | |
| e instanceof ir && !e.details | |
| .default ? e.details : | |
| e instanceof Jt ? nr | |
| .ERROR_TIMED_OUT : e instanceof tr ? | |
| nr.ERROR_USER_REJECTED_CONNECTION : | |
| e?.privyErrorCode === A | |
| .CANNOT_LINK_MORE_OF_TYPE ? nr | |
| .ERROR_USER_LIMIT_REACHED : nr | |
| .ERROR_WALLET_CONNECTION; | |
| let Vc = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 24px; | |
| width: 100%; | |
| `, | |
| Kc = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| align-items: center; | |
| width: 100%; | |
| height: 82px; | |
| > div { | |
| position: relative; | |
| } | |
| > div > span { | |
| position: absolute; | |
| left: -41px; | |
| top: -41px; | |
| } | |
| > div > :last-child { | |
| position: absolute; | |
| left: -19px; | |
| top: -19px; | |
| } | |
| `; | |
| const Yc = n => { | |
| let i = n.walletLogo; | |
| return t(r, { | |
| children: t(Kc, { | |
| children: e( | |
| "div", { | |
| children: [ | |
| t(Ss, { | |
| success: n | |
| .success, | |
| fail: n | |
| .fail | |
| }), | |
| "string" == | |
| typeof i ? | |
| t("span", { | |
| style: { | |
| background: `url('${i}')`, | |
| height: "38px", | |
| width: "38px", | |
| borderRadius: "6px", | |
| margin: "auto", | |
| backgroundSize: "cover" | |
| } | |
| }) : | |
| t(i, { | |
| style: { | |
| width: "38px", | |
| height: "38px" | |
| } | |
| }) | |
| ] | |
| } | |
| ) | |
| }) | |
| }) | |
| }; | |
| let Zc = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 24px; | |
| width: 100%; | |
| `; | |
| const Xc = ({ | |
| name: e, | |
| logoUrl: r | |
| }) => "string" == typeof r ? t( | |
| "img", { | |
| src: r, | |
| alt: `${e??"Provider app"} logo`, | |
| style: { | |
| width: "38px", | |
| height: "38px", | |
| maxHeight: "90px", | |
| maxWidth: "180px", | |
| borderRadius: "8px" | |
| } | |
| }) : t("span", {}); | |
| let Qc = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| margin-left: 27px; | |
| margin-right: 27px; | |
| gap: 24px; | |
| `; | |
| function Jc({ | |
| ...e | |
| }) { | |
| return t("svg", { | |
| width: "48", | |
| height: "49", | |
| viewBox: "0 0 48 49", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...e, | |
| children: t("path", { | |
| d: "M24 16.5V24.5M24 32.5H24.02M15.72 4.5H32.28L44 16.22V32.78L32.28 44.5H15.72L4 32.78V16.22L15.72 4.5Z", | |
| stroke: "#110F2A", | |
| strokeWidth: "3", | |
| strokeLinecap: "round", | |
| strokeLinejoin: "round" | |
| }) | |
| }) | |
| } | |
| let eu = yr.div` | |
| display: flex; | |
| gap: 10px; | |
| `, | |
| tu = yr(yt)` | |
| margin-top: 1.5rem; | |
| `; | |
| const ru = () => t(nu, { | |
| children: e(iu, { | |
| children: [t( | |
| au, {}), | |
| t( | |
| ou, {}) | |
| ] | |
| }) | |
| }); | |
| let nu = yr.div` | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| flex-grow: 1; | |
| margin: 12px; | |
| padding: 16px; | |
| @media all and (display-mode: standalone) { | |
| margin-bottom: 30px; | |
| } | |
| `, | |
| iu = yr.div` | |
| position: relative; | |
| height: 140px; | |
| width: 140px; | |
| opacity: 1; | |
| animation: fadein 200ms ease; | |
| `, | |
| au = yr.div` | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| bottom: 0; | |
| left: 0; | |
| width: 140px; | |
| height: 140px; | |
| && { | |
| border: 4px solid var(--privy-color-accent-light); | |
| border-radius: 50%; | |
| } | |
| `, | |
| ou = yr.div` | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| bottom: 0; | |
| left: 0; | |
| width: 140px; | |
| height: 140px; | |
| animation: spin 1200ms linear infinite; | |
| && { | |
| border: 4px solid; | |
| border-color: var(--privy-color-accent) transparent transparent transparent; | |
| border-radius: 50%; | |
| } | |
| @keyframes spin { | |
| from { | |
| transform: rotate(0deg); | |
| } | |
| to { | |
| transform: rotate(360deg); | |
| } | |
| } | |
| `; | |
| const lu = ["error", | |
| "invalid_request_arguments", | |
| "wallet_not_on_device", | |
| "invalid_recovery_pin", | |
| "insufficient_funds", | |
| "missing_or_invalid_mfa", | |
| "mfa_verification_max_attempts_reached", | |
| "mfa_timeout", | |
| "twilio_verification_failed" | |
| ]; | |
| class su extends Error { | |
| constructor(e, t) { | |
| super(t), this.type = e | |
| } | |
| } | |
| function du(e) { | |
| let t = e.type; | |
| return "string" == typeof t && lu | |
| .includes(t) | |
| } | |
| function cu(e) { | |
| return du(e) && | |
| "wallet_not_on_device" === e | |
| .type | |
| } | |
| function uu(e) { | |
| return !!du(e) && "mfa_timeout" === | |
| e.type | |
| } | |
| function hu(e) { | |
| return !!du(e) && | |
| "missing_or_invalid_mfa" === e | |
| .type | |
| } | |
| function pu(e) { | |
| return !!du(e) && | |
| "mfa_verification_max_attempts_reached" === | |
| e.type | |
| } | |
| function mu(e) { | |
| return !(!du(e) || !e.message | |
| .includes("code 429")) | |
| } | |
| function fu(e) { | |
| return !! function(e) { | |
| let t = e.type; | |
| return "string" == | |
| typeof t && | |
| "client_error" === t | |
| }(e) && "MFA canceled" === e | |
| .message | |
| } | |
| function gu({ | |
| isCreatingWallet: e, | |
| skipSplashScreen: t | |
| }) { | |
| return e ? hr | |
| .EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN : | |
| t ? hr | |
| .EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN : | |
| hr | |
| .EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN | |
| } | |
| function yu({ | |
| walletAction: e, | |
| availableRecoveryMethods: t, | |
| legacySetWalletPasswordFlow: r, | |
| isResettingPassword: n, | |
| showAutomaticRecovery: i | |
| }) { | |
| return i ? hr | |
| .EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN : | |
| r || 1 === t.length ? gu({ | |
| isCreatingWallet: "create" === | |
| e, | |
| skipSplashScreen: n | |
| }) : hr | |
| .EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN | |
| } | |
| function wu(e) { | |
| switch (e) { | |
| case "user-passcode": | |
| return hr | |
| .EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN; | |
| case "google-drive": | |
| case "icloud": | |
| return hr | |
| .EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN; | |
| default: | |
| throw Error( | |
| "Recovery method not supported" | |
| ) | |
| } | |
| } | |
| async function vu({ | |
| api: e, | |
| provider: t | |
| }) { | |
| let r = il(), | |
| n = al(), | |
| i = await ol(r); | |
| try { | |
| return "icloud" === t ? { | |
| url: (await e.post( | |
| "/api/v1/recovery/oauth/init_icloud", { | |
| client_type: "web" | |
| })).url | |
| } : { | |
| url: (await e.post( | |
| "/api/v1/recovery/oauth/init", { | |
| redirect_to: window | |
| .location | |
| .href, | |
| code_challenge: i, | |
| state_code: n | |
| })).url, | |
| codeVerifier: r, | |
| stateCode: n, | |
| provider: t | |
| } | |
| } catch (e) { | |
| throw x(e) | |
| } | |
| } | |
| async function Cu({ | |
| api: e, | |
| provider: t, | |
| stateCode: r, | |
| codeVerifier: n, | |
| authorizationCode: i | |
| }) { | |
| if (!i || !r) throw new $( | |
| "[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate." | |
| ); | |
| if ("undefined" === i) | |
| throw new $( | |
| "User denied confirmation during OAuth flow" | |
| ); | |
| try { | |
| return (await e.post( | |
| "/api/v1/recovery/oauth/authenticate", { | |
| authorization_code: i, | |
| state_code: r, | |
| code_verifier: n, | |
| provider: t | |
| })).access_token | |
| } catch (e) { | |
| let t = x(e); | |
| if (t.privyErrorCode) | |
| throw new $(t.message || | |
| "Invalid code during OAuth flow.", | |
| void 0, t | |
| .privyErrorCode); | |
| if ("User denied confirmation during OAuth flow" === | |
| t.message) throw new $( | |
| "Invalid code during oauth flow.", | |
| void 0, A | |
| .OAUTH_USER_DENIED | |
| ); | |
| throw new $( | |
| "Invalid code during OAuth flow.", | |
| void 0, A | |
| .UNKNOWN_AUTH_ERROR) | |
| } | |
| } | |
| let bu = yr.div` | |
| height: 44px; | |
| `; | |
| const Eu = ({ | |
| children: r, | |
| theme: n | |
| }) => e($u, { | |
| $theme: n, | |
| children: [t(Ir, { | |
| width: "1.25rem", | |
| color: "dark" === | |
| n ? | |
| "#FDE68A" : | |
| "var(--privy-color-warn)" | |
| }), r] | |
| }); | |
| let $u = yr.div` | |
| display: flex; | |
| gap: 0.5rem; | |
| background-color: ${e=>"dark"===e.$theme?"var(--privy-color-background-2)":"var(--privy-color-warn-light)"}; | |
| ${e=>"dark"===e.$theme?"color: #FDE68A;":""} | |
| align-items: flex-start; | |
| text-align: left; | |
| padding: 0.5rem 0.75rem; | |
| font-size: 0.8125rem; | |
| font-weight: 400; | |
| line-height: 1.125rem; /* 150% */ | |
| padding: 0.75rem; | |
| && { | |
| border-radius: var(--privy-border-radius-sm); | |
| } | |
| `; | |
| const xu = yr.span` | |
| margin-top: 4px; | |
| color: var(--privy-color-foreground); | |
| text-align: center; | |
| font-size: 0.875rem; | |
| font-weight: 400; | |
| line-height: 1.375rem; /* 157.143% */ | |
| && a { | |
| color: var(--privy-color-accent); | |
| } | |
| `, | |
| Au = yr.span` | |
| color: var(--privy-color-foreground); | |
| font-size: 1.125rem; | |
| font-weight: 600; | |
| line-height: 1.875rem; /* 166.667% */ | |
| text-align: center; | |
| `; | |
| function ku(r) { | |
| let [n, i] = s(r.dimensions.width), | |
| [a, o] = s(void 0), d = l(null); | |
| p((() => { | |
| if (d.current && | |
| void 0 === n) { | |
| let { | |
| width: e | |
| } = d.current | |
| .getBoundingClientRect(); | |
| i(e) | |
| } | |
| let e = | |
| getComputedStyle( | |
| document | |
| .documentElement | |
| ); | |
| o({ | |
| background: e | |
| .getPropertyValue( | |
| "--privy-color-background" | |
| ), | |
| background2: e | |
| .getPropertyValue( | |
| "--privy-color-background-2" | |
| ), | |
| foreground3: e | |
| .getPropertyValue( | |
| "--privy-color-foreground-3" | |
| ), | |
| foregroundAccent: e | |
| .getPropertyValue( | |
| "--privy-color-foreground-accent" | |
| ), | |
| accent: e | |
| .getPropertyValue( | |
| "--privy-color-accent" | |
| ), | |
| accentDark: e | |
| .getPropertyValue( | |
| "--privy-color-accent-dark" | |
| ), | |
| success: e | |
| .getPropertyValue( | |
| "--privy-color-success" | |
| ) | |
| }) | |
| }), []); | |
| let c = "ethereum" === r.wallet | |
| .chainType && !r.wallet | |
| .imported; | |
| return t("div", { | |
| ref: d, | |
| children: n && e(_u, { | |
| children: [ | |
| t("iframe", { | |
| style: { | |
| position: "absolute", | |
| zIndex: 1 | |
| }, | |
| width: n, | |
| height: r | |
| .dimensions | |
| .height, | |
| allow: "clipboard-write self *", | |
| src: wt(r | |
| .origin, | |
| `/apps/${r.appId}/embedded-wallets/export`, { | |
| client_id: r | |
| .appClientId, | |
| address: r | |
| .wallet | |
| .address, | |
| width: `${n}px`, | |
| caid: r | |
| .clientAnalyticsId, | |
| phrase_export: c, | |
| ... | |
| a | |
| }, { | |
| token: r | |
| .accessToken | |
| } | |
| ) | |
| }), | |
| t(Su, { | |
| children: "Loading..." | |
| }), | |
| c && | |
| t(Su, { | |
| children: "Loading..." | |
| }) | |
| ] | |
| }) | |
| }) | |
| } | |
| let Tu = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1.25rem; | |
| text-align: left; | |
| `, | |
| _u = yr.div` | |
| overflow: visible; | |
| position: relative; | |
| overflow: none; | |
| height: 44px; | |
| display: flex; | |
| gap: 12px; | |
| `, | |
| Su = yr.div` | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 100%; | |
| height: 100%; | |
| font-size: 16px; | |
| font-weight: 500; | |
| border-radius: var(--privy-border-radius-md); | |
| background-color: var(--privy-color-background-2); | |
| color: var(--privy-color-foreground-3); | |
| `; | |
| function Nu() { | |
| let { | |
| refreshUser: e, | |
| createAnalyticsEvent: t, | |
| initializeWalletProxy: r | |
| } = P(), n = l(!1); | |
| return { | |
| createWallet: m((async ({ | |
| user: i, | |
| recoveryPassword: a | |
| }) => { | |
| let o = | |
| await Ov(); | |
| if (!o) | |
| throw t({ | |
| eventName: "embedded_wallet_creation_failed", | |
| payload: { | |
| error: "Missing access token for user." | |
| } | |
| }), | |
| Error( | |
| "An error has occured, please login again." | |
| ); | |
| try { | |
| t({ | |
| eventName: "embedded_wallet_creation_started" | |
| }); | |
| let l = | |
| await r( | |
| we | |
| ); | |
| if (!l) | |
| throw Error( | |
| "walletProxy does not exist." | |
| ); | |
| let s = | |
| new Promise( | |
| ((e, t) => { | |
| setTimeout | |
| ((() => { | |
| t(Error( | |
| "walletProxy.create timed out.")) | |
| }), | |
| 2e4 | |
| ) | |
| }) | |
| ), | |
| d = | |
| zt( | |
| i); | |
| if (! | |
| await Promise | |
| .race( | |
| [l.create({ | |
| accessToken: o, | |
| recoveryPassword: a, | |
| solanaAddress: d | |
| ?.address | |
| }), | |
| s | |
| ] | |
| ) | |
| ) | |
| throw Error( | |
| "walletProxy.create did not send a response." | |
| ); | |
| let c = | |
| await e(); | |
| if (!c) | |
| throw Error( | |
| "Failed to refresh user." | |
| ); | |
| let u = | |
| Ht( | |
| c); | |
| if (!u) | |
| throw Error( | |
| "Updated user is missing embedded wallet." | |
| ); | |
| return t({ | |
| eventName: "embedded_wallet_creation_completed", | |
| payload: { | |
| walletAddress: u | |
| .address | |
| } | |
| }), | |
| n | |
| .current = ! | |
| 0, u | |
| } catch ( | |
| i) { | |
| if (n | |
| .current | |
| ) | |
| return; | |
| throw t({ | |
| eventName: "embedded_wallet_creation_failed", | |
| payload: { | |
| error: i | |
| .toString() | |
| } | |
| }), | |
| console | |
| .warn( | |
| i | |
| ), | |
| i | |
| } | |
| }), []) | |
| } | |
| } | |
| let Iu = yr.div` | |
| height: 44px; | |
| `, | |
| Pu = wr` | |
| font-size: 14px; | |
| font-style: normal; | |
| font-weight: 400; | |
| line-height: 20px; | |
| letter-spacing: -0.008px; | |
| text-align: left; | |
| transition: color 0.1s ease-in; | |
| `; | |
| const Ou = yr.span` | |
| ${Pu} | |
| transition: color 0.1s ease-in; | |
| color: ${({error:e})=>e?"var(--privy-color-error)":"var(--privy-color-foreground-3)"}; | |
| text-transform: ${({error:e})=>e?"":"capitalize"}; | |
| &[aria-hidden='true'] { | |
| visibility: hidden; | |
| } | |
| `, | |
| Ru = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| flex-grow: 1; | |
| `, | |
| Mu = yr(Ms)` | |
| ${e=>e.hideAnimations&&wr` | |
| && { | |
| transition: none; | |
| } | |
| `} | |
| `; | |
| let Lu = wr` | |
| && { | |
| width: 100%; | |
| border-width: 1px; | |
| border-radius: var(--privy-border-radius-md); | |
| border-color: var(--privy-color-foreground-3); | |
| background: var(--privy-color-background); | |
| color: var(--privy-color-foreground); | |
| padding: 12px; | |
| font-size: 16px; | |
| font-style: normal; | |
| font-weight: 300; | |
| line-height: 22px; /* 137.5% */ | |
| } | |
| `; | |
| const Du = yr.input` | |
| ${Lu} | |
| &::placeholder { | |
| color: var(--privy-color-foreground-3); | |
| font-style: italic; | |
| font-size: 14px; | |
| } | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| white-space: nowrap; | |
| `, | |
| Fu = yr.div` | |
| ${Lu} | |
| `, | |
| Uu = yr.div` | |
| position: relative; | |
| width: 100%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: ${({centered:e})=>e?"center":"space-between"}; | |
| `, | |
| Wu = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| margin: 32px 0; | |
| gap: 4px; | |
| & h3 { | |
| font-size: 18px; | |
| font-style: normal; | |
| font-weight: 600; | |
| line-height: 24px; | |
| } | |
| & p { | |
| max-width: 300px; | |
| font-size: 14px; | |
| font-style: normal; | |
| font-weight: 400; | |
| line-height: 20px; | |
| } | |
| `, | |
| Bu = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| gap: 10px; | |
| padding-bottom: 1rem; | |
| `, | |
| Gu = yr.div` | |
| display: flex; | |
| text-align: left; | |
| align-items: center; | |
| gap: 8px; | |
| max-width: 300px; | |
| font-size: 14px; | |
| font-style: normal; | |
| font-weight: 400; | |
| line-height: 20px; | |
| letter-spacing: -0.008px; | |
| margin: 0 8px; | |
| color: var(--privy-color-foreground-2); | |
| > :first-child { | |
| min-width: 24px; | |
| } | |
| `; | |
| yr.div` | |
| height: var(--privy-height-modal-full); | |
| @media (max-width: 440px) { | |
| height: var(--privy-height-modal-compact); | |
| } | |
| `; | |
| const Hu = yr(Rs)` | |
| display: flex; | |
| flex: 1; | |
| gap: 4px; | |
| justify-content: center; | |
| && { | |
| background: var(--privy-color-background); | |
| border-radius: var(--privy-border-radius-md); | |
| border-color: var(--privy-color-foreground-3); | |
| border-width: 1px; | |
| } | |
| `, | |
| zu = yr.div` | |
| position: absolute; | |
| right: 0.5rem; | |
| display: flex; | |
| flex-direction: row; | |
| justify-content: space-around; | |
| align-items: center; | |
| `, | |
| ju = yr(Hr)` | |
| height: 1.25rem; | |
| width: 1.25rem; | |
| stroke: var(--privy-color-accent); | |
| cursor: pointer; | |
| :active { | |
| stroke: var(--privy-color-accent-light); | |
| } | |
| `, | |
| qu = yr(jr)` | |
| height: 1.25rem; | |
| width: 1.25rem; | |
| stroke: var(--privy-color-accent); | |
| cursor: pointer; | |
| :active { | |
| stroke: var(--privy-color-accent-light); | |
| } | |
| `, | |
| Vu = yr(zr)` | |
| height: 1.25rem; | |
| width: 1.25rem; | |
| stroke: var(--privy-color-accent); | |
| cursor: pointer; | |
| :active { | |
| stroke: var(--privy-color-accent-light); | |
| } | |
| `, | |
| Ku = yr.progress` | |
| height: 4px; | |
| width: 100%; | |
| margin: 8px 0; | |
| /* border-radius: 9999px; */ | |
| ::-webkit-progress-bar { | |
| border-radius: 8px; | |
| background: var(--privy-color-foreground-4); | |
| } | |
| ::-webkit-progress-value { | |
| border-radius: 8px; | |
| transition: all 0.1s ease-out; | |
| background: ${({label:e})=>("Strong"===e?"#78dca6":"Medium"===e&&"var(--privy-color-warn)")||"var(--privy-color-error)"}; | |
| } | |
| `, | |
| Yu = ({ | |
| buttonHideAnimations: n, | |
| buttonLoading: i, | |
| password: a, | |
| onSubmit: o, | |
| onBack: l | |
| }) => { | |
| let [d, c] = s(!0), [u, h] = s(! | |
| 1), [m, f] = s(""), g = | |
| a === m; | |
| return p((() => { | |
| m && !u && h(!0) | |
| }), [m]), e(r, { | |
| children: [t(Zs, { | |
| closeable: | |
| ! | |
| 1, | |
| backFn: l | |
| }), t( | |
| oc, {}), | |
| e(Ru, { | |
| children: [ | |
| e(Wu, { | |
| children: [ | |
| t(Ar, { | |
| height: 48, | |
| width: 48, | |
| stroke: "var(--privy-color-background)", | |
| fill: "var(--privy-color-accent)" | |
| }), | |
| t("h3", { | |
| style: { | |
| color: "var(--privy-color-foreground)" | |
| }, | |
| children: "Confirm your password" | |
| }), | |
| t("p", { | |
| style: { | |
| color: "var(--privy-color-foreground-2)" | |
| }, | |
| children: "Please re-enter your password below to continue." | |
| }) | |
| ] | |
| }), | |
| e(Uu, { | |
| children: [ | |
| t(Du, { | |
| value: m, | |
| onChange: e => | |
| f(e.target | |
| .value | |
| ), | |
| onKeyUp: e => { | |
| "Enter" === | |
| e.key && | |
| o() | |
| }, | |
| onBlur: () => | |
| h(! | |
| 0), | |
| placeholder: "confirm your password", | |
| type: d ? | |
| "password" : | |
| "text", | |
| style: { | |
| paddingRight: "2.3rem" | |
| } | |
| }), | |
| t(zu, { | |
| style: { | |
| right: "0.75rem" | |
| }, | |
| children: d ? | |
| t(qu, { | |
| onClick: () => | |
| c(! | |
| 1) | |
| }) : | |
| t(Vu, { | |
| onClick: () => | |
| c(! | |
| 0) | |
| }) | |
| }) | |
| ] | |
| }), | |
| t(Ou, { | |
| "aria-hidden": | |
| ! | |
| u || | |
| g, | |
| error: | |
| ! | |
| 0, | |
| children: "Passwords do not match" | |
| }) | |
| ] | |
| }), t(Mu, { | |
| onClick: o, | |
| loading: i, | |
| disabled: | |
| ! | |
| g, | |
| hideAnimations: n, | |
| children: "Continue" | |
| }), t( | |
| lc, {}), | |
| t(st, {}) | |
| ] | |
| }) | |
| }, | |
| Zu = ({ | |
| className: r, | |
| checked: n, | |
| color: i = | |
| "var(--privy-color-accent)", | |
| ...a | |
| }) => t("label", { | |
| children: e(Xu, { | |
| className: r, | |
| children: [t( | |
| Ju, { | |
| checked: n, | |
| ... | |
| a | |
| }), t( | |
| eh, { | |
| color: i, | |
| checked: n, | |
| children: t( | |
| Qu, { | |
| viewBox: "0 0 24 24", | |
| children: t( | |
| "polyline", { | |
| points: "20 6 9 17 4 12" | |
| } | |
| ) | |
| } | |
| ) | |
| })] | |
| }) | |
| }); | |
| yr.label` | |
| && { | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| padding: 0.75rem 1rem; | |
| text-align: left; | |
| border-radius: 0.5rem; | |
| border: 1px solid var(--privy-color-foreground-4); | |
| width: 100%; | |
| } | |
| `; | |
| let Xu = yr.div` | |
| display: inline-block; | |
| vertical-align: middle; | |
| `, | |
| Qu = yr.svg` | |
| fill: none; | |
| stroke: white; | |
| stroke-width: 3px; | |
| `, | |
| Ju = yr.input.attrs({ | |
| type: "checkbox" | |
| })` | |
| border: 0; | |
| clip: rect(0 0 0 0); | |
| clippath: inset(50%); | |
| height: 1px; | |
| margin: -1px; | |
| overflow: hidden; | |
| padding: 0; | |
| position: absolute; | |
| white-space: nowrap; | |
| width: 1px; | |
| `, | |
| eh = yr.div` | |
| display: inline-block; | |
| width: 18px; | |
| height: 18px; | |
| transition: all 150ms; | |
| cursor: pointer; | |
| border-color: ${e=>e.color}; | |
| border-radius: 3px; | |
| background: ${e=>e.checked?e.color:"var(--privy-color-background)"}; | |
| && { | |
| /* This is necessary to override css reset for border width */ | |
| border-width: 1px; | |
| } | |
| ${Ju}:focus + & { | |
| box-shadow: 0 0 0 1px ${e=>e.color}; | |
| } | |
| ${Qu} { | |
| visibility: ${e=>e.checked?"visible":"hidden"}; | |
| } | |
| `; | |
| const th = ({ | |
| buttonHideAnimations: n, | |
| buttonLoading: i, | |
| onSubmit: a, | |
| onBack: o, | |
| config: l | |
| }) => { | |
| let [d, c] = s(!1); | |
| return e(r, { | |
| children: [t(Zs, { | |
| closeable: | |
| ! | |
| 1, | |
| backFn: o | |
| }), t( | |
| oc, {}), | |
| e(Ru, { | |
| children: [ | |
| e(Wu, { | |
| children: [ | |
| t(Ar, { | |
| height: 48, | |
| width: 48, | |
| stroke: "var(--privy-color-background)", | |
| fill: "var(--privy-color-error)" | |
| }), | |
| t("h3", { | |
| style: { | |
| color: "var(--privy-color-foreground)" | |
| }, | |
| children: "Confirm you have saved" | |
| }), | |
| t("p", { | |
| style: { | |
| color: "var(--privy-color-foreground-2)" | |
| }, | |
| children: "Losing access to your password means you will lose access to your account." | |
| }) | |
| ] | |
| }), | |
| t(Bu, { | |
| children: e( | |
| Gu, { | |
| style: { | |
| color: "var(--privy-color-error)", | |
| cursor: "pointer" | |
| }, | |
| onClick: e => { | |
| e.preventDefault(), | |
| c((e => ! | |
| e | |
| )) | |
| }, | |
| children: [ | |
| t(Zu, { | |
| color: "var(--privy-color-error)", | |
| readOnly: | |
| ! | |
| 0, | |
| checked: d | |
| }), | |
| t(r, { | |
| children: "I understand that if I lose my password and device, I will lose access to my account and my assets." | |
| }) | |
| ] | |
| } | |
| ) | |
| }) | |
| ] | |
| }), e(rh, { | |
| children: [ | |
| "user" === | |
| l | |
| .initiatedBy && | |
| t(Ws, { | |
| onClick: l | |
| .onCancel, | |
| disabled: i, | |
| children: "Cancel" | |
| }), | |
| t(Mu, { | |
| onClick: a, | |
| loading: i, | |
| hideAnimations: n, | |
| disabled: | |
| ! | |
| d, | |
| children: "Set Password" | |
| }) | |
| ] | |
| }), t( | |
| lc, {}), | |
| t(st, {}) | |
| ] | |
| }) | |
| }; | |
| let rh = yr.div` | |
| display: flex; | |
| gap: 10px; | |
| `, | |
| nh = /[a-z]/, | |
| ih = /[A-Z]/, | |
| ah = /[0-9]/, | |
| oh = "!@#$%^&*()\\-_+.", | |
| lh = `a-zA-Z0-9${oh}`, | |
| sh = RegExp(`[${oh}]`), | |
| dh = RegExp(`[${lh}]`); | |
| const ch = RegExp(`^[${lh}]{6,}$`), | |
| uh = () => Br.generatePassphrase(4, | |
| Gr); | |
| function hh(e) { | |
| return e > .9 ? "Strong" : e > .5 ? | |
| "Medium" : "Weak" | |
| } | |
| function ph(e = "") { | |
| return (.3 * function(e) { | |
| if (e.length < 8) | |
| return 0; | |
| let t = 0; | |
| return nh.test(e) && ( | |
| t += 1), ih | |
| .test(e) && (t += | |
| 1), ah.test(e) && ( | |
| t += 1), sh | |
| .test(e) && (t += | |
| 1), Math.max(0, Math | |
| .min(1, t / 3)) | |
| }(e) + Wr(e) / 95) / 2 | |
| } | |
| const mh = ({ | |
| buttonHideAnimations: n, | |
| buttonLoading: i, | |
| password: a = "", | |
| config: o, | |
| isResettingPassword: l, | |
| onSubmit: c, | |
| onClose: u, | |
| onBack: h, | |
| onPasswordChange: m, | |
| onPasswordGenerate: f | |
| }) => { | |
| let [g, y] = s(!1), [w, v] = s(! | |
| 1); | |
| p((() => { | |
| a && !w && v(!0) | |
| }), [a]); | |
| let C = d((() => w ? 6 > (a | |
| ?.length || 0) ? | |
| "Password must be at least 6 characters" : | |
| ch.test(a || "") ? | |
| null : | |
| `Invalid characters used ( ${((e="")=>[...new Set(e.split("").filter((e=>!dh.test(e))).map((e=>e.replace(" ","SPACE"))))])(a).join(" ")} )` : | |
| null), [a, w]), | |
| b = d((() => C ? { | |
| value: 0, | |
| label: "Weak" | |
| } : function(e = | |
| "") { | |
| let t = ph(e); | |
| return { | |
| value: t, | |
| label: hh(t) | |
| } | |
| }(a)), [a, C]), | |
| E = d((() => !a?.length || ! | |
| !C), [C, a]); | |
| return e(r, { | |
| children: [t(Zs, { | |
| onClose: u, | |
| closeable: "user" === | |
| o | |
| .initiatedBy, | |
| backFn: h | |
| }), t( | |
| oc, {}), | |
| e(Ru, { | |
| children: [ | |
| e(Wu, { | |
| children: [ | |
| t(qr, { | |
| height: 48, | |
| width: 48, | |
| stroke: "var(--privy-color-accent)" | |
| }), | |
| e("h3", { | |
| style: { | |
| color: "var(--privy-color-foreground)" | |
| }, | |
| children: [ | |
| l ? | |
| "Reset" : | |
| "Set", | |
| " your password" | |
| ] | |
| }), | |
| t("p", { | |
| style: { | |
| color: "var(--privy-color-foreground-2)" | |
| }, | |
| children: "Select a strong, memorable password to secure your account." | |
| }) | |
| ] | |
| }), | |
| e(Uu, { | |
| children: [ | |
| t(Du, { | |
| value: a, | |
| onChange: e => | |
| m(e.target | |
| .value | |
| ), | |
| onKeyUp: e => { | |
| "Enter" === | |
| e.key && | |
| c() | |
| }, | |
| placeholder: "enter or generate a strong password", | |
| type: g ? | |
| "password" : | |
| "text", | |
| style: { | |
| paddingRight: "3.8rem" | |
| } | |
| }), | |
| e(zu, { | |
| style: { | |
| width: "3.5rem" | |
| }, | |
| children: [ | |
| g ? | |
| t(qu, { | |
| onClick: () => | |
| y(! | |
| 1) | |
| }) : | |
| t(Vu, { | |
| onClick: () => | |
| y(! | |
| 0) | |
| }), | |
| t(ju, { | |
| onClick: f | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), | |
| t(Ku, { | |
| value: 0 === | |
| b | |
| .value ? | |
| .01 : | |
| b | |
| .value, | |
| label: b | |
| .label | |
| }), | |
| t(Ou, { | |
| error: | |
| ! | |
| ! | |
| C, | |
| children: C || | |
| `Password Strength: ${w?b.label:"--"}` | |
| }), | |
| e(gh, { | |
| children: [ | |
| t(fh, { | |
| children: e( | |
| Bu, { | |
| children: [ | |
| e(Gu, { | |
| children: [ | |
| t(Fr, { | |
| width: 24, | |
| height: 24, | |
| fill: "var(--privy-color-accent)" | |
| }), | |
| "This password is used to secure your account." | |
| ] | |
| }), | |
| e(Gu, { | |
| children: [ | |
| t(Fr, { | |
| width: 24, | |
| height: 24, | |
| fill: "var(--privy-color-accent)" | |
| }), | |
| "Use it to log in on a new environment, like another browser or device." | |
| ] | |
| }) | |
| ] | |
| } | |
| ) | |
| }), | |
| t(Mu, { | |
| onClick: c, | |
| loading: i, | |
| disabled: E, | |
| hideAnimations: n, | |
| children: "Continue" | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), t( | |
| lc, {}), | |
| t(st, {}) | |
| ] | |
| }) | |
| }; | |
| let fh = yr(Bu)` | |
| flex: 1; | |
| padding-top: 1rem; | |
| `, | |
| gh = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| `; | |
| const yh = ({ | |
| buttonHideAnimations: n, | |
| buttonLoading: i, | |
| appName: a, | |
| password: o, | |
| onSubmit: l, | |
| onBack: d | |
| }) => { | |
| let [c, u] = s(!1), h = m(( | |
| () => { | |
| u(!0), o && | |
| navigator | |
| .clipboard | |
| .writeText( | |
| o) | |
| }), [o]), p = m((() => { | |
| let e = document | |
| .createElement( | |
| "a"), | |
| t = a | |
| .toLowerCase() | |
| .replace( | |
| /[^a-z\s]/g, | |
| "") | |
| .replace( | |
| /\s/g, | |
| "-"), | |
| r = | |
| new Blob([ | |
| wh(a, | |
| o | |
| ) | |
| ], { | |
| type: "text/plain" | |
| }), | |
| n = URL | |
| .createObjectURL( | |
| r); | |
| e.href = n, e | |
| .target = | |
| "_blank", e | |
| .download = | |
| `${t}-privy-wallet-recovery.txt`, | |
| document | |
| .body | |
| .appendChild( | |
| e), e | |
| .click(), | |
| setTimeout(( | |
| () => { | |
| e.remove(), | |
| URL | |
| .revokeObjectURL( | |
| n | |
| ) | |
| }), | |
| 5e3) | |
| }), [o]); | |
| return e(r, { | |
| children: [t(Zs, { | |
| backFn: d, | |
| closeable: | |
| ! | |
| 1 | |
| }), t( | |
| oc, {}), | |
| e(Ru, { | |
| children: [ | |
| e(Wu, { | |
| children: [ | |
| t(Ar, { | |
| height: 48, | |
| width: 48, | |
| stroke: "var(--privy-color-background)", | |
| fill: "var(--privy-color-accent)" | |
| }), | |
| t("h3", { | |
| style: { | |
| color: "var(--privy-color-foreground)" | |
| }, | |
| children: "Save your password" | |
| }), | |
| t("p", { | |
| style: { | |
| color: "var(--privy-color-foreground-2)" | |
| }, | |
| children: "For your security, this password cannot be reset, so keep it somewhere safe." | |
| }) | |
| ] | |
| }), | |
| t(Uu, { | |
| centered: | |
| ! | |
| 0, | |
| children: t( | |
| Fu, { | |
| children: o | |
| } | |
| ) | |
| }), | |
| e("div", { | |
| style: { | |
| display: "flex", | |
| margin: "12px 0", | |
| gap: "12px" | |
| }, | |
| children: [ | |
| t(Hu, { | |
| onClick: h, | |
| children: e( | |
| r, | |
| c ? | |
| { | |
| children: [ | |
| t(Kr, { | |
| style: { | |
| width: 24, | |
| height: 24 | |
| }, | |
| stroke: "var(--privy-color-accent)" | |
| }), | |
| "Copied" | |
| ] | |
| } : | |
| { | |
| children: [ | |
| t(Yr, { | |
| style: { | |
| width: 24, | |
| height: 24 | |
| }, | |
| stroke: "var(--privy-color-accent)" | |
| }), | |
| "Copy" | |
| ] | |
| } | |
| ) | |
| }), | |
| e(Hu, { | |
| onClick: p, | |
| children: [ | |
| t(Vr, { | |
| style: { | |
| width: 24, | |
| height: 24 | |
| }, | |
| stroke: "var(--privy-color-accent)" | |
| }), | |
| "Download" | |
| ] | |
| }) | |
| ] | |
| }) | |
| ] | |
| }), t(Mu, { | |
| onClick: l, | |
| loading: i, | |
| hideAnimations: n, | |
| children: "Continue" | |
| }), t( | |
| lc, {}), | |
| t(st, {}) | |
| ] | |
| }) | |
| }; | |
| let wh = (e, t) => | |
| `Your wallet recovery password for ${e} is\n\n${t}\n\nYou will need this password to access your ${e} wallet on a new device. Please keep it somewhere safe.`; | |
| const vh = ({ | |
| error: n, | |
| onClose: i | |
| }) => e(r, { | |
| children: [t(Zs, { | |
| closeable: ! | |
| 1 | |
| }), t(oc, {}), e(rc, | |
| n ? { | |
| children: [ | |
| t(Ur, { | |
| fill: "var(--privy-color-error)", | |
| width: "64px", | |
| height: "64px" | |
| }), | |
| t(pc, { | |
| title: "Something went wrong", | |
| description: n | |
| }) | |
| ] | |
| } : { | |
| children: [ | |
| t(Fr, { | |
| fill: "var(--privy-color-success)", | |
| width: "64px", | |
| height: "64px" | |
| }), | |
| t(pc, { | |
| title: "Success" | |
| }) | |
| ] | |
| }), t(Ms, { | |
| onClick: i, | |
| children: "Close" | |
| }), t(lc, {}), t( | |
| st, {})] | |
| }); | |
| let Ch = (e, t) => { | |
| switch (e) { | |
| case "creating": | |
| return "back" === t ? | |
| e : "saving"; | |
| case "saving": | |
| return "back" === t ? | |
| "creating" : | |
| "confirming"; | |
| case "confirming": | |
| return "back" === t ? | |
| "saving" : | |
| "finalizing"; | |
| case "finalizing": | |
| return "back" === t ? | |
| "confirming" : | |
| "done"; | |
| default: | |
| return e | |
| } | |
| }; | |
| const bh = ({ | |
| onSubmit: e, | |
| ...r | |
| }) => { | |
| let { | |
| lastScreen: n, | |
| navigate: i | |
| } = ur(), { | |
| send: a, | |
| state: o | |
| } = (() => { | |
| let [e, t] = f(Ch, | |
| "creating"); | |
| return { | |
| send: t, | |
| state: e | |
| } | |
| })(), l = m((async () => { | |
| "finalizing" === | |
| o && await e(), | |
| a( | |
| "next") | |
| }), [o, a, e]); | |
| p((() => { | |
| let e; | |
| return "done" === | |
| o && | |
| "automatic" === | |
| r.config | |
| .initiatedBy && | |
| (e = setTimeout( | |
| (() => | |
| r | |
| .onClose | |
| ?. | |
| () | |
| ), | |
| ge)), | |
| () => { | |
| e && clearTimeout( | |
| e | |
| ) | |
| } | |
| }), [o, r.config | |
| .initiatedBy, r | |
| .onClose | |
| ]); | |
| let s = m((() => { | |
| a("back") | |
| }), [a]), | |
| d = m((() => { | |
| i(hr.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN) | |
| }), [n, i]); | |
| return "creating" === o ? t( | |
| mh, { | |
| ...r, | |
| onSubmit: l, | |
| onBack: n === hr | |
| .EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN ? | |
| d : void 0 | |
| }) : "saving" === o ? t( | |
| yh, { | |
| ...r, | |
| onSubmit: l, | |
| onBack: s | |
| }) : "confirming" === o ? t( | |
| Yu, { | |
| ...r, | |
| onSubmit: l, | |
| onBack: s | |
| }) : "finalizing" === | |
| o ? t(th, { | |
| ...r, | |
| onSubmit: l, | |
| onBack: s | |
| }) : "done" === o ? t(vh, { | |
| ...r, | |
| onSubmit: l | |
| }) : null | |
| }; | |
| const Eh = ({ | |
| error: n, | |
| backFn: i, | |
| onClick: a | |
| }) => { | |
| let { | |
| reset: o | |
| } = Ol(), { | |
| app: l | |
| } = ur(), s = ((e, r) => { | |
| let n = t(Ar, { | |
| height: 38, | |
| width: 38, | |
| stroke: "var(--privy-color-error)" | |
| }); | |
| if (e instanceof $) | |
| switch (e | |
| .privyErrorCode | |
| ) { | |
| case A | |
| .CLIENT_REQUEST_TIMEOUT: | |
| return { | |
| title | |
| : | |
| "Timed out", | |
| detail: | |
| e | |
| .message, | |
| ctaText: | |
| "Try again", | |
| icon: | |
| n | |
| }; | |
| case A | |
| .INSUFFICIENT_BALANCE: | |
| return { | |
| title | |
| : | |
| "Insufficient balance", | |
| detail: | |
| e | |
| .message, | |
| ctaText: | |
| "Try again", | |
| icon: | |
| n | |
| }; | |
| default: | |
| return { | |
| title | |
| : | |
| "Something went wrong", | |
| detail: | |
| "Try again later", | |
| ctaText: | |
| "Try again", | |
| icon: | |
| n | |
| } | |
| } else { | |
| if (e instanceof su && | |
| "twilio_verification_failed" === | |
| e.type) | |
| return { | |
| title: "Something went wrong", | |
| detail: e | |
| .message, | |
| ctaText: "Try again", | |
| icon: t(Dr, { | |
| height: 38, | |
| width: 38, | |
| stroke: "var(--privy-color-error)" | |
| }) | |
| }; | |
| if (!( | |
| e instanceof k)) | |
| return e instanceof I && | |
| e | |
| .status && | |
| [400, | |
| 422 | |
| ] | |
| .includes( | |
| e | |
| .status | |
| ) ? | |
| { | |
| title: "Something went wrong", | |
| detail: e | |
| .message, | |
| ctaText: "Try again", | |
| icon: n | |
| } : | |
| { | |
| title: "Something went wrong", | |
| detail: "Try again later", | |
| ctaText: "Try again", | |
| icon: n | |
| }; | |
| switch (e | |
| .privyErrorCode | |
| ) { | |
| case A | |
| .INVALID_CAPTCHA: | |
| return { | |
| title | |
| : | |
| "Something went wrong", | |
| detail: | |
| "Please try again.", | |
| ctaText: | |
| "Try again", | |
| icon: | |
| n | |
| }; | |
| case A | |
| .DISALLOWED_LOGIN_METHOD: | |
| return { | |
| title | |
| : | |
| "Not allowed", | |
| detail: | |
| e | |
| .message, | |
| ctaText: | |
| "Try another method", | |
| icon: | |
| n | |
| }; | |
| case A | |
| .ALLOWLIST_REJECTED: | |
| return { | |
| title | |
| : | |
| r | |
| .errorTitle || | |
| "You don't have access to this app", | |
| detail: | |
| r | |
| .errorDetail || | |
| "Have you been invited?", | |
| ctaText: | |
| r | |
| .errorCtaText || | |
| "Try another account", | |
| icon: | |
| t(Yd, { | |
| style: { | |
| width: "38px", | |
| height: "38px", | |
| strokeWidth: "1", | |
| stroke: "var(--privy-color-accent)", | |
| fill: "var(--privy-color-accent)" | |
| } | |
| }) | |
| }; | |
| case A | |
| .CAPTCHA_FAILURE: | |
| return { | |
| title | |
| : | |
| "Something went wrong", | |
| detail: | |
| "You did not pass CAPTCHA. Please try again.", | |
| ctaText: | |
| "Try again", | |
| icon: | |
| t( | |
| "span", {}) | |
| }; | |
| case A | |
| .CAPTCHA_TIMEOUT: | |
| return { | |
| title | |
| : | |
| "Something went wrong", | |
| detail: | |
| "Something went wrong! Please try again later.", | |
| ctaText: | |
| "Try again", | |
| icon: | |
| t( | |
| "span", {}) | |
| }; | |
| case A | |
| .LINKED_TO_ANOTHER_USER: | |
| return { | |
| title | |
| : | |
| "Authentication failed", | |
| detail: | |
| "This account has already been linked to another user.", | |
| ctaText: | |
| "Try again", | |
| icon: | |
| n | |
| }; | |
| case A | |
| .NOT_SUPPORTED: | |
| return { | |
| title | |
| : | |
| "This region is not supported", | |
| detail: | |
| "SMS authentication from this region is not available", | |
| ctaText: | |
| "Try another method", | |
| icon: | |
| n | |
| }; | |
| case A | |
| .TOO_MANY_REQUESTS: | |
| return { | |
| title | |
| : | |
| "Request failed", | |
| detail: | |
| "Too many attempts.", | |
| ctaText: | |
| "Try again later", | |
| icon: | |
| n | |
| }; | |
| default: | |
| return { | |
| title | |
| : | |
| "Something went wrong", | |
| detail: | |
| "Try again later", | |
| ctaText: | |
| "Try again", | |
| icon: | |
| n | |
| } | |
| } | |
| } | |
| })(n, l.allowlistConfig); | |
| return e(r, { | |
| children: [t(Zs, { | |
| backFn: i | |
| }), e($h, { | |
| children: [ | |
| t(nd, { | |
| children: e( | |
| "div", { | |
| children: [ | |
| t(fd, { | |
| color: "var(--privy-color-error)" | |
| }), | |
| s | |
| .icon | |
| ] | |
| } | |
| ) | |
| }), | |
| e(xh, { | |
| children: [ | |
| t("h3", { | |
| children: s | |
| .title | |
| }), | |
| t("p", { | |
| children: s | |
| .detail | |
| }) | |
| ] | |
| }), | |
| t(Ms, { | |
| color: "var(--privy-color-error)", | |
| onClick: () => { | |
| n instanceof k | |
| && | |
| (n.privyErrorCode === | |
| A | |
| .INVALID_CAPTCHA && | |
| o(), | |
| n | |
| .privyErrorCode === | |
| A | |
| .ALLOWLIST_REJECTED && | |
| l | |
| .allowlistConfig | |
| .errorCtaLink | |
| ) ? | |
| window | |
| .location | |
| .href = | |
| l | |
| .allowlistConfig | |
| .errorCtaLink : | |
| a | |
| ?. | |
| () | |
| }, | |
| children: s | |
| .ctaText | |
| }) | |
| ] | |
| })] | |
| }) | |
| }; | |
| let $h = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 24px; | |
| width: 100%; | |
| padding-bottom: 16px; | |
| `, | |
| xh = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| `; | |
| const Ah = ({ | |
| style: e, | |
| color: r, | |
| ...n | |
| }) => t("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| fill: "none", | |
| viewBox: "0 0 24 24", | |
| strokeWidth: "1.5", | |
| stroke: r || "currentColor", | |
| style: { | |
| height: "1.5rem", | |
| width: "1.5rem", | |
| ...e | |
| }, | |
| ...n, | |
| children: t("path", { | |
| strokeLinecap: "round", | |
| strokeLinejoin: "round", | |
| d: "M4.5 12.75l6 6 9-13.5" | |
| }) | |
| }), | |
| kh = r => { | |
| let [n, i] = s(!1); | |
| return e(Th, { | |
| color: r.color, | |
| onClick: () => { | |
| i(!0), | |
| navigator | |
| .clipboard | |
| .writeText( | |
| r | |
| .text | |
| ), | |
| setTimeout( | |
| (() => | |
| i(! | |
| 1) | |
| ), | |
| 1500 | |
| ) | |
| }, | |
| justCopied: n, | |
| children: [n ? t( | |
| Ah, { | |
| style: { | |
| height: "14px", | |
| width: "14px" | |
| }, | |
| strokeWidth: "2" | |
| }) : t(vt, { | |
| style: { | |
| height: "14px", | |
| width: "14px" | |
| } | |
| }), n ? | |
| "Copied" : | |
| "Copy", " ", | |
| r.itemName ? | |
| r.itemName : | |
| "to Clipboard" | |
| ] | |
| }) | |
| }; | |
| let Th = yr.button` | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| && { | |
| margin: 8px 2px; | |
| font-size: 14px; | |
| color: ${e=>e.justCopied?"var(--privy-color-foreground)":e.color||"var(--privy-color-foreground-3)"}; | |
| font-weight: ${e=>e.justCopied?"medium":"normal"}; | |
| transition: color 350ms ease; | |
| :focus, | |
| :active { | |
| background-color: transparent; | |
| border: none; | |
| outline: none; | |
| box-shadow: none; | |
| } | |
| :hover { | |
| color: ${e=>e.justCopied?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"}; | |
| } | |
| :active { | |
| color: 'var(--privy-color-foreground)'; | |
| font-weight: medium; | |
| } | |
| @media (max-width: 440px) { | |
| margin: 12px 2px; | |
| } | |
| } | |
| svg { | |
| width: 14px; | |
| height: 14px; | |
| } | |
| `; | |
| const _h = e => { | |
| let [r, n] = s(!1); | |
| return t(Sh, { | |
| color: e.color, | |
| href: e.url, | |
| target: "_blank", | |
| rel: "noreferrer noopener", | |
| onClick: () => { | |
| n(!0), | |
| setTimeout( | |
| (() => | |
| n(! | |
| 1) | |
| ), | |
| 1500 | |
| ) | |
| }, | |
| justOpened: r, | |
| children: e.text | |
| }) | |
| }; | |
| let Sh = yr.a` | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| && { | |
| margin: 8px 2px; | |
| font-size: 14px; | |
| color: ${e=>e.justOpened?"var(--privy-color-foreground)":e.color||"var(--privy-color-foreground-3)"}; | |
| font-weight: ${e=>e.justOpened?"medium":"normal"}; | |
| transition: color 350ms ease; | |
| :focus, | |
| :active { | |
| background-color: transparent; | |
| border: none; | |
| outline: none; | |
| box-shadow: none; | |
| } | |
| :hover { | |
| color: ${e=>e.justOpened?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"}; | |
| } | |
| :active { | |
| color: 'var(--privy-color-foreground)'; | |
| font-weight: medium; | |
| } | |
| @media (max-width: 440px) { | |
| margin: 12px 2px; | |
| } | |
| } | |
| svg { | |
| width: 14px; | |
| height: 14px; | |
| } | |
| `; | |
| const Nh = () => t("svg", { | |
| width: "200", | |
| height: "200", | |
| viewBox: "-77 -77 200 200", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: "28px", | |
| width: "28px" | |
| }, | |
| children: t("rect", { | |
| width: "50", | |
| height: "50", | |
| fill: "black", | |
| rx: 10, | |
| ry: 10 | |
| }) | |
| }); | |
| let Ih = (e, t, r, n, i) => { | |
| for (let a = t; a < t + n; a++) | |
| for (let t = r; t < r + | |
| i; t++) { | |
| let r = e?.[t]; | |
| r && r[a] && (r[a] = 0) | |
| } | |
| return e | |
| }, | |
| Ph = ({ | |
| x: e, | |
| y: n, | |
| cellSize: i, | |
| bgColor: a, | |
| fgColor: o | |
| }) => t(r, { | |
| children: [0, 1, 2].map(( | |
| r => t( | |
| "circle", { | |
| r: i * (7 - | |
| 2 * | |
| r | |
| ) / | |
| 2, | |
| cx: e + | |
| 7 * | |
| i / | |
| 2, | |
| cy: n + | |
| 7 * | |
| i / | |
| 2, | |
| fill: r % | |
| 2 != | |
| 0 ? | |
| a : | |
| o | |
| }, | |
| `finder-${e}-${n}-${r}` | |
| ))) | |
| }), | |
| Oh = ({ | |
| cellSize: e, | |
| matrixSize: n, | |
| bgColor: i, | |
| fgColor: a | |
| }) => t(r, { | |
| children: [ | |
| [0, 0], | |
| [(n - 7) * e, 0], | |
| [0, (n - 7) * e] | |
| ].map((([r, n]) => t( | |
| Ph, { | |
| x: r, | |
| y: n, | |
| cellSize: e, | |
| bgColor: i, | |
| fgColor: a | |
| }, | |
| `finder-${r}-${n}` | |
| ))) | |
| }), | |
| Rh = ({ | |
| matrix: e, | |
| cellSize: n, | |
| color: i | |
| }) => t(r, { | |
| children: e.map(((e, r) => e | |
| .map(((e, a) => | |
| e ? t( | |
| "rect", { | |
| height: n - | |
| .4, | |
| width: n - | |
| .4, | |
| x: r * | |
| n + | |
| .1 * | |
| n, | |
| y: a * | |
| n + | |
| .1 * | |
| n, | |
| rx: .5 * | |
| n, | |
| ry: .5 * | |
| n, | |
| fill: i | |
| }, | |
| `cell-${r}-${a}` | |
| ) : | |
| t(o.Fragment, {}, | |
| `circle-${r}-${a}` | |
| ))))) | |
| }), | |
| Mh = ({ | |
| cellSize: n, | |
| matrixSize: i, | |
| element: a, | |
| sizePercentage: o, | |
| bgColor: l | |
| }) => { | |
| if (!a) return t(r, {}); | |
| let s = i * (o || .14), | |
| d = Math.floor(i / 2 - s / | |
| 2), | |
| c = Math.floor(i / 2 + s / | |
| 2); | |
| (c - d) % 2 != i % 2 && (c += | |
| 1); | |
| let u = (c - d) * n, | |
| h = u - .2 * u, | |
| p = d * n; | |
| return e(r, { | |
| children: [t( | |
| "rect", { | |
| x: d * | |
| n, | |
| y: d * | |
| n, | |
| width: u, | |
| height: u, | |
| fill: l | |
| }), t(a, { | |
| x: p + | |
| .1 * | |
| u, | |
| y: p + | |
| .1 * | |
| u, | |
| height: h, | |
| width: h | |
| })] | |
| }) | |
| }, | |
| Lh = r => { | |
| let n = r.outputSize, | |
| i = ((e, t) => { | |
| let r = Qr.create( | |
| e, { | |
| errorCorrectionLevel: t | |
| }).modules, | |
| n = Ct(Array | |
| .from(r | |
| .data), | |
| r.size); | |
| return n = Ih(n, 0, | |
| 0, 7, 7), | |
| n = Ih(n, n | |
| .length - 7, | |
| 0, 7, 7), | |
| Ih(n, 0, n | |
| .length - 7, | |
| 7, 7) | |
| })(r.url, r | |
| .errorCorrectionLevel), | |
| a = n / i.length, | |
| o = bt(2 * a, { | |
| min: .025 * n, | |
| max: .036 * n | |
| }); | |
| return e("svg", { | |
| height: r | |
| .outputSize, | |
| width: r.outputSize, | |
| viewBox: `0 0 ${r.outputSize} ${r.outputSize}`, | |
| style: { | |
| height: "100%", | |
| width: "100%", | |
| padding: `${o}px` | |
| }, | |
| children: [t(Rh, { | |
| matrix: i, | |
| cellSize: a, | |
| color: r | |
| .fgColor | |
| }), t(Oh, { | |
| cellSize: a, | |
| matrixSize: i | |
| .length, | |
| fgColor: r | |
| .fgColor, | |
| bgColor: r | |
| .bgColor | |
| }), t(Mh, { | |
| cellSize: a, | |
| element: r | |
| .logo | |
| ?.element, | |
| bgColor: r | |
| .bgColor, | |
| matrixSize: i | |
| .length | |
| })] | |
| }) | |
| }, | |
| Dh = yr.div` | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| height: ${e=>`${e.size}px`}; | |
| width: ${e=>`${e.size}px`}; | |
| margin: auto; | |
| background-color: ${e=>e.bgColor}; | |
| && { | |
| border-width: 2px; | |
| border-color: ${e=>e.borderColor}; | |
| border-radius: var(--privy-border-radius-md); | |
| } | |
| `; | |
| const Fh = e => { | |
| let { | |
| appearance: r | |
| } = fe(), n = e.bgColor || | |
| "#FFFFFF", i = e.fgColor || | |
| "#000000", a = e.size || | |
| 160, o = "dark" === r | |
| .palette.colorScheme ? n : | |
| i; | |
| return t(Dh, { | |
| size: a, | |
| bgColor: n, | |
| fgColor: i, | |
| borderColor: o, | |
| children: t(Lh, { | |
| url: e | |
| .url, | |
| logo: { | |
| element: e | |
| .squareLogoElement ?? | |
| Nh | |
| }, | |
| outputSize: a, | |
| bgColor: n, | |
| fgColor: i, | |
| errorCorrectionLevel: e | |
| .errorCorrectionLevel || | |
| "Q" | |
| }) | |
| }) | |
| }, | |
| Uh = ({ | |
| style: r, | |
| ...n | |
| }) => e("svg", { | |
| width: "1000", | |
| height: "1000", | |
| viewBox: "0 0 1000 1000", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| style: { | |
| height: "24px", | |
| ...r | |
| }, | |
| ...n, | |
| children: [t("rect", { | |
| width: "1000", | |
| height: "1000", | |
| rx: "200", | |
| fill: "#855DCD" | |
| }), t("path", { | |
| d: "M257.778 155.556H742.222V844.444H671.111V528.889H670.414C662.554 441.677 589.258 373.333 500 373.333C410.742 373.333 337.446 441.677 329.586 528.889H328.889V844.444H257.778V155.556Z", | |
| fill: "white" | |
| }), t("path", { | |
| d: "M128.889 253.333L157.778 351.111H182.222V746.667C169.949 746.667 160 756.616 160 768.889V795.556H155.556C143.283 795.556 133.333 805.505 133.333 817.778V844.444H382.222V817.778C382.222 805.505 372.273 795.556 360 795.556H355.556V768.889C355.556 756.616 345.606 746.667 333.333 746.667H306.667V253.333H128.889Z", | |
| fill: "white" | |
| }), t("path", { | |
| d: "M675.556 746.667C663.283 746.667 653.333 756.616 653.333 768.889V795.556H648.889C636.616 795.556 626.667 805.505 626.667 817.778V844.444H875.556V817.778C875.556 805.505 865.606 795.556 853.333 795.556H848.889V768.889C848.889 756.616 838.94 746.667 826.667 746.667V351.111H851.111L880 253.333H702.222V746.667H675.556Z", | |
| fill: "white" | |
| })] | |
| }); | |
| let Wh = "#8a63d2"; | |
| let Bh = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| margin-left: 27px; | |
| margin-right: 27px; | |
| gap: 24px; | |
| `, | |
| Gh = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 24px; | |
| width: 100%; | |
| `, | |
| Hh = "#8a63d2"; | |
| let zh = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| margin-left: 27px; | |
| margin-right: 27px; | |
| gap: 24px; | |
| `, | |
| jh = yr.div` | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 24px; | |
| width: 100%; | |
| `; | |
| function qh({ | |
| title: e | |
| }) { | |
| let { | |
| currentScreen: r, | |
| navigateBack: n, | |
| navigate: i, | |
| data: a | |
| } = ur(); | |
| return t(Zs, { | |
| title: e, | |
| backFn: r === hr | |
| .FUNDING_MANUAL_TRANSFER_SCREEN ? | |
| n : r === a?.funding | |
| ?.methodScreen ? a | |
| .funding | |
| .comingFromSendTransactionScreen ? | |
| () => i(hr | |
| .EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN | |
| ) : void 0 : a | |
| ?.funding | |
| ?.methodScreen ? | |
| () => i(a.funding | |
| .methodScreen) : | |
| void 0 | |
| }) | |
| } | |
| const Vh = ({ | |
| size: r | |
| }) => t(Kh, { | |
| $size: r, | |
| children: e(Yh, { | |
| children: [t( | |
| Zh, {}), | |
| t( | |
| Xh, {}) | |
| ] | |
| }) | |
| }); | |
| let Kh = yr.div` | |
| --spinner-size: ${e=>e.$size?e.$size:"96px"}; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| flex-grow: 1; | |
| @media all and (display-mode: standalone) { | |
| margin-bottom: 30px; | |
| } | |
| `, | |
| Yh = yr.div` | |
| position: relative; | |
| height: var(--spinner-size); | |
| width: var(--spinner-size); | |
| opacity: 1; | |
| animation: fadein 200ms ease; | |
| `, | |
| Zh = yr.div` | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| bottom: 0; | |
| left: 0; | |
| width: var(--spinner-size); | |
| height: var(--spinner-size); | |
| && { | |
| border: 4px solid #f1f2f9; | |
| border-radius: 50%; | |
| } | |
| `, | |
| Xh = yr.div` | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| bottom: 0; | |
| left: 0; | |
| width: var(--spinner-size); | |
| height: var(--spinner-size); | |
| animation: spin 1200ms linear infinite; | |
| && { | |
| border: 4px solid; | |
| border-color: #cbcde1 transparent transparent transparent; | |
| border-radius: 50%; | |
| } | |
| @keyframes spin { | |
| from { | |
| transform: rotate(0deg); | |
| } | |
| to { | |
| transform: rotate(360deg); | |
| } | |
| } | |
| `; | |
| const Qh = e => { | |
| let { | |
| showFiatPrices: t, | |
| getUsdTokenPrice: r, | |
| chains: n | |
| } = P(), [i, a] = s(!0), [o, | |
| l] = s(void 0), [d, c] = s( | |
| void 0); | |
| return p((() => { | |
| let i = e | |
| .chainId || | |
| ve, | |
| o = Ce(n) | |
| .find((e => | |
| e | |
| .id === | |
| Number( | |
| i | |
| ) | |
| )); | |
| (async () => { | |
| if ( | |
| t) { | |
| if (! | |
| o | |
| ) | |
| return a( | |
| ! | |
| 1 | |
| ), | |
| void l( | |
| Error( | |
| `Unable to fetch token price on chain id ${i}` | |
| ) | |
| ); | |
| try { | |
| a(! | |
| 0); | |
| let e = | |
| await r( | |
| o | |
| ); | |
| e ? c( | |
| e) : | |
| l(Error( | |
| `Unable to fetch token price on chain id ${o.id}`)) | |
| } catch ( | |
| e | |
| ) { | |
| l(e) | |
| } finally { | |
| a(!1) | |
| } | |
| } else | |
| a(! | |
| 1) | |
| })() | |
| }), [e.chainId]), { | |
| tokenPrice: d, | |
| isTokenPriceLoading: i, | |
| tokenPriceError: o | |
| } | |
| }, | |
| Jh = [{ | |
| constant: !1, | |
| inputs: [{ | |
| name: "_to", | |
| type: "address" | |
| }, { | |
| name: "_value", | |
| type: "uint256" | |
| }], | |
| name: "transfer", | |
| outputs: [{ | |
| name: "", | |
| type: "bool" | |
| }], | |
| payable: !1, | |
| stateMutability: "nonpayable", | |
| type: "function" | |
| }], | |
| ep = ({ | |
| amount: e, | |
| decimals: t | |
| }) => Intl.NumberFormat(void 0, { | |
| maximumFractionDigits: t | |
| }).format(Number(e) / 10 ** t), | |
| tp = | |
| "sdk_fiat_on_ramp_completed_with_status"; | |
| let rp = | |
| "0x0000000000000000000000000000000000000000"; | |
| const np = ({ | |
| destinationCurrency: e, | |
| ...t | |
| }) => ({ | |
| tradeType: "EXACT_OUTPUT", | |
| originCurrency: rp, | |
| destinationCurrency: e ?? | |
| rp, | |
| ...t | |
| }), | |
| ip = async ({ | |
| input: e, | |
| isTestnet: t | |
| }) => { | |
| let r = await fetch(t ? | |
| "https://api.testnets.relay.link/execute/swap" : | |
| "https://api.relay.link/execute/swap", { | |
| method: "POST", | |
| headers: { | |
| "Content-Type": "application/json" | |
| }, | |
| body: JSON | |
| .stringify( | |
| e) | |
| }), | |
| n = await r.json(); | |
| if (!(r.ok || "string" == | |
| typeof n.message && | |
| n.message | |
| .startsWith( | |
| "Invalid address" | |
| ))) | |
| throw console.error( | |
| "Relay error:", | |
| n), Error(n | |
| .message ?? | |
| "Error fetching quote from relay" | |
| ); | |
| return n | |
| }, ap = e => { | |
| let t = e.steps[0]?.items?.[ | |
| 0 | |
| ]; | |
| if (t) return { | |
| from: t.data.from, | |
| to: t.data.to, | |
| value: Number(t.data | |
| .value), | |
| chainId: Number(t | |
| .data | |
| .chainId), | |
| data: t.data.data | |
| } | |
| }; | |
| let op = [{ | |
| constant: !0, | |
| inputs: [{ | |
| name: "_owner", | |
| type: "address" | |
| }], | |
| name: "balanceOf", | |
| outputs: [{ | |
| name: "balance", | |
| type: "uint256" | |
| }], | |
| payable: !1, | |
| stateMutability: "view", | |
| type: "function" | |
| }]; | |
| const lp = yr.span` | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.35rem; | |
| width: 100%; | |
| `, | |
| sp = yr.span` | |
| display: flex; | |
| width: 100%; | |
| justify-content: space-between; | |
| gap: 0.5rem; | |
| `, | |
| dp = yr.span` | |
| color: var(--privy-color-foreground-3); | |
| font-size: 0.875rem; | |
| font-weight: 400; | |
| line-height: 1.375rem; /* 157.143% */ | |
| `, | |
| cp = yr.span` | |
| color: var(--privy-color-foreground); | |
| font-size: 0.875rem; | |
| font-weight: 500; | |
| line-height: 1.375rem; /* 157.143% */ | |
| word-break: break-all; | |
| text-align: right; | |
| ${$t} | |
| `; | |
| let up = { | |
| [be.id]: r => t("svg", { | |
| xmlns: "http://www.w3.org/2000/svg", | |
| xmlnsXlink: "http://www.w3.org/1999/xlink", | |
| version: "1.1", | |
| id: "Layer_1", | |
| x: "0px", | |
| y: "0px", | |
| viewBox: "0 0 2500 2500", | |
| xmlSpace: "preserve", | |
| ...r, | |
| children: t("g", { | |
| id: "Layer_x0020_1", | |
| children: e( | |
| "g", { | |
| id: "_2405588477232", | |
| children: [ | |
| t("rect", { | |
| fill: "none", | |
| width: "2500", | |
| height: "2500" | |
| }), | |
| t("g", { | |
| children: e( | |
| "g", { | |
| children: [ | |
| t("path", { | |
| fill: "#213147", | |
| d: "M226,760v980c0,63,33,120,88,152l849,490c54,31,121,31,175,0l849-490c54-31,88-89,88-152V760 c0-63-33-120-88-152l-849-490c-54-31-121-31-175,0L314,608c-54,31-87,89-87,152H226z" | |
| }), | |
| t("g", { | |
| children: e( | |
| "g", { | |
| children: [ | |
| t("g", { | |
| children: t( | |
| "path", { | |
| fill: "#12AAFF", | |
| d: "M1435,1440l-121,332c-3,9-3,19,0,29l208,571l241-139l-289-793C1467,1422,1442,1422,1435,1440z" | |
| } | |
| ) | |
| }), | |
| t("g", { | |
| children: t( | |
| "path", { | |
| fill: "#12AAFF", | |
| d: "M1678,882c-7-18-32-18-39,0l-121,332c-3,9-3,19,0,29l341,935l241-139L1678,883V882z" | |
| } | |
| ) | |
| }) | |
| ] | |
| } | |
| ) | |
| }), | |
| t("g", { | |
| children: t( | |
| "path", { | |
| fill: "#9DCCED", | |
| d: "M1250,155c6,0,12,2,17,5l918,530c11,6,17,18,17,30v1060c0,12-7,24-17,30l-918,530c-5,3-11,5-17,5 s-12-2-17-5l-918-530c-11-6-17-18-17-30V719c0-12,7-24,17-30l918-530c5-3,11-5,17-5l0,0V155z M1250,0c-33,0-65,8-95,25L237,555 c-59,34-95,96-95,164v1060c0,68,36,130,95,164l918,530c29,17,62,25,95,25s65-8,95-25l918-530c59-34,95-96,95-164V719 c0-68-36-130-95-164L1344,25c-29-17-62-25-95-25l0,0H1250z" | |
| } | |
| ) | |
| }), | |
| t("polygon", { | |
| fill: "#213147", | |
| points: "642,2179 727,1947 897,2088 738,2234 " | |
| }), | |
| e("g", { | |
| children: [ | |
| t("path", { | |
| fill: "#FFFFFF", | |
| d: "M1172,644H939c-17,0-33,11-39,27L401,2039l241,139l550-1507c5-14-5-28-19-28L1172,644z" | |
| }), | |
| t("path", { | |
| fill: "#FFFFFF", | |
| d: "M1580,644h-233c-17,0-33,11-39,27L738,2233l241,139l620-1701c5-14-5-28-19-28V644z" | |
| }) | |
| ] | |
| }) | |
| ] | |
| } | |
| ) | |
| }) | |
| ] | |
| } | |
| ) | |
| }) | |
| }), | |
| [Ee.id]: r => e("svg", { | |
| width: "1503", | |
| height: "1504", | |
| viewBox: "0 0 1503 1504", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...r, | |
| children: [t( | |
| "rect", { | |
| x: "287", | |
| y: "258", | |
| width: "928", | |
| height: "844", | |
| fill: "white" | |
| }), t( | |
| "path", { | |
| "fill-rule": "evenodd", | |
| "clip-rule": "evenodd", | |
| d: "M1502.5 752C1502.5 1166.77 1166.27 1503 751.5 1503C336.734 1503 0.5 1166.77 0.5 752C0.5 337.234 336.734 1 751.5 1C1166.27 1 1502.5 337.234 1502.5 752ZM538.688 1050.86H392.94C362.314 1050.86 347.186 1050.86 337.962 1044.96C327.999 1038.5 321.911 1027.8 321.173 1015.99C320.619 1005.11 328.184 991.822 343.312 965.255L703.182 330.935C718.495 303.999 726.243 290.531 736.021 285.55C746.537 280.2 759.083 280.2 769.599 285.55C779.377 290.531 787.126 303.999 802.438 330.935L876.42 460.079L876.797 460.738C893.336 489.635 901.723 504.289 905.385 519.669C909.443 536.458 909.443 554.169 905.385 570.958C901.695 586.455 893.393 601.215 876.604 630.549L687.573 964.702L687.084 965.558C670.436 994.693 661.999 1009.46 650.306 1020.6C637.576 1032.78 622.263 1041.63 605.474 1046.62C590.161 1050.86 573.004 1050.86 538.688 1050.86ZM906.75 1050.86H1115.59C1146.4 1050.86 1161.9 1050.86 1171.13 1044.78C1181.09 1038.32 1187.36 1027.43 1187.92 1015.63C1188.45 1005.1 1181.05 992.33 1166.55 967.307C1166.05 966.455 1165.55 965.588 1165.04 964.706L1060.43 785.75L1059.24 783.735C1044.54 758.877 1037.12 746.324 1027.59 741.472C1017.08 736.121 1004.71 736.121 994.199 741.472C984.605 746.453 976.857 759.552 961.544 785.934L857.306 964.891L856.949 965.507C841.69 991.847 834.064 1005.01 834.614 1015.81C835.352 1027.62 841.44 1038.5 851.402 1044.96C860.443 1050.86 875.94 1050.86 906.75 1050.86Z", | |
| fill: "#E84142" | |
| })] | |
| }), | |
| [$e.id]: r => e("svg", { | |
| width: "146", | |
| height: "146", | |
| viewBox: "0 0 146 146", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...r, | |
| children: [t( | |
| "circle", { | |
| cx: "73", | |
| cy: "73", | |
| r: "73", | |
| fill: "#0052FF" | |
| }), t( | |
| "path", { | |
| d: "M73.323 123.729C101.617 123.729 124.553 100.832 124.553 72.5875C124.553 44.343 101.617 21.4463 73.323 21.4463C46.4795 21.4463 24.4581 42.0558 22.271 68.2887H89.9859V76.8864H22.271C24.4581 103.119 46.4795 123.729 73.323 123.729Z", | |
| fill: "white" | |
| })] | |
| }), | |
| [xe.id]: r => e("svg", { | |
| fill: "none", | |
| height: "400", | |
| viewBox: "0 0 400 400", | |
| width: "400", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...r, | |
| children: [t( | |
| "path", { | |
| d: "m0 0h400v400h-400z", | |
| fill: "#fcff52" | |
| }), t( | |
| "path", { | |
| d: "m300 100h-200v200h199.996v-69.813h-33.191c-11.442 25.468-37.194 43.206-66.665 43.206-40.63 0-73.533-33.187-73.533-73.533s32.903-73.249 73.533-73.249c30.043 0 55.795 18.313 67.24 44.349h32.62z", | |
| fill: "#000" | |
| })] | |
| }), | |
| [Ae.id]: r => e("svg", { | |
| width: "200", | |
| height: "208", | |
| viewBox: "0 0 200 208", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...r, | |
| children: [t( | |
| "rect", { | |
| width: "199.4", | |
| height: "207.623", | |
| fill: "#121212" | |
| }), e("g", { | |
| "clip-path": "url(#clip0_2303_643)", | |
| children: [ | |
| t("path", { | |
| d: "M132.369 155.99H49.7001V68.8854H68.6148V139.109H132.369V155.981V155.99Z", | |
| fill: "white" | |
| }), | |
| t("path", { | |
| d: "M132.369 85.7575C141.687 85.7575 149.241 78.2036 149.241 68.8855C149.241 59.5673 141.687 52.0134 132.369 52.0134C123.05 52.0134 115.497 59.5673 115.497 68.8855C115.497 78.2036 123.05 85.7575 132.369 85.7575Z", | |
| fill: "white" | |
| }) | |
| ] | |
| }), t( | |
| "defs", { | |
| children: t( | |
| "clipPath", { | |
| id: "clip0_2303_643", | |
| children: t( | |
| "rect", { | |
| width: "99.5407", | |
| height: "103.977", | |
| fill: "white", | |
| transform: "translate(49.7001 52.0134)" | |
| } | |
| ) | |
| } | |
| ) | |
| })] | |
| }), | |
| [ke.id]: r => e("svg", { | |
| version: "1.1", | |
| id: "Layer_1", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| xmlnsXlink: "http://www.w3.org/1999/xlink", | |
| x: "0px", | |
| y: "0px", | |
| viewBox: "0 0 327.5 533.3", | |
| enableBackground: "new 0 0 327.5 533.3;", | |
| xmlSpace: "preserve", | |
| ...r, | |
| children: [t( | |
| "path", { | |
| fill: "#8492B2", | |
| d: "M163.7,197.2V0L0,271.6L163.7,197.2z" | |
| }), t( | |
| "path", { | |
| fill: "#62688F", | |
| d: "M163.7,368.4V197.2L0,271.6L163.7,368.4z M163.7,197.2l163.7,74.4L163.7,0V197.2z" | |
| }), t( | |
| "path", { | |
| fill: "#454A75", | |
| d: "M163.7,197.2v171.2l163.7-96.8L163.7,197.2z" | |
| }), t( | |
| "path", { | |
| fill: "#8492B2", | |
| d: "M163.7,399.4L0,302.7l163.7,230.7V399.4z" | |
| }), t( | |
| "path", { | |
| fill: "#62688F", | |
| d: "M327.5,302.7l-163.8,96.7v134L327.5,302.7z" | |
| })] | |
| }), | |
| [Te.id]: r => e("svg", { | |
| width: "500", | |
| height: "500", | |
| viewBox: "0 0 500 500", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...r, | |
| children: [t( | |
| "circle", { | |
| cx: "250", | |
| cy: "250", | |
| r: "250", | |
| fill: "#FF0420" | |
| }), t( | |
| "path", { | |
| d: "M177.133 316.446C162.247 316.446 150.051 312.943 140.544 305.938C131.162 298.808 126.471 288.676 126.471 275.541C126.471 272.789 126.784 269.411 127.409 265.408C129.036 256.402 131.35 245.581 134.352 232.947C142.858 198.547 164.812 181.347 200.213 181.347C209.845 181.347 218.476 182.973 226.107 186.225C233.738 189.352 239.742 194.106 244.12 200.486C248.498 206.74 250.688 214.246 250.688 223.002C250.688 225.629 250.375 228.944 249.749 232.947C247.873 244.08 245.621 254.901 242.994 265.408C238.616 282.546 231.048 295.368 220.29 303.874C209.532 312.255 195.147 316.446 177.133 316.446ZM179.76 289.426C186.766 289.426 192.707 287.362 197.586 283.234C202.59 279.106 206.155 272.789 208.281 264.283C211.158 252.524 213.348 242.266 214.849 233.51C215.349 230.883 215.599 228.194 215.599 225.441C215.599 214.058 209.657 208.366 197.774 208.366C190.768 208.366 184.764 210.43 179.76 214.558C174.882 218.687 171.379 225.004 169.253 233.51C167.001 241.891 164.749 252.149 162.498 264.283C161.997 266.784 161.747 269.411 161.747 272.163C161.747 283.672 167.752 289.426 179.76 289.426Z", | |
| fill: "white" | |
| }), t( | |
| "path", { | |
| d: "M259.303 314.57C257.927 314.57 256.863 314.132 256.113 313.256C255.487 312.255 255.3 311.13 255.55 309.879L281.444 187.914C281.694 186.538 282.382 185.412 283.508 184.536C284.634 183.661 285.822 183.223 287.073 183.223H336.985C350.87 183.223 362.003 186.1 370.384 191.854C378.891 197.609 383.144 205.927 383.144 216.81C383.144 219.937 382.769 223.19 382.018 226.567C378.891 240.953 372.574 251.586 363.067 258.466C353.685 265.346 340.8 268.786 324.413 268.786H299.082L290.451 309.879C290.2 311.255 289.512 312.38 288.387 313.256C287.261 314.132 286.072 314.57 284.822 314.57H259.303ZM325.727 242.892C330.98 242.892 335.546 241.453 339.424 238.576C343.427 235.699 346.054 231.571 347.305 226.192C347.68 224.065 347.868 222.189 347.868 220.563C347.868 216.935 346.805 214.183 344.678 212.307C342.551 210.305 338.924 209.305 333.795 209.305H311.278L304.148 242.892H325.727Z", | |
| fill: "white" | |
| })] | |
| }), | |
| [_e.id]: r => e("svg", { | |
| width: "360", | |
| height: "360", | |
| viewBox: "0 0 360 360", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...r, | |
| children: [t( | |
| "rect", { | |
| width: "360", | |
| height: "360", | |
| rx: "180", | |
| fill: "#6C00F6" | |
| }), t( | |
| "path", { | |
| d: "M157.743 154.241L141.052 144.58L90.9766 173.561V231.519L141.052 260.5L191.13 231.519V141.359L218.948 125.26L246.77 141.359V173.561L218.948 189.66L202.257 180.002V205.759L218.948 215.42L269.024 186.439V128.481L218.948 99.5L168.873 128.481V218.641L141.052 234.74L113.233 218.641V186.439L141.052 170.34L157.743 179.998V154.241Z", | |
| fill: "white" | |
| })] | |
| }), | |
| [Se.id]: r => e("svg", { | |
| width: "30", | |
| height: "30", | |
| viewBox: "0 0 30 30", | |
| fill: "none", | |
| xmlns: "http://www.w3.org/2000/svg", | |
| ...r, | |
| children: [t( | |
| "rect", { | |
| width: "30", | |
| height: "30", | |
| fill: "url(#pattern0)" | |
| }), e( | |
| "defs", { | |
| children: [ | |
| t("pattern", { | |
| id: "pattern0", | |
| patternContentUnits: "objectBoundingBox", | |
| width: "1", | |
| height: "1", | |
| children: t( | |
| "use", { | |
| xlinkHref: "#image0_1_18", | |
| transform: "scale(0.00041841)" | |
| } | |
| ) | |
| }), | |
| t("image", { | |
| id: "image0_1_18", | |
| width: "2390", | |
| height: "2390", | |
| xlinkHref: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAAAsTAAALEwEAmpwYAAABZWlDQ1BEaXNwbGF5IFAzAAB4nHWQvUvDUBTFT6tS0DqIDh0cMolD1NIKdnFoKxRFMFQFq1OafgltfCQpUnETVyn4H1jBWXCwiFRwcXAQRAcR3Zw6KbhoeN6XVNoi3sfl/Ticc7lcwBtQGSv2AijplpFMxKS11Lrke4OHnlOqZrKooiwK/v276/PR9d5PiFlNu3YQ2U9cl84ul3aeAlN//V3Vn8maGv3f1EGNGRbgkYmVbYsJ3iUeMWgp4qrgvMvHgtMunzuelWSc+JZY0gpqhrhJLKc79HwHl4plrbWD2N6f1VeXxRzqUcxhEyYYilBRgQQF4X/8044/ji1yV2BQLo8CLMpESRETssTz0KFhEjJxCEHqkLhz634PrfvJbW3vFZhtcM4v2tpCAzidoZPV29p4BBgaAG7qTDVUR+qh9uZywPsJMJgChu8os2HmwiF3e38M6Hvh/GMM8B0CdpXzryPO7RqFn4Er/QfBIQM2AAA/9UlEQVR4Ad19baxm13XWWvuc984kDeLmB2lSqHppoaRNk1z+gKlock3jyu2fjqUCUYVk5w9NiFBsIaqChGZGlagwBTtSQeWXJxJC4g+xBRJtQ/CEorY/KnlQo2LSr1v4USdF6lSI2HPfc/Zir7WetfY+1zP+HH9x7DPn4z33fc/Zz15rPetj78P0/8Fy8tAzh/P8wjHzwRHP80eF+bCU+YhKOeJSqPDUjouubZ+pTG3lQvNUTpn5Zttvq9xsp/9bmdq+0I33rPONx6+89ya9wxemd9hycumLh/Sei8ck83GZdx+vPJ1M88EhlbnhOVNDr/2v20JT2zeA9ZwCW3Qttp0NbPLzbJfTFPtolXZ8WorcmAp9pX3jjZ/9+3/qOr3DlncEwAbqvDzE8+5HaTo4Ft4d8nRAuooCq4Cyb1nBNGAnk9RpaltyYKcJoLZ/JoA7G+gNTHKQi25Z7DO9hkmI2Ruq/d3NQnK9nXvqoOyuX3nkvaf0Nl/etgBfuvTE4c1VQb2ooJ7IdKGh0ADlBuyu7ZddA3DXjhuw89zAg/QquFwMWFYApwDWpXNScA1QP55NXYsD3cCcmn62DmEgA1hIte4r4NoRpNq56+3iL9T1/z555ZE/+7ZU5287gD9x/2Mntcyfk/niCU0XDmW62NC4QAowK6BFJfcCVPGuCW4DllwtlwnquHRQdauqV0E1EE1q2z7OGcjFpXYyoL1RTMJ1WwAqWkrPMfZ1I7aqlPO1ds3nf/Kz77tBb6PlbQPwJz7xMw3Q+XItF04UVJnf1Vq+bYuCe9CkVEFtEqygqvQ2YNlU82TSG7bWgDX7qwCWBDQkdzapBcBMkF49FjtWkFNlQ3L1XEiyLibJQFfIO0DVQ+F2H3JdRL7w9z77gWv0NljecoDv+2v/8KGVDi7z/O4jBbUquFibem7rBaq8M4Cr2dudSTInoZqMTIVKNolNIsUObDu/m6gDDKk14A1gMUBnU88CifbrCncJZgVaHNywyyK+6mIgkwPd9k+ryNVH3mKg3zKA7/+rD58s0+6ylHc1iW3Azu9urf2uJrkXbVXpJW5SuzswFa021yXXwS2zAjqZWg6bWwabO7Gr5HmU3Lbdlb41cCHBsa9A7qCyZ4Abkh6Sa40mDrigCQXSvGJbG8irAc+n7QYe+OzffmtU95sO8P33fPpoYX6CD77lZCUFswG7ezcpyFvVfGB2VyVXmTJDck2Cg0jNvp1n2F2TYJfaXTsOKc21Pe1BgUou0iUZUjxDHU9GtrBvtjgk2PfHRtNzkqD6Cd2utnIC3dZr7SuvfuYzHzilN3F5UwG+7y8/9LkG3BWZ3t3cHgX1W5pKVkDfhe1FA1rVMplKVkBVemcjUybBaXcLfFq4Qxa4aBLbENvBp7UtpPVA7W6DYTc5oDs7Lym5KdHFr0twsVVpNRdK/5FBkrGsUNMK9mpyT7SsbPtr09cL1HY7/vzf+Yn3P05v0vKmAHz/PZ88WtfpiVDHMn8LbQDeBcjqCl00cKlJqrpFppphcydTz6W7QvNk9nZkyrvJJXc3OYlSEA8A3sEEYAGoSu1uIFn6uUuw/124SvqZIlZgm9mZVRItXeogxZVCipmW6up6sZV8rXy9XfypN0Oa33CAf/D40udaQOKKlC611ABW1RyrAWuq+UJXz+bfuvSa3VWmzE6mXGqdTBmJmlx6dwhgKLgzJPQAEqvrhQA4QXaAd1MH1QhXSDHYtLJuFU31kQ3oYNM8ECzpqlqVeIC5Vgd7X12aFfB9A3u/8mmT+quf/cwbS8LeMIAvHV86/D+0f4z44kM0vdtBnRxQmt/jNreBKjtnzkawNDo1X3A/13xeRKdgd80dapJbDNBOqjxY4UzZ1TGnhB4AaJdkXwNglViT3BI2GHY47TIh8EFQ026Ds+HQesGkK56921+V1mLHLrkOtK4q0WfV4mSPf/on3v8IvUHLGwLw/cf3Hy1Vvih84Zh2DUy+aKAayDuAu3PWbODu3N911XyAYIYTKpPgyUOP0wyAm+Tumlh5mJHBliG57PY2pHdnarqa9B5AYg8A/gUAG2o8yVdxohXs2n1hf7YyhC+zBQFmqmiQLAeYU1XvxffPVj9/ZmC381RucJUH3giVfdcBPvnQ9x8XuvhFKhePXHKhlnfvAcgK6rsd4BnM2SQ2olUHyZpJo1Nmg1VKt8GM2WyvSlqhg9lV88HsTHk3OWC+VpPUA4B4ANV8MFUHPDuBgHR18hXulblICHNaJEtDleLnTJ5TPTegq59TQE2Sa7fFIbkGqq5roTMJoPmURe692yAXuovLyQfvebDJ1tMtWHxEAM1Ik0onXzDJrKX7tS1pYBJq+8XZsWjrNRB132ztDFLVAHWAi6X62NRnSeLjbk13h5JEFQcwXSTu4NpK0qW7+P6FmaxTXJi80+h6od2qnt/NuG52TXGh/eiF9uUH8Tezd7ALs/99XOcrfnPyzqfX7cJEsBy1jvDMY//iG8d0F5e7BvDHPviXHmxfd01kOlSC1G7dQ4sAtAaIKqklGPLc7NZs56UBanFlZIJ4UiVpjompZVPN3LNC05A8GAGeBt92x+HuOChBtKyhTY2H3e4gO9PuINuqAE5Otmy/9ZidgY118u0BjpUDGA/AZ/ad0WE2pkLy2H5/lsO51Gd+7l9940G6S8tdAfhj3338IFe6pik7lUr1V7ltDWTd6rGRp4vGjpVAKbAaeqRZZWgysHPLDq7aXmKX3AB5SN0BZE4b6YmDCFRI+sA7NGTYW1PJLB1ABD+6tEHKAOSBSu0I4A5AQ3J3O5fi3RzA9+uzw0xhBrCdBtsfvjhAr2u99s//5d0B+XUD/LHv/siDDcFrpmrZgxHErooZ6b1QxxLqmPvWpBTqmeDfqjvExcEFnEZhNdZs/xmjdYfUAhEA+0Vqemi43Tm2vAspR6MbiBPU5jRKpgN3EADuPFI2tz+yddbgCtlWPzNQd2WQXv+ueRqkuXROsBu0RrptxtzrtZ/9udcP8usC+Ae+63suVZVclTyZXAIhxQ7ggatpdr+2MtS2XoN0n0qrsqWQWpM/A9PBLaXfIgNklV6HHaqaPAgRGaGwvxmlmrokpx8cjRqghs1WVTx7nngHUDxCNqwJrO8rsLOuU2zRMSYAH0AHyGD8O2iV0aTo35qpsSeWxx99nTb5NQP8/X/+Q8cNzCeKSq1J5GxqmQCiAWxM2HO4ek6lu5YpJdbs7uRSzCBWyph9n001m4rmKLUZy2zYWHSm9BAvjhyvBy66+oswZIA7c5ccSx+WDqbZZrUkMwAb1jg3fja1P55Mojk7wxTgzg72PA0dbabBPYtgC3gEScbG2+eHUuXpn3nsD47oNS6vCeB7jj54xEv9olQ61NSYMV+TPLefpm4N7NkJlZGr+GyGilaCVRzclF52lS0uwUKcfi/T4HhKT8g7qD3qFKRqGmPLkUBAjLmHKmkj0aFGd4O0GqGbfFsgsdPOt8rwFdyQ6AB62vw9JBrbSHwchKQW5wvu3vVoWgRa2noopTSQ/+iIXsMyv8rr6eTo6PCM69Ptto4YwNqq0mc2uEurqWhyu2xsOQH2v2NIsYBIUUhs2wp7wj5ydFyiMG7Ix2ZCXtV06y7I50ZGaMwSRQBj3gQ0eiPPAMDB9K1VX5bY6q0xYtDcyzpsaWnD6nFL9YNN41TdH6Jeeo2YJfNgCPz2um9+crvP2u5hXf1Z9H6bi9ySFYJaMT7ay/JE272XXuXyqiX4Vi2X2y0fcbowDiyF3Q1ZCWkuM8iVE6vKBUy5JLCFJ/+uAlIFW0sEmwty5ZLNKKPpEhx1UuEmuQRLhhbLEIacg5gFGYO9NYkvlCB7wZ6rYjsOid3BN7/duiuQYjZpD0mO75jgas2mLcAXJs9bT3lPkvxhyioTbQo5+UeP/eFj9CqXVwXwX/nO7/xca62HtaFdtYIFp1qeDMSeCQK4NA2qO8D0/SrFsi+hnkMtgy8bqLYE0P3Q7S8h6yNRZiOdTQNEV92DtEaMeYhY2XoeVFsdOCssaH9oHGE3rLOvBvC0BVwlXr/LOl9oh/gtVHNG5UjvfN38jOlKGLGHf/Jnv36JXsXyigG+5+joqP3WFQdXm97VafqvcH04mDGkl2F/uXQyZdJLXSXb9xV3hdTeSgLe1SE09VZyoS571aPAqlNX1WVrkyfelszG8VQ4Y9uplieXRAMV4CWg9pnuc54j6wBsa/5tQWcp23XkCiU4hHY+kuykHWzXUPrsLTT7xE+9Cnv8igFut/p0szOHpiYBrgiaksMOO3Fy+xuuD/qeiZxZSmfQKEIlqGoUq5o0U5Krrq519QoYyocdy1nHRskaKoJkF8ni9mDaUXdlpD6io7l1gBxYzlVbmwE41EA7BvOfz0n55J3WtwEseEShrM2O/HPknu0zdNAhCjCYIzpcFrPHdw/g7z86utx+78ikCrYxmG7TwWaHtWVCbRNYcrfDkHBGZMps7wzpJWfJsL8Mu0thg4f0XIAqMoIcJa2SwFrF5FBmw5tol2z+LgrhOTqOdqYR5DIABv0aEk0JfCcAm04BIHnq4EYny+2wz7S9t+yw8Rmes/1/8nf/8XMPvxLsXhZgVc1tcyWyJnkbIcGwscGkJYAc1TH3rUssZ2Lcrsl0W0h18E7aqmcmlMtwls34HTn7DCCFgmChsUYnDHaYs2G5N2LhlLhxjUiK++hJvZP5J/iJGDRPcZAZhMGO4zy5xohOy9RNTdy39mTvkP15IiQ7TdPlh6/80eHL4feyAJe6XpbQjV2OyFUz3BruwQuOjBB8W5dsTmntf99JFY2MGeUSnJqCaGTWDMALtlEyk26yUKb3xrop3vzy0Dk4wObsWx1USCW2MtqFUAnTxk4kkFugux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment