(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[564],{9564:(fr,Ui,Pt)=>{"use strict";Pt.r(Ui),Pt.d(Ui,{CLNModule:()=>_h});var ut=Pt(9808),_t=Pt(1402),bn=Pt(8878),A=Pt(5e3),Ct=Pt(7093),S=Pt(5899);function I(i,d){1&i&&A._UZ(0,"mat-progress-bar",3)}let n=(()=>{class i{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(s=>{switch(!0){case s instanceof _t.OD:this.loading=!0;break;case s instanceof _t.m2:case s instanceof _t.gk:case s instanceof _t.Q3:this.loading=!1}})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,I,1,0,"mat-progress-bar",1),A._UZ(2,"router-outlet",null,2),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",s.loading))},directives:[Ct.xw,Ct.yH,Ct.Wh,ut.O5,S.pW,_t.lC],styles:[""],data:{animation:[bn.g]}}),i})();var c=Pt(7579),r=Pt(2722),o=Pt(1365),l=Pt(3396),h=Pt(2687),a=Pt(7731),B=Pt(9828),E=Pt(5043),u=Pt(5620),C=Pt(62),e=Pt(9546),f=Pt(3954),g=Pt(9224),w=Pt(7423),Q=Pt(2181),m=Pt(5245),T=Pt(3322);const x=function(i){return{backgroundColor:i}};function M(i,d){if(1&i&&A._UZ(0,"span",6),2&i){const t=A.oxw();A.Q6J("ngStyle",A.VKq(1,x,"#"+(null==t.information?null:t.information.color)))}}function D(i,d){if(1&i&&(A.TgZ(0,"div")(1,"h4",1),A._uU(2,"Color"),A.qZA(),A.TgZ(3,"div",2),A._UZ(4,"span",7),A._uU(5),A.ALo(6,"uppercase"),A.qZA()()),2&i){const t=A.oxw();A.xp6(4),A.Q6J("ngStyle",A.VKq(4,x,"#"+(null==t.information?null:t.information.color))),A.xp6(1),A.hij(" ",A.lcZ(6,2,null==t.information?null:t.information.color)," ")}}function y(i,d){if(1&i&&(A.TgZ(0,"span",2),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(t)}}let b=(()=>{class i{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.information&&this.information.chains&&this.information.chains.length>0&&(this.chains=[""],this.information.chains.forEach(t=>{this.chains.push(this.commonService.titleCase(t.chain||"")+" "+this.commonService.titleCase(t.network||""))}))}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(C.v))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[A.TTD],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div")(2,"h4",1),A._uU(3,"Alias"),A.qZA(),A.TgZ(4,"div",2),A._uU(5),A.YNc(6,M,1,3,"span",3),A.qZA()(),A.YNc(7,D,7,6,"div",4),A.TgZ(8,"div")(9,"h4",1),A._uU(10,"Implementation"),A.qZA(),A.TgZ(11,"div",2),A._uU(12),A.qZA()(),A.TgZ(13,"div")(14,"h4",1),A._uU(15,"Chain"),A.qZA(),A.YNc(16,y,2,1,"span",5),A.qZA()()),2&t&&(A.xp6(5),A.hij(" ",null==s.information?null:s.information.alias," "),A.xp6(1),A.Q6J("ngIf",!s.showColorFieldSeparately),A.xp6(1),A.Q6J("ngIf",s.showColorFieldSeparately),A.xp6(5),A.Oqu(null!=s.information&&s.information.lnImplementation||null!=s.information&&s.information.version?(null==s.information?null:s.information.lnImplementation)+" "+(null==s.information?null:s.information.version):""),A.xp6(4),A.Q6J("ngForOf",s.chains))},directives:[Ct.xw,Ct.yH,Ct.Wh,ut.O5,ut.PC,T.Zl,ut.sg],pipes:[ut.gd],styles:[""]}),i})();function N(i,d){if(1&i&&(A.TgZ(0,"div",2)(1,"div")(2,"h4",3),A._uU(3,"Lightning"),A.qZA(),A.TgZ(4,"div",4),A._uU(5),A.ALo(6,"number"),A.qZA(),A._UZ(7,"mat-progress-bar",5),A.qZA(),A.TgZ(8,"div")(9,"h4",3),A._uU(10,"On-chain"),A.qZA(),A.TgZ(11,"div",4),A._uU(12),A.ALo(13,"number"),A.qZA(),A._UZ(14,"mat-progress-bar",5),A.qZA(),A.TgZ(15,"div")(16,"h4",3),A._uU(17,"Total"),A.qZA(),A.TgZ(18,"div",4),A._uU(19),A.ALo(20,"number"),A.qZA()()()),2&i){const t=A.oxw();A.xp6(5),A.hij("",A.lcZ(6,5,t.balances.lightning)," Sats"),A.xp6(2),A.s9C("value",t.balances.lightning/t.balances.total*100),A.xp6(5),A.hij("",A.lcZ(13,7,t.balances.onchain)," Sats"),A.xp6(2),A.s9C("value",t.balances.onchain/t.balances.total*100),A.xp6(5),A.hij("",A.lcZ(20,9,t.balances.total)," Sats")}}function Y(i,d){if(1&i&&(A.TgZ(0,"div",6)(1,"p"),A._uU(2),A.qZA()()),2&i){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let R=(()=>{class i{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,N,21,11,"div",0),A.YNc(1,Y,3,1,"ng-template",null,1,A.W1O)),2&t){const v=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",v)}},directives:[ut.O5,Ct.xw,Ct.yH,Ct.Wh,S.pW],pipes:[ut.JJ],styles:[""]}),i})();var P=Pt(7322),nA=Pt(7238),lA=Pt(4834),_=Pt(8129);const uA=function(){return["../connections/channels/open"]},pA=function(i){return{filter:i}};function cA(i,d){if(1&i&&(A.TgZ(0,"div",19)(1,"a",20),A._uU(2),A.ALo(3,"slice"),A.qZA(),A.TgZ(4,"div",6)(5,"mat-hint",21)(6,"strong",8),A._uU(7,"Local:"),A.qZA(),A._uU(8),A.ALo(9,"number"),A.qZA(),A.TgZ(10,"mat-hint",22),A._UZ(11,"fa-icon",23),A._uU(12),A.ALo(13,"number"),A.qZA(),A.TgZ(14,"mat-hint",24)(15,"strong",8),A._uU(16,"Remote:"),A.qZA(),A._uU(17),A.ALo(18,"number"),A.qZA()(),A._UZ(19,"mat-progress-bar",25),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(3);A.xp6(1),A.s9C("matTooltip",t.alias||t.id),A.s9C("matTooltipDisabled",(t.alias||t.id).length<26),A.Q6J("routerLink",A.DdM(23,uA))("state",A.VKq(24,pA,t.id)),A.xp6(1),A.AsE(" ",A.Dn7(3,11,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":""," "),A.xp6(6),A.hij("",A.xi3(9,15,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats"),A.xp6(3),A.Q6J("icon",s.faBalanceScale),A.xp6(1),A.hij(" (",A.lcZ(13,18,t.balancedness||0),") "),A.xp6(5),A.hij("",A.xi3(18,20,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats"),A.xp6(2),A.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function gA(i,d){if(1&i&&(A.TgZ(0,"div",17),A.YNc(1,cA,20,26,"div",18),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngForOf",t.activeChannels)}}function BA(i,d){if(1&i&&(A.TgZ(0,"div",3)(1,"div",4)(2,"span",5),A._uU(3,"Total Capacity"),A.qZA(),A.TgZ(4,"div",6)(5,"mat-hint",7)(6,"strong",8),A._uU(7,"Local:"),A.qZA(),A._uU(8),A.ALo(9,"number"),A.qZA(),A.TgZ(10,"mat-hint",9),A._UZ(11,"fa-icon",10),A._uU(12),A.ALo(13,"number"),A.qZA(),A.TgZ(14,"mat-hint",11)(15,"strong",8),A._uU(16,"Remote:"),A.qZA(),A._uU(17),A.ALo(18,"number"),A.qZA()(),A._UZ(19,"mat-progress-bar",12),A.qZA(),A.TgZ(20,"div",13),A._UZ(21,"mat-divider",14),A.qZA(),A.TgZ(22,"div",15),A.YNc(23,gA,2,1,"div",16),A.qZA()()),2&i){const t=A.oxw(),s=A.MAs(2);A.xp6(8),A.hij("",A.xi3(9,7,(null==t.channelBalances?null:t.channelBalances.localBalance)||0,"1.0-0")," Sats"),A.xp6(3),A.Q6J("icon",t.faBalanceScale),A.xp6(1),A.hij(" (",A.lcZ(13,10,(null==t.channelBalances?null:t.channelBalances.balancedness)||0),") "),A.xp6(5),A.hij("",A.xi3(18,12,(null==t.channelBalances?null:t.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),A.xp6(2),A.s9C("value",null!=t.channelBalances&&t.channelBalances.localBalance&&(null==t.channelBalances?null:t.channelBalances.localBalance)>0?+(null==t.channelBalances?null:t.channelBalances.localBalance)/(+(null==t.channelBalances?null:t.channelBalances.localBalance)+ +(null==t.channelBalances?null:t.channelBalances.remoteBalance))*100:0),A.xp6(4),A.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",s)}}function yA(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",26),A._uU(1," No channels available. "),A.TgZ(2,"button",27),A.NdJ("click",function(){return A.CHM(t),A.oxw().goToChannels()}),A._uU(3,"Open Channel"),A.qZA()()}}function FA(i,d){if(1&i&&(A.TgZ(0,"div",28)(1,"p"),A._uU(2),A.qZA()()),2&i){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let $=(()=>{class i{constructor(t){this.router=t,this.faBalanceScale=h.DL8,this.faDumbbell=h.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/cln/connections")}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",activeChannels:"activeChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["fxLayout","column","fxFlex","100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"routerLink","state","matTooltip","matTooltipDisabled"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90","color-primary"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90","color-primary"],["matTooltip","Balance Score",1,"color-primary","mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90","color-primary"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start",1,"mt-1","w-100"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,BA,24,15,"div",0),A.YNc(1,yA,4,0,"ng-template",null,1,A.W1O),A.YNc(3,FA,3,1,"ng-template",null,2,A.W1O)),2&t){const v=A.MAs(4);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",v)}},directives:[ut.O5,Ct.xw,Ct.Wh,Ct.yH,P.bx,e.BN,nA.gM,S.pW,lA.d,_.$V,ut.sg,_t.yS,w.lW],pipes:[ut.JJ,ut.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),i})();function MA(i,d){if(1&i&&(A.TgZ(0,"div")(1,"h4",4),A._uU(2,"Transactions"),A.qZA(),A.TgZ(3,"div",5),A._uU(4),A.ALo(5,"number"),A.qZA()()),2&i){const t=A.oxw(2);A.xp6(4),A.Oqu(A.lcZ(5,1,null==t.fees?null:t.fees.totalTxCount))}}function fA(i,d){if(1&i&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4,"Total"),A.qZA(),A.TgZ(5,"div",5),A._uU(6),A.ALo(7,"number"),A.qZA()()(),A.TgZ(8,"div",6),A.YNc(9,MA,6,3,"div",7),A.qZA()()),2&i){const t=A.oxw();A.xp6(6),A.hij("",A.lcZ(7,2,(null==t.fees?null:t.fees.feeCollected)/1e3)," Sats"),A.xp6(3),A.Q6J("ngIf",null==t.fees?null:t.fees.totalTxCount)}}function dA(i,d){if(1&i&&(A.TgZ(0,"div",8)(1,"p"),A._uU(2),A.qZA()()),2&i){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let SA=(()=>{class i{constructor(){this.totalFees=[{name:"Total",value:0}]}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],[4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,fA,10,4,"div",0),A.YNc(1,dA,3,1,"ng-template",null,1,A.W1O)),2&t){const v=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",v)}},directives:[ut.O5,Ct.xw,Ct.yH,Ct.Wh],pipes:[ut.JJ],styles:[""]}),i})();function zA(i,d){if(1&i&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4,"Active"),A.qZA(),A.TgZ(5,"div",5),A._UZ(6,"span",6),A._uU(7),A.ALo(8,"number"),A.qZA()(),A.TgZ(9,"div")(10,"h4",4),A._uU(11,"Pending"),A.qZA(),A.TgZ(12,"div",5),A._UZ(13,"span",7),A._uU(14),A.ALo(15,"number"),A.qZA()(),A.TgZ(16,"div")(17,"h4",4),A._uU(18,"Inactive"),A.qZA(),A.TgZ(19,"div",5),A._UZ(20,"span",8),A._uU(21),A.ALo(22,"number"),A.qZA()()(),A.TgZ(23,"div",3)(24,"div")(25,"h4",4),A._uU(26,"Capacity"),A.qZA(),A.TgZ(27,"div",5),A._uU(28),A.ALo(29,"number"),A.qZA()(),A.TgZ(30,"div")(31,"h4",4),A._uU(32,"Capacity"),A.qZA(),A.TgZ(33,"div",5),A._uU(34),A.ALo(35,"number"),A.qZA()(),A.TgZ(36,"div")(37,"h4",4),A._uU(38,"Capacity"),A.qZA(),A.TgZ(39,"div",5),A._uU(40),A.ALo(41,"number"),A.qZA()()()()),2&i){const t=A.oxw();A.xp6(7),A.Oqu(A.lcZ(8,6,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.channels)||0)),A.xp6(7),A.Oqu(A.lcZ(15,8,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.channels)||0)),A.xp6(7),A.Oqu(A.lcZ(22,10,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.channels)||0)),A.xp6(7),A.hij("",A.lcZ(29,12,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.capacity)||0)," Sats"),A.xp6(6),A.hij("",A.lcZ(35,14,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.capacity)||0)," Sats"),A.xp6(6),A.hij("",A.lcZ(41,16,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.capacity)||0)," Sats")}}function XA(i,d){if(1&i&&(A.TgZ(0,"div",9)(1,"p"),A._uU(2),A.qZA()()),2&i){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let q=(()=>{class i{constructor(){this.channelsStatus={active:{},pending:{},inactive:{}}}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],[1,"dot","tiny-dot","green"],[1,"dot","tiny-dot","yellow"],[1,"dot","tiny-dot","grey"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,zA,42,18,"div",0),A.YNc(1,XA,3,1,"ng-template",null,1,A.W1O)),2&t){const v=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",v)}},directives:[ut.O5,Ct.xw,Ct.yH,Ct.Wh],pipes:[ut.JJ],styles:[""]}),i})();function O(i,d){if(1&i&&(A.TgZ(0,"mat-hint",19)(1,"strong",20),A._uU(2,"Capacity: "),A.qZA(),A._uU(3),A.ALo(4,"number"),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(3),A.hij("",A.xi3(4,1,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats")}}function AA(i,d){if(1&i&&(A.TgZ(0,"mat-hint",19)(1,"strong",20),A._uU(2,"Capacity: "),A.qZA(),A._uU(3),A.ALo(4,"number"),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(3),A.hij("",A.xi3(4,1,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats")}}function W(i,d){if(1&i&&A._UZ(0,"mat-progress-bar",21),2&i){const t=A.oxw().$implicit,s=A.oxw(3);A.s9C("value",s.totalLiquidity>0?(+t.msatoshi_to_them/1e3||0)/s.totalLiquidity*100:0)}}function EA(i,d){if(1&i&&A._UZ(0,"mat-progress-bar",21),2&i){const t=A.oxw().$implicit,s=A.oxw(3);A.s9C("value",s.totalLiquidity>0?(+t.msatoshi_to_us/1e3||0)/s.totalLiquidity*100:0)}}const vA=function(){return["../connections/channels/open"]},iA=function(i){return{filter:i}};function wA(i,d){if(1&i&&(A.TgZ(0,"div",14)(1,"a",15),A._uU(2),A.ALo(3,"slice"),A.qZA(),A.TgZ(4,"div",16),A.YNc(5,O,5,4,"mat-hint",17),A.YNc(6,AA,5,4,"mat-hint",17),A.qZA(),A.YNc(7,W,1,1,"mat-progress-bar",18),A.YNc(8,EA,1,1,"mat-progress-bar",18),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(3);A.xp6(1),A.s9C("matTooltip",t.alias||t.id),A.s9C("matTooltipDisabled",(t.alias||t.id).length<26),A.Q6J("routerLink",A.DdM(14,vA))("state",A.VKq(15,iA,t.id)),A.xp6(1),A.AsE(" ",A.Dn7(3,10,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":""," "),A.xp6(3),A.Q6J("ngIf","In"===s.direction),A.xp6(1),A.Q6J("ngIf","Out"===s.direction),A.xp6(1),A.Q6J("ngIf","In"===s.direction),A.xp6(1),A.Q6J("ngIf","Out"===s.direction)}}function GA(i,d){if(1&i&&(A.TgZ(0,"div",12),A.YNc(1,wA,9,17,"div",13),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngForOf",t.activeChannels)}}const et=function(i,d,t){return{"mb-4":i,"mb-2":d,"mb-1":t}};function st(i,d){if(1&i&&(A.TgZ(0,"div",3)(1,"div",4)(2,"span",5),A._uU(3,"Total Capacity"),A.qZA(),A.TgZ(4,"mat-hint",6),A._uU(5),A.ALo(6,"number"),A.qZA(),A._UZ(7,"mat-progress-bar",7),A.qZA(),A.TgZ(8,"div",8),A._UZ(9,"mat-divider",9),A.qZA(),A.TgZ(10,"div",10),A.YNc(11,GA,2,1,"div",11),A.qZA()()),2&i){const t=A.oxw(),s=A.MAs(2);A.Q6J("ngClass",A.kEZ(7,et,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD,t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),A.xp6(5),A.hij("",A.xi3(6,4,t.totalLiquidity,"1.0-0")," Sats"),A.xp6(6),A.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",s)}}function TA(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"button",24),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).goToChannels()}),A._uU(1,"Open Channel"),A.qZA()}}function at(i,d){if(1&i&&(A.TgZ(0,"div",22),A._uU(1," No channels available. "),A.YNc(2,TA,2,0,"button",23),A.qZA()),2&i){const t=A.oxw();A.xp6(2),A.Q6J("ngIf","Out"===t.direction)}}function It(i,d){if(1&i&&(A.TgZ(0,"div",25)(1,"p"),A._uU(2),A.qZA()()),2&i){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let mt=(()=>{class i{constructor(t,s){this.router=t,this.commonService=s,this.screenSize="",this.screenSizeEnum=a.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/cln/connections")}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(_t.F0),A.Y36(C.v))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",activeChannels:"activeChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],["fxLayout","column","fxFlex.gt-sm","88","fxFlex","84","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100","class","w-100",4,"ngIf","ngIfElse"],["fxLayout","column","fxFlex","100",1,"w-100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"routerLink","state","matTooltip","matTooltipDisabled"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","100","fxLayoutAlign","start center","class","font-size-90 color-primary",4,"ngIf"],["class","dashboard-progress-bar","mode","determinate",3,"value",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"font-size-90","color-primary"],[1,"font-weight-900","mr-5px"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","1",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,st,12,11,"div",0),A.YNc(1,at,3,1,"ng-template",null,1,A.W1O),A.YNc(3,It,3,1,"ng-template",null,2,A.W1O)),2&t){const v=A.MAs(4);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",v)}},directives:[ut.O5,Ct.xw,Ct.Wh,Ct.yH,ut.mk,T.oO,P.bx,S.pW,lA.d,_.$V,ut.sg,_t.yS,nA.gM,w.lW],pipes:[ut.JJ,ut.OU],styles:[""]}),i})();var ht=Pt(3251),JA=Pt(9300),WA=Pt(6087),it=Pt(4847),xA=Pt(2075),Mt=Pt(8966),Et=Pt(429),Tt=Pt(6642),OA=Pt(3075),H=Pt(7531),k=Pt(3390),z=Pt(6534),QA=Pt(4107),CA=Pt(508),PA=Pt(2368);function rA(i,d){if(1&i&&(A.TgZ(0,"mat-option",27),A._uU(1),A.ALo(2,"titlecase"),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(A.lcZ(2,2,t))}}function gt(i,d){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.invoiceError)}}function Yt(i,d){if(1&i&&(A.TgZ(0,"div",28),A._UZ(1,"fa-icon",29),A.YNc(2,gt,2,1,"span",30),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.invoiceError)}}let j=(()=>{class i{constructor(t,s,v,Z,rt,vt){this.dialogRef=t,this.data=s,this.store=v,this.decimalPipe=Z,this.commonService=rt,this.actions=vt,this.faExclamationTriangle=h.eHv,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.timeUnitEnum=a.Qk,this.timeUnits=a.LO,this.selTimeUnit=a.Qk.SECS,this.invoiceError="",this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(B.lw).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.actions.pipe((0,r.R)(this.unSubs[2]),(0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewInvoice"===t.payload.action&&(t.payload.status===a.Bn.ERROR&&(this.invoiceError=t.payload.message),t.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(t){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let s=this.expiry?this.expiry:3600;this.selTimeUnit!==a.Qk.SECS&&this.expiry&&(s=this.commonService.convertTime(this.expiry,this.selTimeUnit,a.Qk.SECS)),this.store.dispatch((0,Et.Rd)({payload:{label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:s,private:this.private}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=a.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode&&this.selNode.fiatConversion&&this.invoiceValue&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,r.R)(this.unSubs[3])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,a.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onTimeUnitChange(t){this.expiry&&this.selTimeUnit!==t.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,t.value)),this.selTimeUnit=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(ut.JJ),A.Y36(C.v),A.Y36(Tt.eX))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-create-invoices"]],decls:39,vars:16,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invoiceValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","name","expiry","placeholder","Expiry","type","number","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","50","fxLayoutAlign","start center",1,"mt-2"],["tabindex","6","color","primary","name","private",3,"ngModel","ngModelChange"],["matTooltip","Include routing hints for private channels","matTooltipPosition","above",1,"info-icon"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,s){if(1&t){const v=A.EpF();A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Create Invoice"),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),A.NdJ("ngModelChange",function(rt){return s.description=rt}),A.qZA()(),A.TgZ(13,"div",11)(14,"mat-form-field",12)(15,"input",13),A.NdJ("ngModelChange",function(rt){return s.invoiceValue=rt})("keyup",function(){return s.onInvoiceValueChange()}),A.qZA(),A.TgZ(16,"span",14),A._uU(17," Sats "),A.qZA(),A.TgZ(18,"mat-hint"),A._uU(19),A.qZA()(),A.TgZ(20,"mat-form-field",15)(21,"input",16),A.NdJ("ngModelChange",function(rt){return s.expiry=rt}),A.qZA(),A.TgZ(22,"span",14),A._uU(23),A.ALo(24,"titlecase"),A.qZA()(),A.TgZ(25,"mat-form-field",17)(26,"mat-select",18),A.NdJ("selectionChange",function(rt){return s.onTimeUnitChange(rt)}),A.YNc(27,rA,3,4,"mat-option",19),A.qZA()()(),A.TgZ(28,"div",20)(29,"mat-slide-toggle",21),A.NdJ("ngModelChange",function(rt){return s.private=rt}),A._uU(30,"Private Routing Hints"),A.qZA(),A.TgZ(31,"mat-icon",22),A._uU(32,"info_outline"),A.qZA()(),A.YNc(33,Yt,3,2,"div",23),A.TgZ(34,"div",24)(35,"button",25),A.NdJ("click",function(){return s.resetData()}),A._uU(36,"Clear Field"),A.qZA(),A.TgZ(37,"button",26),A.NdJ("click",function(){A.CHM(v);const rt=A.MAs(10);return s.onAddInvoice(rt)}),A._uU(38,"Create Invoice"),A.qZA()()()()()()}2&t&&(A.xp6(6),A.Q6J("mat-dialog-close",!1),A.xp6(6),A.Q6J("ngModel",s.description),A.xp6(3),A.Q6J("ngModel",s.invoiceValue)("step",100)("min",1),A.xp6(4),A.Oqu(s.invoiceValueHint),A.xp6(2),A.Q6J("ngModel",s.expiry)("step",s.selTimeUnit===s.timeUnitEnum.SECS?300:s.selTimeUnit===s.timeUnitEnum.MINS?10:s.selTimeUnit===s.timeUnitEnum.HOURS?2:1)("min",1),A.xp6(2),A.hij(" ",A.lcZ(24,14,s.selTimeUnit)," "),A.xp6(3),A.Q6J("value",s.selTimeUnit),A.xp6(1),A.Q6J("ngForOf",s.timeUnits),A.xp6(2),A.Q6J("ngModel",s.private),A.xp6(4),A.Q6J("ngIf",""!==s.invoiceError))},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,Mt.ZT,g.dn,OA._Y,OA.JL,OA.F,P.KE,H.Nt,OA.Fj,k.h,OA.JJ,OA.On,OA.wV,OA.qQ,z.q,P.R9,P.bx,QA.gD,ut.sg,CA.ey,PA.Rr,m.Hw,nA.gM,ut.O5,e.BN],pipes:[ut.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();var qA=Pt(5566),KA=Pt(7861),DA=Pt(3093);function jA(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"input",7),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().description=v}),A.qZA()(),A.TgZ(4,"mat-form-field",8)(5,"input",9),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().invoiceValue=v})("keyup",function(){return A.CHM(t),A.oxw().onInvoiceValueChange()}),A.qZA(),A.TgZ(6,"span",10),A._uU(7," Sats "),A.qZA(),A.TgZ(8,"mat-hint"),A._uU(9),A.qZA()(),A.TgZ(10,"div",11)(11,"button",12),A.NdJ("click",function(){return A.CHM(t),A.oxw().resetData()}),A._uU(12,"Clear Field"),A.qZA(),A.TgZ(13,"button",13),A.NdJ("click",function(){A.CHM(t);const v=A.MAs(1);return A.oxw().onAddInvoice(v)}),A._uU(14,"Create Invoice"),A.qZA()()()}if(2&i){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.description),A.xp6(2),A.Q6J("ngModel",t.invoiceValue)("step",100)("min",1),A.xp6(4),A.Oqu(t.invoiceValueHint)}}function lt(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",14)(1,"button",15),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDeleteExpiredInvoices()}),A._uU(2,"Delete Expired"),A.qZA(),A.TgZ(3,"button",16),A.NdJ("click",function(){return A.CHM(t),A.oxw().openCreateInvoiceModal()}),A._uU(4,"Create Invoice"),A.qZA()()}}function zt(i,d){1&i&&A._UZ(0,"mat-progress-bar",50)}function xt(i,d){1&i&&A._UZ(0,"th",51)}const Lt=function(i){return{"mr-0":i}};function Xt(i,d){if(1&i&&A._UZ(0,"span",56),2&i){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Lt,t.screenSize===t.screenSizeEnum.XS))}}function ze(i,d){if(1&i&&A._UZ(0,"span",57),2&i){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Lt,t.screenSize===t.screenSizeEnum.XS))}}function ae(i,d){if(1&i&&A._UZ(0,"span",58),2&i){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Lt,t.screenSize===t.screenSizeEnum.XS))}}function ee(i,d){if(1&i&&(A.TgZ(0,"td",52),A.YNc(1,Xt,1,3,"span",53),A.YNc(2,ze,1,3,"span",54),A.YNc(3,ae,1,3,"span",55),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Q6J("ngIf","paid"===(null==t?null:t.status)),A.xp6(1),A.Q6J("ngIf","unpaid"===(null==t?null:t.status)),A.xp6(1),A.Q6J("ngIf","expired"===(null==t?null:t.status))}}function Fe(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Expiry Date "),A.qZA())}function Ge(i,d){if(1&i&&(A.TgZ(0,"td",52),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",A.xi3(2,1,1e3*(null==t?null:t.expires_at),"dd/MMM/y HH:mm")," ")}}function Le(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Date Settled "),A.qZA())}function yn(i,d){if(1&i&&(A.TgZ(0,"td",52),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.paid_at),"dd/MMM/y HH:mm")||"-")}}function xn(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Type "),A.qZA())}function re(i,d){if(1&i&&(A.TgZ(0,"td",52),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11&&!t.label.includes("keysend-")?"Bolt11":"Keysend")}}function nn(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Description "),A.qZA())}const De=function(i){return{"max-width":i}};function rn(i,d){if(1&i&&(A.TgZ(0,"td",52)(1,"div",59)(2,"span",60),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,De,s.screenSize===s.screenSizeEnum.XS?"10rem":"25rem")),A.xp6(2),A.Oqu(null==t?null:t.description)}}function $e(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Label "),A.qZA())}function Gn(i,d){if(1&i&&(A.TgZ(0,"td",52)(1,"div",59)(2,"span",60),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,De,s.screenSize===s.screenSizeEnum.XS?"10rem":"25rem")),A.xp6(2),A.Oqu(null==t?null:t.label)}}function Hn(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Payment Hash "),A.qZA())}function Kt(i,d){if(1&i&&(A.TgZ(0,"td",52)(1,"div",59)(2,"span",60),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,De,s.screenSize===s.screenSizeEnum.XS?"10rem":"25rem")),A.xp6(2),A.Oqu(null==t?null:t.payment_hash)}}function Gt(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Invoice "),A.qZA())}function $t(i,d){if(1&i&&(A.TgZ(0,"td",52)(1,"div",59)(2,"span",60),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,De,s.screenSize===s.screenSizeEnum.XS?"10rem":"25rem")),A.xp6(2),A.Oqu(null==t?null:t.bolt11)}}function le(i,d){1&i&&(A.TgZ(0,"th",61),A._uU(1," Amount (Sats) "),A.qZA())}function vn(i,d){if(1&i&&(A.TgZ(0,"td",52)(1,"span",62),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0"),"")}}function pn(i,d){1&i&&(A.TgZ(0,"th",61),A._uU(1," Amount Settled (Sats) "),A.qZA())}function Tn(i,d){if(1&i&&(A.TgZ(0,"td",52)(1,"span",62),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_received)/1e3,(null==t?null:t.msatoshi_received)<1e3?"1.0-4":"1.0-0"),"")}}function Xn(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",63)(1,"div",64)(2,"mat-select",65),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",66),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}const Ei=function(i){return{"px-3":i}};function Sn(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",67)(1,"div",64)(2,"mat-select",68),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",66),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw(2).onInvoiceClick(Z)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",66),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw(2).onRefreshInvoice(Z)}),A._uU(7,"Refresh"),A.qZA()()()()}if(2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Ei,t.screenSize!==t.screenSizeEnum.XS))}}function ZA(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No invoice available."),A.qZA())}function YA(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting invoices..."),A.qZA())}function tt(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function UA(i,d){if(1&i&&(A.TgZ(0,"td",69),A.YNc(1,ZA,2,0,"p",70),A.YNc(2,YA,2,0,"p",70),A.YNc(3,tt,2,1,"p",70),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const bA=function(i){return{"display-none":i}};function LA(i,d){if(1&i&&A._UZ(0,"tr",71),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,bA,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function HA(i,d){1&i&&A._UZ(0,"tr",72)}function At(i,d){1&i&&A._UZ(0,"tr",73)}const RA=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}},ot=function(){return["no_invoice"]};function VA(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",17)(1,"div",18)(2,"div",19),A._UZ(3,"fa-icon",20),A.TgZ(4,"span",21),A._uU(5,"Invoices History"),A.qZA()(),A.TgZ(6,"mat-form-field",22)(7,"input",23),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(v){return A.CHM(t),A.oxw().selFilter=v}),A.qZA()()(),A.TgZ(8,"div",24),A.YNc(9,zt,1,0,"mat-progress-bar",25),A.TgZ(10,"table",26,27),A.ynx(12,28),A.YNc(13,xt,1,0,"th",29),A.YNc(14,ee,4,3,"td",30),A.BQk(),A.ynx(15,31),A.YNc(16,Fe,2,0,"th",29),A.YNc(17,Ge,3,4,"td",30),A.BQk(),A.ynx(18,32),A.YNc(19,Le,2,0,"th",29),A.YNc(20,yn,3,4,"td",30),A.BQk(),A.ynx(21,33),A.YNc(22,xn,2,0,"th",29),A.YNc(23,re,2,1,"td",30),A.BQk(),A.ynx(24,34),A.YNc(25,nn,2,0,"th",29),A.YNc(26,rn,4,4,"td",30),A.BQk(),A.ynx(27,35),A.YNc(28,$e,2,0,"th",29),A.YNc(29,Gn,4,4,"td",30),A.BQk(),A.ynx(30,36),A.YNc(31,Hn,2,0,"th",29),A.YNc(32,Kt,4,4,"td",30),A.BQk(),A.ynx(33,37),A.YNc(34,Gt,2,0,"th",29),A.YNc(35,$t,4,4,"td",30),A.BQk(),A.ynx(36,38),A.YNc(37,le,2,0,"th",39),A.YNc(38,vn,4,4,"td",30),A.BQk(),A.ynx(39,40),A.YNc(40,pn,2,0,"th",39),A.YNc(41,Tn,4,4,"td",30),A.BQk(),A.ynx(42,41),A.YNc(43,Xn,6,0,"th",42),A.YNc(44,Sn,8,3,"td",43),A.BQk(),A.ynx(45,44),A.YNc(46,UA,4,3,"td",45),A.BQk(),A.YNc(47,LA,1,3,"tr",46),A.YNc(48,HA,1,0,"tr",47),A.YNc(49,At,1,0,"tr",48),A.qZA()(),A._UZ(50,"mat-paginator",49),A.qZA()}if(2&i){const t=A.oxw();A.xp6(3),A.Q6J("icon",t.faHistory),A.xp6(4),A.Q6J("ngModel",t.selFilter),A.xp6(2),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.invoices)("ngClass",A.VKq(11,RA,""!==t.errorMessage)),A.xp6(37),A.Q6J("matFooterRowDef",A.DdM(13,ot)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Qt=(()=>{class i{constructor(t,s,v,Z,rt,vt,Ot){this.logger=t,this.store=s,this.decimalPipe=v,this.commonService=Z,this.rtlEffects=rt,this.datePipe=vt,this.actions=Ot,this.calledFrom="transactions",this.faHistory=h.qO$,this.PAGE_ID="transactions",this.tableSetting={tableId:"invoices",recordsPerPage:a.IV,sortBy:"expires_at",sortOrder:a.Pi.DESCENDING},this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(B.lw).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("status"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.gc).pipe((0,r.R)(this.unSubs[3])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.invoiceJSONArr=t.listInvoices.invoices||[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(t)}),this.actions.pipe((0,r.R)(this.unSubs[4]),(0,JA.h)(t=>t.type===a.AB.SET_LOOKUP_CLN||t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.SET_LOOKUP_CLN&&this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&t.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(t.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,KA.qR)({payload:{data:{pageSize:this.pageSize,component:j}}}))}onAddInvoice(t){this.invoiceValue||(this.invoiceValue=0);const s=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue,this.store.dispatch((0,Et.Rd)({payload:{label:this.newlyAddedInvoiceMemo,amount:1e3*this.invoiceValue,description:this.description,expiry:s,private:this.private}})),this.resetData()}onDeleteExpiredInvoices(){this.store.dispatch((0,KA.c1)({payload:{data:{type:"CONFIRM",titleMessage:"Delete Expired Invoices",noBtnText:"Cancel",yesBtnText:"Delete Invoices"}}})),this.rtlEffects.closeConfirm.pipe((0,r.R)(this.unSubs[5])).subscribe(t=>{t&&this.store.dispatch((0,Et.g6)({payload:null}))})}onInvoiceClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{invoice:{msatoshi:t.msatoshi,label:t.label,expires_at:t.expires_at,paid_at:t.paid_at,bolt11:t.bolt11,payment_hash:t.payment_hash,description:t.description,status:t.status,msatoshi_received:t.msatoshi_received},newlyAdded:!1,component:qA.y}}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onInvoiceValueChange(){var t;this.selNode&&this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,a.NT.SATS,a.NT.OTHER,(null===(t=this.selNode)||void 0===t?void 0:t.currencyUnits)&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,r.R)(this.unSubs[6])).subscribe({next:s=>{this.invoiceValueHint="= "+s.symbol+this.decimalPipe.transform(s.OTHER,a.Xz.OTHER)+" "+s.unit},error:s=>{this.invoiceValueHint="Conversion Error: "+s}}))}onRefreshInvoice(t){this.store.dispatch((0,Et.n7)({payload:t.label}))}updateInvoicesData(t){var s;this.invoiceJSONArr=null===(s=this.invoiceJSONArr)||void 0===s?void 0:s.map(v=>v.label===t.label?t:v)}loadInvoicesTable(t){var s;this.invoices=new xA.by(t?[...t]:[]),this.invoices.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,this.invoices.sort=this.sort,null===(s=this.invoices.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.invoices.filterPredicate=(v,Z)=>{var rt,vt;return((null===(rt=this.datePipe.transform(new Date(1e3*(v.paid_at||0)),"dd/MMM/YYYY HH:mm"))||void 0===rt?void 0:rt.toLowerCase())+(null===(vt=this.datePipe.transform(new Date(1e3*(v.expires_at||0)),"dd/MMM/YYYY HH:mm"))||void 0===vt?void 0:vt.toLowerCase())+(v.bolt12?"bolt12":v.bolt11?"bolt11":"keysend")+JSON.stringify(v).toLowerCase()).includes(Z)},this.invoices.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(ut.JJ),A.Y36(C.v),A.Y36(DA.V),A.Y36(ut.uU),A.Y36(Tt.eX))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-lightning-invoices-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},inputs:{calledFrom:"calledFrom"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["matInput","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","name","invoiceValue","type","number","tabindex","3",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","9","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","10",3,"click"],["fxLayout","row"],["mat-stroked-button","","color","warn","tabindex","7","type","button",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","expires_at"],["matColumnDef","paid_at"],["matColumnDef","type"],["matColumnDef","description"],["matColumnDef","label"],["matColumnDef","payment_hash"],["matColumnDef","bolt11"],["matColumnDef","msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_received"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Paid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unpaid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Expired","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Paid","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Unpaid","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Expired","matTooltipPosition","right",1,"dot","red",3,"ngClass"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,jA,15,5,"form",1),A.YNc(2,lt,5,0,"div",2),A.YNc(3,VA,51,14,"div",3),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf","home"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom))},directives:[Ct.xw,Ct.yH,Ct.Wh,ut.O5,OA._Y,OA.JL,OA.F,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,OA.wV,OA.qQ,z.q,P.R9,P.bx,w.lW,e.BN,_.$V,S.pW,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,nA.gM,ut.PC,T.Zl,QA.gD,QA.$L,CA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.uU,ut.JJ],styles:[".mat-column-status[_ngcontent-%COMP%]{width:2rem}.mat-column-description[_ngcontent-%COMP%], .mat-column-label[_ngcontent-%COMP%], .mat-column-payment_hash[_ngcontent-%COMP%], .mat-column-bolt11[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-label[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-payment_hash[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-bolt11[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();var St=Pt(5698),Ut=Pt(8104),kt=Pt(9814),Wt=Pt(7446);const ne=["sendPaymentForm"],wt=["paymentAmt"],bt=["offerAmt"],Zt=["paymentReq"],jt=["offerReq"];function Be(i,d){if(1&i&&(A.TgZ(0,"mat-radio-button",22),A._uU(1,"Offer"),A.qZA()),2&i){const t=A.oxw(2);A.s9C("value",t.paymentTypes.OFFER)}}function qt(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-radio-group",18),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().paymentType=v})("change",function(){return A.CHM(t),A.oxw().onPaymentTypeChange()}),A.TgZ(1,"mat-radio-button",19),A._uU(2,"Invoice"),A.qZA(),A.TgZ(3,"mat-radio-button",20),A._uU(4,"Keysend"),A.qZA(),A.YNc(5,Be,2,1,"mat-radio-button",21),A.qZA()}if(2&i){const t=A.oxw();A.Q6J("ngModel",t.paymentType),A.xp6(1),A.s9C("value",t.paymentTypes.INVOICE),A.xp6(2),A.s9C("value",t.paymentTypes.KEYSEND),A.xp6(2),A.Q6J("ngIf",t.selNode.enableOffers)}}function he(i,d){1&i&&A.GkF(0)}function ue(i,d){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentError)}}function ye(i,d){if(1&i&&(A.TgZ(0,"div",23),A._UZ(1,"fa-icon",24),A.YNc(2,ue,2,1,"span",25),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.paymentError)}}function He(i,d){if(1&i&&(A.TgZ(0,"mat-hint"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentDecodedHint)}}function Ne(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Payment request is required."),A.qZA())}function Ye(i,d){if(1&i&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentDecodedHint)}}function Ue(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Payment amount is required."),A.qZA())}function tn(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",29,30),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw(2).paymentAmount=v})("change",function(v){return A.CHM(t),A.oxw(2).onAmountChange(v)}),A.qZA(),A.TgZ(3,"mat-hint"),A._uU(4,"It is a zero amount invoice, enter amount to be paid."),A.qZA(),A.YNc(5,Ue,2,0,"mat-error",25),A.qZA()}if(2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.paymentAmount),A.xp6(4),A.Q6J("ngIf",!t.paymentAmount)}}function Fn(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"textarea",26,27),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().onPaymentRequestEntry(v)})("matTextareaAutosize",function(){return!0}),A.qZA(),A.YNc(3,He,2,1,"mat-hint",25),A.YNc(4,Ne,2,0,"mat-error",25),A.YNc(5,Ye,2,1,"mat-error",25),A.qZA(),A.YNc(6,tn,6,2,"mat-form-field",28)}if(2&i){const t=A.MAs(2),s=A.oxw();A.xp6(1),A.Q6J("ngModel",s.paymentRequest),A.xp6(2),A.Q6J("ngIf",s.paymentRequest&&""!==s.paymentDecodedHint),A.xp6(1),A.Q6J("ngIf",!s.paymentRequest),A.xp6(1),A.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),A.xp6(1),A.Q6J("ngIf",s.zeroAmtInvoice)}}function on(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Pubkey is required."),A.qZA())}function mn(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Keysend amount is required."),A.qZA())}function Nn(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",31),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().pubkey=v}),A.qZA(),A.YNc(2,on,2,0,"mat-error",25),A.qZA(),A.TgZ(3,"mat-form-field",1)(4,"input",32,33),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().keysendAmount=v}),A.qZA(),A.YNc(6,mn,2,0,"mat-error",25),A.qZA()}if(2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngModel",t.pubkey),A.xp6(1),A.Q6J("ngIf",!t.pubkey),A.xp6(2),A.Q6J("ngModel",t.keysendAmount),A.xp6(2),A.Q6J("ngIf",!t.keysendAmount)}}function sn(i,d){if(1&i&&(A.TgZ(0,"mat-hint"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.offerDecodedHint)}}function En(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Offer request is required."),A.qZA())}function un(i,d){if(1&i&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.offerDecodedHint)}}function ei(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Offer amount is required."),A.qZA())}function Pi(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",40,41),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw(2).offerAmount=v})("change",function(v){return A.CHM(t),A.oxw(2).onAmountChange(v)}),A.qZA(),A.TgZ(3,"mat-hint"),A._uU(4,"It is a zero amount offer, enter amount to be paid."),A.qZA(),A.YNc(5,ei,2,0,"mat-error",25),A.qZA()}if(2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.offerAmount),A.xp6(4),A.Q6J("ngIf",!t.offerAmount)}}function bi(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-form-field",42)(1,"input",43),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw(2).offerTitle=v}),A.qZA()()}if(2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.offerTitle)}}function li(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"textarea",34,35),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().onPaymentRequestEntry(v)})("matTextareaAutosize",function(){return!0}),A.qZA(),A.YNc(3,sn,2,1,"mat-hint",25),A.YNc(4,En,2,0,"mat-error",25),A.YNc(5,un,2,1,"mat-error",25),A.qZA(),A.YNc(6,Pi,6,2,"mat-form-field",28),A.TgZ(7,"div",36)(8,"mat-checkbox",37),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().flgSaveToDB=v}),A._uU(9,"Bookmark Offer"),A.qZA(),A.TgZ(10,"mat-icon",38),A._uU(11,"info_outline"),A.qZA()(),A.YNc(12,bi,2,1,"mat-form-field",39)}if(2&i){const t=A.MAs(2),s=A.oxw();A.xp6(1),A.Q6J("ngModel",s.offerRequest),A.xp6(2),A.Q6J("ngIf",s.offerRequest&&""!==s.offerDecodedHint),A.xp6(1),A.Q6J("ngIf",!s.offerRequest),A.xp6(1),A.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),A.xp6(1),A.Q6J("ngIf",s.zeroAmtOffer),A.xp6(2),A.Q6J("ngModel",s.flgSaveToDB),A.xp6(4),A.Q6J("ngIf",s.flgSaveToDB||""!==s.offerTitle)}}let Yn=(()=>{class i{constructor(t,s,v,Z,rt,vt,Ot,qe){this.dialogRef=t,this.data=s,this.store=v,this.logger=Z,this.commonService=rt,this.decimalPipe=vt,this.actions=Ot,this.dataService=qe,this.faExclamationTriangle=h.eHv,this.paymentTypes=a.IX,this.paymentType=a.IX.INVOICE,this.selNode={},this.offerDecoded={},this.offerRequest="",this.offerDecodedHint="",this.offerDescription="",this.offerVendor="",this.offerTitle="",this.zeroAmtOffer=!1,this.offerInvoice=null,this.offerAmount=null,this.flgSaveToDB=!1,this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentAmount=null,this.pubkey="",this.keysendAmount=null,this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=a.Vc[0],this.feeLimitTypes=a.Vc,this.paymentError="",this.isCompatibleVersion=!1,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x]}set payReq(t){t&&(this.paymentReq=t)}set offrReq(t){t&&(this.offerReq=t)}ngOnInit(){if(this.data&&this.data.paymentType)switch(this.paymentType=this.data.paymentType,this.paymentType){case a.IX.INVOICE:this.paymentRequest=this.data.invoiceBolt11;break;case a.IX.KEYSEND:this.pubkey=this.data.pubkeyKeysend;break;case a.IX.OFFER:this.onPaymentRequestEntry(this.data.bolt12),this.offerTitle=this.data.offerTitle,this.flgSaveToDB=!1}this.store.select(B.lw).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.isCompatibleVersion=this.commonService.isVersionCompatible(t.version,"0.9.0")&&this.commonService.isVersionCompatible(t.api_version,"0.4.0")}),this.store.select(B.ZW).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{this.activeChannels=t.activeChannels,this.logger.info(t)}),this.actions.pipe((0,r.R)(this.unSubs[3]),(0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN||t.type===a.AB.SEND_PAYMENT_STATUS_CLN||t.type===a.AB.SET_OFFER_INVOICE_CLN)).subscribe(t=>{t.type===a.AB.SEND_PAYMENT_STATUS_CLN&&this.dialogRef.close(),t.type===a.AB.SET_OFFER_INVOICE_CLN&&(this.offerInvoice=t.payload,this.sendPayment()),t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&("SendPayment"===t.payload.action&&(delete this.paymentDecoded.msatoshi,this.paymentError=t.payload.message),"DecodePayment"===t.payload.action&&(this.paymentType===a.IX.INVOICE&&(this.paymentDecodedHint="ERROR: "+t.payload.message,this.paymentReq.control.setErrors({decodeError:!0})),this.paymentType===a.IX.OFFER&&(this.offerDecodedHint="ERROR: "+t.payload.message,this.offerReq.control.setErrors({decodeError:!0}))),"FetchOfferInvoice"===t.payload.action&&this.paymentType===a.IX.OFFER&&(this.paymentError=t.payload.message))})}onSendPayment(){switch(this.paymentType){case a.IX.KEYSEND:if(!this.pubkey||""===this.pubkey.trim()||!this.keysendAmount||this.keysendAmount<=0)return!0;this.keysendPayment();break;case a.IX.INVOICE:if(!this.paymentRequest||this.zeroAmtInvoice&&(0===this.paymentAmount||!this.paymentAmount))return this.paymentReq.control.markAsTouched(),this.paymentAmt.control.markAsTouched(),!0;this.paymentDecoded.created_at?this.sendPayment():(this.resetInvoiceDetails(),this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,r.R)(this.unSubs[4])).subscribe(t=>{"bolt12 offer"===t.type&&t.offer_id?(this.paymentDecodedHint="ERROR: Select Offer option to pay the bolt12 offer invoice.",this.paymentReq.control.setErrors({decodeError:!0})):(this.paymentDecoded=t,this.setPaymentDecodedDetails())}));break;case a.IX.OFFER:if(!this.offerRequest||this.zeroAmtOffer&&(0===this.offerAmount||!this.offerAmount))return this.offerReq.control.markAsTouched(),this.offerAmt.control.markAsTouched(),!0;this.offerDecoded.offer_id?this.sendPayment():(this.resetOfferDetails(),this.dataService.decodePayment(this.offerRequest,!0).pipe((0,r.R)(this.unSubs[5])).subscribe(t=>{"bolt11 invoice"===t.type&&t.payment_hash?(this.offerDecodedHint="ERROR: Select Invoice option to pay the bolt11 invoice.",this.offerReq.control.setErrors({decodeError:!0})):(this.offerDecoded=t,this.setOfferDecodedDetails())}))}}keysendPayment(){this.keysendAmount&&this.store.dispatch((0,Et.oV)({payload:{uiMessage:a.m6.SEND_KEYSEND,paymentType:a.IX.KEYSEND,pubkey:this.pubkey,amount:1e3*this.keysendAmount,fromDialog:!0}}))}sendPayment(){this.paymentError="",this.paymentType===a.IX.INVOICE?this.store.dispatch((0,Et.oV)(this.zeroAmtInvoice&&this.paymentAmount?{payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*this.paymentAmount,fromDialog:!0}}:{payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!0}})):this.paymentType===a.IX.OFFER&&(this.offerInvoice?this.offerAmount&&this.store.dispatch((0,Et.oV)({payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.OFFER,invoice:this.offerInvoice.invoice,saveToDB:this.flgSaveToDB,bolt12:this.offerRequest,amount:1e3*this.offerAmount,zeroAmtOffer:this.zeroAmtOffer,title:this.offerTitle,vendor:this.offerVendor,description:this.offerDescription,fromDialog:!0}})):this.store.dispatch((0,Et.eM)(this.zeroAmtOffer&&this.offerAmount?{payload:{offer:this.offerRequest,msatoshi:1e3*this.offerAmount}}:{payload:{offer:this.offerRequest}})))}onPaymentRequestEntry(t){this.paymentType===a.IX.INVOICE?(this.paymentRequest=t,this.resetInvoiceDetails()):this.paymentType===a.IX.OFFER&&(this.offerRequest=t,this.resetOfferDetails()),t.length>100&&this.dataService.decodePayment(t,!0).pipe((0,r.R)(this.unSubs[6])).subscribe(s=>{this.paymentType===a.IX.INVOICE?"bolt12 offer"===s.type&&s.offer_id?(this.paymentDecodedHint="ERROR: Select Offer option to pay the bolt12 offer invoice.",this.paymentReq.control.setErrors({decodeError:!0})):(this.paymentDecoded=s,this.setPaymentDecodedDetails()):this.paymentType===a.IX.OFFER&&("bolt11 invoice"===s.type&&s.payment_hash?(this.offerDecodedHint="ERROR: Select Invoice option to pay the bolt11 invoice.",this.offerReq.control.setErrors({decodeError:!0})):(this.offerDecoded=s,this.setOfferDecodedDetails()))})}resetOfferDetails(){this.offerInvoice=null,this.offerAmount=null,this.offerDecodedHint="",this.zeroAmtOffer=!1,this.paymentError="",this.offerReq&&this.offerReq.control.setErrors(null)}resetInvoiceDetails(){this.paymentAmount=null,this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentError="",this.paymentReq&&this.paymentReq.control.setErrors(null)}onAmountChange(t){this.paymentType===a.IX.INVOICE&&(delete this.paymentDecoded.msatoshi,this.paymentDecoded.msatoshi=+t.target.value),this.paymentType===a.IX.OFFER&&(delete this.offerDecoded.amount,delete this.offerDecoded.amount_msat,this.offerDecoded.amount=1e3*+t.target.value,this.offerDecoded.amount_msat=t.target.value+"msat")}onPaymentTypeChange(){this.paymentError="",this.paymentDecodedHint="",this.offerDecodedHint="",this.offerInvoice=null}setOfferDecodedDetails(){this.offerDecoded.offer_id&&!this.offerDecoded.amount_msat?(this.offerDecoded.amount_msat="0msat",this.offerDecoded.amount=0,this.zeroAmtOffer=!0,this.offerDescription=this.offerDecoded.description||"",this.offerVendor=this.offerDecoded.vendor?this.offerDecoded.vendor:this.offerDecoded.issuer?this.offerDecoded.issuer:"",this.offerDecodedHint="Zero Amount Offer | Description: "+this.offerDecoded.description):(this.zeroAmtOffer=!1,this.offerDecoded.amount=this.offerDecoded.amount?+this.offerDecoded.amount:this.offerDecoded.amount_msat?+this.offerDecoded.amount_msat.slice(0,-4):null,this.offerAmount=this.offerDecoded.amount?this.offerDecoded.amount/1e3:0,this.offerDescription=this.offerDecoded.description||"",this.offerVendor=this.offerDecoded.vendor?this.offerDecoded.vendor:this.offerDecoded.issuer?this.offerDecoded.issuer:"",this.selNode&&this.selNode.fiatConversion?this.commonService.convertCurrency(this.offerAmount,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,r.R)(this.unSubs[7])).subscribe({next:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,a.Xz.OTHER)+") | Description: "+this.offerDecoded.description},error:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description+". Unable to convert currency."}}):this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description)}setPaymentDecodedDetails(){this.paymentDecoded.created_at&&!this.paymentDecoded.msatoshi?(this.paymentDecoded.msatoshi=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.selNode&&this.selNode.fiatConversion?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,r.R)(this.unSubs[8])).subscribe({next:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,a.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description)}resetData(){switch(this.paymentType){case a.IX.KEYSEND:this.pubkey="",this.keysendAmount=null;break;case a.IX.INVOICE:this.paymentRequest="",this.paymentDecoded={},this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=a.Vc[0],this.resetInvoiceDetails();break;case a.IX.OFFER:this.offerRequest="",this.offerDecoded={},this.flgSaveToDB=!1,this.resetOfferDetails()}this.paymentError=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(E.mQ),A.Y36(C.v),A.Y36(ut.JJ),A.Y36(Tt.eX),A.Y36(Ut.D))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-lightning-send-payments"]],viewQuery:function(t,s){if(1&t&&(A.Gf(ne,5),A.Gf(wt,5),A.Gf(bt,5),A.Gf(Zt,5),A.Gf(jt,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.form=v.first),A.iGM(v=A.CRH())&&(s.paymentAmt=v.first),A.iGM(v=A.CRH())&&(s.offerAmt=v.first),A.iGM(v=A.CRH())&&(s.payReq=v.first),A.iGM(v=A.CRH())&&(s.offrReq=v.first)}},decls:25,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","12","fxFlex","10","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["class","my-1","color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",3,"ngModel","ngModelChange","change",4,"ngIf"],["fxLayoutAlign","space-between stretch","fxLayout","column",3,"submit","reset"],["sendPaymentForm","ngForm"],[4,"ngTemplateOutlet"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","9","type","reset",1,"mr-1"],["mat-button","","color","primary","type","submit","tabindex","8"],["invoiceBlock",""],["keysendBlock",""],["offerBlock",""],["color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",1,"my-1",3,"ngModel","ngModelChange","change"],["fxFlex","20","tabindex","1",3,"value"],["fxFlex","20","tabindex","2",3,"value"],["fxFlex","20","tabindex","3",3,"value",4,"ngIf"],["fxFlex","20","tabindex","3",3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"],["autoFocus","","matInput","","placeholder","Payment Request","rows","4","name","paymentRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],["fxFlex","100",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["autoFocus","","matInput","","placeholder","Pubkey","name","pubkey","tabindex","4","required","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Amount (Sats)","name","keysendAmount","tabindex","5","required","",3,"ngModel","ngModelChange"],["keysendAmt","ngModel"],["autoFocus","","matInput","","placeholder","Offer Request","rows","4","name","offerRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["offerReq","ngModel"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"mt-1"],["fxFlex","none","tabindex","6","color","primary",3,"ngModel","ngModelChange"],["matTooltip","Save offer in database for future payments","matTooltipPosition","below","fxFlex","none",1,"info-icon"],["fxFlex","100","class","mt-1",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amountoffer","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["offerAmt","ngModel"],["fxFlex","100",1,"mt-1"],["matInput","","placeholder","Title to Save","tabindex","7",3,"ngModel","ngModelChange"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Send Payment"),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6),A.YNc(9,qt,6,4,"mat-radio-group",7),A.TgZ(10,"form",8,9),A.NdJ("submit",function(){return s.onSendPayment()})("reset",function(){return s.resetData()}),A.YNc(12,he,1,0,"ng-container",10),A.YNc(13,ye,3,2,"div",11),A.TgZ(14,"div",12)(15,"button",13),A._uU(16,"Clear Fields"),A.qZA(),A.TgZ(17,"button",14),A._uU(18,"Send Payment"),A.qZA()()()()()(),A.YNc(19,Fn,7,5,"ng-template",null,15,A.W1O),A.YNc(21,Nn,7,4,"ng-template",null,16,A.W1O),A.YNc(23,li,13,7,"ng-template",null,17,A.W1O)),2&t){const v=A.MAs(20),Z=A.MAs(22),rt=A.MAs(24);A.xp6(6),A.Q6J("mat-dialog-close",!1),A.xp6(3),A.Q6J("ngIf",s.isCompatibleVersion),A.xp6(3),A.Q6J("ngTemplateOutlet",s.paymentType===s.paymentTypes.KEYSEND?Z:s.paymentType===s.paymentTypes.OFFER?rt:v),A.xp6(1),A.Q6J("ngIf",""!==s.paymentError)}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,Mt.ZT,g.dn,ut.O5,kt.VQ,OA.JJ,OA.On,kt.U0,OA._Y,OA.JL,OA.F,ut.tP,e.BN,P.KE,H.Nt,OA.Fj,k.h,OA.Q7,P.bx,P.TO,Wt.oG,m.Hw,nA.gM],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),i})();var Jn=Pt(4947);const IA=["sendPaymentForm"];function J(i,d){if(1&i&&(A.TgZ(0,"mat-hint"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentDecodedHint)}}function U(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Payment request is required."),A.qZA())}function X(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"textarea",7,8),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().onPaymentRequestEntry(v)})("matTextareaAutosize",function(){return!0}),A.qZA(),A.YNc(5,J,2,1,"mat-hint",9),A.YNc(6,U,2,0,"mat-error",9),A.qZA(),A.TgZ(7,"div",10)(8,"button",11),A.NdJ("click",function(){return A.CHM(t),A.oxw().resetData()}),A._uU(9,"Clear Field"),A.qZA(),A.TgZ(10,"button",12),A.NdJ("click",function(){return A.CHM(t),A.oxw().onSendPayment()}),A._uU(11,"Send Payment"),A.qZA()()()}if(2&i){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.paymentRequest),A.xp6(2),A.Q6J("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),A.xp6(1),A.Q6J("ngIf",!t.paymentRequest)}}function K(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",13)(1,"button",12),A.NdJ("click",function(){return A.CHM(t),A.oxw().openSendPaymentModal()}),A._uU(2,"Send Payment"),A.qZA()()}}function hA(i,d){1&i&&A._UZ(0,"mat-progress-bar",61)}function mA(i,d){1&i&&A._UZ(0,"th",62)}function $A(i,d){1&i&&A._UZ(0,"span",66)}function nt(i,d){1&i&&A._UZ(0,"span",67)}function ft(i,d){if(1&i&&(A.TgZ(0,"td",63),A.YNc(1,$A,1,0,"span",64),A.YNc(2,nt,1,0,"span",65),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Q6J("ngIf","complete"===t.status),A.xp6(1),A.Q6J("ngIf","complete"!==t.status)}}function dt(i,d){1&i&&(A.TgZ(0,"th",62),A._uU(1,"Created At"),A.qZA())}function Dt(i,d){if(1&i&&(A.TgZ(0,"td",63),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",A.xi3(2,1,1e3*(null==t?null:t.created_at),"dd/MMM/y HH:mm")," ")}}function Ft(i,d){1&i&&(A.TgZ(0,"th",62),A._uU(1," Type "),A.qZA())}function Nt(i,d){if(1&i&&(A.TgZ(0,"td",63),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11?"Bolt11":"Keysend")}}function Vt(i,d){1&i&&(A.TgZ(0,"th",62),A._uU(1,"Payment Hash"),A.qZA())}const Ht=function(i){return{"max-width":i}};function Ee(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",68)(2,"span",69),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.payment_hash)}}function Ce(i,d){1&i&&(A.TgZ(0,"th",62),A._uU(1,"Invoice"),A.qZA())}function Ie(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",68)(2,"span",69),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.Oqu(null==t?null:t.bolt11)}}function an(i,d){1&i&&(A.TgZ(0,"th",62),A._uU(1,"Label"),A.qZA())}function pe(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",68)(2,"span",69),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.label)}}function Ke(i,d){1&i&&(A.TgZ(0,"th",62),A._uU(1,"Destination"),A.qZA())}function Qn(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",68)(2,"span",69),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.destination)}}function Ve(i,d){1&i&&(A.TgZ(0,"th",62),A._uU(1,"Memo"),A.qZA())}function dn(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",68)(2,"span",69),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.memo)}}function qn(i,d){1&i&&(A.TgZ(0,"th",70),A._uU(1,"Sats Sent"),A.qZA())}function ni(i,d){if(1&i&&(A.TgZ(0,"td",71)(1,"span",72),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0"))}}function Un(i,d){1&i&&(A.TgZ(0,"th",70),A._uU(1,"Sats Received"),A.qZA())}function Hi(i,d){if(1&i&&(A.TgZ(0,"td",71)(1,"span",72),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Kn(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",73)(1,"div",74)(2,"mat-select",75),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",76),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function ci(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",77)(1,"button",78),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw(2).onPaymentClick(Z)}),A._uU(2,"View Info"),A.qZA()()}}function Ii(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No payment available."),A.qZA())}function ii(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting payments..."),A.qZA())}function wi(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function Ji(i,d){if(1&i&&(A.TgZ(0,"td",79),A.YNc(1,Ii,2,0,"p",9),A.YNc(2,ii,2,0,"p",9),A.YNc(3,wi,2,1,"p",9),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",!(null!=t.payments&&t.payments.data&&null!=t.payments&&null!=t.payments.data&&t.payments.data.length||(null==t.apiCallStatus?null:t.apiCallStatus.status)!==t.apiCallStatusEnum.COMPLETED)),A.xp6(1),A.Q6J("ngIf",!(null!=t.payments&&t.payments.data&&null!=t.payments&&null!=t.payments.data&&t.payments.data.length||(null==t.apiCallStatus?null:t.apiCallStatus.status)!==t.apiCallStatusEnum.INITIATED)),A.xp6(1),A.Q6J("ngIf",!(null!=t.payments&&t.payments.data&&null!=t.payments&&null!=t.payments.data&&t.payments.data.length||(null==t.apiCallStatus?null:t.apiCallStatus.status)!==t.apiCallStatusEnum.ERROR))}}function _n(i,d){1&i&&A._UZ(0,"span",66)}function Oi(i,d){1&i&&A._UZ(0,"span",82)}function vi(i,d){1&i&&A._UZ(0,"span",66)}function ki(i,d){1&i&&A._UZ(0,"span",82)}function ji(i,d){if(1&i&&(A.TgZ(0,"span",84),A.YNc(1,vi,1,0,"span",64),A.YNc(2,ki,1,0,"span",81),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Q6J("ngIf","complete"===t.status),A.xp6(1),A.Q6J("ngIf","complete"!==t.status)}}function hr(i,d){if(1&i&&(A.ynx(0),A.YNc(1,ji,3,2,"span",83),A.BQk()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Ki(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",80),A.YNc(2,_n,1,0,"span",64),A.YNc(3,Oi,1,0,"span",81),A.qZA(),A.YNc(4,hr,2,1,"ng-container",9),A.qZA()),2&i){const t=d.$implicit;A.xp6(2),A.Q6J("ngIf","complete"===t.status),A.xp6(1),A.Q6J("ngIf","complete"!==t.status),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function gi(i,d){if(1&i&&(A.TgZ(0,"span",84),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",A.xi3(2,1,1e3*t.created_at,"dd/MMM/y HH:mm")," ")}}function Vi(i,d){if(1&i&&(A.ynx(0),A.YNc(1,gi,3,4,"span",83),A.BQk()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function $n(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",80),A._uU(2),A.qZA(),A.YNc(3,Vi,2,1,"ng-container",9),A.qZA()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" Total Attempts: ",null==t?null:t.total_parts," "),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function Hr(i,d){1&i&&A._UZ(0,"span",80)}function Jr(i,d){if(1&i&&(A.TgZ(0,"span"),A.YNc(1,Hr,1,0,"span",85),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function so(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",80),A._uU(2),A.qZA(),A.YNc(3,Jr,2,1,"span",9),A.qZA()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11?"Bolt11":"Keysend"),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function lo(i,d){if(1&i&&(A.TgZ(0,"span",80),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" Part ID ",t.partid?t.partid:0," ")}}function co(i,d){if(1&i&&(A.TgZ(0,"span"),A.YNc(1,lo,2,1,"span",85),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function go(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",86)(2,"span",69),A._uU(3),A.qZA()(),A.YNc(4,co,2,1,"span",9),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(3,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.payment_hash),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function Bo(i,d){if(1&i&&(A.TgZ(0,"span",88),A._UZ(1,"span",69),A.qZA()),2&i){const t=A.oxw(4);A.Q6J("ngStyle",A.VKq(1,Ht,t.screenSize===t.screenSizeEnum.XS?"10rem":"30rem"))}}function uo(i,d){if(1&i&&(A.TgZ(0,"span"),A.YNc(1,Bo,2,3,"span",87),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function fo(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",86)(2,"span",69),A._uU(3),A.qZA()(),A.YNc(4,uo,2,1,"span",9),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(3,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.bolt11),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function ca(i,d){if(1&i&&(A.TgZ(0,"span",88),A._UZ(1,"span",69),A.qZA()),2&i){const t=A.oxw(4);A.Q6J("ngStyle",A.VKq(1,Ht,t.screenSize===t.screenSizeEnum.XS?"10rem":"30rem"))}}function ho(i,d){if(1&i&&(A.TgZ(0,"span"),A.YNc(1,ca,2,3,"span",87),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function ga(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",86)(2,"span",69),A._uU(3),A.qZA()(),A.YNc(4,ho,2,1,"span",9),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(3,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.label),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function Ba(i,d){if(1&i&&(A.TgZ(0,"span",88),A._UZ(1,"span",69),A.qZA()),2&i){const t=A.oxw(4);A.Q6J("ngStyle",A.VKq(1,Ht,t.screenSize===t.screenSizeEnum.XS?"10rem":"30rem"))}}function Eo(i,d){if(1&i&&(A.TgZ(0,"span"),A.YNc(1,Ba,2,3,"span",87),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function wo(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",86)(2,"span",69),A._uU(3),A.qZA()(),A.YNc(4,Eo,2,1,"span",9),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(3,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.destination),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function Co(i,d){if(1&i&&(A.TgZ(0,"span",88),A._UZ(1,"span",69),A.qZA()),2&i){const t=A.oxw(4);A.Q6J("ngStyle",A.VKq(1,Ht,t.screenSize===t.screenSizeEnum.XS?"10rem":"30rem"))}}function Qo(i,d){if(1&i&&(A.TgZ(0,"span"),A.YNc(1,Co,2,3,"span",87),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Mo(i,d){if(1&i&&(A.TgZ(0,"td",63)(1,"span",86)(2,"span",69),A._uU(3),A.qZA()(),A.YNc(4,Qo,2,1,"span",9),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(3,Ht,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.memo),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function po(i,d){if(1&i&&(A.TgZ(0,"span",89),A._uU(1),A.ALo(2,"number"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",A.xi3(2,1,t.msatoshi_sent/1e3,t.msatoshi_sent<1e3?"1.0-4":"1.0-0")," ")}}function mo(i,d){if(1&i&&(A.TgZ(0,"span"),A.YNc(1,po,3,4,"span",90),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Io(i,d){if(1&i&&(A.TgZ(0,"td",71)(1,"span",89),A._uU(2),A.ALo(3,"number"),A.qZA(),A.YNc(4,mo,2,1,"span",9),A.qZA()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,2,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0")),A.xp6(2),A.Q6J("ngIf",t.is_expanded)}}function vo(i,d){if(1&i&&(A.TgZ(0,"span",89),A._uU(1),A.ALo(2,"number"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",A.xi3(2,1,t.msatoshi/1e3,t.msatoshi<1e3?"1.0-4":"1.0-0")," ")}}function Do(i,d){if(1&i&&(A.TgZ(0,"span"),A.YNc(1,vo,3,4,"span",90),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function ua(i,d){if(1&i&&(A.TgZ(0,"td",71)(1,"span",89),A._uU(2),A.ALo(3,"number"),A.qZA(),A.YNc(4,Do,2,1,"span",9),A.qZA()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,2,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0")),A.xp6(2),A.Q6J("ngIf",t.is_expanded)}}function yo(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",72)(1,"button",94),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw(4).onPaymentClick(Z)}),A._uU(2),A.qZA()()}if(2&i){const t=d.$implicit;A.xp6(2),A.hij("View ",t.partid?t.partid:0,"")}}function xo(i,d){if(1&i&&(A.TgZ(0,"div"),A.YNc(1,yo,3,1,"div",93),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Fo(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",91)(1,"span",72)(2,"button",92),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return Z.is_expanded=!Z.is_expanded}),A._uU(3),A.qZA()(),A.YNc(4,xo,2,1,"div",9),A.qZA()}if(2&i){const t=d.$implicit;A.xp6(3),A.Oqu(t.is_expanded?"Hide":"Show"),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function Yo(i,d){1&i&&A._UZ(0,"tr",95)}const ri=function(i){return{"display-none":i}};function Ci(i,d){if(1&i&&A._UZ(0,"tr",96),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,ri,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function Er(i,d){1&i&&A._UZ(0,"tr",97)}function To(i,d){1&i&&A._UZ(0,"tr",95)}const So=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}},No=function(){return["no_payment"]};function Uo(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",14)(1,"div",15)(2,"div",16),A._UZ(3,"fa-icon",17),A.TgZ(4,"span",18),A._uU(5,"Payments History"),A.qZA()(),A.TgZ(6,"mat-form-field",19)(7,"input",20),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(v){return A.CHM(t),A.oxw().selFilter=v}),A.qZA()()(),A.TgZ(8,"div",21)(9,"div",22),A.YNc(10,hA,1,0,"mat-progress-bar",23),A.TgZ(11,"table",24,25),A.ynx(13,26),A.YNc(14,mA,1,0,"th",27),A.YNc(15,ft,3,2,"td",28),A.BQk(),A.ynx(16,29),A.YNc(17,dt,2,0,"th",27),A.YNc(18,Dt,3,4,"td",28),A.BQk(),A.ynx(19,30),A.YNc(20,Ft,2,0,"th",27),A.YNc(21,Nt,2,1,"td",28),A.BQk(),A.ynx(22,31),A.YNc(23,Vt,2,0,"th",27),A.YNc(24,Ee,4,4,"td",28),A.BQk(),A.ynx(25,32),A.YNc(26,Ce,2,0,"th",27),A.YNc(27,Ie,4,4,"td",28),A.BQk(),A.ynx(28,33),A.YNc(29,an,2,0,"th",27),A.YNc(30,pe,4,4,"td",28),A.BQk(),A.ynx(31,34),A.YNc(32,Ke,2,0,"th",27),A.YNc(33,Qn,4,4,"td",28),A.BQk(),A.ynx(34,35),A.YNc(35,Ve,2,0,"th",27),A.YNc(36,dn,4,4,"td",28),A.BQk(),A.ynx(37,36),A.YNc(38,qn,2,0,"th",37),A.YNc(39,ni,4,4,"td",38),A.BQk(),A.ynx(40,39),A.YNc(41,Un,2,0,"th",37),A.YNc(42,Hi,4,4,"td",38),A.BQk(),A.ynx(43,40),A.YNc(44,Kn,6,0,"th",41),A.YNc(45,ci,3,0,"td",42),A.BQk(),A.ynx(46,43),A.YNc(47,Ji,4,3,"td",44),A.BQk(),A.ynx(48,45),A.YNc(49,Ki,5,3,"td",28),A.BQk(),A.ynx(50,46),A.YNc(51,$n,4,2,"td",28),A.BQk(),A.ynx(52,47),A.YNc(53,so,4,2,"td",28),A.BQk(),A.ynx(54,48),A.YNc(55,go,5,5,"td",28),A.BQk(),A.ynx(56,49),A.YNc(57,fo,5,5,"td",28),A.BQk(),A.ynx(58,50),A.YNc(59,ga,5,5,"td",28),A.BQk(),A.ynx(60,51),A.YNc(61,wo,5,5,"td",28),A.BQk(),A.ynx(62,52),A.YNc(63,Mo,5,5,"td",28),A.BQk(),A.ynx(64,53),A.YNc(65,Io,5,5,"td",38),A.BQk(),A.ynx(66,54),A.YNc(67,ua,5,5,"td",38),A.BQk(),A.ynx(68,55),A.YNc(69,Fo,5,2,"td",56),A.BQk(),A.YNc(70,Yo,1,0,"tr",57),A.YNc(71,Ci,1,3,"tr",58),A.YNc(72,Er,1,0,"tr",59),A.YNc(73,To,1,0,"tr",57),A.qZA()()(),A._UZ(74,"mat-paginator",60),A.qZA()}if(2&i){const t=A.oxw();A.xp6(3),A.Q6J("icon",t.faHistory),A.xp6(4),A.Q6J("ngModel",t.selFilter),A.xp6(3),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.payments)("ngClass",A.VKq(14,So,""!==t.errorMessage)),A.xp6(59),A.Q6J("matRowDefColumns",t.mppColumns)("matRowDefWhen",t.is_group),A.xp6(1),A.Q6J("matFooterRowDef",A.DdM(16,No)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)("matRowDefWhen",!t.is_group),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let fa=(()=>{class i{constructor(t,s,v,Z,rt,vt,Ot,qe,Bn){this.logger=t,this.commonService=s,this.store=v,this.rtlEffects=Z,this.clnEffects=rt,this.decimalPipe=vt,this.titleCasePipe=Ot,this.datePipe=qe,this.dataService=Bn,this.calledFrom="transactions",this.PAGE_ID="transactions",this.tableSetting={tableId:"payments",recordsPerPage:a.IV,sortBy:"created_at",sortOrder:a.Pi.DESCENDING},this.faHistory=h.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.paymentJSONArr=[],this.displayedColumns=[],this.mppColumns=[],this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(B.lw).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("status"),this.displayedColumns.push("actions"),this.mppColumns=[],this.displayedColumns.map(Z=>this.mppColumns.push("group_"+Z)),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns),this.logger.info(this.mppColumns)}),this.store.select(B.PP).pipe((0,r.R)(this.unSubs[3])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.paymentJSONArr=t.payments||[],this.paymentJSONArr.length&&this.paymentJSONArr.length>0&&this.sort&&this.paginator&&this.loadPaymentsTable(this.paymentJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.paymentJSONArr.length&&this.paymentJSONArr.length>0&&this.sort&&this.paginator&&this.loadPaymentsTable(this.paymentJSONArr)}is_group(t,s){return s.is_group||!1}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.created_at?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,r.R)(this.unSubs[4])).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.created_at?(this.paymentDecoded.msatoshi||(this.paymentDecoded.msatoshi=0),this.sendPayment()):this.resetData()})}sendPayment(){var t;this.newlyAddedPayment=(null===(t=this.paymentDecoded)||void 0===t?void 0:t.payment_hash)||"",this.paymentDecoded.msatoshi&&0!==this.paymentDecoded.msatoshi?(this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:50,type:a.Gi.DATE_TIME},{key:"num_satoshis",value:this.paymentDecoded.msatoshi/1e3,title:"Amount (Sats)",width:50,type:a.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:a.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,St.q)(1)).subscribe(v=>{v&&(this.store.dispatch((0,Et.oV)({payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:40,type:a.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:a.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",getInputs:[{placeholder:"Amount (Sats)",inputType:a.Gi.NUMBER,inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,St.q)(1)).subscribe(Z=>{Z&&(this.paymentDecoded.msatoshi=Z[0].inputValue,this.store.dispatch((0,Et.oV)({payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*Z[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,r.R)(this.unSubs[5])).subscribe(s=>{var v;this.paymentDecoded=s,this.paymentDecoded.msatoshi?(null===(v=this.selNode)||void 0===v?void 0:v.fiatConversion)?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,r.R)(this.unSubs[6])).subscribe({next:Z=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+Z.symbol+this.decimalPipe.transform(Z.OTHER?Z.OTHER:0,a.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:Z=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description:this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description})}openSendPaymentModal(){this.store.dispatch((0,KA.qR)({payload:{data:{component:Yn}}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}onPaymentClick(t){const s=[[{key:"payment_preimage",value:t.payment_preimage,title:"Payment Preimage",width:100,type:a.Gi.STRING}],[{key:"id",value:t.id,title:"ID",width:20,type:a.Gi.STRING},{key:"destination",value:t.destination,title:"Destination",width:80,type:a.Gi.STRING}],[{key:"created_at",value:t.created_at,title:"Creation Date",width:50,type:a.Gi.DATE_TIME},{key:"status",value:this.titleCasePipe.transform(t.status),title:"Status",width:50,type:a.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"Amount (mSats)",width:50,type:a.Gi.NUMBER},{key:"msatoshi_sent",value:t.msatoshi_sent,title:"Amount Sent (mSats)",width:50,type:a.Gi.NUMBER}]];t.bolt11&&""!==t.bolt11&&(null==s||s.unshift([{key:"bolt11",value:t.bolt11,title:"Bolt 11",width:100,type:a.Gi.STRING}])),t.bolt12&&""!==t.bolt12&&(null==s||s.unshift([{key:"bolt12",value:t.bolt12,title:"Bolt 12",width:100,type:a.Gi.STRING}])),t.memo&&""!==t.memo&&(null==s||s.splice(2,0,[{key:"memo",value:t.memo,title:"Memo",width:100,type:a.Gi.STRING}])),t.hasOwnProperty("partid")?null==s||s.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:80,type:a.Gi.STRING},{key:"partid",value:t.partid,title:"Part ID",width:20,type:a.Gi.STRING}]):null==s||s.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:a.Gi.STRING}]),this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Payment Information",message:s}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}loadPaymentsTable(t){var s;this.payments=new xA.by(t?[...t]:[]),this.payments.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,this.payments.sort=this.sort,null===(s=this.payments.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.payments.filterPredicate=(v,Z)=>{var rt;return((v.created_at?null===(rt=this.datePipe.transform(new Date(1e3*v.created_at),"dd/MMM/YYYY HH:mm"))||void 0===rt?void 0:rt.toLowerCase():"")+(v.bolt12?"bolt12":v.bolt11?"bolt11":"keysend")+JSON.stringify(v).toLowerCase()).includes(Z)},this.payments.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const t=JSON.parse(JSON.stringify(this.payments.data)),s=null==t?void 0:t.reduce((v,Z)=>Z.mpps?v.concat(Z.mpps):(delete Z.is_group,delete Z.is_expanded,delete Z.total_parts,v.concat(Z)),[]);this.commonService.downloadFile(s,"Payments")}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(DA.V),A.Y36(Jn.J),A.Y36(ut.JJ),A.Y36(ut.rS),A.Y36(ut.uU),A.Y36(Ut.D))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-lightning-payments"]],viewQuery:function(t,s){if(1&t&&(A.Gf(IA,5),A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.form=v.first),A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},inputs:{calledFrom:"calledFrom"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","created_at"],["matColumnDef","type"],["matColumnDef","payment_hash"],["matColumnDef","bolt11"],["matColumnDef","label"],["matColumnDef","destination"],["matColumnDef","memo"],["matColumnDef","msatoshi_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","px-1",4,"matHeaderCellDef"],["mat-cell","","class","px-1",4,"matCellDef"],["matColumnDef","msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pr-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","group_status"],["matColumnDef","group_created_at"],["matColumnDef","group_type"],["matColumnDef","group_payment_hash"],["matColumnDef","group_bolt11"],["matColumnDef","group_label"],["matColumnDef","group_destination"],["matColumnDef","group_memo"],["matColumnDef","group_msatoshi_sent"],["matColumnDef","group_msatoshi"],["matColumnDef","group_actions"],["mat-cell","","class","pr-3",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Completed","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltip","Failed","matTooltipPosition","right",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green"],["matTooltip","Failed","matTooltipPosition","right",1,"dot","yellow"],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"px-1"],["mat-cell","",1,"px-1"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pr-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"mpp-row-span"],["class","dot yellow","matTooltip","Incomplete/Failed","matTooltipPosition","right",4,"ngIf"],["matTooltip","Incomplete/Failed","matTooltipPosition","right",1,"dot","yellow"],["fxLayoutAlign","start center","class","mpp-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"mpp-row-span","pl-3"],["fxLayoutAlign","start center","class","mpp-row-span",4,"ngFor","ngForOf"],["fxLayout","row",1,"ellipsis-parent","mpp-row-span",3,"ngStyle"],["fxLayoutAlign","start center","class","ellipsis-parent mpp-row-span",3,"ngStyle",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"ellipsis-parent","mpp-row-span",3,"ngStyle"],["fxLayoutAlign","end center",1,"mpp-row-span"],["fxLayoutAlign","end center","class","mpp-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"pr-3"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-mpp-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-mpp-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,X,12,3,"form",1),A.YNc(2,K,3,0,"div",2),A.YNc(3,Uo,75,17,"div",3),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf","home"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom))},directives:[Ct.xw,Ct.yH,Ct.Wh,ut.O5,OA._Y,OA.JL,OA.F,P.KE,H.Nt,OA.Fj,OA.Q7,_.$V,OA.JJ,OA.On,P.bx,P.TO,w.lW,e.BN,S.pW,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,nA.gM,ut.PC,T.Zl,QA.gD,QA.$L,CA.ey,xA.mD,xA.yh,ut.sg,xA.nj,xA.Gk,xA.Ke,xA.Q2,xA.as,xA.XQ,WA.NW],pipes:[ut.uU,ut.JJ],styles:[".mat-column-status[_ngcontent-%COMP%], .mat-column-group_status[_ngcontent-%COMP%]{width:2rem}.mat-column-payment_hash[_ngcontent-%COMP%], .mat-column-bolt11[_ngcontent-%COMP%], .mat-column-destination[_ngcontent-%COMP%], .mat-column-label[_ngcontent-%COMP%], .mat-column-memo[_ngcontent-%COMP%]{flex:0 0 10%;width:10%}.mat-column-payment_hash[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-bolt11[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-destination[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-label[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-memo[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%], .mat-column-group_actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-group_actions[_ngcontent-%COMP%] .btn-mpp-expand[_ngcontent-%COMP%]{min-width:10rem;width:10rem}.mat-column-group_actions[_ngcontent-%COMP%] .btn-mpp-info[_ngcontent-%COMP%]{margin-top:.5rem;min-width:9rem;width:9rem}.mpp-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mpp-row-span.ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mpp-row-span[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{margin-top:-.4rem;position:absolute}.mat-column-group_created_at[_ngcontent-%COMP%]{min-width:17rem}"]}),i})();function Po(i,d){if(1&i&&(A.TgZ(0,"button",26)(1,"mat-icon"),A._uU(2,"more_vert"),A.qZA()()),2&i){A.oxw();const t=A.MAs(11);A.Q6J("matMenuTriggerFor",t)}}function bo(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){const Z=A.CHM(t).index,rt=A.oxw().$implicit;return A.oxw(2).onNavigateTo(rt.links[Z])}),A._uU(1),A.qZA()}if(2&i){const t=d.$implicit;A.xp6(1),A.Oqu(t)}}function Lo(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){return A.CHM(t),A.oxw(3).onsortChannelsBy()}),A._uU(1),A.qZA()}if(2&i){const t=A.oxw(3);A.xp6(1),A.hij("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}function Ro(i,d){1&i&&A._UZ(0,"mat-progress-bar",28)}function zo(i,d){if(1&i&&A._UZ(0,"rtl-cln-node-info",29),2&i){const t=A.oxw(3);A.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Go(i,d){if(1&i&&A._UZ(0,"rtl-cln-balances-info",30),2&i){const t=A.oxw(3);A.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function Ho(i,d){if(1&i&&A._UZ(0,"rtl-cln-channel-capacity-info",31),2&i){const t=A.oxw(3);A.Q6J("sortBy",t.sortField)("channelBalances",t.channelBalances)("activeChannels",t.activeChannelsCapacity)("errorMessage",t.errorMessages[4]+" "+t.errorMessages[3])}}function Jo(i,d){if(1&i&&A._UZ(0,"rtl-cln-fee-info",32),2&i){const t=A.oxw(3);A.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[4]+" "+t.errorMessages[5])}}function Oo(i,d){if(1&i&&A._UZ(0,"rtl-cln-channel-status-info",33),2&i){const t=A.oxw(3);A.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function ko(i,d){1&i&&(A.TgZ(0,"h3"),A._uU(1,"Error! Unable to find information!"),A.qZA())}const ha=function(i){return{"dashboard-card-content":!0,"error-border":i}};function jo(i,d){if(1&i&&(A.TgZ(0,"mat-grid-tile",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-title",10)(4,"div"),A._UZ(5,"fa-icon",11),A.TgZ(6,"span"),A._uU(7),A.qZA()(),A.TgZ(8,"div"),A.YNc(9,Po,3,1,"button",12),A.TgZ(10,"mat-menu",13,14),A.YNc(12,bo,2,1,"button",15),A.YNc(13,Lo,2,1,"button",16),A.qZA()()()(),A.TgZ(14,"mat-card-content",17),A.YNc(15,Ro,1,0,"mat-progress-bar",18),A.TgZ(16,"div",19),A.YNc(17,zo,1,2,"rtl-cln-node-info",20),A.YNc(18,Go,1,2,"rtl-cln-balances-info",21),A.YNc(19,Ho,1,4,"rtl-cln-channel-capacity-info",22),A.YNc(20,Jo,1,2,"rtl-cln-fee-info",23),A.YNc(21,Oo,1,2,"rtl-cln-channel-status-info",24),A.YNc(22,ko,2,0,"h3",25),A.qZA()()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(5),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(2),A.Q6J("ngIf",t.links[0]),A.xp6(3),A.Q6J("ngForOf",t.goToOptions),A.xp6(1),A.Q6J("ngIf","capacity"===t.id),A.xp6(1),A.s9C("fxFlex","capacity"===t.id?90:70),A.Q6J("ngClass",A.VKq(16,ha,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"capacity"===t.id&&(s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.ERROR)||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR))),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"capacity"===t.id&&(s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.INITIATED)||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","balance"),A.xp6(1),A.Q6J("ngSwitchCase","capacity"),A.xp6(1),A.Q6J("ngSwitchCase","fee"),A.xp6(1),A.Q6J("ngSwitchCase","status")}}function Ko(i,d){if(1&i&&(A.TgZ(0,"div",2)(1,"div",3),A._UZ(2,"fa-icon",4),A.TgZ(3,"span",5),A._uU(4),A.qZA()(),A.TgZ(5,"mat-grid-list",6),A.YNc(6,jo,23,18,"mat-grid-tile",7),A.qZA()()),2&i){const t=A.oxw();A.xp6(2),A.Q6J("icon",t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.ERROR?t.faFrown:t.faSmile),A.xp6(2),A.Oqu(t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.COMPLETED?"Welcome "+t.information.alias+"! Your node is up and running.":t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),A.xp6(1),A.Q6J("rowHeight",t.operatorCardHeight),A.xp6(1),A.Q6J("ngForOf",t.operatorCards)}}function Vo(i,d){if(1&i&&(A.TgZ(0,"button",26)(1,"mat-icon"),A._uU(2,"more_vert"),A.qZA()()),2&i){A.oxw();const t=A.MAs(9);A.Q6J("matMenuTriggerFor",t)}}function Ea(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){const Z=A.CHM(t).index,rt=A.oxw(2).$implicit;return A.oxw(2).onNavigateTo(rt.links[Z])}),A._uU(1),A.qZA()}if(2&i){const t=d.$implicit;A.xp6(1),A.Oqu(t)}}function Wo(i,d){if(1&i&&(A.TgZ(0,"mat-card-header")(1,"mat-card-title",10)(2,"div"),A._UZ(3,"fa-icon",11),A.TgZ(4,"span"),A._uU(5),A.qZA()(),A.TgZ(6,"div"),A.YNc(7,Vo,3,1,"button",12),A.TgZ(8,"mat-menu",13,42),A.YNc(10,Ea,2,1,"button",15),A.qZA()()()()),2&i){const t=A.oxw().$implicit;A.xp6(3),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(2),A.Q6J("ngIf",t.links[0]),A.xp6(3),A.Q6J("ngForOf",t.goToOptions)}}function Zo(i,d){1&i&&A._UZ(0,"mat-progress-bar",28)}function Xo(i,d){if(1&i&&A._UZ(0,"rtl-cln-node-info",43),2&i){const t=A.oxw(3);A.Q6J("information",t.information)}}function qo(i,d){if(1&i&&A._UZ(0,"rtl-cln-balances-info",30),2&i){const t=A.oxw(3);A.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function _o(i,d){if(1&i&&A._UZ(0,"rtl-cln-channel-liquidity-info",44),2&i){const t=A.oxw(3);A.Q6J("direction","In")("totalLiquidity",t.totalInboundLiquidity)("activeChannels",t.allInboundChannels)("errorMessage",t.errorMessages[4])}}function $o(i,d){if(1&i&&A._UZ(0,"rtl-cln-channel-liquidity-info",44),2&i){const t=A.oxw(3);A.Q6J("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("activeChannels",t.allOutboundChannels)("errorMessage",t.errorMessages[4])}}function As(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){const Z=A.CHM(t).index,rt=A.oxw(3).$implicit;return A.oxw(2).onNavigateTo(rt.links[Z])}),A._uU(1),A.qZA()}if(2&i){const t=d.$implicit;A.xp6(1),A.Oqu(t)}}function ts(i,d){if(1&i&&(A.TgZ(0,"button",26)(1,"mat-icon"),A._uU(2,"more_vert"),A.qZA()(),A.TgZ(3,"mat-menu",13,53),A.YNc(5,As,2,1,"button",15),A.qZA()),2&i){const t=A.MAs(4),s=A.oxw(2).$implicit;A.Q6J("matMenuTriggerFor",t),A.xp6(5),A.Q6J("ngForOf",s.goToOptions)}}function es(i,d){1&i&&(A.TgZ(0,"span",45)(1,"mat-tab-group",46)(2,"mat-tab",47),A._UZ(3,"rtl-cln-lightning-invoices-table",48),A.qZA(),A.TgZ(4,"mat-tab",49),A._UZ(5,"rtl-cln-lightning-payments",50),A.qZA(),A.TgZ(6,"mat-tab",51),A.YNc(7,ts,6,2,"ng-template",52),A.qZA()()()),2&i&&(A.xp6(3),A.Q6J("calledFrom","home"),A.xp6(2),A.Q6J("calledFrom","home"),A.xp6(1),A.Q6J("disabled",!0))}function ns(i,d){1&i&&(A.TgZ(0,"h3"),A._uU(1,"Error! Unable to find information!"),A.qZA())}const is=function(i){return{"p-0":i}};function rs(i,d){if(1&i&&(A.TgZ(0,"mat-grid-tile",8)(1,"mat-card",36),A.YNc(2,Wo,11,4,"mat-card-header",37),A.TgZ(3,"mat-card-content",38),A.YNc(4,Zo,1,0,"mat-progress-bar",18),A.TgZ(5,"div",19),A.YNc(6,Xo,1,1,"rtl-cln-node-info",39),A.YNc(7,qo,1,2,"rtl-cln-balances-info",21),A.YNc(8,_o,1,4,"rtl-cln-channel-liquidity-info",40),A.YNc(9,$o,1,4,"rtl-cln-channel-liquidity-info",40),A.YNc(10,es,8,3,"span",41),A.YNc(11,ns,2,0,"h3",25),A.qZA()()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(1),A.Q6J("ngClass",A.VKq(13,is,"transactions"===t.id)),A.xp6(1),A.Q6J("ngIf","transactions"!==t.id),A.xp6(1),A.s9C("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),A.Q6J("ngClass",A.VKq(15,ha,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR)),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","balance"),A.xp6(1),A.Q6J("ngSwitchCase","inboundLiq"),A.xp6(1),A.Q6J("ngSwitchCase","outboundLiq"),A.xp6(1),A.Q6J("ngSwitchCase","transactions")}}function ce(i,d){if(1&i&&(A.TgZ(0,"div",34),A._UZ(1,"fa-icon",4),A.TgZ(2,"span",5),A._uU(3),A.qZA()(),A.TgZ(4,"mat-grid-list",35),A.YNc(5,rs,12,17,"mat-grid-tile",7),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faSmile),A.xp6(2),A.hij("Welcome ",t.information.alias,"! Your node is up and running."),A.xp6(1),A.Q6J("rowHeight",t.merchantCardHeight),A.xp6(1),A.Q6J("ngForOf",t.merchantCards)}}let as=(()=>{class i{constructor(t,s,v,Z){this.logger=t,this.store=s,this.commonService=v,this.router=Z,this.faSmile=l.ctA,this.faFrown=l.KfU,this.faAngleDoubleDown=h.Sbq,this.faAngleDoubleUp=h.Vfw,this.faChartPie=h.OS1,this.faBolt=h.BDt,this.faServer=h.xf3,this.faNetworkWired=h.kXW,this.userPersonaEnum=a.ol,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.totalBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.activeChannels=[],this.channelsStatus={active:{},pending:{},inactive:{}},this.activeChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="405px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.errorMessages=["","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusFees=null,this.apiCallStatusBalance=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFHistory=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.operatorCards=[{id:"node",goToOptions:[],links:[],icon:this.faServer,title:"Node Information",cols:10,rows:1},{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:10,rows:1},{id:"fee",goToOptions:["Routing","Fees Summary"],links:["routing","reports"],icon:this.faBolt,title:"Routing Fee",cols:10,rows:1},{id:"status",goToOptions:["Channels","Inactive Channels"],links:["connections","connections/channels/pending"],icon:this.faNetworkWired,title:"Channels",cols:10,rows:1},{id:"capacity",goToOptions:["Channels"],links:["connections"],icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:6,rows:4},{id:"transactions",goToOptions:["Transactions","Transactions Summary"],links:["transactions","reports/transactions"],title:"",cols:6,rows:4},{id:"inboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:6,rows:8},{id:"outboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:6,rows:8}]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.operatorCards=[{id:"node",goToOptions:[],links:[],icon:this.faServer,title:"Node Information",cols:5,rows:1},{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:5,rows:1},{id:"fee",goToOptions:["Routing","Fees Summary"],links:["routing","reports"],icon:this.faBolt,title:"Routing Fee",cols:5,rows:1},{id:"status",goToOptions:["Channels","Inactive Channels"],links:["connections","connections/channels/pending"],icon:this.faNetworkWired,title:"Channels",cols:5,rows:1},{id:"capacity",goToOptions:["Channels"],links:["connections"],icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:3,rows:4},{id:"transactions",goToOptions:["Transactions","Transactions Summary"],links:["transactions","reports/transactions"],title:"",cols:3,rows:4},{id:"inboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:3,rows:8},{id:"outboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:3,rows:8}]):(this.operatorCards=[{id:"node",goToOptions:[],links:[],icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:3,rows:1},{id:"capacity",goToOptions:["Channels"],links:["connections"],icon:this.faNetworkWired,title:"Channels Capacity",cols:4,rows:2},{id:"fee",goToOptions:["Routing","Fees Summary"],links:["routing","reports"],icon:this.faBolt,title:"Routing Fee",cols:3,rows:1},{id:"status",goToOptions:["Channels","Inactive Channels"],links:["connections","connections/channels/pending"],icon:this.faNetworkWired,title:"Channels",cols:3,rows:1}],this.merchantCards=[{id:"balance",goToOptions:["On-Chain"],links:["onchain"],icon:this.faChartPie,title:"Balances",cols:2,rows:5},{id:"inboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:2,rows:10},{id:"outboundLiq",goToOptions:["Channels"],links:["connections"],icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:2,rows:10},{id:"transactions",goToOptions:["Transactions","Transactions Summary"],links:["transactions","reports/transactions"],title:"",cols:2,rows:5}])}ngOnInit(){this.store.select(B.Hz).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.errorMessages[5]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusFHistory=t.apisCallStatus[1],this.apiCallStatusNodeInfo.status===a.Bn.ERROR&&(this.errorMessages[0]=this.apiCallStatusNodeInfo.message?"object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message:""),this.apiCallStatusFHistory.status===a.Bn.ERROR&&(this.errorMessages[5]=this.apiCallStatusFHistory.message?"object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message:""),this.selNode=t.nodeSettings,this.information=t.information}),this.store.select(B.JG).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===a.Bn.ERROR&&(this.errorMessages[1]=this.apiCallStatusFees.message?"object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message:""),this.fees=t.fees,this.logger.info(t)}),this.store.select(B.ZW).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{var s,v;this.errorMessages[4]="",this.apiCallStatusChannels=t.apiCallStatus,this.apiCallStatusChannels.status===a.Bn.ERROR&&(this.errorMessages[4]=this.apiCallStatusChannels.message?"object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message:""),this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.activeChannels=t.activeChannels,this.activeChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels,"balancedness")))||[],this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(null===(s=this.activeChannels)||void 0===s?void 0:s.filter(Z=>!!Z.msatoshi_to_them&&Z.msatoshi_to_them>0),"msatoshi_to_them")))||[],this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(null===(v=this.activeChannels)||void 0===v?void 0:v.filter(Z=>!!Z.msatoshi_to_us&&Z.msatoshi_to_us>0),"msatoshi_to_us")))||[],this.activeChannels.forEach(Z=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil((Z.msatoshi_to_them||0)/1e3),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor((Z.msatoshi_to_us||0)/1e3)}),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.logger.info(t)}),this.store.select(B.Rn).pipe((0,r.R)(this.unSubs[3]),(0,o.M)(this.store.select(B.Wj))).subscribe(([t,s])=>{this.errorMessages[2]="",this.apiCallStatusBalance=t.apiCallStatus,this.apiCallStatusBalance.status===a.Bn.ERROR&&(this.errorMessages[2]=this.apiCallStatusBalance.message?"object"==typeof this.apiCallStatusBalance.message?JSON.stringify(this.apiCallStatusBalance.message):this.apiCallStatusBalance.message:""),this.errorMessages[3]="",this.apiCallStatusLRBal=s.apiCallStatus,this.apiCallStatusLRBal.status===a.Bn.ERROR&&(this.errorMessages[3]=this.apiCallStatusLRBal.message?"object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message:""),this.totalBalance=t.balance,this.balances.onchain=t.balance.totalBalance||0,this.balances.lightning=s.localRemoteBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const v=s.localRemoteBalance.localBalance?+s.localRemoteBalance.localBalance:0,Z=s.localRemoteBalance.remoteBalance?+s.localRemoteBalance.remoteBalance:0;this.channelBalances={localBalance:v,remoteBalance:Z,balancedness:+(1-Math.abs((v-Z)/(v+Z))).toFixed(3)},this.channelsStatus.active.capacity=s.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=s.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=s.localRemoteBalance.inactiveBalance||0,this.logger.info(t),this.logger.info(s)})}onNavigateTo(t){this.router.navigateByUrl("/cln/"+t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.activeChannelsCapacity=this.activeChannels.sort((t,s)=>{const v=(t.msatoshi_to_us?+t.msatoshi_to_us:0)+(t.msatoshi_to_them?+t.msatoshi_to_them:0),Z=(s.msatoshi_to_them?+s.msatoshi_to_them:0)+(s.msatoshi_to_them?+s.msatoshi_to_them:0);return v>Z?-1:v{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-2"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10","gutterSize","20px",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",3,"colspan","rowspan",4,"ngFor","ngForOf"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click",4,"ngIf"],["fxLayout","column",3,"fxFlex","ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"balances","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"sortBy","channelBalances","activeChannels","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"balances","errorMessage"],["fxFlex","100",3,"sortBy","channelBalances","activeChannels","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container","mb-2"],["cols","6","gutterSize","20px",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start"],["fxLayout","column",1,"w-100","dashboard-tabs-group"],["label","Receive"],[1,"h-100",3,"calledFrom"],["label","Pay"],[3,"calledFrom"],[3,"disabled"],["mat-tab-label",""],["menuTransactions","matMenu"]],template:function(t,s){if(1&t&&(A.YNc(0,Ko,7,4,"div",0),A.YNc(1,ce,6,4,"ng-template",null,1,A.W1O)),2&t){const v=A.MAs(2);A.Q6J("ngIf",(null==s.selNode?null:s.selNode.userPersona)===s.userPersonaEnum.OPERATOR)("ngIfElse",v)}},directives:[ut.O5,Ct.xw,Ct.Wh,e.BN,f.Il,ut.sg,f.DX,Ct.yH,g.a8,g.dk,g.n5,w.lW,Q.p6,m.Hw,Q.VK,Q.OP,g.dn,ut.mk,T.oO,S.pW,ut.RF,ut.n9,b,R,$,SA,q,ut.ED,mt,ht.SP,ht.uX,Qt,fa,ht.uD],styles:[""]}),i})();var Wi=Pt(9841),wr=Pt(8012),Di=Pt(8377),On=Pt(7261),Ai=Pt(1125),yi=Pt(5615);const os=["form"],ss=["formSweepAll"],Li=["stepper"];function Ri(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Bitcoin address is required."),A.qZA())}function Or(i,d){1&i&&(A.TgZ(0,"mat-hint"),A._uU(1,"Amount replaced by UTXO balance"),A.qZA())}function kr(i,d){if(1&i&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.amountError)}}function jr(i,d){if(1&i&&(A.TgZ(0,"mat-option",38),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(t)}}function ls(i,d){if(1&i&&(A.TgZ(0,"mat-option",38),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function wa(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function cs(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-form-field",39)(1,"input",40,41),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw(2).customFeeRate=v}),A.qZA(),A.YNc(3,wa,2,0,"mat-error",14),A.qZA()}if(2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),A.xp6(2),A.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function gs(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function Bs(i,d){if(1&i&&(A.TgZ(0,"mat-option",38),A._uU(1),A.ALo(2,"number"),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t),A.xp6(1),A.hij("",A.lcZ(2,2,t.value)," Sats")}}function us(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",23)(1,"mat-expansion-panel",42),A.NdJ("closed",function(){return A.CHM(t),A.oxw(2).onAdvancedPanelToggle(!0)})("opened",function(){return A.CHM(t),A.oxw(2).onAdvancedPanelToggle(!1)}),A.TgZ(2,"mat-expansion-panel-header")(3,"mat-panel-title")(4,"span"),A._uU(5),A.qZA()()(),A.TgZ(6,"div",22)(7,"div",43)(8,"mat-form-field",44)(9,"mat-select",45),A.NdJ("selectionChange",function(v){return A.CHM(t),A.oxw(2).onUTXOSelectionChange(v)})("valueChange",function(v){return A.CHM(t),A.oxw(2).selUTXOs=v}),A.TgZ(10,"mat-select-trigger"),A._uU(11),A.ALo(12,"number"),A.qZA(),A.YNc(13,Bs,3,4,"mat-option",21),A.qZA()(),A.TgZ(14,"div",46)(15,"mat-slide-toggle",47),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw(2).flgUseAllBalance=v})("change",function(){return A.CHM(t),A.oxw(2).onUTXOAllBalanceChange()}),A._uU(16," Use selected UTXOs balance "),A.qZA(),A.TgZ(17,"mat-icon",48),A._uU(18,"info_outline"),A.qZA()()()()()()}if(2&i){const t=A.oxw(2);A.xp6(5),A.Oqu(t.advancedTitle),A.xp6(4),A.Q6J("value",t.selUTXOs),A.xp6(2),A.AsE("",A.lcZ(12,7,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),A.xp6(2),A.Q6J("ngForOf",t.utxos),A.xp6(2),A.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function fs(i,d){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Oqu(t.sendFundError)}}function Ca(i,d){if(1&i&&(A.TgZ(0,"div",49),A._UZ(1,"fa-icon",50),A.YNc(2,fs,2,1,"span",14),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.sendFundError)}}const Qa=function(i,d){return{"mr-6":i,"mr-2":d}};function hs(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"form",9,10),A.NdJ("submit",function(){return A.CHM(t),A.oxw().onSendFunds()})("reset",function(){return A.CHM(t),A.oxw().resetData()}),A.TgZ(2,"mat-form-field",11)(3,"input",12,13),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().transaction.address=v}),A.qZA(),A.YNc(5,Ri,2,0,"mat-error",14),A.qZA(),A.TgZ(6,"mat-form-field",15)(7,"input",16,17),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().transaction.satoshis=v}),A.qZA(),A.YNc(9,Or,2,0,"mat-hint",14),A.TgZ(10,"span",18),A._uU(11),A.qZA(),A.YNc(12,kr,2,1,"mat-error",14),A.qZA(),A.TgZ(13,"mat-form-field",19)(14,"mat-select",20),A.NdJ("selectionChange",function(v){return A.CHM(t),A.oxw().onAmountUnitChange(v)}),A.YNc(15,jr,2,2,"mat-option",21),A.qZA()(),A.TgZ(16,"div",22)(17,"div",23)(18,"div",24)(19,"mat-form-field",25)(20,"mat-select",26),A.NdJ("valueChange",function(v){return A.CHM(t),A.oxw().selFeeRate=v})("selectionChange",function(){return A.CHM(t),A.oxw().customFeeRate=null}),A.YNc(21,ls,2,2,"mat-option",21),A.qZA()(),A.YNc(22,cs,4,5,"mat-form-field",27),A.qZA(),A.TgZ(23,"div",28)(24,"mat-checkbox",29),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().flgMinConf=v})("change",function(){A.CHM(t);const v=A.oxw();return v.flgMinConf?v.selFeeRate=null:v.minConfValue=null}),A.qZA(),A.TgZ(25,"mat-form-field",30)(26,"input",31,32),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().minConfValue=v}),A.qZA(),A.YNc(28,gs,2,0,"mat-error",14),A.qZA()()(),A.YNc(29,us,19,9,"div",33),A._UZ(30,"div",22),A.YNc(31,Ca,3,2,"div",34),A.TgZ(32,"div",35)(33,"button",36),A._uU(34,"Clear Fields"),A.qZA(),A.TgZ(35,"button",37),A._uU(36,"Send Funds"),A.qZA()()()()}if(2&i){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.transaction.address),A.xp6(2),A.Q6J("ngIf",!t.transaction.address),A.xp6(2),A.Q6J("ngModel",t.transaction.satoshis)("type",t.flgUseAllBalance?"text":"number")("step",100)("min",0)("disabled",t.flgUseAllBalance),A.xp6(2),A.Q6J("ngIf",t.flgUseAllBalance),A.xp6(2),A.hij(" ",t.selAmountUnit," "),A.xp6(1),A.Q6J("ngIf",!t.transaction.satoshis),A.xp6(2),A.Q6J("value",t.selAmountUnit)("disabled",t.flgUseAllBalance),A.xp6(1),A.Q6J("ngForOf",t.amountUnits),A.xp6(4),A.Q6J("fxFlex","customperkb"!==t.selFeeRate||t.flgMinConf?"100":"48"),A.xp6(1),A.Q6J("value",t.selFeeRate)("disabled",t.flgMinConf),A.xp6(1),A.Q6J("ngForOf",t.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf),A.xp6(2),A.Q6J("ngModel",t.flgMinConf)("ngClass",A.WLB(28,Qa,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),A.xp6(2),A.Q6J("ngModel",t.minConfValue)("step",1)("min",0)("required",t.flgMinConf)("disabled",!t.flgMinConf),A.xp6(2),A.Q6J("ngIf",t.flgMinConf&&!t.minConfValue),A.xp6(1),A.Q6J("ngIf",t.isCompatibleVersion),A.xp6(2),A.Q6J("ngIf",""!==t.sendFundError)}}function xi(i,d){if(1&i&&A._uU(0),2&i){const t=A.oxw(3);A.Oqu(t.passwordFormLabel)}}function Rt(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Password is required."),A.qZA())}function Cr(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-step",55)(1,"form",73),A.YNc(2,xi,1,1,"ng-template",67),A.TgZ(3,"div",0)(4,"mat-form-field",1),A._UZ(5,"input",74),A.YNc(6,Rt,2,0,"mat-error",14),A.qZA()(),A.TgZ(7,"div",75)(8,"button",76),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onAuthenticate()}),A._uU(9,"Confirm"),A.qZA()()()()}if(2&i){const t=A.oxw(2);A.Q6J("stepControl",t.passwordFormGroup)("editable",t.flgEditable),A.xp6(1),A.Q6J("formGroup",t.passwordFormGroup),A.xp6(5),A.Q6J("ngIf",null==t.passwordFormGroup.controls.password.errors?null:t.passwordFormGroup.controls.password.errors.required)}}function Qr(i,d){if(1&i&&A._uU(0),2&i){const t=A.oxw(2);A.Oqu(t.sendFundFormLabel)}}function Fi(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Bitcoin address is required."),A.qZA())}function da(i,d){if(1&i&&(A.TgZ(0,"mat-option",38),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function dr(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function Es(i,d){if(1&i&&(A.TgZ(0,"mat-form-field",39),A._UZ(1,"input",77),A.YNc(2,dr,2,0,"mat-error",14),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("step",.1)("min",0),A.xp6(1),A.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.customFeeRate.value)}}function Ma(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function ws(i,d){if(1&i&&A._uU(0),2&i){const t=A.oxw(2);A.Oqu(t.confirmFormLabel)}}function Zi(i,d){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Oqu(t.sendFundError)}}function Mr(i,d){if(1&i&&(A.TgZ(0,"div",49),A._UZ(1,"fa-icon",50),A.YNc(2,Zi,2,1,"span",14),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.sendFundError)}}function Cs(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",51)(1,"mat-vertical-stepper",52,53),A.NdJ("selectionChange",function(v){return A.CHM(t),A.oxw().stepSelectionChanged(v)}),A.YNc(3,Cr,10,4,"mat-step",54),A.TgZ(4,"mat-step",55)(5,"form",56),A.YNc(6,Qr,1,1,"ng-template",57),A.TgZ(7,"div",22)(8,"mat-form-field",1),A._UZ(9,"input",58),A.YNc(10,Fi,2,0,"mat-error",14),A.qZA(),A.TgZ(11,"div",59)(12,"div",24)(13,"mat-form-field",25)(14,"mat-select",60),A.YNc(15,da,2,2,"mat-option",21),A.qZA()(),A.YNc(16,Es,3,3,"mat-form-field",27),A.qZA(),A.TgZ(17,"div",28),A._UZ(18,"mat-checkbox",61),A.TgZ(19,"mat-form-field",30),A._UZ(20,"input",62),A.YNc(21,Ma,2,0,"mat-error",14),A.qZA()()()(),A.TgZ(22,"div",63)(23,"button",64),A._uU(24,"Next"),A.qZA()()()(),A.TgZ(25,"mat-step",65)(26,"form",66),A.YNc(27,ws,1,1,"ng-template",67),A.TgZ(28,"div",51)(29,"div",68),A._UZ(30,"fa-icon",69),A.TgZ(31,"span"),A._uU(32,"You are about to sweep all funds from RTL. Are you sure?"),A.qZA()(),A.YNc(33,Mr,3,2,"div",34),A.TgZ(34,"div",63)(35,"button",70),A.NdJ("click",function(){return A.CHM(t),A.oxw().onSendFunds()}),A._uU(36,"Sweep All Funds"),A.qZA()()()()()(),A.TgZ(37,"div",71)(38,"button",72),A._uU(39),A.qZA()()()}if(2&i){const t=A.oxw();A.xp6(1),A.Q6J("linear",!0),A.xp6(2),A.Q6J("ngIf",!t.appConfig.sso.rtlSSO),A.xp6(1),A.Q6J("stepControl",t.sendFundFormGroup)("editable",t.flgEditable),A.xp6(1),A.Q6J("formGroup",t.sendFundFormGroup),A.xp6(5),A.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionAddress.errors?null:t.sendFundFormGroup.controls.transactionAddress.errors.required),A.xp6(3),A.Q6J("fxFlex","customperkb"!==t.sendFundFormGroup.controls.selFeeRate.value||t.sendFundFormGroup.controls.flgMinConf.value?"100":"48"),A.xp6(2),A.Q6J("ngForOf",t.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value),A.xp6(2),A.Q6J("ngClass",A.WLB(20,Qa,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),A.xp6(2),A.Q6J("step",1)("min",0)("required",t.sendFundFormGroup.controls.flgMinConf.value),A.xp6(1),A.Q6J("ngIf",t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.minConfValue.value),A.xp6(4),A.Q6J("stepControl",t.confirmFormGroup),A.xp6(1),A.Q6J("formGroup",t.confirmFormGroup),A.xp6(4),A.Q6J("icon",t.faExclamationTriangle),A.xp6(3),A.Q6J("ngIf",""!==t.sendFundError),A.xp6(5),A.Q6J("mat-dialog-close",!1),A.xp6(1),A.Oqu(t.flgValidated?"Close":"Cancel")}}let Kr=(()=>{class i{constructor(t,s,v,Z,rt,vt,Ot,qe,Bn,se){this.dialogRef=t,this.data=s,this.logger=v,this.store=Z,this.commonService=rt,this.decimalPipe=vt,this.actions=Ot,this.formBuilder=qe,this.rtlEffects=Bn,this.snackBar=se,this.faExclamationTriangle=h.eHv,this.sweepAll=!1,this.selNode={},this.addressTypes=[],this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=null,this.selectedAddress=a._t[1],this.blockchainBalance={},this.information={},this.isCompatibleVersion=!1,this.newAddress="",this.transaction={},this.feeRateTypes=a.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.sendFundError="",this.fiatConversion=!1,this.amountUnits=a.uA,this.selAmountUnit=a.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=a.Xz,this.advancedTitle="Advanced Options",this.flgValidated=!1,this.flgEditable=!0,this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds",this.confirmFormLabel="Confirm sweep",this.amountError="Amount is Required.",this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.sweepAll=this.data.sweepAll,this.passwordFormGroup=this.formBuilder.group({hiddenPassword:["",[OA.kI.required]],password:["",[OA.kI.required]]}),this.sendFundFormGroup=this.formBuilder.group({transactionAddress:["",OA.kI.required],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}]}),this.confirmFormGroup=this.formBuilder.group({}),this.sendFundFormGroup.controls.flgMinConf.valueChanges.pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{t?(this.sendFundFormGroup.controls.selFeeRate.disable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.reset(),this.sendFundFormGroup.controls.minConfValue.enable(),this.sendFundFormGroup.controls.minConfValue.setValidators([OA.kI.required]),this.sendFundFormGroup.controls.minConfValue.setValue(null)):(this.sendFundFormGroup.controls.selFeeRate.enable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.setValue(null),this.sendFundFormGroup.controls.minConfValue.disable(),this.sendFundFormGroup.controls.minConfValue.setValidators(null),this.sendFundFormGroup.controls.minConfValue.setErrors(null))}),this.sendFundFormGroup.controls.selFeeRate.valueChanges.pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.sendFundFormGroup.controls.customFeeRate.setValue(null),this.sendFundFormGroup.controls.customFeeRate.reset(),this.sendFundFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.sendFundFormGroup.controls.flgMinConf.value?null:[OA.kI.required])}),(0,Wi.a)([this.store.select(Di.dT),this.store.select(Di.Yj)]).pipe((0,r.R)(this.unSubs[1])).subscribe(([t,s])=>{this.fiatConversion=t.settings.fiatConversion,this.amountUnits=t.settings.currencyUnits,this.appConfig=s}),this.store.select(B.ey).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{this.information=t,this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")}),this.store.select(B.T4).pipe((0,r.R)(this.unSubs[3])).subscribe(t=>{var s;this.utxos=this.commonService.sortAscByKey(null===(s=t.utxos)||void 0===s?void 0:s.filter(v=>"confirmed"===v.status),"value"),this.logger.info(t)}),this.actions.pipe((0,r.R)(this.unSubs[4]),(0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN||t.type===a.AB.SET_CHANNEL_TRANSACTION_RES_CLN)).subscribe(t=>{t.type===a.AB.SET_CHANNEL_TRANSACTION_RES_CLN&&(this.store.dispatch((0,KA.jW)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&"SetChannelTransaction"===t.payload.action&&(this.sendFundError=t.payload.message)})}onAuthenticate(){if(!this.passwordFormGroup.controls.password.value)return!0;this.flgValidated=!1,this.store.dispatch((0,KA.QO)({payload:wr(this.passwordFormGroup.controls.password.value).toString()})),this.rtlEffects.isAuthorizedRes.pipe((0,St.q)(1)).subscribe(t=>{"ERROR"!==t?(this.passwordFormGroup.controls.hiddenPassword.setValue(this.passwordFormGroup.controls.password.value),this.stepper.next()):(this.dialogRef.close(),this.snackBar.open("Unauthorized User. Logging out from RTL."))})}onSendFunds(){if(this.sendFundError="",this.flgUseAllBalance&&(this.transaction.satoshis="all"),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.transaction.utxos=[],this.selUTXOs.forEach(t=>{var s;return null===(s=this.transaction.utxos)||void 0===s?void 0:s.push(t.txid+":"+t.output)})),this.sweepAll){if(!this.sendFundFormGroup.controls.transactionAddress.value||""===this.sendFundFormGroup.controls.transactionAddress.value||this.sendFundFormGroup.controls.flgMinConf.value&&(!this.sendFundFormGroup.controls.minConfValue.value||this.sendFundFormGroup.controls.minConfValue.value<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis="all",this.transaction.address=this.sendFundFormGroup.controls.transactionAddress.value,this.sendFundFormGroup.controls.flgMinConf.value?(delete this.transaction.feeRate,this.transaction.minconf=this.sendFundFormGroup.controls.flgMinConf.value?this.sendFundFormGroup.controls.minConfValue.value:null):(delete this.transaction.minconf,this.transaction.feeRate="customperkb"===this.sendFundFormGroup.controls.selFeeRate.value&&!this.sendFundFormGroup.controls.flgMinConf.value&&this.sendFundFormGroup.controls.customFeeRate.value?1e3*this.sendFundFormGroup.controls.customFeeRate.value+"perkb":this.sendFundFormGroup.controls.selFeeRate.value),delete this.transaction.utxos,this.store.dispatch((0,Et.Wi)({payload:this.transaction}))}else{if(this.transaction.minconf=this.flgMinConf?this.minConfValue:null,this.transaction.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,!this.transaction.address||""===this.transaction.address||!this.transaction.satoshis||+this.transaction.satoshis<=0||this.flgMinConf&&(!this.transaction.minconf||this.transaction.minconf<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis&&"all"!==this.transaction.satoshis&&this.selAmountUnit!==a.NT.SATS?this.commonService.convertCurrency(+this.transaction.satoshis,this.selAmountUnit===this.amountUnits[2]?a.NT.OTHER:this.selAmountUnit,a.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,r.R)(this.unSubs[5])).subscribe({next:t=>{this.transaction.satoshis=t[a.NT.SATS],this.selAmountUnit=a.NT.SATS,this.store.dispatch((0,Et.Wi)({payload:this.transaction}))},error:t=>{this.transaction.satoshis=null,this.selAmountUnit=a.NT.SATS,this.amountError="Conversion Error: "+t}}):this.store.dispatch((0,Et.Wi)({payload:this.transaction}))}}resetData(){this.sendFundError="",this.transaction={},this.flgMinConf=!1,this.totalSelectedUTXOAmount=null,this.selUTXOs=[],this.flgUseAllBalance=!1,this.selAmountUnit=a.uA[0]}stepSelectionChanged(t){var s;switch(this.sendFundError="",t.selectedIndex){case 0:default:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds";break;case 1:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds";break;case 2:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds | Address: "+this.sendFundFormGroup.controls.transactionAddress.value+(this.sendFundFormGroup.controls.flgMinConf.value?" | Min Confirmation Blocks: "+this.sendFundFormGroup.controls.minConfValue.value:this.sendFundFormGroup.controls.selFeeRate.value?" | Fee Rate: "+(null===(s=this.feeRateTypes.find(v=>v.feeRateId===this.sendFundFormGroup.controls.selFeeRate.value))||void 0===s?void 0:s.feeRateType):"")}t.selectedIndex0?(this.totalSelectedUTXOAmount=null===(s=this.selUTXOs)||void 0===s?void 0:s.reduce((v,Z)=>v+(Z.value||0),0),this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=null,this.transaction.satoshis=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.flgUseAllBalance?(this.transaction.satoshis=this.totalSelectedUTXOAmount,this.selAmountUnit=a.uA[0]):this.transaction.satoshis=null}onAmountUnitChange(t){const s=this,v=this.selAmountUnit===this.amountUnits[2]?a.NT.OTHER:this.selAmountUnit;let Z=t.value===this.amountUnits[2]?a.NT.OTHER:t.value;this.transaction.satoshis&&this.selAmountUnit!==t.value&&this.commonService.convertCurrency(+this.transaction.satoshis,v,Z,this.amountUnits[2],this.fiatConversion).pipe((0,r.R)(this.unSubs[6])).subscribe({next:rt=>{var vt;this.selAmountUnit=t.value,s.transaction.satoshis=null===(vt=s.decimalPipe.transform(rt[Z],s.currencyUnitFormats[Z]))||void 0===vt?void 0:vt.replace(/,/g,"")},error:rt=>{s.transaction.satoshis=null,this.amountError="Conversion Error: "+rt,this.selAmountUnit=v,Z=v}})}onAdvancedPanelToggle(t){this.advancedTitle=t&&this.selUTXOs.length&&this.selUTXOs.length>0?"Advanced Options | Selected UTXOs: "+this.selUTXOs.length+" | Selected UTXO Amount: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats":"Advanced Options"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(ut.JJ),A.Y36(Tt.eX),A.Y36(OA.qu),A.Y36(DA.V),A.Y36(On.ux))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-on-chain-send-modal"]],viewQuery:function(t,s){if(1&t&&(A.Gf(os,7),A.Gf(ss,5),A.Gf(Li,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.form=v.first),A.iGM(v=A.CRH())&&(s.formSweepAll=v.first),A.iGM(v=A.CRH())&&(s.stepper=v.first)}},decls:12,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100","class","overflow-x-hidden",3,"submit","reset",4,"ngIf","ngIfElse"],["sweepAllBlock",""],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","address","required","",3,"ngModel","ngModelChange"],["address","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amount","tabindex","2","required","",3,"ngModel","type","step","min","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","disabled","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","48","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["mat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxLayout","column","fxFlex","100","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","35","fxLayoutAlign","start end"],["tabindex","8","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","60","fxLayout","row","fxLayoutAlign","start center"],["tabindex","9","color","primary","name","flgUseAllBalance",3,"ngModel","disabled","ngModelChange","change"],["matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",1,"info-icon"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable",4,"ngIf"],[3,"stepControl","editable"],["fxLayout","column",1,"my-1","pr-1",3,"formGroup"],["matStepLabel","","disabled","true"],["matInput","","formControlName","transactionAddress","placeholder","Bitcoin Address","tabindex","4","name","address","required",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","8","type","default","matStepperNext",""],[3,"stepControl"],["fxLayout","column","fxLayoutAlign","start",1,"my-1","pr-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100",1,"w-100","alert","alert-warn"],[1,"mt-1","mr-1","alert-icon",3,"icon"],["mat-button","","color","primary","tabindex","9","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","space-between",1,"my-1","pr-1",3,"formGroup"],["autoFocus","","matInput","","placeholder","Password","type","password","tabindex","1","formControlName","password","required",""],["fxLayout","row",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","default",3,"click"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6),A.YNc(9,hs,37,31,"form",7),A.qZA()()(),A.YNc(10,Cs,40,23,"ng-template",null,8,A.W1O)),2&t){const v=A.MAs(11);A.xp6(5),A.Oqu(s.sweepAll?"Sweep All Funds":"Send Funds"),A.xp6(1),A.Q6J("mat-dialog-close",!1),A.xp6(3),A.Q6J("ngIf",!s.sweepAll)("ngIfElse",v)}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,Mt.ZT,g.dn,ut.O5,OA._Y,OA.JL,OA.F,P.KE,H.Nt,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,P.TO,z.q,P.bx,P.R9,QA.gD,ut.sg,CA.ey,OA.wV,OA.qQ,Wt.oG,ut.mk,T.oO,Ai.ib,Ai.yz,Ai.yK,QA.$L,PA.Rr,m.Hw,nA.gM,e.BN,yi.Vq,yi.C0,OA.sg,yi.VY,OA.u,yi.Ic],pipes:[ut.JJ],styles:[""]}),i})();var pr=Pt(1203),mr=Pt(7544);function Qs(i,d){1&i&&A._UZ(0,"mat-progress-bar",33)}function ds(i,d){1&i&&(A.TgZ(0,"th",34),A._uU(1,"\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0"),A.qZA())}function Xi(i,d){1&i&&(A.TgZ(0,"span",41)(1,"mat-icon",42),A._uU(2,"warning"),A.qZA()())}function Ms(i,d){if(1&i&&(A.TgZ(0,"span"),A.YNc(1,Xi,3,0,"span",40),A.qZA()),2&i){const t=A.oxw().$implicit;A.oxw();const s=A.MAs(44);A.xp6(1),A.Q6J("ngIf",t.value<1e3)("ngIfElse",s)}}function ps(i,d){1&i&&A._UZ(0,"span",43)}function ms(i,d){if(1&i&&(A._UZ(0,"span",44),A.ALo(1,"titlecase")),2&i){const t=A.oxw().$implicit;A.s9C("matTooltip",A.lcZ(1,1,t.status))}}function pa(i,d){if(1&i&&(A.TgZ(0,"td",35)(1,"span",36),A.YNc(2,Ms,2,2,"span",37),A.YNc(3,ps,1,0,"span",38),A.YNc(4,ms,2,3,"span",39),A.qZA()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(2),A.Q6J("ngIf",s.numDustUTXOs>0&&!s.isDustUTXO),A.xp6(1),A.Q6J("ngIf","confirmed"===t.status),A.xp6(1),A.Q6J("ngIf","confirmed"!==t.status)}}function Is(i,d){1&i&&(A.TgZ(0,"th",34),A._uU(1," Transaction ID "),A.qZA())}const Vr=function(i){return{"max-width":i}};function vs(i,d){if(1&i&&(A.TgZ(0,"td",35)(1,"span",45)(2,"span",46),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Vr,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(t.txid)}}function Ds(i,d){1&i&&(A.TgZ(0,"th",34),A._uU(1," Address "),A.qZA())}function ys(i,d){if(1&i&&(A.TgZ(0,"td",35)(1,"span",45)(2,"span",46),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Vr,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(t.address)}}function ma(i,d){1&i&&(A.TgZ(0,"th",34),A._uU(1," Script Pubkey "),A.qZA())}function xs(i,d){if(1&i&&(A.TgZ(0,"td",35)(1,"span",45)(2,"span",46),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Vr,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(t.scriptpubkey)}}function Fs(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1," Output "),A.qZA())}function Ys(i,d){if(1&i&&(A.TgZ(0,"td",35)(1,"span",48),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.output)," ")}}function Ts(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1," Value (Sats) "),A.qZA())}function Ss(i,d){if(1&i&&(A.TgZ(0,"span",48),A._uU(1),A.ALo(2,"number"),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.Oqu(A.lcZ(2,1,t.value))}}function Pn(i,d){if(1&i&&(A.TgZ(0,"span",51),A._uU(1),A.ALo(2,"number"),A.qZA()),2&i){const t=A.oxw().$implicit;A.xp6(1),A.hij("(",A.lcZ(2,1,-1*t.value),")")}}function Ns(i,d){if(1&i&&(A.TgZ(0,"td",35),A.YNc(1,Ss,3,3,"span",49),A.YNc(2,Pn,3,3,"span",50),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Q6J("ngIf",t.value>0||0===t.value),A.xp6(1),A.Q6J("ngIf",t.value<0)}}function Us(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1," Blockheight "),A.qZA())}function Ps(i,d){if(1&i&&(A.TgZ(0,"td",35)(1,"span",48),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.blockheight)," ")}}function bs(i,d){1&i&&(A.TgZ(0,"th",52),A._uU(1," Reserved "),A.qZA())}function Ls(i,d){if(1&i&&(A.TgZ(0,"td",53)(1,"span"),A._uU(2),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(t.reserved?"Yes":"No")}}function Rs(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",54)(1,"div",55)(2,"mat-select",56),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",57),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function zs(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",58)(1,"button",59),A.NdJ("click",function(v){const rt=A.CHM(t).$implicit;return A.oxw().onUTXOClick(rt,v)}),A._uU(2,"View Info"),A.qZA()()}}function Gs(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No utxos available."),A.qZA())}function Qi(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting utxos..."),A.qZA())}function Hs(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function Ia(i,d){if(1&i&&(A.TgZ(0,"td",60),A.YNc(1,Gs,2,0,"p",37),A.YNc(2,Qi,2,0,"p",37),A.YNc(3,Hs,2,1,"p",37),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Wr=function(i){return{"display-none":i}};function We(i,d){if(1&i&&A._UZ(0,"tr",61),2&i){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,Wr,(null==t.listUTXOs?null:t.listUTXOs.data)&&(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)>0))}}function di(i,d){1&i&&A._UZ(0,"tr",62)}function Zr(i,d){1&i&&A._UZ(0,"tr",63)}function Js(i,d){1&i&&A._UZ(0,"mat-icon",64)}const Ir=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}},vr=function(){return["no_utxo"]};let Dr=(()=>{class i{constructor(t,s,v,Z){this.logger=t,this.commonService=s,this.store=v,this.router=Z,this.numDustUTXOs=0,this.isDustUTXO=!1,this.PAGE_ID="on_chain",this.tableSetting={tableId:"utxos",recordsPerPage:a.IV,sortBy:"status",sortOrder:a.Pi.DESCENDING},this.displayedColumns=[],this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.tableSetting.tableId=this.isDustUTXO?"dust_utxos":"utxos",this.store.select(B.AS).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("status"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.T4).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{var s;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.utxos=this.isDustUTXO?null===(s=t.utxos)||void 0===s?void 0:s.filter(v=>+(v.value||0)<1e3):t.utxos?t.utxos:[],this.utxos&&this.utxos.length>0&&this.sort&&this.paginator&&this.loadUTXOsTable(this.utxos),this.logger.info(t)})}ngAfterViewInit(){this.utxos&&this.utxos.length>0&&this.sort&&this.paginator&&this.loadUTXOsTable(this.utxos)}applyFilter(){this.listUTXOs.filter=this.selFilter.trim().toLowerCase()}onUTXOClick(t,s){const v=[[{key:"txid",value:t.txid,title:"Transaction ID",width:100}],[{key:"output",value:t.output,title:"Output",width:50,type:a.Gi.NUMBER},{key:"value",value:t.value,title:"Value (Sats)",width:50,type:a.Gi.NUMBER}],[{key:"status",value:this.commonService.titleCase(t.status||""),title:"Status",width:50,type:a.Gi.STRING},{key:"blockheight",value:t.blockheight,title:"Blockheight",width:50,type:a.Gi.NUMBER}],[{key:"address",value:t.address,title:"Address",width:100}]];this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"UTXO Information",message:v}}}))}loadUTXOsTable(t){var s;this.listUTXOs=new xA.by([...t]),this.listUTXOs.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,this.listUTXOs.sort=this.sort,null===(s=this.listUTXOs.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.listUTXOs.filterPredicate=(v,Z)=>JSON.stringify(v).toLowerCase().includes(Z),this.listUTXOs.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listUTXOs)}onDownloadCSV(){this.listUTXOs.data&&this.listUTXOs.data.length>0&&this.commonService.downloadFile(this.listUTXOs.data,"UTXOs")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-on-chain-utxos"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},inputs:{numDustUTXOs:"numDustUTXOs",isDustUTXO:"isDustUTXO"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("UTXOs")}])],decls:45,vars:13,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","txid"],["matColumnDef","address"],["matColumnDef","scriptpubkey"],["matColumnDef","output"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","value"],["matColumnDef","blockheight"],["matColumnDef","reserved"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_utxo"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["emptySpace",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row","fxLayoutAlign","end center"],[4,"ngIf"],["class","dot green","matTooltip","Confirmed","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltipPosition","right",3,"matTooltip",4,"ngIf"],["matTooltip","Risk of dust attack","matTooltipPosition","right",4,"ngIf","ngIfElse"],["matTooltip","Risk of dust attack","matTooltipPosition","right"],["fxLayoutAlign","start start","color","warn",1,"mr-1"],["matTooltip","Confirmed","matTooltipPosition","right",1,"dot","green"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip"],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center",1,"red"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["mat-header-cell","",1,"pr-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],["fxLayoutAlign","start center","color","warn",1,"mr-1"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"div",2),A.TgZ(3,"mat-form-field",3)(4,"input",4),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(Z){return s.selFilter=Z}),A.qZA()()(),A.TgZ(5,"div",5)(6,"div",6),A.YNc(7,Qs,1,0,"mat-progress-bar",7),A.TgZ(8,"table",8,9),A.ynx(10,10),A.YNc(11,ds,2,0,"th",11),A.YNc(12,pa,5,3,"td",12),A.BQk(),A.ynx(13,13),A.YNc(14,Is,2,0,"th",11),A.YNc(15,vs,4,4,"td",12),A.BQk(),A.ynx(16,14),A.YNc(17,Ds,2,0,"th",11),A.YNc(18,ys,4,4,"td",12),A.BQk(),A.ynx(19,15),A.YNc(20,ma,2,0,"th",11),A.YNc(21,xs,4,4,"td",12),A.BQk(),A.ynx(22,16),A.YNc(23,Fs,2,0,"th",17),A.YNc(24,Ys,4,3,"td",12),A.BQk(),A.ynx(25,18),A.YNc(26,Ts,2,0,"th",17),A.YNc(27,Ns,3,2,"td",12),A.BQk(),A.ynx(28,19),A.YNc(29,Us,2,0,"th",17),A.YNc(30,Ps,4,3,"td",12),A.BQk(),A.ynx(31,20),A.YNc(32,bs,2,0,"th",21),A.YNc(33,Ls,3,1,"td",22),A.BQk(),A.ynx(34,23),A.YNc(35,Rs,6,0,"th",24),A.YNc(36,zs,3,0,"td",25),A.BQk(),A.ynx(37,26),A.YNc(38,Ia,4,3,"td",27),A.BQk(),A.YNc(39,We,1,3,"tr",28),A.YNc(40,di,1,0,"tr",29),A.YNc(41,Zr,1,0,"tr",30),A.qZA(),A._UZ(42,"mat-paginator",31),A.qZA()()(),A.YNc(43,Js,1,0,"ng-template",null,32,A.W1O)),2&t&&(A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(3),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.listUTXOs)("ngClass",A.VKq(10,Ir,""!==s.errorMessage)),A.xp6(31),A.Q6J("matFooterRowDef",A.DdM(12,vr)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.Wh,Ct.yH,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,_.$V,ut.O5,S.pW,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,nA.gM,m.Hw,ut.PC,T.Zl,QA.gD,QA.$L,CA.ey,w.lW,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.rS,ut.JJ],styles:[".mat-column-status[_ngcontent-%COMP%]{width:6rem}.mat-column-txid[_ngcontent-%COMP%], .mat-column-address[_ngcontent-%COMP%], .mat-column-scriptpubkey[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-txid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-address[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-scriptpubkey[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();function xe(i,d){if(1&i&&(A.TgZ(0,"span",5),A._uU(1,"UTXOs"),A.qZA()),2&i){const t=A.oxw();A.s9C("matBadge",t.numUtxos)}}function Os(i,d){if(1&i&&(A.TgZ(0,"span",5),A._uU(1,"Dust UTXOs"),A.qZA()),2&i){const t=A.oxw();A.s9C("matBadge",t.numDustUtxos)}}let Mi=(()=>{class i{constructor(t,s){this.logger=t,this.store=s,this.selectedTableIndex=0,this.selectedTableIndexChange=new A.vpe,this.numUtxos=0,this.numDustUtxos=0,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.store.select(B.T4).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s;t.utxos&&t.utxos.length>0&&(this.numUtxos=t.utxos.length||0,this.numDustUtxos=(null===(s=t.utxos)||void 0===s?void 0:s.filter(v=>+(v.value||0)<1e3).length)||0),this.logger.info(t)})}onSelectedIndexChanged(t){this.selectedTableIndexChange.emit(t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-utxo-tables"]],inputs:{selectedTableIndex:"selectedTableIndex"},outputs:{selectedTableIndexChange:"selectedTableIndexChange"},decls:8,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"bordered-box","my-2"],[3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],["xLayout","row","fxFlex","100",3,"numDustUTXOs","isDustUTXO"],["fxLayout","row","fxFlex","100",3,"numDustUTXOs","isDustUTXO"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"mat-tab-group",1),A.NdJ("selectedIndexChange",function(Z){return s.onSelectedIndexChanged(Z)}),A.TgZ(2,"mat-tab"),A.YNc(3,xe,2,1,"ng-template",2),A._UZ(4,"rtl-cln-on-chain-utxos",3),A.qZA(),A.TgZ(5,"mat-tab"),A.YNc(6,Os,2,1,"ng-template",2),A._UZ(7,"rtl-cln-on-chain-utxos",4),A.qZA()()()),2&t&&(A.xp6(1),A.Q6J("selectedIndex",s.selectedTableIndex),A.xp6(3),A.Q6J("numDustUTXOs",s.numDustUtxos)("isDustUTXO",!1),A.xp6(3),A.Q6J("numDustUTXOs",s.numDustUtxos)("isDustUTXO",!0))},directives:[Ct.xw,Ct.yH,Ct.Wh,ht.SP,ht.uX,ht.uD,mr.k,Dr],styles:[""]}),i})();const ks=function(i,d){return[i,d]};function js(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",12),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().activeLink=null==Z?null:Z.link}),A._uU(1),A.qZA()}if(2&i){const t=d.$implicit,s=A.oxw();A.Q6J("active",s.activeLink===(null==t?null:t.link))("routerLink",A.WLB(3,ks,null==t?null:t.link,null==s.selectedTable?null:s.selectedTable.name)),A.xp6(1),A.Oqu(null==t?null:t.name)}}let Ks=(()=>{class i{constructor(t,s,v){this.store=t,this.router=s,this.activatedRoute=v,this.selNode={},this.faExchangeAlt=h.Ssp,this.faChartPie=h.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"},{link:"sweep",name:"Sweep All"}],this.activeLink=this.links[0].link,this.tables=[{id:0,name:"utxos"},{id:1,name:"dustUtxos"}],this.selectedTable=this.tables[0],this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.selectedTable=this.tables.find(s=>s.name===this.router.url.substring(this.router.url.lastIndexOf("/")+1))||this.tables[0],this.router.events.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof _t.Av)).subscribe({next:s=>{const v=this.links.find(Z=>s.urlAfterRedirects.includes(Z.link));this.activeLink=v?v.link:this.links[0].link,this.selectedTable=this.tables.find(Z=>Z.name===s.urlAfterRedirects.substring(s.urlAfterRedirects.lastIndexOf("/")+1))||this.tables[0]}}),this.store.select(B.lw).pipe((0,r.R)(this.unSubs[1])).subscribe(s=>{this.selNode=s}),this.store.select(B.Rn).pipe((0,r.R)(this.unSubs[2])).subscribe(s=>{this.balances=[{title:"Total Balance",dataValue:s.balance.totalBalance||0},{title:"Confirmed",dataValue:s.balance.confBalance||0},{title:"Unconfirmed",dataValue:s.balance.unconfBalance||0}]})}openSendFundsModal(t){this.store.dispatch((0,KA.qR)({payload:{data:{sweepAll:t,component:Kr}}}))}onSelectedTableIndexChanged(t){this.selectedTable=this.tables.find(s=>s.id===t)||this.tables[0],this.router.navigate(["./",this.activeLink,this.selectedTable.name],{relativeTo:this.activatedRoute})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(u.yh),A.Y36(_t.F0),A.Y36(_t.gz))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-on-chain"]],decls:21,vars:5,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100",3,"selectedTableIndex","selectedTableIndexChange"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"On-chain Balance"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),A._UZ(7,"rtl-currency-unit-converter",5),A.qZA()()(),A.TgZ(8,"div",0),A._UZ(9,"fa-icon",1),A.TgZ(10,"span",2),A._uU(11,"On-chain Transactions"),A.qZA()(),A.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",7),A.YNc(16,js,2,6,"div",8),A.qZA(),A.TgZ(17,"div",9),A._UZ(18,"router-outlet"),A.qZA(),A.TgZ(19,"div",10)(20,"rtl-cln-utxo-tables",11),A.NdJ("selectedTableIndexChange",function(Z){return s.onSelectedTableIndexChanged(Z)}),A.qZA()()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartPie),A.xp6(6),A.Q6J("values",s.balances),A.xp6(2),A.Q6J("icon",s.faExchangeAlt),A.xp6(7),A.Q6J("ngForOf",s.links),A.xp6(4),A.Q6J("selectedTableIndex",null==s.selectedTable?null:s.selectedTable.id))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,pr.D,ht.BU,ut.sg,ht.Nj,_t.rH,Ct.yH,_t.lC,Mi],styles:[""]}),i})();function yr(i,d){if(1&i&&(A.TgZ(0,"span",10),A._uU(1,"Channels"),A.qZA()),2&i){const t=A.oxw();A.s9C("matBadge",t.activeChannels)}}function Bi(i,d){if(1&i&&(A.TgZ(0,"span",10),A._uU(1,"Peers"),A.qZA()),2&i){const t=A.oxw();A.s9C("matBadge",t.activePeers)}}let va=(()=>{class i{constructor(t,s,v){this.store=t,this.logger=s,this.router=v,this.activePeers=0,this.activeChannels=0,this.faUsers=h.FVb,this.faChartPie=h.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(t=>t instanceof _t.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(s=>s.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(B.ZW).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.activeChannels=t.activeChannels.length||0}),this.store.select(B.Wi).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.logger.info(t)}),this.store.select(B.Rn).pipe((0,r.R)(this.unSubs[3])).subscribe(t=>{this.balances=[{title:"Total Balance",dataValue:t.balance.totalBalance||0},{title:"Confirmed",dataValue:t.balance.confBalance||0},{title:"Unconfirmed",dataValue:t.balance.unconfBalance||0}]})}onSelectedTabChange(t){this.router.navigateByUrl("/cln/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(u.yh),A.Y36(E.mQ),A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-connections"]],decls:22,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"On-chain Balance"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),A._UZ(7,"rtl-currency-unit-converter",5),A.qZA()()(),A.TgZ(8,"div",0),A._UZ(9,"fa-icon",1),A.TgZ(10,"span",2),A._uU(11,"Connections"),A.qZA()(),A.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"mat-tab-group",7),A.NdJ("selectedIndexChange",function(Z){return s.activeLink=Z})("selectedTabChange",function(Z){return s.onSelectedTabChange(Z)}),A.TgZ(16,"mat-tab"),A.YNc(17,yr,2,1,"ng-template",8),A.qZA(),A.TgZ(18,"mat-tab"),A.YNc(19,Bi,2,1,"ng-template",8),A.qZA()(),A.TgZ(20,"div",9),A._UZ(21,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartPie),A.xp6(6),A.Q6J("values",s.balances),A.xp6(2),A.Q6J("icon",s.faUsers),A.xp6(6),A.Q6J("selectedIndex",s.activeLink))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,pr.D,ht.SP,ht.uX,ht.uD,mr.k,Ct.yH,_t.lC],styles:[""]}),i})();function zi(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",11),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().activeLink=Z.link}),A._uU(1),A.qZA()}if(2&i){const t=d.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let Da=(()=>{class i{constructor(t,s,v){this.logger=t,this.store=s,this.router=v,this.faExchangeAlt=h.Ssp,this.faChartPie=h.OS1,this.currencyUnits=[],this.routerUrl="",this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.selNode={},this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof _t.Av)).subscribe({next:s=>{const v=this.links.find(Z=>s.urlAfterRedirects.includes(Z.link));this.activeLink=v?v.link:this.links[0].link,this.routerUrl=s.urlAfterRedirects}}),this.store.select(B.lw).pipe((0,r.R)(this.unSubs[1])).subscribe(s=>{if(this.selNode=s,this.selNode&&this.selNode.enableOffers){this.store.dispatch((0,Et.yl)()),this.store.dispatch((0,Et.uT)()),this.links.push({link:"offers",name:"Offers"}),this.links.push({link:"offrBookmarks",name:"Paid Offer Bookmarks"});const v=this.links.find(Z=>this.router.url.includes(Z.link));this.activeLink=v?v.link:this.links[0].link}}),this.store.select(B.Wj).pipe((0,r.R)(this.unSubs[2]),(0,o.M)(this.store.select(B.lw))).subscribe(([s,v])=>{this.currencyUnits=(null==v?void 0:v.currencyUnits)||[],this.balances=v&&v.userPersona===a.ol.OPERATOR?[{title:"Local Capacity",dataValue:s.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:s.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:s.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:s.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(s)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Lightning Balance"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),A._UZ(7,"rtl-currency-unit-converter",5),A.qZA()()(),A.TgZ(8,"div",6),A._UZ(9,"fa-icon",1),A.TgZ(10,"span",2),A._uU(11,"Lightning Transactions"),A.qZA()(),A.TgZ(12,"div",7)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",8),A.YNc(16,zi,2,3,"div",9),A.qZA(),A.TgZ(17,"div",10),A._UZ(18,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartPie),A.xp6(6),A.Q6J("values",s.balances),A.xp6(2),A.Q6J("icon",s.faExchangeAlt),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,pr.D,ht.BU,ut.sg,ht.Nj,_t.rH,Ct.yH,_t.lC],styles:[""]}),i})();function Vs(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",11),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().activeLink=Z.link}),A._uU(1),A.qZA()}if(2&i){const t=d.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let xr=(()=>{class i{constructor(t){this.router=t,this.faMapSigns=h.SuH,this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"routingpeers",name:"Routing Peers"},{link:"failedtransactions",name:"Failed Transactions"},{link:"localfail",name:"Local Failed Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof _t.Av)).subscribe({next:s=>{const v=this.links.find(Z=>s.urlAfterRedirects.includes(Z.link));this.activeLink=v?v.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-routing"]],decls:13,vars:2,consts:[["fxLayout","column",1,"mb-2"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"fa-icon",2),A.TgZ(3,"span",3),A._uU(4,"Routing"),A.qZA()(),A.TgZ(5,"div",4)(6,"mat-card",5)(7,"mat-card-content",6)(8,"div",7)(9,"nav",8),A.YNc(10,Vs,2,3,"div",9),A.qZA()(),A.TgZ(11,"div",10),A._UZ(12,"router-outlet"),A.qZA()()()()()),2&t&&(A.xp6(2),A.Q6J("icon",s.faMapSigns),A.xp6(8),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,Ct.yH,g.a8,g.dn,ht.BU,ut.sg,ht.Nj,_t.rH,_t.lC],styles:[""]}),i})();var pi=Pt(6895);function Yi(i,d){if(1&i&&(A.TgZ(0,"span",6),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(t)}}function Ws(i,d){1&i&&(A.TgZ(0,"th",27),A._uU(1,"Type"),A.qZA())}function Fr(i,d){if(1&i&&(A.TgZ(0,"td",28),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.type," ")}}function qi(i,d){1&i&&(A.TgZ(0,"th",27),A._uU(1,"Address"),A.qZA())}function Zs(i,d){if(1&i&&(A.TgZ(0,"td",28),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.address," ")}}function Xs(i,d){1&i&&(A.TgZ(0,"th",27),A._uU(1,"Port"),A.qZA())}function qs(i,d){if(1&i&&(A.TgZ(0,"td",28),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.port," ")}}function ya(i,d){1&i&&(A.TgZ(0,"th",29)(1,"div",30),A._uU(2,"Actions"),A.qZA()())}function _s(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",31)(1,"span",32)(2,"button",33),A.NdJ("copied",function(v){return A.CHM(t),A.oxw(2).onCopyNodeURI(v)}),A._uU(3,"Copy Node URI"),A.qZA()()()}if(2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(2),A.Q6J("payload",(null==s.lookupResult?null:s.lookupResult.nodeid)+"@"+t.address+":"+t.port)}}function $s(i,d){1&i&&A._UZ(0,"tr",34)}function A0(i,d){1&i&&A._UZ(0,"tr",35)}const t0=function(i){return{"background-color":i}};function e0(i,d){if(1&i&&(A.TgZ(0,"div",1),A._UZ(1,"mat-divider",2),A.TgZ(2,"div",3)(3,"div",4)(4,"h4",5),A._uU(5,"Alias"),A.qZA(),A.TgZ(6,"span",6),A._uU(7),A.TgZ(8,"span",7),A._uU(9),A.qZA()()(),A.TgZ(10,"div",8)(11,"h4",5),A._uU(12,"Pub Key"),A.qZA(),A.TgZ(13,"span",9),A._uU(14),A.qZA()()(),A._UZ(15,"mat-divider",10),A.TgZ(16,"div",3)(17,"div",4)(18,"h4",5),A._uU(19,"Last Update"),A.qZA(),A.TgZ(20,"span",6),A._uU(21),A.ALo(22,"date"),A.qZA()(),A.TgZ(23,"div",8)(24,"h4",5),A._uU(25,"Features"),A.qZA(),A.YNc(26,Yi,2,1,"span",11),A.qZA()(),A._UZ(27,"mat-divider",10),A.TgZ(28,"div",12)(29,"h4",13),A._uU(30,"Addresses"),A.qZA(),A.TgZ(31,"div",14)(32,"table",15,16),A.ynx(34,17),A.YNc(35,Ws,2,0,"th",18),A.YNc(36,Fr,2,1,"td",19),A.BQk(),A.ynx(37,20),A.YNc(38,qi,2,0,"th",18),A.YNc(39,Zs,2,1,"td",19),A.BQk(),A.ynx(40,21),A.YNc(41,Xs,2,0,"th",18),A.YNc(42,qs,2,1,"td",19),A.BQk(),A.ynx(43,22),A.YNc(44,ya,3,0,"th",23),A.YNc(45,_s,4,1,"td",24),A.BQk(),A.YNc(46,$s,1,0,"tr",25),A.YNc(47,A0,1,0,"tr",26),A.qZA()()()()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(null==t.lookupResult?null:t.lookupResult.alias),A.xp6(1),A.Q6J("ngStyle",A.VKq(15,t0,"#"+(null==t.lookupResult?null:t.lookupResult.color))),A.xp6(1),A.Oqu(null!=t.lookupResult&&t.lookupResult.color?"#"+(null==t.lookupResult?null:t.lookupResult.color):""),A.xp6(5),A.Oqu(null==t.lookupResult?null:t.lookupResult.nodeid),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(A.xi3(22,12,1e3*(null==t.lookupResult?null:t.lookupResult.last_timestamp),"dd/MMM/y HH:mm")),A.xp6(5),A.Q6J("ngForOf",t.featureDescriptions),A.xp6(1),A.Q6J("inset",!0),A.xp6(5),A.Q6J("dataSource",t.addresses),A.xp6(14),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}let n0=(()=>{class i{constructor(t,s){this.logger=t,this.snackBar=s,this.featureDescriptions=[],this.displayedColumns=["type","address","port","actions"]}ngOnInit(){if(this.addresses=new xA.by(this.lookupResult&&this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses||[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(t,s)=>t[s]&&isNaN(t[s])?t[s].toLocaleLowerCase():t[s]?+t[s]:null,this.lookupResult.features&&""!==this.lookupResult.features.trim()){const t=parseInt(this.lookupResult.features,16);a.Df.forEach(s=>{t&(1<{class i{constructor(t){this.store=t,this.lookupResult=[],this.node1_match=!1,this.node2_match=!1,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.store.select(B.ey).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.lookupResult.length>0&&this.lookupResult[0].source===t.id&&(this.node1_match=!0),this.lookupResult.length>1&&this.lookupResult[1].source===t.id&&(this.node2_match=!0)})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(u.yh))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-channel-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start",1,"mt-1","bordered-box","padding-gap-large"],["fxLayout","column"],["class","page-title font-bold-500",4,"ngIf"],[3,"inset"],["fxLayout","column","fxFlex","20",1,"my-1"],[1,"font-bold-500"],[1,"foreground-secondary-text"],["fxLayout","column","fxFlex","10",1,"my-1"],[1,"page-title","font-bold-500"]],template:function(t,s){1&t&&A.YNc(0,s0,204,91,"div",0),2&t&&A.Q6J("ngIf",s.lookupResult)},directives:[ut.O5,Ct.xw,lA.d,Ct.Wh,Ct.yH],pipes:[ut.JJ,ut.uU],styles:[".mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%], .mat-list-base[_ngcontent-%COMP%] .mat-list-option[_ngcontent-%COMP%]{height:38px!important}"]}),i})();const Xr=["form"];function Tr(i,d){if(1&i&&(A.TgZ(0,"mat-radio-button",17),A._uU(1),A.qZA()),2&i){const t=d.$implicit,s=A.oxw();A.Q6J("value",t.id)("checked",s.selectedFieldId===t.id),A.xp6(1),A.hij(" ",t.name," ")}}function xa(i,d){if(1&i&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function l0(i,d){if(1&i&&(A.TgZ(0,"div"),A._UZ(1,"rtl-cln-node-lookup",26),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Q6J("lookupResult",t.nodeLookupValue)}}function Sr(i,d){if(1&i&&(A.TgZ(0,"span",24),A.YNc(1,l0,2,1,"div",25),A.qZA()),2&i){const t=A.oxw(2),s=A.MAs(19);A.xp6(1),A.Q6J("ngIf",""!==t.nodeLookupValue.nodeid)("ngIfElse",s)}}function Ln(i,d){if(1&i&&(A.TgZ(0,"div"),A._UZ(1,"rtl-cln-channel-lookup",26),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Q6J("lookupResult",t.channelLookupValue)}}function ui(i,d){if(1&i&&(A.TgZ(0,"span",24),A.YNc(1,Ln,2,1,"div",25),A.qZA()),2&i){const t=A.oxw(2),s=A.MAs(19);A.xp6(1),A.Q6J("ngIf",t.channelLookupValue.length>0)("ngIfElse",s)}}function qr(i,d){1&i&&(A.TgZ(0,"span",24)(1,"h3"),A._uU(2,"Error! Unable to find details!"),A.qZA()())}function _r(i,d){if(1&i&&(A.TgZ(0,"div",18)(1,"div",19)(2,"span",20),A._uU(3),A.qZA()(),A.TgZ(4,"div",21),A.YNc(5,Sr,2,2,"span",22),A.YNc(6,ui,2,2,"span",22),A.YNc(7,qr,3,0,"span",23),A.qZA()()),2&i){const t=A.oxw();A.xp6(3),A.hij("",t.lookupFields[t.selectedFieldId].name," Details"),A.xp6(1),A.Q6J("ngSwitch",t.selectedFieldId),A.xp6(1),A.Q6J("ngSwitchCase",0),A.xp6(1),A.Q6J("ngSwitchCase",1)}}function $r(i,d){1&i&&(A.TgZ(0,"h3"),A._uU(1,"Error! Unable to find details!"),A.qZA())}const c0=function(i){return{"mt-1":!0,"mt-2":i}};let _i=(()=>{class i{constructor(t,s,v,Z){this.logger=t,this.commonService=s,this.store=v,this.actions=Z,this.lookupKey="",this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Pubkey"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=h.wn1,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(t=>t.type===a.AB.SET_LOOKUP_CLN||t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{if(t.type===a.AB.SET_LOOKUP_CLN){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue="object"!=typeof t.payload[0]?{nodeid:""}:JSON.parse(JSON.stringify(t.payload[0]));break;case 1:this.channelLookupValue="object"!=typeof t.payload[0]?[]:JSON.parse(JSON.stringify(t.payload))}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&"Lookup"===t.payload.action&&(this.flgLoading[0]="error")})}onLookup(){if(!this.lookupKey)return!0;switch(this.flgSetLookupValue=!1,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.selectedFieldId){case 0:this.store.dispatch((0,Et.Sf)({payload:this.lookupKey.trim()}));break;case 1:this.store.dispatch((0,Et.$A)({payload:{uiMessage:a.m6.SEARCHING_CHANNEL,shortChannelID:this.lookupKey.trim(),showError:!1}}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(Tt.eX))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-lookups"]],viewQuery:function(t,s){if(1&t&&A.Gf(Xr,7),2&t){let v;A.iGM(v=A.CRH())&&(s.form=v.first)}},decls:20,vars:9,consts:[["fxLayout","column"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start space-between",1,"w-100"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[4,"ngIf"],["fxLayout","row","fxFlex","100",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","3","type","button",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch","class","w-100 mt-2",4,"ngIf"],["errorBlock",""],[1,"mr-4",3,"value","checked"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[4,"ngIf","ngIfElse"],[3,"lookupResult"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-content",2)(3,"form",3,4)(5,"div",5)(6,"mat-radio-group",6),A.NdJ("ngModelChange",function(Z){return s.selectedFieldId=Z})("change",function(Z){return s.onSelectChange(Z)}),A.YNc(7,Tr,2,3,"mat-radio-button",7),A.qZA()(),A.TgZ(8,"mat-form-field",8)(9,"input",9,10),A.NdJ("change",function(){return s.clearLookupValue()})("ngModelChange",function(Z){return s.lookupKey=Z}),A.qZA(),A.YNc(11,xa,2,1,"mat-error",11),A.qZA(),A.TgZ(12,"div",12)(13,"button",13),A.NdJ("click",function(){return s.resetData()}),A._uU(14,"Clear"),A.qZA(),A.TgZ(15,"button",14),A.NdJ("click",function(){return s.onLookup()}),A._uU(16,"Lookup"),A.qZA()()(),A.YNc(17,_r,8,4,"div",15),A.qZA()()(),A.YNc(18,$r,2,0,"ng-template",null,16,A.W1O)),2&t&&(A.xp6(6),A.Q6J("ngModel",s.selectedFieldId),A.xp6(1),A.Q6J("ngForOf",s.lookupFields),A.xp6(1),A.Q6J("ngClass",A.VKq(7,c0,s.screenSize===s.screenSizeEnum.XS||s.screenSize===s.screenSizeEnum.SM)),A.xp6(1),A.Q6J("placeholder",(null==s.lookupFields[s.selectedFieldId]?null:s.lookupFields[s.selectedFieldId].placeholder)||"Lookup Key")("ngModel",s.lookupKey),A.xp6(2),A.Q6J("ngIf",!s.lookupKey),A.xp6(6),A.Q6J("ngIf",s.flgSetLookupValue))},directives:[Ct.xw,Ct.yH,Ct.Wh,g.dn,OA._Y,OA.JL,OA.F,kt.VQ,OA.JJ,OA.On,ut.sg,kt.U0,P.KE,ut.mk,T.oO,H.Nt,OA.Fj,OA.Q7,ut.O5,P.TO,w.lW,ut.RF,ut.n9,n0,Yr,ut.ED],styles:[".tree-invisible[_ngcontent-%COMP%]{display:none}.lookup-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .lookup-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),i})();var Gi=(()=>{return(i=Gi||(Gi={})).KB="KB",i.KW="KW",Gi;var i})();function g0(i,d){if(1&i&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4," Opening "),A.TgZ(5,"mat-icon",5),A._uU(6,"info_outline"),A.qZA()(),A.TgZ(7,"div",6),A._uU(8),A.ALo(9,"number"),A.qZA()(),A.TgZ(10,"div")(11,"h4",4),A._uU(12," Mutual Close "),A.TgZ(13,"mat-icon",7),A._uU(14,"info_outline"),A.qZA()(),A.TgZ(15,"div",6),A._uU(16),A.ALo(17,"number"),A.qZA()(),A.TgZ(18,"div")(19,"h4",4),A._uU(20," Unilateral Close "),A.TgZ(21,"mat-icon",8),A._uU(22,"info_outline"),A.qZA()(),A.TgZ(23,"div",6),A._uU(24),A.ALo(25,"number"),A.qZA()(),A.TgZ(26,"div")(27,"h4",4),A._uU(28," Delayed To Us "),A.TgZ(29,"mat-icon",9),A._uU(30,"info_outline"),A.qZA()(),A.TgZ(31,"div",6),A._uU(32),A.ALo(33,"number"),A.qZA()()(),A.TgZ(34,"div",3)(35,"div")(36,"h4",4),A._uU(37," Minimum Acceptable "),A.TgZ(38,"mat-icon",10),A._uU(39,"info_outline"),A.qZA()(),A.TgZ(40,"div",6),A._uU(41),A.ALo(42,"number"),A.qZA()(),A.TgZ(43,"div")(44,"h4",4),A._uU(45," Maximum Acceptable "),A.TgZ(46,"mat-icon",11),A._uU(47,"info_outline"),A.qZA()(),A.TgZ(48,"div",6),A._uU(49),A.ALo(50,"number"),A.qZA()(),A.TgZ(51,"div")(52,"h4",4),A._uU(53," HTLC Resolution "),A.TgZ(54,"mat-icon",12),A._uU(55,"info_outline"),A.qZA()(),A.TgZ(56,"div",6),A._uU(57),A.ALo(58,"number"),A.qZA()(),A.TgZ(59,"div")(60,"h4",4),A._uU(61," Penalty "),A.TgZ(62,"mat-icon",13),A._uU(63,"info_outline"),A.qZA()(),A.TgZ(64,"div",6),A._uU(65),A.ALo(66,"number"),A.qZA()()()()),2&i){const t=A.oxw();A.xp6(8),A.Oqu(A.lcZ(9,8,null==t.perkbw?null:t.perkbw.opening)),A.xp6(8),A.Oqu(A.lcZ(17,10,null==t.perkbw?null:t.perkbw.mutual_close)),A.xp6(8),A.Oqu(A.lcZ(25,12,null==t.perkbw?null:t.perkbw.unilateral_close)),A.xp6(8),A.Oqu(A.lcZ(33,14,null==t.perkbw?null:t.perkbw.delayed_to_us)),A.xp6(9),A.Oqu(A.lcZ(42,16,null==t.perkbw?null:t.perkbw.min_acceptable)),A.xp6(8),A.Oqu(A.lcZ(50,18,null==t.perkbw?null:t.perkbw.max_acceptable)),A.xp6(8),A.Oqu(A.lcZ(58,20,null==t.perkbw?null:t.perkbw.htlc_resolution)),A.xp6(8),A.Oqu(A.lcZ(66,22,null==t.perkbw?null:t.perkbw.penalty))}}function B0(i,d){if(1&i&&(A.TgZ(0,"div",14)(1,"p"),A._uU(2),A.qZA()()),2&i){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let u0=(()=>{class i{constructor(){this.perkbw={}}ngAfterContentChecked(){this.feeRateStyle===Gi.KB?this.perkbw=this.feeRates.perkb:this.feeRateStyle===Gi.KW&&(this.perkbw=this.feeRates.perkw)}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-fee-rates"]],inputs:{feeRateStyle:"feeRateStyle",feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start center",1,"dashboard-info-title"],["matTooltip","Default feerate for fundchannel and withdraw","matTooltipPosition","below",1,"info-icon","info-icon-primary"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Feerate to aim for in cooperative shutdown. Note that since mutual close is a negotiation, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate for commitment_transaction in a live channel which we originally funded","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate for returning unilateral close funds to our wallet","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","The smallest feerate that you can use, usually the minimum relayed feerate of the backend","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate for returning unilateral close HTLC outputs to our wallet","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate to start at when penalizing a cheat attempt","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,g0,67,24,"div",0),A.YNc(1,B0,3,1,"ng-template",null,1,A.W1O)),2&t){const v=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",v)}},directives:[ut.O5,Ct.xw,Ct.yH,Ct.Wh,m.Hw,nA.gM],pipes:[ut.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),i})();function f0(i,d){if(1&i&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4," Opening Channel "),A.TgZ(5,"mat-icon",5),A._uU(6,"info_outline"),A.qZA()(),A.TgZ(7,"div",6),A._uU(8),A.ALo(9,"number"),A.qZA()(),A.TgZ(10,"div")(11,"h4",4),A._uU(12," Mutual Close "),A.TgZ(13,"mat-icon",7),A._uU(14,"info_outline"),A.qZA()(),A.TgZ(15,"div",6),A._uU(16),A.ALo(17,"number"),A.qZA()(),A.TgZ(18,"div")(19,"h4",4),A._uU(20," Unilateral Close "),A.TgZ(21,"mat-icon",8),A._uU(22,"info_outline"),A.qZA()(),A.TgZ(23,"div",6),A._uU(24),A.ALo(25,"number"),A.qZA()(),A.TgZ(26,"div",9),A._UZ(27,"h4",4)(28,"div",6),A.qZA()(),A.TgZ(29,"div",3)(30,"div")(31,"h4",4),A._uU(32," HTLC Timeout "),A.TgZ(33,"mat-icon",10),A._uU(34,"info_outline"),A.qZA()(),A.TgZ(35,"div",6),A._uU(36),A.ALo(37,"number"),A.qZA()(),A.TgZ(38,"div")(39,"h4",4),A._uU(40," HTLC Success "),A.TgZ(41,"mat-icon",11),A._uU(42,"info_outline"),A.qZA()(),A.TgZ(43,"div",6),A._uU(44),A.ALo(45,"number"),A.qZA()(),A.TgZ(46,"div",9),A._UZ(47,"h4",4)(48,"div",6),A.qZA(),A.TgZ(49,"div",9),A._UZ(50,"h4",4)(51,"div",6),A.qZA()()()),2&i){const t=A.oxw();A.xp6(8),A.Oqu(A.lcZ(9,5,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.opening_channel_satoshis)),A.xp6(8),A.Oqu(A.lcZ(17,7,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.mutual_close_satoshis)),A.xp6(8),A.Oqu(A.lcZ(25,9,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.unilateral_close_satoshis)),A.xp6(12),A.Oqu(A.lcZ(37,11,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_timeout_satoshis)),A.xp6(8),A.Oqu(A.lcZ(45,13,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_success_satoshis))}}function h0(i,d){if(1&i&&(A.TgZ(0,"div",12)(1,"p"),A._uU(2),A.qZA()()),2&i){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let E0=(()=>{class i{constructor(){}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-onchain-fee-estimates"]],inputs:{feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start center",1,"dashboard-info-title"],["matTooltip","Estimated cost of typical channel open","matTooltipPosition","below",1,"info-icon","info-icon-primary"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Estimated cost of typical channel close","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Estimated cost of typical unilateral close (without HTLCs)","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["fxFlex","12"],["matTooltip","Estimated cost of typical HTLC timeout transaction","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Estimated cost of typical HTLC fulfillment transaction","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,f0,52,15,"div",0),A.YNc(1,h0,3,1,"ng-template",null,1,A.W1O)),2&t){const v=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",v)}},directives:[ut.O5,Ct.xw,Ct.yH,Ct.Wh,m.Hw,nA.gM],pipes:[ut.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),i})();function w0(i,d){1&i&&A._UZ(0,"mat-progress-bar",19)}function C0(i,d){if(1&i&&A._UZ(0,"rtl-cln-node-info",20),2&i){const t=A.oxw(3);A.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Q0(i,d){if(1&i&&A._UZ(0,"rtl-cln-channel-status-info",21),2&i){const t=A.oxw(3);A.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function d0(i,d){if(1&i&&A._UZ(0,"rtl-cln-fee-info",22),2&i){const t=A.oxw(3);A.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function M0(i,d){if(1&i&&A._UZ(0,"rtl-cln-fee-rates",23),2&i){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function p0(i,d){if(1&i&&A._UZ(0,"rtl-cln-fee-rates",23),2&i){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[6])}}function m0(i,d){if(1&i&&A._UZ(0,"rtl-cln-onchain-fee-estimates",24),2&i){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}const $i=function(i){return{"dashboard-card-content":!0,"error-border":i}};function ve(i,d){if(1&i&&(A.TgZ(0,"mat-grid-tile",4)(1,"div",5)(2,"div",6)(3,"div",7),A._UZ(4,"fa-icon",8),A.TgZ(5,"span"),A._uU(6),A.qZA()()(),A.TgZ(7,"div",9)(8,"mat-card",10)(9,"mat-card-content",11),A.YNc(10,w0,1,0,"mat-progress-bar",12),A.TgZ(11,"div",13),A.YNc(12,C0,1,2,"rtl-cln-node-info",14),A.YNc(13,Q0,1,2,"rtl-cln-channel-status-info",15),A.YNc(14,d0,1,2,"rtl-cln-fee-info",16),A.YNc(15,M0,1,3,"rtl-cln-fee-rates",17),A.YNc(16,p0,1,3,"rtl-cln-fee-rates",17),A.YNc(17,m0,1,2,"rtl-cln-onchain-fee-estimates",18),A.qZA()()()()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(4),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(3),A.Q6J("ngClass",A.VKq(13,$i,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR)),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","status"),A.xp6(1),A.Q6J("ngSwitchCase","fee"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKB"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKW"),A.xp6(1),A.Q6J("ngSwitchCase","onChainFeeEstimates")}}function ie(i,d){if(1&i&&(A.TgZ(0,"mat-grid-list",2),A.YNc(1,ve,18,15,"mat-grid-tile",3),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngForOf",t.nodeCardsOperator)}}function I0(i,d){1&i&&A._UZ(0,"mat-progress-bar",19)}function Fa(i,d){if(1&i&&A._UZ(0,"rtl-cln-node-info",20),2&i){const t=A.oxw(3);A.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Ar(i,d){if(1&i&&A._UZ(0,"rtl-cln-channel-status-info",21),2&i){const t=A.oxw(3);A.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function Ya(i,d){if(1&i&&A._UZ(0,"rtl-cln-fee-info",22),2&i){const t=A.oxw(3);A.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function v0(i,d){if(1&i&&A._UZ(0,"rtl-cln-fee-rates",23),2&i){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function D0(i,d){if(1&i&&A._UZ(0,"rtl-cln-fee-rates",23),2&i){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[5])}}function Ta(i,d){if(1&i&&A._UZ(0,"rtl-cln-onchain-fee-estimates",24),2&i){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}function y0(i,d){if(1&i&&(A.TgZ(0,"mat-grid-tile",4)(1,"div",5)(2,"div",6)(3,"div",25),A._UZ(4,"fa-icon",8),A.TgZ(5,"span"),A._uU(6),A.qZA()()(),A.TgZ(7,"div",9)(8,"mat-card",10)(9,"mat-card-content",11),A.YNc(10,I0,1,0,"mat-progress-bar",12),A.TgZ(11,"div",13),A.YNc(12,Fa,1,2,"rtl-cln-node-info",14),A.YNc(13,Ar,1,2,"rtl-cln-channel-status-info",15),A.YNc(14,Ya,1,2,"rtl-cln-fee-info",16),A.YNc(15,v0,1,3,"rtl-cln-fee-rates",17),A.YNc(16,D0,1,3,"rtl-cln-fee-rates",17),A.YNc(17,Ta,1,2,"rtl-cln-onchain-fee-estimates",18),A.qZA()()()()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(4),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(3),A.Q6J("ngClass",A.VKq(13,$i,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR)),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","status"),A.xp6(1),A.Q6J("ngSwitchCase","fee"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKB"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKW"),A.xp6(1),A.Q6J("ngSwitchCase","onChainFeeEstimates")}}function wn(i,d){if(1&i&&(A.TgZ(0,"mat-grid-list",2),A.YNc(1,y0,18,15,"mat-grid-tile",3),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngForOf",t.nodeCardsMerchant)}}let Aa=(()=>{class i{constructor(t,s,v){this.logger=t,this.commonService=s,this.store=v,this.faBolt=h.BDt,this.faServer=h.xf3,this.faNetworkWired=h.kXW,this.faLink=h.nNP,this.selNode={},this.information={},this.channelsStatus={active:{},pending:{},inactive:{}},this.feeRatesPerKB={},this.feeRatesPerKW={},this.nodeCardsOperator=[],this.nodeCardsMerchant=[],this.screenSize="",this.screenSizeEnum=a.cu,this.userPersonaEnum=a.ol,this.errorMessages=["","","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFees=null,this.apiCallStatusFHistory=null,this.apiCallStatusPerKB=null,this.apiCallStatusPerKW=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:6,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:6,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:6,rows:1},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}]):(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:2,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:2,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:2,rows:3},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}])}ngOnInit(){this.store.select(B.Hz).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusNodeInfo.status===a.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message?this.apiCallStatusNodeInfo.message:""),this.selNode=t.nodeSettings,this.information=t.information,this.logger.info(t)}),this.store.select(B.ZW).pipe((0,r.R)(this.unSubs[1]),(0,o.M)(this.store.select(B.Wj))).subscribe(([t,s])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusLRBal=t.apiCallStatus,this.apiCallStatusChannels=s.apiCallStatus,this.apiCallStatusLRBal.status===a.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message?this.apiCallStatusLRBal.message:""),this.apiCallStatusChannels.status===a.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message?this.apiCallStatusChannels.message:""),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.channelsStatus.active.capacity=s.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=s.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=s.localRemoteBalance.inactiveBalance||0}),this.store.select(B.JG).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===a.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message?this.apiCallStatusFees.message:""),this.fees=t.fees}),this.store.select(B.Bo).pipe((0,r.R)(this.unSubs[3])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusFHistory=t.apiCallStatus,this.apiCallStatusFHistory.status===a.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message?this.apiCallStatusFHistory.message:""),t.forwardingHistory&&t.forwardingHistory.listForwards&&t.forwardingHistory.listForwards.length&&(this.fees.totalTxCount=t.forwardingHistory.listForwards.length)}),this.store.select(B.zm).pipe((0,r.R)(this.unSubs[4])).subscribe(t=>{this.errorMessages[5]="",this.apiCallStatusPerKB=t.apiCallStatus,this.apiCallStatusPerKB.status===a.Bn.ERROR&&(this.errorMessages[5]="object"==typeof this.apiCallStatusPerKB.message?JSON.stringify(this.apiCallStatusPerKB.message):this.apiCallStatusPerKB.message?this.apiCallStatusPerKB.message:""),this.feeRatesPerKB=t.feeRatesPerKB}),this.store.select(B.hx).pipe((0,r.R)(this.unSubs[5])).subscribe(t=>{this.errorMessages[6]="",this.apiCallStatusPerKW=t.apiCallStatus,this.apiCallStatusPerKW.status===a.Bn.ERROR&&(this.errorMessages[6]="object"==typeof this.apiCallStatusPerKW.message?JSON.stringify(this.apiCallStatusPerKW.message):this.apiCallStatusPerKW.message?this.apiCallStatusPerKW.message:""),this.feeRatesPerKW=t.feeRatesPerKW})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-network-info"]],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch",1,"mb-4"],["cols","6","rowHeight","100px",4,"ngIf"],["cols","6","rowHeight","100px"],["class","node-grid-tile",3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"node-grid-tile",3,"colspan","rowspan"],["fxLayout","column","fxLayoutAlign","stretch start","fxFlex","100",1,"h-100"],["fxLayout","row","fxLayoutAlign","start start",1,"w-100"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-2"],[1,"mr-1",3,"icon"],["fxLayout","column","fxLayoutAlign","stretch center","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","center stretch",1,"w-100","h-93"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","w-96","h-93"],["fxLayout","column","fxFlex","100",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","feeRateStyle","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","errorMessage",4,"ngSwitchCase"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],[1,"h-100",3,"feeRates","feeRateStyle","errorMessage"],[1,"h-100",3,"feeRates","errorMessage"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-15px"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,ie,2,1,"mat-grid-list",1),A.YNc(2,wn,2,1,"mat-grid-list",1),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",s.selNode.userPersona===s.userPersonaEnum.OPERATOR),A.xp6(1),A.Q6J("ngIf",s.selNode.userPersona===s.userPersonaEnum.MERCHANT))},directives:[Ct.xw,Ct.Wh,ut.O5,f.Il,ut.sg,f.DX,Ct.yH,e.BN,g.a8,g.dn,ut.mk,T.oO,S.pW,ut.RF,ut.n9,b,q,SA,u0,E0],styles:[""]}),i})();function Sa(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",8),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().activeLink=Z.link}),A._uU(1),A.qZA()}if(2&i){const t=d.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let Nr=(()=>{class i{constructor(t){this.router=t,this.faUserCheck=h.hkK,this.links=[{link:"sign",name:"Sign"},{link:"verify",name:"Verify"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof _t.Av)).subscribe({next:s=>{const v=this.links.find(Z=>s.urlAfterRedirects.includes(Z.link));this.activeLink=v?v.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-sign-verify-message"]],decls:11,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper","mb-2"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Sign/Verify Message"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),A.YNc(8,Sa,2,3,"div",6),A.qZA(),A.TgZ(9,"div",7),A._UZ(10,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faUserCheck),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,ht.BU,ut.sg,ht.Nj,_t.rH,Ct.yH,_t.lC],styles:[""]}),i})();var x0=Pt(9122);function Ti(i,d){if(1&i&&(A.TgZ(0,"mat-option",7),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t),A.xp6(1),A.hij(" ",t.addressTp," ")}}let ai=(()=>{class i{constructor(t,s){this.store=t,this.clnEffects=s,this.addressTypes=a._t,this.selectedAddressType=a._t[0],this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,Et._E)({payload:this.selectedAddressType})),this.clnEffects.setNewAddressCL.pipe((0,St.q)(1)).subscribe(t=>{this.newAddress=t,setTimeout(()=>{this.store.dispatch((0,KA.qR)({payload:{data:{address:this.newAddress,addressType:this.selectedAddressType.addressTp,component:x0.n}}}))},0)})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(u.yh),A.Y36(Jn.J))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-on-chain-receive"]],decls:8,vars:2,consts:[["fxLayout","column",1,"padding-gap-x"],["fxLayout","row","fxLayoutAlign","space-between end","fxLayoutAlign.gt-sm","start end"],["fxFlex","48","fxFlex.gt-md","25","fxLayoutAlign","start end",1,"mr-2"],["placeholder","Address Type","name","address_type","tabindex","1",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"mt-2"],["mat-flat-button","","color","primary","tabindex","2",1,"top-minus-15px",3,"click"],[3,"value"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-select",3),A.NdJ("ngModelChange",function(Z){return s.selectedAddressType=Z}),A.YNc(4,Ti,2,2,"mat-option",4),A.qZA()(),A.TgZ(5,"div",5)(6,"button",6),A.NdJ("click",function(){return s.onGenerateAddress()}),A._uU(7,"Generate Address"),A.qZA()()()()),2&t&&(A.xp6(3),A.Q6J("ngModel",s.selectedAddressType),A.xp6(1),A.Q6J("ngForOf",s.addressTypes))},directives:[Ct.xw,Ct.Wh,P.KE,Ct.yH,QA.gD,OA.JJ,OA.On,ut.sg,CA.ey,w.lW],styles:[""]}),i})(),oi=(()=>{class i{constructor(t,s){this.store=t,this.activatedRoute=s,this.sweepAll=!1,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.activatedRoute.data.pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.sweepAll=t.sweepAll})}openSendFundsModal(){this.store.dispatch((0,KA.qR)({payload:{data:{sweepAll:this.sweepAll,component:Kr}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(u.yh),A.Y36(_t.gz))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"button",2),A.NdJ("click",function(){return s.openSendFundsModal()}),A._uU(3),A.qZA()()()),2&t&&(A.xp6(3),A.Oqu(s.sweepAll?"Sweep All":"Send Funds"))},directives:[Ct.xw,Ct.yH,Ct.Wh,w.lW],styles:[""]}),i})();var fi=Pt(8675),Na=Pt(4004),Ua=Pt(1079),Pa=Pt(9843);const Ur=["form"];function F0(i,d){if(1&i&&(A.TgZ(0,"mat-option",42),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(t.alias?t.alias:t.id?t.id:"")}}function ba(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Peer alias is required."),A.qZA())}function Y0(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Peer not found in the list."),A.qZA())}function T0(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",39),A.NdJ("change",function(){return A.CHM(t),A.oxw().onSelectedPeerChanged()}),A.qZA(),A.TgZ(2,"mat-autocomplete",40,41),A.NdJ("optionSelected",function(){return A.CHM(t),A.oxw().onSelectedPeerChanged()}),A.YNc(4,F0,2,2,"mat-option",26),A.ALo(5,"async"),A.qZA(),A.YNc(6,ba,2,0,"mat-error",17),A.YNc(7,Y0,2,0,"mat-error",17),A.qZA()}if(2&i){const t=A.MAs(3),s=A.oxw();A.xp6(1),A.Q6J("formControl",s.selectedPeer)("matAutocomplete",t),A.xp6(1),A.Q6J("displayWith",s.displayFn),A.xp6(2),A.Q6J("ngForOf",A.lcZ(5,6,s.filteredPeers)),A.xp6(2),A.Q6J("ngIf",null==s.selectedPeer.errors?null:s.selectedPeer.errors.required),A.xp6(1),A.Q6J("ngIf",null==s.selectedPeer.errors?null:s.selectedPeer.errors.notfound)}}function Me(i,d){1&i&&A.GkF(0)}function La(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount is required."),A.qZA())}function S0(i,d){if(1&i&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function N0(i,d){if(1&i&&(A.TgZ(0,"mat-option",42),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function Ra(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function U0(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-form-field",43)(1,"input",44,45),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().customFeeRate=v}),A.qZA(),A.YNc(3,Ra,2,0,"mat-error",17),A.qZA()}if(2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),A.xp6(2),A.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function P0(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function b0(i,d){if(1&i&&(A.TgZ(0,"mat-option",42),A._uU(1),A.ALo(2,"number"),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t),A.xp6(1),A.hij("",A.lcZ(2,2,t.value)," Sats")}}function za(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",22)(1,"mat-form-field",46)(2,"mat-select",47),A.NdJ("selectionChange",function(v){return A.CHM(t),A.oxw().onUTXOSelectionChange(v)})("valueChange",function(v){return A.CHM(t),A.oxw().selUTXOs=v}),A.TgZ(3,"mat-select-trigger"),A._uU(4),A.ALo(5,"number"),A.qZA(),A.YNc(6,b0,3,4,"mat-option",26),A.qZA()(),A.TgZ(7,"div",28)(8,"mat-slide-toggle",48),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().flgUseAllBalance=v})("change",function(){return A.CHM(t),A.oxw().onUTXOAllBalanceChange()}),A._uU(9," Use selected UTXOs balance "),A.qZA(),A.TgZ(10,"mat-icon",49),A._uU(11,"info_outline"),A.qZA()()()}if(2&i){const t=A.oxw();A.xp6(2),A.Q6J("value",t.selUTXOs),A.xp6(2),A.AsE("",A.lcZ(5,6,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),A.xp6(2),A.Q6J("ngForOf",t.utxos),A.xp6(2),A.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function Pr(i,d){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.channelConnectionError)}}function Ga(i,d){if(1&i&&(A.TgZ(0,"div",50),A._UZ(1,"fa-icon",51),A.YNc(2,Pr,2,1,"span",17),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.channelConnectionError)}}function L0(i,d){if(1&i&&(A.TgZ(0,"mat-expansion-panel",53)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),A._uU(4,"Peer: \xa0"),A.qZA(),A.TgZ(5,"strong",54),A._uU(6),A.qZA()()(),A.TgZ(7,"div",9)(8,"div",0)(9,"div",1)(10,"h4",55),A._uU(11,"Pubkey"),A.qZA(),A.TgZ(12,"span",56),A._uU(13),A.qZA()()(),A._UZ(14,"mat-divider",57),A.TgZ(15,"div",0)(16,"div",58)(17,"h4",55),A._uU(18,"Address"),A.qZA(),A.TgZ(19,"span",59),A._uU(20),A.qZA()(),A.TgZ(21,"div",58)(22,"h4",55),A._uU(23,"Connected"),A.qZA(),A.TgZ(24,"span",59),A._uU(25),A.qZA()()()()()),2&i){const t=A.oxw(2);A.xp6(6),A.Oqu((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.id)),A.xp6(7),A.Oqu(t.peer.id),A.xp6(7),A.Oqu(null==t.peer?null:t.peer.netaddr),A.xp6(5),A.Oqu(t.peer.connected?"True":"False")}}function R0(i,d){if(1&i&&A.YNc(0,L0,26,4,"mat-expansion-panel",52),2&i){const t=A.oxw();A.Q6J("ngIf",t.peer)}}const z0=function(i,d){return{"mr-6":i,"mr-2":d}};let Ha=(()=>{class i{constructor(t,s,v,Z,rt,vt){this.dialogRef=t,this.data=s,this.store=v,this.actions=Z,this.decimalPipe=rt,this.commonService=vt,this.selectedPeer=new OA.NI,this.faExclamationTriangle=h.eHv,this.isCompatibleVersion=!1,this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=0,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.fundingAmount=null,this.selectedPubkey="",this.isPrivate=!1,this.feeRateTypes=a.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.data.message?(this.isCompatibleVersion=this.data.message.isCompatibleVersion,this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.utxos=this.data.message.utxos,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[]):(this.isCompatibleVersion=!1,this.information={},this.totalBalance=0,this.utxos=[],this.peer=null,this.peers=[]),this.alertTitle=this.data.alertTitle||"Alert",this.actions.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(v=>v.type===a.AB.UPDATE_API_CALL_STATUS_CLN||v.type===a.AB.FETCH_CHANNELS_CLN)).subscribe(v=>{v.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&v.payload.status===a.Bn.ERROR&&"SaveNewChannel"===v.payload.action&&(this.channelConnectionError=v.payload.message),v.type===a.AB.FETCH_CHANNELS_CLN&&this.dialogRef.close()});let t="",s="";this.sortedPeers=this.peers.sort((v,Z)=>(t=v.alias?v.alias.toLowerCase():v.id?v.id.toLowerCase():"",s=Z.alias?Z.alias.toLowerCase():v.id?v.id.toLowerCase():"",ts?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,r.R)(this.unSubs[1]),(0,fi.O)(""),(0,Na.U)(v=>"string"==typeof v?v:v.alias?v.alias:v.id),(0,Na.U)(v=>v?this.filterPeers(v):this.sortedPeers.slice()))}filterPeers(t){var s;return null===(s=this.sortedPeers)||void 0===s?void 0:s.filter(v=>{var Z;return 0===(null===(Z=v.alias)||void 0===Z?void 0:Z.toLowerCase().indexOf(t?t.toLowerCase():""))})}displayFn(t){return t&&t.alias?t.alias:t&&t.id?t.id:""}onSelectedPeerChanged(){var t;if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.id?this.selectedPeer.value.id:null,"string"==typeof this.selectedPeer.value){const s=null===(t=this.peers)||void 0===t?void 0:t.filter(v=>{var Z,rt;return(null===(Z=v.alias)||void 0===Z?void 0:Z.length)===this.selectedPeer.value.length&&0===(null===(rt=v.alias)||void 0===rt?void 0:rt.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""))});1===s.length&&s[0].id&&(this.selectedPubkey=s[0].id)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.flgMinConf=!1,this.selFeeRate="",this.minConfValue=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(t){var s;t&&(this.flgMinConf||this.selFeeRate||this.selUTXOs.length&&0!==this.selUTXOs.length)?(this.advancedTitle="Advanced Options",this.flgMinConf&&(this.advancedTitle=this.advancedTitle+" | Min Confirmation Blocks: "+this.minConfValue),this.selFeeRate&&(this.advancedTitle=this.advancedTitle+" | Fee Rate: "+(this.customFeeRate?this.customFeeRate+" (Sats/vByte)":null===(s=this.feeRateTypes.find(v=>v.feeRateId===this.selFeeRate))||void 0===s?void 0:s.feeRateType)),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.advancedTitle=this.advancedTitle+" | Total Selected: "+this.selUTXOs.length+" | Selected UTXOs: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats")):this.advancedTitle="Advanced Options"}onUTXOSelectionChange(t){var s;this.selUTXOs.length&&this.selUTXOs.length>0?(this.totalSelectedUTXOAmount=null===(s=this.selUTXOs)||void 0===s?void 0:s.reduce((v,Z)=>v+(Z.value||0),0),this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=0,this.fundingAmount=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.fundingAmount=this.flgUseAllBalance?this.totalSelectedUTXOAmount:null}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||this.flgMinConf&&!this.minConfValue||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;const t={peerId:this.peer&&this.peer.id?this.peer.id:this.selectedPubkey,satoshis:this.flgUseAllBalance?"all":this.fundingAmount.toString(),announce:!this.isPrivate,minconf:this.flgMinConf?this.minConfValue:null};t.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,this.selUTXOs.length&&this.selUTXOs.length>0&&(t.utxos=[],this.selUTXOs.forEach(s=>t.utxos.push(s.txid+":"+s.output))),this.store.dispatch((0,Et.YX)({payload:t}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(Tt.eX),A.Y36(ut.JJ),A.Y36(C.v))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-open-channel"]],viewQuery:function(t,s){if(1&t&&A.Gf(Ur,7),2&t){let v;A.iGM(v=A.CRH())&&(s.form=v.first)}},decls:56,vars:34,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","70","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amount",3,"ngModel","step","min","max","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","25","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","54","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","42","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxFlex","54","fxLayoutAlign","start end"],["tabindex","6","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["tabindex","7","color","primary","name","flgUseAllBalance",3,"ngModel","disabled","ngModelChange","change"],["matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","before",1,"info-icon"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8),A.NdJ("submit",function(){return s.onOpenChannel()})("reset",function(){return s.resetData()}),A.TgZ(11,"div",9),A.YNc(12,T0,8,8,"mat-form-field",10),A.qZA(),A.YNc(13,Me,1,0,"ng-container",11),A.TgZ(14,"div",9)(15,"div",12)(16,"mat-form-field",13)(17,"input",14,15),A.NdJ("ngModelChange",function(Z){return s.fundingAmount=Z}),A.qZA(),A.TgZ(19,"mat-hint"),A._uU(20),A.ALo(21,"number"),A.qZA(),A.TgZ(22,"span",16),A._uU(23," Sats "),A.qZA(),A.YNc(24,La,2,0,"mat-error",17),A.YNc(25,S0,2,1,"mat-error",17),A.qZA(),A.TgZ(26,"div",18)(27,"mat-slide-toggle",19),A.NdJ("ngModelChange",function(Z){return s.isPrivate=Z}),A._uU(28,"Private Channel"),A.qZA()()(),A.TgZ(29,"mat-expansion-panel",20),A.NdJ("closed",function(){return s.onAdvancedPanelToggle(!0)})("opened",function(){return s.onAdvancedPanelToggle(!1)}),A.TgZ(30,"mat-expansion-panel-header")(31,"mat-panel-title")(32,"span"),A._uU(33),A.qZA()()(),A.TgZ(34,"div",21)(35,"div",22)(36,"div",23)(37,"mat-form-field",24)(38,"mat-select",25),A.NdJ("valueChange",function(Z){return s.selFeeRate=Z})("selectionChange",function(){return s.customFeeRate=null}),A.YNc(39,N0,2,2,"mat-option",26),A.qZA()(),A.YNc(40,U0,4,5,"mat-form-field",27),A.qZA(),A.TgZ(41,"div",28)(42,"mat-checkbox",29),A.NdJ("ngModelChange",function(Z){return s.flgMinConf=Z})("change",function(){return s.flgMinConf?s.selFeeRate=null:s.minConfValue=null}),A.qZA(),A.TgZ(43,"mat-form-field",30)(44,"input",31,32),A.NdJ("ngModelChange",function(Z){return s.minConfValue=Z}),A.qZA(),A.YNc(46,P0,2,0,"mat-error",17),A.qZA()()(),A.YNc(47,za,12,8,"div",33),A.qZA()()(),A.YNc(48,Ga,3,2,"div",34),A.TgZ(49,"div",35)(50,"button",36),A._uU(51,"Clear Fields"),A.qZA(),A.TgZ(52,"button",37),A._uU(53,"Open Channel"),A.qZA()()()()()(),A.YNc(54,R0,1,1,"ng-template",null,38,A.W1O)),2&t){const v=A.MAs(18),Z=A.MAs(55);A.xp6(5),A.Oqu(s.alertTitle),A.xp6(7),A.Q6J("ngIf",!s.peer&&s.peers&&s.peers.length>0),A.xp6(1),A.Q6J("ngTemplateOutlet",Z),A.xp6(4),A.Q6J("ngModel",s.fundingAmount)("step",1e3)("min",1)("max",s.totalBalance)("disabled",s.flgUseAllBalance),A.xp6(3),A.AsE("Remaining Bal: ",A.lcZ(21,29,s.totalBalance-(s.fundingAmount?s.fundingAmount:0)),"",s.flgUseAllBalance?". Amount replaced by UTXO balance":"",""),A.xp6(4),A.Q6J("ngIf",(null==v.errors?null:v.errors.required)||!s.fundingAmount),A.xp6(1),A.Q6J("ngIf",null==v.errors?null:v.errors.max),A.xp6(2),A.Q6J("ngModel",s.isPrivate),A.xp6(6),A.Oqu(s.advancedTitle),A.xp6(4),A.Q6J("fxFlex","customperkb"!==s.selFeeRate||s.flgMinConf?"100":"48"),A.xp6(1),A.Q6J("value",s.selFeeRate)("disabled",s.flgMinConf),A.xp6(1),A.Q6J("ngForOf",s.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===s.selFeeRate&&!s.flgMinConf),A.xp6(2),A.Q6J("ngModel",s.flgMinConf)("ngClass",A.WLB(31,z0,s.screenSize===s.screenSizeEnum.XS||s.screenSize===s.screenSizeEnum.SM,s.screenSize===s.screenSizeEnum.MD||s.screenSize===s.screenSizeEnum.LG||s.screenSize===s.screenSizeEnum.XL)),A.xp6(2),A.Q6J("ngModel",s.minConfValue)("step",1)("min",0)("required",s.flgMinConf)("disabled",!s.flgMinConf),A.xp6(2),A.Q6J("ngIf",s.flgMinConf&&!s.minConfValue),A.xp6(1),A.Q6J("ngIf",s.isCompatibleVersion),A.xp6(1),A.Q6J("ngIf",""!==s.channelConnectionError)}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,g.dn,OA._Y,OA.JL,OA.F,ut.O5,P.KE,H.Nt,OA.Fj,Ua.ZL,OA.Q7,OA.JJ,OA.oH,Ua.XC,ut.sg,CA.ey,P.TO,ut.tP,OA.wV,OA.qQ,OA.Fd,z.q,Pa.F,OA.On,P.bx,P.R9,PA.Rr,Ai.ib,Ai.yz,Ai.yK,QA.gD,Wt.oG,ut.mk,T.oO,QA.$L,m.Hw,nA.gM,e.BN,k.h,lA.d],pipes:[ut.Ov,ut.JJ],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),i})();function G0(i,d){if(1&i&&(A.TgZ(0,"span",7),A._uU(1,"Open"),A.qZA()),2&i){const t=A.oxw();A.s9C("matBadge",t.openChannels)}}function H0(i,d){if(1&i&&(A.TgZ(0,"span",7),A._uU(1,"Pending/Inactive"),A.qZA()),2&i){const t=A.oxw();A.s9C("matBadge",t.pendingChannels)}}let J0=(()=>{class i{constructor(t,s,v,Z){this.logger=t,this.store=s,this.commonService=v,this.router=Z,this.openChannels=0,this.pendingChannels=0,this.selNode={},this.information={},this.peers=[],this.utxos=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending/Inactive"}],this.activeLink=0,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(t=>t instanceof _t.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(s=>s.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(B.OL).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.selNode=t.nodeSettings,this.information=t.information,this.totalBalance=t.balance.totalBalance||0,this.logger.info(t)}),this.store.select(B.Wi).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{this.peers=t.peers}),this.store.select(B.T4).pipe((0,r.R)(this.unSubs[3])).subscribe(t=>{var s;this.utxos=this.commonService.sortAscByKey(null===(s=t.utxos)||void 0===s?void 0:s.filter(v=>"confirmed"===v.status),"value")}),this.store.select(B.ZW).pipe((0,r.R)(this.unSubs[4])).subscribe(t=>{this.openChannels=t.activeChannels.length||0,this.pendingChannels=t.pendingChannels.length+t.inactiveChannels.length||0,this.logger.info(t)})}onOpenChannel(){const t={peers:this.peers,information:this.information,balance:this.totalBalance,utxos:this.utxos,isCompatibleVersion:this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")};this.store.dispatch((0,KA.qR)({payload:{data:{alertTitle:"Open Channel",message:t,component:Ha}}}))}onSelectedTabChange(t){this.router.navigateByUrl("/cln/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-channels-tables"]],decls:12,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"button",2),A.NdJ("click",function(){return s.onOpenChannel()}),A._uU(3,"Open Channel"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-tab-group",4),A.NdJ("selectedIndexChange",function(Z){return s.activeLink=Z})("selectedTabChange",function(Z){return s.onSelectedTabChange(Z)}),A.TgZ(6,"mat-tab"),A.YNc(7,G0,2,1,"ng-template",5),A.qZA(),A.TgZ(8,"mat-tab"),A.YNc(9,H0,2,1,"ng-template",5),A.qZA()(),A.TgZ(10,"div",6),A._UZ(11,"router-outlet"),A.qZA()()()),2&t&&(A.xp6(5),A.Q6J("selectedIndex",s.activeLink))},directives:[Ct.xw,Ct.yH,Ct.Wh,w.lW,ht.SP,ht.uX,ht.uD,mr.k,_t.lC],styles:[""]}),i})();function br(i,d){if(1&i&&(A.TgZ(0,"div")(1,"div",9)(2,"div",1)(3,"h4",11),A._uU(4,"Funding Transaction Id"),A.qZA(),A.TgZ(5,"span",12),A._uU(6),A.qZA()()(),A._UZ(7,"mat-divider",13),A.qZA()),2&i){const t=A.oxw();A.xp6(6),A.Oqu(t.channel.funding_txid),A.xp6(1),A.Q6J("inset",!0)}}function O0(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Show Advanced"),A.qZA())}function ta(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Hide Advanced"),A.qZA())}function Ja(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"button",23),A.NdJ("copied",function(v){return A.CHM(t),A.oxw().onCopyChanID(v)}),A._uU(1,"Copy Short Channel ID"),A.qZA()}if(2&i){const t=A.oxw();A.Q6J("payload",t.channel.short_channel_id)}}function k0(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"button",24),A.NdJ("click",function(){return A.CHM(t),A.oxw().onClose()}),A._uU(1,"OK"),A.qZA()}}const tr=function(i){return{"xs-scroll-y":i}},Cn=function(i,d){return{"mt-2":i,"mt-1":d}};let er=(()=>{class i{constructor(t,s,v,Z,rt){this.dialogRef=t,this.data=s,this.logger=v,this.commonService=Z,this.snackBar=rt,this.faReceipt=h.dLy,this.showAdvanced=!1,this.showCopy=!0,this.showCopyField=null,this.screenSize="",this.screenSizeEnum=a.cu}ngOnInit(){this.channel=this.data.channel,this.showCopy=!!this.data.showCopy,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("Short channel ID "+t+" copied."),this.logger.info("Copied Text: "+t)}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(E.mQ),A.Y36(C.v),A.Y36(On.ux))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-channel-information"]],decls:94,vars:40,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","25"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3),A._UZ(4,"fa-icon",4),A.TgZ(5,"span",5),A._uU(6,"Channel Information"),A.qZA()(),A.TgZ(7,"button",6),A.NdJ("click",function(){return s.onClose()}),A._uU(8,"X"),A.qZA()(),A.TgZ(9,"mat-card-content",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h4",11),A._uU(14,"Short Channel ID"),A.qZA(),A.TgZ(15,"span",12),A._uU(16),A.qZA()(),A.TgZ(17,"div",10)(18,"h4",11),A._uU(19,"Peer Alias"),A.qZA(),A.TgZ(20,"span",12),A._uU(21),A.qZA()()(),A._UZ(22,"mat-divider",13),A.TgZ(23,"div",9)(24,"div",1)(25,"h4",11),A._uU(26,"Channel ID"),A.qZA(),A.TgZ(27,"span",12),A._uU(28),A.qZA()()(),A._UZ(29,"mat-divider",13),A.TgZ(30,"div",9)(31,"div",1)(32,"h4",11),A._uU(33,"Peer Public Key"),A.qZA(),A.TgZ(34,"span",12),A._uU(35),A.qZA()()(),A._UZ(36,"mat-divider",13),A.TgZ(37,"div",9)(38,"div",14)(39,"h4",11),A._uU(40,"mSatoshi to Us"),A.qZA(),A.TgZ(41,"span",15),A._uU(42),A.ALo(43,"number"),A.qZA()(),A.TgZ(44,"div",14)(45,"h4",11),A._uU(46,"Spendable (mSats)"),A.qZA(),A.TgZ(47,"span",15),A._uU(48),A.ALo(49,"number"),A.qZA()(),A.TgZ(50,"div",14)(51,"h4",11),A._uU(52,"Total (mSats)"),A.qZA(),A.TgZ(53,"span",15),A._uU(54),A.ALo(55,"number"),A.qZA()(),A.TgZ(56,"div",14)(57,"h4",11),A._uU(58,"State"),A.qZA(),A.TgZ(59,"span",15),A._uU(60),A.qZA()()(),A._UZ(61,"mat-divider",13),A.TgZ(62,"div",9)(63,"div",14)(64,"h4",11),A._uU(65,"Our Reserve (Sats)"),A.qZA(),A.TgZ(66,"span",15),A._uU(67),A.ALo(68,"number"),A.qZA()(),A.TgZ(69,"div",14)(70,"h4",11),A._uU(71,"Their Reserve (Sats)"),A.qZA(),A.TgZ(72,"span",15),A._uU(73),A.ALo(74,"number"),A.qZA()(),A.TgZ(75,"div",14)(76,"h4",11),A._uU(77,"Connected"),A.qZA(),A.TgZ(78,"span",15),A._uU(79),A.qZA()(),A.TgZ(80,"div",14)(81,"h4",11),A._uU(82,"Private"),A.qZA(),A.TgZ(83,"span",15),A._uU(84),A.qZA()()(),A._UZ(85,"mat-divider",13),A.YNc(86,br,8,2,"div",16),A.TgZ(87,"div",17)(88,"button",18),A.NdJ("click",function(){return s.onShowAdvanced()}),A.YNc(89,O0,2,0,"p",19),A.YNc(90,ta,2,0,"ng-template",null,20,A.W1O),A.qZA(),A.YNc(92,Ja,2,1,"button",21),A.YNc(93,k0,2,0,"button",22),A.qZA()()()()()),2&t){const v=A.MAs(91);A.xp6(4),A.Q6J("icon",s.faReceipt),A.xp6(5),A.Q6J("ngClass",A.VKq(35,tr,s.screenSize===s.screenSizeEnum.XS)),A.xp6(7),A.Oqu(s.channel.short_channel_id),A.xp6(5),A.Oqu(s.channel.alias),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(s.channel.channel_id),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(s.channel.id),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(A.lcZ(43,25,s.channel.msatoshi_to_us)),A.xp6(6),A.Oqu(A.lcZ(49,27,s.channel.spendable_msatoshi)),A.xp6(6),A.Oqu(A.lcZ(55,29,s.channel.msatoshi_total)),A.xp6(6),A.Oqu(s.channel.state),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(A.lcZ(68,31,s.channel.our_channel_reserve_satoshis)),A.xp6(6),A.Oqu(A.lcZ(74,33,s.channel.their_channel_reserve_satoshis)),A.xp6(6),A.Oqu(s.channel.connected?"Yes":"No"),A.xp6(5),A.Oqu(s.channel.private?"Yes":"No"),A.xp6(1),A.Q6J("inset",!0),A.xp6(1),A.Q6J("ngIf",s.showAdvanced),A.xp6(1),A.Q6J("ngClass",A.WLB(37,Cn,!s.showAdvanced,s.showAdvanced)),A.xp6(2),A.Q6J("ngIf",!s.showAdvanced)("ngIfElse",v),A.xp6(3),A.Q6J("ngIf",s.showCopy),A.xp6(1),A.Q6J("ngIf",!s.showCopy)}},directives:[Ct.xw,Ct.Wh,Ct.yH,g.dk,e.BN,w.lW,g.dn,ut.mk,T.oO,lA.d,ut.O5,k.h,pi.y],pipes:[ut.JJ],styles:[""]}),i})();function Oa(i,d){1&i&&A._UZ(0,"mat-progress-bar",39)}function j0(i,d){1&i&&A._UZ(0,"th",40)}function K0(i,d){if(1&i&&(A.TgZ(0,"span",44),A._UZ(1,"fa-icon",45),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faEyeSlash)}}function V0(i,d){if(1&i&&(A.TgZ(0,"span",46),A._UZ(1,"fa-icon",45),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faEye)}}function W0(i,d){if(1&i&&(A.TgZ(0,"td",41),A.YNc(1,K0,2,1,"span",42),A.YNc(2,V0,2,1,"span",43),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Q6J("ngIf",t.private),A.xp6(1),A.Q6J("ngIf",!t.private)}}function Z0(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1," Short Channel ID "),A.qZA())}const nr=function(i){return{"max-width":i}};function X0(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"div",49)(2,"span",50),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,nr,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.short_channel_id)}}function q0(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1," Alias "),A.qZA())}function ka(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"div",49)(2,"span",50),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,nr,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.alias)}}function _0(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1," Id "),A.qZA())}function $0(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"div",49)(2,"span",50),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,nr,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.id)}}function Al(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1," Channel Id "),A.qZA())}function hi(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"div",49)(2,"span",50),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,nr,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.channel_id)}}function tl(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1," Funding Transaction Id "),A.qZA())}function Lr(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"div",49)(2,"span",50),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,nr,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.funding_txid)}}function el(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1," Connected "),A.qZA())}function nl(i,d){if(1&i&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function il(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Local Reserve (Sats) "),A.qZA())}function ja(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"span",52),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,null==t?null:t.our_channel_reserve_satoshis,"1.0-0")," ")}}function rl(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Remote Reserve (Sats) "),A.qZA())}function al(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"span",52),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,null==t?null:t.their_channel_reserve_satoshis,"1.0-0")," ")}}function ol(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Total (Sats) "),A.qZA())}function sl(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"span",52),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_total)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function Ka(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Spendable (Sats) "),A.qZA())}function ll(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"span",52),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.spendable_msatoshi)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function Va(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Local Balance (Sats) "),A.qZA())}function Wa(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"span",52),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_to_us)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function Za(i,d){1&i&&(A.TgZ(0,"th",51),A._uU(1," Remote Balance (Sats) "),A.qZA())}function cl(i,d){if(1&i&&(A.TgZ(0,"td",48)(1,"span",52),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_to_them)/1e3,(null==t?null:t.msatoshi_to_them)<1e3?"1.0-4":"1.0-0")," ")}}function gl(i,d){1&i&&(A.TgZ(0,"th",53),A._uU(1,"Balance Score "),A.qZA())}function Bl(i,d){if(1&i&&(A.TgZ(0,"td",54)(1,"div",55)(2,"mat-hint",56),A._uU(3),A.ALo(4,"number"),A.qZA()(),A._UZ(5,"mat-progress-bar",57),A.qZA()),2&i){const t=d.$implicit;A.xp6(3),A.Oqu(A.lcZ(4,2,t.balancedness||0)),A.xp6(2),A.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function ul(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",58)(1,"div",59)(2,"mat-select",60),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",61),A.NdJ("click",function(){return A.CHM(t),A.oxw().onChannelUpdate("all")}),A._uU(5,"Update Fee Policy"),A.qZA(),A.TgZ(6,"mat-option",61),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(7,"Download CSV"),A.qZA()()()()}}function fl(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",62)(1,"div",59)(2,"mat-select",63),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",61),A.NdJ("click",function(v){const rt=A.CHM(t).$implicit;return A.oxw().onChannelClick(rt,v)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",61),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onViewRemotePolicy(Z)}),A._uU(7,"View Remote Fee"),A.qZA(),A.TgZ(8,"mat-option",61),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onChannelUpdate(Z)}),A._uU(9,"Update Fee Policy"),A.qZA(),A.TgZ(10,"mat-option",61),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onChannelClose(Z)}),A._uU(11,"Close Channel"),A.qZA()()()()}}function Xa(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No peers connected. Add a peer in order to open a channel."),A.qZA())}function hl(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No channel available."),A.qZA())}function El(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting channels..."),A.qZA())}function wl(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function Cl(i,d){if(1&i&&(A.TgZ(0,"td",64),A.YNc(1,Xa,2,0,"p",65),A.YNc(2,hl,2,0,"p",65),A.YNc(3,El,2,0,"p",65),A.YNc(4,wl,2,1,"p",65),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Ql=function(i){return{"display-none":i}};function dl(i,d){if(1&i&&A._UZ(0,"tr",66),2&i){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,Ql,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function qa(i,d){1&i&&A._UZ(0,"tr",67)}function _a(i,d){1&i&&A._UZ(0,"tr",68)}const Ml=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}},pl=function(){return["no_peer"]};let ml=(()=>{class i{constructor(t,s,v,Z,rt,vt){var Ot,qe,Bn,se,_e,ti,Zn,la;this.logger=t,this.store=s,this.rtlEffects=v,this.clnEffects=Z,this.commonService=rt,this.router=vt,this.faEye=h.Mdf,this.faEyeSlash=h.Aq,this.PAGE_ID="peers_channels",this.tableSetting={tableId:"open_channels",recordsPerPage:a.IV,sortBy:"alias",sortOrder:a.Pi.DESCENDING},this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=a.vn,this.selFilter="",this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.selFilter=(null===(se=null===(Bn=null===(qe=null===(Ot=this.router)||void 0===Ot?void 0:Ot.getCurrentNavigation())||void 0===qe?void 0:qe.extras)||void 0===Bn?void 0:Bn.state)||void 0===se?void 0:se.filter)?null===(la=null===(Zn=null===(ti=null===(_e=this.router)||void 0===_e?void 0:_e.getCurrentNavigation())||void 0===ti?void 0:ti.extras)||void 0===Zn?void 0:Zn.state)||void 0===la?void 0:la.filter:""}ngOnInit(){this.store.select(B.jK).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance||0,this.logger.info(t)}),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("private"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.ZW).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.channelsData=t.activeChannels,this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}onViewRemotePolicy(t){this.store.dispatch((0,Et.$A)({payload:{uiMessage:a.m6.GET_REMOTE_POLICY,shortChannelID:t.short_channel_id||"",showError:!0}})),this.clnEffects.setLookupCL.pipe((0,St.q)(1)).subscribe(s=>{if(0===s.length)return!1;let v={};v=s[0].source!==this.information.id?s[0]:s[1];const Z=[[{key:"base_fee_millisatoshi",value:v.base_fee_millisatoshi,title:"Base Fees (mSats)",width:34,type:a.Gi.NUMBER},{key:"fee_per_millionth",value:v.fee_per_millionth,title:"Fee/Millionth",width:33,type:a.Gi.NUMBER},{key:"delay",value:v.delay,title:"Delay",width:33,type:a.Gi.NUMBER}]],rt="Remote policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id);setTimeout(()=>{this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Remote Channel Policy",titleMessage:rt,message:Z}}}))},0)})}onChannelUpdate(t){"all"!==t&&"ONCHAIN"===t.state||("all"===t?(this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update All",message:[],titleMessage:"Update fee policy for all channels",flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:1,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,r.R)(this.unSubs[3])).subscribe(v=>{v&&this.store.dispatch((0,Et.pW)({payload:{baseFeeMsat:v[0].inputValue,feeRate:v[1].inputValue,channelId:"all"}}))})):(this.myChanPolicy={fee_base_msat:0,fee_rate_milli_msat:0},this.store.dispatch((0,Et.$A)({payload:{uiMessage:a.m6.GET_CHAN_POLICY,shortChannelID:t.short_channel_id,showError:!1}})),this.clnEffects.setLookupCL.pipe((0,St.q)(1)).subscribe(s=>{this.myChanPolicy=s.length>0&&s[0].source===this.information.id?{fee_base_msat:s[0].base_fee_millisatoshi,fee_rate_milli_msat:s[0].fee_per_millionth}:s.length>1&&s[1].source===this.information.id?{fee_base_msat:s[1].base_fee_millisatoshi,fee_rate_milli_msat:s[1].fee_per_millionth}:{fee_base_msat:0,fee_rate_milli_msat:0},this.logger.info(this.myChanPolicy);const v="Update fee policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),Z=[];setTimeout(()=>{this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:Z,titleMessage:v,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:""===this.myChanPolicy.fee_base_msat?0:this.myChanPolicy.fee_base_msat,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:this.myChanPolicy.fee_rate_milli_msat,min:1,width:48,hintFunction:this.percentHintFunction}]}}}))},0)}),this.rtlEffects.closeConfirm.pipe((0,r.R)(this.unSubs[4])).subscribe(s=>{s&&this.store.dispatch((0,Et.pW)({payload:{baseFeeMsat:s[0].inputValue,feeRate:s[1].inputValue,channelId:t.channel_id}}))})),this.applyFilter())}percentHintFunction(t){return(t/1e4).toString()+"%"}onChannelClose(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Close Channel",titleMessage:"Closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,r.R)(this.unSubs[5])).subscribe(s=>{s&&this.store.dispatch((0,Et.BL)({payload:{id:t.id||"",channelId:t.channel_id||"",force:!1}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{channel:t,showCopy:!0,component:er}}}))}loadChannelsTable(t){var s;this.channels=new xA.by([...t]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,null===(s=this.channels.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.channels.filterPredicate=(v,Z)=>((v.connected?"connected":"disconnected")+(v.channel_id?v.channel_id.toLowerCase():"")+(v.short_channel_id?v.short_channel_id.toLowerCase():"")+(v.id?v.id.toLowerCase():"")+(v.alias?v.alias.toLowerCase():"")+(v.private?"private":"public")+(v.state?v.state.toLowerCase():"")+(v.funding_txid?v.funding_txid.toLowerCase():"")+(v.msatoshi_to_us?v.msatoshi_to_us:"")+(v.msatoshi_total?v.msatoshi_total:"")+(v.their_channel_reserve_satoshis?v.their_channel_reserve_satoshis:"")+(v.our_channel_reserve_satoshis?v.our_channel_reserve_satoshis:"")+(v.spendable_msatoshi?v.spendable_msatoshi:"")).includes(Z),this.channels.paginator=this.paginator,this.applyFilter(),this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Open-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(DA.V),A.Y36(Jn.J),A.Y36(C.v),A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-channel-open-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Channels")}])],decls:60,vars:13,consts:[["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","private"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","id"],["matColumnDef","channel_id"],["matColumnDef","funding_txid"],["matColumnDef","connected"],["matColumnDef","our_channel_reserve_satoshis"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pl-1",4,"matHeaderCellDef"],["matColumnDef","their_channel_reserve_satoshis"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","msatoshi_to_us"],["matColumnDef","msatoshi_to_them"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-2",4,"matHeaderCellDef"],["mat-cell","","class","pl-2",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","",1,"pl-1"],["mat-cell","",1,"pl-1"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pl-1"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-2"],["mat-cell","",1,"pl-2"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"div",2),A.TgZ(3,"mat-form-field",3)(4,"input",4),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(Z){return s.selFilter=Z}),A.qZA()()(),A.YNc(5,Oa,1,0,"mat-progress-bar",5),A.TgZ(6,"div",6)(7,"table",7,8),A.ynx(9,9),A.YNc(10,j0,1,0,"th",10),A.YNc(11,W0,3,2,"td",11),A.BQk(),A.ynx(12,12),A.YNc(13,Z0,2,0,"th",13),A.YNc(14,X0,4,4,"td",14),A.BQk(),A.ynx(15,15),A.YNc(16,q0,2,0,"th",13),A.YNc(17,ka,4,4,"td",14),A.BQk(),A.ynx(18,16),A.YNc(19,_0,2,0,"th",13),A.YNc(20,$0,4,4,"td",14),A.BQk(),A.ynx(21,17),A.YNc(22,Al,2,0,"th",13),A.YNc(23,hi,4,4,"td",14),A.BQk(),A.ynx(24,18),A.YNc(25,tl,2,0,"th",13),A.YNc(26,Lr,4,4,"td",14),A.BQk(),A.ynx(27,19),A.YNc(28,el,2,0,"th",13),A.YNc(29,nl,2,1,"td",14),A.BQk(),A.ynx(30,20),A.YNc(31,il,2,0,"th",21),A.YNc(32,ja,4,4,"td",14),A.BQk(),A.ynx(33,22),A.YNc(34,rl,2,0,"th",21),A.YNc(35,al,4,4,"td",14),A.BQk(),A.ynx(36,23),A.YNc(37,ol,2,0,"th",21),A.YNc(38,sl,4,4,"td",14),A.BQk(),A.ynx(39,24),A.YNc(40,Ka,2,0,"th",21),A.YNc(41,ll,4,4,"td",14),A.BQk(),A.ynx(42,25),A.YNc(43,Va,2,0,"th",21),A.YNc(44,Wa,4,4,"td",14),A.BQk(),A.ynx(45,26),A.YNc(46,Za,2,0,"th",21),A.YNc(47,cl,4,4,"td",14),A.BQk(),A.ynx(48,27),A.YNc(49,gl,2,0,"th",28),A.YNc(50,Bl,6,4,"td",29),A.BQk(),A.ynx(51,30),A.YNc(52,ul,8,0,"th",31),A.YNc(53,fl,12,0,"td",32),A.BQk(),A.ynx(54,33),A.YNc(55,Cl,5,4,"td",34),A.BQk(),A.YNc(56,dl,1,3,"tr",35),A.YNc(57,qa,1,0,"tr",36),A.YNc(58,_a,1,0,"tr",37),A.qZA()(),A._UZ(59,"mat-paginator",38),A.qZA()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(1),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(2),A.Q6J("dataSource",s.channels)("ngClass",A.VKq(10,Ml,""!==s.errorMessage)),A.xp6(49),A.Q6J("matFooterRowDef",A.DdM(12,pl)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.Wh,Ct.yH,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,ut.O5,S.pW,_.$V,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,nA.gM,e.BN,ut.PC,T.Zl,P.bx,QA.gD,QA.$L,CA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.JJ],styles:[".mat-column-private[_ngcontent-%COMP%]{width:2rem}.mat-column-short_channel_id[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%], .mat-column-channel_id[_ngcontent-%COMP%], .mat-column-funding_txid[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-short_channel_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-channel_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-funding_txid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 22%;width:22%}.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();const ln=["outputIdx"];function Si(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Output Index required."),A.qZA())}function Il(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Invalid index value."),A.qZA())}function $a(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Fees is required."),A.qZA())}function vl(i,d){if(1&i&&(A.TgZ(0,"div",27),A._UZ(1,"fa-icon",13),A.TgZ(2,"span"),A._uU(3),A.qZA()()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(2),A.Oqu(t.bumpFeeError)}}let Dl=(()=>{class i{constructor(t,s,v,Z,rt,vt){this.actions=t,this.dialogRef=s,this.data=v,this.store=Z,this.logger=rt,this.snackBar=vt,this.newAddress="",this.fees=null,this.outputIndex=null,this.faCopy=h.kZ_,this.faInfoCircle=h.sqG,this.faExclamationTriangle=h.eHv,this.bumpFeeError="",this.unSubs=[new c.x,new c.x]}set payReq(t){t&&(this.outputIdx=t)}ngOnInit(){this.bumpFeeChannel=this.data.channel}onBumpFee(){if(!this.outputIndex&&0!==this.outputIndex||!this.fees)return!0;this.bumpFeeError="",this.store.dispatch((0,Et._E)({payload:a._t[0]})),this.actions.pipe((0,JA.h)(t=>t.type===a.AB.SET_NEW_ADDRESS_CLN),(0,St.q)(1)).subscribe(t=>{this.store.dispatch((0,Et.Wi)({payload:{address:t.payload,satoshis:"all",feeRate:(1e3*+(this.fees||0)).toString(),utxos:[this.bumpFeeChannel.funding_txid+":"+(this.outputIndex||"").toString()]}}))}),this.actions.pipe((0,JA.h)(t=>t.type===a.AB.SET_CHANNEL_TRANSACTION_RES_CLN),(0,St.q)(1)).subscribe(t=>{this.store.dispatch((0,KA.jW)({payload:"Successfully bumped the fee. Use the block explorer to verify transaction."})),this.dialogRef.close()}),this.actions.pipe((0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN),(0,r.R)(this.unSubs[0])).subscribe(t=>{t.payload.status===a.Bn.ERROR&&("SetChannelTransaction"===t.payload.action||"GenerateNewAddress"===t.payload.action)&&(this.logger.error(t.payload.message),this.bumpFeeError=t.payload.message)})}onCopyID(t){this.snackBar.open("Transaction ID copied.")}resetData(){this.bumpFeeError="",this.fees=null,this.outputIndex=null,this.outputIdx.control.setErrors(null)}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Tt.eX),A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(E.mQ),A.Y36(On.ux))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-bump-fee"]],viewQuery:function(t,s){if(1&t&&A.Gf(ln,5),2&t){let v;A.iGM(v=A.CRH())&&(s.payReq=v.first)}},decls:47,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxLayout","column",1,"bordered-box","mb-1","p-2"],["fxLayoutAlign","start center",1,"pb-1","word-break"],["matSuffix","","rtlClipboard","","matTooltip","Copy transaction ID",1,"ml-1",3,"icon","payload","copied"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxFlex","100"],[1,"pl-1"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","49"],["autoFocus","","matInput","","placeholder","Output Index","type","number","tabindex","1","required","","name","outputIdx",3,"ngModel","step","min","ngModelChange"],["outputIdx","ngModel"],[4,"ngIf"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","fees","required","","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center"],["mat-button","","color","primary","type","reset","tabindex","5","default","",1,"mr-1",3,"click"],["mat-button","","color","primary","type","submit","tabindex","6",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Bump Fee"),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7)(10,"div",8)(11,"p",9),A._uU(12),A.TgZ(13,"fa-icon",10),A.NdJ("copied",function(Z){return s.onCopyID(Z)}),A.qZA()(),A.TgZ(14,"div",11)(15,"div",12),A._UZ(16,"fa-icon",13),A.TgZ(17,"span",14),A._uU(18,"Bumping fee on pending open channels is an advanced feature, attempt it only if you are familiar with the functionality of Bitcoin transactions. "),A.TgZ(19,"div"),A._uU(20,"Before attempting fee bump ensure the following:"),A.qZA(),A.TgZ(21,"div",15),A._uU(22,"1: Use a Bitcoin block explorer to ensure that channel opening transaction is not confirmed."),A.qZA(),A.TgZ(23,"div",15),A._uU(24,"2: The channel opening transaction must have a sizable change output, which can be spent further. The fee cannot be bumped without the change output."),A.qZA(),A.TgZ(25,"div",15),A._uU(26,"3: Find the index value of the change output via a block explorer."),A.qZA(),A.TgZ(27,"div",15),A._uU(28,"4: Enter the index value of the change output in the form below and the desired fee rate."),A.qZA(),A.TgZ(29,"div",15),A._uU(30,"5: Upon successful fee bump, use your block explorer to track the child transaction in the mempool, which should be linked with the change output transaction."),A.qZA()()(),A.TgZ(31,"div",16)(32,"mat-form-field",17)(33,"input",18,19),A.NdJ("ngModelChange",function(Z){return s.outputIndex=Z}),A.qZA(),A.YNc(35,Si,2,0,"mat-error",20),A.YNc(36,Il,2,0,"mat-error",20),A.qZA(),A.TgZ(37,"mat-form-field",17)(38,"input",21,22),A.NdJ("ngModelChange",function(Z){return s.fees=Z}),A.qZA(),A.YNc(40,$a,2,0,"mat-error",20),A.qZA()(),A.YNc(41,vl,4,2,"div",23),A.qZA()(),A.TgZ(42,"div",24)(43,"button",25),A.NdJ("click",function(){return s.resetData()}),A._uU(44,"Clear"),A.qZA(),A.TgZ(45,"button",26),A.NdJ("click",function(){return s.onBumpFee()}),A._uU(46),A.qZA()()()()()()),2&t){const v=A.MAs(34);A.xp6(12),A.hij("Bump fee for transaction id: ",null==s.bumpFeeChannel?null:s.bumpFeeChannel.funding_txid," "),A.xp6(1),A.Q6J("icon",s.faCopy)("payload",null==s.bumpFeeChannel?null:s.bumpFeeChannel.funding_txid),A.xp6(3),A.Q6J("icon",s.faInfoCircle),A.xp6(17),A.Q6J("ngModel",s.outputIndex)("step",1)("min",0),A.xp6(2),A.Q6J("ngIf",null==v.errors?null:v.errors.required),A.xp6(1),A.Q6J("ngIf",null==v.errors?null:v.errors.pendingChannelOutputIndex),A.xp6(2),A.Q6J("ngModel",s.fees)("step",1)("min",0),A.xp6(2),A.Q6J("ngIf",!s.fees),A.xp6(1),A.Q6J("ngIf",""!==s.bumpFeeError),A.xp6(5),A.Oqu(""!==s.bumpFeeError?"Retry Bump Fee":"Bump Fee")}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,g.dn,OA._Y,OA.JL,OA.F,e.BN,P.R9,pi.y,nA.gM,P.KE,H.Nt,OA.wV,OA.qQ,OA.Fj,z.q,k.h,OA.Q7,OA.JJ,OA.On,ut.O5,P.TO],styles:[""]}),i})();function Ao(i,d){1&i&&A._UZ(0,"mat-progress-bar",37)}function yl(i,d){1&i&&A._UZ(0,"th",38)}function xl(i,d){if(1&i&&(A.TgZ(0,"span",42),A._UZ(1,"fa-icon",43),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faEyeSlash)}}function to(i,d){if(1&i&&(A.TgZ(0,"span",44),A._UZ(1,"fa-icon",43),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faEye)}}function Fl(i,d){if(1&i&&(A.TgZ(0,"td",39),A.YNc(1,xl,2,1,"span",40),A.YNc(2,to,2,1,"span",41),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Q6J("ngIf",t.private),A.xp6(1),A.Q6J("ngIf",!t.private)}}function Ni(i,d){1&i&&(A.TgZ(0,"th",45),A._uU(1," Alias "),A.qZA())}const ir=function(i){return{"max-width":i}};function Yl(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"div",47)(2,"span",48),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,ir,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.alias)}}function Tl(i,d){1&i&&(A.TgZ(0,"th",45),A._uU(1," Id "),A.qZA())}function Sl(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"div",47)(2,"span",48),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,ir,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.id)}}function eo(i,d){1&i&&(A.TgZ(0,"th",45),A._uU(1," Channel Id "),A.qZA())}function ea(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"div",47)(2,"span",48),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,ir,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.channel_id)}}function si(i,d){1&i&&(A.TgZ(0,"th",45),A._uU(1," Funding Transaction Id "),A.qZA())}function Nl(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"div",47)(2,"span",48),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,ir,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.funding_txid)}}function Ul(i,d){1&i&&(A.TgZ(0,"th",45),A._uU(1," Connected "),A.qZA())}function Pl(i,d){if(1&i&&(A.TgZ(0,"td",46),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function bl(i,d){1&i&&(A.TgZ(0,"th",38),A._uU(1," State "),A.qZA())}function Vl(i,d){if(1&i&&(A.TgZ(0,"td",49),A._uU(1),A.qZA()),2&i){const t=d.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(2,ir,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(1),A.hij(" ",s.CLNChannelPendingState[null==t?null:t.state]," ")}}function Ll(i,d){1&i&&(A.TgZ(0,"th",50),A._uU(1," Local Reserve (Sats) "),A.qZA())}function Rl(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"span",51),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,null==t?null:t.our_channel_reserve_satoshis,"1.0-0")," ")}}function zl(i,d){1&i&&(A.TgZ(0,"th",50),A._uU(1," Remote Reserve (Sats) "),A.qZA())}function Gl(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"span",51),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,null==t?null:t.their_channel_reserve_satoshis,"1.0-0")," ")}}function no(i,d){1&i&&(A.TgZ(0,"th",50),A._uU(1," Total (Sats) "),A.qZA())}function Hl(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"span",51),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_total)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function eA(i,d){1&i&&(A.TgZ(0,"th",50),A._uU(1," Spendable (Sats) "),A.qZA())}function G(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"span",51),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.spendable_msatoshi)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function V(i,d){1&i&&(A.TgZ(0,"th",50),A._uU(1," Local Balance (Sats) "),A.qZA())}function p(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"span",51),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_to_us)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function F(i,d){1&i&&(A.TgZ(0,"th",50),A._uU(1," Remote Balance (Sats) "),A.qZA())}function L(i,d){if(1&i&&(A.TgZ(0,"td",46)(1,"span",51),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_to_them)/1e3,(null==t?null:t.msatoshi_to_them)<1e3?"1.0-4":"1.0-0")," ")}}function tA(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",52)(1,"div",53)(2,"mat-select",54),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",55),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function oA(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-option",55),A.NdJ("click",function(){A.CHM(t);const v=A.oxw().$implicit;return A.oxw().onChannelClose(v)}),A._uU(1,"Close Channel"),A.qZA()}}function sA(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-option",55),A.NdJ("click",function(){A.CHM(t);const v=A.oxw().$implicit;return A.oxw().onBumpFee(v)}),A._uU(1,"Bump Fee"),A.qZA()}}function aA(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",56)(1,"div",53)(2,"mat-select",57),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",55),A.NdJ("click",function(v){const rt=A.CHM(t).$implicit;return A.oxw().onChannelClick(rt,v)}),A._uU(5,"View Info"),A.qZA(),A.YNc(6,oA,2,0,"mat-option",58),A.YNc(7,sA,2,0,"mat-option",58),A.qZA()()()}if(2&i){const t=d.$implicit,s=A.oxw();A.xp6(6),A.Q6J("ngIf",s.isCompatibleVersion&&("CHANNELD_SHUTTING_DOWN"===t.state||"CLOSINGD_SIGEXCHANGE"===t.state||!t.connected&&"CHANNELD_NORMAL"===t.state)),A.xp6(1),A.Q6J("ngIf","CHANNELD_AWAITING_LOCKIN"===t.state)}}function NA(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No peers connected. Add a peer in order to open a channel."),A.qZA())}function kA(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No pending/inactive channel available."),A.qZA())}function ct(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting pending/inactive channels..."),A.qZA())}function _A(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function Bt(i,d){if(1&i&&(A.TgZ(0,"td",59),A.YNc(1,NA,2,0,"p",60),A.YNc(2,kA,2,0,"p",60),A.YNc(3,ct,2,0,"p",60),A.YNc(4,_A,2,1,"p",60),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const pt=function(i){return{"display-none":i}};function yt(i,d){if(1&i&&A._UZ(0,"tr",61),2&i){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,pt,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Jt(i,d){1&i&&A._UZ(0,"tr",62)}function te(i,d){1&i&&A._UZ(0,"tr",63)}const Ae=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}},oe=function(){return["no_peer"]};let fe=(()=>{class i{constructor(t,s,v,Z){this.logger=t,this.store=s,this.rtlEffects=v,this.commonService=Z,this.faEye=h.Mdf,this.faEyeSlash=h.Aq,this.PAGE_ID="peers_channels",this.tableSetting={tableId:"pending_inactive_channels",recordsPerPage:a.IV,sortBy:"alias",sortOrder:a.Pi.DESCENDING},this.isCompatibleVersion=!1,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=a.vn,this.selFilter="",this.CLNChannelPendingState=a.Zs,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(B.jK).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.information.api_version&&(this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.api_version,"0.4.2")),this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance||0,this.logger.info(t)}),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("private"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.ZW).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.channelsData=[...t.pendingChannels,...t.inactiveChannels],this.channelsData=this.channelsData.sort((s,v)=>this.CLNChannelPendingState[s.state||""]>=this.CLNChannelPendingState[v.state||""]?1:-1),this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onBumpFee(t){this.store.dispatch((0,KA.qR)({payload:{data:{channel:t,component:Dl}}}))}onChannelClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{channel:t,showCopy:!0,component:er}}}))}onChannelClose(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Force Close Channel",titleMessage:"Force closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Force Close"}}})),this.rtlEffects.closeConfirm.pipe((0,r.R)(this.unSubs[3])).subscribe(s=>{s&&this.store.dispatch((0,Et.BL)({payload:{id:t.id,channelId:t.channel_id,force:!0}}))})}loadChannelsTable(t){var s;this.channels=new xA.by([...t]),this.channels.filterPredicate=(v,Z)=>((v.connected?"connected":"disconnected")+(v.channel_id?v.channel_id.toLowerCase():"")+(v.short_channel_id?v.short_channel_id.toLowerCase():"")+(v.id?v.id.toLowerCase():"")+(v.alias?v.alias.toLowerCase():"")+(v.private?"private":"public")+(v.state&&this.CLNChannelPendingState[v.state]?this.CLNChannelPendingState[v.state].toLowerCase():"")+(v.funding_txid?v.funding_txid.toLowerCase():"")+(v.msatoshi_to_us?v.msatoshi_to_us:"")+(v.msatoshi_total?v.msatoshi_total:"")+(v.their_channel_reserve_satoshis?v.their_channel_reserve_satoshis:"")+(v.our_channel_reserve_satoshis?v.our_channel_reserve_satoshis:"")+(v.spendable_msatoshi?v.spendable_msatoshi:"")).includes(Z),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(v,Z)=>"state"===Z?this.CLNChannelPendingState[v.state]:v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,null===(s=this.channels.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Pending-inactive-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(DA.V),A.Y36(C.v))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-channel-pending-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Channels")}])],decls:57,vars:13,consts:[["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","private"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","channel_id"],["matColumnDef","funding_txid"],["matColumnDef","connected"],["matColumnDef","state"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","our_channel_reserve_satoshis"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pl-1",4,"matHeaderCellDef"],["matColumnDef","their_channel_reserve_satoshis"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","msatoshi_to_us"],["matColumnDef","msatoshi_to_them"],["matColumnDef","actions"],["mat-header-cell","","class","px-2",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-2",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","",1,"pl-1"],["mat-cell","",1,"pl-1"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pl-1"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-2"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-2"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"div",2),A.TgZ(3,"mat-form-field",3)(4,"input",4),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(Z){return s.selFilter=Z}),A.qZA()()(),A.YNc(5,Ao,1,0,"mat-progress-bar",5),A.TgZ(6,"div",6)(7,"table",7,8),A.ynx(9,9),A.YNc(10,yl,1,0,"th",10),A.YNc(11,Fl,3,2,"td",11),A.BQk(),A.ynx(12,12),A.YNc(13,Ni,2,0,"th",13),A.YNc(14,Yl,4,4,"td",14),A.BQk(),A.ynx(15,15),A.YNc(16,Tl,2,0,"th",13),A.YNc(17,Sl,4,4,"td",14),A.BQk(),A.ynx(18,16),A.YNc(19,eo,2,0,"th",13),A.YNc(20,ea,4,4,"td",14),A.BQk(),A.ynx(21,17),A.YNc(22,si,2,0,"th",13),A.YNc(23,Nl,4,4,"td",14),A.BQk(),A.ynx(24,18),A.YNc(25,Ul,2,0,"th",13),A.YNc(26,Pl,2,1,"td",14),A.BQk(),A.ynx(27,19),A.YNc(28,bl,2,0,"th",10),A.YNc(29,Vl,2,4,"td",20),A.BQk(),A.ynx(30,21),A.YNc(31,Ll,2,0,"th",22),A.YNc(32,Rl,4,4,"td",14),A.BQk(),A.ynx(33,23),A.YNc(34,zl,2,0,"th",22),A.YNc(35,Gl,4,4,"td",14),A.BQk(),A.ynx(36,24),A.YNc(37,no,2,0,"th",22),A.YNc(38,Hl,4,4,"td",14),A.BQk(),A.ynx(39,25),A.YNc(40,eA,2,0,"th",22),A.YNc(41,G,4,4,"td",14),A.BQk(),A.ynx(42,26),A.YNc(43,V,2,0,"th",22),A.YNc(44,p,4,4,"td",14),A.BQk(),A.ynx(45,27),A.YNc(46,F,2,0,"th",22),A.YNc(47,L,4,4,"td",14),A.BQk(),A.ynx(48,28),A.YNc(49,tA,6,0,"th",29),A.YNc(50,aA,8,2,"td",30),A.BQk(),A.ynx(51,31),A.YNc(52,Bt,5,4,"td",32),A.BQk(),A.YNc(53,yt,1,3,"tr",33),A.YNc(54,Jt,1,0,"tr",34),A.YNc(55,te,1,0,"tr",35),A.qZA()(),A._UZ(56,"mat-paginator",36),A.qZA()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(1),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(2),A.Q6J("dataSource",s.channels)("ngClass",A.VKq(10,Ae,""!==s.errorMessage)),A.xp6(46),A.Q6J("matFooterRowDef",A.DdM(12,oe)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.Wh,Ct.yH,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,ut.O5,S.pW,_.$V,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,nA.gM,e.BN,ut.PC,T.Zl,QA.gD,QA.$L,CA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.JJ],styles:[".mat-column-private[_ngcontent-%COMP%]{width:2rem}.mat-column-short_channel_id[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%], .mat-column-channel_id[_ngcontent-%COMP%], .mat-column-funding_txid[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-short_channel_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-channel_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-funding_txid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();const Qe=["peersForm"],de=["stepper"];function Je(i,d){if(1&i&&A._uU(0),2&i){const t=A.oxw();A.Oqu(t.peerFormLabel)}}function cn(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Address is required."),A.qZA())}function Oe(i,d){if(1&i&&(A.TgZ(0,"div",40),A._UZ(1,"fa-icon",41),A.TgZ(2,"span"),A._uU(3),A.qZA()()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(2),A.Oqu(t.peerConnectionError)}}function ge(i,d){if(1&i&&A._uU(0),2&i){const t=A.oxw();A.Oqu(t.channelFormLabel)}}function gn(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount is required."),A.qZA())}function Ze(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount must be a positive number."),A.qZA())}function ke(i,d){if(1&i&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function we(i,d){if(1&i&&(A.TgZ(0,"mat-option",42),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function An(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function Pe(i,d){if(1&i&&(A.TgZ(0,"mat-form-field",43),A._UZ(1,"input",44),A.YNc(2,An,2,0,"mat-error",14),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("step",.1)("min",0),A.xp6(1),A.Q6J("ngIf","customperkb"===t.channelFormGroup.controls.selFeeRate.value&&!t.channelFormGroup.controls.flgMinConf.value&&!t.channelFormGroup.controls.customFeeRate.value)}}function Te(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function en(i,d){if(1&i&&(A.TgZ(0,"div",40),A._UZ(1,"fa-icon",41),A.TgZ(2,"span"),A._uU(3),A.qZA()()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(2),A.Oqu(t.channelConnectionError)}}const Rn=function(i,d){return{"mr-6":i,"mr-2":d}};let fn=(()=>{class i{constructor(t,s,v,Z,rt,vt,Ot){this.dialogRef=t,this.data=s,this.store=v,this.formBuilder=Z,this.actions=rt,this.logger=vt,this.commonService=Ot,this.faExclamationTriangle=h.eHv,this.peerAddress="",this.totalBalance=0,this.feeRateTypes=a.vn,this.flgChannelOpened=!1,this.channelOpenStatus=null,this.newlyAddedPeer=null,this.flgEditable=!0,this.peerConnectionError="",this.channelConnectionError="",this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)",this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.data.message?(this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.id&&this.data.message.peer.netaddr?this.data.message.peer.id+"@"+this.data.message.peer.netaddr:this.data.message.peer&&this.data.message.peer.id&&!this.data.message.peer.netaddr?this.data.message.peer.id:""):(this.totalBalance=0,this.peerAddress=""),this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[OA.kI.required]],peerAddress:[this.peerAddress,[OA.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[OA.kI.required,OA.kI.min(1),OA.kI.max(this.totalBalance)]],isPrivate:[!1],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}],hiddenAmount:["",[OA.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.channelFormGroup.controls.flgMinConf.valueChanges.pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{t?(this.channelFormGroup.controls.selFeeRate.setValue(null),this.channelFormGroup.controls.selFeeRate.disable(),this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.minConfValue.reset(),this.channelFormGroup.controls.minConfValue.enable(),this.channelFormGroup.controls.minConfValue.setValidators([OA.kI.required])):(this.channelFormGroup.controls.selFeeRate.enable(),this.channelFormGroup.controls.minConfValue.setValue(null),this.channelFormGroup.controls.minConfValue.disable(),this.channelFormGroup.controls.minConfValue.setValidators(null))}),this.channelFormGroup.controls.selFeeRate.valueChanges.pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.customFeeRate.reset(),this.channelFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.channelFormGroup.controls.flgMinConf.value?null:[OA.kI.required])}),this.actions.pipe((0,r.R)(this.unSubs[2]),(0,JA.h)(t=>t.type===a.AB.NEWLY_ADDED_PEER_CLN||t.type===a.AB.FETCH_CHANNELS_CLN||t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.NEWLY_ADDED_PEER_CLN&&(this.logger.info(t.payload),this.flgEditable=!1,this.newlyAddedPeer=t.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),t.type===a.AB.FETCH_CHANNELS_CLN&&this.dialogRef.close(),t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&("SaveNewPeer"===t.payload.action?this.peerConnectionError=t.payload.message:"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch((0,Et.El)({payload:{id:this.peerFormGroup.controls.peerAddress.value}}))}onOpenChannel(){var t;if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||this.channelFormGroup.controls.flgMinConf.value&&!this.channelFormGroup.controls.minConfValue.value)return!0;this.channelConnectionError="",this.store.dispatch((0,Et.YX)({payload:{peerId:null===(t=this.newlyAddedPeer)||void 0===t?void 0:t.id,satoshis:this.channelFormGroup.controls.fundingAmount.value,announce:!this.channelFormGroup.controls.isPrivate.value,feeRate:"customperkb"===this.channelFormGroup.controls.selFeeRate.value&&!this.channelFormGroup.controls.flgMinConf.value&&this.channelFormGroup.controls.customFeeRate.value?1e3*this.channelFormGroup.controls.customFeeRate.value+"perkb":this.channelFormGroup.controls.selFeeRate.value,minconf:this.channelFormGroup.controls.flgMinConf.value?this.channelFormGroup.controls.minConfValue.value:null}}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(t){var s,v,Z,rt,vt;switch(t.selectedIndex){case 0:default:this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 1:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+((null===(s=this.newlyAddedPeer)||void 0===s?void 0:s.alias)?this.newlyAddedPeer.alias:null===(v=this.newlyAddedPeer)||void 0===v?void 0:v.id):"Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 2:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+((null===(Z=this.newlyAddedPeer)||void 0===Z?void 0:Z.alias)?null===(rt=this.newlyAddedPeer)||void 0===rt?void 0:rt.alias:null===(vt=this.newlyAddedPeer)||void 0===vt?void 0:vt.id):"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)"}t.selectedIndex{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(OA.qu),A.Y36(Tt.eX),A.Y36(E.mQ),A.Y36(C.v))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-connect-peer"]],viewQuery:function(t,s){if(1&t&&(A.Gf(Qe,5),A.Gf(de,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.form=v.first),A.iGM(v=A.CRH())&&(s.stepper=v.first)}},decls:57,vars:30,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","button",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mb-1",3,"formGroup","ngSubmit"],["matStepLabel","","disabled","true"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","autoFocus","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["fxFlex","60","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","35","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["fxFlex","98"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["mat-button","","color","primary","tabindex","8","type","submit"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Connect to a new peer"),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"div",7)(10,"mat-vertical-stepper",8,9),A.NdJ("selectionChange",function(Z){return s.stepSelectionChanged(Z)}),A.TgZ(12,"mat-step",10)(13,"form",11),A.YNc(14,Je,1,1,"ng-template",12),A.TgZ(15,"mat-form-field",1),A._UZ(16,"input",13),A.YNc(17,cn,2,0,"mat-error",14),A.qZA(),A.YNc(18,Oe,4,2,"div",15),A.TgZ(19,"div",16)(20,"button",17),A.NdJ("click",function(){return s.onConnectPeer()}),A._uU(21),A.qZA()()()(),A.TgZ(22,"mat-step",10)(23,"form",18),A.NdJ("ngSubmit",function(){return s.onOpenChannel()}),A.YNc(24,ge,1,1,"ng-template",19),A.TgZ(25,"div",20)(26,"div",21)(27,"mat-form-field",22),A._UZ(28,"input",23),A.TgZ(29,"mat-hint"),A._uU(30),A.qZA(),A.TgZ(31,"span",24),A._uU(32," Sats "),A.qZA(),A.YNc(33,gn,2,0,"mat-error",14),A.YNc(34,Ze,2,0,"mat-error",14),A.YNc(35,ke,2,1,"mat-error",14),A.qZA(),A.TgZ(36,"div",25)(37,"mat-slide-toggle",26),A._uU(38,"Private Channel"),A.qZA()()(),A.TgZ(39,"div",27)(40,"div",28)(41,"mat-form-field",29)(42,"mat-select",30),A.YNc(43,we,2,2,"mat-option",31),A.qZA()(),A.YNc(44,Pe,3,3,"mat-form-field",32),A.qZA(),A.TgZ(45,"div",33),A._UZ(46,"mat-checkbox",34),A.TgZ(47,"mat-form-field",35),A._UZ(48,"input",36),A.YNc(49,Te,2,0,"mat-error",14),A.qZA()()()(),A.YNc(50,en,4,2,"div",15),A.TgZ(51,"div",16)(52,"button",37),A._uU(53),A.qZA()()()()(),A.TgZ(54,"div",38)(55,"button",39),A._uU(56),A.qZA()()()()()()),2&t&&(A.xp6(10),A.Q6J("linear",!0),A.xp6(2),A.Q6J("stepControl",s.peerFormGroup)("editable",s.flgEditable),A.xp6(1),A.Q6J("formGroup",s.peerFormGroup),A.xp6(4),A.Q6J("ngIf",null==s.peerFormGroup.controls.peerAddress.errors?null:s.peerFormGroup.controls.peerAddress.errors.required),A.xp6(1),A.Q6J("ngIf",""!==s.peerConnectionError),A.xp6(3),A.Oqu(""!==s.peerConnectionError?"Retry":"Add Peer"),A.xp6(1),A.Q6J("stepControl",s.channelFormGroup)("editable",s.flgEditable),A.xp6(1),A.Q6J("formGroup",s.channelFormGroup),A.xp6(5),A.Q6J("step",1e3),A.xp6(2),A.hij("Remaining Bal: ",s.totalBalance-(s.channelFormGroup.controls.fundingAmount.value?s.channelFormGroup.controls.fundingAmount.value:0),""),A.xp6(3),A.Q6J("ngIf",null==s.channelFormGroup.controls.fundingAmount.errors?null:s.channelFormGroup.controls.fundingAmount.errors.required),A.xp6(1),A.Q6J("ngIf",null==s.channelFormGroup.controls.fundingAmount.errors?null:s.channelFormGroup.controls.fundingAmount.errors.min),A.xp6(1),A.Q6J("ngIf",null==s.channelFormGroup.controls.fundingAmount.errors?null:s.channelFormGroup.controls.fundingAmount.errors.max),A.xp6(6),A.Q6J("fxFlex","customperkb"!==s.channelFormGroup.controls.selFeeRate.value||s.channelFormGroup.controls.flgMinConf.value?"100":"48"),A.xp6(2),A.Q6J("ngForOf",s.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===s.channelFormGroup.controls.selFeeRate.value&&!s.channelFormGroup.controls.flgMinConf.value),A.xp6(2),A.Q6J("ngClass",A.WLB(27,Rn,s.screenSize===s.screenSizeEnum.XS||s.screenSize===s.screenSizeEnum.SM,s.screenSize===s.screenSizeEnum.MD||s.screenSize===s.screenSizeEnum.LG||s.screenSize===s.screenSizeEnum.XL)),A.xp6(2),A.Q6J("step",1)("min",0)("required",s.channelFormGroup.controls.flgMinConf.value),A.xp6(1),A.Q6J("ngIf",s.channelFormGroup.controls.flgMinConf.value&&!s.channelFormGroup.controls.minConfValue.value),A.xp6(1),A.Q6J("ngIf",""!==s.channelConnectionError),A.xp6(3),A.Oqu(""!==s.channelConnectionError?"Retry":"Open Channel"),A.xp6(2),A.Q6J("mat-dialog-close",!1),A.xp6(1),A.Oqu(null!=s.newlyAddedPeer&&s.newlyAddedPeer.id?"Do It Later":"Close"))},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,g.dn,yi.Vq,yi.C0,OA._Y,OA.JL,OA.sg,yi.VY,P.KE,H.Nt,OA.Fj,k.h,OA.JJ,OA.u,OA.Q7,ut.O5,P.TO,e.BN,OA.wV,P.bx,P.R9,PA.Rr,QA.gD,ut.sg,CA.ey,OA.qQ,z.q,Wt.oG,ut.mk,T.oO,Mt.ZT],styles:[""]}),i})();function In(i,d){1&i&&A._UZ(0,"mat-progress-bar",34)}function kn(i,d){1&i&&A._UZ(0,"th",35)}const jn=function(i){return{"mr-0":i}};function Dn(i,d){if(1&i&&A._UZ(0,"span",39),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,jn,t.screenSize===t.screenSizeEnum.XS))}}function Mn(i,d){if(1&i&&A._UZ(0,"span",40),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,jn,t.screenSize===t.screenSizeEnum.XS))}}function Vn(i,d){if(1&i&&(A.TgZ(0,"td",36),A.YNc(1,Dn,1,3,"span",37),A.YNc(2,Mn,1,3,"span",38),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Q6J("ngIf",null==t?null:t.connected),A.xp6(1),A.Q6J("ngIf",!(null!=t&&t.connected))}}function Wn(i,d){1&i&&(A.TgZ(0,"th",35),A._uU(1," Alias "),A.qZA())}const me=function(i){return{"max-width":i}};function be(i,d){if(1&i&&(A.TgZ(0,"td",36)(1,"div",41)(2,"span",42),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,me,s.screenSize===s.screenSizeEnum.XS?"12rem":"40rem")),A.xp6(2),A.Oqu(null==t?null:t.alias)}}function Se(i,d){1&i&&(A.TgZ(0,"th",43),A._uU(1," ID "),A.qZA())}function Xe(i,d){if(1&i&&(A.TgZ(0,"td",44)(1,"div",41)(2,"span",42),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,me,s.screenSize===s.screenSizeEnum.XS?"12rem":"40rem")),A.xp6(2),A.Oqu(null==t?null:t.id)}}function je(i,d){1&i&&(A.TgZ(0,"th",43),A._uU(1," Network Address "),A.qZA())}function hn(i,d){1&i&&(A.TgZ(0,"span"),A._uU(1,","),A._UZ(2,"br"),A.qZA())}function na(i,d){if(1&i&&(A.TgZ(0,"span",42),A._uU(1),A.YNc(2,hn,3,0,"span",46),A.qZA()),2&i){const t=d.$implicit,s=d.last;A.xp6(1),A.Oqu(t),A.xp6(1),A.Q6J("ngIf",!s)}}function zn(i,d){if(1&i&&(A.TgZ(0,"td",44)(1,"div",41),A.YNc(2,na,3,2,"span",45),A.qZA()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,me,s.screenSize===s.screenSizeEnum.XS?"12rem":"40rem")),A.xp6(1),A.Q6J("ngForOf",null==t?null:t.netaddr)}}function ia(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",47)(1,"div",48)(2,"mat-select",49),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",50),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function ra(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-option",50),A.NdJ("click",function(){A.CHM(t);const v=A.oxw().$implicit;return A.oxw().onPeerDetach(v)}),A._uU(1,"Disconnect"),A.qZA()}}function Jl(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-option",50),A.NdJ("click",function(){A.CHM(t);const v=A.oxw().$implicit;return A.oxw().onConnectPeer(v)}),A._uU(1,"Reconnect"),A.qZA()}}function Ol(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",51)(1,"div",48)(2,"mat-select",49),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",50),A.NdJ("click",function(v){const rt=A.CHM(t).$implicit;return A.oxw().onPeerClick(rt,v)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",50),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onOpenChannel(Z)}),A._uU(7,"Open Channel"),A.qZA(),A.YNc(8,ra,2,0,"mat-option",52),A.YNc(9,Jl,2,0,"mat-option",52),A.qZA()()()}if(2&i){const t=d.$implicit;A.xp6(8),A.Q6J("ngIf",t.connected),A.xp6(1),A.Q6J("ngIf",!t.connected)}}function Rr(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No connected peer."),A.qZA())}function rr(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting peers..."),A.qZA())}function aa(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function zr(i,d){if(1&i&&(A.TgZ(0,"td",53),A.YNc(1,Rr,2,0,"p",46),A.YNc(2,rr,2,0,"p",46),A.YNc(3,aa,2,1,"p",46),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Gr=function(i){return{"display-none":i}};function ar(i,d){if(1&i&&A._UZ(0,"tr",54),2&i){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,Gr,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function or(i,d){1&i&&A._UZ(0,"tr",55)}function sr(i,d){1&i&&A._UZ(0,"tr",56)}const lr=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}},cr=function(){return["no_peer"]};let gr=(()=>{class i{constructor(t,s,v,Z,rt){this.logger=t,this.store=s,this.rtlEffects=v,this.actions=Z,this.commonService=rt,this.faUsers=h.FVb,this.PAGE_ID="peers_channels",this.tableSetting={tableId:"peers",recordsPerPage:a.IV,sortBy:"alias",sortOrder:a.Pi.DESCENDING},this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(B.Ao).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.availableBalance=t.balance.totalBalance||0}),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("connected"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.Wi).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.peersData=t.peers||[],this.peersData.length>0&&this.loadPeersTable(this.peersData),this.logger.info(t)}),this.actions.pipe((0,r.R)(this.unSubs[3]),(0,JA.h)(t=>t.type===a.AB.SET_PEERS_CLN)).subscribe(t=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.id,message:[[{key:"id",value:t.id,title:"Public Key",width:100}],[{key:"netaddr",value:t.netaddr,title:"Address",width:100}],[{key:"alias",value:t.alias,title:"Alias",width:50},{key:"connected",value:t.connected?"True":"False",title:"Connected",width:50}]]}}}))}onConnectPeer(t){this.store.dispatch((0,KA.qR)({payload:{data:{message:{peer:t.id?t:null,information:this.information,balance:this.availableBalance},component:fn}}}))}onOpenChannel(t){this.store.dispatch((0,KA.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:Ha}}}))}onPeerDetach(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.id),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,r.R)(this.unSubs[4])).subscribe(v=>{v&&this.store.dispatch((0,Et.z)({payload:{id:t.id,force:!1}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(t){var s;this.peers=new xA.by([...t]),this.peers.sortingDataAccessor=(v,Z)=>{if("netaddr"===Z){if(v.netaddr&&v.netaddr[0]){const rt=v.netaddr[0].toString().split(".");return rt[0]?+rt[0]:v.netaddr[0]}return""}return v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null},this.peers.sort=this.sort,null===(s=this.peers.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.peers.filterPredicate=(v,Z)=>JSON.stringify(v).toLowerCase().includes(Z),this.peers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(DA.V),A.Y36(Tt.eX),A.Y36(C.v))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-peers"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Peers")}])],decls:39,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["peersForm","ngForm"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","30","fxFlex.gt-xs","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","connected"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","id"],["mat-header-cell","","class","pl-2","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-2",4,"matCellDef"],["matColumnDef","netaddr"],["mat-header-cell","","mat-sort-header","","class","pl-2",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Connected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Disconnected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Connected","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Disconnected","matTooltipPosition","right",1,"dot","red",3,"ngClass"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","",1,"pl-2"],["mat-cell","",1,"pl-2"],["class","ellipsis-child",4,"ngFor","ngForOf"],[4,"ngIf"],["mat-header-cell","",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"form",1,2)(3,"button",3),A.NdJ("click",function(){return s.onConnectPeer({})}),A._uU(4,"Add Peer"),A.qZA()(),A.TgZ(5,"div",4)(6,"div",5)(7,"div",6),A._UZ(8,"fa-icon",7),A.TgZ(9,"span",8),A._uU(10,"Connected Peers"),A.qZA()(),A.TgZ(11,"mat-form-field",9)(12,"div",10)(13,"input",11),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(Z){return s.selFilter=Z}),A.qZA()()()(),A.TgZ(14,"div",12),A.YNc(15,In,1,0,"mat-progress-bar",13),A.TgZ(16,"table",14,15),A.ynx(18,16),A.YNc(19,kn,1,0,"th",17),A.YNc(20,Vn,3,2,"td",18),A.BQk(),A.ynx(21,19),A.YNc(22,Wn,2,0,"th",17),A.YNc(23,be,4,4,"td",18),A.BQk(),A.ynx(24,20),A.YNc(25,Se,2,0,"th",21),A.YNc(26,Xe,4,4,"td",22),A.BQk(),A.ynx(27,23),A.YNc(28,je,2,0,"th",24),A.YNc(29,zn,3,4,"td",22),A.BQk(),A.ynx(30,25),A.YNc(31,ia,6,0,"th",26),A.YNc(32,Ol,10,2,"td",27),A.BQk(),A.ynx(33,28),A.YNc(34,zr,4,3,"td",29),A.BQk(),A.YNc(35,ar,1,3,"tr",30),A.YNc(36,or,1,0,"tr",31),A.YNc(37,sr,1,0,"tr",32),A.qZA()(),A._UZ(38,"mat-paginator",33),A.qZA()()),2&t&&(A.xp6(8),A.Q6J("icon",s.faUsers),A.xp6(5),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.peers)("ngClass",A.VKq(11,lr,""!==s.errorMessage)),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(13,cr)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.yH,Ct.Wh,OA._Y,OA.JL,OA.F,w.lW,e.BN,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,_.$V,ut.O5,S.pW,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,nA.gM,ut.PC,T.Zl,ut.sg,QA.gD,QA.$L,CA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],styles:[".mat-column-connected[_ngcontent-%COMP%]{width:2rem}.mat-column-alias[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%], .mat-column-netaddr[_ngcontent-%COMP%]{flex:0 0 20%;width:20%;white-space:nowrap}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-netaddr[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();const Br=["queryRoutesForm"];function ur(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Destination pubkey is required."),A.qZA())}function mi(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount is required."),A.qZA())}function io(i,d){1&i&&A._UZ(0,"mat-progress-bar",38)}function ro(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1," ID "),A.qZA())}const oa=function(i){return{"max-width":i}};function ao(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"div",41)(2,"span",42),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,oa,s.screenSize===s.screenSizeEnum.XS?"12rem":"40rem")),A.xp6(2),A.Oqu(null==t?null:t.id)}}function sa(i,d){1&i&&(A.TgZ(0,"th",43),A._uU(1," Alias "),A.qZA())}function ac(i,d){if(1&i&&(A.TgZ(0,"td",44)(1,"div",41)(2,"span",42),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,oa,s.screenSize===s.screenSizeEnum.XS?"12rem":"40rem")),A.xp6(2),A.Oqu(null==t?null:t.alias)}}function oc(i,d){1&i&&(A.TgZ(0,"th",43),A._uU(1," Channel "),A.qZA())}function sc(i,d){if(1&i&&(A.TgZ(0,"td",44),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.channel," ")}}function lc(i,d){1&i&&(A.TgZ(0,"th",43),A._uU(1," Direction "),A.qZA())}function cc(i,d){if(1&i&&(A.TgZ(0,"td",44),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.direction," ")}}function gc(i,d){1&i&&(A.TgZ(0,"th",45),A._uU(1," Delay "),A.qZA())}function Bc(i,d){if(1&i&&(A.TgZ(0,"td",44)(1,"span",46),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.delay)," ")}}function uc(i,d){1&i&&(A.TgZ(0,"th",45),A._uU(1," Amount (Sats) "),A.qZA())}function fc(i,d){if(1&i&&(A.TgZ(0,"td",44)(1,"span",46),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,(null==t?null:t.msatoshi)/1e3)," ")}}function hc(i,d){1&i&&(A.TgZ(0,"th",47)(1,"div",48),A._uU(2,"Actions"),A.qZA()())}function Ec(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",49)(1,"button",50),A.NdJ("click",function(v){const rt=A.CHM(t).$implicit;return A.oxw().onHopClick(rt,v)}),A._uU(2,"View Info"),A.qZA()()}}function wc(i,d){1&i&&A._UZ(0,"tr",51)}function Cc(i,d){1&i&&A._UZ(0,"tr",52)}const Qc=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}};let dc=(()=>{class i{constructor(t,s,v){this.store=t,this.clnEffects=s,this.commonService=v,this.PAGE_ID="graph_lookup",this.tableSetting={tableId:"query_routes",recordsPerPage:a.IV,sortBy:"id",sortOrder:a.Pi.ASCENDING},this.destinationPubkey="",this.amount=null,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=h.FpQ,this.faExclamationTriangle=h.eHv,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(B.AS).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s,v;this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.push("actions")}),this.clnEffects.setQueryRoutesCL.pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{var s;this.qrHops=new xA.by([]),this.qrHops.data=[],t.routes&&t.routes.length&&t.routes.length>0?(this.flgLoading[0]=!1,this.qrHops=new xA.by([...t.routes]),this.qrHops.data=t.routes):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,null===(s=this.qrHops.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0})})}onQueryRoutes(){if(!this.destinationPubkey||!this.amount)return!0;this.flgLoading[0]=!0,this.store.dispatch((0,Et.WO)({payload:{destPubkey:this.destinationPubkey,amount:1e3*this.amount}}))}resetData(){this.destinationPubkey="",this.amount=null,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"id",value:t.id,title:"ID",width:100,type:a.Gi.STRING}],[{key:"channel",value:t.channel,title:"Channel",width:50,type:a.Gi.STRING},{key:"alias",value:t.alias,title:"Peer Alias",width:50,type:a.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"mSatoshi",width:50,type:a.Gi.NUMBER},{key:"amount_msat",value:t.amount_msat,title:"Amount mSat",width:50,type:a.Gi.STRING}],[{key:"direction",value:t.direction,title:"Direction",width:50,type:a.Gi.STRING},{key:"delay",value:t.delay,title:"Delay",width:50,type:a.Gi.NUMBER}]]}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(u.yh),A.Y36(Jn.J),A.Y36(C.v))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-query-routes"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(Br,7)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.form=v.first)}},decls:51,vars:15,consts:[["fxLayout","column","fxFlex","100",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Pubkey","name","destinationPubkey","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","4"],["fxLayout","row","fxLayoutAlign","start center",1,"page-sub-title-container","mt-2","mb-1"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],[1,"table-container","mb-6",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["matColumnDef","channel"],["matColumnDef","direction"],["matColumnDef","delay"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pl-1",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","pl-2 pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-2 pr-3","fxLayoutAlign","end center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","",1,"pl-1"],["mat-cell","",1,"pl-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pl-1"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-2","pr-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["mat-cell","","fxLayoutAlign","end center",1,"pl-2","pr-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,s){if(1&t){const v=A.EpF();A.TgZ(0,"div",0)(1,"form",1,2),A.NdJ("ngSubmit",function(){return A.CHM(v),A.MAs(2).form.valid&&s.onQueryRoutes()}),A.TgZ(3,"div",3),A._UZ(4,"fa-icon",4),A.TgZ(5,"span"),A._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),A.qZA()(),A.TgZ(7,"mat-form-field",5)(8,"input",6,7),A.NdJ("ngModelChange",function(rt){return s.destinationPubkey=rt}),A.qZA(),A.YNc(10,ur,2,0,"mat-error",8),A.qZA(),A.TgZ(11,"mat-form-field",9)(12,"input",10),A.NdJ("ngModelChange",function(rt){return s.amount=rt}),A.qZA(),A.YNc(13,mi,2,0,"mat-error",8),A.qZA(),A.TgZ(14,"div",11)(15,"button",12),A.NdJ("click",function(){return s.resetData()}),A._uU(16,"Clear"),A.qZA(),A.TgZ(17,"button",13),A._uU(18,"Query Route"),A.qZA()()(),A.TgZ(19,"div",14)(20,"div",15),A._UZ(21,"fa-icon",16),A.TgZ(22,"span",17),A._uU(23,"Transaction Route"),A.qZA()()(),A.TgZ(24,"div",18),A.YNc(25,io,1,0,"mat-progress-bar",19),A.TgZ(26,"table",20,21),A.ynx(28,22),A.YNc(29,ro,2,0,"th",23),A.YNc(30,ao,4,4,"td",24),A.BQk(),A.ynx(31,25),A.YNc(32,sa,2,0,"th",26),A.YNc(33,ac,4,4,"td",27),A.BQk(),A.ynx(34,28),A.YNc(35,oc,2,0,"th",26),A.YNc(36,sc,2,1,"td",27),A.BQk(),A.ynx(37,29),A.YNc(38,lc,2,0,"th",26),A.YNc(39,cc,2,1,"td",27),A.BQk(),A.ynx(40,30),A.YNc(41,gc,2,0,"th",31),A.YNc(42,Bc,4,3,"td",27),A.BQk(),A.ynx(43,32),A.YNc(44,uc,2,0,"th",31),A.YNc(45,fc,4,3,"td",27),A.BQk(),A.ynx(46,33),A.YNc(47,hc,3,0,"th",34),A.YNc(48,Ec,3,0,"td",35),A.BQk(),A.YNc(49,wc,1,0,"tr",36),A.YNc(50,Cc,1,0,"tr",37),A.qZA()()()}2&t&&(A.xp6(4),A.Q6J("icon",s.faExclamationTriangle),A.xp6(4),A.Q6J("ngModel",s.destinationPubkey),A.xp6(2),A.Q6J("ngIf",!s.destinationPubkey),A.xp6(2),A.Q6J("ngModel",s.amount)("step",1e3)("min",0),A.xp6(1),A.Q6J("ngIf",!s.amount),A.xp6(8),A.Q6J("icon",s.faRoute),A.xp6(4),A.Q6J("ngIf",!0===s.flgLoading[0]),A.xp6(1),A.Q6J("dataSource",s.qrHops)("ngClass",A.VKq(13,Qc,"error"===s.flgLoading[0])),A.xp6(23),A.Q6J("matHeaderRowDef",s.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns))},directives:[Ct.xw,Ct.yH,OA._Y,OA.JL,OA.F,Ct.Wh,e.BN,P.KE,H.Nt,OA.Fj,OA.Q7,OA.JJ,OA.On,ut.O5,P.TO,OA.wV,OA.qQ,z.q,w.lW,_.$V,S.pW,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,ut.PC,T.Zl,xA.as,xA.XQ,xA.nj,xA.Gk],pipes:[ut.JJ],styles:[".mat-column-id[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:0 0 22%;width:22%}.mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();function Mc(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Message is required."),A.qZA())}let pc=(()=>{class i{constructor(t,s,v){this.dataService=t,this.snackBar=s,this.logger=v,this.message="",this.signedMessage="",this.signature="",this.unSubs=[new c.x,new c.x]}onSign(){if(!this.message||""===this.message)return!0;this.dataService.signMessage(this.message).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.signedMessage=this.message,this.signature=t.zbase})}onMessageChange(){this.signedMessage!==this.message&&(this.signature="")}onCopyField(t){this.snackBar.open("Signature copied."),this.logger.info("Copied Text: "+t)}resetData(){this.message="",this.signature="",this.signedMessage=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Ut.D),A.Y36(On.ux),A.Y36(E.mQ))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-sign"]],decls:20,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to sign","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3","type","submit",3,"click"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","4","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),A.NdJ("ngModelChange",function(Z){return s.message=Z})("keyup",function(){return s.onMessageChange()}),A.qZA(),A.YNc(5,Mc,2,0,"mat-error",5),A.qZA(),A.TgZ(6,"div",6)(7,"button",7),A.NdJ("click",function(){return s.resetData()}),A._uU(8,"Clear Field"),A.qZA(),A.TgZ(9,"button",8),A.NdJ("click",function(){return s.onSign()}),A._uU(10,"Sign"),A.qZA()(),A._UZ(11,"mat-divider",9),A.TgZ(12,"div",10)(13,"p"),A._uU(14,"Generated Signature"),A.qZA()(),A.TgZ(15,"div",11),A._uU(16),A.qZA(),A.TgZ(17,"div",12)(18,"button",13),A.NdJ("copied",function(Z){return s.onCopyField(Z)}),A._uU(19,"Copy Signature"),A.qZA()()()()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.message),A.xp6(1),A.Q6J("ngIf",!s.message),A.xp6(6),A.Q6J("inset",!0),A.xp6(5),A.Oqu(s.signature),A.xp6(2),A.Q6J("payload",s.signature))},directives:[Ct.xw,Ct.yH,Ct.Wh,OA._Y,OA.JL,OA.F,P.KE,H.Nt,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,ut.O5,P.TO,w.lW,lA.d,pi.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),i})();function mc(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Message is required."),A.qZA())}function Ic(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Signature is required."),A.qZA())}function vc(i,d){1&i&&(A.TgZ(0,"p",13)(1,"mat-icon",14),A._uU(2,"close"),A.qZA(),A._uU(3,"Verification failed, please double check message and signature"),A.qZA())}function Dc(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Pubkey Used"),A.qZA())}function yc(i,d){if(1&i&&(A.TgZ(0,"div",20)(1,"p"),A._uU(2),A.qZA()()),2&i){const t=A.oxw(2);A.xp6(2),A.Oqu(null==t.verifyRes?null:t.verifyRes.pubkey)}}function xc(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",21)(1,"button",22),A.NdJ("copied",function(v){return A.CHM(t),A.oxw(2).onCopyField(v)}),A._uU(2,"Copy Pubkey"),A.qZA()()}if(2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("payload",null==t.verifyRes?null:t.verifyRes.pubkey)}}function Fc(i,d){if(1&i&&(A.TgZ(0,"div",15),A._UZ(1,"mat-divider",16),A.TgZ(2,"div",17),A.YNc(3,Dc,2,0,"p",5),A.qZA(),A.YNc(4,yc,3,1,"div",18),A.YNc(5,xc,3,1,"div",19),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("inset",!0),A.xp6(2),A.Q6J("ngIf",t.verifyRes.verified),A.xp6(1),A.Q6J("ngIf",t.verifyRes.verified),A.xp6(1),A.Q6J("ngIf",t.verifyRes.verified)}}let Yc=(()=>{class i{constructor(t,s,v){this.dataService=t,this.snackBar=s,this.logger=v,this.message="",this.verifiedMessage="",this.signature="",this.verifiedSignature="",this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null},this.unSubs=[new c.x,new c.x]}onVerify(){if(!this.message||""===this.message||!this.signature||""===this.signature)return!0;this.dataService.verifyMessage(this.message,this.signature).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.verifyRes=t,this.showVerifyStatus=!0,this.verifiedMessage=this.message,this.verifiedSignature=this.signature})}onChange(){(this.verifiedMessage!==this.message||this.verifiedSignature!==this.signature)&&(this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null})}resetData(){this.message="",this.signature="",this.verifyRes=null,this.showVerifyStatus=!1}onCopyField(t){this.snackBar.open("Pubkey copied."),this.logger.info("Copied Text: "+t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Ut.D),A.Y36(On.ux),A.Y36(E.mQ))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-verify"]],decls:17,vars:6,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to verify","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Signature provided","name","signature","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["sign","ngModel"],["fxFlex","100","class","color-warn","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start","class","bordered-box read-only h-4 padding-gap",4,"ngIf"],["fxLayout","row","class","mt-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","5","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),A.NdJ("ngModelChange",function(Z){return s.message=Z})("keyup",function(){return s.onChange()}),A.qZA(),A.YNc(5,mc,2,0,"mat-error",5),A.qZA(),A.TgZ(6,"mat-form-field",3)(7,"input",6,7),A.NdJ("ngModelChange",function(Z){return s.signature=Z})("keyup",function(){return s.onChange()}),A.qZA(),A.YNc(9,Ic,2,0,"mat-error",5),A.qZA(),A.YNc(10,vc,4,0,"p",8),A.TgZ(11,"div",9)(12,"button",10),A.NdJ("click",function(){return s.resetData()}),A._uU(13,"Clear Fields"),A.qZA(),A.TgZ(14,"button",11),A.NdJ("click",function(){return s.onVerify()}),A._uU(15,"Verify"),A.qZA()(),A.YNc(16,Fc,6,4,"div",12),A.qZA()()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.message),A.xp6(1),A.Q6J("ngIf",!s.message),A.xp6(2),A.Q6J("ngModel",s.signature),A.xp6(2),A.Q6J("ngIf",!s.signature),A.xp6(1),A.Q6J("ngIf",s.showVerifyStatus&&!s.verifyRes.verified),A.xp6(6),A.Q6J("ngIf",s.showVerifyStatus&&s.verifyRes.verified))},directives:[Ct.xw,Ct.yH,Ct.Wh,OA._Y,OA.JL,OA.F,P.KE,H.Nt,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,ut.O5,P.TO,m.Hw,w.lW,lA.d,pi.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),i})();function Tc(i,d){if(1&i&&(A.TgZ(0,"div",5),A._uU(1),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function Sc(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",6),A._UZ(1,"div",7),A.TgZ(2,"mat-form-field",8)(3,"input",9),A.NdJ("ngModelChange",function(v){return A.CHM(t),A.oxw().filterValue=v})("input",function(){return A.CHM(t),A.oxw().applyFilter()})("keyup",function(){return A.CHM(t),A.oxw().applyFilter()}),A.qZA()()()}if(2&i){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.filterValue)}}function Nc(i,d){1&i&&A._UZ(0,"mat-progress-bar",37)}function Uc(i,d){1&i&&(A.TgZ(0,"th",38),A._uU(1,"Received Time"),A.qZA())}function Pc(i,d){if(1&i&&(A.TgZ(0,"td",39),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/y HH:mm"))}}function bc(i,d){1&i&&(A.TgZ(0,"th",40),A._uU(1,"Resolved Time"),A.qZA())}function Lc(i,d){if(1&i&&(A.TgZ(0,"td",41),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.resolved_time),"dd/MMM/y HH:mm"))}}function Rc(i,d){1&i&&(A.TgZ(0,"th",40),A._uU(1,"In Channel Id"),A.qZA())}function zc(i,d){if(1&i&&(A.TgZ(0,"td",41),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null==t?null:t.in_channel)}}function Gc(i,d){1&i&&(A.TgZ(0,"th",40),A._uU(1,"In Channel"),A.qZA())}const kl=function(i){return{"max-width":i}};function Hc(i,d){if(1&i&&(A.TgZ(0,"td",41)(1,"div",42)(2,"span",43),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,kl,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.Oqu(null==t?null:t.in_channel_alias)}}function Jc(i,d){1&i&&(A.TgZ(0,"th",40),A._uU(1,"Out Channel Id"),A.qZA())}function Oc(i,d){if(1&i&&(A.TgZ(0,"td",41),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null==t?null:t.out_channel)}}function kc(i,d){1&i&&(A.TgZ(0,"th",40),A._uU(1,"Out Channel"),A.qZA())}function jc(i,d){if(1&i&&(A.TgZ(0,"td",41)(1,"div",42)(2,"span",43),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,kl,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.Oqu(null==t?null:t.out_channel_alias)}}function Kc(i,d){1&i&&(A.TgZ(0,"th",40),A._uU(1,"Payment Hash"),A.qZA())}function Vc(i,d){if(1&i&&(A.TgZ(0,"td",41)(1,"div",42)(2,"span",43),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,kl,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.Oqu(null==t?null:t.payment_hash)}}function Wc(i,d){1&i&&(A.TgZ(0,"th",44),A._uU(1,"Amount In (Sats)"),A.qZA())}function Zc(i,d){if(1&i&&(A.TgZ(0,"td",41)(1,"span",45),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Xc(i,d){1&i&&(A.TgZ(0,"th",44),A._uU(1,"Amount Out (Sats)"),A.qZA())}function qc(i,d){if(1&i&&(A.TgZ(0,"td",41)(1,"span",45),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function _c(i,d){1&i&&(A.TgZ(0,"th",44),A._uU(1,"Fee (mSat)"),A.qZA())}function $c(i,d){if(1&i&&(A.TgZ(0,"td",41)(1,"span",45),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.lcZ(3,1,null==t?null:t.fee))}}function Ag(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",46)(1,"div",47)(2,"mat-select",48),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",49),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function tg(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",50)(1,"button",51),A.NdJ("click",function(v){const rt=A.CHM(t).$implicit;return A.oxw(2).onForwardingEventClick(rt,v)}),A._uU(2,"View Info"),A.qZA()()}}function eg(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No forwarding history available."),A.qZA())}function ng(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting forwarding history..."),A.qZA())}function ig(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function rg(i,d){if(1&i&&(A.TgZ(0,"td",52),A.YNc(1,eg,2,0,"p",53),A.YNc(2,ng,2,0,"p",53),A.YNc(3,ig,2,1,"p",53),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const ag=function(i){return{"display-none":i}};function og(i,d){if(1&i&&A._UZ(0,"tr",54),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,ag,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function sg(i,d){1&i&&A._UZ(0,"tr",55)}function lg(i,d){1&i&&A._UZ(0,"tr",56)}const cg=function(){return["no_event"]};function gg(i,d){if(1&i&&(A.TgZ(0,"div",10),A.YNc(1,Nc,1,0,"mat-progress-bar",11),A.TgZ(2,"table",12,13),A.ynx(4,14),A.YNc(5,Uc,2,0,"th",15),A.YNc(6,Pc,3,4,"td",16),A.BQk(),A.ynx(7,17),A.YNc(8,bc,2,0,"th",18),A.YNc(9,Lc,3,4,"td",19),A.BQk(),A.ynx(10,20),A.YNc(11,Rc,2,0,"th",18),A.YNc(12,zc,2,1,"td",19),A.BQk(),A.ynx(13,21),A.YNc(14,Gc,2,0,"th",18),A.YNc(15,Hc,4,4,"td",19),A.BQk(),A.ynx(16,22),A.YNc(17,Jc,2,0,"th",18),A.YNc(18,Oc,2,1,"td",19),A.BQk(),A.ynx(19,23),A.YNc(20,kc,2,0,"th",18),A.YNc(21,jc,4,4,"td",19),A.BQk(),A.ynx(22,24),A.YNc(23,Kc,2,0,"th",18),A.YNc(24,Vc,4,4,"td",19),A.BQk(),A.ynx(25,25),A.YNc(26,Wc,2,0,"th",26),A.YNc(27,Zc,4,4,"td",19),A.BQk(),A.ynx(28,27),A.YNc(29,Xc,2,0,"th",26),A.YNc(30,qc,4,4,"td",19),A.BQk(),A.ynx(31,28),A.YNc(32,_c,2,0,"th",26),A.YNc(33,$c,4,3,"td",19),A.BQk(),A.ynx(34,29),A.YNc(35,Ag,6,0,"th",30),A.YNc(36,tg,3,0,"td",31),A.BQk(),A.ynx(37,32),A.YNc(38,rg,4,3,"td",33),A.BQk(),A.YNc(39,og,1,3,"tr",34),A.YNc(40,sg,1,0,"tr",35),A.YNc(41,lg,1,0,"tr",36),A.qZA()()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.forwardingHistoryEvents),A.xp6(37),A.Q6J("matFooterRowDef",A.DdM(5,cg)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function Bg(i,d){if(1&i&&A._UZ(0,"mat-paginator",57),2&i){const t=A.oxw();A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Wl=(()=>{class i{constructor(t,s,v,Z,rt){this.logger=t,this.commonService=s,this.store=v,this.datePipe=Z,this.router=rt,this.pageId="routing",this.tableId="forwarding_history",this.eventsData=[],this.filterValue="",this.tableSetting={tableId:"forwarding_history",recordsPerPage:a.IV,sortBy:"received_time",sortOrder:a.Pi.DESCENDING},this.successfulEvents=[],this.displayedColumns=[],this.totalForwardedTransactions=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.select(B.AS).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting.tableId=this.tableId,this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.pageId))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.pageId))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.pipe((0,St.q)(1)).subscribe(t=>{var s;t.cln.apisCallStatus.FetchForwardingHistoryS.status===a.Bn.UN_INITIATED&&!(null===(s=t.cln.forwardingHistory.listForwards)||void 0===s?void 0:s.length)&&this.store.dispatch((0,Et.u0)({payload:{status:a.OO.SETTLED}}))}),this.store.select(B.Bo).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.eventsData.length<=0&&t.forwardingHistory.listForwards&&(this.totalForwardedTransactions=t.forwardingHistory.totalForwards||0,this.successfulEvents=t.forwardingHistory.listForwards||[],this.successfulEvents.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadForwardingEventsTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:a.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,this.totalForwardedTransactions=this.eventsData.length,this.paginator&&this.paginator.firstPage(),t.eventsData.firstChange||this.loadForwardingEventsTable(this.successfulEvents)),t.filterValue&&!t.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Event Information",message:[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:a.Gi.STRING}],[{key:"status",value:"Settled",title:"Status",width:50,type:a.Gi.STRING},{key:"fee",value:t.fee,title:"Fee (mSats)",width:50,type:a.Gi.NUMBER}],[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:a.Gi.DATE_TIME},{key:"resolved_time",value:t.resolved_time,title:"Resolved Time",width:50,type:a.Gi.DATE_TIME}],[{key:"in_channel",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:a.Gi.STRING},{key:"out_channel",value:t.out_channel_alias,title:"Outbound Channel",width:50,type:a.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"In (mSats)",width:50,type:a.Gi.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Out (mSats)",width:50,type:a.Gi.NUMBER}]]}}}))}loadForwardingEventsTable(t){var s;this.forwardingHistoryEvents=new xA.by([...t]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,null===(s=this.forwardingHistoryEvents.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.forwardingHistoryEvents.filterPredicate=(v,Z)=>{var rt,vt;return((v.received_time?(null===(rt=this.datePipe.transform(new Date(1e3*v.received_time),"dd/MMM/YYYY HH:mm"))||void 0===rt?void 0:rt.toLowerCase())+" ":"")+(v.resolved_time?(null===(vt=this.datePipe.transform(new Date(1e3*v.resolved_time),"dd/MMM/YYYY HH:mm"))||void 0===vt?void 0:vt.toLowerCase())+" ":"")+(v.in_channel?v.in_channel.toLowerCase()+" ":"")+(v.out_channel?v.out_channel.toLowerCase()+" ":"")+(v.in_channel_alias?v.in_channel_alias.toLowerCase()+" ":"")+(v.out_channel_alias?v.out_channel_alias.toLowerCase()+" ":"")+(v.in_msatoshi?v.in_msatoshi/1e3+" ":"")+(v.out_msatoshi?v.out_msatoshi/1e3+" ":"")+(v.fee?v.fee+" ":"")).includes(Z)},this.forwardingHistoryEvents.paginator=this.paginator,this.applyFilter(),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(ut.uU),A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-forwarding-history"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},inputs:{pageId:"pageId",tableId:"tableId",eventsData:"eventsData",filterValue:"filterValue"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Events")}]),A.TTD],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","received_time"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","resolved_time"],["mat-header-cell","","mat-sort-header","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["matColumnDef","in_channel"],["matColumnDef","in_channel_alias"],["matColumnDef","out_channel"],["matColumnDef","out_channel_alias"],["matColumnDef","payment_hash"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pl-1",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1 pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-1 pr-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","",1,"pl-1"],["mat-cell","",1,"pl-1"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pl-1"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-1","pr-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1","pr-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,Tc,2,1,"div",1),A.YNc(2,Sc,4,1,"div",2),A.YNc(3,gg,42,6,"div",3),A.YNc(4,Bg,1,3,"mat-paginator",4),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[Ct.xw,Ct.Wh,ut.O5,Ct.yH,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,_.$V,S.pW,xA.BZ,it.YE,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,ut.PC,T.Zl,QA.gD,QA.$L,CA.ey,w.lW,xA.mD,xA.yh,xA.Ke,xA.Q2,ut.mk,T.oO,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.uU,ut.JJ],styles:[".mat-column-in_channel_alias[_ngcontent-%COMP%], .mat-column-out_channel_alias[_ngcontent-%COMP%], .mat-column-payment_hash[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-in_channel_alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-out_channel_alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-payment_hash[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();function ug(i,d){if(1&i&&(A.TgZ(0,"div",5),A._uU(1),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function fg(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",6)(1,"div",7),A._UZ(2,"fa-icon",8),A.TgZ(3,"span"),A._uU(4,"Maximum 1,000 failed transactions only."),A.qZA()(),A.TgZ(5,"div",9),A._UZ(6,"div",10),A.TgZ(7,"mat-form-field",11)(8,"input",12),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(v){return A.CHM(t),A.oxw().selFilter=v}),A.qZA()()()()}if(2&i){const t=A.oxw();A.xp6(2),A.Q6J("icon",t.faExclamationTriangle),A.xp6(6),A.Q6J("ngModel",t.selFilter)}}function hg(i,d){1&i&&A._UZ(0,"mat-progress-bar",37)}function Eg(i,d){1&i&&(A.TgZ(0,"th",38),A._uU(1,"Received Time"),A.qZA())}function wg(i,d){if(1&i&&(A.TgZ(0,"td",39),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/y HH:mm"))}}function Cg(i,d){1&i&&(A.TgZ(0,"th",38),A._uU(1,"Resolved Time"),A.qZA())}function Qg(i,d){if(1&i&&(A.TgZ(0,"td",39),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.resolved_time),"dd/MMM/y HH:mm"))}}function dg(i,d){1&i&&(A.TgZ(0,"th",38),A._uU(1,"In Channel Id"),A.qZA())}function Mg(i,d){if(1&i&&(A.TgZ(0,"td",39),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null==t?null:t.in_channel)}}function pg(i,d){1&i&&(A.TgZ(0,"th",38),A._uU(1,"In Channel"),A.qZA())}const Zl=function(i){return{"max-width":i}};function mg(i,d){if(1&i&&(A.TgZ(0,"td",39)(1,"span",40)(2,"span",41),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Zl,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.Oqu(null==t?null:t.in_channel_alias)}}function Ig(i,d){1&i&&(A.TgZ(0,"th",38),A._uU(1,"Out Channel Id"),A.qZA())}function vg(i,d){if(1&i&&(A.TgZ(0,"td",39),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null==t?null:t.out_channel)}}function Dg(i,d){1&i&&(A.TgZ(0,"th",38),A._uU(1,"Out Channel"),A.qZA())}function yg(i,d){if(1&i&&(A.TgZ(0,"td",39)(1,"span",40)(2,"span",41),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Zl,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.Oqu(null==t?null:t.out_channel_alias)}}function xg(i,d){1&i&&(A.TgZ(0,"th",42),A._uU(1,"Amount In (Sats)"),A.qZA())}function Fg(i,d){if(1&i&&(A.TgZ(0,"td",39)(1,"span",43),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Yg(i,d){1&i&&(A.TgZ(0,"th",42),A._uU(1,"Amount Out (Sats)"),A.qZA())}function Tg(i,d){if(1&i&&(A.TgZ(0,"td",39)(1,"span",43),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Sg(i,d){1&i&&(A.TgZ(0,"th",42),A._uU(1,"Fee (mSats)"),A.qZA())}function Ng(i,d){if(1&i&&(A.TgZ(0,"td",39)(1,"span",43),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,null==t?null:t.fee,"1.0-0"))}}function Ug(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",44)(1,"div",45)(2,"mat-select",46),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",47),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Pg(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",48)(1,"button",49),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw(2).onFailedEventClick(Z)}),A._uU(2,"View Info"),A.qZA()()}}function bg(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No failed transaction available."),A.qZA())}function Lg(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting failed transactions..."),A.qZA())}function Rg(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function zg(i,d){if(1&i&&(A.TgZ(0,"td",50),A.YNc(1,bg,2,0,"p",51),A.YNc(2,Lg,2,0,"p",51),A.YNc(3,Rg,2,1,"p",51),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Gg=function(i){return{"display-none":i}};function Hg(i,d){if(1&i&&A._UZ(0,"tr",52),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Gg,(null==t.failedForwardingEvents?null:t.failedForwardingEvents.data)&&(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)>0))}}function Jg(i,d){1&i&&A._UZ(0,"tr",53)}function Og(i,d){1&i&&A._UZ(0,"tr",54)}const kg=function(){return["no_event"]};function jg(i,d){if(1&i&&(A.TgZ(0,"div",13),A.YNc(1,hg,1,0,"mat-progress-bar",14),A.TgZ(2,"table",15,16),A.ynx(4,17),A.YNc(5,Eg,2,0,"th",18),A.YNc(6,wg,3,4,"td",19),A.BQk(),A.ynx(7,20),A.YNc(8,Cg,2,0,"th",18),A.YNc(9,Qg,3,4,"td",19),A.BQk(),A.ynx(10,21),A.YNc(11,dg,2,0,"th",18),A.YNc(12,Mg,2,1,"td",19),A.BQk(),A.ynx(13,22),A.YNc(14,pg,2,0,"th",18),A.YNc(15,mg,4,4,"td",19),A.BQk(),A.ynx(16,23),A.YNc(17,Ig,2,0,"th",18),A.YNc(18,vg,2,1,"td",19),A.BQk(),A.ynx(19,24),A.YNc(20,Dg,2,0,"th",18),A.YNc(21,yg,4,4,"td",19),A.BQk(),A.ynx(22,25),A.YNc(23,xg,2,0,"th",26),A.YNc(24,Fg,4,4,"td",19),A.BQk(),A.ynx(25,27),A.YNc(26,Yg,2,0,"th",26),A.YNc(27,Tg,4,4,"td",19),A.BQk(),A.ynx(28,28),A.YNc(29,Sg,2,0,"th",26),A.YNc(30,Ng,4,4,"td",19),A.BQk(),A.ynx(31,29),A.YNc(32,Ug,6,0,"th",30),A.YNc(33,Pg,3,0,"td",31),A.BQk(),A.ynx(34,32),A.YNc(35,zg,4,3,"td",33),A.BQk(),A.YNc(36,Hg,1,3,"tr",34),A.YNc(37,Jg,1,0,"tr",35),A.YNc(38,Og,1,0,"tr",36),A.qZA()()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.failedForwardingEvents),A.xp6(34),A.Q6J("matFooterRowDef",A.DdM(5,kg)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function Kg(i,d){if(1&i&&A._UZ(0,"mat-paginator",55),2&i){const t=A.oxw();A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Vg=(()=>{class i{constructor(t,s,v,Z,rt){this.logger=t,this.commonService=s,this.store=v,this.datePipe=Z,this.router=rt,this.PAGE_ID="routing",this.tableSetting={tableId:"failed",recordsPerPage:a.IV,sortBy:"received_time",sortOrder:a.Pi.DESCENDING},this.faExclamationTriangle=h.eHv,this.errorMessage="",this.displayedColumns=[],this.selFilter="",this.totalFailedTransactions=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.dispatch((0,Et.u0)({payload:{status:a.OO.FAILED}})),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.xQ).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.totalFailedTransactions=t.failedForwardingHistory.totalForwards||0,this.failedEvents=t.failedForwardingHistory.listForwards||[],this.failedEvents.length>0&&this.sort&&this.paginator&&this.loadFailedEventsTable(this.failedEvents),this.logger.info(t)})}ngAfterViewInit(){this.failedEvents.length>0&&this.loadFailedEventsTable(this.failedEvents)}onFailedEventClick(t){const s=[[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:a.Gi.DATE_TIME},{key:"resolved_time",value:t.resolved_time,title:"Resolved Time",width:50,type:a.Gi.DATE_TIME}],[{key:"in_channel_alias",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:a.Gi.STRING},{key:"out_channel_alias",value:t.out_channel_alias,title:"Outbound Channel",width:50,type:a.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"Amount In (mSats)",width:33,type:a.Gi.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Amount Out (mSats)",width:33,type:a.Gi.NUMBER},{key:"fee",value:t.fee,title:"Fee (mSats)",width:34,type:a.Gi.NUMBER}]];t.payment_hash&&(null==s||s.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:a.Gi.STRING}])),this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Failed Event Information",message:s}}}))}loadFailedEventsTable(t){var s;this.failedForwardingEvents=new xA.by([...t]),this.failedForwardingEvents.sort=this.sort,this.failedForwardingEvents.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,null===(s=this.failedForwardingEvents.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.failedForwardingEvents.filterPredicate=(v,Z)=>{var rt;const vt=(v.received_time?this.datePipe.transform(new Date(1e3*v.received_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(v.resolved_time?null===(rt=this.datePipe.transform(new Date(1e3*v.resolved_time),"dd/MMM/YYYY HH:mm"))||void 0===rt?void 0:rt.toLowerCase():"")+(v.payment_hash?v.payment_hash.toLowerCase():"")+(v.in_channel?v.in_channel.toLowerCase():"")+(v.out_channel?v.out_channel.toLowerCase():"")+(v.in_channel_alias?v.in_channel_alias.toLowerCase():"")+(v.out_channel_alias?v.out_channel_alias.toLowerCase():"")+(v.in_msatoshi?v.in_msatoshi/1e3:"")+(v.out_msatoshi?v.out_msatoshi/1e3:"")+(v.fee?v.fee:"");return(null==vt?void 0:vt.includes(Z))||!1},this.failedForwardingEvents.paginator=this.paginator,this.applyFilter(),this.logger.info(this.failedForwardingEvents)}onDownloadCSV(){this.failedForwardingEvents&&this.failedForwardingEvents.data&&this.failedForwardingEvents.data.length>0&&this.commonService.downloadFile(this.failedForwardingEvents.data,"Failed-transactions")}applyFilter(){this.failedForwardingEvents.filter=this.selFilter.trim().toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(ut.uU),A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-failed-history"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Failed events")}])],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout.gt-xs","column","fxLayout","row","fxLayoutAlign","start center","fxLayoutAlign.gt-xs","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout.gt-xs","column","fxLayout","row","fxLayoutAlign","start center","fxLayoutAlign.gt-xs","start stretch",1,"page-sub-title-container"],["fxFlex","100",1,"alert","alert-warn","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","100"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","received_time"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","in_channel_alias"],["matColumnDef","out_channel"],["matColumnDef","out_channel_alias"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,ug,2,1,"div",1),A.YNc(2,fg,9,2,"div",2),A.YNc(3,jg,39,6,"div",3),A.YNc(4,Kg,1,3,"mat-paginator",4),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[Ct.xw,Ct.Wh,ut.O5,Ct.yH,e.BN,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,_.$V,S.pW,xA.BZ,it.YE,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,ut.PC,T.Zl,QA.gD,QA.$L,CA.ey,w.lW,xA.mD,xA.yh,xA.Ke,xA.Q2,ut.mk,T.oO,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.uU,ut.JJ],styles:[".mat-column-in_channel_alias[_ngcontent-%COMP%], .mat-column-out_channel_alias[_ngcontent-%COMP%]{flex:0 0 10%;width:10%}.mat-column-in_channel_alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-out_channel_alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();const Wg=["tableIn"],Zg=["tableOut"],Xg=["paginatorIn"],qg=["paginatorOut"];function _g(i,d){if(1&i&&(A.TgZ(0,"div",3),A._uU(1),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function $g(i,d){1&i&&A._UZ(0,"mat-progress-bar",36)}function AB(i,d){1&i&&(A.TgZ(0,"th",37),A._uU(1,"Channel ID"),A.qZA())}const oo=function(i){return{"max-width":i}};function tB(i,d){if(1&i&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,oo,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.channel_id)}}function eB(i,d){1&i&&(A.TgZ(0,"th",37),A._uU(1,"Peer Alias"),A.qZA())}function nB(i,d){if(1&i&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,oo,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.alias)}}function iB(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"Events"),A.qZA())}function rB(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.lcZ(3,1,t.events))}}function aB(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"Amount (Sats)"),A.qZA())}function oB(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function sB(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"Fee (Sats)"),A.qZA())}function lB(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function cB(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No incoming routing peer available."),A.qZA())}function gB(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting incoming routing peers..."),A.qZA())}function BB(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function uB(i,d){if(1&i&&(A.TgZ(0,"td",42),A.YNc(1,cB,2,0,"p",43),A.YNc(2,gB,2,0,"p",43),A.YNc(3,BB,2,1,"p",43),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Xl=function(i){return{"display-none":i}};function fB(i,d){if(1&i&&A._UZ(0,"tr",44),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Xl,(null==t.RoutingPeersIncoming?null:t.RoutingPeersIncoming.data)&&(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)>0))}}function hB(i,d){1&i&&A._UZ(0,"tr",45)}function EB(i,d){1&i&&A._UZ(0,"tr",46)}function wB(i,d){1&i&&A._UZ(0,"mat-progress-bar",36)}function CB(i,d){1&i&&(A.TgZ(0,"th",37),A._uU(1,"Channel ID"),A.qZA())}function QB(i,d){if(1&i&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,oo,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.channel_id)}}function dB(i,d){1&i&&(A.TgZ(0,"th",37),A._uU(1,"Peer Alias"),A.qZA())}function MB(i,d){if(1&i&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,oo,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.alias)}}function pB(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"Events"),A.qZA())}function mB(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.lcZ(3,1,t.events))}}function IB(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"Amount (Sats)"),A.qZA())}function vB(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function DB(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"Fee (Sats)"),A.qZA())}function yB(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function xB(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No outgoing routing peer available."),A.qZA())}function FB(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting outgoing routing peers..."),A.qZA())}function YB(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function TB(i,d){if(1&i&&(A.TgZ(0,"td",42),A.YNc(1,xB,2,0,"p",43),A.YNc(2,FB,2,0,"p",43),A.YNc(3,YB,2,1,"p",43),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}function SB(i,d){if(1&i&&A._UZ(0,"tr",44),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Xl,(null==t.RoutingPeersOutgoing?null:t.RoutingPeersOutgoing.data)&&(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)>0))}}function NB(i,d){1&i&&A._UZ(0,"tr",45)}function UB(i,d){1&i&&A._UZ(0,"tr",46)}const PB=function(i,d){return{"mt-2":i,"mt-1":d}},bB=function(){return["no_incoming_event"]},LB=function(i){return{"mt-2":i}},RB=function(){return["no_outgoing_event"]};function zB(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7),A._uU(4,"Incoming"),A.qZA(),A.TgZ(5,"mat-form-field",8)(6,"input",9),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyIncomingFilter()})("ngModelChange",function(v){return A.CHM(t),A.oxw().filterIn=v}),A.qZA()()(),A.TgZ(7,"div",10),A.YNc(8,$g,1,0,"mat-progress-bar",11),A.TgZ(9,"table",12,13),A.ynx(11,14),A.YNc(12,AB,2,0,"th",15),A.YNc(13,tB,2,4,"td",16),A.BQk(),A.ynx(14,17),A.YNc(15,eB,2,0,"th",15),A.YNc(16,nB,2,4,"td",16),A.BQk(),A.ynx(17,18),A.YNc(18,iB,2,0,"th",19),A.YNc(19,rB,4,3,"td",20),A.BQk(),A.ynx(20,21),A.YNc(21,aB,2,0,"th",19),A.YNc(22,oB,4,4,"td",20),A.BQk(),A.ynx(23,22),A.YNc(24,sB,2,0,"th",19),A.YNc(25,lB,4,4,"td",20),A.BQk(),A.ynx(26,23),A.YNc(27,uB,4,3,"td",24),A.BQk(),A.YNc(28,fB,1,3,"tr",25),A.YNc(29,hB,1,0,"tr",26),A.YNc(30,EB,1,0,"tr",27),A.qZA()(),A._UZ(31,"mat-paginator",28,29),A.qZA(),A.TgZ(33,"div",30)(34,"div",6)(35,"div",7),A._uU(36,"Outgoing"),A.qZA(),A.TgZ(37,"mat-form-field",8)(38,"input",9),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyOutgoingFilter()})("ngModelChange",function(v){return A.CHM(t),A.oxw().filterOut=v}),A.qZA()()(),A.TgZ(39,"div",31),A.YNc(40,wB,1,0,"mat-progress-bar",11),A.TgZ(41,"table",32,33),A.ynx(43,14),A.YNc(44,CB,2,0,"th",15),A.YNc(45,QB,2,4,"td",16),A.BQk(),A.ynx(46,17),A.YNc(47,dB,2,0,"th",15),A.YNc(48,MB,2,4,"td",16),A.BQk(),A.ynx(49,18),A.YNc(50,pB,2,0,"th",19),A.YNc(51,mB,4,3,"td",20),A.BQk(),A.ynx(52,21),A.YNc(53,IB,2,0,"th",19),A.YNc(54,vB,4,4,"td",20),A.BQk(),A.ynx(55,22),A.YNc(56,DB,2,0,"th",19),A.YNc(57,yB,4,4,"td",20),A.BQk(),A.ynx(58,34),A.YNc(59,TB,4,3,"td",24),A.BQk(),A.YNc(60,SB,1,3,"tr",25),A.YNc(61,NB,1,0,"tr",26),A.YNc(62,UB,1,0,"tr",27),A.qZA(),A._UZ(63,"mat-paginator",28,35),A.qZA()()()}if(2&i){const t=A.oxw();A.xp6(2),A.Q6J("ngClass",A.WLB(20,PB,t.screenSize===t.screenSizeEnum.XS,t.screenSize===t.screenSizeEnum.SM)),A.xp6(4),A.Q6J("ngModel",t.filterIn),A.xp6(2),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.RoutingPeersIncoming),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(23,bB)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS),A.xp6(3),A.Q6J("ngClass",A.VKq(24,LB,t.screenSize!==t.screenSizeEnum.LG)),A.xp6(4),A.Q6J("ngModel",t.filterOut),A.xp6(2),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.RoutingPeersOutgoing),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(26,RB)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let GB=(()=>{class i{constructor(t,s,v){this.logger=t,this.commonService=s,this.store=v,this.eventsData=[],this.filterValue="",this.PAGE_ID="routing",this.tableSetting={tableId:"routing_peers",recordsPerPage:a.IV,sortBy:"total_fee",sortOrder:a.Pi.DESCENDING},this.successfulEvents=[],this.displayedColumns=[],this.RoutingPeersIncoming=[],this.RoutingPeersOutgoing=[],this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.pipe((0,St.q)(1)).subscribe(t=>{var s;t.cln.apisCallStatus.FetchForwardingHistoryS.status===a.Bn.UN_INITIATED&&!(null===(s=t.cln.forwardingHistory.listForwards)||void 0===s?void 0:s.length)&&this.store.dispatch((0,Et.u0)({payload:{status:a.OO.SETTLED}}))}),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.Bo).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.successfulEvents=t.forwardingHistory.listForwards||[],this.successfulEvents.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadRoutingPeersTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:a.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,t.eventsData.firstChange||this.loadRoutingPeersTable(this.successfulEvents))}loadRoutingPeersTable(t){var s,v;if(t.length>0){const Z=this.groupRoutingPeers(t);this.RoutingPeersIncoming=new xA.by(Z[0]),this.RoutingPeersIncoming.sort=this.sortIn,null===(s=this.RoutingPeersIncoming.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.RoutingPeersIncoming.filterPredicate=(rt,vt)=>JSON.stringify(rt).toLowerCase().includes(vt),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new xA.by(Z[1]),this.RoutingPeersOutgoing.sort=this.sortOut,null===(v=this.RoutingPeersOutgoing.sort)||void 0===v||v.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.RoutingPeersOutgoing.filterPredicate=(rt,vt)=>JSON.stringify(rt).toLowerCase().includes(vt),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new xA.by([]),this.RoutingPeersOutgoing=new xA.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter(),this.logger.info(this.RoutingPeersIncoming),this.logger.info(this.RoutingPeersOutgoing)}groupRoutingPeers(t){const s=[],v=[];return t.forEach(Z=>{const rt=null==s?void 0:s.find(Ot=>Ot.channel_id===Z.in_channel),vt=null==v?void 0:v.find(Ot=>Ot.channel_id===Z.out_channel);rt?(rt.events++,rt.total_amount=+rt.total_amount+ +(Z.in_msatoshi||0),rt.total_fee=(Z.in_msatoshi||0)-(Z.out_msatoshi||0)+ +rt.total_fee):s.push({channel_id:Z.in_channel,alias:Z.in_channel_alias,events:1,total_amount:Z.in_msatoshi,total_fee:(Z.in_msatoshi||0)-(Z.out_msatoshi||0)}),vt?(vt.events++,vt.total_amount=+vt.total_amount+ +(Z.out_msatoshi||0),vt.total_fee=(Z.in_msatoshi||0)-(Z.out_msatoshi||0)+ +vt.total_fee):v.push({channel_id:Z.out_channel,alias:Z.out_channel_alias,events:1,total_amount:Z.out_msatoshi,total_fee:(Z.in_msatoshi||0)-(Z.out_msatoshi||0)})}),[this.commonService.sortDescByKey(s,"total_fee"),this.commonService.sortDescByKey(v,"total_fee")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-routing-peers"]],viewQuery:function(t,s){if(1&t&&(A.Gf(Wg,5,it.YE),A.Gf(Zg,5,it.YE),A.Gf(Xg,5),A.Gf(qg,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sortIn=v.first),A.iGM(v=A.CRH())&&(s.sortOut=v.first),A.iGM(v=A.CRH())&&(s.paginatorIn=v.first),A.iGM(v=A.CRH())&&(s.paginatorOut=v.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Peers")}]),A.TTD],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch","class","page-sub-title-container",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch",1,"page-sub-title-container"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",1,"overflow-auto","incoming-table",3,"dataSource"],["tableIn",""],["matColumnDef","channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","total_amount"],["matColumnDef","total_fee"],["matColumnDef","no_incoming_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","end stretch"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,_g,2,1,"div",1),A.YNc(2,zB,65,27,"div",2),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[Ct.xw,Ct.Wh,ut.O5,Ct.yH,ut.mk,T.oO,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,_.$V,S.pW,xA.BZ,it.YE,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,ut.PC,T.Zl,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.JJ],styles:[".mat-column-channelId[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),i})();function HB(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",7),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().activeLink=Z.link}),A._uU(1),A.qZA()}if(2&i){const t=d.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let JB=(()=>{class i{constructor(t){this.router=t,this.faChartBar=h.koM,this.links=[{link:"routingreport",name:"Routing"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof _t.Av)).subscribe({next:s=>{const v=this.links.find(Z=>s.urlAfterRedirects.includes(Z.link));this.activeLink=v?v.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Reports"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),A.YNc(8,HB,2,3,"div",6),A.qZA(),A._UZ(9,"router-outlet"),A.qZA()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartBar),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,ht.BU,ut.sg,ht.Nj,_t.rH,_t.lC],styles:[""]}),i})();var ql=Pt(7772),_l=Pt(7671),$l=Pt(1210);function OB(i,d){1&i&&(A.TgZ(0,"div",14),A._UZ(1,"mat-progress-bar",15),A.TgZ(2,"p"),A._uU(3,"Getting Forwarding History..."),A.qZA()())}function kB(i,d){if(1&i&&(A.TgZ(0,"div",16),A._uU(1),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function jB(i,d){if(1&i&&(A.TgZ(0,"div",17),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&i){const t=A.oxw();A.Q6J("@fadeIn",t.totalFeeMsat),A.xp6(1),A.AsE("",A.xi3(2,3,t.totalFeeMsat/1e3||0,"1.0-2")," Sats/",A.lcZ(3,6,t.filteredEventsBySelectedPeriod.length||0)," Events")}}function KB(i,d){1&i&&(A.TgZ(0,"div",14),A._uU(1,"No routing report for the selected period"),A.qZA())}function VB(i,d){if(1&i&&(A.TgZ(0,"span")(1,"span",20),A._uU(2),A.ALo(3,"number"),A.qZA(),A.TgZ(4,"span",20),A._uU(5),A.ALo(6,"number"),A.qZA()()),2&i){const t=d.model,s=A.oxw(2);A.xp6(2),A.hij("Events: ",A.lcZ(3,2,(s.selReportBy===s.reportBy.EVENTS?t.value:t.extra.totalEvents)||0),""),A.xp6(3),A.hij("Fee: ",A.xi3(6,4,(s.selReportBy===s.reportBy.EVENTS?t.extra.totalFees:t.value)||0,"1.0-2"),"")}}function WB(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"ngx-charts-bar-vertical",18),A.NdJ("select",function(v){return A.CHM(t),A.oxw().onChartBarSelected(v)})("mouseup",function(v){return A.CHM(t),A.oxw().onChartMouseUp(v)}),A.YNc(1,VB,7,7,"ng-template",null,19,A.W1O),A.qZA()}if(2&i){const t=A.oxw();A.Q6J("view",t.view)("results",t.routingReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function ZB(i,d){if(1&i&&A._UZ(0,"rtl-cln-forwarding-history",21),2&i){const t=A.oxw();A.Q6J("pageId","reports")("tableId","routing")("eventsData",t.filteredEventsBySelectedPeriod)("filterValue",t.eventFilterValue)}}let XB=(()=>{class i{constructor(t,s,v,Z){this.logger=t,this.commonService=s,this.store=v,this.dataService=Z,this.reportPeriod=a.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.reportBy=a.Xr,this.selReportBy=a.Xr.FEES,this.totalFeeMsat=null,this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.routingReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Fee (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===a.cu.XS||this.screenSize===a.cu.SM),this.store.pipe((0,St.q)(1)).subscribe(t=>{var s;t.cln.apisCallStatus.FetchForwardingHistoryS.status===a.Bn.UN_INITIATED&&!(null===(s=t.cln.forwardingHistory.listForwards)||void 0===s?void 0:s.length)&&this.store.dispatch((0,Et.u0)({payload:{status:a.OO.SETTLED}}))}),this.store.select(B.Bo).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{t.forwardingHistory.status===a.OO.SETTLED&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR?this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:"":this.apiCallStatus.status===a.Bn.COMPLETED&&(this.events=t.forwardingHistory.listForwards||[],this.filterForwardingEvents(this.startDate,this.endDate)),this.logger.info(t))}),this.commonService.containerSizeUpdated.pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case a.cu.MD:this.screenPaddingX=t.width/10;break;case a.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}filterForwardingEvents(t,s){const v=Math.round(t.getTime()/1e3),Z=Math.round(s.getTime()/1e3);this.filteredEventsBySelectedPeriod=[],this.routingReportData=[],this.totalFeeMsat=null,this.events&&this.events.length>0&&(this.events.forEach(rt=>{rt.received_time&&rt.received_time>=v&&rt.received_time0&&"ngx-charts"===t.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(t){this.eventFilterValue=this.reportPeriod===a.op[1]?t.name+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+a.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(t){var s,v;const Z=Math.round(t.getTime()/1e3),rt=[];if(this.totalFeeMsat=0,this.reportPeriod===a.op[1]){for(let vt=0;vt<12;vt++)rt.push({name:a.gg[vt].name,value:0,extra:{totalEvents:0}});null===(s=this.filteredEventsBySelectedPeriod)||void 0===s||s.map(vt=>{const Ot=vt.received_time?new Date(1e3*+vt.received_time).getMonth():12;return rt[Ot].value=vt.fee?rt[Ot].value+ +vt.fee/1e3:rt[Ot].value,rt[Ot].extra.totalEvents=rt[Ot].extra.totalEvents+1,this.totalFeeMsat=vt.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +vt.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}else{for(let vt=0;vt{const Ot=vt.received_time?Math.floor((+vt.received_time-Z)/this.secondsInADay):0;return rt[Ot].value=vt.fee?rt[Ot].value+ +vt.fee/1e3:rt[Ot].value,rt[Ot].extra.totalEvents=rt[Ot].extra.totalEvents+1,this.totalFeeMsat=vt.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +vt.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}return rt}prepareEventsReport(t){var s,v;const Z=Math.round(t.getTime()/1e3),rt=[];if(this.totalFeeMsat=0,this.reportPeriod===a.op[1]){for(let vt=0;vt<12;vt++)rt.push({name:a.gg[vt].name,value:0,extra:{totalFees:0}});null===(s=this.filteredEventsBySelectedPeriod)||void 0===s||s.map(vt=>{const Ot=vt.received_time?new Date(1e3*+vt.received_time).getMonth():12;return rt[Ot].value=rt[Ot].value+1,rt[Ot].extra.totalFees=vt.fee?rt[Ot].extra.totalFees+ +vt.fee/1e3:rt[Ot].extra.totalFees,this.totalFeeMsat=vt.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +vt.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}else{for(let vt=0;vt{const Ot=vt.received_time?Math.floor((+vt.received_time-Z)/this.secondsInADay):0;return rt[Ot].value=rt[Ot].value+1,rt[Ot].extra.totalFees=vt.fee?rt[Ot].extra.totalFees+ +vt.fee/1e3:rt[Ot].extra.totalFees,this.totalFeeMsat=vt.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +vt.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}return rt}onSelectionChange(t){const s=t.selDate.getMonth(),v=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===a.op[1]?(this.startDate=new Date(v,0,1,0,0,0),this.endDate=new Date(v,11,31,23,59,59)):(this.startDate=new Date(v,s,1,0,0,0),this.endDate=new Date(v,s,this.getMonthDays(s,v),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(t,s){return 1===t&&s%4==0?a.gg[t].days+1:a.gg[t].days}onSelReportByChange(){this.yAxisLabel=this.selReportBy===this.reportBy.EVENTS?"Events":"Fee (Sats)",this.routingReportData=this.selReportBy===this.reportBy.EVENTS?this.prepareEventsReport(this.startDate):this.prepareFeeReport(this.startDate)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(Ut.D))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-routing-report"]],hostBindings:function(t,s){1&t&&A.NdJ("mouseup",function(Z){return s.onChartMouseUp(Z)})},decls:19,vars:9,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","center center",1,"padding-gap-x"],["color","primary","name","selReportBy","fxFlex","100","fxLayoutAlign","start start",1,"my-1",3,"ngModel","ngModelChange","change"],[1,"mr-2"],["tabindex","1",1,"mr-2",3,"value"],["tabindex","2",3,"value"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1 error-border",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],[1,"mt-1"],["class","one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup",4,"ngIf"],[3,"pageId","tableId","eventsData","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],["mode","indeterminate"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1","error-border"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"pageId","tableId","eventsData","filterValue"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),A.NdJ("stepChanged",function(Z){return s.onSelectionChange(Z)}),A.qZA(),A.TgZ(2,"div",2)(3,"mat-radio-group",3),A.NdJ("ngModelChange",function(Z){return s.selReportBy=Z})("change",function(){return s.onSelReportByChange()}),A.TgZ(4,"span",4),A._uU(5,"Report By: "),A.qZA(),A.TgZ(6,"mat-radio-button",5),A._uU(7,"Fees"),A.qZA(),A.TgZ(8,"mat-radio-button",6),A._uU(9,"Events"),A.qZA()()(),A.TgZ(10,"div",7),A.YNc(11,OB,4,0,"div",8),A.YNc(12,kB,2,1,"div",9),A.YNc(13,jB,4,8,"div",10),A.YNc(14,KB,2,0,"div",8),A.TgZ(15,"div",11),A.YNc(16,WB,3,11,"ngx-charts-bar-vertical",12),A.qZA(),A.TgZ(17,"div",11),A.YNc(18,ZB,1,4,"rtl-cln-forwarding-history",13),A.qZA()()()),2&t&&(A.xp6(3),A.Q6J("ngModel",s.selReportBy),A.xp6(3),A.s9C("value",s.reportBy.FEES),A.xp6(2),A.s9C("value",s.reportBy.EVENTS),A.xp6(3),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.ERROR),A.xp6(1),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.COMPLETED&&s.routingReportData.length>0&&s.filteredEventsBySelectedPeriod.length>0),A.xp6(1),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.COMPLETED&&(s.routingReportData.length<=0||s.filteredEventsBySelectedPeriod.length<=0)),A.xp6(2),A.Q6J("ngIf",s.routingReportData.length>0&&s.filteredEventsBySelectedPeriod.length>0),A.xp6(2),A.Q6J("ngIf",s.filteredEventsBySelectedPeriod&&s.filteredEventsBySelectedPeriod.length>0))},directives:[Ct.xw,Ct.Wh,Ct.yH,_l.D,kt.VQ,OA.JJ,OA.On,kt.U0,ut.O5,S.pW,$l.K$,Wl],pipes:[ut.JJ],styles:[""],data:{animation:[ql.J]}}),i})();var qB=Pt(165);function _B(i,d){if(1&i&&(A.TgZ(0,"div",10),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.AsE(" Paid ",A.xi3(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod/1e3||0,"1.0-2")," Sats/",A.lcZ(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function $B(i,d){if(1&i&&(A.TgZ(0,"div",10),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.AsE(" Received ",A.xi3(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod/1e3||0,"1.0-2")," Sats/",A.lcZ(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function Au(i,d){if(1&i&&(A.TgZ(0,"div",8),A.YNc(1,_B,4,7,"div",9),A.YNc(2,$B,4,7,"div",9),A.qZA()),2&i){const t=A.oxw();A.Q6J("@fadeIn",t.transactionsReportSummary),A.xp6(1),A.Q6J("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod),A.xp6(1),A.Q6J("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function tu(i,d){1&i&&(A.TgZ(0,"div",11),A._uU(1,"No transactions report for the selected period"),A.qZA())}function eu(i,d){if(1&i&&(A.TgZ(0,"span",14),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&i){const t=d.model;A.xp6(1),A.HOy("",t.name,": ",A.xi3(2,4,t.value||0,"1.0-2"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",A.lcZ(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function nu(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"ngx-charts-bar-vertical-2d",12),A.NdJ("select",function(v){return A.CHM(t),A.oxw().onChartBarSelected(v)})("mouseup",function(v){return A.CHM(t),A.oxw().onChartMouseUp(v)}),A.YNc(1,eu,4,9,"ng-template",null,13,A.W1O),A.qZA()}if(2&i){const t=A.oxw();A.Q6J("view",t.view)("results",t.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",t.reportPeriod===t.scrollRanges[0]?2:4)}}function iu(i,d){if(1&i&&A._UZ(0,"rtl-transactions-report-table",15),2&i){const t=A.oxw();A.Q6J("displayedColumns",t.displayedColumns)("tableSetting",t.tableSetting)("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let ru=(()=>{class i{constructor(t,s,v){this.logger=t,this.commonService=s,this.store=v,this.scrollRanges=a.op,this.reportPeriod=a.op[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.PAGE_ID="reports",this.tableSetting={tableId:"transactions",recordsPerPage:a.IV,sortBy:"date",sortOrder:a.Pi.DESCENDING},this.displayedColumns=["date","amount_paid","num_payments","amount_received","num_invoices"],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[],this.transactionsNonZeroReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Amount (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===a.cu.XS||this.screenSize===a.cu.SM),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s,v;t.apiCallStatus.status===a.Bn.ERROR?this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?["date","amount_paid","amount_received"]:["date","amount_paid","num_payments","amount_received","num_invoices"]:(this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection))),this.displayedColumns.push("actions"),this.logger.info(this.displayedColumns)}),this.store.select(B.PP).pipe((0,r.R)(this.unSubs[1]),(0,o.M)(this.store.select(B.gc))).subscribe(([t,s])=>{this.payments=t.payments,this.invoices=s.listInvoices.invoices||[],this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()}),this.commonService.containerSizeUpdated.pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{switch(this.screenSize){case a.cu.MD:this.screenPaddingX=t.width/10;break;case a.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(t){this.transactionFilterValue=this.reportPeriod===a.op[1]?t.series+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+a.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,s){var v,Z;const rt=Math.round(t.getTime()/1e3),vt=Math.round(s.getTime()/1e3),Ot=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const qe=null===(v=this.payments)||void 0===v?void 0:v.filter(se=>"complete"===se.status&&se.created_at&&se.created_at>=rt&&se.created_at"paid"===se.status&&se.paid_at&&se.paid_at>=rt&&se.paid_at{const _e=new Date(1e3*(se.created_at||0)).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+(se.msatoshi_sent||0),Ot[_e].series[0].value=Ot[_e].series[0].value+(se.msatoshi_sent||0)/1e3,Ot[_e].series[0].extra.total=Ot[_e].series[0].extra.total+1,this.transactionsReportSummary}),null==Bn||Bn.map(se=>{const _e=new Date(1e3*+(se.paid_at||0)).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+(se.msatoshi_received||0),Ot[_e].series[1].value=Ot[_e].series[1].value+(se.msatoshi_received||0)/1e3,Ot[_e].series[1].extra.total=Ot[_e].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let se=0;se{const _e=Math.floor((+(se.created_at||0)-rt)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+(se.msatoshi_sent||0),Ot[_e].series[0].value=Ot[_e].series[0].value+(se.msatoshi_sent||0)/1e3,Ot[_e].series[0].extra.total=Ot[_e].series[0].extra.total+1,this.transactionsReportSummary}),null==Bn||Bn.map(se=>{const _e=Math.floor((+(se.paid_at||0)-rt)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+(se.msatoshi_received||0),Ot[_e].series[1].value=Ot[_e].series[1].value+(se.msatoshi_received||0)/1e3,Ot[_e].series[1].extra.total=Ot[_e].series[1].extra.total+1,this.transactionsReportSummary})}return Ot}prepareTableData(){var t;return null===(t=this.transactionsReportData)||void 0===t?void 0:t.reduce((s,v)=>v.series[0].extra.total>0||v.series[1].extra.total>0?s.concat({date:v.date,amount_paid:v.series[0].value,num_payments:v.series[0].extra.total,amount_received:v.series[1].value,num_invoices:v.series[1].extra.total}):s,[])}onSelectionChange(t){const s=t.selDate.getMonth(),v=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===a.op[1]?(this.startDate=new Date(v,0,1,0,0,0),this.endDate=new Date(v,11,31,23,59,59)):(this.startDate=new Date(v,s,1,0,0,0),this.endDate=new Date(v,s,this.getMonthDays(s,v),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(t,s){return 1===t&&s%4==0?a.gg[t].days+1:a.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-transactions-report"]],hostBindings:function(t,s){1&t&&A.NdJ("mouseup",function(Z){return s.onChartMouseUp(Z)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[3,"displayedColumns","tableSetting","dataList","dataRange","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"displayedColumns","tableSetting","dataList","dataRange","filterValue"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),A.NdJ("stepChanged",function(Z){return s.onSelectionChange(Z)}),A.qZA(),A.TgZ(2,"div",2),A.YNc(3,Au,3,3,"div",3),A.YNc(4,tu,2,0,"div",4),A.TgZ(5,"div",5),A.YNc(6,nu,3,13,"ngx-charts-bar-vertical-2d",6),A.qZA(),A.TgZ(7,"div",5),A.YNc(8,iu,1,5,"rtl-transactions-report-table",7),A.qZA()()()),2&t&&(A.xp6(3),A.Q6J("ngIf",s.transactionsNonZeroReportData.length>0),A.xp6(1),A.Q6J("ngIf",s.transactionsNonZeroReportData.length<=0),A.xp6(2),A.Q6J("ngIf",s.transactionsNonZeroReportData.length>0),A.xp6(2),A.Q6J("ngIf",s.transactionsNonZeroReportData.length>0))},directives:[Ct.xw,Ct.Wh,Ct.yH,_l.D,ut.O5,$l.H5,qB.g],pipes:[ut.JJ],styles:[""],data:{animation:[ql.J]}}),i})();var Re=Pt(1643),au=Pt(9442);function ou(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",8),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().activeLink=Z.link}),A._uU(1),A.qZA()}if(2&i){const t=d.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let su=(()=>{class i{constructor(t){this.router=t,this.faSearch=h.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof _t.Av)).subscribe({next:s=>{const v=this.links.find(Z=>s.urlAfterRedirects.includes(Z.link));this.activeLink=v?v.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-graph"]],decls:11,vars:2,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Graph Lookups"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),A.YNc(8,ou,2,3,"div",6),A.qZA(),A.TgZ(9,"div",7),A._UZ(10,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faSearch),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,ht.BU,ut.sg,ht.Nj,_t.rH,Ct.yH,_t.lC],styles:[""]}),i})();var lu=Pt(4641),cu=Pt(8493);function gu(i,d){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.offerError)}}function Bu(i,d){if(1&i&&(A.TgZ(0,"div",21),A._UZ(1,"fa-icon",22),A.YNc(2,gu,2,1,"span",23),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.offerError)}}let uu=(()=>{class i{constructor(t,s,v,Z,rt,vt){this.dialogRef=t,this.data=s,this.store=v,this.decimalPipe=Z,this.commonService=rt,this.actions=vt,this.faExclamationTriangle=h.eHv,this.selNode={},this.description="",this.vendor="",this.offerValueHint="",this.information={},this.pageSize=a.IV,this.offerError="",this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(B.lw).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.information=t,this.vendor=this.information.alias}),this.actions.pipe((0,r.R)(this.unSubs[2]),(0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewOffer"===t.payload.action&&(t.payload.status===a.Bn.ERROR&&(this.offerError=t.payload.message),t.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddOffer(){this.offerError="",this.store.dispatch((0,Et.dh)({payload:{amount:this.offerValue?this.offerValue+"sats":"any",description:this.description,vendor:this.vendor}}))}resetData(){this.description="",this.vendor=this.information.alias,this.offerValue=null,this.offerValueHint="",this.offerError=""}onOfferValueChange(){this.selNode&&this.selNode.fiatConversion&&this.offerValue&&this.offerValue>99&&(this.offerValueHint="",this.commonService.convertCurrency(this.offerValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,r.R)(this.unSubs[3])).subscribe({next:t=>{this.offerValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,a.Xz.OTHER)+" "+t.unit},error:t=>{this.offerValueHint="Conversion Error: "+t}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(ut.JJ),A.Y36(C.v),A.Y36(Tt.eX))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-create-offer"]],decls:28,vars:8,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","6","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addOfferForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","1","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","2","name","offerValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","58","fxLayoutAlign","start end"],["matInput","","placeholder","Vendor","tabindex","3","name","vendor",3,"ngModel","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","4","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","5",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Create Offer"),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),A.NdJ("ngModelChange",function(Z){return s.description=Z}),A.qZA()(),A.TgZ(13,"div",11)(14,"mat-form-field",12)(15,"input",13),A.NdJ("ngModelChange",function(Z){return s.offerValue=Z})("keyup",function(){return s.onOfferValueChange()}),A.qZA(),A.TgZ(16,"span",14),A._uU(17," Sats "),A.qZA(),A.TgZ(18,"mat-hint"),A._uU(19),A.qZA()(),A.TgZ(20,"mat-form-field",15)(21,"input",16),A.NdJ("ngModelChange",function(Z){return s.vendor=Z}),A.qZA()()(),A.YNc(22,Bu,3,2,"div",17),A.TgZ(23,"div",18)(24,"button",19),A.NdJ("click",function(){return s.resetData()}),A._uU(25,"Clear Field"),A.qZA(),A.TgZ(26,"button",20),A.NdJ("click",function(){return s.onAddOffer()}),A._uU(27,"Create Offer"),A.qZA()()()()()()),2&t&&(A.xp6(6),A.Q6J("mat-dialog-close",!1),A.xp6(6),A.Q6J("ngModel",s.description),A.xp6(3),A.Q6J("ngModel",s.offerValue)("step",100)("min",1),A.xp6(4),A.Oqu(s.offerValueHint),A.xp6(2),A.Q6J("ngModel",s.vendor),A.xp6(1),A.Q6J("ngIf",""!==s.offerError))},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,Mt.ZT,g.dn,OA._Y,OA.JL,OA.F,P.KE,H.Nt,OA.Fj,k.h,OA.JJ,OA.On,OA.wV,OA.qQ,z.q,P.R9,P.bx,ut.O5,e.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();var Ac=Pt(1462);function fu(i,d){1&i&&A._UZ(0,"mat-progress-bar",30)}function hu(i,d){1&i&&A._UZ(0,"th",31)}const tc=function(i){return{"mr-0":i}};function Eu(i,d){if(1&i&&A._UZ(0,"span",35),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,tc,t.screenSize===t.screenSizeEnum.XS))}}function wu(i,d){if(1&i&&A._UZ(0,"span",36),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,tc,t.screenSize===t.screenSizeEnum.XS))}}function Cu(i,d){if(1&i&&(A.TgZ(0,"td",32),A.YNc(1,Eu,1,3,"span",33),A.YNc(2,wu,1,3,"span",34),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Q6J("ngIf",t.active),A.xp6(1),A.Q6J("ngIf",!t.active)}}function Qu(i,d){1&i&&(A.TgZ(0,"th",31),A._uU(1," Offer ID "),A.qZA())}const ec=function(i){return{"max-width":i}};function du(i,d){if(1&i&&(A.TgZ(0,"td",32)(1,"div",37)(2,"span",38),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,ec,s.screenSize===s.screenSizeEnum.XS?"25rem":"50rem")),A.xp6(2),A.hij(" ",t.offer_id," ")}}function Mu(i,d){1&i&&(A.TgZ(0,"th",31),A._uU(1," Single Use "),A.qZA())}function pu(i,d){if(1&i&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(t.single_use?"Yes":"No")}}function mu(i,d){1&i&&(A.TgZ(0,"th",31),A._uU(1," Used "),A.qZA())}function Iu(i,d){if(1&i&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",t.used?"Yes":"No"," ")}}function vu(i,d){1&i&&(A.TgZ(0,"th",31),A._uU(1," Invoice "),A.qZA())}function Du(i,d){if(1&i&&(A.TgZ(0,"td",32)(1,"div",37)(2,"span",38),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,ec,s.screenSize===s.screenSizeEnum.XS?"25rem":"50rem")),A.xp6(2),A.hij(" ",t.bolt12," ")}}function yu(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",39)(1,"div",40)(2,"mat-select",41),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",42),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function xu(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-option",42),A.NdJ("click",function(){A.CHM(t);const v=A.oxw().$implicit;return A.oxw().onDisableOffer(v)}),A._uU(1,"Disable Offer"),A.qZA()}}function Fu(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"mat-option",42),A.NdJ("click",function(){A.CHM(t);const v=A.oxw().$implicit;return A.oxw().onPrintOffer(v)}),A._uU(1,"Export QR code"),A.qZA()}}const Yu=function(i){return{"px-3":i}};function Tu(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",43)(1,"div",40)(2,"mat-select",44),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",42),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onOfferClick(Z)}),A._uU(5,"View Info"),A.qZA(),A.YNc(6,xu,2,0,"mat-option",45),A.YNc(7,Fu,2,0,"mat-option",45),A.qZA()()()}if(2&i){const t=d.$implicit,s=A.oxw();A.Q6J("ngClass",A.VKq(3,Yu,s.screenSize!==s.screenSizeEnum.XS)),A.xp6(6),A.Q6J("ngIf",t.active),A.xp6(1),A.Q6J("ngIf",t.active)}}function Su(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No offer available."),A.qZA())}function Nu(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting offers..."),A.qZA())}function Uu(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function Pu(i,d){if(1&i&&(A.TgZ(0,"td",46),A.YNc(1,Su,2,0,"p",47),A.YNc(2,Nu,2,0,"p",47),A.YNc(3,Uu,2,1,"p",47),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const bu=function(i){return{"display-none":i}};function Lu(i,d){if(1&i&&A._UZ(0,"tr",48),2&i){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,bu,(null==t.offers?null:t.offers.data)&&(null==t.offers||null==t.offers.data?null:t.offers.data.length)>0))}}function Ru(i,d){1&i&&A._UZ(0,"tr",49)}function zu(i,d){1&i&&A._UZ(0,"tr",50)}const Gu=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}},Hu=function(){return["no_offer"]};let Ju=(()=>{class i{constructor(t,s,v,Z,rt,vt,Ot){this.logger=t,this.store=s,this.commonService=v,this.rtlEffects=Z,this.dataService=rt,this.decimalPipe=vt,this.datePipe=Ot,this.faHistory=h.qO$,this.PAGE_ID="transactions",this.tableSetting={tableId:"offers",recordsPerPage:a.IV,sortBy:"offer_id",sortOrder:a.Pi.DESCENDING},this.selNode={},this.newlyAddedOfferMemo="",this.newlyAddedOfferValue=0,this.description="",this.offerValue=null,this.offerValueHint="",this.displayedColumns=[],this.offerPaymentReq="",this.offerJSONArr=[],this.information={},this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(B.lw).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[2])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.unshift("active"),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.Y_).pipe((0,r.R)(this.unSubs[3])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.offerJSONArr=t.offers||[],this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr)}openCreateOfferModal(){this.store.dispatch((0,KA.qR)({payload:{data:{pageSize:this.pageSize,component:uu}}}))}onOfferClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{offer:{used:t.used,single_use:t.single_use,active:t.active,offer_id:t.offer_id,bolt12:t.bolt12,bolt12_unsigned:t.bolt12_unsigned},newlyAdded:!1,component:Ac.k}}}))}onDisableOffer(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Disable Offer",titleMessage:"Disabling Offer: "+(t.offer_id||t.bolt12),noBtnText:"Cancel",yesBtnText:"Disable"}}})),this.rtlEffects.closeConfirm.pipe((0,r.R)(this.unSubs[4])).subscribe(s=>{s&&this.store.dispatch((0,Et.i9)({payload:{offer_id:t.offer_id}}))})}onPrintOffer(t){this.dataService.decodePayment(t.bolt12,!1).pipe((0,St.q)(1)).subscribe(s=>{s.offer_id&&!s.amount_msat?(s.amount_msat="0msat",s.amount=0):s.amount=s.amount?+s.amount:s.amount_msat?+s.amount_msat.slice(0,-4):null;const v={pageSize:"A5",pageOrientation:"portrait",pageMargins:[10,50,10,50],background:{svg:'\n \n \n \n \n \n ',width:249,height:333,absolutePosition:{x:84,y:160}},header:{text:s.vendor||s.issuer||"",alignment:"center",fontSize:25,color:"#272727",margin:[0,20,0,0]},content:[{svg:'',width:249,height:40,alignment:"center"},{text:s.description?s.description.substring(0,160):"",alignment:"center",fontSize:16,color:"#5C5C5C"},{qr:t.bolt12,eccLevel:"M",fit:"227",alignment:"center",absolutePosition:{x:7,y:205}},{text:(null==s?void 0:s.amount_msat)&&0!==(null==s?void 0:s.amount)?this.decimalPipe.transform((s.amount||0)/1e3)+" SATS":"Open amount",fontSize:20,bold:!1,color:"white",alignment:"center",absolutePosition:{x:0,y:430}},{text:"SCAN TO PAY",fontSize:22,bold:!0,color:"white",alignment:"center",absolutePosition:{x:0,y:455}}],footer:{svg:'\n \n \n \n \n ',alignment:"center"}};lu.createPdf(v,null,null,cu.I.vfs).download("Offer-"+(s&&s.description?s.description:t.bolt12))})}applyFilter(){this.offers.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){var s;this.offers=new xA.by(t?[...t]:[]),this.offers.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,this.offers.sort=this.sort,null===(s=this.offers.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.offers.filterPredicate=(v,Z)=>(("active"===Z||"inactive"===Z||"used"===Z||"unused"===Z||"single"===Z||"multiple"===Z)&&(Z=" "+Z),((v.active?" active":" inactive")+(v.used?" used":" unused")+(v.single_use?" single":" multiple")+JSON.stringify(v).toLowerCase()).includes(Z)),this.offers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.offers.data&&this.offers.data.length>0&&this.commonService.downloadFile(this.offers.data,"Offers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(DA.V),A.Y36(Ut.D),A.Y36(ut.JJ),A.Y36(ut.uU))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-offers-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Offers")}])],decls:40,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","active"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","offer_id"],["matColumnDef","single_use"],["matColumnDef","used"],["matColumnDef","bolt12"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Active","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Inactive","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Active","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Inactive","matTooltipPosition","right",1,"dot","red",3,"ngClass"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"button",2),A.NdJ("click",function(){return s.openCreateOfferModal()}),A._uU(3,"Create Offer"),A.qZA()(),A.TgZ(4,"div",3)(5,"div",4)(6,"div",5),A._UZ(7,"fa-icon",6),A.TgZ(8,"span",7),A._uU(9,"Offers History"),A.qZA()(),A.TgZ(10,"mat-form-field",8)(11,"input",9),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(Z){return s.selFilter=Z}),A.qZA()()(),A.TgZ(12,"div",10),A.YNc(13,fu,1,0,"mat-progress-bar",11),A.TgZ(14,"table",12,13),A.ynx(16,14),A.YNc(17,hu,1,0,"th",15),A.YNc(18,Cu,3,2,"td",16),A.BQk(),A.ynx(19,17),A.YNc(20,Qu,2,0,"th",15),A.YNc(21,du,4,4,"td",16),A.BQk(),A.ynx(22,18),A.YNc(23,Mu,2,0,"th",15),A.YNc(24,pu,2,1,"td",16),A.BQk(),A.ynx(25,19),A.YNc(26,mu,2,0,"th",15),A.YNc(27,Iu,2,1,"td",16),A.BQk(),A.ynx(28,20),A.YNc(29,vu,2,0,"th",15),A.YNc(30,Du,4,4,"td",16),A.BQk(),A.ynx(31,21),A.YNc(32,yu,6,0,"th",22),A.YNc(33,Tu,8,5,"td",23),A.BQk(),A.ynx(34,24),A.YNc(35,Pu,4,3,"td",25),A.BQk(),A.YNc(36,Lu,1,3,"tr",26),A.YNc(37,Ru,1,0,"tr",27),A.YNc(38,zu,1,0,"tr",28),A.qZA()(),A._UZ(39,"mat-paginator",29),A.qZA()()),2&t&&(A.xp6(7),A.Q6J("icon",s.faHistory),A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.offers)("ngClass",A.VKq(11,Gu,""!==s.errorMessage)),A.xp6(22),A.Q6J("matFooterRowDef",A.DdM(13,Hu)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.yH,Ct.Wh,w.lW,e.BN,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,_.$V,ut.O5,S.pW,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,nA.gM,ut.PC,T.Zl,QA.gD,QA.$L,CA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],styles:[".mat-column-active[_ngcontent-%COMP%]{width:2rem}.mat-column-offer_id[_ngcontent-%COMP%], .mat-column-bolt12[_ngcontent-%COMP%]{flex:0 0 35%;width:35%}.mat-column-offer_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-bolt12[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();function Ou(i,d){1&i&&A._UZ(0,"mat-progress-bar",34)}function ku(i,d){1&i&&(A.TgZ(0,"th",35),A._uU(1," Updated At "),A.qZA())}function ju(i,d){if(1&i&&(A.TgZ(0,"td",36),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,t.lastUpdatedAt,"dd/MMM/y HH:mm"))}}function Ku(i,d){1&i&&(A.TgZ(0,"th",35),A._uU(1," Title "),A.qZA())}const jl=function(i){return{"max-width":i}};function Vu(i,d){if(1&i&&(A.TgZ(0,"td",36)(1,"div",37)(2,"span",38),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,jl,s.screenSize===s.screenSizeEnum.XS?"20rem":"30rem")),A.xp6(2),A.Oqu(t.title)}}function Wu(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1," Amount (Sats) "),A.qZA())}function Zu(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(0===t.amountMSat?"Open":A.lcZ(3,1,t.amountMSat/1e3))}}function Xu(i,d){1&i&&(A.TgZ(0,"th",35),A._uU(1," Description "),A.qZA())}function qu(i,d){if(1&i&&(A.TgZ(0,"td",36)(1,"div",37)(2,"span",38),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,jl,s.screenSize===s.screenSizeEnum.XS?"20rem":"30rem")),A.xp6(2),A.Oqu(t.description)}}function _u(i,d){1&i&&(A.TgZ(0,"th",35),A._uU(1," Vendor "),A.qZA())}function $u(i,d){if(1&i&&(A.TgZ(0,"td",36),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(t.vendor)}}function Af(i,d){1&i&&(A.TgZ(0,"th",42),A._uU(1," Invoice "),A.qZA())}function tf(i,d){if(1&i&&(A.TgZ(0,"td",43)(1,"div",37)(2,"span",38),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,jl,s.screenSize===s.screenSizeEnum.XS?"20rem":"30rem")),A.xp6(2),A.Oqu(t.bolt12)}}function ef(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",44)(1,"div",45)(2,"mat-select",46),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",47),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}const nf=function(i){return{"pr-3":i}};function rf(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",48)(1,"div",45)(2,"mat-select",49),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",47),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onOfferBookmarkClick(Z)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",47),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onRePayOffer(Z)}),A._uU(7,"Pay Again"),A.qZA(),A.TgZ(8,"mat-option",47),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onDeleteBookmark(Z)}),A._uU(9,"Delete Bookmark"),A.qZA()()()()}if(2&i){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,nf,t.screenSize!==t.screenSizeEnum.XS))}}function af(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No offer bookmarked."),A.qZA())}function of(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting offer bookmarks..."),A.qZA())}function sf(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function lf(i,d){if(1&i&&(A.TgZ(0,"td",50),A.YNc(1,af,2,0,"p",51),A.YNc(2,of,2,0,"p",51),A.YNc(3,sf,2,1,"p",51),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.offersBookmarks&&t.offersBookmarks.data)||(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offersBookmarks&&t.offersBookmarks.data)||(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offersBookmarks&&t.offersBookmarks.data)||(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const cf=function(i){return{"display-none":i}};function gf(i,d){if(1&i&&A._UZ(0,"tr",52),2&i){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,cf,(null==t.offersBookmarks?null:t.offersBookmarks.data)&&(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)>0))}}function Bf(i,d){1&i&&A._UZ(0,"tr",53)}function uf(i,d){1&i&&A._UZ(0,"tr",54)}const ff=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}},hf=function(){return["no_offer"]};let Ef=(()=>{class i{constructor(t,s,v,Z){this.logger=t,this.store=s,this.commonService=v,this.rtlEffects=Z,this.faHistory=h.qO$,this.PAGE_ID="transactions",this.tableSetting={tableId:"offer_bookmarks",recordsPerPage:a.IV,sortBy:"lastUpdatedAt",sortOrder:a.Pi.DESCENDING},this.displayedColumns=[],this.offersBookmarksJSONArr=[],this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.selFilter="",this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(B.AS).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.EQ).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.offersBookmarksJSONArr=t.offersBookmarks||[],this.offersBookmarksJSONArr&&this.offersBookmarksJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offersBookmarksJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.offersBookmarksJSONArr&&this.offersBookmarksJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offersBookmarksJSONArr)}onOfferBookmarkClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{offer:{bolt12:t.bolt12},newlyAdded:!1,component:Ac.k}}}))}onDeleteBookmark(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Delete Bookmark",titleMessage:"Deleting Bookmark: "+(t.title||t.description),noBtnText:"Cancel",yesBtnText:"Delete"}}})),this.rtlEffects.closeConfirm.pipe((0,r.R)(this.unSubs[2])).subscribe(s=>{s&&this.store.dispatch((0,Et._9)({payload:{bolt12:t.bolt12}}))})}onRePayOffer(t){this.store.dispatch((0,KA.qR)({payload:{data:{paymentType:a.IX.OFFER,bolt12:t.bolt12,offerTitle:t.title,component:Yn}}}))}applyFilter(){this.offersBookmarks.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){var s;this.offersBookmarks=new xA.by(t?[...t]:[]),this.offersBookmarks.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,this.offersBookmarks.sort=this.sort,null===(s=this.offersBookmarks.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.offersBookmarks.filterPredicate=(v,Z)=>JSON.stringify(v).toLowerCase().includes(Z),this.offersBookmarks.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.offersBookmarks.data&&this.offersBookmarks.data.length>0&&this.commonService.downloadFile(this.offersBookmarks.data,"OfferBookmarks")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(DA.V))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-offer-bookmarks-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Offer Bookmarks")}])],decls:41,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","lastUpdatedAt"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","amountMSat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-2",4,"matHeaderCellDef"],["mat-cell","","class","pr-2",4,"matCellDef"],["matColumnDef","description"],["matColumnDef","vendor"],["matColumnDef","bolt12"],["mat-header-cell","","mat-sort-header","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-2"],["mat-cell","",1,"pr-2"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-1"],["mat-cell","",1,"pl-1"],["mat-header-cell","",1,"pr-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"div",1),A.TgZ(2,"div",2)(3,"div",3)(4,"div",4),A._UZ(5,"fa-icon",5),A.TgZ(6,"span",6),A._uU(7,"Offer Bookmarks"),A.qZA()(),A.TgZ(8,"mat-form-field",7)(9,"input",8),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(Z){return s.selFilter=Z}),A.qZA()()(),A.TgZ(10,"div",9),A.YNc(11,Ou,1,0,"mat-progress-bar",10),A.TgZ(12,"table",11,12),A.ynx(14,13),A.YNc(15,ku,2,0,"th",14),A.YNc(16,ju,3,4,"td",15),A.BQk(),A.ynx(17,16),A.YNc(18,Ku,2,0,"th",14),A.YNc(19,Vu,4,4,"td",15),A.BQk(),A.ynx(20,17),A.YNc(21,Wu,2,0,"th",18),A.YNc(22,Zu,4,3,"td",19),A.BQk(),A.ynx(23,20),A.YNc(24,Xu,2,0,"th",14),A.YNc(25,qu,4,4,"td",15),A.BQk(),A.ynx(26,21),A.YNc(27,_u,2,0,"th",14),A.YNc(28,$u,2,1,"td",15),A.BQk(),A.ynx(29,22),A.YNc(30,Af,2,0,"th",23),A.YNc(31,tf,4,4,"td",24),A.BQk(),A.ynx(32,25),A.YNc(33,ef,6,0,"th",26),A.YNc(34,rf,10,3,"td",27),A.BQk(),A.ynx(35,28),A.YNc(36,lf,4,3,"td",29),A.BQk(),A.YNc(37,gf,1,3,"tr",30),A.YNc(38,Bf,1,0,"tr",31),A.YNc(39,uf,1,0,"tr",32),A.qZA()(),A._UZ(40,"mat-paginator",33),A.qZA()()),2&t&&(A.xp6(5),A.Q6J("icon",s.faHistory),A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.offersBookmarks)("ngClass",A.VKq(11,ff,""!==s.errorMessage)),A.xp6(25),A.Q6J("matFooterRowDef",A.DdM(13,hf)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.yH,Ct.Wh,e.BN,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,_.$V,ut.O5,S.pW,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,ut.PC,T.Zl,QA.gD,QA.$L,CA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.uU,ut.JJ],styles:[".mat-column-title[_ngcontent-%COMP%], .mat-column-description[_ngcontent-%COMP%], .mat-column-bolt12[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}.mat-column-title[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-bolt12[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();function wf(i,d){if(1&i&&(A.TgZ(0,"div",5),A._uU(1),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function Cf(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"div",6)(1,"div",7),A._UZ(2,"fa-icon",8),A.TgZ(3,"span"),A._uU(4,"Maximum 1,000 local failed transactions only."),A.qZA()(),A.TgZ(5,"div",9),A._UZ(6,"div",10),A.TgZ(7,"mat-form-field",11)(8,"input",12),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(v){return A.CHM(t),A.oxw().selFilter=v}),A.qZA()()()()}if(2&i){const t=A.oxw();A.xp6(2),A.Q6J("icon",t.faExclamationTriangle),A.xp6(6),A.Q6J("ngModel",t.selFilter)}}function Qf(i,d){1&i&&A._UZ(0,"mat-progress-bar",38)}function df(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"Received Time"),A.qZA())}function Mf(i,d){if(1&i&&(A.TgZ(0,"td",40),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/y HH:mm"))}}function pf(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"In Channel Id"),A.qZA())}function mf(i,d){if(1&i&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null==t?null:t.in_channel)}}function If(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"In Channel"),A.qZA())}const nc=function(i){return{"max-width":i}};function vf(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",41)(2,"span",42),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,nc,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.Oqu(null==t?null:t.in_channel_alias)}}function Df(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"Out Channel Id"),A.qZA())}function yf(i,d){if(1&i&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null==t?null:t.out_channel)}}function xf(i,d){1&i&&(A.TgZ(0,"th",39),A._uU(1,"Out Channel"),A.qZA())}function Ff(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",41)(2,"span",42),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,nc,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.Oqu(null==t?null:t.out_channel_alias)}}function Yf(i,d){1&i&&(A.TgZ(0,"th",43),A._uU(1,"Amount In (Sats)"),A.qZA())}function Tf(i,d){if(1&i&&(A.TgZ(0,"td",40)(1,"span",44),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Sf(i,d){1&i&&(A.TgZ(0,"th",45),A._uU(1,"Style"),A.qZA())}function Nf(i,d){if(1&i&&(A.TgZ(0,"td",46),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null==t?null:t.style)}}function Uf(i,d){1&i&&(A.TgZ(0,"th",45),A._uU(1,"Fail Reason"),A.qZA())}function Pf(i,d){if(1&i&&(A.TgZ(0,"td",46),A._uU(1),A.qZA()),2&i){const t=d.$implicit,s=A.oxw(2);A.xp6(1),A.Oqu(s.CLNFailReason[null==t?null:t.failreason])}}function bf(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",47)(1,"div",48)(2,"mat-select",49),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",50),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Lf(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",51)(1,"button",52),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw(2).onFailedLocalEventClick(Z)}),A._uU(2,"View Info"),A.qZA()()}}function Rf(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No failed transaction available."),A.qZA())}function zf(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting failed transactions..."),A.qZA())}function Gf(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function Hf(i,d){if(1&i&&(A.TgZ(0,"td",53),A.YNc(1,Rf,2,0,"p",54),A.YNc(2,zf,2,0,"p",54),A.YNc(3,Gf,2,1,"p",54),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedLocalForwardingEvents&&t.failedLocalForwardingEvents.data)||(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedLocalForwardingEvents&&t.failedLocalForwardingEvents.data)||(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedLocalForwardingEvents&&t.failedLocalForwardingEvents.data)||(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Jf=function(i){return{"display-none":i}};function Of(i,d){if(1&i&&A._UZ(0,"tr",55),2&i){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Jf,(null==t.failedLocalForwardingEvents?null:t.failedLocalForwardingEvents.data)&&(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)>0))}}function kf(i,d){1&i&&A._UZ(0,"tr",56)}function jf(i,d){1&i&&A._UZ(0,"tr",57)}const Kf=function(){return["no_event"]};function Vf(i,d){if(1&i&&(A.TgZ(0,"div",13),A.YNc(1,Qf,1,0,"mat-progress-bar",14),A.TgZ(2,"table",15,16),A.ynx(4,17),A.YNc(5,df,2,0,"th",18),A.YNc(6,Mf,3,4,"td",19),A.BQk(),A.ynx(7,20),A.YNc(8,pf,2,0,"th",18),A.YNc(9,mf,2,1,"td",19),A.BQk(),A.ynx(10,21),A.YNc(11,If,2,0,"th",18),A.YNc(12,vf,4,4,"td",19),A.BQk(),A.ynx(13,22),A.YNc(14,Df,2,0,"th",18),A.YNc(15,yf,2,1,"td",19),A.BQk(),A.ynx(16,23),A.YNc(17,xf,2,0,"th",18),A.YNc(18,Ff,4,4,"td",19),A.BQk(),A.ynx(19,24),A.YNc(20,Yf,2,0,"th",25),A.YNc(21,Tf,4,4,"td",19),A.BQk(),A.ynx(22,26),A.YNc(23,Sf,2,0,"th",27),A.YNc(24,Nf,2,1,"td",28),A.BQk(),A.ynx(25,29),A.YNc(26,Uf,2,0,"th",27),A.YNc(27,Pf,2,1,"td",28),A.BQk(),A.ynx(28,30),A.YNc(29,bf,6,0,"th",31),A.YNc(30,Lf,3,0,"td",32),A.BQk(),A.ynx(31,33),A.YNc(32,Hf,4,3,"td",34),A.BQk(),A.YNc(33,Of,1,3,"tr",35),A.YNc(34,kf,1,0,"tr",36),A.YNc(35,jf,1,0,"tr",37),A.qZA()()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.failedLocalForwardingEvents),A.xp6(31),A.Q6J("matFooterRowDef",A.DdM(5,Kf)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function Wf(i,d){if(1&i&&A._UZ(0,"mat-paginator",58),2&i){const t=A.oxw();A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Zf=(()=>{class i{constructor(t,s,v,Z,rt){this.logger=t,this.commonService=s,this.store=v,this.datePipe=Z,this.router=rt,this.faExclamationTriangle=h.eHv,this.PAGE_ID="routing",this.tableSetting={tableId:"local_failed",recordsPerPage:a.IV,sortBy:"received_time",sortOrder:a.Pi.DESCENDING},this.CLNFailReason=a.p7,this.errorMessage="",this.displayedColumns=[],this.selFilter="",this.totalLocalFailedTransactions=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.dispatch((0,Et.u0)({payload:{status:a.OO.LOCAL_FAILED}})),this.store.select(B.AS).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),this.store.select(B.lK).pipe((0,r.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.totalLocalFailedTransactions=t.localFailedForwardingHistory.totalForwards||0,this.failedLocalEvents=t.localFailedForwardingHistory.listForwards||[],this.failedLocalEvents.length>0&&this.sort&&this.paginator&&this.loadLocalfailedLocalEventsTable(this.failedLocalEvents),this.logger.info(t)})}ngAfterViewInit(){this.failedLocalEvents.length>0&&this.loadLocalfailedLocalEventsTable(this.failedLocalEvents)}onFailedLocalEventClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Local Failed Event Information",message:[[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:a.Gi.DATE_TIME},{key:"in_channel_alias",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:a.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"Amount In (mSats)",width:100,type:a.Gi.NUMBER}],[{key:"failreason",value:t.failreason?this.CLNFailReason[t.failreason]:"",title:"Reason for Failure",width:100,type:a.Gi.STRING}]]}}}))}loadLocalfailedLocalEventsTable(t){var s;this.failedLocalForwardingEvents=new xA.by([...t]),this.failedLocalForwardingEvents.sort=this.sort,this.failedLocalForwardingEvents.sortingDataAccessor=(v,Z)=>"failreason"===Z?v.failreason?this.CLNFailReason[v.failreason]:"":v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,null===(s=this.failedLocalForwardingEvents.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.failedLocalForwardingEvents.filterPredicate=(v,Z)=>{var rt;const vt=(v.received_time?null===(rt=this.datePipe.transform(new Date(1e3*v.received_time),"dd/MMM/YYYY HH:mm"))||void 0===rt?void 0:rt.toLowerCase():"")+(v.in_channel_alias?v.in_channel_alias.toLowerCase():"")+(v.failreason&&this.CLNFailReason[v.failreason]?this.CLNFailReason[v.failreason].toLowerCase():"")+(v.in_msatoshi?v.in_msatoshi/1e3:"");return(null==vt?void 0:vt.includes(Z))||!1},this.failedLocalForwardingEvents.paginator=this.paginator,this.applyFilter(),this.logger.info(this.failedLocalForwardingEvents)}onDownloadCSV(){this.failedLocalForwardingEvents&&this.failedLocalForwardingEvents.data&&this.failedLocalForwardingEvents.data.length>0&&this.commonService.downloadFile(this.failedLocalForwardingEvents.data,"Local-failed-transactions")}applyFilter(){this.failedLocalForwardingEvents.filter=this.selFilter.trim().toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(ut.uU),A.Y36(_t.F0))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-local-failed-history"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Local failed events")}])],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout.gt-xs","column","fxLayout","row","fxLayoutAlign","start center","fxLayoutAlign.gt-xs","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout.gt-xs","column","fxLayout","row","fxLayoutAlign","start center","fxLayoutAlign.gt-xs","start stretch",1,"page-sub-title-container"],["fxFlex","100",1,"alert","alert-warn","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","100"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","received_time"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","in_channel"],["matColumnDef","in_channel_alias"],["matColumnDef","out_channel"],["matColumnDef","out_channel_alias"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","style"],["mat-header-cell","","mat-sort-header","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["matColumnDef","failreason"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-1"],["mat-cell","",1,"pl-1"],["mat-header-cell","",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",1,"table-actions-button",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,wf,2,1,"div",1),A.YNc(2,Cf,9,2,"div",2),A.YNc(3,Vf,36,6,"div",3),A.YNc(4,Wf,1,3,"mat-paginator",4),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[Ct.xw,Ct.Wh,ut.O5,Ct.yH,e.BN,P.KE,H.Nt,OA.Fj,OA.JJ,OA.On,_.$V,S.pW,xA.BZ,it.YE,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,ut.PC,T.Zl,QA.gD,QA.$L,CA.ey,w.lW,xA.mD,xA.yh,xA.Ke,xA.Q2,ut.mk,T.oO,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.uU,ut.JJ],styles:[".mat-column-in_channel_alias[_ngcontent-%COMP%], .mat-column-out_channel_alias[_ngcontent-%COMP%]{flex:0 0 10%;width:10%}.mat-column-in_channel_alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-out_channel_alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})();const Xf=["form"];function qf(i,d){1&i&&A.GkF(0)}function _f(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Requested amount is required."),A.qZA())}function $f(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee rate is required."),A.qZA())}function Ah(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Local amount is required."),A.qZA())}function th(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Local amount must be greater than or equal to 20,000 Sats. It's required to cover the channel force close fee, if needed."),A.qZA())}function eh(i,d){if(1&i&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.hij("Local amount must be less than or equal to ",t.totalBalance,".")}}function nh(i,d){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.channelConnectionError)}}function ih(i,d){if(1&i&&(A.TgZ(0,"div",26),A._UZ(1,"fa-icon",27),A.YNc(2,nh,2,1,"span",15),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.channelConnectionError)}}function rh(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1,"Type"),A.qZA())}function ah(i,d){if(1&i&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.type," ")}}function oh(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1,"Address"),A.qZA())}function sh(i,d){if(1&i&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.address," ")}}function lh(i,d){1&i&&(A.TgZ(0,"th",47),A._uU(1,"Port"),A.qZA())}function ch(i,d){if(1&i&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.port," ")}}function gh(i,d){1&i&&A._UZ(0,"tr",49)}function Bh(i,d){1&i&&A._UZ(0,"tr",50)}function uh(i,d){if(1&i&&(A.TgZ(0,"mat-expansion-panel",29)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),A._uU(4,"Node: \xa0"),A.qZA(),A.TgZ(5,"strong",30),A._uU(6),A.qZA()()(),A.TgZ(7,"div",7)(8,"div",0)(9,"div",1)(10,"h4",31),A._uU(11,"Pubkey"),A.qZA(),A.TgZ(12,"span",32),A._uU(13),A.qZA()()(),A._UZ(14,"mat-divider",33),A.TgZ(15,"div",0)(16,"div",1)(17,"h4",31),A._uU(18,"Last Timestamp"),A.qZA(),A.TgZ(19,"span",34),A._uU(20),A.ALo(21,"date"),A.qZA()()(),A._UZ(22,"mat-divider",33),A.TgZ(23,"div",35)(24,"h4",36),A._uU(25,"Addresses"),A.qZA(),A.TgZ(26,"div",37)(27,"table",38,39),A.ynx(29,40),A.YNc(30,rh,2,0,"th",41),A.YNc(31,ah,2,1,"td",42),A.BQk(),A.ynx(32,43),A.YNc(33,oh,2,0,"th",41),A.YNc(34,sh,2,1,"td",42),A.BQk(),A.ynx(35,44),A.YNc(36,lh,2,0,"th",41),A.YNc(37,ch,2,1,"td",42),A.BQk(),A.YNc(38,gh,1,0,"tr",45),A.YNc(39,Bh,1,0,"tr",46),A.qZA()()()()()),2&i){const t=A.oxw(2);A.xp6(6),A.Oqu((null==t.node?null:t.node.alias)||(null==t.node?null:t.node.nodeid)),A.xp6(7),A.Oqu(t.node.nodeid),A.xp6(7),A.Oqu(A.xi3(21,6,1e3*t.node.last_timestamp,"dd/MMM/y HH:mm")),A.xp6(7),A.Q6J("dataSource",t.node.addresses),A.xp6(11),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function fh(i,d){if(1&i&&A.YNc(0,uh,40,9,"mat-expansion-panel",28),2&i){const t=A.oxw();A.Q6J("ngIf",t.node)}}let hh=(()=>{class i{constructor(t,s,v,Z){this.dialogRef=t,this.data=s,this.actions=v,this.store=Z,this.faExclamationTriangle=h.eHv,this.totalBalance=0,this.node={},this.requestedAmount=0,this.feeRate=0,this.localAmount=0,this.channelConnectionError="",this.displayedColumns=["type","address","port"],this.unSubs=[new c.x,new c.x]}ngOnInit(){var t,s,v,Z,rt;this.alertTitle=this.data.alertTitle||"",this.totalBalance=(null===(t=this.data.message)||void 0===t?void 0:t.balance)||0,this.node=(null===(s=this.data.message)||void 0===s?void 0:s.node)||{},this.requestedAmount=(null===(v=this.data.message)||void 0===v?void 0:v.requestedAmount)||0,this.feeRate=(null===(Z=this.data.message)||void 0===Z?void 0:Z.feeRate)||0,this.localAmount=(null===(rt=this.data.message)||void 0===rt?void 0:rt.localAmount)||0,this.actions.pipe((0,r.R)(this.unSubs[0]),(0,JA.h)(vt=>vt.type===a.AB.UPDATE_API_CALL_STATUS_CLN||vt.type===a.AB.FETCH_CHANNELS_CLN)).subscribe(vt=>{vt.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&vt.payload.status===a.Bn.ERROR&&"SaveNewChannel"===vt.payload.action&&(this.channelConnectionError=vt.payload.message),vt.type===a.AB.FETCH_CHANNELS_CLN&&this.dialogRef.close()})}onClose(){this.dialogRef.close(!1)}resetData(){var t,s,v;this.form.resetForm(),this.form.controls.ramount.setValue(null===(t=this.data.message)||void 0===t?void 0:t.requestedAmount),this.form.controls.feerate.setValue(null===(s=this.data.message)||void 0===s?void 0:s.feeRate),this.form.controls.lamount.setValue(null===(v=this.data.message)||void 0===v?void 0:v.localAmount),this.calculateFee(),this.channelConnectionError=""}calculateFee(){var t,s,v;this.node.channel_opening_fee=+((null===(t=this.node.option_will_fund)||void 0===t?void 0:t.lease_fee_base_msat)||0)/1e3+this.requestedAmount*+((null===(s=this.node.option_will_fund)||void 0===s?void 0:s.lease_fee_basis)||0)/1e4+ +((null===(v=this.node.option_will_fund)||void 0===v?void 0:v.funding_weight)||0)/4*this.feeRate}onOpenChannel(){if(!this.node||!this.node.option_will_fund||!this.requestedAmount||!this.feeRate||!this.localAmount||this.localAmount<2e4)return!0;const t={peerId:this.node.nodeid||"",satoshis:this.localAmount.toString(),feeRate:this.feeRate+"perkb",requestAmount:this.requestedAmount.toString(),compactLease:this.node.option_will_fund.compact_lease,announce:!0};this.store.dispatch((0,Et.YX)({payload:t}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(Tt.eX),A.Y36(u.yh))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-open-liquidity-channel"]],viewQuery:function(t,s){if(1&t&&A.Gf(Xf,7),2&t){let v;A.iGM(v=A.CRH())&&(s.form=v.first)}},decls:48,vars:24,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","6","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["form","ngForm"],[4,"ngTemplateOutlet"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","30","fxLayoutAlign","start end"],["autoFocus","","matInput","","placeholder","Requested Amount","type","number","tabindex","1","required","","name","ramount",3,"ngModel","step","min","ngModelChange","keyup"],["ramount","ngModel"],["matSuffix",""],[4,"ngIf"],["matInput","","placeholder","Fee Rate","type","number","tabindex","2","required","","name","feerate",3,"ngModel","step","min","ngModelChange","keyup"],["feeRt","ngModel"],["matInput","","placeholder","Local Amount","type","number","tabindex","3","required","","name","lamount",3,"ngModel","step","min","max","ngModelChange"],["lamount","ngModel"],["fxFlex","100",1,"alert","alert-info","mt-4"],["fxFlex","100","class","alert alert-danger mt-2",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","4",1,"mr-1",3,"click"],["autoFocus","","mat-button","","color","primary","tabindex","5",3,"click"],["nodeDetailsExpansionBlock",""],["fxFlex","100",1,"alert","alert-danger","mt-2"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel mt-1 mb-2","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","mt-1","mb-2"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],[1,"overflow-wrap","foreground-secondary-text"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxFlex","100",1,"font-bold-500","mb-1"],[1,"table-container"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","type"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","port"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8),A.YNc(11,qf,1,0,"ng-container",9),A.TgZ(12,"div",10)(13,"mat-form-field",11)(14,"input",12,13),A.NdJ("ngModelChange",function(Z){return s.requestedAmount=Z})("keyup",function(){return s.calculateFee()}),A.qZA(),A.TgZ(16,"span",14),A._uU(17," Sats "),A.qZA(),A.YNc(18,_f,2,0,"mat-error",15),A.qZA(),A.TgZ(19,"mat-form-field",11)(20,"input",16,17),A.NdJ("ngModelChange",function(Z){return s.feeRate=Z})("keyup",function(){return s.calculateFee()}),A.qZA(),A.TgZ(22,"span",14),A._uU(23," Sats/vByte "),A.qZA(),A.YNc(24,$f,2,0,"mat-error",15),A.qZA(),A.TgZ(25,"mat-form-field",11)(26,"input",18,19),A.NdJ("ngModelChange",function(Z){return s.localAmount=Z}),A.qZA(),A.TgZ(28,"mat-hint"),A._uU(29),A.ALo(30,"number"),A.qZA(),A.TgZ(31,"span",14),A._uU(32," Sats "),A.qZA(),A.YNc(33,Ah,2,0,"mat-error",15),A.YNc(34,th,2,0,"mat-error",15),A.YNc(35,eh,2,1,"mat-error",15),A.qZA()(),A.TgZ(36,"div",20)(37,"span"),A._uU(38),A.ALo(39,"number"),A.qZA()(),A.YNc(40,ih,3,2,"div",21),A.TgZ(41,"div",22)(42,"button",23),A.NdJ("click",function(){return s.resetData()}),A._uU(43,"Clear"),A.qZA(),A.TgZ(44,"button",24),A.NdJ("click",function(){return s.onOpenChannel()}),A._uU(45,"Execute"),A.qZA()()()()()(),A.YNc(46,fh,1,1,"ng-template",null,25,A.W1O)),2&t){const v=A.MAs(15),Z=A.MAs(21),rt=A.MAs(27),vt=A.MAs(47);A.xp6(5),A.Oqu(s.alertTitle),A.xp6(6),A.Q6J("ngTemplateOutlet",vt),A.xp6(3),A.Q6J("ngModel",s.requestedAmount)("step",1e4)("min",0),A.xp6(4),A.Q6J("ngIf",null==v.errors?null:v.errors.required),A.xp6(2),A.Q6J("ngModel",s.feeRate)("step",10)("min",0),A.xp6(4),A.Q6J("ngIf",null==Z.errors?null:Z.errors.required),A.xp6(2),A.Q6J("ngModel",s.localAmount)("step",1e4)("min",2e4)("max",s.totalBalance),A.xp6(3),A.hij("Remaining Bal: ",A.lcZ(30,20,s.totalBalance-(s.localAmount?s.localAmount:0)),""),A.xp6(4),A.Q6J("ngIf",null==rt.errors?null:rt.errors.required),A.xp6(1),A.Q6J("ngIf",null==rt.errors?null:rt.errors.min),A.xp6(1),A.Q6J("ngIf",null==rt.errors?null:rt.errors.max),A.xp6(3),A.hij("Total cost to lease ",A.lcZ(39,22,s.node.channel_opening_fee)," (Sats)"),A.xp6(2),A.Q6J("ngIf",""!==s.channelConnectionError)}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,g.dn,OA._Y,OA.JL,OA.F,ut.tP,P.KE,H.Nt,OA.wV,OA.qQ,OA.Fj,z.q,k.h,OA.Q7,OA.JJ,OA.On,P.R9,ut.O5,P.TO,OA.Fd,Pa.F,P.bx,e.BN,Ai.ib,Ai.yz,Ai.yK,lA.d,xA.BZ,it.YE,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,xA.as,xA.XQ,xA.nj,xA.Gk],pipes:[ut.JJ,ut.uU],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),i})();var ic=Pt(6688);function Eh(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Channel amount is required."),A.qZA())}function wh(i,d){1&i&&(A.TgZ(0,"mat-error"),A._uU(1,"Channel opening fee rate is required."),A.qZA())}function Ch(i,d){1&i&&A._UZ(0,"mat-progress-bar",48)}function Qh(i,d){1&i&&(A.TgZ(0,"th",49),A._uU(1," Alias "),A.qZA())}function dh(i,d){if(1&i&&(A.TgZ(0,"mat-chip",54),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.hij(" ","tor"===t?"Tor":"ipv"===t?"Clearnet":t," ")}}const rc=function(i){return{"max-width":i}};function Mh(i,d){if(1&i&&(A.TgZ(0,"td",50)(1,"span",51),A._uU(2),A.TgZ(3,"mat-chip-list",52),A.YNc(4,dh,2,1,"mat-chip",53),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(3,rc,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.hij(" ",null==t?null:t.alias," "),A.xp6(2),A.Q6J("ngForOf",t.address_types)}}function ph(i,d){1&i&&(A.TgZ(0,"th",55),A._uU(1," Node Id "),A.qZA())}function mh(i,d){if(1&i&&(A.TgZ(0,"td",56)(1,"div",57)(2,"span",58),A._uU(3),A.qZA()()()),2&i){const t=d.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,rc,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(2),A.Oqu(null==t?null:t.nodeid)}}function Ih(i,d){1&i&&(A.TgZ(0,"th",55),A._uU(1," Last Announcement At "),A.qZA())}function vh(i,d){if(1&i&&(A.TgZ(0,"td",56),A._uU(1),A.ALo(2,"date"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.last_timestamp),"dd/MMM/y HH:mm")||"-")}}function Dh(i,d){1&i&&(A.TgZ(0,"th",55),A._uU(1," Compact Lease "),A.qZA())}function yh(i,d){if(1&i&&(A.TgZ(0,"td",56),A._uU(1),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.Oqu(null==t||null==t.option_will_fund?null:t.option_will_fund.compact_lease)}}function xh(i,d){1&i&&(A.TgZ(0,"th",59),A._uU(1," Lease Fee "),A.qZA())}function Fh(i,d){if(1&i&&(A.TgZ(0,"td",56),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.AsE(" ",A.xi3(2,2,(null==t||null==t.option_will_fund?null:t.option_will_fund.lease_fee_base_msat)/1e3,"1.0-0")," Sats + ",A.xi3(3,5,(null==t||null==t.option_will_fund?null:t.option_will_fund.lease_fee_basis)/100,"1.2-2"),"% ")}}function Yh(i,d){1&i&&(A.TgZ(0,"th",59),A._uU(1," Routing Fee "),A.qZA())}function Th(i,d){if(1&i&&(A.TgZ(0,"td",56),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&i){const t=d.$implicit;A.xp6(1),A.AsE(" ",A.xi3(2,2,(null==t||null==t.option_will_fund?null:t.option_will_fund.channel_fee_max_base_msat)/1e3,"1.0-0")," Sats + ",A.xi3(3,5,1e3*(null==t||null==t.option_will_fund?null:t.option_will_fund.channel_fee_max_proportional_thousandths),"1.0-0")," ppm ")}}function Sh(i,d){1&i&&(A.TgZ(0,"th",60),A._uU(1," Channel Opening Fee (Sats) "),A.qZA())}function Nh(i,d){if(1&i&&(A.TgZ(0,"td",56)(1,"span",61),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,t.channel_opening_fee,"1.0-0")," ")}}function Uh(i,d){1&i&&(A.TgZ(0,"th",60),A._uU(1," Funding Weight "),A.qZA())}function Ph(i,d){if(1&i&&(A.TgZ(0,"td",56)(1,"span",61),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&i){const t=d.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,null==t||null==t.option_will_fund?null:t.option_will_fund.funding_weight,"1.0-0")," ")}}function bh(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"th",62)(1,"div",63)(2,"mat-select",64),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",65),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Lh(i,d){if(1&i){const t=A.EpF();A.TgZ(0,"td",66)(1,"div",63)(2,"mat-select",64),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",65),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onViewLeaseInfo(Z)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",65),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().onOpenChannel(Z)}),A._uU(7,"Open Channel"),A.qZA(),A.TgZ(8,"mat-option",65),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().viewLeaseOn(Z,"LN")}),A._uU(9,"View on Lnrouter"),A.qZA(),A.TgZ(10,"mat-option",65),A.NdJ("click",function(){const Z=A.CHM(t).$implicit;return A.oxw().viewLeaseOn(Z,"AM")}),A._uU(11,"View on Amboss"),A.qZA()()()()}}function Rh(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"No node with liquidity."),A.qZA())}function zh(i,d){1&i&&(A.TgZ(0,"p"),A._uU(1,"Getting nodes with liquidity..."),A.qZA())}function Gh(i,d){if(1&i&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function Hh(i,d){if(1&i&&(A.TgZ(0,"td",67),A.YNc(1,Rh,2,0,"p",15),A.YNc(2,zh,2,0,"p",15),A.YNc(3,Gh,2,1,"p",15),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.liquidityNodes&&t.liquidityNodes.data)||(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.liquidityNodes&&t.liquidityNodes.data)||(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.liquidityNodes&&t.liquidityNodes.data)||(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Jh=function(i){return{"display-none":i}};function Oh(i,d){if(1&i&&A._UZ(0,"tr",68),2&i){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,Jh,(null==t.liquidityNodes?null:t.liquidityNodes.data)&&(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)>0))}}function kh(i,d){1&i&&A._UZ(0,"tr",69)}function jh(i,d){1&i&&A._UZ(0,"tr",70)}const Kh=function(i){return{"overflow-auto error-border":i,"overflow-auto":!0}},Vh=function(){return["no_lqNode"]},Xh=_t.Bz.forChild([{path:"",component:n,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:as,canActivate:[Re.eQ]},{path:"onchain",component:Ks,canActivate:[Re.eQ],children:[{path:"",pathMatch:"full",redirectTo:"receive/utxos"},{path:"receive/:selTab",component:ai,canActivate:[Re.eQ]},{path:"send/:selTab",component:oi,data:{sweepAll:!1},canActivate:[Re.eQ]},{path:"sweep/:selTab",component:oi,data:{sweepAll:!0},canActivate:[Re.eQ]}]},{path:"connections",component:va,canActivate:[Re.eQ],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:J0,canActivate:[Re.eQ],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:ml,canActivate:[Re.eQ]},{path:"pending",component:fe,canActivate:[Re.eQ]}]},{path:"peers",component:gr,data:{sweepAll:!1},canActivate:[Re.eQ]}]},{path:"liquidityads",component:(()=>{class i{constructor(t,s,v,Z,rt,vt){this.logger=t,this.store=s,this.dataService=v,this.commonService=Z,this.rtlEffects=rt,this.decimalPipe=vt,this.PAGE_ID="liquidity_ads",this.tableSetting={tableId:"liquidity_ads",recordsPerPage:a.IV,sortBy:"channel_opening_fee",sortOrder:a.Pi.ASCENDING},this.askTooltipMsg="",this.nodesTooltipMsg="",this.displayedColumns=[],this.faBullhorn=h.Acd,this.faExclamationTriangle=h.eHv,this.faUsers=h.FVb,this.totalBalance=0,this.channelAmount=1e5,this.channel_opening_feeRate=10,this.node_capacity=5e5,this.channel_count=5,this.liquidityNodesData=[],this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus={status:a.Bn.INITIATED},this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.askTooltipMsg="Specify the liquidity requirements for your node: \n 1. Channel Amount - Amount in Sats you need on the channel opened to your node \n 2. Channel opening fee rate - Rate in Sats/vByte that you are willing to pay to open the channel to you",this.nodesTooltipMsg="These nodes are advertising their liquidity offering on the network.\nYou should pay attention to the following aspects to evaluate each node offer: \n- The total bitcoin deployed on the node, the more the better\n",this.nodesTooltipMsg=this.nodesTooltipMsg+"- The number of channels open on the node, the more the better\n- The channel open fee which the node will charge from you\n- The routing fee which the node will charge on the payments, the lesser the better\n- The reliability of the node, ideally uptime. Refer to the information being provided by the node explorers",this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(B.AS).pipe((0,r.R)(this.unSubs[0])).subscribe(t=>{var s,v;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message||""),this.tableSetting=(null===(s=t.pageSettings.find(Z=>Z.pageId===this.PAGE_ID))||void 0===s?void 0:s.tables.find(Z=>Z.tableId===this.tableSetting.tableId))||(null===(v=a.gG.find(Z=>Z.pageId===this.PAGE_ID))||void 0===v?void 0:v.tables.find(Z=>Z.tableId===this.tableSetting.tableId)),this.displayedColumns=this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM)):JSON.parse(JSON.stringify(this.tableSetting.columnSelection)),this.displayedColumns.push("actions"),this.pageSize=this.tableSetting.recordsPerPage?+this.tableSetting.recordsPerPage:a.IV,this.logger.info(this.displayedColumns)}),(0,Wi.a)([this.store.select(B.OL),this.dataService.listNetworkNodes("?liquidity_ads=yes")]).pipe((0,r.R)(this.unSubs[1])).subscribe({next:([t,s])=>{this.information=t.information,this.totalBalance=t.balance.totalBalance||0,this.logger.info(t),s&&!s.length&&(s=[]),this.logger.info("Received Liquidity Ads Enabled Nodes: "+JSON.stringify(s)),this.apiCallStatus.status=a.Bn.COMPLETED,s.forEach(v=>{var Z;v.address_types=Array.from(new Set(null===(Z=v.addresses)||void 0===Z?void 0:Z.reduce((vt,Ot)=>{var qe,Bn,se;return((null===(qe=Ot.type)||void 0===qe?void 0:qe.includes("ipv"))||(null===(Bn=Ot.type)||void 0===Bn?void 0:Bn.includes("tor")))&&vt.push(null===(se=Ot.type)||void 0===se?void 0:se.substring(0,3)),vt},[])))}),this.liquidityNodesData=s.filter(v=>v.nodeid!==this.information.id),this.onCalculateOpeningFee(),this.loadLiqNodesTable(this.liquidityNodesData)},error:t=>{this.logger.error("Liquidity Ads Nodes Error: "+JSON.stringify(t)),this.apiCallStatus.status=a.Bn.ERROR,this.errorMessage=JSON.stringify(t)}})}onCalculateOpeningFee(){this.liquidityNodesData.forEach(t=>{t.option_will_fund&&(t.channel_opening_fee=+(t.option_will_fund.lease_fee_base_msat||0)/1e3+this.channelAmount*+(t.option_will_fund.lease_fee_basis||0)/1e4+ +(t.option_will_fund.funding_weight||0)/4*this.channel_opening_feeRate)}),this.paginator&&this.paginator.firstPage()}onFilter(){}applyFilter(){this.liquidityNodes.filter=this.selFilter.trim().toLowerCase()}loadLiqNodesTable(t){var s;this.liquidityNodes=new xA.by([...t]),this.liquidityNodes.sortingDataAccessor=(v,Z)=>v[Z]&&isNaN(v[Z])?v[Z].toLocaleLowerCase():v[Z]?+v[Z]:null,this.liquidityNodes.sort=this.sort,null===(s=this.liquidityNodes.sort)||void 0===s||s.sort({id:this.tableSetting.sortBy,start:this.tableSetting.sortOrder,disableClear:!0}),this.liquidityNodes.filterPredicate=(v,Z)=>{var rt,vt,Ot,qe,Bn,se,_e,ti;return((v.alias?v.alias.toLocaleLowerCase():"")+(v.channel_opening_fee?v.channel_opening_fee+" Sats":"")+((null===(rt=v.option_will_fund)||void 0===rt?void 0:rt.lease_fee_base_msat)?(null===(vt=v.option_will_fund)||void 0===vt?void 0:vt.lease_fee_base_msat)/1e3+" Sats":"")+((null===(Ot=v.option_will_fund)||void 0===Ot?void 0:Ot.lease_fee_basis)?this.decimalPipe.transform((null===(qe=v.option_will_fund)||void 0===qe?void 0:qe.lease_fee_basis)/100,"1.2-2")+"%":"")+((null===(Bn=v.option_will_fund)||void 0===Bn?void 0:Bn.channel_fee_max_base_msat)?(null===(se=v.option_will_fund)||void 0===se?void 0:se.channel_fee_max_base_msat)/1e3+" Sats":"")+((null===(_e=v.option_will_fund)||void 0===_e?void 0:_e.channel_fee_max_proportional_thousandths)?1e3*(null===(ti=v.option_will_fund)||void 0===ti?void 0:ti.channel_fee_max_proportional_thousandths)+" ppm":"")+(v.address_types?v.address_types.reduce((la,Kl)=>la+("tor"===Kl?" tor":"ipv"===Kl?" clearnet":" "+Kl.toLowerCase()),""):"")).includes(Z)},this.applyFilter(),this.liquidityNodes.paginator=this.paginator}viewLeaseOn(t,s){"LN"===s?window.open("https://lnrouter.app/node/"+t.nodeid,"_blank"):"AM"===s&&window.open("https://amboss.space/node/"+t.nodeid,"_blank")}onOpenChannel(t){this.store.dispatch((0,KA.qR)({payload:{data:{alertTitle:"Open Channel",message:{node:t,balance:this.totalBalance,requestedAmount:this.channelAmount,feeRate:this.channel_opening_feeRate,localAmount:2e4},component:hh}}}))}onViewLeaseInfo(t){var s,v,Z,rt,vt,Ot,qe;const Bn=null===(s=t.addresses)||void 0===s?void 0:s.reduce((ti,Zn)=>(Zn.address&&Zn.address.length>40&&(Zn.address=Zn.address.substring(0,39)+"..."),ti.concat(JSON.stringify(Zn).replace("{","").replace("}","").replace(/:/g,": ").replace(/,/g,"        ").replace(/"/g,""))),[]),se=[];if(t.features&&""!==t.features.trim()){const ti=parseInt(t.features,16);a.Df.forEach(Zn=>{ti&(1<{ti&&this.onOpenChannel(t)})}onDownloadCSV(){this.liquidityNodes.data&&this.liquidityNodes.data.length>0&&this.commonService.downloadFile(this.liquidityNodes.data,"LiquidityNodes")}onFilterReset(){this.node_capacity=0,this.channel_count=0}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return i.\u0275fac=function(t){return new(t||i)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(Ut.D),A.Y36(C.v),A.Y36(DA.V),A.Y36(ut.JJ))},i.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-liquidity-ads-list"]],viewQuery:function(t,s){if(1&t&&(A.Gf(it.YE,5),A.Gf(WA.NW,5)),2&t){let v;A.iGM(v=A.CRH())&&(s.sort=v.first),A.iGM(v=A.CRH())&&(s.paginator=v.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Liquidity Ads")}])],decls:71,vars:21,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],[1,"padding-gap-large"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["formAsk","ngForm"],["fxFlex","100","fxLayout","row",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start start",1,"page-sub-title-container","mt-1"],["fxFlex","30"],["matTooltipPosition","above","matTooltipClass","pre-wrap",1,"info-icon","info-icon-primary",3,"matTooltip"],["fxFlex","34"],["autoFocus","","matInput","","placeholder","Channel Amount (Sats)","name","channelAmount","tabindex","1","type","number","step","10000","required","",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Channel Opening Fee Rate (Sats/vByte)","name","channel_opening_feeRate","type","number","step","10","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["fxLayout","row","fxLayoutAlign","start center",1,"page-sub-title-container","padding-gap-x","mt-2"],["fxFlex","30","fxFlex.gt-xs","70"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","nodeid"],["mat-header-cell","","mat-sort-header","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["matColumnDef","last_timestamp"],["matColumnDef","compact_lease"],["matColumnDef","lease_fee"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["matColumnDef","routing_fee"],["matColumnDef","channel_opening_fee"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pl-1",4,"matHeaderCellDef"],["matColumnDef","funding_weight"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_lqNode"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["fxLayout","row","fxLayoutAlign","start center"],["aria-label","Address Types",1,"ml-half"],["color","primary","selected","",4,"ngFor","ngForOf"],["color","primary","selected",""],["mat-header-cell","","mat-sort-header","",1,"pl-1"],["mat-cell","",1,"pl-1"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","",1,"pl-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pl-1"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Liquidity Ads"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"div",5)(8,"form",6,7)(10,"div",8),A._UZ(11,"fa-icon",9),A.TgZ(12,"span"),A._uU(13,"Ads should be supplemented with additional research of the node, before buying liquidity."),A.qZA()(),A.TgZ(14,"div",10)(15,"div",11)(16,"span",2),A._uU(17," Liquidity Ask "),A.TgZ(18,"mat-icon",12),A._uU(19,"info_outline"),A.qZA()()(),A.TgZ(20,"mat-form-field",13)(21,"input",14),A.NdJ("ngModelChange",function(Z){return s.channelAmount=Z})("keyup",function(){return s.onCalculateOpeningFee()}),A.qZA(),A.YNc(22,Eh,2,0,"mat-error",15),A.qZA(),A.TgZ(23,"mat-form-field",13)(24,"input",16),A.NdJ("ngModelChange",function(Z){return s.channel_opening_feeRate=Z})("keyup",function(){return s.onCalculateOpeningFee()}),A.qZA(),A.YNc(25,wh,2,0,"mat-error",15),A.qZA()()(),A.TgZ(26,"div",17)(27,"div",18),A._UZ(28,"fa-icon",1),A.TgZ(29,"span",2),A._uU(30,"Liquidity Providing Peers"),A.qZA()(),A.TgZ(31,"mat-form-field",11)(32,"div",19)(33,"input",20),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(Z){return s.selFilter=Z}),A.qZA()()()(),A.TgZ(34,"div",21),A.YNc(35,Ch,1,0,"mat-progress-bar",22),A.TgZ(36,"table",23,24),A.ynx(38,25),A.YNc(39,Qh,2,0,"th",26),A.YNc(40,Mh,5,5,"td",27),A.BQk(),A.ynx(41,28),A.YNc(42,ph,2,0,"th",29),A.YNc(43,mh,4,4,"td",30),A.BQk(),A.ynx(44,31),A.YNc(45,Ih,2,0,"th",29),A.YNc(46,vh,3,4,"td",30),A.BQk(),A.ynx(47,32),A.YNc(48,Dh,2,0,"th",29),A.YNc(49,yh,2,1,"td",30),A.BQk(),A.ynx(50,33),A.YNc(51,xh,2,0,"th",34),A.YNc(52,Fh,4,8,"td",30),A.BQk(),A.ynx(53,35),A.YNc(54,Yh,2,0,"th",34),A.YNc(55,Th,4,8,"td",30),A.BQk(),A.ynx(56,36),A.YNc(57,Sh,2,0,"th",37),A.YNc(58,Nh,4,4,"td",30),A.BQk(),A.ynx(59,38),A.YNc(60,Uh,2,0,"th",37),A.YNc(61,Ph,4,4,"td",30),A.BQk(),A.ynx(62,39),A.YNc(63,bh,6,0,"th",40),A.YNc(64,Lh,12,0,"td",41),A.BQk(),A.ynx(65,42),A.YNc(66,Hh,4,3,"td",43),A.BQk(),A.YNc(67,Oh,1,3,"tr",44),A.YNc(68,kh,1,0,"tr",45),A.YNc(69,jh,1,0,"tr",46),A.qZA()(),A._UZ(70,"mat-paginator",47),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faBullhorn),A.xp6(10),A.Q6J("icon",s.faExclamationTriangle),A.xp6(7),A.Q6J("matTooltip",s.askTooltipMsg),A.xp6(3),A.Q6J("ngModel",s.channelAmount),A.xp6(1),A.Q6J("ngIf",!s.channelAmount),A.xp6(2),A.Q6J("ngModel",s.channel_opening_feeRate),A.xp6(1),A.Q6J("ngIf",!s.channel_opening_feeRate),A.xp6(3),A.Q6J("icon",s.faUsers),A.xp6(5),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.liquidityNodes)("ngClass",A.VKq(18,Kh,""!==s.errorMessage)),A.xp6(31),A.Q6J("matFooterRowDef",A.DdM(20,Vh)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,Ct.yH,OA._Y,OA.JL,OA.F,m.Hw,nA.gM,P.KE,H.Nt,OA.wV,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,ut.O5,P.TO,_.$V,S.pW,xA.BZ,it.YE,ut.mk,T.oO,xA.w1,xA.fO,xA.ge,it.nU,xA.Dz,xA.ev,ut.PC,T.Zl,ic.qn,ut.sg,ic.HS,QA.gD,QA.$L,CA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[ut.uU,ut.JJ],styles:[".mat-column-alias[_ngcontent-%COMP%], .mat-column-nodeid[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-nodeid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),i})(),canActivate:[Re.eQ]},{path:"transactions",component:Da,canActivate:[Re.eQ],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:fa,canActivate:[Re.eQ]},{path:"invoices",component:Qt,canActivate:[Re.eQ]},{path:"offers",component:Ju,canActivate:[Re.eQ]},{path:"offrBookmarks",component:Ef,canActivate:[Re.eQ]}]},{path:"messages",component:Nr,canActivate:[Re.eQ],children:[{path:"",pathMatch:"full",redirectTo:"sign"},{path:"sign",component:pc,canActivate:[Re.eQ]},{path:"verify",component:Yc,canActivate:[Re.eQ]}]},{path:"routing",component:xr,canActivate:[Re.eQ],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:Wl,canActivate:[Re.eQ]},{path:"failedtransactions",component:Vg,canActivate:[Re.eQ]},{path:"localfail",component:Zf,canActivate:[Re.eQ]},{path:"routingpeers",component:GB,canActivate:[Re.eQ]}]},{path:"reports",component:JB,canActivate:[Re.eQ],children:[{path:"",pathMatch:"full",redirectTo:"routingreport"},{path:"routingreport",component:XB,canActivate:[Re.eQ]},{path:"transactions",component:ru,canActivate:[Re.eQ]}]},{path:"graph",component:su,canActivate:[Re.eQ],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:_i,canActivate:[Re.eQ]},{path:"queryroutes",component:dc,canActivate:[Re.eQ]}]},{path:"rates",component:Aa,canActivate:[Re.eQ]},{path:"**",component:au.w},{path:"network",redirectTo:"rates"},{path:"wallet",redirectTo:"home"},{path:"backup",redirectTo:"home"}]}]);var qh=Pt(8750);let _h=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=A.oAB({type:i,bootstrap:[n]}),i.\u0275inj=A.cJS({providers:[Re.eQ],imports:[[ut.ez,qh.m,Xh]]}),i})()},4641:function(fr,Ui,Pt){var ut=Pt(7757);"undefined"!=typeof self&&self,fr.exports=function(){var _t={9282:function(S,I,n){"use strict";var c=n(4155);function r(AA){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(EA){return typeof EA}:function(EA){return EA&&"function"==typeof Symbol&&EA.constructor===Symbol&&EA!==Symbol.prototype?"symbol":typeof EA})(AA)}var D,y,h=n(2136).codes,a=h.ERR_AMBIGUOUS_ARGUMENT,B=h.ERR_INVALID_ARG_TYPE,E=h.ERR_INVALID_ARG_VALUE,u=h.ERR_INVALID_RETURN_VALUE,C=h.ERR_MISSING_ARGS,e=n(5961),g=n(9539).inspect,w=n(9539).types,Q=w.isPromise,m=w.isRegExp,T=Object.assign?Object.assign:n(8091).assign,x=Object.is?Object.is:n(609);function R(){var AA=n(9158);D=AA.isDeepEqual,y=AA.isDeepStrictEqual}var _=!1,uA=S.exports=yA,pA={};function cA(AA){throw AA.message instanceof Error?AA.message:new e(AA)}function BA(AA,W,EA,vA){if(!EA){var iA=!1;if(0===W)iA=!0,vA="No value argument passed to `assert.ok()`";else if(vA instanceof Error)throw vA;var wA=new e({actual:EA,expected:!0,message:vA,operator:"==",stackStartFn:AA});throw wA.generatedMessage=iA,wA}}function yA(){for(var AA=arguments.length,W=new Array(AA),EA=0;EA1?EA-1:0),iA=1;iA1?EA-1:0),iA=1;iA1?EA-1:0),iA=1;iA1?EA-1:0),iA=1;iAgA.length)&&(yA=gA.length),gA.substring(yA-BA.length,yA)===BA}var N="",Y="",R="",P="",nA={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(gA){var BA=Object.keys(gA),yA=Object.create(Object.getPrototypeOf(gA));return BA.forEach(function(FA){yA[FA]=gA[FA]}),Object.defineProperty(yA,"message",{value:gA.message}),yA}function uA(gA){return x(gA,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function pA(gA,BA,yA){var FA="",$="",MA=0,fA="",dA=!1,SA=uA(gA),zA=SA.split("\n"),XA=uA(BA).split("\n"),q=0,O="";if("strictEqual"===yA&&"object"===m(gA)&&"object"===m(BA)&&null!==gA&&null!==BA&&(yA="strictEqualObject"),1===zA.length&&1===XA.length&&zA[0]!==XA[0]){var AA=zA[0].length+XA[0].length;if(AA<=10){if(!("object"===m(gA)&&null!==gA||"object"===m(BA)&&null!==BA||0===gA&&0===BA))return"".concat(nA[yA],"\n\n")+"".concat(zA[0]," !== ").concat(XA[0],"\n")}else if("strictEqualObject"!==yA&&AA<(c.stderr&&c.stderr.isTTY?c.stderr.columns:80)){for(;zA[0][q]===XA[0][q];)q++;q>2&&(O="\n ".concat(function b(gA,BA){if(BA=Math.floor(BA),0==gA.length||0==BA)return"";var yA=gA.length*BA;for(BA=Math.floor(Math.log(BA)/Math.log(2));BA;)gA+=gA,BA--;return gA+gA.substring(0,yA-gA.length)}(" ",q),"^"),q=0)}}for(var EA=zA[zA.length-1],vA=XA[XA.length-1];EA===vA&&(q++<2?fA="\n ".concat(EA).concat(fA):FA=EA,zA.pop(),XA.pop(),0!==zA.length&&0!==XA.length);)EA=zA[zA.length-1],vA=XA[XA.length-1];var iA=Math.max(zA.length,XA.length);if(0===iA){var wA=SA.split("\n");if(wA.length>30)for(wA[26]="".concat(N,"...").concat(P);wA.length>27;)wA.pop();return"".concat(nA.notIdentical,"\n\n").concat(wA.join("\n"),"\n")}q>3&&(fA="\n".concat(N,"...").concat(P).concat(fA),dA=!0),""!==FA&&(fA="\n ".concat(FA).concat(fA),FA="");var GA=0,et=nA[yA]+"\n".concat(Y,"+ actual").concat(P," ").concat(R,"- expected").concat(P),st=" ".concat(N,"...").concat(P," Lines skipped");for(q=0;q1&&q>2&&(TA>4?($+="\n".concat(N,"...").concat(P),dA=!0):TA>3&&($+="\n ".concat(XA[q-2]),GA++),$+="\n ".concat(XA[q-1]),GA++),MA=q,FA+="\n".concat(R,"-").concat(P," ").concat(XA[q]),GA++;else if(XA.length1&&q>2&&(TA>4?($+="\n".concat(N,"...").concat(P),dA=!0):TA>3&&($+="\n ".concat(zA[q-2]),GA++),$+="\n ".concat(zA[q-1]),GA++),MA=q,$+="\n".concat(Y,"+").concat(P," ").concat(zA[q]),GA++;else{var at=XA[q],It=zA[q],mt=It!==at&&(!y(It,",")||It.slice(0,-1)!==at);mt&&y(at,",")&&at.slice(0,-1)===It&&(mt=!1,It+=","),mt?(TA>1&&q>2&&(TA>4?($+="\n".concat(N,"...").concat(P),dA=!0):TA>3&&($+="\n ".concat(zA[q-2]),GA++),$+="\n ".concat(zA[q-1]),GA++),MA=q,$+="\n".concat(Y,"+").concat(P," ").concat(It),FA+="\n".concat(R,"-").concat(P," ").concat(at),GA+=2):($+=FA,FA="",(1===TA||0===q)&&($+="\n ".concat(It),GA++))}if(GA>20&&q30)for(q[26]="".concat(N,"...").concat(P);q.length>27;)q.pop();FA=B(this,1===q.length?Q(BA).call(this,"".concat(XA," ").concat(q[0])):Q(BA).call(this,"".concat(XA,"\n\n").concat(q.join("\n"),"\n")))}else{var O=uA(dA),AA="",W=nA[MA];"notDeepEqual"===MA||"notEqual"===MA?(O="".concat(nA[MA],"\n\n").concat(O)).length>1024&&(O="".concat(O.slice(0,1021),"...")):(AA="".concat(uA(SA)),O.length>512&&(O="".concat(O.slice(0,509),"...")),AA.length>512&&(AA="".concat(AA.slice(0,509),"...")),"deepEqual"===MA||"equal"===MA?O="".concat(W,"\n\n").concat(O,"\n\nshould equal\n\n"):AA=" ".concat(MA," ").concat(AA)),FA=B(this,Q(BA).call(this,"".concat(O).concat(AA)))}return Error.stackTraceLimit=zA,FA.generatedMessage=!$,Object.defineProperty(E(FA),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),FA.code="ERR_ASSERTION",FA.actual=dA,FA.expected=SA,FA.operator=MA,Error.captureStackTrace&&Error.captureStackTrace(E(FA),fA),FA.name="AssertionError",B(FA)}return function u(gA,BA){if("function"!=typeof BA&&null!==BA)throw new TypeError("Super expression must either be null or a function");gA.prototype=Object.create(BA&&BA.prototype,{constructor:{value:gA,writable:!0,configurable:!0}}),BA&&w(gA,BA)}(BA,gA),function a(gA,BA,yA){return BA&&h(gA.prototype,BA),yA&&h(gA,yA),gA}(BA,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:x.custom,value:function(FA,$){return x(this,function r(gA){for(var BA=1;BA2?"one of ".concat(T," ").concat(m.slice(0,x-1).join(", "),", or ")+m[x-1]:2===x?"one of ".concat(T," ").concat(m[0]," or ").concat(m[1]):"of ".concat(T," ").concat(m[0])}return"of ".concat(T," ").concat(String(m))}e("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),e("ERR_INVALID_ARG_TYPE",function(m,T,x){var M,D;if(void 0===u&&(u=n(9282)),u("string"==typeof m,"'name' must be a string"),"string"==typeof T&&function g(m,T,x){return m.substr(!x||x<0?0:+x,T.length)===T}(T,"not ")?(M="must not be",T=T.replace(/^not /,"")):M="must be",function w(m,T,x){return(void 0===x||x>m.length)&&(x=m.length),m.substring(x-T.length,x)===T}(m," argument"))D="The ".concat(m," ").concat(M," ").concat(f(T,"type"));else{var y=function Q(m,T,x){return"number"!=typeof x&&(x=0),!(x+T.length>m.length)&&-1!==m.indexOf(T,x)}(m,".")?"property":"argument";D='The "'.concat(m,'" ').concat(y," ").concat(M," ").concat(f(T,"type"))}return D+". Received type ".concat(c(x))},TypeError),e("ERR_INVALID_ARG_VALUE",function(m,T){var x=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===C&&(C=n(9539));var M=C.inspect(T);return M.length>128&&(M="".concat(M.slice(0,128),"...")),"The argument '".concat(m,"' ").concat(x,". Received ").concat(M)},TypeError,RangeError),e("ERR_INVALID_RETURN_VALUE",function(m,T,x){var M;return M=x&&x.constructor&&x.constructor.name?"instance of ".concat(x.constructor.name):"type ".concat(c(x)),"Expected ".concat(m,' to be returned from the "').concat(T,'"')+" function but got ".concat(M,".")},TypeError),e("ERR_MISSING_ARGS",function(){for(var m=arguments.length,T=new Array(m),x=0;x0,"At least one arg needs to be specified");var M="The ",D=T.length;switch(T=T.map(function(y){return'"'.concat(y,'"')}),D){case 1:M+="".concat(T[0]," argument");break;case 2:M+="".concat(T[0]," and ").concat(T[1]," arguments");break;default:M+=T.slice(0,D-1).join(", "),M+=", and ".concat(T[D-1]," arguments")}return"".concat(M," must be specified")},TypeError),S.exports.codes=E},9158:function(S,I,n){"use strict";function c(JA,WA){return function l(JA){if(Array.isArray(JA))return JA}(JA)||function o(JA,WA){var it=[],xA=!0,Mt=!1,Et=void 0;try{for(var OA,Tt=JA[Symbol.iterator]();!(xA=(OA=Tt.next()).done)&&(it.push(OA.value),!WA||it.length!==WA);xA=!0);}catch(H){Mt=!0,Et=H}finally{try{!xA&&null!=Tt.return&&Tt.return()}finally{if(Mt)throw Et}}return it}(JA,WA)||function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function h(JA){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(it){return typeof it}:function(it){return it&&"function"==typeof Symbol&&it.constructor===Symbol&&it!==Symbol.prototype?"symbol":typeof it})(JA)}var a=void 0!==/a/g.flags,B=function(WA){var it=[];return WA.forEach(function(xA){return it.push(xA)}),it},E=function(WA){var it=[];return WA.forEach(function(xA,Mt){return it.push([Mt,xA])}),it},u=Object.is?Object.is:n(609),C=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},e=Number.isNaN?Number.isNaN:n(360);function f(JA){return JA.call.bind(JA)}var g=f(Object.prototype.hasOwnProperty),w=f(Object.prototype.propertyIsEnumerable),Q=f(Object.prototype.toString),m=n(9539).types,T=m.isAnyArrayBuffer,x=m.isArrayBufferView,M=m.isDate,D=m.isMap,y=m.isRegExp,b=m.isSet,N=m.isNativeError,Y=m.isBoxedPrimitive,R=m.isNumberObject,P=m.isStringObject,nA=m.isBooleanObject,lA=m.isBigIntObject,_=m.isSymbolObject,uA=m.isFloat32Array,pA=m.isFloat64Array;function cA(JA){if(0===JA.length||JA.length>10)return!0;for(var WA=0;WA57)return!0}return 10===JA.length&&JA>=Math.pow(2,32)}function gA(JA){return Object.keys(JA).filter(cA).concat(C(JA).filter(Object.prototype.propertyIsEnumerable.bind(JA)))}function BA(JA,WA){if(JA===WA)return 0;for(var it=JA.length,xA=WA.length,Mt=0,Et=Math.min(it,xA);Mt=E.length?{done:!0}:{done:!1,value:E[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(E,u){(null==u||u>E.length)&&(u=E.length);for(var C=0,e=new Array(u);Cthis.buffer.length)return this.flush()},f.flush=function(){if(this.bufferOffset>0)return this.push(c.from(this.buffer.slice(0,this.bufferOffset))),this.bufferOffset=0},f.writeBuffer=function(w){return this.flush(),this.push(w),this.pos+=w.length},f.writeString=function(w,Q){switch(void 0===Q&&(Q="ascii"),Q){case"utf16le":case"ucs2":case"utf8":case"ascii":return this.writeBuffer(c.from(w,Q));case"utf16be":for(var m=c.from(w,"utf16le"),T=0,x=m.length-1;T>>16&255,this.buffer[this.bufferOffset++]=w>>>8&255,this.buffer[this.bufferOffset++]=255&w,this.pos+=3},f.writeUInt24LE=function(w){return this.ensure(3),this.buffer[this.bufferOffset++]=255&w,this.buffer[this.bufferOffset++]=w>>>8&255,this.buffer[this.bufferOffset++]=w>>>16&255,this.pos+=3},f.writeInt24BE=function(w){return this.writeUInt24BE(w>=0?w:w+16777215+1)},f.writeInt24LE=function(w){return this.writeUInt24LE(w>=0?w:w+16777215+1)},f.fill=function(w,Q){if(Q=this.length)){if(null==this.items[w]){var Q=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.ctx)*w,this.items[w]=this.type.decode(this.stream,this.ctx),this.stream.pos=Q}return this.items[w]}},f.toArray=function(){for(var w=[],Q=0,m=this.length;Q>1),(f=a.call(this,"Int"+u,C)||this)._point=1<u)throw new RangeError('The value "'+H+'" is invalid for option "size"');var k=new Uint8Array(H);return Object.setPrototypeOf(k,f.prototype),k}function f(H,k,z){if("number"==typeof H){if("string"==typeof k)throw new TypeError('The "string" argument must be of type string. Received type number');return m(H)}return g(H,k,z)}function g(H,k,z){if("string"==typeof H)return function T(H,k){if(("string"!=typeof k||""===k)&&(k="utf8"),!f.isEncoding(k))throw new TypeError("Unknown encoding: "+k);var z=0|Y(H,k),QA=e(z),CA=QA.write(H,k);return CA!==z&&(QA=QA.slice(0,CA)),QA}(H,k);if(ArrayBuffer.isView(H))return function M(H){if(xA(H,Uint8Array)){var k=new Uint8Array(H);return D(k.buffer,k.byteOffset,k.byteLength)}return x(H)}(H);if(null==H)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if(xA(H,ArrayBuffer)||H&&xA(H.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(xA(H,SharedArrayBuffer)||H&&xA(H.buffer,SharedArrayBuffer)))return D(H,k,z);if("number"==typeof H)throw new TypeError('The "value" argument must not be of type number. Received type number');var QA=H.valueOf&&H.valueOf();if(null!=QA&&QA!==H)return f.from(QA,k,z);var CA=function y(H){if(f.isBuffer(H)){var k=0|b(H.length),z=e(k);return 0===z.length||H.copy(z,0,0,k),z}return void 0!==H.length?"number"!=typeof H.length||Mt(H.length)?e(0):x(H):"Buffer"===H.type&&Array.isArray(H.data)?x(H.data):void 0}(H);if(CA)return CA;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof H[Symbol.toPrimitive])return f.from(H[Symbol.toPrimitive]("string"),k,z);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H)}function w(H){if("number"!=typeof H)throw new TypeError('"size" argument must be of type number');if(H<0)throw new RangeError('The value "'+H+'" is invalid for option "size"')}function m(H){return w(H),e(H<0?0:0|b(H))}function x(H){for(var k=H.length<0?0:0|b(H.length),z=e(k),QA=0;QA=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|H}function Y(H,k){if(f.isBuffer(H))return H.length;if(ArrayBuffer.isView(H)||xA(H,ArrayBuffer))return H.byteLength;if("string"!=typeof H)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);var z=H.length,QA=arguments.length>2&&!0===arguments[2];if(!QA&&0===z)return 0;for(var CA=!1;;)switch(k){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return mt(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*z;case"hex":return z>>>1;case"base64":return WA(H).length;default:if(CA)return QA?-1:mt(H).length;k=(""+k).toLowerCase(),CA=!0}}function R(H,k,z){var QA=!1;if((void 0===k||k<0)&&(k=0),k>this.length||((void 0===z||z>this.length)&&(z=this.length),z<=0)||(z>>>=0)<=(k>>>=0))return"";for(H||(H="utf8");;)switch(H){case"hex":return dA(this,k,z);case"utf8":case"utf-8":return yA(this,k,z);case"ascii":return MA(this,k,z);case"latin1":case"binary":return fA(this,k,z);case"base64":return BA(this,k,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return SA(this,k,z);default:if(QA)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),QA=!0}}function P(H,k,z){var QA=H[k];H[k]=H[z],H[z]=QA}function nA(H,k,z,QA,CA){if(0===H.length)return-1;if("string"==typeof z?(QA=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),Mt(z=+z)&&(z=CA?0:H.length-1),z<0&&(z=H.length+z),z>=H.length){if(CA)return-1;z=H.length-1}else if(z<0){if(!CA)return-1;z=0}if("string"==typeof k&&(k=f.from(k,QA)),f.isBuffer(k))return 0===k.length?-1:lA(H,k,z,QA,CA);if("number"==typeof k)return k&=255,"function"==typeof Uint8Array.prototype.indexOf?CA?Uint8Array.prototype.indexOf.call(H,k,z):Uint8Array.prototype.lastIndexOf.call(H,k,z):lA(H,[k],z,QA,CA);throw new TypeError("val must be string, number or Buffer")}function lA(H,k,z,QA,CA){var j,PA=1,rA=H.length,gt=k.length;if(void 0!==QA&&("ucs2"===(QA=String(QA).toLowerCase())||"ucs-2"===QA||"utf16le"===QA||"utf-16le"===QA)){if(H.length<2||k.length<2)return-1;PA=2,rA/=2,gt/=2,z/=2}function Yt(jA,lt){return 1===PA?jA[lt]:jA.readUInt16BE(lt*PA)}if(CA){var qA=-1;for(j=z;jrA&&(z=rA-gt),j=z;j>=0;j--){for(var KA=!0,DA=0;DACA&&(QA=CA):QA=CA;var rA,PA=k.length;for(QA>PA/2&&(QA=PA/2),rA=0;rA>8,PA.push(z%256),PA.push(QA);return PA}(k,H.length-z),H,z,QA)}function BA(H,k,z){return a.fromByteArray(0===k&&z===H.length?H:H.slice(k,z))}function yA(H,k,z){z=Math.min(H.length,z);for(var QA=[],CA=k;CA239?4:PA>223?3:PA>191?2:1;if(CA+gt<=z){var Yt=void 0,j=void 0,qA=void 0,KA=void 0;switch(gt){case 1:PA<128&&(rA=PA);break;case 2:128==(192&(Yt=H[CA+1]))&&(KA=(31&PA)<<6|63&Yt)>127&&(rA=KA);break;case 3:j=H[CA+2],128==(192&(Yt=H[CA+1]))&&128==(192&j)&&(KA=(15&PA)<<12|(63&Yt)<<6|63&j)>2047&&(KA<55296||KA>57343)&&(rA=KA);break;case 4:j=H[CA+2],qA=H[CA+3],128==(192&(Yt=H[CA+1]))&&128==(192&j)&&128==(192&qA)&&(KA=(15&PA)<<18|(63&Yt)<<12|(63&j)<<6|63&qA)>65535&&KA<1114112&&(rA=KA)}}null===rA?(rA=65533,gt=1):rA>65535&&(QA.push((rA-=65536)>>>10&1023|55296),rA=56320|1023&rA),QA.push(rA),CA+=gt}return function $(H){var k=H.length;if(k<=4096)return String.fromCharCode.apply(String,H);for(var z="",QA=0;QACA.length?(f.isBuffer(rA)||(rA=f.from(rA)),rA.copy(CA,PA)):Uint8Array.prototype.set.call(CA,rA,PA);else{if(!f.isBuffer(rA))throw new TypeError('"list" argument must be an Array of Buffers');rA.copy(CA,PA)}PA+=rA.length}return CA},f.byteLength=Y,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var k=this.length;if(k%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var z=0;zz&&(k+=" ... "),""},E&&(f.prototype[E]=f.prototype.inspect),f.prototype.compare=function(k,z,QA,CA,PA){if(xA(k,Uint8Array)&&(k=f.from(k,k.offset,k.byteLength)),!f.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(void 0===z&&(z=0),void 0===QA&&(QA=k?k.length:0),void 0===CA&&(CA=0),void 0===PA&&(PA=this.length),z<0||QA>k.length||CA<0||PA>this.length)throw new RangeError("out of range index");if(CA>=PA&&z>=QA)return 0;if(CA>=PA)return-1;if(z>=QA)return 1;if(this===k)return 0;for(var rA=(PA>>>=0)-(CA>>>=0),gt=(QA>>>=0)-(z>>>=0),Yt=Math.min(rA,gt),j=this.slice(CA,PA),qA=k.slice(z,QA),KA=0;KA>>=0,isFinite(QA)?(QA>>>=0,void 0===CA&&(CA="utf8")):(CA=QA,QA=void 0)}var PA=this.length-z;if((void 0===QA||QA>PA)&&(QA=PA),k.length>0&&(QA<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");CA||(CA="utf8");for(var rA=!1;;)switch(CA){case"hex":return _(this,k,z,QA);case"utf8":case"utf-8":return uA(this,k,z,QA);case"ascii":case"latin1":case"binary":return pA(this,k,z,QA);case"base64":return cA(this,k,z,QA);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gA(this,k,z,QA);default:if(rA)throw new TypeError("Unknown encoding: "+CA);CA=(""+CA).toLowerCase(),rA=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function MA(H,k,z){var QA="";z=Math.min(H.length,z);for(var CA=k;CAQA)&&(z=QA);for(var CA="",PA=k;PAz)throw new RangeError("Trying to access beyond buffer length")}function XA(H,k,z,QA,CA,PA){if(!f.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>CA||kH.length)throw new RangeError("Index out of range")}function q(H,k,z,QA,CA){et(k,QA,CA,H,z,7);var PA=Number(k&BigInt(4294967295));H[z++]=PA,H[z++]=PA>>=8,H[z++]=PA>>=8,H[z++]=PA>>=8;var rA=Number(k>>BigInt(32)&BigInt(4294967295));return H[z++]=rA,H[z++]=rA>>=8,H[z++]=rA>>=8,H[z++]=rA>>=8,z}function O(H,k,z,QA,CA){et(k,QA,CA,H,z,7);var PA=Number(k&BigInt(4294967295));H[z+7]=PA,H[z+6]=PA>>=8,H[z+5]=PA>>=8,H[z+4]=PA>>=8;var rA=Number(k>>BigInt(32)&BigInt(4294967295));return H[z+3]=rA,H[z+2]=rA>>=8,H[z+1]=rA>>=8,H[z]=rA>>=8,z+8}function AA(H,k,z,QA,CA,PA){if(z+QA>H.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function W(H,k,z,QA,CA){return k=+k,z>>>=0,CA||AA(H,0,z,4),B.write(H,k,z,QA,23,4),z+4}function EA(H,k,z,QA,CA){return k=+k,z>>>=0,CA||AA(H,0,z,8),B.write(H,k,z,QA,52,8),z+8}f.prototype.slice=function(k,z){var QA=this.length;(k=~~k)<0?(k+=QA)<0&&(k=0):k>QA&&(k=QA),(z=void 0===z?QA:~~z)<0?(z+=QA)<0&&(z=0):z>QA&&(z=QA),z>>=0,z>>>=0,QA||zA(k,z,this.length);for(var CA=this[k],PA=1,rA=0;++rA>>=0,z>>>=0,QA||zA(k,z,this.length);for(var CA=this[k+--z],PA=1;z>0&&(PA*=256);)CA+=this[k+--z]*PA;return CA},f.prototype.readUint8=f.prototype.readUInt8=function(k,z){return k>>>=0,z||zA(k,1,this.length),this[k]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(k,z){return k>>>=0,z||zA(k,2,this.length),this[k]|this[k+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(k,z){return k>>>=0,z||zA(k,2,this.length),this[k]<<8|this[k+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(k,z){return k>>>=0,z||zA(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(k,z){return k>>>=0,z||zA(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},f.prototype.readBigUInt64LE=Tt(function(k){st(k>>>=0,"offset");var z=this[k],QA=this[k+7];(void 0===z||void 0===QA)&&TA(k,this.length-8);var CA=z+this[++k]*Math.pow(2,8)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,24),PA=this[++k]+this[++k]*Math.pow(2,8)+this[++k]*Math.pow(2,16)+QA*Math.pow(2,24);return BigInt(CA)+(BigInt(PA)<>>=0,"offset");var z=this[k],QA=this[k+7];(void 0===z||void 0===QA)&&TA(k,this.length-8);var CA=z*Math.pow(2,24)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,8)+this[++k],PA=this[++k]*Math.pow(2,24)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,8)+QA;return(BigInt(CA)<>>=0,z>>>=0,QA||zA(k,z,this.length);for(var CA=this[k],PA=1,rA=0;++rA=(PA*=128)&&(CA-=Math.pow(2,8*z)),CA},f.prototype.readIntBE=function(k,z,QA){k>>>=0,z>>>=0,QA||zA(k,z,this.length);for(var CA=z,PA=1,rA=this[k+--CA];CA>0&&(PA*=256);)rA+=this[k+--CA]*PA;return rA>=(PA*=128)&&(rA-=Math.pow(2,8*z)),rA},f.prototype.readInt8=function(k,z){return k>>>=0,z||zA(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},f.prototype.readInt16LE=function(k,z){k>>>=0,z||zA(k,2,this.length);var QA=this[k]|this[k+1]<<8;return 32768&QA?4294901760|QA:QA},f.prototype.readInt16BE=function(k,z){k>>>=0,z||zA(k,2,this.length);var QA=this[k+1]|this[k]<<8;return 32768&QA?4294901760|QA:QA},f.prototype.readInt32LE=function(k,z){return k>>>=0,z||zA(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},f.prototype.readInt32BE=function(k,z){return k>>>=0,z||zA(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},f.prototype.readBigInt64LE=Tt(function(k){st(k>>>=0,"offset");var z=this[k],QA=this[k+7];(void 0===z||void 0===QA)&&TA(k,this.length-8);var CA=this[k+4]+this[k+5]*Math.pow(2,8)+this[k+6]*Math.pow(2,16)+(QA<<24);return(BigInt(CA)<>>=0,"offset");var z=this[k],QA=this[k+7];(void 0===z||void 0===QA)&&TA(k,this.length-8);var CA=(z<<24)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,8)+this[++k];return(BigInt(CA)<>>=0,z||zA(k,4,this.length),B.read(this,k,!0,23,4)},f.prototype.readFloatBE=function(k,z){return k>>>=0,z||zA(k,4,this.length),B.read(this,k,!1,23,4)},f.prototype.readDoubleLE=function(k,z){return k>>>=0,z||zA(k,8,this.length),B.read(this,k,!0,52,8)},f.prototype.readDoubleBE=function(k,z){return k>>>=0,z||zA(k,8,this.length),B.read(this,k,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(k,z,QA,CA){k=+k,z>>>=0,QA>>>=0,CA||XA(this,k,z,QA,Math.pow(2,8*QA)-1,0);var rA=1,gt=0;for(this[z]=255&k;++gt>>=0,QA>>>=0,CA||XA(this,k,z,QA,Math.pow(2,8*QA)-1,0);var rA=QA-1,gt=1;for(this[z+rA]=255&k;--rA>=0&&(gt*=256);)this[z+rA]=k/gt&255;return z+QA},f.prototype.writeUint8=f.prototype.writeUInt8=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,1,255,0),this[z]=255&k,z+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,2,65535,0),this[z]=255&k,this[z+1]=k>>>8,z+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,2,65535,0),this[z]=k>>>8,this[z+1]=255&k,z+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,4,4294967295,0),this[z+3]=k>>>24,this[z+2]=k>>>16,this[z+1]=k>>>8,this[z]=255&k,z+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,4,4294967295,0),this[z]=k>>>24,this[z+1]=k>>>16,this[z+2]=k>>>8,this[z+3]=255&k,z+4},f.prototype.writeBigUInt64LE=Tt(function(k,z){return void 0===z&&(z=0),q(this,k,z,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=Tt(function(k,z){return void 0===z&&(z=0),O(this,k,z,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(k,z,QA,CA){if(k=+k,z>>>=0,!CA){var PA=Math.pow(2,8*QA-1);XA(this,k,z,QA,PA-1,-PA)}var rA=0,gt=1,Yt=0;for(this[z]=255&k;++rA>0)-Yt&255;return z+QA},f.prototype.writeIntBE=function(k,z,QA,CA){if(k=+k,z>>>=0,!CA){var PA=Math.pow(2,8*QA-1);XA(this,k,z,QA,PA-1,-PA)}var rA=QA-1,gt=1,Yt=0;for(this[z+rA]=255&k;--rA>=0&&(gt*=256);)k<0&&0===Yt&&0!==this[z+rA+1]&&(Yt=1),this[z+rA]=(k/gt>>0)-Yt&255;return z+QA},f.prototype.writeInt8=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,1,127,-128),k<0&&(k=255+k+1),this[z]=255&k,z+1},f.prototype.writeInt16LE=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,2,32767,-32768),this[z]=255&k,this[z+1]=k>>>8,z+2},f.prototype.writeInt16BE=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,2,32767,-32768),this[z]=k>>>8,this[z+1]=255&k,z+2},f.prototype.writeInt32LE=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,4,2147483647,-2147483648),this[z]=255&k,this[z+1]=k>>>8,this[z+2]=k>>>16,this[z+3]=k>>>24,z+4},f.prototype.writeInt32BE=function(k,z,QA){return k=+k,z>>>=0,QA||XA(this,k,z,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[z]=k>>>24,this[z+1]=k>>>16,this[z+2]=k>>>8,this[z+3]=255&k,z+4},f.prototype.writeBigInt64LE=Tt(function(k,z){return void 0===z&&(z=0),q(this,k,z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=Tt(function(k,z){return void 0===z&&(z=0),O(this,k,z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(k,z,QA){return W(this,k,z,!0,QA)},f.prototype.writeFloatBE=function(k,z,QA){return W(this,k,z,!1,QA)},f.prototype.writeDoubleLE=function(k,z,QA){return EA(this,k,z,!0,QA)},f.prototype.writeDoubleBE=function(k,z,QA){return EA(this,k,z,!1,QA)},f.prototype.copy=function(k,z,QA,CA){if(!f.isBuffer(k))throw new TypeError("argument should be a Buffer");if(QA||(QA=0),!CA&&0!==CA&&(CA=this.length),z>=k.length&&(z=k.length),z||(z=0),CA>0&&CA=this.length)throw new RangeError("Index out of range");if(CA<0)throw new RangeError("sourceEnd out of bounds");CA>this.length&&(CA=this.length),k.length-z>>=0,QA=void 0===QA?this.length:QA>>>0,k||(k=0),"number"==typeof k)for(rA=z;rA=QA+4;z-=3)k="_"+H.slice(z-3,z)+k;return""+H.slice(0,z)+k}function et(H,k,z,QA,CA,PA){if(H>z||H3?0===k||k===BigInt(0)?">= 0"+rA+" and < 2"+rA+" ** "+8*(PA+1)+rA:">= -(2"+rA+" ** "+(8*(PA+1)-1)+rA+") and < 2 ** "+(8*(PA+1)-1)+rA:">= "+k+rA+" and <= "+z+rA,new vA.ERR_OUT_OF_RANGE("value",gt,H)}!function GA(H,k,z){st(k,"offset"),(void 0===H[k]||void 0===H[k+z])&&TA(k,H.length-(z+1))}(QA,CA,PA)}function st(H,k){if("number"!=typeof H)throw new vA.ERR_INVALID_ARG_TYPE(k,"number",H)}function TA(H,k,z){throw Math.floor(H)!==H?(st(H,z),new vA.ERR_OUT_OF_RANGE(z||"offset","an integer",H)):k<0?new vA.ERR_BUFFER_OUT_OF_BOUNDS:new vA.ERR_OUT_OF_RANGE(z||"offset",">= "+(z?1:0)+" and <= "+k,H)}iA("ERR_BUFFER_OUT_OF_BOUNDS",function(H){return H?H+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),iA("ERR_INVALID_ARG_TYPE",function(H,k){return'The "'+H+'" argument must be of type number. Received type '+typeof k},TypeError),iA("ERR_OUT_OF_RANGE",function(H,k,z){var QA='The value of "'+H+'" is out of range.',CA=z;return Number.isInteger(z)&&Math.abs(z)>Math.pow(2,32)?CA=wA(String(z)):"bigint"==typeof z&&(CA=String(z),(z>Math.pow(BigInt(2),BigInt(32))||z<-Math.pow(BigInt(2),BigInt(32)))&&(CA=wA(CA)),CA+="n"),QA+" It must be "+k+". Received "+CA},RangeError);var at=/[^+/0-9A-Za-z-_]/g;function mt(H,k){k=k||1/0;for(var z,QA=H.length,CA=null,PA=[],rA=0;rA55295&&z<57344){if(!CA){if(z>56319){(k-=3)>-1&&PA.push(239,191,189);continue}if(rA+1===QA){(k-=3)>-1&&PA.push(239,191,189);continue}CA=z;continue}if(z<56320){(k-=3)>-1&&PA.push(239,191,189),CA=z;continue}z=65536+(CA-55296<<10|z-56320)}else CA&&(k-=3)>-1&&PA.push(239,191,189);if(CA=null,z<128){if((k-=1)<0)break;PA.push(z)}else if(z<2048){if((k-=2)<0)break;PA.push(z>>6|192,63&z|128)}else if(z<65536){if((k-=3)<0)break;PA.push(z>>12|224,z>>6&63|128,63&z|128)}else{if(!(z<1114112))throw new Error("Invalid code point");if((k-=4)<0)break;PA.push(z>>18|240,z>>12&63|128,z>>6&63|128,63&z|128)}}return PA}function WA(H){return a.toByteArray(function It(H){if((H=(H=H.split("=")[0]).trim().replace(at,"")).length<2)return"";for(;H.length%4!=0;)H+="=";return H}(H))}function it(H,k,z,QA){var CA;for(CA=0;CA=k.length||CA>=H.length);++CA)k[CA+z]=H[CA];return CA}function xA(H,k){return H instanceof k||null!=H&&null!=H.constructor&&null!=H.constructor.name&&H.constructor.name===k.name}function Mt(H){return H!=H}var Et=function(){for(var H="0123456789abcdef",k=new Array(256),z=0;z<16;++z)for(var QA=16*z,CA=0;CA<16;++CA)k[QA+CA]=H[z]+H[CA];return k}();function Tt(H){return"undefined"==typeof BigInt?OA:H}function OA(){throw new Error("BigInt not supported")}},477:function(S,I,n){"use strict";n(7803),n(1539),S.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},2094:function(S,I,n){"use strict";var uA,pA,cA,c=n(477),r=n(9781),o=n(7854),l=n(614),h=n(111),a=n(2597),B=n(648),E=n(6330),u=n(8880),C=n(1320),e=n(3070).f,f=n(7976),g=n(9518),w=n(7674),Q=n(5112),m=n(9711),T=o.Int8Array,x=T&&T.prototype,M=o.Uint8ClampedArray,D=M&&M.prototype,y=T&&g(T),b=x&&g(x),N=Object.prototype,Y=o.TypeError,R=Q("toStringTag"),P=m("TYPED_ARRAY_TAG"),nA=m("TYPED_ARRAY_CONSTRUCTOR"),lA=c&&!!w&&"Opera"!==B(o.opera),_=!1,gA={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BA={BigInt64Array:8,BigUint64Array:8},FA=function(zA){if(!h(zA))return!1;var XA=B(zA);return a(gA,XA)||a(BA,XA)};for(uA in gA)(cA=(pA=o[uA])&&pA.prototype)?u(cA,nA,pA):lA=!1;for(uA in BA)(cA=(pA=o[uA])&&pA.prototype)&&u(cA,nA,pA);if((!lA||!l(y)||y===Function.prototype)&&(y=function(){throw Y("Incorrect invocation")},lA))for(uA in gA)o[uA]&&w(o[uA],y);if((!lA||!b||b===N)&&(b=y.prototype,lA))for(uA in gA)o[uA]&&w(o[uA].prototype,b);if(lA&&g(D)!==b&&w(D,b),r&&!a(b,R))for(uA in _=!0,e(b,R,{get:function(){return h(this)?this[P]:void 0}}),gA)o[uA]&&u(o[uA],P,uA);S.exports={NATIVE_ARRAY_BUFFER_VIEWS:lA,TYPED_ARRAY_CONSTRUCTOR:nA,TYPED_ARRAY_TAG:_&&P,aTypedArray:function(zA){if(FA(zA))return zA;throw Y("Target is not a typed array")},aTypedArrayConstructor:function(zA){if(l(zA)&&(!w||f(y,zA)))return zA;throw Y(E(zA)+" is not a typed array constructor")},exportTypedArrayMethod:function(zA,XA,q){if(r){if(q)for(var O in gA){var AA=o[O];if(AA&&a(AA.prototype,zA))try{delete AA.prototype[zA]}catch(W){}}(!b[zA]||q)&&C(b,zA,q?XA:lA&&x[zA]||XA)}},exportTypedArrayStaticMethod:function(zA,XA,q){var O,AA;if(r){if(w){if(q)for(O in gA)if((AA=o[O])&&a(AA,zA))try{delete AA[zA]}catch(W){}if(y[zA]&&!q)return;try{return C(y,zA,q?XA:lA&&y[zA]||XA)}catch(W){}}for(O in gA)(AA=o[O])&&(!AA[zA]||q)&&C(AA,zA,XA)}},isView:function(zA){if(!h(zA))return!1;var XA=B(zA);return"DataView"===XA||a(gA,XA)||a(BA,XA)},isTypedArray:FA,TypedArray:y,TypedArrayPrototype:b}},2091:function(S,I,n){"use strict";n(8309);var c=n(7854),r=n(1702),o=n(9781),l=n(477),h=n(6530),a=n(8880),B=n(2248),E=n(7293),u=n(5787),C=n(9303),e=n(7466),f=n(7067),g=n(1179),w=n(9518),Q=n(7674),m=n(8006).f,T=n(3070).f,x=n(1285),M=n(206),D=n(8003),y=n(9909),b=h.PROPER,N=h.CONFIGURABLE,Y=y.get,R=y.set,P="ArrayBuffer",nA="DataView",lA="prototype",uA="Wrong index",pA=c[P],cA=pA,gA=cA&&cA[lA],BA=c[nA],yA=BA&&BA[lA],FA=Object.prototype,$=c.Array,MA=c.RangeError,fA=r(x),dA=r([].reverse),SA=g.pack,zA=g.unpack,XA=function(ht){return[255&ht]},q=function(ht){return[255&ht,ht>>8&255]},O=function(ht){return[255&ht,ht>>8&255,ht>>16&255,ht>>24&255]},AA=function(ht){return ht[3]<<24|ht[2]<<16|ht[1]<<8|ht[0]},W=function(ht){return SA(ht,23,4)},EA=function(ht){return SA(ht,52,8)},vA=function(ht,JA){T(ht[lA],JA,{get:function(){return Y(this)[JA]}})},iA=function(ht,JA,WA,it){var xA=f(WA),Mt=Y(ht);if(xA+JA>Mt.byteLength)throw MA(uA);var Et=Y(Mt.buffer).bytes,Tt=xA+Mt.byteOffset,OA=M(Et,Tt,Tt+JA);return it?OA:dA(OA)},wA=function(ht,JA,WA,it,xA,Mt){var Et=f(WA),Tt=Y(ht);if(Et+JA>Tt.byteLength)throw MA(uA);for(var OA=Y(Tt.buffer).bytes,H=Et+Tt.byteOffset,k=it(+xA),z=0;zst;)(TA=et[st++])in cA||a(cA,TA,pA[TA]);gA.constructor=cA}Q&&w(yA)!==FA&&Q(yA,FA);var at=new BA(new cA(2)),It=r(yA.setInt8);at.setInt8(0,2147483648),at.setInt8(1,2147483649),(at.getInt8(0)||!at.getInt8(1))&&B(yA,{setInt8:function(ht,JA){It(this,ht,JA<<24>>24)},setUint8:function(ht,JA){It(this,ht,JA<<24>>24)}},{unsafe:!0})}else gA=(cA=function(ht){u(this,gA);var JA=f(ht);R(this,{bytes:fA($(JA),0),byteLength:JA}),o||(this.byteLength=JA)})[lA],yA=(BA=function(ht,JA,WA){u(this,yA),u(ht,gA);var it=Y(ht).byteLength,xA=C(JA);if(xA<0||xA>it)throw MA("Wrong offset");if(xA+(WA=void 0===WA?it-xA:e(WA))>it)throw MA("Wrong length");R(this,{buffer:ht,byteLength:WA,byteOffset:xA}),o||(this.buffer=ht,this.byteLength=WA,this.byteOffset=xA)})[lA],o&&(vA(cA,"byteLength"),vA(BA,"buffer"),vA(BA,"byteLength"),vA(BA,"byteOffset")),B(yA,{getInt8:function(ht){return iA(this,1,ht)[0]<<24>>24},getUint8:function(ht){return iA(this,1,ht)[0]},getInt16:function(ht){var JA=iA(this,2,ht,arguments.length>1?arguments[1]:void 0);return(JA[1]<<8|JA[0])<<16>>16},getUint16:function(ht){var JA=iA(this,2,ht,arguments.length>1?arguments[1]:void 0);return JA[1]<<8|JA[0]},getInt32:function(ht){return AA(iA(this,4,ht,arguments.length>1?arguments[1]:void 0))},getUint32:function(ht){return AA(iA(this,4,ht,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(ht){return zA(iA(this,4,ht,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(ht){return zA(iA(this,8,ht,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(ht,JA){wA(this,1,ht,XA,JA)},setUint8:function(ht,JA){wA(this,1,ht,XA,JA)},setInt16:function(ht,JA){wA(this,2,ht,q,JA,arguments.length>2?arguments[2]:void 0)},setUint16:function(ht,JA){wA(this,2,ht,q,JA,arguments.length>2?arguments[2]:void 0)},setInt32:function(ht,JA){wA(this,4,ht,O,JA,arguments.length>2?arguments[2]:void 0)},setUint32:function(ht,JA){wA(this,4,ht,O,JA,arguments.length>2?arguments[2]:void 0)},setFloat32:function(ht,JA){wA(this,4,ht,W,JA,arguments.length>2?arguments[2]:void 0)},setFloat64:function(ht,JA){wA(this,8,ht,EA,JA,arguments.length>2?arguments[2]:void 0)}});D(cA,P),D(BA,nA),S.exports={ArrayBuffer:cA,DataView:BA}},7803:function(S,I,n){"use strict";var c=n(2109),r=n(7854),o=n(2091),l=n(6340),h="ArrayBuffer",a=o[h];c({global:!0,forced:r[h]!==a},{ArrayBuffer:a}),l(h)},194:function(S,I,n){"use strict";S.exports=function(c){return function(){var r=c,l=r.lib.BlockCipher,h=r.algo,a=[],B=[],E=[],u=[],C=[],e=[],f=[],g=[],w=[],Q=[];!function(){for(var x=[],M=0;M<256;M++)x[M]=M<128?M<<1:M<<1^283;var D=0,y=0;for(M=0;M<256;M++){var b=y^y<<1^y<<2^y<<3^y<<4;a[D]=b=b>>>8^255&b^99,B[b]=D;var P,N=x[D],Y=x[N],R=x[Y];E[D]=(P=257*x[b]^16843008*b)<<24|P>>>8,u[D]=P<<16|P>>>16,C[D]=P<<8|P>>>24,e[D]=P,f[b]=(P=16843009*R^65537*Y^257*N^16843008*D)<<24|P>>>8,g[b]=P<<16|P>>>16,w[b]=P<<8|P>>>24,Q[b]=P,D?(D=N^x[x[x[R^N]]],y^=x[x[y]]):D=y=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],T=h.AES=l.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var D=this._keyPriorReset=this._key,y=D.words,b=D.sigBytes/4,Y=4*((this._nRounds=b+6)+1),R=this._keySchedule=[],P=0;P6&&P%b==4&&(M=a[M>>>24]<<24|a[M>>>16&255]<<16|a[M>>>8&255]<<8|a[255&M]):(M=a[(M=M<<8|M>>>24)>>>24]<<24|a[M>>>16&255]<<16|a[M>>>8&255]<<8|a[255&M],M^=m[P/b|0]<<24),R[P]=R[P-b]^M);for(var nA=this._invKeySchedule=[],lA=0;lA>>24]]^g[a[M>>>16&255]]^w[a[M>>>8&255]]^Q[a[255&M]]}}},encryptBlock:function(M,D){this._doCryptBlock(M,D,this._keySchedule,E,u,C,e,a)},decryptBlock:function(M,D){var y=M[D+1];M[D+1]=M[D+3],M[D+3]=y,this._doCryptBlock(M,D,this._invKeySchedule,f,g,w,Q,B),y=M[D+1],M[D+1]=M[D+3],M[D+3]=y},_doCryptBlock:function(M,D,y,b,N,Y,R,P){for(var nA=this._nRounds,lA=M[D]^y[0],_=M[D+1]^y[1],uA=M[D+2]^y[2],pA=M[D+3]^y[3],cA=4,gA=1;gA>>24]^N[_>>>16&255]^Y[uA>>>8&255]^R[255&pA]^y[cA++],yA=b[_>>>24]^N[uA>>>16&255]^Y[pA>>>8&255]^R[255&lA]^y[cA++],FA=b[uA>>>24]^N[pA>>>16&255]^Y[lA>>>8&255]^R[255&_]^y[cA++],$=b[pA>>>24]^N[lA>>>16&255]^Y[_>>>8&255]^R[255&uA]^y[cA++];lA=BA,_=yA,uA=FA,pA=$}BA=(P[lA>>>24]<<24|P[_>>>16&255]<<16|P[uA>>>8&255]<<8|P[255&pA])^y[cA++],yA=(P[_>>>24]<<24|P[uA>>>16&255]<<16|P[pA>>>8&255]<<8|P[255&lA])^y[cA++],FA=(P[uA>>>24]<<24|P[pA>>>16&255]<<16|P[lA>>>8&255]<<8|P[255&_])^y[cA++],$=(P[pA>>>24]<<24|P[lA>>>16&255]<<16|P[_>>>8&255]<<8|P[255&uA])^y[cA++],M[D]=BA,M[D+1]=yA,M[D+2]=FA,M[D+3]=$},keySize:8});r.AES=l._createHelper(T)}(),c.AES}(n(757),n(7508),n(3440),n(3839),n(1582))},1582:function(S,I,n){"use strict";n(7042),n(2222),n(1539),n(9714),n(561),S.exports=function(c){var o,l,h,a,B,C,f,g,Q,m,T,M,y,N,Y,P,nA;c.lib.Cipher||(a=(l=(o=c).lib).WordArray,C=o.enc.Base64,f=o.algo.EvpKDF,g=l.Cipher=(B=l.BufferedBlockAlgorithm).extend({cfg:(h=l.Base).extend(),createEncryptor:function(_,uA){return this.create(this._ENC_XFORM_MODE,_,uA)},createDecryptor:function(_,uA){return this.create(this._DEC_XFORM_MODE,_,uA)},init:function(_,uA,pA){this.cfg=this.cfg.extend(pA),this._xformMode=_,this._key=uA,this.reset()},reset:function(){B.reset.call(this),this._doReset()},process:function(_){return this._append(_),this._process()},finalize:function(_){return _&&this._append(_),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function lA(_){return"string"==typeof _?nA:Y}return function(_){return{encrypt:function(pA,cA,gA){return lA(cA).encrypt(_,pA,cA,gA)},decrypt:function(pA,cA,gA){return lA(cA).decrypt(_,pA,cA,gA)}}}}()}),l.StreamCipher=g.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),Q=o.mode={},m=l.BlockCipherMode=h.extend({createEncryptor:function(_,uA){return this.Encryptor.create(_,uA)},createDecryptor:function(_,uA){return this.Decryptor.create(_,uA)},init:function(_,uA){this._cipher=_,this._iv=uA}}),T=Q.CBC=function(){var lA=m.extend();function _(uA,pA,cA){var gA,BA=this._iv;BA?(gA=BA,this._iv=undefined):gA=this._prevBlock;for(var yA=0;yA>>2]}},l.BlockCipher=g.extend({cfg:g.cfg.extend({mode:T,padding:M}),reset:function(){var _;g.reset.call(this);var uA=this.cfg,pA=uA.iv,cA=uA.mode;this._xformMode==this._ENC_XFORM_MODE?_=cA.createEncryptor:(_=cA.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==_?this._mode.init(this,pA&&pA.words):(this._mode=_.call(cA,this,pA&&pA.words),this._mode.__creator=_)},_doProcessBlock:function(_,uA){this._mode.processBlock(_,uA)},_doFinalize:function(){var _,uA=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(uA.pad(this._data,this.blockSize),_=this._process(!0)):(_=this._process(!0),uA.unpad(_)),_},blockSize:4}),y=l.CipherParams=h.extend({init:function(_){this.mixIn(_)},toString:function(_){return(_||this.formatter).stringify(this)}}),N=(o.format={}).OpenSSL={stringify:function(_){var pA=_.ciphertext,cA=_.salt;return(cA?a.create([1398893684,1701076831]).concat(cA).concat(pA):pA).toString(C)},parse:function(_){var uA,pA=C.parse(_),cA=pA.words;return 1398893684==cA[0]&&1701076831==cA[1]&&(uA=a.create(cA.slice(2,4)),cA.splice(0,4),pA.sigBytes-=16),y.create({ciphertext:pA,salt:uA})}},Y=l.SerializableCipher=h.extend({cfg:h.extend({format:N}),encrypt:function(_,uA,pA,cA){cA=this.cfg.extend(cA);var gA=_.createEncryptor(pA,cA),BA=gA.finalize(uA),yA=gA.cfg;return y.create({ciphertext:BA,key:pA,iv:yA.iv,algorithm:_,mode:yA.mode,padding:yA.padding,blockSize:_.blockSize,formatter:cA.format})},decrypt:function(_,uA,pA,cA){return cA=this.cfg.extend(cA),uA=this._parse(uA,cA.format),_.createDecryptor(pA,cA).finalize(uA.ciphertext)},_parse:function(_,uA){return"string"==typeof _?uA.parse(_,this):_}}),P=(o.kdf={}).OpenSSL={execute:function(_,uA,pA,cA){cA||(cA=a.random(8));var gA=f.create({keySize:uA+pA}).compute(_,cA),BA=a.create(gA.words.slice(uA),4*pA);return gA.sigBytes=4*uA,y.create({key:gA,iv:BA,salt:cA})}},nA=l.PasswordBasedCipher=Y.extend({cfg:Y.cfg.extend({kdf:P}),encrypt:function(_,uA,pA,cA){var gA=(cA=this.cfg.extend(cA)).kdf.execute(pA,_.keySize,_.ivSize);cA.iv=gA.iv;var BA=Y.encrypt.call(this,_,uA,gA.key,cA);return BA.mixIn(gA),BA},decrypt:function(_,uA,pA,cA){cA=this.cfg.extend(cA),uA=this._parse(uA,cA.format);var gA=cA.kdf.execute(pA,_.keySize,_.ivSize,uA.salt);return cA.iv=gA.iv,Y.decrypt.call(this,_,uA,gA.key,cA)}}))}(n(757),n(3839))},757:function(S,I,n){"use strict";var r;n(5743),n(6992),n(1539),n(9135),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(9714),n(7042),n(9600),n(2222),n(561),r=function(){var c=c||function(r,o){var l;if("undefined"!=typeof window&&window.crypto&&(l=window.crypto),"undefined"!=typeof self&&self.crypto&&(l=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(l=globalThis.crypto),!l&&"undefined"!=typeof window&&window.msCrypto&&(l=window.msCrypto),!l&&void 0!==n.g&&n.g.crypto&&(l=n.g.crypto),!l)try{l=n(2480)}catch(x){}var h=function(){if(l){if("function"==typeof l.getRandomValues)try{return l.getRandomValues(new Uint32Array(1))[0]}catch(M){}if("function"==typeof l.randomBytes)try{return l.randomBytes(4).readInt32LE()}catch(M){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function x(){}return function(M){var D;return x.prototype=M,D=new x,x.prototype=null,D}}(),B={},E=B.lib={},u=E.Base={extend:function(M){var D=a(this);return M&&D.mixIn(M),(!D.hasOwnProperty("init")||this.init===D.init)&&(D.init=function(){D.$super.init.apply(this,arguments)}),D.init.prototype=D,D.$super=this,D},create:function(){var M=this.extend();return M.init.apply(M,arguments),M},init:function(){},mixIn:function(M){for(var D in M)M.hasOwnProperty(D)&&(this[D]=M[D]);M.hasOwnProperty("toString")&&(this.toString=M.toString)},clone:function(){return this.init.prototype.extend(this)}},C=E.WordArray=u.extend({init:function(M,D){M=this.words=M||[],this.sigBytes=null!=D?D:4*M.length},toString:function(M){return(M||f).stringify(this)},concat:function(M){var D=this.words,y=M.words,b=this.sigBytes,N=M.sigBytes;if(this.clamp(),b%4)for(var Y=0;Y>>2]|=(y[Y>>>2]>>>24-Y%4*8&255)<<24-(b+Y)%4*8;else for(var P=0;P>>2]=y[P>>>2];return this.sigBytes+=N,this},clamp:function(){var M=this.words,D=this.sigBytes;M[D>>>2]&=4294967295<<32-D%4*8,M.length=r.ceil(D/4)},clone:function(){var M=u.clone.call(this);return M.words=this.words.slice(0),M},random:function(M){for(var D=[],y=0;y>>2]>>>24-N%4*8&255;b.push((Y>>>4).toString(16)),b.push((15&Y).toString(16))}return b.join("")},parse:function(M){for(var D=M.length,y=[],b=0;b>>3]|=parseInt(M.substr(b,2),16)<<24-b%8*4;return new C.init(y,D/2)}},g=e.Latin1={stringify:function(M){for(var D=M.words,y=M.sigBytes,b=[],N=0;N>>2]>>>24-N%4*8&255));return b.join("")},parse:function(M){for(var D=M.length,y=[],b=0;b>>2]|=(255&M.charCodeAt(b))<<24-b%4*8;return new C.init(y,D)}},w=e.Utf8={stringify:function(M){try{return decodeURIComponent(escape(g.stringify(M)))}catch(D){throw new Error("Malformed UTF-8 data")}},parse:function(M){return g.parse(unescape(encodeURIComponent(M)))}},Q=E.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new C.init,this._nDataBytes=0},_append:function(M){"string"==typeof M&&(M=w.parse(M)),this._data.concat(M),this._nDataBytes+=M.sigBytes},_process:function(M){var D,y=this._data,b=y.words,N=y.sigBytes,Y=this.blockSize,P=N/(4*Y),nA=(P=M?r.ceil(P):r.max((0|P)-this._minBufferSize,0))*Y,lA=r.min(4*nA,N);if(nA){for(var _=0;_>>2]>>>24-w%4*8&255)<<16|(C[w+1>>>2]>>>24-(w+1)%4*8&255)<<8|C[w+2>>>2]>>>24-(w+2)%4*8&255,M=0;M<4&&w+.75*M>>6*(3-M)&63));var D=f.charAt(64);if(D)for(;g.length%4;)g.push(D);return g.join("")},parse:function(u){var C=u.length,e=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var g=0;g>>6-g%4*2;e[f>>>2]|=(w|Q)<<24-f%4*8,f++}return l.create(e,f)}(u,C,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},c.enc.Base64;var l}(n(757))},7590:function(S,I,n){"use strict";n(9600),S.exports=function(c){return l=c.lib.WordArray,c.enc.Base64url={stringify:function(u,C){void 0===C&&(C=!0);var e=u.words,f=u.sigBytes,g=C?this._safe_map:this._map;u.clamp();for(var w=[],Q=0;Q>>2]>>>24-Q%4*8&255)<<16|(e[Q+1>>>2]>>>24-(Q+1)%4*8&255)<<8|e[Q+2>>>2]>>>24-(Q+2)%4*8&255,D=0;D<4&&Q+.75*D>>6*(3-D)&63));var y=g.charAt(64);if(y)for(;w.length%4;)w.push(y);return w.join("")},parse:function(u,C){void 0===C&&(C=!0);var e=u.length,f=C?this._safe_map:this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var w=0;w>>6-g%4*2;e[f>>>2]|=(w|Q)<<24-f%4*8,f++}return l.create(e,f)}(u,e,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},c.enc.Base64url;var l}(n(757))},4978:function(S,I,n){"use strict";n(9600),S.exports=function(c){return function(){var l=c.lib.WordArray,h=c.enc;function B(E){return E<<8&4278255360|E>>>8&16711935}h.Utf16=h.Utf16BE={stringify:function(u){for(var C=u.words,e=u.sigBytes,f=[],g=0;g>>2]>>>16-g%4*8&65535));return f.join("")},parse:function(u){for(var C=u.length,e=[],f=0;f>>1]|=u.charCodeAt(f)<<16-f%2*16;return l.create(e,2*C)}},h.Utf16LE={stringify:function(u){for(var C=u.words,e=u.sigBytes,f=[],g=0;g>>2]>>>16-g%4*8&65535);f.push(String.fromCharCode(w))}return f.join("")},parse:function(u){for(var C=u.length,e=[],f=0;f>>1]|=B(u.charCodeAt(f)<<16-f%2*16);return l.create(e,2*C)}}}(),c.enc.Utf16}(n(757))},3839:function(S,I,n){"use strict";n(2222),S.exports=function(c){return h=(o=(r=c).lib).WordArray,E=(a=r.algo).EvpKDF=(l=o.Base).extend({cfg:l.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(C){this.cfg=this.cfg.extend(C)},compute:function(C,e){for(var f,g=this.cfg,w=g.hasher.create(),Q=h.create(),m=Q.words,T=g.keySize,x=g.iterations;m.lengthg&&(e=C.finalize(e)),e.clamp();for(var w=this._oKey=e.clone(),Q=this._iKey=e.clone(),m=w.words,T=Q.words,x=0;x>>2]|=B[C]<<24-C%4*8;h.call(this,u,E)}else h.apply(this,arguments)};a.prototype=l}}(),c.lib.WordArray},S.exports=r(n(757))},3440:function(S,I,n){"use strict";S.exports=function(c){return function(r){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,B=o.algo,E=[];!function(){for(var w=0;w<64;w++)E[w]=4294967296*r.abs(r.sin(w+1))|0}();var u=B.MD5=a.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(Q,m){for(var T=0;T<16;T++){var x=m+T,M=Q[x];Q[x]=16711935&(M<<8|M>>>24)|4278255360&(M<<24|M>>>8)}var D=this._hash.words,y=Q[m+0],b=Q[m+1],N=Q[m+2],Y=Q[m+3],R=Q[m+4],P=Q[m+5],nA=Q[m+6],lA=Q[m+7],_=Q[m+8],uA=Q[m+9],pA=Q[m+10],cA=Q[m+11],gA=Q[m+12],BA=Q[m+13],yA=Q[m+14],FA=Q[m+15],$=D[0],MA=D[1],fA=D[2],dA=D[3];$=C($,MA,fA,dA,y,7,E[0]),dA=C(dA,$,MA,fA,b,12,E[1]),fA=C(fA,dA,$,MA,N,17,E[2]),MA=C(MA,fA,dA,$,Y,22,E[3]),$=C($,MA,fA,dA,R,7,E[4]),dA=C(dA,$,MA,fA,P,12,E[5]),fA=C(fA,dA,$,MA,nA,17,E[6]),MA=C(MA,fA,dA,$,lA,22,E[7]),$=C($,MA,fA,dA,_,7,E[8]),dA=C(dA,$,MA,fA,uA,12,E[9]),fA=C(fA,dA,$,MA,pA,17,E[10]),MA=C(MA,fA,dA,$,cA,22,E[11]),$=C($,MA,fA,dA,gA,7,E[12]),dA=C(dA,$,MA,fA,BA,12,E[13]),fA=C(fA,dA,$,MA,yA,17,E[14]),$=e($,MA=C(MA,fA,dA,$,FA,22,E[15]),fA,dA,b,5,E[16]),dA=e(dA,$,MA,fA,nA,9,E[17]),fA=e(fA,dA,$,MA,cA,14,E[18]),MA=e(MA,fA,dA,$,y,20,E[19]),$=e($,MA,fA,dA,P,5,E[20]),dA=e(dA,$,MA,fA,pA,9,E[21]),fA=e(fA,dA,$,MA,FA,14,E[22]),MA=e(MA,fA,dA,$,R,20,E[23]),$=e($,MA,fA,dA,uA,5,E[24]),dA=e(dA,$,MA,fA,yA,9,E[25]),fA=e(fA,dA,$,MA,Y,14,E[26]),MA=e(MA,fA,dA,$,_,20,E[27]),$=e($,MA,fA,dA,BA,5,E[28]),dA=e(dA,$,MA,fA,N,9,E[29]),fA=e(fA,dA,$,MA,lA,14,E[30]),$=f($,MA=e(MA,fA,dA,$,gA,20,E[31]),fA,dA,P,4,E[32]),dA=f(dA,$,MA,fA,_,11,E[33]),fA=f(fA,dA,$,MA,cA,16,E[34]),MA=f(MA,fA,dA,$,yA,23,E[35]),$=f($,MA,fA,dA,b,4,E[36]),dA=f(dA,$,MA,fA,R,11,E[37]),fA=f(fA,dA,$,MA,lA,16,E[38]),MA=f(MA,fA,dA,$,pA,23,E[39]),$=f($,MA,fA,dA,BA,4,E[40]),dA=f(dA,$,MA,fA,y,11,E[41]),fA=f(fA,dA,$,MA,Y,16,E[42]),MA=f(MA,fA,dA,$,nA,23,E[43]),$=f($,MA,fA,dA,uA,4,E[44]),dA=f(dA,$,MA,fA,gA,11,E[45]),fA=f(fA,dA,$,MA,FA,16,E[46]),$=g($,MA=f(MA,fA,dA,$,N,23,E[47]),fA,dA,y,6,E[48]),dA=g(dA,$,MA,fA,lA,10,E[49]),fA=g(fA,dA,$,MA,yA,15,E[50]),MA=g(MA,fA,dA,$,P,21,E[51]),$=g($,MA,fA,dA,gA,6,E[52]),dA=g(dA,$,MA,fA,Y,10,E[53]),fA=g(fA,dA,$,MA,pA,15,E[54]),MA=g(MA,fA,dA,$,b,21,E[55]),$=g($,MA,fA,dA,_,6,E[56]),dA=g(dA,$,MA,fA,FA,10,E[57]),fA=g(fA,dA,$,MA,nA,15,E[58]),MA=g(MA,fA,dA,$,BA,21,E[59]),$=g($,MA,fA,dA,R,6,E[60]),dA=g(dA,$,MA,fA,cA,10,E[61]),fA=g(fA,dA,$,MA,N,15,E[62]),MA=g(MA,fA,dA,$,uA,21,E[63]),D[0]=D[0]+$|0,D[1]=D[1]+MA|0,D[2]=D[2]+fA|0,D[3]=D[3]+dA|0},_doFinalize:function(){var Q=this._data,m=Q.words,T=8*this._nDataBytes,x=8*Q.sigBytes;m[x>>>5]|=128<<24-x%32;var M=r.floor(T/4294967296),D=T;m[15+(x+64>>>9<<4)]=16711935&(M<<8|M>>>24)|4278255360&(M<<24|M>>>8),m[14+(x+64>>>9<<4)]=16711935&(D<<8|D>>>24)|4278255360&(D<<24|D>>>8),Q.sigBytes=4*(m.length+1),this._process();for(var y=this._hash,b=y.words,N=0;N<4;N++){var Y=b[N];b[N]=16711935&(Y<<8|Y>>>24)|4278255360&(Y<<24|Y>>>8)}return y},clone:function(){var Q=a.clone.call(this);return Q._hash=this._hash.clone(),Q}});function C(w,Q,m,T,x,M,D){var y=w+(Q&m|~Q&T)+x+D;return(y<>>32-M)+Q}function e(w,Q,m,T,x,M,D){var y=w+(Q&T|m&~T)+x+D;return(y<>>32-M)+Q}function f(w,Q,m,T,x,M,D){var y=w+(Q^m^T)+x+D;return(y<>>32-M)+Q}function g(w,Q,m,T,x,M,D){var y=w+(m^(Q|~T))+x+D;return(y<>>32-M)+Q}o.MD5=a._createHelper(u),o.HmacMD5=a._createHmacHelper(u)}(Math),c.MD5}(n(757))},702:function(S,I,n){"use strict";n(7042),S.exports=function(c){return c.mode.CFB=function(){var r=c.lib.BlockCipherMode.extend();function o(l,h,a,B){var E,u=this._iv;u?(E=u.slice(0),this._iv=void 0):E=this._prevBlock,B.encryptBlock(E,0);for(var C=0;C>24&255)){var B=a>>16&255,E=a>>8&255,u=255&a;255===B?(B=0,255===E?(E=0,255===u?u=0:++u):++E):++B,a=0,a+=B<<16,a+=E<<8,a+=u}else a+=16777216;return a}var h=r.Encryptor=r.extend({processBlock:function(B,E){var u=this._cipher,C=u.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0),function l(a){return 0===(a[0]=o(a[0]))&&(a[1]=o(a[1])),a}(f);var g=f.slice(0);u.encryptBlock(g,0);for(var w=0;w>>2]|=B<<24-E%4*8,o.sigBytes+=B},unpad:function(o){o.sigBytes-=255&o.words[o.sigBytes-1>>>2]}},c.pad.Ansix923}(n(757),n(1582))},4431:function(S,I,n){"use strict";n(2222),S.exports=function(c){return c.pad.Iso10126={pad:function(o,l){var h=4*l,a=h-o.sigBytes%h;o.concat(c.lib.WordArray.random(a-1)).concat(c.lib.WordArray.create([a<<24],1))},unpad:function(o){o.sigBytes-=255&o.words[o.sigBytes-1>>>2]}},c.pad.Iso10126}(n(757),n(1582))},8800:function(S,I,n){"use strict";n(2222),S.exports=function(c){return c.pad.Iso97971={pad:function(o,l){o.concat(c.lib.WordArray.create([2147483648],1)),c.pad.ZeroPadding.pad(o,l)},unpad:function(o){c.pad.ZeroPadding.unpad(o),o.sigBytes--}},c.pad.Iso97971}(n(757),n(1582))},649:function(S,I,n){"use strict";S.exports=function(c){return c.pad.NoPadding={pad:function(){},unpad:function(){}},c.pad.NoPadding}(n(757),n(1582))},3992:function(S,I,n){"use strict";S.exports=function(c){return c.pad.ZeroPadding={pad:function(o,l){var h=4*l;o.clamp(),o.sigBytes+=h-(o.sigBytes%h||h)},unpad:function(o){var l=o.words,h=o.sigBytes-1;for(h=o.sigBytes-1;h>=0;h--)if(l[h>>>2]>>>24-h%4*8&255){o.sigBytes=h+1;break}}},c.pad.ZeroPadding}(n(757),n(1582))},3486:function(S,I,n){"use strict";n(2222),S.exports=function(c){return h=(o=(r=c).lib).WordArray,E=(a=r.algo).HMAC,u=a.PBKDF2=(l=o.Base).extend({cfg:l.extend({keySize:4,hasher:a.SHA1,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,f){for(var g=this.cfg,w=E.create(g.hasher,e),Q=h.create(),m=h.create([1]),T=Q.words,x=m.words,M=g.keySize,D=g.iterations;T.length>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],Q=this._C=[f[2]<<16|f[2]>>>16,4294901760&f[0]|65535&f[1],f[3]<<16|f[3]>>>16,4294901760&f[1]|65535&f[2],f[0]<<16|f[0]>>>16,4294901760&f[2]|65535&f[3],f[1]<<16|f[1]>>>16,4294901760&f[3]|65535&f[0]];this._b=0;for(var m=0;m<4;m++)C.call(this);for(m=0;m<8;m++)Q[m]^=w[m+4&7];if(g){var T=g.words,x=T[0],M=T[1],D=16711935&(x<<8|x>>>24)|4278255360&(x<<24|x>>>8),y=16711935&(M<<8|M>>>24)|4278255360&(M<<24|M>>>8),b=D>>>16|4294901760&y,N=y<<16|65535&D;for(Q[0]^=D,Q[1]^=b,Q[2]^=y,Q[3]^=N,Q[4]^=D,Q[5]^=b,Q[6]^=y,Q[7]^=N,m=0;m<4;m++)C.call(this)}},_doProcessBlock:function(f,g){var w=this._X;C.call(this),a[0]=w[0]^w[5]>>>16^w[3]<<16,a[1]=w[2]^w[7]>>>16^w[5]<<16,a[2]=w[4]^w[1]>>>16^w[7]<<16,a[3]=w[6]^w[3]>>>16^w[1]<<16;for(var Q=0;Q<4;Q++)a[Q]=16711935&(a[Q]<<8|a[Q]>>>24)|4278255360&(a[Q]<<24|a[Q]>>>8),f[g+Q]^=a[Q]},blockSize:4,ivSize:2});function C(){for(var e=this._X,f=this._C,g=0;g<8;g++)B[g]=f[g];for(f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0>>0?1:0)|0,this._b=f[7]>>>0>>0?1:0,g=0;g<8;g++){var w=e[g]+f[g],Q=65535&w,m=w>>>16;E[g]=((Q*Q>>>17)+Q*m>>>15)+m*m^((4294901760&w)*w|0)+((65535&w)*w|0)}e[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,e[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,e[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,e[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,e[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,e[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,e[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,e[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}r.RabbitLegacy=l._createHelper(u)}(),c.RabbitLegacy}(n(757),n(7508),n(3440),n(3839),n(1582))},5323:function(S,I,n){"use strict";S.exports=function(c){return function(){var r=c,l=r.lib.StreamCipher,a=[],B=[],E=[],u=r.algo.Rabbit=l.extend({_doReset:function(){for(var f=this._key.words,g=this.cfg.iv,w=0;w<4;w++)f[w]=16711935&(f[w]<<8|f[w]>>>24)|4278255360&(f[w]<<24|f[w]>>>8);var Q=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],m=this._C=[f[2]<<16|f[2]>>>16,4294901760&f[0]|65535&f[1],f[3]<<16|f[3]>>>16,4294901760&f[1]|65535&f[2],f[0]<<16|f[0]>>>16,4294901760&f[2]|65535&f[3],f[1]<<16|f[1]>>>16,4294901760&f[3]|65535&f[0]];for(this._b=0,w=0;w<4;w++)C.call(this);for(w=0;w<8;w++)m[w]^=Q[w+4&7];if(g){var T=g.words,x=T[0],M=T[1],D=16711935&(x<<8|x>>>24)|4278255360&(x<<24|x>>>8),y=16711935&(M<<8|M>>>24)|4278255360&(M<<24|M>>>8),b=D>>>16|4294901760&y,N=y<<16|65535&D;for(m[0]^=D,m[1]^=b,m[2]^=y,m[3]^=N,m[4]^=D,m[5]^=b,m[6]^=y,m[7]^=N,w=0;w<4;w++)C.call(this)}},_doProcessBlock:function(f,g){var w=this._X;C.call(this),a[0]=w[0]^w[5]>>>16^w[3]<<16,a[1]=w[2]^w[7]>>>16^w[5]<<16,a[2]=w[4]^w[1]>>>16^w[7]<<16,a[3]=w[6]^w[3]>>>16^w[1]<<16;for(var Q=0;Q<4;Q++)a[Q]=16711935&(a[Q]<<8|a[Q]>>>24)|4278255360&(a[Q]<<24|a[Q]>>>8),f[g+Q]^=a[Q]},blockSize:4,ivSize:2});function C(){for(var e=this._X,f=this._C,g=0;g<8;g++)B[g]=f[g];for(f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0>>0?1:0)|0,this._b=f[7]>>>0>>0?1:0,g=0;g<8;g++){var w=e[g]+f[g],Q=65535&w,m=w>>>16;E[g]=((Q*Q>>>17)+Q*m>>>15)+m*m^((4294901760&w)*w|0)+((65535&w)*w|0)}e[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,e[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,e[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,e[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,e[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,e[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,e[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,e[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}r.Rabbit=l._createHelper(u)}(),c.Rabbit}(n(757),n(7508),n(3440),n(3839),n(1582))},4640:function(S,I,n){"use strict";n(1539),n(8674),S.exports=function(c){return function(){var r=c,l=r.lib.StreamCipher,h=r.algo,a=h.RC4=l.extend({_doReset:function(){for(var C=this._key,e=C.words,f=C.sigBytes,g=this._S=[],w=0;w<256;w++)g[w]=w;w=0;for(var Q=0;w<256;w++){var m=w%f,x=g[w];g[w]=g[Q=(Q+g[w]+(e[m>>>2]>>>24-m%4*8&255))%256],g[Q]=x}this._i=this._j=0},_doProcessBlock:function(C,e){C[e]^=B.call(this)},keySize:8,ivSize:0});function B(){for(var u=this._S,C=this._i,e=this._j,f=0,g=0;g<4;g++){var w=u[C=(C+1)%256];u[C]=u[e=(e+u[C])%256],u[e]=w,f|=u[(u[C]+u[e])%256]<<24-8*g}return this._i=C,this._j=e,f}r.RC4=l._createHelper(a);var E=h.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var C=this.cfg.drop;C>0;C--)B.call(this)}});r.RC4Drop=l._createHelper(E)}(),c.RC4}(n(757),n(7508),n(3440),n(3839),n(1582))},8714:function(S,I,n){"use strict";S.exports=function(c){return function(r){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,B=o.algo,E=h.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=h.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),C=h.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),e=h.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=h.create([0,1518500249,1859775393,2400959708,2840853838]),g=h.create([1352829926,1548603684,1836072691,2053994217,0]),w=B.RIPEMD160=a.extend({_doReset:function(){this._hash=h.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(b,N){for(var Y=0;Y<16;Y++){var R=N+Y,P=b[R];b[R]=16711935&(P<<8|P>>>24)|4278255360&(P<<24|P>>>8)}var BA,yA,FA,$,MA,fA,dA,SA,zA,XA,q,nA=this._hash.words,lA=f.words,_=g.words,uA=E.words,pA=u.words,cA=C.words,gA=e.words;for(fA=BA=nA[0],dA=yA=nA[1],SA=FA=nA[2],zA=$=nA[3],XA=MA=nA[4],Y=0;Y<80;Y+=1)q=BA+b[N+uA[Y]]|0,q+=Y<16?Q(yA,FA,$)+lA[0]:Y<32?m(yA,FA,$)+lA[1]:Y<48?T(yA,FA,$)+lA[2]:Y<64?x(yA,FA,$)+lA[3]:M(yA,FA,$)+lA[4],q=(q=D(q|=0,cA[Y]))+MA|0,BA=MA,MA=$,$=D(FA,10),FA=yA,yA=q,q=fA+b[N+pA[Y]]|0,q+=Y<16?M(dA,SA,zA)+_[0]:Y<32?x(dA,SA,zA)+_[1]:Y<48?T(dA,SA,zA)+_[2]:Y<64?m(dA,SA,zA)+_[3]:Q(dA,SA,zA)+_[4],q=(q=D(q|=0,gA[Y]))+XA|0,fA=XA,XA=zA,zA=D(SA,10),SA=dA,dA=q;q=nA[1]+FA+zA|0,nA[1]=nA[2]+$+XA|0,nA[2]=nA[3]+MA+fA|0,nA[3]=nA[4]+BA+dA|0,nA[4]=nA[0]+yA+SA|0,nA[0]=q},_doFinalize:function(){var b=this._data,N=b.words,Y=8*this._nDataBytes,R=8*b.sigBytes;N[R>>>5]|=128<<24-R%32,N[14+(R+64>>>9<<4)]=16711935&(Y<<8|Y>>>24)|4278255360&(Y<<24|Y>>>8),b.sigBytes=4*(N.length+1),this._process();for(var P=this._hash,nA=P.words,lA=0;lA<5;lA++){var _=nA[lA];nA[lA]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8)}return P},clone:function(){var b=a.clone.call(this);return b._hash=this._hash.clone(),b}});function Q(y,b,N){return y^b^N}function m(y,b,N){return y&b|~y&N}function T(y,b,N){return(y|~b)^N}function x(y,b,N){return y&N|b&~N}function M(y,b,N){return y^(b|~N)}function D(y,b){return y<>>32-b}o.RIPEMD160=a._createHelper(w),o.HmacRIPEMD160=a._createHmacHelper(w)}(Math),c.RIPEMD160}(n(757))},9865:function(S,I,n){"use strict";S.exports=function(c){return l=(o=(r=c).lib).WordArray,B=[],E=r.algo.SHA1=(h=o.Hasher).extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(C,e){for(var f=this._hash.words,g=f[0],w=f[1],Q=f[2],m=f[3],T=f[4],x=0;x<80;x++){if(x<16)B[x]=0|C[e+x];else{var M=B[x-3]^B[x-8]^B[x-14]^B[x-16];B[x]=M<<1|M>>>31}var D=(g<<5|g>>>27)+T+B[x];D+=x<20?1518500249+(w&Q|~w&m):x<40?1859775393+(w^Q^m):x<60?(w&Q|w&m|Q&m)-1894007588:(w^Q^m)-899497514,T=m,m=Q,Q=w<<30|w>>>2,w=g,g=D}f[0]=f[0]+g|0,f[1]=f[1]+w|0,f[2]=f[2]+Q|0,f[3]=f[3]+m|0,f[4]=f[4]+T|0},_doFinalize:function(){var C=this._data,e=C.words,f=8*this._nDataBytes,g=8*C.sigBytes;return e[g>>>5]|=128<<24-g%32,e[14+(g+64>>>9<<4)]=Math.floor(f/4294967296),e[15+(g+64>>>9<<4)]=f,C.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var C=h.clone.call(this);return C._hash=this._hash.clone(),C}}),r.SHA1=h._createHelper(E),r.HmacSHA1=h._createHmacHelper(E),c.SHA1;var r,o,l,h,B,E}(n(757))},6876:function(S,I,n){"use strict";S.exports=function(c){return l=(r=c).lib.WordArray,B=(h=r.algo).SHA224=(a=h.SHA256).extend({_doReset:function(){this._hash=new l.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=a._doFinalize.call(this);return u.sigBytes-=4,u}}),r.SHA224=a._createHelper(B),r.HmacSHA224=a._createHmacHelper(B),c.SHA224;var r,l,h,a,B}(n(757),n(8921))},8921:function(S,I,n){"use strict";n(7042),S.exports=function(c){return function(r){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,B=o.algo,E=[],u=[];!function(){function f(m){for(var T=r.sqrt(m),x=2;x<=T;x++)if(!(m%x))return!1;return!0}function g(m){return 4294967296*(m-(0|m))|0}for(var w=2,Q=0;Q<64;)f(w)&&(Q<8&&(E[Q]=g(r.pow(w,.5))),u[Q]=g(r.pow(w,.3333333333333333)),Q++),w++}();var C=[],e=B.SHA256=a.extend({_doReset:function(){this._hash=new h.init(E.slice(0))},_doProcessBlock:function(g,w){for(var Q=this._hash.words,m=Q[0],T=Q[1],x=Q[2],M=Q[3],D=Q[4],y=Q[5],b=Q[6],N=Q[7],Y=0;Y<64;Y++){if(Y<16)C[Y]=0|g[w+Y];else{var R=C[Y-15],nA=C[Y-2];C[Y]=((R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3)+C[Y-7]+((nA<<15|nA>>>17)^(nA<<13|nA>>>19)^nA>>>10)+C[Y-16]}var uA=m&T^m&x^T&x,gA=N+((D<<26|D>>>6)^(D<<21|D>>>11)^(D<<7|D>>>25))+(D&y^~D&b)+u[Y]+C[Y];N=b,b=y,y=D,D=M+gA|0,M=x,x=T,T=m,m=gA+(((m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22))+uA)|0}Q[0]=Q[0]+m|0,Q[1]=Q[1]+T|0,Q[2]=Q[2]+x|0,Q[3]=Q[3]+M|0,Q[4]=Q[4]+D|0,Q[5]=Q[5]+y|0,Q[6]=Q[6]+b|0,Q[7]=Q[7]+N|0},_doFinalize:function(){var g=this._data,w=g.words,Q=8*this._nDataBytes,m=8*g.sigBytes;return w[m>>>5]|=128<<24-m%32,w[14+(m+64>>>9<<4)]=r.floor(Q/4294967296),w[15+(m+64>>>9<<4)]=Q,g.sigBytes=4*w.length,this._process(),this._hash},clone:function(){var g=a.clone.call(this);return g._hash=this._hash.clone(),g}});o.SHA256=a._createHelper(e),o.HmacSHA256=a._createHmacHelper(e)}(Math),c.SHA256}(n(757))},8342:function(S,I,n){"use strict";n(7042),S.exports=function(c){return function(r){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,E=o.x64.Word,u=o.algo,C=[],e=[],f=[];!function(){for(var Q=1,m=0,T=0;T<24;T++){C[Q+5*m]=(T+1)*(T+2)/2%64;var M=(2*Q+3*m)%5;Q=m%5,m=M}for(Q=0;Q<5;Q++)for(m=0;m<5;m++)e[Q+5*m]=m+(2*Q+3*m)%5*5;for(var D=1,y=0;y<24;y++){for(var b=0,N=0,Y=0;Y<7;Y++){if(1&D){var R=(1<>>24)|4278255360&(y<<24|y>>>8),(N=x[D]).high^=b=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8),N.low^=y}for(var Y=0;Y<24;Y++){for(var R=0;R<5;R++){for(var P=0,nA=0,lA=0;lA<5;lA++)P^=(N=x[R+5*lA]).high,nA^=N.low;var _=g[R];_.high=P,_.low=nA}for(R=0;R<5;R++){var uA=g[(R+4)%5],pA=g[(R+1)%5],cA=pA.high,gA=pA.low;for(P=uA.high^(cA<<1|gA>>>31),nA=uA.low^(gA<<1|cA>>>31),lA=0;lA<5;lA++)(N=x[R+5*lA]).high^=P,N.low^=nA}for(var BA=1;BA<25;BA++){var yA=(N=x[BA]).high,FA=N.low,$=C[BA];$<32?(P=yA<<$|FA>>>32-$,nA=FA<<$|yA>>>32-$):(P=FA<<$-32|yA>>>64-$,nA=yA<<$-32|FA>>>64-$);var MA=g[e[BA]];MA.high=P,MA.low=nA}var fA=g[0],dA=x[0];for(fA.high=dA.high,fA.low=dA.low,R=0;R<5;R++)for(lA=0;lA<5;lA++){var SA=g[BA=R+5*lA],zA=g[(R+1)%5+5*lA],XA=g[(R+2)%5+5*lA];(N=x[BA]).high=SA.high^~zA.high&XA.high,N.low=SA.low^~zA.low&XA.low}var N,q=f[Y];(N=x[0]).high^=q.high,N.low^=q.low}},_doFinalize:function(){var m=this._data,T=m.words,M=8*m.sigBytes,D=32*this.blockSize;T[M>>>5]|=1<<24-M%32,T[(r.ceil((M+1)/D)*D>>>5)-1]|=128,m.sigBytes=4*T.length,this._process();for(var y=this._state,b=this.cfg.outputLength/8,N=b/8,Y=[],R=0;R>>24)|4278255360&(nA<<24|nA>>>8),Y.push(lA=16711935&(lA<<8|lA>>>24)|4278255360&(lA<<24|lA>>>8)),Y.push(nA)}return new h.init(Y,b)},clone:function(){for(var m=a.clone.call(this),T=m._state=this._state.slice(0),x=0;x<25;x++)T[x]=T[x].clone();return m}});o.SHA3=a._createHelper(w),o.HmacSHA3=a._createHmacHelper(w)}(Math),c.SHA3}(n(757),n(2601))},8122:function(S,I,n){"use strict";S.exports=function(c){return l=(o=(r=c).x64).Word,h=o.WordArray,E=(a=r.algo).SHA384=(B=a.SHA512).extend({_doReset:function(){this._hash=new h.init([new l.init(3418070365,3238371032),new l.init(1654270250,914150663),new l.init(2438529370,812702999),new l.init(355462360,4144912697),new l.init(1731405415,4290775857),new l.init(2394180231,1750603025),new l.init(3675008525,1694076839),new l.init(1203062813,3204075428)])},_doFinalize:function(){var C=B._doFinalize.call(this);return C.sigBytes-=16,C}}),r.SHA384=B._createHelper(E),r.HmacSHA384=B._createHmacHelper(E),c.SHA384;var r,o,l,h,a,B,E}(n(757),n(2601),n(7991))},7991:function(S,I,n){"use strict";var r;r=function(c){return function(){var r=c,l=r.lib.Hasher,h=r.x64,a=h.Word,B=h.WordArray,E=r.algo;function u(){return a.create.apply(a,arguments)}var C=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],e=[];!function(){for(var g=0;g<80;g++)e[g]=u()}();var f=E.SHA512=l.extend({_doReset:function(){this._hash=new B.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(w,Q){for(var m=this._hash.words,T=m[0],x=m[1],M=m[2],D=m[3],y=m[4],b=m[5],N=m[6],Y=m[7],R=T.high,P=T.low,nA=x.high,lA=x.low,_=M.high,uA=M.low,pA=D.high,cA=D.low,gA=y.high,BA=y.low,yA=b.high,FA=b.low,$=N.high,MA=N.low,fA=Y.high,dA=Y.low,SA=R,zA=P,XA=nA,q=lA,O=_,AA=uA,W=pA,EA=cA,vA=gA,iA=BA,wA=yA,GA=FA,et=$,st=MA,TA=fA,at=dA,It=0;It<80;It++){var mt,ht,JA=e[It];if(It<16)ht=JA.high=0|w[Q+2*It],mt=JA.low=0|w[Q+2*It+1];else{var WA=e[It-15],it=WA.high,xA=WA.low,Et=(xA>>>1|it<<31)^(xA>>>8|it<<24)^(xA>>>7|it<<25),Tt=e[It-2],OA=Tt.high,H=Tt.low,z=(H>>>19|OA<<13)^(H<<3|OA>>>29)^(H>>>6|OA<<26),QA=e[It-7],rA=e[It-16],Yt=rA.low;JA.high=ht=(ht=(ht=((it>>>1|xA<<31)^(it>>>8|xA<<24)^it>>>7)+QA.high+((mt=Et+QA.low)>>>0>>0?1:0))+((OA>>>19|H<<13)^(OA<<3|H>>>29)^OA>>>6)+((mt+=z)>>>0>>0?1:0))+rA.high+((mt+=Yt)>>>0>>0?1:0),JA.low=mt}var ae,j=vA&wA^~vA&et,qA=iA&GA^~iA&st,KA=SA&XA^SA&O^XA&O,lt=(zA>>>28|SA<<4)^(zA<<30|SA>>>2)^(zA<<25|SA>>>7),Lt=C[It],ze=Lt.low,ee=TA+((vA>>>14|iA<<18)^(vA>>>18|iA<<14)^(vA<<23|iA>>>9))+((ae=at+((iA>>>14|vA<<18)^(iA>>>18|vA<<14)^(iA<<23|vA>>>9)))>>>0>>0?1:0),Fe=lt+(zA&q^zA&AA^q&AA);TA=et,at=st,et=wA,st=GA,wA=vA,GA=iA,vA=W+(ee=(ee=(ee=ee+j+((ae+=qA)>>>0>>0?1:0))+Lt.high+((ae+=ze)>>>0>>0?1:0))+ht+((ae+=mt)>>>0>>0?1:0))+((iA=EA+ae|0)>>>0>>0?1:0)|0,W=O,EA=AA,O=XA,AA=q,XA=SA,q=zA,SA=ee+(((SA>>>28|zA<<4)^(SA<<30|zA>>>2)^(SA<<25|zA>>>7))+KA+(Fe>>>0>>0?1:0))+((zA=ae+Fe|0)>>>0>>0?1:0)|0}P=T.low=P+zA,T.high=R+SA+(P>>>0>>0?1:0),lA=x.low=lA+q,x.high=nA+XA+(lA>>>0>>0?1:0),uA=M.low=uA+AA,M.high=_+O+(uA>>>0>>0?1:0),cA=D.low=cA+EA,D.high=pA+W+(cA>>>0>>0?1:0),BA=y.low=BA+iA,y.high=gA+vA+(BA>>>0>>0?1:0),FA=b.low=FA+GA,b.high=yA+wA+(FA>>>0>>0?1:0),MA=N.low=MA+st,N.high=$+et+(MA>>>0>>0?1:0),dA=Y.low=dA+at,Y.high=fA+TA+(dA>>>0>>0?1:0)},_doFinalize:function(){var w=this._data,Q=w.words,m=8*this._nDataBytes,T=8*w.sigBytes;return Q[T>>>5]|=128<<24-T%32,Q[30+(T+128>>>10<<5)]=Math.floor(m/4294967296),Q[31+(T+128>>>10<<5)]=m,w.sigBytes=4*Q.length,this._process(),this._hash.toX32()},clone:function(){var w=l.clone.call(this);return w._hash=this._hash.clone(),w},blockSize:32});r.SHA512=l._createHelper(f),r.HmacSHA512=l._createHmacHelper(f)}(),c.SHA512},S.exports=r(n(757),n(2601))},8437:function(S,I,n){"use strict";n(7042),S.exports=function(c){return function(){var r=c,o=r.lib,l=o.WordArray,h=o.BlockCipher,a=r.algo,B=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],E=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],C=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],e=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=a.DES=h.extend({_doReset:function(){for(var x=this._key.words,M=[],D=0;D<56;D++){var y=B[D]-1;M[D]=x[y>>>5]>>>31-y%32&1}for(var b=this._subKeys=[],N=0;N<16;N++){var Y=b[N]=[],R=u[N];for(D=0;D<24;D++)Y[D/6|0]|=M[(E[D]-1+R)%28]<<31-D%6,Y[4+(D/6|0)]|=M[28+(E[D+24]-1+R)%28]<<31-D%6;for(Y[0]=Y[0]<<1|Y[0]>>>31,D=1;D<7;D++)Y[D]=Y[D]>>>4*(D-1)+3;Y[7]=Y[7]<<5|Y[7]>>>27}var P=this._invSubKeys=[];for(D=0;D<16;D++)P[D]=b[15-D]},encryptBlock:function(T,x){this._doCryptBlock(T,x,this._subKeys)},decryptBlock:function(T,x){this._doCryptBlock(T,x,this._invSubKeys)},_doCryptBlock:function(T,x,M){this._lBlock=T[x],this._rBlock=T[x+1],g.call(this,4,252645135),g.call(this,16,65535),w.call(this,2,858993459),w.call(this,8,16711935),g.call(this,1,1431655765);for(var D=0;D<16;D++){for(var y=M[D],b=this._lBlock,N=this._rBlock,Y=0,R=0;R<8;R++)Y|=C[R][((N^y[R])&e[R])>>>0];this._lBlock=N,this._rBlock=b^Y}var P=this._lBlock;this._lBlock=this._rBlock,this._rBlock=P,g.call(this,1,1431655765),w.call(this,8,16711935),w.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),T[x]=this._lBlock,T[x+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function g(m,T){var x=(this._lBlock>>>m^this._rBlock)&T;this._rBlock^=x,this._lBlock^=x<>>m^this._lBlock)&T;this._lBlock^=x,this._rBlock^=x<192.");var M=x.slice(0,2),D=x.length<4?x.slice(0,2):x.slice(2,4),y=x.length<6?x.slice(0,2):x.slice(4,6);this._des1=f.createEncryptor(l.create(M)),this._des2=f.createEncryptor(l.create(D)),this._des3=f.createEncryptor(l.create(y))},encryptBlock:function(T,x){this._des1.encryptBlock(T,x),this._des2.decryptBlock(T,x),this._des3.encryptBlock(T,x)},decryptBlock:function(T,x){this._des3.decryptBlock(T,x),this._des2.encryptBlock(T,x),this._des1.decryptBlock(T,x)},keySize:6,ivSize:2,blockSize:2});r.TripleDES=h._createHelper(Q)}(),c.TripleDES}(n(757),n(7508),n(3440),n(3839),n(1582))},2601:function(S,I,n){"use strict";n(7042),S.exports=function(c){return h=(l=c.lib).Base,a=l.WordArray,(B=c.x64={}).Word=h.extend({init:function(e,f){this.high=e,this.low=f}}),B.WordArray=h.extend({init:function(e,f){e=this.words=e||[],this.sigBytes=null!=f?f:8*e.length},toX32:function(){for(var e=this.words,f=e.length,g=[],w=0;w=B.length?{done:!0}:{done:!1,value:B[C++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(B,E){(null==E||E>B.length)&&(E=B.length);for(var u=0,C=new Array(E);u=Q)){y.next=13;break}return y.next=13,[Q,m,f.tags[T]];case 13:w=f.stateTable[1][M],Q=null;case 15:0!==w&&null==Q&&(Q=x),f.accepting[w]&&(m=x),0===w&&(w=1);case 18:x++,y.next=5;break;case 21:if(!(null!=Q&&null!=m&&m>=Q)){y.next=24;break}return y.next=24,[Q,m,f.tags[w]];case 24:case"end":return y.stop()}},g)}),e},E.apply=function(C,e){for(var g,f=c(this.match(C));!(g=f()).done;)for(var M,w=g.value,Q=w[0],m=w[1],x=c(w[2]);!(M=x()).done;){var D=M.value;"function"==typeof e[D]&&e[D](Q,m,C.slice(Q,m+1))}},B}()},8478:function(S,I,n){"use strict";var c=n(8823).Buffer;n(7042),n(6699);var r=n(3857),o=n(2635);S.exports=function(){function l(a){var B;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){var E=this.readUInt32(),u="";for(B=0;B<4;B++)u+=String.fromCharCode(this.data[this.pos++]);switch(u){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(E);break;case"IDAT":for(B=0;B0)for(B=0;Bthis.data.length)throw new Error("Incomplete or corrupt PNG file")}}l.decode=function(B,E){return r.readFile(B,function(u,C){return new l(C).decode(function(f){return E(f)})})},l.load=function(B){return new l(r.readFileSync(B))};var h=l.prototype;return h.read=function(B){for(var E=new Array(B),u=0;u=2147483648)throw new RangeError('The value "'+B+'" is invalid for option "size"');var C=o(B);return E&&0!==E.length?"string"==typeof u?C.fill(E,u):C.fill(E):C.fill(0),C}),!l.kStringMaxLength)try{l.kStringMaxLength=c.binding("buffer").kStringMaxLength}catch(B){}l.constants||(l.constants={MAX_LENGTH:l.kMaxLength},l.kStringMaxLength&&(l.constants.MAX_STRING_LENGTH=l.kStringMaxLength)),S.exports=l},3361:function(S,I,n){"use strict";function c(g,w){var Q=Object.keys(g);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(g);w&&(m=m.filter(function(T){return Object.getOwnPropertyDescriptor(g,T).enumerable})),Q.push.apply(Q,m)}return Q}function o(g,w,Q){return w in g?Object.defineProperty(g,w,{value:Q,enumerable:!0,configurable:!0,writable:!0}):g[w]=Q,g}function h(g,w){for(var Q=0;Q0?this.tail.next=m:this.head=m,this.tail=m,++this.length}},{key:"unshift",value:function(Q){var m={data:Q,next:this.head};0===this.length&&(this.tail=m),this.head=m,++this.length}},{key:"shift",value:function(){if(0!==this.length){var Q=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,Q}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Q){if(0===this.length)return"";for(var m=this.head,T=""+m.data;m=m.next;)T+=Q+m.data;return T}},{key:"concat",value:function(Q){if(0===this.length)return E.alloc(0);for(var m=E.allocUnsafe(Q>>>0),T=this.head,x=0;T;)f(T.data,m,x),x+=T.data.length,T=T.next;return m}},{key:"consume",value:function(Q,m){var T;return QM.length?M.length:Q;if(x+=D===M.length?M:M.slice(0,Q),0==(Q-=D)){D===M.length?(++T,this.head=m.next?m.next:this.tail=null):(this.head=m,m.data=M.slice(D));break}++T}return this.length-=T,x}},{key:"_getBuffer",value:function(Q){var m=E.allocUnsafe(Q),T=this.head,x=1;for(T.data.copy(m),Q-=T.data.length;T=T.next;){var M=T.data,D=Q>M.length?M.length:Q;if(M.copy(m,m.length-Q,0,D),0==(Q-=D)){D===M.length?(++x,this.head=T.next?T.next:this.tail=null):(this.head=T,T.data=M.slice(D));break}++x}return this.length-=x,m}},{key:e,value:function(Q,m){return C(this,function r(g){for(var w=1;wIA.length)&&(J=IA.length);for(var U=0,X=new Array(J);U=IA.length?{done:!0}:{done:!1,value:IA[X++]}},e:function(ft){throw ft},f:K}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var $A,hA=!0,mA=!1;return{s:function(){U=IA[Symbol.iterator]()},n:function(){var ft=U.next();return hA=ft.done,ft},e:function(ft){mA=!0,$A=ft},f:function(){try{!hA&&null!=U.return&&U.return()}finally{if(mA)throw $A}}}}var FA=function(){function IA(){f(this,IA)}return w(IA,[{key:"toString",value:function(){throw new Error("Must be implemented by subclasses")}}]),IA}(),$=function(){function IA(){var J=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,IA),this._items={},this.limits="boolean"!=typeof J.limits||J.limits}return w(IA,[{key:"add",value:function(U,X){return this._items[U]=X}},{key:"get",value:function(U){return this._items[U]}},{key:"toString",value:function(){var U=this,X=Object.keys(this._items).sort(function(dt,Dt){return U._compareKeys(dt,Dt)}),K=["<<"];if(this.limits&&X.length>1){var mA=X[X.length-1];K.push(" /Limits ".concat(zA.convert([this._dataForKey(X[0]),this._dataForKey(mA)])))}K.push(" /".concat(this._keysName()," ["));var nt,$A=yA(X);try{for($A.s();!(nt=$A.n()).done;){var ft=nt.value;K.push(" ".concat(zA.convert(this._dataForKey(ft))," ").concat(zA.convert(this._items[ft])))}}catch(dt){$A.e(dt)}finally{$A.f()}return K.push("]"),K.push(">>"),K.join("\n")}},{key:"_compareKeys",value:function(){throw new Error("Must be implemented by subclasses")}},{key:"_keysName",value:function(){throw new Error("Must be implemented by subclasses")}},{key:"_dataForKey",value:function(){throw new Error("Must be implemented by subclasses")}}]),IA}(),MA=function(J,U){return(Array(U+1).join("0")+J).slice(-U)},fA=/[\n\r\t\b\f()\\]/g,dA={"\n":"\\n","\r":"\\r","\t":"\\t","\b":"\\b","\f":"\\f","\\":"\\\\","(":"\\(",")":"\\)"},SA=function(J){var U=J.length;if(1&U)throw new Error("Buffer length must be even");for(var X=0,K=U-1;X1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof U)return"/".concat(U);if(U instanceof String){for(var K=U,hA=!1,mA=0,$A=K.length;mA<$A;mA++)if(K.charCodeAt(mA)>127){hA=!0;break}var nt;return nt=hA?SA(r.from("\ufeff".concat(K),"utf16le")):r.from(K.valueOf(),"ascii"),K=(K=X?X(nt).toString("binary"):nt.toString("binary")).replace(fA,function(Vt){return dA[Vt]}),"(".concat(K,")")}if(r.isBuffer(U))return"<".concat(U.toString("hex"),">");if(U instanceof FA||U instanceof $)return U.toString();if(U instanceof Date){var ft="D:".concat(MA(U.getUTCFullYear(),4))+MA(U.getUTCMonth()+1,2)+MA(U.getUTCDate(),2)+MA(U.getUTCHours(),2)+MA(U.getUTCMinutes(),2)+MA(U.getUTCSeconds(),2)+"Z";return X&&(ft=(ft=X(r.from(ft,"ascii")).toString("binary")).replace(fA,function(Vt){return dA[Vt]})),"(".concat(ft,")")}if(Array.isArray(U)){var dt=U.map(function(Vt){return IA.convert(Vt,X)}).join(" ");return"[".concat(dt,"]")}if("[object Object]"==={}.toString.call(U)){var Dt=["<<"];for(var Ft in U){var Nt=U[Ft];Dt.push("/".concat(Ft," ").concat(IA.convert(Nt,X)))}return Dt.push(">>"),Dt.join("\n")}return"number"==typeof U?IA.number(U):"".concat(U)}},{key:"number",value:function(U){if(U>-1e21&&U<1e21)return Math.round(1e6*U)/1e6;throw new Error("unsupported number: ".concat(U))}}]),IA}(),XA=function(IA){x(U,IA);var J=Y(U);function U(X,K){var hA,mA=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f(this,U),(hA=J.call(this)).document=X,hA.id=K,hA.data=mA,hA.gen=0,hA.compress=hA.document.compress&&!hA.data.Filter,hA.uncompressedLength=0,hA.buffer=[],hA}return w(U,[{key:"write",value:function(K){if(r.isBuffer(K)||(K=r.from(K+"\n","binary")),this.uncompressedLength+=K.length,null==this.data.Length&&(this.data.Length=0),this.buffer.push(K),this.data.Length+=K.length,this.compress)return this.data.Filter="FlateDecode"}},{key:"end",value:function(K){return K&&this.write(K),this.finalize()}},{key:"finalize",value:function(){this.offset=this.document._offset;var K=this.document._security?this.document._security.getEncryptFn(this.id,this.gen):null;this.buffer.length&&(this.buffer=r.concat(this.buffer),this.compress&&(this.buffer=l.default.deflateSync(this.buffer)),K&&(this.buffer=K(this.buffer)),this.data.Length=this.buffer.length),this.document._write("".concat(this.id," ").concat(this.gen," obj")),this.document._write(zA.convert(this.data,K)),this.buffer.length&&(this.document._write("stream"),this.document._write(this.buffer),this.buffer=[],this.document._write("\nendstream")),this.document._write("endobj"),this.document._refEnd(this)}},{key:"toString",value:function(){return"".concat(this.id," ").concat(this.gen," R")}}]),U}(FA),q={top:72,left:72,bottom:72,right:72},O={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},AA=function(){function IA(J){var U=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,IA),this.document=J,this.size=U.size||"letter",this.layout=U.layout||"portrait",this.margins="number"==typeof U.margin?{top:U.margin,left:U.margin,bottom:U.margin,right:U.margin}:U.margins||q;var X=Array.isArray(this.size)?this.size:O[this.size.toUpperCase()];this.width=X["portrait"===this.layout?0:1],this.height=X["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources}),this.markings=[]}return w(IA,[{key:"maxY",value:function(){return this.height-this.margins.bottom}},{key:"write",value:function(U){return this.content.write(U)}},{key:"end",value:function(){return this.dictionary.end(),this.resources.end(),this.content.end()}},{key:"fonts",get:function(){var U=this.resources.data;return null!=U.Font?U.Font:U.Font={}}},{key:"xobjects",get:function(){var U=this.resources.data;return null!=U.XObject?U.XObject:U.XObject={}}},{key:"ext_gstates",get:function(){var U=this.resources.data;return null!=U.ExtGState?U.ExtGState:U.ExtGState={}}},{key:"patterns",get:function(){var U=this.resources.data;return null!=U.Pattern?U.Pattern:U.Pattern={}}},{key:"colorSpaces",get:function(){var U=this.resources.data;return U.ColorSpace||(U.ColorSpace={})}},{key:"annotations",get:function(){var U=this.dictionary.data;return null!=U.Annots?U.Annots:U.Annots=[]}},{key:"structParentTreeKey",get:function(){var U=this.dictionary.data;return null!=U.StructParents?U.StructParents:U.StructParents=this.document.createStructParentTreeNextKey()}}]),IA}(),W=function(IA){x(U,IA);var J=Y(U);function U(){return f(this,U),J.apply(this,arguments)}return w(U,[{key:"_compareKeys",value:function(K,hA){return K.localeCompare(hA)}},{key:"_keysName",value:function(){return"Names"}},{key:"_dataForKey",value:function(K){return new String(K)}}]),U}($);function EA(IA,J){if(IA=J[hA]&&IA<=J[hA+1])return!0;IA>J[hA+1]?U=K+1:X=K-1}return!1}var vA=[545,545,564,591,686,687,751,767,848,863,880,883,886,889,891,893,895,899,907,907,909,909,930,930,975,975,1015,1023,1159,1159,1231,1231,1270,1271,1274,1279,1296,1328,1367,1368,1376,1376,1416,1416,1419,1424,1442,1442,1466,1466,1477,1487,1515,1519,1525,1547,1549,1562,1564,1566,1568,1568,1595,1599,1622,1631,1774,1775,1791,1791,1806,1806,1837,1839,1867,1919,1970,2304,2308,2308,2362,2363,2382,2383,2389,2391,2417,2432,2436,2436,2445,2446,2449,2450,2473,2473,2481,2481,2483,2485,2490,2491,2493,2493,2501,2502,2505,2506,2510,2518,2520,2523,2526,2526,2532,2533,2555,2561,2563,2564,2571,2574,2577,2578,2601,2601,2609,2609,2612,2612,2615,2615,2618,2619,2621,2621,2627,2630,2633,2634,2638,2648,2653,2653,2655,2661,2677,2688,2692,2692,2700,2700,2702,2702,2706,2706,2729,2729,2737,2737,2740,2740,2746,2747,2758,2758,2762,2762,2766,2767,2769,2783,2785,2789,2800,2816,2820,2820,2829,2830,2833,2834,2857,2857,2865,2865,2868,2869,2874,2875,2884,2886,2889,2890,2894,2901,2904,2907,2910,2910,2914,2917,2929,2945,2948,2948,2955,2957,2961,2961,2966,2968,2971,2971,2973,2973,2976,2978,2981,2983,2987,2989,2998,2998,3002,3005,3011,3013,3017,3017,3022,3030,3032,3046,3059,3072,3076,3076,3085,3085,3089,3089,3113,3113,3124,3124,3130,3133,3141,3141,3145,3145,3150,3156,3159,3167,3170,3173,3184,3201,3204,3204,3213,3213,3217,3217,3241,3241,3252,3252,3258,3261,3269,3269,3273,3273,3278,3284,3287,3293,3295,3295,3298,3301,3312,3329,3332,3332,3341,3341,3345,3345,3369,3369,3386,3389,3396,3397,3401,3401,3406,3414,3416,3423,3426,3429,3440,3457,3460,3460,3479,3481,3506,3506,3516,3516,3518,3519,3527,3529,3531,3534,3541,3541,3543,3543,3552,3569,3573,3584,3643,3646,3676,3712,3715,3715,3717,3718,3721,3721,3723,3724,3726,3731,3736,3736,3744,3744,3748,3748,3750,3750,3752,3753,3756,3756,3770,3770,3774,3775,3781,3781,3783,3783,3790,3791,3802,3803,3806,3839,3912,3912,3947,3952,3980,3983,3992,3992,4029,4029,4045,4046,4048,4095,4130,4130,4136,4136,4139,4139,4147,4149,4154,4159,4186,4255,4294,4303,4345,4346,4348,4351,4442,4446,4515,4519,4602,4607,4615,4615,4679,4679,4681,4681,4686,4687,4695,4695,4697,4697,4702,4703,4743,4743,4745,4745,4750,4751,4783,4783,4785,4785,4790,4791,4799,4799,4801,4801,4806,4807,4815,4815,4823,4823,4847,4847,4879,4879,4881,4881,4886,4887,4895,4895,4935,4935,4955,4960,4989,5023,5109,5120,5751,5759,5789,5791,5873,5887,5901,5901,5909,5919,5943,5951,5972,5983,5997,5997,6001,6001,6004,6015,6109,6111,6122,6143,6159,6159,6170,6175,6264,6271,6314,7679,7836,7839,7930,7935,7958,7959,7966,7967,8006,8007,8014,8015,8024,8024,8026,8026,8028,8028,8030,8030,8062,8063,8117,8117,8133,8133,8148,8149,8156,8156,8176,8177,8181,8181,8191,8191,8275,8278,8280,8286,8292,8297,8306,8307,8335,8351,8370,8399,8427,8447,8507,8508,8524,8530,8580,8591,9167,9215,9255,9279,9291,9311,9471,9471,9748,9749,9752,9752,9854,9855,9866,9984,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10079,10080,10133,10135,10160,10160,10175,10191,10220,10223,11008,11903,11930,11930,12020,12031,12246,12271,12284,12287,12352,12352,12439,12440,12544,12548,12589,12592,12687,12687,12728,12783,12829,12831,12868,12880,12924,12926,13004,13007,13055,13055,13175,13178,13278,13279,13311,13311,19894,19967,40870,40959,42125,42127,42183,44031,55204,55295,64046,64047,64107,64255,64263,64274,64280,64284,64311,64311,64317,64317,64319,64319,64322,64322,64325,64325,64434,64466,64832,64847,64912,64913,64968,64975,65021,65023,65040,65055,65060,65071,65095,65096,65107,65107,65127,65127,65132,65135,65141,65141,65277,65278,65280,65280,65471,65473,65480,65481,65488,65489,65496,65497,65501,65503,65511,65511,65519,65528,65536,66303,66335,66335,66340,66351,66379,66559,66598,66599,66638,118783,119030,119039,119079,119081,119262,119807,119893,119893,119965,119965,119968,119969,119971,119972,119975,119976,119981,119981,119994,119994,119996,119996,120001,120001,120004,120004,120070,120070,120075,120076,120085,120085,120093,120093,120122,120122,120127,120127,120133,120133,120135,120137,120145,120145,120484,120487,120778,120781,120832,131069,173783,194559,195102,196605,196608,262141,262144,327677,327680,393213,393216,458749,458752,524285,524288,589821,589824,655357,655360,720893,720896,786429,786432,851965,851968,917501,917504,917504,917506,917535,917632,983037],iA=function(J){return EA(J,vA)},wA=[173,173,847,847,6150,6150,6155,6155,6156,6156,6157,6157,8203,8203,8204,8204,8205,8205,8288,8288,65024,65024,65025,65025,65026,65026,65027,65027,65028,65028,65029,65029,65030,65030,65031,65031,65032,65032,65033,65033,65034,65034,65035,65035,65036,65036,65037,65037,65038,65038,65039,65039,65279,65279],et=[160,160,5760,5760,8192,8192,8193,8193,8194,8194,8195,8195,8196,8196,8197,8197,8198,8198,8199,8199,8200,8200,8201,8201,8202,8202,8203,8203,8239,8239,8287,8287,12288,12288],TA=[128,159,1757,1757,1807,1807,6158,6158,8204,8204,8205,8205,8232,8232,8233,8233,8288,8288,8289,8289,8290,8290,8291,8291,8298,8303,65279,65279,65529,65532,119155,119162],at=[64976,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1114110,1114111],It=[0,31,127,127,832,832,833,833,8206,8206,8207,8207,8234,8234,8235,8235,8236,8236,8237,8237,8238,8238,8298,8298,8299,8299,8300,8300,8301,8301,8302,8302,8303,8303,12272,12283,55296,57343,57344,63743,65529,65529,65530,65530,65531,65531,65532,65532,65533,65533,917505,917505,917536,917631,983040,1048573,1048576,1114109],mt=function(J){return EA(J,et)||EA(J,It)||EA(J,TA)||EA(J,at)},ht=[1470,1470,1472,1472,1475,1475,1488,1514,1520,1524,1563,1563,1567,1567,1569,1594,1600,1610,1645,1647,1649,1749,1757,1757,1765,1766,1786,1790,1792,1805,1808,1808,1810,1836,1920,1957,1969,1969,8207,8207,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65020,65136,65140,65142,65276],JA=function(J){return EA(J,ht)},WA=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,544,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,1013,1024,1154,1162,1230,1232,1269,1272,1273,1280,1295,1329,1366,1369,1375,1377,1415,1417,1417,2307,2307,2309,2361,2365,2368,2377,2380,2384,2384,2392,2401,2404,2416,2434,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2494,2496,2503,2504,2507,2508,2519,2519,2524,2525,2527,2529,2534,2545,2548,2554,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2622,2624,2649,2652,2654,2654,2662,2671,2674,2676,2691,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2752,2761,2761,2763,2764,2768,2768,2784,2784,2790,2799,2818,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2878,2880,2880,2887,2888,2891,2892,2903,2903,2908,2909,2911,2913,2918,2928,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3007,3009,3010,3014,3016,3018,3020,3031,3031,3047,3058,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3137,3140,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3262,3264,3268,3271,3272,3274,3275,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3392,3398,3400,3402,3404,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3535,3537,3544,3551,3570,3572,3585,3632,3634,3635,3648,3654,3663,3675,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3792,3801,3804,3805,3840,3863,3866,3892,3894,3894,3896,3896,3902,3911,3913,3946,3967,3967,3973,3973,3976,3979,4030,4037,4039,4044,4047,4047,4096,4129,4131,4135,4137,4138,4140,4140,4145,4145,4152,4152,4160,4183,4256,4293,4304,4344,4347,4347,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4961,4988,5024,5108,5121,5750,5761,5786,5792,5872,5888,5900,5902,5905,5920,5937,5941,5942,5952,5969,5984,5996,5998,6e3,6016,6070,6078,6085,6087,6088,6100,6106,6108,6108,6112,6121,6160,6169,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8206,8206,8305,8305,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8509,8511,8517,8521,8544,8579,9014,9082,9109,9109,9372,9449,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12588,12593,12686,12688,12727,12784,12828,12832,12867,12896,12923,12927,12976,12992,13003,13008,13054,13056,13174,13179,13277,13280,13310,13312,19893,19968,40869,40960,42124,44032,55203,55296,64045,64048,64106,64256,64262,64275,64279,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,66304,66334,66336,66339,66352,66378,66560,66597,66600,66637,118784,119029,119040,119078,119082,119142,119146,119154,119171,119172,119180,119209,119214,119261,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,12e4,120002,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120483,120488,120777,131072,173782,194560,195101,983040,1048573,1048576,1114109],it=function(J){return EA(J,WA)},xA=function(J){return EA(J,et)},Mt=function(J){return EA(J,wA)},Et=function(J){return J.codePointAt(0)},Tt=function(J){return J[0]},OA=function(J){return J[J.length-1]};function H(IA){for(var J=[],U=IA.length,X=0;X=55296&&K<=56319&&U>X+1){var hA=IA.charCodeAt(X+1);if(hA>=56320&&hA<=57343){J.push(1024*(K-55296)+hA-56320+65536),X+=1;continue}}J.push(K)}return J}function k(IA){var J=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof IA)throw new TypeError("Expected string.");if(0===IA.length)return"";var U=H(IA).map(function(Dt){return xA(Dt)?32:Dt}).filter(function(Dt){return!Mt(Dt)}),X=String.fromCodePoint.apply(null,U).normalize("NFKC"),K=H(X);if(K.some(mt))throw new Error("Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3");if(!0!==J.allowUnassigned&&K.some(iA))throw new Error("Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5");var $A=K.some(JA),nt=K.some(it);if($A&&nt)throw new Error("String must not contain RandALCat and LCat at the same time, see https://tools.ietf.org/html/rfc3454#section-6");var ft=JA(Et(Tt(X))),dt=JA(Et(OA(X)));if($A&&(!ft||!dt))throw new Error("Bidirectional RandALCat character must be the first and the last character of the string, see https://tools.ietf.org/html/rfc3454#section-6");return X}var z=function(){function IA(J){var U=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(f(this,IA),!U.ownerPassword&&!U.userPassword)throw new Error("None of owner password and user password is defined.");this.document=J,this._setupEncryption(U)}return w(IA,null,[{key:"generateFileID",value:function(){var U=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},X="".concat(U.CreationDate.getTime(),"\n");for(var K in U)!U.hasOwnProperty(K)||(X+="".concat(K,": ").concat(U[K].valueOf(),"\n"));return Xt(h.default.MD5(X))}},{key:"generateRandomWordArray",value:function(U){return h.default.lib.WordArray.random(U)}},{key:"create",value:function(U){var X=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return X.ownerPassword||X.userPassword?new IA(U,X):null}}]),w(IA,[{key:"_setupEncryption",value:function(U){switch(U.pdfVersion){case"1.4":case"1.5":this.version=2;break;case"1.6":case"1.7":this.version=4;break;case"1.7ext3":this.version=5;break;default:this.version=1}var X={Filter:"Standard"};switch(this.version){case 1:case 2:case 4:this._setupEncryptionV1V2V4(this.version,X,U);break;case 5:this._setupEncryptionV5(X,U)}this.dictionary=this.document.ref(X)}},{key:"_setupEncryptionV1V2V4",value:function(U,X,K){var hA,mA;switch(U){case 1:hA=2,this.keyBits=40,mA=function QA(){var IA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},J=-64;return IA.printing&&(J|=4),IA.modifying&&(J|=8),IA.copying&&(J|=16),IA.annotating&&(J|=32),J}(K.permissions);break;case 2:hA=3,this.keyBits=128,mA=CA(K.permissions);break;case 4:hA=4,this.keyBits=128,mA=CA(K.permissions)}var dt,$A=zt(K.userPassword),nt=K.ownerPassword?zt(K.ownerPassword):$A,ft=function gt(IA,J,U,X){for(var K=X,hA=IA>=3?51:1,mA=0;mA=3?20:1;for(var ft=0;ft=3?51:1,nt=0;nt<$A;nt++)(mA=h.default.MD5(mA)).sigBytes=J/8;return mA}(hA,this.keyBits,this.document._id,$A,ft,mA),dt=2===hA?function PA(IA){return h.default.RC4.encrypt(zt(),IA).ciphertext}(this.encryptionKey):function rA(IA,J){for(var U=J.clone(),X=h.default.MD5(zt().concat(h.default.lib.WordArray.create(IA))),K=0;K<20;K++){for(var hA=Math.ceil(U.sigBytes/4),mA=0;mA=2&&(X.Length=this.keyBits),4===U&&(X.CF={StdCF:{AuthEvent:"DocOpen",CFM:"AESV2",Length:this.keyBits/8}},X.StmF="StdCF",X.StrF="StdCF"),X.R=hA,X.O=Xt(ft),X.U=Xt(dt),X.P=mA}},{key:"_setupEncryptionV5",value:function(U,X){this.keyBits=256;var K=CA(X.permissions),hA=xt(X.userPassword),mA=X.ownerPassword?xt(X.ownerPassword):hA;this.encryptionKey=function jA(IA){return IA(32)}(IA.generateRandomWordArray);var $A=function j(IA,J){var U=J(8),X=J(8);return h.default.SHA256(IA.clone().concat(U)).concat(U).concat(X)}(hA,IA.generateRandomWordArray),ft=function qA(IA,J,U){var X=h.default.SHA256(IA.clone().concat(J)),K={mode:h.default.mode.CBC,padding:h.default.pad.NoPadding,iv:h.default.lib.WordArray.create(null,16)};return h.default.AES.encrypt(U,X,K).ciphertext}(hA,h.default.lib.WordArray.create($A.words.slice(10,12),8),this.encryptionKey),dt=function KA(IA,J,U){var X=U(8),K=U(8);return h.default.SHA256(IA.clone().concat(X).concat(J)).concat(X).concat(K)}(mA,$A,IA.generateRandomWordArray),Ft=function DA(IA,J,U,X){var K=h.default.SHA256(IA.clone().concat(J).concat(U)),hA={mode:h.default.mode.CBC,padding:h.default.pad.NoPadding,iv:h.default.lib.WordArray.create(null,16)};return h.default.AES.encrypt(X,K,hA).ciphertext}(mA,h.default.lib.WordArray.create(dt.words.slice(10,12),8),$A,this.encryptionKey),Nt=function lt(IA,J,U){var X=h.default.lib.WordArray.create([Lt(IA),4294967295,1415668834],12).concat(U(4));return h.default.AES.encrypt(X,J,{mode:h.default.mode.ECB,padding:h.default.pad.NoPadding}).ciphertext}(K,this.encryptionKey,IA.generateRandomWordArray);U.V=5,U.Length=this.keyBits,U.CF={StdCF:{AuthEvent:"DocOpen",CFM:"AESV3",Length:this.keyBits/8}},U.StmF="StdCF",U.StrF="StdCF",U.R=5,U.O=Xt(dt),U.OE=Xt(Ft),U.U=Xt($A),U.UE=Xt(ft),U.P=K,U.Perms=Xt(Nt)}},{key:"getEncryptFn",value:function(U,X){var K,mA;if(this.version<5&&(K=this.encryptionKey.clone().concat(h.default.lib.WordArray.create([(255&U)<<24|(65280&U)<<8|U>>8&65280|255&X,(65280&X)<<16],5))),1===this.version||2===this.version){var hA=h.default.MD5(K);return hA.sigBytes=Math.min(16,this.keyBits/8+5),function(ft){return Xt(h.default.RC4.encrypt(h.default.lib.WordArray.create(ft),hA).ciphertext)}}mA=4===this.version?h.default.MD5(K.concat(h.default.lib.WordArray.create([1933667412],4))):this.encryptionKey;var $A=IA.generateRandomWordArray(16),nt={mode:h.default.mode.CBC,padding:h.default.pad.Pkcs7,iv:$A};return function(ft){return Xt($A.clone().concat(h.default.AES.encrypt(h.default.lib.WordArray.create(ft),mA,nt).ciphertext))}}},{key:"end",value:function(){this.dictionary.end()}}]),IA}();function CA(){var IA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},J=-3904;return"lowResolution"===IA.printing&&(J|=4),"highResolution"===IA.printing&&(J|=2052),IA.modifying&&(J|=8),IA.copying&&(J|=16),IA.annotating&&(J|=32),IA.fillingForms&&(J|=256),IA.contentAccessibility&&(J|=512),IA.documentAssembly&&(J|=1024),J}function zt(){for(var IA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",J=r.alloc(32),U=IA.length,X=0;X255)throw new Error("Password contains one or more invalid characters.");J[X]=K,X++}for(;X<32;)J[X]=ze[X-U],X++;return h.default.lib.WordArray.create(J)}function xt(){var IA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";IA=unescape(encodeURIComponent(k(IA)));for(var J=Math.min(127,IA.length),U=r.alloc(J),X=0;X>8&65280|IA>>24&255}function Xt(IA){for(var J=[],U=0;U>8*(3-U%4)&255);return r.from(J)}var Kt,Gt,$t,le,vn,pn,ze=[40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122],ae=zA.number,ee=function(){function IA(J){f(this,IA),this.doc=J,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0]}return w(IA,[{key:"stop",value:function(U,X,K){if(null==K&&(K=1),X=this.doc._normalizeColor(X),0===this.stops.length)if(3===X.length)this._colorSpace="DeviceRGB";else if(4===X.length)this._colorSpace="DeviceCMYK";else{if(1!==X.length)throw new Error("Unknown color space");this._colorSpace="DeviceGray"}else if("DeviceRGB"===this._colorSpace&&3!==X.length||"DeviceCMYK"===this._colorSpace&&4!==X.length||"DeviceGray"===this._colorSpace&&1!==X.length)throw new Error("All gradient stops must use the same color space");return K=Math.max(0,Math.min(1,K)),this.stops.push([U,X,K]),this}},{key:"setTransform",value:function(U,X,K,hA,mA,$A){return this.transform=[U,X,K,hA,mA,$A],this}},{key:"embed",value:function(U){var X,K=this.stops.length;if(0!==K){this.embedded=!0,this.matrix=U;var hA=this.stops[K-1];hA[0]<1&&this.stops.push([1,hA[1],hA[2]]);for(var mA=[],$A=[],nt=[],ft=0;ft>16,U>>8&255,255&U]}else Hn[J]&&(J=Hn[J]);return Array.isArray(J)?(3===J.length?J=J.map(function(X){return X/255}):4===J.length&&(J=J.map(function(X){return X/100})),J):null},_setColor:function(J,U){return J instanceof nn?(J.apply(U),!0):Array.isArray(J)&&J[0]instanceof $e?(J[0].apply(U,J[1]),!0):this._setColorCore(J,U)},_setColorCore:function(J,U){if(!(J=this._normalizeColor(J)))return!1;var X=U?"SCN":"scn",K=this._getColorSpace(J);return this._setColorSpace(K,U),J=J.join(" "),this.addContent("".concat(J," ").concat(X)),!0},_setColorSpace:function(J,U){var X=U?"CS":"cs";return this.addContent("/".concat(J," ").concat(X))},_getColorSpace:function(J){return 4===J.length?"DeviceCMYK":"DeviceRGB"},fillColor:function(J,U){return this._setColor(J,!1)&&this.fillOpacity(U),this._fillColor=[J,U],this},strokeColor:function(J,U){return this._setColor(J,!0)&&this.strokeOpacity(U),this},opacity:function(J){return this._doOpacity(J,J),this},fillOpacity:function(J){return this._doOpacity(J,null),this},strokeOpacity:function(J){return this._doOpacity(null,J),this},_doOpacity:function(J,U){var X,K;if(null!=J||null!=U){null!=J&&(J=Math.max(0,Math.min(1,J))),null!=U&&(U=Math.max(0,Math.min(1,U)));var hA="".concat(J,"_").concat(U);if(this._opacityRegistry[hA]){var mA=R(this._opacityRegistry[hA],2);X=mA[0],K=mA[1]}else{X={Type:"ExtGState"},null!=J&&(X.ca=J),null!=U&&(X.CA=U),(X=this.ref(X)).end();var $A=++this._opacityCount;K="Gs".concat($A),this._opacityRegistry[hA]=[X,K]}return this.page.ext_gstates[K]=X,this.addContent("/".concat(K," gs"))}},linearGradient:function(J,U,X,K){return new De(this,J,U,X,K)},radialGradient:function(J,U,X,K,hA,mA){return new rn(this,J,U,X,K,hA,mA)},pattern:function(J,U,X,K){return new $e(this,J,U,X,K)}},Hn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};Kt=Gt=$t=le=vn=pn=0;var Tn={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},Sn={M:function(J,U){return $t=le=null,vn=Kt=U[0],pn=Gt=U[1],J.moveTo(Kt,Gt)},m:function(J,U){return $t=le=null,vn=Kt+=U[0],pn=Gt+=U[1],J.moveTo(Kt,Gt)},C:function(J,U){return Kt=U[4],Gt=U[5],$t=U[2],le=U[3],J.bezierCurveTo.apply(J,P(U))},c:function(J,U){return J.bezierCurveTo(U[0]+Kt,U[1]+Gt,U[2]+Kt,U[3]+Gt,U[4]+Kt,U[5]+Gt),$t=Kt+U[2],le=Gt+U[3],Kt+=U[4],Gt+=U[5]},S:function(J,U){return null===$t&&($t=Kt,le=Gt),J.bezierCurveTo(Kt-($t-Kt),Gt-(le-Gt),U[0],U[1],U[2],U[3]),$t=U[0],le=U[1],Kt=U[2],Gt=U[3]},s:function(J,U){return null===$t&&($t=Kt,le=Gt),J.bezierCurveTo(Kt-($t-Kt),Gt-(le-Gt),Kt+U[0],Gt+U[1],Kt+U[2],Gt+U[3]),$t=Kt+U[0],le=Gt+U[1],Kt+=U[2],Gt+=U[3]},Q:function(J,U){return $t=U[0],le=U[1],J.quadraticCurveTo(U[0],U[1],Kt=U[2],Gt=U[3])},q:function(J,U){return J.quadraticCurveTo(U[0]+Kt,U[1]+Gt,U[2]+Kt,U[3]+Gt),$t=Kt+U[0],le=Gt+U[1],Kt+=U[2],Gt+=U[3]},T:function(J,U){return null===$t?($t=Kt,le=Gt):($t=Kt-($t-Kt),le=Gt-(le-Gt)),J.quadraticCurveTo($t,le,U[0],U[1]),$t=Kt-($t-Kt),le=Gt-(le-Gt),Kt=U[0],Gt=U[1]},t:function(J,U){return null===$t?($t=Kt,le=Gt):($t=Kt-($t-Kt),le=Gt-(le-Gt)),J.quadraticCurveTo($t,le,Kt+U[0],Gt+U[1]),Kt+=U[0],Gt+=U[1]},A:function(J,U){return ZA(J,Kt,Gt,U),Kt=U[5],Gt=U[6]},a:function(J,U){return U[5]+=Kt,U[6]+=Gt,ZA(J,Kt,Gt,U),Kt=U[5],Gt=U[6]},L:function(J,U){return $t=le=null,J.lineTo(Kt=U[0],Gt=U[1])},l:function(J,U){return $t=le=null,J.lineTo(Kt+=U[0],Gt+=U[1])},H:function(J,U){return $t=le=null,J.lineTo(Kt=U[0],Gt)},h:function(J,U){return $t=le=null,J.lineTo(Kt+=U[0],Gt)},V:function(J,U){return $t=le=null,J.lineTo(Kt,Gt=U[0])},v:function(J,U){return $t=le=null,J.lineTo(Kt,Gt+=U[0])},Z:function(J){return J.closePath(),Kt=vn,Gt=pn},z:function(J){return J.closePath(),Kt=vn,Gt=pn}},ZA=function(J,U,X,K){var Ht,hA=R(K,7),Vt=yA(YA(hA[5],hA[6],hA[0],hA[1],hA[3],hA[4],hA[2],U,X));try{for(Vt.s();!(Ht=Vt.n()).done;){var Ce=tt.apply(void 0,P(Ht.value));J.bezierCurveTo.apply(J,P(Ce))}}catch(Ie){Vt.e(Ie)}finally{Vt.f()}},YA=function(J,U,X,K,hA,mA,$A,nt,ft){var dt=$A*(Math.PI/180),Dt=Math.sin(dt),Ft=Math.cos(dt);X=Math.abs(X),K=Math.abs(K);var Nt=($t=Ft*(nt-J)*.5+Dt*(ft-U)*.5)*$t/(X*X)+(le=Ft*(ft-U)*.5-Dt*(nt-J)*.5)*le/(K*K);Nt>1&&(X*=Nt=Math.sqrt(Nt),K*=Nt);var Vt=Ft/X,Ht=Dt/X,Ee=-Dt/K,Ce=Ft/K,Ie=Vt*nt+Ht*ft,an=Ee*nt+Ce*ft,pe=Vt*J+Ht*U,Ke=Ee*J+Ce*U,Ve=1/((pe-Ie)*(pe-Ie)+(Ke-an)*(Ke-an))-.25;Ve<0&&(Ve=0);var dn=Math.sqrt(Ve);mA===hA&&(dn=-dn);var qn=.5*(Ie+pe)-dn*(Ke-an),ni=.5*(an+Ke)+dn*(pe-Ie),Un=Math.atan2(an-ni,Ie-qn),Kn=Math.atan2(Ke-ni,pe-qn)-Un;Kn<0&&1===mA?Kn+=2*Math.PI:Kn>0&&0===mA&&(Kn-=2*Math.PI);for(var ci=Math.ceil(Math.abs(Kn/(.5*Math.PI+.001))),Ii=[],ii=0;ii0&&(K[K.length]=+hA),X[X.length]={cmd:U,args:K},K=[],hA="",mA=!1),U=dt;else if([" ",","].includes(dt)||"-"===dt&&hA.length>0&&"e"!==hA[hA.length-1]||"."===dt&&mA){if(0===hA.length)continue;K.length===$A?(X[X.length]={cmd:U,args:K},K=[+hA],"M"===U&&(U="L"),"m"===U&&(U="l")):K[K.length]=+hA,mA="."===dt,hA=["-","."].includes(dt)?dt:""}else hA+=dt,"."===dt&&(mA=!0)}}catch(Dt){nt.e(Dt)}finally{nt.f()}return hA.length>0&&(K.length===$A?(X[X.length]={cmd:U,args:K},K=[+hA],"M"===U&&(U="L"),"m"===U&&(U="l")):K[K.length]=+hA),X[X.length]={cmd:U,args:K},X}(X);!function(J,U){Kt=Gt=$t=le=vn=pn=0;for(var X=0;X1&&void 0!==arguments[1]?arguments[1]:{},X=J;if(Array.isArray(J)||(J=[J,U.space||J]),!J.every(function(hA){return Number.isFinite(hA)&&hA>0}))throw new Error("dash(".concat(JSON.stringify(X),", ").concat(JSON.stringify(U),") invalid, lengths must be numeric and greater than zero"));return J=J.map(bA).join(" "),this.addContent("[".concat(J,"] ").concat(bA(U.phase||0)," d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(J,U){return this.addContent("".concat(bA(J)," ").concat(bA(U)," m"))},lineTo:function(J,U){return this.addContent("".concat(bA(J)," ").concat(bA(U)," l"))},bezierCurveTo:function(J,U,X,K,hA,mA){return this.addContent("".concat(bA(J)," ").concat(bA(U)," ").concat(bA(X)," ").concat(bA(K)," ").concat(bA(hA)," ").concat(bA(mA)," c"))},quadraticCurveTo:function(J,U,X,K){return this.addContent("".concat(bA(J)," ").concat(bA(U)," ").concat(bA(X)," ").concat(bA(K)," v"))},rect:function(J,U,X,K){return this.addContent("".concat(bA(J)," ").concat(bA(U)," ").concat(bA(X)," ").concat(bA(K)," re"))},roundedRect:function(J,U,X,K,hA){null==hA&&(hA=0);var mA=(hA=Math.min(hA,.5*X,.5*K))*(1-LA);return this.moveTo(J+hA,U),this.lineTo(J+X-hA,U),this.bezierCurveTo(J+X-mA,U,J+X,U+mA,J+X,U+hA),this.lineTo(J+X,U+K-hA),this.bezierCurveTo(J+X,U+K-mA,J+X-mA,U+K,J+X-hA,U+K),this.lineTo(J+hA,U+K),this.bezierCurveTo(J+mA,U+K,J,U+K-mA,J,U+K-hA),this.lineTo(J,U+hA),this.bezierCurveTo(J,U+mA,J+mA,U,J+hA,U),this.closePath()},ellipse:function(J,U,X,K){null==K&&(K=X);var hA=X*LA,mA=K*LA,$A=(J-=X)+2*X,nt=(U-=K)+2*K,ft=J+X,dt=U+K;return this.moveTo(J,dt),this.bezierCurveTo(J,dt-mA,ft-hA,U,ft,U),this.bezierCurveTo(ft+hA,U,$A,dt-mA,$A,dt),this.bezierCurveTo($A,dt+mA,ft+hA,nt,ft,nt),this.bezierCurveTo(ft-hA,nt,J,dt+mA,J,dt),this.closePath()},circle:function(J,U,X){return this.ellipse(J,U,X)},arc:function(J,U,X,K,hA,mA){null==mA&&(mA=!1);var $A=2*Math.PI,nt=.5*Math.PI,ft=hA-K;Math.abs(ft)>$A?ft=$A:0!==ft&&mA!==ft<0&&(ft=(mA?-1:1)*$A+ft);var Dt=Math.ceil(Math.abs(ft)/nt),Ft=ft/Dt,Nt=Ft/nt*LA*X,Vt=K,Ht=-Math.sin(Vt)*Nt,Ee=Math.cos(Vt)*Nt,Ce=J+Math.cos(Vt)*X,Ie=U+Math.sin(Vt)*X;this.moveTo(Ce,Ie);for(var an=0;an1&&void 0!==arguments[1]?arguments[1]:{},K=J*Math.PI/180,hA=Math.cos(K),mA=Math.sin(K),$A=X=0;if(null!=U.origin){var nt=R(U.origin,2),dt=($A=nt[0])*mA+(X=nt[1])*hA;$A-=$A*hA-X*mA,X-=dt}return this.transform(hA,mA,-mA,hA,$A,X)},scale:function(J,U){var K,X=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};null==U&&(U=J),"object"==typeof U&&(X=U,U=J);var hA=K=0;if(null!=X.origin){var mA=R(X.origin,2);hA=mA[0],K=mA[1],hA-=J*hA,K-=U*K}return this.transform(J,0,0,U,hA,K)}},At={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},RA=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n \nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n \nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n \ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n \nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n \nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n \nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n \nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),ot=function(){function IA(J){f(this,IA),this.contents=J,this.attributes={},this.glyphWidths={},this.boundingBoxes={},this.kernPairs={},this.parse(),this.charWidths=new Array(256);for(var U=0;U<=255;U++)this.charWidths[U]=this.glyphWidths[RA[U]];this.bbox=this.attributes.FontBBox.split(/\s+/).map(function(X){return+X}),this.ascender=+(this.attributes.Ascender||0),this.descender=+(this.attributes.Descender||0),this.xHeight=+(this.attributes.XHeight||0),this.capHeight=+(this.attributes.CapHeight||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.descender)}return w(IA,null,[{key:"open",value:function(U){return new IA(e.readFileSync(U,"utf8"))}}]),w(IA,[{key:"parse",value:function(){var K,U="",X=yA(this.contents.split("\n"));try{for(X.s();!(K=X.n()).done;){var mA,$A,hA=K.value;if(mA=hA.match(/^Start(\w+)/))U=mA[1];else if(mA=hA.match(/^End(\w+)/))U="";else switch(U){case"FontMetrics":var nt=(mA=hA.match(/(^\w+)\s+(.*)/))[1],ft=mA[2];($A=this.attributes[nt])?(Array.isArray($A)||($A=this.attributes[nt]=[$A]),$A.push(ft)):this.attributes[nt]=ft;break;case"CharMetrics":if(!/^CH?\s/.test(hA))continue;var dt=hA.match(/\bN\s+(\.?\w+)\s*;/)[1];this.glyphWidths[dt]=+hA.match(/\bWX\s+(\d+)\s*;/)[1];break;case"KernPairs":(mA=hA.match(/^KPX\s+(\.?\w+)\s+(\.?\w+)\s+(-?\d+)/))&&(this.kernPairs[mA[1]+"\0"+mA[2]]=parseInt(mA[3]))}}}catch(Dt){X.e(Dt)}finally{X.f()}}},{key:"encodeText",value:function(U){for(var X=[],K=0,hA=U.length;K>8,nt=0;this.font.post.isFixedPitch&&(nt|=1),1<=$A&&$A<=7&&(nt|=2),nt|=4,10===$A&&(nt|=8),this.font.head.macStyle.italic&&(nt|=64);var dt=[1,2,3,4,5,6].map(function(Ht){return String.fromCharCode((K.id.charCodeAt(Ht)||73)+17)}).join("")+"+"+this.font.postscriptName,Dt=this.font.bbox,Ft=this.document.ref({Type:"FontDescriptor",FontName:dt,Flags:nt,FontBBox:[Dt.minX*this.scale,Dt.minY*this.scale,Dt.maxX*this.scale,Dt.maxY*this.scale],ItalicAngle:this.font.italicAngle,Ascent:this.ascender,Descent:this.descender,CapHeight:(this.font.capHeight||this.font.ascent)*this.scale,XHeight:(this.font.xHeight||0)*this.scale,StemV:0});hA?Ft.data.FontFile3=mA:Ft.data.FontFile2=mA,Ft.end();var Nt={Type:"Font",Subtype:"CIDFontType0",BaseFont:dt,CIDSystemInfo:{Registry:new String("Adobe"),Ordering:new String("Identity"),Supplement:0},FontDescriptor:Ft,W:[0,this.widths]};hA||(Nt.Subtype="CIDFontType2",Nt.CIDToGIDMap="Identity");var Vt=this.document.ref(Nt);return Vt.end(),this.dictionary.data={Type:"Font",Subtype:"Type0",BaseFont:dt,Encoding:"Identity-H",DescendantFonts:[Vt],ToUnicode:this.toUnicodeCmap()},this.dictionary.end()}},{key:"toUnicodeCmap",value:function(){var $A,K=this.document.ref(),hA=[],mA=yA(this.unicode);try{for(mA.s();!($A=mA.n()).done;){var Dt,ft=[],dt=yA($A.value);try{for(dt.s();!(Dt=dt.n()).done;){var Ft=Dt.value;Ft>65535&&(ft.push(Ut((Ft-=65536)>>>10&1023|55296)),Ft=56320|1023&Ft),ft.push(Ut(Ft))}}catch(Nt){dt.e(Nt)}finally{dt.f()}hA.push("<".concat(ft.join(" "),">"))}}catch(Nt){mA.e(Nt)}finally{mA.f()}return K.end("/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange\n1 beginbfrange\n<0000> <".concat(Ut(hA.length-1),"> [").concat(hA.join(" "),"]\nendbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend")),K}}]),U}(VA),Wt=function(){function IA(){f(this,IA)}return w(IA,null,[{key:"open",value:function(U,X,K,hA){var mA;if("string"==typeof X){if(St.isStandardFont(X))return new St(U,X,hA);X=e.readFileSync(X)}if(r.isBuffer(X)?mA=a.default.create(X,K):X instanceof Uint8Array?mA=a.default.create(r.from(X),K):X instanceof ArrayBuffer&&(mA=a.default.create(r.from(new Uint8Array(X)),K)),null==mA)throw new Error("Not a supported font format or standard PDF font.");return new kt(U,mA,hA)}}]),IA}(),ne={initFonts:function(){var J=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Helvetica";this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={},J&&this.font(J)},font:function(J,U,X){var K,hA;if("number"==typeof U&&(X=U,U=null),"string"==typeof J&&this._registeredFonts[J]){K=J;var mA=this._registeredFonts[J];J=mA.src,U=mA.family}else"string"!=typeof(K=U||J)&&(K=null);if(null!=X&&this.fontSize(X),hA=this._fontFamilies[K])return this._font=hA,this;var $A="F".concat(++this._fontCount);return this._font=Wt.open(this,J,U,$A),(hA=this._fontFamilies[this._font.name])?(this._font=hA,this):(K&&(this._fontFamilies[K]=this._font),this._font.name&&(this._fontFamilies[this._font.name]=this._font),this)},fontSize:function(J){return this._fontSize=J,this},currentLineHeight:function(J){return null==J&&(J=!1),this._font.lineHeight(this._fontSize,J)},registerFont:function(J,U,X){return this._registeredFonts[J]={src:U,family:X},this}},wt=function(IA){x(U,IA);var J=Y(U);function U(X,K){var hA;return f(this,U),(hA=J.call(this)).document=X,hA.indent=K.indent||0,hA.characterSpacing=K.characterSpacing||0,hA.wordSpacing=0===K.wordSpacing,hA.columns=K.columns||1,hA.columnGap=null!=K.columnGap?K.columnGap:18,hA.lineWidth=(K.width-hA.columnGap*(hA.columns-1))/hA.columns,hA.spaceLeft=hA.lineWidth,hA.startX=hA.document.x,hA.startY=hA.document.y,hA.column=1,hA.ellipsis=K.ellipsis,hA.continuedX=0,hA.features=K.features,null!=K.height?(hA.height=K.height,hA.maxY=hA.startY+K.height):hA.maxY=hA.document.page.maxY(),hA.on("firstLine",function(mA){var $A=hA.continuedX||hA.indent;return hA.document.x+=$A,hA.lineWidth-=$A,hA.once("line",function(){if(hA.document.x-=$A,hA.lineWidth+=$A,mA.continued&&!hA.continuedX&&(hA.continuedX=hA.indent),!mA.continued)return hA.continuedX=0})}),hA.on("lastLine",function(mA){var $A=mA.align;return"justify"===$A&&(mA.align="left"),hA.lastLine=!0,hA.once("line",function(){return hA.document.y+=mA.paragraphGap||0,mA.align=$A,hA.lastLine=!1})}),hA}return w(U,[{key:"wordWidth",value:function(K){return this.document.widthOfString(K,this)+this.characterSpacing+this.wordSpacing}},{key:"eachWord",value:function(K,hA){for(var mA,$A=new E.default(K),nt=null,ft=Object.create(null);mA=$A.nextBreak();){var dt,Dt=K.slice((null!=nt?nt.position:void 0)||0,mA.position),Ft=null!=ft[Dt]?ft[Dt]:ft[Dt]=this.wordWidth(Dt);if(Ft>this.lineWidth+this.continuedX)for(var Nt=nt,Vt={};Dt.length;){var Ht,Ee;Ft>this.spaceLeft?(Ht=Math.ceil(this.spaceLeft/(Ft/Dt.length)),Ee=(Ft=this.wordWidth(Dt.slice(0,Ht)))<=this.spaceLeft&&Htthis.spaceLeft&&Ht>0;Ce||Ee;)Ce?Ce=(Ft=this.wordWidth(Dt.slice(0,--Ht)))>this.spaceLeft&&Ht>0:(Ce=(Ft=this.wordWidth(Dt.slice(0,++Ht)))>this.spaceLeft&&Ht>0,Ee=Ft<=this.spaceLeft&&Htthis.maxY||$A>this.maxY)&&this.nextSection();var nt="",ft=0,dt=0,Dt=0,Ft=this.document.y,Nt=function(){return hA.textWidth=ft+mA.wordSpacing*(dt-1),hA.wordCount=dt,hA.lineWidth=mA.lineWidth,Ft=mA.document.y,mA.emit("line",nt,hA,mA),Dt++};return this.emit("sectionStart",hA,this),this.eachWord(K,function(Vt,Ht,Ee,Ce){if((null==Ce||Ce.required)&&(mA.emit("firstLine",hA,mA),mA.spaceLeft=mA.lineWidth),Ht<=mA.spaceLeft&&(nt+=Vt,ft+=Ht,dt++),Ee.required||Ht>mA.spaceLeft){var Ie=mA.document.currentLineHeight(!0);if(null!=mA.height&&mA.ellipsis&&mA.document.y+2*Ie>mA.maxY&&mA.column>=mA.columns){for(!0===mA.ellipsis&&(mA.ellipsis="\u2026"),nt=nt.replace(/\s+$/,""),ft=mA.wordWidth(nt+mA.ellipsis);nt&&ft>mA.lineWidth;)nt=nt.slice(0,-1).replace(/\s+$/,""),ft=mA.wordWidth(nt+mA.ellipsis);ft<=mA.lineWidth&&(nt+=mA.ellipsis),ft=mA.wordWidth(nt)}return Ee.required&&(Ht>mA.spaceLeft&&(Nt(),nt=Vt,ft=Ht,dt=1),mA.emit("lastLine",hA,mA)),Nt(),mA.document.y+Ie>mA.maxY&&!mA.nextSection()?(dt=0,nt="",!1):Ee.required?(mA.spaceLeft=mA.lineWidth,nt="",ft=0,dt=0):(mA.spaceLeft=mA.lineWidth-Ht,nt=Vt,ft=Ht,dt=1)}return mA.spaceLeft-=Ht}),dt>0&&(this.emit("lastLine",hA,this),Nt()),this.emit("sectionEnd",hA,this),!0===hA.continued?(Dt>1&&(this.continuedX=0),this.continuedX+=hA.textWidth||0,this.document.y=Ft):this.document.x=this.startX}},{key:"nextSection",value:function(K){if(this.emit("sectionEnd",K,this),++this.column>this.columns){if(null!=this.height)return!1;var hA;this.document.continueOnNewPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(hA=this.document).fillColor.apply(hA,P(this.document._fillColor)),this.emit("pageBreak",K,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",K,this);return this.emit("sectionStart",K,this),!0}}]),U}(B.EventEmitter),bt=zA.number,Zt={initText:function(){return this._line=this._line.bind(this),this.x=0,this.y=0,this._lineGap=0},lineGap:function(J){return this._lineGap=J,this},moveDown:function(J){return null==J&&(J=1),this.y+=this.currentLineHeight(!0)*J+this._lineGap,this},moveUp:function(J){return null==J&&(J=1),this.y-=this.currentLineHeight(!0)*J+this._lineGap,this},_text:function(J,U,X,K,hA){var mA=this;K=this._initOptions(U,X,K),J=null==J?"":"".concat(J),K.wordSpacing&&(J=J.replace(/\s{2,}/g," "));var $A=function(){K.structParent&&K.structParent.add(mA.struct(K.structType||"P",[mA.markStructureContent(K.structType||"P")]))};if(K.width){var nt=this._wrapper;nt||((nt=new wt(this,K)).on("line",hA),nt.on("firstLine",$A)),this._wrapper=K.continued?nt:null,this._textOptions=K.continued?K:null,nt.wrap(J,K)}else{var dt,ft=yA(J.split("\n"));try{for(ft.s();!(dt=ft.n()).done;){var Dt=dt.value;$A(),hA(Dt,K)}}catch(Ft){ft.e(Ft)}finally{ft.f()}}return this},text:function(J,U,X,K){return this._text(J,U,X,K,this._line)},widthOfString:function(J){var U=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._font.widthOfString(J,this._fontSize,U.features)+(U.characterSpacing||0)*(J.length-1)},heightOfString:function(J,U){var X=this,K=this.x,hA=this.y;(U=this._initOptions(U)).height=1/0;var mA=U.lineGap||this._lineGap||0;this._text(J,this.x,this.y,U,function(){return X.y+=X.currentLineHeight(!0)+mA});var $A=this.y-hA;return this.x=K,this.y=hA,$A},list:function(J,U,X,K,hA){var mA=this,$A=(K=this._initOptions(U,X,K)).listType||"bullet",nt=Math.round(this._font.ascender/1e3*this._fontSize),ft=nt/2,dt=K.bulletRadius||nt/3,Dt=K.textIndent||("bullet"===$A?5*dt:2*nt),Ft=K.bulletIndent||("bullet"===$A?8*dt:2*nt),Nt=1,Vt=[],Ht=[],Ee=[];!function pe(Ke){for(var Qn=1,Ve=0;Ve0&&void 0!==arguments[0]?arguments[0]:{},U=arguments.length>1?arguments[1]:void 0,X=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof J&&(X=J,J=null);var K=Object.assign({},X);if(this._textOptions)for(var hA in this._textOptions)"continued"!==hA&&void 0===K[hA]&&(K[hA]=this._textOptions[hA]);return null!=J&&(this.x=J),null!=U&&(this.y=U),!1!==K.lineBreak&&(null==K.width&&(K.width=this.page.width-this.x-this.page.margins.right),K.width=Math.max(K.width,0)),K.columns||(K.columns=0),null==K.columnGap&&(K.columnGap=18),K},_line:function(J){var U=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},X=arguments.length>2?arguments[2]:void 0;this._fragment(J,this.x,this.y,U);var K=U.lineGap||this._lineGap||0;return X?this.y+=this.currentLineHeight(!0)+K:this.x+=this.widthOfString(J)},_fragment:function(J,U,X,K){var mA,$A,nt,ft,dt,Dt,hA=this;if(0!==(J="".concat(J).replace(/\n/g,"")).length){var Nt=K.wordSpacing||0,Vt=K.characterSpacing||0;if(K.width)switch(K.align||"left"){case"right":dt=this.widthOfString(J.replace(/\s+$/,""),K),U+=K.lineWidth-dt;break;case"center":U+=K.lineWidth/2-K.textWidth/2;break;case"justify":Dt=J.trim().split(/\s+/),dt=this.widthOfString(J.replace(/\s+/g,""),K);var Ht=this.widthOfString(" ")+Vt;Nt=Math.max(0,(K.lineWidth-dt)/Math.max(1,Dt.length-1)-Ht)}if("number"==typeof K.baseline)mA=-K.baseline;else{switch(K.baseline){case"svg-middle":mA=.5*this._font.xHeight;break;case"middle":case"svg-central":mA=.5*(this._font.descender+this._font.ascender);break;case"bottom":case"ideographic":mA=this._font.descender;break;case"alphabetic":mA=0;break;case"mathematical":mA=.5*this._font.ascender;break;case"hanging":mA=.8*this._font.ascender;break;default:mA=this._font.ascender}mA=mA/1e3*this._fontSize}var Ke,Ee=K.textWidth+Nt*(K.wordCount-1)+Vt*(J.length-1);if(null!=K.link&&this.link(U,X,Ee,this.currentLineHeight(),K.link),null!=K.goTo&&this.goTo(U,X,Ee,this.currentLineHeight(),K.goTo),null!=K.destination&&this.addNamedDestination(K.destination,"XYZ",U,X,null),K.underline){this.save(),K.stroke||this.strokeColor.apply(this,P(this._fillColor||[]));var Ce=this._fontSize<10?.5:Math.floor(this._fontSize/10);this.lineWidth(Ce);var Ie=X+this.currentLineHeight()-Ce;this.moveTo(U,Ie),this.lineTo(U+Ee,Ie),this.stroke(),this.restore()}if(K.strike){this.save(),K.stroke||this.strokeColor.apply(this,P(this._fillColor||[]));var an=this._fontSize<10?.5:Math.floor(this._fontSize/10);this.lineWidth(an);var pe=X+this.currentLineHeight()/2;this.moveTo(U,pe),this.lineTo(U+Ee,pe),this.stroke(),this.restore()}this.save(),K.oblique&&(Ke="number"==typeof K.oblique?-Math.tan(K.oblique*Math.PI/180):-.25,this.transform(1,0,0,1,U,X),this.transform(1,0,Ke,1,-Ke*mA,0),this.transform(1,0,0,1,-U,-X)),this.transform(1,0,0,-1,0,this.page.height),X=this.page.height-X-mA,null==this.page.fonts[this._font.id]&&(this.page.fonts[this._font.id]=this._font.ref()),this.addContent("BT"),this.addContent("1 0 0 1 ".concat(bt(U)," ").concat(bt(X)," Tm")),this.addContent("/".concat(this._font.id," ").concat(bt(this._fontSize)," Tf"));var Qn=K.fill&&K.stroke?2:K.stroke?1:0;if(Qn&&this.addContent("".concat(Qn," Tr")),Vt&&this.addContent("".concat(bt(Vt)," Tc")),Nt){Dt=J.trim().split(/\s+/),Nt+=this.widthOfString(" ")+Vt,Nt*=1e3/this._fontSize,$A=[],ft=[];var dn,Ve=yA(Dt);try{for(Ve.s();!(dn=Ve.n()).done;){var Un=R(this._font.encode(dn.value,K.features),2),Kn=Un[1];$A=$A.concat(Un[0]),ft=ft.concat(Kn);var ci={},Ii=ft[ft.length-1];for(var ii in Ii)ci[ii]=Ii[ii];ci.xAdvance+=Nt,ft[ft.length-1]=ci}}catch(Vi){Ve.e(Vi)}finally{Ve.f()}}else{var _n=R(this._font.encode(J,K.features),2);$A=_n[0],ft=_n[1]}var Oi=this._fontSize/1e3,vi=[],ki=0,ji=!1,hr=function($n){if(ki<$n){var Hr=$A.slice(ki,$n).join(""),Jr=ft[$n-1].xAdvance-ft[$n-1].advanceWidth;vi.push("<".concat(Hr,"> ").concat(bt(-Jr)))}return ki=$n},Ki=function($n){if(hr($n),vi.length>0)return hA.addContent("[".concat(vi.join(" "),"] TJ")),vi.length=0};for(nt=0;nt3&&void 0!==arguments[3]?arguments[3]:{};"object"==typeof U&&(K=U,U=null),U=null!=(dt=null!=U?U:K.x)?dt:this.x,X=null!=(Dt=null!=X?X:K.y)?Dt:this.y,"string"==typeof J&&(nt=this._imageRegistry[J]),nt||(nt=J.width&&J.height?J:this.openImage(J)),nt.obj||nt.embed(this),null==this.page.xobjects[nt.label]&&(this.page.xobjects[nt.label]=nt.obj);var Ft=K.width||nt.width,Nt=K.height||nt.height;if(K.width&&!K.height){var Vt=Ft/nt.width;Ft=nt.width*Vt,Nt=nt.height*Vt}else if(K.height&&!K.width){var Ht=Nt/nt.height;Ft=nt.width*Ht,Nt=nt.height*Ht}else if(K.scale)Ft=nt.width*K.scale,Nt=nt.height*K.scale;else if(K.fit){var Ee=R(K.fit,2);(ft=nt.width/nt.height)>($A=Ee[0])/(hA=Ee[1])?(Ft=$A,Nt=$A/ft):(Nt=hA,Ft=hA*ft)}else if(K.cover){var Ce=R(K.cover,2);(ft=nt.width/nt.height)>($A=Ce[0])/(hA=Ce[1])?(Nt=hA,Ft=hA*ft):(Ft=$A,Nt=$A/ft)}return(K.fit||K.cover)&&("center"===K.align?U=U+$A/2-Ft/2:"right"===K.align&&(U=U+$A-Ft),"center"===K.valign?X=X+hA/2-Nt/2:"bottom"===K.valign&&(X=X+hA-Nt)),null!=K.link&&this.link(U,X,Ft,Nt,K.link),null!=K.goTo&&this.goTo(U,X,Ft,Nt,K.goTo),null!=K.destination&&this.addNamedDestination(K.destination,"XYZ",U,X,null),this.y===X&&(this.y+=Nt),this.save(),this.transform(Ft,0,0,-Nt,U,X+Nt),this.addContent("/".concat(nt.label," Do")),this.restore(),this},openImage:function(J){var U;return"string"==typeof J&&(U=this._imageRegistry[J]),U||(U=ue.open(J,"I".concat(++this._imageCount)),"string"==typeof J&&(this._imageRegistry[J]=U)),U}},He={annotate:function(J,U,X,K,hA){for(var mA in hA.Type="Annot",hA.Rect=this._convertRect(J,U,X,K),hA.Border=[0,0,0],"Link"===hA.Subtype&&void 0===hA.F&&(hA.F=4),"Link"!==hA.Subtype&&null==hA.C&&(hA.C=this._normalizeColor(hA.color||[0,0,0])),delete hA.color,"string"==typeof hA.Dest&&(hA.Dest=new String(hA.Dest)),hA){var $A=hA[mA];hA[mA[0].toUpperCase()+mA.slice(1)]=$A}var nt=this.ref(hA);return this.page.annotations.push(nt),nt.end(),this},note:function(J,U,X,K,hA){var mA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return mA.Subtype="Text",mA.Contents=new String(hA),mA.Name="Comment",null==mA.color&&(mA.color=[243,223,92]),this.annotate(J,U,X,K,mA)},goTo:function(J,U,X,K,hA){var mA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return mA.Subtype="Link",mA.A=this.ref({S:"GoTo",D:new String(hA)}),mA.A.end(),this.annotate(J,U,X,K,mA)},link:function(J,U,X,K,hA){var mA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(mA.Subtype="Link","number"==typeof hA){var $A=this._root.data.Pages.data;if(!(hA>=0&&hA<$A.Kids.length))throw new Error("The document has no page ".concat(hA));mA.A=this.ref({S:"GoTo",D:[$A.Kids[hA],"XYZ",null,null,null]}),mA.A.end()}else mA.A=this.ref({S:"URI",URI:new String(hA)}),mA.A.end();return this.annotate(J,U,X,K,mA)},_markup:function(J,U,X,K){var hA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},$A=R(this._convertRect(J,U,X,K),4),nt=$A[0],ft=$A[1],dt=$A[2],Dt=$A[3];return hA.QuadPoints=[nt,Dt,dt,Dt,nt,ft,dt,ft],hA.Contents=new String,this.annotate(J,U,X,K,hA)},highlight:function(J,U,X,K){var hA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return hA.Subtype="Highlight",null==hA.color&&(hA.color=[241,238,148]),this._markup(J,U,X,K,hA)},underline:function(J,U,X,K){var hA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return hA.Subtype="Underline",this._markup(J,U,X,K,hA)},strike:function(J,U,X,K){var hA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return hA.Subtype="StrikeOut",this._markup(J,U,X,K,hA)},lineAnnotation:function(J,U,X,K){var hA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return hA.Subtype="Line",hA.Contents=new String,hA.L=[J,this.page.height-U,X,this.page.height-K],this.annotate(J,U,X,K,hA)},rectAnnotation:function(J,U,X,K){var hA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return hA.Subtype="Square",hA.Contents=new String,this.annotate(J,U,X,K,hA)},ellipseAnnotation:function(J,U,X,K){var hA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return hA.Subtype="Circle",hA.Contents=new String,this.annotate(J,U,X,K,hA)},textAnnotation:function(J,U,X,K,hA){var mA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return mA.Subtype="FreeText",mA.Contents=new String(hA),mA.DA=new String,this.annotate(J,U,X,K,mA)},fileAnnotation:function(J,U,X,K){var hA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},mA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},$A=this.file(hA.src,Object.assign({hidden:!0},hA));return mA.Subtype="FileAttachment",mA.FS=$A,mA.Contents?mA.Contents=new String(mA.Contents):$A.data.Desc&&(mA.Contents=$A.data.Desc),this.annotate(J,U,X,K,mA)},_convertRect:function(J,U,X,K){var hA=U;U+=K;var mA=J+X,$A=R(this._ctm,6),nt=$A[0],ft=$A[1],dt=$A[2],Dt=$A[3],Ft=$A[4],Nt=$A[5];return[J=nt*J+dt*U+Ft,U=ft*J+Dt*U+Nt,mA=nt*mA+dt*hA+Ft,hA=ft*mA+Dt*hA+Nt]}},Ne=function(){function IA(J,U,X,K){var hA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{expanded:!1};f(this,IA),this.document=J,this.options=hA,this.outlineData={},null!==K&&(this.outlineData.Dest=[K.dictionary,"Fit"]),null!==U&&(this.outlineData.Parent=U),null!==X&&(this.outlineData.Title=new String(X)),this.dictionary=this.document.ref(this.outlineData),this.children=[]}return w(IA,[{key:"addItem",value:function(U){var K=new IA(this.document,this.dictionary,U,this.document.page,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:!1});return this.children.push(K),K}},{key:"endOutline",value:function(){if(this.children.length>0){this.options.expanded&&(this.outlineData.Count=this.children.length);var X=this.children[this.children.length-1];this.outlineData.First=this.children[0].dictionary,this.outlineData.Last=X.dictionary;for(var K=0,hA=this.children.length;K0&&(mA.outlineData.Prev=this.children[K-1].dictionary),K0)return this._root.data.Outlines=this.outline.dictionary,this._root.data.PageMode="UseOutlines"}},Ue=function(){function IA(J,U){f(this,IA),this.refs=[{pageRef:J,mcid:U}]}return w(IA,[{key:"push",value:function(U){var X=this;U.refs.forEach(function(K){return X.refs.push(K)})}}]),IA}(),tn=function(){function IA(J,U){var X=this,K=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},hA=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;f(this,IA),this.document=J,this._attached=!1,this._ended=!1,this._flushed=!1,this.dictionary=J.ref({S:U});var mA=this.dictionary.data;(Array.isArray(K)||this._isValidChild(K))&&(hA=K,K={}),void 0!==K.title&&(mA.T=new String(K.title)),void 0!==K.lang&&(mA.Lang=new String(K.lang)),void 0!==K.alt&&(mA.Alt=new String(K.alt)),void 0!==K.expanded&&(mA.E=new String(K.expanded)),void 0!==K.actual&&(mA.ActualText=new String(K.actual)),this._children=[],hA&&(Array.isArray(hA)||(hA=[hA]),hA.forEach(function($A){return X.add($A)}),this.end())}return w(IA,[{key:"add",value:function(U){if(this._ended)throw new Error("Cannot add child to already-ended structure element");if(!this._isValidChild(U))throw new Error("Invalid structure element child");return U instanceof IA&&(U.setParent(this.dictionary),this._attached&&U.setAttached()),U instanceof Ue&&this._addContentToParentTree(U),"function"==typeof U&&this._attached&&(U=this._contentForClosure(U)),this._children.push(U),this}},{key:"_addContentToParentTree",value:function(U){var X=this;U.refs.forEach(function(K){var hA=K.pageRef,mA=K.mcid;X.document.getStructParentTree().get(hA.data.StructParents)[mA]=X.dictionary})}},{key:"setParent",value:function(U){if(this.dictionary.data.P)throw new Error("Structure element added to more than one parent");this.dictionary.data.P=U,this._flush()}},{key:"setAttached",value:function(){var U=this;this._attached||(this._children.forEach(function(X,K){X instanceof IA&&X.setAttached(),"function"==typeof X&&(U._children[K]=U._contentForClosure(X))}),this._attached=!0,this._flush())}},{key:"end",value:function(){this._ended||(this._children.filter(function(U){return U instanceof IA}).forEach(function(U){return U.end()}),this._ended=!0,this._flush())}},{key:"_isValidChild",value:function(U){return U instanceof IA||U instanceof Ue||"function"==typeof U}},{key:"_contentForClosure",value:function(U){var X=this.document.markStructureContent(this.dictionary.data.S);return U(),this.document.endMarkedContent(),this._addContentToParentTree(X),X}},{key:"_isFlushable",value:function(){return!(!this.dictionary.data.P||!this._ended)&&this._children.every(function(U){return"function"!=typeof U&&(!(U instanceof IA)||U._isFlushable())})}},{key:"_flush",value:function(){var U=this;this._flushed||!this._isFlushable()||(this.dictionary.data.K=[],this._children.forEach(function(X){return U._flushChild(X)}),this.dictionary.end(),this._children=[],this.dictionary.data.K=null,this._flushed=!0)}},{key:"_flushChild",value:function(U){var X=this;U instanceof IA&&this.dictionary.data.K.push(U.dictionary),U instanceof Ue&&U.refs.forEach(function(K){var hA=K.pageRef,mA=K.mcid;X.dictionary.data.Pg||(X.dictionary.data.Pg=hA),X.dictionary.data.K.push(X.dictionary.data.Pg===hA?mA:{Type:"MCR",Pg:hA,MCID:mA})})}}]),IA}(),Fn=function(IA){x(U,IA);var J=Y(U);function U(){return f(this,U),J.apply(this,arguments)}return w(U,[{key:"_compareKeys",value:function(K,hA){return parseInt(K)-parseInt(hA)}},{key:"_keysName",value:function(){return"Nums"}},{key:"_dataForKey",value:function(K){return parseInt(K)}}]),U}($),on={initMarkings:function(J){this.structChildren=[],J.tagged&&(this.getMarkInfoDictionary().data.Marked=!0,this.getStructTreeRoot())},markContent:function(J){var U=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("Artifact"===J||U&&U.mcid){var X=0;for(this.page.markings.forEach(function(hA){(X||hA.structContent||"Artifact"===hA.tag)&&X++});X--;)this.endMarkedContent()}if(!U)return this.page.markings.push({tag:J}),this.addContent("/".concat(J," BMC")),this;this.page.markings.push({tag:J,options:U});var K={};return void 0!==U.mcid&&(K.MCID=U.mcid),"Artifact"===J&&("string"==typeof U.type&&(K.Type=U.type),Array.isArray(U.bbox)&&(K.BBox=[U.bbox[0],this.page.height-U.bbox[3],U.bbox[2],this.page.height-U.bbox[1]]),Array.isArray(U.attached)&&U.attached.every(function(hA){return"string"==typeof hA})&&(K.Attached=U.attached)),"Span"===J&&(U.lang&&(K.Lang=new String(U.lang)),U.alt&&(K.Alt=new String(U.alt)),U.expanded&&(K.E=new String(U.expanded)),U.actual&&(K.ActualText=new String(U.actual))),this.addContent("/".concat(J," ").concat(zA.convert(K)," BDC")),this},markStructureContent:function(J){var U=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},X=this.getStructParentTree().get(this.page.structParentTreeKey),K=X.length;X.push(null),this.markContent(J,T(T({},U),{},{mcid:K}));var hA=new Ue(this.page.dictionary,K);return this.page.markings.slice(-1)[0].structContent=hA,hA},endMarkedContent:function(){return this.page.markings.pop(),this.addContent("EMC"),this},struct:function(J){return new tn(this,J,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)},addStructure:function(J){var U=this.getStructTreeRoot();return J.setParent(U),J.setAttached(),this.structChildren.push(J),U.data.K||(U.data.K=[]),U.data.K.push(J.dictionary),this},initPageMarkings:function(J){var U=this;J.forEach(function(X){if(X.structContent){var K=X.structContent,hA=U.markStructureContent(X.tag,X.options);K.push(hA),U.page.markings.slice(-1)[0].structContent=K}else U.markContent(X.tag,X.options)})},endPageMarkings:function(J){var U=J.markings;return U.forEach(function(){return J.write("EMC")}),J.markings=[],U},getMarkInfoDictionary:function(){return this._root.data.MarkInfo||(this._root.data.MarkInfo=this.ref({})),this._root.data.MarkInfo},getStructTreeRoot:function(){return this._root.data.StructTreeRoot||(this._root.data.StructTreeRoot=this.ref({Type:"StructTreeRoot",ParentTree:new Fn,ParentTreeNextKey:0})),this._root.data.StructTreeRoot},getStructParentTree:function(){return this.getStructTreeRoot().data.ParentTree},createStructParentTreeNextKey:function(){this.getMarkInfoDictionary();var J=this.getStructTreeRoot(),U=J.data.ParentTreeNextKey++;return J.data.ParentTree.add(U,[]),U},endMarkings:function(){var J=this._root.data.StructTreeRoot;J&&(J.end(),this.structChildren.forEach(function(U){return U.end()})),this._root.data.MarkInfo&&this._root.data.MarkInfo.end()}},mn={readOnly:1,required:2,noExport:4,multiline:4096,password:8192,toggleToOffButton:16384,radioButton:32768,pushButton:65536,combo:131072,edit:262144,sort:524288,multiSelect:2097152,noSpell:4194304},Nn={left:0,center:1,right:2},sn={value:"V",defaultValue:"DV"},En={zip:"0",zipPlus4:"1",zip4:"1",phone:"2",ssn:"3"},un_number={nDec:0,sepComma:!1,negStyle:"MinusBlack",currency:"",currencyPrepend:!0},un_percent={nDec:0,sepComma:!1},ei={initForm:function(){if(!this._font)throw new Error("Must set a font before calling initForm method");this._acroform={fonts:{},defaultFont:this._font.name},this._acroform.fonts[this._font.id]=this._font.ref();var J={Fields:[],NeedAppearances:!0,DA:new String("/".concat(this._font.id," 0 Tf 0 g")),DR:{Font:{}}};J.DR.Font[this._font.id]=this._font.ref();var U=this.ref(J);return this._root.data.AcroForm=U,this},endAcroForm:function(){var J=this;if(this._root.data.AcroForm){if(!Object.keys(this._acroform.fonts).length&&!this._acroform.defaultFont)throw new Error("No fonts specified for PDF form");var U=this._root.data.AcroForm.data.DR.Font;Object.keys(this._acroform.fonts).forEach(function(X){U[X]=J._acroform.fonts[X]}),this._root.data.AcroForm.data.Fields.forEach(function(X){J._endChild(X)}),this._root.data.AcroForm.end()}return this},_endChild:function(J){var U=this;return Array.isArray(J.data.Kids)&&(J.data.Kids.forEach(function(X){U._endChild(X)}),J.end()),this},formField:function(J){var X=this._fieldDict(J,null,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),K=this.ref(X);return this._addToParent(K),K},formAnnotation:function(J,U,X,K,hA,mA){var nt=this._fieldDict(J,U,arguments.length>6&&void 0!==arguments[6]?arguments[6]:{});return nt.Subtype="Widget",void 0===nt.F&&(nt.F=4),this.annotate(X,K,hA,mA,nt),this._addToParent(this.page.annotations[this.page.annotations.length-1])},formText:function(J,U,X,K,hA){return this.formAnnotation(J,"text",U,X,K,hA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formPushButton:function(J,U,X,K,hA){return this.formAnnotation(J,"pushButton",U,X,K,hA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formCombo:function(J,U,X,K,hA){return this.formAnnotation(J,"combo",U,X,K,hA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formList:function(J,U,X,K,hA){return this.formAnnotation(J,"list",U,X,K,hA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formRadioButton:function(J,U,X,K,hA){return this.formAnnotation(J,"radioButton",U,X,K,hA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formCheckbox:function(J,U,X,K,hA){return this.formAnnotation(J,"checkbox",U,X,K,hA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},_addToParent:function(J){var U=J.data.Parent;return U?(U.data.Kids||(U.data.Kids=[]),U.data.Kids.push(J)):this._root.data.AcroForm.data.Fields.push(J),this},_fieldDict:function(J,U){var X=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this._acroform)throw new Error("Call document.initForms() method before adding form elements to document");var K=Object.assign({},X);return null!==U&&(K=this._resolveType(U,X)),K=this._resolveFlags(K),K=this._resolveJustify(K),K=this._resolveFont(K),K=this._resolveStrings(K),K=this._resolveColors(K),(K=this._resolveFormat(K)).T=new String(J),K.parent&&(K.Parent=K.parent,delete K.parent),K},_resolveType:function(J,U){if("text"===J)U.FT="Tx";else if("pushButton"===J)U.FT="Btn",U.pushButton=!0;else if("radioButton"===J)U.FT="Btn",U.radioButton=!0;else if("checkbox"===J)U.FT="Btn";else if("combo"===J)U.FT="Ch",U.combo=!0;else{if("list"!==J)throw new Error("Invalid form annotation type '".concat(J,"'"));U.FT="Ch"}return U},_resolveFormat:function(J){var U=J.format;if(U&&U.type){var X,K,hA="";if(void 0!==En[U.type])X="AFSpecial_Keystroke",K="AFSpecial_Format",hA=En[U.type];else{var mA=U.type.charAt(0).toUpperCase()+U.type.slice(1);if(X="AF".concat(mA,"_Keystroke"),K="AF".concat(mA,"_Format"),"date"===U.type)X+="Ex",hA=String(U.param);else if("time"===U.type)hA=String(U.param);else if("number"===U.type){var $A=Object.assign({},un_number,U);hA=String([String($A.nDec),$A.sepComma?"0":"1",'"'+$A.negStyle+'"',"null",'"'+$A.currency+'"',String($A.currencyPrepend)].join(","))}else if("percent"===U.type){var nt=Object.assign({},un_percent,U);hA=String([String(nt.nDec),nt.sepComma?"0":"1"].join(","))}}J.AA=J.AA?J.AA:{},J.AA.K={S:"JavaScript",JS:new String("".concat(X,"(").concat(hA,");"))},J.AA.F={S:"JavaScript",JS:new String("".concat(K,"(").concat(hA,");"))}}return delete J.format,J},_resolveColors:function(J){var U=this._normalizeColor(J.backgroundColor);return U&&(J.MK||(J.MK={}),J.MK.BG=U),(U=this._normalizeColor(J.borderColor))&&(J.MK||(J.MK={}),J.MK.BC=U),delete J.backgroundColor,delete J.borderColor,J},_resolveFlags:function(J){var U=0;return Object.keys(J).forEach(function(X){mn[X]&&(U|=mn[X],delete J[X])}),0!==U&&(J.Ff=J.Ff?J.Ff:0,J.Ff|=U),J},_resolveJustify:function(J){var U=0;return void 0!==J.align&&("number"==typeof Nn[J.align]&&(U=Nn[J.align]),delete J.align),0!==U&&(J.Q=U),J},_resolveFont:function(J){if(null===this._acroform.fonts[this._font.id]&&(this._acroform.fonts[this._font.id]=this._font.ref()),this._acroform.defaultFont!==this._font.name){J.DR={Font:{}};var U=J.fontSize||0;J.DR.Font[this._font.id]=this._font.ref(),J.DA=new String("/".concat(this._font.id," ").concat(U," Tf 0 g"))}return J},_resolveStrings:function(J){var U=[];function X(K){if(Array.isArray(K))for(var hA=0;hA1&&void 0!==arguments[1]?arguments[1]:{};U.name=U.name||J;var K,X={Type:"EmbeddedFile",Params:{}};if(!J)throw new Error("No src specified");if(r.isBuffer(J))K=J;else if(J instanceof ArrayBuffer)K=r.from(new Uint8Array(J));else{var hA;if(hA=/^data:(.*);base64,(.*)$/.exec(J))hA[1]&&(X.Subtype=hA[1].replace("/","#2F")),K=r.from(hA[2],"base64");else{if(!(K=e.readFileSync(J)))throw new Error("Could not read contents of file at filepath ".concat(J));var mA=e.statSync(J),nt=mA.ctime;X.Params.CreationDate=mA.birthtime,X.Params.ModDate=nt}}U.creationDate instanceof Date&&(X.Params.CreationDate=U.creationDate),U.modifiedDate instanceof Date&&(X.Params.ModDate=U.modifiedDate),U.type&&(X.Subtype=U.type.replace("/","#2F"));var dt,ft=h.default.MD5(h.default.lib.WordArray.create(new Uint8Array(K)));X.Params.CheckSum=new String(ft),X.Params.Size=K.byteLength,this._fileRegistry||(this._fileRegistry={});var Dt=this._fileRegistry[U.name];Dt&&bi(X,Dt)?dt=Dt.ref:((dt=this.ref(X)).end(K),this._fileRegistry[U.name]=T(T({},X),{},{ref:dt}));var Ft={Type:"Filespec",F:new String(U.name),EF:{F:dt},UF:new String(U.name)};U.description&&(Ft.Desc=new String(U.description));var Nt=this.ref(Ft);return Nt.end(),U.hidden||this.addNamedEmbeddedFile(U.name,Nt),Nt}};function bi(IA,J){return IA.Subtype===J.Subtype&&IA.Params.CheckSum.toString()===J.Params.CheckSum.toString()&&IA.Params.Size===J.Params.Size&&IA.Params.CreationDate===J.Params.CreationDate&&IA.Params.ModDate===J.Params.ModDate}var li=function(IA){x(U,IA);var J=Y(U);function U(){var X,K=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(f(this,U),(X=J.call(this,K)).options=K,K.pdfVersion){case"1.4":X.version=1.4;break;case"1.5":X.version=1.5;break;case"1.6":X.version=1.6;break;case"1.7":case"1.7ext3":X.version=1.7;break;default:X.version=1.3}X.compress=null==X.options.compress||X.options.compress,X._pageBuffer=[],X._pageBufferStart=0,X._offsets=[],X._waiting=0,X._ended=!1,X._offset=0;var hA=X.ref({Type:"Pages",Count:0,Kids:[]}),mA=X.ref({Dests:new W});if(X._root=X.ref({Type:"Catalog",Pages:hA,Names:mA}),X.options.lang&&(X._root.data.Lang=new String(X.options.lang)),X.page=null,X.initColor(),X.initVector(),X.initFonts(K.font),X.initText(),X.initImages(),X.initOutline(),X.initMarkings(K),X.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},X.options.info)for(var $A in X.options.info)X.info[$A]=X.options.info[$A];return X.options.displayTitle&&(X._root.data.ViewerPreferences=X.ref({DisplayDocTitle:!0})),X._id=z.generateFileID(X.info),X._security=z.create(b(X),K),X._write("%PDF-".concat(X.version)),X._write("%\xff\xff\xff\xff"),!1!==X.options.autoFirstPage&&X.addPage(),X}return w(U,[{key:"addPage",value:function(K){null==K&&(K=this.options),this.options.bufferPages||this.flushPages(),this.page=new AA(this,K),this._pageBuffer.push(this.page);var hA=this._root.data.Pages.data;return hA.Kids.push(this.page.dictionary),hA.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this.emit("pageAdded"),this}},{key:"continueOnNewPage",value:function(K){var hA=this.endPageMarkings(this.page);return this.addPage(K),this.initPageMarkings(hA),this}},{key:"bufferedPageRange",value:function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}}},{key:"switchToPage",value:function(K){var hA;if(!(hA=this._pageBuffer[K-this._pageBufferStart]))throw new Error("switchToPage(".concat(K,") out of bounds, current buffer covers pages ").concat(this._pageBufferStart," to ").concat(this._pageBufferStart+this._pageBuffer.length-1));return this.page=hA}},{key:"flushPages",value:function(){var K=this._pageBuffer;this._pageBuffer=[],this._pageBufferStart+=K.length;var mA,hA=yA(K);try{for(hA.s();!(mA=hA.n()).done;){var $A=mA.value;this.endPageMarkings($A),$A.end()}}catch(nt){hA.e(nt)}finally{hA.f()}}},{key:"addNamedDestination",value:function(K){for(var hA=arguments.length,mA=new Array(hA>1?hA-1:0),$A=1;$A>R&_]},getCombiningClass:function(vA){var iA=M.get(vA);return x.combiningClasses[iA>>P&uA]},getScript:function(vA){var iA=M.get(vA);return x.scripts[iA>>nA&pA]},getEastAsianWidth:function(vA){var iA=M.get(vA);return x.eaw[iA>>10&cA]},getNumericValue:function(vA){var iA=M.get(vA),wA=1023&iA;if(0===wA)return null;if(wA<=50)return wA-1;if(wA<480)return((wA>>4)-12)/(1+(15&wA));if(wA<768){iA=(wA>>5)-14;for(var st=2+(31&wA);st>0;)iA*=10,st--;return iA}iA=(wA>>2)-191;for(var TA=1+(3&wA);TA>0;)iA*=60,TA--;return iA},isAlphabetic:fA,isDigit:dA,isPunctuation:SA,isLowerCase:zA,isUpperCase:XA,isTitleCase:q,isWhiteSpace:O,isBaseForm:AA,isMark:W});I.default=Q},4781:function(S,I,n){"use strict";n(7042),n(6992),n(1539),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(9135);var c=n(311),o=n(1753).swap32LE;S.exports=function(){function y(N){var Y="function"==typeof N.readUInt32BE&&"function"==typeof N.slice;if(Y||N instanceof Uint8Array){var R;if(Y)this.highStart=N.readUInt32LE(0),this.errorValue=N.readUInt32LE(4),R=N.readUInt32LE(8),N=N.slice(12);else{var P=new DataView(N.buffer);this.highStart=P.getUint32(0,!0),this.errorValue=P.getUint32(4,!0),R=P.getUint32(8,!0),N=N.subarray(12)}N=c(N,new Uint8Array(R)),N=c(N,new Uint8Array(R)),o(N),this.data=new Uint32Array(N.buffer)}else{var nA=N;this.data=nA.data,this.highStart=nA.highStart,this.errorValue=nA.errorValue}}return y.prototype.get=function(Y){return Y<0||Y>1114111?this.errorValue:Y<55296||Y>56319&&Y<=65535?this.data[(this.data[Y>>5]<<2)+(31&Y)]:Y<=65535?this.data[(this.data[2048+(Y-55296>>5)]<<2)+(31&Y)]:Y>11)]+(Y>>5&63)]<<2)+(31&Y)]:this.data[this.data.length-4]},y}()},1753:function(S,I,n){"use strict";n(6992),n(1539),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(9135);var c=18===new Uint8Array(new Uint32Array([305419896]).buffer)[0],r=function(a,B,E){var u=a[B];a[B]=a[E],a[E]=u};S.exports={swap32LE:function(a){c&&function(a){for(var B=a.length,E=0;E/)){for(;ot=At();)VA.childNodes.push(ot),ot.parentNode=VA,VA.textContent+=3===ot.nodeType||4===ot.nodeType?ot.nodeValue:ot.textContent;return(RA=tt.match(/^<\/([\w:.-]+)\s*>/,!0))?(RA[1]===VA.nodeName||(re('parseXml: tag not matching, opening "'+VA.nodeName+'" & closing "'+RA[1]+'"'),LA=!0),VA):(re('parseXml: tag not matching, opening "'+VA.nodeName+'" & not closing'),LA=!0,VA)}if(tt.match(/^\/>/))return VA;re('parseXml: tag could not be parsed "'+VA.nodeName+'"'),LA=!0}else{if(RA=tt.match(/^/))return new YA(null,8,RA,LA);if(RA=tt.match(/^<\?[\s\S]*?\?>/))return new YA(null,7,RA,LA);if(RA=tt.match(/^/))return new YA(null,10,RA,LA);if(RA=tt.match(/^/,!0))return new YA("#cdata-section",4,RA[1],LA);if(RA=tt.match(/^([^<]+)/,!0))return new YA("#text",3,_(RA[1]),LA)}};bA=HA();)1!==bA.nodeType||UA?(1===bA.nodeType||3===bA.nodeType&&""!==bA.nodeValue.trim())&&re("parseXml: data after document end has been discarded"):UA=bA;return tt.matchAll()&&re("parseXml: parsing error"),UA}function _(ZA){return ZA.replace(/&(?:#([0-9]+)|#[xX]([0-9A-Fa-f]+)|([0-9A-Za-z]+));/g,function(YA,tt,UA,bA){return tt?String.fromCharCode(parseInt(tt,10)):UA?String.fromCharCode(parseInt(UA,16)):bA&&C[bA]?String.fromCharCode(C[bA]):YA})}function uA(ZA){var YA,tt;return ZA=(ZA||"").trim(),(YA=E[ZA])?tt=[YA.slice(),1]:(YA=ZA.match(/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)$/i))?(YA[1]=parseInt(YA[1]),YA[2]=parseInt(YA[2]),YA[3]=parseInt(YA[3]),YA[4]=parseFloat(YA[4]),YA[1]<256&&YA[2]<256&&YA[3]<256&&YA[4]<=1&&(tt=[YA.slice(1,4),YA[4]])):(YA=ZA.match(/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$/i))?(YA[1]=parseInt(YA[1]),YA[2]=parseInt(YA[2]),YA[3]=parseInt(YA[3]),YA[1]<256&&YA[2]<256&&YA[3]<256&&(tt=[YA.slice(1,4),1])):(YA=ZA.match(/^rgb\(\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/i))?(YA[1]=2.55*parseFloat(YA[1]),YA[2]=2.55*parseFloat(YA[2]),YA[3]=2.55*parseFloat(YA[3]),YA[1]<256&&YA[2]<256&&YA[3]<256&&(tt=[YA.slice(1,4),1])):(YA=ZA.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i))?tt=[[parseInt(YA[1],16),parseInt(YA[2],16),parseInt(YA[3],16)],1]:(YA=ZA.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i))&&(tt=[[17*parseInt(YA[1],16),17*parseInt(YA[2],16),17*parseInt(YA[3],16)],1]),rn?rn(tt,ZA):tt}function pA(ZA,YA,tt){var UA=ZA[0].slice(),bA=ZA[1]*YA;if(tt){for(var LA=0;LA=0;YA--)ZA=cA(Hn[YA].savedMatrix,ZA);return ZA}function yA(){return(new WA).M(0,0).L(o.page.width,0).L(o.page.width,o.page.height).L(0,o.page.height).transform(FA(BA())).getBoundingBox()}function FA(ZA){var YA=ZA[0]*ZA[3]-ZA[1]*ZA[2];return[ZA[3]/YA,-ZA[1]/YA,-ZA[2]/YA,ZA[0]/YA,(ZA[2]*ZA[5]-ZA[3]*ZA[4])/YA,(ZA[1]*ZA[4]-ZA[0]*ZA[5])/YA]}function $(ZA){var YA=zA(ZA[0]),tt=zA(ZA[1]),UA=zA(ZA[2]),bA=zA(ZA[3]),LA=zA(ZA[4]),HA=zA(ZA[5]);if(SA(YA*bA-tt*UA,0))return[YA,tt,UA,bA,LA,HA]}function MA(ZA){var YA=ZA[2]||0,tt=ZA[1]||0,UA=ZA[0]||0;if(dA(YA,0)&&dA(tt,0))return[];if(dA(YA,0))return[-UA/tt];var bA=tt*tt-4*YA*UA;return SA(bA,0)&&bA>0?[(-tt+Math.sqrt(bA))/(2*YA),(-tt-Math.sqrt(bA))/(2*YA)]:dA(bA,0)?[-tt/(2*YA)]:[]}function fA(ZA,YA){return(YA[0]||0)+(YA[1]||0)*ZA+(YA[2]||0)*ZA*ZA+(YA[3]||0)*ZA*ZA*ZA}function dA(ZA,YA){return Math.abs(ZA-YA)<1e-10}function SA(ZA,YA){return Math.abs(ZA-YA)>=1e-10}function zA(ZA){return ZA>-1e21&&ZA<1e21?Math.round(1e6*ZA)/1e6:0}function q(ZA){for(var UA,YA=new mt((ZA||"").trim()),tt=[1,0,0,1,0,0];UA=YA.match(/^([A-Za-z]+)\s*[(]([^(]+)[)]/,!0);){for(var bA=UA[1],LA=[],HA=new mt(UA[2].trim()),At=void 0;At=HA.matchNumber();)LA.push(Number(At)),HA.matchSeparator();if("matrix"===bA&&6===LA.length)tt=cA(tt,[LA[0],LA[1],LA[2],LA[3],LA[4],LA[5]]);else if("translate"===bA&&2===LA.length)tt=cA(tt,[1,0,0,1,LA[0],LA[1]]);else if("translate"===bA&&1===LA.length)tt=cA(tt,[1,0,0,1,LA[0],0]);else if("scale"===bA&&2===LA.length)tt=cA(tt,[LA[0],0,0,LA[1],0,0]);else if("scale"===bA&&1===LA.length)tt=cA(tt,[LA[0],0,0,LA[0],0,0]);else if("rotate"===bA&&3===LA.length){var RA=LA[0]*Math.PI/180;tt=cA(tt,[1,0,0,1,LA[1],LA[2]],[Math.cos(RA),Math.sin(RA),-Math.sin(RA),Math.cos(RA),0,0],[1,0,0,1,-LA[1],-LA[2]])}else if("rotate"===bA&&1===LA.length){var ot=LA[0]*Math.PI/180;tt=cA(tt,[Math.cos(ot),Math.sin(ot),-Math.sin(ot),Math.cos(ot),0,0])}else if("skewX"===bA&&1===LA.length){var VA=LA[0]*Math.PI/180;tt=cA(tt,[1,0,Math.tan(VA),1,0,0])}else{if("skewY"!==bA||1!==LA.length)return;var Qt=LA[0]*Math.PI/180;tt=cA(tt,[1,Math.tan(Qt),0,1,0,0])}YA.matchSeparator()}if(!YA.matchAll())return tt}function O(ZA,YA,tt,UA,bA,LA){var HA=(ZA||"").trim().match(/^(none)$|^x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?$/)||[],At=HA[1]||HA[4]||"meet",VA=YA/UA,Qt=tt/bA,St={Min:0,Mid:.5,Max:1}[HA[2]||"Mid"]-(LA||0),Ut={Min:0,Mid:.5,Max:1}[HA[3]||"Mid"]-(LA||0);return"slice"===At?Qt=VA=Math.max(VA,Qt):"meet"===At&&(Qt=VA=Math.min(VA,Qt)),[VA,0,0,Qt,St*(YA-UA*VA),Ut*(tt-bA*Qt)]}function AA(ZA){var YA=Object.create(null);ZA=(ZA||"").trim().split(/;/);for(var tt=0;tthe&&(jt=he,he=Be,Be=jt),qt>ue&&(jt=ue,ue=qt,qt=jt);for(var ye=MA(St),He=0;He=0&&ye[He]<=1){var Ne=fA(ye[He],VA);Nehe&&(he=Ne)}for(var Ye=MA(Ut),Ue=0;Ue=0&&Ye[Ue]<=1){var tn=fA(Ye[Ue],Qt);tnue&&(ue=tn)}return[Be,qt,he,ue]},this.getPointAtLength=function(jt){if(dA(jt,0))return this.startPoint;if(dA(jt,this.totalLength))return this.endPoint;if(!(jt<0||jt>this.totalLength))for(var Be=1;Be<=ot;Be++){var qt=kt[Be-1],he=kt[Be];if(qt<=jt&&jt<=he){var ue=(Be-(he-jt)/(he-qt))/ot,ye=fA(ue,VA),He=fA(ue,Qt),Ne=fA(ue,St),Ye=fA(ue,Ut);return[ye,He,Math.atan2(Ye,Ne)]}}}},JA=function(YA,tt,UA,bA){this.totalLength=Math.sqrt((UA-YA)*(UA-YA)+(bA-tt)*(bA-tt)),this.startPoint=[YA,tt,Math.atan2(bA-tt,UA-YA)],this.endPoint=[UA,bA,Math.atan2(bA-tt,UA-YA)],this.getBoundingBox=function(){return[Math.min(this.startPoint[0],this.endPoint[0]),Math.min(this.startPoint[1],this.endPoint[1]),Math.max(this.startPoint[0],this.endPoint[0]),Math.max(this.startPoint[1],this.endPoint[1])]},this.getPointAtLength=function(LA){if(LA>=0&&LA<=this.totalLength){var HA=LA/this.totalLength||0;return[this.startPoint[0]+HA*(this.endPoint[0]-this.startPoint[0]),this.startPoint[1]+HA*(this.endPoint[1]-this.startPoint[1]),this.startPoint[2]]}}},WA=function ZA(){this.pathCommands=[],this.pathSegments=[],this.startPoint=null,this.endPoint=null,this.totalLength=0;var LA,HA,At,YA=0,tt=0,UA=0,bA=0;this.move=function(RA,ot){return YA=UA=RA,tt=bA=ot,null},this.line=function(RA,ot){var VA=new JA(UA,bA,RA,ot);return UA=RA,bA=ot,VA},this.curve=function(RA,ot,VA,Qt,St,Ut){var kt=new ht(UA,bA,RA,ot,VA,Qt,St,Ut);return UA=St,bA=Ut,kt},this.close=function(){var RA=new JA(UA,bA,YA,tt);return UA=YA,bA=tt,RA},this.addCommand=function(RA){this.pathCommands.push(RA);var ot=this[RA[0]].apply(this,RA.slice(3));ot&&(ot.hasStart=RA[1],ot.hasEnd=RA[2],this.startPoint=this.startPoint||ot.startPoint,this.endPoint=ot.endPoint,this.pathSegments.push(ot),this.totalLength+=ot.totalLength)},this.M=function(RA,ot){return this.addCommand(["move",!0,!0,RA,ot]),LA="M",this},this.m=function(RA,ot){return this.M(UA+RA,bA+ot)},this.Z=this.z=function(){return this.addCommand(["close",!0,!0]),LA="Z",this},this.L=function(RA,ot){return this.addCommand(["line",!0,!0,RA,ot]),LA="L",this},this.l=function(RA,ot){return this.L(UA+RA,bA+ot)},this.H=function(RA){return this.L(RA,bA)},this.h=function(RA){return this.L(UA+RA,bA)},this.V=function(RA){return this.L(UA,RA)},this.v=function(RA){return this.L(UA,bA+RA)},this.C=function(RA,ot,VA,Qt,St,Ut){return this.addCommand(["curve",!0,!0,RA,ot,VA,Qt,St,Ut]),LA="C",HA=VA,At=Qt,this},this.c=function(RA,ot,VA,Qt,St,Ut){return this.C(UA+RA,bA+ot,UA+VA,bA+Qt,UA+St,bA+Ut)},this.S=function(RA,ot,VA,Qt){return this.C(UA+("C"===LA?UA-HA:0),bA+("C"===LA?bA-At:0),RA,ot,VA,Qt)},this.s=function(RA,ot,VA,Qt){return this.C(UA+("C"===LA?UA-HA:0),bA+("C"===LA?bA-At:0),UA+RA,bA+ot,UA+VA,bA+Qt)},this.Q=function(RA,ot,VA,Qt){return this.addCommand(["curve",!0,!0,UA+.6666666666666666*(RA-UA),bA+2/3*(ot-bA),VA+2/3*(RA-VA),Qt+2/3*(ot-Qt),VA,Qt]),LA="Q",HA=RA,At=ot,this},this.q=function(RA,ot,VA,Qt){return this.Q(UA+RA,bA+ot,UA+VA,bA+Qt)},this.T=function(RA,ot){return this.Q(UA+("Q"===LA?UA-HA:0),bA+("Q"===LA?bA-At:0),RA,ot)},this.t=function(RA,ot){return this.Q(UA+("Q"===LA?UA-HA:0),bA+("Q"===LA?bA-At:0),UA+RA,bA+ot)},this.A=function(RA,ot,VA,Qt,St,Ut,kt){if(dA(RA,0)||dA(ot,0))this.addCommand(["line",!0,!0,Ut,kt]);else{VA*=Math.PI/180,RA=Math.abs(RA),ot=Math.abs(ot),Qt=1*!!Qt,St=1*!!St;var Wt=Math.cos(VA)*(UA-Ut)/2+Math.sin(VA)*(bA-kt)/2,ne=Math.cos(VA)*(bA-kt)/2-Math.sin(VA)*(UA-Ut)/2,wt=Wt*Wt/(RA*RA)+ne*ne/(ot*ot);wt>1&&(RA*=Math.sqrt(wt),ot*=Math.sqrt(wt));var bt=Math.sqrt(Math.max(0,RA*RA*ot*ot-RA*RA*ne*ne-ot*ot*Wt*Wt)/(RA*RA*ne*ne+ot*ot*Wt*Wt)),Zt=(Qt===St?-1:1)*bt*RA*ne/ot,jt=(Qt===St?1:-1)*bt*ot*Wt/RA,Be=Math.cos(VA)*Zt-Math.sin(VA)*jt+(UA+Ut)/2,qt=Math.sin(VA)*Zt+Math.cos(VA)*jt+(bA+kt)/2,he=Math.atan2((ne-jt)/ot,(Wt-Zt)/RA),ue=Math.atan2((-ne-jt)/ot,(-Wt-Zt)/RA);0===St&&ue-he>0?ue-=2*Math.PI:1===St&&ue-he<0&&(ue+=2*Math.PI);for(var ye=Math.ceil(Math.abs(ue-he)/(Math.PI/Gn)),He=0;HeRA[2]&&(RA[2]=Qt[2]),Qt[1]RA[3]&&(RA[3]=Qt[3]);return RA[0]===1/0&&(RA[0]=0),RA[1]===1/0&&(RA[1]=0),RA[2]===-1/0&&(RA[2]=0),RA[3]===-1/0&&(RA[3]=0),RA},this.getPointAtLength=function(RA){if(RA>=0&&RA<=this.totalLength){for(var ot,VA=0;VAbA.selector.specificity||(YA[LA]=bA.css[LA],tt[LA]=bA.selector.specificity)}return YA}(YA),this.allowedChildren=[],this.attr=function(LA){if("function"==typeof YA.getAttribute)return YA.getAttribute(LA)},this.resolveUrl=function(LA){var HA=(LA||"").match(/^\s*(?:url\("(.*)#(.*)"\)|url\('(.*)#(.*)'\)|url\((.*)#(.*)\)|(.*)#(.*))\s*$/)||[],At=HA[1]||HA[3]||HA[5]||HA[7],RA=HA[2]||HA[4]||HA[6]||HA[8];if(RA){if(!At){var ot=l.getElementById(RA);if(ot)return-1===this.stack.indexOf(ot)?ot:void re('SVGtoPDF: loop of circular references for id "'+RA+'"')}if($e){var VA=Kt[At];if(!VA){(function XA(ZA){return"object"==typeof ZA&&null!==ZA&&"number"==typeof ZA.length})(VA=$e(At))||(VA=[VA]);for(var Qt=0;Qt=0&&At[3]>=0?At:HA},this.getPercent=function(LA,HA){var At=this.attr(LA),RA=new mt((At||"").trim()),Qt=RA.matchNumber();return!Qt||(RA.match("%")&&(Qt*=.01),RA.matchAll())?HA:Math.max(0,Math.min(1,Qt))},this.chooseValue=function(LA){for(var HA=0;HA=0&&(RA=VA);break;case"stroke-miterlimit":null!=(VA=parseFloat(At))&&VA>=1&&(RA=VA);break;case"word-spacing":case"letter-spacing":RA=this.computeLength(At,this.getViewport());break;case"stroke-dashoffset":if(null!=(RA=this.computeLength(At,this.getViewport()))&&RA<0)for(var ne=this.get("stroke-dasharray"),wt=0;wt0?HA:this.ref?this.ref.getChildren():[]},this.getPaint=function(HA,At,RA,ot){var VA="userSpaceOnUse"!==this.attr("patternUnits"),Qt="objectBoundingBox"===this.attr("patternContentUnits"),St=this.getLength("x",VA?1:this.getParentVWidth(),0),Ut=this.getLength("y",VA?1:this.getParentVHeight(),0),kt=this.getLength("width",VA?1:this.getParentVWidth(),0),Wt=this.getLength("height",VA?1:this.getParentVHeight(),0);Qt&&!VA?(St=(St-HA[0])/(HA[2]-HA[0])||0,Ut=(Ut-HA[1])/(HA[3]-HA[1])||0,kt=kt/(HA[2]-HA[0])||0,Wt=Wt/(HA[3]-HA[1])||0):!Qt&&VA&&(St=HA[0]+St*(HA[2]-HA[0]),Ut=HA[1]+Ut*(HA[3]-HA[1]),kt*=HA[2]-HA[0],Wt*=HA[3]-HA[1]);var ne=this.getViewbox("viewBox",[0,0,kt,Wt]),bt=cA(O((this.attr("preserveAspectRatio")||"").trim(),kt,Wt,ne[2],ne[3],0),[1,0,0,1,-ne[0],-ne[1]]),Zt=q(this.attr("patternTransform"));if(Qt&&(Zt=cA([HA[2]-HA[0],0,0,HA[3]-HA[1],HA[0],HA[1]],Zt)),(Zt=$(Zt=cA(Zt,[1,0,0,1,St,Ut])))&&(bt=$(bt))&&(kt=zA(kt))&&(Wt=zA(Wt))){var jt=w([0,0,kt,Wt]);return o.transform.apply(o,bt),this.drawChildren(RA,ot),Q(jt),[x(jt,kt,Wt,Zt),At]}return UA?[UA[0],UA[1]*At]:void 0},this.getVWidth=function(){var HA="userSpaceOnUse"!==this.attr("patternUnits"),At=this.getLength("width",HA?1:this.getParentVWidth(),0);return this.getViewbox("viewBox",[0,0,At,0])[2]},this.getVHeight=function(){var HA="userSpaceOnUse"!==this.attr("patternUnits"),At=this.getLength("height",HA?1:this.getParentVHeight(),0);return this.getViewbox("viewBox",[0,0,0,At])[3]}},PA=function ZA(YA,tt,UA){it.call(this,YA,tt),this.allowedChildren=["stop"],this.ref=function(){var HA=this.getUrl("href")||this.getUrl("xlink:href");if(HA&&HA.nodeName===YA.nodeName)return new ZA(HA,tt,UA)}.call(this);var bA=this.attr;this.attr=function(HA){var At=bA.call(this,HA);return null!=At||"href"===HA||"xlink:href"===HA?At:this.ref?this.ref.attr(HA):null};var LA=this.getChildren;this.getChildren=function(){var HA=LA.call(this);return HA.length>0?HA:this.ref?this.ref.getChildren():[]},this.getPaint=function(HA,At,RA,ot){var VA=this.getChildren();if(0!==VA.length){if(1===VA.length){var Qt=VA[0],St=Qt.get("stop-color");return"none"===St?void 0:pA(St,Qt.get("stop-opacity")*At,ot)}var ne,wt,bt,Zt,jt,Be,Ut="userSpaceOnUse"!==this.attr("gradientUnits"),kt=q(this.attr("gradientTransform")),Wt=this.attr("spreadMethod"),qt=0,he=0,ue=1;if(Ut&&(kt=cA([HA[2]-HA[0],0,0,HA[3]-HA[1],HA[0],HA[1]],kt)),kt=$(kt)){if("linearGradient"===this.name)wt=this.getLength("x1",Ut?1:this.getVWidth(),0),bt=this.getLength("x2",Ut?1:this.getVWidth(),Ut?1:this.getVWidth()),Zt=this.getLength("y1",Ut?1:this.getVHeight(),0),jt=this.getLength("y2",Ut?1:this.getVHeight(),0);else{bt=this.getLength("cx",Ut?1:this.getVWidth(),Ut?.5:.5*this.getVWidth()),jt=this.getLength("cy",Ut?1:this.getVHeight(),Ut?.5:.5*this.getVHeight()),Be=this.getLength("r",Ut?1:this.getViewport(),Ut?.5:.5*this.getViewport()),wt=this.getLength("fx",Ut?1:this.getVWidth(),bt),Zt=this.getLength("fy",Ut?1:this.getVHeight(),jt),Be<0&&re("SvgElemGradient: negative r value");var ye=Math.sqrt(Math.pow(bt-wt,2)+Math.pow(jt-Zt,2)),He=1;ye>Be&&(wt=bt+(wt-bt)*(He=Be/ye),Zt=jt+(Zt-jt)*He),Be=Math.max(Be,ye*He*1.000001)}if("reflect"===Wt||"repeat"===Wt){var Ne=FA(kt),Ye=gA([HA[0],HA[1]],Ne),Ue=gA([HA[2],HA[1]],Ne),tn=gA([HA[2],HA[3]],Ne),Fn=gA([HA[0],HA[3]],Ne);"linearGradient"===this.name?(qt=Math.max((Ye[0]-bt)*(bt-wt)+(Ye[1]-jt)*(jt-Zt),(Ue[0]-bt)*(bt-wt)+(Ue[1]-jt)*(jt-Zt),(tn[0]-bt)*(bt-wt)+(tn[1]-jt)*(jt-Zt),(Fn[0]-bt)*(bt-wt)+(Fn[1]-jt)*(jt-Zt))/(Math.pow(bt-wt,2)+Math.pow(jt-Zt,2)),he=Math.max((Ye[0]-wt)*(wt-bt)+(Ye[1]-Zt)*(Zt-jt),(Ue[0]-wt)*(wt-bt)+(Ue[1]-Zt)*(Zt-jt),(tn[0]-wt)*(wt-bt)+(tn[1]-Zt)*(Zt-jt),(Fn[0]-wt)*(wt-bt)+(Fn[1]-Zt)*(Zt-jt))/(Math.pow(bt-wt,2)+Math.pow(jt-Zt,2))):qt=Math.sqrt(Math.max(Math.pow(Ye[0]-bt,2)+Math.pow(Ye[1]-jt,2),Math.pow(Ue[0]-bt,2)+Math.pow(Ue[1]-jt,2),Math.pow(tn[0]-bt,2)+Math.pow(tn[1]-jt,2),Math.pow(Fn[0]-bt,2)+Math.pow(Fn[1]-jt,2)))/Be-1,qt=Math.ceil(qt+.5),ue=(he=Math.ceil(he+.5))+1+qt}ne="linearGradient"===this.name?o.linearGradient(wt-he*(bt-wt),Zt-he*(jt-Zt),bt+qt*(bt-wt),jt+qt*(jt-Zt)):o.radialGradient(wt,Zt,0,bt,jt,Be+qt*Be);for(var on=0;on0&&ne.stop((on+0)/ue,un[0],un[1]),ne.stop((on+mn)/(qt+he+1),un[0],un[1]),sn===VA.length-1&&mn<1&&ne.stop((on+1)/ue,un[0],un[1])}return ne.setTransform.apply(ne,kt),[ne,1]}return UA?[UA[0],UA[1]*At]:void 0}}},rA=function(YA,tt){xA.call(this,YA,tt),this.dashScale=1,this.getBoundingShape=function(){return this.shape},this.getTransformation=function(){return this.get("transform")},this.drawInDocument=function(UA,bA){if("hidden"!==this.get("visibility")&&this.shape){if(o.save(),this.transform(),this.clip(),UA)this.shape.insertInDocument(),R(u.white),o.fill(this.get("clip-rule"));else{var HA;this.mask()&&(HA=w(yA()));var At=this.shape.getSubPaths(),RA=this.getFill(UA,bA),ot=this.getStroke(UA,bA),VA=this.get("stroke-width"),Qt=this.get("stroke-linecap");if(RA||ot){if(RA&&R(RA),ot){for(var St=0;St0&&At[St].startPoint&&At[St].startPoint.length>1){var Ut=At[St].startPoint[0],kt=At[St].startPoint[1];R(ot),"square"===Qt?o.rect(Ut-.5*VA,kt-.5*VA,VA,VA):"round"===Qt&&o.circle(Ut,kt,.5*VA),o.fill()}var Wt=this.get("stroke-dasharray"),ne=this.get("stroke-dashoffset");if(SA(this.dashScale,1)){for(var wt=0;wt0&&At[bt].insertInDocument();RA&&ot?o.fillAndStroke(this.get("fill-rule")):RA?o.fill(this.get("fill-rule")):ot&&o.stroke()}var Zt=this.get("marker-start"),jt=this.get("marker-mid"),Be=this.get("marker-end");if("none"!==Zt||"none"!==jt||"none"!==Be){var qt=this.shape.getMarkers();if("none"!==Zt&&new lt(Zt,null).drawMarker(!1,bA,qt[0],VA),"none"!==jt)for(var ue=1;ue0&&HA>0?At&&RA?(At=Math.min(At,.5*LA),RA=Math.min(RA,.5*HA),this.shape=(new WA).M(UA+At,bA).L(UA+LA-At,bA).A(At,RA,0,0,1,UA+LA,bA+RA).L(UA+LA,bA+HA-RA).A(At,RA,0,0,1,UA+LA-At,bA+HA).L(UA+At,bA+HA).A(At,RA,0,0,1,UA,bA+HA-RA).L(UA,bA+RA).A(At,RA,0,0,1,UA+At,bA).Z()):this.shape=(new WA).M(UA,bA).L(UA+LA,bA).L(UA+LA,bA+HA).L(UA,bA+HA).Z():this.shape=new WA},Yt=function(YA,tt){rA.call(this,YA,tt);var UA=this.getLength("cx",this.getVWidth(),0),bA=this.getLength("cy",this.getVHeight(),0),LA=this.getLength("r",this.getViewport(),0);this.shape=LA>0?(new WA).M(UA+LA,bA).A(LA,LA,0,0,1,UA-LA,bA).A(LA,LA,0,0,1,UA+LA,bA).Z():new WA},j=function(YA,tt){rA.call(this,YA,tt);var UA=this.getLength("cx",this.getVWidth(),0),bA=this.getLength("cy",this.getVHeight(),0),LA=this.getLength("rx",this.getVWidth(),0),HA=this.getLength("ry",this.getVHeight(),0);this.shape=LA>0&&HA>0?(new WA).M(UA+LA,bA).A(LA,HA,0,0,1,UA-LA,bA).A(LA,HA,0,0,1,UA+LA,bA).Z():new WA},qA=function(YA,tt){rA.call(this,YA,tt);var UA=this.getLength("x1",this.getVWidth(),0),bA=this.getLength("y1",this.getVHeight(),0),LA=this.getLength("x2",this.getVWidth(),0),HA=this.getLength("y2",this.getVHeight(),0);this.shape=(new WA).M(UA,bA).L(LA,HA)},KA=function(YA,tt){rA.call(this,YA,tt);var UA=this.getNumberList("points");this.shape=new WA;for(var bA=0;bA0?UA:void 0,this.dashScale=void 0!==this.pathLength?this.shape.totalLength/this.pathLength:1},lt=function(YA,tt){Mt.call(this,YA,tt);var UA=this.getLength("markerWidth",this.getParentVWidth(),3),bA=this.getLength("markerHeight",this.getParentVHeight(),3),LA=this.getViewbox("viewBox",[0,0,UA,bA]);this.getVWidth=function(){return LA[2]},this.getVHeight=function(){return LA[3]},this.drawMarker=function(HA,At,RA,ot){o.save();var VA=this.attr("orient"),Qt=this.attr("markerUnits"),St="auto"===VA?RA[2]:(parseFloat(VA)||0)*Math.PI/180,Ut="userSpaceOnUse"===Qt?1:ot;o.transform(Math.cos(St)*Ut,Math.sin(St)*Ut,-Math.sin(St)*Ut,Math.cos(St)*Ut,RA[0],RA[1]);var wt,kt=this.getLength("refX",this.getVWidth(),0),Wt=this.getLength("refY",this.getVHeight(),0),ne=O(this.attr("preserveAspectRatio"),UA,bA,LA[2],LA[3],.5);"hidden"===this.get("overflow")&&o.rect(ne[0]*(LA[0]+LA[2]/2-kt)-UA/2,ne[3]*(LA[1]+LA[3]/2-Wt)-bA/2,UA,bA).clip(),o.transform.apply(o,ne),o.translate(-kt,-Wt),this.get("opacity")<1&&!HA&&(wt=w(yA())),this.drawChildren(HA,At),wt&&(Q(wt),o.fillOpacity(this.get("opacity")),m(wt)),o.restore()}},zt=function(YA,tt){Mt.call(this,YA,tt),this.useMask=function(UA){var bA=w(yA());o.save(),"objectBoundingBox"===this.attr("clipPathUnits")&&o.transform(UA[2]-UA[0],0,0,UA[3]-UA[1],UA[0],UA[1]),this.clip(),this.drawChildren(!0,!1),o.restore(),Q(bA),T(bA,!0)}},xt=function(YA,tt){Mt.call(this,YA,tt),this.useMask=function(UA){var LA,HA,At,RA,bA=w(yA());o.save(),"userSpaceOnUse"===this.attr("maskUnits")?(LA=this.getLength("x",this.getVWidth(),-.1*(UA[2]-UA[0])+UA[0]),HA=this.getLength("y",this.getVHeight(),-.1*(UA[3]-UA[1])+UA[1]),At=this.getLength("width",this.getVWidth(),1.2*(UA[2]-UA[0])),RA=this.getLength("height",this.getVHeight(),1.2*(UA[3]-UA[1]))):(LA=this.getLength("x",this.getVWidth(),-.1)*(UA[2]-UA[0])+UA[0],HA=this.getLength("y",this.getVHeight(),-.1)*(UA[3]-UA[1])+UA[1],At=this.getLength("width",this.getVWidth(),1.2)*(UA[2]-UA[0]),RA=this.getLength("height",this.getVHeight(),1.2)*(UA[3]-UA[1])),o.rect(LA,HA,At,RA).clip(),"objectBoundingBox"===this.attr("maskContentUnits")&&o.transform(UA[2]-UA[0],0,0,UA[3]-UA[1],UA[0],UA[1]),this.clip(),this.drawChildren(!1,!0),o.restore(),Q(bA),T(bA,!0)}},Lt=function(YA,tt){xA.call(this,YA,tt),this.allowedChildren=["tspan","#text","#cdata-section","a"],this.isText=!0,this.getBoundingShape=function(){for(var UA=new WA,bA=0;bA Tj")}o.addContent("ET")}}}"line-through"===this.get("text-decoration")&&this.decorate(.05*this._font.size,.5*(GA(this._font.font,this._font.size)+et(this._font.font,this._font.size)),UA,bA)},this.decorate=function(UA,bA,LA,HA){var At=this.getFill(LA,HA),RA=this.getStroke(LA,HA);At&&R(At),RA&&(P(RA),o.lineWidth(this.get("stroke-width")).miterLimit(this.get("stroke-miterlimit")).lineJoin(this.get("stroke-linejoin")).lineCap(this.get("stroke-linecap")).dash(this.get("stroke-dasharray"),{phase:this.get("stroke-dashoffset")}));for(var ot=0,VA=this._pos;ot0?HA:this.pathObject.totalLength,this.pathScale=this.pathObject.totalLength/this.pathLength}else if((LA=this.getUrl("href")||this.getUrl("xlink:href"))&&"path"===LA.nodeName){var At=new jA(LA,this);this.pathObject=At.shape.clone().transform(At.get("transform")),this.pathLength=this.chooseValue(At.pathLength,this.pathObject.totalLength),this.pathScale=this.pathObject.totalLength/this.pathLength}},ee=function(YA,tt){Lt.call(this,YA,tt),this.allowedChildren=["textPath","tspan","#text","#cdata-section","a"],function(UA){var RA,ot,bA="",LA=YA.textContent,HA=[],At=[],VA=0,Qt=0;function St(){if(At.length)for(var wt=At[At.length-1],jt={startltr:0,middleltr:.5,endltr:1,startrtl:1,middlertl:.5,endrtl:0}[RA+ot]*(wt.x+wt.width-At[0].x)||0,Be=0;BeZt||he<0)wt._pos[qt].hidden=!0;else{var ue=bt.getPointAtLength(he*jt);SA(jt,1)&&(wt._pos[qt].scale*=jt,wt._pos[qt].width*=jt),wt._pos[qt].x=ue[0]-.5*wt._pos[qt].width*Math.cos(ue[2])-wt._pos[qt].y*Math.sin(ue[2]),wt._pos[qt].y=ue[1]-.5*wt._pos[qt].width*Math.sin(ue[2])+wt._pos[qt].y*Math.cos(ue[2]),wt._pos[qt].rotate=ue[2]+wt._pos[qt].rotate,wt._pos[qt].continuous=!1}}else for(var ye=0;ye0&&ue<1/0)for(var ye=0;ye=2)for(var He=(bt-(he-qt))/(wt.length-1),Ne=0;Ne0?m-4:m;for(y=0;y>16&255,x[M++]=w>>8&255,x[M++]=255&w;return 2===T&&(w=c[g.charCodeAt(y)]<<2|c[g.charCodeAt(y+1)]>>4,x[M++]=255&w),1===T&&(w=c[g.charCodeAt(y)]<<10|c[g.charCodeAt(y+1)]<<4|c[g.charCodeAt(y+2)]>>2,x[M++]=w>>8&255,x[M++]=255&w),x},I.fromByteArray=function f(g){for(var w,Q=g.length,m=Q%3,T=[],x=16383,M=0,D=Q-m;MD?D:M+x));return 1===m?T.push(n[(w=g[Q-1])>>2]+n[w<<4&63]+"=="):2===m&&T.push(n[(w=(g[Q-2]<<8)+g[Q-1])>>10]+n[w>>4&63]+n[w<<2&63]+"="),T.join("")};for(var n=[],c=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,h=o.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var Q=g.indexOf("=");return-1===Q&&(Q=w),[Q,Q===w?0:4-Q%4]}function C(g){return n[g>>18&63]+n[g>>12&63]+n[g>>6&63]+n[63&g]}function e(g,w,Q){for(var T=[],x=w;x0},o.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var l=this.buf_ptr_,h=this.input_.read(this.buf_,l,I);if(h<0)throw new Error("Unexpected end of input");if(h=8;)this.val_>>>=8,this.val_|=this.buf_[8191&this.pos_]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},o.prototype.readBits=function(l){32-this.bit_pos_>>this.bit_pos_&r[l];return this.bit_pos_+=l,h},S.exports=o},7080:function(S,I){I.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),I.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},6450:function(S,I,n){var r=n(6154).g,o=n(6154).j,l=n(4181),h=n(5139),a=n(966).h,B=n(966).g,E=n(7080),u=n(8435),C=n(2973),D=1080,b=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),Y=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),R=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),P=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function nA(AA){var W;return 0===AA.readBits(1)?16:(W=AA.readBits(3))>0?17+W:(W=AA.readBits(3))>0?8+W:17}function lA(AA){if(AA.readBits(1)){var W=AA.readBits(3);return 0===W?1:AA.readBits(W)+(1<1&&0===wA)throw new Error("Invalid size byte");W.meta_block_length|=wA<<8*iA}}else for(iA=0;iA4&&0===GA)throw new Error("Invalid size nibble");W.meta_block_length|=GA<<4*iA}return++W.meta_block_length,!W.input_end&&!W.is_metadata&&(W.is_uncompressed=AA.readBits(1)),W}function pA(AA,W,EA){var iA;return EA.fillBitWindow(),(iA=AA[W+=EA.val_>>>EA.bit_pos_&255].bits-8)>0&&(EA.bit_pos_+=8,W+=AA[W].value,W+=EA.val_>>>EA.bit_pos_&(1<>=1,++TA;for(et=0;et0;++et){var Mt,it=b[et],xA=0;vA.fillBitWindow(),vA.bit_pos_+=WA[xA+=vA.val_>>>vA.bit_pos_&15].bits,mt[it]=Mt=WA[xA].value,0!==Mt&&(ht-=32>>Mt,++JA)}if(1!==JA&&0!==ht)throw new Error("[ReadHuffmanCode] invalid num_codes or space");!function cA(AA,W,EA,vA){for(var iA=0,wA=8,GA=0,et=0,st=32768,TA=[],at=0;at<32;at++)TA.push(new a(0,0));for(B(TA,0,5,AA,18);iA0;){var mt,It=0;if(vA.readMoreInput(),vA.fillBitWindow(),vA.bit_pos_+=TA[It+=vA.val_>>>vA.bit_pos_&31].bits,(mt=255&TA[It].value)<16)GA=0,EA[iA++]=mt,0!==mt&&(wA=mt,st-=32768>>mt);else{var JA,WA,ht=mt-14,it=0;if(16===mt&&(it=wA),et!==it&&(GA=0,et=it),JA=GA,GA>0&&(GA-=2,GA<<=ht),iA+(WA=(GA+=vA.readBits(ht)+3)-JA)>W)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var xA=0;xA>>5]),this.htrees=new Uint32Array(W)}function fA(AA,W){var wA,GA,EA={num_htrees:null,context_map:null},iA=0;W.readMoreInput();var et=EA.num_htrees=lA(W)+1,st=EA.context_map=new Uint8Array(AA);if(et<=1)return EA;for(W.readBits(1)&&(iA=W.readBits(4)+1),wA=[],GA=0;GA=AA)throw new Error("[DecodeContextMap] i >= context_map_size");st[GA]=0,++GA}else st[GA]=TA-iA,++GA}return W.readBits(1)&&function $(AA,W){var vA,EA=new Uint8Array(256);for(vA=0;vA<256;++vA)EA[vA]=vA;for(vA=0;vA=AA&&(at-=AA),vA[EA]=at,iA[et+(1&wA[st])]=at,++wA[st]}function SA(AA,W,EA,vA,iA,wA){var TA,GA=iA+1,et=EA&iA,st=wA.pos_&l.IBUF_MASK;if(W<8||wA.bit_pos_+(W<<3)0;)wA.readMoreInput(),vA[et++]=wA.readBits(8),et===GA&&(AA.write(vA,GA),et=0);else{if(wA.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;wA.bit_pos_<32;)vA[et]=wA.val_>>>wA.bit_pos_,wA.bit_pos_+=8,++et,--W;if(st+(TA=wA.bit_end_pos_-wA.bit_pos_>>3)>l.IBUF_MASK){for(var at=l.IBUF_MASK+1-st,It=0;It=GA)for(AA.write(vA,GA),et-=GA,It=0;It=GA;){if(wA.input_.read(vA,et,TA=GA-et)W.buffer.length){var re=new Uint8Array(vA+H);re.set(W.buffer),W.buffer=re}if(iA=xn.input_end,k=xn.is_uncompressed,xn.is_metadata)for(zA(Et);H>0;--H)Et.readMoreInput(),Et.readBits(8);else if(0!==H){if(k){Et.bit_pos_=Et.bit_pos_+7&-8,SA(W,H,vA,at,TA,Et),vA+=H;continue}for(EA=0;EA<3;++EA)CA[EA]=lA(Et)+1,CA[EA]>=2&&(gA(CA[EA]+2,xA,EA*D,Et),gA(26,Mt,EA*D,Et),z[EA]=BA(Mt,EA*D,Et),rA[EA]=1);for(Et.readMoreInput(),j=(1<<(gt=Et.readBits(2)))-1,qA=(Yt=16+(Et.readBits(4)<0;){var rn,$e,Gn,Hn,Kt,Gt,$t,le,pn,Tn,Xn,Ei;for(Et.readMoreInput(),0===z[1]&&(dA(CA[1],xA,1,QA,PA,rA,Et),z[1]=BA(Mt,D,Et),yn=it[1].htrees[QA[1]]),--z[1],($e=(rn=pA(it[1].codes,yn,Et))>>6)>=2?($e-=2,$t=-1):$t=0,Hn=u.kCopyRangeLut[$e]+(7&rn),Kt=u.kInsertLengthPrefixCode[Gn=u.kInsertRangeLut[$e]+(rn>>3&7)].offset+Et.readBits(u.kInsertLengthPrefixCode[Gn].nbits),Gt=u.kCopyLengthPrefixCode[Hn].offset+Et.readBits(u.kCopyLengthPrefixCode[Hn].nbits),JA=at[vA-1&TA],WA=at[vA-2&TA],pn=0;pn4?3:Gt-2))]],Et))>=Yt&&(Ei=($t-=Yt)&j,$t=Yt+((Sn=(2+(1&($t>>=gt))<<(Xn=1+($t>>1)))-4)+Et.readBits(Xn)<(et=vA=h.minDictionaryWordLength&&Gt<=h.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+vA+" distance: "+le+" len: "+Gt+" bytes left: "+H);var Sn=h.offsetsByLength[Gt],ZA=le-et-1,YA=h.sizeBitsByLength[Gt],bA=ZA>>YA;if(Sn+=(ZA&(1<=It){W.write(at,st);for(var HA=0;HA0&&(mt[3&ht]=le,++ht),Gt>H)throw new Error("Invalid backward reference. pos: "+vA+" distance: "+le+" len: "+Gt+" bytes left: "+H);for(pn=0;pn>=1;return(h&B-1)+B}function o(h,a,B,E,u){do{h[a+(E-=B)]=new n(u.bits,u.value)}while(E>0)}function l(h,a,B){for(var E=1<0;--b[f])o(h,a+w,Q,M,new n(255&f,65535&y[g++])),w=r(w,f);for(T=D-1,m=-1,f=B+1,Q=2;f<=c;++f,Q<<=1)for(;b[f]>0;--b[f])(w&T)!==m&&(a+=M,D+=M=1<<(x=l(b,f,B)),h[C+(m=w&T)]=new n(x+B&255,a-C-m&65535)),o(h,a+(w>>B),Q,M,new n(f-B&255,65535&y[g++])),w=r(w,f);return D}},8435:function(S,I){function n(c,r){this.offset=c,this.nbits=r}I.kBlockLengthPrefixCode=[new n(1,2),new n(5,2),new n(9,2),new n(13,2),new n(17,3),new n(25,3),new n(33,3),new n(41,3),new n(49,4),new n(65,4),new n(81,4),new n(97,4),new n(113,5),new n(145,5),new n(177,5),new n(209,5),new n(241,6),new n(305,6),new n(369,7),new n(497,8),new n(753,9),new n(1265,10),new n(2289,11),new n(4337,12),new n(8433,13),new n(16625,24)],I.kInsertLengthPrefixCode=[new n(0,0),new n(1,0),new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,1),new n(8,1),new n(10,2),new n(14,2),new n(18,3),new n(26,3),new n(34,4),new n(50,4),new n(66,5),new n(98,5),new n(130,6),new n(194,7),new n(322,8),new n(578,9),new n(1090,10),new n(2114,12),new n(6210,14),new n(22594,24)],I.kCopyLengthPrefixCode=[new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,0),new n(7,0),new n(8,0),new n(9,0),new n(10,1),new n(12,1),new n(14,2),new n(18,2),new n(22,3),new n(30,3),new n(38,4),new n(54,4),new n(70,5),new n(102,5),new n(134,6),new n(198,7),new n(326,8),new n(582,9),new n(1094,10),new n(2118,24)],I.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],I.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},6154:function(S,I){function n(r){this.buffer=r,this.pos=0}function c(r){this.buffer=r,this.pos=0}n.prototype.read=function(r,o,l){this.pos+l>this.buffer.length&&(l=this.buffer.length-this.pos);for(var h=0;hthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(r.subarray(0,o),this.pos),this.pos+=o,o},I.j=c},2973:function(S,I,n){var c=n(5139),f=10,g=11;function N(P,nA,lA){this.prefix=new Uint8Array(P.length),this.transform=nA,this.suffix=new Uint8Array(lA.length);for(var _=0;_'),new N("",0,"\n"),new N("",3,""),new N("",0,"]"),new N("",0," for "),new N("",14,""),new N("",2,""),new N("",0," a "),new N("",0," that "),new N(" ",f,""),new N("",0,". "),new N(".",0,""),new N(" ",0,", "),new N("",15,""),new N("",0," with "),new N("",0,"'"),new N("",0," from "),new N("",0," by "),new N("",16,""),new N("",17,""),new N(" the ",0,""),new N("",4,""),new N("",0,". The "),new N("",g,""),new N("",0," on "),new N("",0," as "),new N("",0," is "),new N("",7,""),new N("",1,"ing "),new N("",0,"\n\t"),new N("",0,":"),new N(" ",0,". "),new N("",0,"ed "),new N("",20,""),new N("",18,""),new N("",6,""),new N("",0,"("),new N("",f,", "),new N("",8,""),new N("",0," at "),new N("",0,"ly "),new N(" the ",0," of "),new N("",5,""),new N("",9,""),new N(" ",f,", "),new N("",f,'"'),new N(".",0,"("),new N("",g," "),new N("",f,'">'),new N("",0,'="'),new N(" ",0,"."),new N(".com/",0,""),new N(" the ",0," of the "),new N("",f,"'"),new N("",0,". This "),new N("",0,","),new N(".",0," "),new N("",f,"("),new N("",f,"."),new N("",0," not "),new N(" ",0,'="'),new N("",0,"er "),new N(" ",g," "),new N("",0,"al "),new N(" ",g,""),new N("",0,"='"),new N("",g,'"'),new N("",f,". "),new N(" ",0,"("),new N("",0,"ful "),new N(" ",f,". "),new N("",0,"ive "),new N("",0,"less "),new N("",g,"'"),new N("",0,"est "),new N(" ",f,"."),new N("",g,'">'),new N(" ",0,"='"),new N("",f,","),new N("",0,"ize "),new N("",g,"."),new N("\xc2\xa0",0,""),new N(" ",0,","),new N("",f,'="'),new N("",g,'="'),new N("",0,"ous "),new N("",g,", "),new N("",f,"='"),new N(" ",f,","),new N(" ",g,'="'),new N(" ",g,", "),new N("",g,","),new N("",g,"("),new N("",g,". "),new N(" ",g,"."),new N("",g,"='"),new N(" ",g,". "),new N(" ",f,'="'),new N(" ",g,"='"),new N(" ",f,"='")];function R(P,nA){return P[nA]<192?(P[nA]>=97&&P[nA]<=122&&(P[nA]^=32),1):P[nA]<224?(P[nA+1]^=32,2):(P[nA+2]^=5,3)}I.kTransforms=Y,I.kNumTransforms=Y.length,I.transformDictionaryWord=function(P,nA,lA,_,uA){var $,pA=Y[uA].prefix,cA=Y[uA].suffix,gA=Y[uA].transform,BA=gA<12?0:gA-11,yA=0,FA=nA;BA>_&&(BA=_);for(var MA=0;MA0;){var fA=R(P,$);$+=fA,_-=fA}for(var dA=0;dAI.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=f,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}e.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=I.UNZIP),this.mode===I.DEFLATE||this.mode===I.GZIP||this.mode===I.DEFLATERAW?h.deflateEnd(this.strm):(this.mode===I.INFLATE||this.mode===I.GUNZIP||this.mode===I.INFLATERAW||this.mode===I.UNZIP)&&a.inflateEnd(this.strm),this.mode=I.NONE,this.dictionary=null)},e.prototype.write=function(f,g,w,Q,m,T,x){return this._write(!0,f,g,w,Q,m,T,x)},e.prototype.writeSync=function(f,g,w,Q,m,T,x){return this._write(!1,f,g,w,Q,m,T,x)},e.prototype._write=function(f,g,w,Q,m,T,x,M){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==I.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===g,"must provide flush value"),this.write_in_progress=!0,g!==I.Z_NO_FLUSH&&g!==I.Z_PARTIAL_FLUSH&&g!==I.Z_SYNC_FLUSH&&g!==I.Z_FULL_FLUSH&&g!==I.Z_FINISH&&g!==I.Z_BLOCK)throw new Error("Invalid flush value");if(null==w&&(w=c.alloc(0),m=0,Q=0),this.strm.avail_in=m,this.strm.input=w,this.strm.next_in=Q,this.strm.avail_out=M,this.strm.output=T,this.strm.next_out=x,this.flush=g,!f)return this._process(),this._checkError()?this._afterSync():void 0;var D=this;return r.nextTick(function(){D._process(),D._after()}),this},e.prototype._afterSync=function(){var f=this.strm.avail_out,g=this.strm.avail_in;return this.write_in_progress=!1,[g,f]},e.prototype._process=function(){var f=null;switch(this.mode){case I.DEFLATE:case I.GZIP:case I.DEFLATERAW:this.err=h.deflate(this.strm,this.flush);break;case I.UNZIP:switch(this.strm.avail_in>0&&(f=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===f)break;if(31!==this.strm.input[f]){this.mode=I.INFLATE;break}if(this.gzip_id_bytes_read=1,f++,1===this.strm.avail_in)break;case 1:if(null===f)break;139===this.strm.input[f]?(this.gzip_id_bytes_read=2,this.mode=I.GUNZIP):this.mode=I.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case I.INFLATE:case I.GUNZIP:case I.INFLATERAW:for(this.err=a.inflate(this.strm,this.flush),this.err===I.Z_NEED_DICT&&this.dictionary&&(this.err=a.inflateSetDictionary(this.strm,this.dictionary),this.err===I.Z_OK?this.err=a.inflate(this.strm,this.flush):this.err===I.Z_DATA_ERROR&&(this.err=I.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===I.GUNZIP&&this.err===I.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=a.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},e.prototype._checkError=function(){switch(this.err){case I.Z_OK:case I.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===I.Z_FINISH)return this._error("unexpected end of file"),!1;break;case I.Z_STREAM_END:break;case I.Z_NEED_DICT:return this._error(null==this.dictionary?"Missing dictionary":"Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},e.prototype._after=function(){if(this._checkError()){var f=this.strm.avail_out,g=this.strm.avail_in;this.write_in_progress=!1,this.callback(g,f),this.pending_close&&this.close()}},e.prototype._error=function(f){this.strm.msg&&(f=this.strm.msg),this.onerror(f,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},e.prototype.init=function(f,g,w,Q,m){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(f>=8&&f<=15,"invalid windowBits"),o(g>=-1&&g<=9,"invalid compression level"),o(w>=1&&w<=9,"invalid memlevel"),o(Q===I.Z_FILTERED||Q===I.Z_HUFFMAN_ONLY||Q===I.Z_RLE||Q===I.Z_FIXED||Q===I.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(g,f,w,Q,m),this._setDictionary()},e.prototype.params=function(){throw new Error("deflateParams Not supported")},e.prototype.reset=function(){this._reset(),this._setDictionary()},e.prototype._init=function(f,g,w,Q,m){switch(this.level=f,this.windowBits=g,this.memLevel=w,this.strategy=Q,this.flush=I.Z_NO_FLUSH,this.err=I.Z_OK,(this.mode===I.GZIP||this.mode===I.GUNZIP)&&(this.windowBits+=16),this.mode===I.UNZIP&&(this.windowBits+=32),(this.mode===I.DEFLATERAW||this.mode===I.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new l,this.mode){case I.DEFLATE:case I.GZIP:case I.DEFLATERAW:this.err=h.deflateInit2(this.strm,this.level,I.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case I.INFLATE:case I.GUNZIP:case I.INFLATERAW:case I.UNZIP:this.err=a.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==I.Z_OK&&this._error("Init error"),this.dictionary=m,this.write_in_progress=!1,this.init_done=!0},e.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=I.Z_OK,this.mode){case I.DEFLATE:case I.DEFLATERAW:this.err=h.deflateSetDictionary(this.strm,this.dictionary)}this.err!==I.Z_OK&&this._error("Failed to set dictionary")}},e.prototype._reset=function(){switch(this.err=I.Z_OK,this.mode){case I.DEFLATE:case I.DEFLATERAW:case I.GZIP:this.err=h.deflateReset(this.strm);break;case I.INFLATE:case I.INFLATERAW:case I.GUNZIP:this.err=a.inflateReset(this.strm)}this.err!==I.Z_OK&&this._error("Failed to reset stream")},I.Zlib=e},2635:function(S,I,n){"use strict";var c=n(4155),r=n(8823).Buffer,o=n(2830).Transform,l=n(4505),h=n(9539),a=n(9282).ok,B=n(8823).kMaxLength,E="Cannot create final Buffer. It would be larger than 0x"+B.toString(16)+" bytes";l.Z_MIN_WINDOWBITS=8,l.Z_MAX_WINDOWBITS=15,l.Z_DEFAULT_WINDOWBITS=15,l.Z_MIN_CHUNK=64,l.Z_MAX_CHUNK=1/0,l.Z_DEFAULT_CHUNK=16384,l.Z_MIN_MEMLEVEL=1,l.Z_MAX_MEMLEVEL=9,l.Z_DEFAULT_MEMLEVEL=8,l.Z_MIN_LEVEL=-1,l.Z_MAX_LEVEL=9,l.Z_DEFAULT_LEVEL=l.Z_DEFAULT_COMPRESSION;for(var u=Object.keys(l),C=0;C=B?MA=new RangeError(E):$=r.concat(cA,gA),cA=[],_.close(),pA(MA,$)}_.on("error",function yA($){_.removeListener("end",FA),_.removeListener("readable",BA),pA($)}),_.on("end",FA),_.end(uA),BA()}function T(_,uA){if("string"==typeof uA&&(uA=r.from(uA)),!r.isBuffer(uA))throw new TypeError("Not a string or buffer");return _._processChunk(uA,_._finishFlushFlag)}function x(_){if(!(this instanceof x))return new x(_);P.call(this,_,l.DEFLATE)}function M(_){if(!(this instanceof M))return new M(_);P.call(this,_,l.INFLATE)}function D(_){if(!(this instanceof D))return new D(_);P.call(this,_,l.GZIP)}function y(_){if(!(this instanceof y))return new y(_);P.call(this,_,l.GUNZIP)}function b(_){if(!(this instanceof b))return new b(_);P.call(this,_,l.DEFLATERAW)}function N(_){if(!(this instanceof N))return new N(_);P.call(this,_,l.INFLATERAW)}function Y(_){if(!(this instanceof Y))return new Y(_);P.call(this,_,l.UNZIP)}function R(_){return _===l.Z_NO_FLUSH||_===l.Z_PARTIAL_FLUSH||_===l.Z_SYNC_FLUSH||_===l.Z_FULL_FLUSH||_===l.Z_FINISH||_===l.Z_BLOCK}function P(_,uA){var pA=this;if(this._opts=_=_||{},this._chunkSize=_.chunkSize||I.Z_DEFAULT_CHUNK,o.call(this,_),_.flush&&!R(_.flush))throw new Error("Invalid flush flag: "+_.flush);if(_.finishFlush&&!R(_.finishFlush))throw new Error("Invalid flush flag: "+_.finishFlush);if(this._flushFlag=_.flush||l.Z_NO_FLUSH,this._finishFlushFlag=void 0!==_.finishFlush?_.finishFlush:l.Z_FINISH,_.chunkSize&&(_.chunkSizeI.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+_.chunkSize);if(_.windowBits&&(_.windowBitsI.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+_.windowBits);if(_.level&&(_.levelI.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+_.level);if(_.memLevel&&(_.memLevelI.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+_.memLevel);if(_.strategy&&_.strategy!=I.Z_FILTERED&&_.strategy!=I.Z_HUFFMAN_ONLY&&_.strategy!=I.Z_RLE&&_.strategy!=I.Z_FIXED&&_.strategy!=I.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+_.strategy);if(_.dictionary&&!r.isBuffer(_.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new l.Zlib(uA);var cA=this;this._hadError=!1,this._handle.onerror=function(yA,FA){nA(cA),cA._hadError=!0;var $=new Error(yA);$.errno=FA,$.code=I.codes[FA],cA.emit("error",$)};var gA=I.Z_DEFAULT_COMPRESSION;"number"==typeof _.level&&(gA=_.level);var BA=I.Z_DEFAULT_STRATEGY;"number"==typeof _.strategy&&(BA=_.strategy),this._handle.init(_.windowBits||I.Z_DEFAULT_WINDOWBITS,gA,_.memLevel||I.Z_DEFAULT_MEMLEVEL,BA,_.dictionary),this._buffer=r.allocUnsafe(this._chunkSize),this._offset=0,this._level=gA,this._strategy=BA,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!pA._handle},configurable:!0,enumerable:!0})}function nA(_,uA){uA&&c.nextTick(uA),_._handle&&(_._handle.close(),_._handle=null)}function lA(_){_.emit("close")}Object.defineProperty(I,"codes",{enumerable:!0,value:Object.freeze(f),writable:!1}),I.Deflate=x,I.Inflate=M,I.Gzip=D,I.Gunzip=y,I.DeflateRaw=b,I.InflateRaw=N,I.Unzip=Y,I.createDeflate=function(_){return new x(_)},I.createInflate=function(_){return new M(_)},I.createDeflateRaw=function(_){return new b(_)},I.createInflateRaw=function(_){return new N(_)},I.createGzip=function(_){return new D(_)},I.createGunzip=function(_){return new y(_)},I.createUnzip=function(_){return new Y(_)},I.deflate=function(_,uA,pA){return"function"==typeof uA&&(pA=uA,uA={}),m(new x(uA),_,pA)},I.deflateSync=function(_,uA){return T(new x(uA),_)},I.gzip=function(_,uA,pA){return"function"==typeof uA&&(pA=uA,uA={}),m(new D(uA),_,pA)},I.gzipSync=function(_,uA){return T(new D(uA),_)},I.deflateRaw=function(_,uA,pA){return"function"==typeof uA&&(pA=uA,uA={}),m(new b(uA),_,pA)},I.deflateRawSync=function(_,uA){return T(new b(uA),_)},I.unzip=function(_,uA,pA){return"function"==typeof uA&&(pA=uA,uA={}),m(new Y(uA),_,pA)},I.unzipSync=function(_,uA){return T(new Y(uA),_)},I.inflate=function(_,uA,pA){return"function"==typeof uA&&(pA=uA,uA={}),m(new M(uA),_,pA)},I.inflateSync=function(_,uA){return T(new M(uA),_)},I.gunzip=function(_,uA,pA){return"function"==typeof uA&&(pA=uA,uA={}),m(new y(uA),_,pA)},I.gunzipSync=function(_,uA){return T(new y(uA),_)},I.inflateRaw=function(_,uA,pA){return"function"==typeof uA&&(pA=uA,uA={}),m(new N(uA),_,pA)},I.inflateRawSync=function(_,uA){return T(new N(uA),_)},h.inherits(P,o),P.prototype.params=function(_,uA,pA){if(_I.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+_);if(uA!=I.Z_FILTERED&&uA!=I.Z_HUFFMAN_ONLY&&uA!=I.Z_RLE&&uA!=I.Z_FIXED&&uA!=I.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+uA);if(this._level!==_||this._strategy!==uA){var cA=this;this.flush(l.Z_SYNC_FLUSH,function(){a(cA._handle,"zlib binding closed"),cA._handle.params(_,uA),cA._hadError||(cA._level=_,cA._strategy=uA,pA&&pA())})}else c.nextTick(pA)},P.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},P.prototype._flush=function(_){this._transform(r.alloc(0),"",_)},P.prototype.flush=function(_,uA){var pA=this,cA=this._writableState;("function"==typeof _||void 0===_&&!uA)&&(uA=_,_=l.Z_FULL_FLUSH),cA.ended?uA&&c.nextTick(uA):cA.ending?uA&&this.once("end",uA):cA.needDrain?uA&&this.once("drain",function(){return pA.flush(_,uA)}):(this._flushFlag=_,this.write(r.alloc(0),"",uA))},P.prototype.close=function(_){nA(this,_),c.nextTick(lA,this)},P.prototype._transform=function(_,uA,pA){var cA,gA=this._writableState,yA=(gA.ending||gA.ended)&&(!_||gA.length===_.length);return null===_||r.isBuffer(_)?this._handle?(yA?cA=this._finishFlushFlag:(cA=this._flushFlag,_.length>=gA.length&&(this._flushFlag=this._opts.flush||l.Z_NO_FLUSH)),void this._processChunk(_,cA,pA)):pA(new Error("zlib binding closed")):pA(new Error("invalid input"))},P.prototype._processChunk=function(_,uA,pA){var cA=_&&_.length,gA=this._chunkSize-this._offset,BA=0,yA=this,FA="function"==typeof pA;if(!FA){var fA,$=[],MA=0;this.on("error",function(q){fA=q}),a(this._handle,"zlib binding closed");do{var dA=this._handle.writeSync(uA,_,BA,cA,this._buffer,this._offset,gA)}while(!this._hadError&&XA(dA[0],dA[1]));if(this._hadError)throw fA;if(MA>=B)throw nA(this),new RangeError(E);var SA=r.concat($,MA);return nA(this),SA}a(this._handle,"zlib binding closed");var zA=this._handle.write(uA,_,BA,cA,this._buffer,this._offset,gA);function XA(q,O){if(this&&(this.buffer=null,this.callback=null),!yA._hadError){var AA=gA-O;if(a(AA>=0,"have should not go down"),AA>0){var W=yA._buffer.slice(yA._offset,yA._offset+AA);yA._offset+=AA,FA?yA.push(W):($.push(W),MA+=W.length)}if((0===O||yA._offset>=yA._chunkSize)&&(gA=yA._chunkSize,yA._offset=0,yA._buffer=r.allocUnsafe(yA._chunkSize)),0===O){if(BA+=cA-q,cA=q,!FA)return!0;var EA=yA._handle.write(uA,_,BA,cA,yA._buffer,yA._offset,yA._chunkSize);return EA.callback=XA,void(EA.buffer=_)}if(!FA)return!1;pA()}}zA.buffer=_,zA.callback=XA},h.inherits(x,P),h.inherits(M,P),h.inherits(D,P),h.inherits(y,P),h.inherits(b,P),h.inherits(N,P),h.inherits(Y,P)},1924:function(S,I,n){"use strict";var c=n(210),r=n(5559),o=r(c("String.prototype.indexOf"));S.exports=function(h,a){var B=c(h,!!a);return"function"==typeof B&&o(h,".prototype.")>-1?r(B):B}},5559:function(S,I,n){"use strict";var c=n(8612),r=n(210),o=r("%Function.prototype.apply%"),l=r("%Function.prototype.call%"),h=r("%Reflect.apply%",!0)||c.call(l,o),a=r("%Object.getOwnPropertyDescriptor%",!0),B=r("%Object.defineProperty%",!0),E=r("%Math.max%");if(B)try{B({},"a",{value:1})}catch(C){B=null}S.exports=function(e){var f=h(c,l,arguments);return a&&B&&a(f,"length").configurable&&B(f,"length",{value:1+E(0,e.length-(arguments.length-1))}),f};var u=function(){return h(c,o,arguments)};B?B(S.exports,"apply",{value:u}):S.exports.apply=u},6313:function(S,I,n){var c=n(8823).Buffer,r=function(){"use strict";function o(u,C,e,f){"object"==typeof C&&(e=C.depth,f=C.prototype,C=C.circular);var w=[],Q=[],m=void 0!==c;return void 0===C&&(C=!0),void 0===e&&(e=1/0),function T(x,M){if(null===x)return null;if(0==M)return x;var D,y;if("object"!=typeof x)return x;if(o.__isArray(x))D=[];else if(o.__isRegExp(x))D=new RegExp(x.source,E(x)),x.lastIndex&&(D.lastIndex=x.lastIndex);else if(o.__isDate(x))D=new Date(x.getTime());else{if(m&&c.isBuffer(x))return D=c.allocUnsafe?c.allocUnsafe(x.length):new c(x.length),x.copy(D),D;void 0===f?(y=Object.getPrototypeOf(x),D=Object.create(y)):(D=Object.create(f),y=f)}if(C){var b=w.indexOf(x);if(-1!=b)return Q[b];w.push(x),Q.push(D)}for(var N in x){var Y;y&&(Y=Object.getOwnPropertyDescriptor(y,N)),(!Y||null!=Y.set)&&(D[N]=T(x[N],M-1))}return D}(u,e)}function l(u){return Object.prototype.toString.call(u)}function E(u){var C="";return u.global&&(C+="g"),u.ignoreCase&&(C+="i"),u.multiline&&(C+="m"),C}return o.clonePrototype=function(C){if(null===C)return null;var e=function(){};return e.prototype=C,new e},o.__objToStr=l,o.__isDate=function h(u){return"object"==typeof u&&"[object Date]"===l(u)},o.__isArray=function a(u){return"object"==typeof u&&"[object Array]"===l(u)},o.__isRegExp=function B(u){return"object"==typeof u&&"[object RegExp]"===l(u)},o.__getRegExpFlags=E,o}();S.exports&&(S.exports=r)},4667:function(S,I,n){n(2479);var c=n(857);S.exports=c.Object.values},7633:function(S,I,n){n(9170),n(6992),n(1539),n(8674),n(7922),n(4668),n(7727),n(8783);var c=n(857);S.exports=c.Promise},3867:function(S,I,n){var c=n(1150);n(8628),n(7314),n(7479),n(6290),S.exports=c},9662:function(S,I,n){var c=n(7854),r=n(614),o=n(6330),l=c.TypeError;S.exports=function(h){if(r(h))return h;throw l(o(h)+" is not a function")}},9483:function(S,I,n){var c=n(7854),r=n(4411),o=n(6330),l=c.TypeError;S.exports=function(h){if(r(h))return h;throw l(o(h)+" is not a constructor")}},6077:function(S,I,n){var c=n(7854),r=n(614),o=c.String,l=c.TypeError;S.exports=function(h){if("object"==typeof h||r(h))return h;throw l("Can't set "+o(h)+" as a prototype")}},1223:function(S,I,n){var c=n(5112),r=n(30),o=n(3070),l=c("unscopables"),h=Array.prototype;null==h[l]&&o.f(h,l,{configurable:!0,value:r(null)}),S.exports=function(a){h[l][a]=!0}},1530:function(S,I,n){"use strict";var c=n(8710).charAt;S.exports=function(r,o,l){return o+(l?c(r,o).length:1)}},5787:function(S,I,n){var c=n(7854),r=n(7976),o=c.TypeError;S.exports=function(l,h){if(r(h,l))return l;throw o("Incorrect invocation")}},9670:function(S,I,n){var c=n(7854),r=n(111),o=c.String,l=c.TypeError;S.exports=function(h){if(r(h))return h;throw l(o(h)+" is not an object")}},1048:function(S,I,n){"use strict";var c=n(7908),r=n(1400),o=n(6244),l=Math.min;S.exports=[].copyWithin||function(a,B){var E=c(this),u=o(E),C=r(a,u),e=r(B,u),f=arguments.length>2?arguments[2]:void 0,g=l((void 0===f?u:r(f,u))-e,u-C),w=1;for(e0;)e in E?E[C]=E[e]:delete E[C],C+=w,e+=w;return E}},1285:function(S,I,n){"use strict";var c=n(7908),r=n(1400),o=n(6244);S.exports=function(h){for(var a=c(this),B=o(a),E=arguments.length,u=r(E>1?arguments[1]:void 0,B),C=E>2?arguments[2]:void 0,e=void 0===C?B:r(C,B);e>u;)a[u++]=h;return a}},8533:function(S,I,n){"use strict";var c=n(2092).forEach,o=n(9341)("forEach");S.exports=o?[].forEach:function(h){return c(this,h,arguments.length>1?arguments[1]:void 0)}},7745:function(S){S.exports=function(I,n){for(var c=0,r=n.length,o=new I(r);r>c;)o[c]=n[c++];return o}},8457:function(S,I,n){"use strict";var c=n(7854),r=n(9974),o=n(6916),l=n(7908),h=n(3411),a=n(7659),B=n(4411),E=n(6244),u=n(6135),C=n(8554),e=n(1246),f=c.Array;S.exports=function(w){var Q=l(w),m=B(this),T=arguments.length,x=T>1?arguments[1]:void 0,M=void 0!==x;M&&(x=r(x,T>2?arguments[2]:void 0));var b,N,Y,R,P,nA,D=e(Q),y=0;if(!D||this==f&&a(D))for(b=E(Q),N=m?new this(b):f(b);b>y;y++)nA=M?x(Q[y],y):Q[y],u(N,y,nA);else for(P=(R=C(Q,D)).next,N=m?new this:[];!(Y=o(P,R)).done;y++)nA=M?h(R,x,[Y.value,y],!0):Y.value,u(N,y,nA);return N.length=y,N}},1318:function(S,I,n){var c=n(5656),r=n(1400),o=n(6244),l=function(h){return function(a,B,E){var f,u=c(a),C=o(u),e=r(E,C);if(h&&B!=B){for(;C>e;)if((f=u[e++])!=f)return!0}else for(;C>e;e++)if((h||e in u)&&u[e]===B)return h||e||0;return!h&&-1}};S.exports={includes:l(!0),indexOf:l(!1)}},2092:function(S,I,n){var c=n(9974),r=n(1702),o=n(8361),l=n(7908),h=n(6244),a=n(5417),B=r([].push),E=function(u){var C=1==u,e=2==u,f=3==u,g=4==u,w=6==u,Q=7==u,m=5==u||w;return function(T,x,M,D){for(var lA,_,y=l(T),b=o(y),N=c(x,M),Y=h(b),R=0,P=D||a,nA=C?P(T,Y):e||Q?P(T,0):void 0;Y>R;R++)if((m||R in b)&&(_=N(lA=b[R],R,y),u))if(C)nA[R]=_;else if(_)switch(u){case 3:return!0;case 5:return lA;case 6:return R;case 2:B(nA,lA)}else switch(u){case 4:return!1;case 7:B(nA,lA)}return w?-1:f||g?g:nA}};S.exports={forEach:E(0),map:E(1),filter:E(2),some:E(3),every:E(4),find:E(5),findIndex:E(6),filterReject:E(7)}},6583:function(S,I,n){"use strict";var c=n(2104),r=n(5656),o=n(9303),l=n(6244),h=n(9341),a=Math.min,B=[].lastIndexOf,E=!!B&&1/[1].lastIndexOf(1,-0)<0,u=h("lastIndexOf");S.exports=E||!u?function(f){if(E)return c(B,this,arguments)||0;var g=r(this),w=l(g),Q=w-1;for(arguments.length>1&&(Q=a(Q,o(arguments[1]))),Q<0&&(Q=w+Q);Q>=0;Q--)if(Q in g&&g[Q]===f)return Q||0;return-1}:B},1194:function(S,I,n){var c=n(7293),r=n(5112),o=n(7392),l=r("species");S.exports=function(h){return o>=51||!c(function(){var a=[];return(a.constructor={})[l]=function(){return{foo:1}},1!==a[h](Boolean).foo})}},9341:function(S,I,n){"use strict";var c=n(7293);S.exports=function(r,o){var l=[][r];return!!l&&c(function(){l.call(null,o||function(){throw 1},1)})}},3671:function(S,I,n){var c=n(7854),r=n(9662),o=n(7908),l=n(8361),h=n(6244),a=c.TypeError,B=function(E){return function(u,C,e,f){r(C);var g=o(u),w=l(g),Q=h(g),m=E?Q-1:0,T=E?-1:1;if(e<2)for(;;){if(m in w){f=w[m],m+=T;break}if(m+=T,E?m<0:Q<=m)throw a("Reduce of empty array with no initial value")}for(;E?m>=0:Q>m;m+=T)m in w&&(f=C(f,w[m],m,g));return f}};S.exports={left:B(!1),right:B(!0)}},206:function(S,I,n){var c=n(1702);S.exports=c([].slice)},4362:function(S,I,n){var c=n(206),r=Math.floor,o=function(a,B){var E=a.length,u=r(E/2);return E<8?l(a,B):h(a,o(c(a,0,u),B),o(c(a,u),B),B)},l=function(a,B){for(var C,e,E=a.length,u=1;u0;)a[e]=a[--e];e!==u++&&(a[e]=C)}return a},h=function(a,B,E,u){for(var C=B.length,e=E.length,f=0,g=0;f1?arguments[1]:void 0);nA=nA?nA.next:R.first;)for(P(nA.value,nA.key,this);nA&&nA.removed;)nA=nA.previous},has:function(Y){return!!b(this,Y)}}),o(M,m?{get:function(Y){var R=b(this,Y);return R&&R.value},set:function(Y,R){return y(this,0===Y?0:Y,R)}}:{add:function(Y){return y(this,Y=0===Y?0:Y,Y)}}),u&&c(M,"size",{get:function(){return D(this).size}}),x},setStrong:function(w,Q,m){var T=Q+" Iterator",x=g(Q),M=g(T);B(w,Q,function(D,y){f(this,{type:T,target:D,state:x(D),kind:y,last:void 0})},function(){for(var D=M(this),y=D.kind,b=D.last;b&&b.removed;)b=b.previous;return D.target&&(D.last=b=b?b.next:D.state.first)?"keys"==y?{value:b.key,done:!1}:"values"==y?{value:b.value,done:!1}:{value:[b.key,b.value],done:!1}:(D.target=void 0,{value:void 0,done:!0})},m?"entries":"values",!m,!0),E(Q)}}},7710:function(S,I,n){"use strict";var c=n(2109),r=n(7854),o=n(1702),l=n(4705),h=n(1320),a=n(2423),B=n(408),E=n(5787),u=n(614),C=n(111),e=n(7293),f=n(7072),g=n(8003),w=n(9587);S.exports=function(Q,m,T){var x=-1!==Q.indexOf("Map"),M=-1!==Q.indexOf("Weak"),D=x?"set":"add",y=r[Q],b=y&&y.prototype,N=y,Y={},R=function(cA){var gA=o(b[cA]);h(b,cA,"add"==cA?function(yA){return gA(this,0===yA?0:yA),this}:"delete"==cA?function(BA){return!(M&&!C(BA))&&gA(this,0===BA?0:BA)}:"get"==cA?function(yA){return M&&!C(yA)?void 0:gA(this,0===yA?0:yA)}:"has"==cA?function(yA){return!(M&&!C(yA))&&gA(this,0===yA?0:yA)}:function(yA,FA){return gA(this,0===yA?0:yA,FA),this})};if(l(Q,!u(y)||!(M||b.forEach&&!e(function(){(new y).entries().next()}))))N=T.getConstructor(m,Q,x,D),a.enable();else if(l(Q,!0)){var nA=new N,lA=nA[D](M?{}:-0,1)!=nA,_=e(function(){nA.has(1)}),uA=f(function(cA){new y(cA)}),pA=!M&&e(function(){for(var cA=new y,gA=5;gA--;)cA[D](gA,gA);return!cA.has(-0)});uA||((N=m(function(cA,gA){E(cA,b);var BA=w(new y,cA,N);return null!=gA&&B(gA,BA[D],{that:BA,AS_ENTRIES:x}),BA})).prototype=b,b.constructor=N),(_||pA)&&(R("delete"),R("has"),x&&R("get")),(pA||lA)&&R(D),M&&b.clear&&delete b.clear}return Y[Q]=N,c({global:!0,forced:N!=y},Y),g(N,Q),M||T.setStrong(N,Q,x),N}},9920:function(S,I,n){var c=n(2597),r=n(3887),o=n(1236),l=n(3070);S.exports=function(h,a){for(var B=r(a),E=l.f,u=o.f,C=0;C"+C+""}},4994:function(S,I,n){"use strict";var c=n(3383).IteratorPrototype,r=n(30),o=n(9114),l=n(8003),h=n(7497),a=function(){return this};S.exports=function(B,E,u){var C=E+" Iterator";return B.prototype=r(c,{next:o(1,u)}),l(B,C,!1,!0),h[C]=a,B}},8880:function(S,I,n){var c=n(9781),r=n(3070),o=n(9114);S.exports=c?function(l,h,a){return r.f(l,h,o(1,a))}:function(l,h,a){return l[h]=a,l}},9114:function(S){S.exports=function(I,n){return{enumerable:!(1&I),configurable:!(2&I),writable:!(4&I),value:n}}},6135:function(S,I,n){"use strict";var c=n(4948),r=n(3070),o=n(9114);S.exports=function(l,h,a){var B=c(h);B in l?r.f(l,B,o(0,a)):l[B]=a}},8709:function(S,I,n){"use strict";var c=n(7854),r=n(9670),o=n(2140),l=c.TypeError;S.exports=function(h){if(r(this),"string"===h||"default"===h)h="string";else if("number"!==h)throw l("Incorrect hint");return o(this,h)}},654:function(S,I,n){"use strict";var c=n(2109),r=n(6916),o=n(1913),l=n(6530),h=n(614),a=n(4994),B=n(9518),E=n(7674),u=n(8003),C=n(8880),e=n(1320),f=n(5112),g=n(7497),w=n(3383),Q=l.PROPER,m=l.CONFIGURABLE,T=w.IteratorPrototype,x=w.BUGGY_SAFARI_ITERATORS,M=f("iterator"),D="keys",y="values",b="entries",N=function(){return this};S.exports=function(Y,R,P,nA,lA,_,uA){a(P,R,nA);var MA,fA,dA,pA=function(SA){if(SA===lA&&FA)return FA;if(!x&&SA in BA)return BA[SA];switch(SA){case D:case y:case b:return function(){return new P(this,SA)}}return function(){return new P(this)}},cA=R+" Iterator",gA=!1,BA=Y.prototype,yA=BA[M]||BA["@@iterator"]||lA&&BA[lA],FA=!x&&yA||pA(lA),$="Array"==R&&BA.entries||yA;if($&&(MA=B($.call(new Y)))!==Object.prototype&&MA.next&&(!o&&B(MA)!==T&&(E?E(MA,T):h(MA[M])||e(MA,M,N)),u(MA,cA,!0,!0),o&&(g[cA]=N)),Q&&lA==y&&yA&&yA.name!==y&&(!o&&m?C(BA,"name",y):(gA=!0,FA=function(){return r(yA,this)})),lA)if(fA={values:pA(y),keys:_?FA:pA(D),entries:pA(b)},uA)for(dA in fA)(x||gA||!(dA in BA))&&e(BA,dA,fA[dA]);else c({target:R,proto:!0,forced:x||gA},fA);return(!o||uA)&&BA[M]!==FA&&e(BA,M,FA,{name:lA}),g[R]=FA,fA}},7235:function(S,I,n){var c=n(857),r=n(2597),o=n(6061),l=n(3070).f;S.exports=function(h){var a=c.Symbol||(c.Symbol={});r(a,h)||l(a,h,{value:o.f(h)})}},9781:function(S,I,n){var c=n(7293);S.exports=!c(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},317:function(S,I,n){var c=n(7854),r=n(111),o=c.document,l=r(o)&&r(o.createElement);S.exports=function(h){return l?o.createElement(h):{}}},8324:function(S){S.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:function(S,I,n){var r=n(317)("span").classList,o=r&&r.constructor&&r.constructor.prototype;S.exports=o===Object.prototype?void 0:o},8886:function(S,I,n){var r=n(8113).match(/firefox\/(\d+)/i);S.exports=!!r&&+r[1]},7871:function(S){S.exports="object"==typeof window},256:function(S,I,n){var c=n(8113);S.exports=/MSIE|Trident/.test(c)},1528:function(S,I,n){var c=n(8113),r=n(7854);S.exports=/ipad|iphone|ipod/i.test(c)&&void 0!==r.Pebble},6833:function(S,I,n){var c=n(8113);S.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(c)},5268:function(S,I,n){var c=n(4326),r=n(7854);S.exports="process"==c(r.process)},1036:function(S,I,n){var c=n(8113);S.exports=/web0s(?!.*chrome)/i.test(c)},8113:function(S,I,n){var c=n(5005);S.exports=c("navigator","userAgent")||""},7392:function(S,I,n){var B,E,c=n(7854),r=n(8113),o=c.process,l=c.Deno,h=o&&o.versions||l&&l.version,a=h&&h.v8;a&&(E=(B=a.split("."))[0]>0&&B[0]<4?1:+(B[0]+B[1])),!E&&r&&(!(B=r.match(/Edge\/(\d+)/))||B[1]>=74)&&(B=r.match(/Chrome\/(\d+)/))&&(E=+B[1]),S.exports=E},8008:function(S,I,n){var r=n(8113).match(/AppleWebKit\/(\d+)\./);S.exports=!!r&&+r[1]},748:function(S){S.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2914:function(S,I,n){var c=n(7293),r=n(9114);S.exports=!c(function(){var o=Error("a");return!("stack"in o)||(Object.defineProperty(o,"stack",r(1,7)),7!==o.stack)})},2109:function(S,I,n){var c=n(7854),r=n(1236).f,o=n(8880),l=n(1320),h=n(3505),a=n(9920),B=n(4705);S.exports=function(E,u){var w,Q,m,T,x,C=E.target,e=E.global,f=E.stat;if(w=e?c:f?c[C]||h(C,{}):(c[C]||{}).prototype)for(Q in u){if(T=u[Q],m=E.noTargetGet?(x=r(w,Q))&&x.value:w[Q],!B(e?Q:C+(f?".":"#")+Q,E.forced)&&void 0!==m){if(typeof T==typeof m)continue;a(T,m)}(E.sham||m&&m.sham)&&o(T,"sham",!0),l(w,Q,T,E)}}},7293:function(S){S.exports=function(I){try{return!!I()}catch(n){return!0}}},7007:function(S,I,n){"use strict";n(4916);var c=n(1702),r=n(1320),o=n(2261),l=n(7293),h=n(5112),a=n(8880),B=h("species"),E=RegExp.prototype;S.exports=function(u,C,e,f){var g=h(u),w=!l(function(){var x={};return x[g]=function(){return 7},7!=""[u](x)}),Q=w&&!l(function(){var x=!1,M=/a/;return"split"===u&&((M={}).constructor={},M.constructor[B]=function(){return M},M.flags="",M[g]=/./[g]),M.exec=function(){return x=!0,null},M[g](""),!x});if(!w||!Q||e){var m=c(/./[g]),T=C(g,""[u],function(x,M,D,y,b){var N=c(x),Y=M.exec;return Y===o||Y===E.exec?w&&!b?{done:!0,value:m(M,D,y)}:{done:!0,value:N(D,M,y)}:{done:!1}});r(String.prototype,u,T[0]),r(E,g,T[1])}f&&a(E[g],"sham",!0)}},6677:function(S,I,n){var c=n(7293);S.exports=!c(function(){return Object.isExtensible(Object.preventExtensions({}))})},2104:function(S){var I=Function.prototype,n=I.apply,r=I.call;S.exports="object"==typeof Reflect&&Reflect.apply||(I.bind?r.bind(n):function(){return r.apply(n,arguments)})},9974:function(S,I,n){var c=n(1702),r=n(9662),o=c(c.bind);S.exports=function(l,h){return r(l),void 0===h?l:o?o(l,h):function(){return l.apply(h,arguments)}}},7065:function(S,I,n){"use strict";var c=n(7854),r=n(1702),o=n(9662),l=n(111),h=n(2597),a=n(206),B=c.Function,E=r([].concat),u=r([].join),C={},e=function(f,g,w){if(!h(C,g)){for(var Q=[],m=0;m]*>)/g,E=/\$([$&'`]|\d{1,2})/g;S.exports=function(u,C,e,f,g,w){var Q=e+u.length,m=f.length,T=E;return void 0!==g&&(g=r(g),T=B),h(w,T,function(x,M){var D;switch(l(M,0)){case"$":return"$";case"&":return u;case"`":return a(C,0,e);case"'":return a(C,Q);case"<":D=g[a(M,1,-1)];break;default:var y=+M;if(0===y)return x;if(y>m){var b=o(y/10);return 0===b?x:b<=m?void 0===f[b-1]?l(M,1):f[b-1]+l(M,1):x}D=f[y-1]}return void 0===D?"":D})}},7854:function(S,I,n){var c=function(r){return r&&r.Math==Math&&r};S.exports=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:function(S,I,n){var c=n(1702),r=n(7908),o=c({}.hasOwnProperty);S.exports=Object.hasOwn||function(h,a){return o(r(h),a)}},3501:function(S){S.exports={}},842:function(S,I,n){var c=n(7854);S.exports=function(r,o){var l=c.console;l&&l.error&&(1==arguments.length?l.error(r):l.error(r,o))}},490:function(S,I,n){var c=n(5005);S.exports=c("document","documentElement")},4664:function(S,I,n){var c=n(9781),r=n(7293),o=n(317);S.exports=!c&&!r(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},1179:function(S,I,n){var r=n(7854).Array,o=Math.abs,l=Math.pow,h=Math.floor,a=Math.log,B=Math.LN2;S.exports={pack:function(C,e,f){var D,y,b,g=r(f),w=8*f-e-1,Q=(1<>1,T=23===e?l(2,-24)-l(2,-77):0,x=C<0||0===C&&1/C<0?1:0,M=0;for((C=o(C))!=C||C===1/0?(y=C!=C?1:0,D=Q):(D=h(a(C)/B),C*(b=l(2,-D))<1&&(D--,b*=2),(C+=D+m>=1?T/b:T*l(2,1-m))*b>=2&&(D++,b/=2),D+m>=Q?(y=0,D=Q):D+m>=1?(y=(C*b-1)*l(2,e),D+=m):(y=C*l(2,m-1)*l(2,e),D=0));e>=8;g[M++]=255&y,y/=256,e-=8);for(D=D<0;g[M++]=255&D,D/=256,w-=8);return g[--M]|=128*x,g},unpack:function(C,e){var D,f=C.length,g=8*f-e-1,w=(1<>1,m=g-7,T=f-1,x=C[T--],M=127&x;for(x>>=7;m>0;M=256*M+C[T],T--,m-=8);for(D=M&(1<<-m)-1,M>>=-m,m+=e;m>0;D=256*D+C[T],T--,m-=8);if(0===M)M=1-Q;else{if(M===w)return D?NaN:x?-1/0:1/0;D+=l(2,e),M-=Q}return(x?-1:1)*D*l(2,M-e)}}},8361:function(S,I,n){var c=n(7854),r=n(1702),o=n(7293),l=n(4326),h=c.Object,a=r("".split);S.exports=o(function(){return!h("z").propertyIsEnumerable(0)})?function(B){return"String"==l(B)?a(B,""):h(B)}:h},9587:function(S,I,n){var c=n(614),r=n(111),o=n(7674);S.exports=function(l,h,a){var B,E;return o&&c(B=h.constructor)&&B!==a&&r(E=B.prototype)&&E!==a.prototype&&o(l,E),l}},2788:function(S,I,n){var c=n(1702),r=n(614),o=n(5465),l=c(Function.toString);r(o.inspectSource)||(o.inspectSource=function(h){return l(h)}),S.exports=o.inspectSource},8340:function(S,I,n){var c=n(111),r=n(8880);S.exports=function(o,l){c(l)&&"cause"in l&&r(o,"cause",l.cause)}},2423:function(S,I,n){var c=n(2109),r=n(1702),o=n(3501),l=n(111),h=n(2597),a=n(3070).f,B=n(8006),E=n(1156),u=n(9711),C=n(6677),e=!1,f=u("meta"),g=0,w=Object.isExtensible||function(){return!0},Q=function(y){a(y,f,{value:{objectID:"O"+g++,weakData:{}}})},D=S.exports={enable:function(){D.enable=function(){},e=!0;var y=B.f,b=r([].splice),N={};N[f]=1,y(N).length&&(B.f=function(Y){for(var R=y(Y),P=0,nA=R.length;PR;R++)if((nA=pA(Q[R]))&&E(w,nA))return nA;return new g(!1)}N=u(Q,Y)}for(lA=N.next;!(_=o(lA,N)).done;){try{nA=pA(_.value)}catch(cA){e(N,"throw",cA)}if("object"==typeof nA&&nA&&E(w,nA))return nA}return new g(!1)}},9212:function(S,I,n){var c=n(6916),r=n(9670),o=n(8173);S.exports=function(l,h,a){var B,E;r(l);try{if(!(B=o(l,"return"))){if("throw"===h)throw a;return a}B=c(B,l)}catch(u){E=!0,B=u}if("throw"===h)throw a;if(E)throw B;return r(B),a}},3383:function(S,I,n){"use strict";var C,e,f,c=n(7293),r=n(614),o=n(30),l=n(9518),h=n(1320),a=n(5112),B=n(1913),E=a("iterator"),u=!1;[].keys&&("next"in(f=[].keys())?(e=l(l(f)))!==Object.prototype&&(C=e):u=!0),null==C||c(function(){var w={};return C[E].call(w)!==w})?C={}:B&&(C=o(C)),r(C[E])||h(C,E,function(){return this}),S.exports={IteratorPrototype:C,BUGGY_SAFARI_ITERATORS:u}},7497:function(S){S.exports={}},6244:function(S,I,n){var c=n(7466);S.exports=function(r){return c(r.length)}},5948:function(S,I,n){var Q,m,T,x,M,D,y,b,c=n(7854),r=n(9974),o=n(1236).f,l=n(261).set,h=n(6833),a=n(1528),B=n(1036),E=n(5268),u=c.MutationObserver||c.WebKitMutationObserver,C=c.document,e=c.process,f=c.Promise,g=o(c,"queueMicrotask"),w=g&&g.value;w||(Q=function(){var N,Y;for(E&&(N=e.domain)&&N.exit();m;){Y=m.fn,m=m.next;try{Y()}catch(R){throw m?x():T=void 0,R}}T=void 0,N&&N.enter()},h||E||B||!u||!C?!a&&f&&f.resolve?((y=f.resolve(void 0)).constructor=f,b=r(y.then,y),x=function(){b(Q)}):E?x=function(){e.nextTick(Q)}:(l=r(l,c),x=function(){l(Q)}):(M=!0,D=C.createTextNode(""),new u(Q).observe(D,{characterData:!0}),x=function(){D.data=M=!M})),S.exports=w||function(N){var Y={fn:N,next:void 0};T&&(T.next=Y),m||(m=Y,x()),T=Y}},3366:function(S,I,n){var c=n(7854);S.exports=c.Promise},133:function(S,I,n){var c=n(7392),r=n(7293);S.exports=!!Object.getOwnPropertySymbols&&!r(function(){var o=Symbol();return!String(o)||!(Object(o)instanceof Symbol)||!Symbol.sham&&c&&c<41})},8536:function(S,I,n){var c=n(7854),r=n(614),o=n(2788),l=c.WeakMap;S.exports=r(l)&&/native code/.test(o(l))},8523:function(S,I,n){"use strict";var c=n(9662),r=function(o){var l,h;this.promise=new o(function(a,B){if(void 0!==l||void 0!==h)throw TypeError("Bad Promise constructor");l=a,h=B}),this.resolve=c(l),this.reject=c(h)};S.exports.f=function(o){return new r(o)}},6277:function(S,I,n){var c=n(1340);S.exports=function(r,o){return void 0===r?arguments.length<2?"":o:c(r)}},3929:function(S,I,n){var c=n(7854),r=n(7850),o=c.TypeError;S.exports=function(l){if(r(l))throw o("The method doesn't accept regular expressions");return l}},7023:function(S,I,n){var r=n(7854).isFinite;S.exports=Number.isFinite||function(l){return"number"==typeof l&&r(l)}},1574:function(S,I,n){"use strict";var c=n(9781),r=n(1702),o=n(6916),l=n(7293),h=n(1956),a=n(5181),B=n(5296),E=n(7908),u=n(8361),C=Object.assign,e=Object.defineProperty,f=r([].concat);S.exports=!C||l(function(){if(c&&1!==C({b:1},C(e({},"a",{enumerable:!0,get:function(){e(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var g={},w={},Q=Symbol(),m="abcdefghijklmnopqrst";return g[Q]=7,m.split("").forEach(function(T){w[T]=T}),7!=C({},g)[Q]||h(C({},w)).join("")!=m})?function(w,Q){for(var m=E(w),T=arguments.length,x=1,M=a.f,D=B.f;T>x;)for(var R,y=u(arguments[x++]),b=M?f(h(y),M(y)):h(y),N=b.length,Y=0;N>Y;)R=b[Y++],(!c||o(D,y,R))&&(m[R]=y[R]);return m}:C},30:function(S,I,n){var T,c=n(9670),r=n(6048),o=n(748),l=n(3501),h=n(490),a=n(317),B=n(6200),C="prototype",e="script",f=B("IE_PROTO"),g=function(){},w=function(M){return"<"+e+">"+M+""},Q=function(M){M.write(w("")),M.close();var D=M.parentWindow.Object;return M=null,D},x=function(){try{T=new ActiveXObject("htmlfile")}catch(D){}x="undefined"!=typeof document?document.domain&&T?Q(T):function(){var y,M=a("iframe");return M.style.display="none",h.appendChild(M),M.src=String("javascript:"),(y=M.contentWindow.document).open(),y.write(w("document.F=Object")),y.close(),y.F}():Q(T);for(var M=o.length;M--;)delete x[C][o[M]];return x()};l[f]=!0,S.exports=Object.create||function(D,y){var b;return null!==D?(g[C]=c(D),b=new g,g[C]=null,b[f]=D):b=x(),void 0===y?b:r(b,y)}},6048:function(S,I,n){var c=n(9781),r=n(3070),o=n(9670),l=n(5656),h=n(1956);S.exports=c?Object.defineProperties:function(B,E){o(B);for(var g,u=l(E),C=h(E),e=C.length,f=0;e>f;)r.f(B,g=C[f++],u[g]);return B}},3070:function(S,I,n){var c=n(7854),r=n(9781),o=n(4664),l=n(9670),h=n(4948),a=c.TypeError,B=Object.defineProperty;I.f=r?B:function(u,C,e){if(l(u),C=h(C),l(e),o)try{return B(u,C,e)}catch(f){}if("get"in e||"set"in e)throw a("Accessors not supported");return"value"in e&&(u[C]=e.value),u}},1236:function(S,I,n){var c=n(9781),r=n(6916),o=n(5296),l=n(9114),h=n(5656),a=n(4948),B=n(2597),E=n(4664),u=Object.getOwnPropertyDescriptor;I.f=c?u:function(e,f){if(e=h(e),f=a(f),E)try{return u(e,f)}catch(g){}if(B(e,f))return l(!r(o.f,e,f),e[f])}},1156:function(S,I,n){var c=n(4326),r=n(5656),o=n(8006).f,l=n(206),h="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];S.exports.f=function(E){return h&&"Window"==c(E)?function(B){try{return o(B)}catch(E){return l(h)}}(E):o(r(E))}},8006:function(S,I,n){var c=n(6324),o=n(748).concat("length","prototype");I.f=Object.getOwnPropertyNames||function(h){return c(h,o)}},5181:function(S,I){I.f=Object.getOwnPropertySymbols},9518:function(S,I,n){var c=n(7854),r=n(2597),o=n(614),l=n(7908),h=n(6200),a=n(8544),B=h("IE_PROTO"),E=c.Object,u=E.prototype;S.exports=a?E.getPrototypeOf:function(C){var e=l(C);if(r(e,B))return e[B];var f=e.constructor;return o(f)&&e instanceof f?f.prototype:e instanceof E?u:null}},7976:function(S,I,n){var c=n(1702);S.exports=c({}.isPrototypeOf)},6324:function(S,I,n){var c=n(1702),r=n(2597),o=n(5656),l=n(1318).indexOf,h=n(3501),a=c([].push);S.exports=function(B,E){var f,u=o(B),C=0,e=[];for(f in u)!r(h,f)&&r(u,f)&&a(e,f);for(;E.length>C;)r(u,f=E[C++])&&(~l(e,f)||a(e,f));return e}},1956:function(S,I,n){var c=n(6324),r=n(748);S.exports=Object.keys||function(l){return c(l,r)}},5296:function(S,I){"use strict";var n={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,r=c&&!n.call({1:2},1);I.f=r?function(l){var h=c(this,l);return!!h&&h.enumerable}:n},7674:function(S,I,n){var c=n(1702),r=n(9670),o=n(6077);S.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var a,l=!1,h={};try{(a=c(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(h,[]),l=h instanceof Array}catch(B){}return function(E,u){return r(E),o(u),l?a(E,u):E.__proto__=u,E}}():void 0)},4699:function(S,I,n){var c=n(9781),r=n(1702),o=n(1956),l=n(5656),a=r(n(5296).f),B=r([].push),E=function(u){return function(C){for(var m,e=l(C),f=o(e),g=f.length,w=0,Q=[];g>w;)m=f[w++],(!c||a(e,m))&&B(Q,u?[m,e[m]]:e[m]);return Q}};S.exports={entries:E(!0),values:E(!1)}},288:function(S,I,n){"use strict";var c=n(1694),r=n(648);S.exports=c?{}.toString:function(){return"[object "+r(this)+"]"}},2140:function(S,I,n){var c=n(7854),r=n(6916),o=n(614),l=n(111),h=c.TypeError;S.exports=function(a,B){var E,u;if("string"===B&&o(E=a.toString)&&!l(u=r(E,a))||o(E=a.valueOf)&&!l(u=r(E,a))||"string"!==B&&o(E=a.toString)&&!l(u=r(E,a)))return u;throw h("Can't convert object to primitive value")}},3887:function(S,I,n){var c=n(5005),r=n(1702),o=n(8006),l=n(5181),h=n(9670),a=r([].concat);S.exports=c("Reflect","ownKeys")||function(E){var u=o.f(h(E)),C=l.f;return C?a(u,C(E)):u}},857:function(S,I,n){var c=n(7854);S.exports=c},2534:function(S){S.exports=function(I){try{return{error:!1,value:I()}}catch(n){return{error:!0,value:n}}}},9478:function(S,I,n){var c=n(9670),r=n(111),o=n(8523);S.exports=function(l,h){if(c(l),r(h)&&h.constructor===l)return h;var a=o.f(l);return(0,a.resolve)(h),a.promise}},2248:function(S,I,n){var c=n(1320);S.exports=function(r,o,l){for(var h in o)c(r,h,o[h],l);return r}},1320:function(S,I,n){var c=n(7854),r=n(614),o=n(2597),l=n(8880),h=n(3505),a=n(2788),B=n(9909),E=n(6530).CONFIGURABLE,u=B.get,C=B.enforce,e=String(String).split("String");(S.exports=function(f,g,w,Q){var D,m=!!Q&&!!Q.unsafe,T=!!Q&&!!Q.enumerable,x=!!Q&&!!Q.noTargetGet,M=Q&&void 0!==Q.name?Q.name:g;r(w)&&("Symbol("===String(M).slice(0,7)&&(M="["+String(M).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(w,"name")||E&&w.name!==M)&&l(w,"name",M),(D=C(w)).source||(D.source=e.join("string"==typeof M?M:""))),f!==c?(m?!x&&f[g]&&(T=!0):delete f[g],T?f[g]=w:l(f,g,w)):T?f[g]=w:h(g,w)})(Function.prototype,"toString",function(){return r(this)&&u(this).source||a(this)})},7651:function(S,I,n){var c=n(7854),r=n(6916),o=n(9670),l=n(614),h=n(4326),a=n(2261),B=c.TypeError;S.exports=function(E,u){var C=E.exec;if(l(C)){var e=r(C,E,u);return null!==e&&o(e),e}if("RegExp"===h(E))return r(a,E,u);throw B("RegExp#exec called on incompatible receiver")}},2261:function(S,I,n){"use strict";var b,N,c=n(6916),r=n(1702),o=n(1340),l=n(7066),h=n(2999),a=n(2309),B=n(30),E=n(9909).get,u=n(9441),C=n(7168),e=a("native-string-replace",String.prototype.replace),f=RegExp.prototype.exec,g=f,w=r("".charAt),Q=r("".indexOf),m=r("".replace),T=r("".slice),x=(N=/b*/g,c(f,b=/a/,"a"),c(f,N,"a"),0!==b.lastIndex||0!==N.lastIndex),M=h.UNSUPPORTED_Y||h.BROKEN_CARET,D=void 0!==/()??/.exec("")[1];(x||D||M||u||C)&&(g=function(N){var lA,_,uA,pA,cA,gA,BA,Y=this,R=E(Y),P=o(N),nA=R.raw;if(nA)return nA.lastIndex=Y.lastIndex,lA=c(g,nA,P),Y.lastIndex=nA.lastIndex,lA;var yA=R.groups,FA=M&&Y.sticky,$=c(l,Y),MA=Y.source,fA=0,dA=P;if(FA&&($=m($,"y",""),-1===Q($,"g")&&($+="g"),dA=T(P,Y.lastIndex),Y.lastIndex>0&&(!Y.multiline||Y.multiline&&"\n"!==w(P,Y.lastIndex-1))&&(MA="(?: "+MA+")",dA=" "+dA,fA++),_=new RegExp("^(?:"+MA+")",$)),D&&(_=new RegExp("^"+MA+"$(?!\\s)",$)),x&&(uA=Y.lastIndex),pA=c(f,FA?_:Y,dA),FA?pA?(pA.input=T(pA.input,fA),pA[0]=T(pA[0],fA),pA.index=Y.lastIndex,Y.lastIndex+=pA[0].length):Y.lastIndex=0:x&&pA&&(Y.lastIndex=Y.global?pA.index+pA[0].length:uA),D&&pA&&pA.length>1&&c(e,pA[0],_,function(){for(cA=1;cAb)","g");return"b"!==l.exec("b").groups.a||"bc"!=="b".replace(l,"$c")})},4488:function(S,I,n){var r=n(7854).TypeError;S.exports=function(o){if(null==o)throw r("Can't call method on "+o);return o}},3505:function(S,I,n){var c=n(7854),r=Object.defineProperty;S.exports=function(o,l){try{r(c,o,{value:l,configurable:!0,writable:!0})}catch(h){c[o]=l}return l}},6340:function(S,I,n){"use strict";var c=n(5005),r=n(3070),o=n(5112),l=n(9781),h=o("species");S.exports=function(a){var B=c(a);l&&B&&!B[h]&&(0,r.f)(B,h,{configurable:!0,get:function(){return this}})}},8003:function(S,I,n){var c=n(3070).f,r=n(2597),l=n(5112)("toStringTag");S.exports=function(h,a,B){h&&!r(h=B?h:h.prototype,l)&&c(h,l,{configurable:!0,value:a})}},6200:function(S,I,n){var c=n(2309),r=n(9711),o=c("keys");S.exports=function(l){return o[l]||(o[l]=r(l))}},5465:function(S,I,n){var c=n(7854),r=n(3505),o="__core-js_shared__",l=c[o]||r(o,{});S.exports=l},2309:function(S,I,n){var c=n(1913),r=n(5465);(S.exports=function(o,l){return r[o]||(r[o]=void 0!==l?l:{})})("versions",[]).push({version:"3.19.0",mode:c?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(S,I,n){var c=n(9670),r=n(9483),l=n(5112)("species");S.exports=function(h,a){var E,B=c(h).constructor;return void 0===B||null==(E=c(B)[l])?a:r(E)}},3429:function(S,I,n){var c=n(7293);S.exports=function(r){return c(function(){var o=""[r]('"');return o!==o.toLowerCase()||o.split('"').length>3})}},8710:function(S,I,n){var c=n(1702),r=n(9303),o=n(1340),l=n(4488),h=c("".charAt),a=c("".charCodeAt),B=c("".slice),E=function(u){return function(C,e){var Q,m,f=o(l(C)),g=r(e),w=f.length;return g<0||g>=w?u?"":void 0:(Q=a(f,g))<55296||Q>56319||g+1===w||(m=a(f,g+1))<56320||m>57343?u?h(f,g):Q:u?B(f,g,g+2):m-56320+(Q-55296<<10)+65536}};S.exports={codeAt:E(!1),charAt:E(!0)}},8415:function(S,I,n){"use strict";var c=n(7854),r=n(9303),o=n(1340),l=n(4488),h=c.RangeError;S.exports=function(B){var E=o(l(this)),u="",C=r(B);if(C<0||C==1/0)throw h("Wrong number of repetitions");for(;C>0;(C>>>=1)&&(E+=E))1&C&&(u+=E);return u}},6091:function(S,I,n){var c=n(6530).PROPER,r=n(7293),o=n(1361);S.exports=function(h){return r(function(){return!!o[h]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[h]()||c&&o[h].name!==h})}},3111:function(S,I,n){var c=n(1702),r=n(4488),o=n(1340),l=n(1361),h=c("".replace),a="["+l+"]",B=RegExp("^"+a+a+"*"),E=RegExp(a+a+"*$"),u=function(C){return function(e){var f=o(r(e));return 1&C&&(f=h(f,B,"")),2&C&&(f=h(f,E,"")),f}};S.exports={start:u(1),end:u(2),trim:u(3)}},261:function(S,I,n){var b,N,Y,R,c=n(7854),r=n(2104),o=n(9974),l=n(614),h=n(2597),a=n(7293),B=n(490),E=n(206),u=n(317),C=n(6833),e=n(5268),f=c.setImmediate,g=c.clearImmediate,w=c.process,Q=c.Dispatch,m=c.Function,T=c.MessageChannel,x=c.String,M=0,D={},y="onreadystatechange";try{b=c.location}catch(uA){}var P=function(uA){if(h(D,uA)){var pA=D[uA];delete D[uA],pA()}},nA=function(uA){return function(){P(uA)}},lA=function(uA){P(uA.data)},_=function(uA){c.postMessage(x(uA),b.protocol+"//"+b.host)};(!f||!g)&&(f=function(pA){var cA=E(arguments,1);return D[++M]=function(){r(l(pA)?pA:m(pA),void 0,cA)},N(M),M},g=function(pA){delete D[pA]},e?N=function(uA){w.nextTick(nA(uA))}:Q&&Q.now?N=function(uA){Q.now(nA(uA))}:T&&!C?(R=(Y=new T).port2,Y.port1.onmessage=lA,N=o(R.postMessage,R)):c.addEventListener&&l(c.postMessage)&&!c.importScripts&&b&&"file:"!==b.protocol&&!a(_)?(N=_,c.addEventListener("message",lA,!1)):N=y in u("script")?function(uA){B.appendChild(u("script"))[y]=function(){B.removeChild(this),P(uA)}}:function(uA){setTimeout(nA(uA),0)}),S.exports={set:f,clear:g}},863:function(S,I,n){var c=n(1702);S.exports=c(1..valueOf)},1400:function(S,I,n){var c=n(9303),r=Math.max,o=Math.min;S.exports=function(l,h){var a=c(l);return a<0?r(a+h,0):o(a,h)}},7067:function(S,I,n){var c=n(7854),r=n(9303),o=n(7466),l=c.RangeError;S.exports=function(h){if(void 0===h)return 0;var a=r(h),B=o(a);if(a!==B)throw l("Wrong length or index");return B}},5656:function(S,I,n){var c=n(8361),r=n(4488);S.exports=function(o){return c(r(o))}},9303:function(S){var I=Math.ceil,n=Math.floor;S.exports=function(c){var r=+c;return r!=r||0===r?0:(r>0?n:I)(r)}},7466:function(S,I,n){var c=n(9303),r=Math.min;S.exports=function(o){return o>0?r(c(o),9007199254740991):0}},7908:function(S,I,n){var c=n(7854),r=n(4488),o=c.Object;S.exports=function(l){return o(r(l))}},4590:function(S,I,n){var c=n(7854),r=n(3002),o=c.RangeError;S.exports=function(l,h){var a=r(l);if(a%h)throw o("Wrong offset");return a}},3002:function(S,I,n){var c=n(7854),r=n(9303),o=c.RangeError;S.exports=function(l){var h=r(l);if(h<0)throw o("The argument can't be less than 0");return h}},7593:function(S,I,n){var c=n(7854),r=n(6916),o=n(111),l=n(2190),h=n(8173),a=n(2140),B=n(5112),E=c.TypeError,u=B("toPrimitive");S.exports=function(C,e){if(!o(C)||l(C))return C;var g,f=h(C,u);if(f){if(void 0===e&&(e="default"),g=r(f,C,e),!o(g)||l(g))return g;throw E("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(C,e)}},4948:function(S,I,n){var c=n(7593),r=n(2190);S.exports=function(o){var l=c(o,"string");return r(l)?l:l+""}},1694:function(S,I,n){var o={};o[n(5112)("toStringTag")]="z",S.exports="[object z]"===String(o)},1340:function(S,I,n){var c=n(7854),r=n(648),o=c.String;S.exports=function(l){if("Symbol"===r(l))throw TypeError("Cannot convert a Symbol value to a string");return o(l)}},6330:function(S,I,n){var r=n(7854).String;S.exports=function(o){try{return r(o)}catch(l){return"Object"}}},9843:function(S,I,n){"use strict";var c=n(2109),r=n(7854),o=n(6916),l=n(9781),h=n(3832),a=n(2094),B=n(2091),E=n(5787),u=n(9114),C=n(8880),e=n(5988),f=n(7466),g=n(7067),w=n(4590),Q=n(4948),m=n(2597),T=n(648),x=n(111),M=n(2190),D=n(30),y=n(7976),b=n(7674),N=n(8006).f,Y=n(7321),R=n(2092).forEach,P=n(6340),nA=n(3070),lA=n(1236),_=n(9909),uA=n(9587),pA=_.get,cA=_.set,gA=nA.f,BA=lA.f,yA=Math.round,FA=r.RangeError,$=B.ArrayBuffer,MA=$.prototype,fA=B.DataView,dA=a.NATIVE_ARRAY_BUFFER_VIEWS,SA=a.TYPED_ARRAY_CONSTRUCTOR,zA=a.TYPED_ARRAY_TAG,XA=a.TypedArray,q=a.TypedArrayPrototype,O=a.aTypedArrayConstructor,AA=a.isTypedArray,W="BYTES_PER_ELEMENT",EA="Wrong length",vA=function(TA,at){O(TA);for(var It=0,mt=at.length,ht=new TA(mt);mt>It;)ht[It]=at[It++];return ht},iA=function(TA,at){gA(TA,at,{get:function(){return pA(this)[at]}})},wA=function(TA){var at;return y(MA,TA)||"ArrayBuffer"==(at=T(TA))||"SharedArrayBuffer"==at},GA=function(TA,at){return AA(TA)&&!M(at)&&at in TA&&e(+at)&&at>=0},et=function(at,It){return It=Q(It),GA(at,It)?u(2,at[It]):BA(at,It)},st=function(at,It,mt){return It=Q(It),!(GA(at,It)&&x(mt)&&m(mt,"value"))||m(mt,"get")||m(mt,"set")||mt.configurable||m(mt,"writable")&&!mt.writable||m(mt,"enumerable")&&!mt.enumerable?gA(at,It,mt):(at[It]=mt.value,at)};l?(dA||(lA.f=et,nA.f=st,iA(q,"buffer"),iA(q,"byteOffset"),iA(q,"byteLength"),iA(q,"length")),c({target:"Object",stat:!0,forced:!dA},{getOwnPropertyDescriptor:et,defineProperty:st}),S.exports=function(TA,at,It){var mt=TA.match(/\d+$/)[0]/8,ht=TA+(It?"Clamped":"")+"Array",JA="get"+TA,WA="set"+TA,it=r[ht],xA=it,Mt=xA&&xA.prototype,Et={},H=function(k,z){gA(k,z,{get:function(){return function(k,z){var QA=pA(k);return QA.view[JA](z*mt+QA.byteOffset,!0)}(this,z)},set:function(QA){return function(k,z,QA){var CA=pA(k);It&&(QA=(QA=yA(QA))<0?0:QA>255?255:255&QA),CA.view[WA](z*mt+CA.byteOffset,QA,!0)}(this,z,QA)},enumerable:!0})};dA?h&&(xA=at(function(k,z,QA,CA){return E(k,Mt),uA(x(z)?wA(z)?void 0!==CA?new it(z,w(QA,mt),CA):void 0!==QA?new it(z,w(QA,mt)):new it(z):AA(z)?vA(xA,z):o(Y,xA,z):new it(g(z)),k,xA)}),b&&b(xA,XA),R(N(it),function(k){k in xA||C(xA,k,it[k])}),xA.prototype=Mt):(xA=at(function(k,z,QA,CA){E(k,Mt);var gt,Yt,j,PA=0,rA=0;if(x(z)){if(!wA(z))return AA(z)?vA(xA,z):o(Y,xA,z);gt=z,rA=w(QA,mt);var qA=z.byteLength;if(void 0===CA){if(qA%mt||(Yt=qA-rA)<0)throw FA(EA)}else if((Yt=f(CA)*mt)+rA>qA)throw FA(EA);j=Yt/mt}else j=g(z),gt=new $(Yt=j*mt);for(cA(k,{buffer:gt,byteOffset:rA,byteLength:Yt,length:j,view:new fA(gt)});PA1?arguments[1]:void 0,m=void 0!==Q,T=B(g);if(T&&!E(T))for(N=(b=a(g,T)).next,g=[];!(y=r(N,b)).done;)g.push(y.value);for(m&&w>2&&(Q=c(Q,arguments[2])),M=h(g),D=new(u(f))(M),x=0;M>x;x++)D[x]=m?Q(g[x],x):g[x];return D}},6304:function(S,I,n){var c=n(2094),r=n(6707),o=c.TYPED_ARRAY_CONSTRUCTOR,l=c.aTypedArrayConstructor;S.exports=function(h){return l(r(h,h[o]))}},9711:function(S,I,n){var c=n(1702),r=0,o=Math.random(),l=c(1..toString);S.exports=function(h){return"Symbol("+(void 0===h?"":h)+")_"+l(++r+o,36)}},3307:function(S,I,n){var c=n(133);S.exports=c&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:function(S,I,n){var c=n(5112);I.f=c},5112:function(S,I,n){var c=n(7854),r=n(2309),o=n(2597),l=n(9711),h=n(133),a=n(3307),B=r("wks"),E=c.Symbol,u=E&&E.for,C=a?E:E&&E.withoutSetter||l;S.exports=function(e){if(!o(B,e)||!h&&"string"!=typeof B[e]){var f="Symbol."+e;B[e]=h&&o(E,e)?E[e]:a&&u?u(f):C(f)}return B[e]}},1361:function(S){S.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},9170:function(S,I,n){"use strict";var c=n(2109),r=n(7854),o=n(7976),l=n(9518),h=n(7674),a=n(9920),B=n(30),E=n(8880),u=n(9114),C=n(7741),e=n(8340),f=n(408),g=n(6277),w=n(2914),Q=r.Error,m=[].push,T=function(D,y){var b=o(x,this)?this:B(x),N=arguments.length>2?arguments[2]:void 0;h&&(b=h(new Q(void 0),l(b))),E(b,"message",g(y,"")),w&&E(b,"stack",C(b.stack,1)),e(b,N);var Y=[];return f(D,m,{that:Y}),E(b,"errors",Y),b};h?h(T,Q):a(T,Q);var x=T.prototype=B(Q.prototype,{constructor:u(1,T),message:u(1,""),name:u(1,"AggregateError")});c({global:!0},{AggregateError:T})},2222:function(S,I,n){"use strict";var c=n(2109),r=n(7854),o=n(7293),l=n(3157),h=n(111),a=n(7908),B=n(6244),E=n(6135),u=n(5417),C=n(1194),e=n(5112),f=n(7392),g=e("isConcatSpreadable"),w=9007199254740991,Q="Maximum allowed index exceeded",m=r.TypeError,T=f>=51||!o(function(){var y=[];return y[g]=!1,y.concat()[0]!==y}),x=C("concat"),M=function(y){if(!h(y))return!1;var b=y[g];return void 0!==b?!!b:l(y)};c({target:"Array",proto:!0,forced:!T||!x},{concat:function(b){var P,nA,lA,_,uA,N=a(this),Y=u(N,0),R=0;for(P=-1,lA=arguments.length;Pw)throw m(Q);for(nA=0;nA<_;nA++,R++)nA in uA&&E(Y,R,uA[nA])}else{if(R>=w)throw m(Q);E(Y,R++,uA)}return Y.length=R,Y}})},545:function(S,I,n){var c=n(2109),r=n(1048),o=n(1223);c({target:"Array",proto:!0},{copyWithin:r}),o("copyWithin")},3290:function(S,I,n){var c=n(2109),r=n(1285),o=n(1223);c({target:"Array",proto:!0},{fill:r}),o("fill")},7327:function(S,I,n){"use strict";var c=n(2109),r=n(2092).filter;c({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(a){return r(this,a,arguments.length>1?arguments[1]:void 0)}})},1038:function(S,I,n){var c=n(2109),r=n(8457);c({target:"Array",stat:!0,forced:!n(7072)(function(h){Array.from(h)})},{from:r})},6699:function(S,I,n){"use strict";var c=n(2109),r=n(1318).includes,o=n(1223);c({target:"Array",proto:!0},{includes:function(h){return r(this,h,arguments.length>1?arguments[1]:void 0)}}),o("includes")},6992:function(S,I,n){"use strict";var c=n(5656),r=n(1223),o=n(7497),l=n(9909),h=n(654),a="Array Iterator",B=l.set,E=l.getterFor(a);S.exports=h(Array,"Array",function(u,C){B(this,{type:a,target:c(u),index:0,kind:C})},function(){var u=E(this),C=u.target,e=u.kind,f=u.index++;return!C||f>=C.length?(u.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:f,done:!1}:"values"==e?{value:C[f],done:!1}:{value:[f,C[f]],done:!1}},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},9600:function(S,I,n){"use strict";var c=n(2109),r=n(1702),o=n(8361),l=n(5656),h=n(9341),a=r([].join),B=o!=Object,E=h("join",",");c({target:"Array",proto:!0,forced:B||!E},{join:function(C){return a(l(this),void 0===C?",":C)}})},1249:function(S,I,n){"use strict";var c=n(2109),r=n(2092).map;c({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(a){return r(this,a,arguments.length>1?arguments[1]:void 0)}})},7042:function(S,I,n){"use strict";var c=n(2109),r=n(7854),o=n(3157),l=n(4411),h=n(111),a=n(1400),B=n(6244),E=n(5656),u=n(6135),C=n(5112),e=n(1194),f=n(206),g=e("slice"),w=C("species"),Q=r.Array,m=Math.max;c({target:"Array",proto:!0,forced:!g},{slice:function(x,M){var Y,R,P,D=E(this),y=B(D),b=a(x,y),N=a(void 0===M?y:M,y);if(o(D)&&((l(Y=D.constructor)&&(Y===Q||o(Y.prototype))||h(Y)&&null===(Y=Y[w]))&&(Y=void 0),Y===Q||void 0===Y))return f(D,b,N);for(R=new(void 0===Y?Q:Y)(m(N-b,0)),P=0;b3)){if(e)return!0;if(g)return g<603;var Y,R,P,nA,N="";for(Y=65;Y<76;Y++){switch(R=String.fromCharCode(Y),Y){case 66:case 69:case 70:case 72:P=3;break;case 68:case 71:P=4;break;default:P=2}for(nA=0;nA<47;nA++)w.push({k:R+nA,v:P})}for(w.sort(function(lA,_){return _.v-lA.v}),nA=0;nAa(R)?1:-1}}(Y)),lA=P.length,_=0;_w)throw e(Q);for(R=B(M,Y),P=0;PD-Y+N;P--)delete M[P-1]}else if(N>Y)for(P=D-Y;P>y;P--)lA=P+N-1,(nA=P+Y-1)in M?M[lA]=M[nA]:delete M[lA];for(P=0;P2)if(uA=m(uA),43===(pA=b(uA,0))||45===pA){if(88===(cA=b(uA,2))||120===cA)return NaN}else if(48===pA){switch(b(uA,1)){case 66:case 98:gA=2,BA=49;break;case 79:case 111:gA=8,BA=55;break;default:return+uA}for(FA=(yA=y(uA,2)).length,$=0;$BA)return NaN;return parseInt(yA,gA)}return+uA};if(l(T,!x(" 0o1")||!x("0b1")||x("+0x1"))){for(var lA,R=function(uA){var pA=arguments.length<1?0:x(N(uA)),cA=this;return E(M,cA)&&e(function(){Q(cA)})?B(Object(pA),cA,R):pA},P=c?f(x):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),nA=0;P.length>nA;nA++)a(x,lA=P[nA])&&!a(R,lA)&&w(R,lA,g(x,lA));R.prototype=M,M.constructor=R,h(r,T,R)}},3299:function(S,I,n){n(2109)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},5192:function(S,I,n){n(2109)({target:"Number",stat:!0},{isFinite:n(7023)})},3161:function(S,I,n){n(2109)({target:"Number",stat:!0},{isInteger:n(5988)})},6977:function(S,I,n){"use strict";var c=n(2109),r=n(7854),o=n(1702),l=n(9303),h=n(863),a=n(8415),B=n(7293),E=r.RangeError,u=r.String,C=Math.floor,e=o(a),f=o("".slice),g=o(1..toFixed),w=function(D,y,b){return 0===y?b:y%2==1?w(D,y-1,b*D):w(D*D,y/2,b)},m=function(D,y,b){for(var N=-1,Y=b;++N<6;)D[N]=(Y+=y*D[N])%1e7,Y=C(Y/1e7)},T=function(D,y){for(var b=6,N=0;--b>=0;)D[b]=C((N+=D[b])/y),N=N%y*1e7},x=function(D){for(var y=6,b="";--y>=0;)if(""!==b||0===y||0!==D[y]){var N=u(D[y]);b=""===b?N:b+e("0",7-N.length)+N}return b};c({target:"Number",proto:!0,forced:B(function(){return"0.000"!==g(8e-5,3)||"1"!==g(.9,0)||"1.25"!==g(1.255,2)||"1000000000000000128"!==g(0xde0b6b3a7640080,0)})||!B(function(){g({})})},{toFixed:function(y){var nA,lA,_,uA,b=h(this),N=l(y),Y=[0,0,0,0,0,0],R="",P="0";if(N<0||N>20)throw E("Incorrect fraction digits");if(b!=b)return"NaN";if(b<=-1e21||b>=1e21)return u(b);if(b<0&&(R="-",b=-b),b>1e-21)if(lA=(nA=function(D){for(var y=0,b=D;b>=4096;)y+=12,b/=4096;for(;b>=2;)y+=1,b/=2;return y}(b*w(2,69,1))-69)<0?b*w(2,-nA,1):b/w(2,nA,1),lA*=4503599627370496,(nA=52-nA)>0){for(m(Y,0,lA),_=N;_>=7;)m(Y,1e7,0),_-=7;for(m(Y,w(10,_,1),0),_=nA-1;_>=23;)T(Y,8388608),_-=23;T(Y,1<<_),m(Y,1,1),T(Y,2),P=x(Y)}else m(Y,0,lA),m(Y,1<<-nA,0),P=x(Y)+e("0",N);return N>0?R+((uA=P.length)<=N?"0."+e("0",N-uA)+P:f(P,0,uA-N)+"."+f(P,uA-N)):R+P}})},9601:function(S,I,n){var c=n(2109),r=n(1574);c({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},3371:function(S,I,n){var c=n(2109),r=n(6677),o=n(7293),l=n(111),h=n(2423).onFreeze,a=Object.freeze;c({target:"Object",stat:!0,forced:o(function(){a(1)}),sham:!r},{freeze:function(u){return a&&l(u)?a(h(u)):u}})},5003:function(S,I,n){var c=n(2109),r=n(7293),o=n(5656),l=n(1236).f,h=n(9781),a=r(function(){l(1)});c({target:"Object",stat:!0,forced:!h||a,sham:!h},{getOwnPropertyDescriptor:function(u,C){return l(o(u),C)}})},9337:function(S,I,n){var c=n(2109),r=n(9781),o=n(3887),l=n(5656),h=n(1236),a=n(6135);c({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(E){for(var w,Q,u=l(E),C=h.f,e=o(u),f={},g=0;e.length>g;)void 0!==(Q=C(u,w=e[g++]))&&a(f,w,Q);return f}})},489:function(S,I,n){var c=n(2109),r=n(7293),o=n(7908),l=n(9518),h=n(8544);c({target:"Object",stat:!0,forced:r(function(){l(1)}),sham:!h},{getPrototypeOf:function(E){return l(o(E))}})},7941:function(S,I,n){var c=n(2109),r=n(7908),o=n(1956);c({target:"Object",stat:!0,forced:n(7293)(function(){o(1)})},{keys:function(B){return o(r(B))}})},1539:function(S,I,n){var c=n(1694),r=n(1320),o=n(288);c||r(Object.prototype,"toString",o,{unsafe:!0})},2479:function(S,I,n){var c=n(2109),r=n(4699).values;c({target:"Object",stat:!0},{values:function(l){return r(l)}})},7922:function(S,I,n){"use strict";var c=n(2109),r=n(6916),o=n(9662),l=n(8523),h=n(2534),a=n(408);c({target:"Promise",stat:!0},{allSettled:function(E){var u=this,C=l.f(u),e=C.resolve,f=C.reject,g=h(function(){var w=o(u.resolve),Q=[],m=0,T=1;a(E,function(x){var M=m++,D=!1;T++,r(w,u,x).then(function(y){D||(D=!0,Q[M]={status:"fulfilled",value:y},--T||e(Q))},function(y){D||(D=!0,Q[M]={status:"rejected",reason:y},--T||e(Q))})}),--T||e(Q)});return g.error&&f(g.value),C.promise}})},4668:function(S,I,n){"use strict";var c=n(2109),r=n(9662),o=n(5005),l=n(6916),h=n(8523),a=n(2534),B=n(408),E="No one promise resolved";c({target:"Promise",stat:!0},{any:function(C){var e=this,f=o("AggregateError"),g=h.f(e),w=g.resolve,Q=g.reject,m=a(function(){var T=r(e.resolve),x=[],M=0,D=1,y=!1;B(C,function(b){var N=M++,Y=!1;D++,l(T,e,b).then(function(R){Y||y||(y=!0,w(R))},function(R){Y||y||(Y=!0,x[N]=R,--D||Q(new f(x,E)))})}),--D||Q(new f(x,E))});return m.error&&Q(m.value),g.promise}})},7727:function(S,I,n){"use strict";var c=n(2109),r=n(1913),o=n(3366),l=n(7293),h=n(5005),a=n(614),B=n(6707),E=n(9478),u=n(1320);if(c({target:"Promise",proto:!0,real:!0,forced:!!o&&l(function(){o.prototype.finally.call({then:function(){}},function(){})})},{finally:function(f){var g=B(this,h("Promise")),w=a(f);return this.then(w?function(Q){return E(g,f()).then(function(){return Q})}:f,w?function(Q){return E(g,f()).then(function(){throw Q})}:f)}}),!r&&a(o)){var e=h("Promise").prototype.finally;o.prototype.finally!==e&&u(o.prototype,"finally",e,{unsafe:!0})}},8674:function(S,I,n){"use strict";var TA,at,It,mt,c=n(2109),r=n(1913),o=n(7854),l=n(5005),h=n(6916),a=n(3366),B=n(1320),E=n(2248),u=n(7674),C=n(8003),e=n(6340),f=n(9662),g=n(614),w=n(111),Q=n(5787),m=n(2788),T=n(408),x=n(7072),M=n(6707),D=n(261).set,y=n(5948),b=n(9478),N=n(842),Y=n(8523),R=n(2534),P=n(9909),nA=n(4705),lA=n(5112),_=n(7871),uA=n(5268),pA=n(7392),cA=lA("species"),gA="Promise",BA=P.get,yA=P.set,FA=P.getterFor(gA),$=a&&a.prototype,MA=a,fA=$,dA=o.TypeError,SA=o.document,zA=o.process,XA=Y.f,q=XA,O=!!(SA&&SA.createEvent&&o.dispatchEvent),AA=g(o.PromiseRejectionEvent),W="unhandledrejection",st=!1,ht=nA(gA,function(){var z=m(MA),QA=z!==String(MA);if(!QA&&66===pA||r&&!fA.finally)return!0;if(pA>=51&&/native code/.test(z))return!1;var CA=new MA(function(gt){gt(1)}),PA=function(gt){gt(function(){},function(){})};return(CA.constructor={})[cA]=PA,!(st=CA.then(function(){})instanceof PA)||!QA&&_&&!AA}),JA=ht||!x(function(z){MA.all(z).catch(function(){})}),WA=function(z){var QA;return!(!w(z)||!g(QA=z.then))&&QA},it=function(z,QA){if(!z.notified){z.notified=!0;var CA=z.reactions;y(function(){for(var PA=z.value,rA=1==z.state,gt=0;CA.length>gt;){var jA,lt,zt,Yt=CA[gt++],j=rA?Yt.ok:Yt.fail,qA=Yt.resolve,KA=Yt.reject,DA=Yt.domain;try{j?(rA||(2===z.rejection&&Tt(z),z.rejection=1),!0===j?jA=PA:(DA&&DA.enter(),jA=j(PA),DA&&(DA.exit(),zt=!0)),jA===Yt.promise?KA(dA("Promise-chain cycle")):(lt=WA(jA))?h(lt,jA,qA,KA):qA(jA)):KA(PA)}catch(xt){DA&&!zt&&DA.exit(),KA(xt)}}z.reactions=[],z.notified=!1,QA&&!z.rejection&&Mt(z)})}},xA=function(z,QA,CA){var PA,rA;O?((PA=SA.createEvent("Event")).promise=QA,PA.reason=CA,PA.initEvent(z,!1,!0),o.dispatchEvent(PA)):PA={promise:QA,reason:CA},!AA&&(rA=o["on"+z])?rA(PA):z===W&&N("Unhandled promise rejection",CA)},Mt=function(z){h(D,o,function(){var rA,QA=z.facade,CA=z.value;if(Et(z)&&(rA=R(function(){uA?zA.emit("unhandledRejection",CA,QA):xA(W,QA,CA)}),z.rejection=uA||Et(z)?2:1,rA.error))throw rA.value})},Et=function(z){return 1!==z.rejection&&!z.parent},Tt=function(z){h(D,o,function(){var QA=z.facade;uA?zA.emit("rejectionHandled",QA):xA("rejectionhandled",QA,z.value)})},OA=function(z,QA,CA){return function(PA){z(QA,PA,CA)}},H=function(z,QA,CA){z.done||(z.done=!0,CA&&(z=CA),z.value=QA,z.state=2,it(z,!0))},k=function(z,QA,CA){if(!z.done){z.done=!0,CA&&(z=CA);try{if(z.facade===QA)throw dA("Promise can't be resolved itself");var PA=WA(QA);PA?y(function(){var rA={done:!1};try{h(PA,QA,OA(k,rA,z),OA(H,rA,z))}catch(gt){H(rA,gt,z)}}):(z.value=QA,z.state=1,it(z,!1))}catch(rA){H({done:!1},rA,z)}}};if(ht&&(MA=function(QA){Q(this,fA),f(QA),h(TA,this);var CA=BA(this);try{QA(OA(k,CA),OA(H,CA))}catch(PA){H(CA,PA)}},(TA=function(QA){yA(this,{type:gA,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=E(fA=MA.prototype,{then:function(QA,CA){var PA=FA(this),rA=PA.reactions,gt=XA(M(this,MA));return gt.ok=!g(QA)||QA,gt.fail=g(CA)&&CA,gt.domain=uA?zA.domain:void 0,PA.parent=!0,rA[rA.length]=gt,0!=PA.state&&it(PA,!1),gt.promise},catch:function(z){return this.then(void 0,z)}}),at=function(){var z=new TA,QA=BA(z);this.promise=z,this.resolve=OA(k,QA),this.reject=OA(H,QA)},Y.f=XA=function(z){return z===MA||z===It?new at(z):q(z)},!r&&g(a)&&$!==Object.prototype)){mt=$.then,st||(B($,"then",function(QA,CA){var PA=this;return new MA(function(rA,gt){h(mt,PA,rA,gt)}).then(QA,CA)},{unsafe:!0}),B($,"catch",fA.catch,{unsafe:!0}));try{delete $.constructor}catch(z){}u&&u($,fA)}c({global:!0,wrap:!0,forced:ht},{Promise:MA}),C(MA,gA,!1,!0),e(gA),It=l(gA),c({target:gA,stat:!0,forced:ht},{reject:function(QA){var CA=XA(this);return h(CA.reject,void 0,QA),CA.promise}}),c({target:gA,stat:!0,forced:r||ht},{resolve:function(QA){return b(r&&this===It?MA:this,QA)}}),c({target:gA,stat:!0,forced:JA},{all:function(QA){var CA=this,PA=XA(CA),rA=PA.resolve,gt=PA.reject,Yt=R(function(){var j=f(CA.resolve),qA=[],KA=0,DA=1;T(QA,function(jA){var lt=KA++,zt=!1;DA++,h(j,CA,jA).then(function(xt){zt||(zt=!0,qA[lt]=xt,--DA||rA(qA))},gt)}),--DA||rA(qA)});return Yt.error&>(Yt.value),PA.promise},race:function(QA){var CA=this,PA=XA(CA),rA=PA.reject,gt=R(function(){var Yt=f(CA.resolve);T(QA,function(j){h(Yt,CA,j).then(PA.resolve,rA)})});return gt.error&&rA(gt.value),PA.promise}})},2419:function(S,I,n){var c=n(2109),r=n(5005),o=n(2104),l=n(7065),h=n(9483),a=n(9670),B=n(111),E=n(30),u=n(7293),C=r("Reflect","construct"),e=Object.prototype,f=[].push,g=u(function(){function m(){}return!(C(function(){},[],m)instanceof m)}),w=!u(function(){C(function(){})}),Q=g||w;c({target:"Reflect",stat:!0,forced:Q,sham:Q},{construct:function(T,x){h(T),a(x);var M=arguments.length<3?T:h(arguments[2]);if(w&&!g)return C(T,x,M);if(T==M){switch(x.length){case 0:return new T;case 1:return new T(x[0]);case 2:return new T(x[0],x[1]);case 3:return new T(x[0],x[1],x[2]);case 4:return new T(x[0],x[1],x[2],x[3])}var D=[null];return o(f,D,x),new(o(l,T,D))}var y=M.prototype,b=E(B(y)?y:e),N=o(T,b,x);return B(N)?N:b}})},4916:function(S,I,n){"use strict";var c=n(2109),r=n(2261);c({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},2087:function(S,I,n){var c=n(9781),r=n(3070),o=n(7066),l=n(7293),h=RegExp.prototype;c&&l(function(){return"sy"!==Object.getOwnPropertyDescriptor(h,"flags").get.call({dotAll:!0,sticky:!0})})&&r.f(h,"flags",{configurable:!0,get:o})},9714:function(S,I,n){"use strict";var c=n(1702),r=n(6530).PROPER,o=n(1320),l=n(9670),h=n(7976),a=n(1340),B=n(7293),E=n(7066),u="toString",C=RegExp.prototype,e=C[u],f=c(E);(B(function(){return"/a/b"!=e.call({source:"a",flags:"b"})})||r&&e.name!=u)&&o(RegExp.prototype,u,function(){var m=l(this),T=a(m.source),x=m.flags;return"/"+T+"/"+a(void 0===x&&h(C,m)&&!("flags"in C)?f(m):x)},{unsafe:!0})},189:function(S,I,n){"use strict";n(7710)("Set",function(o){return function(){return o(this,arguments.length?arguments[0]:void 0)}},n(5631))},9841:function(S,I,n){"use strict";var c=n(2109),r=n(8710).codeAt;c({target:"String",proto:!0},{codePointAt:function(l){return r(this,l)}})},4953:function(S,I,n){var c=n(2109),r=n(7854),o=n(1702),l=n(1400),h=r.RangeError,a=String.fromCharCode,B=String.fromCodePoint,E=o([].join);c({target:"String",stat:!0,forced:!!B&&1!=B.length},{fromCodePoint:function(e){for(var Q,f=[],g=arguments.length,w=0;g>w;){if(Q=+arguments[w++],l(Q,1114111)!==Q)throw h(Q+" is not a valid code point");f[w]=Q<65536?a(Q):a(55296+((Q-=65536)>>10),Q%1024+56320)}return E(f,"")}})},2023:function(S,I,n){"use strict";var c=n(2109),r=n(1702),o=n(3929),l=n(4488),h=n(1340),a=n(4964),B=r("".indexOf);c({target:"String",proto:!0,forced:!a("includes")},{includes:function(u){return!!~B(h(l(this)),h(o(u)),arguments.length>1?arguments[1]:void 0)}})},8734:function(S,I,n){"use strict";var c=n(2109),r=n(4230);c({target:"String",proto:!0,forced:n(3429)("italics")},{italics:function(){return r(this,"i","","")}})},8783:function(S,I,n){"use strict";var c=n(8710).charAt,r=n(1340),o=n(9909),l=n(654),h="String Iterator",a=o.set,B=o.getterFor(h);l(String,"String",function(E){a(this,{type:h,string:r(E),index:0})},function(){var f,u=B(this),C=u.string,e=u.index;return e>=C.length?{value:void 0,done:!0}:(f=c(C,e),u.index+=f.length,{value:f,done:!1})})},9254:function(S,I,n){"use strict";var c=n(2109),r=n(4230);c({target:"String",proto:!0,forced:n(3429)("link")},{link:function(h){return r(this,"a","href",h)}})},6373:function(S,I,n){"use strict";var c=n(2109),r=n(7854),o=n(6916),l=n(1702),h=n(4994),a=n(4488),B=n(7466),E=n(1340),u=n(9670),C=n(4326),e=n(7976),f=n(7850),g=n(7066),w=n(8173),Q=n(1320),m=n(7293),T=n(5112),x=n(6707),M=n(1530),D=n(7651),y=n(9909),b=n(1913),N=T("matchAll"),Y="RegExp String",R=Y+" Iterator",P=y.set,nA=y.getterFor(R),lA=RegExp.prototype,_=r.TypeError,uA=l(g),pA=l("".indexOf),cA=l("".matchAll),gA=!!cA&&!m(function(){cA("a",/./)}),BA=h(function($,MA,fA,dA){P(this,{type:R,regexp:$,string:MA,global:fA,unicode:dA,done:!1})},Y,function(){var $=nA(this);if($.done)return{value:void 0,done:!0};var MA=$.regexp,fA=$.string,dA=D(MA,fA);return null===dA?{value:void 0,done:$.done=!0}:$.global?(""===E(dA[0])&&(MA.lastIndex=M(fA,B(MA.lastIndex),$.unicode)),{value:dA,done:!1}):($.done=!0,{value:dA,done:!1})}),yA=function(FA){var fA,dA,SA,zA,XA,q,$=u(this),MA=E(FA);return fA=x($,RegExp),void 0===(dA=$.flags)&&e(lA,$)&&!("flags"in lA)&&(dA=uA($)),SA=void 0===dA?"":E(dA),zA=new fA(fA===RegExp?$.source:$,SA),XA=!!~pA(SA,"g"),q=!!~pA(SA,"u"),zA.lastIndex=B($.lastIndex),new BA(zA,MA,XA,q)};c({target:"String",proto:!0,forced:gA},{matchAll:function($){var fA,dA,SA,zA,MA=a(this);if(null!=$){if(f($)&&(fA=E(a("flags"in lA?$.flags:uA($))),!~pA(fA,"g")))throw _("`.matchAll` does not allow non-global regexes");if(gA)return cA(MA,$);if(void 0===(SA=w($,N))&&b&&"RegExp"==C($)&&(SA=yA),SA)return o(SA,$,MA)}else if(gA)return cA(MA,$);return dA=E(MA),zA=new RegExp($,"g"),b?o(yA,zA,dA):zA[N](dA)}}),b||N in lA||Q(lA,N,yA)},4723:function(S,I,n){"use strict";var c=n(6916),r=n(7007),o=n(9670),l=n(7466),h=n(1340),a=n(4488),B=n(8173),E=n(1530),u=n(7651);r("match",function(C,e,f){return[function(w){var Q=a(this),m=null==w?void 0:B(w,C);return m?c(m,w,Q):new RegExp(w)[C](h(Q))},function(g){var w=o(this),Q=h(g),m=f(e,w,Q);if(m.done)return m.value;if(!w.global)return u(w,Q);var T=w.unicode;w.lastIndex=0;for(var D,x=[],M=0;null!==(D=u(w,Q));){var y=h(D[0]);x[M]=y,""===y&&(w.lastIndex=E(Q,l(w.lastIndex),T)),M++}return 0===M?null:x}]})},2481:function(S,I,n){n(2109)({target:"String",proto:!0},{repeat:n(8415)})},5306:function(S,I,n){"use strict";var c=n(2104),r=n(6916),o=n(1702),l=n(7007),h=n(7293),a=n(9670),B=n(614),E=n(9303),u=n(7466),C=n(1340),e=n(4488),f=n(1530),g=n(8173),w=n(647),Q=n(7651),T=n(5112)("replace"),x=Math.max,M=Math.min,D=o([].concat),y=o([].push),b=o("".indexOf),N=o("".slice),Y=function(lA){return void 0===lA?lA:String(lA)},R="$0"==="a".replace(/./,"$0"),P=!!/./[T]&&""===/./[T]("a","$0");l("replace",function(lA,_,uA){var pA=P?"$":"$0";return[function(gA,BA){var yA=e(this),FA=null==gA?void 0:g(gA,T);return FA?r(FA,gA,yA,BA):r(_,C(yA),gA,BA)},function(cA,gA){var BA=a(this),yA=C(cA);if("string"==typeof gA&&-1===b(gA,pA)&&-1===b(gA,"$<")){var FA=uA(_,BA,yA,gA);if(FA.done)return FA.value}var $=B(gA);$||(gA=C(gA));var MA=BA.global;if(MA){var fA=BA.unicode;BA.lastIndex=0}for(var dA=[];;){var SA=Q(BA,yA);if(null===SA||(y(dA,SA),!MA))break;""===C(SA[0])&&(BA.lastIndex=f(yA,u(BA.lastIndex),fA))}for(var XA="",q=0,O=0;O=q&&(XA+=N(yA,q,W)+GA,q=W+AA.length)}return XA+N(yA,q)}]},!!h(function(){var lA=/./;return lA.exec=function(){var _=[];return _.groups={a:"7"},_},"7"!=="".replace(lA,"$")})||!R||P)},3123:function(S,I,n){"use strict";var c=n(2104),r=n(6916),o=n(1702),l=n(7007),h=n(7850),a=n(9670),B=n(4488),E=n(6707),u=n(1530),C=n(7466),e=n(1340),f=n(8173),g=n(206),w=n(7651),Q=n(2261),m=n(2999),T=n(7293),x=m.UNSUPPORTED_Y,M=4294967295,D=Math.min,y=[].push,b=o(/./.exec),N=o(y),Y=o("".slice),R=!T(function(){var P=/(?:)/,nA=P.exec;P.exec=function(){return nA.apply(this,arguments)};var lA="ab".split(P);return 2!==lA.length||"a"!==lA[0]||"b"!==lA[1]});l("split",function(P,nA,lA){var _;return _="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(uA,pA){var cA=e(B(this)),gA=void 0===pA?M:pA>>>0;if(0===gA)return[];if(void 0===uA)return[cA];if(!h(uA))return r(nA,cA,uA,gA);for(var MA,fA,dA,BA=[],FA=0,$=new RegExp(uA.source,(uA.ignoreCase?"i":"")+(uA.multiline?"m":"")+(uA.unicode?"u":"")+(uA.sticky?"y":"")+"g");(MA=r(Q,$,cA))&&!((fA=$.lastIndex)>FA&&(N(BA,Y(cA,FA,MA.index)),MA.length>1&&MA.index=gA));)$.lastIndex===MA.index&&$.lastIndex++;return FA===cA.length?(dA||!b($,""))&&N(BA,""):N(BA,Y(cA,FA)),BA.length>gA?g(BA,0,gA):BA}:"0".split(void 0,0).length?function(uA,pA){return void 0===uA&&0===pA?[]:r(nA,this,uA,pA)}:nA,[function(pA,cA){var gA=B(this),BA=null==pA?void 0:f(pA,P);return BA?r(BA,pA,gA,cA):r(_,e(gA),pA,cA)},function(uA,pA){var cA=a(this),gA=e(uA),BA=lA(_,cA,gA,pA,_!==nA);if(BA.done)return BA.value;var yA=E(cA,RegExp),FA=cA.unicode,MA=new yA(x?"^(?:"+cA.source+")":cA,(cA.ignoreCase?"i":"")+(cA.multiline?"m":"")+(cA.unicode?"u":"")+(x?"g":"y")),fA=void 0===pA?M:pA>>>0;if(0===fA)return[];if(0===gA.length)return null===w(MA,gA)?[gA]:[];for(var dA=0,SA=0,zA=[];SA2?arguments[2]:void 0)})},8927:function(S,I,n){"use strict";var c=n(2094),r=n(2092).every,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("every",function(a){return r(o(this),a,arguments.length>1?arguments[1]:void 0)})},3105:function(S,I,n){"use strict";var c=n(2094),r=n(6916),o=n(1285),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("fill",function(B){var E=arguments.length;return r(o,l(this),B,E>1?arguments[1]:void 0,E>2?arguments[2]:void 0)})},5035:function(S,I,n){"use strict";var c=n(2094),r=n(2092).filter,o=n(3074),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("filter",function(B){var E=r(l(this),B,arguments.length>1?arguments[1]:void 0);return o(this,E)})},7174:function(S,I,n){"use strict";var c=n(2094),r=n(2092).findIndex,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("findIndex",function(a){return r(o(this),a,arguments.length>1?arguments[1]:void 0)})},4345:function(S,I,n){"use strict";var c=n(2094),r=n(2092).find,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("find",function(a){return r(o(this),a,arguments.length>1?arguments[1]:void 0)})},4197:function(S,I,n){n(9843)("Float32",function(r){return function(l,h,a){return r(this,l,h,a)}})},6495:function(S,I,n){n(9843)("Float64",function(r){return function(l,h,a){return r(this,l,h,a)}})},2846:function(S,I,n){"use strict";var c=n(2094),r=n(2092).forEach,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("forEach",function(a){r(o(this),a,arguments.length>1?arguments[1]:void 0)})},8145:function(S,I,n){"use strict";var c=n(3832);(0,n(2094).exportTypedArrayStaticMethod)("from",n(7321),c)},4731:function(S,I,n){"use strict";var c=n(2094),r=n(1318).includes,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("includes",function(a){return r(o(this),a,arguments.length>1?arguments[1]:void 0)})},7209:function(S,I,n){"use strict";var c=n(2094),r=n(1318).indexOf,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("indexOf",function(a){return r(o(this),a,arguments.length>1?arguments[1]:void 0)})},5109:function(S,I,n){n(9843)("Int16",function(r){return function(l,h,a){return r(this,l,h,a)}})},5125:function(S,I,n){n(9843)("Int32",function(r){return function(l,h,a){return r(this,l,h,a)}})},7145:function(S,I,n){n(9843)("Int8",function(r){return function(l,h,a){return r(this,l,h,a)}})},6319:function(S,I,n){"use strict";var c=n(7854),r=n(1702),o=n(6530).PROPER,l=n(2094),h=n(6992),B=n(5112)("iterator"),E=c.Uint8Array,u=r(h.values),C=r(h.keys),e=r(h.entries),f=l.aTypedArray,g=l.exportTypedArrayMethod,w=E&&E.prototype[B],Q=!!w&&"values"===w.name,m=function(){return u(f(this))};g("entries",function(){return e(f(this))}),g("keys",function(){return C(f(this))}),g("values",m,o&&!Q),g(B,m,o&&!Q)},8867:function(S,I,n){"use strict";var c=n(2094),r=n(1702),o=c.aTypedArray,l=c.exportTypedArrayMethod,h=r([].join);l("join",function(B){return h(o(this),B)})},7789:function(S,I,n){"use strict";var c=n(2094),r=n(2104),o=n(6583),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("lastIndexOf",function(B){var E=arguments.length;return r(o,l(this),E>1?[B,arguments[1]]:[B])})},3739:function(S,I,n){"use strict";var c=n(2094),r=n(2092).map,o=n(6304),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("map",function(B){return r(l(this),B,arguments.length>1?arguments[1]:void 0,function(E,u){return new(o(E))(u)})})},4483:function(S,I,n){"use strict";var c=n(2094),r=n(3671).right,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("reduceRight",function(a){var B=arguments.length;return r(o(this),a,B,B>1?arguments[1]:void 0)})},9368:function(S,I,n){"use strict";var c=n(2094),r=n(3671).left,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("reduce",function(a){var B=arguments.length;return r(o(this),a,B,B>1?arguments[1]:void 0)})},2056:function(S,I,n){"use strict";var c=n(2094),r=c.aTypedArray,l=Math.floor;(0,c.exportTypedArrayMethod)("reverse",function(){for(var C,a=this,B=r(a).length,E=l(B/2),u=0;u1?arguments[1]:void 0,1),w=this.length,Q=h(f),m=o(Q),T=0;if(m+g>w)throw B("Wrong length");for(;Tg;)Q[g]=e[g++];return Q},o(function(){new Int8Array(1).slice()}))},7462:function(S,I,n){"use strict";var c=n(2094),r=n(2092).some,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("some",function(a){return r(o(this),a,arguments.length>1?arguments[1]:void 0)})},3824:function(S,I,n){"use strict";var c=n(7854),r=n(1702),o=n(7293),l=n(9662),h=n(4362),a=n(2094),B=n(8886),E=n(256),u=n(7392),C=n(8008),e=c.Array,f=a.aTypedArray,g=a.exportTypedArrayMethod,w=c.Uint16Array,Q=w&&r(w.prototype.sort),m=!(!Q||o(function(){Q(new w(2),null)})&&o(function(){Q(new w(2),{})})),T=!!Q&&!o(function(){if(u)return u<74;if(B)return B<67;if(E)return!0;if(C)return C<602;var y,b,M=new w(516),D=e(516);for(y=0;y<516;y++)b=y%4,M[y]=515-y,D[y]=y-2*b+3;for(Q(M,function(N,Y){return(N/4|0)-(Y/4|0)}),y=0;y<516;y++)if(M[y]!==D[y])return!0});g("sort",function(D){return void 0!==D&&l(D),T?Q(this,D):h(f(this),(M=D,function(D,y){return void 0!==M?+M(D,y)||0:y!=y?-1:D!=D?1:0===D&&0===y?1/D>0&&1/y<0?1:-1:D>y}));var M},!T||m)},5021:function(S,I,n){"use strict";var c=n(2094),r=n(7466),o=n(1400),l=n(6304),h=c.aTypedArray;(0,c.exportTypedArrayMethod)("subarray",function(E,u){var C=h(this),e=C.length,f=o(E,e);return new(l(C))(C.buffer,C.byteOffset+f*C.BYTES_PER_ELEMENT,r((void 0===u?e:o(u,e))-f))})},2974:function(S,I,n){"use strict";var c=n(7854),r=n(2104),o=n(2094),l=n(7293),h=n(206),a=c.Int8Array,B=o.aTypedArray,E=o.exportTypedArrayMethod,u=[].toLocaleString,C=!!a&&l(function(){u.call(new a(1))});E("toLocaleString",function(){return r(u,C?h(B(this)):B(this),h(arguments))},l(function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()})||!l(function(){a.prototype.toLocaleString.call([1,2])}))},5016:function(S,I,n){"use strict";var c=n(2094).exportTypedArrayMethod,r=n(7293),o=n(7854),l=n(1702),h=o.Uint8Array,a=h&&h.prototype||{},B=[].toString,E=l([].join);r(function(){B.call({})})&&(B=function(){return E(this)}),c("toString",B,a.toString!=B)},8255:function(S,I,n){n(9843)("Uint16",function(r){return function(l,h,a){return r(this,l,h,a)}})},9135:function(S,I,n){n(9843)("Uint32",function(r){return function(l,h,a){return r(this,l,h,a)}})},2472:function(S,I,n){n(9843)("Uint8",function(r){return function(l,h,a){return r(this,l,h,a)}})},9743:function(S,I,n){n(9843)("Uint8",function(r){return function(l,h,a){return r(this,l,h,a)}},!0)},8628:function(S,I,n){n(9170)},5743:function(S,I,n){n(5837)},7314:function(S,I,n){n(7922)},6290:function(S,I,n){n(4668)},7479:function(S,I,n){"use strict";var c=n(2109),r=n(8523),o=n(2534);c({target:"Promise",stat:!0},{try:function(l){var h=r.f(this),a=o(l);return(a.error?h.reject:h.resolve)(a.value),h.promise}})},3728:function(S,I,n){n(6373)},4747:function(S,I,n){var c=n(7854),r=n(8324),o=n(8509),l=n(8533),h=n(8880),a=function(E){if(E&&E.forEach!==l)try{h(E,"forEach",l)}catch(u){E.forEach=l}};for(var B in r)r[B]&&a(c[B]&&c[B].prototype);a(o)},3948:function(S,I,n){var c=n(7854),r=n(8324),o=n(8509),l=n(6992),h=n(8880),a=n(5112),B=a("iterator"),E=a("toStringTag"),u=l.values,C=function(f,g){if(f){if(f[B]!==u)try{h(f,B,u)}catch(Q){f[B]=u}if(f[E]||h(f,E,g),r[g])for(var w in l)if(f[w]!==l[w])try{h(f,w,l[w])}catch(Q){f[w]=l[w]}}};for(var e in r)C(c[e]&&c[e].prototype,e);C(o,"DOMTokenList")},3753:function(S,I,n){"use strict";var c=n(2109),r=n(6916);c({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},1150:function(S,I,n){var c=n(7633);n(3948),S.exports=c},251:function(S,I,n){var c=n(2215),r=n(2584),o=n(609),l=n(8420),h=n(2847),a=n(8923),B=Date.prototype.getTime;function E(f,g,w){var Q=w||{};return!!(Q.strict?o(f,g):f===g)||(!f||!g||"object"!=typeof f&&"object"!=typeof g?Q.strict?o(f,g):f==g:function e(f,g,w){var Q,m;if(typeof f!=typeof g||u(f)||u(g)||f.prototype!==g.prototype||r(f)!==r(g))return!1;var T=l(f),x=l(g);if(T!==x)return!1;if(T||x)return f.source===g.source&&h(f)===h(g);if(a(f)&&a(g))return B.call(f)===B.call(g);var M=C(f),D=C(g);if(M!==D)return!1;if(M||D){if(f.length!==g.length)return!1;for(Q=0;Q=0;Q--)if(y[Q]!=b[Q])return!1;for(Q=y.length-1;Q>=0;Q--)if(!E(f[m=y[Q]],g[m],w))return!1;return!0}(f,g,Q))}function u(f){return null==f}function C(f){return!(!f||"object"!=typeof f||"number"!=typeof f.length||"function"!=typeof f.copy||"function"!=typeof f.slice||f.length>0&&"number"!=typeof f[0])}S.exports=E},4289:function(S,I,n){"use strict";var c=n(2215),r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,l=Array.prototype.concat,h=Object.defineProperty,E=h&&function(){var e={};try{for(var f in h(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(g){return!1}}(),u=function(e,f,g,w){f in e&&(!function(e){return"function"==typeof e&&"[object Function]"===o.call(e)}(w)||!w())||(E?h(e,f,{configurable:!0,enumerable:!1,value:g,writable:!0}):e[f]=g)},C=function(e,f){var g=arguments.length>2?arguments[2]:{},w=c(f);r&&(w=l.call(w,Object.getOwnPropertySymbols(f)));for(var Q=0;Q0&&R.length>N&&!R.warned){R.warned=!0;var P=new Error("Possible EventEmitter memory leak detected. "+R.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");P.name="MaxListenersExceededWarning",P.emitter=M,P.type=D,P.count=R.length,function r(M){console&&console.warn&&console.warn(M)}(P)}return M}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function C(M,D,y){var b={fired:!1,wrapFn:void 0,target:M,type:D,listener:y},N=u.bind(b);return N.listener=y,b.wrapFn=N,N}function e(M,D,y){var b=M._events;if(void 0===b)return[];var N=b[D];return void 0===N?[]:"function"==typeof N?y?[N.listener||N]:[N]:y?function Q(M){for(var D=new Array(M.length),y=0;y0&&(R=y[0]),R instanceof Error)throw R;var P=new Error("Unhandled error."+(R?" ("+R.message+")":""));throw P.context=R,P}var nA=Y[D];if(void 0===nA)return!1;if("function"==typeof nA)n(nA,this,y);else{var lA=nA.length,_=g(nA,lA);for(b=0;b=0;R--)if(b[R]===y||b[R].listener===y){P=b[R].listener,Y=R;break}if(Y<0)return this;0===Y?b.shift():function w(M,D){for(;D+1=0;N--)this.removeListener(D,y[N]);return this},l.prototype.listeners=function(D){return e(this,D,!0)},l.prototype.rawListeners=function(D){return e(this,D,!1)},l.listenerCount=function(M,D){return"function"==typeof M.listenerCount?M.listenerCount(D):f.call(M,D)},l.prototype.listenerCount=f,l.prototype.eventNames=function(){return this._eventsCount>0?c(this._events):[]}},2536:function(S,I,n){var c=n(4275),r=n(7672);void 0===r.pdfMake&&(r.pdfMake=c),S.exports=c},7672:function(S,I,n){"use strict";S.exports=function(){if("object"==typeof globalThis)return globalThis;var c;try{c=this||new Function("return this")()}catch(r){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return c}()},9804:function(S){var I=Object.prototype.hasOwnProperty,n=Object.prototype.toString;S.exports=function(r,o,l){if("[object Function]"!==n.call(o))throw new TypeError("iterator must be a function");var h=r.length;if(h===+h)for(var a=0;a1&&"boolean"!=typeof lA)throw new l('"allowMissing" argument must be a boolean');var _=Y(nA),uA=_.length>0?_[0]:"",pA=R("%"+uA+"%",lA),cA=pA.name,gA=pA.value,BA=!1,yA=pA.alias;yA&&(uA=yA[0],M(_,x([0,1],yA)));for(var FA=1,$=!0;FA<_.length;FA+=1){var MA=_[FA],fA=y(MA,0,1),dA=y(MA,-1);if(('"'===fA||"'"===fA||"`"===fA||'"'===dA||"'"===dA||"`"===dA)&&fA!==dA)throw new r("property names with quotes must have matching quotes");if(("constructor"===MA||!$)&&(BA=!0),T(g,cA="%"+(uA+="."+MA)+"%"))gA=g[cA];else if(null!=gA){if(!(MA in gA)){if(!lA)throw new l("base intrinsic for "+nA+" exists, but the property is not available.");return}if(a&&FA+1>=_.length){var SA=a(gA,MA);gA=($=!!SA)&&"get"in SA&&!("originalValue"in SA.get)?SA.get:gA[MA]}else $=T(gA,MA),gA=gA[MA];$&&!BA&&(g[cA]=gA)}}return gA}},1405:function(S,I,n){"use strict";var c="undefined"!=typeof Symbol&&Symbol,r=n(5419);S.exports=function(){return"function"==typeof c&&"function"==typeof Symbol&&"symbol"==typeof c("foo")&&"symbol"==typeof Symbol("bar")&&r()}},5419:function(S){"use strict";S.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var n={},c=Symbol("test"),r=Object(c);if("string"==typeof c||"[object Symbol]"!==Object.prototype.toString.call(c)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(c in n[c]=42,n)return!1;if("function"==typeof Object.keys&&0!==Object.keys(n).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(n).length)return!1;var l=Object.getOwnPropertySymbols(n);if(1!==l.length||l[0]!==c||!Object.prototype.propertyIsEnumerable.call(n,c))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var h=Object.getOwnPropertyDescriptor(n,c);if(42!==h.value||!0!==h.enumerable)return!1}return!0}},6410:function(S,I,n){"use strict";var c=n(5419);S.exports=function(){return c()&&!!Symbol.toStringTag}},7642:function(S,I,n){"use strict";var c=n(8612);S.exports=c.call(Function.call,Object.prototype.hasOwnProperty)},688:function(S,I,n){"use strict";var c=n(7103).Buffer;I._dbcs=u;for(var r=-1,l=-10,h=-1e3,a=new Array(256),E=0;E<256;E++)a[E]=r;function u(g,w){if(this.encodingName=g.encodingName,!g)throw new Error("DBCS codec is called without the data.");if(!g.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var Q=g.table();this.decodeTables=[],this.decodeTables[0]=a.slice(0),this.decodeTableSeq=[];for(var m=0;mh)throw new Error("gb18030 decode tables conflict at byte 2");for(var b=this.decodeTables[h-D[y]],N=129;N<=254;N++){if(b[N]===r)b[N]=h-x;else{if(b[N]===h-x)continue;if(b[N]>h)throw new Error("gb18030 decode tables conflict at byte 3")}for(var Y=this.decodeTables[h-b[N]],R=48;R<=57;R++)Y[R]===r&&(Y[R]=-2)}}}this.defaultCharUnicode=w.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var P={};if(g.encodeSkipVals)for(m=0;mw)return-1;for(var Q=0,m=g.length;Q>1);g[T]<=w?Q=T:m=T}return Q}u.prototype.encoder=C,u.prototype.decoder=e,u.prototype._getDecodeTrieNode=function(g){for(var w=[];g>0;g>>>=8)w.push(255&g);0==w.length&&w.push(0);for(var Q=this.decodeTables[0],m=w.length-1;m>0;m--){var T=Q[w[m]];if(T==r)Q[w[m]]=h-this.decodeTables.length,this.decodeTables.push(Q=a.slice(0));else{if(!(T<=h))throw new Error("Overwrite byte in "+this.encodingName+", addr: "+g.toString(16));Q=this.decodeTables[h-T]}}return Q},u.prototype._addDecodeChunk=function(g){var w=parseInt(g[0],16),Q=this._getDecodeTrieNode(w);w&=255;for(var m=1;m255)throw new Error("Incorrect chunk in "+this.encodingName+" at addr "+g[0]+": too long"+w)},u.prototype._getEncodeBucket=function(g){var w=g>>8;return void 0===this.encodeTable[w]&&(this.encodeTable[w]=a.slice(0)),this.encodeTable[w]},u.prototype._setEncodeChar=function(g,w){var Q=this._getEncodeBucket(g),m=255&g;Q[m]<=l?this.encodeTableSeq[l-Q[m]][-1]=w:Q[m]==r&&(Q[m]=w)},u.prototype._setEncodeSequence=function(g,w){var x,Q=g[0],m=this._getEncodeBucket(Q),T=255&Q;m[T]<=l?x=this.encodeTableSeq[l-m[T]]:(x={},m[T]!==r&&(x[-1]=m[T]),m[T]=l-this.encodeTableSeq.length,this.encodeTableSeq.push(x));for(var M=1;M=0)this._setEncodeChar(D,y),T=!0;else if(D<=h){var b=h-D;x[b]||(this._fillEncodeTable(b,y<<8>>>0,Q)?T=!0:x[b]=!0)}else D<=l&&(this._setEncodeSequence(this.decodeTableSeq[l-D],y),T=!0)}return T},C.prototype.write=function(g){for(var w=c.alloc(g.length*(this.gb18030?4:3)),Q=this.leadSurrogate,m=this.seqObj,T=-1,x=0,M=0;;){if(-1===T){if(x==g.length)break;var D=g.charCodeAt(x++)}else D=T,T=-1;if(55296<=D&&D<57344)if(D<56320){if(-1===Q){Q=D;continue}Q=D,D=r}else-1!==Q?(D=65536+1024*(Q-55296)+(D-56320),Q=-1):D=r;else-1!==Q&&(T=D,D=r,Q=-1);var y=r;if(void 0!==m&&D!=r){var b=m[D];if("object"==typeof b){m=b;continue}"number"==typeof b?y=b:null==b&&void 0!==(b=m[-1])&&(y=b,T=D),m=void 0}else if(D>=0){var N=this.encodeTable[D>>8];if(void 0!==N&&(y=N[255&D]),y<=l){m=this.encodeTableSeq[l-y];continue}if(y==r&&this.gb18030){var Y=f(this.gb18030.uChars,D);if(-1!=Y){y=this.gb18030.gbChars[Y]+(D-this.gb18030.uChars[Y]),w[M++]=129+Math.floor(y/12600),y%=12600,w[M++]=48+Math.floor(y/1260),y%=1260,w[M++]=129+Math.floor(y/10),w[M++]=48+(y%=10);continue}}}y===r&&(y=this.defaultCharSingleByte),y<256?w[M++]=y:y<65536?(w[M++]=y>>8,w[M++]=255&y):y<16777216?(w[M++]=y>>16,w[M++]=y>>8&255,w[M++]=255&y):(w[M++]=y>>>24,w[M++]=y>>>16&255,w[M++]=y>>>8&255,w[M++]=255&y)}return this.seqObj=m,this.leadSurrogate=Q,w.slice(0,M)},C.prototype.end=function(){if(-1!==this.leadSurrogate||void 0!==this.seqObj){var g=c.alloc(10),w=0;if(this.seqObj){var Q=this.seqObj[-1];void 0!==Q&&(Q<256?g[w++]=Q:(g[w++]=Q>>8,g[w++]=255&Q)),this.seqObj=void 0}return-1!==this.leadSurrogate&&(g[w++]=this.defaultCharSingleByte,this.leadSurrogate=-1),g.slice(0,w)}},C.prototype.findIdx=f,e.prototype.write=function(g){for(var w=c.alloc(2*g.length),Q=this.nodeIdx,m=this.prevBytes,T=this.prevBytes.length,x=-this.prevBytes.length,D=0,y=0;D=0?g[D]:m[D+T];if(!((M=this.decodeTables[Q][b])>=0))if(M===r)M=this.defaultCharUnicode.charCodeAt(0),D=x;else if(-2===M){if(D>=3)var N=12600*(g[D-3]-129)+1260*(g[D-2]-48)+10*(g[D-1]-129)+(b-48);else N=12600*(m[D-3+T]-129)+1260*((D-2>=0?g[D-2]:m[D-2+T])-48)+10*((D-1>=0?g[D-1]:m[D-1+T])-129)+(b-48);var Y=f(this.gb18030.gbChars,N);M=this.gb18030.uChars[Y]+N-this.gb18030.gbChars[Y]}else{if(M<=h){Q=h-M;continue}if(!(M<=l))throw new Error("iconv-lite internal error: invalid decoding table value "+M+" at "+Q+"/"+b);for(var R=this.decodeTableSeq[l-M],P=0;P>8;M=R[R.length-1]}if(M>=65536){var nA=55296|(M-=65536)>>10;w[y++]=255&nA,w[y++]=nA>>8,M=56320|1023&M}w[y++]=255&M,w[y++]=M>>8,Q=0,x=D+1}return this.nodeIdx=Q,this.prevBytes=x>=0?Array.prototype.slice.call(g,x):m.slice(x+T).concat(Array.prototype.slice.call(g)),w.slice(0,y).toString("ucs2")},e.prototype.end=function(){for(var g="";this.prevBytes.length>0;){g+=this.defaultCharUnicode;var w=this.prevBytes.slice(1);this.prevBytes=[],this.nodeIdx=0,w.length>0&&(g+=this.write(w))}return this.prevBytes=[],this.nodeIdx=0,g}},5990:function(S,I,n){"use strict";S.exports={shiftjis:{type:"_dbcs",table:function(){return n(7014)},encodeAdd:{"\xa5":92,"\u203e":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis",932:"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return n(5633)},encodeAdd:{"\xa5":92,"\u203e":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936",936:"cp936",cp936:{type:"_dbcs",table:function(){return n(3336)}},gbk:{type:"_dbcs",table:function(){return n(3336).concat(n(4346))}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return n(3336).concat(n(4346))},gb18030:function(){return n(6258)},encodeSkipVals:[128],encodeAdd:{"\u20ac":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949",949:"cp949",cp949:{type:"_dbcs",table:function(){return n(7348)}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950",950:"cp950",cp950:{type:"_dbcs",table:function(){return n(4284)}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return n(4284).concat(n(3480))},encodeSkipVals:[36457,36463,36478,36523,36532,36557,36560,36695,36713,36718,36811,36862,36973,36986,37060,37084,37105,37311,37551,37552,37553,37554,37585,37959,38090,38361,38652,39285,39798,39800,39803,39878,39902,39916,39926,40002,40019,40034,40040,40043,40055,40124,40125,40144,40279,40282,40388,40431,40443,40617,40687,40701,40800,40907,41079,41180,41183,36812,37576,38468,38637,41636,41637,41639,41638,41676,41678]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}},6934:function(S,I,n){"use strict";for(var c=[n(1025),n(7688),n(1279),n(758),n(9068),n(3769),n(7018),n(688),n(5990)],r=0;r>>6),C[e++]=128+(63&g)):(C[e++]=224+(g>>>12),C[e++]=128+(g>>>6&63),C[e++]=128+(63&g))}return C.slice(0,e)},B.prototype.end=function(){},E.prototype.write=function(u){for(var C=this.acc,e=this.contBytes,f=this.accBytes,g="",w=0;w0&&(g+=this.defaultCharUnicode,e=0),Q<128?g+=String.fromCharCode(Q):Q<224?(C=31&Q,e=1,f=1):Q<240?(C=15&Q,e=2,f=1):g+=this.defaultCharUnicode):e>0?(C=C<<6|63&Q,f++,0==--e&&(g+=2===f&&C<128&&C>0||3===f&&C<2048?this.defaultCharUnicode:String.fromCharCode(C))):g+=this.defaultCharUnicode}return this.acc=C,this.contBytes=e,this.accBytes=f,g},E.prototype.end=function(){var u=0;return this.contBytes>0&&(u+=this.defaultCharUnicode),u}},9068:function(S,I,n){"use strict";var c=n(7103).Buffer;function r(h,a){if(!h)throw new Error("SBCS codec is called without the data.");if(!h.chars||128!==h.chars.length&&256!==h.chars.length)throw new Error("Encoding '"+h.type+"' has incorrect 'chars' (must be of len 128 or 256)");if(128===h.chars.length){for(var B="",E=0;E<128;E++)B+=String.fromCharCode(E);h.chars=B+h.chars}this.decodeBuf=c.from(h.chars,"ucs2");var u=c.alloc(65536,a.defaultCharSingleByte.charCodeAt(0));for(E=0;E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\xb0\xb7\u2219\u221a\u2592\u2500\u2502\u253c\u2524\u252c\u251c\u2534\u2510\u250c\u2514\u2518\u03b2\u221e\u03c6\xb1\xbd\xbc\u2248\xab\xbb\ufef7\ufef8\ufffd\ufffd\ufefb\ufefc\ufffd\xa0\xad\ufe82\xa3\xa4\ufe84\ufffd\ufffd\ufe8e\ufe8f\ufe95\ufe99\u060c\ufe9d\ufea1\ufea5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\ufed1\u061b\ufeb1\ufeb5\ufeb9\u061f\xa2\ufe80\ufe81\ufe83\ufe85\ufeca\ufe8b\ufe8d\ufe91\ufe93\ufe97\ufe9b\ufe9f\ufea3\ufea7\ufea9\ufeab\ufead\ufeaf\ufeb3\ufeb7\ufebb\ufebf\ufec1\ufec5\ufecb\ufecf\xa6\xac\xf7\xd7\ufec9\u0640\ufed3\ufed7\ufedb\ufedf\ufee3\ufee7\ufeeb\ufeed\ufeef\ufef3\ufebd\ufecc\ufece\ufecd\ufee1\ufe7d\u0651\ufee5\ufee9\ufeec\ufef0\ufef2\ufed0\ufed5\ufef5\ufef6\ufedd\ufed9\ufef1\u25a0\ufffd"},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xf8\xa3\xd8\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xa4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0401\u0451\u0404\u0454\u0407\u0457\u040e\u045e\xb0\u2219\xb7\u221a\u2116\xa4\u25a0\xa0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0386\ufffd\xb7\xac\xa6\u2018\u2019\u0388\u2015\u0389\u038a\u03aa\u038c\ufffd\ufffd\u038e\u03ab\xa9\u038f\xb2\xb3\u03ac\xa3\u03ad\u03ae\u03af\u03ca\u0390\u03cc\u03cd\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xbd\u0398\u0399\xab\xbb\u2591\u2592\u2593\u2502\u2524\u039a\u039b\u039c\u039d\u2563\u2551\u2557\u255d\u039e\u039f\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u03a0\u03a1\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03b1\u03b2\u03b3\u2518\u250c\u2588\u2584\u03b4\u03b5\u2580\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c3\u03c2\u03c4\u0384\xad\xb1\u03c5\u03c6\u03c7\xa7\u03c8\u0385\xb0\xa8\u03c9\u03cb\u03b0\u03ce\u25a0\xa0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\u203e\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\u0160\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\u017d\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\u0161\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\u017e\xff"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\ufe88\xd7\xf7\uf8f6\uf8f5\uf8f4\uf8f7\ufe71\x88\u25a0\u2502\u2500\u2510\u250c\u2514\u2518\ufe79\ufe7b\ufe7d\ufe7f\ufe77\ufe8a\ufef0\ufef3\ufef2\ufece\ufecf\ufed0\ufef6\ufef8\ufefa\ufefc\xa0\uf8fa\uf8f9\uf8f8\xa4\uf8fb\ufe8b\ufe91\ufe97\ufe9b\ufe9f\ufea3\u060c\xad\ufea7\ufeb3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\ufeb7\u061b\ufebb\ufebf\ufeca\u061f\ufecb\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\ufec7\u0639\u063a\ufecc\ufe82\ufe84\ufe8e\ufed3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064a\u064b\u064c\u064d\u064e\u064f\u0650\u0651\u0652\ufed7\ufedb\ufedf\uf8fc\ufef5\ufef7\ufef9\ufefb\ufee3\ufee7\ufeec\ufee9\ufffd"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040a\u040b\u040c\xad\u040e\u040f\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045a\u045b\u045c\xa7\u045e\u045f"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xb7\u221a\u2116\xa4\u25a0\xa0"},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\u0153\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\u0178\xb5\xb6\xb7\u0152\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\u0102\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\u0300\xcd\xce\xcf\u0110\xd1\u0309\xd3\xd4\u01a0\xd6\xd7\xd8\xd9\xda\xdb\xdc\u01af\u0303\xdf\xe0\xe1\xe2\u0103\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\u0301\xed\xee\xef\u0111\xf1\u0323\xf3\xf4\u01a1\xf6\xf7\xf8\xf9\xfa\xfb\xfc\u01b0\u20ab\xff"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0e81\u0e82\u0e84\u0e87\u0e88\u0eaa\u0e8a\u0e8d\u0e94\u0e95\u0e96\u0e97\u0e99\u0e9a\u0e9b\u0e9c\u0e9d\u0e9e\u0e9f\u0ea1\u0ea2\u0ea3\u0ea5\u0ea7\u0eab\u0ead\u0eae\ufffd\ufffd\ufffd\u0eaf\u0eb0\u0eb2\u0eb3\u0eb4\u0eb5\u0eb6\u0eb7\u0eb8\u0eb9\u0ebc\u0eb1\u0ebb\u0ebd\ufffd\ufffd\ufffd\u0ec0\u0ec1\u0ec2\u0ec3\u0ec4\u0ec8\u0ec9\u0eca\u0ecb\u0ecc\u0ecd\u0ec6\ufffd\u0edc\u0edd\u20ad\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0ed0\u0ed1\u0ed2\u0ed3\u0ed4\u0ed5\u0ed6\u0ed7\u0ed8\u0ed9\ufffd\ufffd\xa2\xac\xa6\ufffd"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0e48\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\u0e49\u0e4a\u0e4b\u20ac\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\xa2\xac\xa6\xa0"},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"\u20ac\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\u2018\u2019\u201c\u201d\u2022\u2013\u2014\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufffd\ufffd\ufffd\ufffd\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\ufffd\ufffd\ufffd\ufffd"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\u20ac\xa5\xa6\xa7\u0153\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\u0178\xb5\xb6\xb7\u0152\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\u0102\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\u0300\xcd\xce\xcf\u0110\xd1\u0309\xd3\xd4\u01a0\xd6\xd7\xd8\xd9\xda\xdb\xdc\u01af\u0303\xdf\xe0\xe1\xe2\u0103\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\u0301\xed\xee\xef\u0111\xf1\u0323\xf3\xf4\u01a1\xf6\xf7\xf8\xf9\xfa\xfb\xfc\u01b0\u20ab\xff"},ibm1163:"cp1163",csibm1163:"cp1163",maccroatian:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017d\xd8\u221e\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220f\u0161\u222b\xaa\xba\u2126\u017e\xf8\xbf\xa1\xac\u221a\u0192\u2248\u0106\xab\u010c\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\ufffd\xa9\u2044\xa4\u2039\u203a\xc6\xbb\u2013\xb7\u201a\u201e\u2030\xc2\u0107\xc1\u010d\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u03c0\xcb\u02da\xb8\xca\xe6\u02c7"},maccyrillic:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\xa2\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\xa4"},macgreek:{type:"_sbcs",chars:"\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\xad\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039b\u039e\u03a0\xdf\xae\xa9\u03a3\u03aa\xa7\u2260\xb0\u0387\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039a\u039c\u03a6\u03ab\u03a8\u03a9\u03ac\u039d\xac\u039f\u03a1\u2248\u03a4\xab\xbb\u2026\xa0\u03a5\u03a7\u0386\u0388\u0153\u2013\u2015\u201c\u201d\u2018\u2019\xf7\u0389\u038a\u038c\u038e\u03ad\u03ae\u03af\u03cc\u038f\u03cd\u03b1\u03b2\u03c8\u03b4\u03b5\u03c6\u03b3\u03b7\u03b9\u03be\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03ce\u03c1\u03c3\u03c4\u03b8\u03c9\u03c2\u03c7\u03c5\u03b6\u03ca\u03cb\u0390\u03b0\ufffd"},maciceland:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\xd0\xf0\xde\xfe\xfd\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macroman:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macromania:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u015e\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\u0103\u015f\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\u2039\u203a\u0162\u0163\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macthai:{type:"_sbcs",chars:"\xab\xbb\u2026\uf88c\uf88f\uf892\uf895\uf898\uf88b\uf88e\uf891\uf894\uf897\u201c\u201d\uf899\ufffd\u2022\uf884\uf889\uf885\uf886\uf887\uf888\uf88a\uf88d\uf890\uf893\uf896\u2018\u2019\ufffd\xa0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufeff\u200b\u2013\u2014\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u2122\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\xae\xa9\ufffd\ufffd\ufffd\ufffd"},macturkish:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u011e\u011f\u0130\u0131\u015e\u015f\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\ufffd\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macukraine:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\u0490\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\xa4"},koi8r:{type:"_sbcs",chars:"\u2500\u2502\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2580\u2584\u2588\u258c\u2590\u2591\u2592\u2593\u2320\u25a0\u2219\u221a\u2248\u2264\u2265\xa0\u2321\xb0\xb2\xb7\xf7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255a\u255b\u255c\u255d\u255e\u255f\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256a\u256b\u256c\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},koi8u:{type:"_sbcs",chars:"\u2500\u2502\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2580\u2584\u2588\u258c\u2590\u2591\u2592\u2593\u2320\u25a0\u2219\u221a\u2248\u2264\u2265\xa0\u2321\xb0\xb2\xb7\xf7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255a\u255b\u0491\u255d\u255e\u255f\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256a\u0490\u256c\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},koi8ru:{type:"_sbcs",chars:"\u2500\u2502\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2580\u2584\u2588\u258c\u2590\u2591\u2592\u2593\u2320\u25a0\u2219\u221a\u2248\u2264\u2265\xa0\u2321\xb0\xb2\xb7\xf7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255a\u255b\u0491\u045e\u255e\u255f\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256a\u0490\u040e\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},koi8t:{type:"_sbcs",chars:"\u049b\u0493\u201a\u0492\u201e\u2026\u2020\u2021\ufffd\u2030\u04b3\u2039\u04b2\u04b7\u04b6\ufffd\u049a\u2018\u2019\u201c\u201d\u2022\u2013\u2014\ufffd\u2122\ufffd\u203a\ufffd\ufffd\ufffd\ufffd\ufffd\u04ef\u04ee\u0451\xa4\u04e3\xa6\xa7\ufffd\ufffd\ufffd\xab\xac\xad\xae\ufffd\xb0\xb1\xb2\u0401\ufffd\u04e2\xb6\xb7\ufffd\u2116\ufffd\xbb\ufffd\ufffd\ufffd\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},armscii8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\ufffd\u0587\u0589)(\xbb\xab\u2014.\u055d,-\u058a\u2026\u055c\u055b\u055e\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053a\u056a\u053b\u056b\u053c\u056c\u053d\u056d\u053e\u056e\u053f\u056f\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054a\u057a\u054b\u057b\u054c\u057c\u054d\u057d\u054e\u057e\u054f\u057f\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055a\ufffd"},rk1048:{type:"_sbcs",chars:"\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u049a\u04ba\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\ufffd\u2122\u0459\u203a\u045a\u049b\u04bb\u045f\xa0\u04b0\u04b1\u04d8\xa4\u04e8\xa6\xa7\u0401\xa9\u0492\xab\xac\xad\xae\u04ae\xb0\xb1\u0406\u0456\u04e9\xb5\xb6\xb7\u0451\u2116\u0493\xbb\u04d9\u04a2\u04a3\u04af\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"},tcvn:{type:"_sbcs",chars:"\0\xda\u1ee4\x03\u1eea\u1eec\u1eee\x07\b\t\n\v\f\r\x0e\x0f\x10\u1ee8\u1ef0\u1ef2\u1ef6\u1ef8\xdd\u1ef4\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\xc0\u1ea2\xc3\xc1\u1ea0\u1eb6\u1eac\xc8\u1eba\u1ebc\xc9\u1eb8\u1ec6\xcc\u1ec8\u0128\xcd\u1eca\xd2\u1ece\xd5\xd3\u1ecc\u1ed8\u1edc\u1ede\u1ee0\u1eda\u1ee2\xd9\u1ee6\u0168\xa0\u0102\xc2\xca\xd4\u01a0\u01af\u0110\u0103\xe2\xea\xf4\u01a1\u01b0\u0111\u1eb0\u0300\u0309\u0303\u0301\u0323\xe0\u1ea3\xe3\xe1\u1ea1\u1eb2\u1eb1\u1eb3\u1eb5\u1eaf\u1eb4\u1eae\u1ea6\u1ea8\u1eaa\u1ea4\u1ec0\u1eb7\u1ea7\u1ea9\u1eab\u1ea5\u1ead\xe8\u1ec2\u1ebb\u1ebd\xe9\u1eb9\u1ec1\u1ec3\u1ec5\u1ebf\u1ec7\xec\u1ec9\u1ec4\u1ebe\u1ed2\u0129\xed\u1ecb\xf2\u1ed4\u1ecf\xf5\xf3\u1ecd\u1ed3\u1ed5\u1ed7\u1ed1\u1ed9\u1edd\u1edf\u1ee1\u1edb\u1ee3\xf9\u1ed6\u1ee7\u0169\xfa\u1ee5\u1eeb\u1eed\u1eef\u1ee9\u1ef1\u1ef3\u1ef7\u1ef9\xfd\u1ef5\u1ed0"},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\x8d\x8e\x8f\x90\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\x9d\x9e\u0178\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\u10d0\u10d1\u10d2\u10d3\u10d4\u10d5\u10d6\u10d7\u10d8\u10d9\u10da\u10db\u10dc\u10dd\u10de\u10df\u10e0\u10e1\u10e2\u10e3\u10e4\u10e5\u10e6\u10e7\u10e8\u10e9\u10ea\u10eb\u10ec\u10ed\u10ee\u10ef\u10f0\u10f1\u10f2\u10f3\u10f4\u10f5\u10f6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\x8d\x8e\x8f\x90\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\x9d\x9e\u0178\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\u10d0\u10d1\u10d2\u10d3\u10d4\u10d5\u10d6\u10f1\u10d7\u10d8\u10d9\u10da\u10db\u10dc\u10f2\u10dd\u10de\u10df\u10e0\u10e1\u10e2\u10f3\u10e3\u10e4\u10e5\u10e6\u10e7\u10e8\u10e9\u10ea\u10eb\u10ec\u10ed\u10ee\u10f4\u10ef\u10f0\u10f5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04ee\u0493\u201e\u2026\u04b6\u04ae\u04b2\u04af\u04a0\u04e2\u04a2\u049a\u04ba\u04b8\u0497\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u04b3\u04b7\u04a1\u04e3\u04a3\u049b\u04bb\u04b9\xa0\u040e\u045e\u0408\u04e8\u0498\u04b0\xa7\u0401\xa9\u04d8\xab\xac\u04ef\xae\u049c\xb0\u04b1\u0406\u0456\u0499\u04e9\xb6\xb7\u0451\u2116\u04d9\xbb\u0458\u04aa\u04ab\u049d\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"},viscii:{type:"_sbcs",chars:"\0\x01\u1eb2\x03\x04\u1eb4\u1eaa\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\u1ef6\x15\x16\x17\x18\u1ef8\x1a\x1b\x1c\x1d\u1ef4\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\u1ea0\u1eae\u1eb0\u1eb6\u1ea4\u1ea6\u1ea8\u1eac\u1ebc\u1eb8\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1ee2\u1eda\u1edc\u1ede\u1eca\u1ece\u1ecc\u1ec8\u1ee6\u0168\u1ee4\u1ef2\xd5\u1eaf\u1eb1\u1eb7\u1ea5\u1ea7\u1ea9\u1ead\u1ebd\u1eb9\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ed1\u1ed3\u1ed5\u1ed7\u1ee0\u01a0\u1ed9\u1edd\u1edf\u1ecb\u1ef0\u1ee8\u1eea\u1eec\u01a1\u1edb\u01af\xc0\xc1\xc2\xc3\u1ea2\u0102\u1eb3\u1eb5\xc8\xc9\xca\u1eba\xcc\xcd\u0128\u1ef3\u0110\u1ee9\xd2\xd3\xd4\u1ea1\u1ef7\u1eeb\u1eed\xd9\xda\u1ef9\u1ef5\xdd\u1ee1\u01b0\xe0\xe1\xe2\xe3\u1ea3\u0103\u1eef\u1eab\xe8\xe9\xea\u1ebb\xec\xed\u0129\u1ec9\u0111\u1ef1\xf2\xf3\xf4\xf5\u1ecf\u1ecd\u1ee5\xf9\xfa\u0169\u1ee7\xfd\u1ee3\u1eee"},iso646cn:{type:"_sbcs",chars:"\0\x01\x02\x03\x04\x05\x06\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#\xa5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\u203e\x7f\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"},iso646jp:{type:"_sbcs",chars:"\0\x01\x02\x03\x04\x05\x06\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xa5]^_`abcdefghijklmnopqrstuvwxyz{|}\u203e\x7f\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xc0\xc2\xc8\xca\xcb\xce\xcf\xb4\u02cb\u02c6\xa8\u02dc\xd9\xdb\u20a4\xaf\xdd\xfd\xb0\xc7\xe7\xd1\xf1\xa1\xbf\xa4\xa3\xa5\xa7\u0192\xa2\xe2\xea\xf4\xfb\xe1\xe9\xf3\xfa\xe0\xe8\xf2\xf9\xe4\xeb\xf6\xfc\xc5\xee\xd8\xc6\xe5\xed\xf8\xe6\xc4\xec\xd6\xdc\xc9\xef\xdf\xd4\xc1\xc3\xe3\xd0\xf0\xcd\xcc\xd3\xd2\xd5\xf5\u0160\u0161\xda\u0178\xff\xde\xfe\xb7\xb5\xb6\xbe\u2014\xbc\xbd\xaa\xba\xab\u25a0\xbb\xb1\ufffd"},macintosh:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},ascii:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"},tis620:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufffd\ufffd\ufffd\ufffd\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\ufffd\ufffd\ufffd\ufffd"}}},3769:function(S){"use strict";S.exports={10029:"maccenteuro",maccenteuro:{type:"_sbcs",chars:"\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010c\xe4\u010d\u0106\u0107\xe9\u0179\u017a\u010e\xed\u010f\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011a\u011b\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012e\u012f\u012a\u2264\u2265\u012b\u0136\u2202\u2211\u0142\u013b\u013c\u013d\u013e\u0139\u013a\u0145\u0146\u0143\xac\u221a\u0144\u0147\u2206\xab\xbb\u2026\xa0\u0148\u0150\xd5\u0151\u014c\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\u014d\u0154\u0155\u0158\u2039\u203a\u0159\u0156\u0157\u0160\u201a\u201e\u0161\u015a\u015b\xc1\u0164\u0165\xcd\u017d\u017e\u016a\xd3\xd4\u016b\u016e\xda\u016f\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017b\u0141\u017c\u0122\u02c7"},808:"cp808",ibm808:"cp808",cp808:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0401\u0451\u0404\u0454\u0407\u0457\u040e\u045e\xb0\u2219\xb7\u221a\u2116\u20ac\u25a0\xa0"},mik:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u2514\u2534\u252c\u251c\u2500\u253c\u2563\u2551\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xa7\u2557\u255d\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0"},cp720:{type:"_sbcs",chars:"\x80\x81\xe9\xe2\x84\xe0\x86\xe7\xea\xeb\xe8\xef\xee\x8d\x8e\x8f\x90\u0651\u0652\xf4\xa4\u0640\xfb\xf9\u0621\u0622\u0623\u0624\xa3\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0636\u0637\u0638\u0639\u063a\u0641\xb5\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064a\u2261\u064b\u064c\u064d\u064e\u064f\u0650\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0"},ascii8bit:"ascii",usascii:"ascii",ansix34:"ascii",ansix341968:"ascii",ansix341986:"ascii",csascii:"ascii",cp367:"ascii",ibm367:"ascii",isoir6:"ascii",iso646us:"ascii",iso646irv:"ascii",us:"ascii",latin1:"iso88591",latin2:"iso88592",latin3:"iso88593",latin4:"iso88594",latin5:"iso88599",latin6:"iso885910",latin7:"iso885913",latin8:"iso885914",latin9:"iso885915",latin10:"iso885916",csisolatin1:"iso88591",csisolatin2:"iso88592",csisolatin3:"iso88593",csisolatin4:"iso88594",csisolatincyrillic:"iso88595",csisolatinarabic:"iso88596",csisolatingreek:"iso88597",csisolatinhebrew:"iso88598",csisolatin5:"iso88599",csisolatin6:"iso885910",l1:"iso88591",l2:"iso88592",l3:"iso88593",l4:"iso88594",l5:"iso88599",l6:"iso885910",l7:"iso885913",l8:"iso885914",l9:"iso885915",l10:"iso885916",isoir14:"iso646jp",isoir57:"iso646cn",isoir100:"iso88591",isoir101:"iso88592",isoir109:"iso88593",isoir110:"iso88594",isoir144:"iso88595",isoir127:"iso88596",isoir126:"iso88597",isoir138:"iso88598",isoir148:"iso88599",isoir157:"iso885910",isoir166:"tis620",isoir179:"iso885913",isoir199:"iso885914",isoir203:"iso885915",isoir226:"iso885916",cp819:"iso88591",ibm819:"iso88591",cyrillic:"iso88595",arabic:"iso88596",arabic8:"iso88596",ecma114:"iso88596",asmo708:"iso88596",greek:"iso88597",greek8:"iso88597",ecma118:"iso88597",elot928:"iso88597",hebrew:"iso88598",hebrew8:"iso88598",turkish:"iso88599",turkish8:"iso88599",thai:"iso885911",thai8:"iso885911",celtic:"iso885914",celtic8:"iso885914",isoceltic:"iso885914",tis6200:"tis620",tis62025291:"tis620",tis62025330:"tis620",1e4:"macroman",10006:"macgreek",10007:"maccyrillic",10079:"maciceland",10081:"macturkish",cspc8codepage437:"cp437",cspc775baltic:"cp775",cspc850multilingual:"cp850",cspcp852:"cp852",cspc862latinhebrew:"cp862",cpgr:"cp869",msee:"cp1250",mscyrl:"cp1251",msansi:"cp1252",msgreek:"cp1253",msturk:"cp1254",mshebr:"cp1255",msarab:"cp1256",winbaltrim:"cp1257",cp20866:"koi8r",20866:"koi8r",ibm878:"koi8r",cskoi8r:"koi8r",cp21866:"koi8u",21866:"koi8u",ibm1168:"koi8u",strk10482002:"rk1048",tcvn5712:"tcvn",tcvn57121:"tcvn",gb198880:"iso646cn",cn:"iso646cn",csiso14jisc6220ro:"iso646jp",jisc62201969ro:"iso646jp",jp:"iso646jp",cshproman8:"hproman8",r8:"hproman8",roman8:"hproman8",xroman8:"hproman8",ibm1051:"hproman8",mac:"macintosh",csmacintosh:"macintosh"}},1279:function(S,I,n){"use strict";var c=n(7103).Buffer;function r(){}function o(){}function l(){this.overflowByte=-1}function h(u,C){this.iconv=C}function a(u,C){void 0===(u=u||{}).addBOM&&(u.addBOM=!0),this.encoder=C.iconv.getEncoder("utf-16le",u)}function B(u,C){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=u||{},this.iconv=C.iconv}function E(u,C){var e=[],f=0,g=0,w=0;A:for(var Q=0;Q=100)break A}return w>g?"utf-16be":w1114111)&&(f=g),f>=65536){var w=55296|(f-=65536)>>10;C[e++]=255&w,C[e++]=w>>8,f=56320|1023&f}return C[e++]=255&f,C[e++]=f>>8,e}function a(C,e){this.iconv=e}function B(C,e){void 0===(C=C||{}).addBOM&&(C.addBOM=!0),this.encoder=e.iconv.getEncoder(C.defaultEncoding||"utf-32le",C)}function E(C,e){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=C||{},this.iconv=e.iconv}function u(C,e){var f=[],g=0,w=0,Q=0,m=0,T=0;A:for(var x=0;x16)&&Q++,(0!==f[3]||f[2]>16)&&w++,0===f[0]&&0===f[1]&&(0!==f[2]||0!==f[3])&&T++,(0!==f[0]||0!==f[1])&&0===f[2]&&0===f[3]&&m++,f.length=0,++g>=100)break A}return T-Q>m-w?"utf-32be":T-Q0){for(;e0&&(m=this.iconv.decode(c.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",m},I.utf7imap=f,f.prototype.encoder=g,f.prototype.decoder=w,f.prototype.bomAware=!0,g.prototype.write=function(m){for(var T=this.inBase64,x=this.base64Accum,M=this.base64AccumIdx,D=c.alloc(5*m.length+10),y=0,b=0;b0&&(y+=D.write(x.slice(0,M).toString("base64").replace(/\//g,",").replace(/=+$/,""),y),M=0),D[y++]=C,T=!1),T||(D[y++]=N,N===e&&(D[y++]=C))):(T||(D[y++]=e,T=!0),T&&(x[M++]=N>>8,x[M++]=255&N,M==x.length&&(y+=D.write(x.toString("base64").replace(/\//g,","),y),M=0)))}return this.inBase64=T,this.base64AccumIdx=M,D.slice(0,y)},g.prototype.end=function(){var m=c.alloc(10),T=0;return this.inBase64&&(this.base64AccumIdx>0&&(T+=m.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),T),this.base64AccumIdx=0),m[T++]=C,this.inBase64=!1),m.slice(0,T)};var Q=B.slice();Q[",".charCodeAt(0)]=!0,w.prototype.write=function(m){for(var T="",x=0,M=this.inBase64,D=this.base64Accum,y=0;y0&&(m=this.iconv.decode(c.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",m}},5395:function(S,I){"use strict";function c(o,l){this.encoder=o,this.addBOM=!0}function r(o,l){this.decoder=o,this.pass=!1,this.options=l||{}}I.PrependBOM=c,c.prototype.write=function(o){return this.addBOM&&(o="\ufeff"+o,this.addBOM=!1),this.encoder.write(o)},c.prototype.end=function(){return this.encoder.end()},I.StripBOM=r,r.prototype.write=function(o){var l=this.decoder.write(o);return this.pass||!l||("\ufeff"===l[0]&&(l=l.slice(1),"function"==typeof this.options.stripBOM&&this.options.stripBOM()),this.pass=!0),l},r.prototype.end=function(){return this.decoder.end()}},4914:function(S,I,n){"use strict";var l,c=n(7103).Buffer,r=n(5395),o=S.exports;o.encodings=null,o.defaultCharUnicode="\ufffd",o.defaultCharSingleByte="?",o.encode=function(a,B,E){a=""+(a||"");var u=o.getEncoder(B,E),C=u.write(a),e=u.end();return e&&e.length>0?c.concat([C,e]):C},o.decode=function(a,B,E){"string"==typeof a&&(o.skipDecodeWarning||(console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),o.skipDecodeWarning=!0),a=c.from(""+(a||""),"binary"));var u=o.getDecoder(B,E),C=u.write(a),e=u.end();return e?C+e:C},o.encodingExists=function(a){try{return o.getCodec(a),!0}catch(B){return!1}},o.toEncoding=o.encode,o.fromEncoding=o.decode,o._codecDataCache={},o.getCodec=function(a){o.encodings||(o.encodings=n(6934));for(var B=o._canonicalizeEncoding(a),E={};;){var u=o._codecDataCache[B];if(u)return u;var C=o.encodings[B];switch(typeof C){case"string":B=C;break;case"object":for(var e in C)E[e]=C[e];E.encodingName||(E.encodingName=B),B=C.type;break;case"function":return E.encodingName||(E.encodingName=B),u=new C(E,o),o._codecDataCache[E.encodingName]=u,u;default:throw new Error("Encoding not recognized: '"+a+"' (searched as: '"+B+"')")}}},o._canonicalizeEncoding=function(h){return(""+h).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")},o.getEncoder=function(a,B){var E=o.getCodec(a),u=new E.encoder(B,E);return E.bomAware&&B&&B.addBOM&&(u=new r.PrependBOM(u,B)),u},o.getDecoder=function(a,B){var E=o.getCodec(a),u=new E.decoder(B,E);return E.bomAware&&!(B&&!1===B.stripBOM)&&(u=new r.StripBOM(u,B)),u},o.enableStreamingAPI=function(a){if(!o.supportsStreams){var B=n(8044)(a);o.IconvLiteEncoderStream=B.IconvLiteEncoderStream,o.IconvLiteDecoderStream=B.IconvLiteDecoderStream,o.encodeStream=function(u,C){return new o.IconvLiteEncoderStream(o.getEncoder(u,C),C)},o.decodeStream=function(u,C){return new o.IconvLiteDecoderStream(o.getDecoder(u,C),C)},o.supportsStreams=!0}};try{l=n(5832)}catch(h){}l&&l.Transform?o.enableStreamingAPI(l):o.encodeStream=o.decodeStream=function(){throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}},8044:function(S,I,n){"use strict";var c=n(7103).Buffer;S.exports=function(r){var o=r.Transform;function l(a,B){this.conv=a,(B=B||{}).decodeStrings=!1,o.call(this,B)}function h(a,B){this.conv=a,(B=B||{}).encoding=this.encoding="utf8",o.call(this,B)}return(l.prototype=Object.create(o.prototype,{constructor:{value:l}}))._transform=function(a,B,E){if("string"!=typeof a)return E(new Error("Iconv encoding stream needs strings as its input."));try{var u=this.conv.write(a);u&&u.length&&this.push(u),E()}catch(C){E(C)}},l.prototype._flush=function(a){try{var B=this.conv.end();B&&B.length&&this.push(B),a()}catch(E){a(E)}},l.prototype.collect=function(a){var B=[];return this.on("error",a),this.on("data",function(E){B.push(E)}),this.on("end",function(){a(null,c.concat(B))}),this},(h.prototype=Object.create(o.prototype,{constructor:{value:h}}))._transform=function(a,B,E){if(!(c.isBuffer(a)||a instanceof Uint8Array))return E(new Error("Iconv decoding stream needs buffers as its input."));try{var u=this.conv.write(a);u&&u.length&&this.push(u,this.encoding),E()}catch(C){E(C)}},h.prototype._flush=function(a){try{var B=this.conv.end();B&&B.length&&this.push(B,this.encoding),a()}catch(E){a(E)}},h.prototype.collect=function(a){var B="";return this.on("error",a),this.on("data",function(E){B+=E}),this.on("end",function(){a(null,B)}),this},{IconvLiteEncoderStream:l,IconvLiteDecoderStream:h}}},645:function(S,I){I.read=function(n,c,r,o,l){var h,a,B=8*l-o-1,E=(1<>1,C=-7,e=r?l-1:0,f=r?-1:1,g=n[c+e];for(e+=f,h=g&(1<<-C)-1,g>>=-C,C+=B;C>0;h=256*h+n[c+e],e+=f,C-=8);for(a=h&(1<<-C)-1,h>>=-C,C+=o;C>0;a=256*a+n[c+e],e+=f,C-=8);if(0===h)h=1-u;else{if(h===E)return a?NaN:1/0*(g?-1:1);a+=Math.pow(2,o),h-=u}return(g?-1:1)*a*Math.pow(2,h-o)},I.write=function(n,c,r,o,l,h){var a,B,E,u=8*h-l-1,C=(1<>1,f=23===l?Math.pow(2,-24)-Math.pow(2,-77):0,g=o?0:h-1,w=o?1:-1,Q=c<0||0===c&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(B=isNaN(c)?1:0,a=C):(a=Math.floor(Math.log(c)/Math.LN2),c*(E=Math.pow(2,-a))<1&&(a--,E*=2),(c+=a+e>=1?f/E:f*Math.pow(2,1-e))*E>=2&&(a++,E/=2),a+e>=C?(B=0,a=C):a+e>=1?(B=(c*E-1)*Math.pow(2,l),a+=e):(B=c*Math.pow(2,e-1)*Math.pow(2,l),a=0));l>=8;n[r+g]=255&B,g+=w,B/=256,l-=8);for(a=a<0;n[r+g]=255&a,g+=w,a/=256,u-=8);n[r+g-w]|=128*Q}},5717:function(S){S.exports="function"==typeof Object.create?function(n,c){c&&(n.super_=c,n.prototype=Object.create(c.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:function(n,c){if(c){n.super_=c;var r=function(){};r.prototype=c.prototype,n.prototype=new r,n.prototype.constructor=n}}},2584:function(S,I,n){"use strict";var c=n(6410)(),o=n(1924)("Object.prototype.toString"),l=function(E){return!(c&&E&&"object"==typeof E&&Symbol.toStringTag in E)&&"[object Arguments]"===o(E)},h=function(E){return!!l(E)||null!==E&&"object"==typeof E&&"number"==typeof E.length&&E.length>=0&&"[object Array]"!==o(E)&&"[object Function]"===o(E.callee)},a=function(){return l(arguments)}();l.isLegacyArguments=h,S.exports=a?l:h},8923:function(S,I,n){"use strict";var c=Date.prototype.getDay,o=Object.prototype.toString,h=n(6410)();S.exports=function(B){return"object"==typeof B&&null!==B&&(h?function(B){try{return c.call(B),!0}catch(E){return!1}}(B):"[object Date]"===o.call(B))}},8662:function(S,I,n){"use strict";var B,c=Object.prototype.toString,r=Function.prototype.toString,o=/^\s*(?:function)?\*/,l=n(6410)(),h=Object.getPrototypeOf;S.exports=function(u){if("function"!=typeof u)return!1;if(o.test(r.call(u)))return!0;if(!l)return"[object GeneratorFunction]"===c.call(u);if(!h)return!1;if(void 0===B){var e=function(){if(!l)return!1;try{return Function("return function*() {}")()}catch(E){}}();B=!!e&&h(e)}return h(u)===B}},8611:function(S){"use strict";S.exports=function(n){return n!=n}},360:function(S,I,n){"use strict";var c=n(5559),r=n(4289),o=n(8611),l=n(9415),h=n(6743),a=c(l(),Number);r(a,{getPolyfill:l,implementation:o,shim:h}),S.exports=a},9415:function(S,I,n){"use strict";var c=n(8611);S.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}},6743:function(S,I,n){"use strict";var c=n(4289),r=n(9415);S.exports=function(){var l=r();return c(Number,{isNaN:l},{isNaN:function(){return Number.isNaN!==l}}),l}},8420:function(S,I,n){"use strict";var o,l,h,a,c=n(1924),r=n(6410)();if(r){o=c("Object.prototype.hasOwnProperty"),l=c("RegExp.prototype.exec"),h={};var B=function(){throw h};a={toString:B,valueOf:B},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=B)}var E=c("Object.prototype.toString"),u=Object.getOwnPropertyDescriptor;S.exports=r?function(f){if(!f||"object"!=typeof f)return!1;var g=u(f,"lastIndex");if(!g||!o(g,"value"))return!1;try{l(f,a)}catch(Q){return Q===h}}:function(f){return!(!f||"object"!=typeof f&&"function"!=typeof f)&&"[object RegExp]"===E(f)}},5692:function(S,I,n){"use strict";var c=n(9804),r=n(3083),o=n(1924),l=o("Object.prototype.toString"),h=n(6410)(),a="undefined"==typeof globalThis?n.g:globalThis,B=r(),E=o("Array.prototype.indexOf",!0)||function(Q,m){for(var T=0;T-1}return!!e&&function(Q){var m=!1;return c(C,function(T,x){if(!m)try{m=T.call(Q)===x}catch(M){}}),m}(Q)}},4244:function(S){"use strict";var I=function(n){return n!=n};S.exports=function(c,r){return 0===c&&0===r?1/c==1/r:!!(c===r||I(c)&&I(r))}},609:function(S,I,n){"use strict";var c=n(4289),r=n(5559),o=n(4244),l=n(5624),h=n(2281),a=r(l(),Object);c(a,{getPolyfill:l,implementation:o,shim:h}),S.exports=a},5624:function(S,I,n){"use strict";var c=n(4244);S.exports=function(){return"function"==typeof Object.is?Object.is:c}},2281:function(S,I,n){"use strict";var c=n(5624),r=n(4289);S.exports=function(){var l=c();return r(Object,{is:l},{is:function(){return Object.is!==l}}),l}},8987:function(S,I,n){"use strict";var c;if(!Object.keys){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,l=n(1414),h=Object.prototype.propertyIsEnumerable,a=!h.call({toString:null},"toString"),B=h.call(function(){},"prototype"),E=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(g){var w=g.constructor;return w&&w.prototype===g},C={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},e=function(){if("undefined"==typeof window)return!1;for(var g in window)try{if(!C["$"+g]&&r.call(window,g)&&null!==window[g]&&"object"==typeof window[g])try{u(window[g])}catch(w){return!0}}catch(w){return!0}return!1}();c=function(w){var Q=null!==w&&"object"==typeof w,m="[object Function]"===o.call(w),T=l(w),x=Q&&"[object String]"===o.call(w),M=[];if(!Q&&!m&&!T)throw new TypeError("Object.keys called on a non-object");var D=B&&m;if(x&&w.length>0&&!r.call(w,0))for(var y=0;y0)for(var b=0;b=0&&"[object Function]"===I.call(c.callee)),o}},4236:function(S,I){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function c(l,h){return Object.prototype.hasOwnProperty.call(l,h)}I.assign=function(l){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var a=h.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var B in a)c(a,B)&&(l[B]=a[B])}}return l},I.shrinkBuf=function(l,h){return l.length===h?l:l.subarray?l.subarray(0,h):(l.length=h,l)};var r={arraySet:function(l,h,a,B,E){if(h.subarray&&l.subarray)l.set(h.subarray(a,a+B),E);else for(var u=0;u>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{h=h+(l=l+c[o++]|0)|0}while(--a);l%=65521,h%=65521}return l|h<<16|0}},1619:function(S){"use strict";S.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:function(S){"use strict";var n=function I(){for(var r,o=[],l=0;l<256;l++){r=l;for(var h=0;h<8;h++)r=1&r?3988292384^r>>>1:r>>>1;o[l]=r}return o}();S.exports=function c(r,o,l,h){var a=n,B=h+l;r^=-1;for(var E=h;E>>8^a[255&(r^o[E])];return-1^r}},405:function(S,I,n){"use strict";var Tt,c=n(4236),r=n(342),o=n(6069),l=n(2869),h=n(8898),g=-2,yA=258,FA=262,q=666;function iA(j,qA){return j.msg=h[qA],qA}function wA(j){return(j<<1)-(j>4?9:0)}function GA(j){for(var qA=j.length;--qA>=0;)j[qA]=0}function et(j){var qA=j.state,KA=qA.pending;KA>j.avail_out&&(KA=j.avail_out),0!==KA&&(c.arraySet(j.output,qA.pending_buf,qA.pending_out,KA,j.next_out),j.next_out+=KA,qA.pending_out+=KA,j.total_out+=KA,j.avail_out-=KA,qA.pending-=KA,0===qA.pending&&(qA.pending_out=0))}function st(j,qA){r._tr_flush_block(j,j.block_start>=0?j.block_start:-1,j.strstart-j.block_start,qA),j.block_start=j.strstart,et(j.strm)}function TA(j,qA){j.pending_buf[j.pending++]=qA}function at(j,qA){j.pending_buf[j.pending++]=qA>>>8&255,j.pending_buf[j.pending++]=255&qA}function It(j,qA,KA,DA){var jA=j.avail_in;return jA>DA&&(jA=DA),0===jA?0:(j.avail_in-=jA,c.arraySet(qA,j.input,j.next_in,jA,KA),1===j.state.wrap?j.adler=o(j.adler,qA,jA,KA):2===j.state.wrap&&(j.adler=l(j.adler,qA,jA,KA)),j.next_in+=jA,j.total_in+=jA,jA)}function mt(j,qA){var jA,lt,KA=j.max_chain_length,DA=j.strstart,zt=j.prev_length,xt=j.nice_match,Lt=j.strstart>j.w_size-FA?j.strstart-(j.w_size-FA):0,Xt=j.window,ze=j.w_mask,ae=j.prev,ee=j.strstart+yA,Fe=Xt[DA+zt-1],Ge=Xt[DA+zt];j.prev_length>=j.good_match&&(KA>>=2),xt>j.lookahead&&(xt=j.lookahead);do{if(Xt[(jA=qA)+zt]===Ge&&Xt[jA+zt-1]===Fe&&Xt[jA]===Xt[DA]&&Xt[++jA]===Xt[DA+1]){DA+=2,jA++;do{}while(Xt[++DA]===Xt[++jA]&&Xt[++DA]===Xt[++jA]&&Xt[++DA]===Xt[++jA]&&Xt[++DA]===Xt[++jA]&&Xt[++DA]===Xt[++jA]&&Xt[++DA]===Xt[++jA]&&Xt[++DA]===Xt[++jA]&&Xt[++DA]===Xt[++jA]&&DAzt){if(j.match_start=qA,zt=lt,lt>=xt)break;Fe=Xt[DA+zt-1],Ge=Xt[DA+zt]}}}while((qA=ae[qA&ze])>Lt&&0!=--KA);return zt<=j.lookahead?zt:j.lookahead}function ht(j){var KA,DA,jA,lt,zt,qA=j.w_size;do{if(lt=j.window_size-j.lookahead-j.strstart,j.strstart>=qA+(qA-FA)){c.arraySet(j.window,j.window,qA,qA,0),j.match_start-=qA,j.strstart-=qA,j.block_start-=qA,KA=DA=j.hash_size;do{jA=j.head[--KA],j.head[KA]=jA>=qA?jA-qA:0}while(--DA);KA=DA=qA;do{jA=j.prev[--KA],j.prev[KA]=jA>=qA?jA-qA:0}while(--DA);lt+=qA}if(0===j.strm.avail_in)break;if(DA=It(j.strm,j.window,j.strstart+j.lookahead,lt),j.lookahead+=DA,j.lookahead+j.insert>=3)for(j.ins_h=j.window[zt=j.strstart-j.insert],j.ins_h=(j.ins_h<=3&&(j.ins_h=(j.ins_h<=3)if(DA=r._tr_tally(j,j.strstart-j.match_start,j.match_length-3),j.lookahead-=j.match_length,j.match_length<=j.max_lazy_match&&j.lookahead>=3){j.match_length--;do{j.strstart++,j.ins_h=(j.ins_h<=3&&(j.ins_h=(j.ins_h<4096)&&(j.match_length=2)),j.prev_length>=3&&j.match_length<=j.prev_length){jA=j.strstart+j.lookahead-3,DA=r._tr_tally(j,j.strstart-1-j.prev_match,j.prev_length-3),j.lookahead-=j.prev_length-1,j.prev_length-=2;do{++j.strstart<=jA&&(j.ins_h=(j.ins_h<15&&(zt=2,DA-=16),jA<1||jA>9||8!==KA||DA<8||DA>15||qA<0||qA>9||lt<0||lt>4)return iA(j,g);8===DA&&(DA=9);var xt=new H;return j.state=xt,xt.strm=j,xt.wrap=zt,xt.gzhead=null,xt.w_bits=DA,xt.w_size=1<j.pending_buf_size-5&&(KA=j.pending_buf_size-5);;){if(j.lookahead<=1){if(ht(j),0===j.lookahead&&0===qA)return 1;if(0===j.lookahead)break}j.strstart+=j.lookahead,j.lookahead=0;var DA=j.block_start+KA;if((0===j.strstart||j.strstart>=DA)&&(j.lookahead=j.strstart-DA,j.strstart=DA,st(j,!1),0===j.strm.avail_out)||j.strstart-j.block_start>=j.w_size-FA&&(st(j,!1),0===j.strm.avail_out))return 1}return j.insert=0,4===qA?(st(j,!0),0===j.strm.avail_out?3:4):(j.strstart>j.block_start&&st(j,!1),1)}),new Et(4,4,8,4,WA),new Et(4,5,16,8,WA),new Et(4,6,32,32,WA),new Et(4,4,16,16,it),new Et(8,16,32,32,it),new Et(8,16,128,128,it),new Et(8,32,128,256,it),new Et(32,128,258,1024,it),new Et(32,258,258,4096,it)],I.deflateInit=function PA(j,qA){return CA(j,qA,8,15,8,0)},I.deflateInit2=CA,I.deflateReset=z,I.deflateResetKeep=k,I.deflateSetHeader=function QA(j,qA){return j&&j.state&&2===j.state.wrap?(j.state.gzhead=qA,0):g},I.deflate=function rA(j,qA){var KA,DA,jA,lt;if(!j||!j.state||qA>5||qA<0)return j?iA(j,g):g;if(DA=j.state,!j.output||!j.input&&0!==j.avail_in||DA.status===q&&4!==qA)return iA(j,0===j.avail_out?-5:g);if(DA.strm=j,KA=DA.last_flush,DA.last_flush=qA,42===DA.status)if(2===DA.wrap)j.adler=0,TA(DA,31),TA(DA,139),TA(DA,8),DA.gzhead?(TA(DA,(DA.gzhead.text?1:0)+(DA.gzhead.hcrc?2:0)+(DA.gzhead.extra?4:0)+(DA.gzhead.name?8:0)+(DA.gzhead.comment?16:0)),TA(DA,255&DA.gzhead.time),TA(DA,DA.gzhead.time>>8&255),TA(DA,DA.gzhead.time>>16&255),TA(DA,DA.gzhead.time>>24&255),TA(DA,9===DA.level?2:DA.strategy>=2||DA.level<2?4:0),TA(DA,255&DA.gzhead.os),DA.gzhead.extra&&DA.gzhead.extra.length&&(TA(DA,255&DA.gzhead.extra.length),TA(DA,DA.gzhead.extra.length>>8&255)),DA.gzhead.hcrc&&(j.adler=l(j.adler,DA.pending_buf,DA.pending,0)),DA.gzindex=0,DA.status=69):(TA(DA,0),TA(DA,0),TA(DA,0),TA(DA,0),TA(DA,0),TA(DA,9===DA.level?2:DA.strategy>=2||DA.level<2?4:0),TA(DA,3),DA.status=113);else{var zt=8+(DA.w_bits-8<<4)<<8;zt|=(DA.strategy>=2||DA.level<2?0:DA.level<6?1:6===DA.level?2:3)<<6,0!==DA.strstart&&(zt|=32),zt+=31-zt%31,DA.status=113,at(DA,zt),0!==DA.strstart&&(at(DA,j.adler>>>16),at(DA,65535&j.adler)),j.adler=1}if(69===DA.status)if(DA.gzhead.extra){for(jA=DA.pending;DA.gzindex<(65535&DA.gzhead.extra.length)&&(DA.pending!==DA.pending_buf_size||(DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),et(j),jA=DA.pending,DA.pending!==DA.pending_buf_size));)TA(DA,255&DA.gzhead.extra[DA.gzindex]),DA.gzindex++;DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),DA.gzindex===DA.gzhead.extra.length&&(DA.gzindex=0,DA.status=73)}else DA.status=73;if(73===DA.status)if(DA.gzhead.name){jA=DA.pending;do{if(DA.pending===DA.pending_buf_size&&(DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),et(j),jA=DA.pending,DA.pending===DA.pending_buf_size)){lt=1;break}lt=DA.gzindexjA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),0===lt&&(DA.gzindex=0,DA.status=91)}else DA.status=91;if(91===DA.status)if(DA.gzhead.comment){jA=DA.pending;do{if(DA.pending===DA.pending_buf_size&&(DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),et(j),jA=DA.pending,DA.pending===DA.pending_buf_size)){lt=1;break}lt=DA.gzindexjA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),0===lt&&(DA.status=103)}else DA.status=103;if(103===DA.status&&(DA.gzhead.hcrc?(DA.pending+2>DA.pending_buf_size&&et(j),DA.pending+2<=DA.pending_buf_size&&(TA(DA,255&j.adler),TA(DA,j.adler>>8&255),j.adler=0,DA.status=113)):DA.status=113),0!==DA.pending){if(et(j),0===j.avail_out)return DA.last_flush=-1,0}else if(0===j.avail_in&&wA(qA)<=wA(KA)&&4!==qA)return iA(j,-5);if(DA.status===q&&0!==j.avail_in)return iA(j,-5);if(0!==j.avail_in||0!==DA.lookahead||0!==qA&&DA.status!==q){var Lt=2===DA.strategy?function Mt(j,qA){for(var KA;;){if(0===j.lookahead&&(ht(j),0===j.lookahead)){if(0===qA)return 1;break}if(j.match_length=0,KA=r._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++,KA&&(st(j,!1),0===j.strm.avail_out))return 1}return j.insert=0,4===qA?(st(j,!0),0===j.strm.avail_out?3:4):j.last_lit&&(st(j,!1),0===j.strm.avail_out)?1:2}(DA,qA):3===DA.strategy?function xA(j,qA){for(var KA,DA,jA,lt,zt=j.window;;){if(j.lookahead<=yA){if(ht(j),j.lookahead<=yA&&0===qA)return 1;if(0===j.lookahead)break}if(j.match_length=0,j.lookahead>=3&&j.strstart>0&&(DA=zt[jA=j.strstart-1])===zt[++jA]&&DA===zt[++jA]&&DA===zt[++jA]){lt=j.strstart+yA;do{}while(DA===zt[++jA]&&DA===zt[++jA]&&DA===zt[++jA]&&DA===zt[++jA]&&DA===zt[++jA]&&DA===zt[++jA]&&DA===zt[++jA]&&DA===zt[++jA]&&jAj.lookahead&&(j.match_length=j.lookahead)}if(j.match_length>=3?(KA=r._tr_tally(j,1,j.match_length-3),j.lookahead-=j.match_length,j.strstart+=j.match_length,j.match_length=0):(KA=r._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++),KA&&(st(j,!1),0===j.strm.avail_out))return 1}return j.insert=0,4===qA?(st(j,!0),0===j.strm.avail_out?3:4):j.last_lit&&(st(j,!1),0===j.strm.avail_out)?1:2}(DA,qA):Tt[DA.level].func(DA,qA);if((3===Lt||4===Lt)&&(DA.status=q),1===Lt||3===Lt)return 0===j.avail_out&&(DA.last_flush=-1),0;if(2===Lt&&(1===qA?r._tr_align(DA):5!==qA&&(r._tr_stored_block(DA,0,0,!1),3===qA&&(GA(DA.head),0===DA.lookahead&&(DA.strstart=0,DA.block_start=0,DA.insert=0))),et(j),0===j.avail_out))return DA.last_flush=-1,0}return 4!==qA?0:DA.wrap<=0?1:(2===DA.wrap?(TA(DA,255&j.adler),TA(DA,j.adler>>8&255),TA(DA,j.adler>>16&255),TA(DA,j.adler>>24&255),TA(DA,255&j.total_in),TA(DA,j.total_in>>8&255),TA(DA,j.total_in>>16&255),TA(DA,j.total_in>>24&255)):(at(DA,j.adler>>>16),at(DA,65535&j.adler)),et(j),DA.wrap>0&&(DA.wrap=-DA.wrap),0!==DA.pending?0:1)},I.deflateEnd=function gt(j){var qA;return j&&j.state?42!==(qA=j.state.status)&&69!==qA&&73!==qA&&91!==qA&&103!==qA&&113!==qA&&qA!==q?iA(j,g):(j.state=null,113===qA?iA(j,-3):0):g},I.deflateSetDictionary=function Yt(j,qA){var DA,jA,lt,zt,xt,Lt,Xt,ze,KA=qA.length;if(!j||!j.state||2===(zt=(DA=j.state).wrap)||1===zt&&42!==DA.status||DA.lookahead)return g;for(1===zt&&(j.adler=o(j.adler,qA,KA,0)),DA.wrap=0,KA>=DA.w_size&&(0===zt&&(GA(DA.head),DA.strstart=0,DA.block_start=0,DA.insert=0),ze=new c.Buf8(DA.w_size),c.arraySet(ze,qA,KA-DA.w_size,DA.w_size,0),qA=ze,KA=DA.w_size),xt=j.avail_in,Lt=j.next_in,Xt=j.input,j.avail_in=KA,j.next_in=0,j.input=qA,ht(DA);DA.lookahead>=3;){jA=DA.strstart,lt=DA.lookahead-2;do{DA.ins_h=(DA.ins_h<>>=b=y>>>24,m-=b,0==(b=y>>>16&255))lA[B++]=65535&y;else{if(!(16&b)){if(0==(64&b)){y=T[(65535&y)+(Q&(1<>>=b,m-=b),m<15&&(Q+=nA[h++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(0==(64&b)){y=x[(65535&y)+(Q&(1<C){r.msg="invalid distance too far back",l.mode=30;break A}if(Q>>>=b,m-=b,Y>(b=B-E)){if((b=Y-b)>f&&l.sane){r.msg="invalid distance too far back",l.mode=30;break A}if(R=0,P=w,0===g){if(R+=e-b,b2;)lA[B++]=P[R++],lA[B++]=P[R++],lA[B++]=P[R++],N-=3;N&&(lA[B++]=P[R++],N>1&&(lA[B++]=P[R++]))}else{R=B-Y;do{lA[B++]=lA[R++],lA[B++]=lA[R++],lA[B++]=lA[R++],N-=3}while(N>2);N&&(lA[B++]=lA[R++],N>1&&(lA[B++]=lA[R++]))}break}}break}}while(h>3)<<3))-1,r.next_in=h-=N,r.next_out=B,r.avail_in=h>>24&255)+(CA>>>8&65280)+((65280&CA)<<8)+((255&CA)<<24)}function It(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new c.Buf16(320),this.work=new c.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function mt(CA){var PA;return CA&&CA.state?(CA.total_in=CA.total_out=(PA=CA.state).total=0,CA.msg="",PA.wrap&&(CA.adler=1&PA.wrap),PA.mode=1,PA.last=0,PA.havedict=0,PA.dmax=32768,PA.head=null,PA.hold=0,PA.bits=0,PA.lencode=PA.lendyn=new c.Buf32(852),PA.distcode=PA.distdyn=new c.Buf32(592),PA.sane=1,PA.back=-1,0):Q}function ht(CA){var PA;return CA&&CA.state?((PA=CA.state).wsize=0,PA.whave=0,PA.wnext=0,mt(CA)):Q}function JA(CA,PA){var rA,gt;return!CA||!CA.state||(gt=CA.state,PA<0?(rA=0,PA=-PA):(rA=1+(PA>>4),PA<48&&(PA&=15)),PA&&(PA<8||PA>15))?Q:(null!==gt.window&>.wbits!==PA&&(gt.window=null),gt.wrap=rA,gt.wbits=PA,ht(CA))}function WA(CA,PA){var rA,gt;return CA?(gt=new It,CA.state=gt,gt.window=null,0!==(rA=JA(CA,PA))&&(CA.state=null),rA):Q}var Mt,Et,xA=!0;function Tt(CA){if(xA){var PA;for(Mt=new c.Buf32(512),Et=new c.Buf32(32),PA=0;PA<144;)CA.lens[PA++]=8;for(;PA<256;)CA.lens[PA++]=9;for(;PA<280;)CA.lens[PA++]=7;for(;PA<288;)CA.lens[PA++]=8;for(h(1,CA.lens,0,288,Mt,0,CA.work,{bits:9}),PA=0;PA<32;)CA.lens[PA++]=5;h(2,CA.lens,0,32,Et,0,CA.work,{bits:5}),xA=!1}CA.lencode=Mt,CA.lenbits=9,CA.distcode=Et,CA.distbits=5}function OA(CA,PA,rA,gt){var Yt,j=CA.state;return null===j.window&&(j.wsize=1<=j.wsize?(c.arraySet(j.window,PA,rA-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):((Yt=j.wsize-j.wnext)>gt&&(Yt=gt),c.arraySet(j.window,PA,rA-gt,Yt,j.wnext),(gt-=Yt)?(c.arraySet(j.window,PA,rA-gt,gt,0),j.wnext=gt,j.whave=j.wsize):(j.wnext+=Yt,j.wnext===j.wsize&&(j.wnext=0),j.whave>>8&255,rA.check=o(rA.check,De,2,0),jA=0,lt=0,rA.mode=2;break}if(rA.flags=0,rA.head&&(rA.head.done=!1),!(1&rA.wrap)||(((255&jA)<<8)+(jA>>8))%31){CA.msg="incorrect header check",rA.mode=30;break}if(8!=(15&jA)){CA.msg="unknown compression method",rA.mode=30;break}if(lt-=4,re=8+(15&(jA>>>=4)),0===rA.wbits)rA.wbits=re;else if(re>rA.wbits){CA.msg="invalid window size",rA.mode=30;break}rA.dmax=1<>8&1),512&rA.flags&&(De[0]=255&jA,De[1]=jA>>>8&255,rA.check=o(rA.check,De,2,0)),jA=0,lt=0,rA.mode=3;case 3:for(;lt<32;){if(0===KA)break A;KA--,jA+=gt[j++]<>>8&255,De[2]=jA>>>16&255,De[3]=jA>>>24&255,rA.check=o(rA.check,De,4,0)),jA=0,lt=0,rA.mode=4;case 4:for(;lt<16;){if(0===KA)break A;KA--,jA+=gt[j++]<>8),512&rA.flags&&(De[0]=255&jA,De[1]=jA>>>8&255,rA.check=o(rA.check,De,2,0)),jA=0,lt=0,rA.mode=5;case 5:if(1024&rA.flags){for(;lt<16;){if(0===KA)break A;KA--,jA+=gt[j++]<>>8&255,rA.check=o(rA.check,De,2,0)),jA=0,lt=0}else rA.head&&(rA.head.extra=null);rA.mode=6;case 6:if(1024&rA.flags&&((Lt=rA.length)>KA&&(Lt=KA),Lt&&(rA.head&&(re=rA.head.extra_len-rA.length,rA.head.extra||(rA.head.extra=new Array(rA.head.extra_len)),c.arraySet(rA.head.extra,gt,j,Lt,re)),512&rA.flags&&(rA.check=o(rA.check,gt,Lt,j)),KA-=Lt,j+=Lt,rA.length-=Lt),rA.length))break A;rA.length=0,rA.mode=7;case 7:if(2048&rA.flags){if(0===KA)break A;Lt=0;do{re=gt[j+Lt++],rA.head&&re&&rA.length<65536&&(rA.head.name+=String.fromCharCode(re))}while(re&&Lt>9&1,rA.head.done=!0),CA.adler=rA.check=0,rA.mode=12;break;case 10:for(;lt<32;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=7<,lt-=7<,rA.mode=27;break}for(;lt<3;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=1)){case 0:rA.mode=14;break;case 1:if(Tt(rA),rA.mode=20,6===PA){jA>>>=2,lt-=2;break A}break;case 2:rA.mode=17;break;case 3:CA.msg="invalid block type",rA.mode=30}jA>>>=2,lt-=2;break;case 14:for(jA>>>=7<,lt-=7<lt<32;){if(0===KA)break A;KA--,jA+=gt[j++]<>>16^65535)){CA.msg="invalid stored block lengths",rA.mode=30;break}if(rA.length=65535&jA,jA=0,lt=0,rA.mode=15,6===PA)break A;case 15:rA.mode=16;case 16:if(Lt=rA.length){if(Lt>KA&&(Lt=KA),Lt>DA&&(Lt=DA),0===Lt)break A;c.arraySet(Yt,gt,j,Lt,qA),KA-=Lt,j+=Lt,DA-=Lt,qA+=Lt,rA.length-=Lt;break}rA.mode=12;break;case 17:for(;lt<14;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=5)),lt-=5,rA.ncode=4+(15&(jA>>>=5)),jA>>>=4,lt-=4,rA.nlen>286||rA.ndist>30){CA.msg="too many length or distance symbols",rA.mode=30;break}rA.have=0,rA.mode=18;case 18:for(;rA.have>>=3,lt-=3}for(;rA.have<19;)rA.lens[Gn[rA.have++]]=0;if(rA.lencode=rA.lendyn,rA.lenbits=7,nn=h(0,rA.lens,0,19,rA.lencode,0,rA.work,rn={bits:rA.lenbits}),rA.lenbits=rn.bits,nn){CA.msg="invalid code lengths set",rA.mode=30;break}rA.have=0,rA.mode=19;case 19:for(;rA.have>>16&255,Ge=65535&ae,!((ee=ae>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>>=ee,lt-=ee,rA.lens[rA.have++]=Ge;else{if(16===Ge){for($e=ee+2;lt<$e;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=ee,lt-=ee,0===rA.have){CA.msg="invalid bit length repeat",rA.mode=30;break}re=rA.lens[rA.have-1],Lt=3+(3&jA),jA>>>=2,lt-=2}else if(17===Ge){for($e=ee+3;lt<$e;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=ee)),jA>>>=3,lt-=3}else{for($e=ee+7;lt<$e;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=ee)),jA>>>=7,lt-=7}if(rA.have+Lt>rA.nlen+rA.ndist){CA.msg="invalid bit length repeat",rA.mode=30;break}for(;Lt--;)rA.lens[rA.have++]=re}}if(30===rA.mode)break;if(0===rA.lens[256]){CA.msg="invalid code -- missing end-of-block",rA.mode=30;break}if(rA.lenbits=9,nn=h(1,rA.lens,0,rA.nlen,rA.lencode,0,rA.work,rn={bits:rA.lenbits}),rA.lenbits=rn.bits,nn){CA.msg="invalid literal/lengths set",rA.mode=30;break}if(rA.distbits=6,rA.distcode=rA.distdyn,nn=h(2,rA.lens,rA.nlen,rA.ndist,rA.distcode,0,rA.work,rn={bits:rA.distbits}),rA.distbits=rn.bits,nn){CA.msg="invalid distances set",rA.mode=30;break}if(rA.mode=20,6===PA)break A;case 20:rA.mode=21;case 21:if(KA>=6&&DA>=258){CA.next_out=qA,CA.avail_out=DA,CA.next_in=j,CA.avail_in=KA,rA.hold=jA,rA.bits=lt,l(CA,xt),qA=CA.next_out,Yt=CA.output,DA=CA.avail_out,j=CA.next_in,gt=CA.input,KA=CA.avail_in,jA=rA.hold,lt=rA.bits,12===rA.mode&&(rA.back=-1);break}for(rA.back=0;Fe=(ae=rA.lencode[jA&(1<>>16&255,Ge=65535&ae,!((ee=ae>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>Le)])>>>16&255,Ge=65535&ae,!(Le+(ee=ae>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>>=Le,lt-=Le,rA.back+=Le}if(jA>>>=ee,lt-=ee,rA.back+=ee,rA.length=Ge,0===Fe){rA.mode=26;break}if(32&Fe){rA.back=-1,rA.mode=12;break}if(64&Fe){CA.msg="invalid literal/length code",rA.mode=30;break}rA.extra=15&Fe,rA.mode=22;case 22:if(rA.extra){for($e=rA.extra;lt<$e;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=rA.extra,lt-=rA.extra,rA.back+=rA.extra}rA.was=rA.length,rA.mode=23;case 23:for(;Fe=(ae=rA.distcode[jA&(1<>>16&255,Ge=65535&ae,!((ee=ae>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>Le)])>>>16&255,Ge=65535&ae,!(Le+(ee=ae>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>>=Le,lt-=Le,rA.back+=Le}if(jA>>>=ee,lt-=ee,rA.back+=ee,64&Fe){CA.msg="invalid distance code",rA.mode=30;break}rA.offset=Ge,rA.extra=15&Fe,rA.mode=24;case 24:if(rA.extra){for($e=rA.extra;lt<$e;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=rA.extra,lt-=rA.extra,rA.back+=rA.extra}if(rA.offset>rA.dmax){CA.msg="invalid distance too far back",rA.mode=30;break}rA.mode=25;case 25:if(0===DA)break A;if(rA.offset>(Lt=xt-DA)){if((Lt=rA.offset-Lt)>rA.whave&&rA.sane){CA.msg="invalid distance too far back",rA.mode=30;break}Xt=Lt>rA.wnext?rA.wsize-(Lt-=rA.wnext):rA.wnext-Lt,Lt>rA.length&&(Lt=rA.length),ze=rA.window}else ze=Yt,Xt=qA-rA.offset,Lt=rA.length;Lt>DA&&(Lt=DA),DA-=Lt,rA.length-=Lt;do{Yt[qA++]=ze[Xt++]}while(--Lt);0===rA.length&&(rA.mode=21);break;case 26:if(0===DA)break A;Yt[qA++]=rA.length,DA--,rA.mode=21;break;case 27:if(rA.wrap){for(;lt<32;){if(0===KA)break A;KA--,jA|=gt[j++]<=1&&0===dA[R];R--);if(P>R&&(P=R),0===R)return T[x++]=20971520,T[x++]=20971520,D.bits=1,0;for(Y=1;Y0&&(0===g||1!==R))return-1;for(SA[1]=0,b=1;b852||2===g&&uA>592)return 1;for(;;){q=b-lA,M[N]fA?(O=zA[XA+M[N]],AA=$[MA+M[N]]):(O=96,AA=0),cA=1<>lA)+(gA-=cA)]=q<<24|O<<16|AA|0}while(0!==gA);for(cA=1<>=1;if(0!==cA?(pA&=cA-1,pA+=cA):pA=0,N++,0==--dA[b]){if(b===R)break;b=w[Q+M[N]]}if(b>P&&(pA&yA)!==BA){for(0===lA&&(lA=P),FA+=Y,_=1<<(nA=b-lA);nA+lA852||2===g&&uA>592)return 1;T[BA=pA&yA]=P<<24|nA<<16|FA-x|0}}return 0!==pA&&(T[FA+pA]=4194304|b-lA<<24),D.bits=P,0}},8898:function(S){"use strict";S.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:function(S,I,n){"use strict";var c=n(4236);function a(H){for(var k=H.length;--k>=0;)H[k]=0}var g=256,w=286,Q=30,x=15,R=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],P=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],nA=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],lA=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],uA=new Array(576);a(uA);var pA=new Array(60);a(pA);var cA=new Array(512);a(cA);var gA=new Array(256);a(gA);var BA=new Array(29);a(BA);var $,MA,fA,yA=new Array(Q);function FA(H,k,z,QA,CA){this.static_tree=H,this.extra_bits=k,this.extra_base=z,this.elems=QA,this.max_length=CA,this.has_stree=H&&H.length}function dA(H,k){this.dyn_tree=H,this.max_code=0,this.stat_desc=k}function SA(H){return H<256?cA[H]:cA[256+(H>>>7)]}function zA(H,k){H.pending_buf[H.pending++]=255&k,H.pending_buf[H.pending++]=k>>>8&255}function XA(H,k,z){H.bi_valid>16-z?(H.bi_buf|=k<>16-H.bi_valid,H.bi_valid+=z-16):(H.bi_buf|=k<>>=1,z<<=1}while(--k>0);return z>>>1}function EA(H,k,z){var PA,rA,QA=new Array(16),CA=0;for(PA=1;PA<=x;PA++)QA[PA]=CA=CA+z[PA-1]<<1;for(rA=0;rA<=k;rA++){var gt=H[2*rA+1];0!==gt&&(H[2*rA]=O(QA[gt]++,gt))}}function iA(H){var k;for(k=0;k8?zA(H,H.bi_buf):H.bi_valid>0&&(H.pending_buf[H.pending++]=H.bi_buf),H.bi_buf=0,H.bi_valid=0}function et(H,k,z,QA){var CA=2*k,PA=2*z;return H[CA]>1;rA>=1;rA--)st(H,z,rA);j=PA;do{rA=H.heap[1],H.heap[1]=H.heap[H.heap_len--],st(H,z,1),gt=H.heap[1],H.heap[--H.heap_max]=rA,H.heap[--H.heap_max]=gt,z[2*j]=z[2*rA]+z[2*gt],H.depth[j]=(H.depth[rA]>=H.depth[gt]?H.depth[rA]:H.depth[gt])+1,z[2*rA+1]=z[2*gt+1]=j,H.heap[1]=j++,st(H,z,1)}while(H.heap_len>=2);H.heap[--H.heap_max]=H.heap[1],function W(H,k){var j,qA,KA,DA,jA,lt,z=k.dyn_tree,QA=k.max_code,CA=k.stat_desc.static_tree,PA=k.stat_desc.has_stree,rA=k.stat_desc.extra_bits,gt=k.stat_desc.extra_base,Yt=k.stat_desc.max_length,zt=0;for(DA=0;DA<=x;DA++)H.bl_count[DA]=0;for(z[2*H.heap[H.heap_max]+1]=0,j=H.heap_max+1;j<573;j++)(DA=z[2*z[2*(qA=H.heap[j])+1]+1]+1)>Yt&&(DA=Yt,zt++),z[2*qA+1]=DA,!(qA>QA)&&(H.bl_count[DA]++,jA=0,qA>=gt&&(jA=rA[qA-gt]),H.opt_len+=(lt=z[2*qA])*(DA+jA),PA&&(H.static_len+=lt*(CA[2*qA+1]+jA)));if(0!==zt){do{for(DA=Yt-1;0===H.bl_count[DA];)DA--;H.bl_count[DA]--,H.bl_count[DA+1]+=2,H.bl_count[Yt]--,zt-=2}while(zt>0);for(DA=Yt;0!==DA;DA--)for(qA=H.bl_count[DA];0!==qA;)!((KA=H.heap[--j])>QA)&&(z[2*KA+1]!==DA&&(H.opt_len+=(DA-z[2*KA+1])*z[2*KA],z[2*KA+1]=DA),qA--)}}(H,k),EA(z,Yt,H.bl_count)}function It(H,k,z){var QA,PA,CA=-1,rA=k[1],gt=0,Yt=7,j=4;for(0===rA&&(Yt=138,j=3),k[2*(z+1)+1]=65535,QA=0;QA<=z;QA++)PA=rA,rA=k[2*(QA+1)+1],!(++gt>=7;QA0?(2===H.strm.data_type&&(H.strm.data_type=function WA(H){var z,k=4093624447;for(z=0;z<=31;z++,k>>>=1)if(1&k&&0!==H.dyn_ltree[2*z])return 0;if(0!==H.dyn_ltree[18]||0!==H.dyn_ltree[20]||0!==H.dyn_ltree[26])return 1;for(z=32;z=3&&0===H.bl_tree[2*lA[k]+1];k--);return H.opt_len+=3*(k+1)+5+5+4,k}(H),(PA=H.static_len+3+7>>>3)<=(CA=H.opt_len+3+7>>>3)&&(CA=PA)):CA=PA=z+5,z+4<=CA&&-1!==k?Mt(H,k,z,QA):4===H.strategy||PA===CA?(XA(H,2+(QA?1:0),3),TA(H,uA,pA)):(XA(H,4+(QA?1:0),3),function JA(H,k,z,QA){var CA;for(XA(H,k-257,5),XA(H,z-1,5),XA(H,QA-4,4),CA=0;CA>>8&255,H.pending_buf[H.d_buf+2*H.last_lit+1]=255&k,H.pending_buf[H.l_buf+H.last_lit]=255&z,H.last_lit++,0===k?H.dyn_ltree[2*z]++:(H.matches++,k--,H.dyn_ltree[2*(gA[z]+g+1)]++,H.dyn_dtree[2*SA(k)]++),H.last_lit===H.lit_bufsize-1},I._tr_align=function Et(H){XA(H,2,3),q(H,256,uA),function AA(H){16===H.bi_valid?(zA(H,H.bi_buf),H.bi_buf=0,H.bi_valid=0):H.bi_valid>=8&&(H.pending_buf[H.pending++]=255&H.bi_buf,H.bi_buf>>=8,H.bi_valid-=8)}(H)}},2292:function(S){"use strict";S.exports=function I(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4155:function(S){var n,c,I=S.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function l(w){if(n===setTimeout)return setTimeout(w,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(w,0);try{return n(w,0)}catch(Q){try{return n.call(null,w,0)}catch(m){return n.call(this,w,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(w){n=r}try{c="function"==typeof clearTimeout?clearTimeout:o}catch(w){c=o}}();var E,a=[],B=!1,u=-1;function C(){!B||!E||(B=!1,E.length?a=E.concat(a):u=-1,a.length&&e())}function e(){if(!B){var w=l(C);B=!0;for(var Q=a.length;Q;){for(E=a,a=[];++u1)for(var m=1;m=0;--yA){var FA=this.tryEntries[yA],$=FA.completion;if("root"===FA.tryLoc)return BA("end");if(FA.tryLoc<=this.prev){var MA=r.call(FA,"catchLoc"),fA=r.call(FA,"finallyLoc");if(MA&&fA){if(this.prev=0;--BA){var yA=this.tryEntries[BA];if(yA.tryLoc<=this.prev&&r.call(yA,"finallyLoc")&&this.prev=0;--gA){var BA=this.tryEntries[gA];if(BA.finallyLoc===cA)return this.complete(BA.completion,BA.afterLoc),lA(BA),Q}},catch:function(cA){for(var gA=this.tryEntries.length-1;gA>=0;--gA){var BA=this.tryEntries[gA];if(BA.tryLoc===cA){var yA=BA.completion;if("throw"===yA.type){var FA=yA.arg;lA(BA)}return FA}}throw new Error("illegal catch attempt")},delegateYield:function(cA,gA,BA){return this.delegate={iterator:uA(cA),resultName:gA,nextLoc:BA},"next"===this.method&&(this.arg=o),Q}},n}(S.exports);try{regeneratorRuntime=I}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=I:Function("r","regeneratorRuntime = r")(I)}},3697:function(S){"use strict";var I=Object,n=TypeError;S.exports=function(){if(null!=this&&this!==I(this))throw new n("RegExp.prototype.flags getter called on non-object");var r="";return this.hasIndices&&(r+="d"),this.global&&(r+="g"),this.ignoreCase&&(r+="i"),this.multiline&&(r+="m"),this.dotAll&&(r+="s"),this.unicode&&(r+="u"),this.sticky&&(r+="y"),r}},2847:function(S,I,n){"use strict";var c=n(4289),r=n(5559),o=n(3697),l=n(1721),h=n(2753),a=r(l());c(a,{getPolyfill:l,implementation:o,shim:h}),S.exports=a},1721:function(S,I,n){"use strict";var c=n(3697),r=n(4289).supportsDescriptors,o=Object.getOwnPropertyDescriptor;S.exports=function(){if(r&&"gim"===/a/gim.flags){var h=o(RegExp.prototype,"flags");if(h&&"function"==typeof h.get&&"boolean"==typeof/a/.dotAll)return h.get}return c}},2753:function(S,I,n){"use strict";var c=n(4289).supportsDescriptors,r=n(1721),o=Object.getOwnPropertyDescriptor,l=Object.defineProperty,h=TypeError,a=Object.getPrototypeOf,B=/a/;S.exports=function(){if(!c||!a)throw new h("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=r(),C=a(B),e=o(C,"flags");return(!e||e.get!==u)&&l(C,"flags",{configurable:!0,enumerable:!1,get:u}),u}},6099:function(S,I,n){var c=n(8823).Buffer;!function(r){r.parser=function(q,O){return new l(q,O)},r.SAXParser=l,r.SAXStream=e,r.createStream=function C(q,O){return new e(q,O)},r.MAX_BUFFER_LENGTH=65536;var E,o=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function l(q,O){if(!(this instanceof l))return new l(q,O);var AA=this;(function a(q){for(var O=0,AA=o.length;O"===W?(_(O,"onsgmldeclaration",O.sgmlDecl),O.sgmlDecl="",O.state=P.TEXT):(b(W)&&(O.state=P.SGML_DECL_QUOTED),O.sgmlDecl+=W);continue;case P.SGML_DECL_QUOTED:W===O.q&&(O.state=P.SGML_DECL,O.q=""),O.sgmlDecl+=W;continue;case P.DOCTYPE:">"===W?(O.state=P.TEXT,_(O,"ondoctype",O.doctype),O.doctype=!0):(O.doctype+=W,"["===W?O.state=P.DOCTYPE_DTD:b(W)&&(O.state=P.DOCTYPE_QUOTED,O.q=W));continue;case P.DOCTYPE_QUOTED:O.doctype+=W,W===O.q&&(O.q="",O.state=P.DOCTYPE);continue;case P.DOCTYPE_DTD:O.doctype+=W,"]"===W?O.state=P.DOCTYPE:b(W)&&(O.state=P.DOCTYPE_DTD_QUOTED,O.q=W);continue;case P.DOCTYPE_DTD_QUOTED:O.doctype+=W,W===O.q&&(O.state=P.DOCTYPE_DTD,O.q="");continue;case P.COMMENT:"-"===W?O.state=P.COMMENT_ENDING:O.comment+=W;continue;case P.COMMENT_ENDING:"-"===W?(O.state=P.COMMENT_ENDED,O.comment=pA(O.opt,O.comment),O.comment&&_(O,"oncomment",O.comment),O.comment=""):(O.comment+="-"+W,O.state=P.COMMENT);continue;case P.COMMENT_ENDED:">"!==W?(BA(O,"Malformed comment"),O.comment+="--"+W,O.state=P.COMMENT):O.state=P.TEXT;continue;case P.CDATA:"]"===W?O.state=P.CDATA_ENDING:O.cdata+=W;continue;case P.CDATA_ENDING:"]"===W?O.state=P.CDATA_ENDING_2:(O.cdata+="]"+W,O.state=P.CDATA);continue;case P.CDATA_ENDING_2:">"===W?(O.cdata&&_(O,"oncdata",O.cdata),_(O,"onclosecdata"),O.cdata="",O.state=P.TEXT):"]"===W?O.cdata+="]":(O.cdata+="]]"+W,O.state=P.CDATA);continue;case P.PROC_INST:"?"===W?O.state=P.PROC_INST_ENDING:y(W)?O.state=P.PROC_INST_BODY:O.procInstName+=W;continue;case P.PROC_INST_BODY:if(!O.procInstBody&&y(W))continue;"?"===W?O.state=P.PROC_INST_ENDING:O.procInstBody+=W;continue;case P.PROC_INST_ENDING:">"===W?(_(O,"onprocessinginstruction",{name:O.procInstName,body:O.procInstBody}),O.procInstName=O.procInstBody="",O.state=P.TEXT):(O.procInstBody+="?"+W,O.state=P.PROC_INST_BODY);continue;case P.OPEN_TAG:Y(x,W)?O.tagName+=W:(yA(O),">"===W?MA(O):"/"===W?O.state=P.OPEN_TAG_SLASH:(y(W)||BA(O,"Invalid character in tag name"),O.state=P.ATTRIB));continue;case P.OPEN_TAG_SLASH:">"===W?(MA(O,!0),fA(O)):(BA(O,"Forward-slash in opening tag not followed by >"),O.state=P.ATTRIB);continue;case P.ATTRIB:if(y(W))continue;">"===W?MA(O):"/"===W?O.state=P.OPEN_TAG_SLASH:Y(T,W)?(O.attribName=W,O.attribValue="",O.state=P.ATTRIB_NAME):BA(O,"Invalid attribute name");continue;case P.ATTRIB_NAME:"="===W?O.state=P.ATTRIB_VALUE:">"===W?(BA(O,"Attribute without value"),O.attribValue=O.attribName,$(O),MA(O)):y(W)?O.state=P.ATTRIB_NAME_SAW_WHITE:Y(x,W)?O.attribName+=W:BA(O,"Invalid attribute name");continue;case P.ATTRIB_NAME_SAW_WHITE:if("="===W)O.state=P.ATTRIB_VALUE;else{if(y(W))continue;BA(O,"Attribute without value"),O.tag.attributes[O.attribName]="",O.attribValue="",_(O,"onattribute",{name:O.attribName,value:""}),O.attribName="",">"===W?MA(O):Y(T,W)?(O.attribName=W,O.state=P.ATTRIB_NAME):(BA(O,"Invalid attribute name"),O.state=P.ATTRIB)}continue;case P.ATTRIB_VALUE:if(y(W))continue;b(W)?(O.q=W,O.state=P.ATTRIB_VALUE_QUOTED):(BA(O,"Unquoted attribute value"),O.state=P.ATTRIB_VALUE_UNQUOTED,O.attribValue=W);continue;case P.ATTRIB_VALUE_QUOTED:if(W!==O.q){"&"===W?O.state=P.ATTRIB_VALUE_ENTITY_Q:O.attribValue+=W;continue}$(O),O.q="",O.state=P.ATTRIB_VALUE_CLOSED;continue;case P.ATTRIB_VALUE_CLOSED:y(W)?O.state=P.ATTRIB:">"===W?MA(O):"/"===W?O.state=P.OPEN_TAG_SLASH:Y(T,W)?(BA(O,"No whitespace between attributes"),O.attribName=W,O.attribValue="",O.state=P.ATTRIB_NAME):BA(O,"Invalid attribute name");continue;case P.ATTRIB_VALUE_UNQUOTED:if(!N(W)){"&"===W?O.state=P.ATTRIB_VALUE_ENTITY_U:O.attribValue+=W;continue}$(O),">"===W?MA(O):O.state=P.ATTRIB;continue;case P.CLOSE_TAG:if(O.tagName)">"===W?fA(O):Y(x,W)?O.tagName+=W:O.script?(O.script+=""===W?fA(O):BA(O,"Invalid characters in closing tag");continue;case P.TEXT_ENTITY:case P.ATTRIB_VALUE_ENTITY_Q:case P.ATTRIB_VALUE_ENTITY_U:var iA,wA;switch(O.state){case P.TEXT_ENTITY:iA=P.TEXT,wA="textNode";break;case P.ATTRIB_VALUE_ENTITY_Q:iA=P.ATTRIB_VALUE_QUOTED,wA="attribValue";break;case P.ATTRIB_VALUE_ENTITY_U:iA=P.ATTRIB_VALUE_UNQUOTED,wA="attribValue"}";"===W?(O[wA]+=dA(O),O.entity="",O.state=iA):Y(O.entity.length?D:M,W)?O.entity+=W:(BA(O,"Invalid character in entity name"),O[wA]+="&"+O.entity+W,O.entity="",O.state=iA);continue;default:throw new Error(O,"Unknown state: "+O.state)}return O.position>=O.bufferCheckPosition&&function h(q){for(var O=Math.max(r.MAX_BUFFER_LENGTH,10),AA=0,W=0,EA=o.length;WO)switch(o[W]){case"textNode":uA(q);break;case"cdata":_(q,"oncdata",q.cdata),q.cdata="";break;case"script":_(q,"onscript",q.script),q.script="";break;default:cA(q,"Max buffer length exceeded: "+o[W])}AA=Math.max(AA,vA)}q.bufferCheckPosition=r.MAX_BUFFER_LENGTH-AA+q.position}(O),O},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){!function B(q){uA(q),""!==q.cdata&&(_(q,"oncdata",q.cdata),q.cdata=""),""!==q.script&&(_(q,"onscript",q.script),q.script="")}(this)}};try{E=n(2830).Stream}catch(q){E=function(){}}var u=r.EVENTS.filter(function(q){return"error"!==q&&"end"!==q});function e(q,O){if(!(this instanceof e))return new e(q,O);E.apply(this),this._parser=new l(q,O),this.writable=!0,this.readable=!0;var AA=this;this._parser.onend=function(){AA.emit("end")},this._parser.onerror=function(W){AA.emit("error",W),AA._parser.error=null},this._decoder=null,u.forEach(function(W){Object.defineProperty(AA,"on"+W,{get:function(){return AA._parser["on"+W]},set:function(EA){if(!EA)return AA.removeAllListeners(W),AA._parser["on"+W]=EA,EA;AA.on(W,EA)},enumerable:!0,configurable:!1})})}(e.prototype=Object.create(E.prototype,{constructor:{value:e}})).write=function(q){if("function"==typeof c&&"function"==typeof c.isBuffer&&c.isBuffer(q)){if(!this._decoder){var O=n(2553).s;this._decoder=new O("utf8")}q=this._decoder.write(q)}return this._parser.write(q.toString()),this.emit("data",q),!0},e.prototype.end=function(q){return q&&q.length&&this.write(q),this._parser.end(),!0},e.prototype.on=function(q,O){var AA=this;return!AA._parser["on"+q]&&-1!==u.indexOf(q)&&(AA._parser["on"+q]=function(){var W=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);W.splice(0,0,q),AA.emit.apply(AA,W)}),E.prototype.on.call(AA,q,O)};var w="http://www.w3.org/XML/1998/namespace",Q="http://www.w3.org/2000/xmlns/",m={xml:w,xmlns:Q},T=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,x=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,M=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,D=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function y(q){return" "===q||"\n"===q||"\r"===q||"\t"===q}function b(q){return'"'===q||"'"===q}function N(q){return">"===q||y(q)}function Y(q,O){return q.test(O)}function R(q,O){return!Y(q,O)}var q,O,AA,P=0;for(var nA in r.STATE={BEGIN:P++,BEGIN_WHITESPACE:P++,TEXT:P++,TEXT_ENTITY:P++,OPEN_WAKA:P++,SGML_DECL:P++,SGML_DECL_QUOTED:P++,DOCTYPE:P++,DOCTYPE_QUOTED:P++,DOCTYPE_DTD:P++,DOCTYPE_DTD_QUOTED:P++,COMMENT_STARTING:P++,COMMENT:P++,COMMENT_ENDING:P++,COMMENT_ENDED:P++,CDATA:P++,CDATA_ENDING:P++,CDATA_ENDING_2:P++,PROC_INST:P++,PROC_INST_BODY:P++,PROC_INST_ENDING:P++,OPEN_TAG:P++,OPEN_TAG_SLASH:P++,ATTRIB:P++,ATTRIB_NAME:P++,ATTRIB_NAME_SAW_WHITE:P++,ATTRIB_VALUE:P++,ATTRIB_VALUE_QUOTED:P++,ATTRIB_VALUE_CLOSED:P++,ATTRIB_VALUE_UNQUOTED:P++,ATTRIB_VALUE_ENTITY_Q:P++,ATTRIB_VALUE_ENTITY_U:P++,CLOSE_TAG:P++,CLOSE_TAG_SAW_WHITE:P++,SCRIPT:P++,SCRIPT_ENDING:P++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach(function(q){var O=r.ENTITIES[q],AA="number"==typeof O?String.fromCharCode(O):O;r.ENTITIES[q]=AA}),r.STATE)r.STATE[r.STATE[nA]]=nA;function lA(q,O,AA){q[O]&&q[O](AA)}function _(q,O,AA){q.textNode&&uA(q),lA(q,O,AA)}function uA(q){q.textNode=pA(q.opt,q.textNode),q.textNode&&lA(q,"ontext",q.textNode),q.textNode=""}function pA(q,O){return q.trim&&(O=O.trim()),q.normalize&&(O=O.replace(/\s+/g," ")),O}function cA(q,O){return uA(q),q.trackPosition&&(O+="\nLine: "+q.line+"\nColumn: "+q.column+"\nChar: "+q.c),O=new Error(O),q.error=O,lA(q,"onerror",O),q}function gA(q){return q.sawRoot&&!q.closedRoot&&BA(q,"Unclosed root tag"),q.state!==P.BEGIN&&q.state!==P.BEGIN_WHITESPACE&&q.state!==P.TEXT&&cA(q,"Unexpected end"),uA(q),q.c="",q.closed=!0,lA(q,"onend"),l.call(q,q.strict,q.opt),q}function BA(q,O){if("object"!=typeof q||!(q instanceof l))throw new Error("bad call to strictFail");q.strict&&cA(q,O)}function yA(q){q.strict||(q.tagName=q.tagName[q.looseCase]());var O=q.tags[q.tags.length-1]||q,AA=q.tag={name:q.tagName,attributes:{}};q.opt.xmlns&&(AA.ns=O.ns),q.attribList.length=0,_(q,"onopentagstart",AA)}function FA(q,O){var W=q.indexOf(":")<0?["",q]:q.split(":"),EA=W[0],vA=W[1];return O&&"xmlns"===q&&(EA="xmlns",vA=""),{prefix:EA,local:vA}}function $(q){if(q.strict||(q.attribName=q.attribName[q.looseCase]()),-1!==q.attribList.indexOf(q.attribName)||q.tag.attributes.hasOwnProperty(q.attribName))q.attribName=q.attribValue="";else{if(q.opt.xmlns){var O=FA(q.attribName,!0),W=O.local;if("xmlns"===O.prefix)if("xml"===W&&q.attribValue!==w)BA(q,"xml: prefix must be bound to "+w+"\nActual: "+q.attribValue);else if("xmlns"===W&&q.attribValue!==Q)BA(q,"xmlns: prefix must be bound to "+Q+"\nActual: "+q.attribValue);else{var EA=q.tag,vA=q.tags[q.tags.length-1]||q;EA.ns===vA.ns&&(EA.ns=Object.create(vA.ns)),EA.ns[W]=q.attribValue}q.attribList.push([q.attribName,q.attribValue])}else q.tag.attributes[q.attribName]=q.attribValue,_(q,"onattribute",{name:q.attribName,value:q.attribValue});q.attribName=q.attribValue=""}}function MA(q,O){if(q.opt.xmlns){var AA=q.tag,W=FA(q.tagName);AA.prefix=W.prefix,AA.local=W.local,AA.uri=AA.ns[W.prefix]||"",AA.prefix&&!AA.uri&&(BA(q,"Unbound namespace prefix: "+JSON.stringify(q.tagName)),AA.uri=W.prefix),AA.ns&&(q.tags[q.tags.length-1]||q).ns!==AA.ns&&Object.keys(AA.ns).forEach(function(ht){_(q,"onopennamespace",{prefix:ht,uri:AA.ns[ht]})});for(var vA=0,iA=q.attribList.length;vA",q.tagName="",void(q.state=P.SCRIPT);_(q,"onscript",q.script),q.script=""}var O=q.tags.length,AA=q.tagName;q.strict||(AA=AA[q.looseCase]());for(var W=AA;O--&&q.tags[O].name!==W;)BA(q,"Unexpected close tag");if(O<0)return BA(q,"Unmatched closing tag: "+q.tagName),q.textNode+="",void(q.state=P.TEXT);q.tagName=AA;for(var vA=q.tags.length;vA-- >O;){var iA=q.tag=q.tags.pop();q.tagName=q.tag.name,_(q,"onclosetag",q.tagName);var wA={};for(var GA in iA.ns)wA[GA]=iA.ns[GA];q.opt.xmlns&&iA.ns!==(q.tags[q.tags.length-1]||q).ns&&Object.keys(iA.ns).forEach(function(st){_(q,"onclosenamespace",{prefix:st,uri:iA.ns[st]})})}0===O&&(q.closedRoot=!0),q.tagName=q.attribValue=q.attribName="",q.attribList.length=0,q.state=P.TEXT}function dA(q){var W,O=q.entity,AA=O.toLowerCase(),EA="";return q.ENTITIES[O]?q.ENTITIES[O]:q.ENTITIES[AA]?q.ENTITIES[AA]:("#"===(O=AA).charAt(0)&&("x"===O.charAt(1)?(O=O.slice(2),EA=(W=parseInt(O,16)).toString(16)):(O=O.slice(1),EA=(W=parseInt(O,10)).toString(10))),O=O.replace(/^0+/,""),isNaN(W)||EA.toLowerCase()!==O?(BA(q,"Invalid character entity"),"&"+q.entity+";"):String.fromCodePoint(W))}function SA(q,O){"<"===O?(q.state=P.OPEN_WAKA,q.startTagPosition=q.position):y(O)||(BA(q,"Non-whitespace before first tag."),q.textNode=O,q.state=P.TEXT)}function zA(q,O){var AA="";return O1114111||O(st)!==st)throw RangeError("Invalid code point: "+st);st<=65535?EA.push(st):EA.push(55296+((st-=65536)>>10),st%1024+56320),(wA+1===GA||EA.length>W)&&(et+=q.apply(null,EA),EA.length=0)}return et},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:AA,configurable:!0,writable:!0}):String.fromCodePoint=AA)}(I)},2830:function(S,I,n){S.exports=o;var c=n(7187).EventEmitter;function o(){c.call(this)}n(5717)(o,c),o.Readable=n(6577),o.Writable=n(323),o.Duplex=n(8656),o.Transform=n(4473),o.PassThrough=n(2366),o.finished=n(1086),o.pipeline=n(6472),o.Stream=o,o.prototype.pipe=function(l,h){var a=this;function B(w){l.writable&&!1===l.write(w)&&a.pause&&a.pause()}function E(){a.readable&&a.resume&&a.resume()}a.on("data",B),l.on("drain",E),!l._isStdio&&(!h||!1!==h.end)&&(a.on("end",C),a.on("close",e));var u=!1;function C(){u||(u=!0,l.end())}function e(){u||(u=!0,"function"==typeof l.destroy&&l.destroy())}function f(w){if(g(),0===c.listenerCount(this,"error"))throw w}function g(){a.removeListener("data",B),l.removeListener("drain",E),a.removeListener("end",C),a.removeListener("close",e),a.removeListener("error",f),l.removeListener("error",f),a.removeListener("end",g),a.removeListener("close",g),l.removeListener("close",g)}return a.on("error",f),l.on("error",f),a.on("end",g),a.on("close",g),l.on("close",g),l.emit("pipe",a),l}},8106:function(S){"use strict";var n={};function c(a,B,E){E||(E=Error);var C=function(e){function f(g,w,Q){return e.call(this,function u(e,f,g){return"string"==typeof B?B:B(e,f,g)}(g,w,Q))||this}return function I(a,B){a.prototype=Object.create(B.prototype),a.prototype.constructor=a,a.__proto__=B}(f,e),f}(E);C.prototype.name=E.name,C.prototype.code=a,n[a]=C}function r(a,B){if(Array.isArray(a)){var E=a.length;return a=a.map(function(u){return String(u)}),E>2?"one of ".concat(B," ").concat(a.slice(0,E-1).join(", "),", or ")+a[E-1]:2===E?"one of ".concat(B," ").concat(a[0]," or ").concat(a[1]):"of ".concat(B," ").concat(a[0])}return"of ".concat(B," ").concat(String(a))}c("ERR_INVALID_OPT_VALUE",function(a,B){return'The value "'+B+'" is invalid for option "'+a+'"'},TypeError),c("ERR_INVALID_ARG_TYPE",function(a,B,E){var u,C;if("string"==typeof B&&function o(a,B,E){return a.substr(!E||E<0?0:+E,B.length)===B}(B,"not ")?(u="must not be",B=B.replace(/^not /,"")):u="must be",function l(a,B,E){return(void 0===E||E>a.length)&&(E=a.length),a.substring(E-B.length,E)===B}(a," argument"))C="The ".concat(a," ").concat(u," ").concat(r(B,"type"));else{var e=function h(a,B,E){return"number"!=typeof E&&(E=0),!(E+B.length>a.length)&&-1!==a.indexOf(B,E)}(a,".")?"property":"argument";C='The "'.concat(a,'" ').concat(e," ").concat(u," ").concat(r(B,"type"))}return C+". Received type ".concat(typeof E)},TypeError),c("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),c("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),c("ERR_STREAM_PREMATURE_CLOSE","Premature close"),c("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),c("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),c("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),c("ERR_STREAM_WRITE_AFTER_END","write after end"),c("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),c("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),S.exports.q=n},8656:function(S,I,n){"use strict";var c=n(4155),r=Object.keys||function(e){var f=[];for(var g in e)f.push(g);return f};S.exports=E;var o=n(6577),l=n(323);n(5717)(E,o);for(var h=r(l.prototype),a=0;a0)if("string"!=typeof wA&&!TA.objectMode&&Object.getPrototypeOf(wA)!==a.prototype&&(wA=function E(iA){return a.from(iA)}(wA)),et)TA.endEmitted?Y(iA,new D):uA(iA,TA,wA,!0);else if(TA.ended)Y(iA,new x);else{if(TA.destroyed)return!1;TA.reading=!1,TA.decoder&&!GA?(wA=TA.decoder.write(wA),TA.objectMode||0!==wA.length?uA(iA,TA,wA,!1):MA(iA,TA)):uA(iA,TA,wA,!1)}else et||(TA.reading=!1,MA(iA,TA));return!TA.ended&&(TA.lengthwA.highWaterMark&&(wA.highWaterMark=function gA(iA){return iA>=cA?iA=cA:(iA--,iA|=iA>>>1,iA|=iA>>>2,iA|=iA>>>4,iA|=iA>>>8,iA|=iA>>>16,iA++),iA}(iA)),iA<=wA.length?iA:wA.ended?wA.length:(wA.needReadable=!0,0))}function FA(iA){var wA=iA._readableState;e("emitReadable",wA.needReadable,wA.emittedReadable),wA.needReadable=!1,wA.emittedReadable||(e("emitReadable",wA.flowing),wA.emittedReadable=!0,c.nextTick($,iA))}function $(iA){var wA=iA._readableState;e("emitReadable_",wA.destroyed,wA.length,wA.ended),!wA.destroyed&&(wA.length||wA.ended)&&(iA.emit("readable"),wA.emittedReadable=!1),wA.needReadable=!wA.flowing&&!wA.ended&&wA.length<=wA.highWaterMark,O(iA)}function MA(iA,wA){wA.readingMore||(wA.readingMore=!0,c.nextTick(fA,iA,wA))}function fA(iA,wA){for(;!wA.reading&&!wA.ended&&(wA.length0,wA.resumeScheduled&&!wA.paused?wA.flowing=!0:iA.listenerCount("data")>0&&iA.resume()}function zA(iA){e("readable nexttick read 0"),iA.read(0)}function q(iA,wA){e("resume",wA.reading),wA.reading||iA.read(0),wA.resumeScheduled=!1,iA.emit("resume"),O(iA),wA.flowing&&!wA.reading&&iA.read(0)}function O(iA){var wA=iA._readableState;for(e("flow",wA.flowing);wA.flowing&&null!==iA.read(););}function AA(iA,wA){return 0===wA.length?null:(wA.objectMode?GA=wA.buffer.shift():!iA||iA>=wA.length?(GA=wA.decoder?wA.buffer.join(""):1===wA.buffer.length?wA.buffer.first():wA.buffer.concat(wA.length),wA.buffer.clear()):GA=wA.buffer.consume(iA,wA.decoder),GA);var GA}function W(iA){var wA=iA._readableState;e("endReadable",wA.endEmitted),wA.endEmitted||(wA.ended=!0,c.nextTick(EA,wA,iA))}function EA(iA,wA){if(e("endReadableNT",iA.endEmitted,iA.length),!iA.endEmitted&&0===iA.length&&(iA.endEmitted=!0,wA.readable=!1,wA.emit("end"),iA.autoDestroy)){var GA=wA._writableState;(!GA||GA.autoDestroy&&GA.finished)&&wA.destroy()}}function vA(iA,wA){for(var GA=0,et=iA.length;GA=wA.highWaterMark:wA.length>0)||wA.ended))return e("read: emitReadable",wA.length,wA.ended),0===wA.length&&wA.ended?W(this):FA(this),null;if(0===(iA=BA(iA,wA))&&wA.ended)return 0===wA.length&&W(this),null;var st,et=wA.needReadable;return e("need readable",et),(0===wA.length||wA.length-iA0?AA(iA,wA):null)?(wA.needReadable=wA.length<=wA.highWaterMark,iA=0):(wA.length-=iA,wA.awaitDrain=0),0===wA.length&&(wA.ended||(wA.needReadable=!0),GA!==iA&&wA.ended&&W(this)),null!==st&&this.emit("data",st),st},lA.prototype._read=function(iA){Y(this,new M("_read()"))},lA.prototype.pipe=function(iA,wA){var GA=this,et=this._readableState;switch(et.pipesCount){case 0:et.pipes=iA;break;case 1:et.pipes=[et.pipes,iA];break;default:et.pipes.push(iA)}et.pipesCount+=1,e("pipe count=%d opts=%j",et.pipesCount,wA);var TA=wA&&!1===wA.end||iA===c.stdout||iA===c.stderr?Et:It;function at(Tt,OA){e("onunpipe"),Tt===GA&&OA&&!1===OA.hasUnpiped&&(OA.hasUnpiped=!0,function JA(){e("cleanup"),iA.removeListener("close",xA),iA.removeListener("finish",Mt),iA.removeListener("drain",mt),iA.removeListener("error",it),iA.removeListener("unpipe",at),GA.removeListener("end",It),GA.removeListener("end",Et),GA.removeListener("data",WA),ht=!0,et.awaitDrain&&(!iA._writableState||iA._writableState.needDrain)&&mt()}())}function It(){e("onend"),iA.end()}et.endEmitted?c.nextTick(TA):GA.once("end",TA),iA.on("unpipe",at);var mt=function dA(iA){return function(){var GA=iA._readableState;e("pipeOnDrain",GA.awaitDrain),GA.awaitDrain&&GA.awaitDrain--,0===GA.awaitDrain&&l(iA,"data")&&(GA.flowing=!0,O(iA))}}(GA);iA.on("drain",mt);var ht=!1;function WA(Tt){e("ondata");var OA=iA.write(Tt);e("dest.write",OA),!1===OA&&((1===et.pipesCount&&et.pipes===iA||et.pipesCount>1&&-1!==vA(et.pipes,iA))&&!ht&&(e("false write response, pause",et.awaitDrain),et.awaitDrain++),GA.pause())}function it(Tt){e("onerror",Tt),Et(),iA.removeListener("error",it),0===l(iA,"error")&&Y(iA,Tt)}function xA(){iA.removeListener("finish",Mt),Et()}function Mt(){e("onfinish"),iA.removeListener("close",xA),Et()}function Et(){e("unpipe"),GA.unpipe(iA)}return GA.on("data",WA),function P(iA,wA,GA){if("function"==typeof iA.prependListener)return iA.prependListener(wA,GA);iA._events&&iA._events[wA]?Array.isArray(iA._events[wA])?iA._events[wA].unshift(GA):iA._events[wA]=[GA,iA._events[wA]]:iA.on(wA,GA)}(iA,"error",it),iA.once("close",xA),iA.once("finish",Mt),iA.emit("pipe",GA),et.flowing||(e("pipe resume"),GA.resume()),iA},lA.prototype.unpipe=function(iA){var wA=this._readableState,GA={hasUnpiped:!1};if(0===wA.pipesCount)return this;if(1===wA.pipesCount)return iA&&iA!==wA.pipes||(iA||(iA=wA.pipes),wA.pipes=null,wA.pipesCount=0,wA.flowing=!1,iA&&iA.emit("unpipe",this,GA)),this;if(!iA){var et=wA.pipes,st=wA.pipesCount;wA.pipes=null,wA.pipesCount=0,wA.flowing=!1;for(var TA=0;TA0,!1!==et.flowing&&this.resume()):"readable"===iA&&!et.endEmitted&&!et.readableListening&&(et.readableListening=et.needReadable=!0,et.flowing=!1,et.emittedReadable=!1,e("on readable",et.length,et.reading),et.length?FA(this):et.reading||c.nextTick(zA,this)),GA},lA.prototype.removeListener=function(iA,wA){var GA=h.prototype.removeListener.call(this,iA,wA);return"readable"===iA&&c.nextTick(SA,this),GA},lA.prototype.removeAllListeners=function(iA){var wA=h.prototype.removeAllListeners.apply(this,arguments);return("readable"===iA||void 0===iA)&&c.nextTick(SA,this),wA},lA.prototype.resume=function(){var iA=this._readableState;return iA.flowing||(e("resume"),iA.flowing=!iA.readableListening,function XA(iA,wA){wA.resumeScheduled||(wA.resumeScheduled=!0,c.nextTick(q,iA,wA))}(this,iA)),iA.paused=!1,this},lA.prototype.pause=function(){return e("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(e("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},lA.prototype.wrap=function(iA){var wA=this,GA=this._readableState,et=!1;for(var st in iA.on("end",function(){if(e("wrapped end"),GA.decoder&&!GA.ended){var at=GA.decoder.end();at&&at.length&&wA.push(at)}wA.push(null)}),iA.on("data",function(at){e("wrapped data"),GA.decoder&&(at=GA.decoder.write(at)),GA.objectMode&&null==at||!(GA.objectMode||at&&at.length)||wA.push(at)||(et=!0,iA.pause())}),iA)void 0===this[st]&&"function"==typeof iA[st]&&(this[st]=function(It){return function(){return iA[It].apply(iA,arguments)}}(st));for(var TA=0;TA-1))throw new b(AA);return this._writableState.defaultEncoding=AA,this},Object.defineProperty(nA.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(nA.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),nA.prototype._write=function(O,AA,W){W(new m("_write()"))},nA.prototype._writev=null,nA.prototype.end=function(O,AA,W){var EA=this._writableState;return"function"==typeof O?(W=O,O=null,AA=null):"function"==typeof AA&&(W=AA,AA=null),null!=O&&this.write(O,AA),EA.corked&&(EA.corked=1,this.uncork()),EA.ending||function XA(O,AA,W){AA.ending=!0,zA(O,AA),W&&(AA.finished?c.nextTick(W):O.once("finish",W)),AA.ended=!0,O.writable=!1}(this,EA,W),this},Object.defineProperty(nA.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(nA.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(AA){!this._writableState||(this._writableState.destroyed=AA)}}),nA.prototype.destroy=e.destroy,nA.prototype._undestroy=e.undestroy,nA.prototype._destroy=function(O,AA){AA(O)}},828:function(S,I,n){"use strict";var r,c=n(4155);function o(M,D,y){return D in M?Object.defineProperty(M,D,{value:y,enumerable:!0,configurable:!0,writable:!0}):M[D]=y,M}var l=n(1086),h=Symbol("lastResolve"),a=Symbol("lastReject"),B=Symbol("error"),E=Symbol("ended"),u=Symbol("lastPromise"),C=Symbol("handlePromise"),e=Symbol("stream");function f(M,D){return{value:M,done:D}}function g(M){var D=M[h];if(null!==D){var y=M[e].read();null!==y&&(M[u]=null,M[h]=null,M[a]=null,D(f(y,!1)))}}function w(M){c.nextTick(g,M)}var m=Object.getPrototypeOf(function(){}),T=Object.setPrototypeOf((o(r={get stream(){return this[e]},next:function(){var D=this,y=this[B];if(null!==y)return Promise.reject(y);if(this[E])return Promise.resolve(f(void 0,!0));if(this[e].destroyed)return new Promise(function(R,P){c.nextTick(function(){D[B]?P(D[B]):R(f(void 0,!0))})});var N,b=this[u];if(b)N=new Promise(function Q(M,D){return function(y,b){M.then(function(){D[E]?y(f(void 0,!0)):D[C](y,b)},b)}}(b,this));else{var Y=this[e].read();if(null!==Y)return Promise.resolve(f(Y,!1));N=new Promise(this[C])}return this[u]=N,N}},Symbol.asyncIterator,function(){return this}),o(r,"return",function(){var D=this;return new Promise(function(y,b){D[e].destroy(null,function(N){N?b(N):y(f(void 0,!0))})})}),r),m);S.exports=function(D){var y,b=Object.create(T,(o(y={},e,{value:D,writable:!0}),o(y,h,{value:null,writable:!0}),o(y,a,{value:null,writable:!0}),o(y,B,{value:null,writable:!0}),o(y,E,{value:D._readableState.endEmitted,writable:!0}),o(y,C,{value:function(Y,R){var P=b[e].read();P?(b[u]=null,b[h]=null,b[a]=null,Y(f(P,!1))):(b[h]=Y,b[a]=R)},writable:!0}),y));return b[u]=null,l(D,function(N){if(N&&"ERR_STREAM_PREMATURE_CLOSE"!==N.code){var Y=b[a];return null!==Y&&(b[u]=null,b[h]=null,b[a]=null,Y(N)),void(b[B]=N)}var R=b[h];null!==R&&(b[u]=null,b[h]=null,b[a]=null,R(f(void 0,!0))),b[E]=!0}),D.on("readable",w.bind(null,b)),b}},1029:function(S,I,n){"use strict";var c=n(4155);function o(E,u){a(E,u),l(E)}function l(E){E._writableState&&!E._writableState.emitClose||E._readableState&&!E._readableState.emitClose||E.emit("close")}function a(E,u){E.emit("error",u)}S.exports={destroy:function r(E,u){var C=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(u?u(E):E&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,c.nextTick(a,this,E)):c.nextTick(a,this,E)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(E||null,function(g){!u&&g?C._writableState?C._writableState.errorEmitted?c.nextTick(l,C):(C._writableState.errorEmitted=!0,c.nextTick(o,C,g)):c.nextTick(o,C,g):u?(c.nextTick(l,C),u(g)):c.nextTick(l,C)}),this)},undestroy:function h(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function B(E,u){var C=E._readableState,e=E._writableState;C&&C.autoDestroy||e&&e.autoDestroy?E.destroy(u):E.emit("error",u)}}},1086:function(S,I,n){"use strict";var c=n(8106).q.ERR_STREAM_PREMATURE_CLOSE;function o(){}S.exports=function h(a,B,E){if("function"==typeof B)return h(a,null,B);B||(B={}),E=function r(a){var B=!1;return function(){if(!B){B=!0;for(var E=arguments.length,u=new Array(E),C=0;C0,function(N){T||(T=N),N&&x.forEach(u),!y&&(x.forEach(u),m(T))})});return w.reduce(C)}},94:function(S,I,n){"use strict";var c=n(8106).q.ERR_INVALID_OPT_VALUE;S.exports={getHighWaterMark:function o(l,h,a,B){var E=function r(l,h,a){return null!=l.highWaterMark?l.highWaterMark:h?l[a]:null}(h,B,a);if(null!=E){if(!isFinite(E)||Math.floor(E)!==E||E<0)throw new c(B?a:"highWaterMark",E);return Math.floor(E)}return l.objectMode?16:16384}}},3194:function(S,I,n){S.exports=n(7187).EventEmitter},1818:function(S,I,n){var c,o;void 0!==(o="function"==typeof(c=function(){"use strict";function h(e,f,g){var w=new XMLHttpRequest;w.open("GET",e),w.responseType="blob",w.onload=function(){C(w.response,f,g)},w.onerror=function(){console.error("could not download file")},w.send()}function a(e){var f=new XMLHttpRequest;f.open("HEAD",e,!1);try{f.send()}catch(g){}return 200<=f.status&&299>=f.status}function B(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(g){var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(f)}}var E="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,u=E.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),C=E.saveAs||("object"!=typeof window||window!==E?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype&&!u?function(e,f,g){var w=E.URL||E.webkitURL,Q=document.createElement("a");Q.download=f=f||e.name||"download",Q.rel="noopener","string"==typeof e?(Q.href=e,Q.origin===location.origin?B(Q):a(Q.href)?h(e,f,g):B(Q,Q.target="_blank")):(Q.href=w.createObjectURL(e),setTimeout(function(){w.revokeObjectURL(Q.href)},4e4),setTimeout(function(){B(Q)},0))}:"msSaveOrOpenBlob"in navigator?function(e,f,g){if(f=f||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function l(e,f){return void 0===f?f={autoBom:!1}:"object"!=typeof f&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,g),f);else if(a(e))h(e,f,g);else{var w=document.createElement("a");w.href=e,w.target="_blank",setTimeout(function(){B(w)})}}:function(e,f,g,w){if((w=w||open("","_blank"))&&(w.document.title=w.document.body.innerText="downloading..."),"string"==typeof e)return h(e,f,g);var Q="application/octet-stream"===e.type,m=/constructor/i.test(E.HTMLElement)||E.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||Q&&m||u)&&"undefined"!=typeof FileReader){var x=new FileReader;x.onloadend=function(){var y=x.result;y=T?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),w?w.location.href=y:location=y,w=null},x.readAsDataURL(e)}else{var M=E.URL||E.webkitURL,D=M.createObjectURL(e);w?w.location=D:location.href=D,w=null,setTimeout(function(){M.revokeObjectURL(D)},4e4)}});E.saveAs=C.saveAs=C,S.exports=C})?c.apply(I,[]):c)&&(S.exports=o)},2553:function(S,I,n){"use strict";var c=n(1750).Buffer,r=c.isEncoding||function(x){switch((x=""+x)&&x.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function h(x){var M;switch(this.encoding=function l(x){var M=function o(x){if(!x)return"utf8";for(var M;;)switch(x){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return x;default:if(M)return;x=(""+x).toLowerCase(),M=!0}}(x);if("string"!=typeof M&&(c.isEncoding===r||!r(x)))throw new Error("Unknown encoding: "+x);return M||x}(x),this.encoding){case"utf16le":this.text=f,this.end=g,M=4;break;case"utf8":this.fillLast=u,M=4;break;case"base64":this.text=w,this.end=Q,M=3;break;default:return this.write=m,void(this.end=T)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(M)}function a(x){return x<=127?0:x>>5==6?2:x>>4==14?3:x>>3==30?4:x>>6==2?-1:-2}function u(x){var M=this.lastTotal-this.lastNeed,D=function E(x,M,D){if(128!=(192&M[0]))return x.lastNeed=0,"\ufffd";if(x.lastNeed>1&&M.length>1){if(128!=(192&M[1]))return x.lastNeed=1,"\ufffd";if(x.lastNeed>2&&M.length>2&&128!=(192&M[2]))return x.lastNeed=2,"\ufffd"}}(this,x);return void 0!==D?D:this.lastNeed<=x.length?(x.copy(this.lastChar,M,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(x.copy(this.lastChar,M,0,x.length),void(this.lastNeed-=x.length))}function f(x,M){if((x.length-M)%2==0){var D=x.toString("utf16le",M);if(D){var y=D.charCodeAt(D.length-1);if(y>=55296&&y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1],D.slice(0,-1)}return D}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=x[x.length-1],x.toString("utf16le",M,x.length-1)}function g(x){var M=x&&x.length?this.write(x):"";return this.lastNeed?M+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):M}function w(x,M){var D=(x.length-M)%3;return 0===D?x.toString("base64",M):(this.lastNeed=3-D,this.lastTotal=3,1===D?this.lastChar[0]=x[x.length-1]:(this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1]),x.toString("base64",M,x.length-D))}function Q(x){var M=x&&x.length?this.write(x):"";return this.lastNeed?M+this.lastChar.toString("base64",0,3-this.lastNeed):M}function m(x){return x.toString(this.encoding)}function T(x){return x&&x.length?this.write(x):""}I.s=h,h.prototype.write=function(x){if(0===x.length)return"";var M,D;if(this.lastNeed){if(void 0===(M=this.fillLast(x)))return"";D=this.lastNeed,this.lastNeed=0}else D=0;return D=0?(b>0&&(x.lastNeed=b-1),b):--y=0?(b>0&&(x.lastNeed=b-2),b):--y=0?(b>0&&(2===b?b=0:x.lastNeed=b-3),b):0}(this,x,M);if(!this.lastNeed)return x.toString("utf8",M);this.lastTotal=D;var y=x.length-(D-this.lastNeed);return x.copy(this.lastChar,0,y),x.toString("utf8",M,y)},h.prototype.fillLast=function(x){if(this.lastNeed<=x.length)return x.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);x.copy(this.lastChar,this.lastTotal-this.lastNeed,0,x.length),this.lastNeed-=x.length}},311:function(S){function c(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function r(N,Y){this.source=N,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=Y,this.destLen=0,this.ltree=new c,this.dtree=new c}var o=new c,l=new c,h=new Uint8Array(30),a=new Uint16Array(30),B=new Uint8Array(30),E=new Uint16Array(30),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),C=new c,e=new Uint8Array(320);function f(N,Y,R,P){var nA,lA;for(nA=0;nA>>=1,Y}function T(N,Y,R){if(!Y)return R;for(;N.bitcount<24;)N.tag|=N.source[N.sourceIndex++]<>>16-Y;return N.tag>>>=Y,N.bitcount-=Y,P+R}function x(N,Y){for(;N.bitcount<24;)N.tag|=N.source[N.sourceIndex++]<>>=1,++nA,R+=Y.table[nA],P-=Y.table[nA]}while(P>=0);return N.tag=lA,N.bitcount-=nA,Y.trans[R+P]}function M(N,Y,R){var P,nA,lA,_,uA,pA;for(P=T(N,5,257),nA=T(N,5,1),lA=T(N,4,4),_=0;_<19;++_)e[_]=0;for(_=0;_8;)N.sourceIndex--,N.bitcount-=8;if((Y=256*(Y=N.source[N.sourceIndex+1])+N.source[N.sourceIndex])!==(65535&~(256*N.source[N.sourceIndex+3]+N.source[N.sourceIndex+2])))return-3;for(N.sourceIndex+=4,P=Y;P;--P)N.dest[N.destLen++]=N.source[N.sourceIndex++];return N.bitcount=0,0}(function g(N,Y){var R;for(R=0;R<7;++R)N.table[R]=0;for(N.table[7]=24,N.table[8]=152,N.table[9]=112,R=0;R<24;++R)N.trans[R]=256+R;for(R=0;R<144;++R)N.trans[24+R]=R;for(R=0;R<8;++R)N.trans[168+R]=280+R;for(R=0;R<112;++R)N.trans[176+R]=144+R;for(R=0;R<5;++R)Y.table[R]=0;for(Y.table[5]=32,R=0;R<32;++R)Y.trans[R]=R})(o,l),f(h,a,4,3),f(B,E,2,1),h[28]=0,a[28]=258,S.exports=function b(N,Y){var P,lA,R=new r(N,Y);do{switch(P=m(R),T(R,2,0)){case 0:lA=y(R);break;case 1:lA=D(R,o,l);break;case 2:M(R,R.ltree,R.dtree),lA=D(R,R.ltree,R.dtree);break;default:lA=-3}if(0!==lA)throw new Error("Data error")}while(!P);return R.destLen=eA.length?{done:!0}:{done:!1,value:eA[p++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(eA,G){(null==G||G>eA.length)&&(G=eA.length);for(var V=0,p=new Array(G);V0?aA[0]:"value";if(tA.has(kA))return tA.get(kA);var ct=F.apply(this,aA);return tA.set(kA,ct),ct}return Object.defineProperty(this,G,{value:oA}),oA}}}}y.registerFormat=function(eA){b.push(eA)},y.openSync=function(eA,G){var V=D.readFileSync(eA);return y.create(V,G)},y.open=function(eA,G,V){"function"==typeof G&&(V=G,G=null),D.readFile(eA,function(p,F){if(p)return V(p);try{var L=y.create(F,G)}catch(tA){return V(tA)}return V(null,L)})},y.create=function(eA,G){for(var V=0;V>1},searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16,endCode:new e.LazyArray(e.uint16,"segCount"),reservedPad:new e.Reserved(e.uint16),startCode:new e.LazyArray(e.uint16,"segCount"),idDelta:new e.LazyArray(e.int16,"segCount"),idRangeOffset:new e.LazyArray(e.uint16,"segCount"),glyphIndexArray:new e.LazyArray(e.uint16,function(eA){return(eA.length-eA._currentOffset)/2})},6:{length:e.uint16,language:e.uint16,firstCode:e.uint16,entryCount:e.uint16,glyphIndices:new e.LazyArray(e.uint16,"entryCount")},8:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint16,is32:new e.LazyArray(e.uint8,8192),nGroups:e.uint32,groups:new e.LazyArray(nA,"nGroups")},10:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint32,firstCode:e.uint32,entryCount:e.uint32,glyphIndices:new e.LazyArray(e.uint16,"numChars")},12:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint32,nGroups:e.uint32,groups:new e.LazyArray(nA,"nGroups")},13:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint32,nGroups:e.uint32,groups:new e.LazyArray(nA,"nGroups")},14:{length:e.uint32,numRecords:e.uint32,varSelectors:new e.LazyArray(cA,"numRecords")}}),BA=new e.Struct({platformID:e.uint16,encodingID:e.uint16,table:new e.Pointer(e.uint32,gA,{type:"parent",lazy:!0})}),yA=new e.Struct({version:e.uint16,numSubtables:e.uint16,tables:new e.Array(BA,"numSubtables")}),FA=new e.Struct({version:e.int32,revision:e.int32,checkSumAdjustment:e.uint32,magicNumber:e.uint32,flags:e.uint16,unitsPerEm:e.uint16,created:new e.Array(e.int32,2),modified:new e.Array(e.int32,2),xMin:e.int16,yMin:e.int16,xMax:e.int16,yMax:e.int16,macStyle:new e.Bitfield(e.uint16,["bold","italic","underline","outline","shadow","condensed","extended"]),lowestRecPPEM:e.uint16,fontDirectionHint:e.int16,indexToLocFormat:e.int16,glyphDataFormat:e.int16}),$=new e.Struct({version:e.int32,ascent:e.int16,descent:e.int16,lineGap:e.int16,advanceWidthMax:e.uint16,minLeftSideBearing:e.int16,minRightSideBearing:e.int16,xMaxExtent:e.int16,caretSlopeRise:e.int16,caretSlopeRun:e.int16,caretOffset:e.int16,reserved:new e.Reserved(e.int16,4),metricDataFormat:e.int16,numberOfMetrics:e.uint16}),MA=new e.Struct({advance:e.uint16,bearing:e.int16}),fA=new e.Struct({metrics:new e.LazyArray(MA,function(eA){return eA.parent.hhea.numberOfMetrics}),bearings:new e.LazyArray(e.int16,function(eA){return eA.parent.maxp.numGlyphs-eA.parent.hhea.numberOfMetrics})}),dA=new e.Struct({version:e.int32,numGlyphs:e.uint16,maxPoints:e.uint16,maxContours:e.uint16,maxComponentPoints:e.uint16,maxComponentContours:e.uint16,maxZones:e.uint16,maxTwilightPoints:e.uint16,maxStorage:e.uint16,maxFunctionDefs:e.uint16,maxInstructionDefs:e.uint16,maxStackElements:e.uint16,maxSizeOfInstructions:e.uint16,maxComponentElements:e.uint16,maxComponentDepth:e.uint16});function SA(eA,G,V){return void 0===V&&(V=0),1===eA&&XA[V]?XA[V]:zA[eA][G]}var zA=[["utf16be","utf16be","utf16be","utf16be","utf16be","utf16be"],["macroman","shift-jis","big5","euc-kr","iso-8859-6","iso-8859-8","macgreek","maccyrillic","symbol","Devanagari","Gurmukhi","Gujarati","Oriya","Bengali","Tamil","Telugu","Kannada","Malayalam","Sinhalese","Burmese","Khmer","macthai","Laotian","Georgian","Armenian","gb-2312-80","Tibetan","Mongolian","Geez","maccenteuro","Vietnamese","Sindhi"],["ascii"],["symbol","utf16be","shift-jis","gb18030","big5","wansung","johab",null,null,null,"utf16be"]],XA={15:"maciceland",17:"macturkish",18:"maccroatian",24:"maccenteuro",25:"maccenteuro",26:"maccenteuro",27:"maccenteuro",28:"maccenteuro",30:"maciceland",37:"macromania",38:"maccenteuro",39:"maccenteuro",40:"maccenteuro",143:"macinuit",146:"macgaelic"},q=[[],{0:"en",30:"fo",60:"ks",90:"rw",1:"fr",31:"fa",61:"ku",91:"rn",2:"de",32:"ru",62:"sd",92:"ny",3:"it",33:"zh",63:"bo",93:"mg",4:"nl",34:"nl-BE",64:"ne",94:"eo",5:"sv",35:"ga",65:"sa",128:"cy",6:"es",36:"sq",66:"mr",129:"eu",7:"da",37:"ro",67:"bn",130:"ca",8:"pt",38:"cz",68:"as",131:"la",9:"no",39:"sk",69:"gu",132:"qu",10:"he",40:"si",70:"pa",133:"gn",11:"ja",41:"yi",71:"or",134:"ay",12:"ar",42:"sr",72:"ml",135:"tt",13:"fi",43:"mk",73:"kn",136:"ug",14:"el",44:"bg",74:"ta",137:"dz",15:"is",45:"uk",75:"te",138:"jv",16:"mt",46:"be",76:"si",139:"su",17:"tr",47:"uz",77:"my",140:"gl",18:"hr",48:"kk",78:"km",141:"af",19:"zh-Hant",49:"az-Cyrl",79:"lo",142:"br",20:"ur",50:"az-Arab",80:"vi",143:"iu",21:"hi",51:"hy",81:"id",144:"gd",22:"th",52:"ka",82:"tl",145:"gv",23:"ko",53:"mo",83:"ms",146:"ga",24:"lt",54:"ky",84:"ms-Arab",147:"to",25:"pl",55:"tg",85:"am",148:"el-polyton",26:"hu",56:"tk",86:"ti",149:"kl",27:"es",57:"mn-CN",87:"om",150:"az",28:"lv",58:"mn",88:"so",151:"nn",29:"se",59:"ps",89:"sw"},[],{1078:"af",16393:"en-IN",1159:"rw",1074:"tn",1052:"sq",6153:"en-IE",1089:"sw",1115:"si",1156:"gsw",8201:"en-JM",1111:"kok",1051:"sk",1118:"am",17417:"en-MY",1042:"ko",1060:"sl",5121:"ar-DZ",5129:"en-NZ",1088:"ky",11274:"es-AR",15361:"ar-BH",13321:"en-PH",1108:"lo",16394:"es-BO",3073:"ar",18441:"en-SG",1062:"lv",13322:"es-CL",2049:"ar-IQ",7177:"en-ZA",1063:"lt",9226:"es-CO",11265:"ar-JO",11273:"en-TT",2094:"dsb",5130:"es-CR",13313:"ar-KW",2057:"en-GB",1134:"lb",7178:"es-DO",12289:"ar-LB",1033:"en",1071:"mk",12298:"es-EC",4097:"ar-LY",12297:"en-ZW",2110:"ms-BN",17418:"es-SV",6145:"ary",1061:"et",1086:"ms",4106:"es-GT",8193:"ar-OM",1080:"fo",1100:"ml",18442:"es-HN",16385:"ar-QA",1124:"fil",1082:"mt",2058:"es-MX",1025:"ar-SA",1035:"fi",1153:"mi",19466:"es-NI",10241:"ar-SY",2060:"fr-BE",1146:"arn",6154:"es-PA",7169:"aeb",3084:"fr-CA",1102:"mr",15370:"es-PY",14337:"ar-AE",1036:"fr",1148:"moh",10250:"es-PE",9217:"ar-YE",5132:"fr-LU",1104:"mn",20490:"es-PR",1067:"hy",6156:"fr-MC",2128:"mn-CN",3082:"es",1101:"as",4108:"fr-CH",1121:"ne",1034:"es",2092:"az-Cyrl",1122:"fy",1044:"nb",21514:"es-US",1068:"az",1110:"gl",2068:"nn",14346:"es-UY",1133:"ba",1079:"ka",1154:"oc",8202:"es-VE",1069:"eu",3079:"de-AT",1096:"or",2077:"sv-FI",1059:"be",1031:"de",1123:"ps",1053:"sv",2117:"bn",5127:"de-LI",1045:"pl",1114:"syr",1093:"bn-IN",4103:"de-LU",1046:"pt",1064:"tg",8218:"bs-Cyrl",2055:"de-CH",2070:"pt-PT",2143:"tzm",5146:"bs",1032:"el",1094:"pa",1097:"ta",1150:"br",1135:"kl",1131:"qu-BO",1092:"tt",1026:"bg",1095:"gu",2155:"qu-EC",1098:"te",1027:"ca",1128:"ha",3179:"qu",1054:"th",3076:"zh-HK",1037:"he",1048:"ro",1105:"bo",5124:"zh-MO",1081:"hi",1047:"rm",1055:"tr",2052:"zh",1038:"hu",1049:"ru",1090:"tk",4100:"zh-SG",1039:"is",9275:"smn",1152:"ug",1028:"zh-TW",1136:"ig",4155:"smj-NO",1058:"uk",1155:"co",1057:"id",5179:"smj",1070:"hsb",1050:"hr",1117:"iu",3131:"se-FI",1056:"ur",4122:"hr-BA",2141:"iu-Latn",1083:"se",2115:"uz-Cyrl",1029:"cs",2108:"ga",2107:"se-SE",1091:"uz",1030:"da",1076:"xh",8251:"sms",1066:"vi",1164:"prs",1077:"zu",6203:"sma-NO",1106:"cy",1125:"dv",1040:"it",7227:"sms",1160:"wo",2067:"nl-BE",2064:"it-CH",1103:"sa",1157:"sah",1043:"nl",1041:"ja",7194:"sr-Cyrl-BA",1144:"ii",3081:"en-AU",1099:"kn",3098:"sr",1130:"yo",10249:"en-BZ",1087:"kk",6170:"sr-Latn-BA",4105:"en-CA",1107:"km",2074:"sr-Latn",9225:"en-029",1158:"quc",1132:"nso"}],O=new e.Struct({platformID:e.uint16,encodingID:e.uint16,languageID:e.uint16,nameID:e.uint16,length:e.uint16,string:new e.Pointer(e.uint16,new e.String("length",function(eA){return SA(eA.platformID,eA.encodingID,eA.languageID)}),{type:"parent",relativeTo:function(G){return G.parent.stringOffset},allowNull:!1})}),AA=new e.Struct({length:e.uint16,tag:new e.Pointer(e.uint16,new e.String("length","utf16be"),{type:"parent",relativeTo:function(G){return G.stringOffset}})}),W=new e.VersionedStruct(e.uint16,{0:{count:e.uint16,stringOffset:e.uint16,records:new e.Array(O,"count")},1:{count:e.uint16,stringOffset:e.uint16,records:new e.Array(O,"count"),langTagCount:e.uint16,langTags:new e.Array(AA,"langTagCount")}}),EA=["copyright","fontFamily","fontSubfamily","uniqueSubfamily","fullName","version","postscriptName","trademark","manufacturer","designer","description","vendorURL","designerURL","license","licenseURL",null,"preferredFamily","preferredSubfamily","compatibleFull","sampleText","postscriptCIDFontName","wwsFamilyName","wwsSubfamilyName"];W.process=function(eA){for(var p,G={},V=B(this.records);!(p=V()).done;){var F=p.value,L=q[F.platformID][F.languageID];null==L&&null!=this.langTags&&F.languageID>=32768&&(L=this.langTags[F.languageID-32768].tag),null==L&&(L=F.platformID+"-"+F.languageID);var tA=F.nameID>=256?"fontFeatures":EA[F.nameID]||F.nameID;null==G[tA]&&(G[tA]={});var oA=G[tA];F.nameID>=256&&(oA=oA[F.nameID]||(oA[F.nameID]={})),("string"==typeof F.string||"string"!=typeof oA[L])&&(oA[L]=F.string)}this.records=G},W.preEncode=function(){if(!Array.isArray(this.records)){this.version=0;var eA=[];for(var G in this.records){var V=this.records[G];"fontFeatures"!==G&&(eA.push({platformID:3,encodingID:1,languageID:1033,nameID:EA.indexOf(G),length:c.byteLength(V.en,"utf16le"),string:V.en}),"postscriptName"===G&&eA.push({platformID:1,encodingID:0,languageID:0,nameID:EA.indexOf(G),length:V.en.length,string:V.en}))}this.records=eA,this.count=eA.length,this.stringOffset=W.size(this,null,!1)}};var vA=new e.VersionedStruct(e.uint16,{header:{xAvgCharWidth:e.int16,usWeightClass:e.uint16,usWidthClass:e.uint16,fsType:new e.Bitfield(e.uint16,[null,"noEmbedding","viewOnly","editable",null,null,null,null,"noSubsetting","bitmapOnly"]),ySubscriptXSize:e.int16,ySubscriptYSize:e.int16,ySubscriptXOffset:e.int16,ySubscriptYOffset:e.int16,ySuperscriptXSize:e.int16,ySuperscriptYSize:e.int16,ySuperscriptXOffset:e.int16,ySuperscriptYOffset:e.int16,yStrikeoutSize:e.int16,yStrikeoutPosition:e.int16,sFamilyClass:e.int16,panose:new e.Array(e.uint8,10),ulCharRange:new e.Array(e.uint32,4),vendorID:new e.String(4),fsSelection:new e.Bitfield(e.uint16,["italic","underscore","negative","outlined","strikeout","bold","regular","useTypoMetrics","wws","oblique"]),usFirstCharIndex:e.uint16,usLastCharIndex:e.uint16},0:{},1:{typoAscender:e.int16,typoDescender:e.int16,typoLineGap:e.int16,winAscent:e.uint16,winDescent:e.uint16,codePageRange:new e.Array(e.uint32,2)},2:{typoAscender:e.int16,typoDescender:e.int16,typoLineGap:e.int16,winAscent:e.uint16,winDescent:e.uint16,codePageRange:new e.Array(e.uint32,2),xHeight:e.int16,capHeight:e.int16,defaultChar:e.uint16,breakChar:e.uint16,maxContent:e.uint16},5:{typoAscender:e.int16,typoDescender:e.int16,typoLineGap:e.int16,winAscent:e.uint16,winDescent:e.uint16,codePageRange:new e.Array(e.uint32,2),xHeight:e.int16,capHeight:e.int16,defaultChar:e.uint16,breakChar:e.uint16,maxContent:e.uint16,usLowerOpticalPointSize:e.uint16,usUpperOpticalPointSize:e.uint16}}),iA=vA.versions;iA[3]=iA[4]=iA[2];var wA=new e.VersionedStruct(e.fixed32,{header:{italicAngle:e.fixed32,underlinePosition:e.int16,underlineThickness:e.int16,isFixedPitch:e.uint32,minMemType42:e.uint32,maxMemType42:e.uint32,minMemType1:e.uint32,maxMemType1:e.uint32},1:{},2:{numberOfGlyphs:e.uint16,glyphNameIndex:new e.Array(e.uint16,"numberOfGlyphs"),names:new e.Array(new e.String(e.uint8))},2.5:{numberOfGlyphs:e.uint16,offsets:new e.Array(e.uint8,"numberOfGlyphs")},3:{},4:{map:new e.Array(e.uint32,function(eA){return eA.parent.maxp.numGlyphs})}}),GA=new e.Struct({controlValues:new e.Array(e.int16)}),et=new e.Struct({instructions:new e.Array(e.uint8)}),st=new e.VersionedStruct("head.indexToLocFormat",{0:{offsets:new e.Array(e.uint16)},1:{offsets:new e.Array(e.uint32)}});st.process=function(){if(0===this.version)for(var eA=0;eA>>=1};var TA=new e.Struct({controlValueProgram:new e.Array(e.uint8)}),at=new e.Array(new e.Buffer),It=function(){function eA(V){this.type=V}var G=eA.prototype;return G.getCFFVersion=function(p){for(;p&&!p.hdrSize;)p=p.parent;return p?p.version:-1},G.decode=function(p,F){var tA=this.getCFFVersion(F)>=2?p.readUInt32BE():p.readUInt16BE();if(0===tA)return[];var sA,oA=p.readUInt8();if(1===oA)sA=e.uint8;else if(2===oA)sA=e.uint16;else if(3===oA)sA=e.uint24;else{if(4!==oA)throw new Error("Bad offset size in CFFIndex: ".concat(oA," ").concat(p.pos));sA=e.uint32}for(var aA=[],NA=p.pos+(tA+1)*oA-1,kA=sA.decode(p),ct=0;ct>4;if(15===tA)break;F+=ht[tA];var oA=15&L;if(15===oA)break;F+=ht[oA]}return parseFloat(F)}return null},eA.size=function(V){return V.forceLarge&&(V=32768),(0|V)!==V?1+Math.ceil(((""+V).length+1)/2):-107<=V&&V<=107?1:108<=V&&V<=1131||-1131<=V&&V<=-108?2:-32768<=V&&V<=32767?3:5},eA.encode=function(V,p){var F=Number(p);if(p.forceLarge)return V.writeUInt8(29),V.writeInt32BE(F);if((0|F)===F)return-107<=F&&F<=107?V.writeUInt8(F+139):108<=F&&F<=1131?(V.writeUInt8(247+((F-=108)>>8)),V.writeUInt8(255&F)):-1131<=F&&F<=-108?(V.writeUInt8(251+((F=-F-108)>>8)),V.writeUInt8(255&F)):-32768<=F&&F<=32767?(V.writeUInt8(28),V.writeInt16BE(F)):(V.writeUInt8(29),V.writeInt32BE(F));V.writeUInt8(30);for(var L=""+F,tA=0;tAL;)F.pop()},eA}(),null],[19,"Subrs",new xA(new It,{type:"local"}),null]]),OA=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],H=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],z=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],PA=new e.Struct({reserved:new e.Reserved(e.uint16),reqFeatureIndex:e.uint16,featureCount:e.uint16,featureIndexes:new e.Array(e.uint16,"featureCount")}),rA=new e.Struct({tag:new e.String(4),langSys:new e.Pointer(e.uint16,PA,{type:"parent"})}),gt=new e.Struct({defaultLangSys:new e.Pointer(e.uint16,PA),count:e.uint16,langSysRecords:new e.Array(rA,"count")}),Yt=new e.Struct({tag:new e.String(4),script:new e.Pointer(e.uint16,gt,{type:"parent"})}),j=new e.Array(Yt,e.uint16),qA=new e.Struct({featureParams:e.uint16,lookupCount:e.uint16,lookupListIndexes:new e.Array(e.uint16,"lookupCount")}),KA=new e.Struct({tag:new e.String(4),feature:new e.Pointer(e.uint16,qA,{type:"parent"})}),DA=new e.Array(KA,e.uint16),jA=new e.Struct({markAttachmentType:e.uint8,flags:new e.Bitfield(e.uint8,["rightToLeft","ignoreBaseGlyphs","ignoreLigatures","ignoreMarks","useMarkFilteringSet"])});function lt(eA){var G=new e.Struct({lookupType:e.uint16,flags:jA,subTableCount:e.uint16,subTables:new e.Array(new e.Pointer(e.uint16,eA),"subTableCount"),markFilteringSet:new e.Optional(e.uint16,function(V){return V.flags.flags.useMarkFilteringSet})});return new e.LazyArray(new e.Pointer(e.uint16,G),e.uint16)}var zt=new e.Struct({start:e.uint16,end:e.uint16,startCoverageIndex:e.uint16}),xt=new e.VersionedStruct(e.uint16,{1:{glyphCount:e.uint16,glyphs:new e.Array(e.uint16,"glyphCount")},2:{rangeCount:e.uint16,rangeRecords:new e.Array(zt,"rangeCount")}}),Lt=new e.Struct({start:e.uint16,end:e.uint16,class:e.uint16}),Xt=new e.VersionedStruct(e.uint16,{1:{startGlyph:e.uint16,glyphCount:e.uint16,classValueArray:new e.Array(e.uint16,"glyphCount")},2:{classRangeCount:e.uint16,classRangeRecord:new e.Array(Lt,"classRangeCount")}}),ze=new e.Struct({a:e.uint16,b:e.uint16,deltaFormat:e.uint16}),ae=new e.Struct({sequenceIndex:e.uint16,lookupListIndex:e.uint16}),ee=new e.Struct({glyphCount:e.uint16,lookupCount:e.uint16,input:new e.Array(e.uint16,function(eA){return eA.glyphCount-1}),lookupRecords:new e.Array(ae,"lookupCount")}),Fe=new e.Array(new e.Pointer(e.uint16,ee),e.uint16),Ge=new e.Struct({glyphCount:e.uint16,lookupCount:e.uint16,classes:new e.Array(e.uint16,function(eA){return eA.glyphCount-1}),lookupRecords:new e.Array(ae,"lookupCount")}),Le=new e.Array(new e.Pointer(e.uint16,Ge),e.uint16),yn=new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),ruleSetCount:e.uint16,ruleSets:new e.Array(new e.Pointer(e.uint16,Fe),"ruleSetCount")},2:{coverage:new e.Pointer(e.uint16,xt),classDef:new e.Pointer(e.uint16,Xt),classSetCnt:e.uint16,classSet:new e.Array(new e.Pointer(e.uint16,Le),"classSetCnt")},3:{glyphCount:e.uint16,lookupCount:e.uint16,coverages:new e.Array(new e.Pointer(e.uint16,xt),"glyphCount"),lookupRecords:new e.Array(ae,"lookupCount")}}),xn=new e.Struct({backtrackGlyphCount:e.uint16,backtrack:new e.Array(e.uint16,"backtrackGlyphCount"),inputGlyphCount:e.uint16,input:new e.Array(e.uint16,function(eA){return eA.inputGlyphCount-1}),lookaheadGlyphCount:e.uint16,lookahead:new e.Array(e.uint16,"lookaheadGlyphCount"),lookupCount:e.uint16,lookupRecords:new e.Array(ae,"lookupCount")}),re=new e.Array(new e.Pointer(e.uint16,xn),e.uint16),nn=new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),chainCount:e.uint16,chainRuleSets:new e.Array(new e.Pointer(e.uint16,re),"chainCount")},2:{coverage:new e.Pointer(e.uint16,xt),backtrackClassDef:new e.Pointer(e.uint16,Xt),inputClassDef:new e.Pointer(e.uint16,Xt),lookaheadClassDef:new e.Pointer(e.uint16,Xt),chainCount:e.uint16,chainClassSet:new e.Array(new e.Pointer(e.uint16,re),"chainCount")},3:{backtrackGlyphCount:e.uint16,backtrackCoverage:new e.Array(new e.Pointer(e.uint16,xt),"backtrackGlyphCount"),inputGlyphCount:e.uint16,inputCoverage:new e.Array(new e.Pointer(e.uint16,xt),"inputGlyphCount"),lookaheadGlyphCount:e.uint16,lookaheadCoverage:new e.Array(new e.Pointer(e.uint16,xt),"lookaheadGlyphCount"),lookupCount:e.uint16,lookupRecords:new e.Array(ae,"lookupCount")}}),De=new e.Fixed(16,"BE",14),rn=new e.Struct({startCoord:De,peakCoord:De,endCoord:De}),$e=new e.Struct({axisCount:e.uint16,regionCount:e.uint16,variationRegions:new e.Array(new e.Array(rn,"axisCount"),"regionCount")}),Gn=new e.Struct({shortDeltas:new e.Array(e.int16,function(eA){return eA.parent.shortDeltaCount}),regionDeltas:new e.Array(e.int8,function(eA){return eA.parent.regionIndexCount-eA.parent.shortDeltaCount}),deltas:function(G){return G.shortDeltas.concat(G.regionDeltas)}}),Hn=new e.Struct({itemCount:e.uint16,shortDeltaCount:e.uint16,regionIndexCount:e.uint16,regionIndexes:new e.Array(e.uint16,"regionIndexCount"),deltaSets:new e.Array(Gn,"itemCount")}),Kt=new e.Struct({format:e.uint16,variationRegionList:new e.Pointer(e.uint32,$e),variationDataCount:e.uint16,itemVariationData:new e.Array(new e.Pointer(e.uint32,Hn),"variationDataCount")}),Gt=new e.VersionedStruct(e.uint16,{1:(r={axisIndex:e.uint16},r.axisIndex=e.uint16,r.filterRangeMinValue=De,r.filterRangeMaxValue=De,r)}),$t=new e.Struct({conditionCount:e.uint16,conditionTable:new e.Array(new e.Pointer(e.uint32,Gt),"conditionCount")}),le=new e.Struct({featureIndex:e.uint16,alternateFeatureTable:new e.Pointer(e.uint32,qA,{type:"parent"})}),vn=new e.Struct({version:e.fixed32,substitutionCount:e.uint16,substitutions:new e.Array(le,"substitutionCount")}),pn=new e.Struct({conditionSet:new e.Pointer(e.uint32,$t,{type:"parent"}),featureTableSubstitution:new e.Pointer(e.uint32,vn,{type:"parent"})}),Tn=new e.Struct({majorVersion:e.uint16,minorVersion:e.uint16,featureVariationRecordCount:e.uint32,featureVariationRecords:new e.Array(pn,"featureVariationRecordCount")}),Xn=function(){function eA(V,p){this.predefinedOps=V,this.type=p}var G=eA.prototype;return G.decode=function(p,F,L){return this.predefinedOps[L[0]]?this.predefinedOps[L[0]]:this.type.decode(p,F,L)},G.size=function(p,F){return this.type.size(p,F)},G.encode=function(p,F,L){var tA=this.predefinedOps.indexOf(F);return-1!==tA?tA:this.type.encode(p,F,L)},eA}(),Ei=function(eA){function G(){return eA.call(this,"UInt8")||this}return h(G,eA),G.prototype.decode=function(F){return 127&e.uint8.decode(F)},G}(e.Number),Sn=new e.Struct({first:e.uint16,nLeft:e.uint8}),ZA=new e.Struct({first:e.uint16,nLeft:e.uint16}),tt=new Xn([H,["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"]],new xA(new e.VersionedStruct(new Ei,{0:{nCodes:e.uint8,codes:new e.Array(e.uint8,"nCodes")},1:{nRanges:e.uint8,ranges:new e.Array(Sn,"nRanges")}}),{lazy:!0})),UA=function(eA){function G(){return eA.apply(this,arguments)||this}return h(G,eA),G.prototype.decode=function(F,L){for(var tA=f.resolveLength(this.length,F,L),oA=0,sA=[];oA=2?null:p=2||this.isCIDFont)return null;var F=this.topDict.charset;if(Array.isArray(F))return F[p];if(0===p)return".notdef";switch(p-=1,F.version){case 0:return this.string(F.glyphs[p]);case 1:case 2:for(var L=0;L>1;if(p=F[oA+1].first))return F[oA].fd;L=oA+1}}default:throw new Error("Unknown FDSelect version: ".concat(this.topDict.FDSelect.version))}},G.privateDictForGlyph=function(p){if(this.topDict.FDSelect){var F=this.fdForGlyph(p);return this.topDict.FDArray[F]?this.topDict.FDArray[F].Private:null}return this.version<2?this.topDict.Private:this.topDict.FDArray[0].Private},l(eA,[{key:"postscriptName",get:function(){return this.version<2?this.nameIndex[0]:null}},{key:"fullName",get:function(){return this.string(this.topDict.FullName)}},{key:"familyName",get:function(){return this.string(this.topDict.FamilyName)}}]),eA}(),wt=new e.Struct({glyphIndex:e.uint16,vertOriginY:e.int16}),bt=new e.Struct({majorVersion:e.uint16,minorVersion:e.uint16,defaultVertOriginY:e.int16,numVertOriginYMetrics:e.uint16,metrics:new e.Array(wt,"numVertOriginYMetrics")}),Zt=new e.Struct({height:e.uint8,width:e.uint8,horiBearingX:e.int8,horiBearingY:e.int8,horiAdvance:e.uint8,vertBearingX:e.int8,vertBearingY:e.int8,vertAdvance:e.uint8}),jt=new e.Struct({height:e.uint8,width:e.uint8,bearingX:e.int8,bearingY:e.int8,advance:e.uint8}),Be=new e.Struct({glyph:e.uint16,xOffset:e.int8,yOffset:e.int8}),qt=function(){},he=function(){},ye=(new e.VersionedStruct("version",{1:{metrics:jt,data:qt},2:{metrics:jt,data:he},5:{data:he},6:{metrics:Zt,data:qt},7:{metrics:Zt,data:he},8:{metrics:jt,pad:new e.Reserved(e.uint8),numComponents:e.uint16,components:new e.Array(Be,"numComponents")},9:{metrics:Zt,pad:new e.Reserved(e.uint8),numComponents:e.uint16,components:new e.Array(Be,"numComponents")},17:{metrics:jt,dataLen:e.uint32,data:new e.Buffer("dataLen")},18:{metrics:Zt,dataLen:e.uint32,data:new e.Buffer("dataLen")},19:{dataLen:e.uint32,data:new e.Buffer("dataLen")}}),new e.Struct({ascender:e.int8,descender:e.int8,widthMax:e.uint8,caretSlopeNumerator:e.int8,caretSlopeDenominator:e.int8,caretOffset:e.int8,minOriginSB:e.int8,minAdvanceSB:e.int8,maxBeforeBL:e.int8,minAfterBL:e.int8,pad:new e.Reserved(e.int8,2)})),He=new e.Struct({glyphCode:e.uint16,offset:e.uint16}),Ne=new e.VersionedStruct(e.uint16,{header:{imageFormat:e.uint16,imageDataOffset:e.uint32},1:{offsetArray:new e.Array(e.uint32,function(eA){return eA.parent.lastGlyphIndex-eA.parent.firstGlyphIndex+1})},2:{imageSize:e.uint32,bigMetrics:Zt},3:{offsetArray:new e.Array(e.uint16,function(eA){return eA.parent.lastGlyphIndex-eA.parent.firstGlyphIndex+1})},4:{numGlyphs:e.uint32,glyphArray:new e.Array(He,function(eA){return eA.numGlyphs+1})},5:{imageSize:e.uint32,bigMetrics:Zt,numGlyphs:e.uint32,glyphCodeArray:new e.Array(e.uint16,"numGlyphs")}}),Ye=new e.Struct({firstGlyphIndex:e.uint16,lastGlyphIndex:e.uint16,subtable:new e.Pointer(e.uint32,Ne)}),Ue=new e.Struct({indexSubTableArray:new e.Pointer(e.uint32,new e.Array(Ye,1),{type:"parent"}),indexTablesSize:e.uint32,numberOfIndexSubTables:e.uint32,colorRef:e.uint32,hori:ye,vert:ye,startGlyphIndex:e.uint16,endGlyphIndex:e.uint16,ppemX:e.uint8,ppemY:e.uint8,bitDepth:e.uint8,flags:new e.Bitfield(e.uint8,["horizontal","vertical"])}),tn=new e.Struct({version:e.uint32,numSizes:e.uint32,sizes:new e.Array(Ue,"numSizes")}),Fn=new e.Struct({ppem:e.uint16,resolution:e.uint16,imageOffsets:new e.Array(new e.Pointer(e.uint32,"void"),function(eA){return eA.parent.parent.maxp.numGlyphs+1})}),on=new e.Struct({version:e.uint16,flags:new e.Bitfield(e.uint16,["renderOutlines"]),numImgTables:e.uint32,imageTables:new e.Array(new e.Pointer(e.uint32,Fn),"numImgTables")}),mn=new e.Struct({gid:e.uint16,paletteIndex:e.uint16}),Nn=new e.Struct({gid:e.uint16,firstLayerIndex:e.uint16,numLayers:e.uint16}),sn=new e.Struct({version:e.uint16,numBaseGlyphRecords:e.uint16,baseGlyphRecord:new e.Pointer(e.uint32,new e.Array(Nn,"numBaseGlyphRecords")),layerRecords:new e.Pointer(e.uint32,new e.Array(mn,"numLayerRecords"),{lazy:!0}),numLayerRecords:e.uint16}),En=new e.Struct({blue:e.uint8,green:e.uint8,red:e.uint8,alpha:e.uint8}),un=new e.VersionedStruct(e.uint16,{header:{numPaletteEntries:e.uint16,numPalettes:e.uint16,numColorRecords:e.uint16,colorRecords:new e.Pointer(e.uint32,new e.Array(En,"numColorRecords")),colorRecordIndices:new e.Array(e.uint16,"numPalettes")},0:{},1:{offsetPaletteTypeArray:new e.Pointer(e.uint32,new e.Array(e.uint32,"numPalettes")),offsetPaletteLabelArray:new e.Pointer(e.uint32,new e.Array(e.uint16,"numPalettes")),offsetPaletteEntryLabelArray:new e.Pointer(e.uint32,new e.Array(e.uint16,"numPaletteEntries"))}}),ei=new e.VersionedStruct(e.uint16,{1:{coordinate:e.int16},2:{coordinate:e.int16,referenceGlyph:e.uint16,baseCoordPoint:e.uint16},3:{coordinate:e.int16,deviceTable:new e.Pointer(e.uint16,ze)}}),Pi=new e.Struct({defaultIndex:e.uint16,baseCoordCount:e.uint16,baseCoords:new e.Array(new e.Pointer(e.uint16,ei),"baseCoordCount")}),bi=new e.Struct({tag:new e.String(4),minCoord:new e.Pointer(e.uint16,ei,{type:"parent"}),maxCoord:new e.Pointer(e.uint16,ei,{type:"parent"})}),li=new e.Struct({minCoord:new e.Pointer(e.uint16,ei),maxCoord:new e.Pointer(e.uint16,ei),featMinMaxCount:e.uint16,featMinMaxRecords:new e.Array(bi,"featMinMaxCount")}),Yn=new e.Struct({tag:new e.String(4),minMax:new e.Pointer(e.uint16,li,{type:"parent"})}),Jn=new e.Struct({baseValues:new e.Pointer(e.uint16,Pi),defaultMinMax:new e.Pointer(e.uint16,li),baseLangSysCount:e.uint16,baseLangSysRecords:new e.Array(Yn,"baseLangSysCount")}),IA=new e.Struct({tag:new e.String(4),script:new e.Pointer(e.uint16,Jn,{type:"parent"})}),J=new e.Array(IA,e.uint16),U=new e.Array(new e.String(4),e.uint16),X=new e.Struct({baseTagList:new e.Pointer(e.uint16,U),baseScriptList:new e.Pointer(e.uint16,J)}),K=new e.VersionedStruct(e.uint32,{header:{horizAxis:new e.Pointer(e.uint16,X),vertAxis:new e.Pointer(e.uint16,X)},65536:{},65537:{itemVariationStore:new e.Pointer(e.uint32,Kt)}}),hA=new e.Array(e.uint16,e.uint16),mA=new e.Struct({coverage:new e.Pointer(e.uint16,xt),glyphCount:e.uint16,attachPoints:new e.Array(new e.Pointer(e.uint16,hA),"glyphCount")}),$A=new e.VersionedStruct(e.uint16,{1:{coordinate:e.int16},2:{caretValuePoint:e.uint16},3:{coordinate:e.int16,deviceTable:new e.Pointer(e.uint16,ze)}}),nt=new e.Array(new e.Pointer(e.uint16,$A),e.uint16),ft=new e.Struct({coverage:new e.Pointer(e.uint16,xt),ligGlyphCount:e.uint16,ligGlyphs:new e.Array(new e.Pointer(e.uint16,nt),"ligGlyphCount")}),dt=new e.Struct({markSetTableFormat:e.uint16,markSetCount:e.uint16,coverage:new e.Array(new e.Pointer(e.uint32,xt),"markSetCount")}),Dt=new e.VersionedStruct(e.uint32,{header:{glyphClassDef:new e.Pointer(e.uint16,Xt),attachList:new e.Pointer(e.uint16,mA),ligCaretList:new e.Pointer(e.uint16,ft),markAttachClassDef:new e.Pointer(e.uint16,Xt)},65536:{},65538:{markGlyphSetsDef:new e.Pointer(e.uint16,dt)},65539:{markGlyphSetsDef:new e.Pointer(e.uint16,dt),itemVariationStore:new e.Pointer(e.uint32,Kt)}}),Ft=new e.Bitfield(e.uint16,["xPlacement","yPlacement","xAdvance","yAdvance","xPlaDevice","yPlaDevice","xAdvDevice","yAdvDevice"]),Nt={xPlacement:e.int16,yPlacement:e.int16,xAdvance:e.int16,yAdvance:e.int16,xPlaDevice:new e.Pointer(e.uint16,ze,{type:"global",relativeTo:function(G){return G.rel}}),yPlaDevice:new e.Pointer(e.uint16,ze,{type:"global",relativeTo:function(G){return G.rel}}),xAdvDevice:new e.Pointer(e.uint16,ze,{type:"global",relativeTo:function(G){return G.rel}}),yAdvDevice:new e.Pointer(e.uint16,ze,{type:"global",relativeTo:function(G){return G.rel}})},Vt=function(){function eA(V){void 0===V&&(V="valueFormat"),this.key=V}var G=eA.prototype;return G.buildStruct=function(p){for(var F=p;!F[this.key]&&F.parent;)F=F.parent;if(F[this.key]){var L={rel:function(){return F._startOffset}},tA=F[this.key];for(var oA in tA)tA[oA]&&(L[oA]=Nt[oA]);return new e.Struct(L)}},G.size=function(p,F){return this.buildStruct(F).size(p,F)},G.decode=function(p,F){var L=this.buildStruct(F).decode(p,F);return delete L.rel,L},eA}(),Ht=new e.Struct({secondGlyph:e.uint16,value1:new Vt("valueFormat1"),value2:new Vt("valueFormat2")}),Ee=new e.Array(Ht,e.uint16),Ce=new e.Struct({value1:new Vt("valueFormat1"),value2:new Vt("valueFormat2")}),Ie=new e.VersionedStruct(e.uint16,{1:{xCoordinate:e.int16,yCoordinate:e.int16},2:{xCoordinate:e.int16,yCoordinate:e.int16,anchorPoint:e.uint16},3:{xCoordinate:e.int16,yCoordinate:e.int16,xDeviceTable:new e.Pointer(e.uint16,ze),yDeviceTable:new e.Pointer(e.uint16,ze)}}),an=new e.Struct({entryAnchor:new e.Pointer(e.uint16,Ie,{type:"parent"}),exitAnchor:new e.Pointer(e.uint16,Ie,{type:"parent"})}),pe=new e.Struct({class:e.uint16,markAnchor:new e.Pointer(e.uint16,Ie,{type:"parent"})}),Ke=new e.Array(pe,e.uint16),Qn=new e.Array(new e.Pointer(e.uint16,Ie),function(eA){return eA.parent.classCount}),Ve=new e.Array(Qn,e.uint16),dn=new e.Array(new e.Pointer(e.uint16,Ie),function(eA){return eA.parent.parent.classCount}),qn=new e.Array(dn,e.uint16),ni=new e.Array(new e.Pointer(e.uint16,qn),e.uint16),Un=new e.VersionedStruct("lookupType",{1:new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),valueFormat:Ft,value:new Vt},2:{coverage:new e.Pointer(e.uint16,xt),valueFormat:Ft,valueCount:e.uint16,values:new e.LazyArray(new Vt,"valueCount")}}),2:new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),valueFormat1:Ft,valueFormat2:Ft,pairSetCount:e.uint16,pairSets:new e.LazyArray(new e.Pointer(e.uint16,Ee),"pairSetCount")},2:{coverage:new e.Pointer(e.uint16,xt),valueFormat1:Ft,valueFormat2:Ft,classDef1:new e.Pointer(e.uint16,Xt),classDef2:new e.Pointer(e.uint16,Xt),class1Count:e.uint16,class2Count:e.uint16,classRecords:new e.LazyArray(new e.LazyArray(Ce,"class2Count"),"class1Count")}}),3:{format:e.uint16,coverage:new e.Pointer(e.uint16,xt),entryExitCount:e.uint16,entryExitRecords:new e.Array(an,"entryExitCount")},4:{format:e.uint16,markCoverage:new e.Pointer(e.uint16,xt),baseCoverage:new e.Pointer(e.uint16,xt),classCount:e.uint16,markArray:new e.Pointer(e.uint16,Ke),baseArray:new e.Pointer(e.uint16,Ve)},5:{format:e.uint16,markCoverage:new e.Pointer(e.uint16,xt),ligatureCoverage:new e.Pointer(e.uint16,xt),classCount:e.uint16,markArray:new e.Pointer(e.uint16,Ke),ligatureArray:new e.Pointer(e.uint16,ni)},6:{format:e.uint16,mark1Coverage:new e.Pointer(e.uint16,xt),mark2Coverage:new e.Pointer(e.uint16,xt),classCount:e.uint16,mark1Array:new e.Pointer(e.uint16,Ke),mark2Array:new e.Pointer(e.uint16,Ve)},7:yn,8:nn,9:{posFormat:e.uint16,lookupType:e.uint16,extension:new e.Pointer(e.uint32,Un)}});Un.versions[9].extension.type=Un;var Hi=new e.VersionedStruct(e.uint32,{header:{scriptList:new e.Pointer(e.uint16,j),featureList:new e.Pointer(e.uint16,DA),lookupList:new e.Pointer(e.uint16,new lt(Un))},65536:{},65537:{featureVariations:new e.Pointer(e.uint32,Tn)}}),Kn=new e.Array(e.uint16,e.uint16),ci=Kn,Ii=new e.Struct({glyph:e.uint16,compCount:e.uint16,components:new e.Array(e.uint16,function(eA){return eA.compCount-1})}),ii=new e.Array(new e.Pointer(e.uint16,Ii),e.uint16),wi=new e.VersionedStruct("lookupType",{1:new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),deltaGlyphID:e.int16},2:{coverage:new e.Pointer(e.uint16,xt),glyphCount:e.uint16,substitute:new e.LazyArray(e.uint16,"glyphCount")}}),2:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,xt),count:e.uint16,sequences:new e.LazyArray(new e.Pointer(e.uint16,Kn),"count")},3:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,xt),count:e.uint16,alternateSet:new e.LazyArray(new e.Pointer(e.uint16,ci),"count")},4:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,xt),count:e.uint16,ligatureSets:new e.LazyArray(new e.Pointer(e.uint16,ii),"count")},5:yn,6:nn,7:{substFormat:e.uint16,lookupType:e.uint16,extension:new e.Pointer(e.uint32,wi)},8:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,xt),backtrackCoverage:new e.Array(new e.Pointer(e.uint16,xt),"backtrackGlyphCount"),lookaheadGlyphCount:e.uint16,lookaheadCoverage:new e.Array(new e.Pointer(e.uint16,xt),"lookaheadGlyphCount"),glyphCount:e.uint16,substitutes:new e.Array(e.uint16,"glyphCount")}});wi.versions[7].extension.type=wi;var Ji=new e.VersionedStruct(e.uint32,{header:{scriptList:new e.Pointer(e.uint16,j),featureList:new e.Pointer(e.uint16,DA),lookupList:new e.Pointer(e.uint16,new lt(wi))},65536:{},65537:{featureVariations:new e.Pointer(e.uint32,Tn)}}),_n=new e.Array(e.uint16,e.uint16),Oi=new e.Struct({shrinkageEnableGSUB:new e.Pointer(e.uint16,_n),shrinkageDisableGSUB:new e.Pointer(e.uint16,_n),shrinkageEnableGPOS:new e.Pointer(e.uint16,_n),shrinkageDisableGPOS:new e.Pointer(e.uint16,_n),shrinkageJstfMax:new e.Pointer(e.uint16,new lt(Un)),extensionEnableGSUB:new e.Pointer(e.uint16,_n),extensionDisableGSUB:new e.Pointer(e.uint16,_n),extensionEnableGPOS:new e.Pointer(e.uint16,_n),extensionDisableGPOS:new e.Pointer(e.uint16,_n),extensionJstfMax:new e.Pointer(e.uint16,new lt(Un))}),vi=new e.Array(new e.Pointer(e.uint16,Oi),e.uint16),ki=new e.Struct({tag:new e.String(4),jstfLangSys:new e.Pointer(e.uint16,vi)}),ji=new e.Struct({extenderGlyphs:new e.Pointer(e.uint16,new e.Array(e.uint16,e.uint16)),defaultLangSys:new e.Pointer(e.uint16,vi),langSysCount:e.uint16,langSysRecords:new e.Array(ki,"langSysCount")}),hr=new e.Struct({tag:new e.String(4),script:new e.Pointer(e.uint16,ji,{type:"parent"})}),Ki=new e.Struct({version:e.uint32,scriptCount:e.uint16,scriptList:new e.Array(hr,"scriptCount")}),Vi=new e.Struct({entry:new(function(){function eA(V){this._size=V}var G=eA.prototype;return G.decode=function(p,F){switch(this.size(0,F)){case 1:return p.readUInt8();case 2:return p.readUInt16BE();case 3:return p.readUInt24BE();case 4:return p.readUInt32BE()}},G.size=function(p,F){return f.resolveLength(this._size,null,F)},eA}())(function(eA){return 1+((48&eA.parent.entryFormat)>>4)}),outerIndex:function(G){return G.entry>>1+(15&G.parent.entryFormat)},innerIndex:function(G){return G.entry&(1<<1+(15&G.parent.entryFormat))-1}}),$n=new e.Struct({entryFormat:e.uint16,mapCount:e.uint16,mapData:new e.Array(Vi,"mapCount")}),Hr=new e.Struct({majorVersion:e.uint16,minorVersion:e.uint16,itemVariationStore:new e.Pointer(e.uint32,Kt),advanceWidthMapping:new e.Pointer(e.uint32,$n),LSBMapping:new e.Pointer(e.uint32,$n),RSBMapping:new e.Pointer(e.uint32,$n)}),Jr=new e.Struct({format:e.uint32,length:e.uint32,offset:e.uint32}),so=new e.Struct({reserved:new e.Reserved(e.uint16,2),cbSignature:e.uint32,signature:new e.Buffer("cbSignature")}),lo=new e.Struct({ulVersion:e.uint32,usNumSigs:e.uint16,usFlag:e.uint16,signatures:new e.Array(Jr,"usNumSigs"),signatureBlocks:new e.Array(so,"usNumSigs")}),co=new e.Struct({rangeMaxPPEM:e.uint16,rangeGaspBehavior:new e.Bitfield(e.uint16,["grayscale","gridfit","symmetricSmoothing","symmetricGridfit"])}),go=new e.Struct({version:e.uint16,numRanges:e.uint16,gaspRanges:new e.Array(co,"numRanges")}),Bo=new e.Struct({pixelSize:e.uint8,maximumWidth:e.uint8,widths:new e.Array(e.uint8,function(eA){return eA.parent.parent.maxp.numGlyphs})}),uo=new e.Struct({version:e.uint16,numRecords:e.int16,sizeDeviceRecord:e.int32,records:new e.Array(Bo,"numRecords")}),fo=new e.Struct({left:e.uint16,right:e.uint16,value:e.int16}),ca=new e.Struct({firstGlyph:e.uint16,nGlyphs:e.uint16,offsets:new e.Array(e.uint16,"nGlyphs"),max:function(G){return G.offsets.length&&Math.max.apply(Math,G.offsets)}}),ho=new e.Struct({off:function(G){return G._startOffset-G.parent.parent._startOffset},len:function(G){return G.parent.rowWidth/2*((G.parent.leftTable.max-G.off)/G.parent.rowWidth+1)},values:new e.LazyArray(e.int16,"len")}),ga=new e.VersionedStruct("format",{0:{nPairs:e.uint16,searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16,pairs:new e.Array(fo,"nPairs")},2:{rowWidth:e.uint16,leftTable:new e.Pointer(e.uint16,ca,{type:"parent"}),rightTable:new e.Pointer(e.uint16,ca,{type:"parent"}),array:new e.Pointer(e.uint16,ho,{type:"parent"})},3:{glyphCount:e.uint16,kernValueCount:e.uint8,leftClassCount:e.uint8,rightClassCount:e.uint8,flags:e.uint8,kernValue:new e.Array(e.int16,"kernValueCount"),leftClass:new e.Array(e.uint8,"glyphCount"),rightClass:new e.Array(e.uint8,"glyphCount"),kernIndex:new e.Array(e.uint8,function(eA){return eA.leftClassCount*eA.rightClassCount})}}),Ba=new e.VersionedStruct("version",{0:{subVersion:e.uint16,length:e.uint16,format:e.uint8,coverage:new e.Bitfield(e.uint8,["horizontal","minimum","crossStream","override"]),subtable:ga,padding:new e.Reserved(e.uint8,function(eA){return eA.length-eA._currentOffset})},1:{length:e.uint32,coverage:new e.Bitfield(e.uint8,[null,null,null,null,null,"variation","crossStream","vertical"]),format:e.uint8,tupleIndex:e.uint16,subtable:ga,padding:new e.Reserved(e.uint8,function(eA){return eA.length-eA._currentOffset})}}),Eo=new e.VersionedStruct(e.uint16,{0:{nTables:e.uint16,tables:new e.Array(Ba,"nTables")},1:{reserved:new e.Reserved(e.uint16),nTables:e.uint32,tables:new e.Array(Ba,"nTables")}}),wo=new e.Struct({version:e.uint16,numGlyphs:e.uint16,yPels:new e.Array(e.uint8,"numGlyphs")}),Co=new e.Struct({version:e.uint16,fontNumber:e.uint32,pitch:e.uint16,xHeight:e.uint16,style:e.uint16,typeFamily:e.uint16,capHeight:e.uint16,symbolSet:e.uint16,typeface:new e.String(16),characterComplement:new e.String(8),fileName:new e.String(6),strokeWeight:new e.String(1),widthType:new e.String(1),serifStyle:e.uint8,reserved:new e.Reserved(e.uint8)}),Qo=new e.Struct({bCharSet:e.uint8,xRatio:e.uint8,yStartRatio:e.uint8,yEndRatio:e.uint8}),Mo=new e.Struct({yPelHeight:e.uint16,yMax:e.int16,yMin:e.int16}),po=new e.Struct({recs:e.uint16,startsz:e.uint8,endsz:e.uint8,entries:new e.Array(Mo,"recs")}),mo=new e.Struct({version:e.uint16,numRecs:e.uint16,numRatios:e.uint16,ratioRanges:new e.Array(Qo,"numRatios"),offsets:new e.Array(e.uint16,"numRatios"),groups:new e.Array(po,"numRecs")}),Io=new e.Struct({version:e.uint16,ascent:e.int16,descent:e.int16,lineGap:e.int16,advanceHeightMax:e.int16,minTopSideBearing:e.int16,minBottomSideBearing:e.int16,yMaxExtent:e.int16,caretSlopeRise:e.int16,caretSlopeRun:e.int16,caretOffset:e.int16,reserved:new e.Reserved(e.int16,4),metricDataFormat:e.int16,numberOfMetrics:e.uint16}),vo=new e.Struct({advance:e.uint16,bearing:e.int16}),Do=new e.Struct({metrics:new e.LazyArray(vo,function(eA){return eA.parent.vhea.numberOfMetrics}),bearings:new e.LazyArray(e.int16,function(eA){return eA.parent.maxp.numGlyphs-eA.parent.vhea.numberOfMetrics})}),ua=new e.Fixed(16,"BE",14),yo=new e.Struct({fromCoord:ua,toCoord:ua}),xo=new e.Struct({pairCount:e.uint16,correspondence:new e.Array(yo,"pairCount")}),Fo=new e.Struct({version:e.fixed32,axisCount:e.uint32,segment:new e.Array(xo,"axisCount")}),Yo=function(){function eA(V,p,F){this.type=V,this.stream=p,this.parent=F,this.base=this.stream.pos,this._items=[]}var G=eA.prototype;return G.getItem=function(p){if(null==this._items[p]){var F=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.parent)*p,this._items[p]=this.type.decode(this.stream,this.parent),this.stream.pos=F}return this._items[p]},G.inspect=function(){return"[UnboundedArray ".concat(this.type.constructor.name,"]")},eA}(),ri=function(eA){function G(p){return eA.call(this,p,0)||this}return h(G,eA),G.prototype.decode=function(F,L){return new Yo(this.type,F,L)},G}(e.Array),Ci=function(G){void 0===G&&(G=e.uint16),G=new(function(){function oA(aA){this.type=aA}var sA=oA.prototype;return sA.decode=function(NA,kA){return this.type.decode(NA,kA=kA.parent.parent)},sA.size=function(NA,kA){return this.type.size(NA,kA=kA.parent.parent)},sA.encode=function(NA,kA,ct){return this.type.encode(NA,kA,ct=ct.parent.parent)},oA}())(G);var p=new e.Struct({unitSize:e.uint16,nUnits:e.uint16,searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16}),F=new e.Struct({lastGlyph:e.uint16,firstGlyph:e.uint16,value:G}),L=new e.Struct({lastGlyph:e.uint16,firstGlyph:e.uint16,values:new e.Pointer(e.uint16,new e.Array(G,function(oA){return oA.lastGlyph-oA.firstGlyph+1}),{type:"parent"})}),tA=new e.Struct({glyph:e.uint16,value:G});return new e.VersionedStruct(e.uint16,{0:{values:new ri(G)},2:{binarySearchHeader:p,segments:new e.Array(F,function(oA){return oA.binarySearchHeader.nUnits})},4:{binarySearchHeader:p,segments:new e.Array(L,function(oA){return oA.binarySearchHeader.nUnits})},6:{binarySearchHeader:p,segments:new e.Array(tA,function(oA){return oA.binarySearchHeader.nUnits})},8:{firstGlyph:e.uint16,count:e.uint16,values:new e.Array(G,"count")}})};function Er(eA,G){void 0===eA&&(eA={}),void 0===G&&(G=e.uint16);var V=Object.assign({newState:e.uint16,flags:e.uint16},eA),p=new e.Struct(V),F=new ri(new e.Array(e.uint16,function(tA){return tA.nClasses}));return new e.Struct({nClasses:e.uint32,classTable:new e.Pointer(e.uint32,new Ci(G)),stateArray:new e.Pointer(e.uint32,F),entryTable:new e.Pointer(e.uint32,new ri(p))})}var So=new e.VersionedStruct("format",{0:{deltas:new e.Array(e.int16,32)},1:{deltas:new e.Array(e.int16,32),mappingData:new Ci(e.uint16)},2:{standardGlyph:e.uint16,controlPoints:new e.Array(e.uint16,32)},3:{standardGlyph:e.uint16,controlPoints:new e.Array(e.uint16,32),mappingData:new Ci(e.uint16)}}),No=new e.Struct({version:e.fixed32,format:e.uint16,defaultBaseline:e.uint16,subtable:So}),Uo=new e.Struct({setting:e.uint16,nameIndex:e.int16,name:function(G){return G.parent.parent.parent.name.records.fontFeatures[G.nameIndex]}}),fa=new e.Struct({feature:e.uint16,nSettings:e.uint16,settingTable:new e.Pointer(e.uint32,new e.Array(Uo,"nSettings"),{type:"parent"}),featureFlags:new e.Bitfield(e.uint8,[null,null,null,null,null,null,"hasDefault","exclusive"]),defaultSetting:e.uint8,nameIndex:e.int16,name:function(G){return G.parent.parent.name.records.fontFeatures[G.nameIndex]}}),Po=new e.Struct({version:e.fixed32,featureNameCount:e.uint16,reserved1:new e.Reserved(e.uint16),reserved2:new e.Reserved(e.uint32),featureNames:new e.Array(fa,"featureNameCount")}),bo=new e.Struct({axisTag:new e.String(4),minValue:e.fixed32,defaultValue:e.fixed32,maxValue:e.fixed32,flags:e.uint16,nameID:e.uint16,name:function(G){return G.parent.parent.name.records.fontFeatures[G.nameID]}}),Lo=new e.Struct({nameID:e.uint16,name:function(G){return G.parent.parent.name.records.fontFeatures[G.nameID]},flags:e.uint16,coord:new e.Array(e.fixed32,function(eA){return eA.parent.axisCount}),postscriptNameID:new e.Optional(e.uint16,function(eA){return eA.parent.instanceSize-eA._currentOffset>0})}),Ro=new e.Struct({version:e.fixed32,offsetToData:e.uint16,countSizePairs:e.uint16,axisCount:e.uint16,axisSize:e.uint16,instanceCount:e.uint16,instanceSize:e.uint16,axis:new e.Array(bo,"axisCount"),instance:new e.Array(Lo,"instanceCount")}),zo=new e.Fixed(16,"BE",14),Go=function(){function eA(){}return eA.decode=function(V,p){return p.flags?V.readUInt32BE():2*V.readUInt16BE()},eA}(),Ho=new e.Struct({version:e.uint16,reserved:new e.Reserved(e.uint16),axisCount:e.uint16,globalCoordCount:e.uint16,globalCoords:new e.Pointer(e.uint32,new e.Array(new e.Array(zo,"axisCount"),"globalCoordCount")),glyphCount:e.uint16,flags:e.uint16,offsetToData:e.uint32,offsets:new e.Array(new e.Pointer(Go,"void",{relativeTo:function(G){return G.offsetToData},allowNull:!1}),function(eA){return eA.glyphCount+1})}),Jo=new e.Struct({length:e.uint16,coverage:e.uint16,subFeatureFlags:e.uint32,stateTable:new function To(eA,G){void 0===eA&&(eA={}),void 0===G&&(G=e.uint16);var V=new e.Struct({version:function(){return 8},firstGlyph:e.uint16,values:new e.Array(e.uint8,e.uint16)}),p=Object.assign({newStateOffset:e.uint16,newState:function(sA){return(sA.newStateOffset-(sA.parent.stateArray.base-sA.parent._startOffset))/sA.parent.nClasses},flags:e.uint16},eA),F=new e.Struct(p),L=new ri(new e.Array(e.uint8,function(oA){return oA.nClasses}));return new e.Struct({nClasses:e.uint16,classTable:new e.Pointer(e.uint16,V),stateArray:new e.Pointer(e.uint16,L),entryTable:new e.Pointer(e.uint16,new ri(F))})}}),Oo=new e.Struct({justClass:e.uint32,beforeGrowLimit:e.fixed32,beforeShrinkLimit:e.fixed32,afterGrowLimit:e.fixed32,afterShrinkLimit:e.fixed32,growFlags:e.uint16,shrinkFlags:e.uint16}),ko=new e.Array(Oo,e.uint32),ha=new e.VersionedStruct("actionType",{0:{lowerLimit:e.fixed32,upperLimit:e.fixed32,order:e.uint16,glyphs:new e.Array(e.uint16,e.uint16)},1:{addGlyph:e.uint16},2:{substThreshold:e.fixed32,addGlyph:e.uint16,substGlyph:e.uint16},3:{},4:{variationAxis:e.uint32,minimumLimit:e.fixed32,noStretchValue:e.fixed32,maximumLimit:e.fixed32},5:{flags:e.uint16,glyph:e.uint16}}),jo=new e.Struct({actionClass:e.uint16,actionType:e.uint16,actionLength:e.uint32,actionData:ha,padding:new e.Reserved(e.uint8,function(eA){return eA.actionLength-eA._currentOffset})}),Ko=new e.Array(jo,e.uint32),Vo=new e.Struct({lookupTable:new Ci(new e.Pointer(e.uint16,Ko))}),Ea=new e.Struct({classTable:new e.Pointer(e.uint16,Jo,{type:"parent"}),wdcOffset:e.uint16,postCompensationTable:new e.Pointer(e.uint16,Vo,{type:"parent"}),widthDeltaClusters:new Ci(new e.Pointer(e.uint16,ko,{type:"parent",relativeTo:function(G){return G.wdcOffset}}))}),Wo=new e.Struct({version:e.uint32,format:e.uint16,horizontal:new e.Pointer(e.uint16,Ea),vertical:new e.Pointer(e.uint16,Ea)}),Zo={action:e.uint16},Xo={markIndex:e.uint16,currentIndex:e.uint16},qo={currentInsertIndex:e.uint16,markedInsertIndex:e.uint16},_o=new e.Struct({items:new ri(new e.Pointer(e.uint32,new Ci))}),$o=new e.VersionedStruct("type",{0:{stateTable:new Er},1:{stateTable:new Er(Xo),substitutionTable:new e.Pointer(e.uint32,_o)},2:{stateTable:new Er(Zo),ligatureActions:new e.Pointer(e.uint32,new ri(e.uint32)),components:new e.Pointer(e.uint32,new ri(e.uint16)),ligatureList:new e.Pointer(e.uint32,new ri(e.uint16))},4:{lookupTable:new Ci},5:{stateTable:new Er(qo),insertionActions:new e.Pointer(e.uint32,new ri(e.uint16))}}),As=new e.Struct({length:e.uint32,coverage:e.uint24,type:e.uint8,subFeatureFlags:e.uint32,table:$o,padding:new e.Reserved(e.uint8,function(eA){return eA.length-eA._currentOffset})}),ts=new e.Struct({featureType:e.uint16,featureSetting:e.uint16,enableFlags:e.uint32,disableFlags:e.uint32}),es=new e.Struct({defaultFlags:e.uint32,chainLength:e.uint32,nFeatureEntries:e.uint32,nSubtables:e.uint32,features:new e.Array(ts,"nFeatureEntries"),subtables:new e.Array(As,"nSubtables")}),ns=new e.Struct({version:e.uint16,unused:new e.Reserved(e.uint16),nChains:e.uint32,chains:new e.Array(es,"nChains")}),is=new e.Struct({left:e.int16,top:e.int16,right:e.int16,bottom:e.int16}),rs=new e.Struct({version:e.fixed32,format:e.uint16,lookupTable:new Ci(is)}),ce={};ce.cmap=yA,ce.head=FA,ce.hhea=$,ce.hmtx=fA,ce.maxp=dA,ce.name=W,ce["OS/2"]=vA,ce.post=wA,ce.fpgm=et,ce.loca=st,ce.prep=TA,ce["cvt "]=GA,ce.glyf=at,ce["CFF "]=ne,ce.CFF2=ne,ce.VORG=bt,ce.EBLC=tn,ce.CBLC=ce.EBLC,ce.sbix=on,ce.COLR=sn,ce.CPAL=un,ce.BASE=K,ce.GDEF=Dt,ce.GPOS=Hi,ce.GSUB=Ji,ce.JSTF=Ki,ce.HVAR=Hr,ce.DSIG=lo,ce.gasp=go,ce.hdmx=uo,ce.kern=Eo,ce.LTSH=wo,ce.PCLT=Co,ce.VDMX=mo,ce.vhea=Io,ce.vmtx=Do,ce.avar=Fo,ce.bsln=No,ce.feat=Po,ce.fvar=Ro,ce.gvar=Ho,ce.just=Wo,ce.morx=ns,ce.opbd=rs;var On,as=new e.Struct({tag:new e.String(4),checkSum:e.uint32,offset:new e.Pointer(e.uint32,"void",{type:"global"}),length:e.uint32}),Wi=new e.Struct({tag:new e.String(4),numTables:e.uint16,searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16,tables:new e.Array(as,"numTables")});function wr(eA,G){for(var V=0,p=eA.length-1;V<=p;){var F=V+p>>1,L=G(eA[F]);if(L<0)p=F-1;else{if(!(L>0))return F;V=F+1}}return-1}function Di(eA,G){for(var V=[];eA>1;if(psA.endCode.get(kA))){var ct=sA.idRangeOffset.get(kA),_A=void 0;if(0===ct)_A=p+sA.idDelta.get(kA);else{var Bt=ct/2+(p-sA.startCode.get(kA))-(sA.segCount-kA);0!==(_A=sA.glyphIndexArray.get(Bt)||0)&&(_A+=sA.idDelta.get(kA))}return 65535&_A}aA=kA+1}}return 0;case 8:throw new Error("TODO: cmap format 8");case 6:case 10:return sA.glyphIndices.get(p-sA.firstCode)||0;case 12:case 13:for(var pt=0,yt=sA.nGroups-1;pt<=yt;){var Jt=pt+yt>>1,te=sA.groups.get(Jt);if(pte.endCharCode))return 12===sA.version?te.glyphID+(p-te.startCharCode):te.glyphID;pt=Jt+1}}return 0;case 14:throw new Error("TODO: cmap format 14");default:throw new Error("Unknown cmap format ".concat(sA.version))}},G.getVariationSelector=function(p,F){if(!this.uvs)return 0;var L=this.uvs.varSelectors.toArray(),tA=wr(L,function(sA){return F-sA.varSelector}),oA=L[tA];return-1!==tA&&oA.defaultUVS&&(tA=wr(oA.defaultUVS,function(sA){return psA.startUnicodeValue+sA.additionalCount?1:0})),-1!==tA&&oA.nonDefaultUVS&&-1!==(tA=wr(oA.nonDefaultUVS,function(sA){return p-sA.unicodeValue}))?oA.nonDefaultUVS[tA].glyphID:0},G.getCharacterSet=function(){var p=this.cmap;switch(p.version){case 0:return Di(0,p.codeMap.length);case 4:for(var F=[],L=p.endCode.toArray(),tA=0;tA=Ae.glyphID&&p<=Ae.glyphID+(Ae.endCharCode-Ae.startCharCode)&&yt.push(Ae.startCharCode+(p-Ae.glyphID))}return yt;case 13:for(var Qe,oe=[],fe=B(F.groups.toArray());!(Qe=fe()).done;){var de=Qe.value;p===de.glyphID&&oe.push.apply(oe,Di(de.startCharCode,de.endCharCode+1))}return oe;default:throw new Error("Unknown cmap format ".concat(F.version))}},eA}()).prototype,"getCharacterSet",[R],Object.getOwnPropertyDescriptor(On.prototype,"getCharacterSet"),On.prototype),Y(On.prototype,"codePointsForGlyph",[R],Object.getOwnPropertyDescriptor(On.prototype,"codePointsForGlyph"),On.prototype),On),os=function(){function eA(V){this.kern=V.kern}var G=eA.prototype;return G.process=function(p,F){for(var L=0;L=0&&(aA=NA.pairs[kA].value);break;case 2:var _A=0;F>=NA.rightTable.firstGlyph&&F=NA.leftTable.firstGlyph&&p=NA.glyphCount||F>=NA.glyphCount)return 0;aA=NA.kernValue[NA.kernIndex[NA.leftClass[p]*NA.rightClassCount+NA.rightClass[F]]];break;default:throw new Error("Unsupported kerning sub-table format ".concat(sA.format))}sA.coverage.override?L=aA:L+=aA}}return L},eA}(),ss=function(){function eA(V){this.font=V}var G=eA.prototype;return G.positionGlyphs=function(p,F){for(var L=0,tA=0,oA=0;oA1&&(sA.minX+=(oA.codePoints.length-1)*sA.width/oA.codePoints.length);for(var aA=-F[L].xAdvance,NA=0,kA=this.font.unitsPerEm/16,ct=L+1;ct<=tA;ct++){var _A=p[ct],Bt=_A.cbox,pt=F[ct],yt=this.getCombiningClass(_A.codePoints[0]);if("Not_Reordered"!==yt){switch(pt.xOffset=pt.yOffset=0,yt){case"Double_Above":case"Double_Below":pt.xOffset+=sA.minX-Bt.width/2-Bt.minX;break;case"Attached_Below_Left":case"Below_Left":case"Above_Left":pt.xOffset+=sA.minX-Bt.minX;break;case"Attached_Above_Right":case"Below_Right":case"Above_Right":pt.xOffset+=sA.maxX-Bt.width-Bt.minX;break;default:pt.xOffset+=sA.minX+(sA.width-Bt.width)/2-Bt.minX}switch(yt){case"Double_Below":case"Below_Left":case"Below":case"Below_Right":case"Attached_Below_Left":case"Attached_Below":("Attached_Below_Left"===yt||"Attached_Below"===yt)&&(sA.minY+=kA),pt.yOffset=-sA.minY-Bt.maxY,sA.minY+=Bt.height;break;case"Double_Above":case"Above_Left":case"Above":case"Above_Right":case"Attached_Above":case"Attached_Above_Right":("Attached_Above"===yt||"Attached_Above_Right"===yt)&&(sA.maxY+=kA),pt.yOffset=sA.maxY-Bt.minY,sA.maxY+=Bt.height}pt.xAdvance=pt.yAdvance=0,pt.xOffset+=aA,pt.yOffset+=NA}else aA-=pt.xAdvance,NA-=pt.yAdvance}},G.getCombiningClass=function(p){var F=w.getCombiningClass(p);if(3584==(-256&p))if("Not_Reordered"===F)switch(p){case 3633:case 3636:case 3637:case 3638:case 3639:case 3655:case 3660:case 3645:case 3662:return"Above_Right";case 3761:case 3764:case 3765:case 3766:case 3767:case 3771:case 3788:case 3789:return"Above";case 3772:return"Below"}else if(3642===p)return"Below_Right";switch(F){case"CCC10":case"CCC11":case"CCC12":case"CCC13":case"CCC14":case"CCC15":case"CCC16":case"CCC17":case"CCC18":case"CCC20":case"CCC22":case"CCC29":case"CCC32":case"CCC118":case"CCC129":case"CCC132":return"Below";case"CCC23":return"Attached_Above";case"CCC24":case"CCC107":return"Above_Right";case"CCC25":case"CCC19":return"Above_Left";case"CCC26":case"CCC27":case"CCC28":case"CCC30":case"CCC31":case"CCC33":case"CCC34":case"CCC35":case"CCC36":case"CCC122":case"CCC130":return"Above";case"CCC21":break;case"CCC103":return"Below_Right"}return F},eA}(),Li=function(){function eA(V,p,F,L){void 0===V&&(V=1/0),void 0===p&&(p=1/0),void 0===F&&(F=-1/0),void 0===L&&(L=-1/0),this.minX=V,this.minY=p,this.maxX=F,this.maxY=L}var G=eA.prototype;return G.addPoint=function(p,F){Math.abs(p)!==1/0&&(pthis.maxX&&(this.maxX=p)),Math.abs(F)!==1/0&&(Fthis.maxY&&(this.maxY=F))},G.copy=function(){return new eA(this.minX,this.minY,this.maxX,this.maxY)},l(eA,[{key:"width",get:function(){return this.maxX-this.minX}},{key:"height",get:function(){return this.maxY-this.minY}}]),eA}(),Ri={Caucasian_Albanian:"aghb",Arabic:"arab",Imperial_Aramaic:"armi",Armenian:"armn",Avestan:"avst",Balinese:"bali",Bamum:"bamu",Bassa_Vah:"bass",Batak:"batk",Bengali:["bng2","beng"],Bopomofo:"bopo",Brahmi:"brah",Braille:"brai",Buginese:"bugi",Buhid:"buhd",Chakma:"cakm",Canadian_Aboriginal:"cans",Carian:"cari",Cham:"cham",Cherokee:"cher",Coptic:"copt",Cypriot:"cprt",Cyrillic:"cyrl",Devanagari:["dev2","deva"],Deseret:"dsrt",Duployan:"dupl",Egyptian_Hieroglyphs:"egyp",Elbasan:"elba",Ethiopic:"ethi",Georgian:"geor",Glagolitic:"glag",Gothic:"goth",Grantha:"gran",Greek:"grek",Gujarati:["gjr2","gujr"],Gurmukhi:["gur2","guru"],Hangul:"hang",Han:"hani",Hanunoo:"hano",Hebrew:"hebr",Hiragana:"hira",Pahawh_Hmong:"hmng",Katakana_Or_Hiragana:"hrkt",Old_Italic:"ital",Javanese:"java",Kayah_Li:"kali",Katakana:"kana",Kharoshthi:"khar",Khmer:"khmr",Khojki:"khoj",Kannada:["knd2","knda"],Kaithi:"kthi",Tai_Tham:"lana",Lao:"lao ",Latin:"latn",Lepcha:"lepc",Limbu:"limb",Linear_A:"lina",Linear_B:"linb",Lisu:"lisu",Lycian:"lyci",Lydian:"lydi",Mahajani:"mahj",Mandaic:"mand",Manichaean:"mani",Mende_Kikakui:"mend",Meroitic_Cursive:"merc",Meroitic_Hieroglyphs:"mero",Malayalam:["mlm2","mlym"],Modi:"modi",Mongolian:"mong",Mro:"mroo",Meetei_Mayek:"mtei",Myanmar:["mym2","mymr"],Old_North_Arabian:"narb",Nabataean:"nbat",Nko:"nko ",Ogham:"ogam",Ol_Chiki:"olck",Old_Turkic:"orkh",Oriya:["ory2","orya"],Osmanya:"osma",Palmyrene:"palm",Pau_Cin_Hau:"pauc",Old_Permic:"perm",Phags_Pa:"phag",Inscriptional_Pahlavi:"phli",Psalter_Pahlavi:"phlp",Phoenician:"phnx",Miao:"plrd",Inscriptional_Parthian:"prti",Rejang:"rjng",Runic:"runr",Samaritan:"samr",Old_South_Arabian:"sarb",Saurashtra:"saur",Shavian:"shaw",Sharada:"shrd",Siddham:"sidd",Khudawadi:"sind",Sinhala:"sinh",Sora_Sompeng:"sora",Sundanese:"sund",Syloti_Nagri:"sylo",Syriac:"syrc",Tagbanwa:"tagb",Takri:"takr",Tai_Le:"tale",New_Tai_Lue:"talu",Tamil:["tml2","taml"],Tai_Viet:"tavt",Telugu:["tel2","telu"],Tifinagh:"tfng",Tagalog:"tglg",Thaana:"thaa",Thai:"thai",Tibetan:"tibt",Tirhuta:"tirh",Ugaritic:"ugar",Vai:"vai ",Warang_Citi:"wara",Old_Persian:"xpeo",Cuneiform:"xsux",Yi:"yi ",Inherited:"zinh",Common:"zyyy",Unknown:"zzzz"},Or={};for(var kr in Ri){var jr=Ri[kr];if(Array.isArray(jr))for(var wa,ls=B(jr);!(wa=ls()).done;)Or[wa.value]=kr;else Or[jr]=kr}var fs={arab:!0,hebr:!0,syrc:!0,thaa:!0,cprt:!0,khar:!0,phnx:!0,"nko ":!0,lydi:!0,avst:!0,armi:!0,phli:!0,prti:!0,sarb:!0,orkh:!0,samr:!0,mand:!0,merc:!0,mero:!0,mani:!0,mend:!0,nbat:!0,narb:!0,palm:!0,phlp:!0};function Ca(eA){return fs[eA]?"rtl":"ltr"}for(var Qa=function(){function eA(G,V,p,F,L){if(this.glyphs=G,this.positions=null,this.script=p,this.language=F||null,this.direction=L||Ca(p),this.features={},Array.isArray(V))for(var oA,tA=B(V);!(oA=tA()).done;)this.features[oA.value]=!0;else"object"==typeof V&&(this.features=V)}return l(eA,[{key:"advanceWidth",get:function(){for(var F,V=0,p=B(this.positions);!(F=p()).done;)V+=F.value.xAdvance;return V}},{key:"advanceHeight",get:function(){for(var F,V=0,p=B(this.positions);!(F=p()).done;)V+=F.value.yAdvance;return V}},{key:"bbox",get:function(){for(var V=new Li,p=0,F=0,L=0;L>1]).firstGlyph)return null;if(poA.lastGlyph))return 2===this.table.version?oA.value:oA.values[p-oA.firstGlyph];F=tA+1}}return null;case 6:for(var sA=0,aA=this.table.binarySearchHeader.nUnits-1;sA<=aA;){var tA,oA;if(65535===(oA=this.table.segments[tA=sA+aA>>1]).glyph)return null;if(poA.glyph))return oA.value;sA=tA+1}}return null;case 8:return this.table.values[p-this.table.firstGlyph];default:throw new Error("Unknown lookup table format: ".concat(this.table.version))}},G.glyphsForValue=function(p){var F=[];switch(this.table.version){case 2:case 4:for(var tA,L=B(this.table.segments);!(tA=L()).done;){var oA=tA.value;if(2===this.table.version&&oA.value===p)F.push.apply(F,Di(oA.firstGlyph,oA.lastGlyph+1));else for(var sA=0;sA=-1;){var aA=null,NA=1,kA=!0;oA===p.length||-1===oA?NA=0:65535===(aA=p[oA]).id?NA=2:null==(NA=this.lookupTable.lookup(aA.id))&&(NA=1);var ct=this.stateTable.stateArray.getItem(tA),Bt=this.stateTable.entryTable.getItem(ct[NA]);0!==NA&&2!==NA&&(L(aA,Bt,oA),kA=!(16384&Bt.flags)),tA=Bt.newState,kA&&(oA+=sA)}return p},G.traverse=function(p,F,L){if(void 0===F&&(F=0),void 0===L&&(L=new Set),!L.has(F)){L.add(F);for(var tA=this.stateTable,oA=tA.nClasses,aA=tA.entryTable,NA=tA.stateArray.getItem(F),kA=4;kA=0;)65535===p[yt].id&&p.splice(yt,1),yt--;return p},G.processSubtable=function(p,F){if(this.subtable=p,this.glyphs=F,4!==this.subtable.type){this.ligatureStack=[],this.markedGlyph=null,this.firstGlyph=null,this.lastGlyph=null,this.markedIndex=null;var L=this.getStateMachine(p),tA=this.getProcessor();return L.process(this.glyphs,!!(4194304&this.subtable.coverage),tA)}this.processNoncontextualSubstitutions(this.subtable,this.glyphs)},G.getStateMachine=function(p){return new ds(p.table.stateTable)},G.getProcessor=function(){switch(this.subtable.type){case 0:return this.processIndicRearragement;case 1:return this.processContextualSubstitution;case 2:return this.processLigature;case 4:return this.processNoncontextualSubstitutions;case 5:return this.processGlyphInsertion;default:throw new Error("Invalid morx subtable type: ".concat(this.subtable.type))}},G.processIndicRearragement=function(p,F,L){32768&F.flags&&(this.firstGlyph=L),8192&F.flags&&(this.lastGlyph=L),function Ns(eA,G,V,p){switch(G){case 0:return eA;case 1:return Pn(eA,[V,1],[p,0]);case 2:return Pn(eA,[V,0],[p,1]);case 3:return Pn(eA,[V,1],[p,1]);case 4:return Pn(eA,[V,2],[p,0]);case 5:return Pn(eA,[V,2],[p,0],!0,!1);case 6:return Pn(eA,[V,0],[p,2]);case 7:return Pn(eA,[V,0],[p,2],!1,!0);case 8:return Pn(eA,[V,1],[p,2]);case 9:return Pn(eA,[V,1],[p,2],!1,!0);case 10:return Pn(eA,[V,2],[p,1]);case 11:return Pn(eA,[V,2],[p,1],!0,!1);case 12:return Pn(eA,[V,2],[p,2]);case 13:return Pn(eA,[V,2],[p,2],!0,!1);case 14:return Pn(eA,[V,2],[p,2],!1,!0);case 15:return Pn(eA,[V,2],[p,2],!0,!0);default:throw new Error("Unknown verb: ".concat(G))}}(this.glyphs,15&F.flags,this.firstGlyph,this.lastGlyph)},G.processContextualSubstitution=function(p,F,L){var tA=this.subtable.table.substitutionTable.items;if(65535!==F.markIndex){var oA=tA.getItem(F.markIndex);(aA=new Mr(oA).lookup((p=this.glyphs[this.markedGlyph]).id))&&(this.glyphs[this.markedGlyph]=this.font.getGlyph(aA,p.codePoints))}if(65535!==F.currentIndex){var aA,NA=tA.getItem(F.currentIndex);(aA=new Mr(NA).lookup((p=this.glyphs[L]).id))&&(this.glyphs[L]=this.font.getGlyph(aA,p.codePoints))}32768&F.flags&&(this.markedGlyph=L)},G.processLigature=function(p,F,L){if(32768&F.flags&&this.ligatureStack.push(L),8192&F.flags){for(var tA,oA=this.subtable.table.ligatureActions,sA=this.subtable.table.components,aA=this.subtable.table.ligatureList,NA=F.action,kA=!1,ct=0,_A=[],Bt=[];!kA;){var pt,yt=this.ligatureStack.pop();(pt=_A).unshift.apply(pt,this.glyphs[yt].codePoints);var Jt=oA.getItem(NA++);kA=!!(2147483648&Jt);var te=!!(1073741824&Jt),Ae=(1073741823&Jt)<<2>>2;if(ct+=sA.getItem(Ae+=this.glyphs[yt].id),kA||te){var fe=aA.getItem(ct);this.glyphs[yt]=this.font.getGlyph(fe,_A),Bt.push(yt),ct=0,_A=[]}else this.glyphs[yt]=this.font.getGlyph(65535)}(tA=this.ligatureStack).push.apply(tA,Bt)}},G.processNoncontextualSubstitutions=function(p,F,L){var tA=new Mr(p.table.lookupTable);for(L=0;L>>5,!!(1024&F.flags)),65535!==F.currentInsertIndex&&this._insertGlyphs(L,F.currentInsertIndex,(992&F.flags)>>>5,!!(2048&F.flags))},G.getSupportedFeatures=function(){for(var L,p=[],F=B(this.morx.chains);!(L=F()).done;)for(var sA,oA=B(L.value.features);!(sA=oA()).done;){var aA=sA.value;p.push([aA.featureType,aA.featureSetting])}return p},G.generateInputs=function(p){return this.inputCache||this.generateInputCache(),this.inputCache[p]||[]},G.generateInputCache=function(){this.inputCache={};for(var F,p=B(this.morx.chains);!(F=p()).done;)for(var sA,L=F.value,tA=L.defaultFlags,oA=B(L.subtables);!(sA=oA()).done;){var aA=sA.value;aA.subFeatureFlags&tA&&this.generateInputsForSubtable(aA)}},G.generateInputsForSubtable=function(p){var F=this;if(2===p.type){if(4194304&p.coverage)throw new Error("Reverse subtable, not supported.");this.subtable=p,this.ligatureStack=[];var tA=this.getStateMachine(p),oA=this.getProcessor(),sA=[],aA=[];this.glyphs=[],tA.traverse({enter:function(kA,ct){var _A=F.glyphs;aA.push({glyphs:_A.slice(),ligatureStack:F.ligatureStack.slice()});var Bt=F.font.getGlyph(kA);sA.push(Bt),_A.push(sA[sA.length-1]),oA(_A[_A.length-1],ct,_A.length-1);for(var pt=0,yt=0,Jt=0;Jt<_A.length&&pt<=1;Jt++)65535!==_A[Jt].id&&(pt++,yt=_A[Jt].id);if(1===pt){var te=sA.map(function(oe){return oe.id}),Ae=F.inputCache[yt];Ae?Ae.push(te):F.inputCache[yt]=[te]}},exit:function(){var kA=aA.pop();F.glyphs=kA.glyphs,F.ligatureStack=kA.ligatureStack,sA.pop()}})}},eA}()).prototype,"getStateMachine",[R],Object.getOwnPropertyDescriptor(Xi.prototype,"getStateMachine"),Xi.prototype),Xi);function Pn(eA,G,V,p,F){void 0===p&&(p=!1),void 0===F&&(F=!1);var L=eA.splice(V[0]-(V[1]-1),V[1]);F&&L.reverse();var tA=eA.splice.apply(eA,[G[0],G[1]].concat(L));return p&&tA.reverse(),eA.splice.apply(eA,[V[0]-(G[1]-1),0].concat(tA)),eA}var Us=function(){function eA(V){this.font=V,this.morxProcessor=new Ss(V),this.fallbackPosition=!1}var G=eA.prototype;return G.substitute=function(p){"rtl"===p.direction&&p.glyphs.reverse(),this.morxProcessor.process(p.glyphs,function Es(eA){var G={};for(var V in eA){var p;(p=Cr[V])&&(null==G[p[0]]&&(G[p[0]]={}),G[p[0]][p[1]]=eA[V])}return G}(p.features))},G.getAvailableFeatures=function(p,F){return function ws(eA){var G={};if(Array.isArray(eA))for(var V=0;V0&&p.applyFeatures(sA,F,L)}},eA}(),bs=["rvrn"],Ls=["ccmp","locl","rlig","mark","mkmk"],Rs=["frac","numr","dnom"],zs=["calt","clig","liga","rclt","curs","kern"],Gs={ltr:["ltra","ltrm"],rtl:["rtla","rtlm"]},Qi=function(){function eA(){}return eA.plan=function(V,p,F){this.planPreprocessing(V),this.planFeatures(V),this.planPostprocessing(V,F),V.assignGlobalFeatures(p),this.assignFeatures(V,p)},eA.planPreprocessing=function(V){V.add({global:[].concat(bs,Gs[V.direction]),local:Rs})},eA.planFeatures=function(V){},eA.planPostprocessing=function(V,p){V.add([].concat(Ls,zs)),V.setFeatureOverrides(p)},eA.assignFeatures=function(V,p){for(var F=0;F0&&w.isDigit(p[tA-1].codePoints[0]);)p[tA-1].features.numr=!0,p[tA-1].features.frac=!0,tA--;for(;oAthis.index||this.index>=this.glyphs.length?null:this.glyphs[this.index]},G.next=function(){return this.move(1)},G.prev=function(){return this.move(-1)},G.peek=function(p){void 0===p&&(p=1);var F=this.index,L=this.increment(p);return this.index=F,L},G.peekIndex=function(p){void 0===p&&(p=1);var F=this.index;this.increment(p);var L=this.index;return this.index=F,L},G.increment=function(p){void 0===p&&(p=1);var F=p<0?-1:1;for(p=Math.abs(p);p--;)this.move(F);return this.glyphs[this.index]},l(eA,[{key:"cur",get:function(){return this.glyphs[this.index]||null}}]),eA}(),Ks=["DFLT","dflt","latn"],yr=function(){function eA(V,p){this.font=V,this.table=p,this.script=null,this.scriptTag=null,this.language=null,this.languageTag=null,this.features={},this.lookups={},this.variationsIndex=V._variationProcessor?this.findVariationsIndex(V._variationProcessor.normalizedCoords):-1,this.selectScript(),this.glyphs=[],this.positions=[],this.ligatureID=1,this.currentFeature=null}var G=eA.prototype;return G.findScript=function(p){if(null==this.table.scriptList)return null;Array.isArray(p)||(p=[p]);for(var L,F=B(p);!(L=F()).done;)for(var sA,tA=L.value,oA=B(this.table.scriptList);!(sA=oA()).done;){var aA=sA.value;if(aA.tag===tA)return aA}return null},G.selectScript=function(p,F,L){var oA,tA=!1;if(!this.script||p!==this.scriptTag){if((oA=this.findScript(p))||(oA=this.findScript(Ks)),!oA)return this.scriptTag;this.scriptTag=oA.tag,this.script=oA.script,this.language=null,this.languageTag=null,tA=!0}if((!L||L!==this.direction)&&(this.direction=L||Ca(p)),F&&F.length<4&&(F+=" ".repeat(4-F.length)),!F||F!==this.languageTag){this.language=null;for(var aA,sA=B(this.script.langSysRecords);!(aA=sA()).done;){var NA=aA.value;if(NA.tag===F){this.language=NA.langSys,this.languageTag=NA.tag;break}}this.language||(this.language=this.script.defaultLangSys,this.languageTag=null),tA=!0}if(tA&&(this.features={},this.language))for(var ct,kA=B(this.language.featureIndexes);!(ct=kA()).done;){var _A=ct.value,Bt=this.table.featureList[_A],pt=this.substituteFeatureForVariations(_A);this.features[Bt.tag]=pt||Bt.feature}return this.scriptTag},G.lookupsForFeatures=function(p,F){void 0===p&&(p=[]);for(var oA,L=[],tA=B(p);!(oA=tA()).done;){var sA=oA.value,aA=this.features[sA];if(aA)for(var kA,NA=B(aA.lookupListIndexes);!(kA=NA()).done;){var ct=kA.value;F&&-1!==F.indexOf(ct)||L.push({feature:sA,index:ct,lookup:this.table.lookupList.get(ct)})}}return L.sort(function(_A,Bt){return _A.index-Bt.index}),L},G.substituteFeatureForVariations=function(p){if(-1===this.variationsIndex)return null;for(var oA,tA=B(this.table.featureVariations.featureVariationRecords[this.variationsIndex].featureTableSubstitution.substitutions);!(oA=tA()).done;){var sA=oA.value;if(sA.featureIndex===p)return sA.alternateFeatureTable}return null},G.findVariationsIndex=function(p){var F=this.table.featureVariations;if(!F)return-1;for(var L=F.featureVariationRecords,tA=0;tA=0})},G.getClassID=function(p,F){switch(F.version){case 1:var L=p-F.startGlyph;if(L>=0&&L0&&this.codePoints.every(w.isMark),this.isBase=!this.isMark,this.isLigature=this.codePoints.length>1,this.markAttachmentType=0}}]),eA}(),va=function(eA){function G(){return eA.apply(this,arguments)||this}return h(G,eA),G.planFeatures=function(p){p.add(["ljmo","vjmo","tjmo"],!1)},G.assignFeatures=function(p,F){for(var L=0,tA=0;tAYi){var ct=_i(V,tA,p.features);ct.features.tjmo=!0,kA.push(ct)}return eA.splice.apply(eA,[G,1].concat(kA)),G+kA.length-1}function g0(eA,G,V){var sA,aA,NA,kA,p=eA[G],L=Sr(eA[G].codePoints[0]),tA=eA[G-1].codePoints[0],oA=Sr(tA);if(4===oA&&3===L)sA=tA,kA=p;else{2===L?(aA=eA[G-1],NA=p):(aA=eA[G-2],NA=eA[G-1],kA=p);var ct=aA.codePoints[0],_A=NA.codePoints[0];(function(G){return 4352<=G&&G<=4370})(ct)&&function(G){return 4449<=G&&G<=4469}(_A)&&(sA=zi+28*(21*(ct-4352)+(_A-4449)))}var Bt=kA&&kA.codePoints[0]||Yi;if(null!=sA&&(Bt===Yi||function(G){return 1<=G&&G<=4546}(Bt))){var pt=sA+(Bt-Yi);if(V.hasGlyphForCodePoint(pt)){var yt=2===oA?3:2;return eA.splice(G-yt+1,yt,_i(V,pt,p.features)),G-yt+1}}return aA&&(aA.features.ljmo=!0),NA&&(NA.features.vjmo=!0),kA&&(kA.features.tjmo=!0),4===oA?(Gi(eA,G-1,V),G+1):G}function u0(eA,G,V){var p=eA[G];if(0!==V.glyphForCodePoint(eA[G].codePoints[0]).advanceWidth){var tA=function B0(eA){switch(Sr(eA)){case 4:case 5:return 1;case 2:return 2;case 3:return 3}}(eA[G-1].codePoints[0]);return eA.splice(G,1),eA.splice(G-tA,0,p)}}function f0(eA,G,V){var p=eA[G],F=eA[G].codePoints[0];if(V.hasGlyphForCodePoint(9676)){var L=_i(V,9676,p.features),tA=0===V.glyphForCodePoint(F).advanceWidth?G:G+1;eA.splice(tA,0,L),G++}return G}var $i={categories:["O","IND","S","GB","B","FM","CGJ","VMAbv","VMPst","VAbv","VPst","CMBlw","VPre","VBlw","H","VMBlw","CMAbv","MBlw","CS","R","SUB","MPst","MPre","FAbv","FPst","FBlw","null","SMAbv","SMBlw","VMPre","ZWNJ","ZWJ","WJ","M","VS","N","HN","MAbv"],decompositions:{2507:[2503,2494],2508:[2503,2519],2888:[2887,2902],2891:[2887,2878],2892:[2887,2903],3018:[3014,3006],3019:[3015,3006],3020:[3014,3031],3144:[3142,3158],3264:[3263,3285],3271:[3270,3285],3272:[3270,3286],3274:[3270,3266],3275:[3270,3266,3285],3402:[3398,3390],3403:[3399,3390],3404:[3398,3415],3546:[3545,3530],3548:[3545,3535],3549:[3545,3535,3530],3550:[3545,3551],3635:[3661,3634],3763:[3789,3762],3955:[3953,3954],3957:[3953,3956],3958:[4018,3968],3959:[4018,3953,3968],3960:[4019,3968],3961:[4019,3953,3968],3969:[3953,3968],6971:[6970,6965],6973:[6972,6965],6976:[6974,6965],6977:[6975,6965],6979:[6978,6965],69934:[69937,69927],69935:[69938,69927],70475:[70471,70462],70476:[70471,70487],70843:[70841,70842],70844:[70841,70832],70846:[70841,70845],71098:[71096,71087],71099:[71097,71087]},stateTable:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],accepting:[!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],tags:[[],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["symbol_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["virama_terminated_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["number_joiner_terminated_cluster"],["standard_cluster"],["standard_cluster"],["numeral_cluster"]]},ve_X=1,ve_N=8,ve_H=16,ve_ZWNJ=32,ve_ZWJ=64,ve_M=128,ve_RS=8192,ve_Repha=32768,ve_Ra=65536,ve_CM=1<<17,ie={Start:1,Ra_To_Become_Reph:2,Pre_M:4,Pre_C:8,Base_C:16,After_Main:32,Above_C:64,Before_Sub:128,Below_C:256,After_Sub:512,Before_Post:1024,Post_C:2048,After_Post:4096,Final_C:8192,SMVD:16384,End:32768},I0=2|ve_Ra|ve_CM|4|2048|4096,Fa=ve_ZWJ|ve_ZWNJ,Ar=ve_H|16384,Ya={Default:{hasOldSpec:!1,virama:0,basePos:"Last",rephPos:ie.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Devanagari:{hasOldSpec:!0,virama:2381,basePos:"Last",rephPos:ie.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Bengali:{hasOldSpec:!0,virama:2509,basePos:"Last",rephPos:ie.After_Sub,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Gurmukhi:{hasOldSpec:!0,virama:2637,basePos:"Last",rephPos:ie.Before_Sub,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Gujarati:{hasOldSpec:!0,virama:2765,basePos:"Last",rephPos:ie.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Oriya:{hasOldSpec:!0,virama:2893,basePos:"Last",rephPos:ie.After_Main,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Tamil:{hasOldSpec:!0,virama:3021,basePos:"Last",rephPos:ie.After_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Telugu:{hasOldSpec:!0,virama:3149,basePos:"Last",rephPos:ie.After_Post,rephMode:"Explicit",blwfMode:"Post_Only"},Kannada:{hasOldSpec:!0,virama:3277,basePos:"Last",rephPos:ie.After_Post,rephMode:"Implicit",blwfMode:"Post_Only"},Malayalam:{hasOldSpec:!0,virama:3405,basePos:"Last",rephPos:ie.After_Main,rephMode:"Log_Repha",blwfMode:"Pre_And_Post"},Khmer:{hasOldSpec:!1,virama:6098,basePos:"First",rephPos:ie.Ra_To_Become_Reph,rephMode:"Vis_Repha",blwfMode:"Pre_And_Post"}},v0={6078:[6081,6078],6079:[6081,6079],6080:[6081,6080],6084:[6081,6084],6085:[6081,6085]},D0=$i.decompositions,Ta=new Q(c("AAARAAAAAABg2AAAAWYPmfDtnXuMXFUdx+/uzs7M7szudAtECGJRIMRQbUAithQWkGAKiVhNpFVRRAmIQVCDkDYICGotIA9BTCz8IeUviv7BQ2PBtBIRLBBQIWAUsKg1BKxRAqIgfs/cc+aeOXPej3tnZX7JJ/dxzj3nd36/8753Z5fUsuxgsAwcAU4Gp4BPgM+Cd4P3RjieDs4GXwLrHJ5bDy4DG8A14LvgZrAZbAF3gns0z18ALgY/B78C94NHwBPgabAE/AX8DbwM5sF/QX0yD5vFcU/wVnAgWAoOAyvAceBE8CGwBpwGzgJfAF8BXwXfAFeC68EmsBlsAXeCreA+8CB4DDwF/gh2gd3gFfAGmKxn2QzYC+wHDgRLweFgJTgWrKrnuq/GcQ04jV6fheN54EJwEbgcXAG+Q8O/j+Mt4DZwB9haz8t9Hz3a8iCN/xiOvwRP0evH6fE68AzOH+Ke2eWYhw3PcGnuxvkr4A3QaGRZB7wFLAEHg2XgiEZ/fHKcp/ceBh/A+cngFPCpRm6vM3E8l8a5gN67GMdvgqsbeX2ap9yI601gM7gN3AG20mfuo8cdOP6GpvdUg9oKxz839GV90RDO2/glxN1B790NXsN1rZll7WYRdw+c70uvTwIHNAfTO0RyL5TDmnnbc3lmRQI9UnM0dD5eovfz4FpJ/BNpXNYWV+N6Lfg0hY97JK1vn+Pur9DoQur2F7m436bHDUK8C5t5/8vruo4+97WmXG+GLmzEiBF+PDwEOowYMWLEiBEjRoxYeBw5BDqIPEfXut9yWN+vVNxfrnnmWqR/PdgENoMt4E5wD9gOHgCPgifBs2BXM99b2o3jP8F/wMRUlrXAHNgHvH0q3895J46HguXgWHAGLctmLv9VuL96qnp7jxgxYsSbCbJvuRZ97/tqxT59VVRtixEjRsThBG7OSt5zzoPT0M+cBc4T5noXOs79TqLHeZrHUeCSqeJ96gacXy2kecNU8V6Hh7yXuQlhtw7B/PO1RTkr52Aj8JNFZjYg3gOKuC/g/v6Ls2wNuAY8urg//PcIb+6RZXuDNeCS6SzbBrJWlh0DLiFHco8ed9IjzzvaWfa9sZzTcf6D9mCcnbg3PlNcH4fzS8F2MDaLdQG4dLZIJxbbaZqv4ri8k58f3+mPs66T6/TTzqDeI0aMGDGiHP5dcR8ce/xxYcWi6vOfr725uRzcjnngXVOD61Hync+9uL+Nmyfej/NHpvL56A5Jeuz7uyfo+pqcPz2Vf1NH0ttJ03pekt8SmuY/EPYy9zzbN319ym/9TL6ZIt9MHCXRdxJtoAkWTRdz472n87D9cTwYLJvuz++I6WIePo/zE8AHp4v8WLyP0nufnM6/+zoDx8+DL08P6r9+urheRtO+jD6/cdrsx3mqu8w+xH4PScKIXa5D2jeCm8Et4DbwI/BjcC/4BXgI/Bb8DuwEu8Bu8Ap4A9RaRZptnO8J9gUHgEPAoWA5OLY1qMO90GEV7q+mYWtxPBWcIYnL4p+DsPNbxfVFOP86uAr8DNc34HgTDb8Vx9sVaRFI/LtagzYjnCqpb908EX87eBA8Bh4Hf2jle/9/wvGFVv787rrZZy8h7qtgDOuFOmiBuXYRvg/O9wMHgXeB97SLspk4sq0OI/q9v13+ek+sh3zYSRp9jrYorw9ll1/GRzR+KotYZSHf8laVP2lvpA/8OGdPMk59hqtXZ+L8nHbxvWwqO65ryu+fT3VZz+l4dET7L0R072ljsMyzTpaJqQxsbL8M9WajY789DO85XMp/Dcp3Qztdn+9qf/a97ZWK8PXc3G+TpC/nv8Mncy7ZvICF302P5O+aNiOtLdTXd+D4Q7DVwfcvWvx9zTEJ/o5iG3R8YAjGNFseha5PGuZKz7b7xxXbOrXMcu5eJSo//rXdH/73Enz6L1q/X+fyIu8wZGtNBmkjkzNZNgP2AvuBg2bysKUzduXn/66JtNeN4PCZvO0/x7Ujdn4VnYOvRJzjZ/I+9sQZeftX2Tc1RPcPz/Tf4/si0g+t5Mq+kfZjZL34Mc5ul3PPnE7TOxvHK2qDaZ+L++db2HyYqMo/qVnb/P8uH8/rmnFxR0k6DCu/rjj/RxT7KGUSWgbd+LMQuEgYB1zsk2qtvJD8v5AhdfdttbEunSxbcJD9Zf7chqp1Hlbe7FK1/aPVTfp7FgtC1yGGiSncFK/DhZvi+epZta0WWjlsfDZMyPRdSPrryqSSKnXx1bkq/Ye9TlRpk7Lrjq1UrfdC9X+MtKqwP6+3a/4pJFUZF0pZZpv91MYjMBaRRXbxpho5zQmUY3F+Pt4o7rvQrBXPdm00TaE24uMadaM2meLSI7iu071t3er3b6ZLi8JEde3qw+6zGv+ycF5kaRBh/m1T/7Yl/mMyTuMwadP4xL9ifjJpNwbvDZRJ8G8vnqV/Wf12aa/kyOdl69+BspTsXzGueE6E+JfZnvmXIfNPW+FfXkjb1YmqPNpnLP3b61fHCj/X5tzGANf2y3yqvC7Jv7btV4TVbdammI9l/g0dS5lNxLrk2j9r8xjjxhBQnygg0lgg/bOrfyct+udJi/Yrk0lFnxC7f+5kRbsNmcexfrubt0X/rGvLqrGSnYv3ZPHEe8r7lvMvUfi2LOu/2dg8LrRtQt2yfcv8r5IU70VkIs6nbebUXf0M/o7Znl39Sdoz+X1oEb5N8ffF67qhPfPP6eoUbxf+GRf/6sRnvaSdmw+Bf1VxmbD+2sa//DU7t/Gv2PfKpKdrBP92Ojk+IvqX16ks/2qxbL8EZnc2HqsgYuqPuzZV+I3RbujbDm+T0PmWCVO/5jqftp1zy+wSA6s0JWtp2z5e1oZV+yMsjB3ZXolsv0Ulrv01v3/iKrF94Qtbt9siCnmeb6fjjf59KnLk1xaEbvtvFnFirGvEOqmycQrbm/IMsXd3P28uh4nM3swXRER717OiX8kc7K2qqyn2p3maFGU/aruP5VCv+PraoTYU8yUmmbDwcYo6pusnM486xdoga4dkPCb1pK7Sfc6ebvkd4qeAtQcd/N63bB3lU3dlUnUf38VyvqCqK7JxlNSd7lydrDlm+/uqHiRvl30Nrp/n9zpkZRjoJ3V1diyP05rIYXHYs+w+D5+WMS8b5gZtKcuX0KT5d/WwtB97VnyvY6rjMukI56HI0rFJPwt8PjT/1OXzSbcMeEmdh294qvKK4rNu7j4n3LNZg8TKXwafv025U+XvKjHsT8Q7/7LGaJt9lAh7Asz3uv0XEX6t0duDoWN/93wmh92XpUHmCKb9GALbG+rZP3AfNbQPKKv/jpF/bP0JXfuW1QYk7dhljcyvk5mw+933Hpo1g26PQ2ZP6zVmTJt47P25jncD9vPwGS+q9QS/V6RaY8j8K8LmvUr9HfYCpH5OWL9lZY+Sv6pesHCJHbtrf9k6etZvf0G1L0ja4cAe1UT/s3zdCe3/Q5/n372wMc97/E1Qh0Tbmfwh3m/V9On72tNnrCF1sJkVe1EyXMdBa7+lHMsk44zMF6St9e2djNnbm8ybpHkq+gbbemMaH0UZmD8obKGrk7r+nt+3bE7o83YZp/vqOKdv6PzJNN6mTJsI/51XR7i2ZrGA5B6zFwnjzxmqPjaGfW3tZNrz1eljq29mOOqeCfF/irRt87PNw0uXSVAvrmOMNT569MptsYaV0sic/wbY13e8hPrb9K2ySUJ0j6G/Lu0U4qpTrR23jMp6m5hU+YTaWCeh9aIsm/rqUHV4bFv42kgnZdfH1PUj1D7DVH9d8khRN1zFRl/+/TW//qxL1uH83+mk3H+SvRtS2TDU90nX2TpM6/1xzZpZtoYdK763dqlz0f6uNeFehcs+H/nbGP77MpX06n/ofpzP+tVmTUvRtVuX/cjS67OE5kRBrxyJ+w/dPo7r+9cO1160e3gqu0S2uW7PjN/L6ns/UfMf10Lai87frJ+3KndAfc8yTf1M3T4s6qm4/yh7/2GSkG8UMw//DvRLgbYZSEOxr0LCWvRdjfh9XGzfqN4NivfZd7rsmFp08zmbssrKJEuTfVMZopdpbuwSrhNv3/N2s+0PDG3KNB6RMrFvJHv6B85HXObAoWsd3zm3i+6uZYytv+5+pohbpo6+tpZJFfmGlrcMf4c8b1Pe2OUIsaXJrinCTfaxtZOt+NYnU3hIfQlN20Z/1+dt7JaqLsbIzycNWZmrlNg2Dc2/LJ1T+T6WrrYSml4Ku7ik7yIx2opJD51vU9UfVRmrqL8u/olZj0PyCLV5irxcdKoi/6rKb8qTrHsnhW9jyZH/nSpeWDzxd9769uQ016lgUuf2pAfKPhu2FpfZL2Yb9snLNl/fNIepXaUsj4vNXCXUZ75px8ojNP8UPvAta2g6fb+F1ckZuneshv1vGXXDeyRRrN/bBPS1Jul+l+7zW86R7Wv63WXyDpt/RxraRjvC+TC3O61/Sqj/prag8x372yQivn+XwudrI2X2E2KdtJEov52e0L+uv4FO3p/rvssgsL8F4d/z9PzlWS94m8fqS3361Fi+6qaVYHwi9Yz4iH2fobIj+45cpz/TUaarr/4+z+vaWtVtyAX2d1LG8W9C3f+F1mnf36/k4w3YPrLv+XBVXCJs3cr+n4MKJuLv/fN9GhNdXVP5pJMN9vFi3rpv3/r8Ywg3SYp66zNOsO8QGcxPpnmRS/1mvmJjju3v7absI2xspQrvs1dNbjOj/wP7h1RlZyKGy8occ408UL8En4v6xfC/K3z52XzJd62T8vuZGGsxo/6O46ntmNqqFb/jps2/hHV4rPKH0svT4pstU7t2tZ9u/ZdqbJL1MwP6O86Fyt4jYaIrGz9mjEt8lFL4PtVE6votG2P6fpdf/GZRse7s3bf4BtSl/DIbKMctx++Z+8o6K6z9FPOwKsRmXiaNl7C+6NYRpjlbqG1j72f49qsuY4brd/amb4ZVc8TQ+sSH985LrEe8iPWJnfPrJRbWbb+dwn4x6o+r/aS2S7w3qWt//LnYz2ntE0vH1uDcyKatx1rH+EiMPEN1SZG/iz6+9o01Rob6O7Q+xLZ1jHobK61U+pWVvo2EpuWqzzD6Poa+pvhli0wn8Zq/72Mzm2d90o5VN1x9ZKuzbTgvqWwUIin8FSpl1CXXvFRxU0iozVPYJDRtF3uFphn6XAyJUUdD7SjTJ8v6n9fVbVObkKWp001lc9VRlqdOf5v0ZM+bymdbfp1NfG0bq27Y5JMyfxeJkU6o/inKH8O2Zfgidb6h/g3VJ7QcVbWL0Pxt6rlrPqa4KfQ25a2zl4/E8GdM/4fK/wA=","base64")),y0=new m({stateTable:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],accepting:[!1,!0,!0,!0,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!1,!1,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!1,!0,!0,!1,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0],tags:[[],["broken_cluster"],["consonant_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],[],["broken_cluster"],["symbol_cluster"],[],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["symbol_cluster"],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],[],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],[],[],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],["consonant_syllable"],["vowel_syllable"],["standalone_cluster"]]}),wn=function(eA){function G(){return eA.apply(this,arguments)||this}return h(G,eA),G.planFeatures=function(p){p.addStage(x0),p.addStage(["locl","ccmp"]),p.addStage(Ua),p.addStage("nukt"),p.addStage("akhn"),p.addStage("rphf",!1),p.addStage("rkrf"),p.addStage("pref",!1),p.addStage("blwf",!1),p.addStage("abvf",!1),p.addStage("half",!1),p.addStage("pstf",!1),p.addStage("vatu"),p.addStage("cjct"),p.addStage("cfar",!1),p.addStage(Pa),p.addStage({local:["init"],global:["pres","abvs","blws","psts","haln","dist","abvm","blwm","calt","clig"]}),p.unicodeScript=function gs(eA){return Or[eA]}(p.script),p.indicConfig=Ya[p.unicodeScript]||Ya.Default,p.isOldSpec=p.indicConfig.hasOldSpec&&"2"!==p.script[p.script.length-1]},G.assignFeatures=function(p,F){for(var L=function(sA){var aA=F[sA].codePoints[0],NA=v0[aA]||D0[aA];if(NA){var kA=NA.map(function(ct){var _A=p.font.glyphForCodePoint(ct);return new Bi(p.font,_A.id,[ct],F[sA].features)});F.splice.apply(F,[sA,1].concat(kA))}},tA=F.length-1;tA>=0;tA--)L(tA)},G}(Qi);function Aa(eA){return Ta.get(eA.codePoints[0])>>8}function Sa(eA){return 1<<(255&Ta.get(eA.codePoints[0]))}N(wn,"zeroMarkWidths","NONE");var Nr=function(G,V,p,F){this.category=G,this.position=V,this.syllableType=p,this.syllable=F};function x0(eA,G){for(var L,V=0,p=0,F=B(y0.match(G.map(Aa)));!(L=F()).done;){var tA=L.value,oA=tA[0],sA=tA[1],aA=tA[2];if(oA>p){++V;for(var NA=p;NAJt);break;case"First":for(var de=(yt=aA)+1;deZe&&!(Ti(G[ke])||gn&&G[ke].shaperInfo.category===ve_H);ke--);if(G[ke].shaperInfo.category!==ve_H&&ke>Ze){var we=G[Ze];G.splice.apply(G,[Ze,0].concat(G.splice(Ze+1,ke-Ze))),G[ke]=we}break}for(var An=ie.Start,Pe=aA;PeaA;en--)if(G[en-1].shaperInfo.position!==ie.Pre_M){Te.position=G[en-1].shaperInfo.position;break}}else Te.position!==ie.SMVD&&(An=Te.position)}for(var Rn=yt,fn=yt+1;fnaA&&!Ti(G[zn]))}}}}function Pa(eA,G,V){for(var p=V.indicConfig,F=eA._layoutEngine.engine.GSUBProcessor.features,L=0,tA=Ur(G,0);L=ie.Base_C){if(oA&&sA+1ie.Base_C&&sA--;break}if(sA===tA&&LL&&!(G[kA].shaperInfo.category&(ve_M|Ar));)kA--;oi(G[kA])&&G[kA].shaperInfo.position!==ie.Pre_M?kA+1L;ct--)if(G[ct-1].shaperInfo.position===ie.Pre_M){var _A=ct-1;_AL&&G[pt].shaperInfo.position===ie.SMVD;)pt--;if(oi(G[pt]))for(var te=sA+1;teL&&!(G[fe-1].shaperInfo.category&(ve_M|Ar));)fe--;if(fe>L&&G[fe-1].shaperInfo.category===ve_M)for(var Qe=oe,de=sA+1;deL&&oi(G[fe-1])&&fe=eA.length)return G;for(var V=eA[G].shaperInfo.syllable;++G=0;tA--)L(tA)},G}(Qi);function La(eA){return Y0.get(eA.codePoints[0])}N(Me,"zeroMarkWidths","BEFORE_GPOS");var S0=function(G,V,p){this.category=G,this.syllableType=V,this.syllable=p};function N0(eA,G){for(var F,V=0,p=B(T0.match(G.map(La)));!(F=p()).done;){var L=F.value,tA=L[0],oA=L[1],sA=L[2];++V;for(var aA=tA;aA<=oA;aA++)G[aA].shaperInfo=new S0(F0[La(G[aA])],sA[0],V);for(var NA="R"===G[tA].shaperInfo.category?1:Math.min(3,oA-tA),kA=tA;kA1)for(L=p+1;L=eA.length)return G;for(var V=eA[G].shaperInfo.syllable;++G=0;kn--)this.glyphs.splice(fe[kn],1);return this.glyphs[this.glyphIterator.index]=ge,!0}}return!1;case 5:return this.applyContext(L);case 6:return this.applyChainingContext(L);case 7:return this.applyLookup(L.lookupType,L.extension);default:throw new Error("GSUB lookupType ".concat(F," is not supported"))}},G}(yr),Ha=function(eA){function G(){return eA.apply(this,arguments)||this}h(G,eA);var V=G.prototype;return V.applyPositionValue=function(F,L){var tA=this.positions[this.glyphIterator.peekIndex(F)];null!=L.xAdvance&&(tA.xAdvance+=L.xAdvance),null!=L.yAdvance&&(tA.yAdvance+=L.yAdvance),null!=L.xPlacement&&(tA.xOffset+=L.xPlacement),null!=L.yPlacement&&(tA.yOffset+=L.yPlacement);var oA=this.font._variationProcessor,sA=this.font.GDEF&&this.font.GDEF.itemVariationStore;oA&&sA&&(L.xPlaDevice&&(tA.xOffset+=oA.getDelta(sA,L.xPlaDevice.a,L.xPlaDevice.b)),L.yPlaDevice&&(tA.yOffset+=oA.getDelta(sA,L.yPlaDevice.a,L.yPlaDevice.b)),L.xAdvDevice&&(tA.xAdvance+=oA.getDelta(sA,L.xAdvDevice.a,L.xAdvDevice.b)),L.yAdvDevice&&(tA.yAdvance+=oA.getDelta(sA,L.yAdvDevice.a,L.yAdvDevice.b)))},V.applyLookup=function(F,L){switch(F){case 1:var tA=this.coverageIndex(L.coverage);if(-1===tA)return!1;switch(L.version){case 1:this.applyPositionValue(0,L.value);break;case 2:this.applyPositionValue(0,L.values.get(tA))}return!0;case 2:var oA=this.glyphIterator.peek();if(!oA)return!1;var sA=this.coverageIndex(L.coverage);if(-1===sA)return!1;switch(L.version){case 1:for(var kA,NA=B(L.pairSets.get(sA));!(kA=NA()).done;){var ct=kA.value;if(ct.secondGlyph===oA.id)return this.applyPositionValue(0,ct.value1),this.applyPositionValue(1,ct.value2),!0}return!1;case 2:var _A=this.getClassID(this.glyphIterator.cur.id,L.classDef1),Bt=this.getClassID(oA.id,L.classDef2);if(-1===_A||-1===Bt)return!1;var pt=L.classRecords.get(_A).get(Bt);return this.applyPositionValue(0,pt.value1),this.applyPositionValue(1,pt.value2),!0}case 3:var yt=this.glyphIterator.peekIndex(),Jt=this.glyphs[yt];if(!Jt)return!1;var te=L.entryExitRecords[this.coverageIndex(L.coverage)];if(!te||!te.exitAnchor)return!1;var Ae=L.entryExitRecords[this.coverageIndex(L.coverage,Jt.id)];if(!Ae||!Ae.entryAnchor)return!1;var oe=this.getAnchor(Ae.entryAnchor),fe=this.getAnchor(te.exitAnchor),Qe=this.positions[this.glyphIterator.index],de=this.positions[yt];switch(this.direction){case"ltr":Qe.xAdvance=fe.x+Qe.xOffset;var Je=oe.x+de.xOffset;de.xAdvance-=Je,de.xOffset-=Je;break;case"rtl":Qe.xAdvance-=Je=fe.x+Qe.xOffset,Qe.xOffset-=Je,de.xAdvance=oe.x+de.xOffset}return this.glyphIterator.flags.rightToLeft?(this.glyphIterator.cur.cursiveAttachment=yt,Qe.yOffset=oe.y-fe.y):(Jt.cursiveAttachment=this.glyphIterator.index,Qe.yOffset=fe.y-oe.y),!0;case 4:var cn=this.coverageIndex(L.markCoverage);if(-1===cn)return!1;for(var Oe=this.glyphIterator.index;--Oe>=0&&(this.glyphs[Oe].isMark||this.glyphs[Oe].ligatureComponent>0););if(Oe<0)return!1;var ge=this.coverageIndex(L.baseCoverage,this.glyphs[Oe].id);if(-1===ge)return!1;var gn=L.markArray[cn];return this.applyAnchor(gn,L.baseArray[ge][gn.class],Oe),!0;case 5:var ke=this.coverageIndex(L.markCoverage);if(-1===ke)return!1;for(var we=this.glyphIterator.index;--we>=0&&this.glyphs[we].isMark;);if(we<0)return!1;var An=this.coverageIndex(L.ligatureCoverage,this.glyphs[we].id);if(-1===An)return!1;var Pe=L.ligatureArray[An],Te=this.glyphIterator.cur,en=this.glyphs[we],Rn=en.ligatureID&&en.ligatureID===Te.ligatureID&&Te.ligatureComponent>0?Math.min(Te.ligatureComponent,en.codePoints.length)-1:en.codePoints.length-1,fn=L.markArray[ke];return this.applyAnchor(fn,Pe[Rn][fn.class],we),!0;case 6:var kn=this.coverageIndex(L.mark1Coverage);if(-1===kn)return!1;var jn=this.glyphIterator.peekIndex(-1),Dn=this.glyphs[jn];if(!Dn||!Dn.isMark)return!1;var Mn=this.glyphIterator.cur,Vn=!1;if(Mn.ligatureID===Dn.ligatureID?Mn.ligatureID?Mn.ligatureComponent===Dn.ligatureComponent&&(Vn=!0):Vn=!0:(Mn.ligatureID&&!Mn.ligatureComponent||Dn.ligatureID&&!Dn.ligatureComponent)&&(Vn=!0),!Vn)return!1;var Wn=this.coverageIndex(L.mark2Coverage,Dn.id);if(-1===Wn)return!1;var me=L.mark1Array[kn];return this.applyAnchor(me,L.mark2Array[Wn][me.class],jn),!0;case 7:return this.applyContext(L);case 8:return this.applyChainingContext(L);case 9:return this.applyLookup(L.lookupType,L.extension);default:throw new Error("Unsupported GPOS table: ".concat(F))}},V.applyAnchor=function(F,L,tA){var oA=this.getAnchor(L),sA=this.getAnchor(F.markAnchor),NA=this.positions[this.glyphIterator.index];NA.xOffset=oA.x-sA.x,NA.yOffset=oA.y-sA.y,this.glyphIterator.cur.markAttachment=tA},V.getAnchor=function(F){var L=F.xCoordinate,tA=F.yCoordinate,oA=this.font._variationProcessor,sA=this.font.GDEF&&this.font.GDEF.itemVariationStore;return oA&&sA&&(F.xDeviceTable&&(L+=oA.getDelta(sA,F.xDeviceTable.a,F.xDeviceTable.b)),F.yDeviceTable&&(tA+=oA.getDelta(sA,F.yDeviceTable.a,F.yDeviceTable.b))),{x:L,y:tA}},V.applyFeatures=function(F,L,tA){eA.prototype.applyFeatures.call(this,F,L,tA);for(var oA=0;oA>16;if(0===F)switch(p>>8){case 0:return 173===p;case 3:return 847===p;case 6:return 1564===p;case 23:return 6068<=p&&p<=6069;case 24:return 6155<=p&&p<=6158;case 32:return 8203<=p&&p<=8207||8234<=p&&p<=8238||8288<=p&&p<=8303;case 254:return 65024<=p&&p<=65039||65279===p;case 255:return 65520<=p&&p<=65528;default:return!1}else switch(F){case 1:return 113824<=p&&p<=113827||119155<=p&&p<=119162;case 14:return 917504<=p&&p<=921599;default:return!1}},G.getAvailableFeatures=function(p,F){var L=[];return this.engine&&L.push.apply(L,this.engine.getAvailableFeatures(p,F)),this.font.kern&&-1===L.indexOf("kern")&&L.push("kern"),L},G.stringsForGlyph=function(p){for(var oA,F=new Set,tA=B(this.font._cmapProcessor.codePointsForGlyph(p));!(oA=tA()).done;)F.add(String.fromCodePoint(oA.value));if(this.engine&&this.engine.stringsForGlyph)for(var NA,aA=B(this.engine.stringsForGlyph(p));!(NA=aA()).done;)F.add(NA.value);return Array.from(F)},eA}(),J0={moveTo:"M",lineTo:"L",quadraticCurveTo:"Q",bezierCurveTo:"C",closePath:"Z"},br=function(){function eA(){this.commands=[],this._bbox=null,this._cbox=null}var G=eA.prototype;return G.toFunction=function(){var p=this;return function(F){p.commands.forEach(function(L){return F[L.command].apply(F,L.args)})}},G.toSVG=function(){return this.commands.map(function(F){var L=F.args.map(function(tA){return Math.round(100*tA)/100});return"".concat(J0[F.command]).concat(L.join(" "))}).join("")},G.mapPoints=function(p){for(var tA,F=new eA,L=B(this.commands);!(tA=L()).done;){for(var oA=tA.value,sA=[],aA=0;aA0&&this.codePoints.every(w.isMark),this.isLigature=this.codePoints.length>1}var G=eA.prototype;return G._getPath=function(){return new br},G._getCBox=function(){return this.path.cbox},G._getBBox=function(){return this.path.bbox},G._getTableMetrics=function(p){if(this.id0)sA=Math.abs(NA.typoAscender-NA.typoDescender),aA=NA.typoAscender-p.maxY;else{var kA=this._font.hhea;sA=Math.abs(kA.ascent-kA.descent),aA=kA.ascent-p.maxY}return this._font._variationProcessor&&this._font.HVAR&&(L+=this._font._variationProcessor.getAdvanceAdjustment(this.id,this._font.HVAR)),this._metrics={advanceWidth:L,advanceHeight:sA,leftBearing:tA,topBearing:aA}},G.getScaledPath=function(p){return this.path.scale(1/this._font.unitsPerEm*p)},G._getName=function(){var p=this._font.post;if(!p)return null;switch(p.version){case 1:return tr[this.id];case 2:var F=p.glyphNameIndex[this.id];return F0?this._decodeSimple(sA,tA):sA.numberOfContours<0&&this._decodeComposite(sA,tA,oA),sA},V._decodeSimple=function(F,L){F.points=[];var tA=new e.Array(e.uint16,F.numberOfContours).decode(L);F.instructions=new e.Array(e.uint8,e.uint16).decode(L);for(var oA=[],sA=tA[tA.length-1]+1;oA.length=0,0,0);F.points.push(_A)}var Bt=0;for(ct=0;ct>1,aA.length=0}function gn(ke,we){Jt&&sA.closePath(),sA.moveTo(ke,we),Jt=!0}return function ke(){for(;L.pos1&&Oe(),Bt+=aA.shift(),gn(_A,Bt);break;case 5:for(;aA.length>=2;)_A+=aA.shift(),Bt+=aA.shift(),sA.lineTo(_A,Bt);break;case 6:case 7:for(var An=6===we;aA.length>=1;)An?_A+=aA.shift():Bt+=aA.shift(),sA.lineTo(_A,Bt),An=!An;break;case 8:for(;aA.length>0;){var me=_A+aA.shift(),be=Bt+aA.shift(),Se=me+aA.shift(),Xe=be+aA.shift();_A=Se+aA.shift(),Bt=Xe+aA.shift(),sA.bezierCurveTo(me,be,Se,Xe,_A,Bt)}break;case 10:var Pe=aA.pop()+Qe,Te=fe[Pe];if(Te){yt[Pe]=!0;var en=L.pos,Rn=oA;L.pos=Te.offset,oA=Te.offset+Te.length,ke(),L.pos=en,oA=Rn}break;case 11:if(F.version>=2)break;return;case 14:if(F.version>=2)break;aA.length>0&&Oe(),Jt&&(sA.closePath(),Jt=!1);break;case 15:if(F.version<2)throw new Error("vsindex operator not supported in CFF v1");Je=aA.pop();break;case 16:if(F.version<2)throw new Error("blend operator not supported in CFF v1");if(!cn)throw new Error("blend operator in non-variation font");for(var fn=cn.getBlendVector(de,Je),In=aA.pop(),kn=In*fn.length,jn=aA.length-kn,Dn=jn-In,Mn=0;Mn>3;break;case 21:aA.length>2&&Oe(),_A+=aA.shift(),Bt+=aA.shift(),gn(_A,Bt);break;case 22:aA.length>1&&Oe(),gn(_A+=aA.shift(),Bt);break;case 24:for(;aA.length>=8;)me=_A+aA.shift(),be=Bt+aA.shift(),Se=me+aA.shift(),Xe=be+aA.shift(),_A=Se+aA.shift(),Bt=Xe+aA.shift(),sA.bezierCurveTo(me,be,Se,Xe,_A,Bt);_A+=aA.shift(),Bt+=aA.shift(),sA.lineTo(_A,Bt);break;case 25:for(;aA.length>=8;)_A+=aA.shift(),Bt+=aA.shift(),sA.lineTo(_A,Bt);me=_A+aA.shift(),be=Bt+aA.shift(),Se=me+aA.shift(),Xe=be+aA.shift(),_A=Se+aA.shift(),Bt=Xe+aA.shift(),sA.bezierCurveTo(me,be,Se,Xe,_A,Bt);break;case 26:for(aA.length%2&&(_A+=aA.shift());aA.length>=4;)me=_A,be=Bt+aA.shift(),Se=me+aA.shift(),Xe=be+aA.shift(),_A=Se,Bt=Xe+aA.shift(),sA.bezierCurveTo(me,be,Se,Xe,_A,Bt);break;case 27:for(aA.length%2&&(Bt+=aA.shift());aA.length>=4;)me=_A+aA.shift(),be=Bt,Se=me+aA.shift(),Xe=be+aA.shift(),_A=Se+aA.shift(),sA.bezierCurveTo(me,be,Se,Xe,_A,Bt=Xe);break;case 28:aA.push(L.readInt16BE());break;case 29:Pe=aA.pop()+Ae,(Te=te[Pe])&&(pt[Pe]=!0,en=L.pos,Rn=oA,L.pos=Te.offset,oA=Te.offset+Te.length,ke(),L.pos=en,oA=Rn);break;case 30:case 31:for(An=31===we;aA.length>=4;)An?(me=_A+aA.shift(),be=Bt,Se=me+aA.shift(),Xe=be+aA.shift(),Bt=Xe+aA.shift(),_A=Se+(1===aA.length?aA.shift():0)):(me=_A,be=Bt+aA.shift(),Se=me+aA.shift(),Xe=be+aA.shift(),_A=Se+aA.shift(),Bt=Xe+(1===aA.length?aA.shift():0)),sA.bezierCurveTo(me,be,Se,Xe,_A,Bt),An=!An;break;case 12:switch(we=L.readUInt8()){case 3:var je=aA.pop(),hn=aA.pop();aA.push(je&&hn?1:0);break;case 4:je=aA.pop(),hn=aA.pop(),aA.push(je||hn?1:0);break;case 5:je=aA.pop(),aA.push(je?0:1);break;case 9:je=aA.pop(),aA.push(Math.abs(je));break;case 10:je=aA.pop(),hn=aA.pop(),aA.push(je+hn);break;case 11:je=aA.pop(),hn=aA.pop(),aA.push(je-hn);break;case 12:je=aA.pop(),hn=aA.pop(),aA.push(je/hn);break;case 14:je=aA.pop(),aA.push(-je);break;case 15:je=aA.pop(),hn=aA.pop(),aA.push(je===hn?1:0);break;case 18:aA.pop();break;case 20:var na=aA.pop(),zn=aA.pop();NA[zn]=na;break;case 21:zn=aA.pop(),aA.push(NA[zn]||0);break;case 22:var ia=aA.pop(),ra=aA.pop(),Jl=aA.pop(),Ol=aA.pop();aA.push(Jl<=Ol?ia:ra);break;case 23:aA.push(Math.random());break;case 24:je=aA.pop(),hn=aA.pop(),aA.push(je*hn);break;case 26:je=aA.pop(),aA.push(Math.sqrt(je));break;case 27:je=aA.pop(),aA.push(je,je);break;case 28:je=aA.pop(),hn=aA.pop(),aA.push(hn,je);break;case 29:(zn=aA.pop())<0?zn=0:zn>aA.length-1&&(zn=aA.length-1),aA.push(aA[zn]);break;case 30:var Rr=aA.pop(),rr=aA.pop();if(rr>=0)for(;rr>0;){for(var aa=aA[Rr-1],zr=Rr-2;zr>=0;zr--)aA[zr+1]=aA[zr];aA[0]=aa,rr--}else for(;rr<0;){aa=aA[0];for(var Gr=0;Gr<=Rr;Gr++)aA[Gr]=aA[Gr+1];aA[Rr-1]=aa,rr++}break;case 34:me=_A+aA.shift(),be=Bt,Se=me+aA.shift(),Xe=be+aA.shift();var ar=Se+aA.shift(),or=Xe,sr=ar+aA.shift(),lr=or,cr=sr+aA.shift(),gr=lr,Br=cr+aA.shift(),ur=gr;_A=Br,Bt=ur,sA.bezierCurveTo(me,be,Se,Xe,ar,or),sA.bezierCurveTo(sr,lr,cr,gr,Br,ur);break;case 35:for(var mi=[],io=0;io<=5;io++)_A+=aA.shift(),Bt+=aA.shift(),mi.push(_A,Bt);sA.bezierCurveTo.apply(sA,mi.slice(0,6)),sA.bezierCurveTo.apply(sA,mi.slice(6)),aA.shift();break;case 36:me=_A+aA.shift(),be=Bt+aA.shift(),Se=me+aA.shift(),lr=or=Xe=be+aA.shift(),cr=(sr=(ar=Se+aA.shift())+aA.shift())+aA.shift(),gr=lr+aA.shift(),Br=cr+aA.shift(),_A=Br,Bt=ur=gr,sA.bezierCurveTo(me,be,Se,Xe,ar,or),sA.bezierCurveTo(sr,lr,cr,gr,Br,ur);break;case 37:var ro=_A,oa=Bt;mi=[];for(var ao=0;ao<=4;ao++)_A+=aA.shift(),Bt+=aA.shift(),mi.push(_A,Bt);Math.abs(_A-ro)>Math.abs(Bt-oa)?(_A+=aA.shift(),Bt=oa):(_A=ro,Bt+=aA.shift()),mi.push(_A,Bt),sA.bezierCurveTo.apply(sA,mi.slice(0,6)),sA.bezierCurveTo.apply(sA,mi.slice(6));break;default:throw new Error("Unknown op: 12 ".concat(we))}break;default:throw new Error("Unknown op: ".concat(we))}else if(we<247)aA.push(we-139);else if(we<251){var sa=L.readUInt8();aA.push(256*(we-247)+sa+108)}else we<255?(sa=L.readUInt8(),aA.push(256*-(we-251)-sa-108)):aA.push(L.readInt32BE()/65536)}}(),Jt&&sA.closePath(),sA},G}(er),nl=new e.Struct({originX:e.uint16,originY:e.uint16,type:new e.String(4),data:new e.Buffer(function(eA){return eA.parent.buflen-eA._currentOffset})}),il=function(eA){function G(){return eA.apply(this,arguments)||this}h(G,eA);var V=G.prototype;return V.getImageForSize=function(F){for(var L=0;L=F)break}var oA=tA.imageOffsets,sA=oA[this.id],aA=oA[this.id+1];return sA===aA?null:(this._font.stream.pos=sA,nl.decode(this._font.stream,{buflen:aA-sA}))},V.render=function(F,L){var tA=this.getImageForSize(L);null!=tA&&F.image(tA.data,{height:L,x:tA.originX,y:L/this._font.unitsPerEm*(this.bbox.minY-tA.originY)}),this._font.sbix.flags.renderOutlines&&eA.prototype.render.call(this,F,L)},G}(Lr),ja=function(G,V){this.glyph=G,this.color=V},rl=function(eA){function G(){return eA.apply(this,arguments)||this}h(G,eA);var V=G.prototype;return V._getBBox=function(){for(var F=new Li,L=0;L>1;if(this.id<(aA=L.baseGlyphRecord[sA]).gid)oA=sA-1;else{if(!(this.id>aA.gid)){var NA=aA;break}tA=sA+1}}if(null==NA){var kA=this._font._getBaseGlyph(this.id);return[new ja(kA,ct={red:0,green:0,blue:0,alpha:255})]}for(var _A=[],Bt=NA.firstLayerIndex;Bt=1&&F[L]=L.glyphCount)){var tA=L.offsets[p];if(tA!==L.offsets[p+1]){var oA=this.font.stream;if(oA.pos=tA,!(oA.pos>=oA.length)){var sA=oA.readUInt16BE(),aA=tA+oA.readUInt16BE();if(32768&sA){var NA=oA.pos;oA.pos=aA;var kA=this.decodePoints();aA=oA.pos,oA.pos=NA}var ct=F.map(function(fn){return fn.copy()});sA&=4095;for(var _A=0;_A=L.globalCoordCount)throw new Error("Invalid gvar table");yt=L.globalCoords[4095&pt]}if(16384&pt){for(var te=[],Ae=0;AeMath.max(0,F[NA]))return 0;aA=(aA*oA[NA]+Number.EPSILON)/(F[NA]+Number.EPSILON)}else{if(oA[NA]tA[NA])return 0;aA=oA[NA]sA)){var NA=tA,kA=tA;for(tA++;tA<=sA;)L[tA]&&(this.deltaInterpolate(kA+1,tA-1,kA,tA,F,p),kA=tA),tA++;kA===NA?this.deltaShift(oA,sA,kA,F,p):(this.deltaInterpolate(kA+1,sA,kA,NA,F,p),NA>0&&this.deltaInterpolate(oA,NA-1,kA,NA,F,p)),tA=sA+1}}},G.deltaInterpolate=function(p,F,L,tA,oA,sA){if(!(p>F))for(var aA=["x","y"],NA=0;NAoA[tA][kA]){var ct=L;L=tA,tA=ct}var _A=oA[L][kA],Bt=oA[tA][kA],pt=sA[L][kA],yt=sA[tA][kA];if(_A!==Bt||pt===yt)for(var Jt=_A===Bt?0:(yt-pt)/(Bt-_A),te=p;te<=F;te++){var Ae=oA[te][kA];Ae<=_A?Ae+=pt-_A:Ae>=Bt?Ae+=yt-Bt:Ae=pt+(Ae-_A)*Jt,sA[te][kA]=Ae}}},G.deltaShift=function(p,F,L,tA,oA){var sA=oA[L].x-tA[L].x,aA=oA[L].y-tA[L].y;if(0!==sA||0!==aA)for(var NA=p;NA<=F;NA++)NA!==L&&(oA[NA].x+=sA,oA[NA].y+=aA)},G.getAdvanceAdjustment=function(p,F){var L,tA;if(F.advanceWidthMapping){var oA=p;oA>=F.advanceWidthMapping.mapCount&&(oA=F.advanceWidthMapping.mapCount-1);var aA=F.advanceWidthMapping.mapData[oA];L=aA.outerIndex,tA=aA.innerIndex}else L=0,tA=p;return this.getDelta(F.itemVariationStore,L,tA)},G.getDelta=function(p,F,L){if(F>=p.itemVariationData.length)return 0;var tA=p.itemVariationData[F];if(L>=tA.deltaSets.length)return 0;for(var oA=tA.deltaSets[L],sA=this.getBlendVector(p,F),aA=0,NA=0;NA_A.peakCoord||_A.peakCoord>_A.endCoord||_A.startCoord<0&&_A.endCoord>0&&0!==_A.peakCoord||0===_A.peakCoord?1:tA[ct]<_A.startCoord||tA[ct]>_A.endCoord?0:tA[ct]===_A.peakCoord?1:tA[ct]<_A.peakCoord?(tA[ct]-_A.startCoord+Number.EPSILON)/(_A.peakCoord-_A.startCoord+Number.EPSILON):(_A.endCoord-tA[ct]+Number.EPSILON)/(_A.endCoord-_A.peakCoord+Number.EPSILON)}oA[sA]=aA}return this.blendVectors.set(L,oA),oA},eA}(),fl=Promise.resolve(),Xa=function(){function eA(V){this.font=V,this.glyphs=[],this.mapping={},this.includeGlyph(0)}var G=eA.prototype;return G.includeGlyph=function(p){return"object"==typeof p&&(p=p.id),null==this.mapping[p]&&(this.glyphs.push(p),this.mapping[p]=this.glyphs.length-1),this.mapping[p]},G.encodeStream=function(){var p=this,F=new e.EncodeStream;return fl.then(function(){return p.encode(F),F.end()}),F},eA}(),qa=function(){function eA(){}return eA.size=function(V){return V>=0&&V<=255?1:2},eA.encode=function(V,p){p>=0&&p<=255?V.writeUInt8(p):V.writeInt16BE(p)},eA}(),_a=new e.Struct({numberOfContours:e.int16,xMin:e.int16,yMin:e.int16,xMax:e.int16,yMax:e.int16,endPtsOfContours:new e.Array(e.uint16,"numberOfContours"),instructions:new e.Array(e.uint8,e.uint16),flags:new e.Array(e.uint8,0),xPoints:new e.Array(qa,0),yPoints:new e.Array(qa,0)}),Ml=function(){function eA(){}var G=eA.prototype;return G.encodeSimple=function(p,F){void 0===F&&(F=[]);for(var L=[],tA=[],oA=[],sA=[],aA=0,NA=0,kA=0,ct=0,_A=0,Bt=0;Bt0&&(sA.push(aA),aA=0),sA.push(Ae),ct=Ae),NA=Jt,kA=te,_A++}"closePath"===pt.command&&L.push(_A-1)}p.commands.length>1&&"closePath"!==p.commands[p.commands.length-1].command&&L.push(_A-1);var de=p.bbox,Je={numberOfContours:L.length,xMin:de.minX,yMin:de.minY,xMax:de.maxX,yMax:de.maxY,endPtsOfContours:L,instructions:F,flags:sA,xPoints:tA,yPoints:oA},cn=_a.size(Je),Oe=4-cn%4,ge=new e.EncodeStream(cn+Oe);return _a.encode(ge,Je),0!==Oe&&ge.fill(0,Oe),ge.buffer},G._encodePoint=function(p,F,L,tA,oA,sA){var aA=p-F;return p===F?tA|=sA:(-255<=aA&&aA<=255&&(tA|=oA,aA<0?aA=-aA:tA|=sA),L.push(aA)),tA},eA}(),pl=function(eA){function G(p){var F;return(F=eA.call(this,p)||this).glyphEncoder=new Ml,F}h(G,eA);var V=G.prototype;return V._addGlyph=function(F){var L=this.font.getGlyph(F),tA=L._decode(),oA=this.font.loca.offsets[F],sA=this.font.loca.offsets[F+1],aA=this.font._getTableStream("glyf");aA.pos+=oA;var NA=aA.readBuffer(sA-oA);if(tA&&tA.numberOfContours<0){NA=c.from(NA);for(var ct,kA=B(tA.components);!(ct=kA()).done;){var _A=ct.value;F=this.includeGlyph(_A.glyphID),NA.writeUInt16BE(F,_A.pos)}}else tA&&this.font._variationProcessor&&(NA=this.glyphEncoder.encodeSimple(L.path,tA.instructions));return this.glyf.push(NA),this.loca.offsets.push(this.offset),this.hmtx.metrics.push({advance:L.advanceWidth,bearing:L._getMetrics().leftBearing}),this.offset+=NA.length,this.glyf.length-1},V.encode=function(F){this.glyf=[],this.offset=0,this.loca={offsets:[],version:this.font.loca.version},this.hmtx={metrics:[],bearings:[]};for(var L=0;L255?2:1,ranges:[{first:1,nLeft:this.charstrings.length-2}]},tA=Object.assign({},this.cff.topDict);tA.Private=null,tA.charset=L,tA.Encoding=null,tA.CharStrings=this.charstrings;for(var oA=0,sA=["version","Notice","Copyright","FullName","FamilyName","Weight","PostScript","BaseFontName","FontName"];oA0&&Object.defineProperty(this,F,{get:this._getTable.bind(this,L)})}}eA.probe=function(p){var F=p.toString("ascii",0,4);return"true"===F||"OTTO"===F||F===String.fromCharCode(0,1,0,0)};var G=eA.prototype;return G.setDefaultLanguage=function(p){void 0===p&&(p=null),this.defaultLanguage=p},G._getTable=function(p){if(!(p.tag in this._tables))try{this._tables[p.tag]=this._decodeTable(p)}catch(F){y.logErrors&&(console.error("Error decoding table ".concat(p.tag)),console.error(F.stack))}return this._tables[p.tag]},G._getTableStream=function(p){var F=this.directory.tables[p];return F?(this.stream.pos=F.offset,this.stream):null},G._decodeDirectory=function(){return this.directory=Wi.decode(this.stream,{_startOffset:0})},G._decodeTable=function(p){var F=this.stream.pos,L=this._getTableStream(p.tag),tA=ce[p.tag].decode(L,this,p.length);return this.stream.pos=F,tA},G.getName=function(p,F){void 0===F&&(F=this.defaultLanguage||y.defaultLanguage);var L=this.name&&this.name.records[p];return L&&(L[F]||L[this.defaultLanguage]||L[y.defaultLanguage]||L.en||L[Object.keys(L)[0]])||null},G.hasGlyphForCodePoint=function(p){return!!this._cmapProcessor.lookup(p)},G.glyphForCodePoint=function(p){return this.getGlyph(this._cmapProcessor.lookup(p),[p])},G.glyphsForString=function(p){for(var F=[],L=p.length,tA=0,oA=-1,sA=-1;tA<=L;){var aA=0,NA=0;if(tA>>6&3},transformed:function(G){return"glyf"===G.tag||"loca"===G.tag?0===G.transformVersion:0!==G.transformVersion},transformLength:new e.Optional(Ao,function(eA){return eA.transformed})}),to=new e.Struct({tag:new e.String(4),flavor:e.uint32,length:e.uint32,numTables:e.uint16,reserved:new e.Reserved(e.uint16),totalSfntSize:e.uint32,totalCompressedSize:e.uint32,majorVersion:e.uint16,minorVersion:e.uint16,metaOffset:e.uint32,metaLength:e.uint32,metaOrigLength:e.uint32,privOffset:e.uint32,privLength:e.uint32,tables:new e.Array(xl,"numTables")});to.process=function(){for(var eA={},G=0;G0){for(var aA=[],NA=0,kA=0;kA>7);if((aA&=127)<10)oA=0,sA=si(aA,((14&aA)<<7)+G.readUInt8());else if(aA<20)oA=si(aA,((aA-10&14)<<7)+G.readUInt8()),sA=0;else if(aA<84)oA=si(aA,1+(48&(kA=aA-20))+((ct=G.readUInt8())>>4)),sA=si(aA>>1,1+((12&kA)<<2)+(15&ct));else if(aA<120){var kA;oA=si(aA,1+((kA=aA-84)/12<<8)+G.readUInt8()),sA=si(aA>>1,1+(kA%12>>2<<8)+G.readUInt8())}else if(aA<124){var ct=G.readUInt8(),_A=G.readUInt8();oA=si(aA,(ct<<4)+(_A>>4)),sA=si(aA>>1,((15&_A)<<8)+G.readUInt8())}else oA=si(aA,G.readUInt16BE()),sA=si(aA>>1,G.readUInt16BE());L.push(new hi(NA,!1,F+=oA,p+=sA))}return L}var Ul=new e.VersionedStruct(e.uint32,{65536:{numFonts:e.uint32,offsets:new e.Array(e.uint32,"numFonts")},131072:{numFonts:e.uint32,offsets:new e.Array(e.uint32,"numFonts"),dsigTag:e.uint32,dsigLength:e.uint32,dsigOffset:e.uint32}}),Pl=function(){function eA(V){if(this.stream=V,"ttcf"!==V.readString(4))throw new Error("Not a TrueType collection");this.header=Ul.decode(V)}return eA.probe=function(p){return"ttcf"===p.toString("ascii",0,4)},eA.prototype.getFont=function(p){for(var L,F=B(this.header.offsets);!(L=F()).done;){var tA=L.value,oA=new e.DecodeStream(this.stream.buffer);oA.pos=tA;var sA=new Si(oA);if(sA.postscriptName===p)return sA}return null},l(eA,[{key:"fonts",get:function(){for(var L,p=[],F=B(this.header.offsets);!(L=F()).done;){var tA=L.value,oA=new e.DecodeStream(this.stream.buffer);oA.pos=tA,p.push(new Si(oA))}return p}}]),eA}(),bl=new e.String(e.uint8),Ll=(new e.Struct({len:e.uint32,buf:new e.Buffer("len")}),new e.Struct({id:e.uint16,nameOffset:e.int16,attr:e.uint8,dataOffset:e.uint24,handle:e.uint32})),Rl=new e.Struct({name:new e.String(4),maxTypeIndex:e.uint16,refList:new e.Pointer(e.uint16,new e.Array(Ll,function(eA){return eA.maxTypeIndex+1}),{type:"parent"})}),zl=new e.Struct({length:e.uint16,types:new e.Array(Rl,function(eA){return eA.length+1})}),Gl=new e.Struct({reserved:new e.Reserved(e.uint8,24),typeList:new e.Pointer(e.uint16,zl),nameListOffset:new e.Pointer(e.uint16,"void")}),no=new e.Struct({dataOffset:e.uint32,map:new e.Pointer(e.uint32,Gl),dataLength:e.uint32,mapLength:e.uint32}),Hl=function(){function eA(V){this.stream=V,this.header=no.decode(this.stream);for(var F,p=B(this.header.map.typeList.types);!(F=p()).done;){for(var oA,L=F.value,tA=B(L.refList);!(oA=tA()).done;){var sA=oA.value;sA.nameOffset>=0?(this.stream.pos=sA.nameOffset+this.header.map.nameListOffset,sA.name=bl.decode(this.stream)):sA.name=null}"sfnt"===L.name&&(this.sfnt=L)}}return eA.probe=function(p){var F=new e.DecodeStream(p);try{var L=no.decode(F)}catch(aA){return!1}for(var oA,tA=B(L.map.typeList.types);!(oA=tA()).done;)if("sfnt"===oA.value.name)return!0;return!1},eA.prototype.getFont=function(p){if(!this.sfnt)return null;for(var L,F=B(this.sfnt.refList);!(L=F()).done;){var sA=new e.DecodeStream(this.stream.buffer.slice(this.header.dataOffset+L.value.dataOffset+4)),aA=new Si(sA);if(aA.postscriptName===p)return aA}return null},l(eA,[{key:"fonts",get:function(){for(var L,p=[],F=B(this.sfnt.refList);!(L=F()).done;){var sA=new e.DecodeStream(this.stream.buffer.slice(this.header.dataOffset+L.value.dataOffset+4));p.push(new Si(sA))}return p}}]),eA}();y.registerFormat(Si),y.registerFormat(vl),y.registerFormat(Fl),y.registerFormat(Pl),y.registerFormat(Hl),S.exports=y},7337:function(S,I,n){"use strict";var c=n(4781),r=n(9742),o=n(2055),l=o.BK,h=o.CR,a=o.LF,B=o.NL,E=o.SG,u=o.WJ,C=o.SP,e=o.ZWJ,f=o.BA,g=o.HY,w=o.NS,Q=o.AI,m=o.AL,T=o.CJ,x=o.HL,M=o.RI,D=o.SA,y=o.XX,b=n(8383),N=b.DI_BRK,Y=b.IN_BRK,R=b.CI_BRK,P=b.CP_BRK,lA=b.pairTable,uA=new c(r.toByteArray("AAgOAAAAAACA3QAAAe0OEvHtnXuMXUUdx+d2d2/33r237V3YSoFC11r6IGgbRFBEfFF5KCVCMYKFaKn8AYqmwUeqECFabUGQipUiNCkgSRElUkKwJRWtwSpJrZpCI4E2NQqiBsFGwWL8Tu6Md3Z23o9zbund5JM5c+b1m9/85nnOuXtTHyFrwXpwL9gBngTPgj+Dv4H9Ae4B0N9PSAMcDqaB0X57urmIs8AQ72SEnQ4+ABaBxWAJWAquENJ9BtdfANeCleBGcCv4NvgeuBv8AGwCm8FWlpbzOPw7wC7wFNgDngMvgpfAq2DCACF10ACHgaPAzIF2+PFwT2Th1P8OuO8FZ4MPggvAxWAp+A6VHe5ysILFvx7u6oF2+Wvg3g7uYvlT+TbC/TH4CdgCtoGtfW3/E2An8++Gu5eleR7uP8B+8BoLf4LFH6i23Vp1rB5a1Q7TGMeCUYYY18RcxF0gxT8H5b3dIw8X3iPkdxauPwQWgyVgWbVT30/h+mrwZan8r8L/FcEWVsJ/E1grpKXcwdLdI9y/H9cPgUerbbun0PadCHcbjQd+D55mafcx9y9wXwKvCLJUJiLdRH09ef4xupqE/KeCY8Bx4M3gbeBdYCE4G3wYXASWgGXgSibTcuaugHs9WA3WgNvBBha2Ee4D4GFNPTYL9x/D9XaJXwnXvwW7wDPgTzQd2A9eAwODhDTBCJgOZoETwEngtEFmF3DPAouY/0K4Swb9dbaMpbkS7nKP9CsCyrpOSrNK8K9kNnYL7q0DGwbb/XnjoDv3gQfBZvBz8GvwO/AHdr3Pkv4F4fplj3J79OgRBx8HypajR48ePXr06NGjx8HFv7pABhX/HRx7HqKjr9Y+y6PXg7X2WRoPm1Kzpz8CcWaweLPhHt/fPq95C65PZnmfDnchOLfWPo/7OLgQ15ewdJ+E++na2PMhyudw72bDGc01CP8aWAm+Dr4BVoHV4IZeWC+sF9YL64UlD1sD1oE7au0z0zK5p1YuZde/R49uJnYdez/62EPgkVr4c7pHkfYXivTbcW8n2A32gOekOH+F/5/gAOivE9IArXpbrmlwR+vljz9bJrV552RCvgQ2GXgRzJ9CyGVTxofdLd17Gv6jW4RcAG5ote/9FO4B8NZhQs4DN4O9kOFY6OFSsB48C/qGCFkAyERCzh9q+0WuA2sqHX4m+Smv4t6RjXYelItwvQ7sBtOahHwU3NYcn+5Q4pFmRz89evTocajxStM898/FfLSgrg8/sT5+zcLDTkXY+6S0C+E/l907SXO+Rt/Lujrxe1kmztPU70JDvSmXILwJWS9TxLuC3VtuycPGCoV+VfD41yvKW6W4d1O9/S5YtZ+Qtbi+k/m/D/eHYBPzb4G7DfyS+enZ42/qnXPFp+pjZdgD/yX0XcV6+93DF+H+G5AhtcxPIs/BoY5cg0g7RRGXx/8Ewo8Y6vhp/Bnwz2F5zId7CgunZ6Dv1uTF0585pNY7P9NdhPCPDI1Ncyn8l4OrwHKwguVB12WrNPnpoPW5BWluA3eCuxRl3cfyfFCom43NBjkeQ9h2Tzlzs7PL5CmD3UwHew26+KMm7AVHu8hJaL1fTtj29L3E/wi6oPvWvkY7bAjucKOYtpymKWdGo/3e5KxGR8YTGvmfZ4XW46RGmnMIG6excs6Ae46nPuh7pGXbvm/fOB91vLhRXvkmlkKuK8BnFTb8xYL6TyqugbzXJZCZ9tlVrO9+C+53G5134A8G1htsjdbvXoT/KEBPmwq04dS2v6UxNnxbAXV5gul4Z6J+tMtBZtv4+Qzy2Ndof+fwPHP/zsbg/QFz02tIM4B9ZRO0mp379NxxBpgD5gv3T8H16eAMcCZYxMIWw/2YEG8pri9n/qvgfr45fm67VtjPzmbpVrJ7NzL3VrjvF/Jdh+sN3M/cB+A+LOV/bVNdX13b0G9KtmrSHCo8jvqfGjFu7WiWP37E8s2+yv8ZwVbYRgvMAm9kvMkhjStzAZbIBGIR+ngAy2NSZ9f0Hv2bIIShCckU5k5sb+OdGGQ0BKqSPzeE1WFCgWXK5dO2rDD/COn9zTvEUfXJ4zT3c9DP2oH2+ZoAtc9RBr/mY0SLdGyap+Nxh6W0In2Sn5C8/W00c/7dXn63we1DtAHud9WZbFNimmFL2iIoqt8eDPQHptERIkNoO8prFVvblm13OaG6oGM+n7P4/RrRz2HdTktotxHFdZW5tvm72UWEtm9dQF6n++hU1FmVFL++L2Nsdt3/1IVrWaacda4Se91t+pHDVXF5HFd9pG7X14NNyePr6wkfPTRI+H6qDPvLqRM5DR2beZ8W95Divq0IWXXyy/d18Yq09ZhyY/fyPjafY37yta8ybD9l3W15+crXYhQ5rsj2Wkb7iDadon1c+tKI4p5NR6HjPl/vqvLm92uK8lTjWNntkwJTu9hkiJmHVf3S1V5UOii6PWL1nVqOkP5QI/b2L2o+Kqr/h9i0bHNl9HudnKn0btKBbZzItQ7n47Drmutg6P+ubZK7/5va0PU8XZS56DP4Isci07gUo3/fscdlfMyp6xR6dy0vt/275K1bJ8qkHI99bdK3v4vt4Gtzs7sEWa5aZH4NDz3yfWG368bXLlQ6GZYQ7/UL1y3mryroZ+nkZwK28SD1vlt+7sNd+lcR3Ji1RKq1WcvhftFzousYxftH7Ngu2pZubcGfD8eMizp5Y/uha/m69NNK5siSOapkcq2lTOOGvE4y9aPclFl20eXTvwoZO374ymob90Jx3Zfk2h/I849q7VNE+WXsj+ZFlJ96Xcd1PyD4ue2J69/Q9V+u9uPrQC7/sHRftjE+n+eQP2Ztl5Kc+0TX/WND8vP2iF23xO7lfO3XtKfLhUm/PE6Ze78RD/3Fknr8i907yWsoUx+M3S+0SNjcHyu7qg6+aYvqF671TLXfTzU+2uaTnOOzbFc+7yHoZE59npIL175kay/ZxlKMH6a+NSJdl90XKXytpbMpTr/kP5zJfqxQDzneYWTstxh9pPPdYJ/CL8alTBag+fFvHFXtQMutWxBloOUMMHS6GWSyVYS4pvgmexXtVjc/TFWk9ZnnZLt3+caI10/8Xkb+hsYlfeh+QOyPNQN1S7hv2nqivEVSj/Ex+1lu73Ib1olbu4jpfN4ddbWbHN+/mcpWfUem+g7RhK4833SuepHbN0d5PjKF1kUll3xPFc5d+btTW9uqdCHXwaQ7kw252ENIW9vKTdEfTLox+VPYT6r8XXUWq7tYuXyZnEAG+ic+pwyVdRLDp8wcOp0kEZNXzLyqw3f+yEkjMI1sFznk8ulDKcoKlcFVlz75qPyu9+U8YuvnqnfXNDn6t6neNr3xfHj4JEU500ma8SSkjjodptBlTLurbI7rTxUnhcxF6d9W76KRbd6G3DdVNj2qia/qD3KY2O90elLJocpHJc90Q7kqVLqaLlGUjYj+Pg00jD8Xk+Wnf5UAN8c8HGrvXKYi+4irnsoo09ctU29Fll2UraSyaxnTOar8DFw+w60St+cRNlzfm9E9y9CNUTZM5/7iOTWR6imOgaKf/pn6hJw/f8dDdS6u0tNhDN1ZOlGUoauTrqyQNvCd21Mjy8N/T7AixBkQrm3tRKS0tngDwrWYzobuLFwXV3WfP5uR9TGTXdvc3BRVjq18l3rbwmaS8c9QByR4m3Sb/lPVX2V/M4naDkV79GFmJDad2NaLOdpBpxsbvs+/YubgVPO5bn3h+75BahnEOU/EVb+yTL7vQeTQp04GH/twfTYaCv9ehe8XXdZ0Ic+IY94Hcik/9h0Zk35c7MdWXo737HM/y6dllPENj9zeuvq7vMMYam88fZnfU7nOHznf6/AdP+W8ffXv2q6uelDlE1N/Wx+Prb/MG8ARBVJ0eb7rz5Tf6sl5l/G9nizDnJLJudZoaNqU/hbsCPH73dhu+03aWPiZhW9/yLHf8IGvT1OtzwZJ56yG/7YvX5sSdn+yof6x5av2ebxcV1dOZ9pDVgSXys/36uLzG1s5Nvj7pKo9axm2zsueylxeT1lWlQ4rkuuzx5f3+VXPPGIhgbLnKp/rtiJdcz2lOtMpAtMZV27E/kRttyaF83dFbf3NdYwXx6sZpH0uVkZ/VslmOrspa24V1+O56u3TdmXpQdaJy36wLPm4LZVR7jyp/CLOmULtzeWZoqstuLS9rhzTmqwIe3LVia0f2OSP3c/71Ec8V0itv6JtONbOXdb3Oc5YdcTaQVFzRWg7+z6HydnHy+qPoWO+j1yq8anofifWl7ri97chNiq/z6KyM37t8333sJR/SF/3bUvd+z+8nV3KNPWfIvt3mfNZijFAZT8xfXSekLfOtl3rHCuPzxrEdT7U9UvRjn3HKV5/XTuo2i3n+E3L5L+3yN+TkH+z07ZGDlkviuXLcX3aL7b+8m+duhCzJonp/yF9wabPItZhJmJ/N8pVfvn31Fok7PeiYsalFON4bPnyuOO7Ru2G+S52fqB5DAt55bJtXf2LtJdQParCVevHlqcufduvKJuQ5yxxvA/Zw6W0l5D3+nz7a4wdieXxd+FS2SjPN7Z9XXDRp62/dMv4GTM22uwx1/iTe7zTUSfjf1Mqld36EHv2xvPoprMnGfGvIiDHk+/x+EQTP7fMOjl928f0/855OTnaJ5XeQsevVHNojO5147ePXLH681mDqOBhqef/Ivp+7PMF1Vxs02kMITLK30zp/k+FbX1RdP/w1b2OMt9hiR1bKLHfZ+XWT+4+ahqzVM8iUug81r5tfTf3+JB6DPFpk1zllLUu9523cpPLdlR6zTVP+bShGFd1lh/Td33rVdT44WqTtjqktOtc87osc8x5hM9vyLrK49v+Pvmp7De0/vyvLJvk1C3+1OOyLyG/aSSud1L/TlLq/BoZ5M2xNj66IFRlT9fcT4GqDYosQ3df/G0zlR5U4UVzjAJZPpW8NlLI5lOejzwq+eS4rnWZbsjTx7ZUrq4sXdrQPmAa82Pb0HVuyZl3rrrZ7Nal/ULzdy0zBUXrMaQcU18v6ncmxd9eM/1fkdQ24Tvu+paZ2q5S6z13+anlTyVfrv4aWz/desfFfn3WEj727rNGKHJdlqsM1VompjzT+shXv7F75dj3J3K3qY7QM7DcZ2L/Aw==")),pA=function(FA){switch(FA){case Q:case D:case E:case y:return m;case T:return w;default:return FA}},cA=function(FA){switch(FA){case a:case B:return l;case C:return u;default:return FA}},gA=function(FA,$){void 0===$&&($=!1),this.position=FA,this.required=$};S.exports=function(){function yA($){this.string=$,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null,this.LB8a=!1,this.LB21a=!1,this.LB30a=0}var FA=yA.prototype;return FA.nextCodePoint=function(){var MA=this.string.charCodeAt(this.pos++),fA=this.string.charCodeAt(this.pos);return 55296<=MA&&MA<=56319&&56320<=fA&&fA<=57343?(this.pos++,1024*(MA-55296)+(fA-56320)+65536):MA},FA.nextCharClass=function(){return pA(uA.get(this.nextCodePoint()))},FA.getSimpleBreak=function(){switch(this.nextClass){case C:return!1;case l:case a:case B:return this.curClass=l,!1;case h:return this.curClass=h,!1}return null},FA.getPairTableBreak=function(MA){var fA=!1;switch(lA[this.curClass][this.nextClass]){case N:fA=!0;break;case Y:fA=MA===C;break;case R:if(!(fA=MA===C))return!1;break;case P:if(MA!==C)return fA}return this.LB8a&&(fA=!1),!this.LB21a||this.curClass!==g&&this.curClass!==f?this.LB21a=this.curClass===x:(fA=!1,this.LB21a=!1),this.curClass===M?(this.LB30a++,2==this.LB30a&&this.nextClass===M&&(fA=!0,this.LB30a=0)):this.LB30a=0,this.curClass=this.nextClass,fA},FA.nextBreak=function(){if(null==this.curClass){var MA=this.nextCharClass();this.curClass=cA(MA),this.nextClass=MA,this.LB8a=MA===e,this.LB30a=0}for(;this.pos=XA)return AA;switch(AA){case"%s":return String(zA[SA++]);case"%d":return Number(zA[SA++]);case"%j":try{return JSON.stringify(zA[SA++])}catch(W){return"[Circular]"}default:return AA}}),O=zA[SA];SA=3&&(SA.depth=arguments[2]),arguments.length>=4&&(SA.colors=arguments[3]),x(dA)?SA.showHidden=dA:dA&&I._extend(SA,dA),Y(SA.showHidden)&&(SA.showHidden=!1),Y(SA.depth)&&(SA.depth=2),Y(SA.colors)&&(SA.colors=!1),Y(SA.customInspect)&&(SA.customInspect=!0),SA.colors&&(SA.stylize=E),e(SA,fA,SA.depth)}function E(fA,dA){var SA=B.styles[dA];return SA?"\x1b["+B.colors[SA][0]+"m"+fA+"\x1b["+B.colors[SA][1]+"m":fA}function u(fA,dA){return fA}function e(fA,dA,SA){if(fA.customInspect&&dA&&_(dA.inspect)&&dA.inspect!==I.inspect&&(!dA.constructor||dA.constructor.prototype!==dA)){var zA=dA.inspect(SA,fA);return b(zA)||(zA=e(fA,zA,SA)),zA}var XA=function f(fA,dA){if(Y(dA))return fA.stylize("undefined","undefined");if(b(dA)){var SA="'"+JSON.stringify(dA).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return fA.stylize(SA,"string")}return y(dA)?fA.stylize(""+dA,"number"):x(dA)?fA.stylize(""+dA,"boolean"):M(dA)?fA.stylize("null","null"):void 0}(fA,dA);if(XA)return XA;var q=Object.keys(dA),O=function C(fA){var dA={};return fA.forEach(function(SA,zA){dA[SA]=!0}),dA}(q);if(fA.showHidden&&(q=Object.getOwnPropertyNames(dA)),lA(dA)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return g(dA);if(0===q.length){if(_(dA))return fA.stylize("[Function"+(dA.name?": "+dA.name:"")+"]","special");if(R(dA))return fA.stylize(RegExp.prototype.toString.call(dA),"regexp");if(nA(dA))return fA.stylize(Date.prototype.toString.call(dA),"date");if(lA(dA))return g(dA)}var wA,W="",EA=!1,vA=["{","}"];return T(dA)&&(EA=!0,vA=["[","]"]),_(dA)&&(W=" [Function"+(dA.name?": "+dA.name:"")+"]"),R(dA)&&(W=" "+RegExp.prototype.toString.call(dA)),nA(dA)&&(W=" "+Date.prototype.toUTCString.call(dA)),lA(dA)&&(W=" "+g(dA)),0!==q.length||EA&&0!=dA.length?SA<0?R(dA)?fA.stylize(RegExp.prototype.toString.call(dA),"regexp"):fA.stylize("[Object]","special"):(fA.seen.push(dA),wA=EA?function w(fA,dA,SA,zA,XA){for(var q=[],O=0,AA=dA.length;O60?SA[0]+(""===dA?"":dA+"\n ")+" "+fA.join(",\n ")+" "+SA[1]:SA[0]+dA+" "+fA.join(", ")+" "+SA[1]}(wA,W,vA)):vA[0]+W+vA[1]}function g(fA){return"["+Error.prototype.toString.call(fA)+"]"}function Q(fA,dA,SA,zA,XA,q){var O,AA,W;if((W=Object.getOwnPropertyDescriptor(dA,XA)||{value:dA[XA]}).get?AA=fA.stylize(W.set?"[Getter/Setter]":"[Getter]","special"):W.set&&(AA=fA.stylize("[Setter]","special")),yA(zA,XA)||(O="["+XA+"]"),AA||(fA.seen.indexOf(W.value)<0?(AA=M(SA)?e(fA,W.value,null):e(fA,W.value,SA-1)).indexOf("\n")>-1&&(AA=q?AA.split("\n").map(function(EA){return" "+EA}).join("\n").substr(2):"\n"+AA.split("\n").map(function(EA){return" "+EA}).join("\n")):AA=fA.stylize("[Circular]","special")),Y(O)){if(q&&XA.match(/^\d+$/))return AA;(O=JSON.stringify(""+XA)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(O=O.substr(1,O.length-2),O=fA.stylize(O,"name")):(O=O.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),O=fA.stylize(O,"string"))}return O+": "+AA}function T(fA){return Array.isArray(fA)}function x(fA){return"boolean"==typeof fA}function M(fA){return null===fA}function y(fA){return"number"==typeof fA}function b(fA){return"string"==typeof fA}function Y(fA){return void 0===fA}function R(fA){return P(fA)&&"[object RegExp]"===pA(fA)}function P(fA){return"object"==typeof fA&&null!==fA}function nA(fA){return P(fA)&&"[object Date]"===pA(fA)}function lA(fA){return P(fA)&&("[object Error]"===pA(fA)||fA instanceof Error)}function _(fA){return"function"==typeof fA}function pA(fA){return Object.prototype.toString.call(fA)}function cA(fA){return fA<10?"0"+fA.toString(10):fA.toString(10)}I.debuglog=function(fA){if(fA=fA.toUpperCase(),!l[fA])if(h.test(fA)){var dA=c.pid;l[fA]=function(){var SA=I.format.apply(I,arguments);console.error("%s %d: %s",fA,dA,SA)}}else l[fA]=function(){};return l[fA]},I.inspect=B,B.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},B.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},I.types=n(5955),I.isArray=T,I.isBoolean=x,I.isNull=M,I.isNullOrUndefined=function D(fA){return null==fA},I.isNumber=y,I.isString=b,I.isSymbol=function N(fA){return"symbol"==typeof fA},I.isUndefined=Y,I.isRegExp=R,I.types.isRegExp=R,I.isObject=P,I.isDate=nA,I.types.isDate=nA,I.isError=lA,I.types.isNativeError=lA,I.isFunction=_,I.isPrimitive=function uA(fA){return null===fA||"boolean"==typeof fA||"number"==typeof fA||"string"==typeof fA||"symbol"==typeof fA||void 0===fA},I.isBuffer=n(384);var gA=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function BA(){var fA=new Date,dA=[cA(fA.getHours()),cA(fA.getMinutes()),cA(fA.getSeconds())].join(":");return[fA.getDate(),gA[fA.getMonth()],dA].join(" ")}function yA(fA,dA){return Object.prototype.hasOwnProperty.call(fA,dA)}I.log=function(){console.log("%s - %s",BA(),I.format.apply(I,arguments))},I.inherits=n(5717),I._extend=function(fA,dA){if(!dA||!P(dA))return fA;for(var SA=Object.keys(dA),zA=SA.length;zA--;)fA[SA[zA]]=dA[SA[zA]];return fA};var FA="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function $(fA,dA){if(!fA){var SA=new Error("Promise was rejected with a falsy value");SA.reason=fA,fA=SA}return dA(fA)}I.promisify=function(dA){if("function"!=typeof dA)throw new TypeError('The "original" argument must be of type Function');if(FA&&dA[FA]){var SA;if("function"!=typeof(SA=dA[FA]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(SA,FA,{value:SA,enumerable:!1,writable:!1,configurable:!0}),SA}function SA(){for(var zA,XA,q=new Promise(function(W,EA){zA=W,XA=EA}),O=[],AA=0;AA1?y.attr[D[1]]:y.val},r.prototype.toString=function(M){return this.toStringWithIndent("",M)},r.prototype.toStringWithIndent=function(M,D){var y=M+"<"+this.name,b=D&&D.compressed?"":"\n";for(var Y in this.attr)Object.prototype.hasOwnProperty.call(this.attr,Y)&&(y+=" "+Y+'="'+T(this.attr[Y])+'"');if(1===this.children.length&&"element"!==this.children[0].type)y+=">"+this.children[0].toString(D)+"";else if(this.children.length){y+=">"+b;for(var R=M+(D&&D.compressed?"":" "),P=0,nA=this.children.length;P"}else D&&D.html?-1!==["area","base","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"].indexOf(this.name)?y+="/>":y+=">":y+="/>";return y},o.prototype.toString=function(M){return x(T(this.text),M)},o.prototype.toStringWithIndent=function(M,D){return M+this.toString(D)},l.prototype.toString=function(M){return""},l.prototype.toStringWithIndent=function(M,D){return M+this.toString(D)},h.prototype.toString=function(M){return"\x3c!--"+x(T(this.comment),M)+"--\x3e"},h.prototype.toStringWithIndent=function(M,D){return M+this.toString(D)},r.prototype.type="element",o.prototype.type="text",l.prototype.type="cdata",h.prototype.type="comment",function m(M,D){for(var y in D)D.hasOwnProperty(y)&&(M[y]=D[y])}(a.prototype,r.prototype),a.prototype._opentag=function(M){void 0===this.children?r.call(this,M):r.prototype._opentag.apply(this,arguments)},a.prototype._doctype=function(M){this.doctype+=M};var B=null;function u(){B[0]&&B[0]._opentag.apply(B[0],arguments)}function C(){B[0]&&B[0]._closetag.apply(B[0],arguments)}function e(){B[0]&&B[0]._text.apply(B[0],arguments)}function f(){B[0]&&B[0]._cdata.apply(B[0],arguments)}function g(){B[0]&&B[0]._comment.apply(B[0],arguments)}function w(){B[0]&&B[0]._doctype.apply(B[0],arguments)}function Q(){B[0]&&B[0]._error.apply(B[0],arguments)}function T(M){return M.toString().replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")}function x(M,D){var y=M;return D&&D.trimmed&&M.length>25&&(y=y.substring(0,25).trim()+"\u2026"),D&&D.preserveWhitespace||(y=y.trim()),y}S.exports&&!n.g.xmldocAssumeBrowser?S.exports.XmlDocument=a:this.XmlDocument=a}()},6255:function(S,I,n){"use strict";"undefined"!=typeof window&&!window.Promise&&n(3867),n(4667);function r(o){this.fs=o,this.resolving={}}r.prototype.resolve=function(o,l){if(!this.resolving[o]){var h=this;this.resolving[o]=new Promise(function(a,B){0===o.toLowerCase().indexOf("https://")||0===o.toLowerCase().indexOf("http://")?function(o,l){return new Promise(function(h,a){var B=new XMLHttpRequest;for(var E in B.open("GET",o,!0),l)B.setRequestHeader(E,l[E]);B.responseType="arraybuffer",B.onreadystatechange=function(){4===B.readyState&&(B.status>=200&&B.status<300||setTimeout(function(){a(new TypeError('Failed to fetch (url: "'+o+'")'))},0))},B.onload=function(){B.status>=200&&B.status<300&&h(B.response)},B.onerror=function(){setTimeout(function(){a(new TypeError('Network request failed (url: "'+o+'")'))},0)},B.ontimeout=function(){setTimeout(function(){a(new TypeError('Network request failed (url: "'+o+'")'))},0)},B.send()})}(o,l).then(function(E){h.fs.writeFileSync(o,E),a()},function(E){B(E)}):a()})}return this.resolving[o]},r.prototype.resolved=function(){var o=this;return new Promise(function(l,h){Promise.all(Object.values(o.resolving)).then(function(){l()},function(a){h(a)})})},S.exports=r},4275:function(S,I,n){"use strict";var c=n(8823).Buffer,r=n(6225).isFunction,o=n(6225).isUndefined,a=(n(6225),n(1818).saveAs),B={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}};function E(C,e,f,g){this.docDefinition=C,this.tableLayouts=e||null,this.fonts=f||B,this.vfs=g}E.prototype._createDoc=function(C,e){var f=function(b){return"object"==typeof b?{url:b.url,headers:b.headers}:{url:b,headers:{}}};C=C||{},this.tableLayouts&&(C.tableLayouts=this.tableLayouts);var w=new(n(8617))(this.fonts);if(n(3857).bindFS(this.vfs),!r(e))return w.createPdfKitDocument(this.docDefinition,C);var T=new(n(6255))(n(3857));for(var x in this.fonts)if(this.fonts.hasOwnProperty(x)){if(this.fonts[x].normal){var M=f(this.fonts[x].normal);T.resolve(M.url,M.headers),this.fonts[x].normal=M.url}this.fonts[x].bold&&(M=f(this.fonts[x].bold),T.resolve(M.url,M.headers),this.fonts[x].bold=M.url),this.fonts[x].italics&&(M=f(this.fonts[x].italics),T.resolve(M.url,M.headers),this.fonts[x].italics=M.url),this.fonts[x].bolditalics&&(M=f(this.fonts[x].bolditalics),T.resolve(M.url,M.headers),this.fonts[x].bolditalics=M.url)}if(this.docDefinition.images)for(var D in this.docDefinition.images)this.docDefinition.images.hasOwnProperty(D)&&(M=f(this.docDefinition.images[D]),T.resolve(M.url,M.headers),this.docDefinition.images[D]=M.url);var y=this;T.resolved().then(function(){var b=w.createPdfKitDocument(y.docDefinition,C);e(b)},function(b){throw b})},E.prototype._flushDoc=function(C,e){var g,f=[];C.on("readable",function(){for(var w;null!==(w=C.read(9007199254740991));)f.push(w)}),C.on("end",function(){g=c.concat(f),e(g,C._pdfMakePages)}),C.end()},E.prototype._getPages=function(C,e){if(!e)throw"_getPages is an async method and needs a callback argument";var f=this;this._createDoc(C,function(g){f._flushDoc(g,function(w,Q){e(Q)})})},E.prototype._bufferToBlob=function(C){var e;try{e=new Blob([C],{type:"application/pdf"})}catch(g){if("InvalidStateError"===g.name){var f=new Uint8Array(C);e=new Blob([f.buffer],{type:"application/pdf"})}}if(!e)throw"Could not generate blob";return e},E.prototype._openWindow=function(){var C=window.open("","_blank");if(null===C)throw"Open PDF in new window blocked by browser";return C},E.prototype._openPdf=function(C,e){e||(e=this._openWindow());try{this.getBlob(function(f){var w=(window.URL||window.webkitURL).createObjectURL(f);e.location.href=w},C)}catch(f){throw e.close(),f}},E.prototype.open=function(C,e){(C=C||{}).autoPrint=!1,this._openPdf(C,e=e||null)},E.prototype.print=function(C,e){(C=C||{}).autoPrint=!0,this._openPdf(C,e=e||null)},E.prototype.download=function(C,e,f){r(C)&&(o(e)||(f=e),e=C,C=null),C=C||"file.pdf",this.getBlob(function(g){a(g,C),r(e)&&e()},f)},E.prototype.getBase64=function(C,e){if(!C)throw"getBase64 is an async method and needs a callback argument";this.getBuffer(function(f){C(f.toString("base64"))},e)},E.prototype.getDataUrl=function(C,e){if(!C)throw"getDataUrl is an async method and needs a callback argument";this.getBuffer(function(f){C("data:application/pdf;base64,"+f.toString("base64"))},e)},E.prototype.getBlob=function(C,e){if(!C)throw"getBlob is an async method and needs a callback argument";var f=this;this.getBuffer(function(g){var w=f._bufferToBlob(g);C(w)},e)},E.prototype.getBuffer=function(C,e){if(!C)throw"getBuffer is an async method and needs a callback argument";var f=this;this._createDoc(e,function(g){f._flushDoc(g,function(w){C(w)})})},E.prototype.getStream=function(C,e){if(!r(e))return this._createDoc(C);this._createDoc(C,function(g){e(g)})},S.exports={createPdf:function(C,e,f,g){if(!function u(){try{var C=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(C,e),42===C.foo()}catch(f){return!1}}())throw"Your browser does not provide the level of support needed";return new E(C,e||n.g.pdfMake.tableLayouts,f||n.g.pdfMake.fonts,g||n.g.pdfMake.vfs)}}},3857:function(S,I,n){"use strict";var r=n(8823).Buffer;function o(){this.fileSystem={},this.dataSystem={}}function l(h){return 0===h.indexOf("/")&&(h=h.substring("/".length)),0===h.indexOf("/")&&(h=h.substring(1)),h}o.prototype.existsSync=function(h){return h=l(h),void 0!==this.fileSystem[h]||void 0!==this.dataSystem[h]},o.prototype.readFileSync=function(h,a){h=l(h);var B=this.dataSystem[h];if("string"==typeof B&&"utf8"===a)return B;if(B)return new r(B,"string"==typeof B?"base64":void 0);var E=this.fileSystem[h];if(E)return E;throw"File '"+h+"' not found in virtual file system"},o.prototype.writeFileSync=function(h,a){this.fileSystem[l(h)]=a},o.prototype.bindFS=function(h){this.dataSystem=h||{}},S.exports=new o},4498:function(S,I,n){"use strict";var c=n(6225).isString;function o(a){return"auto"===a.width}function l(a){return null==a.width||"*"===a.width||"star"===a.width}S.exports={buildColumnWidths:function r(a,B){var E=[],u=0,C=0,e=[],f=0,g=0,w=[],Q=B;a.forEach(function(y){o(y)?(E.push(y),u+=y._minWidth,C+=y._maxWidth):l(y)?(e.push(y),f=Math.max(f,y._minWidth),g=Math.max(g,y._maxWidth)):w.push(y)}),w.forEach(function(y){c(y.width)&&/\d+%/.test(y.width)&&(y.width=parseFloat(y.width)*Q/100),y._calcWidth=y.width=B)E.forEach(function(y){y._calcWidth=y._minWidth}),e.forEach(function(y){y._calcWidth=f});else{if(T0){var D=B/e.length;e.forEach(function(y){y._calcWidth=D})}}},measureMinMax:function h(a){for(var B={min:0,max:0},E={min:0,max:0},u=0,C=0,e=a.length;C=0;R--){var nA=w.styleStack.styleDictionary[N[R]];for(var lA in nA)nA.hasOwnProperty(lA)&&(Y[lA]=nA[lA])}return Y}function M(N){return h(N)?N=[N,N,N,N]:B(N)&&2===N.length&&(N=[N[0],N[1],N[0],N[1]]),N}var D=[void 0,void 0,void 0,void 0];if(g.style){var b=x(B(g.style)?g.style:[g.style]);b&&(D=T(b,D)),b.margin&&(D=M(b.margin))}return D=T(g,D),g.margin&&(D=M(g.margin)),void 0===D[0]&&void 0===D[1]&&void 0===D[2]&&void 0===D[3]?null:D}(),g.columns)return Q(w.measureColumns(g));if(g.stack)return Q(w.measureVerticalContainer(g));if(g.ul)return Q(w.measureUnorderedList(g));if(g.ol)return Q(w.measureOrderedList(g));if(g.table)return Q(w.measureTable(g));if(void 0!==g.text)return Q(w.measureLeaf(g));if(g.toc)return Q(w.measureToc(g));if(g.image)return Q(w.measureImage(g));if(g.svg)return Q(w.measureSVG(g));if(g.canvas)return Q(w.measureCanvas(g));if(g.qr)return Q(w.measureQr(g));throw"Unrecognized document structure: "+JSON.stringify(g,E)});function Q(T){var x=T._margin;return x&&(T._minWidth+=x[0]+x[2],T._maxWidth+=x[0]+x[2]),T}},f.prototype.convertIfBase64Image=function(g){if(/^data:image\/(jpeg|jpg|png);base64,/.test(g.image)){var w="$$pdfmake$$"+this.autoImageIndex++;this.images[w]=g.image,g.image=w}},f.prototype.measureImageWithDimensions=function(g,w){if(g.fit){var Q=w.width/w.height>g.fit[0]/g.fit[1]?g.fit[0]/w.width:g.fit[1]/w.height;g._width=g._minWidth=g._maxWidth=w.width*Q,g._height=w.height*Q}else g._width=g._minWidth=g._maxWidth=g.width||w.width,g._height=g.height||w.height*g._width/w.width,h(g.maxWidth)&&g.maxWidthg._width&&(g._width=g._minWidth=g._maxWidth=g.minWidth,g._height=g._width*w.height/w.width),h(g.minHeight)&&g.minHeight>g._height&&(g._height=g.minHeight,g._width=g._minWidth=g._maxWidth=g._height*w.width/w.height);g._alignment=this.styleStack.getProperty("alignment")},f.prototype.measureImage=function(g){this.images&&this.convertIfBase64Image(g);var w=this.imageMeasure.measureImage(g.image);return this.measureImageWithDimensions(g,w),g},f.prototype.measureSVG=function(g){var w=this.svgMeasure.measureSVG(g.svg);return this.measureImageWithDimensions(g,w),g.font=this.styleStack.getProperty("font"),g.svg=this.svgMeasure.writeDimensions(g.svg,{width:g._width,height:g._height}),g},f.prototype.measureLeaf=function(g){g._textRef&&g._textRef._textNodeRef.text&&(g.text=g._textRef._textNodeRef.text);var w=this.styleStack.clone();w.push(g);var Q=this.textTools.buildInlines(g.text,w);return g._inlines=Q.items,g._minWidth=Q.minWidth,g._maxWidth=Q.maxWidth,g},f.prototype.measureToc=function(g){if(g.toc.title&&(g.toc.title=this.measureNode(g.toc.title)),g.toc._items.length>0){for(var w=[],Q=g.toc.textStyle||{},m=g.toc.numberStyle||Q,T=g.toc.textMargin||[0,0,0,0],x=0,M=g.toc._items.length;x=26?Y((R/26>>0)-1):"")+"abcdefghijklmnopqrstuvwxyz"[R%26>>0]}(N-1)}function x(N){if(N<1||N>4999)return N.toString();var nA,Y=N,R={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},P="";for(nA in R)for(;Y>=R[nA];)P+=nA,Y-=R[nA];return P}var D;switch(Q){case"none":D=null;break;case"upper-alpha":D=T(g).toUpperCase();break;case"lower-alpha":D=T(g);break;case"upper-roman":D=x(g);break;case"lower-roman":D=x(g).toLowerCase();break;default:D=function M(N){return N.toString()}(g)}if(null===D)return{};m&&(B(m)?(m[0]&&(D=m[0]+D),m[1]&&(D+=m[1]),D+=" "):D+=m+" ");var y={text:D},b=w.getProperty("markerColor");return b&&(y.color=b),{_inlines:this.textTools.buildInlines(y,w).items}},f.prototype.measureUnorderedList=function(g){var w=this.styleStack.clone(),Q=g.ul;g.type=g.type||"disc",g._gapSize=this.gapSizeForList(),g._minWidth=0,g._maxWidth=0;for(var m=0,T=Q.length;m0?w.length-1:0;return g._minWidth=T.min+g._gap*x,g._maxWidth=T.max+g._gap*x,g},f.prototype.measureTable=function(g){(function uA(pA){if(pA.table.widths||(pA.table.widths="auto"),l(pA.table.widths))for(pA.table.widths=[pA.table.widths];pA.table.widths.length1?(lA(D,Q,y.colSpan),w.push({col:Q,span:y.colSpan,minWidth:y._minWidth,maxWidth:y._maxWidth})):(M._minWidth=Math.max(M._minWidth,y._minWidth),M._maxWidth=Math.max(M._maxWidth,y._maxWidth))),y.rowSpan&&y.rowSpan>1&&_(g.table,m,Q,y.rowSpan)}}!function P(){for(var pA,cA,gA=0,BA=w.length;gA0)for(pA=$/yA.span,cA=0;cA0)for(pA=MA/yA.span,cA=0;cAE.page?B:E.page>B.page?E:B.y>E.y?B:E).page,x:u.x,y:u.y,availableHeight:u.availableHeight,availableWidth:u.availableWidth}}(this,B.bottomMost)},o.prototype.markEnding=function(B){this.page=B._columnEndingContext.page,this.x=B._columnEndingContext.x,this.y=B._columnEndingContext.y,this.availableWidth=B._columnEndingContext.availableWidth,this.availableHeight=B._columnEndingContext.availableHeight,this.lastColumnWidth=B._columnEndingContext.lastColumnWidth},o.prototype.saveContextInEndingCell=function(B){B._columnEndingContext={page:this.page,x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,lastColumnWidth:this.lastColumnWidth}},o.prototype.completeColumnGroup=function(B){var E=this.snapshots.pop();this.calculateBottomMost(E),this.endingCell=null,this.x=E.x;var u=E.bottomMost.y;B&&(E.page===E.bottomMost.page?E.y+B>u&&(u=E.y+B):u+=B),this.y=u,this.page=E.bottomMost.page,this.availableWidth=E.availableWidth,this.availableHeight=E.bottomMost.availableHeight,B&&(this.availableHeight-=u-E.bottomMost.y),this.lastColumnWidth=E.lastColumnWidth},o.prototype.addMargin=function(B,E){this.x+=B,this.availableWidth-=B+(E||0)},o.prototype.moveDown=function(B){return this.y+=B,this.availableHeight-=B,this.availableHeight>0},o.prototype.initializePage=function(){this.y=this.pageMargins.top,this.availableHeight=this.getCurrentPage().pageSize.height-this.pageMargins.top-this.pageMargins.bottom,this.pageSnapshot().availableWidth=this.getCurrentPage().pageSize.width-this.pageMargins.left-this.pageMargins.right},o.prototype.pageSnapshot=function(){return this.snapshots[0]?this.snapshots[0]:this},o.prototype.moveTo=function(B,E){null!=B&&(this.x=B,this.availableWidth=this.getCurrentPage().pageSize.width-this.x-this.pageMargins.right),null!=E&&(this.y=E,this.availableHeight=this.getCurrentPage().pageSize.height-this.y-this.pageMargins.bottom)},o.prototype.moveToRelative=function(B,E){null!=B&&(this.x=this.x+B),null!=E&&(this.y=this.y+E)},o.prototype.beginDetachedBlock=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth})},o.prototype.endDetachedBlock=function(){var B=this.snapshots.pop();this.x=B.x,this.y=B.y,this.availableWidth=B.availableWidth,this.availableHeight=B.availableHeight,this.page=B.page,this.endingCell=B.endingCell,this.lastColumnWidth=B.lastColumnWidth};var h=function(B,E){return(E=function l(B,E){return void 0===B?E:r(B)&&"landscape"===B.toLowerCase()?"landscape":"portrait"}(E,B.pageSize.orientation))!==B.pageSize.orientation?{orientation:E,width:B.pageSize.height,height:B.pageSize.width}:{orientation:B.pageSize.orientation,width:B.pageSize.width,height:B.pageSize.height}};o.prototype.moveToNextPage=function(B){var E=this.page+1,u=this.page,C=this.y,e=E>=this.pages.length;if(e){var f=this.availableWidth,g=this.getCurrentPage().pageSize.orientation,w=h(this.getCurrentPage(),B);this.addPage(w),g===w.orientation&&(this.availableWidth=f)}else this.page=E,this.initializePage();return{newPageCreated:e,prevPage:u,prevY:C,y:this.y}},o.prototype.addPage=function(B){var E={items:[],pageSize:B};return this.pages.push(E),this.backgroundLength.push(0),this.page=this.pages.length-1,this.initializePage(),this.tracker.emit("pageAdded"),E},o.prototype.getCurrentPage=function(){return this.page<0||this.page>=this.pages.length?null:this.pages[this.page]},o.prototype.getCurrentPosition=function(){var B=this.getCurrentPage().pageSize,E=B.height-this.pageMargins.top-this.pageMargins.bottom,u=B.width-this.pageMargins.left-this.pageMargins.right;return{pageNumber:this.page+1,pageOrientation:B.orientation,pageInnerHeight:E,pageInnerWidth:u,left:this.x,top:this.y,verticalRatio:(this.y-this.pageMargins.top)/E,horizontalRatio:(this.x-this.pageMargins.left)/u}},S.exports=o},1196:function(S,I,n){"use strict";var c=n(4775),r=n(6225).isNumber,o=n(6225).pack,l=n(6225).offsetVector,h=n(3858);function a(u,C){this.context=u,this.contextStack=[],this.tracker=C}function B(u,C,e){null==e||e<0||e>u.items.length?u.items.push(C):u.items.splice(e,0,C)}a.prototype.addLine=function(u,C,e){var f=u.getHeight(),g=this.context,w=g.getCurrentPage(),Q=this.getCurrentPositionOnPage();return!(g.availableHeight0&&u.inlines[0].alignment,g=0;switch(f){case"right":g=C-e;break;case"center":g=(C-e)/2}if(g&&(u.x=(u.x||0)+g),"justify"===f&&!u.newLineForced&&!u.lastLineInParagraph&&u.inlines.length>1)for(var w=(C-e)/(u.inlines.length-1),Q=1,m=u.inlines.length;Q0)&&(void 0===u._x&&(u._x=u.x||0),u.x=f.x+u._x,u.y=f.y,this.alignImage(u),B(g,{type:e||"image",item:u},C),f.moveDown(u._height),w)},a.prototype.addSVG=function(u,C){return this.addImage(u,C,"svg")},a.prototype.addQr=function(u,C){var e=this.context,f=e.getCurrentPage(),g=this.getCurrentPositionOnPage();if(!f||void 0===u.absolutePosition&&e.availableHeightg.availableHeight||(u.items.forEach(function(Q){switch(Q.type){case"line":var m=function E(u){var C=new c(u.maxWidth);for(var e in u)u.hasOwnProperty(e)&&(C[e]=u[e]);return C}(Q.item);m._node&&(m._node.positions[0].pageNumber=g.page+1),m.x=(m.x||0)+(C?u.xOffset||0:g.x),m.y=(m.y||0)+(e?u.yOffset||0:g.y),w.items.push({type:"line",item:m});break;case"vector":var T=o(Q.item);l(T,C?u.xOffset||0:g.x,e?u.yOffset||0:g.y),w.items.push({type:"vector",item:T});break;case"image":case"svg":var x=o(Q.item);x.x=(x.x||0)+(C?u.xOffset||0:g.x),x.y=(x.y||0)+(e?u.yOffset||0:g.y),w.items.push({type:Q.type,item:x})}}),f||g.moveDown(u.height),0))},a.prototype.pushContext=function(u,C){void 0===u&&(C=this.context.getCurrentPage().height-this.context.pageMargins.top-this.context.pageMargins.bottom,u=this.context.availableWidth),r(u)&&(u=new h({width:u,height:C},{left:0,right:0,top:0,bottom:0})),this.contextStack.push(this.context),this.context=u},a.prototype.popContext=function(){this.context=this.contextStack.pop()},a.prototype.getCurrentPositionOnPage=function(){return(this.contextStack[0]||this.context).getCurrentPosition()},S.exports=a},2249:function(S,I,n){"use strict";var c=n(6225).isArray;function o(l,h){for(var a in this.fonts={},this.pdfKitDoc=h,this.fontCache={},l)if(l.hasOwnProperty(a)){var B=l[a];this.fonts[a]={normal:B.normal,bold:B.bold,italics:B.italics,bolditalics:B.bolditalics}}}o.prototype.getFontType=function(l,h){return function r(l,h){var a="normal";return l&&h?a="bolditalics":l?a="bold":h&&(a="italics"),a}(l,h)},o.prototype.getFontFile=function(l,h,a){var B=this.getFontType(h,a);return this.fonts[l]&&this.fonts[l][B]?this.fonts[l][B]:null},o.prototype.provideFont=function(l,h,a){var B=this.getFontType(h,a);if(null===this.getFontFile(l,h,a))throw new Error("Font '"+l+"' in style '"+B+"' is not defined in the font section of the document definition.");if(this.fontCache[l]=this.fontCache[l]||{},!this.fontCache[l][B]){var E=this.fonts[l][B];c(E)||(E=[E]),this.fontCache[l][B]=this.pdfKitDoc.font.apply(this.pdfKitDoc,E)._font}return this.fontCache[l][B]},S.exports=o},6225:function(S){"use strict";function r(g){return Array.isArray(g)}S.exports={isString:function I(g){return"string"==typeof g||g instanceof String},isNumber:function n(g){return"number"==typeof g||g instanceof Number},isBoolean:function c(g){return"boolean"==typeof g},isArray:r,isFunction:function o(g){return"function"==typeof g},isObject:function l(g){return null!==g&&"object"==typeof g},isNull:function h(g){return null===g},isUndefined:function a(g){return void 0===g},pack:function B(){for(var g={},w=0,Q=arguments.length;w0})).forEach(function(W){var EA={};["id","text","ul","ol","table","image","qr","canvas","svg","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"].forEach(function(vA){void 0!==W[vA]&&(EA[vA]=W[vA])}),EA.startPosition=W.positions[0],EA.pageNumbers=Array.from(new Set(W.positions.map(function(vA){return vA.pageNumber}))),EA.pages=MA.length,EA.stack=C(W.stack),W.nodeInfo=EA});for(var fA=0;fA<$.length;fA++){var dA=$[fA];if("before"!==dA.pageBreak&&!dA.pageBreakCalculated){dA.pageBreakCalculated=!0;var SA=dA.nodeInfo.pageNumbers[0],zA=[],XA=[],q=[];if(gA.length>1)for(var O=fA+1,AA=$.length;O-1&&zA.push($[O].nodeInfo),gA.length>2&&$[O].nodeInfo.pageNumbers.indexOf(SA+1)>-1&&XA.push($[O].nodeInfo);if(gA.length>3)for(O=0;O-1&&q.push($[O].nodeInfo);if(gA(dA.nodeInfo,zA,XA,q))return dA.pageBreak="before",!0}}return!1}this.docPreprocessor=new r,this.docMeasure=new o(R,P,nA,this.imageMeasure,this.svgMeasure,this.tableLayouts,pA);for(var FA=this.tryLayoutDocument(Y,R,P,nA,lA,_,uA,pA,cA);BA(FA.linearNodeList,FA.pages);)FA.linearNodeList.forEach(function(MA){MA.resetXY()}),FA=this.tryLayoutDocument(Y,R,P,nA,lA,_,uA,pA,cA);return FA.pages},b.prototype.tryLayoutDocument=function(Y,R,P,nA,lA,_,uA,pA,cA,gA){this.linearNodeList=[],Y=this.docPreprocessor.preprocessDocument(Y),Y=this.docMeasure.measureDocument(Y),this.writer=new h(new l(this.pageSize,this.pageMargins),this.tracker);var BA=this;return this.writer.context().tracker.startTracking("pageAdded",function(){BA.addBackground(lA)}),this.addBackground(lA),this.processNode(Y),this.addHeadersAndFooters(_,uA),null!=cA&&this.addWatermark(cA,R,nA),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},b.prototype.addBackground=function(Y){var R=T(Y)?Y:function(){return Y},P=this.writer.context(),nA=P.getCurrentPage().pageSize,lA=R(P.page+1,nA);lA&&(this.writer.beginUnbreakableBlock(nA.width,nA.height),lA=this.docPreprocessor.preprocessDocument(lA),this.processNode(this.docMeasure.measureDocument(lA)),this.writer.commitUnbreakableBlock(0,0),P.backgroundLength[P.page]+=lA.positions.length)},b.prototype.addStaticRepeatable=function(Y,R){this.addDynamicRepeatable(function(){return JSON.parse(JSON.stringify(Y))},R)},b.prototype.addDynamicRepeatable=function(Y,R){for(var nA=0,lA=this.writer.context().pages.length;nA1;)$.push({fontSize:SA}),(MA=FA.sizeOfRotatedText(BA.text,BA.angle,$)).width>gA.width?SA=(fA+(dA=SA))/2:MA.widthgA.height?(fA+(dA=SA))/2:((fA=SA)+dA)/2),$.pop();return SA}(this.pageSize,Y,R));var nA={text:Y.text,font:R.provideFont(Y.font,Y.bold,Y.italics),fontSize:Y.fontSize,color:Y.color,opacity:Y.opacity,angle:Y.angle};nA._size=function pA(gA,BA){var yA=new x(BA),FA=new M(null,{font:gA.font,bold:gA.bold,italics:gA.italics});return FA.push({fontSize:gA.fontSize}),{size:yA.sizeOfString(gA.text,FA),rotatedSize:yA.sizeOfRotatedText(gA.text,gA.angle,FA)}}(Y,R);for(var lA=this.writer.context().pages,_=0,uA=lA.length;_0;cA--)pA.push(uA);return pA}(Y._gap);nA&&(P-=(nA.length-1)*Y._gap),a.buildColumnWidths(R,P);var lA=this.processRow(R,R,nA);y(Y.positions,lA.positions)},b.prototype.processRow=function(Y,R,P,nA,lA,_){var uA=this,pA=[],cA=[];return this.tracker.auto("pageChanged",function gA(FA){for(var $,MA=0,fA=pA.length;MA1)for(var SA=1;SAFA?P[FA]:0}function yA(FA,$){if(FA.rowSpan&&FA.rowSpan>1){var MA=lA+FA.rowSpan-1;if(MA>=nA.length)throw"Row span for column "+$+" (with indexes starting from 0) exceeded row count";return nA[MA][$]}return null}},b.prototype.processList=function(Y,R){var _,P=this,nA=Y?R.ol:R.ul,lA=R._gapSize;this.writer.context().addMargin(lA.width),this.tracker.auto("lineAdded",function uA(pA){if(_){var cA=_;if(_=null,cA.canvas){var gA=cA.canvas[0];w(gA,-cA._minWidth,0),P.writer.addVector(gA)}else if(cA._inlines){var BA=new E(P.pageSize.width);BA.addInline(cA._inlines[0]),BA.x=-cA._minWidth,BA.y=pA.getAscenderHeight()-BA.getAscenderHeight(),P.writer.addLine(BA,!0)}}},function(){nA.forEach(function(pA){_=pA.listMarker,P.processNode(pA),y(R.positions,pA.positions)})}),this.writer.context().addMargin(-lA.width)},b.prototype.processTable=function(Y){var R=new B(Y);R.beginTable(this.writer);for(var P=Y.table.heights,nA=0,lA=Y.table.body.length;nA0&&(P.hasEnoughSpaceForInline(Y._inlines[0],Y._inlines.slice(1))||lA);){var _=!1,uA=Y._inlines.shift();if(lA=!1,!uA.noWrap&&uA.text.length>1&&uA.width>P.getAvailableWidth()){var pA=uA.width/uA.text.length,cA=Math.floor(P.getAvailableWidth()/pA);if(cA<1&&(cA=1),cA0){var u=B.pages[0];if(u.xOffset=h,u.yOffset=a,E>1)if(void 0!==h||void 0!==a)u.height=B.getCurrentPage().pageSize.height-B.pageMargins.top-B.pageMargins.bottom;else{u.height=this.writer.context.getCurrentPage().pageSize.height-this.writer.context.pageMargins.top-this.writer.context.pageMargins.bottom;for(var C=0,e=this.repeatables.length;CXA.item.y2?XA.item.y1:XA.item.y2:0}(XA)}var SA=N(MA||40),zA=SA.top;return $.forEach(function(XA){XA.items.forEach(function(q){var O=dA(q);O>zA&&(zA=O)})}),zA+=SA.bottom}function b($,MA){$&&"auto"===$.height&&($.height=1/0);var dA=function R($){if(C($)){var MA=l[$.toUpperCase()];if(!MA)throw"Page size "+$+" not recognized";return{width:MA[0],height:MA[1]}}return $}($||"A4");return function fA(SA){return!!C(SA)&&("portrait"===(SA=SA.toLowerCase())&&dA.width>dA.height||"landscape"===SA&&dA.widthdA.height?"landscape":"portrait",dA}function N($){if(e($))$={left:$,right:$,top:$,bottom:$};else if(g($))if(2===$.length)$={left:$[0],top:$[1],right:$[0],bottom:$[1]};else{if(4!==$.length)throw"Invalid pageMargins definition";$={left:$[0],top:$[1],right:$[2],bottom:$[3]}}return $}function P($,MA){$.pageSize.orientation!==(MA.options.size[0]>MA.options.size[1]?"landscape":"portrait")&&(MA.options.size=[MA.options.size[1],MA.options.size[0]])}function lA($,MA){var fA=$;return MA.sup&&(fA-=.75*MA.fontSize),MA.sub&&(fA+=.35*MA.fontSize),fA}function _($,MA,fA,dA,SA){function zA(st,TA){var at,It,mt=new E(null);if(w(st.positions))throw"Page reference id not found";var ht=st.positions[0].pageNumber.toString();switch(TA.text=ht,at=mt.widthOfString(TA.text,TA.font,TA.fontSize,TA.characterSpacing,TA.fontFeatures),It=TA.width-at,TA.width=at,TA.alignment){case"right":TA.x+=It;break;case"center":TA.x+=It/2}}$._pageNodeRef&&zA($._pageNodeRef,$.inlines[0]),MA=MA||0,fA=fA||0;var XA=$.getHeight(),O=XA-$.getAscenderHeight();B.drawBackground($,MA,fA,dA,SA);for(var AA=0,W=$.inlines.length;AA1){var XA=$.points[0],q=$.points[$.points.length-1];($.closePath||XA.x===q.x&&XA.y===q.y)&&fA.closePath()}break;case"path":fA.path($.d)}if($.linearGradient&&dA){var O=1/($.linearGradient.length-1);for(SA=0;SA<$.linearGradient.length;SA++)dA.stop(SA*O,$.linearGradient[SA]);$.color=dA}Q($.color)&&($.color=m($.color,MA));var AA=e($.fillOpacity)?$.fillOpacity:1,W=e($.strokeOpacity)?$.strokeOpacity:1;$.color&&$.lineColor?(fA.fillColor($.color,AA),fA.strokeColor($.lineColor,W),fA.fillAndStroke()):$.color?(fA.fillColor($.color,AA),fA.fill()):(fA.strokeColor($.lineColor||"black",W),fA.stroke())}function cA($,MA,fA,dA){var SA=e($.opacity)?$.opacity:1;if(dA.opacity(SA),$.cover){var zA=$.cover.align||"center",XA=$.cover.valign||"center",q=$.cover.width?$.cover.width:$.width,O=$.cover.height?$.cover.height:$.height;dA.save(),dA.rect($.x,$.y,q,O).clip(),dA.image($.image,$.x,$.y,{cover:[q,O],align:zA,valign:XA}),dA.restore()}else dA.image($.image,$.x,$.y,{width:$._width,height:$._height});$.link&&dA.link($.x,$.y,$._width,$._height,$.link),$.linkToPage&&(dA.ref({Type:"Action",S:"GoTo",D:[$.linkToPage,0,0]}).end(),dA.annotate($.x,$.y,$._width,$._height,{Subtype:"Link",Dest:[$.linkToPage-1,"XYZ",null,null,null]})),$.linkToDestination&&dA.goTo($.x,$.y,$._width,$._height,$.linkToDestination)}function gA($,MA,fA,dA,SA){var zA=Object.assign({width:$._width,height:$._height,assumePt:!0},$.options);zA.fontCallback=function(XA,q,O){var AA=XA.split(",").map(function(iA){return iA.trim().replace(/('|")/g,"")}),W=function($,MA,fA){for(var dA=0;dA-1&&(zA=zA.slice(0,XA)),fA.height===1/0){var q=y(zA,$.pageMargins);this.pdfKitDoc.options.size=[fA.width,q]}var O=function FA($,MA){var fA={};return Object.keys($).forEach(function(dA){var SA=$[dA];fA[dA]=MA.pattern(SA.boundingBox,SA.xStep,SA.yStep,SA.pattern,SA.colored)}),fA}($.patterns||{},this.pdfKitDoc);if(function nA($,MA,fA,dA,SA){fA._pdfMakePages=$,fA.addPage();var zA=0;SA&&$.forEach(function(vA){zA+=vA.items.length});var XA=0;SA=SA||function(){};for(var q=0;q<$.length;q++){q>0&&(P($[q],fA),fA.addPage(fA.options));for(var O=$[q],AA=0,W=O.items.length;AA=128?285:0);var m=[[]];for(w=0;w<30;++w){for(var T=m[w],x=[],M=0;M<=w;++M)x.push(g[(M6},nA=function(q,O){var AA=-8&function(q){var O=I[q],AA=16*q*q+128*q+64;return Y(q)&&(AA-=36),O[2].length&&(AA-=25*O[2].length*O[2].length-10*O[2].length-55),AA}(q),W=I[q];return AA-8*W[0][O]*W[1][O]},lA=function(q,O){switch(O){case 1:return q<10?10:q<27?12:14;case 2:return q<10?9:q<27?11:13;case 4:return q<10?8:16;case 8:return q<10?8:q<27?10:12}},_=function(q,O,AA){var W=nA(q,AA)-4-lA(q,O);switch(O){case 1:return 3*(W/10|0)+(W%10<4?0:W%10<7?1:2);case 2:return 2*(W/11|0)+(W%11<6?0:1);case 4:return W/8|0;case 8:return W/13|0}},cA=function(q,O){for(var AA=q.slice(0),W=q.length,EA=O.length,vA=0;vA=0)for(var wA=0;wA=0;--vA)EA>>W+vA&1&&(EA^=AA<>iA&1;return q},fA=function(q){for(var vA=function(JA){for(var WA=0,it=0;it=5&&(WA+=JA[it]-5+3);for(it=5;it=4*xA||JA[it+1]>=4*xA)&&(WA+=40)}return WA},iA=q.length,wA=0,GA=0,et=0;et=iA){for(EA.push(vA|TA>>(at-=iA));at>=8;)EA.push(TA>>(at-=8)&255);vA=0,iA=8}at>0&&(vA|=(TA&(1<>3);iA=function(q,O,AA){for(var W=[],EA=q.length/O|0,vA=0,iA=O-q.length%O,wA=0;wA>Mt&1,EA[mt+xA][ht+Mt]=1};for(iA(0,0,9,9,[127,65,93,93,93,65,383,0,64]),iA(AA-8,0,8,9,[256,127,65,93,93,93,65,127]),iA(0,AA-8,9,8,[254,130,186,186,186,130,254,0,0]),vA=9;vA>It++&1,EA[vA][AA-11+TA]=EA[AA-11+TA][vA]=1}return{matrix:W,reserved:EA}}(O),GA=wA.matrix,et=wA.reserved;if(function(q,O,AA){for(var W=q.length,EA=0,vA=-1,iA=W-1;iA>=0;iA-=2){6==iA&&--iA;for(var wA=vA<0?W-1:0,GA=0;GAiA-2;--et)O[wA][et]||(q[wA][et]=AA[EA>>3]>>(7&~EA)&1,++EA);wA+=vA}vA=-vA}}(GA,et,iA),EA<0){$(GA,et,0),MA(GA,0,W,0);var st=0,TA=fA(GA);for($(GA,et,0),EA=1;EA<8;++EA){$(GA,et,EA),MA(GA,0,W,EA);var at=fA(GA);TA>at&&(TA=at,st=EA),$(GA,et,EA)}EA=st}return $(GA,et,EA),MA(GA,0,W,EA),GA};function SA(q,O){var AA={numeric:1,alphanumeric:2,octet:4},EA=(O=O||{}).version||-1,vA={L:1,M:0,Q:3,H:2}[(O.eccLevel||"L").toUpperCase()],iA=O.mode?AA[O.mode.toLowerCase()]:-1,wA="mask"in O?O.mask:-1;if(iA<0)iA="string"==typeof q?q.match(h)?1:q.match(B)?2:4:4;else if(1!=iA&&2!=iA&&4!=iA)throw"invalid or unsupported mode";if(null===(q=function(q,O){switch(q){case 1:return O.match(h)?O:null;case 2:return O.match(a)?O.toUpperCase():null;case 4:if("string"==typeof O){for(var AA=[],W=0;W>6,128|63&EA):EA<65536?AA.push(224|EA>>12,128|EA>>6&63,128|63&EA):AA.push(240|EA>>18,128|EA>>12&63,128|EA>>6&63,128|63&EA)}return AA}return O}}(iA,q)))throw"invalid data format";if(vA<0||vA>3)throw"invalid ECC level";if(EA<0){for(EA=1;EA<=40&&!(q.length<=_(EA,iA,vA));++EA);if(EA>40)throw"too large data for the Qr format"}else if(EA<1||EA>40)throw"invalid Qr version! should be between 1 and 40";if(-1!=wA&&(wA<0||wA>8))throw"invalid mask";return dA(q,EA,iA,vA,wA)}S.exports={measure:function XA(q){var O=function zA(q,O){var AA=[],W=O.background||"#fff",EA=O.foreground||"#000",vA=SA(q,O),iA=vA.length,wA=Math.floor(O.fit?O.fit/iA:5),GA=iA*wA;AA.push({type:"rect",x:0,y:0,w:GA,h:GA,lineWidth:0,color:W});for(var et=0;et0;)this.styleOverrides.pop()},h.prototype.autopush=function(a){if(c(a))return 0;var B=[];a.style&&(B=r(a.style)?a.style:[a.style]);for(var E=0,u=B.length;E0&&this.pop(E),u},h.prototype.getProperty=function(a){if(this.styleOverrides)for(var B=this.styleOverrides.length-1;B>=0;B--){var E=this.styleOverrides[B];if(c(E)){var u=this.styleDictionary[E];if(u&&!o(u[a])&&!l(u[a]))return u[a]}else if(!o(E[a])&&!l(E[a]))return E[a]}return this.defaultStyle&&this.defaultStyle[a]},S.exports=h},7601:function(S,I,n){"use strict";var c=n(6513);function r(h){var a=parseFloat(h);if("number"==typeof a&&!isNaN(a))return a}function o(h){var a;try{a=new c.XmlDocument(h)}catch(B){throw new Error("SVGMeasure: "+B)}if("svg"!==a.name)throw new Error("SVGMeasure: expected document");return a}function l(){}l.prototype.measureSVG=function(h){var a=o(h),B=r(a.attr.width),E=r(a.attr.height);if((null==B||null==E)&&"string"==typeof a.attr.viewBox){var u=a.attr.viewBox.split(/[,\s]+/);if(4!==u.length)throw new Error("Unexpected svg viewbox format, should have 4 entries but found: '"+a.attr.viewBox+"'");null==B&&(B=r(u[2])),null==E&&(E=r(u[3]))}return{width:B,height:E}},l.prototype.writeDimensions=function(h,a){var B=o(h);return B.attr.width=""+a.width,B.attr.height=""+a.height,B.toString()},S.exports=l},9342:function(S,I,n){"use strict";var c=n(4498),r=n(6225).isFunction,o=n(6225).isNumber;function l(h){this.tableNode=h}l.prototype.beginTable=function(h){var a,B,E=this;this.offsets=(a=this.tableNode)._offsets,this.layout=a._layout,B=h.context().availableWidth-this.offsets.total,c.buildColumnWidths(a.table.widths,B),this.tableWidth=a._offsets.total+function u(){var f=0;return a.table.widths.forEach(function(g){f+=g._calcWidth}),f}(),this.rowSpanData=function C(){var f=[],g=0,w=0;f.push({left:0,rowSpan:0});for(var Q=0,m=E.tableNode.table.body[0].length;Q0&&y(g+M,Q,0,m.border[0]),void 0!==m.border[2]&&y(g+M,Q+x-1,2,m.border[2]);for(var D=0;D0&&y(g,Q+D,1,m.border[1]),void 0!==m.border[3]&&y(g+T-1,Q+D,3,m.border[3])}}function y(b,N,Y,R){var P=f[b][N];P.border=P.border||{},P.border[Y]=R}}(this.tableNode.table.body),this.drawHorizontalLine(0,h)},l.prototype.onRowBreak=function(h,a){var B=this;return function(){var E=B.rowPaddingTop+(B.headerRows?0:B.topLineWidth);a.context().availableHeight-=B.reservedAtBottom,a.context().moveDown(E)}},l.prototype.beginRow=function(h,a){this.topLineWidth=this.layout.hLineWidth(h,this.tableNode),this.rowPaddingTop=this.layout.paddingTop(h,this.tableNode),this.bottomLineWidth=this.layout.hLineWidth(h+1,this.tableNode),this.rowPaddingBottom=this.layout.paddingBottom(h,this.tableNode),this.rowCallback=this.onRowBreak(h,a),a.tracker.startTracking("pageChanged",this.rowCallback),this.dontBreakRows&&a.beginUnbreakableBlock(),this.rowTopY=a.context().y,this.reservedAtBottom=this.bottomLineWidth+this.rowPaddingBottom,a.context().availableHeight-=this.reservedAtBottom,a.context().moveDown(this.rowPaddingTop)},l.prototype.drawHorizontalLine=function(h,a,B){var E=this.layout.hLineWidth(h,this.tableNode);if(E){var C,u=this.layout.hLineStyle(h,this.tableNode);u&&u.dash&&(C=u.dash);for(var w,Q,m,e=E/2,f=null,g=this.tableNode.table.body,T=0,x=this.rowSpanData.length;T0&&(N=(w=g[h-1][T]).border?w.border[3]:this.layout.defaultBorder)&&w.borderColor&&(y=w.borderColor[3]),hR;)f.width+=this.rowSpanData[T+R++].width||0;T+=R-1}else if(w&&w.colSpan&&N){for(;w.colSpan>R;)f.width+=this.rowSpanData[T+R++].width||0;T+=R-1}else if(Q&&Q.colSpan&&b){for(;Q.colSpan>R;)f.width+=this.rowSpanData[T+R++].width||0;T+=R-1}else f.width+=this.rowSpanData[T].width||0}var P=(B||0)+e;D&&f&&f.width&&(a.addVector({type:"line",x1:f.left,x2:f.left+f.width,y1:P,y2:P,lineWidth:E,dash:C,lineColor:y},!1,B),f=null,y=null,w=null,Q=null,m=null)}a.context().moveDown(E)}},l.prototype.drawVerticalLine=function(h,a,B,E,u,C,e){var f=this.layout.vLineWidth(E,this.tableNode);if(0!==f){var w,g=this.layout.vLineStyle(E,this.tableNode);g&&g.dash&&(w=g.dash);var m,T,x,Q=this.tableNode.table.body;if(E>0&&(m=Q[C][e])&&m.borderColor&&(m.border?m.border[2]:this.layout.defaultBorder)&&(x=m.borderColor[2]),null==x&&E0&&AA--}return O.push({x:C.rowSpanData[C.rowSpanData.length-1].left,index:C.rowSpanData.length-1}),O}(),w=[],Q=B&&B.length>0,m=this.tableNode.table.body;if(w.push({y0:this.rowTopY,page:Q?B[0].prevPage:e}),Q)for(u=0,E=B.length;u0&&!this.headerRows,N=b?0:this.topLineWidth,Y=w[M].y0,R=w[M].y1;for(y&&(R+=this.rowPaddingBottom),a.context().page!=w[M].page&&(a.context().page=w[M].page,this.reservedAtBottom=0),u=0,E=g.length;u0&&!P&&(P=(_=m[h][lA-1]).border?_.border[2]:this.layout.defaultBorder),lA+11)for(var XA=1;XA1)for(XA=1;XA0&&this.rowSpanData[u].rowSpan--}this.drawHorizontalLine(h+1,a),this.headerRows&&h===this.headerRows-1&&(this.headerRepeatable=a.currentBlockToRepeatable()),this.dontBreakRows&&a.tracker.auto("pageChanged",function(){!C.headerRows&&!1!==C.layout.hLineWhenBroken&&C.drawHorizontalLine(h,a)},function(){a.commitUnbreakableBlock()}),this.headerRepeatable&&(h===this.rowsWithoutPageBreak-1||h===this.tableNode.table.body.length-1)&&(a.commitUnbreakableBlock(),a.pushToRepeatables(this.headerRepeatable),this.cleanUpRepeatables=!0,this.headerRepeatable=null)},S.exports=l},3497:function(S,I,n){"use strict";var c=n(6225).isArray,r=n(6225).isPattern,o=n(6225).getPattern;function h(E,u,C,e){var w=E.inlines[0],Q=function f(){for(var BA=0,yA=0,FA=E.inlines.length;yABA?yA:BA;return E.inlines[BA]}(),m=function g(){for(var BA=0,yA=0,FA=E.inlines.length;yA=0&&r.splice(o,1)}},I.prototype.emit=function(n){var c=Array.prototype.slice.call(arguments,1),r=this.events[n];!r||r.forEach(function(o){o.apply(this,c)})},I.prototype.auto=function(n,c,r){this.startTracking(n,c),r(),this.stopTracking(n,c)},S.exports=I},2480:function(){},5832:function(){},9862:function(){},964:function(){},3083:function(S,I,n){"use strict";var c=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],r="undefined"==typeof globalThis?n.g:globalThis;S.exports=function(){for(var l=[],h=0;h{var Ui=function(Pt){"use strict";var bn,ut=Object.prototype,_t=ut.hasOwnProperty,A="function"==typeof Symbol?Symbol:{},Ct=A.iterator||"@@iterator",S=A.asyncIterator||"@@asyncIterator",I=A.toStringTag||"@@toStringTag";function n(Y,R,P){return Object.defineProperty(Y,R,{value:P,enumerable:!0,configurable:!0,writable:!0}),Y[R]}try{n({},"")}catch(Y){n=function(R,P,nA){return R[P]=nA}}function c(Y,R,P,nA){var _=Object.create((R&&R.prototype instanceof E?R:E).prototype),uA=new y(nA||[]);return _._invoke=function T(Y,R,P){var nA=o;return function(_,uA){if(nA===h)throw new Error("Generator is already running");if(nA===a){if("throw"===_)throw uA;return N()}for(P.method=_,P.arg=uA;;){var pA=P.delegate;if(pA){var cA=x(pA,P);if(cA){if(cA===B)continue;return cA}}if("next"===P.method)P.sent=P._sent=P.arg;else if("throw"===P.method){if(nA===o)throw nA=a,P.arg;P.dispatchException(P.arg)}else"return"===P.method&&P.abrupt("return",P.arg);nA=h;var gA=r(Y,R,P);if("normal"===gA.type){if(nA=P.done?a:l,gA.arg===B)continue;return{value:gA.arg,done:P.done}}"throw"===gA.type&&(nA=a,P.method="throw",P.arg=gA.arg)}}}(Y,P,uA),_}function r(Y,R,P){try{return{type:"normal",arg:Y.call(R,P)}}catch(nA){return{type:"throw",arg:nA}}}Pt.wrap=c;var o="suspendedStart",l="suspendedYield",h="executing",a="completed",B={};function E(){}function u(){}function C(){}var e={};n(e,Ct,function(){return this});var f=Object.getPrototypeOf,g=f&&f(f(b([])));g&&g!==ut&&_t.call(g,Ct)&&(e=g);var w=C.prototype=E.prototype=Object.create(e);function Q(Y){["next","throw","return"].forEach(function(R){n(Y,R,function(P){return this._invoke(R,P)})})}function m(Y,R){function P(_,uA,pA,cA){var gA=r(Y[_],Y,uA);if("throw"!==gA.type){var BA=gA.arg,yA=BA.value;return yA&&"object"==typeof yA&&_t.call(yA,"__await")?R.resolve(yA.__await).then(function(FA){P("next",FA,pA,cA)},function(FA){P("throw",FA,pA,cA)}):R.resolve(yA).then(function(FA){BA.value=FA,pA(BA)},function(FA){return P("throw",FA,pA,cA)})}cA(gA.arg)}var nA;this._invoke=function lA(_,uA){function pA(){return new R(function(cA,gA){P(_,uA,cA,gA)})}return nA=nA?nA.then(pA,pA):pA()}}function x(Y,R){var P=Y.iterator[R.method];if(P===bn){if(R.delegate=null,"throw"===R.method){if(Y.iterator.return&&(R.method="return",R.arg=bn,x(Y,R),"throw"===R.method))return B;R.method="throw",R.arg=new TypeError("The iterator does not provide a 'throw' method")}return B}var nA=r(P,Y.iterator,R.arg);if("throw"===nA.type)return R.method="throw",R.arg=nA.arg,R.delegate=null,B;var lA=nA.arg;return lA?lA.done?(R[Y.resultName]=lA.value,R.next=Y.nextLoc,"return"!==R.method&&(R.method="next",R.arg=bn),R.delegate=null,B):lA:(R.method="throw",R.arg=new TypeError("iterator result is not an object"),R.delegate=null,B)}function M(Y){var R={tryLoc:Y[0]};1 in Y&&(R.catchLoc=Y[1]),2 in Y&&(R.finallyLoc=Y[2],R.afterLoc=Y[3]),this.tryEntries.push(R)}function D(Y){var R=Y.completion||{};R.type="normal",delete R.arg,Y.completion=R}function y(Y){this.tryEntries=[{tryLoc:"root"}],Y.forEach(M,this),this.reset(!0)}function b(Y){if(Y){var R=Y[Ct];if(R)return R.call(Y);if("function"==typeof Y.next)return Y;if(!isNaN(Y.length)){var P=-1,nA=function lA(){for(;++P=0;--nA){var lA=this.tryEntries[nA],_=lA.completion;if("root"===lA.tryLoc)return P("end");if(lA.tryLoc<=this.prev){var uA=_t.call(lA,"catchLoc"),pA=_t.call(lA,"finallyLoc");if(uA&&pA){if(this.prev=0;--P){var nA=this.tryEntries[P];if(nA.tryLoc<=this.prev&&_t.call(nA,"finallyLoc")&&this.prev=0;--R){var P=this.tryEntries[R];if(P.finallyLoc===Y)return this.complete(P.completion,P.afterLoc),D(P),B}},catch:function(Y){for(var R=this.tryEntries.length-1;R>=0;--R){var P=this.tryEntries[R];if(P.tryLoc===Y){var nA=P.completion;if("throw"===nA.type){var lA=nA.arg;D(P)}return lA}}throw new Error("illegal catch attempt")},delegateYield:function(Y,R,P){return this.delegate={iterator:b(Y),resultName:R,nextLoc:P},"next"===this.method&&(this.arg=bn),B}},Pt}(fr.exports);try{regeneratorRuntime=Ui}catch(Pt){"object"==typeof globalThis?globalThis.regeneratorRuntime=Ui:Function("r","regeneratorRuntime = r")(Ui)}},7757:(fr,Ui,Pt)=>{fr.exports=Pt(4979)}}]);