(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{Xejp:function(t,n,e){"use strict";e.r(n),e.d(n,"WalletsModule",(function(){return Zt}));var c=e("1VvW"),a=e("lruz"),i=e("i2L+"),o=e("kZht"),l=(e("og7C"),e("sXtk")),s=e("MUfl"),r=e("anSm"),b=e("1o0v"),g=e("aDqW"),d=e("An66"),p=e("yPvj"),u=e("chaP"),m=e("+I9z"),f=e("LbKT"),h=e("hCLc"),C=e("NxuZ"),O=e("P0Um"),T=e("DpwM"),v=e("fvDn");function w(t,n){if(1&t){const t=o.Vb();o.Ub(0,"button",28),o.bc("click",(function(){o.Ec(t);const n=o.fc().$implicit;return o.fc().withdraw$.emit(n)})),o.Pb(1,"fa-icon",29),o.Qc(2),o.gc(3,"translate"),o.Tb()}if(2&t){const t=o.fc(2);o.mc("disabled",t.env.demo),o.Cb(2),o.Sc(" ",o.hc(3,2,"WALLETS.FUTURES.WITHDRAWAL")," ")}}function P(t,n){if(1&t){const t=o.Vb();o.Ub(0,"tr",12),o.Ub(1,"td",13),o.Pb(2,"market-icon",14),o.Ub(3,"div"),o.Ub(4,"div"),o.Qc(5),o.gc(6,"walletName"),o.Tb(),o.Tb(),o.Tb(),o.Ub(7,"td",15),o.Pb(8,"ghost-trail",16),o.gc(9,"sato"),o.Ub(10,"div",17),o.Qc(11),o.gc(12,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Ub(13,"td",18),o.Pb(14,"ghost-trail",16),o.gc(15,"sato"),o.Ub(16,"div",17),o.Qc(17),o.gc(18,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Ub(19,"td",19),o.Pb(20,"ghost-trail",20),o.gc(21,"sato"),o.Ub(22,"div",17),o.Qc(23),o.gc(24,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Ub(25,"td",21),o.Pb(26,"ghost-trail",16),o.gc(27,"sato"),o.Ub(28,"div",17),o.Qc(29),o.gc(30,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Ub(31,"td",22),o.Qc(32),o.gc(33,"percent"),o.Tb(),o.Ub(34,"td",23),o.Qc(35),o.gc(36,"crypto"),o.Tb(),o.Ub(37,"td",8),o.Ub(38,"button",24),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc().details$.emit(e)})),o.Pb(39,"fa-icon",25),o.Qc(40),o.gc(41,"translate"),o.Tb(),o.Oc(42,w,4,4,"button",26),o.Ub(43,"button",24),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc().transfer$.emit(e)})),o.Pb(44,"fa-icon",27),o.Qc(45),o.gc(46,"translate"),o.Tb(),o.Tb(),o.Tb()}if(2&t){const t=n.$implicit,e=o.fc();o.Cb(2),o.mc("pair",t.pair),o.Cb(3),o.Rc(o.hc(6,16,t.name)),o.Cb(3),o.nc("content",o.jc(9,18,t.am,t.asset,"full")),o.Cb(3),o.Rc(o.hc(12,22,t.currency)),o.Cb(3),o.nc("content",o.jc(15,24,t.im,t.asset,"full")),o.Cb(3),o.Rc(o.hc(18,28,t.currency)),o.Cb(3),o.nc("content",o.jc(21,30,t.pnl,t.asset,"full")),o.mc("pnl",t.pnl),o.Cb(3),o.Rc(o.hc(24,34,t.currency)),o.Cb(3),o.nc("content",o.jc(27,36,t.pv,t.asset,"full")),o.Cb(3),o.Rc(o.hc(30,40,t.currency)),o.Cb(3),o.Sc(" ",o.ic(33,42,t.allocation,"1.1-1")," "),o.Cb(3),o.Sc("",o.ic(36,45,t.notional,"usd")," USD"),o.Cb(5),o.Sc(" ",o.hc(41,48,"WALLETS.TRADING.DETAILS")," "),o.Cb(2),o.mc("ngIf",e.withdrawEnabled),o.Cb(3),o.Sc(" ",o.hc(46,50,"WALLETS.TRADING.TRANSFER")," ")}}const _=function(t){return{num:t}};function y(t,n){if(1&t){const t=o.Vb();o.Ub(0,"tr",30),o.Ub(1,"td",31),o.Ub(2,"span"),o.Qc(3),o.gc(4,"translate"),o.Tb(),o.Ub(5,"span"),o.Qc(6," - "),o.Tb(),o.Ub(7,"a",32),o.bc("click",(function(n){o.Ec(t);const e=o.fc();return n.preventDefault(),e.showEmpty$.emit()})),o.Qc(8),o.gc(9,"translate"),o.Tb(),o.Tb(),o.Tb()}if(2&t){const t=o.fc();o.Cb(3),o.Rc(o.ic(4,2,"WALLETS.NUM_HIDDEN",o.rc(7,_,t.numHidden))),o.Cb(5),o.Sc(" ",o.hc(9,5,"BUTTON.SHOW_ALL_WALLETS")," ")}}function M(t,n){if(1&t){const t=o.Vb();o.Ub(0,"div",33),o.Ub(1,"div",34),o.Ub(2,"div"),o.Pb(3,"market-icon",14),o.Ub(4,"div"),o.Qc(5),o.gc(6,"walletName"),o.Tb(),o.Tb(),o.Tb(),o.Ub(7,"div",12),o.Ub(8,"p",35),o.Qc(9,"WALLETS.TRADING.AVAILABLE_MARGIN"),o.Tb(),o.Ub(10,"div",36),o.Pb(11,"ghost-trail",16),o.gc(12,"sato"),o.Ub(13,"div",37),o.Qc(14),o.gc(15,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Tb(),o.Ub(16,"div",12),o.Ub(17,"p",35),o.Qc(18,"WALLETS.TRADING.INITIAL_MARGIN"),o.Tb(),o.Ub(19,"div",36),o.Pb(20,"ghost-trail",16),o.gc(21,"sato"),o.Ub(22,"div",37),o.Qc(23),o.gc(24,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Tb(),o.Ub(25,"div",12),o.Ub(26,"p",35),o.Qc(27,"WALLETS.TRADING.PNL"),o.Tb(),o.Ub(28,"div",36),o.Pb(29,"ghost-trail",20),o.gc(30,"sato"),o.Ub(31,"div",37),o.Qc(32),o.gc(33,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Tb(),o.Ub(34,"div",12),o.Ub(35,"p",35),o.Qc(36,"WALLETS.TRADING.PORTFOLIO_VALUE"),o.Tb(),o.Ub(37,"div",36),o.Pb(38,"ghost-trail",16),o.gc(39,"sato"),o.Ub(40,"div",37),o.Qc(41),o.gc(42,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Tb(),o.Ub(43,"div",12),o.Ub(44,"p",35),o.Qc(45,"LABEL.ALLOCATION"),o.Tb(),o.Ub(46,"div",36),o.Qc(47),o.gc(48,"percent"),o.Tb(),o.Tb(),o.Ub(49,"div",12),o.Ub(50,"p",35),o.Qc(51,"LABEL.ESTIMATE"),o.Tb(),o.Ub(52,"div",36),o.Qc(53),o.gc(54,"crypto"),o.Tb(),o.Tb(),o.Ub(55,"div",38),o.Ub(56,"button",39),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc().details$.emit(e)})),o.Pb(57,"fa-icon",25),o.Qc(58),o.gc(59,"translate"),o.Tb(),o.Ub(60,"button",39),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc().transfer$.emit(e)})),o.Pb(61,"fa-icon",27),o.Qc(62),o.gc(63,"translate"),o.Tb(),o.Tb(),o.Tb()}if(2&t){const t=n.$implicit;o.Cb(3),o.mc("pair",t.currency),o.Cb(2),o.Rc(o.hc(6,15,t.name)),o.Cb(6),o.nc("content",o.jc(12,17,t.am,t.asset,"full")),o.Cb(3),o.Rc(o.hc(15,21,t.currency)),o.Cb(6),o.nc("content",o.jc(21,23,t.im,t.asset,"full")),o.Cb(3),o.Rc(o.hc(24,27,t.currency)),o.Cb(6),o.nc("content",o.jc(30,29,t.pnl,t.asset,"full")),o.mc("pnl",t.pnl),o.Cb(3),o.Rc(o.hc(33,33,t.currency)),o.Cb(6),o.nc("content",o.jc(39,35,t.pv,t.asset,"full")),o.Cb(3),o.Rc(o.hc(42,39,t.currency)),o.Cb(6),o.Sc(" ",o.ic(48,41,t.allocation,"1.1-1")," "),o.Cb(6),o.Sc("",o.ic(54,44,t.notional,"usd")," USD"),o.Cb(5),o.Sc(" ",o.hc(59,47,"WALLETS.TRADING.DETAILS")," "),o.Cb(4),o.Sc(" ",o.hc(63,49,"WALLETS.TRADING.TRANSFER")," ")}}let U=(()=>{class t{constructor(t,n){this.env=t,this.feature=n,this.details$=new o.o,this.transfer$=new o.o,this.withdraw$=new o.o,this.showEmpty$=new o.o}ngOnInit(){localStorage.setItem("kf-wallet","single-collateral")}trackByWalletName(t,n){return n.name}get withdrawEnabled(){return this.feature.isEnabled("transferDestination")}}return t.\u0275fac=function(n){return new(n||t)(o.Ob(l.a),o.Ob(s.a))},t.\u0275cmp=o.Ib({type:t,selectors:[["futures-wallet-table"]],inputs:{wallets:"wallets",numHidden:"numHidden"},outputs:{details$:"details",transfer$:"transfer",withdraw$:"withdraw",showEmpty$:"showEmpty"},decls:20,vars:5,consts:[["body","","ghost",""],["translate","",1,"cell--name"],["translate","",1,"cell--am","cell--value"],["translate","",1,"cell--im","cell--value"],["translate","",1,"cell--pnl","cell--value"],["translate","",1,"cell--pv","cell--value"],["translate","",1,"cell--allocation","cell--value"],["translate","",1,"cell--estimate","cell--value"],[1,"cell--buttons"],["body","","class","row",4,"ngFor","ngForOf","ngForTrackBy"],["body","",4,"ngIf"],["class","card",4,"ngFor","ngForOf","ngForTrackBy"],["body","",1,"row"],[1,"cell--name","cell--2col"],[3,"pair"],["mono","",1,"cell--am","cell--value"],[3,"content"],["ghost","",1,"unit"],["mono","",1,"cell--im","cell--value"],["mono","",1,"cell--pnl","cell--value"],[3,"pnl","content"],["mono","",1,"cell--pv","cell--value"],["mono","",1,"cell--allocation","cell--value"],["mono","",1,"cell--estimate","cell--value"],["mat-button","",3,"click"],["icon","info","size","2x"],["mat-button","",3,"disabled","click",4,"ngIf"],["icon","transfer","size","2x"],["mat-button","",3,"disabled","click"],["icon","withdraw","size","2x"],["body",""],["colspan","8",1,"empty"],["href","#",1,"global__text--link",3,"click"],[1,"card"],["body","",1,"name","row"],["translate",""],["mono",""],["ghost",""],[1,"row","buttons"],["mat-raised-button","",3,"click"]],template:function(t,n){1&t&&(o.Ub(0,"table"),o.Ub(1,"tr",0),o.Ub(2,"th",1),o.Qc(3,"WALLETS.TRADING.NAME_PAIR"),o.Tb(),o.Ub(4,"th",2),o.Qc(5,"WALLETS.TRADING.AVAILABLE_MARGIN"),o.Tb(),o.Ub(6,"th",3),o.Qc(7,"WALLETS.TRADING.INITIAL_MARGIN"),o.Tb(),o.Ub(8,"th",4),o.Qc(9,"WALLETS.TRADING.PNL"),o.Tb(),o.Ub(10,"th",5),o.Qc(11,"WALLETS.TRADING.PORTFOLIO_VALUE"),o.Tb(),o.Ub(12,"th",6),o.Qc(13,"LABEL.ALLOCATION"),o.Tb(),o.Ub(14,"th",7),o.Qc(15,"LABEL.ESTIMATE"),o.Tb(),o.Pb(16,"th",8),o.Tb(),o.Oc(17,P,47,52,"tr",9),o.Oc(18,y,10,9,"tr",10),o.Tb(),o.Oc(19,M,64,51,"div",11)),2&t&&(o.Cb(17),o.mc("ngForOf",n.wallets)("ngForTrackBy",n.trackByWalletName),o.Cb(1),o.mc("ngIf",n.numHidden),o.Cb(1),o.mc("ngForOf",n.wallets)("ngForTrackBy",n.trackByWalletName))},directives:[r.a,b.a,g.a,d.m,d.n,p.a,u.a,m.a,f.a,h.b,C.b],pipes:[O.a,T.c,v.a,d.u,T.a,g.d],styles:["[_nghost-%COMP%]{display:block;padding:0 var(--spacing)}table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}tr[_ngcontent-%COMP%]:not(:first-child):not(:last-child){border-bottom:1px solid var(--border-colour)}td[_ngcontent-%COMP%]:not(:last-child), th[_ngcontent-%COMP%]:not(:last-child){padding-right:var(--spacing)}th[_ngcontent-%COMP%]{position:sticky;top:0;z-index:2;text-align:left;text-transform:uppercase;background-color:var(--card-colour)}td[_ngcontent-%COMP%]{padding:var(--spacing-xs) 0;font-size:14px}td.cell--2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:var(--spacing)}td.cell--2col[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:24px}td.cell--name[_ngcontent-%COMP%]{padding-right:var(--spacing-l);white-space:nowrap}td.cell--buttons[_ngcontent-%COMP%]{text-align:right;font-size:12px}td.cell--buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing)}td.cell--buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] svg{vertical-align:-25%}@media (max-width:1024px){td.cell--buttons[_ngcontent-%COMP%]{display:none}}.row--buttons[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{white-space:none}.row--buttons[_ngcontent-%COMP%] td[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing)}.row--buttons[_ngcontent-%COMP%] td[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] svg{vertical-align:-25%}@media (min-width:1025px){.row--buttons[_ngcontent-%COMP%]{display:none}}@media (max-width:1024px){.cell--allocation[_ngcontent-%COMP%]{display:none}}td.cell--value[_ngcontent-%COMP%], th.cell--value[_ngcontent-%COMP%]{text-align:right}.unit[_ngcontent-%COMP%]{text-transform:uppercase}.empty[_ngcontent-%COMP%]{text-align:center}@media (max-width:1024px){table[_ngcontent-%COMP%]{display:none}.card[_ngcontent-%COMP%]{margin-bottom:var(--spacing);padding-bottom:var(--spacing)}.card[_ngcontent-%COMP%]:last-child{padding-bottom:var(--spacing-xl)}.card[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{font-size:14px}.card[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{padding:var(--spacing) 0}.card[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px dashed var(--border-colour)}.card[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] svg{vertical-align:-25%}.card[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.card[_ngcontent-%COMP%] ghost-trail[_ngcontent-%COMP%]{padding-right:var(--spacing-s)}.name[_ngcontent-%COMP%]{display:flex}.name[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{padding-top:4px}.name[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{padding-right:var(--spacing);font-size:24px}}@media (min-width:1025px){.card[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),t})();function x(t,n){if(1&t){const t=o.Vb();o.Ub(0,"button",20),o.bc("click",(function(){o.Ec(t);const n=o.fc().$implicit;return o.fc().deposit$.emit(n)})),o.Pb(1,"fa-icon",21),o.Qc(2),o.gc(3,"translate"),o.Tb()}if(2&t){const t=o.fc(2);o.mc("disabled",t.env.demo),o.Cb(2),o.Sc(" ",o.hc(3,2,"WALLETS.FUTURES.DEPOSIT")," ")}}function E(t,n){if(1&t){const t=o.Vb();o.Ub(0,"button",20),o.bc("click",(function(){o.Ec(t);const n=o.fc().$implicit;return o.fc().withdraw$.emit(n)})),o.Pb(1,"fa-icon",22),o.Qc(2),o.gc(3,"translate"),o.Tb()}if(2&t){const t=o.fc(2);o.mc("disabled",t.env.demo),o.Cb(2),o.Sc(" ",o.hc(3,2,"WALLETS.FUTURES.WITHDRAWAL")," ")}}function L(t,n){if(1&t){const t=o.Vb();o.Sb(0),o.Ub(1,"tr",9),o.Ub(2,"td",10),o.Pb(3,"market-icon",11),o.Ub(4,"div"),o.Ub(5,"div"),o.Qc(6),o.gc(7,"walletName"),o.Tb(),o.Ub(8,"div",12),o.Qc(9),o.gc(10,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Tb(),o.Ub(11,"td",13),o.Pb(12,"ghost-trail",14),o.gc(13,"sato"),o.Ub(14,"div",12),o.Qc(15),o.gc(16,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Ub(17,"td",15),o.Qc(18),o.gc(19,"percent"),o.Tb(),o.Ub(20,"td",16),o.Qc(21),o.gc(22,"crypto"),o.Tb(),o.Ub(23,"td",5),o.Oc(24,x,4,4,"button",17),o.Oc(25,E,4,4,"button",17),o.Ub(26,"button",18),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc().transfer$.emit(e)})),o.Pb(27,"fa-icon",19),o.Qc(28),o.gc(29,"translate"),o.Tb(),o.Tb(),o.Tb(),o.Rb()}if(2&t){const t=n.$implicit,e=o.fc();o.Cb(3),o.mc("base",t.name),o.Cb(3),o.Rc(o.hc(7,10,t.name)),o.Cb(3),o.Rc(o.hc(10,12,t.currency)),o.Cb(3),o.nc("content",o.jc(13,14,t.balance,t.asset,"full")),o.Cb(3),o.Rc(o.hc(16,18,t.currency)),o.Cb(3),o.Sc(" ",o.ic(19,20,t.allocation,"1.1-1")," "),o.Cb(3),o.Sc("",o.ic(22,23,t.notional,"usd")," USD"),o.Cb(3),o.mc("ngIf",e.isExternalUser&&!e.isSubAccount),o.Cb(1),o.mc("ngIf",!e.isSubAccount),o.Cb(3),o.Sc(" ",o.hc(29,26,"WALLETS.FUTURES.TRANSFER")," ")}}const A=function(t){return{num:t}};function S(t,n){if(1&t){const t=o.Vb();o.Ub(0,"tr",23),o.Ub(1,"td",24),o.Ub(2,"span"),o.Qc(3),o.gc(4,"translate"),o.Tb(),o.Ub(5,"span"),o.Qc(6," - "),o.Tb(),o.Ub(7,"a",25),o.bc("click",(function(n){o.Ec(t);const e=o.fc();return n.preventDefault(),e.showEmpty$.emit()})),o.Qc(8),o.gc(9,"translate"),o.Tb(),o.Tb(),o.Tb()}if(2&t){const t=o.fc();o.Cb(3),o.Rc(o.ic(4,2,"WALLETS.NUM_HIDDEN",o.rc(7,A,t.numHidden))),o.Cb(5),o.Sc(" ",o.hc(9,5,"BUTTON.SHOW_ALL_WALLETS")," ")}}function I(t,n){if(1&t){const t=o.Vb();o.Ub(0,"div",26),o.Ub(1,"div",27),o.Ub(2,"div"),o.Pb(3,"market-icon",28),o.Ub(4,"div"),o.Qc(5),o.gc(6,"walletName"),o.Tb(),o.Tb(),o.Tb(),o.Ub(7,"div",9),o.Ub(8,"p",29),o.Qc(9,"LABEL.BALANCE"),o.Tb(),o.Ub(10,"div",30),o.Pb(11,"ghost-trail",14),o.gc(12,"sato"),o.Ub(13,"div",31),o.Qc(14),o.gc(15,"cryptoAbbreviation"),o.Tb(),o.Tb(),o.Tb(),o.Ub(16,"div",9),o.Ub(17,"p",29),o.Qc(18,"LABEL.ALLOCATION"),o.Tb(),o.Ub(19,"div",30),o.Qc(20),o.gc(21,"percent"),o.Tb(),o.Tb(),o.Ub(22,"div",9),o.Ub(23,"p",29),o.Qc(24,"LABEL.ESTIMATE"),o.Tb(),o.Ub(25,"div",30),o.Qc(26),o.gc(27,"crypto"),o.Tb(),o.Tb(),o.Ub(28,"div",32),o.Ub(29,"button",33),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc().deposit$.emit(e)})),o.Pb(30,"fa-icon",21),o.Qc(31),o.gc(32,"translate"),o.Tb(),o.Ub(33,"button",33),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc().withdraw$.emit(e)})),o.Pb(34,"fa-icon",22),o.Qc(35),o.gc(36,"translate"),o.Tb(),o.Ub(37,"button",34),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc().transfer$.emit(e)})),o.Pb(38,"fa-icon",19),o.Tb(),o.Tb(),o.Tb()}if(2&t){const t=n.$implicit,e=o.fc();o.Cb(3),o.mc("pair",t.currency),o.Cb(2),o.Rc(o.hc(6,10,t.name)),o.Cb(6),o.nc("content",o.jc(12,12,t.balance,t.asset,"full")),o.Cb(3),o.Rc(o.hc(15,16,t.currency)),o.Cb(6),o.Sc(" ",o.ic(21,18,t.allocation,"1.1-1")," "),o.Cb(6),o.Sc("",o.ic(27,21,t.notional,"usd")," USD"),o.Cb(3),o.mc("disabled",e.env.demo),o.Cb(2),o.Sc(" ",o.hc(32,24,"WALLETS.FUTURES.DEPOSIT")," "),o.Cb(2),o.mc("disabled",e.env.demo),o.Cb(2),o.Sc(" ",o.hc(36,26,"WALLETS.FUTURES.WITHDRAWAL")," ")}}let W=(()=>{class t{constructor(t){this.env=t,this.deposit$=new o.o,this.withdraw$=new o.o,this.transfer$=new o.o,this.showEmpty$=new o.o}ngOnInit(){localStorage.setItem("kf-wallet","holding")}trackByWalletName(t,n){return n.name}}return t.\u0275fac=function(n){return new(n||t)(o.Ob(l.a))},t.\u0275cmp=o.Ib({type:t,selectors:[["holding-wallet-table"]],inputs:{wallets:"wallets",numHidden:"numHidden",equity:"equity",isSubAccount:"isSubAccount",isExternalUser:"isExternalUser"},outputs:{deposit$:"deposit",withdraw$:"withdraw",transfer$:"transfer",showEmpty$:"showEmpty"},decls:14,vars:5,consts:[["body","","ghost",""],["translate","",1,"cell--name"],["translate","",1,"cell--balance","cell--value"],["translate","",1,"cell--allocation","cell--value"],["translate","",1,"cell--estimate","cell--value"],[1,"cell--buttons"],[4,"ngFor","ngForOf","ngForTrackBy"],["body","",4,"ngIf"],["class","card",4,"ngFor","ngForOf","ngForTrackBy"],["body","",1,"row"],[1,"cell--name","cell--2col"],[3,"base"],["ghost","",1,"unit"],["mono","",1,"cell--balance","cell--value"],[3,"content"],["mono","",1,"cell--allocation","cell--value"],["mono","",1,"cell--estimate","cell--value"],["mat-button","",3,"disabled","click",4,"ngIf"],["mat-button","",3,"click"],["icon","transfer","size","2x"],["mat-button","",3,"disabled","click"],["icon","deposit","size","2x"],["icon","withdraw","size","2x"],["body",""],["colspan","5",1,"empty"],["href","#",1,"global__text--link",3,"click"],[1,"card"],["body","",1,"name","row"],[3,"pair"],["translate",""],["mono",""],["ghost",""],[1,"row","buttons"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,n){1&t&&(o.Ub(0,"table"),o.Ub(1,"tr",0),o.Ub(2,"th",1),o.Qc(3,"LABEL.ASSET"),o.Tb(),o.Ub(4,"th",2),o.Qc(5,"LABEL.BALANCE"),o.Tb(),o.Ub(6,"th",3),o.Qc(7,"LABEL.ALLOCATION"),o.Tb(),o.Ub(8,"th",4),o.Qc(9,"LABEL.ESTIMATE"),o.Tb(),o.Pb(10,"th",5),o.Tb(),o.Oc(11,L,30,28,"ng-container",6),o.Oc(12,S,10,9,"tr",7),o.Tb(),o.Oc(13,I,39,28,"div",8)),2&t&&(o.Cb(11),o.mc("ngForOf",n.wallets.valueSeq())("ngForTrackBy",n.trackByWalletName),o.Cb(1),o.mc("ngIf",n.numHidden),o.Cb(1),o.mc("ngForOf",n.wallets.valueSeq())("ngForTrackBy",n.trackByWalletName))},directives:[r.a,b.a,g.a,d.m,d.n,p.a,u.a,m.a,h.b,C.b],pipes:[O.a,v.a,T.c,d.u,T.a,g.d],styles:["[_nghost-%COMP%]{display:block;padding:0 var(--spacing)}table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}tr[_ngcontent-%COMP%]:not(:first-child):not(:last-child){border-bottom:1px solid var(--border-colour)}td[_ngcontent-%COMP%]:not(:last-child), th[_ngcontent-%COMP%]:not(:last-child){padding-right:var(--spacing)}th[_ngcontent-%COMP%]{position:sticky;top:0;z-index:2;text-align:left;text-transform:uppercase;background-color:var(--card-colour)}td[_ngcontent-%COMP%]{padding:var(--spacing-xs) 0;font-size:14px}td.cell--2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:var(--spacing)}td.cell--2col[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:24px}td.cell--name[_ngcontent-%COMP%]{padding-right:var(--spacing-l);white-space:nowrap}td.cell--buttons[_ngcontent-%COMP%]{text-align:right;font-size:12px}td.cell--buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing)}td.cell--buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] svg{vertical-align:-25%}@media (max-width:1024px){td.cell--buttons[_ngcontent-%COMP%]{display:none}}.row--buttons[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{white-space:none}.row--buttons[_ngcontent-%COMP%] td[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing)}.row--buttons[_ngcontent-%COMP%] td[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] svg{vertical-align:-25%}@media (min-width:1025px){.row--buttons[_ngcontent-%COMP%]{display:none}}@media (max-width:1024px){.cell--allocation[_ngcontent-%COMP%]{display:none}}td.cell--value[_ngcontent-%COMP%], th.cell--value[_ngcontent-%COMP%]{text-align:right}.unit[_ngcontent-%COMP%]{text-transform:uppercase}.empty[_ngcontent-%COMP%]{text-align:center}@media (max-width:1024px){table[_ngcontent-%COMP%]{display:none}.card[_ngcontent-%COMP%]{margin-bottom:var(--spacing);padding-bottom:var(--spacing)}.card[_ngcontent-%COMP%]:last-child{padding-bottom:var(--spacing-xl)}.card[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{font-size:14px}.card[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{padding:var(--spacing) 0}.card[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px dashed var(--border-colour)}.card[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] svg{vertical-align:-25%}.card[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.card[_ngcontent-%COMP%] ghost-trail[_ngcontent-%COMP%]{padding-right:var(--spacing-s)}.name[_ngcontent-%COMP%]{display:flex}.name[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{padding-top:4px}.name[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{padding-right:var(--spacing);font-size:24px}}@media (min-width:1025px){.card[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),t})();var k=e("oiza"),$=e("bBQR"),D=e("7J2L");function Q(t,n){if(1&t&&(o.Ub(0,"span",5),o.Qc(1),o.gc(2,"number"),o.Tb()),2&t){const t=o.fc();o.Cb(1),o.Sc("$",o.ic(2,1,t.estimate||0,"1.2-2")," USD ")}}function R(t,n){1&t&&o.kc(0,0,["*ngIf","loaded; else loading"])}function N(t,n){1&t&&o.Pb(0,"kraken-loading")}const j=["*"];let F=(()=>{class t{constructor(){this.showEstimate=!0,this.loaded=!0}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=o.Ib({type:t,selectors:[["wallet-group"]],inputs:{heading:"heading",estimate:"estimate",showEstimate:"showEstimate",loaded:"loaded"},ngContentSelectors:j,decls:9,vars:6,consts:[[1,"heading"],["body","","uppercase","","ghost",""],["heading","",4,"ngIf"],[4,"ngIf","ngIfElse"],["loading",""],["heading",""]],template:function(t,n){if(1&t&&(o.lc(),o.Ub(0,"section",0),o.Ub(1,"div"),o.Ub(2,"p",1),o.Qc(3),o.gc(4,"translate"),o.Tb(),o.Oc(5,Q,3,4,"span",2),o.Tb(),o.Tb(),o.Oc(6,R,1,0,"ng-content",3),o.Oc(7,N,1,0,"ng-template",null,4,o.Pc)),2&t){const t=o.Ac(8);o.Cb(3),o.Sc(" ",o.hc(4,4,n.heading)," "),o.Cb(2),o.mc("ngIf",n.showEstimate),o.Cb(1),o.mc("ngIf",n.loaded)("ngIfElse",t)}},directives:[r.a,k.a,b.a,d.n,$.a,D.a],pipes:[g.d,d.f],styles:["[_nghost-%COMP%]{display:block;position:relative;height:100%}.heading[_ngcontent-%COMP%]{justify-content:space-between;margin:0 var(--spacing);padding:var(--spacing) 0}.description[_ngcontent-%COMP%], .heading[_ngcontent-%COMP%]{display:flex;flex-direction:row}.description[_ngcontent-%COMP%]{margin:var(--spacing-l) var(--spacing);width:40%;background:var(--toolbar-colour);padding:var(--spacing);border-radius:var(--bdrs)}.description[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--spacing)}@media (max-width:1024px){.description[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),t})();var B=e("D57K"),z=e("gxtV"),V=e("0tVE"),H=e("zqNl"),G=e("3kIJ"),q=e("UDV5");function J(t,n){if(1&t){const t=o.Vb();o.Ub(0,"button",22),o.bc("click",(function(){o.Ec(t);const n=o.fc().$implicit;return o.fc(2).withdraw$.emit(n)})),o.Pb(1,"fa-icon",23),o.Qc(2),o.gc(3,"translate"),o.Tb()}if(2&t){const t=o.fc(3);o.mc("disabled",t.env.demo),o.Cb(2),o.Sc(" ",o.hc(3,2,"WALLETS.FUTURES.WITHDRAWAL")," ")}}function K(t,n){if(1&t){const t=o.Vb();o.Sb(0),o.Ub(1,"tr",11),o.Ub(2,"td",12),o.Pb(3,"market-icon",13),o.Ub(4,"div"),o.Ub(5,"div"),o.Qc(6),o.gc(7,"walletName"),o.Tb(),o.Ub(8,"div",14),o.Qc(9),o.Tb(),o.Tb(),o.Tb(),o.Ub(10,"td",15),o.Pb(11,"ghost-trail",16),o.gc(12,"cryptoPrecise"),o.Ub(13,"div",14),o.Qc(14),o.Tb(),o.Tb(),o.Ub(15,"td",15),o.Pb(16,"ghost-trail",16),o.gc(17,"cryptoPrecise"),o.Ub(18,"div",14),o.Qc(19),o.Tb(),o.Tb(),o.Ub(20,"td",17),o.Qc(21),o.gc(22,"crypto"),o.Ub(23,"div",14),o.Qc(24,"USD"),o.Tb(),o.Tb(),o.Ub(25,"td",18),o.Qc(26),o.gc(27,"crypto"),o.Ub(28,"div",14),o.Qc(29,"USD"),o.Tb(),o.Tb(),o.Ub(30,"td",9),o.Oc(31,J,4,4,"button",19),o.Ub(32,"button",20),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc(2).transfer$.emit(e)})),o.Pb(33,"fa-icon",21),o.Qc(34),o.gc(35,"translate"),o.Tb(),o.Tb(),o.Tb(),o.Rb()}if(2&t){const t=n.$implicit,e=o.fc(2);o.Cb(3),o.mc("base",t.currency),o.Cb(3),o.Rc(o.hc(7,11,t.currency)),o.Cb(3),o.Rc(t.currency),o.Cb(2),o.nc("content",o.ic(12,13,t.balance,t.currency)),o.Cb(3),o.Rc(t.currency),o.Cb(2),o.nc("content",o.ic(17,16,t.am,t.currency)),o.Cb(3),o.Rc(t.currency),o.Cb(2),o.Sc(" ",o.ic(22,19,t.pv,"usd")," "),o.Cb(5),o.Sc(" ",o.ic(27,22,t.cv,"usd")," "),o.Cb(5),o.mc("ngIf",e.withdrawEnabled),o.Cb(3),o.Sc(" ",o.hc(35,25,"WALLETS.FUTURES.TRANSFER")," ")}}function Y(t,n){if(1&t&&(o.Ub(0,"table"),o.Ub(1,"tr",3),o.Ub(2,"th",4),o.Qc(3,"LABEL.ASSET"),o.Tb(),o.Ub(4,"th",5),o.Qc(5,"LABEL.BALANCE"),o.Tb(),o.Ub(6,"th",6),o.Qc(7,"LABEL.AVAILABLE_BALANCE"),o.Tb(),o.Ub(8,"th",7),o.Qc(9,"Balance Value"),o.Tb(),o.Ub(10,"th",8),o.Qc(11,"LABEL.COLLATERAL_VALUE"),o.Tb(),o.Pb(12,"th",9),o.Tb(),o.Oc(13,K,36,27,"ng-container",10),o.Tb()),2&t){const t=o.fc();o.Cb(13),o.mc("ngForOf",t.filteredWallets)}}function X(t,n){1&t&&(o.Ub(0,"section",24),o.Pb(1,"fa-icon",25),o.Ub(2,"p",26),o.Qc(3,"NO_CONTENT.MC_BALANCES"),o.Tb(),o.Tb())}let Z=(()=>{let t=class{constructor(t,n,e,c){this.store=t,this.fb=n,this.env=e,this.feature=c,this.showEmptyControl=this.fb.control(!0),this.transfer$=new o.o,this.withdraw$=new o.o}ngOnInit(){var t;localStorage.setItem("kf-wallet","multi-collateral"),this.showEmptyControl.setValue(null===(t=this.userData.emptyFlexShown)||void 0===t||t),this.showEmptyControl.valueChanges.pipe(Object(z.b)(this)).subscribe(t=>{this.store.dispatch(Object(V.e)({emptyFlexShown:t}))})}get filteredWallets(){return!1===this.showEmptyControl.value?this.wallets.filter(t=>t.balance):this.wallets}get withdrawEnabled(){return this.feature.isEnabled("transferDestination")}};return t.\u0275fac=function(n){return new(n||t)(o.Ob(H.b),o.Ob(G.d),o.Ob(l.a),o.Ob(s.a))},t.\u0275cmp=o.Ib({type:t,selectors:[["flex-wallet-table"]],inputs:{wallets:"wallets",userData:"userData"},outputs:{transfer$:"transfer",withdraw$:"withdraw"},decls:6,vars:6,consts:[["body","",1,"no-border",3,"formControl"],[4,"ngIf","ngIfElse"],["noEntries",""],["body","","ghost",""],["translate","",1,"cell--name"],["translate","",1,"cell--balance","cell--value"],["translate","",1,"cell--am","cell--value"],["translate","",1,"cell--pv","cell--value"],["translate","",1,"cell--cv","cell--value"],[1,"cell--buttons"],[4,"ngFor","ngForOf"],["body","",1,"row"],[1,"cell--name","cell--2col"],[3,"base"],["ghost","",1,"unit"],["mono","",1,"cell--balance","cell--value"],[3,"content"],["mono","",1,"cell--pv","cell--value"],["mono","",1,"cell--cv","cell--value"],["mat-button","",3,"disabled","click",4,"ngIf"],["mat-button","",3,"click"],["icon","transfer","size","2x"],["mat-button","",3,"disabled","click"],["icon","withdraw","size","2x"],["body","","ghost","",1,"no-activity"],["icon","list","size","3x"],["translate",""]],template:function(t,n){if(1&t&&(o.Ub(0,"mat-checkbox",0),o.Qc(1),o.gc(2,"translate"),o.Tb(),o.Oc(3,Y,14,1,"table",1),o.Oc(4,X,4,0,"ng-template",null,2,o.Pc)),2&t){const t=o.Ac(5);o.mc("formControl",n.showEmptyControl),o.Cb(1),o.Sc(" ",o.hc(2,4,"FORM.DISPLAY_EMPTY_MC"),"\n"),o.Cb(2),o.mc("ngIf",n.filteredWallets&&n.filteredWallets.length>0)("ngIfElse",t)}},directives:[q.a,r.a,G.o,G.f,d.n,b.a,g.a,d.m,p.a,u.a,m.a,h.b,C.b],pipes:[g.d,O.a,T.b,T.a],styles:["[_nghost-%COMP%]{display:block;padding:0 var(--spacing)}table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}tr[_ngcontent-%COMP%]:not(:first-child):not(:last-child){border-bottom:1px solid var(--border-colour)}td[_ngcontent-%COMP%]:not(:last-child), th[_ngcontent-%COMP%]:not(:last-child){padding-right:var(--spacing)}th[_ngcontent-%COMP%]{position:sticky;top:0;z-index:2;text-align:left;text-transform:uppercase;background-color:var(--card-colour)}td[_ngcontent-%COMP%]{padding:var(--spacing-xs) 0;font-size:14px}td.cell--2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:var(--spacing)}td.cell--2col[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:24px}td.cell--name[_ngcontent-%COMP%]{padding-right:var(--spacing-l);white-space:nowrap}td.cell--buttons[_ngcontent-%COMP%]{text-align:right;font-size:12px}td.cell--buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing)}td.cell--buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] svg{vertical-align:-25%}@media (max-width:1024px){td.cell--buttons[_ngcontent-%COMP%]{display:none}}.row--buttons[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{white-space:none}.row--buttons[_ngcontent-%COMP%] td[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing)}.row--buttons[_ngcontent-%COMP%] td[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] svg{vertical-align:-25%}@media (min-width:1025px){.row--buttons[_ngcontent-%COMP%]{display:none}}@media (max-width:1024px){.cell--allocation[_ngcontent-%COMP%]{display:none}}td.cell--value[_ngcontent-%COMP%], th.cell--value[_ngcontent-%COMP%]{text-align:right}.unit[_ngcontent-%COMP%]{text-transform:uppercase}.empty[_ngcontent-%COMP%]{text-align:center}table[_ngcontent-%COMP%]{margin-top:var(--spacing)}.no-activity[_ngcontent-%COMP%]{text-align:center;padding:var(--spacing-l)}mat-checkbox[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0}),t=Object(B.d)([Object(z.a)()],t),t})();var tt=e("1etq"),nt=e("B6Vo");function et(t,n){1&t&&(o.Ub(0,"p",22),o.Qc(1," This is your account-wide risk statistics for the multi-collateral wallet. Note that your available margin on a contract may vary based on margin mode and current PnL. "),o.Tb()),2&t&&o.Lc("margin-top","var(--spacing)")}function ct(t,n){if(1&t&&(o.Ub(0,"section",7),o.Ub(1,"div",8),o.Ub(2,"p",4),o.Qc(3),o.gc(4,"translate"),o.Pb(5,"fa-icon",23),o.Tb(),o.Ub(6,"p",24),o.Qc(7),o.gc(8,"number"),o.Tb(),o.Tb(),o.Pb(9,"div",25),o.Tb()),2&t){const t=o.fc(2);o.Cb(3),o.Sc(" ",o.hc(4,9,"Total Unrealized")," "),o.Cb(3),o.mc("pnl",t.wallet.total_unrealized),o.Cb(1),o.Sc(" ",o.ic(8,11,t.wallet.total_unrealized,"1.2-2")," USD "),o.Cb(2),o.Lc("background-color",t.pnlBg)("width",t.proportions.tu,"%")("margin-left","auto")}}function at(t,n){if(1&t&&(o.Ub(0,"section",7),o.Ub(1,"div",8),o.Ub(2,"p",4),o.Qc(3),o.gc(4,"translate"),o.Pb(5,"fa-icon",26),o.Tb(),o.Ub(6,"p",24),o.Qc(7),o.gc(8,"number"),o.Tb(),o.Tb(),o.Pb(9,"div",25),o.Tb()),2&t){const t=o.fc(2);o.Cb(3),o.Sc(" ",o.hc(4,9,"Total Unrealized (as margin)")," "),o.Cb(3),o.mc("pnl",t.wallet.total_unrealized_as_margin),o.Cb(1),o.Sc(" ",o.ic(8,11,t.wallet.total_unrealized_as_margin,"1.2-2")," USD "),o.Cb(2),o.Lc("background-color",t.pnlBg)("width",t.proportions.tuMargin,"%")("margin-left","auto")}}function it(t,n){if(1&t&&(o.Ub(0,"section",7),o.Ub(1,"div",8),o.Ub(2,"p",4),o.Qc(3),o.gc(4,"translate"),o.Pb(5,"fa-icon",27),o.Tb(),o.Ub(6,"p",10),o.Qc(7),o.gc(8,"number"),o.Tb(),o.Tb(),o.Pb(9,"div",28),o.Tb()),2&t){const t=o.fc(2);o.Cb(3),o.Sc(" ",o.hc(4,4,"SETTINGS.EMAIL_ALERTS.MAINTENANCE_MARGIN")," "),o.Cb(4),o.Sc("",o.ic(8,6,t.wallet.mm,"1.2-2")," USD"),o.Cb(2),o.Lc("width",t.proportions.mm,"%")}}function ot(t,n){if(1&t){const t=o.Vb();o.Ub(0,"section",1),o.Ub(1,"section",2),o.Ub(2,"div",3),o.bc("click",(function(){return o.Ec(t),o.fc().toggleDetailsOpen()})),o.Ub(3,"p",4),o.Qc(4,"Account-wide multi-collateral margin statistics"),o.Tb(),o.Pb(5,"fa-icon",5),o.Tb(),o.Oc(6,et,2,2,"p",6),o.Tb(),o.Ub(7,"section",2),o.Ub(8,"section",7),o.Ub(9,"div",8),o.Ub(10,"p",4),o.Qc(11),o.gc(12,"translate"),o.Pb(13,"fa-icon",9),o.Tb(),o.Ub(14,"p",10),o.Qc(15),o.gc(16,"number"),o.Tb(),o.Tb(),o.Pb(17,"div",11),o.Tb(),o.Ub(18,"section",7),o.Ub(19,"div",8),o.Ub(20,"p",4),o.Qc(21),o.gc(22,"translate"),o.Pb(23,"fa-icon",12),o.Tb(),o.Ub(24,"p",10),o.Qc(25),o.gc(26,"number"),o.Tb(),o.Tb(),o.Pb(27,"div",13),o.Tb(),o.Oc(28,ct,10,14,"section",14),o.Tb(),o.Ub(29,"section",2),o.Ub(30,"section",7),o.Ub(31,"div",8),o.Ub(32,"p",4),o.Qc(33),o.gc(34,"translate"),o.Pb(35,"fa-icon",15),o.Tb(),o.Ub(36,"p",10),o.Qc(37),o.gc(38,"number"),o.Tb(),o.Tb(),o.Pb(39,"div",11),o.Tb(),o.Oc(40,at,10,14,"section",14),o.Ub(41,"section",7),o.Ub(42,"div",8),o.Ub(43,"p",4),o.Qc(44),o.gc(45,"translate"),o.Pb(46,"fa-icon",16),o.Tb(),o.Ub(47,"p",10),o.Qc(48),o.gc(49,"number"),o.Tb(),o.Tb(),o.Pb(50,"div",13),o.Tb(),o.Ub(51,"section",7),o.Ub(52,"div",17),o.Ub(53,"p",4),o.Qc(54),o.gc(55,"translate"),o.Pb(56,"fa-icon",18),o.Tb(),o.Ub(57,"p",10),o.Qc(58),o.gc(59,"number"),o.Tb(),o.Tb(),o.Pb(60,"div",19),o.Tb(),o.Ub(61,"section",7),o.Ub(62,"div",8),o.Ub(63,"p",4),o.Qc(64),o.gc(65,"translate"),o.Pb(66,"fa-icon",20),o.Tb(),o.Ub(67,"p",10),o.Qc(68),o.gc(69,"number"),o.Tb(),o.Tb(),o.Pb(70,"div",21),o.Tb(),o.Oc(71,it,10,9,"section",14),o.Tb(),o.Tb()}if(2&t){const t=o.fc();o.Cb(5),o.mc("icon",t.isDetailsOpen?"caret-up":"caret-down"),o.Cb(1),o.mc("ngIf",t.isDetailsOpen),o.Cb(5),o.Sc(" ",o.hc(12,31,"LABEL.PORTFOLIO_VALUE")," "),o.Cb(4),o.Sc("",o.ic(16,33,t.wallet.pv,"1.2-2")," USD"),o.Cb(2),o.Lc("width",t.proportions.pv,"%"),o.Cb(4),o.Sc(" ",o.hc(22,36,"Balance Value")," "),o.Cb(4),o.Sc("",o.ic(26,38,t.wallet.balance,"1.2-2")," USD"),o.Cb(2),o.Lc("width",t.proportions.balance,"%"),o.Cb(1),o.mc("ngIf",t.wallet.total_unrealized),o.Cb(5),o.Sc(" ",o.hc(34,41,"Collateral Value")," "),o.Cb(4),o.Sc("",o.ic(38,43,t.wallet.cv,"1.2-2")," USD"),o.Cb(2),o.Lc("width",t.proportions.cv,"%"),o.Cb(1),o.mc("ngIf",t.wallet.total_unrealized_as_margin),o.Cb(4),o.Sc(" ",o.hc(45,46,"Margin Equity")," "),o.Cb(4),o.Sc("",o.ic(49,48,t.wallet.margin_equity,"1.2-2")," USD"),o.Cb(2),o.Lc("width",t.proportions.me,"%"),o.Cb(4),o.Sc(" ",o.hc(55,51,"WALLETS.TRADING.INITIAL_MARGIN")," "),o.Cb(4),o.Sc("",o.ic(59,53,t.wallet.im,"1.2-2")," USD"),o.Cb(2),o.Lc("width",t.proportions.im,"%"),o.Cb(4),o.Sc(" ",o.hc(65,56,"LABEL.AVAILABLE_MARGIN")," "),o.Cb(4),o.Sc("",o.ic(69,58,t.wallet.am,"1.2-2")," USD"),o.Cb(2),o.Lc("width",t.proportions.am,"%")("margin-left",t.amMargin,"%"),o.Cb(1),o.mc("ngIf",t.wallet.mm)}}let lt=(()=>{class t{constructor(){this.detailsOpen=!1,this.linearRange=(t,n=0,e=1)=>{const c=t.map(t=>Math.abs(t||0)),a=Math.max(...c)-0;if(0===a)return c.map(t=>100*n);{const t=e-n;return c.map(e=>(e-0)*t/a+n).map(t=>100*t)}}}get proportions(){const{pv:t,balance:n,total_unrealized:e,total_unrealized_as_margin:c,cv:a,margin_equity:i,im:o,am:l,funding:s,mm:r}=this.wallet,b=[t,n,e].map(t=>Math.abs(t)||0),g=this.linearRange(b),d=[a,c,i,o,l,s,r].map(t=>Math.abs(t)||0),p=this.linearRange(d);return{pv:g[0],balance:g[1],tu:g[2],cv:p[0],tuMargin:p[1],me:p[2],im:p[3],am:p[4],funding:p[5],mm:p[6]}}toggleDetailsOpen(){this.detailsOpen=!this.detailsOpen}get isDetailsOpen(){return this.detailsOpen}get amMargin(){return this.wallet.margin_equity&&this.wallet.im>this.wallet.margin_equity?this.proportions.me:this.proportions.im}get pnlBg(){return this.wallet.pnl>0?"var(--g300)":this.wallet.pnl<0?"var(--r300)":"var(--form-input-colour)"}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=o.Ib({type:t,selectors:[["flex-wallet-summary"]],inputs:{wallet:"wallet"},decls:1,vars:1,consts:[["class","flex-wallet-summary",4,"ngIf"],[1,"flex-wallet-summary"],[1,"summary"],[1,"summary-expander",3,"click"],["subheading",""],["body","","size","2x",3,"icon"],["body","",3,"marginTop",4,"ngIf"],[1,"partitions"],[1,"wallet-part"],["icon","info","sbTooltip","Total USD-equivalent value of assets in account plus unrealized funding/PnL"],["subheading","","mono",""],[1,"pv","bar"],["icon","info","sbTooltip","Total USD-equivalent value of collateral balance in account"],[1,"bv","bar"],["class","partitions",4,"ngIf"],["icon","info","sbTooltip","Total USD-equivalent value of collateral balance in account minus risk-adjusted haircut"],["icon","info","sbTooltip","Collateral Value + Unrealized As Margin"],[1,"wallet-part","im-size"],["icon","info","sbTooltip","Total initial margin in orders and positions for isolated and cross margin modes"],[1,"im","bar"],["icon","info","sbTooltip","Margin Equity - Initial Margin"],[1,"am","bar"],["body",""],["icon","info","sbTooltip","Total unrealized funding and PnL of open positions in account"],["subheading","","mono","","pnlZero","",3,"pnl"],[1,"pnl","bar"],["icon","info","sbTooltip","Total unrealized funding and PnL of open positions in account, minus risk-adjusted haircut"],["icon","info","sbTooltip","Total maintenance margin in open positions for isolated and cross margin modes"],[1,"mm","bar"]],template:function(t,n){1&t&&o.Oc(0,ot,72,61,"section",0),2&t&&o.mc("ngIf",n.wallet)},directives:[d.n,tt.a,C.b,r.a,nt.a,u.a,f.a],pipes:[g.d,d.f],styles:[".flex-wallet-summary[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:var(--spacing)}@media (max-width:1024px){.flex-wallet-summary[_ngcontent-%COMP%]{flex-direction:column}}.flex-wallet-summary[_ngcontent-%COMP%] .summary[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:400px;margin-bottom:var(--spacing-l);background:var(--toolbar-colour);padding:var(--spacing);border-radius:var(--bdrs)}@media (max-width:1024px){.flex-wallet-summary[_ngcontent-%COMP%] .summary[_ngcontent-%COMP%]{width:100%}}.flex-wallet-summary[_ngcontent-%COMP%] .summary-expander[_ngcontent-%COMP%]{cursor:pointer;display:flex;flex-direction:col;justify-content:space-between}.flex-wallet-summary[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:var(--spacing-l)}.flex-wallet-summary[_ngcontent-%COMP%] .partitions[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:var(--spacing-s) 0}.flex-wallet-summary[_ngcontent-%COMP%] .wallet-part[_ngcontent-%COMP%]{border-radius:var(--bdrs);white-space:nowrap;flex:1;display:flex;flex-direction:row;justify-content:space-between}.flex-wallet-summary[_ngcontent-%COMP%] .wallet-part[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{color:var(--input-colour)}.flex-wallet-summary[_ngcontent-%COMP%] .pv[_ngcontent-%COMP%]{background:var(--ghost-colour)}.flex-wallet-summary[_ngcontent-%COMP%] .bv[_ngcontent-%COMP%]{background:var(--form-input-colour)}.flex-wallet-summary[_ngcontent-%COMP%] .am[_ngcontent-%COMP%]{background:var(--brand)}.flex-wallet-summary[_ngcontent-%COMP%] .funding[_ngcontent-%COMP%]{background:var(--p300)}.flex-wallet-summary[_ngcontent-%COMP%] .mm[_ngcontent-%COMP%]{background:var(--r400)}.flex-wallet-summary[_ngcontent-%COMP%] .im[_ngcontent-%COMP%]{background:var(--y200)}.flex-wallet-summary[_ngcontent-%COMP%] .im-size[_ngcontent-%COMP%]{min-width:127px!important}.bar[_ngcontent-%COMP%]{height:10px;margin:var(--spacing-s) 0;border-radius:var(--bdrs);min-width:1px!important}.dot[_ngcontent-%COMP%]{height:12px;width:12px;border-radius:50%;display:inline-block;vertical-align:middle}.details[_ngcontent-%COMP%]{margin-left:var(--spacing-l)}@media (max-width:1024px){.details[_ngcontent-%COMP%]{display:none}}.detail[_ngcontent-%COMP%]{padding:var(--spacing-xs)}.no-funds[_ngcontent-%COMP%]{margin-top:var(--spacing)}"],changeDetection:0}),t})();var st=e("VmIW"),rt=e("C05f"),bt=e("HM3f"),gt=e("YtkY"),dt=e("xVbo"),pt=e("jOdJ"),ut=e("lx5p"),mt=e("i67J"),ft=e("TYVA"),ht=e("uJYd"),Ct=e("lE9u"),Ot=e("ylpo"),Tt=e("+Px6"),vt=e("rxqU"),wt=e("J/3c"),Pt=e("NloN"),_t=e("nXdR"),yt=e("bjK4"),Mt=e("Asjx"),Ut=e("Eu46"),xt=e("2Xgx"),Et=e("LBlH"),Lt=e("y1fC"),At=e("pPqe"),St=e("36Sp"),It=e("w2Kr"),Wt=e("yvKM"),kt=e("gx5s");const $t=["holdingWalletTourPopper"],Dt=["futuresWalletTourPopper"],Qt=["tourPositionRef"];function Rt(t,n){if(1&t){const t=o.Vb();o.Ub(0,"wallet-group",13),o.gc(1,"async"),o.gc(2,"async"),o.Ub(3,"holding-wallet-table",14),o.bc("deposit",(function(n){return o.Ec(t),o.fc(2).openCryptoDepositDialog(n)}))("withdraw",(function(n){return o.Ec(t),o.fc(2).openCryptoWithdrawDialog(n)}))("transfer",(function(n){return o.Ec(t),o.fc(2).openCryptoTransferDialog(n)}))("showEmpty",(function(){return o.Ec(t),o.fc(2).clearFilters()})),o.gc(4,"async"),o.gc(5,"async"),o.gc(6,"async"),o.gc(7,"async"),o.Tb(),o.Tb()}if(2&t){const t=o.fc(2);var e=null;o.mc("estimate",o.hc(1,6,t.holdingWalletEquity$))("loaded",!(null!=(e=o.hc(2,8,t.holdingWallets$))&&e.isEmpty())),o.Cb(3),o.mc("wallets",o.hc(4,10,t.filteredHoldingWallets$))("numHidden",o.hc(5,12,t.holdingWalletsNumHidden$))("isSubAccount",o.hc(6,14,t.isSubAccount$))("isExternalUser",o.hc(7,16,t.isExternalUser$))}}function Nt(t,n){if(1&t){const t=o.Vb();o.Ub(0,"wallet-group",15),o.gc(1,"async"),o.gc(2,"async"),o.Ub(3,"futures-wallet-table",16),o.bc("details",(function(n){return o.Ec(t),o.fc(2).openWalletDetailsDialog(n)}))("withdraw",(function(n){return o.Ec(t),o.fc(2).openCryptoWithdrawDialog(n)}))("transfer",(function(n){return o.Ec(t),o.fc(2).openCryptoTransferDialog(n)}))("showEmpty",(function(){return o.Ec(t),o.fc(2).clearFilters()})),o.gc(4,"async"),o.gc(5,"async"),o.Tb(),o.Tb()}if(2&t){const t=o.fc(2);var e=null;o.mc("estimate",o.hc(1,4,t.futuresWalletEquity$))("loaded",!(null!=(e=o.hc(2,6,t.futuresWallets$))&&e.isEmpty())),o.Cb(3),o.mc("wallets",o.hc(4,8,t.filteredFuturesWallets$))("numHidden",o.hc(5,10,t.futuresWalletsNumHidden$))}}function jt(t,n){if(1&t){const t=o.Vb();o.Ub(0,"wallet-group",17),o.gc(1,"async"),o.Ub(2,"div",18),o.Pb(3,"flex-wallet-summary",19),o.gc(4,"async"),o.Ub(5,"div"),o.Ub(6,"p",20),o.Qc(7,"Multi-Collateral Wallet Currencies"),o.Tb(),o.Ub(8,"flex-wallet-table",21),o.bc("withdraw",(function(n){return o.Ec(t),o.fc(2).openCryptoWithdrawDialog(n)}))("transfer",(function(n){return o.Ec(t),o.fc(2).openCryptoTransferDialog(n)})),o.gc(9,"async"),o.gc(10,"async"),o.Tb(),o.Ub(11,"div",22),o.Ub(12,"p",20),o.Qc(13,"Multi-Collateral Positions"),o.Tb(),o.Pb(14,"open-positions",23),o.Tb(),o.Tb(),o.Tb(),o.Tb()}if(2&t){const t=o.fc(2);o.mc("showEstimate",!1)("loaded",o.hc(1,6,t.flexWallet$)),o.Cb(3),o.mc("wallet",o.hc(4,8,t.flexWallet$)),o.Cb(5),o.mc("wallets",o.hc(9,10,t.flexCurrencies$))("userData",o.hc(10,12,t.userData$)),o.Cb(6),o.mc("flexOnly",!0)}}function Ft(t,n){if(1&t){const t=o.Vb();o.Ub(0,"tour-step",24),o.bc("dispose",(function(){return o.Ec(t),o.fc(),o.Ac(5).dispose()}))("nextEvent",(function(){return o.Ec(t),o.fc(2).tourOnNextDeposit()})),o.Ub(1,"p",25),o.Qc(2,"TOUR.WALLETS.HOLDING.1"),o.Tb(),o.Pb(3,"br"),o.Ub(4,"p",25),o.Qc(5,"TOUR.WALLETS.HOLDING.2"),o.Tb(),o.Tb()}}function Bt(t,n){if(1&t){const t=o.Vb();o.Ub(0,"tour-step",26),o.bc("nextEvent",(function(){return o.Ec(t),o.fc(2).tourOnNextTransfer()}))("previousEvent",(function(){return o.Ec(t),o.fc(2).tourOnNextDeposit()}))("dispose",(function(){return o.Ec(t),o.fc(),o.Ac(8).dispose()})),o.Ub(1,"p",25),o.Qc(2,"TOUR.WALLETS.FUTURES.1"),o.Tb(),o.Pb(3,"br"),o.Ub(4,"p",25),o.Qc(5,"TOUR.WALLETS.FUTURES.2"),o.Tb(),o.Tb()}}function zt(t,n){if(1&t&&(o.Ub(0,"div",4),o.Oc(1,Rt,8,18,"wallet-group",5),o.Oc(2,Nt,6,12,"wallet-group",6),o.Oc(3,jt,15,14,"wallet-group",7),o.Ub(4,"sb-popper",8,9),o.Oc(6,Ft,6,0,"tour-step",10),o.Tb(),o.Ub(7,"sb-popper",8,11),o.Oc(9,Bt,6,0,"tour-step",12),o.Tb(),o.Tb()),2&t){const t=n.ngLet;o.Cb(1),o.mc("ngIf","holding"===t),o.Cb(1),o.mc("ngIf","single-collateral"===t),o.Cb(1),o.mc("ngIf","multi-collateral"===t)}}function Vt(t,n){if(1&t){const t=o.Vb();o.Ub(0,"div",27),o.Ub(1,"mat-button-toggle-group",28),o.Ub(2,"mat-button-toggle",29),o.bc("click",(function(){return o.Ec(t),o.fc().changeWallets("holding")})),o.Qc(3),o.gc(4,"translate"),o.Tb(),o.Ub(5,"mat-button-toggle",30),o.bc("click",(function(){return o.Ec(t),o.fc().changeWallets("single-collateral")})),o.Qc(6),o.gc(7,"translate"),o.Tb(),o.Ub(8,"mat-button-toggle",31),o.bc("click",(function(){return o.Ec(t),o.fc().changeWallets("multi-collateral")})),o.Qc(9),o.gc(10,"translate"),o.Tb(),o.Tb(),o.Tb()}if(2&t){const t=n.ngLet;o.Cb(1),o.mc("value",t),o.Cb(2),o.Sc(" ",o.hc(4,4,"WALLETS.HOLDING_WALLETS")," "),o.Cb(3),o.Sc(" ",o.hc(7,6,"Single Collateral")," "),o.Cb(3),o.Sc(" ",o.hc(10,8,"Multi-Collateral")," ")}}function Ht(t,n){if(1&t){const t=o.Vb();o.Ub(0,"li",34),o.bc("click",(function(){o.Ec(t);const e=n.$implicit;return o.fc(2).filterCurrency(e.name)})),o.Ub(1,"div",35),o.Pb(2,"market-icon",36),o.Tb(),o.Ub(3,"div",37),o.Qc(4),o.gc(5,"cryptoName"),o.Tb(),o.Ub(6,"div",38),o.Qc(7),o.gc(8,"cryptoAbbreviation"),o.Tb(),o.Tb()}if(2&t){const t=n.$implicit;o.Cb(2),o.mc("base",t.name),o.Cb(2),o.Rc(o.hc(5,3,t.name)),o.Cb(3),o.Rc(o.hc(8,5,t.name))}}function Gt(t,n){if(1&t&&(o.Ub(0,"ul",32),o.Oc(1,Ht,9,7,"li",33),o.Tb()),2&t){const t=n.assets;o.Cb(1),o.mc("ngForOf",t)}}function qt(t,n){1&t&&o.Pb(0,"kraken-loading")}function Jt([t,n,e]){const c=n.map(ut.Q).map(n=>t.filter(t=>{const e=t.name.includes(n);let c=null;if("futures"===t.type){const[e,a]=t.pair,i=Object(ft.g)(e).toUpperCase(),o=Object(ft.g)(a).toUpperCase();c=i.includes(n)||o.includes(n)}else c=Object(ft.g)(t.currency).toUpperCase().includes(n);return e||c})).orSome(t);return(e?c:c.filter(t=>t.balance>0)).valueSeq()}let Kt=(()=>{let t=class{constructor(t,n,e,c,a,i){this.store=n,this.breakpointObserver=e,this.translateService=c,this.router=a,this.activatedRoute=i,this.search$=new rt.a(Object(st.None)()),this.showEmpty$=new mt.a(Object(Pt.b)(Ot.r,!0)),this.searchLower$=this.search$.asObservable().pipe(Object(mt.j)(ut.s)),this.assetClasses$=this.store.pipe(Object(H.m)(Tt.c)),this.markets$=this.store.pipe(Object(H.m)(Tt.f)),this.selectedMarket$=this.store.pipe(Object(H.m)(Tt.n)),this.userDetails$=this.store.pipe(Object(H.m)(vt.d)),this.userWalletTransferDetails$=this.store.pipe(Object(H.m)(wt.q)),this.isSubAccount$=this.store.pipe(Object(H.m)(vt.n)),this.isExternalUser$=this.store.pipe(Object(H.m)(vt.l)),this.holdingWallets$=this.store.pipe(Object(H.m)(wt.j)),this.holdingWalletEquity$=this.store.pipe(Object(mt.m)(wt.k,250)),this.filteredHoldingWallets$=Object(bt.a)([this.holdingWallets$,this.searchLower$,this.showEmpty$]).pipe(Object(gt.a)(Jt),Object(gt.a)(t=>t.sort(_t.p))),this.holdingWalletsNumHidden$=Object(bt.a)([this.holdingWallets$,this.filteredHoldingWallets$]).pipe(Object(gt.a)(([t,n])=>t.size-n.toArray().length)),this.futuresWallets$=this.store.pipe(Object(H.m)(wt.h)),this.flexWallet$=this.store.pipe(Object(H.m)(wt.l)),this.flexCurrencies$=this.flexWallet$.pipe(Object(gt.a)(t=>{var n;return null===(n=null==t?void 0:t.flexAssets)||void 0===n?void 0:n.valueSeq().toArray().sort(_t.p)})),this.futuresWalletEquity$=this.store.pipe(Object(mt.m)(wt.i,250)),this.filteredFuturesWallets$=Object(bt.a)([this.futuresWallets$,this.searchLower$,this.showEmpty$]).pipe(Object(gt.a)(Jt),Object(gt.a)(t=>t.sort(_t.q).sort(_t.o))),this.futuresWalletsNumHidden$=Object(bt.a)([this.futuresWallets$,this.filteredFuturesWallets$]).pipe(Object(gt.a)(([t,n])=>t.size-n.toArray().length)),this.tour$=this.store.pipe(Object(H.m)(yt.k)),this.userData$=this.store.pipe(Object(H.m)(vt.a)),this.searchControl=t.control(null),this.searchControl.valueChanges.subscribe(t=>this.search$.next(st.Maybe.fromFalsy(t.replace(/btc/gi,"xbt")))),this.walletType$=this.activatedRoute.data.pipe(Object(gt.a)(t=>t.type)),this.showEmpty$.pipe(Object(z.b)(this)).subscribe(t=>Object(Pt.c)(Ot.r,t))}ngOnInit(){this.store.dispatch(Object(ht.x)("NAV.WALLETS")),this.openWalletFeeds(),this.checkWalletsTour()}ngAfterViewInit(){this.tour$.pipe(Object(z.b)(this),Object(dt.a)(t=>t.inProgress),Object(dt.a)(t=>"wallets"===t.type),Object(dt.a)(({step:t})=>1===t||3===t)).subscribe(({step:t})=>{1===t?this.holdingWalletTourPopper.centerTrigger():3===t&&this.futuresWalletTourPopper.centerTrigger()})}openWalletFeeds(){this.store.dispatch(Object(Ct.o)())}filterCurrency(t){this.search$.next(st.Maybe.fromFalsy(t)),this.searchControl.setValue(t?t.replace("XBT","BTC"):"")}clearFilters(){this.showEmpty$.next(!0),this.filterCurrency(!1)}clearSearchOnEsc(t){"Escape"===t.code&&this.searchControl.setValue("")}openCryptoDepositDialog(t){this.userDetails$.pipe(Object(pt.a)()).subscribe(n=>{this.store.dispatch("mtf"===(null==n?void 0:n.platformName)&&"EUR"===t.currency?Object(ht.g)({name:"fiat-deposit-details"}):Object(ht.g)({name:"wallet-transaction",inputs:{type:"deposit",originWallet:t}}))})}openCryptoWithdrawDialog(t){this.userDetails$.pipe(Object(pt.a)()).subscribe(n=>{this.store.dispatch("mtf"===(null==n?void 0:n.platformName)&&"EUR"===t.currency?Object(ht.g)({name:"fiat-withdraw",inputs:{wallet:t}}):Object(ht.g)({name:"wallet-transaction",inputs:{type:"withdraw",originWallet:t}}))})}openCryptoTransferDialog(t){this.store.dispatch(Object(ht.g)({name:"wallet-transaction",inputs:{type:"crypto-transfer",originWallet:t}}))}openWalletDetailsDialog(t){this.store.dispatch(Object(Ct.j)({wallet:t}))}selectedCurrency(t){return Object(_t.h)(t)}get isMobile(){return this.breakpointObserver.isMatched("(max-width: 1024px)")}closeDialog(){this.store.dispatch(Object(ht.c)())}tourOnNextDeposit(){this.holdingWallets$.pipe(Object(pt.a)()).subscribe(t=>{const n=t.get("BTC")||t.get("XBT");n&&this.openCryptoDepositDialog(n)})}tourOnNextTransfer(){this.closeDialog(),this.holdingWallets$.pipe(Object(pt.a)()).subscribe(t=>{const n=t.get("BTC")||t.get("XBT");n&&this.openCryptoTransferDialog(n)})}checkWalletsTour(){this.userDetails$.pipe(Object(pt.a)()).subscribe(t=>{if(!Object(Pt.b)(Ot.t,void 0)&&(null==t?void 0:t.external)){const t=this.translateService.instant("NAV.WALLETS"),n=this.translateService.instant("LABEL.SHOW_YOU_AROUND"),e=this.translateService.instant("LABEL.CLICK_FOR_TOUR");this.store.dispatch(Object(ht.j)({title:t,message:n,class:"info",action:{actionKey:e,action:Object(ht.A)({tour:"wallets"})}})),Object(Pt.c)(Ot.t,Date.now())}})}changeWallets(t){this.router.navigate(["wallets/"+t]),localStorage.setItem("kf-wallet",t)}};return t.\u0275fac=function(n){return new(n||t)(o.Ob(G.d),o.Ob(H.b),o.Ob(Mt.a),o.Ob(g.e),o.Ob(c.d),o.Ob(c.a))},t.\u0275cmp=o.Ib({type:t,selectors:[["wallets"]],viewQuery:function(t,n){var e;1&t&&(o.Jc($t,!0),o.Jc(Dt,!0),o.Jc(Qt,!0)),2&t&&(o.zc(e=o.cc())&&(n.holdingWalletTourPopper=e.first),o.zc(e=o.cc())&&(n.futuresWalletTourPopper=e.first),o.zc(e=o.cc())&&(n.tourPositionRef=e.first))},decls:8,vars:6,consts:[["sb-card","","class","wallets",4,"ngLet"],["class","wallet-selector",4,"ngLet"],["assetList",""],["loading",""],["sb-card","",1,"wallets"],["heading","WALLETS.HOLDING_WALLETS",3,"estimate","loaded",4,"ngIf"],["heading","Single Collateral Futures Wallets",3,"estimate","loaded",4,"ngIf"],["heading","Multi-Collateral Futures Wallets",3,"showEstimate","loaded",4,"ngIf"],["sbPlacement","topStart"],["holdingWalletTourPopper",""],["title","WALLETS.HOLDING_WALLETS","videoUrl","https://www.youtube.com/watch?v=qIIGcl5dMPo",3,"dispose","nextEvent",4,"sbContent"],["futuresWalletTourPopper",""],["title","HEADING.WALLET_FUTURES","videoUrl","https://www.youtube.com/watch?v=qIIGcl5dMPo",3,"nextEvent","previousEvent","dispose",4,"sbContent"],["heading","WALLETS.HOLDING_WALLETS",3,"estimate","loaded"],[3,"wallets","numHidden","isSubAccount","isExternalUser","deposit","withdraw","transfer","showEmpty"],["heading","Single Collateral Futures Wallets",3,"estimate","loaded"],[3,"wallets","numHidden","details","withdraw","transfer","showEmpty"],["heading","Multi-Collateral Futures Wallets",3,"showEstimate","loaded"],[1,"flex-page"],[3,"wallet"],["heading",""],[3,"wallets","userData","withdraw","transfer"],[1,"flex-positions"],[3,"flexOnly"],["title","WALLETS.HOLDING_WALLETS","videoUrl","https://www.youtube.com/watch?v=qIIGcl5dMPo",3,"dispose","nextEvent"],["subheading","","translate",""],["title","HEADING.WALLET_FUTURES","videoUrl","https://www.youtube.com/watch?v=qIIGcl5dMPo",3,"nextEvent","previousEvent","dispose"],[1,"wallet-selector"],[3,"value"],["value","holding",3,"click"],["value","single-collateral",3,"click"],["value","multi-collateral",3,"click"],[1,"assets"],["body","","selectable","","class","asset",3,"click",4,"ngFor","ngForOf"],["body","","selectable","",1,"asset",3,"click"],[1,"icon"],[3,"base"],[1,"name"],["ghost","",1,"symbol"]],template:function(t,n){1&t&&(o.Oc(0,zt,10,3,"div",0),o.gc(1,"async"),o.Oc(2,Vt,11,10,"div",1),o.gc(3,"async"),o.Oc(4,Gt,2,1,"ng-template",null,2,o.Pc),o.Oc(6,qt,1,0,"ng-template",null,3,o.Pc)),2&t&&(o.mc("ngLet",o.hc(1,2,n.walletType$)),o.Cb(2),o.mc("ngLet",o.hc(3,4,n.walletType$)))},directives:[Ut.a,xt.a,d.n,Et.a,Lt.a,At.a,F,$.a,W,U,lt,Z,St.a,It.a,tt.a,g.a,Wt.b,Wt.a,d.m,r.a,kt.a,p.a,b.a,D.a],pipes:[d.b,g.d,v.b,v.a],styles:['[_nghost-%COMP%]{display:grid;grid-template:"wallets" 1fr/1fr;gap:var(--spacing);height:100%}@media (max-width:1024px){[_nghost-%COMP%]{position:relative;grid-template:"wallets" 1fr/1fr}}.wallet-selector[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{position:absolute;bottom:0;margin-bottom:0!important;height:48px!important}.wallet-selector[_ngcontent-%COMP%] mat-button-toggle[_ngcontent-%COMP%]{height:48px!important;padding:8px 0!important}@media (min-width:1025px){.wallet-selector[_ngcontent-%COMP%]{display:none}}.asset-class[_ngcontent-%COMP%]:not(:first-child){margin-top:var(--spacing-l)}.asset-class[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{position:sticky;top:0;padding:var(--spacing);background:var(--card-colour);z-index:1}.asset-class[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0!important}.asset-class[_ngcontent-%COMP%] .mat-form-field-underline{bottom:0!important}.clear[_ngcontent-%COMP%]{cursor:pointer}.clear[_ngcontent-%COMP%]:hover{color:var(--text-colour)}.assets[_ngcontent-%COMP%]{max-height:100%;overflow-y:auto;border:1px solid var(--border-colour);border-left:0}.assets[_ngcontent-%COMP%] .asset[_ngcontent-%COMP%]{display:grid;grid-template:"icon name symbol" auto/25px 1fr min-content;gap:var(--spacing);align-items:center;padding:var(--spacing);font-size:14px;border-left:var(--spacing-s) solid var(--border-colour)}.assets[_ngcontent-%COMP%] .asset--active[_ngcontent-%COMP%]{border-left:var(--spacing-s) solid var(--i100);color:var(--i100)}.assets[_ngcontent-%COMP%] .asset[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon}.assets[_ngcontent-%COMP%] .asset[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name}.assets[_ngcontent-%COMP%] .asset[_ngcontent-%COMP%] .symbol[_ngcontent-%COMP%]{grid-area:symbol;text-transform:uppercase}.assets[_ngcontent-%COMP%] .asset[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .assets[_ngcontent-%COMP%] .asset[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:24px}.wallets[_ngcontent-%COMP%]{grid-area:wallets;overflow-y:auto}wallet-group[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--border-colour)}.flex[_ngcontent-%COMP%]{width:calc(60% - var(--spacing-xl));margin:var(--spacing-xl)}@media (max-width:1024px){.flex[_ngcontent-%COMP%]{width:calc(95% - var(--spacing-xl))}}.flex-page[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%}.flex-page[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{flex:1;padding:var(--spacing)}.flex-page[_ngcontent-%COMP%] div[_ngcontent-%COMP%] flex-wallet-table[_ngcontent-%COMP%]{margin-bottom:var(--spacing-l)}.flex-page[_ngcontent-%COMP%] div[_ngcontent-%COMP%] open-positions[_ngcontent-%COMP%]{height:auto!important}@media (max-width:1024px){.flex-page[_ngcontent-%COMP%]{flex-direction:column}}@media (max-width:1024px){.flex-positions[_ngcontent-%COMP%]{display:none}}'],changeDetection:0}),t=Object(B.d)([Object(z.a)()],t),t})(),Yt=(()=>{class t{constructor(t){this.router=t}canActivate(t){const n=localStorage.getItem("kf-wallet");return this.router.navigate(["wallets/"+(n||"holding")],{replaceUrl:!0,queryParams:t.queryParams}),!0}}return t.\u0275fac=function(n){return new(n||t)(o.Yb(c.d))},t.\u0275prov=o.Kb({token:t,factory:t.\u0275fac}),t})();const Xt=[i.a,c.h.forChild([{path:"",component:Kt,canActivate:[Yt]},{path:"holding",component:Kt,data:{type:"holding"}},{path:"single-collateral",component:Kt,data:{type:"single-collateral"}},{path:"multi-collateral",component:Kt,canActivate:[a.a],data:{type:"multi-collateral",feature:"flex"}}])];let Zt=(()=>{class t{}return t.\u0275mod=o.Mb({type:t}),t.\u0275inj=o.Lb({factory:function(n){return new(n||t)},providers:[Yt],imports:[Xt]}),t})()}}]);