PageSourceSearch

https://www.btse.com/static/js/CTGUZmta.js

js btse.com collected 2026-10-03 21:19:49 UTC 10,837 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"btse@2f4cc265"};var a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="c4f41161-b58f-4edf-ab01-cffc0ffdc69d",e._sentryDebugIdIdentifier="sentry-dbid-c4f41161-b58f-4edf-ab01-cffc0ffdc69d")}catch(t){}}();import{a7 as e,aS as a,ar as t,ak as l,a9 as s,am as n,aa as u,aK as i,af as o,ae as r,a8 as c,ad as p,aU as v,ab as m,ag as d,as as y,ap as f,aY as _,r as w,a6 as g,B as b,an as h,aE as x,aI as S,aM as C,aN as N}from"./B-0vxubZ.js";import{I as T}from"./B4GGByMv.js";import{k as I,l as $,R as k,bJ as A,bI as B,al as R,d0 as j,af as D,aI as E,w as P,c as q,t as K,U as O}from"./fTPyrBIP.js";import{_ as z}from"./SJUTAzMa.js";import"./CEBSnBgb.js";import"./D8-5GxBK.js";import"./chunk-lottie.tqfMQl6Y.js";import"./SmGL2nNO.js";import"./chunk-web3.BZXhiO4y.js";import"./chunk-web3-onboard-utils.iUTN3q_9.js";import"./chunk-sentry.DKA24Cnk.js";const L={class:"success-dialog__body"},U={class:"body__title"},W={class:"body__subtitle"},F={class:"body__content"},H={class:"summary-block"},M={class:"flex-box items-center"},Y={key:0,class:"summary-suffix"},G=z({__name:"SuccessDialog",props:{summaryInfo:{type:Array,default:()=>[]}},emits:["dialog:closed"],setup(y,{emit:f}){const _=f,w=e(),g=a(),b=()=>{_("dialog:closed")},h=()=>{g.push({name:k.WALLET_SPOT_HISTORY,params:{lang:w.state.lang}}),b()};return(e,a)=>{const f=t("BrandButton");return s(),l($,{class:"success-dialog",width:e.isMobile?"375px":"560px",isBrandNewStyle:!0,idPrefix:"swap_success_dialog",onClosed:b},{header:n((()=>[r(o(e.$t("wallets.swap")),1)])),body:n((()=>[u("div",L,[i(I),u("p",U,o(e.$t("msg.success")),1),u("p",W,o(e.$t("home.convert.successDialog.subtitle")),1),u("p",F,[r(o(e.$t("account.deviceActivity.buttonText2"))+" ",1),u("span",{onClick:h},o(e.$t("wallets.transaction.history")),1)]),u("div",H,[(s(!0),c(p,null,v(y.summaryInfo,((e,a)=>(s(),c("div",{key:a,class:"summary-item flex-box items-center justify-between"},[u("div",null,o(e.title),1),u("div",M,[u("span",{class:d({"summary-highlight":e.isHighlight})},o(e.desc),3),e.suffix?(s(),c("span",Y,o(e.suffix),1)):m("",!0)])])))),128))]),i(f,{class:"body__button",type:"primary",onClick:b},{default:n((()=>[r(o(e.$t("t.ok")),1)])),_:1})])])),_:1},8,["width"])}}},[["__scopeId","data-v-74d50209"]]),J={__name:"RateUpdateDialog",emits:["dialog:closed"],setup(e,{emit:a}){const u=a;return(e,a)=>{const c=t("BaseButton");return s(),l(B,{genre:y(A).WARNING,title:e.$t("wallets.swap.retaUpdated"),onClosed:a[1]||(a[1]=e=>u("dialog:closed"))},{bottom:n((()=>[i(c,{class:"confirmButton primary",size:"large",onClick:a[0]||(a[0]=e=>u("dialog:closed"))},{default:n((()=>[r(o(e.$t("t.confirm")),1)])),_:1})])),default:n((()=>[r(o(e.$t("wallets.payment.quoteExpired.description"))+" ",1)])),_:1},8,["genre","title"])}}},Q={class:"wallet-swap-info-item"},V={class:"wallet-swap-info-item-title"},X={class:"wallet-swap-info-item-value"},Z={class:"wallet-swap-info-item-amount"},ee={class:"wallet-swap-info-item-currency"},ae=z({__name:"WalletSwapInfoItem",props:{title:{type:String,default:""},amount:{type:String,default:""},currency:{type:String,default:""},toolTip:{type:String,default:""}},setup:e=>(a,p)=>{const v=t("ToolTip");return s(),c("div",Q,[u("div",V,[r(o(e.title)+" ",1),e.toolTip?(s(),l(v,{key:0,placement:"top"},{content:n((()=>[i(R,{class:"tooltip-icon"})])),tooltip:n((()=>[r(o(e.toolTip),1)])),_:1})):m("",!0)]),u("div",X,[u("div",Z,o(e.amount||0),1),u("div",ee,o(e.currency),1)])])}},[["__scopeId","data-v-14145082"]]),te={class:"main-panel"},le={class:"panel__content"},se={class:"panel__title"},ne={class:"panel__input-section"},ue={class:"input-section__from-wrap"},ie={class:"input-section__available-wrap"},oe={class:"input-section__from-title"},re={key:0,class:"input-section__available-amount-wrap"},ce={class:"input-section__available-text"},pe={class:"input-section__available-amount"},ve={class:"input-section__available-currency"},me={class:"input-section__error-msg"},de={class:"input-section__transfer-wrap"},ye={class:"input-section__to-wrap"},fe={class:"input-section__available-wrap"},_e={class:"input-section__to-title"},we={class:"input-section__rate"},ge={class:"input-section__to-option-wrap"},be={class:"panel__detail-info"},he=z({__name:"WalletSwap",setup(l){const p=f(),v=a(),d=e(),{t:I}=_(),{$openDialog:$}=j(),A=E(),B=w(!0),z=w([]),L=w(""),U=w(""),W=w(""),F=w(""),H=w(""),M=w(""),Y=w("0"),Q=w("0"),V=w("0"),X=w("0"),Z=w("0"),ee=w("0"),he=w(!1),xe=g((()=>d.state.loginState)),Se=g((()=>d.state.currencyMap)),Ce=g((()=>z.value.reduce(((e,a)=>(e[a.fromCurrency]=a.toCurrencies.map((e=>e.currency)),e)),{}))),Ne=g((()=>Object.keys(Ce.value))),Te=g((()=>Ce.value[L.value]||[])),Ie=g((()=>Se.value[L.value]||{})),$e=g((()=>Se.value[U.value]||{})),ke=g((()=>d.getters.getCurrencyScale(L.value))),Ae=g((()=>{let e=Number(Ie.value.available)||0;return b(e).toFixed(ke.value,b.ROUND_DOWN)})),Be=g((()=>D(Ae.value,{formatKey:"max",currency:L.value}))),Re=g((()=>
1{if(!xe.value)return"";if(""===W.value)return"";const e=W.value||0;return b(e).gt(Ae.value)?I("rules.low"):""})),je=g((()=>"INR"===L.value&&"USDT"===U.value));function De(){W.value=Ae.value}function Ee(){[U.value,L.value]=[L.value,U.value],W.value=""}const Pe=g((()=>W.value?D(F.value,{formatKey:"max",currency:U.value}):"")),qe=g((()=>`1 ${L.value} = ${M.value} ${U.value}`)),Ke=g((()=>A.isExtraSmallSize?"medium":"large")),Oe=g((()=>xe.value?I("wallets.swap.requestButton.swapNow"):I("wallets.swap.requestButton.loginToSwap"))),ze=g((()=>!!xe.value&&(!(""!==W.value&&!b(W.value||0).eq(0))||!!Re.value)));async function Le(){try{const e={fromCurrency:L.value,toCurrency:U.value,fromAmount:W.value||"0"},a=await P.getSwapRate(e),t=M.value!==a.exchangeRate;return F.value=a.toAmount,H.value=a.toActualAmount,M.value=a.exchangeRate,Y.value=b(a.swapRate||0).times(100).toString(),Q.value=a.swapAmount,V.value=b(a.gstRate||0).times(100).toString(),X.value=a.gstAmount,Z.value=b(a.tdsRate||0).times(100).toString(),ee.value=a.tdsAmount,t}catch(e){return F.value="",M.value="",Y.value="0",Q.value="0",V.value="0",X.value="0",Z.value="0",ee.value="",Promise.reject(e)}}h(L,(()=>{We(),Ue()})),h(U,(()=>{We(),Ue()})),h(W,(()=>{Ue()})),x((()=>{!async function(){try{const e=await P.getSwapCoins();z.value=e||[],await S(),await async function(){const{fromCoin:e,toCoin:a}=p.query,t=Ne.value.includes(e);L.value=t?e:Ne.value[0],await S();const l=Te.value.includes(a);U.value=l?a:Te.value[0],We()}(),await Le()}catch(e){return Promise.reject(e)}finally{B.value=!1}}()}));const Ue=q(Le,200),We=q((()=>{v.replace({query:{...p.query,fromCoin:L.value,toCoin:U.value}})}),200);async function Fe(){if(!xe.value){const e=v.resolve({name:k.SWAP,params:{lang:d.state.lang}});return void v.push({name:"login",query:{redirect:e.href},params:{lang:d.state.lang}})}await Le()?await $(J):async function(){try{he.value=!0;const e=await P.processSwap({fromCurrency:L.value,toCurrency:U.value,fromAmount:W.value});await $(G,{summaryInfo:[{title:I("t.to"),isHighlight:!0,desc:D(e.toAmount,{formatKey:"max",currency:e.toCurrency}),suffix:e.toCurrency},{title:I("t.from"),desc:`${D(e.fromAmount,{formatKey:"max",currency:e.fromCurrency})} ${e.fromCurrency}`},{title:"",desc:`1 ${e.fromCurrency} = ${e.exchangeRate} ${e.toCurrency}`}]}),W.value=""}catch(e){return Promise.reject(e)}finally{he.value=!1}}()}return(e,a)=>{const l=t("BrandButton"),p=t("BrandInput"),v=t("ToolTip"),d=t("BaseButton"),f=C("loading");return N((s(),c("div",te,[u("div",le,[u("div",se,o(y(I)("wallets.swap")),1),u("div",ne,[u("div",ue,[u("div",ie,[u("p",oe,o(y(I)("t.from")),1),xe.value&&L.value?(s(),c("div",re,[u("p",ce,o(y(I)("wallets.convert.availableAmount")),1),u("p",pe,o(Be.value),1),u("p",ve,o(L.value),1)])):m("",!0)]),i(p,{id:y(K)("input_search_coin","from"),value:W.value,"onUpdate:value":a[0]||(a[0]=e=>W.value=e),isBrandNewStyle:"",class:"input-section__from-input",placeholder:y(I)("wallets.convert.amount"),isError:Boolean(Re.value),isPrice:"",decimalLimit:ke.value},{suffix:n((()=>[i(l,{id:y(K)("btn_max"),class:"input-section__from-input-button",type:"text",size:"mediumFontBig",disabled:!xe.value,onClick:De},{default:n((()=>[r(o(y(I)("t.max.uppercase")),1)])),_:1},8,["id","disabled"]),i(O,{class:"input-section__currency-icon",displayName:Ie.value.displayName,type:Ie.value.isFiat?"fiat":"icon",name:Ie.value.shortName,size:"16",shortName:""},null,8,["displayName","type","name"])])),_:1},8,["id","value","placeholder","isError","decimalLimit"]),u("div",me,o(Re.value),1)]),u("div",de,[u("button",{type:"button",class:"input-section__transfer-button",onClick:Ee},[i(T,{class:"swap-icon-transfer"})])]),u("div",ye,[u("div",fe,[u("p",_e,o(y(I)("t.to")),1),u("p",we,[u("span",null,o(qe.value),1),i(v,{placement:"top"},{content:n((()=>[i(R,{class:"info-icon"})])),tooltip:n((()=>[r(o(e.$t("wallets.payment.currencyRate.tooltip")),1)])),_:1})])]),u("div",ge,[i(p,{id:y(K)("input_search_coin","to"),value:Pe.value?`≈ ${Pe.value}`:"",isBrandNewStyle:"",class:"input-section__to-input",placeholder:`≈ ${y(I)("wallets.convert.amount")}`,readonly:""},{suffix:n((()=>[i(O,{class:"input-section__currency-icon",displayName:$e.value.displayName,type:$e.value.isFiat?"fiat":"icon",name:$e.value.shortName,shortName:"",size:"16"}
1,null,8,["displayName","type","name"])])),_:1},8,["id","value","placeholder"])])])]),u("div",be,[i(ae,{title:y(I)("wallets.swap.swapAmount"),amount:Pe.value,currency:U.value},null,8,["title","amount","currency"]),i(ae,{title:y(I)("wallets.swap.feesPercent",{percentNumber:Y.value}),amount:y(D)(Q.value,{formatKey:"max",currency:U.value}),currency:U.value},null,8,["title","amount","currency"]),i(ae,{title:y(I)("wallets.swap.gstOnFeesPercent",{percentNumber:V.value}),amount:y(D)(X.value,{formatKey:"max",currency:U.value}),currency:U.value,toolTip:y(I)("wallets.swap.gstOnFees.tooltip",{percentNumber:V.value})},null,8,["title","amount","currency","toolTip"]),i(ae,{title:y(I)("wallets.swap.tdsTaxPercent",{percentNumber:Z.value}),amount:y(D)(ee.value,{formatKey:"max",currency:U.value}),currency:U.value,toolTip:je.value?y(I)("wallets.swap.tdsTax.tooltip"):y(I)("wallets.swap.tdsTax.tooltip.usdtToOther")},null,8,["title","amount","currency","toolTip"]),a[1]||(a[1]=u("hr",{class:"divider"},null,-1)),i(ae,{class:"receive-amount-info",title:y(I)("t.youWillReceive"),amount:H.value,currency:U.value},null,8,["title","amount","currency"])]),i(d,{size:Ke.value,isLoading:he.value,class:"primary",disabled:ze.value,onClick:Fe},{default:n((()=>[r(o(Oe.value),1)])),_:1},8,["size","isLoading","disabled"])])])),[[f,B.value]])}}},[["__scopeId","data-v-9a78606c"]]);export{he as default};
2//# sourceMappingURL=CTGUZmta.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.