(()=>{var e={70746:()=>{},71033:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});const r={svgRoot:"styles_svgRoot__SIEyu","fill-circle-on-hover":"styles_fill-circle-on-hover__aAMV2","div-simple-button":"styles_div-simple-button__OeEJc",hoverRoot:"styles_hoverRoot__aOpR0",selected:"styles_selected__JFnow",background:"styles_background__eXFzn",blur:"styles_blur__AQt+m",enabled:"styles_enabled__yqhaA",active:"styles_active__s-ZUk",border:"styles_border__dc764"}},62754:(e,t,s)=>{"use strict";s.d(t,{T:()=>i});var r=s(19688),o=s(58088),n=s(78453);class i{static getUser(){const e=`${r.vc.backendUrl}${this.uri}/user`;return(0,n.ZP)({url:e,method:"GET"})}static login(e,t){const s=`${r.vc.backendUrl}${this.uri}/login`;return(0,n.ZP)({url:s,method:"POST",data:{email:e,password:t}})}static refresh(e){const t=`${r.vc.backendUrl}${this.uri}/refresh`;return(0,n.ZP)({url:t,method:"POST",headers:{Authorization:"Bearer "+e,Accept:"application/json","Content-Type":"application/json"}})}static loginImmutable(e,t){const s=`${r.vc.backendUrl}${this.uri}/login/immutable`;return(0,n.ZP)({url:s,method:"POST",data:{referredById:t},headers:{Authorization:"Bearer "+e,Accept:"application/json","Content-Type":"application/json"}})}static anonLogin(){const e=`${r.vc.backendUrl}${this.uri}/anonlogin`;return(0,n.ZP)({url:e,method:"GET"})}static register(e,t,s,o){const i=`${r.vc.backendUrl}${this.uri}/register`;return(0,n.ZP)({url:i,method:"POST",data:{email:e,password:s,username:t,referredById:o}})}static verify(e,t){const s=`${r.vc.backendUrl}${this.uri}/verify`;return(0,n.ZP)({url:s,method:"POST",data:{userId:e,token:t}})}static sendAccountVerifyEmail(){const e=`${r.vc.backendUrl}${this.uri}/verify/sendemail`;return(0,n.ZP)({url:e,method:"POST",data:{}})}static verifyFromHcEmail(e,t){const s=`${r.vc.backendUrl}${this.uri}/verify`;return(0,n.ZP)({url:s,method:"POST",data:{userId:e,token:t,isHc:!0}})}static changePassword(e,t){const s=`${r.vc.backendUrl}${this.uri}/password/change`;return(0,n.ZP)({url:s,method:"POST",data:{oldPassword:e,newPassword:t}})}static requestChangeEmail(e){const t=`${r.vc.backendUrl}${this.uri}/email/changerequest`;return(0,n.ZP)({url:t,method:"POST",data:{email:e}})}static verifyChangeEmail(e,t){const s=`${r.vc.backendUrl}${this.uri}/verify/changeemail`;return(0,n.ZP)({url:s,method:"POST",data:{email:e,token:t}})}static changeUsername(e){const t=`${r.vc.backendUrl}${this.uri}/username/change`;return(0,n.ZP)({url:t,method:"POST",data:{username:e}})}static sendReport(e,t,s,o){const i=`${r.vc.backendUrl}${this.uri}/support/request`;return console.log(s),(0,n.ZP)({url:i,method:"POST",form:{type:e,userAgent:navigator.userAgent,message:t,lastGameId:o,file:s}},{useTimeout:!1})}static requestResetPassword(e){const t=`${r.vc.backendUrl}${this.uri}/password/resetrequest`;return(0,n.ZP)({url:t,method:"POST",data:{email:e}})}static resetPassword(e,t,s){const o=`${r.vc.backendUrl}${this.uri}/password/reset`;return(0,n.ZP)({url:o,method:"POST",data:{password:e,userId:t,token:s}})}static linkHc(e){const t=`${r.vc.backendUrl}${this.uri}/link/handcash`;return(0,n.ZP)({url:t,method:"POST",data:{authToken:e}})}static linkDoge(e){const t=`${r.vc.backendUrl}${this.uri}/link/doge`;return(0,n.ZP)({url:t,method:"POST",data:{address:e}})}static linkImx(e,t){const s=`${r.vc.backendUrl}${this.uri}/link/imx`;return(0,n.ZP)({url:s,method:"POST",data:{userId:t},headers:{Authorization:"Bearer "+e,Accept:"application/json","Content-Type":"application/json"}})}static disconnectHc(){const e=`${r.vc.backendUrl}${this.uri}/link/handcash`;return(0,n.ZP)({url:e,method:"DELETE"})}static linkBtcWallet(e,t,s,o){const i=`${r.vc.backendUrl}${this.uri}/link/btcwallet`;return(0,n.ZP)({url:i,method:"POST",data:{signature:e,address:t,walletProvider:s,signingMessage:o}})}static linkYoursWallet(e,t){const s=`${r.vc.backendUrl}${this.uri}/link/yours`;return(0,n.ZP)({url:s,method:"POST",data:{paymentPubKey:e,ordinalPubKey:t}})}static disconnectBtcWallet(){const e=`${r.vc.backendUrl}${this.uri}/link/btcwallet`;return(0,n.ZP)({url:e,method:"DELETE"})}static disconnectYoursWallet(){const e=`${r.vc.backendUrl}${this.uri}/link/yours`;return(0,n.ZP)({url:e,method:"DELETE"})}static disconnectDogeWallet(){const e=`${r.vc.backendUrl}${this.uri}/link/doge`;return(0,n.ZP)({url:e,method:"DELETE"})}static disconnectImxWallet(){const e=`${r.vc.backendUrl}${this.uri}/link/imx`;return(0,n.ZP)({url:e,method:"DELETE"})}static getCollection(){const e=`${r.vc.backendUrl}${this.uri}/cards`;return(0,n.ZP)({url:e,method:"GET"},{useTimeout:!1}).then((e=>e.map((e=>(0,o.wC)(e.cardId)))))}static getHomeStats(){const e=`${r.vc.backendUrl}${this.uri}/home/stats`;return(0,n.ZP)({url:e,method:"GET"})}static getItems(){const e=`${r.vc.backendUrl}${this.uri}/items`;return(0,n.ZP)({url:e,method:"GET"},{useTimeout:!1}).then((e=>{for(let t=0;t<e.cards.length;t++){const s=e.cards[t];e.cards[t]=(0,o.wC)(s.cardId)}return e}))}static getUnopenedCards(){const e=`${r.vc.backendUrl}${this.uri}/cards/unopened`;return(0,n.ZP)({url:e,method:"GET"}).then((e=>{for(const t of e)t.cards=t.cards.map((e=>(0,o.wC)(e.cardId)));return e}))}static openPack(e){const t=`${r.vc.backendUrl}${this.uri}/cards/open/${e}`;return(0,n.ZP)({url:t,method:"DELETE"})}static searchPlayer(e,t){const s=`${r.vc.backendUrl}${this.uri}/search`;return(0,n.ZP)({url:s,method:"GET",params:{query:e,storeOnly:t}})}static getPlayerImxAddress(e){const t=`${r.vc.backendUrl}${this.uri}/user/${e}/imx/address`;return(0,n.ZP)({url:t,method:"GET"})}static getSiteNotifs(e){const t=`${r.vc.backendUrl}${this.uri}/site/notifications`;return(0,n.ZP)({url:t,method:"GET",params:{from:e}})}static getPlayerNotifs(){const e=`${r.vc.backendUrl}${this.uri}/player/notifications`;return(0,n.ZP)({url:e,method:"GET"})}static deletePlayerNotif(e){const t=`${r.vc.backendUrl}${this.uri}/player/notification/${e}`;return(0,n.ZP)({url:t,method:"DELETE"})}}i.uri="/api/v1/account"},23149:(e,t,s)=>{"use strict";s.d(t,{W:()=>n});var r=s(19688),o=s(78453);class n{static getSets(){const e=`${r.vc.backendUrl}${this.uri}/sets`;return(0,o.ZP)({url:e,method:"GET"})}static getSet(e){const t=`${r.vc.backendUrl}${this.uri}/set/${e}`;return(0,o.ZP)({url:t,method:"GET"})}static getCard(e){const[t,s]=e.split("/",2),n=`${r.vc.backendUrl}${this.uri}set/${t}/card/${s}`;return(0,o.ZP)({url:n,method:"GET"})}static getHeroes(){const e=`${r.vc.backendUrl}${this.uri}/heroes`;return(0,o.ZP)({url:e,method:"GET"})}}n.uri="/api/v1/asset"},10007:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(19688),o=s(78453);class n{static getHistory(){const e=`${r.vc.backendUrl}${this.uri}/history`;return(0,o.ZP)({url:e,method:"GET"})}static getPlayersLeaderboard(e){const t=`${r.vc.backendUrl}${this.uri}/leaderboard/players/${e}`;return(0,o.ZP)({url:t,method:"GET"})}static getGuildsLeaderboard(e){const t=`${r.vc.backendUrl}${this.uri}/leaderboard/guilds/${e}`;return(0,o.ZP)({url:t,method:"GET"})}static getGame(e){const t=`${r.vc.backendUrl}${this.uri}/${e}`;return(0,o.ZP)({method:"GET",url:t})}}n.uri="/api/v1/game"},95207:(e,t,s)=>{"use strict";s.d(t,{$C:()=>a,Tv:()=>r,J2:()=>o});var r,o,n=s(19688),i=s(78453);class a{static createGuild(e,t){const s=`${n.vc.backendUrl}${this.uri}`;return(0,i.ZP)({url:s,method:"POST",data:{name:e,tag:t}})}static invite(e){const t=`${n.vc.backendUrl}${this.uri}/invite`;return(0,i.ZP)({url:t,method:"POST",data:{invitee:e}})}static inviteAccept(e,t){const s=`${n.vc.backendUrl}${this.uri}/invite/accept`;return(0,i.ZP)({url:s,method:"POST",data:{guildId:e,accept:t}})}static requestChangeImage(e,t){const s=`${n.vc.backendUrl}${this.uri}/${e}/image`;return(0,i.ZP)({url:s,method:"PUT",form:{file:t}},{useTimeout:!1})}static deleteGuild(e){const t=`${n.vc.backendUrl}${this.uri}/${e}`;return(0,i.ZP)({url:t,method:"DELETE"})}static getGuild(e){const t=`${n.vc.backendUrl}${this.uri}/${e}`;return(0,i.ZP)({url:t,method:"GET"})}static getGuildInventory(e){const t=`${n.vc.backendUrl}${this.uri}/${e}/inventory`;return(0,i.ZP)({url:t,method:"GET"})}static upgradeGuild(e){const t=`${n.vc.backendUrl}${this.uri}/${e}/edit/upgrade`;return(0,i.ZP)({url:t,method:"POST"})}static searchGuilds(e){const t=`${n.vc.backendUrl}${this.uri}/search`;return(0,i.ZP)({url:t,method:"GET",query:e})}static approveImage(e,t){const s=`${n.vc.backendUrl}${this.uri}/image/approval`;return(0,i.ZP)({url:s,method:"GET",token:e,approve:t})}static changeRank(e,t,s){const r=`${n.vc.backendUrl}${this.uri}/${e}/edit/player/rank`;return(0,i.ZP)({url:r,method:"POST",data:{playerId:t,newRankId:s}})}static updateRanks(e,t){const s=`${n.vc.backendUrl}${this.uri}/${e}/edit/ranks`;return(0,i.ZP)({url:s,method:"POST",data:{ranks:t}})}static editGuild(e,t){const s=`${n.vc.backendUrl}${this.uri}/${e}/edit`;return(0,i.ZP)({url:s,method:"POST",data:{allowAnyoneToJoin:t}})}static kick(e,t){const s=`${n.vc.backendUrl}${this.uri}/${e}/kick`;return(0,i.ZP)({url:s,method:"POST",data:{playerId:t}})}static takeItem(e,t,s){const r=`${n.vc.backendUrl}${this.uri}/${e}/take/item`;return(0,i.ZP)({url:r,method:"POST",data:{item:t,count:s}})}static takePack(e,t,s,r){const o=`${n.vc.backendUrl}${this.uri}/${e}/take/pack`;return(0,i.ZP)({url:o,method:"POST",data:{generation:t,modifiers:s,count:r}})}static takeCard(e,t,s){const r=`${n.vc.backendUrl}${this.uri}/${e}/take/card`;return(0,i.ZP)({url:r,method:"POST",data:{cardId:t,count:s}})}}a.uri="/api/v1/guild",function(e){e[e.Chat=1]="Chat",e[e.Invite=2]="Invite",e[e.CardInventoryAccess=4]="CardInventoryAccess",e[e.PackInventoryAccess=8]="PackInventoryAccess",e[e.ItemInventoryAccess=16]="ItemInventoryAccess",e[e.Kick=32]="Kick",e[e.GemAccess=64]="GemAccess",e[e.EditGuild=128]="EditGuild",e[e.Admin=2147483647]="Admin"}(r||(r={})),function(e){e.Free="Free",e.Silver="Silver",e.Gold="Gold",e.Platinum="Platinum"}(o||(o={}))},42130:(e,t,s)=>{"use strict";s.d(t,{D:()=>r,s:()=>o});let r=null;function o(e){r=e}},25525:(e,t,s)=>{"use strict";s.d(t,{$:()=>pt,h:()=>ut});var r=s(39953),o=s(91874);s(70746),s(64518);const n="shell_pageRoot__SdWlj",i="shell_root__kI78V",a="shell_toast__2xA73";var l=s(29315),c=s(35316);function d(e){class t extends r.PureComponent{constructor(e){super(e),this.state={component:null}}async componentDidMount(){const{default:t}=await e();this.setState({component:t})}render(){const e=this.state.component;return e?(0,o.jsx)(e,{...this.props}):null}}return t}const h=d((()=>Promise.all([s.e(216),s.e(456),s.e(685)]).then(s.bind(s,45539)))),u=d((()=>Promise.all([s.e(216),s.e(456),s.e(239)]).then(s.bind(s,79134)))),p=d((()=>s.e(971).then(s.bind(s,63971)))),m=d((()=>Promise.all([s.e(216),s.e(8)]).then(s.bind(s,60008)))),f=d((()=>Promise.all([s.e(216),s.e(247)]).then(s.bind(s,62247)))),g=d((()=>Promise.all([s.e(216),s.e(534),s.e(425)]).then(s.bind(s,84763)))),y=d((()=>Promise.all([s.e(216),s.e(541),s.e(725)]).then(s.bind(s,16442)))),b=d((()=>Promise.all([s.e(216),s.e(737)]).then(s.bind(s,737)))),v=d((()=>Promise.all([s.e(216),s.e(662)]).then(s.bind(s,63161)))),x=d((()=>s.e(78).then(s.bind(s,13078)))),k=d((()=>s.e(2).then(s.bind(s,63002)))),w=d((()=>s.e(254).then(s.bind(s,47254)))),C=d((()=>s.e(308).then(s.bind(s,38308)))),P=d((()=>Promise.all([s.e(216),s.e(123)]).then(s.bind(s,18123)))),j=d((()=>s.e(626).then(s.bind(s,54626)))),_=d((()=>s.e(962).then(s.bind(s,38962)))),S=d((()=>Promise.resolve().then(s.bind(s,12914)))),N=d((()=>Promise.all([s.e(216),s.e(65)]).then(s.bind(s,63065)))),I=d((()=>s.e(475).then(s.bind(s,55475)))),T=d((()=>Promise.all([s.e(216),s.e(270)]).then(s.bind(s,53270)))),D=d((()=>Promise.all([s.e(216),s.e(698)]).then(s.bind(s,68698)))),E=d((()=>Promise.all([s.e(216),s.e(541),s.e(341)]).then(s.bind(s,39227)))),$=d((()=>Promise.all([s.e(216),s.e(534),s.e(124)]).then(s.bind(s,74099)))),A=d((()=>s.e(941).then(s.bind(s,53941)))),O=d((()=>Promise.all([s.e(216),s.e(359)]).then(s.bind(s,46359)))),R=d((()=>s.e(271).then(s.bind(s,80271)))),L=d((()=>Promise.all([s.e(216),s.e(824)]).then(s.bind(s,16018)))),H=d((()=>Promise.all([s.e(216),s.e(938)]).then(s.bind(s,84629)))),U=d((()=>Promise.all([s.e(216),s.e(323)]).then(s.bind(s,18786)))),G=d((()=>Promise.all([s.e(216),s.e(579)]).then(s.bind(s,17655)))),F=d((()=>Promise.all([s.e(216),s.e(485)]).then(s.bind(s,64187)))),Z=d((()=>Promise.all([s.e(216),s.e(556)]).then(s.bind(s,95890)))),q=d((()=>Promise.all([s.e(216),s.e(198)]).then(s.bind(s,46398)))),M=d((()=>Promise.all([s.e(216),s.e(534),s.e(266)]).then(s.bind(s,15496)))),B=d((()=>Promise.all([s.e(216),s.e(534),s.e(514)]).then(s.bind(s,77241)))),W=d((()=>Promise.all([s.e(216),s.e(789)]).then(s.bind(s,27231)))),z=d((()=>Promise.all([s.e(216),s.e(177)]).then(s.bind(s,47656)))),K=d((()=>Promise.all([s.e(216),s.e(582)]).then(s.bind(s,68439)))),V=d((()=>Promise.all([s.e(216),s.e(103)]).then(s.bind(s,29505)))),J=d((()=>Promise.all([s.e(216),s.e(709)]).then(s.bind(s,5127)))),Q=d((()=>Promise.all([s.e(216),s.e(457)]).then(s.bind(s,14961)))),X=d((()=>Promise.all([s.e(216),s.e(932)]).then(s.bind(s,26529)))),Y=d((()=>Promise.all([s.e(216),s.e(105)]).then(s.bind(s,46506)))),ee=d((()=>Promise.all([s.e(216),s.e(142)]).then(s.bind(s,89192)))),te=[{path:"/",exact:!0,component:u,requiresLogin:!0},{path:"/lobby",exact:!0,component:h,requiresLogin:!0},{path:"/login",exact:!0,component:m,requiresLogin:!1},{path:"/shop",exact:!0,component:E,requiresLogin:!1},{path:"/market/:item",exact:!0,component:A,requiresLogin:!1},{path:"/market/transactions",exact:!0,component:R,requiresLogin:!1},{path:"/tournament/:id",exact:!0,component:N,requiresLogin:!0},{path:"/guild/:id",exact:!0,component:$,requiresLogin:!0},{path:"/try",exact:!0,component:T,requiresLogin:!1},{path:"/arena/picker",exact:!0,component:D,requiresLogin:!0},{path:"/inventory",exact:!0,component:g,requiresLogin:!0},{path:"/admin",exact:!0,component:d((()=>Promise.all([s.e(216),s.e(44)]).then(s.bind(s,14479)))),requiresLogin:!0},{path:"/redeem",exact:!0,component:O,requiresLogin:!1},{path:"/admin/createcollection",exact:!0,component:H,requiresLogin:!0},{path:"/admin/productcodes",exact:!0,component:L,requiresLogin:!0},{path:"/admin/stores",exact:!0,component:X,requiresLogin:!0},{path:"/admin/createcards",exact:!0,component:U,requiresLogin:!0},{path:"/admin/mintcards",exact:!0,component:G,requiresLogin:!0},{path:"/admin/mintpacks",exact:!0,component:F,requiresLogin:!0},{path:"/admin/mintfungibleitems",exact:!0,component:M,requiresLogin:!0},{path:"/admin/mintguildfungibleitems",exact:!0,component:B,requiresLogin:!0},{path:"/admin/givexp",exact:!0,component:Z,requiresLogin:!0},{path:"/admin/controlpanel",exact:!0,component:q,requiresLogin:!0},{path:"/admin/impersonate",exact:!0,component:Y,requiresLogin:!0},{path:"/admin/gemstatement",exact:!0,component:K,requiresLogin:!0},{path:"/admin/sitenotifications",exact:!0,component:V,requiresLogin:!0},{path:"/admin/ban",exact:!0,component:Q,requiresLogin:!0},{path:"/admin/cardmap",exact:!0,component:W,requiresLogin:!0},{path:"/admin/grantgems",exact:!0,component:z,requiresLogin:!0},{path:"/admin/messagequeue",exact:!0,component:J,requiresLogin:!0},{path:"/admin/rankedwinslosses",exact:!0,component:ee,requiresLogin:!0},{path:"/leaderboard/:format",exact:!0,component:S,requiresLogin:!1},{path:"/leaderboard",exact:!0,component:S,requiresLogin:!1},{path:"/passwordreset",exact:!0,component:P,requiresLogin:!1},{path:"/verify",exact:!0,component:_,requiresLogin:!1},{path:"/verify/changeemail",exact:!0,component:j,requiresLogin:!1},{path:"/internal/link/hc",exact:!0,component:k,requiresLogin:!0},{path:"/redirect",exact:!0,component:w,requiresLogin:!1},{path:"/logout",exact:!0,component:C,requiresLogin:!1},{path:"/external/openpack/handcash",exact:!0,component:x,requiresLogin:!1},{path:"/viewer/:generation",exact:!0,component:p,requiresLogin:!1},{path:"/viewer",exact:!0,component:p,requiresLogin:!1},{path:"/profile",exact:!0,component:v,requiresLogin:!0},{path:"/deck/builder",exact:!0,component:y,requiresLogin:!0},{path:"/deck/builder/sandbox",exact:!0,component:b,requiresLogin:!0},{path:"/game/:gameId",exact:!0,component:f,requiresLogin:!0,allowAnon:!0},{path:"/summary/:gameId",exact:!0,component:I,requiresLogin:!0},{path:"/tournament/summary/:gameId",exact:!0,component:I,requiresLogin:!0}];var se=s(69691),re=s(98656),oe=s(20841),ne=s(60001),ie=s(3578);const ae="styles_root__yshkU",le="styles_headerButton__qKhvc",ce="styles_gemDiv__m8ig8",de="styles_profileButton__5EK9Y",he="styles_userButton__xc904",ue="styles_text__0yTig",pe="styles_username__zzcN9",me="styles_level__ZaMyQ",fe="styles_imgDiv__Ql1NV",ge="styles_img__V-Cv-",ye="styles_logo__NiGh0",be="styles_logoRoot__DVd25",ve="styles_notification__FxHEu",xe="styles_icon__RjNx9",ke="styles_notifsWrap__qtTFx",we="styles_badge__w9dNq",Ce="styles_notifsRoot__IdWil",Pe="styles_notifsHeader__8mAjv",je="styles_notifications__DhoBz",_e="styles_noNotifs__JntBg",Se="styles_notif__Pi2wk",Ne="styles_notifImg__s5cGN",Ie="styles_gemIcon__6RJqm",Te="styles_gemText__DMjis",De="styles_joinGuildFooter__B-yc5",Ee="styles_discordIcon__xKOop";var $e=s(22781),Ae=s(63315),Oe=s(62754),Re=s(91309),Le=s(55823),He=s(12914),Ue=s(66618),Ge=s(90229),Fe=s(73031),Ze=s(5174),qe=s(98181),Me=s(30372),Be=s(50293),We=s(95207),ze=s(7154),Ke=s(64143);const Ve=s.p+"static/media/discord.f68d215ef782b4d3bc745186be3fc1a7.svg";var Je=function(e,t,s,r){var o,n=arguments.length,i=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,s,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(n<3?o(i):n>3?o(t,s,i):o(t,s))||i);return n>3&&i&&Object.defineProperty(t,s,i),i};class Qe extends r.PureComponent{constructor(e){super(e),this.state={collapsed:!0,siteNotifs:[],playerNotifs:[],hasNotifBadge:!1,showNotifs:!1},this.disposed=!1,this.isInIframe="undefined"!==typeof window&&window.parent&&window.parent!==window,this.notifs=r.createRef()}toggleNavbar(){this.setState((e=>({collapsed:!e.collapsed})))}componentWillUnmount(){this.disposed=!0}componentDidUpdate(e,t,s){e.path!==this.props.path&&this.setState({showNotifs:!1,collapsed:!0})}async componentDidMount(){const e=localStorage.getItem("lastSiteNotif"),t=localStorage.getItem("lastPlayerNotif"),[s,r]=await Promise.all([Oe.T.getSiteNotifs(e?parseInt(e,10):void 0).catch((()=>[])),Oe.T.getPlayerNotifs().catch((()=>[]))]),o=Math.max(...r.map((e=>e.id)),0)>(parseInt(t,10)||0);this.setState({siteNotifs:s,playerNotifs:r,hasNotifBadge:o})}nav(e){this.setState({collapsed:!0}),this.props.navigate(e)}deleteNotif(e){localStorage.setItem("lastSiteNotif",e.id.toString()),this.setState((t=>({siteNotifs:t.siteNotifs.removeItem(e)})))}hide(){this.state.showNotifs&&this.setState({showNotifs:!1})}renderNotifs(){return(0,o.jsx)("div",{children:this.state.siteNotifs.map((e=>(0,o.jsxs)("div",{className:ve,children:[(0,o.jsx)("div",{children:(0,Re.N)(e.messageHtml)}),(0,o.jsx)("div",{onClick:()=>this.deleteNotif(e),children:(0,o.jsx)(Le.P,{})})]},e.id)))})}render(){var e,t,s;return this.isInIframe||Xe("game")||Xe("internal")||Xe("redirect")||Xe("logout")||Xe("external")||Xe("arena/picker")||Xe("tournament")||Xe("passwordreset")||Xe("verify")?this.renderNotifs():(0,o.jsxs)(o.Fragment,{children:[this.renderNotifs(),(0,o.jsxs)("div",{className:ae,collapsed:this.state.collapsed?"1":void 0,id:"app-header",children:[(0,o.jsx)("div",{className:be,children:(0,o.jsx)("div",{children:(0,o.jsx)("span",{onClick:()=>window.location.pathname="/",children:(0,o.jsx)("img",{logo:"1",src:$e,className:ye})})})}),(0,o.jsxs)("button",{className:le,"is-path":location.pathname===c.X||Xe("try")?"1":void 0,onClick:()=>this.nav(this.props.isLoggedIn?"/":"/try"),children:[(0,o.jsx)(ne.G,{icon:ie.VbA,className:xe}),(0,o.jsx)("span",{children:"PLAY"})]}),(0,o.jsxs)("button",{className:le,"is-path":Xe("leaderboard"),onClick:()=>this.nav("/leaderboard"),children:[(0,o.jsx)(ne.G,{icon:ie.U9S,className:xe}),(0,o.jsx)("span",{children:"LEADERBOARD"})]}),this.props.isLoggedIn&&(0,o.jsxs)("button",{className:le,"is-path":Xe("inventory"),onClick:()=>this.nav("/inventory"),children:[(0,o.jsx)(ne.G,{icon:ie.hVM,className:xe}),(0,o.jsx)("span",{children:"INVENTORY"})]}),this.props.isLoggedIn&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("button",{className:le,"is-path":Xe("deck/builder"),onClick:()=>this.nav("/deck/builder"),children:[(0,o.jsx)(ne.G,{icon:ie.hGM,className:xe}),(0,o.jsx)("span",{children:"DECK BUILDER"})]})}),(0,o.jsxs)("button",{className:le,"is-path":Xe("market"),onClick:()=>this.nav("/market/cards"),children:[(0,o.jsx)(ne.G,{icon:ie.owJ,className:xe}),(0,o.jsx)("span",{children:"MARKET"})]}),(0,o.jsxs)("button",{className:le,"is-path":Xe("shop"),onClick:()=>this.nav("/shop"),children:[(0,o.jsx)(ne.G,{icon:ie.YyO,className:xe}),(0,o.jsx)("span",{children:"SHOP"})]}),(null===(e=this.props.profile)||void 0===e?void 0:e.guildId)&&(0,o.jsxs)("button",{className:le,"is-path":Xe("guild/"+this.props.profile.guildId),onClick:()=>this.nav("/guild/"+this.props.profile.guildId),children:[(0,o.jsx)(ne.G,{icon:ie.tM1,className:xe}),(0,o.jsx)("span",{children:"GUILD"})]}),(0,o.jsxs)("button",{className:le,onClick:()=>window.location.href="/howtoplay",children:[(0,o.jsx)(ne.G,{icon:ie.sr2,className:xe}),(0,o.jsx)("span",{children:"GUIDE"})]}),this.props.isLoggedIn&&(0,o.jsxs)("div",{className:ce,onClick:()=>this.nav("/shop#gems"),children:[(0,o.jsx)("img",{className:Ie,src:Ue}),(0,o.jsx)("div",{className:Te,children:(0,o.jsx)("span",{children:null!==(s=null===(t=this.props.profile)||void 0===t?void 0:t.premiumCurrency)&&void 0!==s?s:0})})]}),this.props.isLoggedIn&&this.props.profile&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:ke,ref:this.notifs,onClick:()=>{this.setState({showNotifs:!0,hasNotifBadge:!1});const e=Math.max(...this.state.playerNotifs.map((e=>e.id)),0);localStorage.setItem("lastPlayerNotif",e.toString()),Oe.T.getPlayerNotifs().then((t=>{const s=t.filter((t=>t.id>e));s.length&&this.setState((e=>({playerNotifs:s.concat(e.playerNotifs),showNotifs:!1})),(()=>this.setState({showNotifs:!0})))}))},children:[(0,o.jsx)(ne.G,{icon:ie.qmU}),(0,o.jsx)("span",{children:"NOTIFICATIONS"}),this.state.hasNotifBadge&&(0,o.jsx)("div",{className:we})]}),(0,o.jsx)(Fe.e,{zIndex:60,anchor:this.notifs,show:this.state.showNotifs,useShellPortal:!0,onClickOut:this.hide,position:"bottom",children:(0,o.jsxs)("div",{className:Ce,children:[(0,o.jsxs)("div",{className:Pe,children:[(0,o.jsx)("h1",{children:"Notifications"}),(0,o.jsx)(Le.P,{onClick:()=>this.setState({showNotifs:!1})})]}),(0,o.jsx)("div",{className:je,children:this.state.playerNotifs.map((e=>(0,o.jsxs)("div",{className:Se,children:[(0,o.jsxs)("div",{content:"1",children:[e.cardId&&(0,o.jsx)("div",{className:Ne,children:(0,o.jsx)(Ze.y,{cardId:e.cardId,tooltip:!1,size:"native"})}),e.imageUrl&&(0,o.jsx)("div",{className:Ne,children:(0,o.jsx)("img",{src:e.imageUrl})}),(0,o.jsx)("div",{message:"1",children:e.message}),e.gemsGained&&(0,o.jsxs)("div",{notifgems:"1",children:[(0,o.jsx)("img",{className:Ie,src:Ue}),(0,o.jsx)("div",{className:Te,children:e.gemsGained>0?"+"+e.gemsGained:e.gemsGained})]}),e.usdGained&&(0,o.jsx)("div",{notifgems:"1",children:(0,o.jsx)("div",{className:Te,children:e.usdGained>0?"+$"+(0,Ae.T1)(e.usdGained):"-$"+(0,Ae.T1)(e.usdGained).replace("-","")})}),(0,o.jsx)("div",{date:"1",children:(0,qe.Z)(e.createdOnUtc,new Date,{addSuffix:!0})}),(0,o.jsx)("div",{onClick:()=>{Oe.T.deletePlayerNotif(e.id),this.setState((t=>({playerNotifs:t.playerNotifs.removeItem(e)})))},children:(0,o.jsx)(Le.P,{})})]}),e.guildInvite&&this.state.showNotifs&&(0,o.jsxs)("div",{className:De,children:[(0,o.jsx)(Me.z,{theme:"secondary",onClick:()=>We.$C.inviteAccept(e.guildInvite,!1).catch((()=>{})).then((()=>{Oe.T.deletePlayerNotif(e.id),this.setState((t=>({playerNotifs:t.playerNotifs.removeItem(e)})))})),children:"Ignore"}),(0,o.jsx)(Me.z,{onClick:()=>this.props.navigate("/guild/"+e.guildInvite),children:"View"}),(0,o.jsx)(Me.z,{onClick:()=>(0,Be.Z)((async()=>{await We.$C.inviteAccept(e.guildInvite,!0),Ke.Am.success("Joined"),Oe.T.deletePlayerNotif(e.id),this.setState((t=>({playerNotifs:t.playerNotifs.removeItem(e)}))),Xe("guild/"+e.guildInvite)?location.reload():this.props.navigate("/guild/"+e.guildInvite)})),children:"Join"})]})]},e.id))).ifEmpty((()=>(0,o.jsx)("div",{className:_e,children:"No new messages"})))})]})})]}),(0,o.jsx)("button",{className:le,href:"https://discord.gg/championstcg",target:"_blank",children:(0,o.jsx)("span",{className:Ee,children:(0,o.jsx)("img",{src:Ve,alt:"Discord"})})}),this.props.isLoggedIn&&this.props.profile&&(0,o.jsx)("button",{"is-path":Xe("profile"),onClick:()=>this.nav("/profile"),className:de,children:(0,o.jsxs)("div",{className:he,children:[(0,o.jsxs)("div",{className:ue,children:[(0,o.jsx)("div",{className:pe,children:(0,ze.K)(this.props.profile)}),(0,o.jsxs)("div",{className:me,children:["Level ",this.props.profile.level]}),(0,o.jsx)("div",{className:me,children:(0,He.getTier)(this.props.profile.rating)})]}),(0,o.jsx)("div",{className:fe,children:(0,o.jsx)(Ge.q,{className:ge,avatar:this.props.profile.avatar})})]})}),this.props.isLoggedIn?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)("button",{onClick:()=>this.nav("/login"),children:"Login"}),(0,o.jsx)(ne.G,{icon:ie.xiG,onClick:this.toggleNavbar})]})]})}}function Xe(e){return location.pathname.startsWith(c.X+e)?"1":void 0}Je([re.ZP],Qe.prototype,"toggleNavbar",null),Je([re.ZP],Qe.prototype,"hide",null);var Ye=s(51733),et=s(30836),tt=s(48305),st=s(36893);class rt extends r.PureComponent{constructor(e){super(e),this.state={showTut:!1}}componentDidUpdate(e,t,s){!e.steps.length&&this.props.steps.length&&window.scrollerRef.current.setAttribute("style","overflow: hidden")}render(){return(0,o.jsx)(st.ZP,{steps:this.props.steps,callback:e=>{if(e.step){const t="string"===typeof e.step.target?document.querySelector(e.step.target):e.step.target;null===t||void 0===t||t.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}[st.Q_.FINISHED,st.Q_.SKIPPED].includes(e.status)&&(this.props.onDone(),document.querySelectorAll('[id^="react-joyride"]').forEach((e=>e.remove())),setTimeout((()=>{window.scrollerRef.current.removeAttribute("style")})))},continuous:!0,hideBackButton:!0,hideCloseButton:!0,run:this.props.showTut,scrollToFirstStep:!1,showProgress:!1,showSkipButton:!0,styles:{options:{zIndex:1e4,arrowColor:"var(--secondary-color)",backgroundColor:"var(--secondary-color)",primaryColor:"var(--primary-color)",textColor:"white"}}})}}var ot=s(58088),nt=s(42130),it=s(78453),at=s(8875),lt=(s(63174),s(15412)),ct=s(88641),dt=(s(95259),s(17129)),ht=function(e,t,s,r){var o,n=arguments.length,i=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,s,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(n<3?o(i):n>3?o(t,s,i):o(t,s))||i);return n>3&&i&&Object.defineProperty(t,s,i),i};const ut=(0,se.lX)();class pt extends r.PureComponent{constructor(e){super(e);const t=localStorage.getItem("current-deck-id"),s=localStorage.getItem("token"),r=(0,Ae.aj)(s);this.state={loaded:!1,loggedIn:s&&!("isAnon"in r),isAdmin:s&&"CoomAdmin"in r,isAnon:s&&"isAnon"in r,tutSteps:[],selectedDeckId:t,profile:null,imxWidgets:null},(0,nt.s)(this)}async componentDidMount(){const e=(0,it.jG)();(0,lt._Y)(),await e;const[t,s,r,o]=await Promise.all([(0,ot.s8)(),(0,dt.ZO)(),Oe.T.getUser().catch((e=>null)),lt.Pt.widgets({config:{theme:ct.JE.WidgetTheme.DARK}})]);(0,at.lv)(null===r||void 0===r?void 0:r.userId),r||(localStorage.removeItem("token"),localStorage.removeItem("token-exp"));const n=o.create(ct.JE.WidgetType.CONNECT),i=o.create(ct.JE.WidgetType.WALLET),a=o.create(ct.JE.WidgetType.SWAP),l=o.create(ct.JE.WidgetType.BRIDGE),c=o.create(ct.JE.WidgetType.ONRAMP),d=o.create(ct.JE.WidgetType.SALE);this.setState((()=>({loaded:!0,profile:r,loggedIn:!!r,imxWidgets:{connect:n,wallet:i,swap:a,bridge:l,onramp:c,sale:d}})))}async getProfile(){const e=await Oe.T.getUser();(0,at.lv)(null===e||void 0===e?void 0:e.userId),this.setState({profile:e})}showTut(e){this.setState({tutSteps:e})}setDeck(e){localStorage.setItem("current-deck-id",null===e||void 0===e?void 0:e.deckId),this.setState({selectedDeckId:null===e||void 0===e?void 0:e.deckId})}renderRoutes(){return te.map((e=>{const{component:t,props:s,...n}=e,i=t,a=e.path.includes(":")?e.path+window.location.pathname:e.path,c=e.path,d=(0,r.createElement)(l.AW,{...n,path:c,element:(0,o.jsx)(mt,{GG:i,path:c,selectedDeckId:this.state.selectedDeckId,hideHeader:!1,imxWidgets:this.state.imxWidgets,isAdmin:this.state.isAdmin,profile:this.state.profile,showTut:this.showTut,getProfile:this.getProfile,isLoggedIn:this.state.loggedIn,...s}),key:a});return!e.requiresLogin||this.state.loggedIn||e.allowAnon&&this.state.isAnon?d:null}))}render(){return(0,o.jsxs)("div",{onClick:Ye.e,className:i,children:[(0,o.jsx)(ft,{history:ut,basename:c.X,children:this.state.loaded?(0,o.jsxs)(l.Z5,{children:[this.renderRoutes(),(0,o.jsx)(l.AW,{path:"*",element:(0,o.jsx)(l.Fg,{to:this.state.loggedIn?"/":"/login",replace:!0})})]}):(0,o.jsx)(tt.Z,{})}),(0,o.jsx)(rt,{steps:this.state.tutSteps,showTut:this.state.tutSteps.length>0,onDone:()=>this.setState({tutSteps:[]})},"lobby"),(0,o.jsx)(Be.$,{}),(0,o.jsx)(oe.Q,{}),(0,o.jsx)(et.pn,{}),(0,o.jsx)(Ke.Ix,{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,className:a,closeOnClick:!0,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0})]})}}function mt(e){const{GG:t,...s}=e,i=(0,l.UO)(),{hash:a}=(0,l.TH)(),c=(0,r.useRef)(null);window.scrollerRef=c;const d=(0,l.s0)(),h=(0,r.useMemo)((()=>(e,t)=>{console.log(e),d(e,{replace:t})}),[d]);return(0,o.jsxs)(o.Fragment,{children:[!e.hideHeader&&(0,o.jsx)(Qe,{navigate:h,isLoggedIn:e.isLoggedIn,profile:e.profile,path:e.path}),(0,o.jsx)("div",{className:n,ref:c,children:(0,o.jsx)(t,{showTut:e.showTut,params:i,hash:a,profile:e.profile,navigate:h,...s})})]})}ht([re.ZP],pt.prototype,"getProfile",null),ht([re.ZP],pt.prototype,"showTut",null);class ft extends r.Component{constructor(e){super(e),this.state={action:e.history.action,location:e.history.location}}componentDidMount(){this.props.history.listen((e=>{this.setState(e)}))}render(){return(0,o.jsx)(l.F0,{basename:this.props.basename,children:this.props.children,location:this.state.location,navigationType:this.state.action,navigator:this.props.history})}}},8875:(e,t,s)=>{"use strict";s.d(t,{XD:()=>r,HR:()=>i,lv:()=>a});var r,o=s(46174),n=s(19688);function i(e,t={}){if(n.vc.amplitudeKey)try{if(localStorage.getItem("no-track"))return;t.referrer=document.referrer,o.j(e,t)}catch(s){}}function a(e){o.Iv(e)}n.vc.amplitudeKey&&o.S1(n.vc.amplitudeKey,{defaultTracking:{attribution:!0,pageViews:!0,sessions:!0,formInteractions:!0,fileDownloads:!0}}),function(e){e.ButtonClick="ButtonClick",e.StartGame="StartGame",e.JoinQueue="JoinQueue",e.LeaveQueue="LeaveQueue",e.CreateNewAccount="CreateNewAccount",e.VerifyNewAccount="VerifyNewAccount",e.LinkWallet="LinkWallet",e.ClickBuyItem="ClickBuyItem"}(r||(r={})),window.setNoTrack=function(){localStorage.setItem("no-track","1")}},35316:(e,t,s)=>{"use strict";var r;s.d(t,{X:()=>o});const o=null!==(r="/app/")?r:"/"},15412:(e,t,s)=>{"use strict";s.d(t,{pQ:()=>n,Pt:()=>i,_Y:()=>a});var r=s(88641),o=s(19688);let n,i;function a(){try{n=new r.mN.Passport({baseConfig:{environment:o.vc.debug?r.vc.Environment.SANDBOX:r.vc.Environment.PRODUCTION,publishableKey:o.vc.immutablePubKey},clientId:o.vc.immutableClientId,redirectUri:location.origin+(location.origin.startsWith("https:")?"/app":"")+"/redirect",logoutRedirectUri:location.origin+(location.origin.startsWith("https:")?"/app":"")+"/logout",audience:"platform_api",scope:"openid offline_access email transact",popupOverlayOptions:{disableGenericPopupOverlay:!1,disableBlockedPopupOverlay:!1}}),i=new r.JE.Checkout({baseConfig:{environment:o.vc.debug?r.vc.Environment.SANDBOX:r.vc.Environment.PRODUCTION,publishableKey:o.vc.immutablePubKey},bridge:{enable:!0},swap:{enable:!0},onRamp:{enable:!0},passport:n})}catch(e){console.error(e)}}},19688:(e,t,s)=>{"use strict";s.d(t,{vc:()=>r,de:()=>o});const r={backendUrl:"https://api.championstcg.com",version:"1670",amplitudeKey:"498d195c3dd6744d8bf30dea57ec0cc7",cardCollectionAddress:"0x0b82d8cbc10bb9400a5b9572b3993c47d6ec7f3f",packCollectionAddress:"0xa6e5e7864b83eb6ab6ca95bee4ad898c27cbd1ea",immutableClientId:"MuwyvLYQSE4MXwh422ASeLyeBiUE0sPE",immutablePubKey:"pk_imapik--4uaojU18sHxw4GMPBeI",immutableEnvironmentId:"a19c9177-1982-496f-b316-d644eeb2b51e",immutableImportAddress:"0x5A5cec06dAb1D65b6a9425A643dEB6969FF88B25",hcAppId:"647a2e8e84940994f6aeb634",debug:!1,apiTimeoutMs:parseInt("MISSING_ENV_VAR".API_TIMEOUT_MS)||15e3},o=(console.log,console.error);!1===r.debug&&(console.log=()=>{},console.warn=()=>{}),window._config=function(){return JSON.stringify(r,void 0,4)}},5586:(e,t,s)=>{"use strict";s.d(t,{G:()=>r,m:()=>i});var r,o=s(51918),n=s(58088);!function(e){e.Standard="Standard",e.FreePlay="FreePlay",e.Legacy="Legacy",e.Arena="Arena"}(r||(r={}));class i{builderText(e){const t=e.reduce(((e,t)=>e+t.count),0);return{deckCount:t,deckCountValid:35===t}}baseValidate(e,t){const s=Object.entries((0,o.vM)(t,(e=>e.championNumber))).filter((e=>e[1].length>2));if(s.length>0&&("Gemini, Pure Elemental"===(null===e||void 0===e?void 0:e.id)&&s.some((e=>"958"===e[0]&&e[1].length<=6))&&s.removeAll((e=>"958"===e[0])),s.length>0))return`Cannot have more than 2 copies of a Champion. Has ${s.map((e=>e[1].length+" "+e[1][0].name)).join(", ")}`;if(!e)return"Deck must have a Hero";const r=t.filter((t=>!e.validElements.some((e=>e===t.element))));if(r.length>0)return`Cannot have cards that are not in your Hero's elements (${e.validElements.join(", ")}). Has ${r.map((e=>e.name)).join(", ")}`;if(e.champion){const s=t.filter((t=>t.championNumber==e.champion));if(958===e.champion?0===s.length:1!=s.length){const t=(0,n.wC)(e.champion.toString());return`Using Hero ${e.id} requires exactly one copy of card ${t.name} (${e.champion}) in your deck. You have ${s.length} copies`}}return 35!==t.length?`A deck must have 35 cards. Currently has ${t.length}`:void 0}}},93216:(e,t,s)=>{"use strict";s.d(t,{bd:()=>l,wp:()=>c,hA:()=>d});var r=s(5586);class o extends r.m{constructor(){super(...arguments),this.description="Solo Draft and battle other Heroes until your Deck reaches a certain number of wins or losses",this.name="Arena",this.format=r.G.Arena}validate(e,t){return null}isInFormat(e){return!0}}class n extends r.m{constructor(){super(...arguments),this.description="Casual Constructed Queue with all Card Sets",this.name="Free Play",this.format=r.G.FreePlay}validate(e,t){return super.baseValidate(e,t)}isInFormat(e){return!0}}class i extends r.m{constructor(){super(...arguments),this.description="Ranked Constructed Queue with all Card Sets",this.name="Legacy",this.format=r.G.Legacy}validate(e,t){return super.baseValidate(e,t)}isInFormat(e){return!0}}class a extends r.m{constructor(){super(...arguments),this.description="Ranked Constructed Queue with Cards only available in Standard. This is the default Game Mode",this.name="Standard",this.format=r.G.Standard}validate(e,t){const s=super.baseValidate(e,t);if(s)return s;const r=t.filter((e=>!this.isInFormat(e)));return r.length>0?`Cannot have non Generation 2 - 6 cards. Has ${r.map((e=>e.name)).join(", ")}`:t.some((e=>451==e.championNumber))?"Fuku is banned in this format":void 0}isInFormat(e){return 5===e.generation||2===e.generation||3===e.generation||4===e.generation||6===e.generation}}const l=[new a,new i],c=[new a,new i,new o],d=[new a,new i,new o,new n]},71508:(e,t,s)=>{"use strict";function r(e){let t="";switch(e.startsWith("Equip:")&&(t="Gives an ability to the targeted Card."),e.split(" (")[0]){case"Equip: (Ability)":t="Gives an ability to the targeted Card.";break;case"Hatch":t="On Death: Summon a Hatchling. Can also evolve into any Card of the same Element.";break;case"Provoke":t="Force the enemy to attack and target this Card.";break;case"Rush":t="Can attack as soon as it's summoned.";break;case"Guard":t="Immune to enemy direct ability targeting.";break;case"Greed":t="Draw 1 Card, If you have no Cards on the field, draw 2.";break;case"Aegis":t="Immune to all Damage, breaks the first time any Damage is taken.";break;case"Berserker":t="When this Card takes Damage, it gains (x) attack. (Default 4)";break;case"Fortify":t="This Card gains HP equal to the 3x the amount of Cards on the enemy field when summoned.";break;case"Armored":t="Damage this Card takes is reduced by (x)";break;case"Obliterate":t="Remove a Card and all copies of it from the Game.";break;case"Wealth Tax":t="Each Player takes Damage equal to the amount of Cards in their hand.";break;case"Steal":t="Draw the top Card of the enemy deck.";break;case"Yeet!":t="Discard a Card from your hand to deal (x) Damage to the enemy Player.";break;case"Overkill":t="Extra Damage hits the enemy Player directly.";break;case"Honk Honk":t="Play a horn, then lose the Game.";break;case"Otherworldly":t="Buff all Cards on your field that match this Element, equal to the mana cost of this Card.";break;case"Divine Equilibrium":t="Gain 1 extra mana for this turn. Immune to all direct ability targeting.";break;case"Elemental Fury":t="This Card can attack an additional time for each other Card of the same Element on your field.";break;case"Elemental Guard":t="While this Card is on the field, all Cards of this same Element on your field have Guard.";break;case"Elemental Aegis":t="When this Card enters the field, it gains a stack of Aegis for each Card of the same Element on your field.";break;case"Wildfire":t="When you play a Card, deal (x) Damage to a random enemy Card. If there is no enemy Cards, deal Damage to opponents instead (Default 1)";break;case"Combustion":t="Deal 6 Damage to anything, you take 6 Damage.";break;case"Inferno":t="Damage (x) random enemy Cards, and this Card, for 1-7 Damage. (Default 2)";break;case"Smoldering":t="On Death: Summon 3 Luci's.";break;case"Hydroblast":t="Deal 7 Damage to any Card on the field with 7 or more HP.";break;case"Tsunami":t="Deal 3 Damage to any Card on the field, then 1 Damage to the rest of that field.";break;case"Vortex":t="Directly Damage the enemy Player for (x). (Default 4)";break;case"Revitalize":t="Every time this Card attacks the enemy Player, you gain 1 mana.";break;case"Ocean's Wrath":t="At the start of each of your turns: Summon a Dreadfin, Krakapuss, or Abyssalysk.";break;case"Lifebloom":t="Increase the HP of any Card or any Player by (x). (Default 4)";break;case"Regrowth":t="On Death: Increase the HP of all your Cards on the field, and yourself, by (x). (Default 3)";break;case"Equality":t="On Death: Heal the lowest health Player for 12.";break;case"Fungal Spores":t="Deal 5 Damage to all Cards with 5 HP or less.";break;case"Earthquake":t="Damage all Cards except this Card for (x). (Default 2)";break;case"Mud Flood":t="Shuffle (x) Turdies into the enemies deck.";break;case"Rock Solid":t="Immune to retaliation Damage.";break;case"Sand Storm":t="Blind all Cards on the enemy field for one turn, they cannot attack.";break;case"Blizzard":t="Freeze any Card for 1 turn. Frozen Cards cant attack or evolve, and do no retaliation Damage.";break;case"Shatter":t="On Death: Summons 2 Icecoobs.";break;case"Icicle":t="Deal (x) Damage to anything.";break;case"Deep Freeze":t="Enemy Player cant draw or play any Cards next turn.";break;case"Whirlwind":t="Send any Card with (x) HP or less back to the owners hand. (Default 5)";break;case"Windseeker":t="Draw the targets next evolution from your deck if possible, otherwise, just draw a Card.";break;case"Typhoon":t="Every enemy including enemy Player takes 8 Damage.";break;case"Lucky Gust":t="Discard your hand and draw that many Cards +1.";break;case"Curse":t="Reduce the Attack and HP of any Card by (x). (Default 2)";break;case"Psybeam":t="Swap the HP and Attack of any Card, then increase the HP of this Card by the difference.";break;case"Hex":t="Turn any Card into a random Card with 3 HP or less.";break;case"Shrouded":t="This Card cannot be directly targeted or attacked until it attacks the first time.";break;case"Bless":t="Increase the attack of any Card by (x). (Default 3)";break;case"Retribution":t="On Death: Damage every Card on the enemy field for (x). (Default 4)";break;case"Light of Aldric":t="Whenever this card would die, ignore that death and reset it's stats. This only occurs once.";break;case"Holy War":t="While this Card is on the field, every Light Card on your field gains +4/+4, and Rush.";break;case"Raise Dead":t="Lose (x) life, then resurrect the Card on top of your graveyard. (Default 6)";break;case"Soul Reaper":t="When any other Card dies, this Card gains (x) Attack and HP. (Default 1)";break;case"Slay":t="Kill a Damaged Card.";break;case"Death Wish":t="Lose 60 Life, Play your entire hand for no mana cost, Draw 9.";break;case"Lifesteal":t="This Card gains HP equal to the Damage it does.";break;case"Zap":t="When this Card is summoned or attacks, 2 random enemy Cards or Players are Damaged for 2, also zaps Cards that attack it.";break;case"Supercharge":t="If you have 10 or more Cards in your hand, this Card summons with double stats and Rush.";break;case"Storm Caller":t="When this Card attacks, all Air Cards on your field gain +(x)/+(x)";break;case"Thunder Bolt":t="Deal (x) Damage to the enemy Player for each Card they have on the field.";break;case"Singularity":t="After one full turn: Destroy all Cards on the field, this Card gets +4/+4 for each Card destroyed.";break;case"Quantum Shift":t="Swap this Card with the lowest HP Card on the enemy field.";break;case"Time Warp":t="Force a Card to evolve (x) times.";break;case"Infinite Strike":t="This Card can attack again if it just attacked an enemy Card.";break;case"Devolve":t="Evolve a Card back 1 Evolution";break;case"Genetic Split":t="After this Card deals direct Player Damage, it creates a random evolution based on your current hero.";break;case"Harvest":t="Add a random Lily to your hand.";break;case"Arson":t="Damage a random friendly Card for 3, draw a Card.";break;case"Self Destruct":t="At the start of each turn: Damage both Players for (x).";break;case"Recruit":t="When this Card enters the field, Summon 2 Nortis.";break;case"Rising Waters":t="Gains +1/+1 whenever any Card enters the field.";break;case"Afterlife":t="On Death: Summon (x) Fonteria.";break;case"Family":t="When Morris and Doris are on the field, Boris gains Rush, Rock Solid, and Infinite Strike.";break;case"Tempest":t="When this Card enters the field, return all other friendly Cards to your hand, it then gains +1/+2 for each Card returned.";break;case"Die":t="If you have more than 10 HP remaining, this Card dies when it enters the field.";break;case"Shy":t="When this Card takes any non fatal Damage, it's returned to your Hand.";break;case"Purify":t="Reset a target Card back to its base stats and prevent any of it's effects from triggering.";break;case"Divine Protection":t="You cant take direct Player Damage until your next turn.";break;case"Blossom":t="If you have ever had 4 or more Mana, this Card's base stats are permanently doubled.";break;case"Graverobber":t="When this Card enters the Battlefield, move the top Card from your opponent's Graveyard to your Hand.";break;case"Double Strike":t="This Card can attack an additional time.";break;case"Hagakure":t="At the end of your turn, destroy the highest attack enemy Champion with Life less than this Card's attack and put a random Lily into your Hand, then +2/+0 this Card."}return t||""}s.d(t,{z:()=>r})},17129:(e,t,s)=>{"use strict";s.d(t,{ZO:()=>n,Cc:()=>i,cK:()=>a});var r=s(23149);let o=[];function n(){return r.W.getHeroes().then((e=>(o=e,e))).catch((e=>null))}function i(){return o}function a(e){for(const t of o)if(t.id===e)return t;return null}window._getHero=a},58088:(e,t,s)=>{"use strict";s.d(t,{s8:()=>i,hY:()=>a,yG:()=>l,KZ:()=>c,ik:()=>d,wC:()=>h,z5:()=>u});var r=s(23149);let o=[],n=[];function i(){return r.W.getSets().then((e=>{o=e,n=e.toReversed()})).catch((e=>null))}function a(){return o}function l(){return n}function c(e){return o.find((t=>t.generation==e))||{generation:e,name:`Generation ${e}`,cards:[],hasPacks:!1}}function d(){const e=Math.max(...o.map((e=>e.generation)));return o.find((t=>t.generation==e))}function h(e){for(const t of o)for(const s of t.cards)if(s.cardId===e)return s;throw new Error(`Card not found for ${e}`)}function u(e){const t=e.toLowerCase();return o.flatMap((e=>e.cards.filter((e=>e.name.toLowerCase().includes(t)||e.cardId.toLowerCase().includes(t)))))}window._getSet=c},61938:(e,t,s)=>{"use strict";s(70746);const r=e=>{e&&e instanceof Function&&s.e(216).then(s.bind(s,8030)).then((({getCLS:t,getFID:s,getFCP:r,getLCP:o,getTTFB:n})=>{t(e),s(e),r(e),o(e),n(e)}))};(0,s(77169).createHub)({enableLogging:!1});Array.prototype.remove=function(e){if("function"===typeof e){const t=this.findIndex(e);return!!~t&&(this.splice(t,1),!0)}{const t=this.indexOf(e);return!!~t&&(this.splice(t,1),!0)}},Array.prototype.removeAll=function(e){if("function"===typeof e){const t=this.filter((t=>!e(t)));return this.splice(0,this.length),this.push(...t),this}{const t=this.filter((t=>t!==e));return this.splice(0,this.length),this.push(...t),this}},Array.prototype.last=function(e){return this[this.length-1-(e||0)]},Array.prototype.removeItem=function(e){const t=this.indexOf(e);if(~t){const e=this.slice();return e.splice(t,1),e}return this},Array.prototype.ifEmpty=function(e){return 0===this.length?e():this},Array.prototype.single=function(e){if(e){const t=this.filter(e);if(1!==t.length)throw console.error("Stack here with predicate"),new Error("Not single with predicate. Actual length: "+t.length+". "+e);return t[0]}if(1!==this.length)throw console.error("Stack here no predicate"),new Error("Not single. Actual length: "+this.length);return this[0]},Array.prototype.insert=function(e,t){return this.splice(e,0,t),this},Array.prototype.insertItem=function(e,t){const s=this.slice();return s.splice(e,0,t),s},Array.prototype.insertEnd=function(e){return this.push(e),this},Array.prototype.append=function(e){return[...this,e]},Array.prototype.findReplace=function(e,t){if("function"===typeof e)for(let s=0;s<this.length;s++){if(e(this[s])){const e=this.slice();return e.splice(s,1,t),e}}else{const s=this.indexOf(e);if(~s){const e=this.slice();return e.splice(s,1,t),e}}return this},Array.prototype.replaceIndex=function(e,t){if(this.length>e){const s=this.slice();return s.splice(e,1,t),s}return this},Array.prototype.insert=function(e,t){return this.splice(e,0,t),this},Array.prototype.replace=function(e,t){if("function"===typeof e)for(let s=0;s<this.length;s++){if(e(this[s]))return this.splice(s,1,t),!0}else{const s=this.indexOf(e);if(~s)return this.splice(s,1,t),!0}return!1},Array.prototype.fillTo=function(e){if(this.length<e){const t=e-this.length,s=new Array(t);return[...this,...s]}return this};var o=s(35316);var n=s(89990),i=s(39953),a=s(25525),l=s(42130),c=s(19688),d=s(14525),h=s.n(d),u=s(52753),p=s(78453);let m=!1;function f(e,t,s,r,o){var n;const i=`${c.vc.backendUrl}/api/v1/log/error`;o&&(e=e.split("\n    at")[0]);const a=new u.UAParser,d=a.getBrowser(),h=a.getOS(),f=null===(n=null===l.D||void 0===l.D?void 0:l.D.state.profile)||void 0===n?void 0:n.userId;e+=`\n${d.name} ${d.version} ${h.name} ${h.version}\nUserId: ${f} Version: ${c.vc.version}`,e+="\n"+window.location.pathname;const g={message:e+="\n webGL "+m,source:t,lineno:s,colno:r,stack:o};(0,p.ZP)({url:i,method:"POST",data:g}).catch((()=>{}))}window.addEventListener("load",(()=>{m=function(){try{const e=document.createElement("canvas");return!(!window.WebGLRenderingContext||!e.getContext("webgl")&&!e.getContext("experimental-webgl"))}catch(e){return!1}}()})),window.onerror=function(e,t,s,r,o){try{(o&&o instanceof Error?h().fromError(o):h().get()).then((n=>{f("string"===typeof e?e:o.message,t,s,r,n.map((e=>e.toString())).join("\n"))}))}catch(n){}},console.error=function(...e){try{c.de.apply(console,e);const t=e.find((e=>e instanceof Error));(t?h().fromError(t):h().get()).then((t=>{f(e.filter((e=>e)).map((e=>e instanceof Error?e.message:e+"")).join(" "),null,null,null,t.map((e=>e.toString())).join("\n"))}))}catch(t){}};s(8875);Error.stackTraceLimit=24;n.createRoot(document.getElementById("root")).render(i.createElement(a.$)),window.addEventListener("load",(()=>{"serviceWorker"in navigator&&!window.location.host.includes("localhost")&&s.e(216).then(s.bind(s,63726)).then((e=>{sessionStorage.setItem("sw-waiting","1");const t=e.Workbox,s=e.messageSW;let r=null;window.swReload=function(){(null===r||void 0===r?void 0:r.waiting)?s(r.waiting,{type:"SKIP_WAITING"}).then((()=>{window.location.reload()})):window.location.reload()};const n=new t(o.X+"sw.js");n.addEventListener("waiting",(()=>{console.log("A new service worker has installed, but it can't activate until all tabs running the current version have fully unloaded.");const e=document.createElement("div");e.className="sw-toast",e.innerHTML='A new version of Champions TCG is available. Click <a style="text-decoration: none;" href="javascript:window.swReload()">here</a> to reload.',window.document.body.append(e)})),n.addEventListener("installed",(()=>{console.log("Load done"),sessionStorage.removeItem("sw-waiting"),window.dispatchEvent(new Event("storage"))})),new BroadcastChannel("sw-install-channel").onmessage=e=>{console.log("Load done ev"),sessionStorage.removeItem("sw-waiting"),window.dispatchEvent(new Event("storage"))},n.register().then((e=>{r=e,e.installing||(console.log("Already installed"),sessionStorage.removeItem("sw-waiting"),window.dispatchEvent(new Event("storage")))})).catch((e=>{console.error(e),sessionStorage.removeItem("sw-waiting"),window.dispatchEvent(new Event("storage"))})),setInterval((()=>{n.update()}),36e5)}))})),r()},12914:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>k,getTier:()=>P});var r=s(91874),o=s(98656),n=s(39953),i=s(3257),a=s(50293);const l="styles_root__yU+zB",c="styles_header__kcZUe",d="styles_content__q9lPU",h="styles_rating__UTaUe",u="styles_note__M6tOt",p="styles_tableRoot__vKJX5";var m=s(5586),f=s(93216),g=s(10007),y=s(46298),b=s(50787),v=s(96490),x=function(e,t,s,r){var o,n=arguments.length,i=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,s,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(n<3?o(i):n>3?o(t,s,i):o(t,s))||i);return n>3&&i&&Object.defineProperty(t,s,i),i};class k extends n.PureComponent{constructor(e){super(e),this.state={format:this.props.params.format||m.G.Standard,mode:"Players",rows:[]},this.query=new b.$}componentDidMount(){(0,a.Z)((async()=>{const e="Players"===this.state.mode?await g.A.getPlayersLeaderboard(this.state.format):await g.A.getGuildsLeaderboard(this.state.format);this.setState({rows:e})}))}changeFormat(e){(0,a.Z)((async()=>{const t="Players"===this.state.mode?await g.A.getPlayersLeaderboard(e):await g.A.getGuildsLeaderboard(e);this.setState({format:e,rows:t})}))}changeMode(e){(0,a.Z)((async()=>{const t="Players"===e?await g.A.getPlayersLeaderboard(this.state.format):await g.A.getGuildsLeaderboard(this.state.format);this.setState({mode:e,rows:t})}))}renderGuildTable(){return(0,r.jsxs)(y.y4,{query:this.query,columns:10,allowColumnSort:!0,breakOn:"md",stickyHeaderScrollRef:window.scrollerRef,className:p,data:this.state.rows,onChange:e=>this.setState({rows:e}),children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{}),(0,r.jsx)("th",{children:"Rank"}),(0,r.jsx)("th",{children:"Guild"}),(0,r.jsx)("th",{align:"right",children:"Tier"}),(0,r.jsx)("th",{align:"right",className:h,children:"Rating"}),(0,r.jsx)("th",{align:"right",children:"Wins"}),(0,r.jsx)("th",{align:"right",children:"Losses"}),(0,r.jsx)("th",{align:"right",children:"Total"}),(0,r.jsx)("th",{align:"right",children:"Win Rate"}),(0,r.jsx)("th",{})]})}),(0,r.jsx)("tbody",{children:this.state.rows.map(((e,t)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:w(t)}),(0,r.jsx)("td",{children:t+1}),(0,r.jsx)("td",{children:e.name}),(0,r.jsx)("td",{align:"right",children:e.guildTier}),(0,r.jsx)("td",{align:"right",children:e.elo}),(0,r.jsx)("td",{align:"right",children:e.winCount}),(0,r.jsx)("td",{align:"right",children:e.lossCount}),(0,r.jsx)("td",{align:"right",children:e.winCount+e.lossCount}),(0,r.jsx)("td",{align:"right",children:C(e.winCount,e.lossCount)}),(0,r.jsx)("td",{children:e.id&&(0,r.jsx)(v.rU,{to:`/guild/${e.id}`,children:"View"})})]},e.name+e.winCount+t)))})]},"guild")}renderPlayerTable(){return(0,r.jsxs)(y.y4,{query:this.query,columns:10,allowColumnSort:!0,breakOn:"md",stickyHeaderScrollRef:window.scrollerRef,className:p,data:this.state.rows,onChange:e=>this.setState({rows:e}),children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{}),(0,r.jsx)("th",{children:"Rank"}),(0,r.jsx)("th",{children:"Player"}),(0,r.jsx)("th",{align:"right",children:"Level"}),(0,r.jsx)("th",{align:"right",children:"Tier"}),(0,r.jsx)("th",{align:"right",className:h,children:"Rating"}),(0,r.jsx)("th",{align:"right",children:"Wins"}),(0,r.jsx)("th",{align:"right",children:"Losses"}),(0,r.jsx)("th",{align:"right",children:"Total"}),(0,r.jsx)("th",{align:"right",children:"Win Rate"})]})}),(0,r.jsxs)("tbody",{children:[(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:10,children:(0,r.jsx)("div",{className:u,children:"At the end of each season, the top players will be rewarded with rare and unique cards."})})}),this.state.rows.map(((e,t)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:w(t)}),(0,r.jsx)("td",{children:t+1}),(0,r.jsx)("td",{children:e.name}),(0,r.jsx)("td",{align:"right",children:e.playerLvl||"1"}),(0,r.jsx)("td",{align:"right",children:P(e.elo)}),(0,r.jsx)("td",{align:"right",children:e.elo}),(0,r.jsx)("td",{align:"right",children:e.winCount}),(0,r.jsx)("td",{align:"right",children:e.lossCount}),(0,r.jsx)("td",{align:"right",children:e.winCount+e.lossCount}),(0,r.jsx)("td",{align:"right",children:C(e.winCount,e.lossCount)})]},e.name+e.winCount+t)))]})]},"players")}render(){return(0,r.jsxs)("div",{className:l,children:[(0,r.jsxs)("div",{className:c,children:[(0,r.jsx)(i.P,{value:this.state.format,onChange:this.changeFormat,titleTransform:e=>f.wp.find((t=>t.format===e)).name,children:f.wp.map((e=>(0,r.jsx)(i.Q,{value:e.format,children:e.name},e.format)))}),(0,r.jsx)(i.P,{value:this.state.mode,onChange:this.changeMode,children:["Players","Guilds"].map((e=>(0,r.jsx)(i.Q,{value:e,children:e},e)))})]}),(0,r.jsx)("div",{className:d,children:"Players"===this.state.mode?this.renderPlayerTable():this.renderGuildTable()})]})}}function w(e){return 0==e?"\ud83d\udc51":e<10?"\ud83c\udfc6":e<100?"\ud83d\udd2e":""}function C(e=0,t=0){var s;const r=null===(s=(e/(e+t)*100).toString().match(/^-?\d+(?:\.\d{0,2})?/))||void 0===s?void 0:s[0];return r?r+"%":""}function P(e){return e<=1100?"Turdie":e<=1200?"Noob":e<=1300?"Coomer":e<=1400?"Knight":e<=1500?"Captain":e<=1600?"Warlord":e<=1700?"King":e<=1800?"Titan":e<=1900?"Demigod":e<=2e3?"Vanguard":e<=2100?"Ascendant":e<=2200?"Celestial":e<=2300?"Supreme":e<=2400?"Demigod":e<=2500?"Immortal":e<=2600?"Legendary":e<=2700?"Overlord":e<=2800?"Sovereign":e<=2900?"Eternal":e<=3e3?"Coomlord":"Otherworldly Champion"}x([o.ZP],k.prototype,"changeFormat",null),x([o.ZP],k.prototype,"changeMode",null)},48305:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var r=s(91874),o=s(39953);const n="styles_root__G4JAn";const i=[s(85069),s(42394),s(9490)];class a extends o.PureComponent{constructor(e){super(e),this.state={img:i[Math.floor(Math.random()*i.length)]}}render(){return(0,r.jsx)("div",{className:n,children:void 0===this.props.progress?(0,r.jsx)("div",{children:"\u21a2 Loading \u21a3"}):(0,r.jsxs)("div",{children:["\u21a2 Loading ",this.props.progress,"% \u21a3"]})})}}},90229:(e,t,s)=>{"use strict";s.d(t,{q:()=>a});var r=s(91874),o=s(39953);const n="styles_avatar__k6k1Y";var i=s(35316);class a extends o.PureComponent{constructor(e){super(e)}render(){const e=this.props.avatar.startsWith("https")?this.props.avatar:i.X+this.props.avatar;return(0,r.jsx)("div",{avatar:"1",className:n,style:{backgroundImage:`url(${e})`},alt:"Avatar"})}}a.defaultProps={}},30372:(e,t,s)=>{"use strict";s.d(t,{z:()=>i});var r=s(91874),o=s(39953);const n="styles_button__Imhl4";class i extends o.PureComponent{constructor(e){super(e),this.state={}}render(){return(0,r.jsx)("button",{...this.props,className:`${n} ${this.props.className}`})}}i.defaultProps={className:"",theme:"primary",type:"button"}},63174:(e,t,s)=>{"use strict";s.d(t,{Zb:()=>h,eW:()=>m,iR:()=>p,Ol:()=>u,ll:()=>g});var r=s(91874),o=s(39953);const n="styles_card__Wou4S",i="styles_cardHeader__O2of-",a="styles_cardFooter__PgZof",l="styles_cardBody__QkNNC",c="styles_cardTitle__1K2ud",d="styles_cardImg__cEBHa";class h extends o.PureComponent{constructor(e){super(e),this.state={}}render(){return(0,r.jsx)("div",{id:this.props.id,card:"1",className:`${n} ${this.props.className}`,children:this.props.children})}}h.defaultProps={className:""};class u extends o.PureComponent{constructor(e){super(e),this.state={}}render(){return(0,r.jsx)("div",{"card-header":"1",className:`${i} ${this.props.className}`,children:this.props.children})}}u.defaultProps={className:""};class p extends o.PureComponent{constructor(e){super(e),this.state={}}render(){return(0,r.jsx)("div",{className:`${a} ${this.props.className}`,children:this.props.children})}}p.defaultProps={className:""};class m extends o.PureComponent{constructor(e){super(e),this.state={},this.ref=o.createRef()}render(){return(0,r.jsx)("div",{ref:this.ref,className:`${l} ${this.props.className}`,children:this.props.children})}}m.defaultProps={className:""};class f extends o.PureComponent{constructor(e){super(e),this.state={}}render(){return(0,r.jsx)("img",{...this.props,className:`${d} ${this.props.className}`})}}f.defaultProps={className:""};class g extends o.PureComponent{constructor(e){super(e),this.state={}}render(){return(0,r.jsx)("h3",{className:`${c} ${this.props.className}`,children:this.props.children})}}g.defaultProps={className:""}},51733:(e,t,s)=>{"use strict";s.d(t,{L:()=>o,e:()=>n});var r=s(39953);class o extends r.PureComponent{constructor(e){super(e),this.windowClick=this.windowClick.bind(this),this.props.excludeShellPortalElements&&(this.shellPortal=document.getElementById("shell-portal"))}componentDidMount(){setTimeout((()=>{this.unmounted||i.push(this)}))}componentWillUnmount(){this.unmounted=!0,i.remove(this)}windowClick(e){if(!this.unmounted&&this.element&&!this.props.disable){let t;this.props.excludeElements&&(t=this.props.excludeElements.flatMap((e=>Array.from(document.querySelectorAll(e)))).filter((e=>null!==e))),this.didClick||this.element&&this.element.contains(e.target)||this.props.excludeShellPortalElements&&this.shellPortal.contains(e.target)||t&&t.some((t=>t.contains(e.target)))||this.props.onClick(e),this.didClick=null,this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}}render(){const e=r.Children.only(this.props.children),t=e.props.onClick;return r.cloneElement(e,{onClick:e=>{this.handleClickIn(),t&&t(e)},ref:t=>{this.element=t;const s=e.ref;s&&t&&("current"in s?s.current=t:s(t))}})}handleClickIn(){this.didClick=!0,this.timeout=setTimeout((()=>{this.didClick=null}))}}function n(e){for(const t of i)t.windowClick(e)}o.defaultProps={},o.propTypes={};const i=[]},20841:(e,t,s)=>{"use strict";s.d(t,{Q:()=>c,V:()=>d});var r=s(91874),o=s(39953),n=s(72857),i=s(30372);const a="styles_content__wVVdr";let l=null;class c extends o.PureComponent{constructor(e){super(e),this.state={show:!1,options:null}}show(e){this.setState({show:!0,options:e})}componentDidMount(){l=this}render(){var e,t,s,o,l,c,d,h,u,p,m;return(0,r.jsxs)(n.u_,{show:this.state.show,onClose:()=>this.onCancel(),title:(null===(e=this.state.options)||void 0===e?void 0:e.title)||"Confirm",zIndex:null===(t=this.state.options)||void 0===t?void 0:t.zIndex,formContext:!0,children:[(0,r.jsxs)(n.hz,{children:[(null===(s=this.state.options)||void 0===s?void 0:s.content)&&(0,r.jsx)("div",{className:a,children:null===(o=this.state.options)||void 0===o?void 0:o.content}),null===(l=this.state.options)||void 0===l?void 0:l.node]}),(0,r.jsx)(n.mz,{children:(null===(c=this.state.options)||void 0===c?void 0:c.footer)?this.state.options.footer((e=>{e?this.onConfirm():this.onCancel()})):(0,r.jsxs)(r.Fragment,{children:[!(null===(d=this.state.options)||void 0===d?void 0:d.hideCancel)&&(0,r.jsx)(i.z,{onClick:()=>this.onCancel(),type:(null===(h=this.state.options)||void 0===h?void 0:h.hideConfirm)?"submit":"button",theme:"secondary",children:(null===(u=this.state.options)||void 0===u?void 0:u.cancelText)||"Cancel"}),!(null===(p=this.state.options)||void 0===p?void 0:p.hideConfirm)&&(0,r.jsx)(i.z,{onClick:()=>this.onConfirm(),theme:"primary",autoFocus:!0,type:"submit",children:(null===(m=this.state.options)||void 0===m?void 0:m.confirmText)||"Confirm"})]})})]})}hide(){this.setState({show:!1,options:null})}onConfirm(){var e;null===(e=this.state.options)||void 0===e||e.resolve(!0),this.hide()}onCancel(){var e;null===(e=this.state.options)||void 0===e||e.resolve(!1),this.hide()}}function d(e){return new Promise((t=>l.show({...e,resolve:t})))}},73031:(e,t,s)=>{"use strict";s.d(t,{e:()=>h});var r=s(91874),o=s(39953);const n="styles_root__FYiTW";var i=s(31804),a=s(51733),l=s(14168),c=s(98656),d=function(e,t,s,r){var o,n=arguments.length,i=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,s,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(n<3?o(i):n>3?o(t,s,i):o(t,s))||i);return n>3&&i&&Object.defineProperty(t,s,i),i};class h extends o.PureComponent{constructor(e){super(e),this.state={pos:null,style:{visibility:"hidden"},attrs:null},this.scrollBounds=[],this.popup=o.createRef()}componentWillUnmount(){for(const e of this.scrollBounds)e.removeEventListener("scroll",this.onpositionFloat);this.scrollBounds=[]}onpositionFloat(){this.props.show&&!this.pendingPositionFloat&&(this.pendingPositionFloat=!0,requestAnimationFrame(this.positionFloat))}initializeAnchor(){if(!this.anchor&&("string"===typeof this.props.anchor?this.anchor=document.getElementById(this.props.anchor):"current"in this.props.anchor?this.anchor=this.props.anchor.current:this.anchor=this.props.anchor,this.anchor)){let e=this.anchor.parentElement;for(;e;)!this.scrollBounds.includes(e)&&(0,l.a9)(e)&&(e.addEventListener("scroll",this.onpositionFloat),this.scrollBounds.push(e)),e=e.parentElement}}positionFloat(){this.pendingPositionFloat=!1,this.initializeAnchor();let e={};if(this.anchor&&(0,l.v4)(this.anchor)){const t=this.props.useShellPortal?this.anchor.getBoundingClientRect():(0,l.D5)(this.anchor),s={x:0,y:0},r=window.innerWidth,o=window.innerHeight,n=this.popup.current.clientWidth,i=this.popup.current.clientHeight;switch(this.props.position){case"left-top":s.x=t.left-n,s.y=t.top;break;case"left":s.x=t.left-n,s.y=t.top+t.height/2-i/2;break;case"left-bottom":s.x=t.left-n,s.y=t.bottom-i;break;case"right-top":s.x=t.right,s.y=t.top;break;case"right":s.x=t.right,s.y=t.top+t.height/2-i/2;break;case"right-bottom":s.x=t.right,s.y=t.bottom-i;break;case"bottom-left":s.x=t.left,s.y=t.bottom;break;case"bottom":s.x=t.left+t.width/2-n/2,s.y=t.bottom;break;case"bottom-right":s.x=t.right-n,s.y=t.bottom;break;case"top-left":s.x=t.left,s.y=t.top-i;break;case"top":s.x=t.left+t.width/2-n/2,s.y=t.top-i;break;case"top-right":s.x=t.right-n,s.y=t.top-i;break;case"center":s.x=t.left+t.width/2-n/2,s.y=t.top+t.height/2-i/2}return e={zIndex:this.props.zIndex,top:s.y,left:s.x,visibility:"hidden",width:this.props.widthOfAnchor?t.width:void 0},this.setState({style:{...e},pos:s},(()=>{let t=e.left,s=e.top;t+=this.props.offsetX,s+=this.props.offsetY;const n={};if(this.popup.current&&this.state.pos){if(this.props.checkScreenBounds){const i=t+this.popup.current.clientWidth+10,a=s+Math.max(this.popup.current.clientHeight,40)+10;a>o&&(s-=a-o,n["overflow-bottom"]="1",n.overflow="1"),i>r&&(t-=i-r,n["overflow-right"]="1",n.overflow="1"),s<0&&(s=0,n["overflow-top"]="1",n.overflow="1",this.props.shinkToFitScreen&&"1"===n["overflow-bottom"]&&(e.height=a+"px")),t<0&&(t=0,n["overflow-left"]="1",n.overflow="1",this.props.shinkToFitScreen&&"1"===n["overflow-right"]&&(e.width=i+"px"))}e.maxHeight=o-s+"px",e.maxWidth=r-t+"px"}e.left=t,e.top=s,e.visibility="visible",this.setState({style:e,attrs:n})})),!0}return this.setState({pos:null,style:{visibility:"hidden"},attrs:null}),!1}componentDidUpdate(e){e.show!==this.props.show&&(this.props.show&&this.props.anchor&&!this.props.disable?this.positionFloat():this.setState({pos:null,style:{visibility:"hidden"},attrs:null}))}componentDidMount(){this.onpositionFloat()}render(){const e=(0,r.jsx)("div",{...this.state.attrs,ref:this.popup,"anchor-root":"1",className:`${n} ${this.props.className||""}`,style:this.state.style,children:this.props.children}),t=this.props.onClickOut?(0,r.jsx)(a.L,{onClick:this.props.onClickOut,children:e}):e;return this.props.useShellPortal?(0,r.jsx)(i.k,{elementId:this.props.portalId,children:t}):t}}h.defaultProps={zIndex:5,position:"right-top",checkScreenBounds:!0,shinkToFitScreen:!0,useShellPortal:!0,offsetX:0,offsetY:0},h.propTypes={},d([c.ZP],h.prototype,"onpositionFloat",null)},5174:(e,t,s)=>{"use strict";s.d(t,{y:()=>y});var r=s(91874),o=s(39953);const n="styles_loading__+M1zn",i="styles_card__AaRNi",a="styles_cardTooltip__fJhXO";var l=s(86082),c=s(14168),d=s(98656),h=s(77910),u=s(35316),p=s(71508),m=s(30836),f=s(58088),g=function(e,t,s,r){var o,n=arguments.length,i=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,s,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(n<3?o(i):n>3?o(t,s,i):o(t,s))||i);return n>3&&i&&Object.defineProperty(t,s,i),i};class y extends o.Component{constructor(e){super(e),this.state={src:null},this.ref=o.createRef()}get getUrl(){const e=this.props.cardId;return`${u.X}card-images/${e}.webp`}onScroll(){if(this.state.src&&this.scroller)return this.scroller.removeEventListener("scroll",this.onScroll),void(this.scroller=null);this.checkInVp()}checkInVp(){if(this.scroller&&(0,c.v4)(this.ref.current,!1,{bottom:1e3})){this.scroller.removeEventListener("scroll",this.onScroll),this.scroller=null;const e=new Image;e.crossOrigin="use-credentials",e.onload=()=>{this.setState({src:e.src})},e.src=this.getUrl}}async componentDidMount(){if(this.props.eager||(0,c.v4)(this.ref.current,!1,{bottom:1e3})){const e=new Image;e.crossOrigin="use-credentials",e.onload=()=>{this.setState({src:e.src})},e.src=this.getUrl}else this.scroller=(0,c.q9)(this.ref.current),this.scroller.addEventListener("scroll",this.onScroll)}componentWillUnmount(){this.scroller&&this.scroller.removeEventListener("scroll",this.onScroll)}shouldComponentUpdate(e,t,s){return!this.state.src&&this.scroller&&setTimeout((()=>{this.checkInVp()})),(0,h.BY)(this,e,t)}renderImg(){const{cardId:e,size:t,tooltip:s,tooltipZindex:r,eager:a,...c}=this.props;return(0,o.createElement)("img",{...c,draggable:!1,id:this.props.id,key:this.state.src?"loaded":"loading","card-id":e,crossOrigin:"use-credentials","img-size":t,ref:this.ref,className:this.state.src?i:n,src:this.state.src||l,clickable:this.props.onClick?"1":void 0})}render(){return this.props.tooltip?(this.def=this.def||(0,f.wC)(this.props.cardId),(0,r.jsxs)(m.u,{zIndex:this.props.tooltipZindex,children:[this.renderImg(),b(this.def)]})):this.renderImg()}}function b(e){const t=e.abilities.map((t=>(0,p.z)(t).replace(/%this%/g,e.name))).join(" | ");return(0,r.jsx)(m._v,{children:(0,r.jsxs)("div",{className:a,children:[(0,r.jsx)("h3",{children:e.name}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)("b",{children:"Mana/Attack/Life"}),(0,r.jsx)("br",{}),(0,r.jsxs)("span",{children:[e.manaCost,"/",e.attack,"/",e.life]})]}),t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)("b",{children:e.abilities.join(" | ")}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{children:t})]}),e.evolutions&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)("b",{children:"Evolutions"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{children:e.evolutions.join(" -> ")})]})]})})}y.defaultProps={size:"large"},g([d.ZP],y.prototype,"onScroll",null)},57764:(e,t,s)=>{"use strict";s.d(t,{N:()=>i});var r=s(91874),o=s(39953),n=s(71033);class i extends o.PureComponent{render(){const{disableCircleHover:e,blurHover:t,selected:s,active:o,...i}=this.props;return(0,r.jsxs)("div",{...i,className:`${n.Z.hoverRoot} ${this.props.selected?n.Z.selected:""} ${o?n.Z.active:""}`,"skip-abr":"1","button-root":"1",children:[(0,r.jsx)("div",{className:`${n.Z.background} ${this.props.blurHover?n.Z.blur:""} ${this.props.disableCircleHover?"":n.Z.enabled}\n\t\t\t\t`}),this.props.children]})}}},55823:(e,t,s)=>{"use strict";s.d(t,{P:()=>l});var r=s(91874),o=s(30836),n=s(39953),i=s(57764),a=s(71033);class l extends n.PureComponent{render(){const e=this.props.alwaysWhite?"#fff":"var(--text-color)",{alwaysWhite:t,blurHover:s,onClick:n,onMouseDown:l,disableCircleHover:c,...d}=this.props,h=(0,r.jsx)(i.N,{blurHover:this.props.blurHover,onClick:this.props.onClick,onMouseDown:this.props.onMouseDown,disableCircleHover:this.props.disableCircleHover,children:(0,r.jsx)("svg",{...d,className:a.Z.svgRoot,width:"20px",height:"20px",viewBox:"0 0 20 20",children:(0,r.jsxs)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",children:[(0,r.jsx)("line",{x1:"1",y1:"10",x2:"19",y2:"10",stroke:e,strokeWidth:"2",transform:"translate(10.000000, 10.000000) scale(-1, 1) rotate(45.000000) translate(-10.000000, -10.000000) "}),(0,r.jsx)("line",{x1:"1",y1:"10",x2:"19",y2:"10",stroke:e,strokeWidth:"2",transform:"translate(10.000000, 10.000000) rotate(45.000000) translate(-10.000000, -10.000000) "})]})})});return this.props.tooltip?(0,r.jsxs)(o.u,{children:[h,(0,r.jsx)(o._v,{children:this.props.tooltip})]}):h}}l.defaultProps={disableCircleHover:!0}},72857:(e,t,s)=>{"use strict";s.d(t,{u_:()=>h,hz:()=>m,mz:()=>p,xB:()=>u});var r=s(91874),o=s(39953);const n="styles_root__XfAzM",i="styles_content__H5giz",a="styles_header__KMoLz",l="styles_footer__B+kQh";var c=s(55397),d=s(55823);class h extends o.PureComponent{constructor(e){super(e),this.onClose=this.onClose.bind(this)}onClose(){this.props.onClose()}render(){const e=o.Children.toArray(this.props.children),t=e.find((e=>e.type===u)),s=e.filter((e=>e.type!==u));return(0,r.jsx)(c.e,{show:this.props.show,rootClass:this.props.rootClass,onClose:this.onClose,zIndex:this.props.zIndex,hashUrl:this.props.hashUrl,closeOnClickEvent:this.props.closeOnClickEvent,children:o.createElement(this.props.formContext?"form":"div",{className:n+" "+this.props.className,onSubmit:this.props.formContext?e=>e.preventDefault():void 0,"modal-size":this.props.size},(0,r.jsxs)("div",{className:a,children:[null!==t&&void 0!==t?t:(0,r.jsx)("span",{"modal-title":"1",children:this.props.title}),(0,r.jsx)("span",{"modal-close":"1",onClick:this.props.onClose,children:(0,r.jsx)(d.P,{})})]}),s)})}}h.defaultProps={show:!1,onClose:()=>{},title:"",size:"default",className:"",rootClass:"",headerClass:"",bodyClass:""};class u extends o.PureComponent{render(){return(0,r.jsx)("h3",{children:this.props.children})}}class p extends o.PureComponent{render(){return(0,r.jsx)("div",{"modal-footer":"1",className:l,children:this.props.children})}}class m extends o.PureComponent{render(){return(0,r.jsx)("div",{"modal-content":"1",className:i+" "+(this.props.className||""),children:this.props.children})}}},55397:(e,t,s)=>{"use strict";s.d(t,{e:()=>c});var r=s(91874),o=s(39953);const n="styles_background__iTHZm";var i=s(31804),a=s(25525);let l=[];window.addEventListener("keydown",(function(e){if("Escape"===e.key){const t=l.filter((e=>e.modal.props.show)).sort(((e,t)=>e.lastOpenClose.getDate()-t.lastOpenClose.getDate()))[0];t&&t.modal.props.onClose(e)}}));class c extends o.PureComponent{constructor(e){if(super(e),this.rootRef=o.createRef(),l.push({modal:this,lastOpenClose:new Date}),this.id=l.length,this.urlHash="#m"+this.id,this.props.hashUrl){let e;a.h.listen((t=>{t.location.hash!==this.urlHash&&e&&e.location.hash===this.urlHash&&(!t.location.hash||parseInt(t.location.hash.match(/\d*$/)[0],10)<=this.id)?(e=t,this.backPressed=!0,this.props.onClose()):e=t})),this.props.show&&(this.locationBeforeOpen=window.location.pathname+window.location.hash,a.h.push(window.location.pathname+this.urlHash))}}componentWillUnmount(){l=l.filter((e=>e.modal!==this))}componentDidUpdate(e){if(e.show!==this.props.show){l.find((e=>e.modal===this)).lastOpenClose=new Date,this.props.hashUrl&&(this.props.show?window.location.pathname+this.urlHash!==this.locationBeforeOpen&&(this.locationBeforeOpen=window.location.pathname+window.location.hash,a.h.push(window.location.pathname+this.urlHash)):(this.backPressed||window.location.pathname+this.urlHash!==this.locationBeforeOpen&&a.h.push(this.locationBeforeOpen),this.backPressed=!1))}}prepElement(){const e=o.Children.only(this.props.children),t=e.props.onMouseDown,s=e.props.onTouchStart,r=e.props.onClick;return o.cloneElement(e,{onMouseDown:e=>{t&&t(e),this.skipNextCloseEvent=!0},onTouchStart:e=>{s&&s(e),this.skipNextCloseEvent=!0},onClick:e=>{r&&r(e),this.skipNextCloseEvent=!0}})}render(){return(0,r.jsx)(i.k,{children:(0,r.jsx)("div",{ref:this.rootRef,className:`${n} ${this.props.rootClass}`,open:this.props.show,style:{zIndex:this.props.zIndex-1},onMouseDown:e=>{this.skipNextCloseEvent||this.props.closeOnClickEvent||this.props.onClose(e),this.skipNextCloseEvent=!1},onTouchStart:e=>{this.skipNextCloseEvent||this.props.closeOnClickEvent||this.props.onClose(e),this.skipNextCloseEvent=!1},onClick:e=>{this.skipNextCloseEvent||this.props.closeOnClickEvent&&this.props.onClose(e),this.skipNextCloseEvent=!1},children:this.props.show&&this.prepElement()})})}}c.defaultProps={show:!1,zIndex:99,onClose:null,rootClass:""}},3257:(e,t,s)=>{"use strict";s.d(t,{P:()=>g,Q:()=>y});var r=s(91874),o=s(39953);const n="styles_root__35+ue",i="styles_title__GZMrX",a="styles_menu__dqsK9",l="styles_item__Jxdg0",c="styles_noneLabel__C8JbT",d="styles_placeholder__MQUlB";var h=s(73031),u=s(77910),p=s(71033),m=s(57764);class f extends o.PureComponent{render(){return(0,r.jsx)(m.N,{blurHover:this.props.blurHover,onClick:this.props.onClick,disableCircleHover:this.props.disableCircleHover,children:(0,r.jsx)("svg",{className:p.Z.svgRoot,width:"21",fill:"none",height:"20",style:{transform:`rotate(${this.getRotation()}deg)`},viewBox:"0 0 21 20",children:(0,r.jsx)("path",{d:"M4.92969 7.20056L10.5286 12.7994L16.1276 7.20056",stroke:"var(--text-color)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})}getRotation(){switch(this.props.rotation){case"right":return 270;case"left":return 90;case"up":return 180;default:return 0}}}class g extends o.PureComponent{get getChildren(){return(0,u.rn)(o.Children.toArray(this.props.children))}constructor(e){super(e),this.searchText="",this.searchTimeout=null,this.hide=this.hide.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.clickRow=this.clickRow.bind(this),this.onBlur=this.onBlur.bind(this),this.onFocus=this.onFocus.bind(this),this.state={show:!1,currentFocusIndex:0},this.rootRef=o.createRef()}hide(){this.state.show&&this.setState({show:!1})}clickRow(e){this.props.onChange(e),this.hide()}focusFirstEl(){this.setState({currentFocusIndex:0})}onFocus(e){this.state.show||this.props.disabled||(this.setState({show:!0,currentFocusIndex:0}),this.props.onFocus&&this.props.onFocus(e))}onBlur(e){this.state.show&&(this.setState({show:!1,currentFocusIndex:0}),this.props.onBlur&&this.props.onBlur(e))}onKeyDown(e){var t,s;if(this.state.show)if(e.preventDefault(),32==e.keyCode||"Enter"===e.key)this.clickRow(this.menuItemRefs[this.state.currentFocusIndex].props.value);else switch(e.key){case"Tab":this.hide();break;case"ArrowDown":{let e=this.state.currentFocusIndex+1;e<Object.keys(this.menuItemRefs).length||(e=0),null===(t=this.menuItemRefs[e].el.current)||void 0===t||t.scrollIntoView(),this.setState({currentFocusIndex:e});break}case"ArrowUp":{let e=this.state.currentFocusIndex-1;if(e>=0);else{e=o.Children.toArray(this.getChildren).filter((e=>e.type===y)).length-1}null===(s=this.menuItemRefs[e].el.current)||void 0===s||s.scrollIntoView(),this.setState({currentFocusIndex:e});break}default:if(/[a-zA-Z0-9-_ ]/.test(e.key)){this.searchText+=e.key.toLowerCase(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchText=""}),1200);for(const[e,t]of Object.entries(this.menuItemRefs))if(t.props.textName&&t.props.textName.toLowerCase().startsWith(this.searchText)&&t.el.current){this.setState({currentFocusIndex:parseInt(e)}),t.el.current.scrollIntoView();break}}}}render(){const e=o.Children.toArray(this.props.children);let t=0;return this.menuItemRefs={},(0,r.jsxs)("div",{className:`${this.props.className} ${n}`,select:"1",id:this.props.id,ref:this.rootRef,isopen:this.state.show?"1":void 0,onKeyDown:this.onKeyDown,onMouseDown:e=>{e.preventDefault()},onClick:()=>{this.state.show||this.props.disabled||(this.rootRef.current.focus(),this.setState({show:!0,currentFocusIndex:-1}))},tabIndex:0,onFocus:this.onFocus,onBlur:this.onBlur,children:[(0,r.jsxs)("div",{className:i,"select-title":"1",children:[(0,r.jsx)("span",{children:this.props.titleTransform(this.props.value)}),!this.props.value&&0!==this.props.value&&(0,r.jsx)("span",{className:d,children:this.props.placeholder}),(0,r.jsx)(f,{disableCircleHover:!0,rotation:this.state.show?"up":"down"})]}),(0,r.jsx)(h.e,{zIndex:this.props.zIndex,anchor:this.rootRef,show:this.state.show,useShellPortal:this.props.useShellPortal,onClickOut:this.hide,widthOfAnchor:!0,position:"bottom-left",children:(0,r.jsxs)("div",{className:`${a} ${this.props.selectMenuClass}`,children:[0===e.length&&(0,r.jsx)("i",{className:c,children:"None"}),e.map((e=>{if(e.type===y){const{value:s,...r}=e.props,n=t++;return o.cloneElement(e,{className:`${l} ${this.props.selectItemClass} ${e.props.className}`,isfocussed:this.state.currentFocusIndex===n?"true":void 0,onClick:e=>{this.clickRow(s),r.onClick&&r.onClick(e)},ref:e=>this.menuItemRefs[n]=e})}return e}))]})})]})}}g.defaultProps={titleTransform:e=>e,zIndex:10,useShellPortal:!0,className:"",selectItemClass:"",selectMenuClass:""};class y extends o.PureComponent{constructor(){super(...arguments),this.el=o.createRef()}render(){const{value:e,forwardedRef:t,textName:s,...o}=this.props;return(0,r.jsx)("div",{...o,ref:this.el,tabIndex:-1})}}},31804:(e,t,s)=>{"use strict";s.d(t,{k:()=>n});var r=s(39953),o=s(55747);class n extends r.PureComponent{constructor(e){super(e),this.state={target:document.getElementById(this.props.elementId||"portal")}}componentDidMount(){this.state.target||this.setState({target:document.getElementById(this.props.elementId||"portal")})}render(){return this.props.noPort?this.props.children:this.state.target?o.createPortal(this.props.children,this.state.target):null}}},46298:(e,t,s)=>{"use strict";s.d(t,{y4:()=>I});var r=s(91874),o=s(39953),n=s(3578),i=s(60001),a=s(11011),l=s.n(a),c=s(51918),d=s(77910);class h{constructor(e,t){this.field=e,this.dir=t}}var u=s(30372);const p="styles_table__wmyVe",m="styles_responsiveTable__+gVNU",f="styles_theadrow__PhEQA",g="styles_responsiveHideHeader__tx0fH",y="styles_tdContent__dw6f5",b="styles_tbodyrow__5mdJ+",v="styles_responsiveHeader__ntJGJ",x="styles_td__HdCfE",k="styles_th__NO857",w="styles_thContent__d7MvE",C="styles_paginationWrap__CPzNj",P="styles_paginationText__7PD1-",j="styles_collapseWrap__wBNjO",_="styles_stickyHead__2tNCn";class S extends o.Component{}class N extends o.Component{}class I extends o.Component{constructor(e){var t;if(super(e),this.handleStickyScroll=this.handleStickyScroll.bind(this),this.changePage=this.changePage.bind(this),this.stickyTopOffset=0,this._hasStickyHeaders=!!this.props.stickyHeaderScrollRef,this.serverCallFunc=(null===(t=this.props.query)||void 0===t?void 0:t.buildQuery())||(()=>Promise.resolve({total:0,data:[],pageSize:0})),this.tables=this.genTableConfigData(),this.refProms=[],this.tableDimension=new A,this._hasStickyHeaders){let e;e=O(this.props.stickyHeaderScrollRef)?this.props.stickyHeaderScrollRef.current:this.props.stickyHeaderScrollRef,e&&(this._stickyScrollEventBound=!0,e.addEventListener("scroll",this.handleStickyScroll))}this.state={serverSideAvailableDataCount:0,sortableColumns:this.genSortableColumns(),currentPageNumber:0}}genSortableColumns(){const e=[],t=o.Children.toArray(this.props.children)[0];if(t){const s=o.Children.toArray(t.props.children);for(let t=0;t<s.length;t++){const r=s[t];if(!r)return null;const n=o.Children.toArray(r.props.children);for(const t of n)if(t.props.sortable){let s=0;if(t.props["default-sort"]){if(this.hasDefaultSort)throw new Error("Smart table cannot have multiple default sort columns");"asc"===t.props["default-sort"].toLowerCase()?(this.hasDefaultSort=!0,s=1):"desc"===t.props["default-sort"].toLowerCase()&&(this.hasDefaultSort=!0,s=-1)}e.push(new R(t,t.props.sortable,s))}}}return e}genTableConfigData(){const e=[],t=[];o.Children.forEach(this.props.children,((e,s)=>{"thead"===e.type&&t.push({head:!0,index:s,map:e.props.index,theadref:this._hasStickyHeaders?o.createRef():null,stickytheadref:this._hasStickyHeaders?o.createRef():null,stickyHeaderColRefs:this._hasStickyHeaders?(0,c.hl)(this.props.columns,(()=>o.createRef())):[],headerColRefs:this._hasStickyHeaders?(0,c.hl)(this.props.columns,(()=>o.createRef())):[],collapsable:!1}),"tbody"===e.type&&t.push({index:s,map:e.props.index,collapsable:!1,head:!1}),e.type===S&&(this._hasCollapsable=!0,t.push({head:!0,index:s,map:e.props.index,collapsable:!0,scrollProps:e.props.scrollProps,headerColRefs:this._hasStickyHeaders?(0,c.hl)(this.props.columns,(()=>o.createRef())):[],stickyHeaderColRefs:this._hasStickyHeaders?(0,c.hl)(this.props.columns,(()=>o.createRef())):[],theadref:this._hasStickyHeaders?o.createRef():null,stickytheadref:this._hasStickyHeaders?o.createRef():null})),e.type===N&&(this._hasCollapsable=!0,t.push({index:s,map:e.props.index,collapsable:!0,scrollProps:e.props.scrollProps,head:!1}))}));const s=(0,c.vM)(t,(e=>e.map));return Object.entries(s).map((([t,s])=>{if("undefined"!==t&&"null"!==t){const t=s.find((e=>e.head)),r=s.find((e=>!e.head));e.push({head:t,body:r,scrollProps:{...r.scrollProps,...t.scrollProps}})}else{const t=s.filter((e=>e.head)),r=s.filter((e=>!e.head));for(;t.length||r.length;)e.push({head:t.shift(),body:r.shift()})}})),e}getData(e,t=[]){this.serverCallFunc(...t).then((t=>{this._unmounted||t.data&&(this.setState({serverSideAvailableDataCount:t.total}),this.props.onChange(t.data,e))}))}componentDidMount(){const e=this.state.sortableColumns.find((e=>0!==e.sortDir));e&&!this.sortCol(e,!0)&&this.getData("New")}changePage(e,t){var s;this.props.query.setPage(this.props.rowsPerPage,this.state.currentPageNumber+e),this.serverCallFunc=(null===(s=this.props.query)||void 0===s?void 0:s.buildQuery())||this.serverCallFunc,this.getData("ChangePage")}handleStickyScroll(){const e=this.tables.filter((e=>e.head.theadref&&e.head.theadref.current&&e.head.stickytheadref.current));for(let t=0;t<e.length;t++){const s=e[t];if(s.head.theadref.current.getBoundingClientRect().top<=this.stickyTopOffset){if(!s.head.showingSticky){s.head.stickytheadref.current.style.display="inherit";for(let e=0;e<s.head.headerColRefs.length;e++){const t=s.head.headerColRefs[e],r=s.head.stickyHeaderColRefs[e];r.current&&(r.current.style.width=t.current.clientWidth+"px")}}s.head.showingSticky=!0}else s.head.showingSticky=!1,s.head.stickytheadref.current.style.display="none"}}shouldComponentUpdate(e,t){return(0,d.BY)(this,e,t,["onChange"])}sortCol(e,t=!1){var s;if(e&&this.props.allowColumnSort){this._isSorting=!0,this._currentSortedCol=e;let r=e.sortDir;if(!t){for(const e of this.state.sortableColumns)e.sortDir=0;r=(r+2)%3-1}return e.sortDir=r,this.props.query.clearSorts(),e&&e.sortDir&&this.props.query.addSort(e.sortDir>0?new h(e.dataName,"asc"):new h(e.dataName,"desc")),this.serverCallFunc=(null===(s=this.props.query)||void 0===s?void 0:s.buildQuery())||this.serverCallFunc,this.getData("Sort"),!0}}getHeight(e,t={}){return this.tableDimension.rowHeights[e]&&(t.height=this.tableDimension.rowHeights[e]),t}renderHead(e,t,s,a){return(e=o.Children.toArray(e)).map(((e,c)=>{if(!e||!e.props)return null;const{children:d,...h}=e.props;let u=null;this._hasCollapsable&&(u=new(l()),this.refProms.push(u));const p=o.Children.toArray(e.props.children);return(0,o.createElement)("tr",{...h,key:e.key,className:`${f} ${h.className||""} ${g}`,ref:e=>{e&&this._hasCollapsable&&u.resolve({height:e.offsetHeight,key:"head_"+c})}},p.map(((e,l)=>{const{children:d,onClick:h,style:u,...p}=e.props,m={...u}||{},f=this.state.sortableColumns.find((t=>t.th_Key===e.key));return t.add(e),a&&0===c&&s.head.headerColRefs[l].current&&(m.width=s.head.headerColRefs[l].current.clientWidth),(0,o.createElement)("th",{...p,key:e.key,onClick:e=>{this.sortCol(f),h&&h(e)},className:`${k} ${p.className||""}`,issorted:f&&0!==f.sortDir?"true":"false",style:this.getHeight("head_"+c,m),ref:t=>{e.ref&&(e.ref.current?e.ref.current=t:e.ref(t)),!a&&0===c&&s.head.headerColRefs[l]&&(s.head.headerColRefs[l].current=t),a&&0===c&&s.head.stickyHeaderColRefs[l]&&(s.head.stickyHeaderColRefs[l].current=t)}},(0,r.jsxs)("div",{className:w,children:[e.props.children,f&&1===f.sortDir&&(0,r.jsx)(i.G,{icon:n.mTx},"up"),f&&-1===f.sortDir&&(0,r.jsx)(i.G,{icon:n.ptq},"down"),f&&0===f.sortDir&&(0,r.jsx)(i.G,{icon:n.ptq,style:{visibility:"hidden"}},"none")]}))})))}))}renderBody(e,t){return(e=o.Children.toArray(e)).map(((s,n)=>{if(!s||!s.props)return null;const{children:i,className:a,...c}=s.props,d=e.length===n+1,h=0===n;t&&t.length&&t.reset();let u=null;return this._hasCollapsable&&(u=new(l()),this.refProms.push(u)),(0,o.createElement)("tr",{"st-first":h.toString(),"st-last":d.toString(),...c,key:s.key,className:b+" "+(a||""),ref:e=>{e&&this._hasCollapsable&&u.resolve({height:e.offsetHeight,key:"body_"+n})}},o.Children.map(s.props.children,((e,s)=>{if(e){const{children:s,style:i,...a}=e.props,l=parseInt(e.props.colSpan||"1",10),c=t&&t.length&&t.getHeader(l);return(0,o.createElement)("td",{...a,key:e.key,className:`${x} ${a.className||""}`,style:this.getHeight("body_"+n,i),ref:e.ref},(0,r.jsxs)("div",{className:y,children:[!!this.props.breakOn&&(0,r.jsx)("div",{className:v,"st-hide":this.props.hideHeaderWhenCollapsed.toString(),children:c&&c.props.children}),e.props.children]}))}})))}))}render(){const{children:e,className:t,...s}=this.props;if(this.renderElems&&this.lastColCount!==this.props.columns)return this.lastColCount=this.props.columns,this.renderElems;this.lastColCount=this.props.columns;const n=[],i=this.state.serverSideAvailableDataCount,a=o.Children.toArray(this.props.children);if(this.stickyTopOffset=0,this._hasStickyHeaders){let e;e=O(this.props.stickyHeaderScrollRef)?this.props.stickyHeaderScrollRef.current:this.props.stickyHeaderScrollRef,e&&(this.stickyTopOffset=e.getBoundingClientRect().top,this._stickyScrollEventBound||(e.addEventListener("scroll",this.handleStickyScroll),this._stickyScrollEventBound=!0))}for(let l=0;l<this.tables.length;l++){const e=this.tables[l],t=new $,c=(0,r.jsxs)("table",{className:`${p} ${this.props.className} ${this.props.breakOn&&!this._hasCollapsable?m:""} ${this.props.breakOn}`,children:[e.head&&!isNaN(e.head.index)&&(0,r.jsxs)(o.Fragment,{children:[(0,o.createElement)(D,{...s,key:"head",className:a[e.head.index].props.className,headRef:e.head.theadref},this.renderHead(a[e.head.index].props.children,t,e,!1)),this._hasStickyHeaders&&(0,o.createElement)(D,{...s,key:"stickyhead",isSticky:!0,stickyTopPx:this.stickyTopOffset,className:a[e.head.index].props.className,headRef:e.head.stickytheadref},this.renderHead(a[e.head.index].props.children,t,e,!0))]}),(0,o.createElement)(E,{...s,changePage:this.changePage,hidePaging:this.tables.length>1,key:"body",currentPageNumber:this.state.currentPageNumber,dataCount:i,className:a[e.body.index].props.className},this.renderBody(a[e.body.index].props.children,t))]},l);n.push({table:c,tblData:e})}return this.renderElems=this.tables.length>1?(0,r.jsxs)("div",{className:this.props.className,children:[(0,r.jsx)("div",{className:j,children:n.map(((e,t)=>{const s=e.tblData.head&&e.tblData.head.collapsable||e.tblData.body.collapsable;return(0,r.jsx)("div",{"st-scrollable":s?"true":"false",...e.tblData.scrollProps,children:e.table},t)}))}),this.props.rowsPerPage>0&&(0,r.jsx)(T,{...s,currentPageNumber:this.state.currentPageNumber,changePage:this.changePage,dataCount:i})]}):n.map((e=>e.table)),this.renderElems}componentDidUpdate(e){var t;this.props.columns!==e.columns?(this._isSorting=!1,this._currentSortedCol=null,this.tables=this.genTableConfigData(),this.props.query.clearSorts(),this.serverCallFunc=(null===(t=this.props.query)||void 0===t?void 0:t.buildQuery())||this.serverCallFunc):this._isSorting=!1,this.refProms.length&&this._hasCollapsable&&this.refProms.length&&Promise.all(this.refProms).then((e=>{e.forEach((e=>this.tableDimension.addHeight({key:e.key,height:e.height}))),this.tableDimension.next()&&(this.refProms=[],this.forceUpdate((()=>{setTimeout((()=>{this.refProms=[],this.tableDimension.reset()}))})))})).catch((e=>e))}componentWillUnmount(){if(this._hasStickyHeaders){let e;e=O(this.props.stickyHeaderScrollRef)?this.props.stickyHeaderScrollRef.current:this.props.stickyHeaderScrollRef,e&&e.removeEventListener("scroll",this.handleStickyScroll)}this._unmounted=!0}}I.defaultProps={query:null,data:[],rowsPerPage:0,allowColumnSort:!1,breakOn:"sm",hideHeaderWhenCollapsed:!1,columns:null,stickyHeaderScrollRef:null};class T extends o.Component{render(){const{rowsPerPage:e,currentPageNumber:t,dataCount:s}=this.props,o=e*t,a=Math.min(o+e,s);return(0,r.jsxs)("div",{className:C,children:[(0,r.jsx)(u.z,{raised:!1,disabled:0===o,onClick:()=>this.props.changePage(-1,Math.ceil(s/e)),children:(0,r.jsx)(i.G,{icon:n.A35})}),(0,r.jsxs)("div",{className:P,children:["Showing ",Math.min(o+1,s)," - ",a," of ",s]}),(0,r.jsx)(u.z,{raised:!1,disabled:a===s,onClick:()=>this.props.changePage(1,Math.ceil(s/e)),children:(0,r.jsx)(i.G,{icon:n._tD})})]})}}class D extends o.Component{render(){return(0,r.jsx)("thead",{className:`${this.props.className} ${this.props.isSticky?_:""}`,style:{top:this.props.stickyTopPx},ref:this.props.headRef,children:this.props.children})}}D.defaultProps={className:""};class E extends o.Component{render(){return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)("tbody",{className:this.props.className,children:this.props.children}),this.props.rowsPerPage>0&&!this.props.hidePaging&&(0,r.jsx)("tfoot",{children:(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:this.props.columns,children:(0,r.jsx)(T,{...this.props})})})})]})}}E.defaultProps={className:""};class ${constructor(){this._colSpan=0,this.th=null,this._colsRemaining=0,this._currentIndex=0,this._thList=[]}_Next(){this._colsRemaining<=0&&(this._currentIndex+=-1*this._colsRemaining+1,this._currentIndex>=this._thList.length&&(this._currentIndex=0),this.th=this._thList[this._currentIndex],this._colSpan=this.th.colSpan,this._colsRemaining=this._colSpan)}getHeader(e){this._colsRemaining-=e;const t=this.th;return this._Next(),t.th}reset(){this._currentIndex=0,this.th=this._thList[this._currentIndex],this._colSpan=this.th.colSpan,this._colsRemaining=this._colSpan}add(e){this._thList.push({colSpan:parseInt(e.props.colSpan||1,10),th:e})}get length(){return this._thList.length}}class A{constructor(){this.pendingRowHeights={},this.rowHeights={}}reset(){this.pendingRowHeights={},this.rowHeights={}}addHeight(e){const t=this.pendingRowHeights[e.key];if(t){if(t<e.height)return this.pendingRowHeights[e.key]=e.height,!0}else if(e.height>0)return this.pendingRowHeights[e.key]=e.height,!0;return!1}next(){const e=Object.keys(this.pendingRowHeights).some((e=>!!isNaN(this.rowHeights[e])||this.rowHeights[e]!==this.pendingRowHeights[e]));return this.rowHeights=this.pendingRowHeights,this.pendingRowHeights={},e}}function O(e){return e&&"current"in e}class R{constructor(e,t,s){this.th_Key=e.key,this.dataName=t,this.sortDir=s}}},50293:(e,t,s)=>{"use strict";s.d(t,{$:()=>c,Z:()=>d});var r=s(91874),o=s(39953);const n="styles_root__o5ewQ";var i=s(43935),a=s(64143);let l=null;class c extends o.PureComponent{constructor(e){super(e),this.state={show:0}}show(){this.setState((e=>({show:e.show+1})))}componentDidMount(){l=this}render(){return this.state.show>0?(0,r.jsx)("div",{className:n,children:(0,r.jsx)("img",{src:i})}):null}hide(){this.setState((e=>({show:Math.max(0,e.show-1)})))}}async function d(e,t=!1){l.show();try{return await e()}catch(s){try{const e=s instanceof Error?s.message:"object"===typeof s&&"error"in s?s.error.message:s.toString();console.error(e),a.Am.error(e.split("\n").slice(0,3).join("\n"))}catch(r){}if(t)throw s}finally{l.hide()}}},30836:(e,t,s)=>{"use strict";s.d(t,{u:()=>h,_v:()=>u,pn:()=>p});var r=s(91874),o=s(39953);const n="styles_root__Laxii",i="styles_base__kkG7w";var a=s(31804);const l={border:"2px solid var(--text-color)",borderRadius:"50%"};class c extends o.PureComponent{render(){return(0,r.jsx)("svg",{style:l,width:"20px",height:"20px",viewBox:"0 0 20 20",children:(0,r.jsxs)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",children:[(0,r.jsx)("rect",{fill:"var(--text-color)",x:"9",y:"7.5",width:"2",height:"9",rx:"1"}),(0,r.jsx)("circle",{fill:"var(--text-color)",cx:"10",cy:"4.5",r:"1"})]})})}}let d=null;class h extends o.PureComponent{constructor(e){super(e),this.isTouchDevice=this.getIsTouchDevice()}getIsTouchDevice(){if("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch)return!0;return function(e){return window.matchMedia(e).matches}(["(",["-webkit-","-moz-","-o-","-ms-"].join("touch-enabled),("),"heartz",")"].join(""))}hover(e){if(!this.props.disable&&!this.unmounted&&!this.ignoreNextOpen){this.ignoreNextOpen=!1;const t={x:e.clientX,y:e.clientY};this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.timeout=setTimeout((()=>{const e=o.Children.toArray(this.props.children).find((e=>e.type===u));e&&!this.unmounted&&d.open(t.x+this.props.offsetX,t.y+this.props.offsetY+20,e,this.props)}),this.isTouchDevice?0:this.props.delay)}}componentWillUnmount(){this.unmounted=!0,d.state.open&&d.close()}leave(){setTimeout((()=>{this.ignoreNextClose||(this.timeout&&(clearTimeout(this.timeout),this.timeout=null),d.close()),this.ignoreNextClose=!1}))}render(){const e=o.Children.toArray(this.props.children),{zIndex:t,children:s,disable:r,delay:n,disableMobile:i,mobilePressDuration:a,offsetX:l,offsetY:c,...d}=this.props;return e.filter((e=>e.type!==u)).map((e=>{const t=e.props.onMouseOver,s=e.props.onMouseLeave,r=e.props.onClick,n=e.props.onTouchStart,i=e.props.onTouchEnd;let a=null;return o.cloneElement(e,this.isTouchDevice&&this.props.disableMobile?{...d}:{...d,onMouseOver:e=>{this.hover(e),t&&t(e),d.onMouseOver&&d.onMouseOver(e)},onMouseLeave:e=>{this.leave(),s&&s(e),d.onMouseLeave&&d.onMouseLeave(e)},onTouchStart:e=>{if(this.props.mobilePressDuration>0){const t={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};a=setTimeout((()=>{window.removeEventListener("contextmenu",m),a=null,this.hover(t)}),this.props.mobilePressDuration),window.addEventListener("contextmenu",m),document.body.setAttribute("no-select","")}n&&n(e),d.onTouchStart&&d.onTouchStart(e)},onTouchEnd:e=>{window.removeEventListener("contextmenu",m),document.body.removeAttribute("no-select"),a?(clearTimeout(a),a=null,this.ignoreNextOpen=!0):this.props.mobilePressDuration>0&&e.preventDefault(),i&&i(e),d.onTouchEnd&&d.onTouchEnd(e)},onClick:e=>{r&&r(e),d.onClick&&d.onClick(e)},className:`${e.props.className||""} ${d.className||""} _hasTooltip`})}))}}h.defaultProps={zIndex:55,delay:150,offsetY:0,offsetX:0,mobilePressDuration:700};class u extends o.PureComponent{render(){return(0,r.jsxs)(o.Fragment,{children:[this.props.showInfoIcon&&(0,r.jsx)("div",{info:"1",children:(0,r.jsx)(c,{})}),(0,r.jsx)("div",{className:this.props.className,children:this.props.children})]})}}class p extends o.PureComponent{constructor(e){super(e),d=this,this.popup=o.createRef(),document.addEventListener("click",this.close),this.state={open:!1,tooltipProps:null,tooltipContent:null,pos:null,style:{visibilty:"hidden"}}}open(e,t,s,r){this.setState({pos:{x:e,y:t},tooltipContent:s,open:!0,tooltipProps:r},(()=>{if(this.state.open){const e={};if(this.popup.current&&this.state.pos){const t=this.state.pos.x+this.popup.current.clientWidth+10,s=this.state.pos.y+Math.max(this.popup.current.clientHeight,40)+10;e.top=s>window.innerHeight?this.state.pos.y-(s-window.innerHeight):this.state.pos.y,e.left=t>window.innerWidth?this.state.pos.x-(t-window.innerWidth):this.state.pos.x}this.setState({style:e})}}))}close(){this.state&&this.state.open&&this.setState({pos:null,tooltipContent:null,open:!1,tooltipProps:null,style:{visibilty:"hidden"}})}render(){return(0,r.jsx)(a.k,{children:(0,r.jsx)("div",{tooltip:"1",className:`${this.props.className} ${n} ${(this.state.tooltipProps?this.state.tooltipProps.className:void 0)||""}`,open:this.state.open&&!("visibility"in this.state.style),style:{zIndex:this.state.tooltipProps&&this.state.tooltipProps.zIndex?this.state.tooltipProps.zIndex+1:void 0,...this.state.style},ref:this.popup,children:this.state.tooltipContent&&(()=>{const{children:e,showInfoIcon:t,mobilePressDuration:s,...o}=this.state.tooltipContent.props;return(0,r.jsx)("div",{...o,className:`${i} ${this.props.contentBaseClass}`,children:this.state.tooltipContent})})()})})}}function m(e){e.preventDefault()}p.defaultProps={contentBaseClass:"",className:""}},51918:(e,t,s)=>{"use strict";function r(e,t=(e=>e)){e=Math.abs(e);const s=new Array(e);for(let r=0;r<e;r++)s[r]=t(r);return s}function o(e,t){const s=new Array(e);for(let r=0;r<e;r++)s[r]=t(r);return s}function n(e,t){const s={};for(const r of e){const e=t(r);s[e]=s[e]||[],s[e].push(r)}return s}function i(e,t){let s,r,o;const n=[];for(s=0,r=e.length;s<r;s+=t)o=e.slice(s,s+t),n.push(o);return n}function a(e,t,s=", ",r=!1){if(!t)return e.join(s);if((e=e.map((e=>e.trim())).filter((e=>!!e))).length>1){const o=e.slice(-1)[0];let n=` ${t} `;return r&&o[0]===o[0].toLowerCase()&&(n=" "),[e.slice(0,e.length-1).join(s),o].join(n)}return e.join(s)}s.d(t,{hl:()=>r,HC:()=>o,vM:()=>n,yo:()=>i,_i:()=>a})},77910:(e,t,s)=>{"use strict";s.d(t,{BY:()=>o,rn:()=>n});var r=s(39953);function o(e,t,s,r=[],o=[]){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!~r.indexOf(n)&&t[n]!==e.props[n])return!0;for(const n in s)if(Object.prototype.hasOwnProperty.call(s,n)&&!~o.indexOf(n)&&s[n]!==e.state[n])return!0;return!1}function n(e){return e.flatMap((e=>{if(e.type===r.Fragment){return n(r.Children.toArray(e.props.children)).map((t=>r.cloneElement(t,{key:e.key.toString()+t.key})))}return e}))}},14168:(e,t,s)=>{"use strict";function r(e){const t=e.getBoundingClientRect();let s=e.parentElement;for(;s;){if(!s.getAttribute("skip-abr")&&"relative"===window.getComputedStyle(s).position){const e=s.getBoundingClientRect();return{bottom:t.top-e.top+t.height,height:t.height,left:t.left-e.left,right:t.left-e.left+t.width,top:t.top-e.top,width:t.width}}s=s.parentElement}return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function o(e){return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight}function n(e){const t=window.getComputedStyle(e);return"auto"===t.overflow||"scroll"===t.overflow}function i(e){do{if(n(e)||o(e))return e;e=e.parentElement}while(e);return e}function a(e,t,s={}){if(!e)return!1;const r=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=r.top>=0&&r.left>=0&&r.bottom<=o&&r.right<=n;if(t)return i;{const e=o+(s.bottom||0);return i||r.top<=0&&r.bottom>0||r.top<e&&r.bottom>=0||r.top<0&&r.bottom>e}}s.d(t,{D5:()=>r,a9:()=>n,q9:()=>i,v4:()=>a})},91309:(e,t,s)=>{"use strict";s.d(t,{N:()=>o});var r=s(82063);function o(e){return(0,r.ZP)(e,{transform:n})}function n(e,t,s){if("tag"===e.type&&"script"===e.name)return null;if("tag"===e.type&&'class="i"'===e.name){e.name="i";return(0,r.MF)(e,t,s)}}},78453:(e,t,s)=>{"use strict";s.d(t,{pB:()=>m,o4:()=>f,jG:()=>g,ZP:()=>y,Ob:()=>b});var r=s(51150),o=s(65097),n=s(14190),i=s(19569),a=s(11011),l=s.n(a),c=s(19688),d=s(64143),h=s(42130),u=s(63315),p=s(62754);async function m(e){e||(e=localStorage.getItem("refreshToken"));const t=await p.T.refresh(e).catch((()=>(console.log("Deleting token"),localStorage.removeItem("token"),localStorage.removeItem("refreshToken"),localStorage.removeItem("token-exp"),null)));return!(null===t||void 0===t?void 0:t.token)||(console.log("token refreshed"),f(t),!1)}setInterval((()=>{const e=localStorage.getItem("token-exp"),t=localStorage.getItem("refreshToken");if(!e||!t||!0===(null===h.D||void 0===h.D?void 0:h.D.state.isAnon))return;const s=new Date(parseInt(e)),o=r.Z(s,new Date);console.log("refresh diff "+o),o<60&&m(t)}),3e4);function f(e,t){localStorage.setItem("token",e.token),localStorage.setItem("refreshToken",e.refreshToken),localStorage.setItem("token-exp",e.expiration.getTime().toString());const s=(0,u.aj)(e.token);h.D.setState({loggedIn:e&&!("isAnon"in s),isAnon:e&&"isAnon"in s},t)}async function g(){const e=localStorage.getItem("token-exp");return!!(e&&!0!==(null===h.D||void 0===h.D?void 0:h.D.state.isAnon)&&Date.now()>=parseInt(e,10))&&await m()}function y(e,t){t={addNullToParams:!1,canceller:null,useTimeout:!0,useCredentials:!0,withCredentials:!0,...t};let{url:s,method:r,data:o,form:n,headers:i,cacheOptions:a,...u}=e;return t.canceller||(t.canceller=new(l())),new Promise(((e,a)=>{const l=i||{Accept:"application/json","Content-Type":o?"application/json":void 0},p=localStorage.getItem("token");if(p&&!l.Authorization&&(l.Authorization="Bearer "+p),!b.isEmpty(u)){const e=b.serialize(u,t.addNullToParams);e&&(s=s+"?"+e)}let m=null;if(o)m="string"===typeof o||o instanceof FormData||o instanceof Blob?o:JSON.stringify(o);else if(n){const e=new FormData;for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)){const s=n[t];e.append(t,s)}m=e}const f=new XMLHttpRequest;t.responseType&&(f.responseType=t.responseType),t.withCredentials&&(f.withCredentials=!0);let y=!1;t.canceller.then((()=>{}),(()=>{y=!0,f.abort()})),f.onreadystatechange=function(){var s;if(f.readyState===XMLHttpRequest.DONE){const r=f.getResponseHeader("content-type"),o=r&&r.startsWith("application/json");if(f.getAllResponseHeaders().indexOf("x-toast")>=0){const e=f.getResponseHeader("x-toast").split(",");if(e.length>0)for(const t of e){const[e,s]=t.split(":");"error"!==e&&"info"!==e&&"success"!==e||d.Am.error(s)}}f.status>0&&f.status<400?t.onSuccessOverride?(t.canceller.resolve(),t.onSuccessOverride(f,e,a)):"blob"===t.responseType?(t.canceller.resolve(),e(f.response)):f.responseText?(t.canceller.resolve(),e(o?b.convertDate(JSON.parse(f.responseText),!1):f.responseText)):(t.canceller.resolve(),e(null)):(401!==f.status&&403!==f.status||g().then((e=>{e&&h.D.setState({loggedIn:!1})})),t.canceller.resolve(),a(f.response&&o?(null===(s=JSON.parse(f.response))||void 0===s?void 0:s.error)||f.response:f.response?f.response:0===f.status?"Unable to reach server or request timed out. Is your internet connected?":f.statusText+" "+f.responseURL))}},f.open(r,s,!0),t.useTimeout&&(f.timeout=c.vc.apiTimeoutMs);for(const t in l)Object.prototype.hasOwnProperty.call(l,t)&&l[t]&&f.setRequestHeader(t,l[t]);t.onDownloadProgress&&(f.onprogress=e=>{if(e.lengthComputable){const s=e.loaded/e.total*100;t.onDownloadProgress(s)}}),f.upload&&t.onUploadProgress&&(f.upload.onprogress=e=>{if(e.lengthComputable){const s=e.loaded/e.total*100;t.onUploadProgress(s)}}),f.send(m)}))}class b{static convertDate(e,t){if(e&&"object"===typeof e){const s=e;for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e)){const r=s[e];t||"string"!==typeof r?t&&r instanceof Date?/utc/i.test(e)?s[e]=r.toISOString():s[e]=n.Z(r,"yyyy-MM-dd'T'HH:mm:ss"):r&&"object"===typeof r&&b.convertDate(r,t):r&&b.isDateString(r)&&(/utc/i.test(e)?s[e]=b.toLocal(o.Z(r.substr(0,19),"yyyy-MM-dd'T'HH:mm:ss",new Date)):s[e]=o.Z(r.substr(0,19),"yyyy-MM-dd'T'HH:mm:ss",new Date))}}return e}static toLocal(e){return"string"===typeof e&&(e=o.Z(e.slice(0,19),"yyyy-MM-dd'T'HH:mm:ss",new Date)),i.Z(e,-e.getTimezoneOffset())}static isDateString(e){if(e.length>=19){const t=o.Z(e.slice(0,19),"yyyy-MM-dd'T'HH:mm:ss",new Date);return t instanceof Date&&!isNaN(t.getTime())}return!1}static isEmpty(e){if(!e)return!0;if("object"===typeof e)for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}static serialize(e,t){const s=[];for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=e[r];if(Array.isArray(o))for(const e of o)s.push(b.serialize({[r]:e},t));else if(o instanceof Date){const e=isNaN(o.getTime())?"":encodeURIComponent(n.Z(o,"yyyy-MM-dd'T'HH:mm:ss"));(e||t)&&s.push(encodeURIComponent(r)+"="+e)}else if("object"!==typeof o||null===o){const e=null!==o&&void 0!==o?encodeURIComponent(o):"";(e||t)&&s.push(encodeURIComponent(r)+"="+e)}else s.push(b.serialize(o,t))}return s.join("&")}}},50787:(e,t,s)=>{"use strict";s.d(t,{$:()=>o});class r{static getValue(e,t){let s=e;const r=t.split(".");for(let o=0;o<r.length&&s;o++){let e=r[o];const t=e.match(/\[(\d+)\]/g);if(t&&t.length)for(const r of t)e=e&&/^[^[]*/.exec(e)[0],e?(s=s[e][r.match(/\d+/)[0]],e=null):s=s[r.match(/\d+/)[0]];else s=s[e]}return s}static setValue(e,t,s,r){let o=null;if(t.startsWith("["))o=[];else{if(!t)return r?Array.isArray(e)?e.slice():e?{...e}:e:e;o=[{member:"",isArray:Array.isArray(e)}]}for(const a of t)if("."===a)o.push({member:"",isArray:!1});else if("["===a)o.push({member:"",isArray:!0});else if("]"===a&&o[o.length-1].isArray);else{o[o.length-1].member+=a}let n=e,i=o[1];for(let a=0;a<o.length;a++,i=o[a+1]){const e=o[a];e&&(a===o.length-1?n[e.member]=s:(n[e.member]?r&&(Array.isArray(n[e.member])?n[e.member]=n[e.member].slice():"object"===typeof n[e.member]&&(n[e.member]={...n[e.member]})):i.isArray?n[e.member]=[]:n[e.member]={},n=n[e.member]))}return e}}class o{addFilter(e){throw new Error("Method not implemented.")}addAggregate(e){throw new Error("Method not implemented.")}addSort(e){this.sort=e}clearAggregates(e){}clearSorts(e){this.sort=null}clearFilters(e){}setPage(e,t){this.pageSize=e,this.pageIndex=t}clearPage(){this.pageSize=0,this.pageIndex=0}reset(){this.clearSorts(),this.clearFilters(),this.clearAggregates(),this.clearPage()}buildQuery(){return()=>{let e=this.data.slice();return this.sort&&(e=e.sort(((e,t)=>{const s=r.getValue(e,this.sort.field),o=r.getValue(t,this.sort.field);return"desc"===this.sort.dir?"string"===typeof s?o.localeCompare(s):o-s:"string"===typeof s?s.localeCompare(o):s-o}))),this.pageSize&&(e=e.slice(this.pageSize*this.pageIndex,this.pageSize*this.pageIndex+this.pageSize)),Promise.resolve({data:e,pageSize:this.pageSize,total:this.data.length})}}setData(e){this.data=e.slice()}}},63315:(e,t,s)=>{"use strict";function r(e){return e&&e[0].toLocaleUpperCase()+e.slice(1)}function o(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);!function(e){const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{const e=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+e)}catch(s){console.error("Fallback: Oops, unable to copy",s)}document.body.removeChild(t)}(e)}function n(e,t){var s;return"number"===typeof e?null===(s=t?Math.max(e,.01):e)||void 0===s?void 0:s.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,"):e}function i(e){return e>.01?n(e):null===e||void 0===e?void 0:e.toString(10).replace(/\d(?=(\d{3})+\.)/g,"$&,")}function a(){const e={},t=window.location.search;if(!t)return e;const s=("?"===t[0]?t.substr(1):t).split("&");for(const r of s){const t=r.split("=");e[decodeURIComponent(t[0])]=decodeURIComponent(t[1]||"")}return e}function l(e){if(!e)return{};const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(window.atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(s)}function c(e,t){const s=document.createElement("a");s.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)}function d(e){let t,s=0;if(0===e.length)return s;for(let r=0;r<e.length;r++)t=e.charCodeAt(r),s=(s<<5)-s+t,s|=0;return s}s.d(t,{uo:()=>r,TE:()=>o,VN:()=>n,T1:()=>i,dD:()=>a,aj:()=>l,Sv:()=>c,zz:()=>d})},7154:(e,t,s)=>{"use strict";function r(e){return e.guildTag?`[${e.guildTag}]${e.username}`:e.username}s.d(t,{K:()=>r})},85069:(e,t,s)=>{"use strict";e.exports=s.p+"static/media/370f4f2ce770c2c1746f.webp"},42394:(e,t,s)=>{"use strict";e.exports=s.p+"static/media/bb7598939c2967652567.webp"},9490:(e,t,s)=>{"use strict";e.exports=s.p+"static/media/d142393d695f6a9fe282.webp"},95259:(e,t,s)=>{"use strict";e.exports=s.p+"static/media/0da9f5621381f7f0c119.webp"},66618:(e,t,s)=>{"use strict";e.exports=s.p+"static/media/00b8f920ae0c68812555.webp"},86082:(e,t,s)=>{"use strict";e.exports=s.p+"static/media/5c20c0c1cf54e8fb16b8.gif"},22781:(e,t,s)=>{"use strict";e.exports=s.p+"static/media/629bf1571fbf623799fc.webp"},43935:(e,t,s)=>{"use strict";e.exports=s.p+"static/media/5cf8db859207f9f74d80.webp"},46360:()=>{},13358:()=>{},36324:()=>{},78692:()=>{},27025:()=>{},76561:()=>{},86861:()=>{},89254:()=>{},10462:()=>{},56029:()=>{},67785:()=>{},13506:()=>{}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=e,s.amdO={},(()=>{var e=[];s.O=(t,r,o,n)=>{if(!r){var i=1/0;for(d=0;d<e.length;d++){for(var[r,o,n]=e[d],a=!0,l=0;l<r.length;l++)(!1&n||i>=n)&&Object.keys(s.O).every((e=>s.O[e](r[l])))?r.splice(l--,1):(a=!1,n<i&&(i=n));if(a){e.splice(d--,1);var c=o();void 0!==c&&(t=c)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[r,o,n]}})(),s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,r)=>(s.f[r](e,t),t)),[])),s.u=e=>"static/js/"+e+"_"+{2:"710969ae5714e6b5b5f6",8:"dd05ecebc98afa489fc0",44:"7e424d4fca1a8ccefc35",65:"51df2eda5f0640d4dd88",78:"5005d34f7096e7a10dcc",103:"f6ea2e6e72a1eed6e08e",105:"64b0609befd94bb115ad",123:"ff571bd5814e32eb5d71",124:"168bb5e0de34ed66a153",142:"3e57bca31414a3e37630",177:"8ff14c27c88c025cdedb",198:"cfd964ca509441e24e2f",239:"465817fdf33b09d4e86f",247:"da851afa8e2c88f24360",254:"a5c008eb94cc8dc7dc4d",266:"703ee5d8c5a53f02d790",270:"59da96bafd92785cca65",271:"8fe0ce680b680f51d6f0",308:"1fe56a17fdebfb330154",323:"e64e202ab075a050257e",341:"496448651e232738bea5",359:"db87d0910089192c17f1",425:"9d2549f3812fc7e97a26",456:"e35315170b8b1e64f7ae",457:"b35b110095697cca7027",475:"3e2f2cf54127f2446b72",485:"8d1c17ffa98b8113b80e",514:"2c9ca5ee2387eb3dc3df",534:"e6f138da75ea31a789c9",541:"0ee9ca5e8df869c4e3f9",556:"2596b31340b263e6cc74",579:"29d8cc1b03923c67e869",582:"58d6fbdd62d7ade9409e",626:"6e3210c406f5a0fd779c",662:"3affc5137b6605461558",685:"2f7c007fa69e0c2948b4",698:"6d4d9d490324fe0e8a66",709:"72d836b7b7898dbe88e7",725:"5c0060dd485fb1d65beb",737:"27a281e8e8f63ed84d6b",789:"cc36ddbdbccf3d90c048",824:"dd9e199c05814df3abba",932:"fb6756ecfdc2fe37a4ce",938:"7229dd54df6399487053",941:"59dc96c3fff22f30a9a1",962:"12b952c99ebff2b07444",971:"126487ed2e5157fb125a"}[e]+"_chunk.js",s.miniCssF=e=>"static/css/"+{8:"e00c72c9a3781769f9fe",44:"b37c65b9a8f0c0bdb53a",65:"1f4937567f3ed292a125",78:"c21a7eee282248663a32",103:"9a98dc9db3597b62c4c0",105:"f784682804ca01f9fc5e",123:"a04846cac1426a5dd8f2",124:"1da168417815b3052368",142:"1f27a3fb3d7c49c6deeb",177:"6955777dda95b270a40e",198:"26319abdc4ff74877f23",239:"40e06f6470e3122115ed",247:"a1b0758dfb293e49308a",266:"5a069ee92b92ba989771",271:"576eb7858ae291cb8663",323:"c4dbdcef74fd9ac173de",341:"0e977733ba8216e9db3b",359:"54901736b34a70a449b1",425:"95622d9519e8bbfba76f",457:"4984e4774fff793585cb",475:"671a5e818ddcc037b2d7",485:"e5b07fcf516a61d7c429",514:"01183c1bece5a48a3a37",556:"6eaf9ea9d973f7da2507",579:"59745bcda43d1881d635",582:"381f48ebb8240f59446a",626:"44bf949eba89bf287bac",662:"817aeac9e8860a96278c",685:"2c353486a74d6b43ed63",698:"51a718460889dd1bd9e3",709:"a298e40fc7a2d77aef0c",725:"a48a516e387ef044829b",737:"7dc18ff394420f231670",789:"b50851f3997ed9808cb9",824:"f3a9d0714c9135ec7cc8",932:"0822bfa208295146d17b",938:"1c3312e56e1cb4ccaa23",941:"37dfc4b067dd6854f0f2",962:"0126b8aada9bc7b1025f",971:"fbe0cf4bcbcb10f6b490"}[e]+".chunk.css",s.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="coom-web-client:";s.l=(r,o,n,i)=>{if(e[r])e[r].push(o);else{var a,l;if(void 0!==n)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var h=c[d];if(h.getAttribute("src")==r||h.getAttribute("data-webpack")==t+n){a=h;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",t+n),a.src=r),e[r]=[o];var u=(t,s)=>{a.onerror=a.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(s))),t)return t(s)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),s.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.p="/app/",(()=>{var e=e=>new Promise(((t,r)=>{var o=s.miniCssF(e),n=s.p+o;if(((e,t)=>{for(var s=document.getElementsByTagName("link"),r=0;r<s.length;r++){var o=(i=s[r]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(o===e||o===t))return i}var n=document.getElementsByTagName("style");for(r=0;r<n.length;r++){var i;if((o=(i=n[r]).getAttribute("data-href"))===e||o===t)return i}})(o,n))return t();((e,t,s,r)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=n=>{if(o.onerror=o.onload=null,"load"===n.type)s();else{var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=i,l.request=a,o.parentNode.removeChild(o),r(l)}},o.href=t,document.head.appendChild(o)})(e,n,t,r)})),t={179:0};s.f.miniCss=(s,r)=>{t[s]?r.push(t[s]):0!==t[s]&&{8:1,44:1,65:1,78:1,103:1,105:1,123:1,124:1,142:1,177:1,198:1,239:1,247:1,266:1,271:1,323:1,341:1,359:1,425:1,457:1,475:1,485:1,514:1,556:1,579:1,582:1,626:1,662:1,685:1,698:1,709:1,725:1,737:1,789:1,824:1,932:1,938:1,941:1,962:1,971:1}[s]&&r.push(t[s]=e(s).then((()=>{t[s]=0}),(e=>{throw delete t[s],e})))}})(),(()=>{var e={179:0};s.f.j=(t,r)=>{var o=s.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((s,r)=>o=e[t]=[s,r]));r.push(o[2]=n);var i=s.p+s.u(t),a=new Error;s.l(i,(r=>{if(s.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+n+": "+i+")",a.name="ChunkLoadError",a.type=n,a.request=i,o[1](a)}}),"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,[i,a,l]=r,c=0;if(i.some((t=>0!==e[t]))){for(o in a)s.o(a,o)&&(s.m[o]=a[o]);if(l)var d=l(s)}for(t&&t(r);c<i.length;c++)n=i[c],s.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return s.O(d)},r=self.webpackChunkcoom_web_client=self.webpackChunkcoom_web_client||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var r=s.O(void 0,[216],(()=>s(61938)));r=s.O(r)})();