text: // ==UserScript==
  // @name         ScoreSaber country leaderboard
  // @namespace    https://motzel.dev
  // @version      1.8.5
  // @description  ScoreSaber Enhancements
  // @author       motzel
  // @icon         https://scoresaber.com/imports/images/logo.ico
  // @updateURL    https://github.com/Omurky/ScoreSaberCountryLeaderboard/raw/master/dist/scoresaber-country-leaderboard.user.js
  // @downloadURL  https://github.com/Omurky/ScoreSaberCountryLeaderboard/raw/master/dist/scoresaber-country-leaderboard.user.js
  // @supportURL   https://github.com/Omurky/ScoreSaberCountryLeaderboard/issues
  // @match        https://scoresaber.com/*
  // @include      /^https://scoresaber\.com\/global(\/\d+&country=pl|\?country=pl)/
  // @connect      www.beatsavior.io
  // @grant        GM_addStyle
  // @grant        GM_info
  // @grant        GM_xmlhttpRequest
  // @grant        GM_getTab
  // @grant        GM_getTabs
  // @grant        GM_saveTab
  // @grant        GM_getValue
  // @grant        GM_setValue
  // @grant        GM_addValueChangeListener
  // @grant        unsafeWindow
  // @run-at       document-start
  // ==/UserScript==
  !function(e){function t(t){for(var n,a,o=t[0],c=t[1],i=0,l=[];i<o.length;i++)a=o[i],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&l.push(r[a][0]),r[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(s&&s(t);l.length;)l.shift()()}var n={},r={0:0};function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(){return Promise.resolve()},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var o=window.webpackJsonp=window.webpackJsonp||[],c=o.push.bind(o);o.push=t,o=o.slice();for(var i=0;i<o.length;i++)t(o[i]);var s=c;a(a.s=0)}([function(e,t,n){"use strict";n.r(t);var r=n(1),a=n(57),o=n(138),c=n(110),i=n(143),s=n(144),l=n(145),d=n(146),u=n(147),b=n(5),p=n(3),f=n(75),O=n(6),j=n(68),m=n(36),g=n(88),h=n(13),y=n(150),v=n(19),_=n(9),w=n(35),k=n(15),$=n(41),x=n(152),S=n(50),P=n(46),I=n(22);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){q(o,r,a,c,i,"next",e)}function i(e){q(o,r,a,c,i,"throw",e)}c(void 0)}))}}var z,E=()=>parseInt(Object(O.getFirstRegexpMatch)(/\/leaderboard\/(\d+)(\?page=.*)?#?/,window.location.href.toLowerCase()),10),B=()=>null!==E(),D=()=>Object(O.getFirstRegexpMatch)(/\/u\/(\d+)((\?|&|#).*)?$/,window.location.href.toLowerCase()),L=()=>null!==D(),N=()=>{var e=window.location.href.match(new RegExp("^https://scoresaber.com/global(?:\\?|/1[&?])country=(.{1,3})"));return e&&e.length>1?e[1]:null},F=(z=R((function*(){return N()===(yield Object(w.getActiveCountry)())})),function(){return z.apply(this,arguments)});function M(){return U.apply(this,arguments)}function U(){return(U=R((function*(){var e,t;p.default.info("Setup leaderboard page");var n=document.querySelector("body > .section");if(n){var r=E();if(r){var a=window.location.href,o=/(.*)\/leaderboard\/(\d+)(.*?)$/.exec(a);o&&o[3]&&o[3].length&&(a=o[1]+"/leaderboard/"+o[2]+("&"===o[3][0]?"?"+o[3].slice(1):o[3]));var c=new URL(a),i=new URLSearchParams(c.search),s=i.has("page")?parseInt(null!==(e=i.get("page"))&&void 0!==e?e:"1",10):1,l={leaderboardId:r,leaderboardPage:T(T({},Object($.parseSsSongLeaderboardPage)(document)),{},{pageNum:s})};if(!(null===(t=l.leaderboardPage)||void 0===t?void 0:t.currentDiff)){var d,b,f=yield Object(I.getSongScores)(r);if(f&&f.length&&(null===(d=f[0])||void 0===d||null===(b=d.diffInfo)||void 0===b?void 0:b.diff)){var O=Object(I.getHumanDiffInfo)(f[0].diffInfo);l.leaderboardPage.currentDiff=f[0].diffInfo.diff,l.leaderboardPage.currentDiffHuman=(null==O?void 0:O.name)?O.name:"???",l.leaderboardPage.diffs.push({id:r,name:(null==O?void 0:O.name)?O.name:"???",color:(null==O?void 0:O.color)?O.color:"#444"})}else l.leaderboardPage.currentDiff="???",l.leaderboardPage.currentDiffHuman="???",l.leaderboardPage.diffs.push({id:r,name:"???",color:"#444"})}var j=document.createElement("div");j.classList.add("sspl-page"),n.prepend(j);var m=document.querySelector(".content");m&&m.remove(),new u.default({target:j,props:l}),p.default.info("Setup leaderboard page / Done")}}}))).apply(this,arguments)}function V(){var e=document.querySelector("nav.navbar > .container");e&&e.classList.add("sspl-page-container")}function H(){return W.apply(this,arguments)}function W(){return(W=R((function*(){var e;p.default.info("Setup profile page");var t=D();if(t){var n=window.location.href,r=/(.*)\/u\/(\d+)(.*?)$/.exec(n);r&&r[3]&&r[3].length&&(n=r[1]+"/u/"+r[2]+("&"===r[3][0]?"?"+r[3].slice(1):r[3]));var o=new URL(n),c=new URLSearchParams(o.search),i=yield Object(m.getConfig)("songBrowser"),s=c.has("transform"),l=(yield Object(k.isPlayerDataAvailable)(t))&&(i&&i.autoTransform||s),d="2"===c.get("sort"),u=c.has("page")?parseInt(null!==(e=c.get("page"))&&void 0!==e?e:"1",10):1;if(!l||d){s&&(c.delete("transform"),o.search=c.toString(),history.replaceState(null,"",o.toString()));var b=document.querySelector(".column.avatar");b&&b.classList.add("enlarge");var f=yield Object(m.getConfig)("users");f&&f.main&&f.main===t&&b.classList.add("main");var O=document.querySelector("table.ranking");O&&O.classList.add("sspl");var j=document.querySelector("body .section");if(j){var g=document.createElement("div");g.classList.add("sspl-page"),j.prepend(g);var h={profileId:t,profilePage:T(T({},Object($.parseSsProfilePage)(document)),{},{type:d?"recent":"top",pageNum:u,playerId:t}),autoTransform:l},y=document.querySelector(".content");y&&y.remove(),V(),new a.default({target:g,props:h}),p.default.info("Setup profile page / Done")}}else window.location.href=Object(k.getPlayerProfileUrl)(t,!0,s)}}))).apply(this,arguments)}function Z(){return K.apply(this,arguments)}function K(){return(K=R((function*(){var e=N();if(e){if(p.default.info("Setup country ranking"),!(yield F())){var t=document.querySelector("table.ranking.global");if(!t)return;var n=t.parentNode.parentNode.querySelector(".pagination");if(!n)return;var r=document.createElement("div");return r.style.fontSize=".875rem",n.insertBefore(r,n.querySelector("br")),void new l.default({target:r,props:{country:e}})}var a=document.querySelector("body > .section > .container");if(a){var c=Object(O.convertArrayToObjectByKey)(Object($.parseSsLeaderboardScores)(document).map(e=>({playerId:e.playerId,pp:e.pp})),"playerId");a.classList.add("original"),a.style.display="none",a.parentNode.style.position="relative";var i=document.createElement("main");i.classList.add("sspl-page"),a.parentNode.appendChild(i),V(),new o.default({target:i,props:{country:yield Object(w.getActiveCountry)(),overridePlayersPp:c}}),p.default.info("Setup country ranking / Done")}else p.default.error("Setup country ranking / container not found")}}))).apply(this,arguments)}function X(e){return J.apply(this,arguments)}function J(){return(J=R((function*(e){var t=yield Object(m.getConfig)("others");t&&t.theme&&t.theme!==e&&Object(g.setTheme)(t.theme)}))).apply(this,arguments)}function Q(){return Y.apply(this,arguments)}function Y(){return(Y=R((function*(){var e;p.default.info("Setup player avatar");var t=yield Object(m.getConfig)("users");if(t&&t.main){var n=document.querySelector(".navbar-brand .navbar-burger");if(n){var r=document.createElement("div");r.classList.add("navbar-item"),r.classList.add("sspl-avatar"),n.parentNode.insertBefore(r,n);var a=D(),o=t.main===a?null===(e=document.querySelector(".column.avatar img"))||void 0===e?void 0:e.src:null;new c.default({target:r,props:{playerId:t.main,url:o}}),new s.default({target:r,props:{country:yield Object(w.getActiveCountry)()}})}}}))).apply(this,arguments)}function G(){return ee.apply(this,arguments)}function ee(){return(ee=R((function*(){p.default.info("Setup friends dropdown");var e=document.querySelector(".navbar-start");if(e){var t=document.createElement("div");t.classList.add("navbar-item"),e.appendChild(t),new i.default({target:t})}}))).apply(this,arguments)}function te(){return ne.apply(this,arguments)}function ne(){return(ne=R((function*(){yield j.default.processTokenIfAvailable(),yield j.default.createTwitchUsersCache()}))).apply(this,arguments)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=R((function*(){var e,t,n=()=>window.location.reload();h.default.on("data-imported",n),h.default.on("reload-browser-cmd",n),h.default.on("player-twitch-linked",(t=R((function*(e){var{playerId:t}=e;yield j.default.updateVideosForPlayerId(t)})),function(e){return t.apply(this,arguments)})),h.default.on("refetch-all-player-scores-cmd",(e=R((function*(e){var t;if(e){var n=(null!==(t=yield Object(k.getPlayers)())&&void 0!==t?t:[]).find(t=>t.id===e);n?(yield Object(k.updatePlayer)(T(T({},n),{},{lastUpdated:null})),h.default.publish("refresh-all-cmd")):console.error('The player with the ID "'.concat(e,'" does not exist in the cache'))}else console.error("Command requires a player ID")})),function(t){return e.apply(this,arguments)})),unsafeWindow&&(unsafeWindow.ssplEventBus=h.default)}))).apply(this,arguments)}function oe(){var e=document.querySelector("footer .content");if(e){var t=e.querySelector("p:nth-child(2)");t&&t.remove();var n=document.createElement("p");n.innerText=b.name;var r=document.createElement("a");r.href=b.updateURL,r.innerText=" v"+b.version,n.append(r),n.innerHTML+=" by ";var a=document.createElement("a");a.href="https://www.github.com/motzel",a.innerText=b.author,n.append(a),e.append(n)}}function ce(){return ie.apply(this,arguments)}function ie(){return(ie=R((function*(){se=!0,B()&&(yield M()),L()&&(yield H()),yield Object(y.default)(),oe()}))).apply(this,arguments)}var se=!1;function le(){return(le=R((function*(){try{if(p.default.info("init"),se)return;yield Object(r.default)(),new d.default({target:document.body}),yield Object(v.default)(),yield Object(x.setupDataFixes)();var e=yield Object(m.getMainPlayerId)();yield Promise.all([Object(m.getConfig)(),Object(S.getSsplCountryRanks)(),Object(P.getRankedSongs)(),Object(k.getScoresByPlayerId)(e)]),yield Promise.allSettled([X(),Object(_.setLangFromConfig)(),re(),Z(),Q(),G(),te()]),yield ce(),p.default.info("Setup complete")}catch(e){console.error(e)}}))).apply(this,arguments)}!function(){p.default.info("Setup styles"),(GM_addStyle||(()=>{}))(n(153).toString()),document.querySelector("head").innerHTML+='<link rel="stylesheet" href="https://scoresaber.com/imports/css/darkmode.css?v=1.0.3" type="text/css"/>';var e=Object(f.getThemeFromFastCache)();e||(e=Object(g.getSsDefaultTheme)()),Object(g.setTheme)(e)}(),document.addEventListener("DOMContentLoaded",(function(){return le.apply(this,arguments)}))},function(e,t,n){"use strict";n.r(t);var r=n(2),a=n(3),o=n(7),c=n(5);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){d(o,r,a,c,i,"next",e)}function i(e){d(o,r,a,c,i,"throw",e)}c(void 0)}))}}var b,p,f,O=null,j=(f=u((function*(){var e,t,n,i,l,d,f=()=>b,j=()=>p,m=()=>GM_getTab?new Promise(e=>GM_getTab(e)):Promise.resolve(null),g=(l=u((function*(){try{var e=yield m(),t=yield new Promise(e=>GM_getTabs(e));return Object.values(t).map(t=>s(s({},t),{},{since:Object(o.dateFromString)(t.since),current:e&&t.id===e.id}))}catch(e){return[]}})),function(){return l.apply(this,arguments)}),h=(i=u((function*(e,t){try{var n=yield m();return n[e]=t,GM_saveTab(n),n}catch(e){return null}})),function(e,t){return i.apply(this,arguments)}),y=(n=u((function*(e){try{var t=yield m();return Object.entries(e).forEach(e=>{var[n,r]=e;return t[n]=r}),GM_saveTab(t),t}catch(e){return null}})),function(e){return n.apply(this,arguments)}),v=(e,t)=>{try{return GM_setValue("nodeSync",e+"::"+t),!0}catch(e){return!1}},_=(t=u((function*(e){yield y({id:e,since:new Date,current:!0,visible:!0,version:c.versionNumeric}),v(e,"added")})),function(e){return t.apply(this,arguments)}),w=(e=u((function*(){a.default.info("Node ".concat(b," has been removed"),"NodeSync"),v(b,"removed")})),function(){return e.apply(this,arguments)});return b||(b=Object(r.uuid)(),window.addEventListener("beforeunload",()=>w(),{capture:!0}),window.addEventListener("visibilitychange",u((function*(){h("visible","visible"===document.visibilityState),a.default.debug("Node ".concat(b," is now ").concat(document.visibilityState),"NodeSync"),v(b,document.visibilityState)})),{capture:!0}),GM_addValueChangeListener&&GM_addValueChangeListener("nodeSync",(d=u((function*(e,t,n,r){a.default.debug("Node synchronization event from ".concat(r?"REMOTE":"CURRENT"," node"),"NodeSync");var o=(yield g()).sort((e,t)=>e.visible===t.visible?t.since-e.since:t.visible-e.visible),i=o.reduce((e,t)=>t.version>e?t.version:e,0);if(c.versionNumeric<i)window.location.reload();else{var s=o.length?o[0].id:null;s!==p&&(a.default.info("Node ".concat(s," is NEW MASTER, replacing ").concat(p),"NodeSync"),p=s,a.default.table(o))}})),function(e,t,n,r){return d.apply(this,arguments)})),yield _(b),a.default.info("NEW node ".concat(b," has been created"),"NodeSync")),O={getId:f,getMasterId:j,isMaster:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f();return j()===e}}})),function(){return f.apply(this,arguments)});t.default=()=>{var e;return null!==(e=O)&&void 0!==e?e:j()}},function(e,t,n){"use strict";n.r(t),n.d(t,"uuid",(function(){return r}));var r=e=>e?(e^crypto.getRandomValues(new Uint8Array(1))[0]%16>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,r)},function(e,t,n){"use strict";n.r(t),n.d(t,"enabledTypes",(function(){return u}));var r=n(4),a=n.n(r),o=n(6);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l={NONE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4,TRACE:5},d=l.INFO,u=[];t.default=i(i({table:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.TRACE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(!u.length||u.includes(n))&&d>=t?console.table(e):null},trace:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(!u.length||u.includes(t))&&d>=l.TRACE?console.debug("[".concat(a.a.header.name).concat(t?" / ".concat(t):"","]"),e):null},debug:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(!u.length||u.includes(t))&&d>=l.DEBUG?console.debug("[".concat(a.a.header.name).concat(t?" / ".concat(t):"","]"),e):null},info:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(!u.length||u.includes(t))&&d>=l.INFO?console.info("[".concat(a.a.header.name).concat(t?" / ".concat(t):"","]"),e):null},warn:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(!u.length||u.includes(t))&&d>=l.WARN?console.warn("[".concat(a.a.header.name).concat(t?" / ".concat(t):"","]"),e):null},error:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(!u.length||u.includes(t))&&d>=l.ERROR?console.error("[".concat(a.a.header.name).concat(t?" / ".concat(t):"","]"),e):null}},l),{},{level:()=>d,setLevel:e=>{d=Object.values(l).find(t=>t===e)?e:d},logOnly:e=>u=Object(o.arrayUnique)(u.concat(Array.isArray(e)?e:[e])),logAll:()=>u=[]})},function(e,t,n){var r=n(5);e.exports.config={entry:"./src/index.js"},e.exports.header=r,e.exports.buildedHeader=()=>{var e=[];for(var t in e.push("// ==UserScript=="),r)if(!["versionNumeric"].includes(t))if(Array.isArray(r[t]))for(var n in r[t].length>0&&e.push("//"),r[t])e.push("// @"+t.padEnd(13)+r[t][n]);else e.push("// @"+t.padEnd(13)+r[t]);return e.push("// ==/UserScript=="),e.push(""),e.join("\n")}},function(e){e.exports=JSON.parse('{"name":"ScoreSaber country leaderboard","namespace":"https://motzel.dev","version":"1.8.5","versionNumeric":10805000,"description":"ScoreSaber Enhancements","author":"motzel","icon":"https://scoresaber.com/imports/images/logo.ico","updateURL":"https://github.com/Omurky/ScoreSaberCountryLeaderboard/raw/master/dist/scoresaber-country-leaderboard.user.js","downloadURL":"https://github.com/Omurky/ScoreSaberCountryLeaderboard/raw/master/dist/scoresaber-country-leaderboard.user.js","supportURL":"https://github.com/Omurky/ScoreSaberCountryLeaderboard/issues","match":["https://scoresaber.com/*"],"include":["/^https://scoresaber\\\\.com\\\\/global(\\\\/\\\\d+&country=pl|\\\\?country=pl)/"],"connect":["www.beatsavior.io"],"require":[],"grant":["GM_addStyle","GM_info","GM_xmlhttpRequest","GM_getTab","GM_getTabs","GM_saveTab","GM_getValue","GM_setValue","GM_addValueChangeListener","unsafeWindow"],"run-at":"document-start"}')},function(e,t,n){"use strict";n.r(t),n.d(t,"capitalize",(function(){return r})),n.d(t,"isEmpty",(function(){return a})),n.d(t,"convertArrayToObjectByKey",(function(){return o})),n.d(t,"arrayDifference",(function(){return c})),n.d(t,"arrayIntersection",(function(){return i})),n.d(t,"arrayUnique",(function(){return s})),n.d(t,"nullIfUndefined",(function(){return l})),n.d(t,"defaultIfFalsy",(function(){return d})),n.d(t,"getFirstRegexpMatch",(function(){return u})),n.d(t,"escapeHtml",(function(){return b})),n.d(t,"isDateObject",(function(){return p})),n.d(t,"isPromise",(function(){return f})),n.d(t,"isString",(function(){return O}));var r=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>!e||e.constructor===Object&&0===Object.keys(e).length,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.reduce((e,r)=>(n&&!e[r[t]]&&(e[r[t]]=[]),n?e[r[t]].push(r):e[r[t]]=r,e),{})},c=(e,t)=>e.filter(e=>!t.includes(e)),i=(e,t)=>e.filter(e=>t.includes(e)),s=e=>[...new Set(e)],l=e=>void 0!==e?e:null,d=(e,t)=>e||t,u=(e,t)=>{var n=e.exec(t);return n?n[1]:null},b=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"),p=e=>e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e),f=e=>e&&"[object Promise]"===Object.prototype.toString.call(e),O=e=>"[object String]"===Object.prototype.toString.call(e)},function(e,t,n){"use strict";n.r(t),n.d(t,"SECOND",(function(){return o})),n.d(t,"MINUTE",(function(){return c})),n.d(t,"HOUR",(function(){return i})),n.d(t,"DAY",(function(){return s})),n.d(t,"isValidDate",(function(){return l})),n.d(t,"getClientTimezoneOffset",(function(){return d})),n.d(t,"truncateDate",(function(){return u})),n.d(t,"toUTCDateTimestamp",(function(){return b})),n.d(t,"toSSTimestamp",(function(){return p})),n.d(t,"dayTrunc",(function(){return f})),n.d(t,"addToDate",(function(){return O})),n.d(t,"daysAgo",(function(){return j})),n.d(t,"getFirstNotNewerThan",(function(){return m})),n.d(t,"dateFromString",(function(){return g})),n.d(t,"timestampFromString",(function(){return h})),n.d(t,"durationToMillis",(function(){return y})),n.d(t,"millisToDuration",(function(){return v}));var r=n(8),a=n(6),o=1e3,c=60*o,i=60*c,s=24*i,l=e=>e instanceof Date&&!isNaN(e);function d(){var e=(new Date).getTimezoneOffset(),t=Math.abs(e),n=t%60;return(e<0?"+":"-")+Math.floor(t/60).toString().padStart(2,"0")+":"+n.toString().padStart(2,"0")}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day",n=new Date(e.getTime());switch(t){case"year":n.setMonth(0);case"month":n.setDate(1);case"day":n.setHours(0);case"hour":n.setMinutes(0);case"minute":n.setSeconds(0);case"second":n.setMilliseconds(0)}return n}function b(e){var t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDate();return Date.UTC(t,n,r,0,0,0,0)}function p(e){return new Date(Date.parse(e.toLocaleString("pl-PL",{timeZone:"Australia/Brisbane",hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).replace(/(\d+)\.(\d+)\.(\d+),\s(\d+):(\d+):(\d+)/,"$3-$2-$1"))).getTime()}function f(e){return(e=e instanceof Date?e:g(e)).setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}var O=(e,t)=>new Date(e.getTime()+t),j=e=>O(new Date,-e*s),m=(e,t)=>t.map(e=>parseInt(e)).sort((e,t)=>t-e).reduce((t,n)=>null===t&&n<=e?n:t,null),g=e=>{var t=e&&Object(a.isString)(e)?e.match(/^(\d{4}-\d{1,2}-\d{1,2})\s+(\d{1,2}:\d{1,2}(:\d{1,2})?)\sUTC$/):null;t&&t.length>=3&&(e=t[1]+"T"+t[2]+"Z");var n=e?new Date(Date.parse(e)):null;return l(n)?n:null},h=e=>{var t=g(e);return t?t.getTime():null},y=e=>{var t=e.match(/^\s*(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)\s*$/);return t?(t[1]?1e3*parseInt(t[1],10)*60*60:0)+(t[2]?1e3*parseInt(t[2],10)*60:0)+(t[3]?1e3*parseInt(t[3],10):0):null},v=e=>{var t=Object(r.padNumber)(Math.floor(e/36e5));e-=1e3*t*60*60;var n=Object(r.padNumber)(Math.floor(e/6e4));e-=1e3*n*60;var a=Object(r.padNumber)(Math.floor(e/1e3));return"".concat(t,"h").concat(n,"m").concat(a,"s")}},function(e,t,n){"use strict";n.r(t),n.d(t,"formatNumberWithSuffix",(function(){return c})),n.d(t,"formatNumber",(function(){return i})),n.d(t,"parseFormattedNumber",(function(){return s})),n.d(t,"formatDate",(function(){return l})),n.d(t,"formatDateRelativeInUnits",(function(){return d})),n.d(t,"formatDateRelative",(function(){return u})),n.d(t,"substituteVars",(function(){return b})),n.d(t,"round",(function(){return p})),n.d(t,"roundToPrecision",(function(){return f})),n.d(t,"padNumber",(function(){return O}));var r=n(7),a=n(9),o=n(56);function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return(e?i(e,n,r):"-")+(e&&t?t:"")}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(n&&e>0?"+":"")+e.toLocaleString(Object(a.getCurrentLocale)(),{minimumFractionDigits:t,maximumFractionDigits:t})}function s(e){return new o.NumberParser(Object(a.getCurrentLocale)()).parse(e)}function l(e){return new Intl.DateTimeFormat(Object(a.getCurrentLocale)(),{localeMatcher:"best fit",dateStyle:"short",timeStyle:"medium"}).format(e)}function d(e){return new Intl.RelativeTimeFormat(Object(a.getCurrentLang)(),{localeMatcher:"best fit",numeric:"auto",style:"long"}).format(e,"day")}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.round,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto",o=new Intl.RelativeTimeFormat(Object(a.getCurrentLang)(),{localeMatcher:"best fit",numeric:"auto",style:"long"}),c=(Date.now()-Object(r.dateFromString)(e))/1e3;switch(n){case"auto":return c<60?o.format(-t(c),"second"):c<3600?o.format(-t(c/60),"minute"):c<86400?o.format(-t(c/3600),"hour"):c<2592e3?o.format(-t(c/86400),"day"):c<31536e3?o.format(-t(c/2592e3),"month"):o.format(-t(c/31536e3),"year");default:var i="second"===n?1:"minute"===n?60:"hour"===n?3600:"day"===n?86400:"month"===n?2592e3:"year"===n?31536e3:null;return i||(i=1,n="second"),o.format(-t(c/i),n)}}function b(e,t){return Object.keys(t).reduce((e,n)=>e.replace(new RegExp("\\${"+n+"}","gi"),t[n]),e)}var p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!Number.isFinite(e))return null;var n=Math.pow(10,t);return Math.round((e+Number.EPSILON)*n)/n};function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1;return p(Math.floor(e/t)*t)}var O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(Array(t).fill("0").join("")+e).slice(-t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"getTranslations",(function(){return O})),n.d(t,"_",(function(){return j})),n.d(t,"getSupportedLangs",(function(){return m})),n.d(t,"getSupportedLocales",(function(){return g})),n.d(t,"getCurrentLang",(function(){return h})),n.d(t,"getCurrentLocale",(function(){return y})),n.d(t,"setCurrentLang",(function(){return v})),n.d(t,"setCurrentLocale",(function(){return _})),n.d(t,"trans",(function(){return w})),n.d(t,"setLangFromConfig",(function(){return k}));var r=n(10),a=n(53),o=n(8),c=n(54),i=n(36);function s(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}var l,d,u={pl:{id:"pl",name:"Polski",strings:r.default},en:{id:"en",name:"English",strings:a.default}},b={"pl-PL":{id:"pl-PL",name:"Polska"},"en-US":{id:"en-US",name:"United States"},"en-GB":{id:"en-GB",name:"United Kingdom"},"de-DE":{id:"de-DE",name:"Deutschland"},"es-ES":{id:"es-ES",name:"España"}},p="en",f="en-US",O=()=>u[p].strings,j=Object(c.writable)(O()),m=()=>Object.values(u).map(e=>({id:e.id,label:e.name})),g=()=>Object.values(b).map(e=>({id:e.id,label:e.name})),h=()=>p,y=()=>f,v=e=>{u[e]&&(p=e,j.set(O()))},_=e=>{b[e]&&(f=e)},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O();return Object(o.substituteVars)(e.split(".").reduce((e,t)=>e[t],n),t)},k=(l=function*(){var e=yield Object(i.getConfig)("others");v(e.language),_(e.locale)},d=function(){var e=this,t=arguments;return new Promise((function(n,r){var a=l.apply(e,t);function o(e){s(a,n,r,o,c,"next",e)}function c(e){s(a,n,r,o,c,"throw",e)}o(void 0)}))},function(){return d.apply(this,arguments)})},function(e,t,n){"use strict";n.r(t);var r=n(11);t.default={profile:{settings:{header:"Ustawienia",language:"Język",locale:"Lokalizacja",theme:"Motyw",songBrowser:{header:"Przeglądarka nut",autoTransform:"Automatycznie transformuj",defaultTypeHeader:"Domyślny rodzaj",defaultViewHeader:"Domyślny widok",defaultColumnsHeader:"Domyślne kolumny",defaultSortHeader:"Domyślne sortowanie",defaultIconsHeader:"Domyślne ikony",defaultItemsPerPageHeader:"Liczba pozycji na stronę"},profile:{header:"Profil",defaultChart:"Domyślny wykres",statsStyling:"Typ statystyk",showOnePpCalc:"Pokazuj kalkulator +1PP",showTwitchIcon:"Pokazuj przycisk Twitch",statsStyleBadge:"Emblematy",statsStyleText:"Tekst"},songLeaderboard:{header:"Ranking nutki",showDiff:"Pokazuj różnice",showWhatIfPp:'Pokazuj przycisk "jeśli tak zagrasz"',showBgCover:"Pokazuj okładkę w tle",defaultType:"Domyślny typ"},others:{header:"Inne",bgDownload:"Pobieraj w tle",refreshHeader:"Odświeżanie danych",keepView:"Utrzymuj widok",alwaysRefresh:"Zawsze odświeżaj"},export:"Eksport",import:"Import"},addPlayer:"Dodaj gracza",setAsDefault:"Ustaw jako Twój profil",addToFriends:"Dodaj do Przyjaciół",removeFromFriends:"Usuń z Przyjaciół",removePlayer:"Usuń gracza",rawNewPlay:"pp w nowej grze",onePpParseError:'Wpisz może jakąś liczbę, ok? ${num1} jest liczbą, czy ${num2} jest. Ale "${str}"?',ppAttribution:"Rzeczywisty wkład wyniku w całkowite PP",stats:{ranking:"Ranking",pp:"Punkty",playCount:"Liczba gier",totalScore:"Wynik razem",replays:"Powtórki obejrzane przez innych",replaysShort:"Powtorki",role:"Rola",inactiveAccount:"Konto nieaktywne",rankedPlayCount:"Liczba zagranych rankedów",countryRank:"Pozycja na krajowych leaderboardach",best:"Naj.",avg:"Śr.",totalRankedScore:"Wynik rankedów razem",avgRankedAccuracy:"Średnia celność rankedów",medianRankedAccuracy:"Mediana celności rankedów",stdDeviationRankedAccuracy:"Odchylenie stand. celności rankedów",avgRankedAccuracyShort:"Średnia",medianRankedAccuracyShort:"Mediana",stdDeviationRankedAccuracyShort:"Odchylenie std"},twitch:{link:"Połącz",linked:"Połączono",renew:"Odnów",daysLeft:"Pozostało dni: ${days}",setupPlayerProfile:"Ustaw profil Twitch",userNotFound:"Użytkownik Twitcha nie znaleziony",vodsBadge:"Twitch VOD",video:"Wideo"},aside:{globalRanking:"Ranking globalny",countryRanking:"Ranking krajowy",whatToPlay:"Co zagrać?"},whatToPlay:{all:"Wszystkie",notPlayed:"Niezagrane",toImprove:"Do poprawy",algorithmBy:"Algorytm szacowania dokładności opracowany przez"}},songBrowser:{types:{all:"Wszystkie",ranked_only:"Tylko rankingowe",unranked_only:"Tylko nierankingowe",not_played_only:"Tylko niezagrane",sniper_mode:"Tryb snipera"},typesOptions:{all:"Wszystkie",not_best:"Gdy NIEnajlepszy",best:"Gdy NAJlepszy"},viewTypes:{compact:"Kompaktowy",tabular:"Tabelaryczny",cards:"Karty"},fields:{timeset:"Data zagrania",timesetShort:"Data",rank:"Rank",rankShort:"#",stars:"Gwiazdki",starsShort:"*",pp:"PP",ppShort:"PP",estimatedPp:"Szac. PP",estimatedPpShort:"Szac. PP",acc:"Celność",accShort:"Cel.",percentage:"Procent",percentageShort:"%",estimatedAcc:"Szac. celność",estimatedAccShort:"Szac. cel.",maxPp:"Max PP",maxPpShort:"Max PP",bpm:"BPM",bpmShort:"BPM",njs:"NJS",njsShort:"NJS",nps:"NPS",npsShort:"NPS",duration:"Czas",durationShort:"Czas",diffPp:"+PP global",diffPpShort:"+PP",weighted:"Ważone:",weightedPp:"Ważone PP",weightedPpShort:"wPP",score:"Wynik",scoreShort:"Wynik",diff:"Różnice",diffShort:"Różnice",icons:"Ikony akcji",iconsShort:"Ikony"},sort:{ascending:"Rosnąco",descending:"Malejąco"},icons:{bsr:"!bsr",beatsaver:"Beat Saver",oneclick:"OneClick Install",preview:"Podgląd mapy",twitch:"Twitch",beatsavior:"Beat Savior",bsrTooltip:"Skopiuj !bsr",beatSaverTooltip:"Przejdź na Beat Saver",beatSaviorTooltip:"Pokaż ostatnio zagrane z Beat Savior",twitchTooltip:"Podgląd VOD"},typeHeader:"Rodzaj",songHeader:"Nutka",songPlaceholder:"Zacznij wpisywać...",countryRankHeader:"Pozycja w kraju",viewHeader:"Widok",showHeader:"Pokazuj",sortingHeader:"Sortowanie",compare:{label:"Porównaj",add:"Dodaj gracza do porównania",remove:"Usuń z porównania",saveAsDefault:"Zapisz porównanie jako domyślne"},playlist:{label:"Playlista",showChecks:"Pokaż checkboksy",hideChecks:"Ukryj checkboksy",checkAll:"Zaznacz wszystkie",checkPage:"Zaznacz stronę",clear:"Wyczyść",export:"Eksportuj playlistę"},csv:{label:"CSV",export:"Eksport do CSV"},transformingTheUniverse:"Transformacja wszechświata w toku...",noData:{title:"Strasznie tu pusto",info:"Wygląda na to, że żadna nutka nie spełnia wszystkich wybranych wymagań. Zmień coś może?"},noScore:"Brak wyniku",former:"Poprzednio",totalPp:"Razem dla ${name}",rankOfDate:"Pozycja z dnia ${date}, kliknij aby odświeżyć",ssScoreType:{top:"Najlepsze",recent:"Ostatnie"},estimated:"Szacunkowo",estimatedShort:"Szac."},songLeaderboard:{player:"Gracz",mods:"Mody",nobodyPlayed:"Wygląda na to, że nikt jeszcze nie zagrał tej nutki.",searching:"Wyszukiwanie wyników...",ranked:"Rankingowa",unranked:"Nierankingowa",maxPpSuffix:"pp maks.",types:{all:"Wszyscy",country:"Tylko kraj",country_and_friends:"Kraj + Przyjaciele",manually_added:"Tylko Przyjaciele"},difficultyGraph:"Difficulty graph"},songCard:{scores:"Wyniki",notes:"Klocki",bombs:"Bomby",obstacles:"Przeszkody"},refresh:{lastDownload:"Pobrano:",rankedsDownload:"Pobieranie aktualnych rankedów",countryPlayersDownload:"Pobieranie aktywnych graczy",beatSavior:"Aktualizacja danych Beat Savior",waiting:"[Czekam ${seconds}s]",error:"Błąd pobierania danych. Spróbuj ponownie.",btnDisabledBgDlInProgress:"Odświeżanie wyłączone. Trwa pobieranie w tle..."},whatif:{label:"Jeśli tak zagrasz:"},dashboard:{rankingHeader:"Ranking",showOriginal:"Pokaż oryginał",lastScores:"Ostatnie wyniki",bestScores:"Najlepsze wyniki",ranking:{header:{player:"Gracz",song:"Nuta",timeset:"Data",acc:"%",pp:"PP",change:"Różnica"},changeOptions:{day:"Dzień",week:"Tydzień",month:"Miesiąc"}},periods:{last3Days:"Ostatnie 3 dni",lastWeek:"Ostatni tydzień",last2Weeks:"Ostatnie 2 tygodnie",lastMonth:"Ostatni miesiąc",last3Months:"Ostatnie 3 miesiące",lastHalfYear:"Ostatnie pół roku",lastYear:"Ostatni rok",all:"Wszystkie"},setCurrentCountry:"Ustaw jako aktualny kraj",areYouSureSetCurrentCountry:"Czy na pewno chcesz ustawić ${country} jako bieżący kraj?",areYouSureChangeCurrentCountry:"Czy na pewno chcesz zmienić kraj z ${currentCountry} na ${country}?",removeCurrentCountry:"Usuń bieżący kraj",removeCurrentCountryConfirmationTitle:"Czy na pewno chcesz usunąć wsparcie dla bieżącego kraju?",removeCurrentCountryConfirmationContent:"Zostaniesz tylko Ty i Twoi przyjaciele.",onboardingLine1:"Musimy teraz pobrać wszystkie wyniki graczy z wybranego kraju.",onboardingLine2:"Usiądź sobie wygodnie, kliknij Start i poczekaj, bo trochę to potrwa..."},chart:{timeLabel:"Czas",rankLabel:"Pozycja",ppLabel:"PP",activityLabel:"Aktywność",rankTooltip:"#${value}",ppTooltip:"${value}pp",activityTooltip:"Aktywność: ${value} (nutki)",starsLabel:"Gwiazdki",accuracyLabel:"Celność",accTooltip:"Celność: ${acc}% (${mods}) | Gwiazdki: ${stars}*",percentageTooltip:"Procent: ${acc}% (${mods}) | Gwiazdki: ${stars}*",accTooltipNoMods:"Celność: ${acc}% | Gwiazdki: ${stars}*",percentageTooltipNoMods:"Procent: ${acc}% | Gwiazdki: ${stars}*",rankingButton:"Ranking",accuracyButton:"Celność",percentageButton:"Procent",none:"Wyłączony"},beatSaviorImporter:{beatSaviorBtn:"Beat Savior",header:"Import danych Beat Savior",importBtn:"Importuj",selectOtherFolderBtn:"Wybierz inny folder",introduction:r.IS_BEAT_SAVIOR_API_ENABLED?'Plugin pobiera dane z serwisu Beat Savior automatycznie, jednak są tam przechowywane tylko najnowsze wyniki.<br /><br />To narzędzie pozwala na zaimportowanie danych z moda <a href="https://www.beatsavior.io/" target="_blank" rel="noopener">BeatSavior</a> przechowywanych <strong>na Twoim komputerze</strong> , które są trzymane dla ostatnich 30 dni. Narzędzie korzysta z nowego API File System Access, wymagana jest przeglądarka Chrome/Edge w wersji co najmniej 86.':'To narzędzie pozwala na zaimportowanie danych z moda <a href="https://www.beatsavior.io/" target="_blank" rel="noopener">BeatSavior</a> przechowywanych <strong>na Twoim komputerze</strong>. Narzędzie korzysta z nowego API File System Access, wymagana jest przeglądarka Chrome/Edge w wersji co najmniej 86.',selectFolderFirst:"Przy pierwszym imporcie będziesz musiał wskazać folder, w którym przechowywane są dane. Ponieważ przeglądarka nie zezwala na dostęp do katalogów systemowych musisz najpierw skopiować katalog <strong>C:Users&lt;YOUR WINDOWS USER&gt;AppDataRoamingBeat Savior Data</strong> w inne miejsce, np. na pulpit. Następnie wskaż ten folder, gdy zostaniesz zapytany.",selectFolderConsecutive:"Skopiuj nowe dane z folderu <strong>C:Users&lt;YOUR WINDOWS USER&gt;AppDataRoamingBeat Savior Data</strong> do lokalizacji, w której trzymasz dane Beat Savior.",permissions:"Przeglądarka poprosi Cię o potwierdzenie, że udzielasz zgody do odczytu lokalnych plików, udziel jej. To potwierdzenie będzie konieczne podczas każdej nowej sesji (po zamknięciu zakładki lub przeładowaniu strony).",importInProgress:"Importowanie danych. Proszę czekać...",importCompleted:"Dane zostały zaimportowane",fileSystemApiNotAvailableException:"API File System Access nie jest dostępne",noFolderSelectedException:"Nie wybrano folderu",noDirectoryHandleException:"Nie udało się pobrać uchwytu katalogu",noPermissionException:"Nie udzielono zgody na odczyt lokalnych plików",oldPlayerScoresException:"Proszę odświeżyć wyniki. Nie mogą być starsze niż 5 minut.",skipping:"pomijam",loading:"wczytywanie",fetchPlayerScores:"pobieranie wyników gracza",savingToDb:"zapisywanie"},beatSavior:{left:"Lewa",leftShort:"L",right:"Prawa",rightShort:"P",accLeft:"Celność lewej",accLeftShort:"Cel. L",accRight:"Celność prawej",accRightShort:"Cel. P",avgAcc:"Średnia celność",avgAccShort:"Śr. cel.",beforeCut:"Cięcie przed",beforeCutShort:"Przed",afterCut:"Cięcie po",afterCutShort:"Po",accuracy:"Celność",accuracyShort:"Cel.",misses:"Pudła",missesShort:"Pudła",maxCombo:"Maks combo",maxComboShort:"Combo",pauses:"Pauzy",pausesShort:"Pauzy",bombHit:"Trafienie bomby",bombHitShort:"Bomby",wallHit:"Trafienie ściany",wallHitShort:"Ściany",beatSaviorAcc:"Beat Savior Cel.",beatSaviorAccShort:"Sav. Cel.",beatSaviorStats:"Beat Savior Stat.",beatSaviorStatsShort:"Sav. Stat.",avgStatsBtn:"Średnia",avgStatsTooltip:"Pokaż średnią celność",avgStatsHeader:"Średnia celność (liczba nutek: ${num})",switchToAccView:"Przełącz na widok celności",switchToGridView:"Przełącz na widok siatki",switchToChartView:"Przełącz na widok wykresu",clickToShowDetails:"Kliknij, aby pokazać/ukryć szczegóły"},themes:{dark:"Jedyny słuszny",light:"Wypalający oczy",drakonno:"Drakonno",sombra:"Sombra"},plugin:{cachedButton:"Cache",liveButton:"Live"},common:{ok:"OK",save:"Zapisz",cancel:"Anuluj",close:"Zamknij",options:"Opcje",search:"Szukaj",nothingSelected:"Nic nie wybrano",to:"do",noData:"Brak danych",downloadError:"Błąd pobierania"},import:{selectJsonFile:"Wybierz plik JSON zawierający eksport danych",oldVerNotSupported:"Import pliku ze starszej wersji pluginu nie jest wspierany",incorrectFile:"Niepoprawny plik eksportu",incorrectJsonFile:"Niepoprawny plik JSON"},db:{conversionMessage:"Konwersja bazy danych",conversionSecondaryMessage:"Proszę czekać, nie powinno to zająć dłużej niż pół minuty..."},onboarding:{importOrSetProfile:"Zaimportuj dane lub ustaw jako swój profil"}}},function(e,t,n){"use strict";n.r(t),n.d(t,"IS_BEAT_SAVIOR_API_ENABLED",(function(){return g})),n.d(t,"fetchBeatSaviorData",(function(){return h})),n.d(t,"shouldBeatSaviorBeUpdated",(function(){return y})),n.d(t,"updateBeatSaviorData",(function(){return v}));var r=n(12),a=n(8),o=n(13),c=n(1),i=n(14),s=n(15),l=n(7);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){p(o,r,a,c,i,"next",e)}function i(e){p(o,r,a,c,i,"throw",e)}c(void 0)}))}}var O,j,m,g=!0,h=(m=f((function*(e){return Object(r.gmFetch)(Object(a.substituteVars)("https://www.beatsavior.io/api/livescores/player/${playerId}",{playerId:e}))})),function(e){return m.apply(this,arguments)}),y=(j=f((function*(e){var t,n=l.HOUR,r=yield Object(s.getPlayerInfo)(e);if(!r)return!1;var a=Object(l.dateFromString)(null!==(t=null==r?void 0:r.beatSaviorLastUpdated)&&void 0!==t?t:null);return!a||a.getTime()<(new Date).getTime()-n})),function(e){return j.apply(this,arguments)}),v=(O=f((function*(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!g)return null;try{if(!(yield y(e)))return null;var n=yield Object(s.getPlayerInfo)(e),a=yield h(e);if(!a||!a.length)return null;var l=yield Object(i.getPlayerScoresForBeatSaviorMatching)(e),d=a.map(e=>Object(i.parseBeatSaviorLine)(e,l)).filter(e=>!i.IMPORT_ONLY_SS_SCORES||e&&e.ssScore);if(!d.length)return null;yield Object(i.storeBeatSaviorData)(d),yield Object(s.updatePlayer)(u(u({},n),{},{beatSaviorLastUpdated:new Date})),t&&o.default.publish("player-beat-savior-updated",{nodeId:Object(c.default)().getId(),playerId:e,matchedBsData:d})}catch(e){if(e instanceof r.SsplError)return null;throw e}})),function(e){return O.apply(this,arguments)})},function(e,t,n){"use strict";n.r(t),n.d(t,"delay",(function(){return d})),n.d(t,"SsplError",(function(){return u})),n.d(t,"ResponseError",(function(){return b})),n.d(t,"TimeoutError",(function(){return p})),n.d(t,"AbortError",(function(){return f})),n.d(t,"JsonParsingError",(function(){return O})),n.d(t,"NotFoundError",(function(){return j})),n.d(t,"gmFetch",(function(){return m})),n.d(t,"queueRetriedPromise",(function(){return g})),n.d(t,"queueFetch",(function(){return y})),n.d(t,"queueFetchJson",(function(){return _})),n.d(t,"queueFetchHtml",(function(){return k})),n.d(t,"fetchHtmlPage",(function(){return P})),n.d(t,"fetchApiPage",(function(){return I}));var r=n(8);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){i(o,r,a,c,s,"next",e)}function s(e){i(o,r,a,c,s,"throw",e)}c(void 0)}))}}var l,d=(l=s((function*(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((r,a)=>setTimeout(e=>n?a(t):r(t),e))})),function(e,t){return l.apply(this,arguments)});class u extends Error{constructor(e){super(e),this.name="SsplError"}}class b extends u{constructor(e){super(e),this.name="ResponseError"}}class p extends b{constructor(e,t){super(t),this.name="TimeoutError",this.timeout=e}}class f extends b{constructor(e){super(e),this.name="AbortError"}}class O extends b{constructor(e){super(e),this.name="JsonParsingError"}}class j extends b{constructor(e){super(e),this.name="NotFoundError"}}var m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4;return new Promise((n,r)=>GM_xmlhttpRequest({method:"GET",url:e,timeout:t,onabort:()=>r(new f("Request was aborted")),onerror:()=>r(new b("Response error")),onload:e=>{try{n(JSON.parse(e.response))}catch(e){r(new O("JSON parsing error"))}n(e.response)},ontimeout:()=>r(new p("Timeout error",t))}))};function g(e,t){return h.apply(this,arguments)}function h(){return(h=s((function*(e,t){for(var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3,o=void 0,c=0;c<a;c++){try{yield e.add(()=>t().then(e=>o=e).catch(e=>{e instanceof u&&(c=a),n=e}))}catch(t){console.warn(t.name),n=new p(e.timeout,"Your time has come"),r&&r.abort&&r.abort()}if(void 0!==o)return Promise.resolve(o)}throw n}))).apply(this,arguments)}function y(e,t,n){return v.apply(this,arguments)}function v(){return(v=s((function*(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=new AbortController,c=a.signal,i=[1e3,5e3,1e4],l=0;return g(e,()=>{return window.fetch(t,o(o({},n),{},{signal:c,mode:"cors"})).then((a=s((function*(t){if(429===t.status){var n=parseInt(t.headers.get("x-ratelimit-reset"),10),a=(n&&!isNaN(n)?new Date(1e3*n).getTime()-(new Date).getTime():0)+i[l++];if(a&&a>0){var o,c=a;e.pause(),r&&(o=setInterval(e=>r(c-=500),500)),yield d(a),r&&clearInterval(o),e.start()}throw new Error("Rate limit")}if([404,403].includes(t.status))throw new j("404 Not Found");return t})),function(e){return a.apply(this,arguments)}));var a},a)}))).apply(this,arguments)}function _(e,t,n){return w.apply(this,arguments)}function w(){return(w=s((function*(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return y(e,t,n,r).then(e=>e.json())}))).apply(this,arguments)}function k(e,t,n){return $.apply(this,arguments)}function $(){return($=s((function*(e,t,n){return y(e,t,n).then(e=>e.text()).then(e=>(new DOMParser).parseFromString(e,"text/html"))}))).apply(this,arguments)}var x,S,P=(S=s((function*(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return k(e,Object(r.substituteVars)(t,{page:n}))})),function(e,t){return S.apply(this,arguments)}),I=(x=s((function*(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _(e,Object(r.substituteVars)(t,{page:n}),{},a)})),function(e,t){return x.apply(this,arguments)})},function(e,t,n){"use strict";var r;n.r(t);var a=(()=>{var e={};r||(r=new BroadcastChannel("global-pub-sub"));var t=t=>Array.isArray(e[t]),n=function(n,r){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t(n)&&e[n].forEach(e=>e(r,a,n))},a=(n,r)=>{t(n)&&(e[n]=e[n].filter(e=>e!==r))};return r.onmessage=e=>{var{data:{eventName:t,value:r}}=e;return n(t,r,!1)},{on(n,r){if(t(n)||(e[n]=[]),!e[n].find(e=>e===r))return e[n].push(r),()=>{a(n,r)}},unsubscribe:a,publish(e,t){n(e,t),r.postMessage({eventName:e,value:t})}}})();t.default=a},function(e,t,n){"use strict";n.r(t),n.d(t,"IMPORT_ONLY_SS_SCORES",(function(){return m})),n.d(t,"DATA_TYPE",(function(){return g})),n.d(t,"extractBeatSaviorTrackersData",(function(){return h})),n.d(t,"getAccTooltipFromTrackers",(function(){return y})),n.d(t,"getPlayerScoresForBeatSaviorMatching",(function(){return v})),n.d(t,"parseBeatSaviorLine",(function(){return _})),n.d(t,"storeBeatSaviorData",(function(){return w}));var r=n(8),a=n(9),o=n(15),c=n(7),i=n(19),s=n(45);function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){p(o,r,a,c,i,"next",e)}function i(e){p(o,r,a,c,i,"throw",e)}c(void 0)}))}}var O,j,m=!0,g={None:0,Pass:1,Fail:2,"Practice mode":3,Replay:4,Campaign:5},h=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)return null;var n=t?r.round:e=>e,{winTracker:{nbOfPause:a=null,won:o=null}={nbOfPause:null,won:null},hitTracker:{maxCombo:c=null,miss:i=null,bombHit:s=null,nbOfWallHit:l=null}={maxCombo:null,miss:null,bombHit:null,nbOfWallHit:null},accuracyTracker:{accLeft:d=null,leftAverageCut:u=null,accRight:b=null,rightAverageCut:p=null,gridAcc:f=null}={accLeft:null,leftAverageCut:null,accRight:null,rightAverageCut:null,gridAcc:null},scoreGraphTracker:{graph:O=null}={graph:null}}=e;return a>99&&(a=0),d=d?n(d):null,b=b?n(b):null,{accLeft:d,leftAverageCut:u=u&&Array.isArray(u)?u.map(e=>Number.isFinite(e)?n(e):0):null,accRight:b,rightAverageCut:p=p&&Array.isArray(p)?p.map(e=>Number.isFinite(e)?n(e):0):null,gridAcc:f=f&&Array.isArray(f)&&12===f.length?f.slice(-4).concat(f.slice(4,8)).concat(f.slice(0,4)):null,graph:O=O&&Object.keys(O).length?O:null,miss:i,maxCombo:c,bombHit:s,nbOfWallHit:l,nbOfPause:a,fc:o&&!i}},y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" | ";if(!e)return null;var o=h(e);o.leftAverageCut&&(o.leftAverageCut=o.leftAverageCut.filter(e=>Number.isFinite(e)).map(e=>Object(r.formatNumber)(e)).join("/")),o.rightAverageCut&&(o.rightAverageCut=o.rightAverageCut.filter(e=>Number.isFinite(e)).map(e=>Object(r.formatNumber)(e)).join("/"));var c="beatSavior",i=[{key:"accLeftShort",val:"accLeft"},{key:"accRightShort",val:"accRight"},"\n",{key:"maxComboShort",val:"maxCombo"},{key:"pausesShort",val:"nbOfPause"},{key:"missesShort",val:"miss"},{key:"bombHitShort",val:"bombHit"},{key:"wallHitShort",val:"nbOfWallHit"}].filter(e=>!t||!t.length||!e.val||t.includes(e.val)).map(e=>e.key?void 0===o[e.val]||isNaN(o[e.val])?null:Object(a.trans)(c+"."+e.key)+": "+(Number.isFinite(o[e.val])?Object(r.formatNumber)(o[e.val],["accLeft","accRight"].includes(e.val)?2:0):"-")+(["accLeftShort","accRightShort"].includes(e.key)?" ("+("accLeftShort"===e.key&&o.leftAverageCut?o.leftAverageCut:o.rightAverageCut?o.rightAverageCut:"")+")":""):e).filter((e,t)=>e&&("\n"!==e||t));return i&&i.length&&i[i.length-1]===n&&i.pop(),i&&i.length?"Beat Savior\n"+i.join(n).replace(n+"\n"+n,"\n"):null},v=(j=f((function*(e){return(yield Object(o.getScoresByPlayerId)(e)).reduce((e,t)=>{if(!(t.timeset&&t.hash&&t.diffInfo&&t.diffInfo.diff))return e;var n=Object(c.truncateDate)(Object(c.dateFromString)(t.timeset),"day").getTime(),r=t.diffInfo.diff.toLowerCase();return e[t.hash]||(e[t.hash]={}),e[t.hash][r]||(e[t.hash][r]={}),e[t.hash][r][n]||(e[t.hash][r][n]=[]),e[t.hash][r][n].push(u({},t)),e},{})})),function(e){return j.apply(this,arguments)}),_=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,d=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,{deepTrackers:u}=e,b=l(e,["deepTrackers"]),{playerID:p,songID:f,songName:O,songArtist:j,songMapper:m,songDataType:h,songDifficulty:y,songDuration:v,songSpeed:_,songStartTime:w,trackers:k,timeSet:$,_id:x}=b;if(!($||r&&d))throw"lineIdx and fileTimestamps are required if there is no timeSet field in line data";var S=$?Object(c.dateFromString)($):new Date(d+1e3*r);if(x=null!==(n=x)&&void 0!==n?n:p+"_"+S.getTime(),h&&[g.None,g.Replay].includes(h))throw"Unsupported data type";var P=k&&k.winTracker&&k.winTracker.won&&k.hitTracker&&void 0!==k.hitTracker.leftNoteHit&&void 0!==k.hitTracker.rightNoteHit&&void 0!==k.hitTracker.miss?k.hitTracker.leftNoteHit+k.hitTracker.rightNoteHit+k.hitTracker.miss:null,I={beatSaviorId:x,leaderboardId:null,songId:p+"_"+f+"_"+y,timeset:S,fileId:i,fileName:s,playerId:p,start:w,speed:_,notesCount:P,hash:f,difficultyName:y,songName:O,songAuthorName:j,levelAuthorName:m,duration:v,dataType:h,saberAColor:a,saberBColor:o,trackers:k},C=Object(c.truncateDate)(S,"day").getTime();for(var T of[C,C+864e5,C-864e5]){var A,q,R;if(0===w&&(null==k||null===(A=k.scoreTracker)||void 0===A?void 0:A.score)&&(null==t||null===(q=t[f])||void 0===q||null===(R=q[y])||void 0===R?void 0:R[T])){var z=t[f][y][T].find(e=>e.score===k.scoreTracker.score);if(z&&z.beatSavior)return I;if(z)return I.ssScore=z,z.leaderboardId&&(I.leaderboardId=z.leaderboardId),z.diffInfo&&(I.diffInfo=z.diffInfo),I}}return I},w=(O=f((function*(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=i.db.transaction(["beat-savior","beat-savior-files","scores"],"readwrite",{durability:"strict"});if(r){var o=a.objectStore("beat-savior-files");yield o.put(u(u({},r),{},{importedOn:new Date})),t=a.objectStore("beat-savior");for(var c=yield t.index("beat-savior-fileId").openCursor(IDBKeyRange.bound(r.fileId,r.fileId));c;)yield c.delete(),c=yield c.continue()}else t=a.objectStore("beat-savior");yield Promise.all(e.filter(e=>!m||e.ssScore).map((n=f((function*(e){var{ssScore:n}=e,r=l(e,["ssScore"]);t.put(r)})),function(e){return n.apply(this,arguments)})));var d,b=[],p=a.objectStore("scores");return yield Promise.all(e.filter(e=>e.ssScore).map((d=f((function*(e){var{ssScore:t}=e,n=l(e,["ssScore"]),r=u(u({},t),{},{beatSavior:n});p.put(r),b.push(r)})),function(e){return d.apply(this,arguments)}))),yield a.done,Object(s.default)().addToCache(b),b})),function(e){return O.apply(this,arguments)})},function(e,t,n){"use strict";n.r(t),n.d(t,"isCountryPlayer",(function(){return ne})),n.d(t,"getActiveCountryPlayers",(function(){return re})),n.d(t,"getActiveCountryPlayersIds",(function(){return ae})),n.d(t,"filterPlayersByIdsList",(function(){return oe})),n.d(t,"getAllPlayersRanking",(function(){return ce})),n.d(t,"getCountryRanking",(function(){return ie})),n.d(t,"isDataAvailable",(function(){return se})),n.d(t,"updatePlayer",(function(){return le})),n.d(t,"getPlayers",(function(){return de})),n.d(t,"getPlayerInfo",(function(){return ue})),n.d(t,"getPlayerHistory",(function(){return be})),n.d(t,"getAllPlayersHistory",(function(){return pe})),n.d(t,"getPlayerInfoFromPlayers",(function(){return fe})),n.d(t,"getPlayerLastUpdated",(function(){return Oe})),n.d(t,"getPlayerProfileLastUpdated",(function(){return je})),n.d(t,"removeAllPlayerData",(function(){return me})),n.d(t,"getPlayerGroups",(function(){return ge})),n.d(t,"addPlayerToGroup",(function(){return he})),n.d(t,"removePlayerFromGroup",(function(){return ye})),n.d(t,"getFriendsIds",(function(){return ve})),n.d(t,"getFriends",(function(){return _e})),n.d(t,"getManuallyAddedPlayersIds",(function(){return we})),n.d(t,"getManuallyAddedPlayers",(function(){return ke})),n.d(t,"getAllActivePlayersIds",(function(){return $e})),n.d(t,"getAllActivePlayers",(function(){return xe})),n.d(t,"getPlayerProfileUrl",(function(){return Se})),n.d(t,"getPlayerAvatarUrl",(function(){return Pe})),n.d(t,"getPlayerScores",(function(){return Ie})),n.d(t,"getAllScores",(function(){return Ce})),n.d(t,"getScoresByPlayerId",(function(){return Te})),n.d(t,"isPlayerDataAvailable",(function(){return Ae})),n.d(t,"isAnyPlayerDataAvailable",(function(){return qe})),n.d(t,"getAllScoresSince",(function(){return Re})),n.d(t,"getAllScoresWithPpOver",(function(){return ze})),n.d(t,"getRankedScoresByPlayerId",(function(){return Ee})),n.d(t,"getPlayerSongScore",(function(){return Be})),n.d(t,"getSongScoreByPlayerId",(function(){return De})),n.d(t,"updateSongScore",(function(){return Le})),n.d(t,"getPlayerSongScoreHistory",(function(){return Ne})),n.d(t,"getPlayerScorePagesToUpdate",(function(){return Me})),n.d(t,"getPlayerRankedsScorePagesToUpdate",(function(){return Ue}));var r=n(16),a=n(49),o=n(45),c=n(51),i=(n(38),n(44)),s=n(46),l=n(39),d=n(8),u=n(7),b=n(6),p=n(36),f=n(23);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){g(o,r,a,c,i,"next",e)}function i(e){g(o,r,a,c,i,"throw",e)}c(void 0)}))}}var y,v,_,w,k,$,x,S,P,I,C,T,A,q,R,z,E,B,D,L,N,F,M,U,V,H,W,Z,K,X,J,Q,Y,G,ee,te,ne=(e,t)=>e&&e.id&&t&&e.country.toLowerCase()===t.toLowerCase(),re=(te=h((function*(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=null!==(t=yield de())&&void 0!==t?t:{},a=n?yield Object(p.getMainPlayerId)():null;return r.filter(t=>t&&t.id&&a&&t.id===a||ne(t,e))})),function(e){return te.apply(this,arguments)}),ae=(ee=h((function*(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(yield re(e,t)).filter(e=>!!e.id).map(e=>e.id)})),function(e){return ee.apply(this,arguments)}),oe=(e,t)=>t.filter(t=>e.includes(t.id)),ce=(G=h((function*(e){var t=yield xe(e);return t?Object.values(t).filter(e=>e.name).sort((e,t)=>t.pp-e.pp):null})),function(e){return G.apply(this,arguments)}),ie=(Y=h((function*(e){var t=yield re(e);return t?t.sort((e,t)=>t.pp-e.pp).slice(0,i.default.COUNTRY_PLAYERS_QTY):null})),function(e){return Y.apply(this,arguments)}),se=(Q=h((function*(){return(yield de()).length>0})),function(){return Q.apply(this,arguments)}),le=(J=h((function*(e){return Object(r.default)().set(e)})),function(e){return J.apply(this,arguments)}),de=(X=h((function*(){return Object(r.default)().getAll()})),function(){return X.apply(this,arguments)}),ue=(K=h((function*(e){var t;return null!==(t=yield Object(r.default)().get(e))&&void 0!==t?t:null})),function(e){return K.apply(this,arguments)}),be=(Z=h((function*(e){var t;return null!==(t=yield Object(a.default)().getAllFromIndex("players-history-playerId",e))&&void 0!==t?t:null})),function(e){return Z.apply(this,arguments)}),pe=(W=h((function*(e,t){var n;return null!==(n=yield Object(a.default)().getAllFromIndex("players-history-timestamp",IDBKeyRange.bound(e,t)))&&void 0!==n?n:[]})),function(e,t){return W.apply(this,arguments)}),fe=(e,t)=>(null==e?void 0:e[t])?e[t]:null,Oe=(H=h((function*(e){var t,n;return null!==(t=null===(n=yield ue(e))||void 0===n?void 0:n.lastUpdated)&&void 0!==t?t:null})),function(e){return H.apply(this,arguments)}),je=(V=h((function*(e){var t,n;return null!==(t=null===(n=yield ue(e))||void 0===n?void 0:n.profileLastUpdated)&&void 0!==t?t:null})),function(e){return V.apply(this,arguments)}),me=(U=h((function*(e){var t=yield Object(a.default)().getAllFromIndex("players-history-playerId",e),n=yield Object(o.default)().getAllFromIndex("scores-playerId",e);yield Promise.all([].concat(t.map(e=>Object(a.default)().deleteObject(e))).concat(n.map(e=>Object(o.default)().deleteObject(e))).concat([Object(r.default)().delete(e)]))})),function(e){return U.apply(this,arguments)}),ge=(M=h((function*(e){var t=yield Object(c.default)().getAllFromIndex("groups-name",e);return t&&t.length?Object.values(t.reduce((e,t)=>(e[t.name]||(e[t.name]={name:t.name,players:[]}),e[t.name].players.push(t.playerId),e),{})):null})),function(e){return M.apply(this,arguments)}),he=(F=h((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Default",n=(yield Object(c.default)().getAllFromIndex("groups-name",t,!0)).some(t=>t.playerId===e);if(!n)return Object(c.default)().set({name:t,playerId:e})})),function(e){return F.apply(this,arguments)}),ye=(N=h((function*(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Default",a=yield Object(c.default)().getAllFromIndex("groups-playerId",e,!0),o=a.filter(e=>!r||e.name===r);yield Promise.all(o.map((t=h((function*(e){return Object(c.default)().deleteObject(e)})),function(e){return t.apply(this,arguments)}))),!n||a.length>o.length||(yield me(e))})),function(e){return N.apply(this,arguments)}),ve=(L=h((function*(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=null!==(e=yield ge(void 0))&&void 0!==e?e:[];return Object(b.arrayUnique)(n.reduce((e,t)=>e.concat(t.players),[]).concat(t?[yield Object(p.getMainPlayerId)()]:[]).filter(e=>e))})),function(){return L.apply(this,arguments)}),_e=(D=h((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return oe(yield ve(t),yield de())})),function(e){return D.apply(this,arguments)}),we=(B=h((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=yield ve(t),r=Object(b.convertArrayToObjectByKey)(yield de(),"id");return n.filter(t=>{var n;return!ne(null!==(n=null==r?void 0:r[t])&&void 0!==n?n:null,e)})})),function(e){return B.apply(this,arguments)}),ke=(E=h((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return oe(yield we(e,t),yield de())})),function(e){return E.apply(this,arguments)}),$e=(z=h((function*(e){return Object(b.arrayUnique)((yield ae(e,!0)).concat(yield we(e,!1)))})),function(e){return z.apply(this,arguments)}),xe=(R=h((function*(e){var t=yield oe(yield $e(e),yield de());if(!Object(f.isEasterEggDay)())return t;var n=0;return t.filter(e=>e.name).sort((e,t)=>t.pp-e.pp).map(t=>j(j({},t),{},{name:ne(t,e)?Object(f.getPlayerName)(t.name,n++):t.name}))})),function(e){return R.apply(this,arguments)}),Se=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(d.substituteVars)("".concat(l.PLAYER_PROFILE_URL,"?page=").concat(r,"&").concat(t?"sort=2":"sort=1").concat(n?"&transform=true":""),{playerId:e})},Pe=(q=h((function*(e){if(!e)return null;var t=yield ue(e);return t&&t.avatar?t.avatar.startsWith("http")?t.avatar:l.NEW_SCORESABER_URL+t.avatar:null})),function(e){return q.apply(this,arguments)}),Ie=e=>(null==e?void 0:e.scores)?e.scores:null,Ce=(A=h((function*(){return Object(o.default)().getAll()})),function(){return A.apply(this,arguments)}),Te=(T=h((function*(e){return Object(o.default)().getAllFromIndex("scores-playerId",e)})),function(e){return T.apply(this,arguments)}),Ae=(C=h((function*(e){return!!(yield Object(o.default)().getFromIndex("scores-playerId",e))})),function(e){return C.apply(this,arguments)}),qe=(I=h((function*(){return!!(yield Object(o.default)().getFromIndex("scores-playerId",""))})),function(){return I.apply(this,arguments)}),Re=(P=h((function*(e){return Object(o.default)().getAllFromIndex("scores-timeset",e?IDBKeyRange.lowerBound(e):void 0)})),function(e){return P.apply(this,arguments)}),ze=(S=h((function*(e){return Object(o.default)().getAllFromIndex("scores-pp",e?IDBKeyRange.lowerBound(e):void 0)})),function(e){return S.apply(this,arguments)}),Ee=(x=h((function*(e){var t=yield Te(e),n=yield Object(s.getRankedSongs)();return t?Object.values(t).filter(e=>e.pp>0).filter(e=>null==n?void 0:n[e.leaderboardId]):[]})),function(e){return x.apply(this,arguments)}),Be=($=h((function*(e,t){return De((null==e?void 0:e.id)+"_"+t)})),function(e,t){return $.apply(this,arguments)}),De=(k=h((function*(e,t){return Object(o.default)().get(e+"_"+t)})),function(e,t){return k.apply(this,arguments)}),Le=(w=h((function*(e){return Object(o.default)().set(e)})),function(e){return w.apply(this,arguments)}),Ne=(_=h((function*(e){return e&&e.history?e.history.filter(t=>t.score&&t.score!==e.score).sort((e,t)=>t.score-e.score).map(e=>j(j({},e),{},{timeset:new Date(e.timestamp)})):null})),function(e){return _.apply(this,arguments)}),Fe=(v=h((function*(e,t){if(!t)return[];var n=yield Object(s.getRankedsChangesSince)(t.getTime());return Object.keys(n).reduce((n,r)=>{var a;if(!e[r])return n;var o=null===(a=e[r])||void 0===a?void 0:a.timeset;return o&&o>t||n.push(parseInt(r,10)),n},[])})),function(e,t){return v.apply(this,arguments)}),Me=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Object.values(e).map(e=>({leaderboardId:e.leaderboardId,timeset:Object(u.dateFromString)(e.timeset)})).sort((e,t)=>t.timeset-e.timeset);return r.reduce((e,a,o)=>{if(t.includes(a.leaderboardId)){var c,i=Math.floor(o/l.PLAYS_PER_PAGE)+1;n?(e[i]||(e[i]={searched:[],all:[]}),e[i].searched=e[i].searched.concat([a.leaderboardId]),e[i].all=Object(b.arrayUnique)(e[i].all.concat(r.slice((i-1)*l.PLAYS_PER_PAGE,i*l.PLAYS_PER_PAGE).map(e=>e.leaderboardId)))):e[i]=(null!==(c=e[i])&&void 0!==c?c:[]).concat([a.leaderboardId])}return e},{})},Ue=(y=h((function*(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=yield Fe(e,t);return r.length||n.length?Me(e,r.concat(n)):{}})),function(e,t){return y.apply(this,arguments)})},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("players","id"))},function(e,t,n){"use strict";n.r(t),n.d(t,"ALL_KEY",(function(){return l}));var r=n(18),a=n(19),o=n(6),c=n(34);function i(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){i(o,r,a,c,s,"next",e)}function s(e){i(o,r,a,c,s,"throw",e)}c(void 0)}))}}var l="__ALL";t.default=function(e){var t,n,i,d,u,b,p,f,O,j,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},h={},y=Object(c.default)(),v=()=>m,_=()=>void 0===v(),w=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return null!==(t=_()?n:null==e?void 0:e[m])&&void 0!==t?t:n},k=Object(r.default)(e,w),$=(e,t)=>(t||l)+"-"+(e||"__NONE"),x=e=>g[e],S=e=>!!x(e),P=e=>h[e]=!0,I=()=>P($()),C=e=>{delete h[e],delete h[$()]},T=()=>h={},A=e=>!!h[e],q=()=>A($()),R=()=>{k.flush(),T()},z=e=>k.forget(e),E=(j=s((function*(e){if(_())throw"forgetObject function is not available in repositories with out-of-line keys";var t=w(e);if(!t)throw"Object does not contain ".concat(m," field which is repository key");z(t)})),function(e){return j.apply(this,arguments)}),B=()=>e,D=e=>k.getKeys(),L=(O=s((function*(){return a.db.getAllKeys(e)})),function(){return O.apply(this,arguments)}),N=(f=s((function*(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n&&k.forget(t);var r=$(t);return k.get(t,()=>y(r,()=>a.db.get(e,t)))})),function(e){return f.apply(this,arguments)}),F=(p=s((function*(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(_())throw"getFromIndex() is not available for stores with out-of-line key";if(!S(t))throw"Index ".concat(t," has no field set");var o=$(n,t+"-single"),c=()=>y(o,()=>a.db.getFromIndex(e,t,n));if(n&&n instanceof IDBKeyRange)return c();var i=x(t),s=$(n,t),l=e=>(!n||(null==e?void 0:e[i])===n)&&void 0!==e;r&&(C(o),C(s),k.forgetByFilter(l));var d=k.getByFilter(c,q()||A(o)||A(s)?l:null);return P(o),d})),function(e,t){return p.apply(this,arguments)}),M=(b=s((function*(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=$(),r=()=>y(n,()=>a.db.getAll(e));if(_())return r();t&&R();var c=e=>void 0!==e;if(!q()){var i=Object(o.convertArrayToObjectByKey)(yield r(),m);return I(),Object.values(k.setAll(i)).filter(c)}return Object.values(k.getAll()).filter(c)})),function(){return b.apply(this,arguments)}),U=(u=s((function*(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(_())throw"getAllFromIndex() is not available for stores with out-of-line key";if(!S(t))throw"Index ".concat(t," has no field set");var c=$(n,t),i=()=>y(c,()=>a.db.getAllFromIndex(e,t,n));if(n&&n instanceof IDBKeyRange)return i();var s=x(t),l=e=>(!n||(null==e?void 0:e[s])===n)&&void 0!==e;if(r&&(C(c),k.forgetByFilter(l)),!q()&&!A(c)){var d=yield i();return k.merge(Object(o.convertArrayToObjectByKey)(d,m)),P(c),d}return Object.values(k.getAll()).filter(l)})),function(e){return u.apply(this,arguments)}),V=(d=s((function*(t,n){var r,o=a.db.getCurrentTransaction(),c=o?[...o.objectStoreNames]:null;return r=o&&c.includes(e)?yield o.objectStore(e).put(t,m?void 0:n):yield a.db.put(e,t,m?void 0:n),_()||w(t)||(t[m]=r),k.set(w(t,n),t)})),function(e,t){return d.apply(this,arguments)}),H=(i=s((function*(t){return yield a.db.delete(e,t),k.forget(t)})),function(e){return i.apply(this,arguments)}),W=(n=s((function*(e){if(_())throw"deleteObject function is not available in repositories with out-of-line keys";var t=w(e);if(!t)throw"Object does not contain ".concat(m," field which is repository key");return H(t)})),function(e){return n.apply(this,arguments)}),Z=(t=s((function*(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"readonly";return a.db.transaction(e,t).store.openCursor()})),function(){return t.apply(this,arguments)}),K=(t,n)=>{if(_()){if(!n)throw"setCache() needs a key for stores (".concat(e,") with out-of-line keys")}else n=w(t,n);k.set(n,t)},X=t=>{if(_())throw"addToCache() is not available for stores (".concat(e,") with out-of-line key");k.merge(Object(o.convertArrayToObjectByKey)(t,m))},J=()=>k;return{getStoreName:B,hasOutOfLineKey:_,getAllKeys:L,get:N,getFromIndex:F,getAll:M,getAllFromIndex:U,set:V,delete:H,deleteObject:W,openCursor:Z,getKeyName:v,forgetCacheKey:z,forgetObject:E,flushCache:R,getCachedKeys:D,setCache:K,addToCache:X,getCache:J}}},function(e,t,n){"use strict";n.r(t);var r=n(13),a=n(1);function o(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){o(c,r,a,i,s,"next",e)}function s(e){o(c,r,a,i,s,"throw",e)}i(void 0)}))}}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.default=(e,t)=>{var n={};r.default.on("cache-key-set-"+e,e=>{var{nodeId:t,key:n,value:r}=e;return t!==Object(a.default)().getId()?l(n,r,!1):null}),r.default.on("cache-all-set"+e,e=>{var{nodeId:t,data:n}=e;return t!==Object(a.default)().getId()?d(n,!1):null}),r.default.on("cache-merge-"+e,e=>{var{nodeId:t,data:n}=e;return t!==Object(a.default)().getId()?u(n,!1):null}),r.default.on("cache-key-forget-"+e,e=>{var{nodeId:t,key:n}=e;return t!==Object(a.default)().getId()?b(n,!1):null}),r.default.on("cache-flush-"+e,e=>{var{nodeId:t}=e;return t!==Object(a.default)().getId()?p(!1):null});var o,i,l=function(t,o){var c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n[t]=o,c&&r.default.publish("cache-key-set-"+e,{nodeId:Object(a.default)().getId(),key:t,value:o}),o},d=function(t){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=t,o&&r.default.publish("cache-all-set-"+e,{nodeId:Object(a.default)().getId(),data:t}),n},u=function(t){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=s(s({},n),t),o&&r.default.publish("cache-merge-"+e,{nodeId:Object(a.default)().getId(),data:t}),n},b=function(t){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return delete n[t],o&&r.default.publish("cache-key-forget-"+e,{nodeId:Object(a.default)().getId(),key:t}),n},p=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return n={},t&&r.default.publish("cache-flush-"+e,{nodeId:Object(a.default)().getId()}),n};return{has:e=>void 0!==n[e],get:(i=c((function*(e,t){if(n.hasOwnProperty(e))return n[e];var r=yield t();return l(e,r)})),function(e,t){return i.apply(this,arguments)}),getByFilter:(o=c((function*(e,r){if(r){var a=Object.values(n).find(r);if(a)return a}var o=yield e(),c=t(o);return l(c,o)})),function(e,t){return o.apply(this,arguments)}),getAll:()=>n,set:l,setAll:d,merge:u,getKeys:()=>Object.keys(n),forget:b,forgetByFilter:function(t){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!!t&&(Object.keys(n).filter(e=>t(n[e])).forEach(t=>{delete n[t],o&&r.default.publish("cache-key-forget-"+e,{nodeId:Object(a.default)().getId(),key:t})}),!0)},flush:p}}},function(e,t,n){"use strict";n.r(t),n.d(t,"db",(function(){return y}));var r=n(20),a=n(3),o=n(6),c=n(22),i=n(13),s=n(33),l=n(51),d=n(37),u=n(16),b=n(49),p=n(47),f=n(48),O=n(45),j=n(32),m=n(52);function g(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){g(o,r,a,c,i,"next",e)}function i(e){g(o,r,a,c,i,"throw",e)}c(void 0)}))}}var y=null;function v(){return(v=h((function*(){try{var e=0,t=0;y=yield Object(r.openDB)("sspl",5,{upgrade:(n,r,o,c)=>h((function*(){switch(a.default.info("Converting database from version ".concat(r," to version ").concat(o)),e=o,t=r,!0){case o>=2&&r<2:n.createObjectStore("players",{keyPath:"id",autoIncrement:!1});var i=n.createObjectStore("players-history",{keyPath:"_idbId",autoIncrement:!0});i.createIndex("players-history-playerId","playerId",{unique:!1}),i.createIndex("players-history-timestamp","timestamp",{unique:!1});var s=n.createObjectStore("scores",{keyPath:"id",autoIncrement:!1});s.createIndex("scores-leaderboardId","leaderboardId",{unique:!1}),s.createIndex("scores-playerId","playerId",{unique:!1}),s.createIndex("scores-timeset","timeset",{unique:!1}),s.createIndex("scores-pp","pp",{unique:!1}),n.createObjectStore("rankeds",{keyPath:"leaderboardId",autoIncrement:!1}),n.createObjectStore("songs",{keyPath:"hash",autoIncrement:!1}).createIndex("songs-key","key",{unique:!0}),n.createObjectStore("twitch",{keyPath:"playerId",autoIncrement:!1});var l=n.createObjectStore("rankeds-changes",{keyPath:"_idbId",autoIncrement:!0});l.createIndex("rankeds-changes-timestamp","timestamp",{unique:!1}),l.createIndex("rankeds-changes-leaderboardId","leaderboardId",{unique:!1}),n.createObjectStore("key-value"),n.createObjectStore("cache");var d=n.createObjectStore("groups",{keyPath:"_idbId",autoIncrement:!0});d.createIndex("groups-name","name",{unique:!1}),d.createIndex("groups-playerId","playerId",{unique:!1});case o>=3&&r<3:n.createObjectStore("beat-savior-files",{keyPath:"fileId",autoIncrement:!1});var u=n.createObjectStore("beat-savior",{keyPath:"beatSaviorId",autoIncrement:!1});u.createIndex("beat-savior-playerId","playerId",{unique:!1}),u.createIndex("beat-savior-songId","songId",{unique:!1}),u.createIndex("beat-savior-fileId","fileId",{unique:!1});case o>=4&&r<4:n.createObjectStore("songs-beatmaps",{keyPath:"hash",autoIncrement:!1}).createIndex("songs-beatmaps-key","key",{unique:!0});case o>=5&&r<5:var b=c.objectStore("songs-beatmaps");b.deleteIndex("songs-beatmaps-key"),b.createIndex("songs-beatmaps-key","key",{unique:!1})}a.default.info("Database converted")}))(),blocked(){console.warn("DB blocked")},blocking(){console.warn("DB blocking... will be closed"),y.close(),i.default.publish("dl-manager-pause-cmd")},terminated(){console.warn("DB terminated"),i.default.publish("dl-manager-pause-cmd")}});var n=null,o=()=>{var e,t;return null!==(e=null===(t=n)||void 0===t?void 0:t.mode)&&void 0!==e?e:null},g=()=>{var e,t;return[...null!==(e=null===(t=n)||void 0===t?void 0:t.objectStoreNames)&&void 0!==e?e:[]]},v=(_=h((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"readwrite",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{durability:"strict"};try{if(n)return Promise.reject("Another transaction in progress");(n=y.transaction(e,r,a)).getMode=o,n.getStores=g;try{var c=yield t(n);return yield n.done,c}finally{n=null}}catch(e){throw n=null,e}})),function(e,t){return _.apply(this,arguments)});return y.getCurrentTransaction=()=>n,y.runInTransaction=v,2===e&&t!==e&&(a.default.info("Create country ranks cache"),yield Object(c.updateSongCountryRanks)()),[s.default,l.default,d.default,u.default,b.default,p.default,f.default,O.default,j.default,m.default].map(e=>e()),y}catch(e){throw a.default.error("Can not open DB. Please update plugin to the newest version."),e}var _}))).apply(this,arguments)}t.default=h((function*(){return IDBKeyRange.prototype.toString=function(){return"IDBKeyRange-"+(Object(o.isDateObject)(this.lower)?this.lower.getTime():this.lower)+"-"+(Object(o.isDateObject)(this.upper),this.upper)},yield function(){return v.apply(this,arguments)}()}))},function(e,t,n){"use strict";n.r(t),n.d(t,"deleteDB",(function(){return o})),n.d(t,"openDB",(function(){return a}));var r=n(21);function a(e,t,{blocked:n,upgrade:a,blocking:o,terminated:c}={}){const i=indexedDB.open(e,t),s=Object(r.w)(i);return a&&i.addEventListener("upgradeneeded",e=>{a(Object(r.w)(i.result),e.oldVersion,e.newVersion,Object(r.w)(i.transaction))}),n&&i.addEventListener("blocked",()=>n()),s.then(e=>{c&&e.addEventListener("close",()=>c()),o&&e.addEventListener("versionchange",()=>o())}).catch(()=>{}),s}function o(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",()=>t()),Object(r.w)(n).then(()=>{})}n.d(t,"unwrap",(function(){return r.u})),n.d(t,"wrap",(function(){return r.w}));const c=["get","getKey","getAll","getAllKeys","count"],i=["put","add","delete","clear"],s=new Map;function l(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(s.get(t))return s.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,a=i.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!a&&!c.includes(n))return;const o=async function(e,...t){const o=this.transaction(e,a?"readwrite":"readonly");let c=o.store;r&&(c=c.index(t.shift()));const i=await c[n](...t);return a&&await o.done,i};return s.set(t,o),o}Object(r.r)(e=>({...e,get:(t,n,r)=>l(t,n)||e.get(t,n,r),has:(t,n)=>!!l(t,n)||e.has(t,n)}))},function(e,t,n){"use strict";n.r(t),n.d(t,"a",(function(){return d})),n.d(t,"i",(function(){return r})),n.d(t,"r",(function(){return b})),n.d(t,"u",(function(){return O})),n.d(t,"w",(function(){return f}));const r=(e,t)=>t.some(t=>e instanceof t);let a,o;const c=new WeakMap,i=new WeakMap,s=new WeakMap,l=new WeakMap,d=new WeakMap;let u={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return i.get(e);if("objectStoreNames"===t)return e.objectStoreNames||s.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return f(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function b(e){u=e(u)}function p(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(o||(o=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(O(this),e),f(c.get(this))}:function(...e){return f(t.apply(O(this),e))}:function(e,...n){const r=t.call(O(this),e,...n);return s.set(r,e.sort?e.sort():[e]),f(r)}:(e instanceof IDBTransaction&&function(e){if(i.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});i.set(e,t)}(e),r(e,a||(a=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,u):e);var t}function f(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{t(f(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",a),e.addEventListener("error",o)});return t.then(t=>{t instanceof IDBCursor&&c.set(t,e)}).catch(()=>{}),d.set(t,e),t}(e);if(l.has(e))return l.get(e);const t=p(e);return t!==e&&(l.set(e,t),d.set(t,e)),t}const O=e=>d.get(e)},function(e,t,n){"use strict";n.r(t),n.d(t,"diffColors",(function(){return h})),n.d(t,"getDiffColor",(function(){return y})),n.d(t,"getHumanDiffInfo",(function(){return v})),n.d(t,"getMaxScore",(function(){return _})),n.d(t,"extractDiffAndType",(function(){return w})),n.d(t,"getDiffAndTypeFromOnlyDiffName",(function(){return k})),n.d(t,"updateSongCountryRanks",(function(){return P})),n.d(t,"getAnySongScore",(function(){return I})),n.d(t,"getSongScores",(function(){return C})),n.d(t,"getFixedLeaderboardMaxScore",(function(){return T})),n.d(t,"getAccFromScore",(function(){return A})),n.d(t,"getLeaderboard",(function(){return q})),n.d(t,"getSongMaxScore",(function(){return z})),n.d(t,"getLeaderboardMaxScore",(function(){return B})),n.d(t,"getSongDiffInfo",(function(){return L}));var r=n(6),a=n(23),o=n(24),c=n(15),i=n(35),s=n(45),l=n(50),d=n(13),u=n(1),b=n(14);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){j(o,r,a,c,i,"next",e)}function i(e){j(o,r,a,c,i,"throw",e)}c(void 0)}))}}var g={1950:798675,1962:747155,2720:468395,2895:651475,2900:531875,3231:374555,4022:262315,6004:516235,8270:176755,9007:476675,9023:324875,9025:181355,9028:141795,11909:340515,17020:449995,18691:237475,18728:438955,19580:491395,21628:357075,21670:254035,23871:594435,29546:227355,30818:383755,33282:639515,40338:311995,40892:249435,41481:605475,45370:539235,50288:824435,50328:526355,51360:946795,58409:597195,58412:721395,59096:424235,59409:320275,61728:2001115,66449:771995,66930:875035,66944:599035,78657:426075,79636:576035,84513:487715,99196:492315},h={easy:"MediumSeaGreen",normal:"#59b0f4",hard:"tomato",expert:"#bf2a42",expertPlus:"#8f48db"};function y(e){return h[e.diff]?h[e.diff]:null}function v(e){if(!e||!e.diff)return null;var t=Object(r.capitalize)(e.diff).replace("ExpertPlus","Expert+"),n="Standard"!==e.type?"/"+e.type:"";switch(t){case"Easy":return{name:t,type:e.type,fullName:t+n,shortName:"Es",difficulty:1,color:y(e)};case"Normal":return{name:t,type:e.type,fullName:t+n,shortName:"N",difficulty:3,color:y(e)};case"Hard":return{name:t,type:e.type,fullName:t+n,shortName:"H",difficulty:5,color:y(e)};case"Expert":return{name:t,type:e.type,fullName:t+n,shortName:"Ex",difficulty:7,color:y(e)};case"Expert+":return{name:t,type:e.type,fullName:t+n,shortName:"E+",difficulty:9,color:y(e)};default:return null}}var _=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:115;return Math.floor((e>=14?8*t*(e-13):0)+(e>=6?4*t*(Math.min(e,13)-5):0)+(e>=2?2*t*(Math.min(e,5)-1):0)+Math.min(e,1)*t)};function w(e){var t,n=/^_([^_]+)_Solo(.*)$/.exec(e);return n?{diff:n[1].toLowerCase().replace("plus","Plus"),type:null!==(t=n[2])&&void 0!==t?t:"Standard"}:null}function k(e){return w("_"+e.replace("Expert+","ExpertPlus")+"_SoloStandard")}var $,x,S,P=(S=m((function*(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=yield Object(i.getActiveCountry)();if(!n)return{};var a=yield Object(c.getActiveCountryPlayersIds)(n,!0),o=yield Object(l.getSsplCountryRanks)(),s=Object(r.isEmpty)(o)||!t,b=(null!==(e=yield Object(c.getAllScores)())&&void 0!==e?e:[]).filter(e=>e.score&&a.includes(e.playerId)&&(s||t&&t.includes(e.leaderboardId))),p=Object(r.convertArrayToObjectByKey)(b,"leaderboardId",!0);return Object.keys(p).forEach(e=>{o[e]=p[e].sort((e,t)=>t.score!==e.score?t.score-e.score:e.timeset-t.timeset).map((e,t,r)=>({playerId:e.playerId,ssplCountryRank:{[n]:{rank:t+1,total:r.length}}})).reduce((e,t)=>(e[t.playerId]=t.ssplCountryRank,e),{})}),yield Object(l.setSsplCountryRanks)(o),d.default.publish("sspl-country-ranks-cache-updated",{nodeId:Object(u.default)().getId(),ssplCountryRanks:o,onlyLeaderboardsIds:t}),o})),function(){return S.apply(this,arguments)}),I=(x=m((function*(e){return Object(s.default)().getFromIndex("scores-leaderboardId",e)})),function(e){return x.apply(this,arguments)}),C=($=m((function*(e){return Object(s.default)().getAllFromIndex("scores-leaderboardId",e)})),function(e){return $.apply(this,arguments)});function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e&&g[e]?g[e]:t}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!n&&e.uScore&&e.score?e.score/e.uScore:1;return t?e.score/t/r*100:e.maxScoreEx?e.score/e.maxScoreEx/r*100:null}function q(e,t){return R.apply(this,arguments)}function R(){return(R=m((function*(e,t){var n,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"country";switch(i){case"all":o=yield Object(c.getAllActivePlayers)(t);break;case"manually_added":o=yield Object(c.getFriends)(t,!0);break;case"country_and_friends":var s=yield Object(c.getActiveCountryPlayers)(t,!0),l=(yield Object(c.getFriends)(t,!0)).filter(e=>e.country&&t&&e.country.toLowerCase()===t.toLowerCase());o=Object.values(f(f({},Object(r.convertArrayToObjectByKey)(s,"id")),Object(r.convertArrayToObjectByKey)(l,"id")));break;case"country":default:o=yield Object(c.getActiveCountryPlayers)(t,!0)}if(!o||!o.length)return[];var d=yield C(e);if(!d)return[];var u=o.filter(e=>e.name).map(e=>e.id),p=d.filter(e=>u.includes(e.playerId));if(!p.length)return[];var O=p[0].hash&&(null==d||null===(n=d[0])||void 0===n?void 0:n.diffInfo)?yield z(p[0].hash,d[0].diffInfo,e):null;return o=Object(r.convertArrayToObjectByKey)(o,"id"),p.map(e=>{var t,n,r=o[e.playerId];if(!r)return null;var a=(null!==(t=e.history)&&void 0!==t?t:[]).map(e=>f(f({},e),{},{acc:A(e,O),timeset:new Date(e.timestamp)}));return f(f({},r),{},{songHash:e.hash,score:e.score,timeset:e.timeset,rank:e.rank,mods:e.mods,pp:e.pp,playHistory:a,acc:A(e,O),accTooltip:Object(b.getAccTooltipFromTrackers)(null==e||null===(n=e.beatSavior)||void 0===n?void 0:n.trackers)})}).filter(e=>e).map(e=>f(f({},e),{},{hidden:Object(a.shouldBeHidden)(e)})).sort((e,t)=>t.score!==e.score?t.score-e.score:e.timeset-t.timeset).map((e,t)=>f(f({},e),{},{name:Object(a.getPlayerName)(e.name,t)}))}))).apply(this,arguments)}function z(e,t){return E.apply(this,arguments)}function E(){return(E=m((function*(e,t){var n,a,c,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(i){var d=T(i);if(d)return d}if(!(null==t?void 0:t.diff)||!(null==t?void 0:t.type))return null;var u=yield Object(o.getSongByHash)(e,l,s),b=(null!==(n=null==u||null===(a=u.versions)||void 0===a||null===(c=a[0])||void 0===c?void 0:c.diffs)&&void 0!==n?n:[]).find(e=>e.characteristic===t.type&&e.difficulty===Object(r.capitalize)(t.diff));return b&&(null==b?void 0:b.notes)?_(b.notes):null}))).apply(this,arguments)}function B(e,t,n){return D.apply(this,arguments)}function D(){return(D=m((function*(e,t,n){var r,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:115,c=yield I(e);if(!(c||t&&n))return null;var i=null!==(r=null==c?void 0:c.diffInfo)&&void 0!==r?r:{type:"Standard",diff:n};return z(t,i,e,a,!1,o)}))).apply(this,arguments)}function L(e,t){return N.apply(this,arguments)}function N(){return(N=m((function*(e,t){var n,a,c,i,s,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!(null==t?void 0:t.diff)||!(null==t?void 0:t.type))return null;var u=yield Object(o.getSongByHash)(e,!1,d);if(!u)return null;var b=(null!==(n=null==u||null===(a=u.versions)||void 0===a||null===(c=a[0])||void 0===c?void 0:c.diffs)&&void 0!==n?n:[]).find(e=>e.characteristic===t.type&&e.difficulty===Object(r.capitalize)(t.diff)),p=null!==(i=null==u||null===(s=u.metadata)||void 0===s?void 0:s.bpm)&&void 0!==i?i:null;return Object.assign({bpm:p,maxScore:yield z(e,t,l,!0)},u,b)}))).apply(this,arguments)}},function(e,t,n){"use strict";n.r(t),n.d(t,"shouldBeHidden",(function(){return c})),n.d(t,"isEasterEggDay",(function(){return s})),n.d(t,"getPlayerName",(function(){return l}));var r=n(3),a=n(7),o=[[{field:"id",value:"76561198165064325",cond:"==="},{field:"acc",value:85,cond:"<"}]];function c(e){return o.reduce((t,n)=>t||n.reduce((t,n)=>{var a=null==e?void 0:e[null==n?void 0:n.field],o=!0;switch(null==n?void 0:n.cond){case"===":o=a===(null==n?void 0:n.value);break;case"<":o=a<(null==n?void 0:n.value);break;case">":o=a>(null==n?void 0:n.value);break;default:r.default.error("Unknown condition: ",null==n?void 0:n.cond),o=!1}return t&&o},!0),!1)}var i=["Hi, are you looking for the other side?","Feel like nothing ever seems quite right?","Are you circling the drain pipe, getting off on pain like","You're corrupted?","I need to know where your loyalties lie","Tell me, are you gonna bark or bite?","Do you really want to twist the knife","In the belly of the monster?","Get the fuck up, wake the fuck up","Wipe the system, and back the fuck up","You're a puppet when they cut your strings off","Don't come crawling back","Kingslayer","Destroying castles in the sky","Kingslayer","Forevermore the apple of my eye","I'd sacrifice my life to find you","Angel of the flame","Kingslayer","Come and collect us from the night","暗い この見えない世界","まだ消えない未来","ただ手に入れたい another world","System failure","Life is encrypted, genome modified","Like a virus in a lullaby","Artificial 'til the day you die, silly program","You're corrupted","Get the fuck up, wake the fuck up","Wipe the system, and back the fuck up","You're a puppet when they cut your strings off","Don't come crawling back, you're on your own","さあ 時の","扉を開けて","行こうよ","Kingslayer","Destroying castles in the sky","Kingslayer","I'll fight for you until I die","Kingslayer","Destroying castles in the sky","Kingslayer","Forevermore the apple of my eye","I'd sacrifice it all to guide you","Never have to battle alone","Kingslayer","Come and collect us from the night","This is your wake up call","We're going down the rabbit hole","Are you ready?","I can't feel you","Is this what you want?","This is what you'll fucking get","You motherfucking shit"],s=()=>Object(a.dayTrunc)(new Date).getTime()===Object(a.dayTrunc)(Object(a.dateFromString)("2021-04-01")).getTime(),l=(e,t)=>s()?i[t%i.length]:e},function(e,t,n){"use strict";n.r(t),n.d(t,"getSongByHash",(function(){return T})),n.d(t,"getSongByKey",(function(){return A})),n.d(t,"convertOldBeatSaverToBeatMaps",(function(){return q}));var r=n(12),a=n(8),o=n(25),c=n(3),i=n(32),s=n(33),l=(n(13),n(1),n(7)),d=n(34),u=n(6);function b(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){b(o,r,a,c,i,"next",e)}function i(e){b(o,r,a,c,i,"throw",e)}c(void 0)}))}}var f,O,j,m,g,h,y,v,_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return Object(l.addToDate)(t,36e5*e)},w=e=>!!e&&e.activeTo>new Date&&e.started>_(-24),k=(v=p((function*(){return Object(s.default)().get("bsSuspension")})),function(){return v.apply(this,arguments)}),$=(y=p((function*(e){var t=new Date,n=w(e)?e:{started:t,activeTo:new Date,count:0};return n.activeTo=_(Math.pow(2,n.count),n.activeTo),n.count++,yield Object(s.default)().set(n,"bsSuspension")})),function(e){return y.apply(this,arguments)}),x=(h=p((function*(){return Object(s.default)().get("bs404")})),function(){return h.apply(this,arguments)}),S=(g=p((function*(e){return Object(s.default)().set(e,"bs404")})),function(e){return g.apply(this,arguments)}),P=(m=p((function*(e){var t=yield x();return t&&t[e]&&t[e].count>=3})),function(e){return m.apply(this,arguments)}),I=(j=p((function*(e){var t,n,r=null!==(t=yield x())&&void 0!==t?t:{},a=null!==(n=r[e])&&void 0!==n?n:{firstTry:new Date,recentTry:null,count:0};(!a.recentTry||_(1,a.recentTry)<new Date)&&(a.recentTry=new Date,a.count++,r[e]=a,yield S(r))})),function(e){return j.apply(this,arguments)}),C=Object(d.default)(),T=(O=p((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e=e.toLowerCase();var s=yield Object(i.default)().get(e);if(!t&&s)return Promise.resolve(s);if(n)return null;var l=yield k();try{if(w(l)||(yield P(e)))return null;var d=yield C(e,()=>Object(r.fetchApiPage)(o.default.BEATSAVER,Object(a.substituteVars)("https://beatsaver.com/api/maps/hash/${hash}",{hash:e})),8e3);return d?R(d,e):(c.default.warn("Song with ".concat(e," hash is no longer available at Beat Saver.")),Promise.resolve(null))}catch(t){if(t instanceof TypeError&&t.toString().indexOf("Failed to fetch")>=0)try{yield $(l)}catch(e){}return t instanceof r.NotFoundError&&I(e),c.default.warn('Error fetching Beat Saver song by hash "'.concat(e,'"')),null}})),function(e){return O.apply(this,arguments)}),A=(f=p((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e=e.toLowerCase();var s=yield Object(i.default)().getFromIndex("songs-beatmaps-key",e);if(!t&&s)return Promise.resolve(s);if(n)return null;var l=yield k();try{if(w(l))return null;var d=yield C(e,()=>Object(r.fetchApiPage)(o.default.BEATSAVER,Object(a.substituteVars)("https://beatsaver.com/api/maps/id/${key}",{key:e})));return d?R(d):(c.default.warn("Song with ".concat(e," key is no longer available at Beat Saver.")),Promise.resolve(null))}catch(t){if(t instanceof TypeError&&t.toString().indexOf("Failed to fetch")>=0)try{yield $(l)}catch(e){}return c.default.warn('Error fetching Beat Saver song by key "'.concat(e,'"')),null}})),function(e){return f.apply(this,arguments)}),q=e=>{var t,n,r,a,o,c,i,s,d,b,p,f,O,j,m,g,h,y,v,_,w,k,$,x,S,P,I,C,{key:T,hash:A,name:q,metadata:{characteristics:R}}=e;if(!(T&&A&&q&&R&&Array.isArray(R)))return null;A.toLowerCase&&(A=A.toLowerCase());var z=R.reduce((e,t)=>{if(!t.name||!t.difficulties)return e;var n=t.name;return e.concat(Object.entries(t.difficulties).map(e=>{var t,r,a,o,c,i,s,[l,d]=e;if(!d)return null;l=Object(u.capitalize)(l);var b=null!==(t=null==d?void 0:d.length)&&void 0!==t?t:null,p=null!==(r=null==d?void 0:d.notes)&&void 0!==r?r:null,f=p&&b?p/b:null;return{njs:null!==(a=null==d?void 0:d.njs)&&void 0!==a?a:null,offset:null!==(o=null==d?void 0:d.njsOffset)&&void 0!==o?o:null,notes:p,bombs:null!==(c=null==d?void 0:d.bombs)&&void 0!==c?c:null,obstacles:null!==(i=null==d?void 0:d.obstacles)&&void 0!==i?i:null,nps:f,length:null!==(s=null==d?void 0:d.duration)&&void 0!==s?s:null,characteristic:n,difficulty:l,events:null,chroma:null,me:null,ne:null,cinema:null,seconds:b,paritySummary:{errors:null,warns:null,resets:null},stars:null}})).filter(e=>e)},[]);return{lastUpdated:null!==(t=Object(l.dateFromString)(null==e?void 0:e.uploaded))&&void 0!==t?t:new Date,oldBeatSaverId:null!==(n=null==e?void 0:e._id)&&void 0!==n?n:null,id:T,hash:A,key:T,name:q,description:"",uploader:{id:null,name:null!==(r=null==e||null===(a=e.uploader)||void 0===a?void 0:a.username)&&void 0!==r?r:null,hash:null,avatar:null},metadata:{bpm:null!==(o=null==e||null===(c=e.metadata)||void 0===c?void 0:c.bpm)&&void 0!==o?o:null,duration:null!==(i=null==e||null===(s=e.metadata)||void 0===s?void 0:s.duration)&&void 0!==i?i:null,songName:null!==(d=null==e||null===(b=e.metadata)||void 0===b?void 0:b.songName)&&void 0!==d?d:"",songSubName:null!==(p=null==e||null===(f=e.metadata)||void 0===f?void 0:f.songSubName)&&void 0!==p?p:"",songAuthorName:null!==(O=null==e||null===(j=e.metadata)||void 0===j?void 0:j.songAuthorName)&&void 0!==O?O:"",levelAuthorName:null!==(m=null==e||null===(g=e.metadata)||void 0===g?void 0:g.levelAuthorName)&&void 0!==m?m:""},stats:{plays:null!==(h=null==e||null===(y=e.stats)||void 0===y?void 0:y.plays)&&void 0!==h?h:0,downloads:null!==(v=null==e||null===(_=e.stats)||void 0===_?void 0:_.downloads)&&void 0!==v?v:0,upvotes:null!==(w=null==e||null===(k=e.stats)||void 0===k?void 0:k.upVotes)&&void 0!==w?w:0,downvotes:null!==($=null==e||null===(x=e.stats)||void 0===x?void 0:x.downVotes)&&void 0!==$?$:0,score:null},uploaded:null!==(S=null==e?void 0:e.uploaded)&&void 0!==S?S:null,automapper:!(null===(P=null==e||null===(I=e.metadata)||void 0===I?void 0:I.automapper)||void 0===P||!P),ranked:null,qualified:null,versions:[{hash:A,key:T,state:"Published",createdAt:null!==(C=null==e?void 0:e.uploaded)&&void 0!==C?C:null,sageScore:null,diffs:z,downloadURL:"https://cdn.beatsaver.com/".concat(A,".zip"),coverURL:"https://cdn.beatsaver.com/".concat(A,".jpg"),previewURL:"https://cdn.beatsaver.com/".concat(A,".mp3")}]}};function R(e,t){return z.apply(this,arguments)}function z(){return(z=p((function*(e,t){var n,r=(null==t?void 0:t.length)?t:null==e||null===(n=e.versions)||void 0===n?void 0:n[0].hash,a=null==e?void 0:e.id;return r&&a&&r.toLowerCase?(e.hash=r.toLowerCase(),e.key=a.toLowerCase(),delete e.description,yield Object(i.default)().set(e),e):null}))).apply(this,arguments)}},function(e,t,n){"use strict";n.r(t);var r=n(26),a=n.n(r);t.default={SCORESABER:new a.a({concurrency:3,timeout:8e3,throwOnTimeout:!0,intervalCap:80,interval:6e4}),SCORESABER_API:new a.a({concurrency:8,timeout:6e4,throwOnTimeout:!0}),BEATSAVER:new a.a({concurrency:8,timeout:8e3,throwOnTimeout:!0,intervalCap:10,interval:1e3}),TWITCH:new a.a({concurrency:8,timeout:8e3,throwOnTimeout:!0,intervalCap:800,interval:6e4}),BEATSAVIOR:new a.a({concurrency:3,timeout:6e4,throwOnTimeout:!0,intervalCap:60,interval:6e4})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(27),a=n(28),o=n(30),c=()=>{},i=new a.TimeoutError;t.default=class extends r{constructor(e){var t,n,r,a;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=c,this._resolveIdle=c,!("number"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:o.default},e)).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(a=null===(r=e.interval)||void 0===r?void 0:r.toString())&&void 0!==a?a:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=c,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=c,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const e=Date.now();if(void 0===this._intervalId){const t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise((n,r)=>{this._queue.enqueue(async()=>{this._pendingCount++,this._intervalCount++;try{const o=void 0===this._timeout&&void 0===t.timeout?e():a.default(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&r(i)});n(await o)}catch(e){r(e)}this._next()},t),this._tryToStartAnother(),this.emit("add")})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise(e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}})}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise(e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,a="~";function o(){}function c(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var i=new c(n,r||e,o),s=a?a+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function l(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(a=!1)),l.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(a?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},l.prototype.listeners=function(e){var t=a?a+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,c=new Array(o);r<o;r++)c[r]=n[r].fn;return c},l.prototype.listenerCount=function(e){var t=a?a+e:e,n=this._events[t];return n?n.fn?1:n.length:0},l.prototype.emit=function(e,t,n,r,o,c){var i=a?a+e:e;if(!this._events[i])return!1;var s,l,d=this._events[i],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,n),!0;case 4:return d.fn.call(d.context,t,n,r),!0;case 5:return d.fn.call(d.context,t,n,r,o),!0;case 6:return d.fn.call(d.context,t,n,r,o,c),!0}for(l=1,s=new Array(u-1);l<u;l++)s[l-1]=arguments[l];d.fn.apply(d.context,s)}else{var b,p=d.length;for(l=0;l<p;l++)switch(d[l].once&&this.removeListener(e,d[l].fn,void 0,!0),u){case 1:d[l].fn.call(d[l].context);break;case 2:d[l].fn.call(d[l].context,t);break;case 3:d[l].fn.call(d[l].context,t,n);break;case 4:d[l].fn.call(d[l].context,t,n,r);break;default:if(!s)for(b=1,s=new Array(u-1);b<u;b++)s[b-1]=arguments[b];d[l].fn.apply(d[l].context,s)}}return!0},l.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,n,r){var o=a?a+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var c=this._events[o];if(c.fn)c.fn!==t||r&&!c.once||n&&c.context!==n||s(this,o);else{for(var i=0,l=[],d=c.length;i<d;i++)(c[i].fn!==t||r&&!c[i].once||n&&c[i].context!==n)&&l.push(c[i]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=a?a+e:e,this._events[t]&&s(this,t)):(this._events=new o,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=a,l.EventEmitter=l,e.exports=l},function(e,t,n){"use strict";const r=n(29);class a extends Error{constructor(e){super(e),this.name="TimeoutError"}}const o=(e,t,n)=>new Promise((o,c)=>{if("number"!=typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(t===1/0)return void o(e);const i=setTimeout(()=>{if("function"==typeof n){try{o(n())}catch(e){c(e)}return}const r=n instanceof Error?n:new a("string"==typeof n?n:`Promise timed out after ${t} milliseconds`);"function"==typeof e.cancel&&e.cancel(),c(r)},t);r(e.then(o,c),()=>{clearTimeout(i)})});e.exports=o,e.exports.default=o,e.exports.TimeoutError=a},function(e,t,n){"use strict";e.exports=(e,t)=>(t=t||(()=>{}),e.then(e=>new Promise(e=>{e(t())}).then(()=>e),e=>new Promise(e=>{e(t())}).then(()=>{throw e})))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(31);t.default=class{constructor(){this._queue=[]}enqueue(e,t){const n={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority)return void this._queue.push(n);const a=r.default(this._queue,n,(e,t)=>t.priority-e.priority);this._queue.splice(a,0,n)}dequeue(){const e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this._queue.length}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){let r=0,a=e.length;for(;a>0;){const o=a/2|0;let c=r+o;n(e[c],t)<=0?(r=++c,a-=o+1):a=o}return r}},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("songs-beatmaps","hash",{"songs-beatmaps-key":"key"}))},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("cache"))},function(e,t,n){"use strict";function r(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,o){var c=e.apply(t,n);function i(e){r(c,a,o,i,s,"next",e)}function s(e){r(c,a,o,i,s,"throw",e)}i(void 0)}))}}n.r(t),t.default=()=>{var e,t={};return e=a((function*(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,o=e=>!!t[e],c=e=>{var n;return null!==(n=t[e])&&void 0!==n?n:[]},i=(e,n)=>t[e]&&t[e].push(n),s=(e,n)=>{if(o(e)){var r=t[e].findIndex(e=>e===n);r&&t[e].splice(r,1)}},l=(e,n,r)=>{c(e).forEach(e=>e(n,r)),delete t[e]};if(o(e))return yield new Promise((t,o)=>{var c,l=!1,d=(e,n)=>{l=!0,"reject"===n?o(e):t(e)};i(e,d),setTimeout((c=a((function*(r){s(e,d),l||t(yield n())})),function(e){return c.apply(this,arguments)}),r)});t[e]=[];try{var d=yield n();return l(e,d,"resolved"),d}catch(t){throw l(e,t,"rejected"),t}})),function(t,n){return e.apply(this,arguments)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"getActiveCountry",(function(){return l}));var r=n(36),a=n(13);function o(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){o(c,r,a,i,s,"next",e)}function s(e){o(c,r,a,i,s,"throw",e)}i(void 0)}))}}var i,s,l=(i=c((function*(){var e,t;return null!==(e=null===(t=yield Object(r.getConfig)("users"))||void 0===t?void 0:t.country)&&void 0!==e?e:null})),function(){return i.apply(this,arguments)});a.default.on("country-set",(s=c((function*(e){var{country:t,persist:n,reload:o}=e,c=yield Object(r.getConfig)(null,!0);(null==c?void 0:c.users)&&(c.users.country=t,n&&(yield Object(r.setConfig)(c)),o&&a.default.publish("reload-browser-cmd"))})),function(e){return s.apply(this,arguments)}))},function(e,t,n){"use strict";n.r(t),n.d(t,"getConfig",(function(){return u})),n.d(t,"setConfig",(function(){return b})),n.d(t,"getMainPlayerId",(function(){return p})),n.d(t,"isBackgroundDownloadEnabled",(function(){return f}));var r=n(37),a=n(38);function o(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){o(c,r,a,i,s,"next",e)}function s(e){o(c,r,a,i,s,"throw",e)}i(void 0)}))}}var i,s,l,d,u=(d=c((function*(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=yield Object(r.default)().get("config");return t||(t={users:{main:null,country:null,additionalForCountry:a.ADDITIONAL_COUNTRY_PLAYERS_IDS},songBrowser:{autoTransform:!1,defaultView:"cards",defaultType:"all",defaultSort:"timeset",showColumns:["stars","maxPp","bpm","njs","nps","length","timeset","rank","pp","acc","score","diff","icons"],showIcons:["bsr","bs","oneclick","preview","twitch"],compareTo:[],itemsPerPage:12},songLeaderboard:{showDiff:!0,showWhatIfPp:!0,showBgCover:!0,defaultType:"country"},profile:{showOnePpCalc:!0,showTwitchIcon:!0,showChart:"rank",statsStyle:"badges"},others:{theme:"darkss",bgDownload:!0,viewsUpdate:"keep-view",language:"en",locale:"en-US"},ssSong:{enhance:!0,showDiff:!0,showWhatIfPp:!0}}),e?t[e]?t[e]:null:t})),function(){return d.apply(this,arguments)}),b=(l=c((function*(e){return Object(r.default)().set(e,"config")})),function(e){return l.apply(this,arguments)}),p=(s=c((function*(){var e=yield u("users");return e&&e.main?e.main:null})),function(){return s.apply(this,arguments)}),f=(i=c((function*(){return!!(yield u("others")).bgDownload})),function(){return i.apply(this,arguments)})},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("key-value"))},function(e,t,n){"use strict";n.r(t),n.d(t,"ADDITIONAL_COUNTRY_PLAYERS_IDS",(function(){return B})),n.d(t,"getActivePlayersLastUpdate",(function(){return D})),n.d(t,"getAdditionalPlayers",(function(){return L})),n.d(t,"fetchPlayerInfo",(function(){return N})),n.d(t,"fetchSsCountryRankPage",(function(){return F})),n.d(t,"fetchSsCountryRanking",(function(){return M})),n.d(t,"fetchCountryRanking",(function(){return U})),n.d(t,"updateActivePlayers",(function(){return V})),n.d(t,"updatePlayerScores",(function(){return H})),n.d(t,"setRefreshedPlayerScores",(function(){return K})),n.d(t,"fetchScores",(function(){return Y})),n.d(t,"refreshPlayerScoreRank",(function(){return G}));var r=n(8),a=n(12),o=n(6),c=n(39),i=n(25),s=n(15),l=n(7),d=n(40),u=n(13),b=n(1),p=n(35),f=n(36),O=n(22),j=n(42),m=n(37),g=n(19),h=n(44),y=n(16),v=n(45),_=n(46),w=n(49);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){S(o,r,a,c,i,"next",e)}function i(e){S(o,r,a,c,i,"throw",e)}c(void 0)}))}}var I,C,T,A,q,R,z,E,B={pl:["76561198967371424","76561198093469724","76561198204804992","76561198275502920"]},D=(E=P((function*(){return Object(m.default)().get("activePlayersLastUpdate")})),function(){return E.apply(this,arguments)}),L=e=>{var t;return null!==(t=B[e])&&void 0!==t?t:[]},N=(z=P((function*(e){return Object(a.fetchApiPage)(i.default.SCORESABER_API,Object(r.substituteVars)(c.PLAYER_INFO_URL,{userId:e})).then(e=>{var{playerInfo:{playerId:t,playerName:n,avatar:a,rank:o,countryRank:i,pp:s,country:l,history:d,inactive:u,banned:b}}=e,p=d?d.length>=7?d[6]-d[0]:0:null;return{avatar:a,country:l,countryRank:i,id:t,inactive:!!u||!!b,name:n?n.replace("&#039;","'"):"",pp:s,rank:o,url:Object(r.substituteVars)(c.PLAYER_PROFILE_URL,{playerId:t}),weeklyDiff:p}})})),function(e){return z.apply(this,arguments)}),F=(R=P((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return[...(yield Object(a.fetchHtmlPage)(i.default.SCORESABER,Object(r.substituteVars)(c.COUNTRY_URL,{country:e}),t)).querySelectorAll(".ranking.global .player a")].map(e=>{var t,n,a,i,s,l,d,u,b,p,f,O,m,g,h,y=e.closest("tr"),v=Object(o.getFirstRegexpMatch)(/\/(\d+)$/,e.href);return{avatar:null!==(t=null===(n=y.querySelector("td.picture img"))||void 0===n?void 0:n.src)&&void 0!==t?t:null,country:null===(a=Object(o.getFirstRegexpMatch)(/^.*?\/flags\/([^.]+)\..*$/,null!==(i=null===(s=y.querySelector("td.player img"))||void 0===s?void 0:s.src)&&void 0!==i?i:""))||void 0===a?void 0:a.toUpperCase(),countryRank:null!==(l=parseInt(null!==(d=Object(o.getFirstRegexpMatch)(/^\s*#(\d+)\s*$/,null===(u=y.querySelector("td.rank"))||void 0===u?void 0:u.innerText))&&void 0!==d?d:null,10))&&void 0!==l?l:null,id:v,inactive:!1,name:null!==(b=null===(p=e.querySelector(".songTop.pp"))||void 0===p?void 0:p.innerText)&&void 0!==b?b:"",pp:null!==(f=Object(j.parseSsFloat)(null!==(O=null===(m=y.querySelector("td.pp .scoreTop.ppValue"))||void 0===m?void 0:m.innerText)&&void 0!==O?O:""))&&void 0!==f?f:0,rank:null,url:Object(r.substituteVars)(c.PLAYER_PROFILE_URL,{playerId:v}),weeklyDiff:null!==(g=parseInt(null===(h=y.querySelector("td.diff"))||void 0===h?void 0:h.innerText,10))&&void 0!==g?g:0}})})),function(e){return R.apply(this,arguments)}),M=(q=P((function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return(yield Promise.all(new Array(Math.ceil(n/c.PLAYERS_PER_PAGE)).fill(null).map((t=P((function*(t,n){return F(e,n+1)})),function(e,n){return t.apply(this,arguments)})))).reduce((e,t)=>e.concat(t),[]).slice(0,n)})),function(e){return q.apply(this,arguments)}),U=(A=P((function*(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;e=null!==(t=e)&&void 0!==t?t:yield Object(p.getActiveCountry)();var a,o=yield Object(f.getMainPlayerId)(),c=e?yield M(e,r):[],i=c.filter(e=>o&&e.id===o).length>0,s=L(e).concat(n&&o&&!i?[o]:[]);return c.concat(yield Promise.all(s.map((a=P((function*(e){return N(e)})),function(e){return a.apply(this,arguments)})))).filter(e=>!e.inactive).sort((e,t)=>t.pp-e.pp).map((t,n)=>$($({},t),{},{ssplCountryRank:e?{[e]:n+1}:null,name:(null==t?void 0:t.name)?t.name.replace("&#039;","'"):""})).slice(0,r)})),function(e){return A.apply(this,arguments)}),V=(T=P((function*(){var e,t,n=yield Object(f.getMainPlayerId)(),r=yield Object(p.getActiveCountry)(),a=r?yield U(r,h.default.COUNTRY_PLAYERS_QTY):[],c=a.map(e=>e.id),i=yield Promise.all((yield Object(s.getManuallyAddedPlayersIds)(r,!c.includes(n))).filter(e=>!c.includes(e)).map((e=P((function*(e){return N(e)})),function(t){return e.apply(this,arguments)}))),d=$($({},Object(o.convertArrayToObjectByKey)(a,"id")),Object(o.convertArrayToObjectByKey)(i,"id")),j=[],v=[];return yield g.db.runInTransaction(["players","players-history"],(t=P((function*(e){for(var t=e.objectStore("players"),n=yield t.openCursor();n;){var r=n.value,{lastUpdated:a,recentPlay:o}=r,c=d[r.id]?d[r.id]:{inactive:!0,ssplCountryRank:null},{inactive:i,ssplCountryRank:s}=c,u=$($($({},r),c),{},{inactive:i,lastUpdated:null!=a?a:null,recentPlay:null!=o?o:null,ssplCountryRank:null!=s?s:null,profileLastUpdated:new Date});c.processed=!0,yield n.update(u),j.push(u),n=yield n.continue()}var b=Object.values(d).filter(e=>!e.processed);for(var p of b){var{lastUpdated:f,recentPlay:O,ssplCountryRank:m}=p,g=$($({},p),{},{lastUpdated:null!=f?f:null,recentPlay:null!=O?O:null,ssplCountryRank:null!=m?m:null,profileLastUpdated:new Date});yield t.put(g),j.push(g)}var h=new Date(Object(l.toSSTimestamp)(new Date)),y=e.objectStore("players-history");for(n=yield y.index("players-history-timestamp").openCursor(h);n;)yield n.delete(),yield Object(w.default)().forgetObject(n.value),n=yield n.continue();for(var _ of Object.values(d)){var{countryRank:k,id:x,pp:S,ssplCountryRank:P}=_,I={countryRank:k,playerId:x,pp:S,ssplCountryRank:P,timestamp:h};I[Object(w.default)().getKeyName()]=yield y.put(I),v.push(I)}})),function(e){return t.apply(this,arguments)})),Object(y.default)().addToCache(j),Object(w.default)().addToCache(v),yield Object(O.updateSongCountryRanks)(),yield Object(m.default)().set(new Date,"activePlayersLastUpdate"),u.default.publish("active-players-updated",{nodeId:Object(b.default)().getId(),countryPlayers:a,manuallyAddedPlayers:i,allPlayers:d}),Object.values(d)})),function(){return T.apply(this,arguments)}),H=(C=P((function*(e){var t,n,r,a,c=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,p=yield Object(s.getPlayerInfo)(e);if(!p)return null;var f=Object(l.dateFromString)(null!==(t=p.lastUpdated)&&void 0!==t?t:null),j=yield Object(d.fetchAllNewScores)(p,f,e=>i?i(e):null),h=[],w=[],k={},x=f?yield Object(_.getRankedsChangesSince)(f.getTime()):null,S=f&&Object(l.toUTCDateTimestamp)(f)!==Object(l.toUTCDateTimestamp)(new Date),I=216e5,C=864e5,T=200,A=null!==(n=Object(l.dateFromString)(null===(r=p)||void 0===r?void 0:r.lastRankedsRefetch))&&void 0!==n?n:new Date(Date.parse("2021-02-06T00:00:00Z")),q=new Date-A>=I,R=[];if(q||S||Object.keys(j.scores).length){var z,E=null!==(z=yield Object(s.getScoresByPlayerId)(e))&&void 0!==z?z:[];if(k=Object(o.convertArrayToObjectByKey)(E,"leaderboardId"),S){var B=new Date(Date.now()-864e7),D=yield Object(_.getRankedSongs)();_.UNRANKED.forEach(e=>delete D[e]),R=E.filter(e=>!e.pp&&e.leaderboardId&&D[e.leaderboardId]&&!(null==j?void 0:j.scores[e.leaderboardId])&&e.timeset&&Object(l.dateFromString)(e.timeset)>B).map(e=>e.leaderboardId)}if(q){var L=Object.keys(yield Object(_.getRankedsChangesSince)(A.getTime()-C,Date.now()-C)).map(e=>parseInt(e,10));L&&L.length<=T&&(R=R.concat(L)),A=new Date}}if(!Object(o.isEmpty)(x)||R.length){var N=yield Object(s.getPlayerRankedsScorePagesToUpdate)($($({},k),j.scores),f,R),F=0,M={},U=function*(e){var t={id:p.id,name:"".concat(p.name),page:F+1,total:null};i&&i(t);var n=Object(o.convertArrayToObjectByKey)(yield Object(d.fetchRecentScores)(p.id,e,e=>i?i(Object.assign({},t,{wait:e})):null,...N[e]),"leaderboardId");M=$($({},M),n),F++};for(var V in N)yield*U(V);j.scores=$($({},j.scores),M)}var H,W,Z=[];Object(o.isEmpty)(null!==(a=null==j?void 0:j.scores)&&void 0!==a?a:{})?yield g.db.runInTransaction(["players","key-value"],(W=P((function*(t){var n=t.objectStore("players");(p=yield n.get(e)).lastUpdated=new Date,p.lastRankedsRefetch=A,yield n.put(p),Z.push(p),t.objectStore("key-value").put(new Date,"lastUpdated")})),function(e){return W.apply(this,arguments)})):(w=j&&j.scores?Object.values(j.scores).map(e=>e.leaderboardId):[],yield g.db.runInTransaction(["scores","players","key-value"],(H=P((function*(t){var n=t.objectStore("players");(p=yield n.get(e)).lastUpdated=new Date,p.lastRankedsRefetch=A,p.recentPlay=j.recentPlay,yield n.put(p),Z.push(p),h=w.map(e=>{var t=j.scores[e];t.id=t.playerId+"_"+e;var n=k[e]?k[e]:null;if(n){var r,a,o,c,i,s=(null==n||null===(r=n.history)||void 0===r?void 0:r.length)?n.history.filter(e=>e.timestamp):[],{pp:l,rank:d,score:u,uScore:b,timeset:p}=n;(null==p?void 0:p.getTime())&&u&&b&&(null==j||null===(a=j.scores)||void 0===a||null===(o=a[e])||void 0===o?void 0:o.score)&&(null==j||null===(c=j.scores)||void 0===c||null===(i=c[e])||void 0===i?void 0:i.score)!==u&&(t.history=[{pp:l,rank:d,score:u,uScore:b,timestamp:p.getTime()}].concat(s).slice(0,3))}return t});var r=t.objectStore("scores");yield Promise.all(h.map(e=>r.put(e)));var a=t.objectStore("key-value");yield a.put(new Date,"lastUpdated")})),function(e){return H.apply(this,arguments)}))),Object(y.default)().addToCache(Z),Object(v.default)().addToCache(h),Object(m.default)().setCache(new Date,"lastUpdated"),w.length&&(yield Object(O.updateSongCountryRanks)(w)),c&&u.default.publish("player-scores-updated",{nodeId:Object(b.default)().getId(),playerId:e,scores:h})})),function(e){return C.apply(this,arguments)}),W=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u.default.publish(e,$($({},n),{},{nodeId:Object(b.default)().getId(),playerId:t}))},Z=(e,t,n)=>{n.forEach(n=>W(e,t,{leaderboardId:n}))},K=(I=P((function*(e,t){var n,r,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(a&&!(n=Object(o.convertArrayToObjectByKey)(null!==(r=yield Object(s.getScoresByPlayerId)(e))&&void 0!==r?r:[],"leaderboardId")))return c&&Z("player-score-update-failed",e,t.map(e=>e.leaderboardId)),!1;var i=t.map(t=>{var r;if(t.leaderboardId){t.id=e+"_"+t.leaderboardId,t.playerId=e;var o=null!==(r=n[t.leaderboardId])&&void 0!==r?r:null;if(a&&!o)return c&&W("player-score-update-failed",e,{leaderboardId:t.leaderboardId}),null;var i=$($($({},null!=o?o:{}),t),{},{lastUpdated:new Date});return c&&W("player-score-updated",e,i),i}}).filter(e=>null==e?void 0:e.timeset);return yield Promise.all(i.map(e=>Object(s.updateSongScore)(e))),!0})),function(e,t){return I.apply(this,arguments)}),X={};u.default.on("player-scores-page-update-start",e=>{var{playerId:t,page:n}=e;X[t]||(X[t]=[]),X[t]=Object(o.arrayUnique)(X[t].concat(n))}),u.default.on("player-scores-page-updated",e=>{var{playerId:t,page:n}=e;X[t]&&(X[t]=X[t].filter(e=>e!==n))});var J,Q,Y=(Q=P((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;try{return yield Promise.race([P((function*(){var n,r;return null!==(n=null===(r=yield Object(d.fetchSsProfilePage)(e,t))||void 0===r?void 0:r.scores)&&void 0!==n?n:[]}))(),Object(a.delay)(n,null,!0)])}catch(n){return yield Object(d.fetchRecentScores)(e,t)}})),function(e){return Q.apply(this,arguments)}),G=(J=P((function*(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=[],a=null;try{var c=yield*function*(){var c,i;Z("player-score-update-start",e,t);var d=yield Object(s.getPlayerInfo)(e);if(!d)throw"Player not found";var u=Object(o.convertArrayToObjectByKey)(null!==(c=yield Object(s.getScoresByPlayerId)(e))&&void 0!==c?c:[],"leaderboardId");if(!u)throw"Player scores not found";var b=Object(l.dateFromString)(d.recentPlay);(!n||!b||b<n)&&(yield H(e));var p=null!==(i=X[e])&&void 0!==i?i:[];a=Object(s.getPlayerScorePagesToUpdate)(u,t,!0),(r=Object.keys(a).filter(e=>!p.includes(e))).forEach(t=>{W("player-scores-page-update-start",e,{page:t}),a[t]&&a[t].all.forEach(t=>W("player-score-update-start",e,{leaderboardId:t}))});for(var f={},O=0,j=[],m=[...r];m.length&&O<3;){for(var g of m)if(!j.includes(g)){try{f=$($({},f),Object(o.convertArrayToObjectByKey)((yield Y(e,g)).map(e=>({leaderboardId:e.leaderboardId,rank:e.rank})),"leaderboardId"))}catch(e){}j.push(g)}O++,m=Object(o.arrayUnique)(r.reduce((e,t)=>a[t]&&a[t].searched.filter(e=>!f[e]).length?e.concat([t-O]):e,[])).filter(e=>e>0)}return r.forEach(t=>W("player-scores-page-updated",e,{page:t})),{v:yield K(e,Object.values(f))}}();if("object"==typeof c)return c.v}catch(n){return Z("player-score-update-failed",e,t),r.forEach(t=>{W("player-scores-page-updated",e,{page:t}),a[t]&&a[t].all.forEach(t=>W("player-score-update-failed",e,{leaderboardId:t}))}),!1}})),function(e,t){return J.apply(this,arguments)})},function(e,t,n){"use strict";n.r(t),n.d(t,"SCORESABER_URL",(function(){return r})),n.d(t,"NEW_SCORESABER_URL",(function(){return a})),n.d(t,"SCORESABER_API_URL",(function(){return o})),n.d(t,"PLAYER_INFO_URL",(function(){return c})),n.d(t,"GLOBAL_URL",(function(){return i})),n.d(t,"COUNTRY_URL",(function(){return s})),n.d(t,"PLAYER_PROFILE_URL",(function(){return l})),n.d(t,"SONG_LEADERBOARD_URL",(function(){return d})),n.d(t,"SCORES_URL",(function(){return u})),n.d(t,"SCORES_PER_PAGE",(function(){return b})),n.d(t,"PLAYS_PER_PAGE",(function(){return p})),n.d(t,"PLAYERS_PER_PAGE",(function(){return f})),n.d(t,"MAGIC_HISTORY_NUMBER",(function(){return O}));var r="https://scoresaber.com",a="https://new.scoresaber.com",o=a+"/api",c=o+"/player/${userId}/full",i=r+"/global/${page}",s=r+"/global/${page}?country=${country}",l=r+"/u/${playerId}",d=r+"/leaderboard/${leaderboardId}?page=${page}",u=o+"/player/${playerId}/scores/recent/${page}",b=12,p=8,f=50,O=999999},function(e,t,n){"use strict";n.r(t),n.d(t,"fetchRecentScores",(function(){return y})),n.d(t,"fetchSsProfilePage",(function(){return v})),n.d(t,"fetchSsSongLeaderboardPage",(function(){return _})),n.d(t,"fetchAllNewScores",(function(){return k}));var r=n(12),a=n(8),o=n(39),c=n(7),i=n(25),s=n(13),l=n(41),d=n(22),u=n(15);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){O(o,r,a,c,i,"next",e)}function i(e){O(o,r,a,c,i,"throw",e)}c(void 0)}))}}var m,g,h,y=(h=j((function*(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length,l=new Array(s>3?s-3:0),u=3;u<s;u++)l[u-3]=arguments[u];return Object(r.fetchApiPage)(i.default.SCORESABER_API,Object(a.substituteVars)(o.SCORES_URL,{playerId:e}),t,n).then(t=>t&&t.scores?t.scores.filter(e=>!l.length||l.includes(e.leaderboardId)).map(t=>({scoreId:t.scoreId,leaderboardId:t.leaderboardId,score:t.score,uScore:t.unmodififiedScore,mods:t.mods,playerId:e,timeset:Object(c.dateFromString)(t.timeSet),pp:t.pp,weight:t.weight,hash:t.songHash,name:t.songName+(t.songSubName&&t.songSubName.length?" "+t.songSubName:""),songAuthorName:t.songAuthorName,levelAuthorName:t.levelAuthorName,diff:t.difficultyRaw,diffInfo:Object(d.extractDiffAndType)(t.difficultyRaw),maxScoreEx:t.maxScore,rank:t.rank,lastUpdated:new Date})):null)})),function(e){return h.apply(this,arguments)}),v=(g=j((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"recent";return p(p({},Object(l.parseSsProfilePage)(yield Object(r.fetchHtmlPage)(i.default.SCORESABER,Object(u.getPlayerProfileUrl)(e,!("top"===n),!1,t)))),{},{type:n,playerId:e,pageNum:t})})),function(e){return g.apply(this,arguments)}),_=(m=j((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return p(p({},Object(l.parseSsSongLeaderboardPage)(yield Object(r.fetchHtmlPage)(i.default.SCORESABER,Object(l.getSongLeaderboardUrl)(e,t)))),{},{leaderboardId:e,pageNum:t})})),function(e){return m.apply(this,arguments)}),w=!1;function k(e){return $.apply(this,arguments)}function $(){return($=j((function*(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a={lastUpdated:new Date,recentPlay:null,scores:{}},o=0,s=null,l=function*(){if(w)throw w=!1,i.default.SCORESABER_API.clear(),"Fetching scores aborted";var l={id:e.id,name:e.name,page:o,total:null};n&&n(l);var d=void 0;try{d=yield y(e.id,o,e=>{n&&n(Object.assign({},l,{wait:e}))})}catch(e){if(!(e instanceof r.NotFoundError))throw e}if(!d)return"break";for(var u in 1===o&&d.length&&(s=Object(c.dateFromString)(d[0].timeset)),d){var b=Object(c.dateFromString)(d[u].timeset);if(t&&b<=t)return s&&(a.recentPlay=s),{v:a};a.scores[d[u].leaderboardId]=d[u]}return s&&(a.recentPlay=s),d.length<8?"break":void 0};++o;){var d=yield*l();if("break"===d)break;if("object"==typeof d)return d.v}return a.recentPlay=s,a}))).apply(this,arguments)}s.default.on("stop-fetching-scores-cmd",()=>{w=!0})},function(e,t,n){"use strict";n.r(t),n.d(t,"getSongLeaderboardUrl",(function(){return f})),n.d(t,"parseSsLeaderboardScores",(function(){return O})),n.d(t,"parseSsProfilePage",(function(){return j})),n.d(t,"parseSsSongLeaderboardPage",(function(){return m}));var r=n(42),a=n(6),o=n(22),c=n(7),i=n(9),s=n(8),l=n(39),d=n(43);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Object(s.substituteVars)(l.SONG_LEADERBOARD_URL,{leaderboardId:e,page:t})},O=e=>(Object(d.default)(e),[...e.querySelectorAll("table.ranking tbody tr")].map(e=>{var t,n,o,c,i,s,l,d,u,b,p,f={lastUpdated:new Date},O=t=>{var n,a,o;return null!==(n=Object(r.parseSsFloat)(null!==(a=null===(o=e.querySelector(t))||void 0===o?void 0:o.innerText)&&void 0!==a?a:""))&&void 0!==n?n:null};f.picture=null!==(t=null===(n=e.querySelector(".picture img"))||void 0===n?void 0:n.src)&&void 0!==t?t:null,f.rank=null!==(o=Object(r.parseSsInt)(null!==(c=null===(i=e.querySelector("td.rank"))||void 0===i?void 0:i.innerText)&&void 0!==c?c:""))&&void 0!==o?o:null;var j,m,g,h,y,v,_,w=e.querySelector(".player a");return w?(f.country=null!==(j=Object(a.getFirstRegexpMatch)(/^.*?\/flags\/([^.]+)\..*$/,null!==(m=null===(g=w.querySelector("img"))||void 0===g?void 0:g.src)&&void 0!==m?m:""))&&void 0!==j?j:null,f.playerName=null!==(h=null===(y=w.querySelector("span.songTop.pp"))||void 0===y?void 0:y.innerText.replace("&#039;","'"))&&void 0!==h?h:null,f.playerId=null!==(v=Object(a.getFirstRegexpMatch)(/\/u\/(\d+)((\?|&|#).*)?$/,null!==(_=w.href)&&void 0!==_?_:""))&&void 0!==v?v:null):(f.country=null,f.playerId=null,f.playerName=null),f.score=O("td.score"),f.timesetAgo=null!==(s=null===(l=e.querySelector("td.timeset"))||void 0===l||null===(d=l.innerText)||void 0===d?void 0:d.trim())&&void 0!==s?s:null,f.mods=null!==(u=null===(b=e.querySelector("td.mods"))||void 0===b||null===(p=b.innerText)||void 0===p?void 0:p.replace("-","").split(",").filter(e=>e&&e.trim().length))&&void 0!==u?u:null,f.mods=f.mods&&f.mods.length?f.mods.join(","):null,f.pp=O("td.pp .scoreTop.ppValue"),f.acc=O("td.percentage"),f})),j=e=>{var t,n,s,l,u,p,f,O,j,m,g,h,y,v,_,w,k,$;return Object(d.default)(e),{name:null!==(t=null===(n=e.querySelector(".content .column:not(.avatar) .title a"))||void 0===n||null===(s=n.innerText)||void 0===s?void 0:s.trim())&&void 0!==t?t:null,steamUrl:null!==(l=null===(u=e.querySelector(".content .column:not(.avatar) .title a"))||void 0===u?void 0:u.href)&&void 0!==l?l:null,avatarUrl:null!==(p=null===(f=e.querySelector(".column.avatar img"))||void 0===f?void 0:f.src)&&void 0!==p?p:null,country:null!==(O=null===(j=Object(a.getFirstRegexpMatch)(/^.*?\/flags\/([^.]+)\..*$/,e.querySelector(".content .column .title img").src))||void 0===j?void 0:j.toLowerCase())&&void 0!==O?O:null,chartHistory:(null!==(m=Object(a.getFirstRegexpMatch)(/data:\s*\[([0-9,]+)\]/,e.body.innerHTML))&&void 0!==m?m:"").split(",").map(e=>parseInt(e,10)),stats:[{key:"Player ranking",label:Object(i.trans)("profile.stats.ranking"),type:"rank",value:Object(r.parseSsInt)(null!==(g=e.querySelector(".content .column ul li:first-of-type a:first-of-type").innerText)&&void 0!==g?g:""),countryRank:Object(r.parseSsInt)(null!==(h=e.querySelector('.content .column ul li:first-of-type a[href^="/global?country="]').innerText)&&void 0!==h?h:"")}].concat([...e.querySelectorAll(".content .column ul li:not(:first-child)")].map(e=>{var t=e.innerHTML.match(/^\s*<strong>([^:]+)\s*:?\s*<\/strong>\s*(.*)$/);if(!t)return null;var n=[{key:"Performance Points",type:"number",precision:2,suffix:"pp",label:Object(i.trans)("profile.stats.pp"),number:!0},{key:"Play Count",type:"number",precision:0,label:Object(i.trans)("profile.stats.playCount"),number:!0,colorVar:"selected"},{key:"Total Score",type:"number",precision:0,label:Object(i.trans)("profile.stats.totalScore"),number:!0,colorVar:"selected"},{key:"Replays Watched by Others",type:"number",precision:0,label:Object(i.trans)("profile.stats.replaysShort"),title:Object(i.trans)("profile.stats.replays"),number:!0,colorVar:"dimmed"},{key:"Role",label:Object(i.trans)("profile.stats.role"),number:!1,colorVar:"dimmed"},{key:"Inactive Account",label:Object(i.trans)("profile.stats.inactiveAccount"),number:!1,colorVar:"decrease"}],a=n.filter(e=>e.number).map(e=>e.key).includes(t[1])?Object(r.parseSsFloat)(t[2]):t[2],o=n.find(e=>e.key===t[1]);return o?b(b({},o),{},{value:a}):{label:t[1],value:a}}).filter(e=>e)).reduce((e,t)=>{if(t.key)switch(t.key){case"Player ranking":e.rank=t.value,e.countryRank=t.countryRank;break;case"Performance Points":e.pp=t.value;break;case"Play Count":e.playCount=t.value;break;case"Total Score":e.totalScore=t.value;break;case"Replays Watched by Others":e.replays=t.value;break;case"Role":e.role=t.value;break;case"Inactive Account":e.inactiveAccount=!0}return e},{inactiveAccount:!1}),ssBadges:[...e.querySelectorAll(".column.avatar center img")].map(e=>({src:e.src,title:e.title})),pageNum:parseInt(null!==(y=null===(v=e.querySelector(".pagination .pagination-list li a.is-current"))||void 0===v?void 0:v.innerText)&&void 0!==y?y:"0",10),pageQty:parseInt(null!==(_=null===(w=e.querySelector(".pagination .pagination-list li:last-of-type"))||void 0===w?void 0:w.innerText)&&void 0!==_?_:"0",10),totalItems:null!==(k=Object(r.parseSsFloat)(Object(a.getFirstRegexpMatch)(/^\s*<strong>(?:[^:]+)\s*:?\s*<\/strong>\s*(.*)$/,null===($=e.querySelector(".columns .column:not(.is-narrow) ul li:nth-of-type(3)"))||void 0===$?void 0:$.innerHTML)))&&void 0!==k?k:0,scores:[...e.querySelectorAll("table.ranking tbody tr")].map(e=>{var t,n={lastUpdated:new Date},i=e.querySelector("th.rank");if(i){var s=Object(r.parseSsInt)(i.innerText);n.rank=null!=s?s:null}else n.rank=null;var l=e.querySelector("th.song a");if(l){var d=Object(a.getFirstRegexpMatch)(/leaderboard\/(\d+)/,l.href);n.leaderboardId=d?parseInt(d,10):null}else n.leaderboardId=null;var u=e.querySelector("th.song img");n.songImg=u?u.src:null;var b=u?u.src.match(/([^\/]+)\.(jpg|jpeg|png)$/):null;n.hash=b?b[1]:null;var p=e.querySelector("th.song a .songTop.pp"),f=p?p.innerHTML.replace(/&amp;/g,"&").replace(/<span class="__cf_email__" data-cfemail="[^"]+">\[email&nbsp;protected]<\/span>/g,"").match(/^(.*?)\s*<span[^>]+>(.*?)<\/span>/):null;if(f){var O=f[1].match(/^(.*?)\s-\s(.*)$/);O?(n.songName=O[2],n.songAuthorName=O[1]):(n.songName=f[1],n.songAuthorName=""),n.songDiff=f[2],n.diffInfo=Object(o.getDiffAndTypeFromOnlyDiffName)(n.songDiff)}else n=Object.assign(n,{songName:null,songAuthorName:null,songDiff:null,diffInfo:null});var j=e.querySelector("th.song a .songTop.mapper");n.levelAuthorName=j?j.innerText:null;var m=e.querySelector("th.song span.songBottom.time");n.timeset=m?Object(c.dateFromString)(m.title):null,n.timesetStr=m?m.title:null;var g=e.querySelector("th.score .scoreTop.ppValue");g&&(n.pp=null!==(t=Object(r.parseSsFloat)(g.innerText))&&void 0!==t?t:null);var h=e.querySelector("th.score .scoreTop.ppWeightedValue"),y=h?Object(a.getFirstRegexpMatch)(/^\(([0-9.]+)pp\)$/,h.innerText):null;n.ppWeighted=y?Object(r.parseSsFloat)(y):null;var v=e.querySelector("th.score .scoreBottom"),_=v?v.innerText.match(/^([^:]+):\s*([0-9,.]+)(?:.*?\((.*?)\))?/):null;if(_)switch(_[1]){case"score":n.acc=null,n.mods=_[3]?_[3]:"",n.score=Object(r.parseSsFloat)(_[2]);break;case"accuracy":n.score=null,n.mods=_[3]?_[3]:"",n.acc=Object(r.parseSsFloat)(_[2])}return n})}},m=e=>{var t,n,o,c,i,s,u,p,f,j,m,g;Object(d.default)(e);var h=[...null!==(t=e.querySelectorAll(".tabs ul li a"))&&void 0!==t?t:[]].map(e=>{var t,n;return{name:e.innerText,id:parseInt(Object(a.getFirstRegexpMatch)(/leaderboard\/(\d+)$/,e.href),10),color:null===(t=e.querySelector("span"))||void 0===t||null===(n=t.style)||void 0===n?void 0:n.color}}),y=null!==(n=null===(o=e.querySelector(".tabs li.is-active a span"))||void 0===o?void 0:o.innerText)&&void 0!==n?n:null,v=[{id:"hash",label:"ID",value:null},{id:"scores",label:"Scores",value:null},{id:"status",label:"Status",value:null},{id:"totalScores",label:"Total Scores",value:null},{id:"noteCount",label:"Note Count",value:null},{id:"bpm",label:"BPM",value:null},{id:"stars",label:"Star Difficulty",value:null},{id:"levelAuthorName",label:"Mapped by",value:null}].map(t=>b(b({},t),{},{value:e.querySelector(".column.is-one-third-desktop .box:first-of-type").innerHTML.match(new RegExp(t.label+":\\s*<b>(.*?)</b>","i"))})).concat([{id:"songName",value:[null,null===(c=e.querySelector(".column.is-one-third-desktop .box:first-of-type .title a"))||void 0===c?void 0:c.innerText]}]).reduce((t,n)=>{var a=Array.isArray(n.value)?n.value[1]:null;if(null!==a&&["scores","totalScores","stars","bpm","noteCount"].includes(n.id)&&(a=Object(r.parseSsFloat)(a)),a&&"songName"===n.id){var o=a.match(/^(.*?)\s-\s(.*)$/);o?(a=o[2],t.songAuthorName=o[1]):t.songAuthorName=""}if(a&&"levelAuthorName"===n.id){var c=e.createElement("div");c.innerHTML=a,a=c.innerText}return null!==a&&(t[n.id]=a),t},{}),_=parseInt(null!==(i=null===(s=e.querySelector(".pagination .pagination-list li:last-of-type"))||void 0===s?void 0:s.innerText)&&void 0!==i?i:"0",10),w=null!==(u=null==v?void 0:v.scores)&&void 0!==u?u:0,k=Math.ceil(w/l.SCORES_PER_PAGE)>_?_*l.SCORES_PER_PAGE:w;return{currentDiff:null!==(p=null==y||null===(f=y.toLowerCase())||void 0===f?void 0:f.replace("+","Plus"))&&void 0!==p?p:null,currentDiffHuman:y,diffs:h,song:v,diffChart:(null!==(j=Object(a.getFirstRegexpMatch)(/'difficulty',\s*([0-9.,\s]+)\s*\]/,e.body.innerHTML))&&void 0!==j?j:"").split(",").map(e=>parseFloat(e)).filter(e=>e),pageNum:parseInt(null!==(m=null===(g=e.querySelector(".pagination .pagination-list li a.is-current"))||void 0===g?void 0:g.innerText)&&void 0!==m?m:"0",10),pageQty:_,totalItems:k,scores:O(e)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"parseSsInt",(function(){return a})),n.d(t,"parseSsFloat",(function(){return o}));var r=n(6),a=e=>{var t,n;return parseInt(null!==(t=null===(n=Object(r.getFirstRegexpMatch)(/([0-9,]+)\s*$/,e))||void 0===n?void 0:n.replace(/[^\d]/g,""))&&void 0!==t?t:null,10)},o=e=>{var t;return parseFloat(null!==(t=Object(r.getFirstRegexpMatch)(/([0-9,.]+)\s*$/,null==e?void 0:e.replace(/[^\d.]/g,"")))&&void 0!==t?t:null)}},function(e,t,n){"use strict";n.r(t),t.default=function(e){function t(e){try{if("undefined"==typeof console)return;"error"in console?console.error(e):console.log(e)}catch(e){}}function n(e,t){var n=e.substr(t,2);return parseInt(n,16)}function r(e,r){for(var a="",o=n(e,r),c=r+2;c<e.length;c+=2){var s=n(e,c)^o;a+=String.fromCharCode(s)}try{a=decodeURIComponent(escape(a))}catch(e){t(e)}return function(e){return i.innerHTML='<a href="'+e.replace(/"/g,"&quot;")+'"></a>',i.childNodes[0].getAttribute("href")||""}(a)}var a="/cdn-cgi/l/email-protection#",o=".__cf_email__",c="data-cfemail",i=e.createElement("div");!function n(i){try{(function(e){for(var n=e.querySelectorAll("a"),o=0;o<n.length;o++)try{var c=n[o],i=c.href.indexOf(a);i>-1&&(c.href="mailto:"+r(c.href,i+a.length))}catch(e){t(e)}})(i),function(n){for(var a=n.querySelectorAll(o),i=0;i<a.length;i++)try{var s=a[i],l=s.parentNode,d=s.getAttribute(c);if(d){var u=r(d,0),b=e.createTextNode(u);l.replaceChild(b,s)}}catch(e){t(e)}}(i),function(e){for(var r=e.querySelectorAll("template"),a=0;a<r.length;a++)try{n(r[a].content)}catch(e){t(e)}}(i)}catch(e){t(e)}}(e)}},function(e,t,n){"use strict";n.r(t),t.default={COUNTRY_PLAYERS_QTY:50,SSE_CHECK_DELAY:50}},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("scores","id",{"scores-timeset":"timeset","scores-leaderboardId":"leaderboardId","scores-playerId":"playerId","scores-pp":"pp"}))},function(e,t,n){"use strict";n.r(t),n.d(t,"storeRanked",(function(){return j})),n.d(t,"storeRankeds",(function(){return m})),n.d(t,"getRankedSongs",(function(){return g})),n.d(t,"getRankedSongsLastUpdated",(function(){return h})),n.d(t,"setRankedSongsLastUpdated",(function(){return y})),n.d(t,"getRankedsChangesSince",(function(){return v})),n.d(t,"storeRankedsChanges",(function(){return _})),n.d(t,"UNRANKED",(function(){return w})),n.d(t,"RANKED",(function(){return k}));var r=n(47),a=n(37),o=n(48),c=n(6);function i(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){i(o,r,a,c,s,"next",e)}function s(e){i(o,r,a,c,s,"throw",e)}c(void 0)}))}}var l,d,u,b,p,f,O,j=(O=s((function*(e){return Object(r.default)().set(e)})),function(e){return O.apply(this,arguments)}),m=(f=s((function*(e){return Promise.all(e.map((t=s((function*(e){return j(e)})),function(e){return t.apply(this,arguments)})));var t})),function(e){return f.apply(this,arguments)}),g=(p=s((function*(){var e;return Object(c.convertArrayToObjectByKey)(null!==(e=yield Object(r.default)().getAll())&&void 0!==e?e:{},"leaderboardId")})),function(){return p.apply(this,arguments)}),h=(b=s((function*(){return Object(a.default)().get("rankedSongsLastUpdated")})),function(){return b.apply(this,arguments)}),y=(u=s((function*(e){return Object(a.default)().set(e,"rankedSongsLastUpdated")})),function(e){return u.apply(this,arguments)}),v=(d=s((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=yield Object(o.default)().getAllFromIndex("rankeds-changes-timestamp",t?IDBKeyRange.bound(e,t):IDBKeyRange.lowerBound(e));return n&&n.length?n.reduce((e,t)=>{var n;return e[t.leaderboardId]=null!==(n=e[t.leaderboardId])&&void 0!==n?n:[],e[t.leaderboardId].push(t),e},{}):{}})),function(e){return d.apply(this,arguments)}),_=(l=s((function*(e){return Promise.all(e.map((t=s((function*(e){return Object(o.default)().set(e)})),function(e){return t.apply(this,arguments)})));var t})),function(e){return l.apply(this,arguments)}),w=[97223,20506,102179,102180],k=[]},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("rankeds","leaderboardId"))},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("rankeds-changes","_idbId",{"rankeds-changes-timestamp":"timestamp","rankeds-changes-leaderboardId":"leaderboardId"}))},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("players-history","_idbId",{"players-history-playerId":"playerId","players-history-timestamp":"timestamp"}))},function(e,t,n){"use strict";n.r(t),n.d(t,"getSsplCountryRanks",(function(){return s})),n.d(t,"setSsplCountryRanks",(function(){return l}));var r=n(33);function a(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(e){a(c,r,o,i,s,"next",e)}function s(e){a(c,r,o,i,s,"throw",e)}i(void 0)}))}}var c,i,s=(i=o((function*(){var e;return null!==(e=yield Object(r.default)().get("ssplCountryRanks"))&&void 0!==e?e:{}})),function(){return i.apply(this,arguments)}),l=(c=o((function*(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(r.default)().set(e,"ssplCountryRanks")})),function(){return c.apply(this,arguments)})},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("groups","_idbId",{"groups-name":"name","groups-playerId":"playerId"}))},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("twitch","playerId"))},function(e,t,n){"use strict";n.r(t);var r=n(11);t.default={profile:{settings:{header:"Settings",language:"Language",locale:"Localization",theme:"Theme",songBrowser:{header:"Song browser",autoTransform:"Automatically transform",defaultTypeHeader:"Default type",defaultViewHeader:"Default view",defaultColumnsHeader:"Default columns",defaultSortHeader:"Default sort",defaultIconsHeader:"Default icons",defaultItemsPerPageHeader:"Number of items per page"},profile:{header:"Profile",defaultChart:"Default chart",statsStyling:"Stats style",showOnePpCalc:"Show +1PP calculator",showTwitchIcon:"Show Twitch button",statsStyleBadge:"Badges",statsStyleText:"Text"},songLeaderboard:{header:"Song ranking",showDiff:"Show the differences",showWhatIfPp:'Show the "What if you play it like that" button',showBgCover:"Show background cover",defaultType:"Default type"},others:{header:"Others",bgDownload:"Background download",refreshHeader:"Data refresh",keepView:"Keep the view",alwaysRefresh:"Always refresh"},export:"Export",import:"Import"},addPlayer:"Add player",setAsDefault:"Set as your profile",addToFriends:"Add to Friends",removeFromFriends:"Remove from Friends",removePlayer:"Remove player",rawNewPlay:"raw pp new play",onePpParseError:'Type in a number, ok? ${num1} is a number or ${num2} is. But "${str}"?',ppAttribution:"Actual contribution of the score to the total PP",stats:{ranking:"Player ranking",pp:"Performance points",playCount:"Play count",totalScore:"Total score",replays:"Replays watched by others",replaysShort:"Replays",role:"Role",inactiveAccount:"Inactive account",rankedPlayCount:"Ranked play count",countryRank:"Rank in country leaderboards",best:"Best",avg:"Avg.",totalRankedScore:"Total ranked score",avgRankedAccuracy:"Average ranked accuracy",medianRankedAccuracy:"Median ranked accuracy",stdDeviationRankedAccuracy:"Std deviation ranked accuracy",avgRankedAccuracyShort:"Average",medianRankedAccuracyShort:"Median",stdDeviationRankedAccuracyShort:"Std deviation"},twitch:{link:"Link",linked:"Linked",renew:"Renew",daysLeft:"Days left: ${days}",setupPlayerProfile:"Set up a Twitch profile",userNotFound:"Twitch user not found",vodsBadge:"Twitch VODs",video:"Video"},aside:{globalRanking:"Global ranking",countryRanking:"Country ranking",whatToPlay:"What to play"},whatToPlay:{all:"All",notPlayed:"Not played",toImprove:"To improve",algorithmBy:"Accuracy estimation algorithm developed by"}},songBrowser:{types:{all:"All",ranked_only:"Ranked only",unranked_only:"Unranked only",not_played_only:"Not played only",sniper_mode:"Sniper mode"},typesOptions:{all:"All",not_best:"When NOT the best",best:"When THE best"},viewTypes:{compact:"Compact",tabular:"Tabular",cards:"Cards"},fields:{timeset:"Date of play",timesetShort:"Date",rank:"Rank",rankShort:"#",stars:"Stars",starsShort:"*",pp:"PP",ppShort:"PP",estimatedPp:"Est. PP",estimatedPpShort:"Est. PP",acc:"Accuracy",accShort:"Acc",percentage:"Percentage",percentageShort:"%",estimatedAcc:"Est. accuracy",estimatedAccShort:"Est. Acc",maxPp:"Max PP",maxPpShort:"Max PP",bpm:"BPM",bpmShort:"BPM",njs:"NJS",njsShort:"NJS",nps:"NPS",npsShort:"NPS",duration:"Duration",durationShort:"Time",diffPp:"+PP global",diffPpShort:"+PP",weighted:"Weighted:",weightedPp:"Weighted PP",weightedPpShort:"w.PP",score:"Score",scoreShort:"Score",diff:"Differences",diffShort:"Diff",icons:"Action icons",iconsShort:"Icons",beatSaviorAcc:"Beat Savior Acc",beatSaviorAccShort:"Sav. Acc",beatSaviorStats:"Beat Savior Stats",beatSaviorStatsShort:"Sav. Stats"},sort:{ascending:"Ascending",descending:"Descending"},icons:{bsr:"!bsr",beatsaver:"Beat Saver",oneclick:"OneClick Install",preview:"Map preview",twitch:"Twitch",beatsavior:"Beat Savior",bsrTooltip:"Copy !bsr",beatSaverTooltip:"Go to Beat Saver",beatSaviorTooltip:"Show last played from Beat Savior",twitchTooltip:"VOD preview"},typeHeader:"Type",songHeader:"Song",songPlaceholder:"Start typing...",countryRankHeader:"Country rank",viewHeader:"View",showHeader:"Show",sortingHeader:"Sorting",compare:{label:"Compare",add:"Add a player to compare",remove:"Remove from comparision",saveAsDefault:"Save comparision as default"},playlist:{label:"Playlist",showChecks:"Show checkboxes",hideChecks:"Hide checkboxes",checkAll:"Check all",checkPage:"Check the page",clear:"Clear",export:"Export playlist"},csv:{label:"CSV",export:"Export CSV"},transformingTheUniverse:"Transformation of the universe in progress...",noData:{title:"It's so empty here.",info:"It seems that no song meets all the selected requirements. Change something maybe?"},noScore:"No score",former:"Former",totalPp:"Total PP for ${name}",rankOfDate:"Rank of ${date}, click to refresh",ssScoreType:{top:"Top",recent:"Recent"},estimated:"Estimated",estimatedShort:"Est."},songLeaderboard:{player:"Player",mods:"Mods",nobodyPlayed:"It seems that nobody has played this song yet.",searching:"Searching for results...",ranked:"Ranked",unranked:"Unranked",maxPpSuffix:"pp max",types:{all:"All",country:"Country only",country_and_friends:"Country + Friends",manually_added:"Friends only"},difficultyGraph:"Difficulty graph"},songCard:{scores:"Scores",notes:"Notes",bombs:"Bombs",obstacles:"Obstacles"},refresh:{lastDownload:"Downloaded:",rankedsDownload:"Downloading current rankeds",countryPlayersDownload:"Downloading active players",beatSavior:"Updating Beat Savior data",waiting:"[Waiting ${seconds}s]",error:"Download error. Try again.",btnDisabledBgDlInProgress:"Refreshing disabled. Background downloading in progress..."},whatif:{label:"If you play like this:"},dashboard:{rankingHeader:"Ranking",showOriginal:"Show the original",lastScores:"Recent scores",bestScores:"Best scores",ranking:{header:{player:"Player",song:"Song",timeset:"Date",acc:"Acc",pp:"PP",change:"Change"},changeOptions:{day:"Daily change",week:"Weekly change",month:"Monthly change"}},periods:{last3Days:"Last 3 days",lastWeek:"Last week",last2Weeks:"Last 2 weeks",lastMonth:"Last month",last3Months:"Last 3 months",lastHalfYear:"Last 6 months",lastYear:"Last year",all:"All times"},setCurrentCountry:"Set as the current country",areYouSureSetCurrentCountry:"Are you sure you want to set ${country} as the current country?",areYouSureChangeCurrentCountry:"Are you sure you want to change the country from ${currentCountry} to ${country}?",removeCurrentCountry:"Remove current country",removeCurrentCountryConfirmationTitle:"Are you sure you want to remove support for the current country?",removeCurrentCountryConfirmationContent:"Only you and your friends will be left.",onboardingLine1:"We have to download all the scores of players from the selected country.",onboardingLine2:"Sit down comfortably, click Start and wait, because it will take a while..."},chart:{timeLabel:"Time",rankLabel:"Rank",ppLabel:"PP",activityLabel:"Activity",rankTooltip:"#${value}",ppTooltip:"${value}pp",activityTooltip:"Activity: ${value} song(s)",starsLabel:"Stars",accuracyLabel:"Accuracy",accTooltip:"Accuracy: ${acc}% (${mods}) | Stars: ${stars}*",percentageTooltip:"Percentage: ${acc}% (${mods}) | Stars: ${stars}*",accTooltipNoMods:"Accuracy: ${acc}% | Stars: ${stars}*",percentageTooltipNoMods:"Percentage: ${acc}% | Stars: ${stars}*",rankingButton:"Ranking",accuracyButton:"Accuracy",percentageButton:"Percentage",none:"Disabled"},beatSaviorImporter:{beatSaviorBtn:"Beat Savior",header:"Beat Savior data import",importBtn:"Import",selectOtherFolderBtn:"Select other folder",introduction:r.IS_BEAT_SAVIOR_API_ENABLED?'The plugin retrieves data from Beat Savior automatically, but only the most recent scores are stored online.<br /><br />This tool allows you to import data from the <a href="https://www.beatsavior.io/" target="_blank" rel="noopener">BeatSavior</a> mod stored <strong>on your computer</strong> that are held for the last 30 days. The tool uses the new File System Access API, Chrome/Edge browser version 86 or higher is required.':'This tool allows you to import data from the <a href="https://www.beatsavior.io/" target="_blank" rel="noopener">BeatSavior</a> mod stored <strong>on your computer</strong> . The tool uses the new File System Access API, Chrome/Edge browser version 86 or higher is required.',selectFolderFirst:"The first time you import, you will need to point to the folder where the data is stored. Because the browser does not allow access to system directories you must first copy the <strong>C:\\Users\\&lt;YOUR WINDOWS USER&gt;\\AppData\\Roaming\\Beat Savior Data</strong> folder to another location, such as the desktop. Then point to that folder when prompted.",selectFolderConsecutive:"Copy the new data from the <strong>C:\\Users\\&lt;YOUR WINDOWS USER&gt;\\AppData\\Roaming\\Beat Savior Data</strong> folder to the location where you keep your Beat Savior data.",permissions:"The browser will ask you to confirm that you give permission to read local files, confirm it. This confirmation will be necessary during each new session (after closing a tab or reloading a page).",importInProgress:"Importing data. Please wait...",importCompleted:"The data has been imported",fileSystemApiNotAvailableException:"File System Access API is not available",noFolderSelectedException:"No folder selected",noDirectoryHandleException:"Fetching directory handle failed",noPermissionException:"No permission was granted to read local files",oldPlayerScoresException:"Please refresh the scores. Data must be no older than 5 minutes.",skipping:"skipping",loading:"loading",loadingPlays:"loading ${num} of ${total} / ${name}",fetchPlayerScores:"fetching player scores",savingToDb:"saving"},beatSavior:{left:"Left",leftShort:"L",right:"Right",rightShort:"R",accLeft:"Accuracy left",accLeftShort:"Acc L",accRight:"Accuracy right",accRightShort:"Acc R",avgAcc:"Avg accuracy",avgAccShort:"Avg acc",beforeCut:"Before cut",beforeCutShort:"Before",afterCut:"After cut",afterCutShort:"After",accuracy:"Accuracy",accuracyShort:"Acc",misses:"Misses",missesShort:"Misses",maxCombo:"Max combo",maxComboShort:"Combo",pauses:"Pauses",pausesShort:"Pauses",bombHit:"Bomb hit",bombHitShort:"Bomb hit",wallHit:"Wall hit",wallHitShort:"Wall hit",avgStatsBtn:"Average",avgStatsTooltip:"Show average accuracy",avgStatsHeader:"Average accuracy of ${num} song(s)",switchToAccView:"Switch to accuracy view",switchToGridView:"Switch to grid view",switchToChartView:"Switch to chart view",clickToShowDetails:"Click to show/hide details"},themes:{dark:"The one and the only",light:"Eyes burning",drakonno:"Drakonno's",sombra:"Sombra's"},plugin:{cachedButton:"Cached",liveButton:"Live"},common:{ok:"OK",save:"Save",cancel:"Cancel",close:"Close",options:"Options",search:"Search",nothingSelected:"Nothing selected",to:"to",noData:"No data",downloadError:"Download error"},import:{selectJsonFile:"Select the JSON file containing the data export",oldVerNotSupported:"Importing a file from an older version of the plugin is not supported",incorrectFile:"Invalid export file",incorrectJsonFile:"Invalid JSON file"},db:{conversionMessage:"Database conversion",conversionSecondaryMessage:"Please wait, this should not take more than half a minute..."},onboarding:{importOrSetProfile:"Import data or set as your profile"}}},function(e,t,n){"use strict";n.r(t),n.d(t,"derived",(function(){return i})),n.d(t,"readable",(function(){return o})),n.d(t,"writable",(function(){return c}));var r=n(55);n.d(t,"get",(function(){return r.get_store_value}));const a=[];function o(e,t){return{subscribe:c(e,t).subscribe}}function c(e,t=r.noop){let n;const o=[];function c(t){if(Object(r.safe_not_equal)(e,t)&&(e=t,n)){const t=!a.length;for(let t=0;t<o.length;t+=1){const n=o[t];n[1](),a.push(n,e)}if(t){for(let e=0;e<a.length;e+=2)a[e][0](a[e+1]);a.length=0}}}return{set:c,update:function(t){c(t(e))},subscribe:function(a,i=r.noop){const s=[a,i];return o.push(s),1===o.length&&(n=t(c)||r.noop),a(e),()=>{const e=o.indexOf(s);-1!==e&&o.splice(e,1),0===o.length&&(n(),n=null)}}}}function i(e,t,n){const a=!Array.isArray(e),c=a?[e]:e,i=t.length<2;return o(n,e=>{let n=!1;const o=[];let s=0,l=r.noop;const d=()=>{if(s)return;l();const n=t(a?o[0]:o,e);i?e(n):l=Object(r.is_function)(n)?n:r.noop},u=c.map((e,t)=>Object(r.subscribe)(e,e=>{o[t]=e,s&=~(1<<t),n&&d()},()=>{s|=1<<t}));return n=!0,d(),function(){Object(r.run_all)(u),l()}})}},function(e,t,n){"use strict";function r(){}n.r(t),n.d(t,"HtmlTag",(function(){return Se})),n.d(t,"SvelteComponent",(function(){return Jt})),n.d(t,"SvelteComponentDev",(function(){return bn})),n.d(t,"SvelteElement",(function(){return Nt})),n.d(t,"action_destroyer",(function(){return C})),n.d(t,"add_attribute",(function(){return Mt})),n.d(t,"add_classes",(function(){return Ut})),n.d(t,"add_flush_callback",(function(){return nt})),n.d(t,"add_location",(function(){return i})),n.d(t,"add_render_callback",(function(){return tt})),n.d(t,"add_resize_listener",(function(){return we})),n.d(t,"add_transform",(function(){return ze})),n.d(t,"afterUpdate",(function(){return Ne})),n.d(t,"append",(function(){return N})),n.d(t,"append_dev",(function(){return Yt})),n.d(t,"assign",(function(){return o})),n.d(t,"attr",(function(){return te})),n.d(t,"attr_dev",(function(){return on})),n.d(t,"beforeUpdate",(function(){return De})),n.d(t,"bind",(function(){return Vt})),n.d(t,"binding_callbacks",(function(){return Ke})),n.d(t,"blank_object",(function(){return l})),n.d(t,"bubble",(function(){return He})),n.d(t,"check_outros",(function(){return pt})),n.d(t,"children",(function(){return le})),n.d(t,"claim_component",(function(){return Wt})),n.d(t,"claim_element",(function(){return de})),n.d(t,"claim_space",(function(){return be})),n.d(t,"claim_text",(function(){return ue})),n.d(t,"clear_loops",(function(){return D})),n.d(t,"component_subscribe",(function(){return g})),n.d(t,"compute_rest_props",(function(){return k})),n.d(t,"compute_slots",(function(){return $})),n.d(t,"createEventDispatcher",(function(){return Me})),n.d(t,"create_animation",(function(){return qe})),n.d(t,"create_bidirectional_transition",(function(){return ht})),n.d(t,"create_component",(function(){return Ht})),n.d(t,"create_in_transition",(function(){return mt})),n.d(t,"create_out_transition",(function(){return gt})),n.d(t,"create_slot",(function(){return h})),n.d(t,"create_ssr_component",(function(){return Ft})),n.d(t,"current_component",(function(){return Ie})),n.d(t,"custom_event",(function(){return $e})),n.d(t,"dataset_dev",(function(){return sn})),n.d(t,"debug",(function(){return Dt})),n.d(t,"destroy_block",(function(){return _t})),n.d(t,"destroy_component",(function(){return Kt})),n.d(t,"destroy_each",(function(){return U})),n.d(t,"detach",(function(){return M})),n.d(t,"detach_after_dev",(function(){return rn})),n.d(t,"detach_before_dev",(function(){return nn})),n.d(t,"detach_between_dev",(function(){return tn})),n.d(t,"detach_dev",(function(){return en})),n.d(t,"dirty_components",(function(){return We})),n.d(t,"dispatch_dev",(function(){return Qt})),n.d(t,"each",(function(){return zt})),n.d(t,"element",(function(){return V})),n.d(t,"element_is",(function(){return H})),n.d(t,"empty",(function(){return J})),n.d(t,"escape",(function(){return Rt})),n.d(t,"escaped",(function(){return qt})),n.d(t,"exclude_internal_props",(function(){return w})),n.d(t,"fix_and_destroy_block",(function(){return kt})),n.d(t,"fix_and_outro_and_destroy_block",(function(){return $t})),n.d(t,"fix_position",(function(){return Re})),n.d(t,"flush",(function(){return ot})),n.d(t,"getContext",(function(){return Ve})),n.d(t,"get_binding_group_value",(function(){return ce})),n.d(t,"get_current_component",(function(){return Be})),n.d(t,"get_slot_changes",(function(){return v})),n.d(t,"get_slot_context",(function(){return y})),n.d(t,"get_spread_object",(function(){return It})),n.d(t,"get_spread_update",(function(){return Pt})),n.d(t,"get_store_value",(function(){return m})),n.d(t,"globals",(function(){return vt})),n.d(t,"group_outros",(function(){return bt})),n.d(t,"handle_promise",(function(){return yt})),n.d(t,"has_prop",(function(){return I})),n.d(t,"identity",(function(){return a})),n.d(t,"init",(function(){return Xt})),n.d(t,"insert",(function(){return F})),n.d(t,"insert_dev",(function(){return Gt})),n.d(t,"intros",(function(){return Ze})),n.d(t,"invalid_attribute_name_character",(function(){return Tt})),n.d(t,"is_client",(function(){return T})),n.d(t,"is_crossorigin",(function(){return _e})),n.d(t,"is_empty",(function(){return f})),n.d(t,"is_function",(function(){return u})),n.d(t,"is_promise",(function(){return c})),n.d(t,"listen",(function(){return Q})),n.d(t,"listen_dev",(function(){return an})),n.d(t,"loop",(function(){return L})),n.d(t,"loop_guard",(function(){return pn})),n.d(t,"missing_component",(function(){return Et})),n.d(t,"mount_component",(function(){return Zt})),n.d(t,"noop",(function(){return r})),n.d(t,"not_equal",(function(){return p})),n.d(t,"now",(function(){return A})),n.d(t,"null_to_empty",(function(){return S})),n.d(t,"object_without_properties",(function(){return W})),n.d(t,"onDestroy",(function(){return Fe})),n.d(t,"onMount",(function(){return Le})),n.d(t,"once",(function(){return x})),n.d(t,"outro_and_destroy_block",(function(){return wt})),n.d(t,"prevent_default",(function(){return Y})),n.d(t,"prop_dev",(function(){return cn})),n.d(t,"query_selector_all",(function(){return xe})),n.d(t,"raf",(function(){return q})),n.d(t,"run",(function(){return s})),n.d(t,"run_all",(function(){return d})),n.d(t,"safe_not_equal",(function(){return b})),n.d(t,"schedule_update",(function(){return Ge})),n.d(t,"select_multiple_value",(function(){return ye})),n.d(t,"select_option",(function(){return me})),n.d(t,"select_options",(function(){return ge})),n.d(t,"select_value",(function(){return he})),n.d(t,"self",(function(){return ee})),n.d(t,"setContext",(function(){return Ue})),n.d(t,"set_attributes",(function(){return ne})),n.d(t,"set_current_component",(function(){return Ee})),n.d(t,"set_custom_element_data",(function(){return ae})),n.d(t,"set_data",(function(){return pe})),n.d(t,"set_data_dev",(function(){return ln})),n.d(t,"set_input_type",(function(){return Oe})),n.d(t,"set_input_value",(function(){return fe})),n.d(t,"set_now",(function(){return R})),n.d(t,"set_raf",(function(){return z})),n.d(t,"set_store_value",(function(){return P})),n.d(t,"set_style",(function(){return je})),n.d(t,"set_svg_attributes",(function(){return re})),n.d(t,"space",(function(){return X})),n.d(t,"spread",(function(){return At})),n.d(t,"stop_propagation",(function(){return G})),n.d(t,"subscribe",(function(){return j})),n.d(t,"svg_element",(function(){return Z})),n.d(t,"text",(function(){return K})),n.d(t,"tick",(function(){return et})),n.d(t,"time_ranges_to_array",(function(){return se})),n.d(t,"to_number",(function(){return ie})),n.d(t,"toggle_class",(function(){return ke})),n.d(t,"transition_in",(function(){return ft})),n.d(t,"transition_out",(function(){return Ot})),n.d(t,"update_keyed_each",(function(){return xt})),n.d(t,"update_slot",(function(){return _})),n.d(t,"validate_component",(function(){return Bt})),n.d(t,"validate_each_argument",(function(){return dn})),n.d(t,"validate_each_keys",(function(){return St})),n.d(t,"validate_slots",(function(){return un})),n.d(t,"validate_store",(function(){return O})),n.d(t,"xlink_attr",(function(){return oe}));const a=e=>e;function o(e,t){for(const n in t)e[n]=t[n];return e}function c(e){return e&&"object"==typeof e&&"function"==typeof e.then}function i(e,t,n,r,a){e.__svelte_meta={loc:{file:t,line:n,column:r,char:a}}}function s(e){return e()}function l(){return Object.create(null)}function d(e){e.forEach(s)}function u(e){return"function"==typeof e}function b(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function p(e,t){return e!=e?t==t:e!==t}function f(e){return 0===Object.keys(e).length}function O(e,t){if(null!=e&&"function"!=typeof e.subscribe)throw new Error(`'${t}' is not a store with a 'subscribe' method`)}function j(e,...t){if(null==e)return r;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function m(e){let t;return j(e,e=>t=e)(),t}function g(e,t,n){e.$$.on_destroy.push(j(t,n))}function h(e,t,n,r){if(e){const a=y(e,t,n,r);return e[0](a)}}function y(e,t,n,r){return e[1]&&r?o(n.ctx.slice(),e[1](r(t))):n.ctx}function v(e,t,n,r){if(e[2]&&r){const a=e[2](r(n));if(void 0===t.dirty)return a;if("object"==typeof a){const e=[],n=Math.max(t.dirty.length,a.length);for(let r=0;r<n;r+=1)e[r]=t.dirty[r]|a[r];return e}return t.dirty|a}return t.dirty}function _(e,t,n,r,a,o,c){const i=v(t,r,a,o);if(i){const a=y(t,n,r,c);e.p(a,i)}}function w(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}function k(e,t){const n={};t=new Set(t);for(const r in e)t.has(r)||"$"===r[0]||(n[r]=e[r]);return n}function $(e){const t={};for(const n in e)t[n]=!0;return t}function x(e){let t=!1;return function(...n){t||(t=!0,e.call(this,...n))}}function S(e){return null==e?"":e}function P(e,t,n=t){return e.set(n),t}const I=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function C(e){return e&&u(e.destroy)?e.destroy:r}const T="undefined"!=typeof window;let A=T?()=>window.performance.now():()=>Date.now(),q=T?e=>requestAnimationFrame(e):r;function R(e){A=e}function z(e){q=e}const E=new Set;function B(e){E.forEach(t=>{t.c(e)||(E.delete(t),t.f())}),0!==E.size&&q(B)}function D(){E.clear()}function L(e){let t;return 0===E.size&&q(B),{promise:new Promise(n=>{E.add(t={c:e,f:n})}),abort(){E.delete(t)}}}function N(e,t){e.appendChild(t)}function F(e,t,n){e.insertBefore(t,n||null)}function M(e){e.parentNode.removeChild(e)}function U(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function V(e){return document.createElement(e)}function H(e,t){return document.createElement(e,{is:t})}function W(e,t){const n={};for(const r in e)I(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}function Z(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function K(e){return document.createTextNode(e)}function X(){return K(" ")}function J(){return K("")}function Q(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function Y(e){return function(t){return t.preventDefault(),e.call(this,t)}}function G(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function ee(e){return function(t){t.target===this&&e.call(this,t)}}function te(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ne(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)null==t[r]?e.removeAttribute(r):"style"===r?e.style.cssText=t[r]:"__value"===r?e.value=e[r]=t[r]:n[r]&&n[r].set?e[r]=t[r]:te(e,r,t[r])}function re(e,t){for(const n in t)te(e,n,t[n])}function ae(e,t,n){t in e?e[t]=n:te(e,t,n)}function oe(e,t,n){e.setAttributeNS("http://www.w3.org/1999/xlink",t,n)}function ce(e,t,n){const r=new Set;for(let t=0;t<e.length;t+=1)e[t].checked&&r.add(e[t].__value);return n||r.delete(t),Array.from(r)}function ie(e){return""===e?null:+e}function se(e){const t=[];for(let n=0;n<e.length;n+=1)t.push({start:e.start(n),end:e.end(n)});return t}function le(e){return Array.from(e.childNodes)}function de(e,t,n,r){for(let r=0;r<e.length;r+=1){const a=e[r];if(a.nodeName===t){let t=0;const o=[];for(;t<a.attributes.length;){const e=a.attributes[t++];n[e.name]||o.push(e.name)}for(let e=0;e<o.length;e++)a.removeAttribute(o[e]);return e.splice(r,1)[0]}}return r?Z(t):V(t)}function ue(e,t){for(let n=0;n<e.length;n+=1){const r=e[n];if(3===r.nodeType)return r.data=""+t,e.splice(n,1)[0]}return K(t)}function be(e){return ue(e," ")}function pe(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function fe(e,t){e.value=null==t?"":t}function Oe(e,t){try{e.type=t}catch(e){}}function je(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}function me(e,t){for(let n=0;n<e.options.length;n+=1){const r=e.options[n];if(r.__value===t)return void(r.selected=!0)}}function ge(e,t){for(let n=0;n<e.options.length;n+=1){const r=e.options[n];r.selected=~t.indexOf(r.__value)}}function he(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}function ye(e){return[].map.call(e.querySelectorAll(":checked"),e=>e.__value)}let ve;function _e(){if(void 0===ve){ve=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(e){ve=!0}}return ve}function we(e,t){const n=getComputedStyle(e),r=(parseInt(n.zIndex)||0)-1;"static"===n.position&&(e.style.position="relative");const a=V("iframe");a.setAttribute("style",`display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${r};`),a.setAttribute("aria-hidden","true"),a.tabIndex=-1;const o=_e();let c;return o?(a.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",c=Q(window,"message",e=>{e.source===a.contentWindow&&t()})):(a.src="about:blank",a.onload=()=>{c=Q(a.contentWindow,"resize",t)}),N(e,a),()=>{(o||c&&a.contentWindow)&&c(),M(a)}}function ke(e,t,n){e.classList[n?"add":"remove"](t)}function $e(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}function xe(e,t=document.body){return Array.from(t.querySelectorAll(e))}class Se{constructor(e=null){this.a=e,this.e=this.n=null}m(e,t,n=null){this.e||(this.e=V(t.nodeName),this.t=t,this.h(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)F(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(M)}}const Pe=new Set;let Ie,Ce=0;function Te(e,t,n,r,a,o,c,i=0){const s=16.666/r;let l="{\n";for(let e=0;e<=1;e+=s){const r=t+(n-t)*o(e);l+=100*e+`%{${c(r,1-r)}}\n`}const d=l+`100% {${c(n,1-n)}}\n}`,u=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(d)}_${i}`,b=e.ownerDocument;Pe.add(b);const p=b.__svelte_stylesheet||(b.__svelte_stylesheet=b.head.appendChild(V("style")).sheet),f=b.__svelte_rules||(b.__svelte_rules={});f[u]||(f[u]=!0,p.insertRule(`@keyframes ${u} ${d}`,p.cssRules.length));const O=e.style.animation||"";return e.style.animation=`${O?O+", ":""}${u} ${r}ms linear ${a}ms 1 both`,Ce+=1,u}function Ae(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),a=n.length-r.length;a&&(e.style.animation=r.join(", "),Ce-=a,Ce||q(()=>{Ce||(Pe.forEach(e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}}),Pe.clear())}))}function qe(e,t,n,o){if(!t)return r;const c=e.getBoundingClientRect();if(t.left===c.left&&t.right===c.right&&t.top===c.top&&t.bottom===c.bottom)return r;const{delay:i=0,duration:s=300,easing:l=a,start:d=A()+i,end:u=d+s,tick:b=r,css:p}=n(e,{from:t,to:c},o);let f,O=!0,j=!1;function m(){p&&Ae(e,f),O=!1}return L(e=>{if(!j&&e>=d&&(j=!0),j&&e>=u&&(b(1,0),m()),!O)return!1;if(j){const t=0+1*l((e-d)/s);b(t,1-t)}return!0}),p&&(f=Te(e,0,1,s,i,l,p)),i||(j=!0),b(0,1),m}function Re(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:r}=t,a=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,ze(e,a)}}function ze(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),a="none"===r.transform?"":r.transform;e.style.transform=`${a} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}function Ee(e){Ie=e}function Be(){if(!Ie)throw new Error("Function called outside component initialization");return Ie}function De(e){Be().$$.before_update.push(e)}function Le(e){Be().$$.on_mount.push(e)}function Ne(e){Be().$$.after_update.push(e)}function Fe(e){Be().$$.on_destroy.push(e)}function Me(){const e=Be();return(t,n)=>{const r=e.$$.callbacks[t];if(r){const a=$e(t,n);r.slice().forEach(t=>{t.call(e,a)})}}}function Ue(e,t){Be().$$.context.set(e,t)}function Ve(e){return Be().$$.context.get(e)}function He(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(e=>e(t))}const We=[],Ze={enabled:!1},Ke=[],Xe=[],Je=[],Qe=Promise.resolve();let Ye=!1;function Ge(){Ye||(Ye=!0,Qe.then(ot))}function et(){return Ge(),Qe}function tt(e){Xe.push(e)}function nt(e){Je.push(e)}let rt=!1;const at=new Set;function ot(){if(!rt){rt=!0;do{for(let e=0;e<We.length;e+=1){const t=We[e];Ee(t),ct(t.$$)}for(Ee(null),We.length=0;Ke.length;)Ke.pop()();for(let e=0;e<Xe.length;e+=1){const t=Xe[e];at.has(t)||(at.add(t),t())}Xe.length=0}while(We.length);for(;Je.length;)Je.pop()();Ye=!1,rt=!1,at.clear()}}function ct(e){if(null!==e.fragment){e.update(),d(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(tt)}}let it;function st(){return it||(it=Promise.resolve(),it.then(()=>{it=null})),it}function lt(e,t,n){e.dispatchEvent($e(`${t?"intro":"outro"}${n}`))}const dt=new Set;let ut;function bt(){ut={r:0,c:[],p:ut}}function pt(){ut.r||d(ut.c),ut=ut.p}function ft(e,t){e&&e.i&&(dt.delete(e),e.i(t))}function Ot(e,t,n,r){if(e&&e.o){if(dt.has(e))return;dt.add(e),ut.c.push(()=>{dt.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}}const jt={duration:0};function mt(e,t,n){let o,c,i=t(e,n),s=!1,l=0;function d(){o&&Ae(e,o)}function b(){const{delay:t=0,duration:n=300,easing:u=a,tick:b=r,css:p}=i||jt;p&&(o=Te(e,0,1,n,t,u,p,l++)),b(0,1);const f=A()+t,O=f+n;c&&c.abort(),s=!0,tt(()=>lt(e,!0,"start")),c=L(t=>{if(s){if(t>=O)return b(1,0),lt(e,!0,"end"),d(),s=!1;if(t>=f){const e=u((t-f)/n);b(e,1-e)}}return s})}let p=!1;return{start(){p||(Ae(e),u(i)?(i=i(),st().then(b)):b())},invalidate(){p=!1},end(){s&&(d(),s=!1)}}}function gt(e,t,n){let o,c=t(e,n),i=!0;const s=ut;function l(){const{delay:t=0,duration:n=300,easing:l=a,tick:u=r,css:b}=c||jt;b&&(o=Te(e,1,0,n,t,l,b));const p=A()+t,f=p+n;tt(()=>lt(e,!1,"start")),L(t=>{if(i){if(t>=f)return u(0,1),lt(e,!1,"end"),--s.r||d(s.c),!1;if(t>=p){const e=l((t-p)/n);u(1-e,e)}}return i})}return s.r+=1,u(c)?st().then(()=>{c=c(),l()}):l(),{end(t){t&&c.tick&&c.tick(1,0),i&&(o&&Ae(e,o),i=!1)}}}function ht(e,t,n,o){let c=t(e,n),i=o?0:1,s=null,l=null,b=null;function p(){b&&Ae(e,b)}function f(e,t){const n=e.b-i;return t*=Math.abs(n),{a:i,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function O(t){const{delay:n=0,duration:o=300,easing:u=a,tick:O=r,css:j}=c||jt,m={start:A()+n,b:t};t||(m.group=ut,ut.r+=1),s||l?l=m:(j&&(p(),b=Te(e,i,t,o,n,u,j)),t&&O(0,1),s=f(m,o),tt(()=>lt(e,t,"start")),L(t=>{if(l&&t>l.start&&(s=f(l,o),l=null,lt(e,s.b,"start"),j&&(p(),b=Te(e,i,s.b,s.duration,0,u,c.css))),s)if(t>=s.end)O(i=s.b,1-i),lt(e,s.b,"end"),l||(s.b?p():--s.group.r||d(s.group.c)),s=null;else if(t>=s.start){const e=t-s.start;i=s.a+s.d*u(e/s.duration),O(i,1-i)}return!(!s&&!l)}))}return{run(e){u(c)?st().then(()=>{c=c(),O(e)}):O(e)},end(){p(),s=l=null}}}function yt(e,t){const n=t.token={};function r(e,r,a,o){if(t.token!==n)return;t.resolved=o;let c=t.ctx;void 0!==a&&(c=c.slice(),c[a]=o);const i=e&&(t.current=e)(c);let s=!1;t.block&&(t.blocks?t.blocks.forEach((e,n)=>{n!==r&&e&&(bt(),Ot(e,1,1,()=>{t.blocks[n]=null}),pt())}):t.block.d(1),i.c(),ft(i,1),i.m(t.mount(),t.anchor),s=!0),t.block=i,t.blocks&&(t.blocks[r]=i),s&&ot()}if(c(e)){const n=Be();if(e.then(e=>{Ee(n),r(t.then,1,t.value,e),Ee(null)},e=>{if(Ee(n),r(t.catch,2,t.error,e),Ee(null),!t.hasCatch)throw e}),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}}const vt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function _t(e,t){e.d(1),t.delete(e.key)}function wt(e,t){Ot(e,1,1,()=>{t.delete(e.key)})}function kt(e,t){e.f(),_t(e,t)}function $t(e,t){e.f(),wt(e,t)}function xt(e,t,n,r,a,o,c,i,s,l,d,u){let b=e.length,p=o.length,f=b;const O={};for(;f--;)O[e[f].key]=f;const j=[],m=new Map,g=new Map;for(f=p;f--;){const e=u(a,o,f),i=n(e);let s=c.get(i);s?r&&s.p(e,t):(s=l(i,e),s.c()),m.set(i,j[f]=s),i in O&&g.set(i,Math.abs(f-O[i]))}const h=new Set,y=new Set;function v(e){ft(e,1),e.m(i,d),c.set(e.key,e),d=e.first,p--}for(;b&&p;){const t=j[p-1],n=e[b-1],r=t.key,a=n.key;t===n?(d=t.first,b--,p--):m.has(a)?!c.has(r)||h.has(r)?v(t):y.has(a)?b--:g.get(r)>g.get(a)?(y.add(r),v(t)):(h.add(a),b--):(s(n,c),b--)}for(;b--;){const t=e[b];m.has(t.key)||s(t,c)}for(;p;)v(j[p-1]);return j}function St(e,t,n,r){const a=new Set;for(let o=0;o<t.length;o++){const c=r(n(e,t,o));if(a.has(c))throw new Error("Cannot have duplicate keys in a keyed each");a.add(c)}}function Pt(e,t){const n={},r={},a={$$scope:1};let o=e.length;for(;o--;){const c=e[o],i=t[o];if(i){for(const e in c)e in i||(r[e]=1);for(const e in i)a[e]||(n[e]=i[e],a[e]=1);e[o]=i}else for(const e in c)a[e]=1}for(const e in r)e in n||(n[e]=void 0);return n}function It(e){return"object"==typeof e&&null!==e?e:{}}const Ct=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),Tt=/[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;function At(e,t){const n=Object.assign({},...e);t&&(null==n.class?n.class=t:n.class+=" "+t);let r="";return Object.keys(n).forEach(e=>{if(Tt.test(e))return;const t=n[e];!0===t?r+=" "+e:Ct.has(e.toLowerCase())?t&&(r+=" "+e):null!=t&&(r+=` ${e}="${String(t).replace(/"/g,"&#34;").replace(/'/g,"&#39;")}"`)}),r}const qt={'"':"&quot;","'":"&#39;","&":"&amp;","<":"&lt;",">":"&gt;"};function Rt(e){return String(e).replace(/["'&<>]/g,e=>qt[e])}function zt(e,t){let n="";for(let r=0;r<e.length;r+=1)n+=t(e[r],r);return n}const Et={$$render:()=>""};function Bt(e,t){if(!e||!e.$$render)throw"svelte:component"===t&&(t+=" this={...}"),new Error(`<${t}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);return e}function Dt(e,t,n,r){return console.log(`{@debug} ${e?e+" ":""}(${t}:${n})`),console.log(r),""}let Lt,Nt;function Ft(e){function t(t,n,r,a){const o=Ie;Ee({$$:{on_destroy:Lt,context:new Map(o?o.$$.context:[]),on_mount:[],before_update:[],after_update:[],callbacks:l()}});const c=e(t,n,r,a);return Ee(o),c}return{render:(e={},n={})=>{Lt=[];const r={title:"",head:"",css:new Set},a=t(r,e,{},n);return d(Lt),{html:a,css:{code:Array.from(r.css).map(e=>e.code).join("\n"),map:null},head:r.title+r.head}},$$render:t}}function Mt(e,t,n){return null==t||n&&!t?"":` ${e}${!0===t?"":"="+("string"==typeof t?JSON.stringify(Rt(t)):`"${t}"`)}`}function Ut(e){return e?` class="${e}"`:""}function Vt(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Ht(e){e&&e.c()}function Wt(e,t){e&&e.l(t)}function Zt(e,t,n){const{fragment:r,on_mount:a,on_destroy:o,after_update:c}=e.$$;r&&r.m(t,n),tt(()=>{const t=a.map(s).filter(u);o?o.push(...t):d(t),e.$$.on_mount=[]}),c.forEach(tt)}function Kt(e,t){const n=e.$$;null!==n.fragment&&(d(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Xt(e,t,n,a,o,c,i=[-1]){const s=Ie;Ee(e);const u=t.props||{},b=e.$$={fragment:null,ctx:null,props:c,update:r,not_equal:o,bound:l(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:[]),callbacks:l(),dirty:i,skip_bound:!1};let p=!1;if(b.ctx=n?n(e,u,(t,n,...r)=>{const a=r.length?r[0]:n;return b.ctx&&o(b.ctx[t],b.ctx[t]=a)&&(!b.skip_bound&&b.bound[t]&&b.bound[t](a),p&&function(e,t){-1===e.$$.dirty[0]&&(We.push(e),Ge(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n}):[],b.update(),p=!0,d(b.before_update),b.fragment=!!a&&a(b.ctx),t.target){if(t.hydrate){const e=le(t.target);b.fragment&&b.fragment.l(e),e.forEach(M)}else b.fragment&&b.fragment.c();t.intro&&ft(e.$$.fragment),Zt(e,t.target,t.anchor),ot()}Ee(s)}"function"==typeof HTMLElement&&(Nt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}$destroy(){Kt(this,1),this.$destroy=r}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!f(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class Jt{$destroy(){Kt(this,1),this.$destroy=r}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!f(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Qt(e,t){document.dispatchEvent($e(e,Object.assign({version:"3.29.4"},t)))}function Yt(e,t){Qt("SvelteDOMInsert",{target:e,node:t}),N(e,t)}function Gt(e,t,n){Qt("SvelteDOMInsert",{target:e,node:t,anchor:n}),F(e,t,n)}function en(e){Qt("SvelteDOMRemove",{node:e}),M(e)}function tn(e,t){for(;e.nextSibling&&e.nextSibling!==t;)en(e.nextSibling)}function nn(e){for(;e.previousSibling;)en(e.previousSibling)}function rn(e){for(;e.nextSibling;)en(e.nextSibling)}function an(e,t,n,r,a,o){const c=!0===r?["capture"]:r?Array.from(Object.keys(r)):[];a&&c.push("preventDefault"),o&&c.push("stopPropagation"),Qt("SvelteDOMAddEventListener",{node:e,event:t,handler:n,modifiers:c});const i=Q(e,t,n,r);return()=>{Qt("SvelteDOMRemoveEventListener",{node:e,event:t,handler:n,modifiers:c}),i()}}function on(e,t,n){te(e,t,n),null==n?Qt("SvelteDOMRemoveAttribute",{node:e,attribute:t}):Qt("SvelteDOMSetAttribute",{node:e,attribute:t,value:n})}function cn(e,t,n){e[t]=n,Qt("SvelteDOMSetProperty",{node:e,property:t,value:n})}function sn(e,t,n){e.dataset[t]=n,Qt("SvelteDOMSetDataset",{node:e,property:t,value:n})}function ln(e,t){t=""+t,e.wholeText!==t&&(Qt("SvelteDOMSetData",{node:e,data:t}),e.data=t)}function dn(e){if(!("string"==typeof e||e&&"object"==typeof e&&"length"in e)){let t="{#each} only iterates over array-like objects.";throw"function"==typeof Symbol&&e&&Symbol.iterator in e&&(t+=" You can use a spread to convert this iterable into an array."),new Error(t)}}function un(e,t,n){for(const r of Object.keys(t))~n.indexOf(r)||console.warn(`<${e}> received an unexpected slot "${r}".`)}class bn extends Jt{constructor(e){if(!e||!e.target&&!e.$$inline)throw new Error("'target' is a required option");super()}$destroy(){super.$destroy(),this.$destroy=()=>{console.warn("Component was already destroyed")}}$capture_state(){}$inject_state(){}}function pn(e){const t=Date.now();return()=>{if(Date.now()-t>e)throw new Error("Infinite loop detected")}}},function(e,t,n){"use strict";n.r(t),n.d(t,"NumberParser",(function(){return r}));class r{constructor(e){var t=new Intl.NumberFormat(e).formatToParts(1234567.89),n=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),r=new Map(n.map((e,t)=>[e,t])),a=t.find(e=>"group"===e.type).value;a=a.length&&1===a.length&&160===a.charCodeAt(0)?"("+a+"| )":"[".concat(a,"]"),this._group=new RegExp(a,"g"),this._decimal=new RegExp("[".concat(t.find(e=>"decimal"===e.type).value,"]")),this._numeral=new RegExp("[".concat(n.join(""),"]"),"g"),this._index=e=>r.get(e)}parse(e){return(e=e.trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e:NaN}}},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(59),c=n(61),i=n(66),s=n(67),l=n(36),d=n(46),u=n(22),b=n(13),p=n(9),f=n(7),O=n(68),j=n(39),m=n(15),g=n(35),h=n(50),y=n(64),v=n(70),_=n(78),w=n(90),k=n(91),$=n(131),x=n(132),S=n(134),P=n(6),I=n(135),C=n(40),T=n(1),A=n(8),q=n(136),R=n(23);function z(e,t,n){const r=e.slice();return r[92]=t[n],r}function E(e,t,n){const r=e.slice();return r[101]=t[n],r}function B(e,t,n){const r=e.slice();return r[104]=t[n],r}function D(e,t,n){const r=e.slice();return r[107]=t[n],r}function L(e,t,n){const r=e.slice();return r[104]=t[n],r}function N(e,t,n){const r=e.slice();return r[107]=t[n],r}function F(e,t,n){const r=e.slice();return r[92]=t[n],r}function M(e){let t,n,a,o;function c(t){e[49].call(null,t)}let i={items:e[29].periods,right:!0};return void 0!==e[30].selectedPeriod&&(i.value=e[30].selectedPeriod),n=new s.default({props:i}),r.binding_callbacks.push(()=>Object(r.bind)(n,"value",c)),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","period svelte-1pb1u1r")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,t){const o={};536870912&t[0]&&(o.items=e[29].periods),!a&&1073741824&t[0]&&(a=!0,o.value=e[30].selectedPeriod,Object(r.add_flush_callback)(()=>a=!1)),n.$set(o)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function U(e){let t,n=(e[14]&&e[14].length?Object(R.getPlayerName)(e[5],e[14][0].rank-1):e[5])+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){16416&a[0]&&n!==(n=(e[14]&&e[14].length?Object(R.getPlayerName)(e[5],e[14][0].rank-1):e[5])+"")&&Object(r.set_data)(t,n)},d(e){e&&Object(r.detach)(t)}}}function V(e){let t,n,a=(e[14]&&e[14].length?Object(R.getPlayerName)(e[5],e[14][0].rank-1):e[5])+"";return{c(){t=Object(r.element)("a"),n=Object(r.text)(a),Object(r.attr)(t,"href",e[6]),Object(r.attr)(t,"class","svelte-1pb1u1r")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,o){16416&o[0]&&a!==(a=(e[14]&&e[14].length?Object(R.getPlayerName)(e[5],e[14][0].rank-1):e[5])+"")&&Object(r.set_data)(n,a),64&o[0]&&Object(r.attr)(t,"href",e[6])},d(e){e&&Object(r.detach)(t)}}}function H(e){let t,n,a,o,c=e[92].subRank+"";return{c(){t=Object(r.element)("small"),n=Object(r.text)("(#"),a=Object(r.text)(c),o=Object(r.text)(")"),Object(r.attr)(t,"class","svelte-1pb1u1r")},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o)},p(e,t){16384&t[0]&&c!==(c=e[92].subRank+"")&&Object(r.set_data)(a,c)},d(e){e&&Object(r.detach)(t)}}}function W(e){let t,n,a,o,c,i,s,l,d,u,b,p;c=new y.default({props:{value:e[92].rank,prevValue:e[92].prevRank,prevLabel:e[92].prevRankSince,prefix:"#",digits:0,zero:"#0",inline:!0,reversePrevSign:!0}});let f=e[92].subRank&&e[92].subRank!==e[92].rank&&H(e);return{c(){t=Object(r.element)("a"),n=Object(r.element)("img"),o=Object(r.space)(),Object(r.create_component)(c.$$.fragment),i=Object(r.space)(),f&&f.c(),s=Object(r.space)(),n.src!==(a="/imports/images/flags/"+e[92].country+".png")&&Object(r.attr)(n,"src",a),Object(r.attr)(n,"class","svelte-1pb1u1r"),Object(r.attr)(t,"href",l=e[92].rank?"/global/"+(Math.floor((e[92].rank-1)/j.PLAYERS_PER_PAGE)+1)+"?country="+e[92].country:"#"),Object(r.attr)(t,"data-type",d=e[92].type),Object(r.attr)(t,"data-rank",u=e[92].rank),Object(r.attr)(t,"data-country",b=e[92].country),Object(r.attr)(t,"class","svelte-1pb1u1r")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.append)(t,o),Object(r.mount_component)(c,t,null),Object(r.append)(t,i),f&&f.m(t,null),Object(r.append)(t,s),p=!0},p(e,o){(!p||16384&o[0]&&n.src!==(a="/imports/images/flags/"+e[92].country+".png"))&&Object(r.attr)(n,"src",a);const i={};16384&o[0]&&(i.value=e[92].rank),16384&o[0]&&(i.prevValue=e[92].prevRank),16384&o[0]&&(i.prevLabel=e[92].prevRankSince),c.$set(i),e[92].subRank&&e[92].subRank!==e[92].rank?f?f.p(e,o):(f=H(e),f.c(),f.m(t,s)):f&&(f.d(1),f=null),(!p||16384&o[0]&&l!==(l=e[92].rank?"/global/"+(Math.floor((e[92].rank-1)/j.PLAYERS_PER_PAGE)+1)+"?country="+e[92].country:"#"))&&Object(r.attr)(t,"href",l),(!p||16384&o[0]&&d!==(d=e[92].type))&&Object(r.attr)(t,"data-type",d),(!p||16384&o[0]&&u!==(u=e[92].rank))&&Object(r.attr)(t,"data-rank",u),(!p||16384&o[0]&&b!==(b=e[92].country))&&Object(r.attr)(t,"data-country",b)},i(e){p||(Object(r.transition_in)(c.$$.fragment,e),p=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),p=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c),f&&f.d()}}}function Z(e){let t,n,a,c,i=e[10],s=[];for(let t=0;t<i.length;t+=1)s[t]=K(N(e,i,t));return{c(){t=Object(r.element)("div"),n=Object(r.element)("div");for(let e=0;e<s.length;e+=1)s[e].c();Object(r.attr)(n,"class","badges ss-badges svelte-1pb1u1r"),Object(r.attr)(t,"class","column svelte-1pb1u1r")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n);for(let e=0;e<s.length;e+=1)s[e].m(n,null);c=!0},p(e,t){if(1024&t[0]){let r;for(i=e[10],r=0;r<i.length;r+=1){const a=N(e,i,r);s[r]?s[r].p(a,t):(s[r]=K(a),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},i(e){c||(Object(r.add_render_callback)(()=>{a||(a=Object(r.create_bidirectional_transition)(n,o.fade,{duration:2e3},!0)),a.run(1)}),c=!0)},o(e){a||(a=Object(r.create_bidirectional_transition)(n,o.fade,{duration:2e3},!1)),a.run(0),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(s,e),e&&a&&a.end()}}}function K(e){let t,n,a,o;return{c(){t=Object(r.element)("img"),t.src!==(n=e[107].src)&&Object(r.attr)(t,"src",n),Object(r.attr)(t,"alt",a=e[107].title),Object(r.attr)(t,"title",o=e[107].title),Object(r.attr)(t,"class","svelte-1pb1u1r")},m(e,n){Object(r.insert)(e,t,n)},p(e,c){1024&c[0]&&t.src!==(n=e[107].src)&&Object(r.attr)(t,"src",n),1024&c[0]&&a!==(a=e[107].title)&&Object(r.attr)(t,"alt",a),1024&c[0]&&o!==(o=e[107].title)&&Object(r.attr)(t,"title",o)},d(e){e&&Object(r.detach)(t)}}}function X(e){let t,n;const a=[e[104]];let o={};for(let e=0;e<a.length;e+=1)o=Object(r.assign)(o,a[e]);return t=new i.default({props:o}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const o=256&n[1]?Object(r.get_spread_update)(a,[Object(r.get_spread_object)(e[104])]):{};t.$set(o)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function J(e){let t,n;return t=new c.default({props:{scores:e[37],playerId:e[12].id}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};64&n[1]&&(r.scores=e[37]),4096&n[0]&&(r.playerId=e[12].id),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function Q(e){let t,n=e[10],a=[];for(let t=0;t<n.length;t+=1)a[t]=Y(D(e,n,t));return{c(){t=Object(r.element)("div");for(let e=0;e<a.length;e+=1)a[e].c();Object(r.attr)(t,"class","badges ss-badges svelte-1pb1u1r")},m(e,n){Object(r.insert)(e,t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null)},p(e,r){if(1024&r[0]){let o;for(n=e[10],o=0;o<n.length;o+=1){const c=D(e,n,o);a[o]?a[o].p(c,r):(a[o]=Y(c),a[o].c(),a[o].m(t,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=n.length}},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(a,e)}}}function Y(e){let t,n,a,o;return{c(){t=Object(r.element)("img"),t.src!==(n=e[107].src)&&Object(r.attr)(t,"src",n),Object(r.attr)(t,"alt",a=e[107].title),Object(r.attr)(t,"title",o=e[107].title),Object(r.attr)(t,"class","svelte-1pb1u1r")},m(e,n){Object(r.insert)(e,t,n)},p(e,c){1024&c[0]&&t.src!==(n=e[107].src)&&Object(r.attr)(t,"src",n),1024&c[0]&&a!==(a=e[107].title)&&Object(r.attr)(t,"alt",a),1024&c[0]&&o!==(o=e[107].title)&&Object(r.attr)(t,"title",o)},d(e){e&&Object(r.detach)(t)}}}function G(e){let t,n,a,o,c=e[40]&&ee(e),i=e[32]&&e[32].badges&&ae(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),c&&c.c(),a=Object(r.space)(),i&&i.c(),Object(r.attr)(n,"class","svelte-1pb1u1r"),Object(r.toggle_class)(n,"flex-column-between","text"===e[3]),Object(r.attr)(t,"class","column")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),c&&c.m(n,null),Object(r.append)(n,a),i&&i.m(n,null),o=!0},p(e,t){e[40]?c?(c.p(e,t),512&t[1]&&Object(r.transition_in)(c,1)):(c=ee(e),c.c(),Object(r.transition_in)(c,1),c.m(n,a)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)()),e[32]&&e[32].badges?i?(i.p(e,t),2&t[1]&&Object(r.transition_in)(i,1)):(i=ae(e),i.c(),Object(r.transition_in)(i,1),i.m(n,null)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)()),8&t[0]&&Object(r.toggle_class)(n,"flex-column-between","text"===e[3])},i(e){o||(Object(r.transition_in)(c),Object(r.transition_in)(i),o=!0)},o(e){Object(r.transition_out)(c),Object(r.transition_out)(i),o=!1},d(e){e&&Object(r.detach)(t),c&&c.d(),i&&i.d()}}}function ee(e){let t,n,a,o,c=e[40],i=[];for(let t=0;t<c.length;t+=1)i[t]=te(B(e,c,t));const s=e=>Object(r.transition_out)(i[e],1,1,()=>{i[e]=null});let l=e[38]&&ne(e);return{c(){t=Object(r.element)("div");for(let e=0;e<i.length;e+=1)i[e].c();n=Object(r.space)(),l&&l.c(),Object(r.attr)(t,"class",a=Object(r.null_to_empty)("badges right "+e[3])+" svelte-1pb1u1r")},m(e,a){Object(r.insert)(e,t,a);for(let e=0;e<i.length;e+=1)i[e].m(t,null);Object(r.append)(t,n),l&&l.m(t,null),o=!0},p(e,d){if(512&d[1]){let a;for(c=e[40],a=0;a<c.length;a+=1){const o=B(e,c,a);i[a]?(i[a].p(o,d),Object(r.transition_in)(i[a],1)):(i[a]=te(o),i[a].c(),Object(r.transition_in)(i[a],1),i[a].m(t,n))}for(Object(r.group_outros)(),a=c.length;a<i.length;a+=1)s(a);Object(r.check_outros)()}e[38]?l?(l.p(e,d),128&d[1]&&Object(r.transition_in)(l,1)):(l=ne(e),l.c(),Object(r.transition_in)(l,1),l.m(t,null)):l&&(Object(r.group_outros)(),Object(r.transition_out)(l,1,1,()=>{l=null}),Object(r.check_outros)()),(!o||8&d[0]&&a!==(a=Object(r.null_to_empty)("badges right "+e[3])+" svelte-1pb1u1r"))&&Object(r.attr)(t,"class",a)},i(e){if(!o){for(let e=0;e<c.length;e+=1)Object(r.transition_in)(i[e]);Object(r.transition_in)(l),o=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)Object(r.transition_out)(i[e]);Object(r.transition_out)(l),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(i,e),l&&l.d()}}}function te(e){let t,n;const a=[e[104]];let o={};for(let e=0;e<a.length;e+=1)o=Object(r.assign)(o,a[e]);return t=new i.default({props:o}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const o=512&n[1]?Object(r.get_spread_update)(a,[Object(r.get_spread_object)(e[104])]):{};t.$set(o)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function ne(e){let t,n;return t=new i.default({props:{styling:e[3],label:e[36].profile.stats.countryRank,bgColor:"var(--dimmed)",fluid:!0,$$slots:{value:[re]},$$scope:{ctx:e}}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};8&n[0]&&(r.styling=e[3]),32&n[1]&&(r.label=e[36].profile.stats.countryRank),160&n[1]|8388608&n[3]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function re(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O,j=e[36].profile.stats.best+"",m=e[36].profile.stats.avg+"";return c=new y.default({props:{value:e[38].bestRank,digits:0,prefix:"#",zero:"-"}}),s=new y.default({props:{value:e[38].bestRankCnt,digits:0,zero:"-"}}),f=new y.default({props:{value:e[38].avgRank,digits:2,prefix:"#",zero:"-"}}),{c(){t=Object(r.element)("span"),n=Object(r.element)("div"),a=Object(r.text)(j),o=Object(r.text)(": "),Object(r.create_component)(c.$$.fragment),i=Object(r.text)(" ("),Object(r.create_component)(s.$$.fragment),l=Object(r.text)(")"),d=Object(r.space)(),u=Object(r.element)("div"),b=Object(r.text)(m),p=Object(r.text)(": "),Object(r.create_component)(f.$$.fragment),Object(r.attr)(n,"class","svelte-1pb1u1r"),Object(r.attr)(u,"class","svelte-1pb1u1r"),Object(r.attr)(t,"class","sspl-ranks svelte-1pb1u1r"),Object(r.attr)(t,"slot","value")},m(e,j){Object(r.insert)(e,t,j),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(n,o),Object(r.mount_component)(c,n,null),Object(r.append)(n,i),Object(r.mount_component)(s,n,null),Object(r.append)(n,l),Object(r.append)(t,d),Object(r.append)(t,u),Object(r.append)(u,b),Object(r.append)(u,p),Object(r.mount_component)(f,u,null),O=!0},p(e,t){(!O||32&t[1])&&j!==(j=e[36].profile.stats.best+"")&&Object(r.set_data)(a,j);const n={};128&t[1]&&(n.value=e[38].bestRank),c.$set(n);const o={};128&t[1]&&(o.value=e[38].bestRankCnt),s.$set(o),(!O||32&t[1])&&m!==(m=e[36].profile.stats.avg+"")&&Object(r.set_data)(b,m);const i={};128&t[1]&&(i.value=e[38].avgRank),f.$set(i)},i(e){O||(Object(r.transition_in)(c.$$.fragment,e),Object(r.transition_in)(s.$$.fragment,e),Object(r.transition_in)(f.$$.fragment,e),O=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),Object(r.transition_out)(s.$$.fragment,e),Object(r.transition_out)(f.$$.fragment,e),O=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c),Object(r.destroy_component)(s),Object(r.destroy_component)(f)}}}function ae(e){let t,n,a=[],o=new Map,c=e[32].badges;const i=e=>e[101].name;for(let t=0;t<c.length;t+=1){let n=E(e,c,t),r=i(n);o.set(r,a[t]=oe(r,n))}return{c(){t=Object(r.element)("div");for(let e=0;e<a.length;e+=1)a[e].c();Object(r.attr)(t,"class","badges std right")},m(e,o){Object(r.insert)(e,t,o);for(let e=0;e<a.length;e+=1)a[e].m(t,null);n=!0},p(e,n){if(67108864&n[0]|16386&n[1]){const c=e[32].badges;Object(r.group_outros)(),a=Object(r.update_keyed_each)(a,n,i,1,e,c,o,t,r.outro_and_destroy_block,oe,null,E),Object(r.check_outros)()}},i(e){if(!n){for(let e=0;e<c.length;e+=1)Object(r.transition_in)(a[e]);n=!0}},o(e){for(let e=0;e<a.length;e+=1)Object(r.transition_out)(a[e]);n=!1},d(e){e&&Object(r.detach)(t);for(let e=0;e<a.length;e+=1)a[e].d()}}}function oe(e,t){let n,a,o;return a=new i.default({props:{label:t[101].name,value:t[101].value,title:t[101].title,color:"white",bgColor:t[101].color,digits:0,clickable:!0,notSelected:t[26].length&&!t[26].includes(t[101])}}),a.$on("click",(function(...e){return t[50](t[101],...e)})),{key:e,first:null,c(){n=Object(r.empty)(),Object(r.create_component)(a.$$.fragment),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.mount_component)(a,e,t),o=!0},p(e,n){t=e;const r={};2&n[1]&&(r.label=t[101].name),2&n[1]&&(r.value=t[101].value),2&n[1]&&(r.title=t[101].title),2&n[1]&&(r.bgColor=t[101].color),67108864&n[0]|2&n[1]&&(r.notSelected=t[26].length&&!t[26].includes(t[101])),a.$set(r)},i(e){o||(Object(r.transition_in)(a.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(n),Object(r.destroy_component)(a,e)}}}function ce(e){let t,n,a,o;function c(t){e[51].call(null,t)}let i={profileId:e[0],history:e[9],accFilterFunc:e[41],refreshTag:e[27]};return void 0!==e[24]&&(i.type=e[24]),n=new w.default({props:i}),r.binding_callbacks.push(()=>Object(r.bind)(n,"type",c)),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","chart svelte-1pb1u1r")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,t){const o={};1&t[0]&&(o.profileId=e[0]),512&t[0]&&(o.history=e[9]),134217728&t[0]&&(o.refreshTag=e[27]),!a&&16777216&t[0]&&(a=!0,o.type=e[24],Object(r.add_flush_callback)(()=>a=!1)),n.$set(o)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function ie(e){let t,n,a;function o(t){e[56].call(null,t)}let c={players:e[25],playerId:e[1]&&e[1].playerId?e[1].playerId:null,scores:e[1]&&e[1].scores?e[1].scores:[],pageNum:e[33]+1,totalItems:e[11]&&e[11].playCount?e[11].playCount:0,pauseLoading:!1,playerTwitchProfile:e[21],recentPlay:e[8],$$slots:{default:[le,({songs:e,series:t,totalItems:n,error:r,beforePageChanged:a,isPaused:o})=>({95:e,96:t,97:n,98:r,99:a,100:o}),({songs:e,series:t,totalItems:n,error:r,beforePageChanged:a,isPaused:o})=>[0,0,0,(e?4:0)|(t?8:0)|(n?16:0)|(r?32:0)|(a?64:0)|(o?128:0)]]},$$scope:{ctx:e}};return void 0!==e[34]&&(c.type=e[34]),t=new $.default({props:c}),r.binding_callbacks.push(()=>Object(r.bind)(t,"type",o)),{c(){Object(r.create_component)(t.$$.fragment)},m(e,n){Object(r.mount_component)(t,e,n),a=!0},p(e,a){const o={};33554432&a[0]&&(o.players=e[25]),2&a[0]&&(o.playerId=e[1]&&e[1].playerId?e[1].playerId:null),2&a[0]&&(o.scores=e[1]&&e[1].scores?e[1].scores:[]),4&a[1]&&(o.pageNum=e[33]+1),2048&a[0]&&(o.totalItems=e[11]&&e[11].playCount?e[11].playCount:0),2097152&a[0]&&(o.playerTwitchProfile=e[21]),256&a[0]&&(o.recentPlay=e[8]),34607104&a[0]|28&a[1]|8388860&a[3]&&(o.$$scope={dirty:a,ctx:e}),!n&&8&a[1]&&(n=!0,o.type=e[34],Object(r.add_flush_callback)(()=>n=!1)),t.$set(o)},i(e){a||(Object(r.transition_in)(t.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),a=!1},d(e){Object(r.destroy_component)(t,e)}}}function se(e){let t,n;return t=new k.default({props:{playerId:e[0],recentPlay:e[8],songType:e[28]}}),t.$on("browser-type-changed",e[46]),t.$on("song-type-changed",e[47]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n[0]&&(r.playerId=e[0]),256&n[0]&&(r.recentPlay=e[8]),268435456&n[0]&&(r.songType=e[28]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function le(e){let t,n,a,o,c;function i(t){e[53].call(null,t)}function s(t){e[54].call(null,t)}function l(t){e[55].call(null,t)}let d={songs:e[95],series:e[96],error:e[98],totalItems:e[97],beforePageChanged:e[99],isCached:!!e[20]&&!!e[20].length,isPaused:e[100],cachedRecentPlay:e[12]?e[12].recentPlay:null,maxComparePlayers:e[2]};return void 0!==e[25]&&(d.players=e[25]),void 0!==e[33]&&(d.currentPage=e[33]),void 0!==e[34]&&(d.type=e[34]),t=new x.default({props:d}),e[52](t),r.binding_callbacks.push(()=>Object(r.bind)(t,"players",i)),r.binding_callbacks.push(()=>Object(r.bind)(t,"currentPage",s)),r.binding_callbacks.push(()=>Object(r.bind)(t,"type",l)),t.$on("browse",e[42]),t.$on("transform-profile",e[43]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,n){Object(r.mount_component)(t,e,n),c=!0},p(e,c){const i={};4&c[3]&&(i.songs=e[95]),8&c[3]&&(i.series=e[96]),32&c[3]&&(i.error=e[98]),16&c[3]&&(i.totalItems=e[97]),64&c[3]&&(i.beforePageChanged=e[99]),1048576&c[0]&&(i.isCached=!!e[20]&&!!e[20].length),128&c[3]&&(i.isPaused=e[100]),4096&c[0]&&(i.cachedRecentPlay=e[12]?e[12].recentPlay:null),!n&&33554432&c[0]&&(n=!0,i.players=e[25],Object(r.add_flush_callback)(()=>n=!1)),!a&&4&c[1]&&(a=!0,i.currentPage=e[33],Object(r.add_flush_callback)(()=>a=!1)),!o&&8&c[1]&&(o=!0,i.type=e[34],Object(r.add_flush_callback)(()=>o=!1)),t.$set(i)},i(e){c||(Object(r.transition_in)(t.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),c=!1},d(n){e[52](null),Object(r.destroy_component)(t,n)}}}function de(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O=e[36].profile.aside.globalRanking+"";d=new S.default({props:{country:null,type:"global",rank:e[13],playerId:e[0],playerPp:e[15],numOfItems:5}});let m=e[14],g=[];for(let t=0;t<m.length;t+=1)g[t]=ue(z(e,m,t));const h=e=>Object(r.transition_out)(g[e],1,1,()=>{g[e]=null});return p=new q.default({props:{playerScores:e[20]}}),p.$on("show-full",e[44]),{c(){t=Object(r.element)("div"),n=Object(r.element)("header"),a=Object(r.element)("i"),o=Object(r.space)(),c=Object(r.element)("a"),i=Object(r.text)(O),l=Object(r.space)(),Object(r.create_component)(d.$$.fragment),u=Object(r.space)();for(let e=0;e<g.length;e+=1)g[e].c();b=Object(r.space)(),Object(r.create_component)(p.$$.fragment),Object(r.attr)(a,"class","fas fa-globe-americas svelte-1pb1u1r"),Object(r.attr)(c,"href",s=e[13]?"/global/"+(Math.floor((e[13]-1)/j.PLAYERS_PER_PAGE)+1):"#"),Object(r.attr)(c,"class","svelte-1pb1u1r"),Object(r.attr)(n,"class","svelte-1pb1u1r"),Object(r.attr)(t,"class","box has-shadow ranking svelte-1pb1u1r")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(n,o),Object(r.append)(n,c),Object(r.append)(c,i),Object(r.append)(t,l),Object(r.mount_component)(d,t,null),Object(r.insert)(e,u,s);for(let t=0;t<g.length;t+=1)g[t].m(e,s);Object(r.insert)(e,b,s),Object(r.mount_component)(p,e,s),f=!0},p(e,t){(!f||32&t[1])&&O!==(O=e[36].profile.aside.globalRanking+"")&&Object(r.set_data)(i,O),(!f||8192&t[0]&&s!==(s=e[13]?"/global/"+(Math.floor((e[13]-1)/j.PLAYERS_PER_PAGE)+1):"#"))&&Object(r.attr)(c,"href",s);const n={};if(8192&t[0]&&(n.rank=e[13]),1&t[0]&&(n.playerId=e[0]),32768&t[0]&&(n.playerPp=e[15]),d.$set(n),49153&t[0]|32&t[1]){let n;for(m=e[14],n=0;n<m.length;n+=1){const a=z(e,m,n);g[n]?(g[n].p(a,t),Object(r.transition_in)(g[n],1)):(g[n]=ue(a),g[n].c(),Object(r.transition_in)(g[n],1),g[n].m(b.parentNode,b))}for(Object(r.group_outros)(),n=m.length;n<g.length;n+=1)h(n);Object(r.check_outros)()}const a={};1048576&t[0]&&(a.playerScores=e[20]),p.$set(a)},i(e){if(!f){Object(r.transition_in)(d.$$.fragment,e);for(let e=0;e<m.length;e+=1)Object(r.transition_in)(g[e]);Object(r.transition_in)(p.$$.fragment,e),f=!0}},o(e){Object(r.transition_out)(d.$$.fragment,e),g=g.filter(Boolean);for(let e=0;e<g.length;e+=1)Object(r.transition_out)(g[e]);Object(r.transition_out)(p.$$.fragment,e),f=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(d),e&&Object(r.detach)(u),Object(r.destroy_each)(g,e),e&&Object(r.detach)(b),Object(r.destroy_component)(p,e)}}}function ue(e){let t,n,a,o,c,i,s,l,d,u,b,p=e[36].profile.aside.countryRanking+"";return u=new S.default({props:{country:e[92].country,type:"active-country"===e[92].type?"country":e[92].type,rank:e[92].rank,playerId:e[0],playerPp:e[15],numOfItems:5}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("header"),a=Object(r.element)("img"),c=Object(r.space)(),i=Object(r.element)("a"),s=Object(r.text)(p),d=Object(r.space)(),Object(r.create_component)(u.$$.fragment),a.src!==(o="/imports/images/flags/"+e[92].country+".png")&&Object(r.attr)(a,"src",o),Object(r.attr)(a,"class","svelte-1pb1u1r"),Object(r.attr)(i,"href",l=e[92].rank?"/global/"+(Math.floor((e[92].rank-1)/j.PLAYERS_PER_PAGE)+1)+"?country="+e[92].country:"#"),Object(r.attr)(i,"class","svelte-1pb1u1r"),Object(r.attr)(n,"class","svelte-1pb1u1r"),Object(r.attr)(t,"class","box has-shadow ranking svelte-1pb1u1r")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(n,c),Object(r.append)(n,i),Object(r.append)(i,s),Object(r.append)(t,d),Object(r.mount_component)(u,t,null),b=!0},p(e,t){(!b||16384&t[0]&&a.src!==(o="/imports/images/flags/"+e[92].country+".png"))&&Object(r.attr)(a,"src",o),(!b||32&t[1])&&p!==(p=e[36].profile.aside.countryRanking+"")&&Object(r.set_data)(s,p),(!b||16384&t[0]&&l!==(l=e[92].rank?"/global/"+(Math.floor((e[92].rank-1)/j.PLAYERS_PER_PAGE)+1)+"?country="+e[92].country:"#"))&&Object(r.attr)(i,"href",l);const n={};16384&t[0]&&(n.country=e[92].country),16384&t[0]&&(n.type="active-country"===e[92].type?"country":e[92].type),16384&t[0]&&(n.rank=e[92].rank),1&t[0]&&(n.playerId=e[0]),32768&t[0]&&(n.playerPp=e[15]),u.$set(n)},i(e){b||(Object(r.transition_in)(u.$$.fragment,e),b=!0)},o(e){Object(r.transition_out)(u.$$.fragment,e),b=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(u)}}}function be(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O,m,g,h,w,k,$,x,S,P,C,T,A,q,R,z,E,B,D,N,H,K,Y,ee,te,ne,re,ae,oe,le,ue,be,pe,fe,Oe,je,me,ge,he,ye,ve;o=new _.default({props:{profileId:e[0]}}),s=new v.default({props:{profileId:e[0]}});let _e=e[20]&&e[20].length&&e[40]&&M(e);function we(e,t){return e[6]?V:U}let ke=we(e),$e=ke(e);C=new y.default({props:{value:e[15],suffix:"pp",prevValue:e[16],prevLabel:e[17],inline:!0}}),E=new y.default({props:{value:e[13],prevValue:e[18],prevLabel:e[19],prefix:"#",digits:0,zero:"#0",inline:!0,reversePrevSign:!0}});let xe=e[14],Se=[];for(let t=0;t<xe.length;t+=1)Se[t]=W(F(e,xe,t));const Pe=e=>Object(r.transition_out)(Se[e],1,1,()=>{Se[e]=null});let Ie=e[20]&&e[20].length&&e[10]&&e[10].length&&Z(e),Ce=e[39],Te=[];for(let t=0;t<Ce.length;t+=1)Te[t]=X(L(e,Ce,t));const Ae=e=>Object(r.transition_out)(Te[e],1,1,()=>{Te[e]=null});oe=new I.default({props:{playerTwitchProfile:e[21]}});let qe=e[22]&&e[37]&&e[37].length&&J(e),Re=(!e[20]||!e[20].length)&&e[10]&&e[10].length&&Q(e),ze=e[20]&&e[20].length&&G(e),Ee=e[23]&&ce(e);const Be=[se,ie],De=[];function Le(e,t){return e[4]?0:1}me=Le(e),ge=De[me]=Be[me](e);let Ne=e[31]&&e[13]&&de(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),a=Object(r.element)("div"),Object(r.create_component)(o.$$.fragment),c=Object(r.space)(),i=Object(r.element)("div"),Object(r.create_component)(s.$$.fragment),l=Object(r.space)(),d=Object(r.element)("div"),u=Object(r.element)("main"),b=Object(r.element)("div"),_e&&_e.c(),p=Object(r.space)(),f=Object(r.element)("div"),O=Object(r.element)("div"),m=Object(r.element)("img"),h=Object(r.space)(),w=Object(r.element)("div"),k=Object(r.element)("div"),$=Object(r.element)("div"),x=Object(r.element)("h1"),$e.c(),S=Object(r.space)(),P=Object(r.element)("span"),Object(r.create_component)(C.$$.fragment),T=Object(r.space)(),A=Object(r.element)("h2"),q=Object(r.element)("a"),R=Object(r.element)("i"),z=Object(r.space)(),Object(r.create_component)(E.$$.fragment),D=Object(r.space)();for(let e=0;e<Se.length;e+=1)Se[e].c();N=Object(r.space)(),Ie&&Ie.c(),H=Object(r.space)(),K=Object(r.element)("div"),Y=Object(r.element)("div"),ee=Object(r.element)("div"),te=Object(r.element)("div");for(let e=0;e<Te.length;e+=1)Te[e].c();re=Object(r.space)(),ae=Object(r.element)("div"),Object(r.create_component)(oe.$$.fragment),le=Object(r.space)(),qe&&qe.c(),ue=Object(r.space)(),Re&&Re.c(),be=Object(r.space)(),ze&&ze.c(),pe=Object(r.space)(),Ee&&Ee.c(),fe=Object(r.space)(),Oe=Object(r.element)("div"),je=Object(r.element)("div"),ge.c(),he=Object(r.space)(),ye=Object(r.element)("aside"),Ne&&Ne.c(),Object(r.attr)(a,"class","icons svelte-1pb1u1r"),Object(r.attr)(i,"class","refresh svelte-1pb1u1r"),Object(r.attr)(n,"class","player-top svelte-1pb1u1r"),Object(r.attr)(t,"class","sspl-page-container svelte-1pb1u1r"),m.src!==(g=e[7])&&Object(r.attr)(m,"src",g),Object(r.attr)(m,"class","avatar svelte-1pb1u1r"),Object(r.attr)(O,"class","column is-narrow avatar enlarge svelte-1pb1u1r"),Object(r.attr)(P,"class","pp svelte-1pb1u1r"),Object(r.attr)(x,"class","title is-4 svelte-1pb1u1r"),Object(r.attr)(R,"class","fas fa-globe-americas svelte-1pb1u1r"),Object(r.attr)(q,"href",B=e[13]?"/global/"+(e[13]?Math.floor((e[13]-1)/j.PLAYERS_PER_PAGE)+1:""):"#"),Object(r.attr)(q,"data-type","global"),Object(r.attr)(q,"data-rank",e[13]),Object(r.attr)(q,"class","svelte-1pb1u1r"),Object(r.attr)(A,"class","title is-5 ranks svelte-1pb1u1r"),Object(r.attr)($,"class","column svelte-1pb1u1r"),Object(r.attr)(k,"class","columns player-name svelte-1pb1u1r"),Object(r.attr)(te,"class",ne=Object(r.null_to_empty)("badges "+e[3])+" svelte-1pb1u1r"),Object(r.attr)(ae,"class","badges std"),Object(r.attr)(ee,"class","svelte-1pb1u1r"),Object(r.toggle_class)(ee,"flex-column-between","text"===e[3]),Object(r.attr)(Y,"class","column"),Object(r.attr)(K,"class","columns"),Object(r.attr)(w,"class","column"),Object(r.attr)(f,"class","columns"),Object(r.attr)(b,"class","box has-shadow svelte-1pb1u1r"),Object(r.attr)(je,"class","content"),Object(r.attr)(Oe,"class","box has-shadow svelte-1pb1u1r"),Object(r.attr)(u,"class","svelte-1pb1u1r"),Object(r.attr)(ye,"class","svelte-1pb1u1r"),Object(r.attr)(d,"class","sspl-page-container svelte-1pb1u1r")},m(e,j){Object(r.insert)(e,t,j),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.mount_component)(o,a,null),Object(r.append)(n,c),Object(r.append)(n,i),Object(r.mount_component)(s,i,null),Object(r.insert)(e,l,j),Object(r.insert)(e,d,j),Object(r.append)(d,u),Object(r.append)(u,b),_e&&_e.m(b,null),Object(r.append)(b,p),Object(r.append)(b,f),Object(r.append)(f,O),Object(r.append)(O,m),Object(r.append)(f,h),Object(r.append)(f,w),Object(r.append)(w,k),Object(r.append)(k,$),Object(r.append)($,x),$e.m(x,null),Object(r.append)(x,S),Object(r.append)(x,P),Object(r.mount_component)(C,P,null),Object(r.append)($,T),Object(r.append)($,A),Object(r.append)(A,q),Object(r.append)(q,R),Object(r.append)(q,z),Object(r.mount_component)(E,q,null),Object(r.append)(A,D);for(let e=0;e<Se.length;e+=1)Se[e].m(A,null);Object(r.append)(k,N),Ie&&Ie.m(k,null),Object(r.append)(w,H),Object(r.append)(w,K),Object(r.append)(K,Y),Object(r.append)(Y,ee),Object(r.append)(ee,te);for(let e=0;e<Te.length;e+=1)Te[e].m(te,null);Object(r.append)(ee,re),Object(r.append)(ee,ae),Object(r.mount_component)(oe,ae,null),Object(r.append)(ae,le),qe&&qe.m(ae,null),Object(r.append)(ee,ue),Re&&Re.m(ee,null),Object(r.append)(K,be),ze&&ze.m(K,null),Object(r.append)(b,pe),Ee&&Ee.m(b,null),Object(r.append)(u,fe),Object(r.append)(u,Oe),Object(r.append)(Oe,je),De[me].m(je,null),Object(r.append)(d,he),Object(r.append)(d,ye),Ne&&Ne.m(ye,null),ve=!0},p(e,t){const n={};1&t[0]&&(n.profileId=e[0]),o.$set(n);const a={};1&t[0]&&(a.profileId=e[0]),s.$set(a),e[20]&&e[20].length&&e[40]?_e?(_e.p(e,t),1048576&t[0]|512&t[1]&&Object(r.transition_in)(_e,1)):(_e=M(e),_e.c(),Object(r.transition_in)(_e,1),_e.m(b,p)):_e&&(Object(r.group_outros)(),Object(r.transition_out)(_e,1,1,()=>{_e=null}),Object(r.check_outros)()),(!ve||128&t[0]&&m.src!==(g=e[7]))&&Object(r.attr)(m,"src",g),ke===(ke=we(e))&&$e?$e.p(e,t):($e.d(1),$e=ke(e),$e&&($e.c(),$e.m(x,S)));const c={};32768&t[0]&&(c.value=e[15]),65536&t[0]&&(c.prevValue=e[16]),131072&t[0]&&(c.prevLabel=e[17]),C.$set(c);const i={};if(8192&t[0]&&(i.value=e[13]),262144&t[0]&&(i.prevValue=e[18]),524288&t[0]&&(i.prevLabel=e[19]),E.$set(i),(!ve||8192&t[0]&&B!==(B=e[13]?"/global/"+(e[13]?Math.floor((e[13]-1)/j.PLAYERS_PER_PAGE)+1:""):"#"))&&Object(r.attr)(q,"href",B),(!ve||8192&t[0])&&Object(r.attr)(q,"data-rank",e[13]),16384&t[0]){let n;for(xe=e[14],n=0;n<xe.length;n+=1){const a=F(e,xe,n);Se[n]?(Se[n].p(a,t),Object(r.transition_in)(Se[n],1)):(Se[n]=W(a),Se[n].c(),Object(r.transition_in)(Se[n],1),Se[n].m(A,null))}for(Object(r.group_outros)(),n=xe.length;n<Se.length;n+=1)Pe(n);Object(r.check_outros)()}if(e[20]&&e[20].length&&e[10]&&e[10].length?Ie?(Ie.p(e,t),1049600&t[0]&&Object(r.transition_in)(Ie,1)):(Ie=Z(e),Ie.c(),Object(r.transition_in)(Ie,1),Ie.m(k,null)):Ie&&(Object(r.group_outros)(),Object(r.transition_out)(Ie,1,1,()=>{Ie=null}),Object(r.check_outros)()),256&t[1]){let n;for(Ce=e[39],n=0;n<Ce.length;n+=1){const a=L(e,Ce,n);Te[n]?(Te[n].p(a,t),Object(r.transition_in)(Te[n],1)):(Te[n]=X(a),Te[n].c(),Object(r.transition_in)(Te[n],1),Te[n].m(te,null))}for(Object(r.group_outros)(),n=Ce.length;n<Te.length;n+=1)Ae(n);Object(r.check_outros)()}(!ve||8&t[0]&&ne!==(ne=Object(r.null_to_empty)("badges "+e[3])+" svelte-1pb1u1r"))&&Object(r.attr)(te,"class",ne);const l={};2097152&t[0]&&(l.playerTwitchProfile=e[21]),oe.$set(l),e[22]&&e[37]&&e[37].length?qe?(qe.p(e,t),4194304&t[0]|64&t[1]&&Object(r.transition_in)(qe,1)):(qe=J(e),qe.c(),Object(r.transition_in)(qe,1),qe.m(ae,null)):qe&&(Object(r.group_outros)(),Object(r.transition_out)(qe,1,1,()=>{qe=null}),Object(r.check_outros)()),e[20]&&e[20].length||!e[10]||!e[10].length?Re&&(Re.d(1),Re=null):Re?Re.p(e,t):(Re=Q(e),Re.c(),Re.m(ee,null)),8&t[0]&&Object(r.toggle_class)(ee,"flex-column-between","text"===e[3]),e[20]&&e[20].length?ze?(ze.p(e,t),1048576&t[0]&&Object(r.transition_in)(ze,1)):(ze=G(e),ze.c(),Object(r.transition_in)(ze,1),ze.m(K,null)):ze&&(Object(r.group_outros)(),Object(r.transition_out)(ze,1,1,()=>{ze=null}),Object(r.check_outros)()),e[23]?Ee?(Ee.p(e,t),8388608&t[0]&&Object(r.transition_in)(Ee,1)):(Ee=ce(e),Ee.c(),Object(r.transition_in)(Ee,1),Ee.m(b,null)):Ee&&(Object(r.group_outros)(),Object(r.transition_out)(Ee,1,1,()=>{Ee=null}),Object(r.check_outros)());let d=me;me=Le(e),me===d?De[me].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(De[d],1,1,()=>{De[d]=null}),Object(r.check_outros)(),ge=De[me],ge||(ge=De[me]=Be[me](e),ge.c()),Object(r.transition_in)(ge,1),ge.m(je,null)),e[31]&&e[13]?Ne?(Ne.p(e,t),8192&t[0]|1&t[1]&&Object(r.transition_in)(Ne,1)):(Ne=de(e),Ne.c(),Object(r.transition_in)(Ne,1),Ne.m(ye,null)):Ne&&(Object(r.group_outros)(),Object(r.transition_out)(Ne,1,1,()=>{Ne=null}),Object(r.check_outros)())},i(e){if(!ve){Object(r.transition_in)(o.$$.fragment,e),Object(r.transition_in)(s.$$.fragment,e),Object(r.transition_in)(_e),Object(r.transition_in)(C.$$.fragment,e),Object(r.transition_in)(E.$$.fragment,e);for(let e=0;e<xe.length;e+=1)Object(r.transition_in)(Se[e]);Object(r.transition_in)(Ie);for(let e=0;e<Ce.length;e+=1)Object(r.transition_in)(Te[e]);Object(r.transition_in)(oe.$$.fragment,e),Object(r.transition_in)(qe),Object(r.transition_in)(ze),Object(r.transition_in)(Ee),Object(r.transition_in)(ge),Object(r.transition_in)(Ne),ve=!0}},o(e){Object(r.transition_out)(o.$$.fragment,e),Object(r.transition_out)(s.$$.fragment,e),Object(r.transition_out)(_e),Object(r.transition_out)(C.$$.fragment,e),Object(r.transition_out)(E.$$.fragment,e),Se=Se.filter(Boolean);for(let e=0;e<Se.length;e+=1)Object(r.transition_out)(Se[e]);Object(r.transition_out)(Ie),Te=Te.filter(Boolean);for(let e=0;e<Te.length;e+=1)Object(r.transition_out)(Te[e]);Object(r.transition_out)(oe.$$.fragment,e),Object(r.transition_out)(qe),Object(r.transition_out)(ze),Object(r.transition_out)(Ee),Object(r.transition_out)(ge),Object(r.transition_out)(Ne),ve=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(o),Object(r.destroy_component)(s),e&&Object(r.detach)(l),e&&Object(r.detach)(d),_e&&_e.d(),$e.d(),Object(r.destroy_component)(C),Object(r.destroy_component)(E),Object(r.destroy_each)(Se,e),Ie&&Ie.d(),Object(r.destroy_each)(Te,e),Object(r.destroy_component)(oe),qe&&qe.d(),Re&&Re.d(),ze&&ze.d(),Ee&&Ee.d(),De[me].d(),Ne&&Ne.d()}}}function pe(e,t,n){let o;Object(r.component_subscribe)(e,p._,e=>n(36,o=e));let{profileId:c}=t,{profilePage:i={}}=t,{autoTransform:s=!1}=t,j="",y=s,v=i&&i.name?i.name:"",_=i&&i.steamUrl?i.steamUrl:null,w=i&&i.avatarUrl?i.avatarUrl:null,k=i&&i.country?i.country:null,$=i&&i.scores&&i.scores.length&&1===i.pageNum&&"recent"===i.type?Object(f.dateFromString)(i.scores[0].timeset):null,x=i&&i.chartHistory&&i.chartHistory.length?i.chartHistory:null,S=i&&i.ssBadges&&i.ssBadges.length?i.ssBadges:null,I=i&&i.stats?i.stats:{},q=null,R=null,z=[],E=null,B=0,D=null,L=0,N=null,F=null,M=null,U=null,V=!1,H=!0,W="rank",Z=[],K=[],X=[],J=null,Q=null,Y=null,G={periods:[{_key:"dashboard.periods.last3Days",value:3},{_key:"dashboard.periods.lastWeek",value:7},{_key:"dashboard.periods.last2Weeks",value:14},{_key:"dashboard.periods.lastMonth",value:30},{_key:"dashboard.periods.last3Months",value:90},{_key:"dashboard.periods.lastHalfYear",value:182},{_key:"dashboard.periods.lastYear",value:365},{_key:"dashboard.periods.all",value:36500}]},ee={selectedPeriod:G.periods.find(e=>36500===e.value)};const te=[{name:"SS+",min:95,max:null,value:0,color:u.diffColors.expertPlus},{name:"SS",min:90,max:95,value:0,color:u.diffColors.expert},{name:"S+",min:85,max:90,value:0,color:u.diffColors.hard},{name:"S",min:80,max:85,value:0,color:u.diffColors.normal},{name:"A",min:null,max:80,value:0,color:u.diffColors.easy}];let ne=null,re={},ae=!1,oe=null,ce=!1;async function ie(){n(63,oe=await Object(l.getConfig)()),oe.songBrowser&&oe.songBrowser.compareTo&&Array.isArray(oe.songBrowser.compareTo)&&n(58,Z=oe.songBrowser.compareTo),n(22,V=oe&&oe.profile&&oe.profile.showOnePpCalc),n(3,j=oe&&oe.profile&&"text"===oe.profile.statsStyle?"text":"")}let se=null;async function le(e){e&&await(async()=>n(61,re=await Object(h.getSsplCountryRanks)()))()}async function de(e){e&&(n(12,q=await Object(m.getPlayerInfo)(e)),q&&($||n(8,$=q.recentPlay),n(5,v=q.name),null==R&&n(13,R=q.rank),E||n(15,E=q.pp),ne&&await le(ne),await O.default.updateVideosForPlayerId(e),n(21,U=await O.default.getProfileByPlayerId(e))))}async function ue(e,t){if(!ce||!e||!t)return;t=t>=36500?1:t;const n=Object(f.toSSTimestamp)(Object(f.daysAgo)(t)),r=await Object(m.getPlayerHistory)(e);if(!r||!r.length)return null;const a=r.sort((e,t)=>t.timestamp-e.timestamp).reduce((e,t)=>t.timestamp>=n?t:e,null);return a&&Object(P.isDateObject)(a.timestamp)?a:null}async function be(e,t,r){if(!(ce&&e&&r&&t&&Number.isFinite(t)))return;const a=await ue(e,r);a&&Number.isFinite(a.pp)&&(n(16,B=0),n(17,D=null),n(16,B=a.pp<t?a.pp:0),n(17,D=Object(A.formatDateRelative)(a.timestamp.toISOString(),Math.ceil,"day")))}Object(a.onMount)(async()=>{Q=await Object(m.isDataAvailable)(),n(57,M=await Object(l.getMainPlayerId)()),n(60,ne=await Object(g.getActiveCountry)()),await ie(),I&&I.rank&&n(13,R=I.rank),I&&I.pp&&n(15,E=I.pp),await de(c);const e=b.default.on("data-refreshed",async()=>{await de(c),Q=await Object(m.isDataAvailable)()}),t=b.default.on("player-scores-updated",async({playerId:e})=>{e===c&&await de(c),Q=await Object(m.isDataAvailable)()}),r=b.default.on("sspl-country-ranks-cache-updated",async()=>le(ne)),a=b.default.on("config-changed",ie),o=b.default.on("player-twitch-videos-updated",async({playerId:e})=>{e===c&&await de(c)}),i=b.default.on("recent-play-updated",({playerId:e,recentPlay:t})=>{e===c&&n(8,$=t)}),s=b.default.on("player-profile-page-parsed",async({playerId:e,profilePage:t})=>{if(!e||e!==c)return;const r=e=>e.reduce((e,t)=>e+":"+t,"");t&&t.name&&n(5,v=t.name),t&&t.steamUrl&&n(6,_=t.steamUrl),t&&t.avatarUrl&&n(7,w=t.avatarUrl),t&&t.chartHistory&&t.chartHistory.length&&(x&&r(x)===r(t.chartHistory)||n(9,x=t.chartHistory)),t&&t.ssBadges&&t.ssBadges.length&&n(10,S=t.ssBadges),t&&t.stats&&n(11,I=t.stats),await be(c,E,ee.selectedPeriod.value)}),d=b.default.on("main-player-changed",async({playerId:e})=>{n(57,M=e),Q=await Object(m.isDataAvailable)()});return n(31,ce=!0),()=>{e(),r(),a(),t(),o(),i(),s(),d()}});let pe=null;const fe=(e,t)=>36500===t||Date.now()-Object(f.timestampFromString)(e.timeset)<=864e5*t;let Oe=i&&i.pageNum?i.pageNum-1:0,je=i&&i.type?i.type:"recent";function me(e){const t=!!X.find(t=>t===e);n(26,X=t?X.filter(t=>t!==e):X.concat([e])),n(24,W="acc")}let ge,he,ye,ve,_e,we,ke=null;return e.$$set=e=>{"profileId"in e&&n(0,c=e.profileId),"profilePage"in e&&n(1,i=e.profilePage),"autoTransform"in e&&n(48,s=e.autoTransform)},e.$$.update=()=>{1048576&e.$$.dirty[0]&&n(37,ge=F?F.filter(e=>e.pp>0&&(!d.UNRANKED.includes(e.leaderboardId)||d.RANKED.includes(e.leaderboardId))):[]),1073741824&e.$$.dirty[0]|64&e.$$.dirty[1]&&n(65,he=ge.filter(e=>fe(e,ee.selectedPeriod.value))),1074790400&e.$$.dirty[0]&&n(66,ye=F?F.filter(e=>fe(e,ee.selectedPeriod.value)):null),1&e.$$.dirty[1]|8&e.$$.dirty[2]&&async function(e){if(!ce||!e)return;te.forEach(e=>{e.value=0,e.title=e.min?e.max?e.min+"% - "+e.max+"%":"> "+e.min+"%":"< "+e.max+"%"});let t={badges:te.map(e=>({...e})),totalAcc:0,totalScore:0,avgAcc:0,playCount:e.length,medianAcc:0,stdDeviation:0};if(!e||!e.length)return t;for(const n of e){if(!n.maxScoreEx)continue;const e=await Object(u.getSongMaxScore)(n.hash,n.diffInfo,n.leaderboardId,!0);n.acc=Object(u.getAccFromScore)(n,e),t.totalScore+=n.uScore?n.uScore:n.score,t.totalAcc+=n.acc,t.badges.forEach(e=>{(!e.min||e.min<=n.acc)&&(!e.max||e.max>n.acc)&&e.value++})}t.medianAcc=e.length>1?e.sort((e,t)=>e.acc-t.acc)[Math.ceil(e.length/2)].acc:e[0].acc,t.avgAcc=t.totalAcc/e.length,t.stdDeviation=Math.sqrt(e.reduce((e,n)=>e+Math.pow(t.avgAcc-n.acc,2),0)/e.length),delete t.totalAcc,n(32,pe={...t})}(he),1610612737&e.$$.dirty[1]|8&e.$$.dirty[2]&&n(38,ve=function(e,t,n){if(!ce||!e||!e.length||!t||Object(P.isEmpty)(n))return;let r={bestRank:null,bestRankCnt:0,avgRank:null,totalRank:0};return t&&(t=t.toLowerCase()),r=e.reduce((e,r)=>{const a=t&&n[r.leaderboardId]&&n[r.leaderboardId][r.playerId]&&n[r.leaderboardId][r.playerId][t]&&n[r.leaderboardId][r.playerId][t];return e.totalRank+=a?a.rank:0,a&&(null===e.bestRank||a.rank<=e.bestRank)&&(null===e.bestRank||a.rank<e.bestRank?e.bestRankCnt=1:e.bestRankCnt+=1,e.bestRank=a.rank),e},{...r}),r.avgRank=r.totalRank>0?r.totalRank/e.length:null,delete r.totalRank,r}(he,ne,re)),2056&e.$$.dirty[0]|34&e.$$.dirty[1]|16&e.$$.dirty[2]&&n(39,_e=function(e,t,r){const a=[],c=(t,n,r,o=null,c=null,i="number",s={})=>e&&e.hasOwnProperty(t)?a.push({label:n,title:o,value:null!==c?c:e[t],digits:0,bgColor:`var(--${r})`,type:i,fluid:!0,styling:j,...s}):null,i=(e,n)=>t&&t.hasOwnProperty(e)?a.push({label:n,value:t[e],digits:0,bgColor:"var(--ppColour)",fluid:!0,styling:j}):null,s=e=>c("totalScore",o.profile.stats.totalScore,"selected",null,e?e.reduce((e,t)=>e+t.score,0):null);return c("playCount",o.profile.stats.playCount,"selected",null,r?r.length:null),F&&F.length?(i("playCount",o.profile.stats.rankedPlayCount),"text"!==j&&c("replays",o.profile.stats.replaysShort,"dimmed",o.profile.stats.replays),s(r),i("totalScore",o.profile.stats.totalRankedScore),"text"===j&&c("replays",o.profile.stats.replays,"dimmed")):(s(),c("replays",o.profile.stats.replaysShort,"dimmed",o.profile.stats.replays)),c("role",o.profile.stats.role,"dimmed",null,null,"text"),e.inactiveAccount&&c("inactiveAccount",o.profile.stats.inactiveAccount,"dimmed",null,null,null,{onlyLabel:!0}),e&&e.rank&&n(13,R=e.rank),e&&e.pp&&n(15,E=e.pp),a}(I,pe,ye)),8&e.$$.dirty[0]|34&e.$$.dirty[1]&&n(40,we=function(e){if(!F)return[];let t=[];const n=(n,r,a,o)=>e&&e.hasOwnProperty(n)?t.push({label:r,value:e[n],title:a,digits:2,bgColor:`var(--${o})`,fluid:!0,suffix:"%",styling:j}):null;return n("avgAcc","text"===j?o.profile.stats.avgRankedAccuracy:o.profile.stats.avgRankedAccuracyShort,"text"===j?"":o.profile.stats.avgRankedAccuracy,"selected"),n("medianAcc","text"===j?o.profile.stats.medianRankedAccuracy:o.profile.stats.medianRankedAccuracyShort,"text"===j?"":o.profile.stats.medianRankedAccuracy,"ppColour"),n("stdDeviation","text"===j?o.profile.stats.stdDeviationRankedAccuracy:o.profile.stats.stdDeviationRankedAccuracyShort,"text"===j?"":o.profile.stats.stdDeviationRankedAccuracy,"decrease"),t}(pe)),4096&e.$$.dirty[0]|536870912&e.$$.dirty[1]&&(ae=Object(m.isCountryPlayer)(q,ne)),1&e.$$.dirty[0]&&function e(t){if(!t)return;const r=$?$>Object(f.addToDate)(new Date,-6e5)?6e4:3e5:1e4;setTimeout(()=>async function(t){try{const e=await Object(C.fetchSsProfilePage)(t);if(!e||!e.scores)throw"Download error";n(8,$=e.scores.length&&e.scores[0].timeset&&Object(P.isDateObject)(e.scores[0].timeset)?e.scores[0].timeset:Object(f.addToDate)(new Date,-864e5)),b.default.publish("player-profile-page-parsed",{nodeId:Object(T.default)().getId(),playerId:t,profilePage:e})}catch{}e(t)}(t),r)}(c),33&e.$$.dirty[0]|201326592&e.$$.dirty[1]&&function(e,t,r,a){const o=[].concat(e?[{playerId:e,name:r}]:[]).concat(e&&t&&t!==e?[{playerId:t,name:"Main"}]:[]).concat(a&&a.length?a.filter(n=>n!==t&&n!==e).map(e=>({playerId:e,name:""})):[]).slice(0,3),c=o.map(e=>e.playerId).join(":");c!==se&&n(25,K=o),se=c}(c,M,v,Z),1073747968&e.$$.dirty[0]|536870913&e.$$.dirty[1]&&async function(e,t,r,a){let o=[];const c=e&&r&&e.ssplCountryRank&&"object"==typeof e.ssplCountryRank&&e.ssplCountryRank[r]?e.ssplCountryRank[r]:e&&e.ssplCountryRank&&"number"==typeof e.ssplCountryRank?e.ssplCountryRank:null;c&&(o=r===t?[{rank:c,prevRank:null,prevRankSince:null,subRank:a&&a.countryRank?a.countryRank:null,country:r,type:"active-country"}]:o.concat([{rank:c,prevRank:null,prevRankSince:null,country:r,type:"active-country"}])),t&&a&&a.countryRank&&(!c||r!==t)&&(o=o.concat([{rank:a.countryRank,prevRank:null,prevRankSince:null,country:t,type:"country"}])),n(14,z=e?await async function(e,t,n){if(!(ce&&e&&t&&t.length&&n))return t;const r=await ue(e,n);return r?t.map(e=>{switch(e.prevRank=null,e.prevRankSince=null,e.type){case"active-country":e.country&&r.ssplCountryRank&&r.ssplCountryRank[e.country]&&Number.isFinite(r.ssplCountryRank[e.country])&&(e.prevRank=r.ssplCountryRank[e.country],e.prevRankSince=Object(A.formatDateRelative)(r.timestamp.toISOString(),Math.ceil,"day"));break;case"country":r.countryRank&&Number.isFinite(r.countryRank)&&(e.prevRank=r.countryRank,e.prevRankSince=Object(A.formatDateRelative)(r.timestamp.toISOString(),Math.ceil,"day"))}return e}):t}(e.id,o,ee.selectedPeriod.value):o)}(q,k,ne,I,ee.selectedPeriod.value),4096&e.$$.dirty[0]&&async function(e){e&&n(20,F=await Object(m.getScoresByPlayerId)(e.id))}(q),512&e.$$.dirty[0]|2&e.$$.dirty[2]&&function(e,t){n(23,H=e&&e.profile&&"none"!==e.profile.showChart&&t&&t.length),n(24,W=e&&e.profile&&e.profile.showChart?e.profile.showChart:"rank")}(oe,x),32&e.$$.dirty[1]&&(Object.keys(G).forEach(e=>{G[e].forEach(e=>{e._key&&(e.label=Object(p.trans)(e._key))})}),n(29,G={...G}),n(30,ee={...ee})),1140850688&e.$$.dirty[0]&&function(e,t){n(27,J=e+":"+t.map(e=>e.name).join(":"))}(ee.selectedPeriod.value,X),1073774593&e.$$.dirty[0]|1&e.$$.dirty[1]&&be(c,E,ee.selectedPeriod.value),1073742336&e.$$.dirty[0]|1&e.$$.dirty[1]&&async function(e,t){if(!ce||!e||e.length<=1||!t)return;t=t>=36500?1:t,n(18,L=null),n(19,N=null);const r=e.length>=t+1?t:null;if(!r)return;const a=e.slice().reverse();n(18,L=a[r]),n(19,N=Object(A.formatDateRelative)(Object(f.addToDate)(new Date,1e3*-r*60*60*24).toISOString(),Math.ceil,"day"))}(x,ee.selectedPeriod.value)},[c,i,3,j,y,v,_,w,$,x,S,I,q,R,z,E,B,D,L,N,F,U,V,H,W,K,X,J,Y,G,ee,ce,pe,Oe,je,ke,o,ge,ve,_e,we,function(e){return fe(e,ee.selectedPeriod.value)&&(!X.length||X.reduce((t,n)=>t||(!n.min||n.min<=e.acc)&&(!n.max||n.max>e.acc),!1))},function(){if(!K||!K.length)return;const e=new URL(Object(m.getPlayerProfileUrl)(K[0].playerId,!("top"===je),!1,Oe+1));history.replaceState(null,"",e.toString())},function(){n(4,y=!0)},function(){n(28,Y="what_to_play"),n(4,y=!0)},me,async function(e){n(4,y=!1),await Object(a.tick)(),ke&&ke.onTypeChange(e.detail)},function(e){n(28,Y=e.detail)},s,function(e){ee.selectedPeriod=e,n(30,ee)},e=>me(e),function(e){W=e,n(24,W)},function(e){r.binding_callbacks[e?"unshift":"push"](()=>{ke=e,n(35,ke)})},function(e){K=e,n(25,K)},function(e){Oe=e,n(33,Oe)},function(e){je=e,n(34,je)},function(e){je=e,n(34,je)}]}class fe extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1pb1u1r-style")||((t=Object(r.element)("style")).id="svelte-1pb1u1r-style",t.textContent=".sspl-page-container.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{display:flex}main.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{width:100%}aside.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{display:none;margin-left:1rem;font-size:.9rem}aside.svelte-1pb1u1r .box.svelte-1pb1u1r.svelte-1pb1u1r{padding:.5rem}aside.svelte-1pb1u1r .ranking header.svelte-1pb1u1r.svelte-1pb1u1r{font-size:1.1em;font-weight:500;margin-bottom:.5em}aside.svelte-1pb1u1r .ranking header a.svelte-1pb1u1r.svelte-1pb1u1r{color:inherit!important}aside.svelte-1pb1u1r .ranking header.svelte-1pb1u1r>img.svelte-1pb1u1r,aside.svelte-1pb1u1r .ranking header.svelte-1pb1u1r>i.svelte-1pb1u1r{margin-right:.25em}.player-top.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{display:flex;justify-content:space-between;align-items:flex-end;margin:0;width:100%}@media screen and (min-width: 1750px){main.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r,.player-top.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{width:calc(100% - 30rem)}aside.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{display:block;width:29rem}}.icons.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{font-size:.7rem;padding-left:.25rem}.icons.svelte-1pb1u1r .buttons{margin-bottom:0;margin-right:.5rem}.icons.svelte-1pb1u1r button{margin-bottom:0}.refresh.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{justify-content:flex-end;padding-right:.25rem}.box.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{position:relative}.column.avatar.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{text-align:center}img.avatar.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{border-radius:50%;width:150px;height:150px}.player-name.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{margin-bottom:0}.player-name.svelte-1pb1u1r .column.svelte-1pb1u1r.svelte-1pb1u1r{padding-bottom:0}.ss-badges.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{max-width:90%;display:flex;flex-wrap:wrap}.ss-badges.svelte-1pb1u1r img.svelte-1pb1u1r.svelte-1pb1u1r{margin-right:.5rem;margin-bottom:.25rem}h1.title.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{margin-bottom:.25rem}h1.svelte-1pb1u1r a.svelte-1pb1u1r.svelte-1pb1u1r{color:var(--textColor)!important}h1.svelte-1pb1u1r .pp.svelte-1pb1u1r.svelte-1pb1u1r{color:var(--ppColour) !important;font-size:smaller;border-left:1px solid var(--dimmed);padding-left:.75rem;margin-left:.5rem}h2.title.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{display:flex;margin-bottom:1rem}h2.svelte-1pb1u1r a.svelte-1pb1u1r.svelte-1pb1u1r{border-right:1px solid var(--dimmed);padding:0 .5rem}h2.svelte-1pb1u1r a.svelte-1pb1u1r.svelte-1pb1u1r:first-of-type{padding-left:0}h2.svelte-1pb1u1r a.svelte-1pb1u1r.svelte-1pb1u1r:last-of-type{border-right:none}h2.svelte-1pb1u1r a i.svelte-1pb1u1r.svelte-1pb1u1r{color:var(--textColor);font-size:smaller;position:relative;top:-1px}h2.svelte-1pb1u1r a img.svelte-1pb1u1r.svelte-1pb1u1r{margin-bottom:2px}.sspl-ranks.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{display:inline-flex;flex-wrap:wrap}.sspl-ranks.svelte-1pb1u1r>.svelte-1pb1u1r.svelte-1pb1u1r{margin-right:.5rem}.period.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{position:absolute;top:0;right:.25rem}.chart.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{min-height:300px}.ranks.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{position:relative}.ranks.svelte-1pb1u1r small.svelte-1pb1u1r.svelte-1pb1u1r{font-size:.75em}.badges.text.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{display:flex;flex-direction:column;margin-bottom:.5rem}.flex-column-between.svelte-1pb1u1r.svelte-1pb1u1r.svelte-1pb1u1r{display:flex;flex-direction:column;justify-content:space-between;height:100%}",Object(r.append)(document.head,t)),Object(r.init)(this,e,pe,be,r.safe_not_equal,{profileId:0,profilePage:1,autoTransform:48,MAX_COMPARE_PLAYERS:2},[-1,-1,-1,-1])}get MAX_COMPARE_PLAYERS(){return this.$$.ctx[2]}}t.default=fe},function(e,t,n){"use strict";n.r(t);var r=n(55);n.d(t,"SvelteComponent",(function(){return r.SvelteComponentDev})),n.d(t,"afterUpdate",(function(){return r.afterUpdate})),n.d(t,"beforeUpdate",(function(){return r.beforeUpdate})),n.d(t,"createEventDispatcher",(function(){return r.createEventDispatcher})),n.d(t,"getContext",(function(){return r.getContext})),n.d(t,"onDestroy",(function(){return r.onDestroy})),n.d(t,"onMount",(function(){return r.onMount})),n.d(t,"setContext",(function(){return r.setContext})),n.d(t,"tick",(function(){return r.tick}))},function(e,t,n){"use strict";n.r(t),n.d(t,"blur",(function(){return o})),n.d(t,"crossfade",(function(){return u})),n.d(t,"draw",(function(){return d})),n.d(t,"fade",(function(){return c})),n.d(t,"fly",(function(){return i})),n.d(t,"scale",(function(){return l})),n.d(t,"slide",(function(){return s}));var r=n(60),a=n(55);function o(e,{delay:t=0,duration:n=400,easing:a=r.cubicInOut,amount:o=5,opacity:c=0}){const i=getComputedStyle(e),s=+i.opacity,l="none"===i.filter?"":i.filter,d=s*(1-c);return{delay:t,duration:n,easing:a,css:(e,t)=>`opacity: ${s-d*t}; filter: ${l} blur(${t*o}px);`}}function c(e,{delay:t=0,duration:n=400,easing:a=r.linear}){const o=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:a,css:e=>"opacity: "+e*o}}function i(e,{delay:t=0,duration:n=400,easing:a=r.cubicOut,x:o=0,y:c=0,opacity:i=0}){const s=getComputedStyle(e),l=+s.opacity,d="none"===s.transform?"":s.transform,u=l*(1-i);return{delay:t,duration:n,easing:a,css:(e,t)=>`\n\t\t\ttransform: ${d} translate(${(1-e)*o}px, ${(1-e)*c}px);\n\t\t\topacity: ${l-u*t}`}}function s(e,{delay:t=0,duration:n=400,easing:a=r.cubicOut}){const o=getComputedStyle(e),c=+o.opacity,i=parseFloat(o.height),s=parseFloat(o.paddingTop),l=parseFloat(o.paddingBottom),d=parseFloat(o.marginTop),u=parseFloat(o.marginBottom),b=parseFloat(o.borderTopWidth),p=parseFloat(o.borderBottomWidth);return{delay:t,duration:n,easing:a,css:e=>`overflow: hidden;opacity: ${Math.min(20*e,1)*c};height: ${e*i}px;padding-top: ${e*s}px;padding-bottom: ${e*l}px;margin-top: ${e*d}px;margin-bottom: ${e*u}px;border-top-width: ${e*b}px;border-bottom-width: ${e*p}px;`}}function l(e,{delay:t=0,duration:n=400,easing:a=r.cubicOut,start:o=0,opacity:c=0}){const i=getComputedStyle(e),s=+i.opacity,l="none"===i.transform?"":i.transform,d=1-o,u=s*(1-c);return{delay:t,duration:n,easing:a,css:(e,t)=>`\n\t\t\ttransform: ${l} scale(${1-d*t});\n\t\t\topacity: ${s-u*t}\n\t\t`}}function d(e,{delay:t=0,speed:n,duration:a,easing:o=r.cubicInOut}){const c=e.getTotalLength();return void 0===a?a=void 0===n?800:c/n:"function"==typeof a&&(a=a(c)),{delay:t,duration:a,easing:o,css:(e,t)=>`stroke-dasharray: ${e*c} ${t*c}`}}function u(e){var{fallback:t}=e,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(e,["fallback"]);const o=new Map,c=new Map;function i(e,o,c){return(i,s)=>(e.set(s.key,{rect:i.getBoundingClientRect()}),()=>{if(o.has(s.key)){const{rect:e}=o.get(s.key);return o.delete(s.key),function(e,t,o){const{delay:c=0,duration:i=(e=>30*Math.sqrt(e)),easing:s=r.cubicOut}=Object(a.assign)(Object(a.assign)({},n),o),l=t.getBoundingClientRect(),d=e.left-l.left,u=e.top-l.top,b=e.width/l.width,p=e.height/l.height,f=Math.sqrt(d*d+u*u),O=getComputedStyle(t),j="none"===O.transform?"":O.transform,m=+O.opacity;return{delay:c,duration:Object(a.is_function)(i)?i(f):i,easing:s,css:(e,t)=>`\n\t\t\t\topacity: ${e*m};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${j} translate(${t*d}px,${t*u}px) scale(${e+(1-e)*b}, ${e+(1-e)*p});\n\t\t\t`}}(e,i,s)}return e.delete(s.key),t&&t(i,s,c)})}return[i(c,o,!1),i(o,c,!0)]}},function(e,t,n){"use strict";n.r(t),n.d(t,"backIn",(function(){return o})),n.d(t,"backInOut",(function(){return a})),n.d(t,"backOut",(function(){return c})),n.d(t,"bounceIn",(function(){return l})),n.d(t,"bounceInOut",(function(){return s})),n.d(t,"bounceOut",(function(){return i})),n.d(t,"circIn",(function(){return u})),n.d(t,"circInOut",(function(){return d})),n.d(t,"circOut",(function(){return b})),n.d(t,"cubicIn",(function(){return f})),n.d(t,"cubicInOut",(function(){return p})),n.d(t,"cubicOut",(function(){return O})),n.d(t,"elasticIn",(function(){return m})),n.d(t,"elasticInOut",(function(){return j})),n.d(t,"elasticOut",(function(){return g})),n.d(t,"expoIn",(function(){return y})),n.d(t,"expoInOut",(function(){return h})),n.d(t,"expoOut",(function(){return v})),n.d(t,"quadIn",(function(){return w})),n.d(t,"quadInOut",(function(){return _})),n.d(t,"quadOut",(function(){return k})),n.d(t,"quartIn",(function(){return x})),n.d(t,"quartInOut",(function(){return $})),n.d(t,"quartOut",(function(){return S})),n.d(t,"quintIn",(function(){return I})),n.d(t,"quintInOut",(function(){return P})),n.d(t,"quintOut",(function(){return C})),n.d(t,"sineIn",(function(){return A})),n.d(t,"sineInOut",(function(){return T})),n.d(t,"sineOut",(function(){return q}));var r=n(55);function a(e){const t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}function o(e){const t=1.70158;return e*e*((t+1)*e-t)}function c(e){const t=1.70158;return--e*e*((t+1)*e+t)+1}function i(e){const t=e*e;return e<4/11?7.5625*t:e<8/11?9.075*t-9.9*e+3.4:e<.9?4356/361*t-35442/1805*e+16061/1805:10.8*e*e-20.52*e+10.72}function s(e){return e<.5?.5*(1-i(1-2*e)):.5*i(2*e-1)+.5}function l(e){return 1-i(1-e)}function d(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}function u(e){return 1-Math.sqrt(1-e*e)}function b(e){return Math.sqrt(1- --e*e)}function p(e){return e<.5?4*e*e*e:.5*Math.pow(2*e-2,3)+1}function f(e){return e*e*e}function O(e){const t=e-1;return t*t*t+1}function j(e){return e<.5?.5*Math.sin(13*Math.PI/2*2*e)*Math.pow(2,10*(2*e-1)):.5*Math.sin(-13*Math.PI/2*(2*e-1+1))*Math.pow(2,-10*(2*e-1))+1}function m(e){return Math.sin(13*e*Math.PI/2)*Math.pow(2,10*(e-1))}function g(e){return Math.sin(-13*(e+1)*Math.PI/2)*Math.pow(2,-10*e)+1}function h(e){return 0===e||1===e?e:e<.5?.5*Math.pow(2,20*e-10):-.5*Math.pow(2,10-20*e)+1}function y(e){return 0===e?e:Math.pow(2,10*(e-1))}function v(e){return 1===e?e:1-Math.pow(2,-10*e)}function _(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)}function w(e){return e*e}function k(e){return-e*(e-2)}function $(e){return e<.5?8*Math.pow(e,4):-8*Math.pow(e-1,4)+1}function x(e){return Math.pow(e,4)}function S(e){return Math.pow(e-1,3)*(1-e)+1}function P(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}function I(e){return e*e*e*e*e}function C(e){return--e*e*e*e*e+1}function T(e){return-.5*(Math.cos(Math.PI*e)-1)}function A(e){const t=Math.cos(e*Math.PI*.5);return Math.abs(t)<1e-14?1:1-t}function q(e){return Math.sin(e*Math.PI/2)}n.d(t,"linear",(function(){return r.identity}))},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(62),o=n(8),c=n(63),i=n(9),s=n(64),l=n(65),d=n(46),u=n(66),b=n(58);function p(e,t,n){const r=e.slice();return r[22]=t[n],r}function f(e,t,n){const r=e.slice();return r[22]=t[n],r}const O=e=>({}),j=e=>({slot:"value"}),m=e=>({}),g=e=>({slot:"label"});function h(e){let t,n,a,o,c,i;t=new u.default({props:{bgColor:"var(--dimmed)",fluid:!0,$$slots:{default:[_],value:[v],label:[y]},$$scope:{ctx:e}}});const s=[k,w],l=[];function d(e,t){return e[4].length?1:0}return a=d(e),o=l[a]=s[a](e),{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),o.c(),c=Object(r.empty)()},m(e,o){Object(r.mount_component)(t,e,o),Object(r.insert)(e,n,o),l[a].m(e,o),Object(r.insert)(e,c,o),i=!0},p(e,n){const i={};262414&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i);let u=a;a=d(e),a===u?l[a].p(e,n):(Object(r.group_outros)(),Object(r.transition_out)(l[u],1,1,()=>{l[u]=null}),Object(r.check_outros)(),o=l[a],o||(o=l[a]=s[a](e),o.c()),Object(r.transition_in)(o,1),o.m(c.parentNode,c))},i(e){i||(Object(r.transition_in)(t.$$.fragment,e),Object(r.transition_in)(o),i=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),Object(r.transition_out)(o),i=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),l[a].d(e),e&&Object(r.detach)(c)}}}function y(e){let t;const n=e[14].default,a=Object(r.create_slot)(n,e,e[18],g),o=a||function(e){let t,n,a,o,c,i;return{c(){t=Object(r.element)("strong"),t.textContent="+",n=Object(r.element)("input"),a=Object(r.space)(),o=Object(r.element)("strong"),o.textContent="pp",Object(r.attr)(t,"class","plus svelte-126qw9w"),Object(r.attr)(n,"class","pp-boundary svelte-126qw9w"),n.value=e[2]},m(s,l){Object(r.insert)(s,t,l),Object(r.insert)(s,n,l),Object(r.insert)(s,a,l),Object(r.insert)(s,o,l),c||(i=Object(r.listen)(n,"input",e[11]),c=!0)},p(e,t){4&t&&n.value!==e[2]&&(n.value=e[2])},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),e&&Object(r.detach)(a),e&&Object(r.detach)(o),c=!1,i()}}}(e);return{c(){o&&o.c()},m(e,n){o&&o.m(e,n),t=!0},p(e,t){a?a.p&&262144&t&&Object(r.update_slot)(a,n,e,e[18],t,m,g):o&&o.p&&4&t&&o.p(e,t)},i(e){t||(Object(r.transition_in)(o,e),t=!0)},o(e){Object(r.transition_out)(o,e),t=!1},d(e){o&&o.d(e)}}}function v(e){let t;const n=e[14].default,a=Object(r.create_slot)(n,e,e[18],j),o=a||function(e){let t,n,a,o,c,i,l,d,u,b=e[8].profile.rawNewPlay+"";return t=new s.default({props:{value:e[3]}}),{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),a=Object(r.text)(b),o=Object(r.space)(),c=Object(r.element)("i"),Object(r.attr)(c,"class",i=Object(r.null_to_empty)(e[1]?"fas fa-chevron-up":"fas fa-chevron-right")+" svelte-126qw9w"),Object(r.toggle_class)(c,"details",!0)},m(i,s){Object(r.mount_component)(t,i,s),Object(r.insert)(i,n,s),Object(r.insert)(i,a,s),Object(r.insert)(i,o,s),Object(r.insert)(i,c,s),l=!0,d||(u=Object(r.listen)(c,"click",e[15]),d=!0)},p(e,n){const o={};8&n&&(o.value=e[3]),t.$set(o),(!l||256&n)&&b!==(b=e[8].profile.rawNewPlay+"")&&Object(r.set_data)(a,b),(!l||2&n&&i!==(i=Object(r.null_to_empty)(e[1]?"fas fa-chevron-up":"fas fa-chevron-right")+" svelte-126qw9w"))&&Object(r.attr)(c,"class",i),2&n&&Object(r.toggle_class)(c,"details",!0)},i(e){l||(Object(r.transition_in)(t.$$.fragment,e),l=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),l=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),e&&Object(r.detach)(a),e&&Object(r.detach)(o),e&&Object(r.detach)(c),d=!1,u()}}}(e);return{c(){o&&o.c()},m(e,n){o&&o.m(e,n),t=!0},p(e,t){a?a.p&&262144&t&&Object(r.update_slot)(a,n,e,e[18],t,O,j):o&&o.p&&266&t&&o.p(e,t)},i(e){t||(Object(r.transition_in)(o,e),t=!0)},o(e){Object(r.transition_out)(o,e),t=!1},d(e){o&&o.d(e)}}}function _(e){let t;return{c(){t=Object(r.space)()},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function w(e){let t,n;return{c(){t=Object(r.element)("div"),n=Object(r.text)(e[4]),Object(r.attr)(t,"class","err svelte-126qw9w")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){16&t&&Object(r.set_data)(n,e[4])},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function k(e){let t,n,a=e[1]&&$(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[1]?a?(a.p(e,n),2&n&&Object(r.transition_in)(a,1)):(a=$(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function $(e){let t,n,a,o,c,i,s,d,u,b,O,j,m,g,h,y=[],v=new Map,_=[],w=new Map,k=e[9];const $=e=>e[22];for(let t=0;t<k.length;t+=1){let n=f(e,k,t),r=$(n);v.set(r,y[t]=x(r,n))}let P=e[9];const I=e=>e[22];for(let t=0;t<P.length;t+=1){let n=p(e,P,t),r=I(n);w.set(r,_[t]=S(r,n))}function C(t){e[16].call(null,t)}let T={min:.1,max:e[5],step:.01,suffix:"*",inline:!0};function A(t){e[17].call(null,t)}void 0!==e[6]&&(T.value=e[6]),b=new l.default({props:T}),r.binding_callbacks.push(()=>Object(r.bind)(b,"value",C)),b.$on("change",e[12]);let q={min:70,max:100,step:.1,suffix:"%",inline:!0};return void 0!==e[7]&&(q.value=e[7]),m=new l.default({props:q}),r.binding_callbacks.push(()=>Object(r.bind)(m,"value",A)),m.$on("change",e[12]),{c(){t=Object(r.element)("div"),n=Object(r.element)("table"),a=Object(r.element)("thead"),o=Object(r.element)("tr");for(let e=0;e<y.length;e+=1)y[e].c();c=Object(r.space)(),i=Object(r.element)("tbody"),s=Object(r.element)("tr");for(let e=0;e<_.length;e+=1)_[e].c();d=Object(r.space)(),u=Object(r.element)("div"),Object(r.create_component)(b.$$.fragment),j=Object(r.space)(),Object(r.create_component)(m.$$.fragment),Object(r.attr)(n,"class","svelte-126qw9w"),Object(r.attr)(u,"class","stars-pp"),Object(r.attr)(t,"class","content")},m(e,l){Object(r.insert)(e,t,l),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(a,o);for(let e=0;e<y.length;e+=1)y[e].m(o,null);Object(r.append)(n,c),Object(r.append)(n,i),Object(r.append)(i,s);for(let e=0;e<_.length;e+=1)_[e].m(s,null);Object(r.append)(t,d),Object(r.append)(t,u),Object(r.mount_component)(b,u,null),Object(r.append)(u,j),Object(r.mount_component)(m,u,null),h=!0},p(e,t){if(512&t){const n=e[9];y=Object(r.update_keyed_each)(y,t,$,1,e,n,v,o,r.destroy_block,x,null,f)}if(1544&t){const n=e[9];Object(r.group_outros)(),_=Object(r.update_keyed_each)(_,t,I,1,e,n,w,s,r.outro_and_destroy_block,S,null,p),Object(r.check_outros)()}const n={};32&t&&(n.max=e[5]),!O&&64&t&&(O=!0,n.value=e[6],Object(r.add_flush_callback)(()=>O=!1)),b.$set(n);const a={};!g&&128&t&&(g=!0,a.value=e[7],Object(r.add_flush_callback)(()=>g=!1)),m.$set(a)},i(e){if(!h){for(let e=0;e<P.length;e+=1)Object(r.transition_in)(_[e]);Object(r.transition_in)(b.$$.fragment,e),Object(r.transition_in)(m.$$.fragment,e),h=!0}},o(e){for(let e=0;e<_.length;e+=1)Object(r.transition_out)(_[e]);Object(r.transition_out)(b.$$.fragment,e),Object(r.transition_out)(m.$$.fragment,e),h=!1},d(e){e&&Object(r.detach)(t);for(let e=0;e<y.length;e+=1)y[e].d();for(let e=0;e<_.length;e+=1)_[e].d();Object(r.destroy_component)(b),Object(r.destroy_component)(m)}}}function x(e,t){let n,a,o,c=t[22]+"";return{key:e,first:null,c(){n=Object(r.element)("th"),a=Object(r.text)(c),o=Object(r.text)("%"),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.append)(n,a),Object(r.append)(n,o)},p:r.noop,d(e){e&&Object(r.detach)(n)}}}function S(e,t){let n,a,o;return a=new s.default({props:{value:t[10](t[3],t[22]),suffix:"*"}}),{key:e,first:null,c(){n=Object(r.element)("th"),Object(r.create_component)(a.$$.fragment),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.mount_component)(a,n,null),o=!0},p(e,t){const n={};8&t&&(n.value=e[10](e[3],e[22])),a.$set(n)},i(e){o||(Object(r.transition_in)(a.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(n),Object(r.destroy_component)(a)}}}function P(e){let t,n,a=e[0]&&h(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=h(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function I(e,t,n){let s;Object(r.component_subscribe)(e,i._,e=>n(8,s=e));let{$$slots:l={},$$scope:u}=t,{scores:p=[]}=t,{playerId:f}=t,O=!1,j=Object(o.formatNumber)(1),m=null,g="",h=100,y=10,v=90;const _=[90,91,92,93,94,95];function w(e,t){return e/c.PP_PER_STAR/Object(c.ppFactorFromAcc)(t)}function k(e,t,r){r=r||Object(o.parseFormattedNumber)(j),e&&t&&t.length&&r&&!isNaN(r)&&(n(3,m=Object(c.findRawPp)(e,r)),isNaN(m)||(n(6,y=w(m,t[0])),n(7,v=t[0])))}Object(b.onMount)(async()=>{const e=await Object(d.getRankedSongs)();n(5,h=Math.ceil(Object.values(e).reduce((e,t)=>t.stars>e?t.stars:e,0)+1)),n(3,m=Object(c.findRawPp)(p.map(e=>e.pp).sort((e,t)=>t-e),Object(o.parseFormattedNumber)(j))),n(6,y=w(m,_[0]))});const $=Object(a.default)(()=>async function(e,t){const r=c.PP_PER_STAR*e*Object(c.ppFactorFromAcc)(t),a=(await Object(c.getWhatIfScore)(f,-1,r)).diff;n(3,m=r),n(2,j=Object(o.formatNumber)(a>0?a:0))}(y,v),50);let x;return e.$$set=e=>{"scores"in e&&n(13,p=e.scores),"playerId"in e&&n(0,f=e.playerId),"$$scope"in e&&n(18,u=e.$$scope)},e.$$.update=()=>{8192&e.$$.dirty&&n(19,x=p.map(e=>e.pp).sort((e,t)=>t-e)),524288&e.$$.dirty&&k(x,_)},[f,O,j,m,g,h,y,v,s,_,w,function(e){n(4,g="");const t=e.target.value.trim(),r=Object(o.parseFormattedNumber)(t);isNaN(r)?n(4,g=Object(i.trans)("profile.onePpParseError",{num1:Object(o.formatNumber)(1),num2:Object(o.formatNumber)(10.69),str:t})):k(x,_,r)},$,p,l,()=>n(1,O=!O),function(e){y=e,n(6,y)},function(e){v=e,n(7,v)},u]}class C extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-126qw9w-style")||((t=Object(r.element)("style")).id="svelte-126qw9w-style",t.textContent=".details.svelte-126qw9w{cursor:pointer;margin-left:.25rem}table.svelte-126qw9w{margin-bottom:.5rem!important}.plus.svelte-126qw9w{vertical-align:text-bottom\n    }.pp-boundary.svelte-126qw9w{border:none;background:transparent;font-weight:700;font-size:1rem;width:3rem;text-align:right;outline:none;padding:0}.err.svelte-126qw9w{color:red}table.svelte-126qw9w{width:auto}",Object(r.append)(document.head,t)),Object(r.init)(this,e,I,P,r.safe_not_equal,{scores:13,playerId:0})}}t.default=C},function(e,t,n){"use strict";n.r(t),t.default=(e,t)=>{var n;return function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];var c=this;clearTimeout(n),n=setTimeout(()=>e.apply(c,a),t)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"calcPp",(function(){return s})),n.d(t,"calcRawPpAtIdx",(function(){return l})),n.d(t,"findRawPp",(function(){return d})),n.d(t,"getTotalPpFromSortedPps",(function(){return u})),n.d(t,"getTotalPp",(function(){return b})),n.d(t,"getTotalPlayerPp",(function(){return p})),n.d(t,"getWeightedPp",(function(){return O})),n.d(t,"getWhatIfScore",(function(){return j})),n.d(t,"PP_PER_STAR",(function(){return g})),n.d(t,"ppFactorFromAcc",(function(){return y}));var r=n(46),a=n(15),o=n(6);function c(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){c(o,r,a,i,s,"next",e)}function s(e){c(o,r,a,i,s,"throw",e)}i(void 0)}))}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.reduce((e,n,r)=>e+Math.pow(.965,r+t)*n,0)}function l(e,t,n){return(n+s(e,t)-s(e,t+1))/Math.pow(.965,t)}function d(e,t){if(!e||!e.length)return t;for(var n=e.length-1;n>=0;){var r=e.slice(n),a=s(r,n);if(r.unshift(e[n]),s(r,n)-a>t)return l(e.slice(n+1),n+1,t);n--}return l(e,0,t)}function u(e){return e.reduce((e,t,n)=>e+Math.pow(.965,n)*t,0)}function b(e){return u(Object.values(e).filter(e=>e.pp>0&&(!r.UNRANKED.includes(e.leaderboardId)||r.RANKED.includes(e.leaderboardId))).map(e=>e.pp).sort((e,t)=>t-e))}function p(e){return f.apply(this,arguments)}function f(){return(f=i((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(Object.assign({},Object(o.convertArrayToObjectByKey)(yield Object(a.getScoresByPlayerId)(e),"leaderboardId"),t))}))).apply(this,arguments)}function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n?e:Object.values(e).filter(e=>e.pp>0).sort((e,t)=>t.pp-e.pp);for(var a in r)if(r[a].leaderboardId===t)return Math.pow(.965,a)*r[a].pp;return null}function j(e,t,n){return m.apply(this,arguments)}function m(){return(m=i((function*(e,t,n){var r=yield p(e),a=yield p(e,{[t]:{pp:n}});return{currentTotalPp:r,newTotalPp:a,diff:a-r}}))).apply(this,arguments)}var g=42.114296,h=[{at:0,value:0},{at:45,value:.015},{at:50,value:.03},{at:55,value:.06},{at:60,value:.105},{at:65,value:.16},{at:68,value:.24},{at:70,value:.285},{at:80,value:.563},{at:84,value:.695},{at:88,value:.826},{at:94.5,value:1.015},{at:95,value:1.046},{at:100,value:1.12},{at:110,value:1.18},{at:114,value:1.25}];function y(e){if(!e||e<=0)return 0;var t=h.findIndex(t=>t.at>=e);if(-1===t)return h[h.length-1].value;if(!t)return h[0].value;var n=h[t-1],r=h[t],a=(e-n.at)/(r.at-n.at);return n.value+(r.value-n.value)*a}},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(8);function o(e){let t,n,a,o;return{c(){t=Object(r.element)("small"),n=Object(r.text)(e[5]),Object(r.attr)(t,"class",a=Object(r.null_to_empty)(e[6])+" svelte-1cksowx"),Object(r.attr)(t,"title",o=e[1]?e[1]:e[4])},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,c){32&c&&Object(r.set_data)(n,e[5]),64&c&&a!==(a=Object(r.null_to_empty)(e[6])+" svelte-1cksowx")&&Object(r.attr)(t,"class",a),18&c&&o!==(o=e[1]?e[1]:e[4])&&Object(r.attr)(t,"title",o)},d(e){e&&Object(r.detach)(t)}}}function c(e){let t,n,a,c=e[3]&&o(e);return{c(){t=Object(r.element)("span"),n=Object(r.text)(e[2]),c&&c.c(),a=Object(r.empty)(),Object(r.attr)(t,"class",e[7]),Object(r.attr)(t,"title",e[0])},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),c&&c.m(e,o),Object(r.insert)(e,a,o)},p(e,[i]){4&i&&Object(r.set_data)(n,e[2]),128&i&&Object(r.attr)(t,"class",e[7]),1&i&&Object(r.attr)(t,"title",e[0]),e[3]?c?c.p(e,i):(c=o(e),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),c&&c.d(e),e&&Object(r.detach)(a)}}}function i(e,t,n){let r,o,c,i,s,l,d,{value:u=0}=t,{prevValue:b=null}=t,{reversePrevSign:p=!1}=t,{digits:f=2}=t,{zero:O=Object(a.formatNumber)(0,Number.isInteger(f)?f:2)}=t,{withSign:j=!1}=t,{prefix:m=""}=t,{withZeroPrefix:g=!1}=t,{suffix:h=""}=t,{suffixPrev:y=null}=t,{withZeroSuffix:v=!1}=t,{inline:_=!1}=t,{useColorsForValue:w=!1}=t,{prevLabel:k=""}=t,{title:$=""}=t,{prevTitle:x=null}=t;return e.$$set=e=>{"value"in e&&n(8,u=e.value),"prevValue"in e&&n(9,b=e.prevValue),"reversePrevSign"in e&&n(10,p=e.reversePrevSign),"digits"in e&&n(11,f=e.digits),"zero"in e&&n(12,O=e.zero),"withSign"in e&&n(13,j=e.withSign),"prefix"in e&&n(14,m=e.prefix),"withZeroPrefix"in e&&n(15,g=e.withZeroPrefix),"suffix"in e&&n(16,h=e.suffix),"suffixPrev"in e&&n(17,y=e.suffixPrev),"withZeroSuffix"in e&&n(18,v=e.withZeroSuffix),"inline"in e&&n(19,_=e.inline),"useColorsForValue"in e&&n(20,w=e.useColorsForValue),"prevLabel"in e&&n(21,k=e.prevLabel),"title"in e&&n(0,$=e.title),"prevTitle"in e&&n(1,x=e.prevTitle)},e.$$.update=()=>{2048&e.$$.dirty&&n(22,r=Math.pow(10,-f-1)),4585728&e.$$.dirty&&n(2,o=Math.abs(u)>r?m+Object(a.formatNumber)(u,f,j)+h:(g?m:"")+O+(v?h:"")),768&e.$$.dirty&&n(3,c=b&&b!==u&&null!==u),2173440&e.$$.dirty&&n(4,i=b?(k?k+": ":"")+Object(a.formatNumber)(b,f,j)+h:""),200448&e.$$.dirty&&n(5,s=b?Object(a.formatNumber)((u-b)*(p?-1:1),f,!0)+(y||h):""),4720384&e.$$.dirty&&n(6,l=(b?(u-b)*(p?-1:1)>r?"inc":(u-b)*(p?-1:1)<-r?"dec":"zero":"")+(_?" inline":" block")+" prev"),5243136&e.$$.dirty&&n(7,d=w&&u?u>r?"inc":u<-r?"dec":"zero":"")},[$,x,o,c,i,s,l,d,u,b,p,f,O,j,m,g,h,y,v,_,w,k]}class s extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1cksowx-style")||((t=Object(r.element)("style")).id="svelte-1cksowx-style",t.textContent="small.block.svelte-1cksowx{display:block}small.inline.svelte-1cksowx{margin-left:.5em}",Object(r.append)(document.head,t)),Object(r.init)(this,e,i,c,r.safe_not_equal,{value:8,prevValue:9,reversePrevSign:10,digits:11,zero:12,withSign:13,prefix:14,withZeroPrefix:15,suffix:16,suffixPrev:17,withZeroSuffix:18,inline:19,useColorsForValue:20,prevLabel:21,title:0,prevTitle:1})}}t.default=s},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(64);function c(e){let t,n,a,c,i,s,l,d,u,b,p,f;return i=new o.default({props:{value:e[0],suffix:e[5]}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("span"),a=Object(r.text)(e[1]),c=Object(r.space)(),Object(r.create_component)(i.$$.fragment),s=Object(r.space)(),l=Object(r.element)("div"),d=Object(r.element)("input"),Object(r.attr)(n,"class","svelte-sd3o2d"),d.disabled=e[6],Object(r.attr)(d,"type","range"),Object(r.attr)(d,"min",e[2]),Object(r.attr)(d,"max",e[3]),Object(r.attr)(d,"step",e[4]),Object(r.attr)(d,"class","svelte-sd3o2d"),Object(r.attr)(l,"class","svelte-sd3o2d"),Object(r.attr)(t,"class",u=Object(r.null_to_empty)(e[6]?"disabled":"")+" svelte-sd3o2d"),Object(r.toggle_class)(t,"inline",e[7])},m(o,u){Object(r.insert)(o,t,u),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(n,c),Object(r.mount_component)(i,n,null),Object(r.append)(t,s),Object(r.append)(t,l),Object(r.append)(l,d),Object(r.set_input_value)(d,e[0]),b=!0,p||(f=[Object(r.listen)(d,"change",e[9]),Object(r.listen)(d,"input",e[9]),Object(r.listen)(d,"input",e[8])],p=!0)},p(e,[n]){(!b||2&n)&&Object(r.set_data)(a,e[1]);const o={};1&n&&(o.value=e[0]),32&n&&(o.suffix=e[5]),i.$set(o),(!b||64&n)&&(d.disabled=e[6]),(!b||4&n)&&Object(r.attr)(d,"min",e[2]),(!b||8&n)&&Object(r.attr)(d,"max",e[3]),(!b||16&n)&&Object(r.attr)(d,"step",e[4]),1&n&&Object(r.set_input_value)(d,e[0]),(!b||64&n&&u!==(u=Object(r.null_to_empty)(e[6]?"disabled":"")+" svelte-sd3o2d"))&&Object(r.attr)(t,"class",u),192&n&&Object(r.toggle_class)(t,"inline",e[7])},i(e){b||(Object(r.transition_in)(i.$$.fragment,e),b=!0)},o(e){Object(r.transition_out)(i.$$.fragment,e),b=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(i),p=!1,Object(r.run_all)(f)}}}function i(e,t,n){const o=Object(a.createEventDispatcher)();let{label:c=""}=t,{value:i=0}=t,{min:s=0}=t,{max:l=100}=t,{step:d=1}=t,{suffix:u=""}=t,{disabled:b=!1}=t,{inline:p=!1}=t;return e.$$set=e=>{"label"in e&&n(1,c=e.label),"value"in e&&n(0,i=e.value),"min"in e&&n(2,s=e.min),"max"in e&&n(3,l=e.max),"step"in e&&n(4,d=e.step),"suffix"in e&&n(5,u=e.suffix),"disabled"in e&&n(6,b=e.disabled),"inline"in e&&n(7,p=e.inline)},[i,c,s,l,d,u,b,p,function(){o("change",i)},function(){i=Object(r.to_number)(this.value),n(0,i)}]}class s extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-sd3o2d-style")||((t=Object(r.element)("style")).id="svelte-sd3o2d-style",t.textContent=".disabled.svelte-sd3o2d.svelte-sd3o2d{color:#888}.inline.svelte-sd3o2d.svelte-sd3o2d{display:flex}.inline.svelte-sd3o2d span.svelte-sd3o2d{margin-left:.5em;line-height:1;min-width:3.5em;order:2\n    }.inline.svelte-sd3o2d div.svelte-sd3o2d{order:1}.inline.svelte-sd3o2d div.svelte-sd3o2d,.inline.svelte-sd3o2d div input.svelte-sd3o2d{width:100%}",Object(r.append)(document.head,t)),Object(r.init)(this,e,i,c,r.safe_not_equal,{label:1,value:0,min:2,max:3,step:4,suffix:5,disabled:6,inline:7})}}t.default=s},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(59),o=n(64);const c=e=>({}),i=e=>({}),s=e=>({}),l=e=>({});function d(e){let t,n,a,o;const s=e[15].value,l=Object(r.create_slot)(s,e,e[14],i),d=l||function(e){let t,n,a,o;const c=[b,u],i=[];function s(e,t){return"number"===e[8]?0:1}return t=s(e),n=i[t]=c[t](e),{c(){n.c(),a=Object(r.empty)()},m(e,n){i[t].m(e,n),Object(r.insert)(e,a,n),o=!0},p(e,o){let l=t;t=s(e),t===l?i[t].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),n=i[t],n||(n=i[t]=c[t](e),n.c()),Object(r.transition_in)(n,1),n.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(n),o=!0)},o(e){Object(r.transition_out)(n),o=!1},d(e){i[t].d(e),e&&Object(r.detach)(a)}}}(e);return{c(){t=Object(r.element)("span"),n=Object(r.space)(),a=Object(r.element)("span"),d&&d.c(),Object(r.attr)(t,"class","spacer svelte-78xok5"),Object(r.attr)(a,"class","value svelte-78xok5")},m(e,c){Object(r.insert)(e,t,c),Object(r.insert)(e,n,c),Object(r.insert)(e,a,c),d&&d.m(a,null),o=!0},p(e,t){l?l.p&&16384&t&&Object(r.update_slot)(l,s,e,e[14],t,c,i):d&&d.p&&964&t&&d.p(e,t)},i(e){o||(Object(r.transition_in)(d,e),o=!0)},o(e){Object(r.transition_out)(d,e),o=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),e&&Object(r.detach)(a),d&&d.d(e)}}}function u(e){let t;return{c(){t=Object(r.text)(e[2])},m(e,n){Object(r.insert)(e,t,n)},p(e,n){4&n&&Object(r.set_data)(t,e[2])},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function b(e){let t,n;return t=new o.default({props:{value:e[2],zero:e[6],digits:e[7],suffix:e[9]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4&n&&(r.value=e[2]),64&n&&(r.zero=e[6]),128&n&&(r.digits=e[7]),512&n&&(r.suffix=e[9]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function p(e){let t,n,o,c,i,u,b,p;const f=e[15].label,O=Object(r.create_slot)(f,e,e[14],l),j=O||function(e){let t;return{c(){t=Object(r.text)(e[0])},m(e,n){Object(r.insert)(e,t,n)},p(e,n){1&n&&Object(r.set_data)(t,e[0])},d(e){e&&Object(r.detach)(t)}}}(e);let m=!e[10]&&d(e);return{c(){t=Object(r.element)("span"),n=Object(r.element)("span"),j&&j.c(),o=Object(r.space)(),m&&m.c(),Object(r.attr)(n,"class","label svelte-78xok5"),Object(r.attr)(t,"class",c=Object(r.null_to_empty)("badge "+e[13])+" svelte-78xok5"),Object(r.set_style)(t,"--color",e[3]),Object(r.set_style)(t,"--background-color",e[4]),Object(r.attr)(t,"title",e[5]),Object(r.toggle_class)(t,"clickable",e[11]),Object(r.toggle_class)(t,"not-selected",e[12]),Object(r.toggle_class)(t,"fluid",e[1])},m(a,c){Object(r.insert)(a,t,c),Object(r.append)(t,n),j&&j.m(n,null),Object(r.append)(t,o),m&&m.m(t,null),u=!0,b||(p=Object(r.listen)(t,"click",e[16]),b=!0)},p(e,[n]){O?O.p&&16384&n&&Object(r.update_slot)(O,f,e,e[14],n,s,l):j&&j.p&&1&n&&j.p(e,n),e[10]?m&&(Object(r.group_outros)(),Object(r.transition_out)(m,1,1,()=>{m=null}),Object(r.check_outros)()):m?(m.p(e,n),1024&n&&Object(r.transition_in)(m,1)):(m=d(e),m.c(),Object(r.transition_in)(m,1),m.m(t,null)),(!u||8192&n&&c!==(c=Object(r.null_to_empty)("badge "+e[13])+" svelte-78xok5"))&&Object(r.attr)(t,"class",c),(!u||8&n)&&Object(r.set_style)(t,"--color",e[3]),(!u||16&n)&&Object(r.set_style)(t,"--background-color",e[4]),(!u||32&n)&&Object(r.attr)(t,"title",e[5]),10240&n&&Object(r.toggle_class)(t,"clickable",e[11]),12288&n&&Object(r.toggle_class)(t,"not-selected",e[12]),8194&n&&Object(r.toggle_class)(t,"fluid",e[1])},i(e){u||(Object(r.transition_in)(j,e),Object(r.transition_in)(m),Object(r.add_render_callback)(()=>{i||(i=Object(r.create_bidirectional_transition)(t,a.fade,{duration:1e3},!0)),i.run(1)}),u=!0)},o(e){Object(r.transition_out)(j,e),Object(r.transition_out)(m),i||(i=Object(r.create_bidirectional_transition)(t,a.fade,{duration:1e3},!1)),i.run(0),u=!1},d(e){e&&Object(r.detach)(t),j&&j.d(e),m&&m.d(),e&&i&&i.end(),b=!1,p()}}}function f(e,t,n){let{$$slots:a={},$$scope:o}=t,{label:c}=t,{fluid:i=!1}=t,{value:s=0}=t,{color:l="var(--textColor)"}=t,{bgColor:d="var(--background)"}=t,{title:u}=t,{zero:b="0"}=t,{digits:p=2}=t,{type:f="number"}=t,{suffix:O=""}=t,{onlyLabel:j=!1}=t,{clickable:m=!1}=t,{notSelected:g=!1}=t,{styling:h=""}=t;return e.$$set=e=>{"label"in e&&n(0,c=e.label),"fluid"in e&&n(1,i=e.fluid),"value"in e&&n(2,s=e.value),"color"in e&&n(3,l=e.color),"bgColor"in e&&n(4,d=e.bgColor),"title"in e&&n(5,u=e.title),"zero"in e&&n(6,b=e.zero),"digits"in e&&n(7,p=e.digits),"type"in e&&n(8,f=e.type),"suffix"in e&&n(9,O=e.suffix),"onlyLabel"in e&&n(10,j=e.onlyLabel),"clickable"in e&&n(11,m=e.clickable),"notSelected"in e&&n(12,g=e.notSelected),"styling"in e&&n(13,h=e.styling),"$$scope"in e&&n(14,o=e.$$scope)},[c,i,s,l,d,u,b,p,f,O,j,m,g,h,o,a,function(t){Object(r.bubble)(e,t)}]}class O extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-78xok5-style")||((t=Object(r.element)("style")).id="svelte-78xok5-style",t.textContent='.badge.svelte-78xok5.svelte-78xok5{display:inline-flex;justify-content:space-around;align-items:center;color:var(--color, #eee);background-color:var(--background-color, #222);margin:0 .5em .5em 0;padding:.125em;border-radius:.25em;transition:opacity .25s}.badge.not-selected.svelte-78xok5.svelte-78xok5{opacity:.35}.badge.not-selected.svelte-78xok5.svelte-78xok5:hover{opacity:1}.badge.clickable.svelte-78xok5.svelte-78xok5{cursor:pointer}.badge.svelte-78xok5 span.svelte-78xok5{display:inline-block;width:50%;text-align:center;min-width:2.5em}.badge.svelte-78xok5 .spacer.svelte-78xok5{width:1px;min-width:auto;height:.875em;margin-top:.075em;border-left:1px solid var(--color, #eee)}.badge.svelte-78xok5 span.label.svelte-78xok5{font-weight:500;color:inherit;margin:0}.badge.svelte-78xok5 span.value.svelte-78xok5{font-weight:300}.badge.fluid.svelte-78xok5 span.svelte-78xok5{width:auto}.badge.fluid.svelte-78xok5 span.label.svelte-78xok5{padding:0 .5em}.badge.fluid.svelte-78xok5 span.value.svelte-78xok5{padding:0 .5em}.badge.text.svelte-78xok5.svelte-78xok5:before{content:"\\A";width:5px;height:5px;display:inline-block;border-radius:50%;background:var(--textColor);margin-right:.5rem;top:-3px;position:relative}.badge.text.svelte-78xok5.svelte-78xok5{background:transparent!important;display:block !important;padding:0!important;margin:0 0 0.05em 0!important}.badge.text.svelte-78xok5 span.label.svelte-78xok5{display:inline;padding:0!important}.badge.text.svelte-78xok5 span.label.svelte-78xok5:after{content:":";margin-left:.125em;display:inline-block}.badge.text.svelte-78xok5 span.spacer.svelte-78xok5{border-left-width:0px;width:0}.badge.text.svelte-78xok5 span.value.svelte-78xok5{padding:0!important;min-width:auto}',Object(r.append)(document.head,t)),Object(r.init)(this,e,f,p,r.safe_not_equal,{label:0,fluid:1,value:2,color:3,bgColor:4,title:5,zero:6,digits:7,type:8,suffix:9,onlyLabel:10,clickable:11,notSelected:12,styling:13})}}t.default=O},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9);function c(e,t,n){const r=e.slice();return r[18]=t[n],r[20]=n,r}function i(e,t,n){const r=e.slice();return r[21]=t[n],r[23]=n,r}function s(e){let t,n;return{c(){t=Object(r.element)("span"),n=Object(r.text)(e[9]),Object(r.attr)(t,"class","svelte-iym9uj")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){512&t&&Object(r.set_data)(n,e[9])},d(e){e&&Object(r.detach)(t)}}}function l(e){let t,n,a,o,c,i=e[21].label+"",s=e[0]&&(e[0]===e[21]||Array.isArray(e[0])&&e[0].includes(e[21])),l=s&&b(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("span"),a=Object(r.text)(i),o=Object(r.space)(),l&&l.c(),Object(r.attr)(t,"class","dropdown-item svelte-iym9uj"),Object(r.attr)(t,"data-idx",c=e[23]),Object(r.toggle_class)(t,"is-active",e[0]&&(e[0]===e[21]||Array.isArray(e[0])&&e[0].includes(e[21])))},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(t,o),l&&l.m(t,null)},p(e,n){8&n&&i!==(i=e[21].label+"")&&Object(r.set_data)(a,i),9&n&&(s=e[0]&&(e[0]===e[21]||Array.isArray(e[0])&&e[0].includes(e[21]))),s?l||(l=b(e),l.c(),l.m(t,null)):l&&(l.d(1),l=null),8&n&&c!==(c=e[23])&&Object(r.attr)(t,"data-idx",c),9&n&&Object(r.toggle_class)(t,"is-active",e[0]&&(e[0]===e[21]||Array.isArray(e[0])&&e[0].includes(e[21])))},d(e){e&&Object(r.detach)(t),l&&l.d()}}}function d(e){let t,n,a=e[21].label+"";return{c(){t=Object(r.element)("div"),n=Object(r.text)(a),Object(r.attr)(t,"class","menu-label svelte-iym9uj")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){8&t&&a!==(a=e[21].label+"")&&Object(r.set_data)(n,a)},d(e){e&&Object(r.detach)(t)}}}function u(e){let t;return{c(){t=Object(r.element)("hr"),Object(r.attr)(t,"class","dropdown-divider")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,d(e){e&&Object(r.detach)(t)}}}function b(e){let t;return{c(){t=Object(r.element)("span"),t.innerHTML='<i class="fas fa-check" aria-hidden="true"></i>',Object(r.attr)(t,"class","icon is-small svelte-iym9uj")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function p(e,t){let n,a;function o(e,t){return"divider"===e[21].type?u:"label"===e[21].type?d:l}let c=o(t),i=c(t);return{key:e,first:null,c(){n=Object(r.empty)(),i.c(),a=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),i.m(e,t),Object(r.insert)(e,a,t)},p(e,t){c===(c=o(e))&&i?i.p(e,t):(i.d(1),i=c(e),i&&(i.c(),i.m(a.parentNode,a)))},d(e){e&&Object(r.detach)(n),i.d(e),e&&Object(r.detach)(a)}}}function f(e){let t,n,a,o,i,s,l=[],d=new Map,u=e[5];const b=e=>e[18];for(let t=0;t<u.length;t+=1){let n=c(e,u,t),r=b(n);d.set(r,l[t]=h(r,n))}return{c(){t=Object(r.element)("hr"),n=Object(r.space)(),a=Object(r.element)("div"),o=Object(r.text)(e[4]),i=Object(r.space)();for(let e=0;e<l.length;e+=1)l[e].c();s=Object(r.empty)(),Object(r.attr)(t,"class","dropdown-divider"),Object(r.attr)(a,"class","menu-label svelte-iym9uj")},m(e,c){Object(r.insert)(e,t,c),Object(r.insert)(e,n,c),Object(r.insert)(e,a,c),Object(r.append)(a,o),Object(r.insert)(e,i,c);for(let t=0;t<l.length;t+=1)l[t].m(e,c);Object(r.insert)(e,s,c)},p(e,t){if(16&t&&Object(r.set_data)(o,e[4]),34&t){const n=e[5];l=Object(r.update_keyed_each)(l,t,b,1,e,n,d,s.parentNode,r.destroy_block,h,s,c)}},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),e&&Object(r.detach)(a),e&&Object(r.detach)(i);for(let t=0;t<l.length;t+=1)l[t].d(e);e&&Object(r.detach)(s)}}}function O(e){let t,n,a,o,c,i,s=e[18].label+"",l=e[1]&&(e[1]===e[18]||Array.isArray(e[1])&&e[1].includes(e[18])),d=l&&g(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("span"),a=Object(r.text)(s),o=Object(r.space)(),d&&d.c(),c=Object(r.space)(),Object(r.attr)(t,"class","dropdown-item svelte-iym9uj"),Object(r.attr)(t,"data-option-idx",i=e[20]),Object(r.toggle_class)(t,"is-active",e[1]&&(e[1]===e[18]||Array.isArray(e[1])&&e[1].includes(e[18])))},m(e,i){Object(r.insert)(e,t,i),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(t,o),d&&d.m(t,null),Object(r.append)(t,c)},p(e,n){32&n&&s!==(s=e[18].label+"")&&Object(r.set_data)(a,s),34&n&&(l=e[1]&&(e[1]===e[18]||Array.isArray(e[1])&&e[1].includes(e[18]))),l?d||(d=g(e),d.c(),d.m(t,c)):d&&(d.d(1),d=null),32&n&&i!==(i=e[20])&&Object(r.attr)(t,"data-option-idx",i),34&n&&Object(r.toggle_class)(t,"is-active",e[1]&&(e[1]===e[18]||Array.isArray(e[1])&&e[1].includes(e[18])))},d(e){e&&Object(r.detach)(t),d&&d.d()}}}function j(e){let t,n,a=e[18].label+"";return{c(){t=Object(r.element)("div"),n=Object(r.text)(a),Object(r.attr)(t,"class","menu-label svelte-iym9uj")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){32&t&&a!==(a=e[18].label+"")&&Object(r.set_data)(n,a)},d(e){e&&Object(r.detach)(t)}}}function m(e){let t;return{c(){t=Object(r.element)("hr"),Object(r.attr)(t,"class","dropdown-divider")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,d(e){e&&Object(r.detach)(t)}}}function g(e){let t;return{c(){t=Object(r.element)("span"),t.innerHTML='<i class="fas fa-check" aria-hidden="true"></i>',Object(r.attr)(t,"class","icon is-small svelte-iym9uj")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function h(e,t){let n,a;function o(e,t){return"divider"===e[18].type?m:"label"===e[18].type?j:O}let c=o(t),i=c(t);return{key:e,first:null,c(){n=Object(r.empty)(),i.c(),a=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),i.m(e,t),Object(r.insert)(e,a,t)},p(e,t){c===(c=o(e))&&i?i.p(e,t):(i.d(1),i=c(e),i&&(i.c(),i.m(a.parentNode,a)))},d(e){e&&Object(r.detach)(n),i.d(e),e&&Object(r.detach)(a)}}}function y(e){let t,n,a,o,c,l,d,u,b,O,j,m,g=[],h=new Map,y=!e[8]&&s(e),v=e[3];const _=e=>e[21];for(let t=0;t<v.length;t+=1){let n=i(e,v,t),r=_(n);h.set(r,g[t]=p(r,n))}let w=e[5].length&&f(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),a=Object(r.element)("div"),o=Object(r.element)("button"),y&&y.c(),c=Object(r.space)(),l=Object(r.element)("span"),l.innerHTML='<i class="fas fa-angle-down" aria-hidden="true"></i>',d=Object(r.space)(),u=Object(r.element)("div"),b=Object(r.element)("div");for(let e=0;e<g.length;e+=1)g[e].c();O=Object(r.space)(),w&&w.c(),Object(r.attr)(l,"class","icon is-small svelte-iym9uj"),Object(r.attr)(o,"class","button svelte-iym9uj"),Object(r.attr)(o,"title",e[9]),Object(r.attr)(a,"class","dropdown-trigger svelte-iym9uj"),Object(r.attr)(b,"class","dropdown-content svelte-iym9uj"),Object(r.attr)(u,"class","dropdown-menu svelte-iym9uj"),Object(r.attr)(u,"role","menu"),Object(r.toggle_class)(u,"right",e[6]),Object(r.toggle_class)(u,"top",e[7]),Object(r.attr)(n,"class","dropdown is-hoverable svelte-iym9uj"),Object(r.attr)(t,"class","multi-select svelte-iym9uj"),Object(r.toggle_class)(t,"disabled",e[2])},m(i,s){Object(r.insert)(i,t,s),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(a,o),y&&y.m(o,null),Object(r.append)(o,c),Object(r.append)(o,l),Object(r.append)(n,d),Object(r.append)(n,u),Object(r.append)(u,b);for(let e=0;e<g.length;e+=1)g[e].m(b,null);Object(r.append)(b,O),w&&w.m(b,null),j||(m=Object(r.listen)(u,"click",e[10]),j=!0)},p(e,[n]){if(e[8]?y&&(y.d(1),y=null):y?y.p(e,n):(y=s(e),y.c(),y.m(o,c)),512&n&&Object(r.attr)(o,"title",e[9]),9&n){const t=e[3];g=Object(r.update_keyed_each)(g,n,_,1,e,t,h,b,r.destroy_block,p,O,i)}e[5].length?w?w.p(e,n):(w=f(e),w.c(),w.m(b,null)):w&&(w.d(1),w=null),64&n&&Object(r.toggle_class)(u,"right",e[6]),128&n&&Object(r.toggle_class)(u,"top",e[7]),4&n&&Object(r.toggle_class)(t,"disabled",e[2])},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),y&&y.d();for(let e=0;e<g.length;e+=1)g[e].d();w&&w.d(),j=!1,m()}}}function v(e,t,n,r=!1,a=1){if(r){const r=t?t.findIndex(t=>t===e[n]):-1;let o=[];return o=r>=0?t.filter((e,n)=>n!==r||t.length<=a):t.concat([e[n]]),e.forEach((e,t)=>{const n=o.find(t=>t===e);n&&(n.idx=t)}),o.sort((e,t)=>e.idx-t.idx)}return t!==e[n]||a<1?t===e[n]&&a<1?null:e[n]:null}function _(e,t,n){let c;Object(r.component_subscribe)(e,o._,e=>n(16,c=e));const i=Object(a.createEventDispatcher)();let s,{disabled:l}=t,{multiple:d=!1}=t,{value:u=(d?[]:null)}=t,{items:b=[]}=t,{optionsLabel:p=c.common.options}=t,{optionMultiple:f=!1}=t,{option:O=(f?[]:null)}=t,{optionItems:j=[]}=t,{noSelected:m=Object(o.trans)("common.nothingSelected")}=t,{minSelected:g=1}=t,{optionsMinSelected:h=1}=t,{right:y=!1}=t,{top:_=!1}=t,{noLabel:w=!1}=t;return e.$$set=e=>{"disabled"in e&&n(2,l=e.disabled),"multiple"in e&&n(11,d=e.multiple),"value"in e&&n(0,u=e.value),"items"in e&&n(3,b=e.items),"optionsLabel"in e&&n(4,p=e.optionsLabel),"optionMultiple"in e&&n(12,f=e.optionMultiple),"option"in e&&n(1,O=e.option),"optionItems"in e&&n(5,j=e.optionItems),"noSelected"in e&&n(13,m=e.noSelected),"minSelected"in e&&n(14,g=e.minSelected),"optionsMinSelected"in e&&n(15,h=e.optionsMinSelected),"right"in e&&n(6,y=e.right),"top"in e&&n(7,_=e.top),"noLabel"in e&&n(8,w=e.noLabel)},e.$$.update=()=>{8193&e.$$.dirty&&n(9,s=!u||Array.isArray(u)&&!u.length?m:(Array.isArray(u)?u:[u.label?u:{label:u}]).map(e=>e.label).join(", "))},[u,O,l,b,p,j,y,_,w,s,function(e){const t=e.target.closest(".dropdown-item");if(!t)return;const r=t.dataset.idx,a=t.dataset.optionIdx;if(!(!r&&!a||r&&(r<0||r>=b.length)||a&&(a<0||a>=j.length)))if(r){const e=v(b,u,r,d,g);e&&(n(0,u=e),i("change",{value:u,option:O,changed:"value"}))}else{const e=v(j,O,a,f,h);e&&(n(1,O=e),i("change",{value:u,option:O,changed:"option"}))}},d,f,m,g,h]}class w extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-iym9uj-style")||((t=Object(r.element)("style")).id="svelte-iym9uj-style",t.textContent=".multi-select.svelte-iym9uj.svelte-iym9uj{max-width:100%;font-size:inherit}.dropdown.svelte-iym9uj.svelte-iym9uj{max-width:100%}.dropdown-trigger.svelte-iym9uj.svelte-iym9uj{max-width:100%}.dropdown-trigger.svelte-iym9uj .button.svelte-iym9uj{max-width:100%;height:2em;font-size:inherit;padding-left:.5em;padding-right:1.25em;padding-bottom:0;color:var(--textColor, #000);background-color:var(--foreground, #fff);border-color:transparent}.dropdown-trigger.svelte-iym9uj .button.svelte-iym9uj:active,.dropdown-trigger.svelte-iym9uj .button.svelte-iym9uj:focus{outline:none;box-shadow:none}.dropdown-trigger.svelte-iym9uj .button span.svelte-iym9uj{overflow-x:hidden;text-overflow:ellipsis}.dropdown-trigger.svelte-iym9uj .button .icon.svelte-iym9uj{position:absolute;top:.5em;right:.25em}.dropdown-menu.svelte-iym9uj.svelte-iym9uj{right:0;min-width:12.6rem;max-height:25.5rem;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--selected, #3273dc) var(--foreground, #fff)}.dropdown-menu.svelte-iym9uj.svelte-iym9uj::-webkit-scrollbar{width:.25rem}.dropdown-menu.svelte-iym9uj.svelte-iym9uj::-webkit-scrollbar-thumb{background-color:var(--selected, #3273dc) ;border-radius:6px;border:3px solid var(--selected, #3273dc)}.dropdown-menu.right.svelte-iym9uj.svelte-iym9uj{left:auto}.dropdown-menu.top.svelte-iym9uj.svelte-iym9uj{bottom:2.25rem;top:auto}.dropdown-content.svelte-iym9uj.svelte-iym9uj{color:var(--textColor, #000);background-color:var(--foreground, #fff);padding-top:0;box-shadow:0 2px 3px rgba(200, 200, 00, 0.1), 0 0 0 1px rgba(200, 200, 200, 0.1)}.dropdown-content.svelte-iym9uj .menu-label.svelte-iym9uj{text-align:center}.dropdown-content.svelte-iym9uj .menu-label.svelte-iym9uj:not(:first-child){margin-top:.5em}.dropdown-content.svelte-iym9uj .menu-label.svelte-iym9uj:not(:last-child){margin-bottom:.5em}.dropdown-item.svelte-iym9uj.svelte-iym9uj{white-space:nowrap;padding:.25em 2.5em .25em 1em;font-size:inherit;color:inherit;overflow-x:hidden;text-overflow:ellipsis;cursor:pointer;line-height:1.25}.dropdown-item.svelte-iym9uj.svelte-iym9uj:hover{background-color:var(--hover);border-color:transparent}.dropdown-item.is-active.svelte-iym9uj.svelte-iym9uj,.dropdown-item.is-active.svelte-iym9uj.svelte-iym9uj:hover{color:var(--textColor);background-color:var(--selected)}.dropdown-item.svelte-iym9uj .icon.svelte-iym9uj{position:absolute;top:.5em;right:.5em;font-size:smaller}",Object(r.append)(document.head,t)),Object(r.init)(this,e,_,y,r.safe_not_equal,{disabled:2,multiple:11,value:0,items:3,optionsLabel:4,optionMultiple:12,option:1,optionItems:5,noSelected:13,minSelected:14,optionsMinSelected:15,right:6,top:7,noLabel:8})}}t.default=w},function(e,t,n){"use strict";n.r(t);var r=n(6),a=n(39),o=n(7),c=n(69),i=n(52),s=n(37),l=n(15),d=n(13),u=n(1);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){O(o,r,a,c,i,"next",e)}function i(e){O(o,r,a,c,i,"throw",e)}c(void 0)}))}}var m,g,h,y,v,_,w,k,$,x,S,P={"76561198059659922":"patian25","76561198028768705":"thejanez",1994101560659098:"xoxobluff","76561198138327464":"altrowilddog","76561198165064325":"solace_to_ziomal","76561198855288628":"inbourne","76561198136177445":"riviengt","76561198967371424":"sinkingship1991","76561199004224834":"thanos2137","76561198023909718":"danielduel","76561198212019365":"fnyt","76561197980434129":"meldi__","76561198067150351":"koxsik3","76561197966674102":"majikkuuu","76561198025451538":"drakonno","76561197994110158":"sanorek","76561198108580962":"coggers","76561198034203862":"vr_agent","76561198093469724":"sebanan",3702342373170767:"xjedam","76561197995161445":"mediekore","76561198035381239":"motzel"},I=(S=j((function*(){var e=yield Object(s.default)().get("twitchToken",!0);if(!e)return null;var t=Object(o.dateFromString)(e.expires),n=t-new Date;return p(p({},e),{},{expires:t,expires_in:n>0?n:0})})),function(){return S.apply(this,arguments)}),C=(x=j((function*(e){var t=yield I();if(!t||!t.expires_in||t.expires_in<=0)return null;var n=yield Object(c.getProfileByUsername)(t.accessToken,e);return n&&n.data&&n.data.length?n.data[0]:null})),function(e){return x.apply(this,arguments)}),T=($=j((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"archive",n=yield I();return!n||!n.expires_in||n.expires_in<=0?null:Object(c.getVideos)(n.accessToken,e,t)})),function(e){return $.apply(this,arguments)}),A=(k=j((function*(e){var t=yield I();return!t||!t.expires_in||t.expires_in<=0?null:Object(c.getStreams)(t.accessToken,e)})),function(e){return k.apply(this,arguments)}),q=(w=j((function*(e,t){var n=yield z(e);yield E(Object.assign({lastUpdated:null},null!=n?n:{},{login:t,playerId:e}))})),function(e,t){return w.apply(this,arguments)}),R=(_=j((function*(){Object.entries(P).forEach(e=>{q(e[0],e[1])})})),function(){return _.apply(this,arguments)}),z=(v=j((function*(e){var t;return null!==(t=yield Object(i.default)().get(e))&&void 0!==t?t:null})),function(e){return v.apply(this,arguments)}),E=(y=j((function*(e){return Object(i.default)().set(e)})),function(e){return y.apply(this,arguments)}),B=(h=j((function*(e){var t=yield z(e,!0),n=yield Object(l.getPlayerInfo)(e);if((null==t?void 0:t.id)&&n&&n.lastUpdated){var r=n.recentPlay?n.recentPlay:n.lastUpdated,a=t.lastUpdated;if(!r||!a||Object(o.dateFromString)(r)>Object(o.dateFromString)(a)){var c,i=yield T(t.id);t.videos=null!==(c=null==i?void 0:i.data)&&void 0!==c?c:null,t.lastUpdated=new Date,yield E(t),i&&i.data&&i.data.length&&d.default.publish("player-twitch-videos-updated",{nodeId:Object(u.default)().getId(),playerId:e,twitchProfile:t})}}})),function(e){return h.apply(this,arguments)}),D=(g=j((function*(e){return!!(yield z(e))})),function(e){return g.apply(this,arguments)});t.default={getAuthUrl:c.getAuthUrl,getCurrentToken:I,getProfileByUsername:C,fetchVideos:T,fetchStreams:A,updateVideosForPlayerId:B,processTokenIfAvailable:(m=j((function*(){var e=(()=>{var e=Object(r.getFirstRegexpMatch)(/scoresaber.com\/#(.*)$/,window.location.href);if(!e)return null;var t=/access_token=(.*?)(&|$)/.exec(e);if(!t)return null;var n=/state=(.*?)(&|$)/.exec(e);return{accessToken:t[1],url:n?a.SCORESABER_URL+"/u/"+n[1]:""}})();if(e){var t=yield Object(c.validateToken)(e.accessToken),n=1e3*t.expires_in;yield Object(s.default)().set(Object.assign({},t,{accessToken:e.accessToken,expires:new Date(Date.now()+n).toISOString(),expires_in:n}),"twitchToken"),e.url&&(window.location.href=e.url)}})),function(){return m.apply(this,arguments)}),updateTwitchUser:q,createTwitchUsersCache:R,getProfileByPlayerId:z,isProfileTwitchConnected:D,storeProfile:E}},function(e,t,n){"use strict";n.r(t),n.d(t,"getAuthUrl",(function(){return f})),n.d(t,"validateToken",(function(){return O})),n.d(t,"getProfileByUsername",(function(){return j})),n.d(t,"getVideos",(function(){return m})),n.d(t,"getStreams",(function(){return g}));var r=n(12),a=n(25),o=n(39);function c(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){c(o,r,a,i,s,"next",e)}function s(e){c(o,r,a,i,s,"throw",e)}i(void 0)}))}}var s,l,d,u,b="c60s8xch3rksxz2i2rtuof3mczskzc",p=(e,t)=>Object(r.queueFetchJson)(a.default.TWITCH,e,{headers:{"Client-ID":b,Authorization:"Bearer ".concat(t)}}),f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"https://id.twitch.tv/oauth2/authorize?client_id=".concat(b,"&redirect_uri=").concat(encodeURIComponent(o.SCORESABER_URL+"/"),"&response_type=token&scope=").concat(encodeURIComponent(t),"&state=").concat(encodeURIComponent(e))},O=(u=i((function*(e){return Object(r.queueFetchJson)(a.default.TWITCH,"https://id.twitch.tv/oauth2/validate",{headers:{Authorization:"OAuth "+e}})})),function(e){return u.apply(this,arguments)}),j=(d=i((function*(e,t){return p("https://api.twitch.tv/helix/users?login=".concat(encodeURIComponent(t)),e)})),function(e,t){return d.apply(this,arguments)}),m=(l=i((function*(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"archive";return p("https://api.twitch.tv/helix/videos?user_id=".concat(encodeURIComponent(t),"&type=").concat(encodeURIComponent(n)),e)})),function(e,t){return l.apply(this,arguments)}),g=(s=i((function*(e,t){return p("https://api.twitch.tv/helix/streams?user_id=".concat(encodeURIComponent(t)),e)})),function(e,t){return s.apply(this,arguments)})},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(59),c=n(71),i=n(73),s=n(74),l=n(75),d=n(6),u=n(3),b=n(76),p=n(38),f=n(7),O=n(77),j=n(13),m=n(15),g=n(36),h=n(1),y=n(9),v=n(8),_=n(35),w=n(11);function k(e){let t,n,a,o,c,s,l;n=new i.default({props:{iconFa:"fas fa-sync-alt",title:e[2]?e[6].refresh.btnDisabledBgDlInProgress:"",label:e[1],disabled:e[5].started||e[2]}}),n.$on("click",e[9]);const d=[S,x],u=[];function b(e,t){return e[5].errorMsg&&e[5].errorMsg.length?1:0}return o=b(e),c=u[o]=d[o](e),{c(){t=Object(r.element)("span"),Object(r.create_component)(n.$$.fragment),a=Object(r.space)(),c.c(),s=Object(r.empty)(),Object(r.attr)(t,"class","btn-cont svelte-14gicj9")},m(e,c){Object(r.insert)(e,t,c),Object(r.mount_component)(n,t,null),Object(r.insert)(e,a,c),u[o].m(e,c),Object(r.insert)(e,s,c),l=!0},p(e,t){const a={};68&t&&(a.title=e[2]?e[6].refresh.btnDisabledBgDlInProgress:""),2&t&&(a.label=e[1]),36&t&&(a.disabled=e[5].started||e[2]),n.$set(a);let i=o;o=b(e),o===i?u[o].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(u[i],1,1,()=>{u[i]=null}),Object(r.check_outros)(),c=u[o],c||(c=u[o]=d[o](e),c.c()),Object(r.transition_in)(c,1),c.m(s.parentNode,s))},i(e){l||(Object(r.transition_in)(n.$$.fragment,e),Object(r.transition_in)(c),l=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),Object(r.transition_out)(c),l=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),e&&Object(r.detach)(a),u[o].d(e),e&&Object(r.detach)(s)}}}function $(e){let t,n;return t=new c.default({props:{value:e[5].progress,label:e[5].label,subLabel:e[5].subLabel,maxWidth:"16rem"}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};32&n&&(r.value=e[5].progress),32&n&&(r.label=e[5].label),32&n&&(r.subLabel=e[5].subLabel),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function x(e){let t,n,a=e[5].errorMsg+"";return{c(){t=Object(r.element)("span"),n=Object(r.text)(a),Object(r.attr)(t,"class","error svelte-14gicj9")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){32&t&&a!==(a=e[5].errorMsg+"")&&Object(r.set_data)(n,a)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function S(e){let t,n,a=e[0]&&P(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=P(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function P(e){let t,n,a,o,c,i,l=e[6].refresh.lastDownload+"";return c=new s.default({props:{date:e[4],noDate:"-"}}),{c(){t=Object(r.element)("strong"),n=Object(r.text)(l),a=Object(r.space)(),o=Object(r.element)("span"),Object(r.create_component)(c.$$.fragment),Object(r.attr)(t,"class","svelte-14gicj9")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.insert)(e,a,s),Object(r.insert)(e,o,s),Object(r.mount_component)(c,o,null),i=!0},p(e,t){(!i||64&t)&&l!==(l=e[6].refresh.lastDownload+"")&&Object(r.set_data)(n,l);const a={};16&t&&(a.date=e[4]),c.$set(a)},i(e){i||(Object(r.transition_in)(c.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(a),e&&Object(r.detach)(o),Object(r.destroy_component)(c)}}}function I(e){let t,n,a,c,i;const s=[$,k],l=[];function d(e,t){return e[5].started?0:1}return n=d(e),a=l[n]=s[n](e),{c(){t=Object(r.element)("div"),a.c(),Object(r.attr)(t,"class","refresh-widget svelte-14gicj9"),Object(r.toggle_class)(t,"pulse",e[2]),Object(r.toggle_class)(t,"error",e[3])},m(e,a){Object(r.insert)(e,t,a),l[n].m(t,null),i=!0},p(e,[o]){let c=n;n=d(e),n===c?l[n].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(l[c],1,1,()=>{l[c]=null}),Object(r.check_outros)(),a=l[n],a||(a=l[n]=s[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null)),4&o&&Object(r.toggle_class)(t,"pulse",e[2]),8&o&&Object(r.toggle_class)(t,"error",e[3])},i(e){i||(Object(r.transition_in)(a),Object(r.add_render_callback)(()=>{c||(c=Object(r.create_bidirectional_transition)(t,o.fade,{duration:1e3},!0)),c.run(1)}),i=!0)},o(e){Object(r.transition_out)(a),c||(c=Object(r.create_bidirectional_transition)(t,o.fade,{duration:1e3},!1)),c.run(0),i=!1},d(e){e&&Object(r.detach)(t),l[n].d(),e&&c&&c.end()}}}function C(e,t,n){let o,c,i;Object(r.component_subscribe)(e,y._,e=>n(6,i=e));let{profileId:s}=t,{forceShowProgress:k=!1}=t,{showLastDownloaded:$=!0}=t,{refreshLabel:x=""}=t,S={started:!1,progress:0,label:"",subLabel:"",errorMsg:""},P=Object(O.createBroadcastChannelStore)("refresh-widget",S);Object(r.component_subscribe)(e,P,e=>n(5,c=e));let I=Object(O.createBroadcastChannelStore)("refresh-widget-last-update"+(s?"-"+s:""),null);Object(r.component_subscribe)(e,I,e=>n(4,o=e));let C=!0,T=!1,A=!1,q=!1;async function R(){if(s){const e=await Object(m.getPlayerLastUpdated)(s);e&&Object(r.set_store_value)(I,o=Object(f.dateFromString)(e),o)}else Object(r.set_store_value)(I,o=Object(f.dateFromString)(await Object(l.lastUpdated)()),o)}function z(e){S={...S,...e},Object(r.set_store_value)(P,c=S,c)}function E(e){z({progress:e.percent,label:Object(d.escapeHtml)(e.name),subLabel:e.page.toString()+(e.wait?" "+Object(y.trans)("refresh.waiting",{seconds:Object(v.formatNumber)(Math.floor(e.wait/1e3),0)}):"")})}async function B(){(async function(){if(q=!1,j.default.publish("start-data-refreshing",{nodeId:Object(h.default)().getId()}),j.default.publish("dl-manager-pause-cmd"),z({started:!0,progress:0,subLabel:i.refresh.rankedsDownload}),await Object(b.updateRankeds)(),q)return z({label:"",subLabel:"",started:!1}),void j.default.publish("dl-manager-unpause-cmd");const e=await Object(_.getActiveCountry)();z({errorMsg:"",label:"",subLabel:Object(y.trans)("refresh.countryPlayersDownload",{country:e?e.toUpperCase():null})});const t=await Object(p.updateActivePlayers)(!1);if(z({label:"",subLabel:""}),q)return z({label:"",subLabel:"",started:!1}),void j.default.publish("dl-manager-unpause-cmd");for(let e=0;e<t.length;e++)if(await Object(p.updatePlayerScores)(t[e].id,!1,n=>E(Object.assign({},n,{percent:Math.floor(e/t.length*100)}))),q)return z({label:"",subLabel:"",started:!1}),void j.default.publish("dl-manager-unpause-cmd");const n=await Object(g.getMainPlayerId)();if(n&&await Object(w.shouldBeatSaviorBeUpdated)(n))try{z({errorMsg:"",label:"",subLabel:i.refresh.beatSavior}),await Object(w.updateBeatSaviorData)(n)}catch{}z({started:!1}),await R(),j.default.publish("data-refreshed",{nodeId:Object(h.default)().getId()}),j.default.publish("dl-manager-unpause-cmd")})().catch(e=>{z({started:!1,errorMsg:i.refresh.error}),j.default.publish("dl-manager-unpause-cmd"),u.default.error("Can not refresh users"),console.error(e)})}return Object(a.onMount)(async()=>{z({errorMsg:""}),C=await Object(g.isBackgroundDownloadEnabled)();const e=j.default.on("config-changed",async()=>{C=await Object(g.isBackgroundDownloadEnabled)(!0)}),t=j.default.on("bg-download-started",({size:e})=>{u.default.debug("Background download STARTED event. Queue size: "+e,"RefreshWidget"),n(2,T=!0),n(3,A=!1)}),r=j.default.on("bg-download-progress",({size:e,label:t,name:r,page:a,wait:o})=>{u.default.debug(`Background download PROGRESS event. Queue size: ${e}, Job label: ${t}. Progress label: ${r} / ${o?"[Waiting "+Math.round(o/1e3)+"s]":a}`,"RefreshWidget"),n(2,T=!0),n(3,A=!1)}),a=j.default.on("bg-download-error",e=>{u.default.debug("Background download ERROR event.","RefreshWidget"),u.default.error(e),n(2,T=!1),n(3,A=!0)}),o=j.default.on("bg-download-stopped",async e=>{u.default.debug("Background download STOPPED event.","RefreshWidget"),n(2,T=!1),await R()}),c=j.default.on("player-scores-updated",async({playerId:e})=>{e===s&&await R()}),i=j.default.on("main-player-changed",async()=>{await B()}),l=j.default.on("refresh-all-cmd",async()=>{await B()});return await R(),setInterval(()=>R(),6e4),()=>{e(),t(),r(),a(),o(),c(),i(),l()}}),e.$$set=e=>{"profileId"in e&&n(10,s=e.profileId),"forceShowProgress"in e&&n(11,k=e.forceShowProgress),"showLastDownloaded"in e&&n(0,$=e.showLastDownloaded),"refreshLabel"in e&&n(1,x=e.refreshLabel)},[$,x,T,A,o,c,i,P,I,B,s,k,function(){q=!0,j.default.publish("stop-fetching-scores-cmd")}]}class T extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-14gicj9-style")||((t=Object(r.element)("style")).id="svelte-14gicj9-style",t.textContent=".refresh-widget.svelte-14gicj9.svelte-14gicj9{display:inline-flex;align-items:center;color:var(--dimmed, #666)}.refresh-widget.svelte-14gicj9 strong.svelte-14gicj9{color:inherit !important;margin-right:.25em}.refresh-widget.pulse.svelte-14gicj9.svelte-14gicj9{animation:svelte-14gicj9-pulse 1.5s infinite}@keyframes svelte-14gicj9-pulse{0%{color:var(--dimmed)}50%{color:var(--foreground)}100%{color:var(--dimmed)}}.btn-cont.svelte-14gicj9.svelte-14gicj9{font-size:.5em;margin-right:.5em}.btn-cont.svelte-14gicj9 .button{margin-bottom:0}.error.svelte-14gicj9.svelte-14gicj9{color:var(--decrease, red) !important}",Object(r.append)(document.head,t)),Object(r.init)(this,e,C,I,r.safe_not_equal,{profileId:10,forceShowProgress:11,showLastDownloaded:0,refreshLabel:1,stopRefreshing:12})}get stopRefreshing(){return this.$$.ctx[12]}}t.default=T},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(72);function o(e){let t,n,o;return n=new a.default({props:{label:e[2],subLabel:e[3],separator:e[4]}}),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment)},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,t){const r={};4&t&&(r.label=e[2]),8&t&&(r.subLabel=e[3]),16&t&&(r.separator=e[4]),n.$set(r)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function c(e){let t,n,o;return n=new a.default({props:{label:e[2],subLabel:e[3],separator:e[4]}}),{c(){t=Object(r.element)("span"),Object(r.create_component)(n.$$.fragment)},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,t){const r={};4&t&&(r.label=e[2]),8&t&&(r.subLabel=e[3]),16&t&&(r.separator=e[4]),n.$set(r)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function i(e){let t,n,a,i,s,l;const d=[c,o],u=[];function b(e,t){return e[5]?0:1}return i=b(e),s=u[i]=d[i](e),{c(){t=Object(r.element)("span"),n=Object(r.element)("progress"),a=Object(r.space)(),s.c(),n.value=e[0],Object(r.attr)(n,"max",e[1]),Object(r.set_style)(n,"max-width",e[6]),Object(r.attr)(n,"class","svelte-1pus310")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),u[i].m(t,null),l=!0},p(e,[a]){(!l||1&a)&&(n.value=e[0]),(!l||2&a)&&Object(r.attr)(n,"max",e[1]),(!l||64&a)&&Object(r.set_style)(n,"max-width",e[6]);let o=i;i=b(e),i===o?u[i].p(e,a):(Object(r.group_outros)(),Object(r.transition_out)(u[o],1,1,()=>{u[o]=null}),Object(r.check_outros)(),s=u[i],s||(s=u[i]=d[i](e),s.c()),Object(r.transition_in)(s,1),s.m(t,null))},i(e){l||(Object(r.transition_in)(s),l=!0)},o(e){Object(r.transition_out)(s),l=!1},d(e){e&&Object(r.detach)(t),u[i].d()}}}function s(e,t,n){let{value:r=0}=t,{max:a=100}=t,{label:o=""}=t,{subLabel:c=""}=t,{separator:i="/"}=t,{inline:s=!1}=t,{maxWidth:l="none"}=t;return e.$$set=e=>{"value"in e&&n(0,r=e.value),"max"in e&&n(1,a=e.max),"label"in e&&n(2,o=e.label),"subLabel"in e&&n(3,c=e.subLabel),"separator"in e&&n(4,i=e.separator),"inline"in e&&n(5,s=e.inline),"maxWidth"in e&&n(6,l=e.maxWidth)},[r,a,o,c,i,s,l]}class l extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1pus310-style")||((t=Object(r.element)("style")).id="svelte-1pus310-style",t.textContent="progress.svelte-1pus310{width:20rem;max-width:97%}",Object(r.append)(document.head,t)),Object(r.init)(this,e,s,i,r.safe_not_equal,{value:0,max:1,label:2,subLabel:3,separator:4,inline:5,maxWidth:6})}}t.default=l},function(e,t,n){"use strict";n.r(t);var r=n(55);function a(e){let t,n,a=e[0].length&&o(e),c=e[1].length&&i(e);return{c(){a&&a.c(),t=Object(r.space)(),c&&c.c(),n=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),c&&c.m(e,o),Object(r.insert)(e,n,o)},p(e,r){e[0].length?a?a.p(e,r):(a=o(e),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null),e[1].length?c?c.p(e,r):(c=i(e),c.c(),c.m(n.parentNode,n)):c&&(c.d(1),c=null)},d(e){a&&a.d(e),e&&Object(r.detach)(t),c&&c.d(e),e&&Object(r.detach)(n)}}}function o(e){let t,n,a,o,i=e[2].length&&e[1].length&&c(e);return{c(){t=Object(r.element)("strong"),n=Object(r.text)(e[0]),a=Object(r.space)(),i&&i.c(),o=Object(r.empty)()},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.insert)(e,a,c),i&&i.m(e,c),Object(r.insert)(e,o,c)},p(e,t){1&t&&Object(r.set_data)(n,e[0]),e[2].length&&e[1].length?i?i.p(e,t):(i=c(e),i.c(),i.m(o.parentNode,o)):i&&(i.d(1),i=null)},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(a),i&&i.d(e),e&&Object(r.detach)(o)}}}function c(e){let t,n,a,o;return{c(){t=Object(r.element)("span"),n=Object(r.text)(" "),a=Object(r.text)(e[2]),o=Object(r.text)(" ")},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o)},p(e,t){4&t&&Object(r.set_data)(a,e[2])},d(e){e&&Object(r.detach)(t)}}}function i(e){let t,n;return{c(){t=Object(r.element)("span"),n=Object(r.text)(e[1])},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){2&t&&Object(r.set_data)(n,e[1])},d(e){e&&Object(r.detach)(t)}}}function s(e){let t,n=(e[0].length||e[1].length)&&a(e);return{c(){t=Object(r.element)("label"),n&&n.c(),Object(r.attr)(t,"class","svelte-guacfc")},m(e,a){Object(r.insert)(e,t,a),n&&n.m(t,null)},p(e,[r]){e[0].length||e[1].length?n?n.p(e,r):(n=a(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),n&&n.d()}}}function l(e,t,n){let{label:r=""}=t,{subLabel:a=""}=t,{separator:o="/"}=t;return e.$$set=e=>{"label"in e&&n(0,r=e.label),"subLabel"in e&&n(1,a=e.subLabel),"separator"in e&&n(2,o=e.separator)},[r,a,o]}class d extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-guacfc-style")||((t=Object(r.element)("style")).id="svelte-guacfc-style",t.textContent="label.svelte-guacfc{font-weight:normal}",Object(r.append)(document.head,t)),Object(r.init)(this,e,l,s,r.safe_not_equal,{label:0,subLabel:1,separator:2})}}t.default=d},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(67);function c(e){let t;return{c(){t=Object(r.element)("span"),Object(r.attr)(t,"class","icon svelte-7lvtjc")},m(n,a){Object(r.insert)(n,t,a),t.innerHTML=e[2]},p(e,n){4&n&&(t.innerHTML=e[2])},d(e){e&&Object(r.detach)(t)}}}function i(e){let t,n;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class",n=Object(r.null_to_empty)(e[3])+" svelte-7lvtjc")},m(e,n){Object(r.insert)(e,t,n)},p(e,a){8&a&&n!==(n=Object(r.null_to_empty)(e[3])+" svelte-7lvtjc")&&Object(r.attr)(t,"class",n)},d(e){e&&Object(r.detach)(t)}}}function s(e){let t,n,a;function c(t){e[21].call(null,t)}let i={items:e[11],noLabel:!0,right:!0};return void 0!==e[0]&&(i.value=e[0]),t=new o.default({props:i}),r.binding_callbacks.push(()=>Object(r.bind)(t,"value",c)),t.$on("change",e[17]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,n){Object(r.mount_component)(t,e,n),a=!0},p(e,a){const o={};2048&a&&(o.items=e[11]),!n&&1&a&&(n=!0,o.value=e[0],Object(r.add_flush_callback)(()=>n=!1)),t.$set(o)},i(e){a||(Object(r.transition_in)(t.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),a=!1},d(e){Object(r.destroy_component)(t,e)}}}function l(e){let t,n,a,o,l,d,u,b,p,f,O,j=e[11]&&Array.isArray(e[11]),m=e[2]&&c(e),g=e[3]&&i(e);const h=e[20].default,y=Object(r.create_slot)(h,e,e[19],null);let v=j&&s(e);return{c(){t=Object(r.element)("button"),m&&m.c(),n=Object(r.space)(),g&&g.c(),a=Object(r.space)(),o=Object(r.element)("span"),l=Object(r.text)(e[1]),d=Object(r.space)(),y&&y.c(),u=Object(r.space)(),v&&v.c(),Object(r.set_style)(t,"--color",e[8]?e[8]:e[12].color),Object(r.set_style)(t,"--bg-color",e[9]?e[9]:e[12].bgColor),Object(r.set_style)(t,"--border",e[12].border),Object(r.set_style)(t,"--active-color",e[12].activeColor),Object(r.set_style)(t,"--active-bg-color",e[12].activeBgColor),Object(r.set_style)(t,"--active-border",e[12].activeBorder),Object(r.set_style)(t,"--margin",e[13]),Object(r.set_style)(t,"--btn-padding",e[14]),Object(r.set_style)(t,"--btn-margin",e[15]),t.disabled=e[4],Object(r.attr)(t,"title",e[7]),Object(r.attr)(t,"class",b=Object(r.null_to_empty)("button "+(e[5]?e[5]:"default")+" "+e[6])+" svelte-7lvtjc"),Object(r.toggle_class)(t,"not-selected",e[10])},m(c,i){Object(r.insert)(c,t,i),m&&m.m(t,null),Object(r.append)(t,n),g&&g.m(t,null),Object(r.append)(t,a),Object(r.append)(t,o),Object(r.append)(o,l),Object(r.append)(t,d),y&&y.m(t,null),Object(r.append)(t,u),v&&v.m(t,null),p=!0,f||(O=Object(r.listen)(t,"click",e[22]),f=!0)},p(e,[o]){e[2]?m?m.p(e,o):(m=c(e),m.c(),m.m(t,n)):m&&(m.d(1),m=null),e[3]?g?g.p(e,o):(g=i(e),g.c(),g.m(t,a)):g&&(g.d(1),g=null),(!p||2&o)&&Object(r.set_data)(l,e[1]),y&&y.p&&524288&o&&Object(r.update_slot)(y,h,e,e[19],o,null,null),2048&o&&(j=e[11]&&Array.isArray(e[11])),j?v?(v.p(e,o),2048&o&&Object(r.transition_in)(v,1)):(v=s(e),v.c(),Object(r.transition_in)(v,1),v.m(t,null)):v&&(Object(r.group_outros)(),Object(r.transition_out)(v,1,1,()=>{v=null}),Object(r.check_outros)()),(!p||4352&o)&&Object(r.set_style)(t,"--color",e[8]?e[8]:e[12].color),(!p||4608&o)&&Object(r.set_style)(t,"--bg-color",e[9]?e[9]:e[12].bgColor),(!p||4096&o)&&Object(r.set_style)(t,"--border",e[12].border),(!p||4096&o)&&Object(r.set_style)(t,"--active-color",e[12].activeColor),(!p||4096&o)&&Object(r.set_style)(t,"--active-bg-color",e[12].activeBgColor),(!p||4096&o)&&Object(r.set_style)(t,"--active-border",e[12].activeBorder),(!p||8192&o)&&Object(r.set_style)(t,"--margin",e[13]),(!p||16384&o)&&Object(r.set_style)(t,"--btn-padding",e[14]),(!p||32768&o)&&Object(r.set_style)(t,"--btn-margin",e[15]),(!p||16&o)&&(t.disabled=e[4]),(!p||128&o)&&Object(r.attr)(t,"title",e[7]),(!p||96&o&&b!==(b=Object(r.null_to_empty)("button "+(e[5]?e[5]:"default")+" "+e[6])+" svelte-7lvtjc"))&&Object(r.attr)(t,"class",b),1120&o&&Object(r.toggle_class)(t,"not-selected",e[10])},i(e){p||(Object(r.transition_in)(y,e),Object(r.transition_in)(v),p=!0)},o(e){Object(r.transition_out)(y,e),Object(r.transition_out)(v),p=!1},d(e){e&&Object(r.detach)(t),m&&m.d(),g&&g.d(),y&&y.d(e),v&&v.d(),f=!1,O()}}}function d(e,t,n){let{$$slots:r={},$$scope:o}=t;const c=Object(a.createEventDispatcher)();let{label:i=""}=t,{icon:s}=t,{iconFa:l}=t,{disabled:d=!1}=t,{type:u="default"}=t,{cls:b=""}=t,{title:p}=t,{noMargin:f=!1}=t,{color:O=null}=t,{bgColor:j=null}=t,{notSelected:m=!1}=t,{options:g=null}=t,{selectedOption:h=null}=t;!h&&g&&Array.isArray(g)&&g.length&&(h=g[0]);const y={default:{color:"#444",activeColor:"#222",bgColor:"#dbdbdb",activeBgColor:"#aaa",border:"transparent",activeBorder:"transparent"},primary:{color:"#dbdbdb",activeColor:"#fff",bgColor:"#3273db",activeBgColor:"#2366d1",border:"transparent",activeBorder:"transparent"},text:{color:"var(--textColor)",activeColor:"var(--textColor)",bgColor:"transparent",activeBgColor:"transparent",border:"transparent",activeBorder:"transparent"},twitch:{color:"#dbdbdb",activeColor:"#fff",bgColor:"#9146ff",activeBgColor:"#8333ff",border:"transparent",activeBorder:"transparent"},danger:{color:"#dbdbdb",activeColor:"#fff",bgColor:"red",activeBgColor:"#bf0000",border:"transparent",activeBorder:"transparent"}};let v,_,w,k;return e.$$set=e=>{"label"in e&&n(1,i=e.label),"icon"in e&&n(2,s=e.icon),"iconFa"in e&&n(3,l=e.iconFa),"disabled"in e&&n(4,d=e.disabled),"type"in e&&n(5,u=e.type),"cls"in e&&n(6,b=e.cls),"title"in e&&n(7,p=e.title),"noMargin"in e&&n(18,f=e.noMargin),"color"in e&&n(8,O=e.color),"bgColor"in e&&n(9,j=e.bgColor),"notSelected"in e&&n(10,m=e.notSelected),"options"in e&&n(11,g=e.options),"selectedOption"in e&&n(0,h=e.selectedOption),"$$scope"in e&&n(19,o=e.$$scope)},e.$$.update=()=>{32&e.$$.dirty&&n(12,v=y[u]?y[u]:y.default),2&e.$$.dirty&&n(13,_=i&&i.length?".45em":"1px"),2&e.$$.dirty&&n(14,w=i&&i.length?"calc(.45em - 1px) 1em":"calc(.45em - 1px) .25em"),262144&e.$$.dirty&&n(15,k=f?0:"0 0 .45em 0")},[h,i,s,l,d,u,b,p,O,j,m,g,v,_,w,k,c,function(){c("click",h)},f,o,r,function(e){h=e,n(0,h)},()=>c("click",h)]}class u extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-7lvtjc-style")||((t=Object(r.element)("style")).id="svelte-7lvtjc-style",t.textContent="button.svelte-7lvtjc.svelte-7lvtjc{position:relative;display:inline-flex;align-items:center;justify-content:flex-start;vertical-align:top;padding:var(--btn-padding, calc(.45em - 1px) 1em);margin:var(--btn-margin, 0 0 .45em 0);text-align:center;white-space:nowrap;border:1px solid var(--border, #dbdbdb);border-radius:.2em;font-size:inherit;cursor:pointer;color:var(--color, #363636)!important;background-color:var(--bg-color, #3273dc)!important;outline:none !important;box-shadow:none !important;transition:opacity .25s}button.svelte-7lvtjc.svelte-7lvtjc:hover{color:var(--active-color, #fff);border-color:var(--active-border, #b5b5b5)\n    }button.svelte-7lvtjc.svelte-7lvtjc:active{background-color:var(--active-bg-color, #fff)}button[disabled].svelte-7lvtjc.svelte-7lvtjc{cursor:not-allowed;opacity:.35;color:var(--active-color, white);background-color:var(--bg-color, #3273dc)}button.svelte-7lvtjc .icon.svelte-7lvtjc:first-child:not(:last-child),button.svelte-7lvtjc i.svelte-7lvtjc:first-child:not(:last-child){display:inline-flex;align-items:center;justify-content:center;width:1.3em;height:1.3em;margin-left:calc(- var(--margin, .45em) - 1px);margin-right:var(--margin, .45em)}button.svelte-7lvtjc .dropdown-trigger button{color:inherit!important;background-color:inherit!important}.not-selected.svelte-7lvtjc.svelte-7lvtjc{opacity:.35}.not-selected.svelte-7lvtjc.svelte-7lvtjc:hover{opacity:1}.button.is-loading::after{border-color:transparent transparent rgba(0,0,0,.7) rgba(0,0,0,.7)!important}.button.twitch.is-loading::after{border-color:transparent transparent rgba(219,219,219,1) rgba(219,219,219,1)!important}button .icon svg, button i{display:inline-block;width:1.3em;height:1.3em;vertical-align:-.125em;overflow:visible;max-width:100%;max-height:100%;fill:currentColor}",Object(r.append)(document.head,t)),Object(r.init)(this,e,d,l,r.safe_not_equal,{label:1,icon:2,iconFa:3,disabled:4,type:5,cls:6,title:7,noMargin:18,color:8,bgColor:9,notSelected:10,options:11,selectedOption:0})}}t.default=u},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(8),o=n(7);function c(e){let t,n,o;return{c(){t=Object(r.element)("small"),n=Object(r.text)(e[3]),Object(r.attr)(t,"title",o=Object(a.formatDate)(e[2])),Object(r.attr)(t,"class","svelte-d03z7k")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,c){8&c&&Object(r.set_data)(n,e[3]),4&c&&o!==(o=Object(a.formatDate)(e[2]))&&Object(r.attr)(t,"title",o)},d(e){e&&Object(r.detach)(t)}}}function i(e){let t,n,o,i,s=e[2]&&c(e);return{c(){t=Object(r.element)("span"),n=Object(r.text)(e[1]),s&&s.c(),i=Object(r.empty)(),Object(r.attr)(t,"title",o=e[0]?Object(a.formatDate)(e[0]):"")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),s&&s.m(e,a),Object(r.insert)(e,i,a)},p(e,[l]){2&l&&Object(r.set_data)(n,e[1]),1&l&&o!==(o=e[0]?Object(a.formatDate)(e[0]):"")&&Object(r.attr)(t,"title",o),e[2]?s?s.p(e,l):(s=c(e),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),s&&s.d(e),e&&Object(r.detach)(i)}}}function s(e,t,n){let r,c,i,s,{date:l=new Date}=t,{prevDate:d=null}=t,{noDate:u=""}=t;return e.$$set=e=>{"date"in e&&n(4,l=e.date),"prevDate"in e&&n(5,d=e.prevDate),"noDate"in e&&n(6,u=e.noDate)},e.$$.update=()=>{16&e.$$.dirty&&n(0,r=Object(o.isValidDate)(l)?l:Object(o.dateFromString)(l)),65&e.$$.dirty&&n(1,c=r?Object(a.formatDateRelative)(r.toISOString()):u),48&e.$$.dirty&&n(2,i=d?Object(o.isValidDate)(d)?d:Object(o.dateFromString)(l):null),4&e.$$.dirty&&n(3,s=i?Object(a.formatDateRelative)(i.toISOString()):"")},[r,c,i,s,l,d,u]}class l extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-d03z7k-style")||((t=Object(r.element)("style")).id="svelte-d03z7k-style",t.textContent="small.svelte-d03z7k{display:block;color:var(--faded)}",Object(r.append)(document.head,t)),Object(r.init)(this,e,s,i,r.safe_not_equal,{date:4,prevDate:5,noDate:6})}}t.default=l},function(e,t,n){"use strict";n.r(t),n.d(t,"lastUpdated",(function(){return l})),n.d(t,"isAnyData",(function(){return d})),n.d(t,"getThemeFromFastCache",(function(){return u})),n.d(t,"setThemeInFastCache",(function(){return b}));var r=n(37),a=n(15);function o(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){o(c,r,a,i,s,"next",e)}function s(e){o(c,r,a,i,s,"throw",e)}i(void 0)}))}}var i,s,l=(s=c((function*(){return Object(r.default)().get("lastUpdated")})),function(){return s.apply(this,arguments)}),d=(i=c((function*(){var e;return(null!==(e=yield Object(a.getPlayers)())&&void 0!==e?e:[]).length})),function(){return i.apply(this,arguments)});function u(){return window.localStorage.getItem("sspl_theme")}function b(e){return window.localStorage.setItem("sspl_theme",e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"updateRankeds",(function(){return v}));var r=n(12),a=n(6),o=n(39),c=n(25),i=n(22),s=n(13),l=n(1),d=n(46),u=n(19);function b(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){j(o,r,a,c,i,"next",e)}function i(e){j(o,r,a,c,i,"throw",e)}c(void 0)}))}}var g,h=e=>e.length?e.reduce((e,t)=>(e[t.leaderboardId]=t,e),{}):null,y=(g=m((function*(){return Object(r.fetchApiPage)(c.default.SCORESABER,o.SCORESABER_URL+"/api.php?function=get-leaderboards&cat=1&page=1&limit=5000&ranked=1").then(e=>(null==e?void 0:e.songs)?null==e?void 0:e.songs.map(e=>({leaderboardId:e.uid,hash:e.id,name:e.name+(e.songSubName&&e.songSubName.length?" "+e.songSubName:""),songAuthor:e.songAuthorName,levelAuthor:e.levelAuthorName,diffInfo:Object(i.extractDiffAndType)(e.diff),stars:e.stars,oldStars:null})):[])})),function(){return g.apply(this,arguments)});function v(){return _.apply(this,arguments)}function _(){return(_=m((function*(){var e,t;try{if(!(t=yield y())||!t.length)return null}catch(e){return null}var n=null!==(e=yield Object(d.getRankedSongs)())&&void 0!==e?e:{};t=h(t.map(e=>{var t,r;return f(f({},e),{},{firstSeen:null!==(t=null==n||null===(r=n[e.leaderboardId])||void 0===r?void 0:r.firstSeen)&&void 0!==t?t:new Date})}));var r,o=Object(a.arrayDifference)(Object.keys(t),Object.keys(n)).map(e=>({leaderboardId:parseInt(e,10),oldStars:null,stars:t[e].stars,timestamp:Date.now()})).concat(Object.values(n).filter(e=>{var n,r;return e.stars!==(null===(n=t)||void 0===n||null===(r=n[e.leaderboardId])||void 0===r?void 0:r.stars)}).map(e=>{var n,r;return{leaderboardId:e.leaderboardId,oldStars:e.stars,stars:Object(a.nullIfUndefined)(null===(n=t)||void 0===n||null===(r=n[e.leaderboardId])||void 0===r?void 0:r.stars),timestamp:Date.now()}})),c=o.map(e=>{var r;return f(f({},(null===(r=t)||void 0===r?void 0:r[e.leaderboardId])?t[e.leaderboardId]:null==n?void 0:n[e.leaderboardId]),e)}).filter(e=>e.hash).map(e=>{var{oldStars:t,timestamp:n}=e;return b(e,["oldStars","timestamp"])});try{return yield u.db.runInTransaction(["rankeds","rankeds-changes","key-value"],(r=m((function*(e){yield Object(d.storeRankeds)(c),yield Object(d.storeRankedsChanges)(o),yield Object(d.setRankedSongsLastUpdated)(new Date)})),function(e){return r.apply(this,arguments)})),o.length&&s.default.publish("rankeds-changed",{nodeId:Object(l.default)().getId(),changed:o,allRankeds:t}),o}catch(e){return null}}))).apply(this,arguments)}},function(e,t,n){"use strict";n.r(t),n.d(t,"createBroadcastChannelStore",(function(){return c}));var r=n(54),a=n(13),o={},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(o[e])return o[e];var n=e+".store",{subscribe:c,set:i}=Object(r.writable)(t);return o[e]={subscribe:c,set:e=>{i(e),a.default.publish(n,e)}},a.default.on(n,e=>i(e)),o[e]}},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(59),c=n(73),i=n(67),s=n(79),l=n(80),d=n(81),u=n(82),b=n(36),p=n(68),f=n(15),O=n(75),j=n(85),m=n(88),g=n(13),h=n(1),y=n(9),v=n(35),_=n(89);function w(e){let t,n,a,c,i,s,l,d,u,b;const p=[x,$,k],f=[];function O(e,t){return e[6]?!e[3]&&e[1]&&e[1]!==e[0]?1:e[2]?2:-1:0}~(n=O(e))&&(a=f[n]=p[n](e));let j=(!e[1]||e[1]!==e[0])&&!e[27]&&C(e),m=e[8]&&e[12]&&A(e),g=e[2]&&q(e),h=e[13]&&E(e);return{c(){t=Object(r.element)("div"),a&&a.c(),c=Object(r.space)(),j&&j.c(),i=Object(r.space)(),m&&m.c(),s=Object(r.space)(),g&&g.c(),d=Object(r.space)(),h&&h.c(),u=Object(r.empty)(),Object(r.attr)(t,"class","buttons flex-center")},m(e,a){Object(r.insert)(e,t,a),~n&&f[n].m(t,null),Object(r.append)(t,c),j&&j.m(t,null),Object(r.append)(t,i),m&&m.m(t,null),Object(r.append)(t,s),g&&g.m(t,null),Object(r.insert)(e,d,a),h&&h.m(e,a),Object(r.insert)(e,u,a),b=!0},p(e,o){let l=n;n=O(e),n===l?~n&&f[n].p(e,o):(a&&(Object(r.group_outros)(),Object(r.transition_out)(f[l],1,1,()=>{f[l]=null}),Object(r.check_outros)()),~n?(a=f[n],a||(a=f[n]=p[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,c)):a=null),e[1]&&e[1]===e[0]||e[27]?j&&(Object(r.group_outros)(),Object(r.transition_out)(j,1,1,()=>{j=null}),Object(r.check_outros)()):j?(j.p(e,o),134217731&o[0]&&Object(r.transition_in)(j,1)):(j=C(e),j.c(),Object(r.transition_in)(j,1),j.m(t,i)),e[8]&&e[12]?m?(m.p(e,o),4352&o[0]&&Object(r.transition_in)(m,1)):(m=A(e),m.c(),Object(r.transition_in)(m,1),m.m(t,s)):m&&(Object(r.group_outros)(),Object(r.transition_out)(m,1,1,()=>{m=null}),Object(r.check_outros)()),e[2]?g?(g.p(e,o),4&o[0]&&Object(r.transition_in)(g,1)):(g=q(e),g.c(),Object(r.transition_in)(g,1),g.m(t,null)):g&&(Object(r.group_outros)(),Object(r.transition_out)(g,1,1,()=>{g=null}),Object(r.check_outros)()),e[13]?h?(h.p(e,o),8192&o[0]&&Object(r.transition_in)(h,1)):(h=E(e),h.c(),Object(r.transition_in)(h,1),h.m(u.parentNode,u)):h&&(Object(r.group_outros)(),Object(r.transition_out)(h,1,1,()=>{h=null}),Object(r.check_outros)())},i(e){b||(Object(r.transition_in)(a),Object(r.transition_in)(j),Object(r.transition_in)(m),Object(r.transition_in)(g),Object(r.add_render_callback)(()=>{l||(l=Object(r.create_bidirectional_transition)(t,o.fade,{duration:1e3},!0)),l.run(1)}),Object(r.transition_in)(h),b=!0)},o(e){Object(r.transition_out)(a),Object(r.transition_out)(j),Object(r.transition_out)(m),Object(r.transition_out)(g),l||(l=Object(r.create_bidirectional_transition)(t,o.fade,{duration:1e3},!1)),l.run(0),Object(r.transition_out)(h),b=!1},d(e){e&&Object(r.detach)(t),~n&&f[n].d(),j&&j.d(),m&&m.d(),g&&g.d(),e&&l&&l.end(),e&&Object(r.detach)(d),h&&h.d(e),e&&Object(r.detach)(u)}}}function k(e){let t,n,a,o,c=e[0]===e[1]&&S(e),i=(e[4]||e[5])&&P(e),s=!e[4]&&!e[5]&&(!e[1]||e[1]!==e[0])&&I(e);return{c(){c&&c.c(),t=Object(r.space)(),i&&i.c(),n=Object(r.space)(),s&&s.c(),a=Object(r.empty)()},m(e,l){c&&c.m(e,l),Object(r.insert)(e,t,l),i&&i.m(e,l),Object(r.insert)(e,n,l),s&&s.m(e,l),Object(r.insert)(e,a,l),o=!0},p(e,o){e[0]===e[1]?c?(c.p(e,o),3&o[0]&&Object(r.transition_in)(c,1)):(c=S(e),c.c(),Object(r.transition_in)(c,1),c.m(t.parentNode,t)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)()),e[4]||e[5]?i?(i.p(e,o),48&o[0]&&Object(r.transition_in)(i,1)):(i=P(e),i.c(),Object(r.transition_in)(i,1),i.m(n.parentNode,n)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)()),e[4]||e[5]||e[1]&&e[1]===e[0]?s&&(Object(r.group_outros)(),Object(r.transition_out)(s,1,1,()=>{s=null}),Object(r.check_outros)()):s?(s.p(e,o),51&o[0]&&Object(r.transition_in)(s,1)):(s=I(e),s.c(),Object(r.transition_in)(s,1),s.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(c),Object(r.transition_in)(i),Object(r.transition_in)(s),o=!0)},o(e){Object(r.transition_out)(c),Object(r.transition_out)(i),Object(r.transition_out)(s),o=!1},d(e){c&&c.d(e),e&&Object(r.detach)(t),i&&i.d(e),e&&Object(r.detach)(n),s&&s.d(e),e&&Object(r.detach)(a)}}}function $(e){let t,n;return t=new c.default({props:{iconFa:"far fa-star",type:"primary",title:e[29].profile.addPlayer}}),t.$on("click",e[42]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};536870912&n[0]&&(r.title=e[29].profile.addPlayer),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function x(e){let t,n,a={iconFa:e[27]?"fas fa-spin fa-spinner":"fas fa-upload",label:"Import",accept:"application/json"};return t=new l.default({props:a}),e[45](t),t.$on("change",e[34]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};134217728&n[0]&&(r.iconFa=e[27]?"fas fa-spin fa-spinner":"fas fa-upload"),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(n){e[45](null),Object(r.destroy_component)(t,n)}}}function S(e){let t,n,a,o;return t=new c.default({props:{iconFa:"fas fa-cog",title:e[29].profile.settings.header}}),t.$on("click",e[46]),a=new d.default({props:{profileId:e[0]}}),{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),Object(r.create_component)(a.$$.fragment)},m(e,c){Object(r.mount_component)(t,e,c),Object(r.insert)(e,n,c),Object(r.mount_component)(a,e,c),o=!0},p(e,n){const r={};536870912&n[0]&&(r.title=e[29].profile.settings.header),t.$set(r);const o={};1&n[0]&&(o.profileId=e[0]),a.$set(o)},i(e){o||(Object(r.transition_in)(t.$$.fragment,e),Object(r.transition_in)(a.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),Object(r.transition_out)(a.$$.fragment,e),o=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),Object(r.destroy_component)(a,e)}}}function P(e){let t,n;return t=new c.default({props:{iconFa:"fas fa-star",type:e[4]?"danger":"default",title:e[4]?e[29].profile.removePlayer:e[29].profile.removeFromFriends}}),t.$on("click",e[41]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16&n[0]&&(r.type=e[4]?"danger":"default"),536870928&n[0]&&(r.title=e[4]?e[29].profile.removePlayer:e[29].profile.removeFromFriends),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function I(e){let t,n;return t=new c.default({props:{iconFa:"far fa-star",type:"default",title:e[29].profile.addToFriends}}),t.$on("click",e[40]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};536870912&n[0]&&(r.title=e[29].profile.addToFriends),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function C(e){let t,n,a,o;t=new c.default({props:{iconFa:"fas fa-user-check",type:"primary",label:e[6]?"":e[29].profile.setAsDefault,title:e[29].profile.setAsDefault}}),t.$on("click",e[33]);let i=!e[6]&&T(e);return{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),i&&i.c(),a=Object(r.empty)()},m(e,c){Object(r.mount_component)(t,e,c),Object(r.insert)(e,n,c),i&&i.m(e,c),Object(r.insert)(e,a,c),o=!0},p(e,n){const r={};536870976&n[0]&&(r.label=e[6]?"":e[29].profile.setAsDefault),536870912&n[0]&&(r.title=e[29].profile.setAsDefault),t.$set(r),e[6]?i&&(i.d(1),i=null):i?i.p(e,n):(i=T(e),i.c(),i.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(t.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),o=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),i&&i.d(e),e&&Object(r.detach)(a)}}}function T(e){let t,n,a,o,c=e[29].onboarding.importOrSetProfile+"";return{c(){t=Object(r.element)("span"),n=Object(r.element)("i"),a=Object(r.space)(),o=Object(r.text)(c),Object(r.attr)(n,"class","fas fa-arrow-left"),Object(r.attr)(t,"class","pulse onboarding-hint")},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o)},p(e,t){536870912&t[0]&&c!==(c=e[29].onboarding.importOrSetProfile+"")&&Object(r.set_data)(o,c)},d(e){e&&Object(r.detach)(t)}}}function A(e){let t,n;return t=new _.default({props:{profileId:e[0],twitchLogin:e[12]?e[12].login:null,noLabel:!!e[12]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n[0]&&(r.profileId=e[0]),4096&n[0]&&(r.twitchLogin=e[12]?e[12].login:null),4096&n[0]&&(r.noLabel=!!e[12]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function q(e){let t,n,a,o=e[7]&&R(e),c=e[8]&&!e[12]&&z(e);return{c(){o&&o.c(),t=Object(r.space)(),c&&c.c(),n=Object(r.empty)()},m(e,i){o&&o.m(e,i),Object(r.insert)(e,t,i),c&&c.m(e,i),Object(r.insert)(e,n,i),a=!0},p(e,a){e[7]?o?(o.p(e,a),128&a[0]&&Object(r.transition_in)(o,1)):(o=R(e),o.c(),Object(r.transition_in)(o,1),o.m(t.parentNode,t)):o&&(Object(r.group_outros)(),Object(r.transition_out)(o,1,1,()=>{o=null}),Object(r.check_outros)()),e[8]&&!e[12]?c?(c.p(e,a),4352&a[0]&&Object(r.transition_in)(c,1)):(c=z(e),c.c(),Object(r.transition_in)(c,1),c.m(n.parentNode,n)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)())},i(e){a||(Object(r.transition_in)(o),Object(r.transition_in)(c),a=!0)},o(e){Object(r.transition_out)(o),Object(r.transition_out)(c),a=!1},d(e){o&&o.d(e),e&&Object(r.detach)(t),c&&c.d(e),e&&Object(r.detach)(n)}}}function R(e){let t,n;return t=new c.default({props:{iconFa:"fab fa-twitch",label:e[9],title:e[10],disabled:e[11],type:"twitch"}}),t.$on("click",e[47]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};512&n[0]&&(r.label=e[9]),1024&n[0]&&(r.title=e[10]),2048&n[0]&&(r.disabled=e[11]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function z(e){let t,n;return t=new _.default({props:{profileId:e[0],twitchLogin:e[12]?e[12].login:null,noLabel:!!e[12]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n[0]&&(r.profileId=e[0]),4096&n[0]&&(r.twitchLogin=e[12]?e[12].login:null),4096&n[0]&&(r.noLabel=!!e[12]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function E(e){let t,n;return t=new u.default({props:{closeable:!1,$$slots:{default:[B]},$$scope:{ctx:e}}}),t.$on("close",e[69]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1006583808&n[0]|524288&n[2]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function B(e){let t,n,a,o,d,u,b,p,f,O,j,m,g,h,y,v,_,w,k,$,x,S,P,I,C,T,A,q,R,z,E,B,D,L,N,F,M,U,V,H,W,Z,K,X,J,Q,Y,G,ee,te,ne,re,ae,oe,ce,ie,se,le,de,ue,be,pe,fe,Oe,je,me,ge,he,ye,ve,_e,we,ke,$e,xe,Se,Pe,Ie,Ce,Te,Ae,qe,Re,ze,Ee,Be,De,Le,Ne,Fe,Me,Ue,Ve,He,We,Ze,Ke,Xe,Je,Qe,Ye,Ge,et,tt,nt,rt,at,ot,ct,it,st,lt,dt,ut,bt,pt,ft,Ot,jt,mt,gt,ht,yt,vt,_t,wt,kt,$t,xt,St,Pt,It,Ct,Tt,At,qt,Rt,zt,Et,Bt,Dt,Lt,Nt,Ft,Mt,Ut,Vt,Ht,Wt,Zt,Kt,Xt,Jt,Qt,Yt,Gt,en,tn,nn,rn,an,on,cn,sn,ln,dn,un,bn,pn,fn,On=e[29].profile.settings.header+"",jn=e[29].profile.settings.language+"",mn=e[29].profile.settings.locale+"",gn=e[29].profile.settings.theme+"",hn=e[29].profile.settings.songBrowser.header+"",yn=e[29].profile.settings.songBrowser.autoTransform+"",vn=e[29].profile.settings.songBrowser.defaultTypeHeader+"",_n=e[29].profile.settings.songBrowser.defaultViewHeader+"",wn=e[29].profile.settings.songBrowser.defaultColumnsHeader+"",kn=e[29].profile.settings.songBrowser.defaultSortHeader+"",$n=e[29].profile.settings.songBrowser.defaultIconsHeader+"",xn=e[29].profile.settings.songBrowser.defaultItemsPerPageHeader+"",Sn=e[29].profile.settings.profile.header+"",Pn=e[29].profile.settings.profile.statsStyling+"",In=e[29].profile.settings.profile.defaultChart+"",Cn=e[29].profile.settings.profile.showOnePpCalc+"",Tn=e[29].profile.settings.profile.showTwitchIcon+"",An=e[29].profile.settings.songLeaderboard.header+"",qn=e[29].profile.settings.songLeaderboard.showDiff+"",Rn=e[29].profile.settings.songLeaderboard.showWhatIfPp+"",zn=e[29].profile.settings.songLeaderboard.showBgCover+"",En=e[29].profile.settings.songLeaderboard.defaultType+"",Bn=e[29].profile.settings.others.refreshHeader+"",Dn=e[29].profile.settings.others.header+"",Ln=e[29].profile.settings.others.bgDownload+"";function Nn(t){e[48].call(null,t)}let Fn={items:e[30]};function Mn(t){e[49].call(null,t)}void 0!==e[20].lang&&(Fn.value=e[20].lang),j=new i.default({props:Fn}),r.binding_callbacks.push(()=>Object(r.bind)(j,"value",Nn)),j.$on("change",e[43]);let Un={items:e[31]};function Vn(t){e[50].call(null,t)}void 0!==e[20].locale&&(Un.value=e[20].locale),w=new i.default({props:Un}),r.binding_callbacks.push(()=>Object(r.bind)(w,"value",Mn)),w.$on("change",e[44]);let Hn={items:e[19].themes};function Wn(t){e[52].call(null,t)}void 0!==e[20].theme&&(Hn.value=e[20].theme),C=new i.default({props:Hn}),r.binding_callbacks.push(()=>Object(r.bind)(C,"value",Vn)),C.$on("change",e[37]);let Zn={items:e[19].songTypes};function Kn(t){e[53].call(null,t)}void 0!==e[20].songTypes&&(Zn.value=e[20].songTypes),Z=new i.default({props:Zn}),r.binding_callbacks.push(()=>Object(r.bind)(Z,"value",Wn)),Z.$on("change",e[36]);let Xn={items:e[19].viewTypes};function Jn(t){e[54].call(null,t)}void 0!==e[20].viewTypes&&(Xn.value=e[20].viewTypes),ee=new i.default({props:Xn}),r.binding_callbacks.push(()=>Object(r.bind)(ee,"value",Kn));let Qn={multiple:!0,items:e[23]};function Yn(t){e[55].call(null,t)}void 0!==e[24]&&(Qn.value=e[24]),ie=new i.default({props:Qn}),r.binding_callbacks.push(()=>Object(r.bind)(ie,"value",Jn));let Gn={items:e[21]};function er(t){e[56].call(null,t)}void 0!==e[22]&&(Gn.value=e[22]),Oe=new i.default({props:Gn}),r.binding_callbacks.push(()=>Object(r.bind)(Oe,"value",Yn));let tr={multiple:!0,items:e[19].icons};function nr(t){e[57].call(null,t)}void 0!==e[20].shownIcons&&(tr.value=e[20].shownIcons),_e=new i.default({props:tr}),r.binding_callbacks.push(()=>Object(r.bind)(_e,"value",er));let rr={items:e[32]};function ar(t){e[58].call(null,t)}void 0!==e[25]&&(rr.value=e[25]),Ie=new i.default({props:rr}),r.binding_callbacks.push(()=>Object(r.bind)(Ie,"value",nr));let or={items:e[19].statsStyles};function cr(t){e[59].call(null,t)}void 0!==e[20].statsStyles&&(or.value=e[20].statsStyles),Me=new i.default({props:or}),r.binding_callbacks.push(()=>Object(r.bind)(Me,"value",ar));let ir={items:e[19].chartTypes};function sr(t){e[65].call(null,t)}void 0!==e[20].chartTypes&&(ir.value=e[20].chartTypes),Xe=new i.default({props:ir}),r.binding_callbacks.push(()=>Object(r.bind)(Xe,"value",cr));let lr={country:e[18]};function dr(t){e[66].call(null,t)}void 0!==e[17]&&(lr.value=e[17]),Rt=new s.default({props:lr}),r.binding_callbacks.push(()=>Object(r.bind)(Rt,"value",sr));let ur={items:e[19].viewTypeUpdates};void 0!==e[20].viewTypeUpdates&&(ur.value=e[20].viewTypeUpdates),Ft=new i.default({props:ur}),r.binding_callbacks.push(()=>Object(r.bind)(Ft,"value",dr)),rn=new c.default({props:{iconFa:"fas fa-save",label:e[29].common.save,type:"primary"}}),rn.$on("click",e[39]),on=new c.default({props:{label:e[29].common.cancel}}),on.$on("click",e[38]),ln=new c.default({props:{iconFa:e[28]?"fas fa-spin fa-spinner":"fas fa-download",label:e[29].profile.settings.export}}),ln.$on("click",e[35]);let br={iconFa:e[27]?"fas fa-spin fa-spinner":"fas fa-upload",label:e[29].profile.settings.import,accept:"application/json"};return un=new l.default({props:br}),e[68](un),un.$on("change",e[34]),{c(){t=Object(r.element)("header"),n=Object(r.element)("div"),a=Object(r.text)(On),o=Object(r.space)(),d=Object(r.element)("main"),u=Object(r.element)("section"),b=Object(r.element)("div"),p=Object(r.element)("div"),f=Object(r.text)(jn),O=Object(r.space)(),Object(r.create_component)(j.$$.fragment),g=Object(r.space)(),h=Object(r.element)("div"),y=Object(r.element)("div"),v=Object(r.text)(mn),_=Object(r.space)(),Object(r.create_component)(w.$$.fragment),$=Object(r.space)(),x=Object(r.element)("div"),S=Object(r.element)("div"),P=Object(r.text)(gn),I=Object(r.space)(),Object(r.create_component)(C.$$.fragment),A=Object(r.space)(),q=Object(r.element)("section"),R=Object(r.element)("div"),z=Object(r.text)(hn),E=Object(r.space)(),B=Object(r.element)("label"),D=Object(r.element)("input"),L=Object(r.space)(),N=Object(r.text)(yn),F=Object(r.space)(),M=Object(r.element)("div"),U=Object(r.element)("div"),V=Object(r.element)("label"),H=Object(r.text)(vn),W=Object(r.space)(),Object(r.create_component)(Z.$$.fragment),X=Object(r.space)(),J=Object(r.element)("div"),Q=Object(r.element)("label"),Y=Object(r.text)(_n),G=Object(r.space)(),Object(r.create_component)(ee.$$.fragment),ne=Object(r.space)(),re=Object(r.element)("div"),ae=Object(r.element)("label"),oe=Object(r.text)(wn),ce=Object(r.space)(),Object(r.create_component)(ie.$$.fragment),le=Object(r.space)(),de=Object(r.element)("div"),ue=Object(r.element)("div"),be=Object(r.element)("label"),pe=Object(r.text)(kn),fe=Object(r.space)(),Object(r.create_component)(Oe.$$.fragment),me=Object(r.space)(),ge=Object(r.element)("div"),he=Object(r.element)("label"),ye=Object(r.text)($n),ve=Object(r.space)(),Object(r.create_component)(_e.$$.fragment),ke=Object(r.space)(),$e=Object(r.element)("div"),xe=Object(r.element)("label"),Se=Object(r.text)(xn),Pe=Object(r.space)(),Object(r.create_component)(Ie.$$.fragment),Te=Object(r.space)(),Ae=Object(r.element)("section"),qe=Object(r.element)("div"),Re=Object(r.text)(Sn),ze=Object(r.space)(),Ee=Object(r.element)("div"),Be=Object(r.element)("div"),De=Object(r.element)("div"),Le=Object(r.element)("label"),Ne=Object(r.text)(Pn),Fe=Object(r.space)(),Object(r.create_component)(Me.$$.fragment),Ve=Object(r.space)(),He=Object(r.element)("div"),We=Object(r.element)("label"),Ze=Object(r.text)(In),Ke=Object(r.space)(),Object(r.create_component)(Xe.$$.fragment),Qe=Object(r.space)(),Ye=Object(r.element)("div"),Ge=Object(r.element)("label"),et=Object(r.element)("input"),tt=Object(r.space)(),nt=Object(r.text)(Cn),rt=Object(r.space)(),at=Object(r.element)("label"),ot=Object(r.element)("input"),ct=Object(r.space)(),it=Object(r.text)(Tn),st=Object(r.space)(),lt=Object(r.element)("section"),dt=Object(r.element)("div"),ut=Object(r.text)(An),bt=Object(r.space)(),pt=Object(r.element)("div"),ft=Object(r.element)("label"),Ot=Object(r.element)("input"),jt=Object(r.space)(),mt=Object(r.text)(qn),gt=Object(r.space)(),ht=Object(r.element)("label"),yt=Object(r.element)("input"),vt=Object(r.space)(),_t=Object(r.text)(Rn),wt=Object(r.space)(),kt=Object(r.element)("label"),$t=Object(r.element)("input"),xt=Object(r.space)(),St=Object(r.text)(zn),Pt=Object(r.space)(),It=Object(r.element)("div"),Ct=Object(r.element)("div"),Tt=Object(r.element)("label"),At=Object(r.text)(En),qt=Object(r.space)(),Object(r.create_component)(Rt.$$.fragment),Et=Object(r.space)(),Bt=Object(r.element)("div"),Dt=Object(r.element)("label"),Lt=Object(r.text)(Bn),Nt=Object(r.space)(),Object(r.create_component)(Ft.$$.fragment),Ut=Object(r.space)(),Vt=Object(r.element)("section"),Ht=Object(r.element)("div"),Wt=Object(r.text)(Dn),Zt=Object(r.space)(),Kt=Object(r.element)("div"),Xt=Object(r.element)("div"),Jt=Object(r.element)("label"),Qt=Object(r.element)("input"),Yt=Object(r.space)(),Gt=Object(r.text)(Ln),en=Object(r.space)(),tn=Object(r.element)("footer"),nn=Object(r.element)("div"),Object(r.create_component)(rn.$$.fragment),an=Object(r.space)(),Object(r.create_component)(on.$$.fragment),cn=Object(r.space)(),sn=Object(r.element)("div"),Object(r.create_component)(ln.$$.fragment),dn=Object(r.space)(),Object(r.create_component)(un.$$.fragment),Object(r.attr)(n,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(t,"class","svelte-1fwnz7n"),Object(r.attr)(p,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(b,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(y,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(h,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(S,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(x,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(u,"class","columns svelte-1fwnz7n"),Object(r.attr)(R,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(D,"type","checkbox"),Object(r.attr)(B,"class","checkbox svelte-1fwnz7n"),Object(r.attr)(V,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(U,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(Q,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(J,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(ae,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(re,"class","column fields is-one-third svelte-1fwnz7n"),Object(r.attr)(M,"class","columns svelte-1fwnz7n"),Object(r.attr)(be,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(ue,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(he,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(ge,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(xe,"class","menu-label svelte-1fwnz7n"),Object(r.attr)($e,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(de,"class","columns svelte-1fwnz7n"),Object(r.attr)(qe,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(Le,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(De,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(We,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(He,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(et,"type","checkbox"),Object(r.attr)(Ge,"class","checkbox svelte-1fwnz7n"),Object(r.attr)(ot,"type","checkbox"),Object(r.attr)(at,"class","checkbox svelte-1fwnz7n"),Object(r.attr)(Ye,"class","column is-one-third text-align-left svelte-1fwnz7n"),Object(r.attr)(Be,"class","columns svelte-1fwnz7n"),Object(r.attr)(dt,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(Ot,"type","checkbox"),Object(r.attr)(ft,"class","checkbox svelte-1fwnz7n"),Object(r.attr)(yt,"type","checkbox"),Object(r.attr)(ht,"class","checkbox svelte-1fwnz7n"),Object(r.attr)($t,"type","checkbox"),Object(r.attr)(kt,"class","checkbox svelte-1fwnz7n"),Object(r.attr)(Tt,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(Ct,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(Dt,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(Bt,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(It,"class","columns svelte-1fwnz7n"),Object(r.attr)(Ht,"class","menu-label svelte-1fwnz7n"),Object(r.attr)(Qt,"type","checkbox"),Object(r.attr)(Jt,"class","checkbox svelte-1fwnz7n"),Object(r.attr)(Xt,"class","column is-one-third svelte-1fwnz7n"),Object(r.attr)(Kt,"class","columns svelte-1fwnz7n"),Object(r.attr)(nn,"class","column svelte-1fwnz7n"),Object(r.attr)(sn,"class","column svelte-1fwnz7n"),Object(r.attr)(tn,"class","columns svelte-1fwnz7n")},m(c,i){Object(r.insert)(c,t,i),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.insert)(c,o,i),Object(r.insert)(c,d,i),Object(r.append)(d,u),Object(r.append)(u,b),Object(r.append)(b,p),Object(r.append)(p,f),Object(r.append)(b,O),Object(r.mount_component)(j,b,null),Object(r.append)(u,g),Object(r.append)(u,h),Object(r.append)(h,y),Object(r.append)(y,v),Object(r.append)(h,_),Object(r.mount_component)(w,h,null),Object(r.append)(u,$),Object(r.append)(u,x),Object(r.append)(x,S),Object(r.append)(S,P),Object(r.append)(x,I),Object(r.mount_component)(C,x,null),Object(r.append)(d,A),Object(r.append)(d,q),Object(r.append)(q,R),Object(r.append)(R,z),Object(r.append)(q,E),Object(r.append)(q,B),Object(r.append)(B,D),D.checked=e[16].songBrowser.autoTransform,Object(r.append)(B,L),Object(r.append)(B,N),Object(r.append)(q,F),Object(r.append)(q,M),Object(r.append)(M,U),Object(r.append)(U,V),Object(r.append)(V,H),Object(r.append)(U,W),Object(r.mount_component)(Z,U,null),Object(r.append)(M,X),Object(r.append)(M,J),Object(r.append)(J,Q),Object(r.append)(Q,Y),Object(r.append)(J,G),Object(r.mount_component)(ee,J,null),Object(r.append)(M,ne),Object(r.append)(M,re),Object(r.append)(re,ae),Object(r.append)(ae,oe),Object(r.append)(re,ce),Object(r.mount_component)(ie,re,null),Object(r.append)(q,le),Object(r.append)(q,de),Object(r.append)(de,ue),Object(r.append)(ue,be),Object(r.append)(be,pe),Object(r.append)(ue,fe),Object(r.mount_component)(Oe,ue,null),Object(r.append)(de,me),Object(r.append)(de,ge),Object(r.append)(ge,he),Object(r.append)(he,ye),Object(r.append)(ge,ve),Object(r.mount_component)(_e,ge,null),Object(r.append)(de,ke),Object(r.append)(de,$e),Object(r.append)($e,xe),Object(r.append)(xe,Se),Object(r.append)($e,Pe),Object(r.mount_component)(Ie,$e,null),Object(r.append)(d,Te),Object(r.append)(d,Ae),Object(r.append)(Ae,qe),Object(r.append)(qe,Re),Object(r.append)(Ae,ze),Object(r.append)(Ae,Ee),Object(r.append)(Ee,Be),Object(r.append)(Be,De),Object(r.append)(De,Le),Object(r.append)(Le,Ne),Object(r.append)(De,Fe),Object(r.mount_component)(Me,De,null),Object(r.append)(Be,Ve),Object(r.append)(Be,He),Object(r.append)(He,We),Object(r.append)(We,Ze),Object(r.append)(He,Ke),Object(r.mount_component)(Xe,He,null),Object(r.append)(Be,Qe),Object(r.append)(Be,Ye),Object(r.append)(Ye,Ge),Object(r.append)(Ge,et),et.checked=e[16].profile.showOnePpCalc,Object(r.append)(Ge,tt),Object(r.append)(Ge,nt),Object(r.append)(Ye,rt),Object(r.append)(Ye,at),Object(r.append)(at,ot),ot.checked=e[16].profile.showTwitchIcon,Object(r.append)(at,ct),Object(r.append)(at,it),Object(r.append)(d,st),Object(r.append)(d,lt),Object(r.append)(lt,dt),Object(r.append)(dt,ut),Object(r.append)(lt,bt),Object(r.append)(lt,pt),Object(r.append)(pt,ft),Object(r.append)(ft,Ot),Ot.checked=e[16].songLeaderboard.showDiff,Object(r.append)(ft,jt),Object(r.append)(ft,mt),Object(r.append)(pt,gt),Object(r.append)(pt,ht),Object(r.append)(ht,yt),yt.checked=e[16].songLeaderboard.showWhatIfPp,Object(r.append)(ht,vt),Object(r.append)(ht,_t),Object(r.append)(pt,wt),Object(r.append)(pt,kt),Object(r.append)(kt,$t),$t.checked=e[16].songLeaderboard.showBgCover,Object(r.append)(kt,xt),Object(r.append)(kt,St),Object(r.append)(lt,Pt),Object(r.append)(lt,It),Object(r.append)(It,Ct),Object(r.append)(Ct,Tt),Object(r.append)(Tt,At),Object(r.append)(Ct,qt),Object(r.mount_component)(Rt,Ct,null),Object(r.append)(It,Et),Object(r.append)(It,Bt),Object(r.append)(Bt,Dt),Object(r.append)(Dt,Lt),Object(r.append)(Bt,Nt),Object(r.mount_component)(Ft,Bt,null),Object(r.append)(d,Ut),Object(r.append)(d,Vt),Object(r.append)(Vt,Ht),Object(r.append)(Ht,Wt),Object(r.append)(Vt,Zt),Object(r.append)(Vt,Kt),Object(r.append)(Kt,Xt),Object(r.append)(Xt,Jt),Object(r.append)(Jt,Qt),Qt.checked=e[16].others.bgDownload,Object(r.append)(Jt,Yt),Object(r.append)(Jt,Gt),Object(r.insert)(c,en,i),Object(r.insert)(c,tn,i),Object(r.append)(tn,nn),Object(r.mount_component)(rn,nn,null),Object(r.append)(nn,an),Object(r.mount_component)(on,nn,null),Object(r.append)(tn,cn),Object(r.append)(tn,sn),Object(r.mount_component)(ln,sn,null),Object(r.append)(sn,dn),Object(r.mount_component)(un,sn,null),bn=!0,pn||(fn=[Object(r.listen)(D,"change",e[51]),Object(r.listen)(et,"change",e[60]),Object(r.listen)(ot,"change",e[61]),Object(r.listen)(Ot,"change",e[62]),Object(r.listen)(yt,"change",e[63]),Object(r.listen)($t,"change",e[64]),Object(r.listen)(Qt,"change",e[67])],pn=!0)},p(e,t){(!bn||536870912&t[0])&&On!==(On=e[29].profile.settings.header+"")&&Object(r.set_data)(a,On),(!bn||536870912&t[0])&&jn!==(jn=e[29].profile.settings.language+"")&&Object(r.set_data)(f,jn);const n={};!m&&1048576&t[0]&&(m=!0,n.value=e[20].lang,Object(r.add_flush_callback)(()=>m=!1)),j.$set(n),(!bn||536870912&t[0])&&mn!==(mn=e[29].profile.settings.locale+"")&&Object(r.set_data)(v,mn);const o={};!k&&1048576&t[0]&&(k=!0,o.value=e[20].locale,Object(r.add_flush_callback)(()=>k=!1)),w.$set(o),(!bn||536870912&t[0])&&gn!==(gn=e[29].profile.settings.theme+"")&&Object(r.set_data)(P,gn);const c={};524288&t[0]&&(c.items=e[19].themes),!T&&1048576&t[0]&&(T=!0,c.value=e[20].theme,Object(r.add_flush_callback)(()=>T=!1)),C.$set(c),(!bn||536870912&t[0])&&hn!==(hn=e[29].profile.settings.songBrowser.header+"")&&Object(r.set_data)(z,hn),65536&t[0]&&(D.checked=e[16].songBrowser.autoTransform),(!bn||536870912&t[0])&&yn!==(yn=e[29].profile.settings.songBrowser.autoTransform+"")&&Object(r.set_data)(N,yn),(!bn||536870912&t[0])&&vn!==(vn=e[29].profile.settings.songBrowser.defaultTypeHeader+"")&&Object(r.set_data)(H,vn);const i={};524288&t[0]&&(i.items=e[19].songTypes),!K&&1048576&t[0]&&(K=!0,i.value=e[20].songTypes,Object(r.add_flush_callback)(()=>K=!1)),Z.$set(i),(!bn||536870912&t[0])&&_n!==(_n=e[29].profile.settings.songBrowser.defaultViewHeader+"")&&Object(r.set_data)(Y,_n);const s={};524288&t[0]&&(s.items=e[19].viewTypes),!te&&1048576&t[0]&&(te=!0,s.value=e[20].viewTypes,Object(r.add_flush_callback)(()=>te=!1)),ee.$set(s),(!bn||536870912&t[0])&&wn!==(wn=e[29].profile.settings.songBrowser.defaultColumnsHeader+"")&&Object(r.set_data)(oe,wn);const l={};8388608&t[0]&&(l.items=e[23]),!se&&16777216&t[0]&&(se=!0,l.value=e[24],Object(r.add_flush_callback)(()=>se=!1)),ie.$set(l),(!bn||536870912&t[0])&&kn!==(kn=e[29].profile.settings.songBrowser.defaultSortHeader+"")&&Object(r.set_data)(pe,kn);const d={};2097152&t[0]&&(d.items=e[21]),!je&&4194304&t[0]&&(je=!0,d.value=e[22],Object(r.add_flush_callback)(()=>je=!1)),Oe.$set(d),(!bn||536870912&t[0])&&$n!==($n=e[29].profile.settings.songBrowser.defaultIconsHeader+"")&&Object(r.set_data)(ye,$n);const u={};524288&t[0]&&(u.items=e[19].icons),!we&&1048576&t[0]&&(we=!0,u.value=e[20].shownIcons,Object(r.add_flush_callback)(()=>we=!1)),_e.$set(u),(!bn||536870912&t[0])&&xn!==(xn=e[29].profile.settings.songBrowser.defaultItemsPerPageHeader+"")&&Object(r.set_data)(Se,xn);const b={};!Ce&&33554432&t[0]&&(Ce=!0,b.value=e[25],Object(r.add_flush_callback)(()=>Ce=!1)),Ie.$set(b),(!bn||536870912&t[0])&&Sn!==(Sn=e[29].profile.settings.profile.header+"")&&Object(r.set_data)(Re,Sn),(!bn||536870912&t[0])&&Pn!==(Pn=e[29].profile.settings.profile.statsStyling+"")&&Object(r.set_data)(Ne,Pn);const p={};524288&t[0]&&(p.items=e[19].statsStyles),!Ue&&1048576&t[0]&&(Ue=!0,p.value=e[20].statsStyles,Object(r.add_flush_callback)(()=>Ue=!1)),Me.$set(p),(!bn||536870912&t[0])&&In!==(In=e[29].profile.settings.profile.defaultChart+"")&&Object(r.set_data)(Ze,In);const O={};524288&t[0]&&(O.items=e[19].chartTypes),!Je&&1048576&t[0]&&(Je=!0,O.value=e[20].chartTypes,Object(r.add_flush_callback)(()=>Je=!1)),Xe.$set(O),65536&t[0]&&(et.checked=e[16].profile.showOnePpCalc),(!bn||536870912&t[0])&&Cn!==(Cn=e[29].profile.settings.profile.showOnePpCalc+"")&&Object(r.set_data)(nt,Cn),65536&t[0]&&(ot.checked=e[16].profile.showTwitchIcon),(!bn||536870912&t[0])&&Tn!==(Tn=e[29].profile.settings.profile.showTwitchIcon+"")&&Object(r.set_data)(it,Tn),(!bn||536870912&t[0])&&An!==(An=e[29].profile.settings.songLeaderboard.header+"")&&Object(r.set_data)(ut,An),65536&t[0]&&(Ot.checked=e[16].songLeaderboard.showDiff),(!bn||536870912&t[0])&&qn!==(qn=e[29].profile.settings.songLeaderboard.showDiff+"")&&Object(r.set_data)(mt,qn),65536&t[0]&&(yt.checked=e[16].songLeaderboard.showWhatIfPp),(!bn||536870912&t[0])&&Rn!==(Rn=e[29].profile.settings.songLeaderboard.showWhatIfPp+"")&&Object(r.set_data)(_t,Rn),65536&t[0]&&($t.checked=e[16].songLeaderboard.showBgCover),(!bn||536870912&t[0])&&zn!==(zn=e[29].profile.settings.songLeaderboard.showBgCover+"")&&Object(r.set_data)(St,zn),(!bn||536870912&t[0])&&En!==(En=e[29].profile.settings.songLeaderboard.defaultType+"")&&Object(r.set_data)(At,En);const g={};262144&t[0]&&(g.country=e[18]),!zt&&131072&t[0]&&(zt=!0,g.value=e[17],Object(r.add_flush_callback)(()=>zt=!1)),Rt.$set(g),(!bn||536870912&t[0])&&Bn!==(Bn=e[29].profile.settings.others.refreshHeader+"")&&Object(r.set_data)(Lt,Bn);const h={};524288&t[0]&&(h.items=e[19].viewTypeUpdates),!Mt&&1048576&t[0]&&(Mt=!0,h.value=e[20].viewTypeUpdates,Object(r.add_flush_callback)(()=>Mt=!1)),Ft.$set(h),(!bn||536870912&t[0])&&Dn!==(Dn=e[29].profile.settings.others.header+"")&&Object(r.set_data)(Wt,Dn),65536&t[0]&&(Qt.checked=e[16].others.bgDownload),(!bn||536870912&t[0])&&Ln!==(Ln=e[29].profile.settings.others.bgDownload+"")&&Object(r.set_data)(Gt,Ln);const y={};536870912&t[0]&&(y.label=e[29].common.save),rn.$set(y);const _={};536870912&t[0]&&(_.label=e[29].common.cancel),on.$set(_);const $={};268435456&t[0]&&($.iconFa=e[28]?"fas fa-spin fa-spinner":"fas fa-download"),536870912&t[0]&&($.label=e[29].profile.settings.export),ln.$set($);const x={};134217728&t[0]&&(x.iconFa=e[27]?"fas fa-spin fa-spinner":"fas fa-upload"),536870912&t[0]&&(x.label=e[29].profile.settings.import),un.$set(x)},i(e){bn||(Object(r.transition_in)(j.$$.fragment,e),Object(r.transition_in)(w.$$.fragment,e),Object(r.transition_in)(C.$$.fragment,e),Object(r.transition_in)(Z.$$.fragment,e),Object(r.transition_in)(ee.$$.fragment,e),Object(r.transition_in)(ie.$$.fragment,e),Object(r.transition_in)(Oe.$$.fragment,e),Object(r.transition_in)(_e.$$.fragment,e),Object(r.transition_in)(Ie.$$.fragment,e),Object(r.transition_in)(Me.$$.fragment,e),Object(r.transition_in)(Xe.$$.fragment,e),Object(r.transition_in)(Rt.$$.fragment,e),Object(r.transition_in)(Ft.$$.fragment,e),Object(r.transition_in)(rn.$$.fragment,e),Object(r.transition_in)(on.$$.fragment,e),Object(r.transition_in)(ln.$$.fragment,e),Object(r.transition_in)(un.$$.fragment,e),bn=!0)},o(e){Object(r.transition_out)(j.$$.fragment,e),Object(r.transition_out)(w.$$.fragment,e),Object(r.transition_out)(C.$$.fragment,e),Object(r.transition_out)(Z.$$.fragment,e),Object(r.transition_out)(ee.$$.fragment,e),Object(r.transition_out)(ie.$$.fragment,e),Object(r.transition_out)(Oe.$$.fragment,e),Object(r.transition_out)(_e.$$.fragment,e),Object(r.transition_out)(Ie.$$.fragment,e),Object(r.transition_out)(Me.$$.fragment,e),Object(r.transition_out)(Xe.$$.fragment,e),Object(r.transition_out)(Rt.$$.fragment,e),Object(r.transition_out)(Ft.$$.fragment,e),Object(r.transition_out)(rn.$$.fragment,e),Object(r.transition_out)(on.$$.fragment,e),Object(r.transition_out)(ln.$$.fragment,e),Object(r.transition_out)(un.$$.fragment,e),bn=!1},d(n){n&&Object(r.detach)(t),n&&Object(r.detach)(o),n&&Object(r.detach)(d),Object(r.destroy_component)(j),Object(r.destroy_component)(w),Object(r.destroy_component)(C),Object(r.destroy_component)(Z),Object(r.destroy_component)(ee),Object(r.destroy_component)(ie),Object(r.destroy_component)(Oe),Object(r.destroy_component)(_e),Object(r.destroy_component)(Ie),Object(r.destroy_component)(Me),Object(r.destroy_component)(Xe),Object(r.destroy_component)(Rt),Object(r.destroy_component)(Ft),n&&Object(r.detach)(en),n&&Object(r.detach)(tn),Object(r.destroy_component)(rn),Object(r.destroy_component)(on),Object(r.destroy_component)(ln),e[68](null),Object(r.destroy_component)(un),pn=!1,Object(r.run_all)(fn)}}}function D(e){let t,n,a=e[26]&&e[0]&&w(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[26]&&e[0]?a?(a.p(e,n),67108865&n[0]&&Object(r.transition_in)(a,1)):(a=w(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function L(e,t,n){let o;Object(r.component_subscribe)(e,y._,e=>n(29,o=e));let c,i,s,l,d,u,_,{profileId:w}=t,k=!1,$=!1,x=!1,S=!1,P=!0,I=!0,C="",T="",A=!1,q=null,R=null,z=!1,E=Object(y.getSupportedLangs)(),B=Object(y.getSupportedLocales)(),D={songTypes:[{id:"all",_key:"songBrowser.types.all"},{id:"rankeds",_key:"songBrowser.types.ranked_only"},{id:"unrankeds",_key:"songBrowser.types.unranked_only"},{id:"rankeds_unplayed",_key:"songBrowser.types.not_played_only"},{id:"sniper_mode",_key:"songBrowser.types.sniper_mode"}],viewTypes:[{id:"compact",_key:"songBrowser.viewTypes.compact"},{id:"tabular",_key:"songBrowser.viewTypes.tabular"},{id:"cards",_key:"songBrowser.viewTypes.cards"}],sortTypes:[{_key:"songBrowser.fields.timeset",field:"timeset",onlyTypes:["all","rankeds","unrankeds","sniper_mode"]},{_key:"songBrowser.fields.stars",field:"stars",onlyTypes:["all","rankeds","rankeds_unplayed","sniper_mode"]},{_key:"songBrowser.fields.pp",field:"pp",onlyTypes:["rankeds","sniper_mode"]},{_key:"songBrowser.fields.acc",field:"acc",onlyTypes:["rankeds","sniper_mode"]}],columns:[{_key:"songBrowser.fields.stars",name:"*",key:"stars",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:"*"}},{_key:"songBrowser.fields.maxPp",name:"Max PP",key:"maxPp",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:"pp"}},{_key:"songBrowser.fields.bpm",name:"BPM",key:"bpm",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:"",digits:0}},{_key:"songBrowser.fields.njs",name:"NJS",key:"njs",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:"",digits:0}},{_key:"songBrowser.fields.nps",name:"NPS",key:"nps",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:""}},{_key:"songBrowser.fields.duration",name:"Czas",key:"length",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-"}},{_key:"songBrowser.fields.timeset",compactLabel:null,name:"Data",key:"timeset",selected:!0,type:"series",displayed:!0,valueProps:{prevValue:null}},{_key:"songBrowser.fields.rank",compactLabel:null,name:"Rank",key:"rank",selected:!0,type:"series",displayed:!0},{_key:"songBrowser.fields.diffPp",compactLabel:null,name:"+PP",key:"diffPp",selected:!1,type:"series",displayed:!1,valueProps:{zero:"-",suffix:"pp global",withSign:!0,useColorsForValue:!0}},{_key:"songBrowser.fields.pp",name:"PP",key:"pp",selected:!0,type:"series",valueProps:{zero:"-",suffix:"pp"},displayed:!0},{_key:"songBrowser.fields.weightedPp",compactLabel:"Ważone",name:"wPP",key:"weightedPp",selected:!1,type:"series",displayed:!0,valueProps:{zero:"-",suffix:"pp"}},{_key:"songBrowser.fields.acc",compactLabel:null,name:"Acc",key:"acc",selected:!0,type:"series",displayed:!0,valueProps:{zero:"-",suffix:"%"}},{_key:"songBrowser.fields.score",compactLabel:null,name:"Wynik",key:"score",selected:!0,type:"series",displayed:!0,valueProps:{digits:0,zero:"-"}},{_key:"songBrowser.fields.beatSaviorAcc",compactLabel:null,name:"Beat Savior Acc",key:"beatSaviorAcc",selected:!0,type:"series",displayed:!0,valueProps:{zero:"-"}},{_key:"songBrowser.fields.beatSaviorStats",compactLabel:null,name:"Beat Savior Stats",key:"beatSaviorStats",selected:!0,type:"series",displayed:!0,valueProps:{zero:"-"}},{_key:"songBrowser.fields.diff",name:"Różnice",key:"diff",selected:!0,type:"other",displayed:!0},{_key:"songBrowser.fields.icons",name:"",key:"icons",type:"additional",displayed:!0,selected:!0}],chartTypes:[{_key:"chart.none",id:"none"},{_key:"chart.rankingButton",id:"rank"},{_key:"chart.accuracyButton",id:"acc"}],statsStyles:[{_key:"profile.settings.profile.statsStyleBadge",id:"badges"},{_key:"profile.settings.profile.statsStyleText",id:"text"}],viewTypeUpdates:[{_key:"profile.settings.others.alwaysRefresh",id:"always"},{_key:"profile.settings.others.keepView",id:"keep-view"}],icons:[{_key:"songBrowser.icons.bsr",id:"bsr"},{_key:"songBrowser.icons.beatsaver",id:"bs"},{_key:"songBrowser.icons.oneclick",id:"oneclick"},{_key:"songBrowser.icons.preview",id:"preview"},{_key:"songBrowser.icons.twitch",id:"twitch"},{_key:"songBrowser.icons.beatsavior",id:"beatsavior"}],themes:Object.entries(m.themes).map(e=>({id:e[0],label:e[1].name,def:e[1].def,_key:e[1]._key}))},L={songTypes:D.songTypes[0],viewTypes:D.viewTypes[0],chartTypes:D.chartTypes[1],statsStyles:D.statsStyles[0],viewTypeUpdates:D.viewTypeUpdates[1],shownIcons:D.icons.map(e=>e),lang:E[0],locale:B[1],theme:D.themes[0]},N=L.theme,F=L.lang,M=L.locale;const U=()=>D.sortTypes.filter(e=>!e.onlyTypes||e.onlyTypes.includes(L.songTypes.id));let V=U(),H=U()[0],W=D.columns.filter(e=>e.displayed),Z=W.filter(e=>e.selected),K=[5,8,10,12,15,20,24,25,48,50].map(e=>({label:e,val:e})),X=K[1];async function J(e,t){n(3,k=(await Object(f.getAllActivePlayersIds)(t)).includes(e)),n(4,$=(await Object(f.getManuallyAddedPlayersIds)(t)).includes(e)),n(5,x=(await Object(f.getFriendsIds)()).includes(e))}let Q=!1;async function Y(e){n(12,R=await p.default.getProfileByPlayerId(e,!0)),q=await p.default.getCurrentToken();const t=q?Math.floor(q.expires_in/1e3/60/60/24):null,r=t<=3,a=!!(d&&d.profile&&d.profile.showTwitchIcon);if(n(7,P=a&&!q||q&&r),n(8,I=a&&q&&i&&!i.inactive),n(9,C=q?r?Object(y.trans)("profile.twitch.renew"):Object(y.trans)("profile.twitch.linked"):Object(y.trans)("profile.twitch.link")),n(10,T=q&&t>0?Object(y.trans)("profile.twitch.daysLeft",{days:t}):null),n(11,A=!r),R){if(!R.id){const t=await p.default.getProfileByUsername(R.login);t&&(n(12,R={...R,...t,playerId:e}),await p.default.storeProfile(R))}await p.default.updateVideosForPlayerId(e)}}const G=async()=>{n(18,_=await Object(v.getActiveCountry)()),n(16,d=await Object(b.getConfig)()),n(1,c=d&&d.users&&d.users.main?d.users.main:null);const e=D.songTypes.find(e=>e.id===d.songBrowser.defaultType);e&&n(20,L.songTypes=e,L);const t=D.viewTypes.find(e=>e.id===d.songBrowser.defaultView);t&&n(20,L.viewTypes=t,L);const r=W.filter(e=>Array.isArray(d.songBrowser.showColumns)&&d.songBrowser.showColumns.includes(e.key));r&&n(24,Z=r);const a=D.icons.filter(e=>d.songBrowser.showIcons.includes(e.id));a&&n(20,L.shownIcons=a,L);const o=U().find(e=>e.field===d.songBrowser.defaultSort);o&&n(22,H=o);const i=K.find(e=>e.val===d.songBrowser.itemsPerPage);i&&n(25,X=i);const s=D.chartTypes.find(e=>e.id===d.profile.showChart);s&&n(20,L.chartTypes=s,L);let l=D.statsStyles.find(e=>e.id===d.profile.statsStyle);l&&n(20,L.statsStyles=l,L);const u=D.themes.find(e=>e.id===d.others.theme);u&&(n(20,L.theme=u,L),N=u);const p=E.find(e=>e.id===d.others.language);p&&(n(20,L.lang=p,L),F=p);const f=B.find(e=>e.id===d.others.locale);f&&(n(20,L.locale=f,L),M=f),d.songLeaderboard&&void 0===d.songLeaderboard.showBgCover&&n(16,d.songLeaderboard.showBgCover=!0,d);const O=D.viewTypeUpdates.find(e=>e.id===d.others.viewsUpdate);O&&n(20,L.viewTypeUpdates=O,L),U(),w&&(await J(w,_),await Y(w))};Object(a.onMount)(async()=>{n(6,S=await Object(f.isDataAvailable)()),n(2,i=await Object(f.getPlayerInfo)(w)),await G(),n(26,Q=!0);const e=g.default.on("player-scores-updated",async({playerId:e})=>{i||e!==w||await re(w)}),t=g.default.on("data-refreshed",async({playerId:e})=>{await re(w)}),r=g.default.on("config-changed",G),a=g.default.on("player-twitch-linked",async({playerId:e})=>{e===w&&await Y(w)}),o=g.default.on("main-player-changed",({playerId:e})=>{n(1,c=e)});return()=>{e(),r(),a(),o(),t()}});let ee=!1,te=!1;async function ne(){await Object(f.addPlayerToGroup)(w),await Object(f.getPlayerInfo)(w)||await Object(f.updatePlayer)({id:w}),await J(w,_),g.default.publish("player-added-to-friends",{playerId:w,nodeId:Object(h.default)().getId()})}async function re(e){n(6,S=await Object(f.isDataAvailable)()),n(2,i=await Object(f.getPlayerInfo)(e)),await J(e,_),await Y(e)}return e.$$set=e=>{"profileId"in e&&n(0,w=e.profileId)},e.$$.update=()=>{67108865&e.$$.dirty[0]&&Q&&w&&re(w),536870912&e.$$.dirty[0]&&function(){Object.keys(D).forEach(e=>{D[e].forEach(e=>{e._key&&(e.label=Object(y.trans)(e._key))})}),n(19,D={...D}),n(20,L={...L});const e=H.id;n(21,V=U()),n(22,H=V.find(t=>t.id===e));const t=W.filter(e=>e.selected).map(e=>e.key);n(23,W=D.columns.filter(e=>e.displayed)),n(24,Z=W.filter(e=>t.includes(e.key)))}()},[w,c,i,k,$,x,S,P,I,C,T,A,R,z,s,l,d,u,_,D,L,V,H,W,Z,X,Q,ee,te,o,E,B,K,async function(){w&&(d.users||n(16,d.users={},d),n(16,d.users.main=w,d),await Object(b.setConfig)(d),await Object(f.getPlayerInfo)(w)||await Object(f.updatePlayer)({id:w}),n(6,S=!0),g.default.publish("main-player-changed",{playerId:w}))},function(e){try{n(27,ee=!0),s&&s.$set({disabled:!0}),l&&l.$set({disabled:!0}),Object(j.importDataHandler)(e,e=>{n(27,ee=!1),alert(e),s.$set({disabled:!1})},async e=>{n(27,ee=!1),s&&s.$set({disabled:!1}),l&&l.$set({disabled:!1}),g.default.publish("data-imported",{})})}catch{n(27,ee=!1)}},async function(){try{n(28,te=!0),await Object(j.exportJsonData)()}finally{n(28,te=!1)}},function(){n(21,V=U()),V.find(e=>e.field===H.field)||n(22,H=V[0])},async function(){Object(m.setTheme)(L.theme.id)},function(){n(20,L.theme=N,L),n(20,L.lang=F,L),n(20,L.locale=M,L),Object(y.setCurrentLang)(L.lang.id),Object(y.setCurrentLocale)(L.locale.id),Object(m.setTheme)(L.theme.id),n(13,z=!1)},async function(){n(16,d.songBrowser.defaultType=L.songTypes.id,d),n(16,d.songBrowser.defaultView=L.viewTypes.id,d),n(16,d.profile.showChart=L.chartTypes.id,d),n(16,d.profile.statsStyle=L.statsStyles.id,d),n(16,d.songBrowser.defaultSort=H.field,d),n(16,d.songBrowser.showColumns=Z.map(e=>e.key),d),n(16,d.songBrowser.showIcons=L.shownIcons.map(e=>e.id),d),n(16,d.songBrowser.itemsPerPage=X.val,d),n(16,d.songLeaderboard.defaultType=u,d),n(16,d.others.theme=L.theme.id,d),n(16,d.others.viewsUpdate=L.viewTypeUpdates.id,d),n(16,d.others.language=L.lang.id,d),n(16,d.others.locale=L.locale.id,d),Object(O.setThemeInFastCache)(L.theme.id),await Object(b.setConfig)(d),g.default.publish("config-changed",d),n(13,z=!1)},ne,async function(){await Object(f.removePlayerFromGroup)(w,$),await J(w,_),$?g.default.publish("player-removed",{playerId:w,nodeId:Object(h.default)().getId()}):g.default.publish("player-removed-from-friends",{playerId:w,nodeId:Object(h.default)().getId()}),window.location.reload()},async function(){await ne(),g.default.publish("player-added",{playerId:w,nodeId:Object(h.default)().getId()})},function(){Object(y.setCurrentLang)(L.lang.id)},function(){Object(y.setCurrentLocale)(L.locale.id)},function(e){r.binding_callbacks[e?"unshift":"push"](()=>{l=e,n(15,l)})},()=>n(13,z=!0),()=>window.location.href=p.default.getAuthUrl(w||""),function(e){L.lang=e,n(20,L)},function(e){L.locale=e,n(20,L)},function(e){L.theme=e,n(20,L)},function(){d.songBrowser.autoTransform=this.checked,n(16,d)},function(e){L.songTypes=e,n(20,L)},function(e){L.viewTypes=e,n(20,L)},function(e){Z=e,n(24,Z)},function(e){H=e,n(22,H)},function(e){L.shownIcons=e,n(20,L)},function(e){X=e,n(25,X)},function(e){L.statsStyles=e,n(20,L)},function(e){L.chartTypes=e,n(20,L)},function(){d.profile.showOnePpCalc=this.checked,n(16,d)},function(){d.profile.showTwitchIcon=this.checked,n(16,d)},function(){d.songLeaderboard.showDiff=this.checked,n(16,d)},function(){d.songLeaderboard.showWhatIfPp=this.checked,n(16,d)},function(){d.songLeaderboard.showBgCover=this.checked,n(16,d)},function(e){u=e,n(17,u)},function(e){L.viewTypeUpdates=e,n(20,L)},function(){d.others.bgDownload=this.checked,n(16,d)},function(e){r.binding_callbacks[e?"unshift":"push"](()=>{s=e,n(14,s)})},()=>n(13,z=!1)]}class N extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1fwnz7n-style")||((t=Object(r.element)("style")).id="svelte-1fwnz7n-style",t.textContent=".text-align-left.svelte-1fwnz7n.svelte-1fwnz7n{text-align:left!important}header.svelte-1fwnz7n.svelte-1fwnz7n{font-size:1.5em;text-align:center}header.svelte-1fwnz7n .menu-label.svelte-1fwnz7n{margin-top:0;margin-bottom:0}label.svelte-1fwnz7n.svelte-1fwnz7n{margin-right:.75em;margin-bottom:.75em}.menu-label.svelte-1fwnz7n.svelte-1fwnz7n{margin-top:.75em;margin-bottom:.25em;color:var(--alternate)}.columns.svelte-1fwnz7n.svelte-1fwnz7n:last-of-type{margin-bottom:0}.column.svelte-1fwnz7n.svelte-1fwnz7n:not(.is-two-thirds){text-align:center;padding-bottom:0;max-width:20rem}@media screen and (max-width: 768px){.column.svelte-1fwnz7n.svelte-1fwnz7n{max-width:none}}.column.svelte-1fwnz7n .menu-label.svelte-1fwnz7n{margin-right:0;margin-bottom:.25em}.column .dropdown, .column .dropdown-trigger, .column .dropdown-trigger button{width:100%}.column.fields.svelte-1fwnz7n .dropdown-menu{max-height:20rem}footer.svelte-1fwnz7n.svelte-1fwnz7n{margin-top:auto;min-height:3.75rem;justify-content:space-between;align-items:flex-end}footer.svelte-1fwnz7n .column.svelte-1fwnz7n{max-width:none}footer.svelte-1fwnz7n .column.svelte-1fwnz7n:nth-child(1){text-align:left}footer.svelte-1fwnz7n .column.svelte-1fwnz7n:nth-child(2){text-align:right}",Object(r.append)(document.head,t)),Object(r.init)(this,e,L,D,r.safe_not_equal,{profileId:0},[-1,-1,-1])}}t.default=N},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9),c=n(36),i=n(67);function s(e){let t,n,a;function o(t){e[4].call(null,t)}let c={items:e[0].leaderboardTypes};return void 0!==e[1].leaderboardType&&(c.value=e[1].leaderboardType),t=new i.default({props:c}),r.binding_callbacks.push(()=>Object(r.bind)(t,"value",o)),{c(){Object(r.create_component)(t.$$.fragment)},m(e,n){Object(r.mount_component)(t,e,n),a=!0},p(e,[a]){const o={};1&a&&(o.items=e[0].leaderboardTypes),!n&&2&a&&(n=!0,o.value=e[1].leaderboardType,Object(r.add_flush_callback)(()=>n=!1)),t.$set(o)},i(e){a||(Object(r.transition_in)(t.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),a=!1},d(e){Object(r.destroy_component)(t,e)}}}function l(e,t,n){let i;Object(r.component_subscribe)(e,o._,e=>n(6,i=e));let{value:s}=t,{country:l}=t,d={leaderboardTypes:[{id:"all",_key:"songLeaderboard.types.all"},{id:"country",_key:"songLeaderboard.types.country"},{id:"country_and_friends",_key:"songLeaderboard.types.country_and_friends"},{id:"manually_added",_key:"songLeaderboard.types.manually_added"}]},u={leaderboardType:d.leaderboardTypes.find(e=>e.id===s)},b=!1;return u.leaderboardType||(b=!0,u.leaderboardType=d.leaderboardTypes.find(e=>"country"===e.id)),Object(a.onMount)(async()=>{const e=await Object(c.getConfig)("songLeaderboard");b&&e.defaultType&&n(1,u.leaderboardType=d.leaderboardTypes.find(t=>t.id===e.defaultType),u),!l&&["country","country_and_friends"].includes(u.leaderboardType.id)&&n(1,u.leaderboardType=d.leaderboardTypes.find(e=>"all"===e.id),u)}),e.$$set=e=>{"value"in e&&n(2,s=e.value),"country"in e&&n(3,l=e.country)},e.$$.update=()=>{2&e.$$.dirty&&n(2,s=u.leaderboardType.id),64&e.$$.dirty&&(Object.keys(d).forEach(e=>{d[e].forEach(e=>{e._key&&(e.label=Object(o.trans)(e._key))})}),n(0,d={...d}),n(1,u={...u}))},[d,u,s,l,function(e){u.leaderboardType=e,n(1,u)}]}class d extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,l,s,r.safe_not_equal,{value:2,country:3})}}t.default=d},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(73),o=n(58);function c(e){let t,n,a;return{c(){t=Object(r.element)("input"),Object(r.attr)(t,"type","file"),Object(r.attr)(t,"accept",e[0]),t.disabled=e[1],Object(r.attr)(t,"class","svelte-1atrh09")},m(o,c){Object(r.insert)(o,t,c),n||(a=Object(r.listen)(t,"change",e[3]),n=!0)},p(e,n){1&n&&Object(r.attr)(t,"accept",e[0]),2&n&&(t.disabled=e[1])},d(e){e&&Object(r.detach)(t),n=!1,a()}}}function i(e){let t,n;const o=[e[2]];let i={$$slots:{default:[c]},$$scope:{ctx:e}};for(let e=0;e<o.length;e+=1)i=Object(r.assign)(i,o[e]);return t=new a.default({props:i}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,[n]){const a=4&n?Object(r.get_spread_update)(o,[Object(r.get_spread_object)(e[2])]):{};35&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function s(e,t,n){Object(o.createEventDispatcher)();let{accept:a}=t,{disabled:c=!1}=t;return e.$$set=e=>{n(2,t=Object(r.assign)(Object(r.assign)({},t),Object(r.exclude_internal_props)(e))),"accept"in e&&n(0,a=e.accept),"disabled"in e&&n(1,c=e.disabled)},t=Object(r.exclude_internal_props)(t),[a,c,t,function(t){Object(r.bubble)(e,t)}]}class l extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1atrh09-style")||((t=Object(r.element)("style")).id="svelte-1atrh09-style",t.textContent="input[type=file].svelte-1atrh09{position:absolute;width:100%;height:100%;top:0;left:0;outline:none;opacity:0}",Object(r.append)(document.head,t)),Object(r.init)(this,e,s,i,r.safe_not_equal,{accept:0,disabled:1})}}t.default=l},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(73),c=n(82),i=n(15),s=n(9),l=n(33),d=n(7),u=n(36),b=n(71),p=n(83),f=n(6),O=n(13),j=n(1),m=n(84),g=n(14);function h(e){let t,n,a,o;const c=[v,y],i=[];function s(e,t){return e[3]?1:0}return t=s(e),n=i[t]=c[t](e),{c(){n.c(),a=Object(r.empty)()},m(e,n){i[t].m(e,n),Object(r.insert)(e,a,n),o=!0},p(e,o){let l=t;t=s(e),t===l?i[t].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),n=i[t],n||(n=i[t]=c[t](e),n.c()),Object(r.transition_in)(n,1),n.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(n),o=!0)},o(e){Object(r.transition_out)(n),o=!1},d(e){i[t].d(e),e&&Object(r.detach)(a)}}}function y(e){let t,n;return t=new c.default({props:{closeable:!1,width:"35em",$$slots:{default:[C]},$$scope:{ctx:e}}}),t.$on("close",e[17]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};67113974&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function v(e){let t,n;return t=new o.default({props:{type:"default","}":!0,title:e[12].beatSaviorImporter.header,disabled:e[10],$$slots:{default:[T]},$$scope:{ctx:e}}}),t.$on("click",e[16]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4096&n&&(r.title=e[12].beatSaviorImporter.header),1024&n&&(r.disabled=e[10]),67108864&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function _(e){let t,n,a,o,c=e[12].beatSaviorImporter.introduction+"",i=e[12].beatSaviorImporter.permissions+"";function s(e,t){return e[1]?$:x}let l=s(e),d=l(e);return{c(){t=Object(r.element)("p"),n=Object(r.space)(),d.c(),a=Object(r.space)(),o=Object(r.element)("p"),Object(r.attr)(t,"class","svelte-4d8xic"),Object(r.attr)(o,"class","svelte-4d8xic")},m(e,s){Object(r.insert)(e,t,s),t.innerHTML=c,Object(r.insert)(e,n,s),d.m(e,s),Object(r.insert)(e,a,s),Object(r.insert)(e,o,s),o.innerHTML=i},p(e,n){4096&n&&c!==(c=e[12].beatSaviorImporter.introduction+"")&&(t.innerHTML=c),l===(l=s(e))&&d?d.p(e,n):(d.d(1),d=l(e),d&&(d.c(),d.m(a.parentNode,a))),4096&n&&i!==(i=e[12].beatSaviorImporter.permissions+"")&&(o.innerHTML=i)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),d.d(e),e&&Object(r.detach)(a),e&&Object(r.detach)(o)}}}function w(e){let t,n,a=e[12].beatSaviorImporter.importCompleted+"";return{c(){t=Object(r.element)("p"),n=Object(r.text)(a),Object(r.attr)(t,"class","svelte-4d8xic")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){4096&t&&a!==(a=e[12].beatSaviorImporter.importCompleted+"")&&Object(r.set_data)(n,a)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function k(e){let t,n,a,o,c,i,s=e[12].beatSaviorImporter.importInProgress+"";return c=new b.default({props:{value:e[6],max:e[7],label:e[8],subLabel:e[9]}}),{c(){t=Object(r.element)("p"),n=Object(r.text)(s),a=Object(r.space)(),o=Object(r.element)("div"),Object(r.create_component)(c.$$.fragment),Object(r.attr)(t,"class","svelte-4d8xic"),Object(r.attr)(o,"class","progress-container svelte-4d8xic")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.insert)(e,a,s),Object(r.insert)(e,o,s),Object(r.mount_component)(c,o,null),i=!0},p(e,t){(!i||4096&t)&&s!==(s=e[12].beatSaviorImporter.importInProgress+"")&&Object(r.set_data)(n,s);const a={};64&t&&(a.value=e[6]),128&t&&(a.max=e[7]),256&t&&(a.label=e[8]),512&t&&(a.subLabel=e[9]),c.$set(a)},i(e){i||(Object(r.transition_in)(c.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(a),e&&Object(r.detach)(o),Object(r.destroy_component)(c)}}}function $(e){let t,n=e[12].beatSaviorImporter.selectFolderConsecutive+"";return{c(){t=Object(r.element)("p"),Object(r.attr)(t,"class","svelte-4d8xic")},m(e,a){Object(r.insert)(e,t,a),t.innerHTML=n},p(e,r){4096&r&&n!==(n=e[12].beatSaviorImporter.selectFolderConsecutive+"")&&(t.innerHTML=n)},d(e){e&&Object(r.detach)(t)}}}function x(e){let t,n=e[12].beatSaviorImporter.selectFolderFirst+"";return{c(){t=Object(r.element)("p"),Object(r.attr)(t,"class","svelte-4d8xic")},m(e,a){Object(r.insert)(e,t,a),t.innerHTML=n},p(e,r){4096&r&&n!==(n=e[12].beatSaviorImporter.selectFolderFirst+"")&&(t.innerHTML=n)},d(e){e&&Object(r.detach)(t)}}}function S(e){let t,n;return{c(){t=Object(r.element)("div"),n=Object(r.text)(e[2]),Object(r.attr)(t,"class","error")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){4&t&&Object(r.set_data)(n,e[2])},d(e){e&&Object(r.detach)(t)}}}function P(e){let t,n;return t=new o.default({props:{label:e[12].beatSaviorImporter.selectOtherFolderBtn}}),t.$on("click",e[14]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4096&n&&(r.label=e[12].beatSaviorImporter.selectOtherFolderBtn),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function I(e){let t,n;return t=new o.default({props:{label:e[12].beatSaviorImporter.importBtn,type:"primary"}}),t.$on("click",e[15]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4096&n&&(r.label=e[12].beatSaviorImporter.importBtn),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function C(e){let t,n,a,c,i,s,l,d,u,b,p,f,O,j,m,g,h=e[12].beatSaviorImporter.header+"";const y=[k,w,_],v=[];function $(e,t){return e[4]?0:e[5]?1:2}s=$(e),l=v[s]=y[s](e);let x=e[2]&&S(e),C=e[1]&&!e[4]&&!e[5]&&P(e),T=!e[4]&&!e[5]&&I(e);return m=new o.default({props:{label:e[12].common.close,disabled:e[4]}}),m.$on("click",e[13]),{c(){t=Object(r.element)("header"),n=Object(r.element)("div"),a=Object(r.text)(h),c=Object(r.space)(),i=Object(r.element)("main"),l.c(),d=Object(r.space)(),x&&x.c(),u=Object(r.space)(),b=Object(r.element)("footer"),p=Object(r.element)("div"),C&&C.c(),f=Object(r.space)(),O=Object(r.element)("div"),T&&T.c(),j=Object(r.space)(),Object(r.create_component)(m.$$.fragment),Object(r.attr)(n,"class","menu-label svelte-4d8xic"),Object(r.attr)(t,"class","svelte-4d8xic"),Object(r.attr)(p,"class","column svelte-4d8xic"),Object(r.attr)(O,"class","column svelte-4d8xic"),Object(r.attr)(b,"class","columns svelte-4d8xic")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.insert)(e,c,o),Object(r.insert)(e,i,o),v[s].m(i,null),Object(r.append)(i,d),x&&x.m(i,null),Object(r.insert)(e,u,o),Object(r.insert)(e,b,o),Object(r.append)(b,p),C&&C.m(p,null),Object(r.append)(b,f),Object(r.append)(b,O),T&&T.m(O,null),Object(r.append)(O,j),Object(r.mount_component)(m,O,null),g=!0},p(e,t){(!g||4096&t)&&h!==(h=e[12].beatSaviorImporter.header+"")&&Object(r.set_data)(a,h);let n=s;s=$(e),s===n?v[s].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(v[n],1,1,()=>{v[n]=null}),Object(r.check_outros)(),l=v[s],l||(l=v[s]=y[s](e),l.c()),Object(r.transition_in)(l,1),l.m(i,d)),e[2]?x?x.p(e,t):(x=S(e),x.c(),x.m(i,null)):x&&(x.d(1),x=null),!e[1]||e[4]||e[5]?C&&(Object(r.group_outros)(),Object(r.transition_out)(C,1,1,()=>{C=null}),Object(r.check_outros)()):C?(C.p(e,t),50&t&&Object(r.transition_in)(C,1)):(C=P(e),C.c(),Object(r.transition_in)(C,1),C.m(p,null)),e[4]||e[5]?T&&(Object(r.group_outros)(),Object(r.transition_out)(T,1,1,()=>{T=null}),Object(r.check_outros)()):T?(T.p(e,t),48&t&&Object(r.transition_in)(T,1)):(T=I(e),T.c(),Object(r.transition_in)(T,1),T.m(O,j));const o={};4096&t&&(o.label=e[12].common.close),16&t&&(o.disabled=e[4]),m.$set(o)},i(e){g||(Object(r.transition_in)(l),Object(r.transition_in)(C),Object(r.transition_in)(T),Object(r.transition_in)(m.$$.fragment,e),g=!0)},o(e){Object(r.transition_out)(l),Object(r.transition_out)(C),Object(r.transition_out)(T),Object(r.transition_out)(m.$$.fragment,e),g=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(c),e&&Object(r.detach)(i),v[s].d(),x&&x.d(),e&&Object(r.detach)(u),e&&Object(r.detach)(b),C&&C.d(),T&&T.d(),Object(r.destroy_component)(m)}}}function T(e){let t,n;return t=new m.default({}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function A(e){let t,n,a=e[11]&&e[0]&&h(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[11]&&e[0]?a?(a.p(e,n),2049&n&&Object(r.transition_in)(a,1)):(a=h(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function q(e,t,n){let o;Object(r.component_subscribe)(e,s._,e=>n(12,o=e));let{profileId:c}=t,b=null,m=null,h={},y=null,v=!1,_=!1,w=!1,k=0,$=0,x="",S="",P=null,I=!1,C=!1;async function T(e,t=!1){const n={mode:t?"readwrite":"read"};if("granted"===await e.queryPermission(n))return!0;if("granted"===await e.requestPermission(n))return!0;throw o.beatSaviorImporter.noPermissionException}async function A(){P=await Object(i.getPlayerInfo)(c)}async function q(e){h[e]||(n(9,S=o.beatSaviorImporter.fetchPlayerScores),h[e]=await Object(g.getPlayerScoresForBeatSaviorMatching)(e))}async function R(e,t=null){if(!await T(e))throw o.beatSaviorImporter.noPermissionException;const r=Object(d.getClientTimezoneOffset)();n(9,S=o.beatSaviorImporter.loading);const a=await e.getFile();if(!a||t&&a.size===t)return null;const c=(await a.text()).split("\n"),i=a.name.toLowerCase().match(/^(?:(\d{2})-(\d{2})-(\d{4})|(\d{4})-(\d{2})-(\d{2}))\.bsd$/);if(!i||7===!i.length)return null;const s=Object(d.truncateDate)(new Date(`${i[4]?`${i[4]}-${i[5]}-${i[6]}`:`${i[3]}-${i[2]}-${i[1]}`}T00:00:00${r}`),"day"),l=s.getTime();let u={name:a.name,date:s,size:a.size,lastModified:new Date(a.lastModified)};try{const e=JSON.parse(c.shift()),{playerID:t,saberAColor:n,saberBColor:r}=e;u={...u,fileId:t+"_"+l,playerId:t,saberAColor:n,saberBColor:r,plays:[]}}catch{return null}return u.playerId?(await q(u.playerId),c.forEach((e,t)=>{try{const n=JSON.parse(e);if(!n||!n.playerID)throw"No player";const r=Object(g.parseBeatSaviorLine)(n,h?h[n.playerID]:null,t,u.saberAColor,u.saberBColor,u.fileId,u.name,l);r&&u.plays.push(r)}catch{}}),u):null}async function z(){try{n(1,b=await window.showDirectoryPicker()),b&&await Object(l.default)().set(b,"beatSaviorDirHandle")}catch(e){throw o.beatSaviorImporter.noFolderSelectedException}}return Object(a.onMount)(async()=>{if(!window.showDirectoryPicker)return;if(m=await Object(u.getMainPlayerId)(),!m||!c||m!==c)return;await q(m),await A(),n(1,b=await Object(l.default)().get("beatSaviorDirHandle"));const e=O.default.on("start-data-refreshing",()=>{n(10,I=!0)}),t=O.default.on("data-refreshed",()=>{n(10,I=!1)}),r=O.default.on("player-scores-updated",async({playerId:e})=>{h[e]&&await q(e),e===c&&await A()});return n(11,C=!0),()=>{e(),t(),r()}}),e.$$set=e=>{"profileId"in e&&n(0,c=e.profileId)},[c,b,y,v,_,w,k,$,x,S,I,C,o,function(){n(3,v=!1),n(5,w=!1)},z,async function(){try{if(!window.showDirectoryPicker)throw o.beatSaviorImporter.fileSystemApiNotAvailableException;if(!(P&&P.lastUpdated&&new Date-P.lastUpdated<3e5))throw o.beatSaviorImporter.oldPlayerScoresException;b||await z(),await T(b),n(4,_=!0),n(2,y=null),O.default.publish("dl-manager-pause-cmd"),await async function(e){if(!e)throw o.beatSaviorImporter.noDirectoryHandleException;await T(e);const t=Object(f.convertArrayToObjectByKey)(await Object(p.default)().getAll(),"name"),r=[];for await(const t of e.values())r.push(t);n(6,k=0),n(7,$=r.length);let a=[];for(const e of r){if(n(8,x=e.name),n(9,S=""),"file"!==e.kind||!e.name.endsWith(".bsd")||"_PBScoreGraphs.bsd"===e.name){n(9,S=o.beatSaviorImporter.skipping),n(6,k++,k);continue}const r=t[e.name]?t[e.name].size:null,c=await R(e,r);if(!c){n(9,S=o.beatSaviorImporter.skipping),n(6,k++,k);continue}n(9,S=o.beatSaviorImporter.savingToDb);const{plays:i,...s}=c;await Object(g.storeBeatSaviorData)(i,s),n(6,k++,k),a=a.concat(i.filter(e=>!g.IMPORT_ONLY_SS_SCORES||e.ssScore))}a&&a.length&&O.default.publish("player-beat-savior-updated",{nodeId:Object(j.default)().getId(),playerId:a[0].playerId,matchedBsData:a})}(b),O.default.publish("beat-savior-data-updated",{nodeId:Object(j.default)().getId()}),n(5,w=!0)}catch(e){n(2,y=e.toString())}finally{n(4,_=!1),O.default.publish("dl-manager-unpause-cmd")}},()=>n(3,v=!0),()=>n(3,v=!1)]}class R extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-4d8xic-style")||((t=Object(r.element)("style")).id="svelte-4d8xic-style",t.textContent="header.svelte-4d8xic.svelte-4d8xic{font-size:1.5em;text-align:center}header.svelte-4d8xic .menu-label.svelte-4d8xic{margin-top:0;margin-bottom:0}p.svelte-4d8xic.svelte-4d8xic{margin:1em 0}p.svelte-4d8xic.svelte-4d8xic:last-of-type{margin-bottom:.5em}.menu-label.svelte-4d8xic.svelte-4d8xic{margin-top:.75em;margin-bottom:.25em;color:var(--alternate)}.columns.svelte-4d8xic.svelte-4d8xic:last-of-type{margin-bottom:0}.progress-container.svelte-4d8xic.svelte-4d8xic{margin:1em 0}.progress-container.svelte-4d8xic progress{width:95%}@media screen and (max-width: 768px){.column.svelte-4d8xic.svelte-4d8xic{max-width:none}}footer.svelte-4d8xic.svelte-4d8xic{margin-top:auto;min-height:3.75rem;justify-content:space-between;align-items:flex-end}footer.svelte-4d8xic .column.svelte-4d8xic{max-width:none}footer.svelte-4d8xic .column.svelte-4d8xic:nth-child(1){text-align:left}footer.svelte-4d8xic .column.svelte-4d8xic:nth-child(2){text-align:right}",Object(r.append)(document.head,t)),Object(r.init)(this,e,q,A,r.safe_not_equal,{profileId:0})}}t.default=R},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(73);const{document:c}=r.globals;function i(e){let t,n;return t=new o.default({props:{iconFa:"fas fa-times",cls:"close"}}),t.$on("click",e[5]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p:r.noop,i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function s(e){let t,n,a,o,c,s,l,d;const u=e[8].default,b=Object(r.create_slot)(u,e,e[7],null);let p=e[1]&&e[0]&&i(e);return{c(){t=Object(r.element)("div"),n=Object(r.space)(),a=Object(r.element)("div"),o=Object(r.element)("div"),b&&b.c(),c=Object(r.space)(),p&&p.c(),Object(r.attr)(t,"class","ss-modal-background svelte-j9o0y9"),Object(r.attr)(o,"class","inner svelte-j9o0y9"),Object(r.attr)(a,"class","ss-modal svelte-j9o0y9"),Object(r.attr)(a,"role","dialog"),Object(r.attr)(a,"aria-modal","true"),Object(r.set_style)(a,"--width",e[2]),Object(r.set_style)(a,"--height",e[3])},m(i,u){Object(r.insert)(i,t,u),Object(r.insert)(i,n,u),Object(r.insert)(i,a,u),Object(r.append)(a,o),b&&b.m(o,null),Object(r.append)(a,c),p&&p.m(a,null),e[10](a),s=!0,l||(d=[Object(r.listen)(window,"keydown",e[6]),Object(r.listen)(t,"click",e[9])],l=!0)},p(e,[t]){b&&b.p&&128&t&&Object(r.update_slot)(b,u,e,e[7],t,null,null),e[1]&&e[0]?p?(p.p(e,t),3&t&&Object(r.transition_in)(p,1)):(p=i(e),p.c(),Object(r.transition_in)(p,1),p.m(a,null)):p&&(Object(r.group_outros)(),Object(r.transition_out)(p,1,1,()=>{p=null}),Object(r.check_outros)()),(!s||4&t)&&Object(r.set_style)(a,"--width",e[2]),(!s||8&t)&&Object(r.set_style)(a,"--height",e[3])},i(e){s||(Object(r.transition_in)(b,e),Object(r.transition_in)(p),s=!0)},o(e){Object(r.transition_out)(b,e),Object(r.transition_out)(p),s=!1},d(o){o&&Object(r.detach)(t),o&&Object(r.detach)(n),o&&Object(r.detach)(a),b&&b.d(o),p&&p.d(),e[10](null),l=!1,Object(r.run_all)(d)}}}function l(e,t,n){let{$$slots:o={},$$scope:c}=t;const i=Object(a.createEventDispatcher)(),s=()=>i("close");let l,{showCloseButton:d=!0}=t,{closeable:u=!0}=t,{width:b="calc(100vw - 4em)"}=t,{height:p="auto"}=t;const f="undefined"!=typeof document&&document.activeElement;return f&&Object(a.onDestroy)(()=>{f.focus()}),e.$$set=e=>{"showCloseButton"in e&&n(0,d=e.showCloseButton),"closeable"in e&&n(1,u=e.closeable),"width"in e&&n(2,b=e.width),"height"in e&&n(3,p=e.height),"$$scope"in e&&n(7,c=e.$$scope)},[d,u,b,p,l,s,e=>{if(u&&"Escape"===e.key)s();else if("Tab"===e.key){const t=l.querySelectorAll("*"),n=Array.from(t).filter(e=>e.tabIndex>=0);let r=n.indexOf(document.activeElement);-1===r&&e.shiftKey&&(r=0),r+=n.length+(e.shiftKey?-1:1),r%=n.length,n[r].focus(),e.preventDefault()}},c,o,()=>{u&&s()},function(e){r.binding_callbacks[e?"unshift":"push"](()=>{l=e,n(4,l)})}]}class d extends r.SvelteComponent{constructor(e){var t;super(),c.getElementById("svelte-j9o0y9-style")||((t=Object(r.element)("style")).id="svelte-j9o0y9-style",t.textContent=".ss-modal-background.svelte-j9o0y9.svelte-j9o0y9{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);z-index:1000}.ss-modal.svelte-j9o0y9.svelte-j9o0y9{position:fixed;left:50%;top:50%;width:var(--width);height:var(--height);max-width:60em;max-height:calc(100vh - 4em);overflow:auto;transform:translate(-50%, -50%);padding:1em;border-radius:0.2em;font-size:.875rem;color:var(--textColor);background:var(--background);z-index:2000}.ss-modal.svelte-j9o0y9 .inner.svelte-j9o0y9{display:flex;flex-direction:column;height:100%}.ss-modal button.close{position:absolute !important;top:.5em;right:.5em;height:auto;margin:0 !important;padding:0 !important}",Object(r.append)(c.head,t)),Object(r.init)(this,e,l,s,r.safe_not_equal,{showCloseButton:0,closeable:1,width:2,height:3})}}t.default=d},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("beat-savior-files","fileId"))},function(e,t,n){"use strict";n.r(t);var r=n(55);function a(e){let t;return{c(){t=Object(r.element)("div"),Object(r.attr)(t,"class","beatsavior-icon svelte-phny4d"),Object(r.attr)(t,"title",e[0])},m(e,n){Object(r.insert)(e,t,n)},p(e,[n]){1&n&&Object(r.attr)(t,"title",e[0])},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function o(e,t,n){let{title:r}=t;return e.$$set=e=>{"title"in e&&n(0,r=e.title)},[r]}class c extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-phny4d-style")||((t=Object(r.element)("style")).id="svelte-phny4d-style",t.textContent=".beatsavior-icon.svelte-phny4d{width:1.3em;height:1.3em;background-size:cover;background-repeat:no-repeat;background-image:url(\"data:image/svg+xml,%3Csvg xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:cc='http://creativecommons.org/ns%23' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23' xmlns:svg='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' width='72.723976mm' height='63.291668mm' viewBox='0 0 72.723976 63.291668' version='1.1' id='svg3827' sodipodi:docname='bsicon_ter.svg' inkscape:version='0.92.4 (5da689c313, 2019-01-14)'%3E%3Cdefs id='defs3821' /%3E%3Csodipodi:namedview id='base' pagecolor='%23ffffff' bordercolor='%23666666' borderopacity='1.0' inkscape:pageopacity='0.0' inkscape:pageshadow='2' inkscape:zoom='1.4' inkscape:cx='40.905424' inkscape:cy='61.353566' inkscape:document-units='mm' inkscape:current-layer='layer1' showgrid='false' inkscape:window-width='1920' inkscape:window-height='1017' inkscape:window-x='-8' inkscape:window-y='-8' inkscape:window-maximized='1' /%3E%3Cmetadata id='metadata3824'%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=''%3E%3Cdc:format%3Eimage/svg+xml%3C/dc:format%3E%3Cdc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage' /%3E%3Cdc:title%3E%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cg inkscape:label='Calque 1' inkscape:groupmode='layer' id='layer1' style='opacity:1' transform='translate(-0.72553574,-0.71711111)'%3E%3Crect style='fill:%23000200;fill-opacity:1;stroke:%23000000;stroke-width:1.98928511;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal' id='rect4531' width='63.5' height='10.583332' x='5.4550524' y='10.242103' inkscape:export-xdpi='81.844757' inkscape:export-ydpi='81.844757' /%3E%3Crect style='fill:%23ffffff;fill-opacity:1;stroke:none;stroke-width:3.35483217;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal' id='rect4533' width='6.6145835' height='6.6145835' x='25.298788' y='11.565023' inkscape:export-xdpi='81.844757' inkscape:export-ydpi='81.844757' /%3E%3Crect style='fill:%23ffffff;fill-opacity:1;stroke:none;stroke-width:3.92078424;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal' id='rect4533-5' width='6.6145835' height='6.6145835' x='42.496708' y='11.565023' inkscape:export-xdpi='81.844757' inkscape:export-ydpi='81.844757' /%3E%3Cg id='g4614' transform='rotate(-23.417079,-23.695385,307.31208)' inkscape:export-xdpi='81.844757' inkscape:export-ydpi='81.844757'%3E%3Crect y='86.127083' x='125.67709' height='1.3229166' width='50.270832' id='rect4610' style='fill:%230000ff;fill-opacity:1;stroke:%230000ff;stroke-width:2.64583325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1' /%3E%3Crect y='85.333328' x='109.80208' height='2.6458333' width='15.875' id='rect4605' style='fill:%23000000;fill-opacity:1;stroke:%23000000;stroke-width:2.64583325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1' /%3E%3C/g%3E%3Cg transform='rotate(-156.98422,82.908484,73.919009)' id='g4614-3' inkscape:export-xdpi='81.844757' inkscape:export-ydpi='81.844757'%3E%3Crect y='86.127083' x='125.67709' height='1.3229166' width='50.270832' id='rect4610-6' style='fill:%23ff0000;fill-opacity:1;stroke:%23ff0000;stroke-width:2.64583325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1' /%3E%3Crect y='85.333328' x='109.80208' height='2.6458333' width='15.875' id='rect4605-7' style='fill:%23000000;fill-opacity:1;stroke:%23000000;stroke-width:2.64583325;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\")}",Object(r.append)(document.head,t)),Object(r.init)(this,e,o,a,r.safe_not_equal,{title:0})}}t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"exportJsonData",(function(){return $})),n.d(t,"importJsonData",(function(){return x})),n.d(t,"importDataHandler",(function(){return C}));var r=n(13),a=n(9),o=n(86),c=n(19),i=n(51),s=n(37),l=n(47),d=n(16),u=n(49),b=n(48),p=n(45),f=n(32),O=n(52),j=n(83),m=n(87),g=n(7),h=n(3);function y(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){y(o,r,a,c,i,"next",e)}function i(e){y(o,r,a,c,i,"throw",e)}c(void 0)}))}}var _,w,k=[{repository:j.default,casts:{date:["date","importedOn","lastModified"]}},{repository:m.default},{repository:i.default},{repository:l.default},{repository:d.default,casts:{date:["recentPlay","profileLastUpdated","lastUpdated"]}},{repository:u.default,casts:{date:["timestamp"]}},{repository:b.default,casts:{date:["firstSeen"]}},{repository:p.default,casts:{date:["timeset","lastUpdated"]}},{repository:f.default},{repository:O.default,casts:{date:["lastUpdated"]}},{repository:s.default,excludedKeys:["twitchToken"],casts:{date:["activePlayersLastUpdate","lastUpdated","rankedSongsLastUpdated"]}}],$=(w=v((function*(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sspl-db-export-"+(new Date).toISOString().replace(/:/g,"_")+".json",r=P(),a=I(),i=(yield Promise.all(r.map(e=>e.repository).map((e=v((function*(e){return e().getAll()})),function(t){return e.apply(this,arguments)})))).reduce((e,t,n)=>(e.stores[r[n].repository().getStoreName()]=t,e),{version:c.db.version,stores:{}});return yield Promise.all(a.map((t=v((function*(e){var t=(0,e.repository)().getStoreName(),n=yield Object(s.default)().getAllKeys(),r=yield Object(s.default)().getAll();i.stores[t]=n.reduce((t,n,a)=>{var o;return t.concat([{key:n,value:(null!==(o=null==e?void 0:e.excludedKeys)&&void 0!==o?o:[]).includes(n)?null:r[a]}])},[])})),function(e){return t.apply(this,arguments)}))),Object(o.default)(JSON.stringify(i),n,"application/json;charset=utf-8;")})),function(){return w.apply(this,arguments)}),x=(_=v((function*(e){var t,n=k.map(e=>e.repository().getStoreName());r.default.publish("dl-manager-pause-cmd"),yield c.db.runInTransaction(n,(t=v((function*(t){var n=function*(n){var r,a=n.repository(),o=a.hasOutOfLineKey(),c=a.getStoreName();if(!(null==e||null===(r=e.stores)||void 0===r?void 0:r[c]))return h.default.warn("Store ".concat(c," does not exists in imported JSON")),"continue";var i,s=e.stores[c].map(e=>S(e,n)),l=t.objectStore(c);yield l.clear(),yield Promise.all(s.map((i=v((function*(e){return o?a.set(e.value,e.key):a.set(e)})),function(e){return i.apply(this,arguments)})))};for(var r of k)yield*n(r)})),function(e){return t.apply(this,arguments)}))})),function(e){return _.apply(this,arguments)}),S=(e,t)=>{var n,r=t.repository().hasOutOfLineKey();return Object.keys(null!==(n=null==t?void 0:t.casts)&&void 0!==n?n:{}).forEach(n=>{switch(n){case"date":t.casts.date.forEach(t=>{r?e.value&&(null==e?void 0:e.key)===t&&(e.value=Object(g.dateFromString)(e.value)):e[t]&&(e[t]=Object(g.dateFromString)(e[t]))});break;default:h.default.error("Unknown cast type ".concat(n," in repository ").concat(t.repository().getStoreName()))}}),e},P=()=>k.filter(e=>!e.repository().hasOutOfLineKey()),I=()=>k.filter(e=>e.repository().hasOutOfLineKey());function C(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=e.target.files[0];if(o)if("application/json"===o.type){var c=new FileReader;c.onload=(t=v((function*(e){try{var t=JSON.parse(e.target.result);if(!t||!t.version)return void(n&&n(Object(a.trans)("import.incorrectFile")));if(t.version<2)return void(n&&n(Object(a.trans)("import.oldVerNotSupported")));if(!t.stores)return void(n&&n(Object(a.trans)("import.incorrectFile")));yield x(t),r&&(yield r(t))}catch(e){h.default.error(e),n&&n(Object(a.trans)("import.incorrectJsonFile"))}})),function(e){return t.apply(this,arguments)}),c.readAsText(o)}else n&&n(Object(a.trans)("import.selectJsonFile"))}},function(e,t,n){"use strict";n.r(t),t.default=(e,t,n)=>{var r=document.createElement("a");if(void 0===r.download)return!1;var a=new Blob([e],{type:n});return r.setAttribute("href",URL.createObjectURL(a)),r.setAttribute("download",t),r.style.visibility="hidden",document.body.appendChild(r),r.click(),document.body.removeChild(r),!0}},function(e,t,n){"use strict";n.r(t);var r,a=n(17);t.default=()=>r||(r=Object(a.default)("beat-savior","beatSaviorId",{"beat-savior-playerId":"playerId","beat-savior-songId":"songId","beat-savior-fileId":"fileId"}))},function(e,t,n){"use strict";n.r(t),n.d(t,"themes",(function(){return r})),n.d(t,"getTheme",(function(){return o})),n.d(t,"setTheme",(function(){return c})),n.d(t,"getSsDefaultTheme",(function(){return i})),n.d(t,"setSsDefaultTheme",(function(){return s}));var r={darkss:{name:"Jedyny słuszny",_key:"themes.dark",def:[["background","#222"],["foreground","#252525"],["textColor","#eee"],["ppColour","#8992e8"],["alternate","#72a8ff"],["selected","#3273dc"],["hover","#333"],["highlight","#484848"],["decrease","#f94022"],["increase","#42b129"],["dimmed","#3e3e3e"],["faded","#666"]]},lightss:{name:"Wypalający oczy",_key:"themes.light",def:[["background","#fcfcfc"],["foreground","white"],["textColor","#4a4a4a"],["ppColour","#6772E5"],["alternate","#3273dc"],["selected","#a5d0f5"],["hover","#eee"],["highlight","#39f939"],["decrease","#f94022"],["increase","#42b129"],["navBg","#252525"],["navText","#eee"],["navHover","#111"],["dimmed","#dedede"],["faded","#aaa"]]},drakonno:{name:"Drakonno",_key:"themes.drakonno",def:[["background","#002b36"],["foreground","#073642"],["textColor","#839496"],["ppColour","#6772E5"],["alternate","#b58900"],["selected","#002b36"],["hover","#285661"],["highlight","#162c31"],["decrease","#f94022"],["increase","#42b129"],["dimmed","#0a4c5d"],["faded","#0d6f88"]]},sombra:{name:"Sombra",_key:"themes.sombra",def:[["background","#1f0001"],["foreground","#2f0042"],["textColor","#fff"],["ppColour","#f50004"],["alternate","#fff"],["selected","#0f008f"],["hover","#0f008f"],["highlight","#0f008f"],["decrease","#f94022"],["increase","#42b129"],["dimmed","#680092"],["faded","#8100b5"]]}},a=[["color-ahead","rgb(0, 128, 0)"],["color-behind","rgb(128, 0, 0)"],["color-highlight","darkgreen"]],o=e=>(r[e]?r[e]:"darkss").def.concat(a),c=e=>o(e).map(e=>document.documentElement.style.setProperty("--"+e[0],e[1])),i=()=>getComputedStyle(document.documentElement).getPropertyValue("--foreground").length?"darkss":"lightss",s=()=>c(i())},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(68),c=n(13),i=n(1),s=n(9),l=n(73),d=n(82),u=n(15);function b(e){let t,n,a,o;t=new l.default({props:{iconFa:"fab fa-twitch",label:e[1]?"":e[7].profile.twitch.setupPlayerProfile,title:e[1]?e[7].profile.twitch.setupPlayerProfile:"",type:"twitch"}}),t.$on("click",e[8]);let c=e[3]&&p(e);return{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),c&&c.c(),a=Object(r.empty)()},m(e,i){Object(r.mount_component)(t,e,i),Object(r.insert)(e,n,i),c&&c.m(e,i),Object(r.insert)(e,a,i),o=!0},p(e,n){const o={};130&n&&(o.label=e[1]?"":e[7].profile.twitch.setupPlayerProfile),130&n&&(o.title=e[1]?e[7].profile.twitch.setupPlayerProfile:""),t.$set(o),e[3]?c?(c.p(e,n),8&n&&Object(r.transition_in)(c,1)):(c=p(e),c.c(),Object(r.transition_in)(c,1),c.m(a.parentNode,a)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)())},i(e){o||(Object(r.transition_in)(t.$$.fragment,e),Object(r.transition_in)(c),o=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),Object(r.transition_out)(c),o=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),c&&c.d(e),e&&Object(r.detach)(a)}}}function p(e){let t,n;return t=new d.default({props:{width:"30rem",closeable:!1,$$slots:{default:[j]},$$scope:{ctx:e}}}),t.$on("close",e[15]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};131320&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function f(e){let t,n,a=e[7].profile.twitch.userNotFound+"";return{c(){t=Object(r.element)("p"),n=Object(r.text)(a)},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){128&t&&a!==(a=e[7].profile.twitch.userNotFound+"")&&Object(r.set_data)(n,a)},d(e){e&&Object(r.detach)(t)}}}function O(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O,j,m,g=e[5].display_name+"",h=e[5].login+"",y=e[5].description+"";return{c(){t=Object(r.element)("div"),n=Object(r.element)("img"),o=Object(r.space)(),c=Object(r.element)("div"),i=Object(r.element)("h1"),s=Object(r.text)(g),l=Object(r.space)(),d=Object(r.element)("h2"),u=Object(r.element)("a"),b=Object(r.text)("https://twitch.tv/"),p=Object(r.text)(h),O=Object(r.space)(),j=Object(r.element)("p"),m=Object(r.text)(y),n.src!==(a=e[5].profile_image_url)&&Object(r.attr)(n,"src",a),Object(r.attr)(n,"class","svelte-pq28t2"),Object(r.attr)(i,"class","title is-3"),Object(r.attr)(u,"href",f="https://twitch.tv/"+encodeURIComponent(e[5].login)),Object(r.attr)(u,"target","_blank"),Object(r.attr)(u,"class","svelte-pq28t2"),Object(r.attr)(d,"class","subtitle is-6"),Object(r.attr)(t,"class","flex-start flex-align-start")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.append)(t,o),Object(r.append)(t,c),Object(r.append)(c,i),Object(r.append)(i,s),Object(r.append)(c,l),Object(r.append)(c,d),Object(r.append)(d,u),Object(r.append)(u,b),Object(r.append)(u,p),Object(r.append)(c,O),Object(r.append)(c,j),Object(r.append)(j,m)},p(e,t){32&t&&n.src!==(a=e[5].profile_image_url)&&Object(r.attr)(n,"src",a),32&t&&g!==(g=e[5].display_name+"")&&Object(r.set_data)(s,g),32&t&&h!==(h=e[5].login+"")&&Object(r.set_data)(p,h),32&t&&f!==(f="https://twitch.tv/"+encodeURIComponent(e[5].login))&&Object(r.attr)(u,"href",f),32&t&&y!==(y=e[5].description+"")&&Object(r.set_data)(m,y)},d(e){e&&Object(r.detach)(t)}}}function j(e){let t,n,a,o,c,i,s,d,u,b,p,j,m,g,h,y,v,_,w=e[7].profile.twitch.setupPlayerProfile+"";function k(e,t){return e[5]?O:e[6]?f:void 0}u=new l.default({props:{iconFa:"fas fa-search",type:"primary",label:e[7].common.search}}),u.$on("click",e[9]);let $=k(e),x=$&&$(e);return m=new l.default({props:{iconFa:"fab fa-twitch",label:e[7].profile.twitch.link,type:"twitch",disabled:!e[5]}}),m.$on("click",e[11]),h=new l.default({props:{label:e[7].common.cancel}}),h.$on("click",e[14]),{c(){t=Object(r.element)("header"),n=Object(r.element)("div"),a=Object(r.text)(w),o=Object(r.space)(),c=Object(r.element)("main"),i=Object(r.element)("div"),s=Object(r.element)("input"),d=Object(r.space)(),Object(r.create_component)(u.$$.fragment),b=Object(r.space)(),x&&x.c(),p=Object(r.space)(),j=Object(r.element)("footer"),Object(r.create_component)(m.$$.fragment),g=Object(r.space)(),Object(r.create_component)(h.$$.fragment),Object(r.attr)(n,"class","menu-label svelte-pq28t2"),Object(r.attr)(t,"class","svelte-pq28t2"),Object(r.attr)(s,"type","text"),Object(r.attr)(s,"class","svelte-pq28t2"),Object(r.attr)(i,"class","search flex-center svelte-pq28t2"),Object(r.attr)(c,"class","svelte-pq28t2"),Object(r.attr)(j,"class","svelte-pq28t2")},m(l,f){Object(r.insert)(l,t,f),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.insert)(l,o,f),Object(r.insert)(l,c,f),Object(r.append)(c,i),Object(r.append)(i,s),Object(r.set_input_value)(s,e[4]),Object(r.append)(i,d),Object(r.mount_component)(u,i,null),Object(r.append)(c,b),x&&x.m(c,null),Object(r.insert)(l,p,f),Object(r.insert)(l,j,f),Object(r.mount_component)(m,j,null),Object(r.append)(j,g),Object(r.mount_component)(h,j,null),y=!0,v||(_=[Object(r.listen)(s,"input",e[13]),Object(r.listen)(s,"keyup",e[10])],v=!0)},p(e,t){(!y||128&t)&&w!==(w=e[7].profile.twitch.setupPlayerProfile+"")&&Object(r.set_data)(a,w),16&t&&s.value!==e[4]&&Object(r.set_input_value)(s,e[4]);const n={};128&t&&(n.label=e[7].common.search),u.$set(n),$===($=k(e))&&x?x.p(e,t):(x&&x.d(1),x=$&&$(e),x&&(x.c(),x.m(c,null)));const o={};128&t&&(o.label=e[7].profile.twitch.link),32&t&&(o.disabled=!e[5]),m.$set(o);const i={};128&t&&(i.label=e[7].common.cancel),h.$set(i)},i(e){y||(Object(r.transition_in)(u.$$.fragment,e),Object(r.transition_in)(m.$$.fragment,e),Object(r.transition_in)(h.$$.fragment,e),y=!0)},o(e){Object(r.transition_out)(u.$$.fragment,e),Object(r.transition_out)(m.$$.fragment,e),Object(r.transition_out)(h.$$.fragment,e),y=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(o),e&&Object(r.detach)(c),Object(r.destroy_component)(u),x&&x.d(),e&&Object(r.detach)(p),e&&Object(r.detach)(j),Object(r.destroy_component)(m),Object(r.destroy_component)(h),v=!1,Object(r.run_all)(_)}}}function m(e){let t,n,a=e[0]&&e[2]&&b(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]&&e[2]?a?(a.p(e,n),5&n&&Object(r.transition_in)(a,1)):(a=b(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function g(e,t,n){let l;Object(r.component_subscribe)(e,s._,e=>n(7,l=e));let d,b,{profileId:p}=t,{twitchLogin:f}=t,{noLabel:O=!1}=t,j=!1,m="",g=null,h=!1;async function y(){d&&m&&m.length&&(n(6,h=!1),n(5,g=null),n(5,g=await o.default.getProfileByUsername(m)),n(6,h=!0))}return Object(a.onMount)(async()=>{p&&(n(2,d=await o.default.getCurrentToken()),b=await Object(u.getPlayerInfo)(p),n(4,m=f&&f.length?f:b&&b.name?b.name:null))}),e.$$set=e=>{"profileId"in e&&n(0,p=e.profileId),"twitchLogin"in e&&n(12,f=e.twitchLogin),"noLabel"in e&&n(1,O=e.noLabel)},[p,O,d,j,m,g,h,l,function(){n(3,j=!0),y()},y,function(e){if("Enter"===e.code)return e.preventDefault(),y(),!1},async function(){await o.default.updateTwitchUser(p,g.login),c.default.publish("player-twitch-linked",{nodeId:Object(i.default)().getId(),playerId:p,twitchLogin:g.login}),n(3,j=!1)},f,function(){m=this.value,n(4,m)},()=>n(3,j=!1),()=>n(3,j=!1)]}class h extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-pq28t2-style")||((t=Object(r.element)("style")).id="svelte-pq28t2-style",t.textContent="header.svelte-pq28t2.svelte-pq28t2{font-size:1.5em;text-align:center}header.svelte-pq28t2 .menu-label.svelte-pq28t2{margin-top:0;margin-bottom:0}main.svelte-pq28t2.svelte-pq28t2{margin:1rem 0}main.svelte-pq28t2 .search.svelte-pq28t2{margin:.75rem 0}input.svelte-pq28t2.svelte-pq28t2{width:100%;padding:calc(0.45em - 1px) 1em;margin:0 0 0.45em 0;outline:none}main.svelte-pq28t2 img.svelte-pq28t2{width:30%;height:auto;margin-right:2rem;border-radius:50%}main.svelte-pq28t2 a.svelte-pq28t2{color:#9146ff !important}footer.svelte-pq28t2.svelte-pq28t2{margin-top:auto}",Object(r.append)(document.head,t)),Object(r.init)(this,e,g,m,r.safe_not_equal,{profileId:0,twitchLogin:12,noLabel:1})}}t.default=h},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(46),o=n(15),c=n(7),i=n(8),s=n(58),l=n(9),d=n(13),u=n(73),b=n(36),p=n(88),f=n(22);const{document:O}=r.globals;function j(e){let t,n,a,o,c,i;function s(t){e[11].call(null,t)}n=new u.default({props:{iconFa:"fa fa-chart-line",type:"rank"===e[0]?"primary":"default",label:e[4].chart.rankingButton,notSelected:"rank"!==e[0]}}),n.$on("click",e[10]);let l={iconFa:"fa fa-crosshairs",type:["acc","percentage"].includes(e[0])?"primary":"default",label:e[3].accBtn.label,options:e[2].accBtnOptions,notSelected:!["acc","percentage"].includes(e[0])};return void 0!==e[3].accBtn&&(l.selectedOption=e[3].accBtn),o=new u.default({props:l}),r.binding_callbacks.push(()=>Object(r.bind)(o,"selectedOption",s)),o.$on("click",e[5]),{c(){t=Object(r.element)("aside"),Object(r.create_component)(n.$$.fragment),a=Object(r.space)(),Object(r.create_component)(o.$$.fragment),Object(r.attr)(t,"class","svelte-18ut0et")},m(e,c){Object(r.insert)(e,t,c),Object(r.mount_component)(n,t,null),Object(r.append)(t,a),Object(r.mount_component)(o,t,null),i=!0},p(e,t){const a={};1&t&&(a.type="rank"===e[0]?"primary":"default"),16&t&&(a.label=e[4].chart.rankingButton),1&t&&(a.notSelected="rank"!==e[0]),n.$set(a);const i={};1&t&&(i.type=["acc","percentage"].includes(e[0])?"primary":"default"),8&t&&(i.label=e[3].accBtn.label),4&t&&(i.options=e[2].accBtnOptions),1&t&&(i.notSelected=!["acc","percentage"].includes(e[0])),!c&&8&t&&(c=!0,i.selectedOption=e[3].accBtn,Object(r.add_flush_callback)(()=>c=!1)),o.$set(i)},i(e){i||(Object(r.transition_in)(n.$$.fragment,e),Object(r.transition_in)(o.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),Object(r.transition_out)(o.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),Object(r.destroy_component)(o)}}}function m(e){let t,n,a,o,c=e[1]&&e[1].length&&j(e);return{c(){t=Object(r.element)("section"),n=Object(r.element)("main"),n.innerHTML='<canvas class="chartjs-render-monitor" id="rankChart"></canvas>',a=Object(r.space)(),c&&c.c(),Object(r.attr)(n,"id","chart-section"),Object(r.attr)(n,"class","svelte-18ut0et")},m(e,i){Object(r.insert)(e,t,i),Object(r.append)(t,n),Object(r.append)(t,a),c&&c.m(t,null),o=!0},p(e,[n]){e[1]&&e[1].length?c?(c.p(e,n),2&n&&Object(r.transition_in)(c,1)):(c=j(e),c.c(),Object(r.transition_in)(c,1),c.m(t,null)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)())},i(e){o||(Object(r.transition_in)(c),o=!0)},o(e){Object(r.transition_out)(c),o=!1},d(e){e&&Object(r.detach)(t),c&&c.d()}}}function g(e,t,n){let u;Object(r.component_subscribe)(e,l._,e=>n(4,u=e));let{profileId:O=null}=t,{history:j=null}=t,{type:m="rank"}=t,{accFilterFunc:g=null}=t,{refreshTag:h=null}=t,y={},v=[],_=[],w=null,k=null,$=null,x=null,S="darkss",P=null,I={accBtnOptions:[{_key:"chart.accuracyButton",value:"acc"},{_key:"chart.percentageButton",value:"percentage"}]},C={accBtn:I.accBtnOptions.find(e=>"acc"===e.value)};async function T(){const e=await Object(b.getConfig)("others");S=e&&e.theme?e.theme:"darkss",n(19,P=Object(p.getTheme)(S).reduce((e,t)=>(e[t[0]]=t[1],e),{}))}async function A(e){n(16,$=await Object(o.getPlayerHistory)(e))}async function q(){n(12,y=await Object(a.getRankedSongs)())}async function R(e){e&&n(17,x=await Object(o.getScoresByPlayerId)(e))}return Object(s.onMount)(async()=>{await T(),n(14,w=document.getElementById("rankChart")),await q();const e=d.default.on("rankeds-changed",async()=>await q()),t=d.default.on("active-players-updated",async({allPlayers:e})=>{O&&e&&e[O]&&await A(O)}),r=d.default.on("player-scores-updated",async({playerId:e})=>{O===e&&await R(O)}),a=d.default.on("data-refreshed",async()=>await R(O)),o=d.default.on("config-changed",async()=>await T());return()=>{e(),t(),r(),a(),o()}}),e.$$set=e=>{"profileId"in e&&n(6,O=e.profileId),"history"in e&&n(7,j=e.history),"type"in e&&n(0,m=e.type),"accFilterFunc"in e&&n(8,g=e.accFilterFunc),"refreshTag"in e&&n(9,h=e.refreshTag)},e.$$.update=()=>{64&e.$$.dirty&&R(O),64&e.$$.dirty&&A(O),135688&e.$$.dirty&&async function(e,t,r){if(!e||!t)return;n(1,v=await Promise.all(Object.values(e).filter(e=>!!e.pp&&!!e.maxScoreEx&&!!t[e.leaderboardId]&&(!g||g(e))).map(async e=>{const n=await Object(f.getSongMaxScore)(e.hash,e.diffInfo,e.leaderboardId),a=Object(f.getAccFromScore)(e,n,"percentage"===r);return{x:t[e.leaderboardId].stars,y:a,leaderboardId:e.leaderboardId,name:e.name,songAuthor:e.songAuthorName,levelAuthor:e.levelAuthorName,timeset:Object(c.dateFromString)(e.timeset),mods:e.mods}})));const a=new Date(Object(c.toSSTimestamp)(new Date)),o=Object(c.addToDate)(a,-49*c.DAY),i=e.map(e=>({...e,timeset:e.timeset?Object(c.dateFromString)(e.timeset):null})).filter(e=>e.timeset&&e.timeset>o).reduce((e,t)=>([Object(c.dateFromString)(t.timeset)].concat(t.history&&t.history.length?t.history.filter(e=>e.timestamp).map(e=>new Date(e.timestamp)):[]).forEach(t=>{const n=Object(c.toSSTimestamp)(t),r=new Date(n).getTime();e.hasOwnProperty(r)||(e[r]=0),e[r]++}),e),{});e&&e.length&&n(13,_=Array(50).fill(0).map((e,t)=>{const n=Object(c.addToDate)(a,-(49-t)*c.DAY).getTime();return i[n]?i[n]:0}))}(x,y,C.accBtn.value),614531&e.$$.dirty&&function(e,t){switch(k&&k.destroy(),e){case"acc":case"percentage":!function(e,t,n){if(!e||!t||!t.length)return;k&&k.destroy();const r=P&&P.alternate?P.alternate:"#3e95cd";k=new Chart(document.getElementById("rankChart"),{responsive:!0,onResize(e,t){e.resize(),e.render(!0)},type:"scatter",data:{datasets:[{label:"",borderColor:r,fill:!0,pointRadius:3,pointHoverRadius:3,data:t}]},options:{legend:{display:!1},maintainAspectRatio:!1,title:{display:!1},onClick(e,n){t&&t.length&&n&&n.length&&n[0]._index&&t[n[0]._index]&&window.open("/leaderboard/"+t[n[0]._index].leaderboardId,"_blank")},tooltips:{displayColors:!1,title:{display:!0},callbacks:{title(e,t){const r=e&&e.length&&void 0!==e[0].datasetIndex&&void 0!==e[0].index&&t&&t.datasets&&t.datasets[e[0].datasetIndex]&&t.datasets[e[0].datasetIndex].data&&t.datasets[e[0].datasetIndex].data[e[0].index]&&t.datasets[e[0].datasetIndex].data[e[0].index].mods?t.datasets[e[0].datasetIndex].data[e[0].index].mods:null;return e.length?Object(l.trans)(("percentage"===n?"chart.percentageTooltip":"chart.accTooltip")+(r&&r.length?"":"NoMods"),{acc:Object(i.formatNumber)(e[0].yLabel),stars:Object(i.formatNumber)(e[0].xLabel),mods:r}):""},label(e,t){if(!(e&&t&&t.datasets&&t.datasets[e.datasetIndex]&&t.datasets[e.datasetIndex].data&&t.datasets[e.datasetIndex].data[e.index]))return"";const n=[],r=t.datasets[e.datasetIndex].data[e.index];return r&&(n.push(Object(i.formatDateRelative)(r.timeset)),n.push(r.name),n.push(`${r.songAuthor} / ${r.levelAuthor}`)),n}}},pan:{enabled:!0,mode:"xy"},zoom:{enabled:!0,mode:"xy"},hover:{mode:"nearest",intersect:!0},scales:{xAxes:[{type:"linear",scaleLabel:{display:!1,labelString:Object(l.trans)("chart.starsLabel")},ticks:{min:0,stepSize:.5,callback:(e,t,n)=>Object(i.round)(e,2)+"*"}}],yAxes:[{type:"linear",scaleLabel:{display:!0,labelString:Object(l.trans)("chart.accuracyLabel")},ticks:{max:100,callback:(e,t,n)=>Object(i.round)(e,2)+"%"}}]}}})}(t,v,e);break;case"rank":default:!async function(e,t,n){if(!e||!t||!t.length)return;const r=Array(50).fill(0).map((e,t)=>t).reverse();t.length<50&&(t=Array(50-t.length).fill(null).concat(t));let a=[];if(n){const e=n.reduce((e,t)=>{const n=Object(c.toSSTimestamp)(Object(c.dateFromString)(t.timestamp));let r=Math.floor((new Date(Object(c.toSSTimestamp)(new Date))-n)/864e5);return r<0&&(r=0),e[r]=t,e},{});!e[0]&&e[1]&&(e[0]={...e[1]}),Object.keys(e).length&&(a=r.map(t=>e[t]?e[t].pp:null))}const o=P&&P.alternate?P.alternate:"#3e95cd",s=P&&P.increase?P.increase:"#007100",d=P&&P.dimmed?P.dimmed:"#3e3e3e",u=[{yAxisID:"rank-axis",data:t,label:Object(l.trans)("chart.rankLabel"),borderColor:o,fill:!1,tooltipStr:"rankTooltip",round:0,type:"line"}],b=[{id:"rank-axis",scaleLabel:{display:!0,labelString:Object(l.trans)("chart.rankLabel")},ticks:{reverse:!0,userCallback(e,t,n){if(Math.floor(e)===e)return e}}}];a.length&&(u.push({yAxisID:"pp-axis",data:a,spanGaps:!0,label:Object(l.trans)("chart.ppLabel"),borderColor:s,fill:!1,tooltipStr:"ppTooltip",round:2,type:"line"}),b.push({id:"pp-axis",position:"right",scaleLabel:{display:!0,labelString:Object(l.trans)("chart.ppLabel")},ticks:{reverse:!1,userCallback(e,t,n){if(Math.floor(e)===e)return e}}})),_.length&&(u.push({yAxisID:"activity-axis",data:_,label:Object(l.trans)("chart.activityLabel"),backgroundColor:d,tooltipStr:"activityTooltip",round:0}),b.push({id:"activity-axis",display:!1,position:"right"})),k&&k.destroy(),k=new Chart(document.getElementById("rankChart"),{responsive:!0,onResize(e,t){e.resize(),e.render(!0)},type:"bar",data:{labels:r.map(e=>Object(i.formatDateRelativeInUnits)(-e,"day")),datasets:u},options:{legend:{display:!0},maintainAspectRatio:!1,title:{display:!1},tooltips:{mode:"index",intersect:!1,displayColors:!1,callbacks:{title:(e,t)=>{if(!e.length)return"";const n=[e[0].xLabel];return e.forEach(e=>{n.push(Object(l.trans)("chart."+t.datasets[e.datasetIndex].tooltipStr,{value:Object(i.formatNumber)(e.yLabel,t.datasets[e.datasetIndex].round)}))}),n},label:()=>""}},hover:{mode:"nearest",intersect:!0},scales:{xAxes:[{scaleLabel:{display:!1,labelString:Object(l.trans)("chart.timeLabel")}}],yAxes:b}}})}(t,j&&j.length?j:null,$)}}(m,w),1&e.$$.dirty&&function(e){["acc","percentage"].includes(e)&&n(3,C.accBtn=I.accBtnOptions.find(t=>t.value===e),C)}(m),16&e.$$.dirty&&(Object.keys(I).forEach(e=>{I[e].forEach(e=>{e._key&&(e.label=Object(l.trans)(e._key))})}),n(2,I={...I}),n(3,C={...C}))},[m,v,I,C,u,function(e){const t=e&&e.detail&&e.detail.value&&["acc","percentage"].includes(e.detail.value)?e.detail.value:"acc";n(0,m=t),n(3,C.accBtn=I.accBtnOptions.find(e=>e.value===t),C)},O,j,g,h,()=>n(0,m="rank"),function(e){C.accBtn=e,n(3,C)}]}class h extends r.SvelteComponent{constructor(e){var t;super(),O.getElementById("svelte-18ut0et-style")||((t=Object(r.element)("style")).id="svelte-18ut0et-style",t.textContent="main.svelte-18ut0et{margin:0 auto !important;height:300px !important}aside.svelte-18ut0et{display:flex;justify-content:center;font-size:.75rem;text-align:center;margin-top:.5rem}aside button{font-weight:500;margin-right:.125rem!important}",Object(r.append)(O.head,t)),Object(r.init)(this,e,g,m,r.safe_not_equal,{profileId:6,history:7,type:0,accFilterFunc:8,refreshTag:9})}}t.default=h},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(3),c=(n(92),n(63)),i=n(46),s=n(12),l=n(7),d=n(6),u=n(62),b=n(13),p=n(15),f=n(22),O=n(93),j=n(94),m=n(8),g=n(95),h=n(36),y=n(35),v=n(9),_=n(68),w=n(96),k=n(38),$=n(50),x=n(14),S=n(87),P=n(97),I=n(98),C=n(65),T=n(74),A=n(99),q=n(100),R=n(102),z=n(103),E=n(64),B=n(73),D=n(67),L=n(104),N=n(117),F=n(118),M=n(119),U=n(121),V=n(123),H=n(124),W=n(84),Z=n(82);const{document:K}=r.globals;function X(e,t,n){const r=e.slice();return r[147]=t[n],r[149]=n,r}function J(e,t,n){const r=e.slice();return r[144]=t[n],r[149]=n,r}function Q(e,t,n){const r=e.slice();return r[147]=t[n],r[149]=n,r}function Y(e,t,n){const r=e.slice();return r[147]=t[n],r[149]=n,r}function G(e,t,n){const r=e.slice();return r[147]=t[n],r[149]=n,r}function ee(e,t,n){const r=e.slice();return r[144]=t[n],r}function te(e,t,n){const r=e.slice();return r[147]=t[n],r[149]=n,r}function ne(e,t,n){const r=e.slice();return r[141]=t[n],r[152]=t,r[153]=n,r}function re(e,t,n){const r=e.slice();return r[147]=t[n],r[149]=n,r}function ae(e,t,n){const r=e.slice();return r[144]=t[n],r}function oe(e,t,n){const r=e.slice();return r[147]=t[n],r[149]=n,r}function ce(e,t,n){const r=e.slice();return r[144]=t[n],r[146]=n,r}function ie(e,t,n){const r=e.slice();return r[147]=t[n],r[149]=n,r}function se(e,t,n){const r=e.slice();return r[147]=t[n],r[149]=n,r}function le(e,t,n){const r=e.slice();return r[144]=t[n],r[146]=n,r}function de(e,t,n){const r=e.slice();return r[141]=t[n],r[142]=t,r[143]=n,r}function ue(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O,j,g,h,y,v,_,w,k,$,x,S,P,I,T,q,R,z,E,L,N,F,M,U,V,H,W,Z,K,X,J,Q,Y,G,ee,te,ne,re,ae,oe,ce,ie,se,le,de,ue,je,me,ge,he,ye,ve,_e,we,ke,$e,xe,Se,Pe,Ie,Ce,Te=e[36].songBrowser.typeHeader+"",Ae=e[36].songBrowser.songHeader+"",qe=e[36].songBrowser.fields.diffPp+"",Re=e[36].songBrowser.fields.stars+"",ze=e[36].songBrowser.viewHeader+"",Ee=e[36].songBrowser.showHeader+"",Be=e[36].songBrowser.sortingHeader+"";function De(t){e[65].call(null,t)}function Le(t){e[66].call(null,t)}a=new B.default({props:{iconFa:"fa fa-clock",type:"default",label:e[36].songBrowser.ssScoreType.recent,notSelected:!0}}),a.$on("click",e[63]),c=new B.default({props:{iconFa:"fa fa-cubes",type:"default",label:e[36].songBrowser.ssScoreType.top,notSelected:!0}}),c.$on("click",e[64]),s=new B.default({props:{iconFa:"fas fa-database",type:"danger",label:e[36].plugin.cachedButton,notSelected:!1}});let Ne={items:e[14].songTypes,optionItems:e[1]&&e[1].length&&!["what_to_play","sniper_mode"].includes(e[16].songType.id)?e[14].songTypeOptions:[]};void 0!==e[16].songType&&(Ne.value=e[16].songType),void 0!==e[16].songTypeOption&&(Ne.option=e[16].songTypeOption),O=new D.default({props:Ne}),r.binding_callbacks.push(()=>Object(r.bind)(O,"value",De)),r.binding_callbacks.push(()=>Object(r.bind)(O,"option",Le)),O.$on("change",e[41]),q=new C.default({props:{value:e[16].minPpDiff,min:1,max:20,step:.1,suffix:"pp",inline:!0}}),q.$on("change",e[46]),F=new A.default({props:{value:e[16].starsFilter,min:"sniper_mode"===e[16].songType.id?Object(m.round)(e[9],1):0,max:e[10],step:.1,suffix:"*",digits:1,disableDirectEditing:!0}}),F.$on("change",e[43]);let Fe=e[23]&&be(e);function Me(t){e[68].call(null,t)}let Ue={items:e[14].viewTypes};function Ve(t){e[69].call(null,t)}function He(t){e[70].call(null,t)}void 0!==e[21]&&(Ue.value=e[21]),K=new D.default({props:Ue}),r.binding_callbacks.push(()=>Object(r.bind)(K,"value",Me));let We={multiple:!0,noSelected:e[36].common.nothingSelected};function Ze(t){e[71].call(null,t)}function Ke(t){e[72].call(null,t)}void 0!==e[4]&&(We.value=e[4]),void 0!==e[26]&&(We.items=e[26]),ne=new D.default({props:We}),r.binding_callbacks.push(()=>Object(r.bind)(ne,"value",Ve)),r.binding_callbacks.push(()=>Object(r.bind)(ne,"items",He));let Xe={items:e[15],optionItems:e[14].sortOrders};void 0!==e[16].sortBy&&(Xe.value=e[16].sortBy),void 0!==e[16].sortOrder&&(Xe.option=e[16].sortOrder),de=new D.default({props:Xe}),r.binding_callbacks.push(()=>Object(r.bind)(de,"value",Ze)),r.binding_callbacks.push(()=>Object(r.bind)(de,"option",Ke)),de.$on("change",e[39]),ve=new B.default({props:{iconFa:"fas fa-balance-scale",label:e[36].songBrowser.compare.label,title:e[36].songBrowser.compare.add,disabled:!e[35]}}),ve.$on("click",e[52]);let Je=e[25]&&pe(e),Qe={ctx:e,current:null,token:null,hasCatch:!1,pending:Ht,then:Oe,catch:fe,value:140,blocks:[,,,]};Object(r.handle_promise)(ke=e[34],Qe);let Ye=e[24].songs&&e[24].songs.length&&Wt(e),Ge=!e[17]&&Zt(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),Object(r.create_component)(a.$$.fragment),o=Object(r.space)(),Object(r.create_component)(c.$$.fragment),i=Object(r.space)(),Object(r.create_component)(s.$$.fragment),l=Object(r.space)(),d=Object(r.element)("div"),u=Object(r.element)("div"),b=Object(r.element)("header"),p=Object(r.text)(Te),f=Object(r.space)(),Object(r.create_component)(O.$$.fragment),h=Object(r.space)(),y=Object(r.element)("div"),v=Object(r.element)("header"),_=Object(r.text)(Ae),w=Object(r.space)(),k=Object(r.element)("input"),x=Object(r.space)(),S=Object(r.element)("div"),P=Object(r.element)("header"),I=Object(r.text)(qe),T=Object(r.space)(),Object(r.create_component)(q.$$.fragment),R=Object(r.space)(),z=Object(r.element)("div"),E=Object(r.element)("header"),L=Object(r.text)(Re),N=Object(r.space)(),Object(r.create_component)(F.$$.fragment),M=Object(r.space)(),Fe&&Fe.c(),U=Object(r.space)(),V=Object(r.element)("div"),H=Object(r.element)("header"),W=Object(r.text)(ze),Z=Object(r.space)(),Object(r.create_component)(K.$$.fragment),J=Object(r.space)(),Q=Object(r.element)("div"),Y=Object(r.element)("div"),G=Object(r.element)("header"),ee=Object(r.text)(Ee),te=Object(r.space)(),Object(r.create_component)(ne.$$.fragment),oe=Object(r.space)(),ce=Object(r.element)("div"),ie=Object(r.element)("header"),se=Object(r.text)(Be),le=Object(r.space)(),Object(r.create_component)(de.$$.fragment),me=Object(r.space)(),ge=Object(r.element)("div"),he=Object(r.element)("header"),ye=Object(r.space)(),Object(r.create_component)(ve.$$.fragment),_e=Object(r.space)(),Je&&Je.c(),we=Object(r.space)(),Qe.block.c(),$e=Object(r.space)(),Ye&&Ye.c(),xe=Object(r.space)(),Ge&&Ge.c(),Se=Object(r.empty)(),Object(r.attr)(n,"class","switch-types svelte-189d5aq"),Object(r.attr)(t,"class","header svelte-189d5aq"),Object(r.attr)(b,"class","svelte-189d5aq"),Object(r.attr)(v,"class","svelte-189d5aq"),Object(r.attr)(k,"type","text"),Object(r.attr)(k,"placeholder",$=e[36].songBrowser.songPlaceholder),Object(r.attr)(k,"class","svelte-189d5aq"),Object(r.attr)(y,"class","filter-name svelte-189d5aq"),Object(r.attr)(P,"class","svelte-189d5aq"),Object(r.attr)(S,"class","filter-diff-pp"),Object(r.set_style)(S,"display","sniper_mode"===e[16].songType.id?"flex":"none"),Object(r.attr)(E,"class","svelte-189d5aq"),Object(r.set_style)(z,"display","unrankeds"!==e[16].songType.id?"flex":"none"),Object(r.attr)(H,"class","svelte-189d5aq"),Object(r.attr)(G,"class","svelte-189d5aq"),Object(r.attr)(Y,"class","svelte-189d5aq"),Object(r.attr)(Q,"class","columns svelte-189d5aq"),Object(r.attr)(ie,"class","svelte-189d5aq"),Object(r.attr)(he,"class","svelte-189d5aq"),Object(r.attr)(ge,"class","player-compare-btns svelte-189d5aq"),Object(r.attr)(d,"class","filters svelte-189d5aq")},m(j,m){Object(r.insert)(j,t,m),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),Object(r.append)(n,o),Object(r.mount_component)(c,n,null),Object(r.append)(n,i),Object(r.mount_component)(s,n,null),Object(r.insert)(j,l,m),Object(r.insert)(j,d,m),Object(r.append)(d,u),Object(r.append)(u,b),Object(r.append)(b,p),Object(r.append)(u,f),Object(r.mount_component)(O,u,null),Object(r.append)(d,h),Object(r.append)(d,y),Object(r.append)(y,v),Object(r.append)(v,_),Object(r.append)(y,w),Object(r.append)(y,k),Object(r.append)(d,x),Object(r.append)(d,S),Object(r.append)(S,P),Object(r.append)(P,I),Object(r.append)(S,T),Object(r.mount_component)(q,S,null),Object(r.append)(d,R),Object(r.append)(d,z),Object(r.append)(z,E),Object(r.append)(E,L),Object(r.append)(z,N),Object(r.mount_component)(F,z,null),Object(r.append)(d,M),Fe&&Fe.m(d,null),Object(r.append)(d,U),Object(r.append)(d,V),Object(r.append)(V,H),Object(r.append)(H,W),Object(r.append)(V,Z),Object(r.mount_component)(K,V,null),Object(r.append)(d,J),Object(r.append)(d,Q),Object(r.append)(Q,Y),Object(r.append)(Y,G),Object(r.append)(G,ee),Object(r.append)(Y,te),Object(r.mount_component)(ne,Y,null),Object(r.append)(d,oe),Object(r.append)(d,ce),Object(r.append)(ce,ie),Object(r.append)(ie,se),Object(r.append)(ce,le),Object(r.mount_component)(de,ce,null),Object(r.append)(d,me),Object(r.append)(d,ge),Object(r.append)(ge,he),Object(r.append)(ge,ye),Object(r.mount_component)(ve,ge,null),Object(r.append)(ge,_e),Je&&Je.m(ge,null),Object(r.insert)(j,we,m),Qe.block.m(j,Qe.anchor=m),Qe.mount=()=>$e.parentNode,Qe.anchor=$e,Object(r.insert)(j,$e,m),Ye&&Ye.m(j,m),Object(r.insert)(j,xe,m),Ge&&Ge.m(j,m),Object(r.insert)(j,Se,m),Pe=!0,Ie||(Ce=Object(r.listen)(k,"input",e[42]),Ie=!0)},p(t,n){e=t;const o={};32&n[1]&&(o.label=e[36].songBrowser.ssScoreType.recent),a.$set(o);const i={};32&n[1]&&(i.label=e[36].songBrowser.ssScoreType.top),c.$set(i);const l={};32&n[1]&&(l.label=e[36].plugin.cachedButton),s.$set(l),(!Pe||32&n[1])&&Te!==(Te=e[36].songBrowser.typeHeader+"")&&Object(r.set_data)(p,Te);const u={};16384&n[0]&&(u.items=e[14].songTypes),81922&n[0]&&(u.optionItems=e[1]&&e[1].length&&!["what_to_play","sniper_mode"].includes(e[16].songType.id)?e[14].songTypeOptions:[]),!j&&65536&n[0]&&(j=!0,u.value=e[16].songType,Object(r.add_flush_callback)(()=>j=!1)),!g&&65536&n[0]&&(g=!0,u.option=e[16].songTypeOption,Object(r.add_flush_callback)(()=>g=!1)),O.$set(u),(!Pe||32&n[1])&&Ae!==(Ae=e[36].songBrowser.songHeader+"")&&Object(r.set_data)(_,Ae),(!Pe||32&n[1]&&$!==($=e[36].songBrowser.songPlaceholder))&&Object(r.attr)(k,"placeholder",$),(!Pe||32&n[1])&&qe!==(qe=e[36].songBrowser.fields.diffPp+"")&&Object(r.set_data)(I,qe);const b={};65536&n[0]&&(b.value=e[16].minPpDiff),q.$set(b),(!Pe||65536&n[0])&&Object(r.set_style)(S,"display","sniper_mode"===e[16].songType.id?"flex":"none"),(!Pe||32&n[1])&&Re!==(Re=e[36].songBrowser.fields.stars+"")&&Object(r.set_data)(L,Re);const f={};65536&n[0]&&(f.value=e[16].starsFilter),66048&n[0]&&(f.min="sniper_mode"===e[16].songType.id?Object(m.round)(e[9],1):0),1024&n[0]&&(f.max=e[10]),F.$set(f),(!Pe||65536&n[0])&&Object(r.set_style)(z,"display","unrankeds"!==e[16].songType.id?"flex":"none"),e[23]?Fe?(Fe.p(e,n),8388608&n[0]&&Object(r.transition_in)(Fe,1)):(Fe=be(e),Fe.c(),Object(r.transition_in)(Fe,1),Fe.m(d,U)):Fe&&(Object(r.group_outros)(),Object(r.transition_out)(Fe,1,1,()=>{Fe=null}),Object(r.check_outros)()),(!Pe||32&n[1])&&ze!==(ze=e[36].songBrowser.viewHeader+"")&&Object(r.set_data)(W,ze);const h={};16384&n[0]&&(h.items=e[14].viewTypes),!X&&2097152&n[0]&&(X=!0,h.value=e[21],Object(r.add_flush_callback)(()=>X=!1)),K.$set(h),(!Pe||32&n[1])&&Ee!==(Ee=e[36].songBrowser.showHeader+"")&&Object(r.set_data)(ee,Ee);const y={};32&n[1]&&(y.noSelected=e[36].common.nothingSelected),!re&&16&n[0]&&(re=!0,y.value=e[4],Object(r.add_flush_callback)(()=>re=!1)),!ae&&67108864&n[0]&&(ae=!0,y.items=e[26],Object(r.add_flush_callback)(()=>ae=!1)),ne.$set(y),(!Pe||32&n[1])&&Be!==(Be=e[36].songBrowser.sortingHeader+"")&&Object(r.set_data)(se,Be);const v={};32768&n[0]&&(v.items=e[15]),16384&n[0]&&(v.optionItems=e[14].sortOrders),!ue&&65536&n[0]&&(ue=!0,v.value=e[16].sortBy,Object(r.add_flush_callback)(()=>ue=!1)),!je&&65536&n[0]&&(je=!0,v.option=e[16].sortOrder,Object(r.add_flush_callback)(()=>je=!1)),de.$set(v);const w={};if(32&n[1]&&(w.label=e[36].songBrowser.compare.label),32&n[1]&&(w.title=e[36].songBrowser.compare.add),16&n[1]&&(w.disabled=!e[35]),ve.$set(w),e[25]?Je?(Je.p(e,n),33554432&n[0]&&Object(r.transition_in)(Je,1)):(Je=pe(e),Je.c(),Object(r.transition_in)(Je,1),Je.m(ge,null)):Je&&(Object(r.group_outros)(),Object(r.transition_out)(Je,1,1,()=>{Je=null}),Object(r.check_outros)()),Qe.ctx=e,8&n[1]&&ke!==(ke=e[34])&&Object(r.handle_promise)(ke,Qe));else{const t=e.slice();t[140]=Qe.resolved,Qe.block.p(t,n)}e[24].songs&&e[24].songs.length?Ye?(Ye.p(e,n),16777216&n[0]&&Object(r.transition_in)(Ye,1)):(Ye=Wt(e),Ye.c(),Object(r.transition_in)(Ye,1),Ye.m(xe.parentNode,xe)):Ye&&(Object(r.group_outros)(),Object(r.transition_out)(Ye,1,1,()=>{Ye=null}),Object(r.check_outros)()),e[17]?Ge&&(Object(r.group_outros)(),Object(r.transition_out)(Ge,1,1,()=>{Ge=null}),Object(r.check_outros)()):Ge?(Ge.p(e,n),131072&n[0]&&Object(r.transition_in)(Ge,1)):(Ge=Zt(e),Ge.c(),Object(r.transition_in)(Ge,1),Ge.m(Se.parentNode,Se))},i(e){Pe||(Object(r.transition_in)(a.$$.fragment,e),Object(r.transition_in)(c.$$.fragment,e),Object(r.transition_in)(s.$$.fragment,e),Object(r.transition_in)(O.$$.fragment,e),Object(r.transition_in)(q.$$.fragment,e),Object(r.transition_in)(F.$$.fragment,e),Object(r.transition_in)(Fe),Object(r.transition_in)(K.$$.fragment,e),Object(r.transition_in)(ne.$$.fragment,e),Object(r.transition_in)(de.$$.fragment,e),Object(r.transition_in)(ve.$$.fragment,e),Object(r.transition_in)(Je),Object(r.transition_in)(Qe.block),Object(r.transition_in)(Ye),Object(r.transition_in)(Ge),Pe=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),Object(r.transition_out)(c.$$.fragment,e),Object(r.transition_out)(s.$$.fragment,e),Object(r.transition_out)(O.$$.fragment,e),Object(r.transition_out)(q.$$.fragment,e),Object(r.transition_out)(F.$$.fragment,e),Object(r.transition_out)(Fe),Object(r.transition_out)(K.$$.fragment,e),Object(r.transition_out)(ne.$$.fragment,e),Object(r.transition_out)(de.$$.fragment,e),Object(r.transition_out)(ve.$$.fragment,e),Object(r.transition_out)(Je);for(let e=0;e<3;e+=1){const t=Qe.blocks[e];Object(r.transition_out)(t)}Object(r.transition_out)(Ye),Object(r.transition_out)(Ge),Pe=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a),Object(r.destroy_component)(c),Object(r.destroy_component)(s),e&&Object(r.detach)(l),e&&Object(r.detach)(d),Object(r.destroy_component)(O),Object(r.destroy_component)(q),Object(r.destroy_component)(F),Fe&&Fe.d(),Object(r.destroy_component)(K),Object(r.destroy_component)(ne),Object(r.destroy_component)(de),Object(r.destroy_component)(ve),Je&&Je.d(),e&&Object(r.detach)(we),Qe.block.d(e),Qe.token=null,Qe=null,e&&Object(r.detach)($e),Ye&&Ye.d(e),e&&Object(r.detach)(xe),Ge&&Ge.d(e),e&&Object(r.detach)(Se),Ie=!1,Ce()}}}function be(e){let t,n,a,o,c,i,s,l,d,u,b,p,f=e[36].songBrowser.countryRankHeader+"";function O(t){e[67].call(null,t)}let j={items:e[14].countryRankOps};return void 0!==e[16].countryRankOp&&(j.value=e[16].countryRankOp),i=new D.default({props:j}),r.binding_callbacks.push(()=>Object(r.bind)(i,"value",O)),i.$on("change",e[39]),{c(){t=Object(r.element)("div"),n=Object(r.element)("header"),a=Object(r.text)(f),o=Object(r.space)(),c=Object(r.element)("div"),Object(r.create_component)(i.$$.fragment),l=Object(r.space)(),d=Object(r.element)("input"),Object(r.attr)(n,"class","svelte-189d5aq"),Object(r.attr)(d,"type","number"),d.value="1",Object(r.attr)(d,"min","1"),Object(r.attr)(d,"step","1"),Object(r.attr)(d,"class","svelte-189d5aq"),Object(r.attr)(c,"class","values svelte-189d5aq"),Object(r.attr)(t,"class","filter-country-rank"),Object(r.set_style)(t,"display","what_to_play"!==e[16].songType.id?"flex":"none")},m(s,f){Object(r.insert)(s,t,f),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(t,o),Object(r.append)(t,c),Object(r.mount_component)(i,c,null),Object(r.append)(c,l),Object(r.append)(c,d),u=!0,b||(p=[Object(r.listen)(d,"input",e[44]),Object(r.listen)(d,"keydown",e[45])],b=!0)},p(e,n){(!u||32&n[1])&&f!==(f=e[36].songBrowser.countryRankHeader+"")&&Object(r.set_data)(a,f);const o={};16384&n[0]&&(o.items=e[14].countryRankOps),!s&&65536&n[0]&&(s=!0,o.value=e[16].countryRankOp,Object(r.add_flush_callback)(()=>s=!1)),i.$set(o),(!u||65536&n[0])&&Object(r.set_style)(t,"display","what_to_play"!==e[16].songType.id?"flex":"none")},i(e){u||(Object(r.transition_in)(i.$$.fragment,e),u=!0)},o(e){Object(r.transition_out)(i.$$.fragment,e),u=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(i),b=!1,Object(r.run_all)(p)}}}function pe(e){let t,n;return t=new B.default({props:{iconFa:"fas fa-save",type:"primary",label:e[36].common.save,title:e[36].songBrowser.compare.saveAsDefault}}),t.$on("click",e[53]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};32&n[1]&&(r.label=e[36].common.save),32&n[1]&&(r.title=e[36].songBrowser.compare.saveAsDefault),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function fe(e){return{c:r.noop,m:r.noop,p:r.noop,i:r.noop,o:r.noop,d:r.noop}}function Oe(e){let t,n,a,o;const c=[me,je],i=[];function s(e,t){return e[24].songs.length?0:1}return t=s(e),n=i[t]=c[t](e),{c(){n.c(),a=Object(r.empty)()},m(e,n){i[t].m(e,n),Object(r.insert)(e,a,n),o=!0},p(e,o){let l=t;t=s(e),t===l?i[t].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),n=i[t],n||(n=i[t]=c[t](e),n.c()),Object(r.transition_in)(n,1),n.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(n),o=!0)},o(e){Object(r.transition_out)(n),o=!1},d(e){i[t].d(e),e&&Object(r.detach)(a)}}}function je(e){let t,n,a,o,c,i,s=e[36].songBrowser.noData.title+"",l=e[36].songBrowser.noData.info+"";return{c(){t=Object(r.element)("div"),n=Object(r.element)("h3"),a=Object(r.text)(s),o=Object(r.space)(),c=Object(r.element)("p"),i=Object(r.text)(l),Object(r.attr)(t,"class","info svelte-189d5aq")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(t,o),Object(r.append)(t,c),Object(r.append)(c,i)},p(e,t){32&t[1]&&s!==(s=e[36].songBrowser.noData.title+"")&&Object(r.set_data)(a,s),32&t[1]&&l!==(l=e[36].songBrowser.noData.info+"")&&Object(r.set_data)(i,l)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function me(e){let t,n,a,o;const c=[he,ge],i=[];function s(e,t){return"cards"===e[21].id?0:1}return t=s(e),n=i[t]=c[t](e),{c(){n.c(),a=Object(r.empty)()},m(e,n){i[t].m(e,n),Object(r.insert)(e,a,n),o=!0},p(e,o){let l=t;t=s(e),t===l?i[t].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),n=i[t],n||(n=i[t]=c[t](e),n.c()),Object(r.transition_in)(n,1),n.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(n),o=!0)},o(e){Object(r.transition_out)(n),o=!1},d(e){i[t].d(e),e&&Object(r.detach)(a)}}}function ge(e){let t,n,a,o,c,i=[],s=new Map,l=("compact"!==e[21].id||e[24].series.length>1)&&ye(e),d=e[24].songs;const u=e=>e[141].leaderboardId;for(let t=0;t<d.length;t+=1){let n=ne(e,d,t),r=u(n);s.set(r,i[t]=bt(r,n))}let b=e[33]&&pt(e);return{c(){t=Object(r.element)("table"),l&&l.c(),n=Object(r.space)(),a=Object(r.element)("tbody");for(let e=0;e<i.length;e+=1)i[e].c();o=Object(r.space)(),b&&b.c(),Object(r.attr)(a,"class","svelte-189d5aq"),Object(r.attr)(t,"class","ranking sspl svelte-189d5aq")},m(s,d){Object(r.insert)(s,t,d),l&&l.m(t,null),Object(r.append)(t,n),Object(r.append)(t,a);for(let e=0;e<i.length;e+=1)i[e].m(a,null);Object(r.append)(t,o),b&&b.m(t,null),e[88](t),c=!0},p(e,o){if("compact"!==e[21].id||e[24].series.length>1?l?(l.p(e,o),18874368&o[0]&&Object(r.transition_in)(l,1)):(l=ye(e),l.c(),Object(r.transition_in)(l,1),l.m(t,n)):l&&(Object(r.group_outros)(),Object(r.transition_out)(l,1,1,()=>{l=null}),Object(r.check_outros)()),2032206077&o[0]|276824707&o[1]){const t=e[24].songs;Object(r.group_outros)(),i=Object(r.update_keyed_each)(i,o,u,1,e,t,s,a,r.outro_and_destroy_block,bt,null,ne),Object(r.check_outros)()}e[33]?b?(b.p(e,o),4&o[1]&&Object(r.transition_in)(b,1)):(b=pt(e),b.c(),Object(r.transition_in)(b,1),b.m(t,null)):b&&(Object(r.group_outros)(),Object(r.transition_out)(b,1,1,()=>{b=null}),Object(r.check_outros)())},i(e){if(!c){Object(r.transition_in)(l);for(let e=0;e<d.length;e+=1)Object(r.transition_in)(i[e]);Object(r.transition_in)(b),c=!0}},o(e){Object(r.transition_out)(l);for(let e=0;e<i.length;e+=1)Object(r.transition_out)(i[e]);Object(r.transition_out)(b),c=!1},d(n){n&&Object(r.detach)(t),l&&l.d();for(let e=0;e<i.length;e+=1)i[e].d();b&&b.d(),e[88](null)}}}function he(e){let t,n,a=[],o=new Map,c=e[24].songs;const i=e=>e[141].leaderboardId;for(let t=0;t<c.length;t+=1){let n=de(e,c,t),r=i(n);o.set(r,a[t]=Vt(r,n))}return{c(){t=Object(r.element)("div");for(let e=0;e<a.length;e+=1)a[e].c();Object(r.attr)(t,"class","columns card-view is-multiline svelte-189d5aq")},m(o,c){Object(r.insert)(o,t,c);for(let e=0;e<a.length;e+=1)a[e].m(t,null);e[78](t),n=!0},p(e,n){if(2034303229&n[0]|278397603&n[1]){const c=e[24].songs;Object(r.group_outros)(),a=Object(r.update_keyed_each)(a,n,i,1,e,c,o,t,r.outro_and_destroy_block,Vt,null,de),Object(r.check_outros)()}},i(e){if(!n){for(let e=0;e<c.length;e+=1)Object(r.transition_in)(a[e]);n=!0}},o(e){for(let e=0;e<a.length;e+=1)Object(r.transition_out)(a[e]);n=!1},d(n){n&&Object(r.detach)(t);for(let e=0;e<a.length;e+=1)a[e].d();e[78](null)}}}function ye(e){let t,n,a,o,c,i,s,l,d,u,b,p=e[36].songBrowser.songHeader+"",f=[],O=new Map,j=[],m=new Map,g=[],h=new Map,y=(e[5]||e[6]&&e[6].length)&&ve(e),v=e[27];const _=e=>e[147].key;for(let t=0;t<v.length;t+=1){let n=ie(e,v,t),r=_(n);O.set(r,f[t]=_e(r,n))}let w=e[24].series;const k=e=>e[144].id;for(let t=0;t<w.length;t+=1){let n=ce(e,w,t),r=k(n);m.set(r,j[t]=Ie(r,n))}let $=e[32];const x=e=>e[147].key;for(let t=0;t<$.length;t+=1){let n=oe(e,$,t),r=x(n);h.set(r,g[t]=Ce(r,n))}let S="compact"!==e[21].id&&Te(e);return{c(){t=Object(r.element)("thead"),n=Object(r.element)("tr"),y&&y.c(),a=Object(r.space)(),o=Object(r.element)("th"),c=Object(r.text)(p),s=Object(r.space)();for(let e=0;e<f.length;e+=1)f[e].c();l=Object(r.space)();for(let e=0;e<j.length;e+=1)j[e].c();d=Object(r.space)();for(let e=0;e<g.length;e+=1)g[e].c();u=Object(r.space)(),S&&S.c(),Object(r.attr)(o,"class","song svelte-189d5aq"),Object(r.attr)(o,"rowspan",i="compact"===e[21].id?1:2),Object(r.attr)(o,"colspan","2"),Object(r.attr)(t,"class","svelte-189d5aq")},m(e,i){Object(r.insert)(e,t,i),Object(r.append)(t,n),y&&y.m(n,null),Object(r.append)(n,a),Object(r.append)(n,o),Object(r.append)(o,c),Object(r.append)(n,s);for(let e=0;e<f.length;e+=1)f[e].m(n,null);Object(r.append)(n,l);for(let e=0;e<j.length;e+=1)j[e].m(n,null);Object(r.append)(n,d);for(let e=0;e<g.length;e+=1)g[e].m(n,null);Object(r.append)(t,u),S&&S.m(t,null),b=!0},p(e,s){if(e[5]||e[6]&&e[6].length?y?y.p(e,s):(y=ve(e),y.c(),y.m(n,a)):y&&(y.d(1),y=null),(!b||32&s[1])&&p!==(p=e[36].songBrowser.songHeader+"")&&Object(r.set_data)(c,p),(!b||2097152&s[0]&&i!==(i="compact"===e[21].id?1:2))&&Object(r.attr)(o,"rowspan",i),136314880&s[0]){const t=e[27];f=Object(r.update_keyed_each)(f,s,_,1,e,t,O,n,r.destroy_block,_e,l,ie)}if(291569681&s[0]|1573024&s[1]){const t=e[24].series;Object(r.group_outros)(),j=Object(r.update_keyed_each)(j,s,k,1,e,t,m,n,r.outro_and_destroy_block,Ie,d,ce),Object(r.check_outros)()}if(2097152&s[0]|2&s[1]){const t=e[32];g=Object(r.update_keyed_each)(g,s,x,1,e,t,h,n,r.destroy_block,Ce,null,oe)}"compact"!==e[21].id?S?S.p(e,s):(S=Te(e),S.c(),S.m(t,null)):S&&(S.d(1),S=null)},i(e){if(!b){for(let e=0;e<w.length;e+=1)Object(r.transition_in)(j[e]);b=!0}},o(e){for(let e=0;e<j.length;e+=1)Object(r.transition_out)(j[e]);b=!1},d(e){e&&Object(r.detach)(t),y&&y.d();for(let e=0;e<f.length;e+=1)f[e].d();for(let e=0;e<j.length;e+=1)j[e].d();for(let e=0;e<g.length;e+=1)g[e].d();S&&S.d()}}}function ve(e){let t,n;return{c(){t=Object(r.element)("th"),Object(r.attr)(t,"class","check svelte-189d5aq"),Object(r.attr)(t,"rowspan",n="compact"===e[21].id?1:2)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){2097152&a[0]&&n!==(n="compact"===e[21].id?1:2)&&Object(r.attr)(t,"rowspan",n)},d(e){e&&Object(r.detach)(t)}}}function _e(e,t){let n,a,o,c,i=t[147].name+"";return{key:e,first:null,c(){n=Object(r.element)("th"),a=Object(r.text)(i),Object(r.attr)(n,"class",o=Object(r.null_to_empty)("left middle "+t[147].key)+" svelte-189d5aq"),Object(r.attr)(n,"rowspan",c="compact"===t[21].id?1:2),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.append)(n,a)},p(e,t){134217728&t[0]&&i!==(i=e[147].name+"")&&Object(r.set_data)(a,i),134217728&t[0]&&o!==(o=Object(r.null_to_empty)("left middle "+e[147].key)+" svelte-189d5aq")&&Object(r.attr)(n,"class",o),2097152&t[0]&&c!==(c="compact"===e[21].id?1:2)&&Object(r.attr)(n,"rowspan",c)},d(e){e&&Object(r.detach)(n)}}}function we(e){let t,n,a,o,c;const i=[xe,$e],s=[];function l(e,t){return e[146]>0?0:1}return n=l(e),a=s[n]=i[n](e),{c(){t=Object(r.element)("th"),a.c(),Object(r.attr)(t,"colspan",o=e[144].id!==e[0]||"what_to_play"===e[16].songType.id?e[28].length:e[28].length-(e[38](e[4],"diffPp")?1:0)),Object(r.attr)(t,"class","series left player-sel svelte-189d5aq")},m(e,a){Object(r.insert)(e,t,a),s[n].m(t,null),c=!0},p(e,d){let u=n;n=l(e),n===u?s[n].p(e,d):(Object(r.group_outros)(),Object(r.transition_out)(s[u],1,1,()=>{s[u]=null}),Object(r.check_outros)(),a=s[n],a||(a=s[n]=i[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null)),(!c||285278225&d[0]&&o!==(o=e[144].id!==e[0]||"what_to_play"===e[16].songType.id?e[28].length:e[28].length-(e[38](e[4],"diffPp")?1:0)))&&Object(r.attr)(t,"colspan",o)},i(e){c||(Object(r.transition_in)(a),c=!0)},o(e){Object(r.transition_out)(a),c=!1},d(e){e&&Object(r.detach)(t),s[n].d()}}}function ke(e){let t,n,a,o;const c=[Pe,Se],i=[];function s(e,t){return e[146]>0?0:1}return n=s(e),a=i[n]=c[n](e),{c(){t=Object(r.element)("th"),a.c(),Object(r.attr)(t,"class","left down player-sel svelte-189d5aq")},m(e,a){Object(r.insert)(e,t,a),i[n].m(t,null),o=!0},p(e,o){let l=n;n=s(e),n===l?i[n].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),a=i[n],a||(a=i[n]=c[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null))},i(e){o||(Object(r.transition_in)(a),o=!0)},o(e){Object(r.transition_out)(a),o=!1},d(e){e&&Object(r.detach)(t),i[n].d()}}}function $e(e){let t,n=e[144].name+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){16777216&a[0]&&n!==(n=e[144].name+"")&&Object(r.set_data)(t,n)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function xe(e){let t,n,a,o,c,i;function s(...t){return e[82](e[144],...t)}function l(...t){return e[84](e[146],...t)}return t=new D.default({props:{items:e[22],value:e[22].find(s),right:!0}}),t.$on("change",(function(...t){return e[83](e[146],...t)})),{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),a=Object(r.element)("i"),Object(r.attr)(a,"class","fas fa-times player-remove svelte-189d5aq"),Object(r.attr)(a,"title","Usuń z porównania")},m(e,s){Object(r.mount_component)(t,e,s),Object(r.insert)(e,n,s),Object(r.insert)(e,a,s),o=!0,c||(i=Object(r.listen)(a,"click",l),c=!0)},p(n,r){e=n;const a={};4194304&r[0]&&(a.items=e[22]),20971520&r[0]&&(a.value=e[22].find(s)),t.$set(a)},i(e){o||(Object(r.transition_in)(t.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),o=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),e&&Object(r.detach)(a),c=!1,i()}}}function Se(e){let t,n=e[144].name+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){16777216&a[0]&&n!==(n=e[144].name+"")&&Object(r.set_data)(t,n)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function Pe(e){let t,n,a,o,c,i,s;function l(...t){return e[79](e[144],...t)}function d(...t){return e[81](e[146],...t)}return t=new D.default({props:{items:e[22],value:e[22].find(l),right:!0}}),t.$on("change",(function(...t){return e[80](e[146],...t)})),{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),a=Object(r.element)("i"),Object(r.attr)(a,"class","fas fa-times player-remove svelte-189d5aq"),Object(r.attr)(a,"title",o=e[36].songBrowser.compare.remove)},m(e,o){Object(r.mount_component)(t,e,o),Object(r.insert)(e,n,o),Object(r.insert)(e,a,o),c=!0,i||(s=Object(r.listen)(a,"click",d),i=!0)},p(n,i){e=n;const s={};4194304&i[0]&&(s.items=e[22]),20971520&i[0]&&(s.value=e[22].find(l)),t.$set(s),(!c||32&i[1]&&o!==(o=e[36].songBrowser.compare.remove))&&Object(r.attr)(a,"title",o)},i(e){c||(Object(r.transition_in)(t.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),c=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),e&&Object(r.detach)(a),i=!1,s()}}}function Ie(e,t){let n,a,o,c,i,s;const l=[ke,we],d=[];function u(e,t){return"compact"===e[21].id?0:(285212689&t[0]&&(a=!(!(e[28].length>0)||1===e[28].length&&e[144].id===e[0]&&e[38](e[4],"diffPp"))),a?1:-1)}return~(o=u(t,[-1]))&&(c=d[o]=l[o](t)),{key:e,first:null,c(){n=Object(r.empty)(),c&&c.c(),i=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),~o&&d[o].m(e,t),Object(r.insert)(e,i,t),s=!0},p(e,t){let n=o;o=u(e,t),o===n?~o&&d[o].p(e,t):(c&&(Object(r.group_outros)(),Object(r.transition_out)(d[n],1,1,()=>{d[n]=null}),Object(r.check_outros)()),~o?(c=d[o],c||(c=d[o]=l[o](e),c.c()),Object(r.transition_in)(c,1),c.m(i.parentNode,i)):c=null)},i(e){s||(Object(r.transition_in)(c),s=!0)},o(e){Object(r.transition_out)(c),s=!1},d(e){e&&Object(r.detach)(n),~o&&d[o].d(e),e&&Object(r.detach)(i)}}}function Ce(e,t){let n,a,o,c,i=t[147].name+"";return{key:e,first:null,c(){n=Object(r.element)("th"),a=Object(r.text)(i),Object(r.attr)(n,"class",o=Object(r.null_to_empty)("left "+t[147].key)+" svelte-189d5aq"),Object(r.attr)(n,"rowspan",c="compact"===t[21].id?1:2),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.append)(n,a)},p(e,t){2&t[1]&&i!==(i=e[147].name+"")&&Object(r.set_data)(a,i),2&t[1]&&o!==(o=Object(r.null_to_empty)("left "+e[147].key)+" svelte-189d5aq")&&Object(r.attr)(n,"class",o),2097152&t[0]&&c!==(c="compact"===e[21].id?1:2)&&Object(r.attr)(n,"rowspan",c)},d(e){e&&Object(r.detach)(n)}}}function Te(e){let t,n=[],a=new Map,o=e[24].series;const c=e=>e[144].id;for(let t=0;t<o.length;t+=1){let r=ae(e,o,t),i=c(r);a.set(i,n[t]=Re(i,r))}return{c(){t=Object(r.element)("tr");for(let e=0;e<n.length;e+=1)n[e].c()},m(e,a){Object(r.insert)(e,t,a);for(let e=0;e<n.length;e+=1)n[e].m(t,null)},p(e,o){if(285278209&o[0]){const i=e[24].series;n=Object(r.update_keyed_each)(n,o,c,1,e,i,a,t,r.destroy_block,Re,null,ae)}},d(e){e&&Object(r.detach)(t);for(let e=0;e<n.length;e+=1)n[e].d()}}}function Ae(e){let t,n,a,o,c=e[147].name+"";return{c(){t=Object(r.element)("th"),n=Object(r.text)(c),o=Object(r.space)(),Object(r.attr)(t,"class",a=Object(r.null_to_empty)("left "+e[147].key+(e[149]>0?" middle":""))+" svelte-189d5aq")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.insert)(e,o,a)},p(e,o){268435456&o[0]&&c!==(c=e[147].name+"")&&Object(r.set_data)(n,c),268435456&o[0]&&a!==(a=Object(r.null_to_empty)("left "+e[147].key+(e[149]>0?" middle":""))+" svelte-189d5aq")&&Object(r.attr)(t,"class",a)},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(o)}}}function qe(e,t){let n,a,o=("diffPp"!==t[147].key||t[144].id!==t[0]||"what_to_play"===t[16].songType.id)&&Ae(t);return{key:e,first:null,c(){n=Object(r.empty)(),o&&o.c(),a=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),o&&o.m(e,t),Object(r.insert)(e,a,t)},p(e,t){"diffPp"!==e[147].key||e[144].id!==e[0]||"what_to_play"===e[16].songType.id?o?o.p(e,t):(o=Ae(e),o.c(),o.m(a.parentNode,a)):o&&(o.d(1),o=null)},d(e){e&&Object(r.detach)(n),o&&o.d(e),e&&Object(r.detach)(a)}}}function Re(e,t){let n,a,o=[],c=new Map,i=t[28];const s=e=>e[147].key;for(let e=0;e<i.length;e+=1){let n=re(t,i,e),r=s(n);c.set(r,o[e]=qe(r,n))}return{key:e,first:null,c(){n=Object(r.empty)();for(let e=0;e<o.length;e+=1)o[e].c();a=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t);for(let n=0;n<o.length;n+=1)o[n].m(e,t);Object(r.insert)(e,a,t)},p(e,t){if(285278209&t[0]){const n=e[28];o=Object(r.update_keyed_each)(o,t,s,1,e,n,c,a.parentNode,r.destroy_block,qe,a,re)}},d(e){e&&Object(r.detach)(n);for(let t=0;t<o.length;t+=1)o[t].d(e);e&&Object(r.detach)(a)}}}function ze(e){let t,n,a;return n=new N.default({props:{checked:e[6].includes(e[141].leaderboardId)}}),n.$on("click",(function(){Object(r.is_function)(e[54](e[141].leaderboardId))&&e[54](e[141].leaderboardId).apply(this,arguments)})),{c(){t=Object(r.element)("td"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","check svelte-189d5aq")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(t,r){e=t;const a={};16777280&r[0]&&(a.checked=e[6].includes(e[141].leaderboardId)),n.$set(a)},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function Ee(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O=e[141].name+"",j=e[141].songAuthor+"",m=e[141].levelAuthor+"";return{c(){t=Object(r.element)("figure"),n=Object(r.element)("img"),o=Object(r.space)(),c=Object(r.element)("div"),i=Object(r.element)("span"),s=Object(r.text)(O),l=Object(r.space)(),d=Object(r.element)("div"),u=Object(r.text)(j),b=Object(r.space)(),p=Object(r.element)("small"),f=Object(r.text)(m),n.src!==(a="/imports/images/songs/"+e[141].hash+".png")&&Object(r.attr)(n,"src",a),Object(r.attr)(n,"class","svelte-189d5aq"),Object(r.attr)(i,"class","name"),Object(r.attr)(p,"class","svelte-189d5aq"),Object(r.attr)(d,"class","author"),Object(r.attr)(c,"class","songinfo svelte-189d5aq"),Object(r.attr)(t,"class","svelte-189d5aq")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.append)(t,o),Object(r.append)(t,c),Object(r.append)(c,i),Object(r.append)(i,s),Object(r.append)(c,l),Object(r.append)(c,d),Object(r.append)(d,u),Object(r.append)(d,b),Object(r.append)(d,p),Object(r.append)(p,f)},p(e,t){16777216&t[0]&&n.src!==(a="/imports/images/songs/"+e[141].hash+".png")&&Object(r.attr)(n,"src",a),16777216&t[0]&&O!==(O=e[141].name+"")&&Object(r.set_data)(s,O),16777216&t[0]&&j!==(j=e[141].songAuthor+"")&&Object(r.set_data)(u,j),16777216&t[0]&&m!==(m=e[141].levelAuthor+"")&&Object(r.set_data)(f,m)},d(e){e&&Object(r.detach)(t)}}}function Be(e){let t,n;const a=[{value:Yt(e[141],e[147].key)},e[147].valueProps];let o={};for(let e=0;e<a.length;e+=1)o=Object(r.assign)(o,a[e]);return t=new E.default({props:o}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const o=150994944&n[0]?Object(r.get_spread_update)(a,[{value:Yt(e[141],e[147].key)},134217728&n[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};t.$set(o)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function De(e){let t,n;const a=[{value:Yt(e[141],e[147].key)},e[147].valueProps];let o={};for(let e=0;e<a.length;e+=1)o=Object(r.assign)(o,a[e]);return t=new R.default({props:o}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const o=150994944&n[0]?Object(r.get_spread_update)(a,[{value:Yt(e[141],e[147].key)},134217728&n[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};t.$set(o)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function Le(e,t){let n,a,o,c,i;const s=[De,Be],l=[];function d(e,t){return"length"===e[147].key?0:1}return a=d(t),o=l[a]=s[a](t),{key:e,first:null,c(){n=Object(r.element)("td"),o.c(),Object(r.attr)(n,"class",c=Object(r.null_to_empty)("left middle "+t[147].key)+" svelte-189d5aq"),this.first=n},m(e,t){Object(r.insert)(e,n,t),l[a].m(n,null),i=!0},p(e,t){let u=a;a=d(e),a===u?l[a].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(l[u],1,1,()=>{l[u]=null}),Object(r.check_outros)(),o=l[a],o||(o=l[a]=s[a](e),o.c()),Object(r.transition_in)(o,1),o.m(n,null)),(!i||134217728&t[0]&&c!==(c=Object(r.null_to_empty)("left middle "+e[147].key)+" svelte-189d5aq"))&&Object(r.attr)(n,"class",c)},i(e){i||(Object(r.transition_in)(o),i=!0)},o(e){Object(r.transition_out)(o),i=!1},d(e){e&&Object(r.detach)(n),l[a].d()}}}function Ne(e){let t,n,a=[],o=new Map,c=e[28];const i=e=>e[147].key;for(let t=0;t<c.length;t+=1){let n=Y(e,c,t),r=i(n);o.set(r,a[t]=Xe(r,n))}return{c(){for(let e=0;e<a.length;e+=1)a[e].c();t=Object(r.empty)()},m(e,o){for(let t=0;t<a.length;t+=1)a[t].m(e,o);Object(r.insert)(e,t,o),n=!0},p(e,n){if(285278237&n[0]|640&n[1]){const c=e[28];Object(r.group_outros)(),a=Object(r.update_keyed_each)(a,n,i,1,e,c,o,t.parentNode,r.outro_and_destroy_block,Xe,t,Y),Object(r.check_outros)()}},i(e){if(!n){for(let e=0;e<c.length;e+=1)Object(r.transition_in)(a[e]);n=!0}},o(e){for(let e=0;e<a.length;e+=1)Object(r.transition_out)(a[e]);n=!1},d(e){for(let t=0;t<a.length;t+=1)a[t].d(e);e&&Object(r.detach)(t)}}}function Fe(e){let t,n,a,o,c,i;const s=[Qe,Je],l=[];function d(e,t){return 16842752&t[0]&&(n=!("what_to_play"!==e[16].songType.id&&!e[40](e[144],e[141],"score"))),n?0:1}return a=d(e,[-1]),o=l[a]=s[a](e),{c(){t=Object(r.element)("td"),o.c(),Object(r.attr)(t,"class",c="left compact series-"+e[24].series.length+" svelte-189d5aq"),Object(r.toggle_class)(t,"with-cols",e[27].length>0),Object(r.toggle_class)(t,"best",e[40](e[144],e[141],"best")&&e[24].series.length>1)},m(e,n){Object(r.insert)(e,t,n),l[a].m(t,null),i=!0},p(e,n){let u=a;a=d(e,n),a===u?l[a].p(e,n):(Object(r.group_outros)(),Object(r.transition_out)(l[u],1,1,()=>{l[u]=null}),Object(r.check_outros)(),o=l[a],o||(o=l[a]=s[a](e),o.c()),Object(r.transition_in)(o,1),o.m(t,null)),(!i||16777216&n[0]&&c!==(c="left compact series-"+e[24].series.length+" svelte-189d5aq"))&&Object(r.attr)(t,"class",c),150994944&n[0]&&Object(r.toggle_class)(t,"with-cols",e[27].length>0),16777216&n[0]|512&n[1]&&Object(r.toggle_class)(t,"best",e[40](e[144],e[141],"best")&&e[24].series.length>1)},i(e){i||(Object(r.transition_in)(o),i=!0)},o(e){Object(r.transition_out)(o),i=!1},d(e){e&&Object(r.detach)(t),l[a].d()}}}function Me(e){let t,n,a,o,c,i;const s=[We,He,Ve,Ue],l=[];function d(e,t){return"timeset"===e[147].key?0:(268435456&t[0]&&(n=!!["beatSaviorAcc","beatSaviorStats"].includes(e[147].key)),n?1:"rank"===e[147].key?2:3)}return a=d(e,[-1]),o=l[a]=s[a](e),{c(){t=Object(r.element)("td"),o.c(),Object(r.attr)(t,"class",c=Object(r.null_to_empty)("left "+e[147].key)+" svelte-189d5aq"),Object(r.toggle_class)(t,"middle",e[149]>0),Object(r.toggle_class)(t,"best",e[40](e[144],e[141],"best")&&e[24].series.length>1)},m(e,n){Object(r.insert)(e,t,n),l[a].m(t,null),i=!0},p(e,n){let u=a;a=d(e,n),a===u?l[a].p(e,n):(Object(r.group_outros)(),Object(r.transition_out)(l[u],1,1,()=>{l[u]=null}),Object(r.check_outros)(),o=l[a],o||(o=l[a]=s[a](e),o.c()),Object(r.transition_in)(o,1),o.m(t,null)),(!i||268435456&n[0]&&c!==(c=Object(r.null_to_empty)("left "+e[147].key)+" svelte-189d5aq"))&&Object(r.attr)(t,"class",c),268435456&n[0]&&Object(r.toggle_class)(t,"middle",e[149]>0),285212672&n[0]|512&n[1]&&Object(r.toggle_class)(t,"best",e[40](e[144],e[141],"best")&&e[24].series.length>1)},i(e){i||(Object(r.transition_in)(o),i=!0)},o(e){Object(r.transition_out)(o),i=!1},d(e){e&&Object(r.detach)(t),l[a].d()}}}function Ue(e){let t,n;const a=[{value:e[40](e[144],e[141],e[147].key)},{prevValue:!e[38](e[4],"diff")||"sniper_mode"===e[16].songType.id&&e[144].id===e[0]?null:e[40](e[144],e[141],"prev"+Object(d.capitalize)(e[147].key))},{prevLabel:e[144].prevLabel},e[147].valueProps];let o={};for(let e=0;e<a.length;e+=1)o=Object(r.assign)(o,a[e]);return t=new E.default({props:o}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const o=285278225&n[0]|640&n[1]?Object(r.get_spread_update)(a,[285212672&n[0]|512&n[1]&&{value:e[40](e[144],e[141],e[147].key)},{prevValue:!e[38](e[4],"diff")||"sniper_mode"===e[16].songType.id&&e[144].id===e[0]?null:e[40](e[144],e[141],"prev"+Object(d.capitalize)(e[147].key))},16777216&n[0]&&{prevLabel:e[144].prevLabel},268435456&n[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};t.$set(o)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function Ve(e){let t,n;const a=[{rank:e[40](e[144],e[141],e[147].key)},{countryRank:e[40](e[144],e[141],"ssplCountryRank")},{country:e[2]},{leaderboardId:e[141].leaderboardId},{playerId:e[144].id},{lastUpdated:e[40](e[144],e[141],"lastUpdated")},{timeset:e[40](e[144],e[141],"timeset")},{recentPlay:e[144].id===e[0]?new Date(Math.max(e[144].recentPlay,e[3])):e[144].recentPlay},e[147].valueProps];let o={};for(let e=0;e<a.length;e+=1)o=Object(r.assign)(o,a[e]);return t=new U.default({props:o}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const o=285212685&n[0]|512&n[1]?Object(r.get_spread_update)(a,[285212672&n[0]|512&n[1]&&{rank:e[40](e[144],e[141],e[147].key)},16777216&n[0]|512&n[1]&&{countryRank:e[40](e[144],e[141],"ssplCountryRank")},4&n[0]&&{country:e[2]},16777216&n[0]&&{leaderboardId:e[141].leaderboardId},16777216&n[0]&&{playerId:e[144].id},16777216&n[0]|512&n[1]&&{lastUpdated:e[40](e[144],e[141],"lastUpdated")},16777216&n[0]|512&n[1]&&{timeset:e[40](e[144],e[141],"timeset")},16777225&n[0]&&{recentPlay:e[144].id===e[0]?new Date(Math.max(e[144].recentPlay,e[3])):e[144].recentPlay},268435456&n[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};t.$set(o)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function He(e){let t,n;function a(e,n){return(null==t||285212672&n[0])&&(t=!!e[40](e[144],e[141],e[147].key)),t?Ke:Ze}let o=a(e,[-1]),c=o(e);return{c(){c.c(),n=Object(r.empty)()},m(e,t){c.m(e,t),Object(r.insert)(e,n,t)},p(e,t){o===(o=a(e,t))&&c?c.p(e,t):(c.d(1),c=o(e),c&&(c.c(),c.m(n.parentNode,n)))},i:r.noop,o:r.noop,d(e){c.d(e),e&&Object(r.detach)(n)}}}function We(e){let t,n;const a=[{date:e[40](e[144],e[141],e[147].key)},e[147].valueProps];let o={};for(let e=0;e<a.length;e+=1)o=Object(r.assign)(o,a[e]);return t=new T.default({props:o}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const o=285212672&n[0]|512&n[1]?Object(r.get_spread_update)(a,[{date:e[40](e[144],e[141],e[147].key)},268435456&n[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};t.$set(o)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function Ze(e){let t;return{c(){t=Object(r.text)("-")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,d(e){e&&Object(r.detach)(t)}}}function Ke(e){let t,n,a=e[40](e[144],e[141],e[147].key)+"";return{c(){n=Object(r.empty)(),t=new r.HtmlTag(n)},m(e,o){t.m(a,e,o),Object(r.insert)(e,n,o)},p(e,n){285212672&n[0]&&a!==(a=e[40](e[144],e[141],e[147].key)+"")&&t.p(a)},d(e){e&&Object(r.detach)(n),e&&t.d()}}}function Xe(e,t){let n,a,o,c=("diffPp"!==t[147].key||t[144].id!==t[0]||"what_to_play"===t[16].songType.id)&&Me(t);return{key:e,first:null,c(){n=Object(r.empty)(),c&&c.c(),a=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),c&&c.m(e,t),Object(r.insert)(e,a,t),o=!0},p(e,t){"diffPp"!==e[147].key||e[144].id!==e[0]||"what_to_play"===e[16].songType.id?c?(c.p(e,t),285278209&t[0]&&Object(r.transition_in)(c,1)):(c=Me(e),c.c(),Object(r.transition_in)(c,1),c.m(a.parentNode,a)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)())},i(e){o||(Object(r.transition_in)(c),o=!0)},o(e){Object(r.transition_out)(c),o=!1},d(e){e&&Object(r.detach)(n),c&&c.d(e),e&&Object(r.detach)(a)}}}function Je(e){let t;return{c(){t=Object(r.text)("-")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function Qe(e){let t,n,a,o=[],c=new Map,i=e[28];const s=e=>e[147].key;for(let t=0;t<i.length;t+=1){let n=G(e,i,t),r=s(n);c.set(r,o[t]=ct(r,n))}let l=e[31]&&it(e);return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=Object(r.space)(),l&&l.c(),n=Object(r.empty)()},m(e,c){for(let t=0;t<o.length;t+=1)o[t].m(e,c);Object(r.insert)(e,t,c),l&&l.m(e,c),Object(r.insert)(e,n,c),a=!0},p(e,a){if(285278237&a[0]|640&a[1]){const n=e[28];Object(r.group_outros)(),o=Object(r.update_keyed_each)(o,a,s,1,e,n,c,t.parentNode,r.outro_and_destroy_block,ct,t,G),Object(r.check_outros)()}e[31]?l?(l.p(e,a),1&a[1]&&Object(r.transition_in)(l,1)):(l=it(e),l.c(),Object(r.transition_in)(l,1),l.m(n.parentNode,n)):l&&(Object(r.group_outros)(),Object(r.transition_out)(l,1,1,()=>{l=null}),Object(r.check_outros)())},i(e){if(!a){for(let e=0;e<i.length;e+=1)Object(r.transition_in)(o[e]);Object(r.transition_in)(l),a=!0}},o(e){for(let e=0;e<o.length;e+=1)Object(r.transition_out)(o[e]);Object(r.transition_out)(l),a=!1},d(e){for(let t=0;t<o.length;t+=1)o[t].d(e);e&&Object(r.detach)(t),l&&l.d(e),e&&Object(r.detach)(n)}}}function Ye(e){let t,n,a,o,c;const i=[nt,tt,et,Ge],s=[];function l(e,n){return"timeset"===e[147].key?0:"rank"===e[147].key?1:(268435456&n[0]&&(t=!!["beatSaviorAcc","beatSaviorStats"].includes(e[147].key)),t?2:3)}return n=l(e,[-1]),a=s[n]=i[n](e),{c(){a.c(),o=Object(r.empty)()},m(e,t){s[n].m(e,t),Object(r.insert)(e,o,t),c=!0},p(e,t){let c=n;n=l(e,t),n===c?s[n].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(s[c],1,1,()=>{s[c]=null}),Object(r.check_outros)(),a=s[n],a||(a=s[n]=i[n](e),a.c()),Object(r.transition_in)(a,1),a.m(o.parentNode,o))},i(e){c||(Object(r.transition_in)(a),c=!0)},o(e){Object(r.transition_out)(a),c=!1},d(e){s[n].d(e),e&&Object(r.detach)(o)}}}function Ge(e){let t,n,a,o=e[40](e[144],e[141],e[147].key),c=o&&rt(e),i="pp"===e[147].key&&"sniper_mode"!==e[16].songType.id&&ot(e);return{c(){c&&c.c(),t=Object(r.space)(),i&&i.c(),n=Object(r.empty)()},m(e,o){c&&c.m(e,o),Object(r.insert)(e,t,o),i&&i.m(e,o),Object(r.insert)(e,n,o),a=!0},p(e,a){285212672&a[0]&&(o=e[40](e[144],e[141],e[147].key)),o?c?(c.p(e,a),285212672&a[0]&&Object(r.transition_in)(c,1)):(c=rt(e),c.c(),Object(r.transition_in)(c,1),c.m(t.parentNode,t)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)()),"pp"===e[147].key&&"sniper_mode"!==e[16].songType.id?i?(i.p(e,a),268500992&a[0]&&Object(r.transition_in)(i,1)):(i=ot(e),i.c(),Object(r.transition_in)(i,1),i.m(n.parentNode,n)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)())},i(e){a||(Object(r.transition_in)(c),Object(r.transition_in)(i),a=!0)},o(e){Object(r.transition_out)(c),Object(r.transition_out)(i),a=!1},d(e){c&&c.d(e),e&&Object(r.detach)(t),i&&i.d(e),e&&Object(r.detach)(n)}}}function et(e){return{c:r.noop,m:r.noop,p:r.noop,i:r.noop,o:r.noop,d:r.noop}}function tt(e){let t,n,a,o;const c=[{rank:e[40](e[144],e[141],e[147].key)},{countryRank:e[40](e[144],e[141],"ssplCountryRank")},{country:e[2]},{leaderboardId:e[141].leaderboardId},{playerId:e[144].id},{lastUpdated:e[40](e[144],e[141],"lastUpdated")},{timeset:e[40](e[144],e[141],"timeset")},{recentPlay:e[144].id===e[0]?new Date(Math.max(e[144].recentPlay,e[3])):e[144].recentPlay},e[147].valueProps];let i={};for(let e=0;e<c.length;e+=1)i=Object(r.assign)(i,c[e]);return n=new U.default({props:i}),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class",a=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,i){const s=285212685&i[0]|512&i[1]?Object(r.get_spread_update)(c,[285212672&i[0]|512&i[1]&&{rank:e[40](e[144],e[141],e[147].key)},16777216&i[0]|512&i[1]&&{countryRank:e[40](e[144],e[141],"ssplCountryRank")},4&i[0]&&{country:e[2]},16777216&i[0]&&{leaderboardId:e[141].leaderboardId},16777216&i[0]&&{playerId:e[144].id},16777216&i[0]|512&i[1]&&{lastUpdated:e[40](e[144],e[141],"lastUpdated")},16777216&i[0]|512&i[1]&&{timeset:e[40](e[144],e[141],"timeset")},16777225&i[0]&&{recentPlay:e[144].id===e[0]?new Date(Math.max(e[144].recentPlay,e[3])):e[144].recentPlay},268435456&i[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};n.$set(s),(!o||268435456&i[0]&&a!==(a=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq"))&&Object(r.attr)(t,"class",a)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function nt(e){let t,n,a,o;const c=[{date:e[40](e[144],e[141],e[147].key)},e[147].valueProps];let i={};for(let e=0;e<c.length;e+=1)i=Object(r.assign)(i,c[e]);return n=new T.default({props:i}),{c(){t=Object(r.element)("strong"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class",a=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,i){const s=285212672&i[0]|512&i[1]?Object(r.get_spread_update)(c,[{date:e[40](e[144],e[141],e[147].key)},268435456&i[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};n.$set(s),(!o||268435456&i[0]&&a!==(a=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq"))&&Object(r.attr)(t,"class",a)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function rt(e){let t,n,a,o,c,i,s=e[147].compactLabel&&at(e);const l=[{value:e[40](e[144],e[141],e[147].key)},{prevValue:!e[38](e[4],"diff")||"sniper_mode"===e[16].songType.id&&e[144].id===e[0]?null:e[40](e[144],e[141],"prev"+Object(d.capitalize)(e[147].key))},{prevLabel:e[144].prevLabel},{inline:!0},e[147].valueProps];let u={};for(let e=0;e<l.length;e+=1)u=Object(r.assign)(u,l[e]);return o=new E.default({props:u}),{c(){t=Object(r.element)("div"),s&&s.c(),n=Object(r.space)(),a=Object(r.element)("strong"),Object(r.create_component)(o.$$.fragment),Object(r.attr)(a,"class",c=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq"),Object(r.attr)(t,"class","svelte-189d5aq")},m(e,c){Object(r.insert)(e,t,c),s&&s.m(t,null),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.mount_component)(o,a,null),i=!0},p(e,u){e[147].compactLabel?s?s.p(e,u):(s=at(e),s.c(),s.m(t,n)):s&&(s.d(1),s=null);const b=285278225&u[0]|640&u[1]?Object(r.get_spread_update)(l,[285212672&u[0]|512&u[1]&&{value:e[40](e[144],e[141],e[147].key)},{prevValue:!e[38](e[4],"diff")||"sniper_mode"===e[16].songType.id&&e[144].id===e[0]?null:e[40](e[144],e[141],"prev"+Object(d.capitalize)(e[147].key))},16777216&u[0]&&{prevLabel:e[144].prevLabel},l[3],268435456&u[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};o.$set(b),(!i||268435456&u[0]&&c!==(c=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq"))&&Object(r.attr)(a,"class",c)},i(e){i||(Object(r.transition_in)(o.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(o.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),s&&s.d(),Object(r.destroy_component)(o)}}}function at(e){let t,n,a=e[147].compactLabel+"",o="acc"===e[147].key&&e[40](e[144],e[141],"mods")?" ("+e[40](e[144],e[141],"mods")+")":"";return{c(){t=Object(r.text)(a),n=Object(r.text)(o)},m(e,a){Object(r.insert)(e,t,a),Object(r.insert)(e,n,a)},p(e,c){268435456&c[0]&&a!==(a=e[147].compactLabel+"")&&Object(r.set_data)(t,a),285212672&c[0]&&o!==(o="acc"===e[147].key&&e[40](e[144],e[141],"mods")?" ("+e[40](e[144],e[141],"mods")+")":"")&&Object(r.set_data)(n,o)},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n)}}}function ot(e){let t,n;return t=new q.default({props:{leaderboardId:e[141].leaderboardId,pp:e[40](e[144],e[141],e[147].key)}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16777216&n[0]&&(r.leaderboardId=e[141].leaderboardId),285212672&n[0]&&(r.pp=e[40](e[144],e[141],e[147].key)),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function ct(e,t){let n,a,o,c=("diffPp"!==t[147].key||t[144].id!==t[0]||"what_to_play"===t[16].songType.id)&&Ye(t);return{key:e,first:null,c(){n=Object(r.empty)(),c&&c.c(),a=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),c&&c.m(e,t),Object(r.insert)(e,a,t),o=!0},p(e,t){"diffPp"!==e[147].key||e[144].id!==e[0]||"what_to_play"===e[16].songType.id?c?(c.p(e,t),285278209&t[0]&&Object(r.transition_in)(c,1)):(c=Ye(e),c.c(),Object(r.transition_in)(c,1),c.m(a.parentNode,a)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)())},i(e){o||(Object(r.transition_in)(c),o=!0)},o(e){Object(r.transition_out)(c),o=!1},d(e){e&&Object(r.detach)(n),c&&c.d(e),e&&Object(r.detach)(a)}}}function it(e){let t,n;return t=new V.default({props:{data:e[40](e[144],e[141],"beatSavior"),showAcc:e[29],showStats:e[30]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16777216&n[0]&&(r.data=e[40](e[144],e[141],"beatSavior")),536870912&n[0]&&(r.showAcc=e[29]),1073741824&n[0]&&(r.showStats=e[30]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function st(e,t){let n,a,o,c,i;const s=[Fe,Ne],l=[];function d(e,t){return"compact"===e[21].id?0:1}return a=d(t),o=l[a]=s[a](t),{key:e,first:null,c(){n=Object(r.empty)(),o.c(),c=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),l[a].m(e,t),Object(r.insert)(e,c,t),i=!0},p(e,t){let n=a;a=d(e),a===n?l[a].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(l[n],1,1,()=>{l[n]=null}),Object(r.check_outros)(),o=l[a],o||(o=l[a]=s[a](e),o.c()),Object(r.transition_in)(o,1),o.m(c.parentNode,c))},i(e){i||(Object(r.transition_in)(o),i=!0)},o(e){Object(r.transition_out)(o),i=!1},d(e){e&&Object(r.detach)(n),l[a].d(e),e&&Object(r.detach)(c)}}}function lt(e){let t,n;return t=new M.default({props:{hash:e[141].hash,bsExistsForPlayer:e[141].bsExistsForPlayer,twitchUrl:e[141].video&&e[141].video.url&&e[7].includes("twitch")?e[141].video.url:null}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16777216&n[0]&&(r.hash=e[141].hash),16777216&n[0]&&(r.bsExistsForPlayer=e[141].bsExistsForPlayer),16777344&n[0]&&(r.twitchUrl=e[141].video&&e[141].video.url&&e[7].includes("twitch")?e[141].video.url:null),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function dt(e,t){let n,a,o,c,i="icons"===t[147].key&&t[141].hash&&t[141].hash.length&&lt(t);return{key:e,first:null,c(){n=Object(r.element)("td"),i&&i.c(),a=Object(r.space)(),Object(r.attr)(n,"class",o=Object(r.null_to_empty)(t[147].key)+" svelte-189d5aq"),Object(r.toggle_class)(n,"left","tabular"===t[21].id||t[24].series.length>1),this.first=n},m(e,t){Object(r.insert)(e,n,t),i&&i.m(n,null),Object(r.append)(n,a),c=!0},p(e,t){"icons"===e[147].key&&e[141].hash&&e[141].hash.length?i?(i.p(e,t),16777216&t[0]|2&t[1]&&Object(r.transition_in)(i,1)):(i=lt(e),i.c(),Object(r.transition_in)(i,1),i.m(n,a)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)()),(!c||2&t[1]&&o!==(o=Object(r.null_to_empty)(e[147].key)+" svelte-189d5aq"))&&Object(r.attr)(n,"class",o),18874368&t[0]|2&t[1]&&Object(r.toggle_class)(n,"left","tabular"===e[21].id||e[24].series.length>1)},i(e){c||(Object(r.transition_in)(i),c=!0)},o(e){Object(r.transition_out)(i),c=!1},d(e){e&&Object(r.detach)(n),i&&i.d()}}}function ut(e){let t,n,a,o,c,i,s,l;function d(...t){return e[87](e[141],...t)}return a=new L.default({props:{leaderboardId:e[141].leaderboardId,showDifferences:!!e[38](e[4],"diff"),bgLeft:"-2rem",bgTop:"-3rem",bgWidth:"2rem",bgHeight:"1.5rem",onlySelectedDiff:!0,type:"cached"}}),{c(){t=Object(r.element)("tr"),n=Object(r.element)("td"),Object(r.create_component)(a.$$.fragment),o=Object(r.space)(),Object(r.attr)(n,"colspan",c=2+e[27].length+e[24].series.length*("compact"===e[21].id?1:e[28].length)+e[32].length+(e[5]||e[6]&&e[6].length?1:0)),Object(r.attr)(n,"class","svelte-189d5aq"),Object(r.attr)(t,"class","leaderboard svelte-189d5aq"),Object(r.toggle_class)(t,"opened",!!e[141].leaderboardOpened)},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),Object(r.append)(n,o),i=!0,s||(l=Object(r.listen)(n,"dblclick",d),s=!0)},p(o,s){e=o;const l={};16777216&s[0]&&(l.leaderboardId=e[141].leaderboardId),16&s[0]&&(l.showDifferences=!!e[38](e[4],"diff")),a.$set(l),(!i||421527648&s[0]|2&s[1]&&c!==(c=2+e[27].length+e[24].series.length*("compact"===e[21].id?1:e[28].length)+e[32].length+(e[5]||e[6]&&e[6].length?1:0)))&&Object(r.attr)(n,"colspan",c),16777216&s[0]&&Object(r.toggle_class)(t,"opened",!!e[141].leaderboardOpened)},i(e){i||(Object(r.transition_in)(a.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a),s=!1,l()}}}function bt(e,t){let n,a,o,c,i,s,l,d,u,b,p,f,O,j,m,g,h,y,v,_=[],w=new Map,k=[],$=new Map,x=[],S=new Map,I=(t[5]||t[6]&&t[6].length)&&ze(t);c=new z.default({props:{diff:t[141].diffInfo,useShortName:!0,reverseColors:!0}}),d=new P.default({props:{song:t[141],$$slots:{default:[Ee]},$$scope:{ctx:t}}}),b=new B.default({props:{type:"text",iconFa:t[141].leaderboardOpened?"fas fa-chevron-down":"fas fa-chevron-right"}}),b.$on("click",(function(...e){return t[85](t[141],t[152],t[153],...e)}));let C=t[27];const T=e=>e[147].key;for(let e=0;e<C.length;e+=1){let n=te(t,C,e),r=T(n);w.set(r,_[e]=Le(r,n))}let A=t[24].series;const q=e=>e[144].id;for(let e=0;e<A.length;e+=1){let n=ee(t,A,e),r=q(n);$.set(r,k[e]=st(r,n))}let R=t[32];const E=e=>e[147].key;for(let e=0;e<R.length;e+=1){let n=Q(t,R,e),r=E(n);S.set(r,x[e]=dt(r,n))}function D(...e){return t[86](t[141],t[152],t[153],...e)}let L=!!t[141].leaderboardOpened&&ut(t);return{key:e,first:null,c(){n=Object(r.element)("tr"),I&&I.c(),a=Object(r.space)(),o=Object(r.element)("td"),Object(r.create_component)(c.$$.fragment),i=Object(r.space)(),s=Object(r.element)("td"),l=Object(r.element)("div"),Object(r.create_component)(d.$$.fragment),u=Object(r.space)(),Object(r.create_component)(b.$$.fragment),p=Object(r.space)();for(let e=0;e<_.length;e+=1)_[e].c();f=Object(r.space)();for(let e=0;e<k.length;e+=1)k[e].c();O=Object(r.space)();for(let e=0;e<x.length;e+=1)x[e].c();m=Object(r.space)(),L&&L.c(),g=Object(r.empty)(),Object(r.attr)(o,"class","diff svelte-189d5aq"),Object(r.attr)(l,"class","svelte-189d5aq"),Object(r.attr)(s,"class","song svelte-189d5aq"),Object(r.attr)(n,"class",j=Object(r.null_to_empty)("item tr-"+t[141].leaderboardId)+" svelte-189d5aq"),Object(r.toggle_class)(n,"opened",!!t[141].leaderboardOpened),this.first=n},m(e,t){Object(r.insert)(e,n,t),I&&I.m(n,null),Object(r.append)(n,a),Object(r.append)(n,o),Object(r.mount_component)(c,o,null),Object(r.append)(n,i),Object(r.append)(n,s),Object(r.append)(s,l),Object(r.mount_component)(d,l,null),Object(r.append)(l,u),Object(r.mount_component)(b,l,null),Object(r.append)(n,p);for(let e=0;e<_.length;e+=1)_[e].m(n,null);Object(r.append)(n,f);for(let e=0;e<k.length;e+=1)k[e].m(n,null);Object(r.append)(n,O);for(let e=0;e<x.length;e+=1)x[e].m(n,null);Object(r.insert)(e,m,t),L&&L.m(e,t),Object(r.insert)(e,g,t),h=!0,y||(v=Object(r.listen)(n,"dblclick",D),y=!0)},p(e,o){(t=e)[5]||t[6]&&t[6].length?I?(I.p(t,o),96&o[0]&&Object(r.transition_in)(I,1)):(I=ze(t),I.c(),Object(r.transition_in)(I,1),I.m(n,a)):I&&(Object(r.group_outros)(),Object(r.transition_out)(I,1,1,()=>{I=null}),Object(r.check_outros)());const i={};16777216&o[0]&&(i.diff=t[141].diffInfo),c.$set(i);const s={};16777216&o[0]&&(s.song=t[141]),16777216&o[0]|2048&o[5]&&(s.$$scope={dirty:o,ctx:t}),d.$set(s);const l={};if(16777216&o[0]&&(l.iconFa=t[141].leaderboardOpened?"fas fa-chevron-down":"fas fa-chevron-right"),b.$set(l),150994944&o[0]){const e=t[27];Object(r.group_outros)(),_=Object(r.update_keyed_each)(_,o,T,1,t,e,w,n,r.outro_and_destroy_block,Le,f,te),Object(r.check_outros)()}if(2032205853&o[0]|641&o[1]){const e=t[24].series;Object(r.group_outros)(),k=Object(r.update_keyed_each)(k,o,q,1,t,e,$,n,r.outro_and_destroy_block,st,O,ee),Object(r.check_outros)()}if(18874496&o[0]|2&o[1]){const e=t[32];Object(r.group_outros)(),x=Object(r.update_keyed_each)(x,o,E,1,t,e,S,n,r.outro_and_destroy_block,dt,null,Q),Object(r.check_outros)()}(!h||16777216&o[0]&&j!==(j=Object(r.null_to_empty)("item tr-"+t[141].leaderboardId)+" svelte-189d5aq"))&&Object(r.attr)(n,"class",j),16777216&o[0]&&Object(r.toggle_class)(n,"opened",!!t[141].leaderboardOpened),t[141].leaderboardOpened?L?(L.p(t,o),16777216&o[0]&&Object(r.transition_in)(L,1)):(L=ut(t),L.c(),Object(r.transition_in)(L,1),L.m(g.parentNode,g)):L&&(Object(r.group_outros)(),Object(r.transition_out)(L,1,1,()=>{L=null}),Object(r.check_outros)())},i(e){if(!h){Object(r.transition_in)(I),Object(r.transition_in)(c.$$.fragment,e),Object(r.transition_in)(d.$$.fragment,e),Object(r.transition_in)(b.$$.fragment,e);for(let e=0;e<C.length;e+=1)Object(r.transition_in)(_[e]);for(let e=0;e<A.length;e+=1)Object(r.transition_in)(k[e]);for(let e=0;e<R.length;e+=1)Object(r.transition_in)(x[e]);Object(r.transition_in)(L),h=!0}},o(e){Object(r.transition_out)(I),Object(r.transition_out)(c.$$.fragment,e),Object(r.transition_out)(d.$$.fragment,e),Object(r.transition_out)(b.$$.fragment,e);for(let e=0;e<_.length;e+=1)Object(r.transition_out)(_[e]);for(let e=0;e<k.length;e+=1)Object(r.transition_out)(k[e]);for(let e=0;e<x.length;e+=1)Object(r.transition_out)(x[e]);Object(r.transition_out)(L),h=!1},d(e){e&&Object(r.detach)(n),I&&I.d(),Object(r.destroy_component)(c),Object(r.destroy_component)(d),Object(r.destroy_component)(b);for(let e=0;e<_.length;e+=1)_[e].d();for(let e=0;e<k.length;e+=1)k[e].d();for(let e=0;e<x.length;e+=1)x[e].d();e&&Object(r.detach)(m),L&&L.d(e),e&&Object(r.detach)(g),y=!1,v()}}}function pt(e){let t,n,a,o,c,i,s,l,d,u,b,p,f=Object(v.trans)("songBrowser.totalPp",{name:e[24].series[0].name})+"",O=[],j=new Map,m=[],g=new Map,h=(e[5]||e[6]&&e[6].length)&&ft(e),y=e[24].series;const _=e=>e[144].id;for(let t=0;t<y.length;t+=1){let n=J(e,y,t),r=_(n);j.set(r,O[t]=gt(r,n))}let w=e[32];const k=e=>e[147].key;for(let t=0;t<w.length;t+=1){let n=X(e,w,t),r=k(n);g.set(r,m[t]=ht(r,n))}let $=e[28].length&&e[24].series.length>2&&yt(e);return{c(){t=Object(r.element)("tfoot"),n=Object(r.element)("tr"),h&&h.c(),a=Object(r.space)(),o=Object(r.element)("th"),c=Object(r.text)(f),l=Object(r.space)();for(let e=0;e<O.length;e+=1)O[e].c();d=Object(r.space)();for(let e=0;e<m.length;e+=1)m[e].c();u=Object(r.space)(),b=Object(r.element)("tr"),$&&$.c(),Object(r.attr)(o,"class","song svelte-189d5aq"),Object(r.attr)(o,"rowspan",i=e[24].series.length>2?2:1),Object(r.attr)(o,"colspan",s=2+e[27].length),Object(r.attr)(t,"class","svelte-189d5aq")},m(e,i){Object(r.insert)(e,t,i),Object(r.append)(t,n),h&&h.m(n,null),Object(r.append)(n,a),Object(r.append)(n,o),Object(r.append)(o,c),Object(r.append)(n,l);for(let e=0;e<O.length;e+=1)O[e].m(n,null);Object(r.append)(n,d);for(let e=0;e<m.length;e+=1)m[e].m(n,null);Object(r.append)(t,u),Object(r.append)(t,b),$&&$.m(b,null),p=!0},p(e,t){if(e[5]||e[6]&&e[6].length?h?h.p(e,t):(h=ft(e),h.c(),h.m(n,a)):h&&(h.d(1),h=null),(!p||16777216&t[0])&&f!==(f=Object(v.trans)("songBrowser.totalPp",{name:e[24].series[0].name})+"")&&Object(r.set_data)(c,f),(!p||16777216&t[0]&&i!==(i=e[24].series.length>2?2:1))&&Object(r.attr)(o,"rowspan",i),(!p||134217728&t[0]&&s!==(s=2+e[27].length))&&Object(r.attr)(o,"colspan",s),287309841&t[0]|128&t[1]){const a=e[24].series;Object(r.group_outros)(),O=Object(r.update_keyed_each)(O,t,_,1,e,a,j,n,r.outro_and_destroy_block,gt,d,J),Object(r.check_outros)()}if(18874368&t[0]|2&t[1]){const a=e[32];m=Object(r.update_keyed_each)(m,t,k,1,e,a,g,n,r.destroy_block,ht,null,X)}e[28].length&&e[24].series.length>2?$?($.p(e,t),285212672&t[0]&&Object(r.transition_in)($,1)):($=yt(e),$.c(),Object(r.transition_in)($,1),$.m(b,null)):$&&(Object(r.group_outros)(),Object(r.transition_out)($,1,1,()=>{$=null}),Object(r.check_outros)())},i(e){if(!p){for(let e=0;e<y.length;e+=1)Object(r.transition_in)(O[e]);Object(r.transition_in)($),p=!0}},o(e){for(let e=0;e<O.length;e+=1)Object(r.transition_out)(O[e]);Object(r.transition_out)($),p=!1},d(e){e&&Object(r.detach)(t),h&&h.d();for(let e=0;e<O.length;e+=1)O[e].d();for(let e=0;e<m.length;e+=1)m[e].d();$&&$.d()}}}function ft(e){let t,n;return{c(){t=Object(r.element)("th"),Object(r.attr)(t,"class","check svelte-189d5aq"),Object(r.attr)(t,"rowspan",n=e[24].series.length>2?2:1)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){16777216&a[0]&&n!==(n=e[24].series.length>2?2:1)&&Object(r.attr)(t,"rowspan",n)},d(e){e&&Object(r.detach)(t)}}}function Ot(e){let t,n,a;return n=new E.default({props:{value:e[144].totalPp,prevValue:e[38](e[4],"diff")?e[144].prevTotalPp:null,suffix:"pp"}}),{c(){t=Object(r.element)("th"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","left svelte-189d5aq")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(e,t){const r={};16777216&t[0]&&(r.value=e[144].totalPp),16777232&t[0]&&(r.prevValue=e[38](e[4],"diff")?e[144].prevTotalPp:null),n.$set(r)},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function jt(e){let t,n,a=e[28].length>0&&!(1===e[28].length&&e[144].id===e[0]&&e[38](e[4],"diffPp")),o=a&&mt(e);return{c(){o&&o.c(),t=Object(r.empty)()},m(e,a){o&&o.m(e,a),Object(r.insert)(e,t,a),n=!0},p(e,n){285212689&n[0]&&(a=e[28].length>0&&!(1===e[28].length&&e[144].id===e[0]&&e[38](e[4],"diffPp"))),a?o?(o.p(e,n),285212689&n[0]&&Object(r.transition_in)(o,1)):(o=mt(e),o.c(),Object(r.transition_in)(o,1),o.m(t.parentNode,t)):o&&(Object(r.group_outros)(),Object(r.transition_out)(o,1,1,()=>{o=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(o),n=!0)},o(e){Object(r.transition_out)(o),n=!1},d(e){o&&o.d(e),e&&Object(r.detach)(t)}}}function mt(e){let t,n,a,o,c;return n=new E.default({props:{value:e[144].totalPp,prevValue:e[38](e[4],"diff")?e[144].prevTotalPp:null,suffix:"pp"}}),{c(){t=Object(r.element)("th"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","left svelte-189d5aq"),Object(r.attr)(t,"rowspan",a=e[144].id!==e[0]?1:e[24].series.length>2?2:1),Object(r.attr)(t,"colspan",o=e[144].id!==e[0]?e[28].length:e[28].length-(e[38](e[4],"diffPp")?1:0))},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),c=!0},p(e,i){const s={};16777216&i[0]&&(s.value=e[144].totalPp),16777232&i[0]&&(s.prevValue=e[38](e[4],"diff")?e[144].prevTotalPp:null),n.$set(s),(!c||16777217&i[0]&&a!==(a=e[144].id!==e[0]?1:e[24].series.length>2?2:1))&&Object(r.attr)(t,"rowspan",a),(!c||285212689&i[0]&&o!==(o=e[144].id!==e[0]?e[28].length:e[28].length-(e[38](e[4],"diffPp")?1:0)))&&Object(r.attr)(t,"colspan",o)},i(e){c||(Object(r.transition_in)(n.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function gt(e,t){let n,a,o,c,i;const s=[jt,Ot],l=[];function d(e,t){return"tabular"===e[21].id?0:1}return a=d(t),o=l[a]=s[a](t),{key:e,first:null,c(){n=Object(r.empty)(),o.c(),c=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),l[a].m(e,t),Object(r.insert)(e,c,t),i=!0},p(e,t){let n=a;a=d(e),a===n?l[a].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(l[n],1,1,()=>{l[n]=null}),Object(r.check_outros)(),o=l[a],o||(o=l[a]=s[a](e),o.c()),Object(r.transition_in)(o,1),o.m(c.parentNode,c))},i(e){i||(Object(r.transition_in)(o),i=!0)},o(e){Object(r.transition_out)(o),i=!1},d(e){e&&Object(r.detach)(n),l[a].d(e),e&&Object(r.detach)(c)}}}function ht(e,t){let n,a;return{key:e,first:null,c(){n=Object(r.element)("th"),Object(r.attr)(n,"class",a=Object(r.null_to_empty)(t[147].key)+" svelte-189d5aq"),Object(r.toggle_class)(n,"left","tabular"===t[21].id||t[24].series.length>1),this.first=n},m(e,t){Object(r.insert)(e,n,t)},p(e,t){2&t[1]&&a!==(a=Object(r.null_to_empty)(e[147].key)+" svelte-189d5aq")&&Object(r.attr)(n,"class",a),18874368&t[0]|2&t[1]&&Object(r.toggle_class)(n,"left","tabular"===e[21].id||e[24].series.length>1)},d(e){e&&Object(r.detach)(n)}}}function yt(e){let t,n,a,o;return n=new E.default({props:{value:e[24].bestTotalRealPp,prevValue:e[38](e[4],"diff")?e[24].series[0].totalPp:null,suffix:"pp"}}),{c(){t=Object(r.element)("th"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","left svelte-189d5aq"),Object(r.attr)(t,"colspan",a=e[28].length*(e[24].series.length-1)+e[32].length)},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,c){const i={};16777216&c[0]&&(i.value=e[24].bestTotalRealPp),16777232&c[0]&&(i.prevValue=e[38](e[4],"diff")?e[24].series[0].totalPp:null),n.$set(i),(!o||285212672&c[0]|2&c[1]&&a!==(a=e[28].length*(e[24].series.length-1)+e[32].length))&&Object(r.attr)(t,"colspan",a)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function vt(e){let t,n;return t=new N.default({props:{checked:e[6].includes(e[141].leaderboardId)}}),t.$on("click",(function(){Object(r.is_function)(e[54](e[141].leaderboardId))&&e[54](e[141].leaderboardId).apply(this,arguments)})),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(n,r){e=n;const a={};16777280&r[0]&&(a.checked=e[6].includes(e[141].leaderboardId)),t.$set(a)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function _t(e){let t,n,a=(e[5]||e[6]&&e[6].length)&&vt(e);return{c(){t=Object(r.element)("div"),a&&a.c(),Object(r.attr)(t,"slot","before-header"),Object(r.attr)(t,"class","check svelte-189d5aq")},m(e,o){Object(r.insert)(e,t,o),a&&a.m(t,null),n=!0},p(e,n){e[5]||e[6]&&e[6].length?a?(a.p(e,n),96&n[0]&&Object(r.transition_in)(a,1)):(a=vt(e),a.c(),Object(r.transition_in)(a,1),a.m(t,null)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){e&&Object(r.detach)(t),a&&a.d()}}}function wt(e){let t,n,a,o;const c=[$t,kt],i=[];function s(e,t){return e[146]>0?0:1}return n=s(e),a=i[n]=c[n](e),{c(){t=Object(r.element)("div"),a.c(),Object(r.attr)(t,"class","player-name")},m(e,a){Object(r.insert)(e,t,a),i[n].m(t,null),o=!0},p(e,o){let l=n;n=s(e),n===l?i[n].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),a=i[n],a||(a=i[n]=c[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null))},i(e){o||(Object(r.transition_in)(a),o=!0)},o(e){Object(r.transition_out)(a),o=!1},d(e){e&&Object(r.detach)(t),i[n].d()}}}function kt(e){let t,n,a=e[144].name+"";return{c(){t=Object(r.element)("strong"),n=Object(r.text)(a),Object(r.attr)(t,"class","svelte-189d5aq")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){16777216&t[0]&&a!==(a=e[144].name+"")&&Object(r.set_data)(n,a)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function $t(e){let t,n,a,o,c,i,s;function l(...t){return e[73](e[144],...t)}function d(...t){return e[75](e[146],...t)}return t=new D.default({props:{items:e[22],value:e[22].find(l),right:!0}}),t.$on("change",(function(...t){return e[74](e[146],...t)})),{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),a=Object(r.element)("i"),Object(r.attr)(a,"class","fas fa-times player-remove svelte-189d5aq"),Object(r.attr)(a,"title",o=e[36].songBrowser.compare.remove)},m(e,o){Object(r.mount_component)(t,e,o),Object(r.insert)(e,n,o),Object(r.insert)(e,a,o),c=!0,i||(s=Object(r.listen)(a,"click",d),i=!0)},p(n,i){e=n;const s={};4194304&i[0]&&(s.items=e[22]),20971520&i[0]&&(s.value=e[22].find(l)),t.$set(s),(!c||32&i[1]&&o!==(o=e[36].songBrowser.compare.remove))&&Object(r.attr)(a,"title",o)},i(e){c||(Object(r.transition_in)(t.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),c=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),e&&Object(r.detach)(a),i=!1,s()}}}function xt(e){let t,n,a=e[36].songBrowser.noScore+"";return{c(){t=Object(r.element)("span"),n=Object(r.text)(a),Object(r.attr)(t,"class","dec")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){32&t[1]&&a!==(a=e[36].songBrowser.noScore+"")&&Object(r.set_data)(n,a)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function St(e){let t,n,a,o=[],c=new Map,i=e[28];const s=e=>e[147].key;for(let t=0;t<i.length;t+=1){let n=se(e,i,t),r=s(n);c.set(r,o[t]=Et(r,n))}let l=e[31]&&Bt(e);return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=Object(r.space)(),l&&l.c(),n=Object(r.empty)()},m(e,c){for(let t=0;t<o.length;t+=1)o[t].m(e,c);Object(r.insert)(e,t,c),l&&l.m(e,c),Object(r.insert)(e,n,c),a=!0},p(e,a){if(285278237&a[0]|640&a[1]){const n=e[28];Object(r.group_outros)(),o=Object(r.update_keyed_each)(o,a,s,1,e,n,c,t.parentNode,r.outro_and_destroy_block,Et,t,se),Object(r.check_outros)()}e[31]?l?(l.p(e,a),1&a[1]&&Object(r.transition_in)(l,1)):(l=Bt(e),l.c(),Object(r.transition_in)(l,1),l.m(n.parentNode,n)):l&&(Object(r.group_outros)(),Object(r.transition_out)(l,1,1,()=>{l=null}),Object(r.check_outros)())},i(e){if(!a){for(let e=0;e<i.length;e+=1)Object(r.transition_in)(o[e]);Object(r.transition_in)(l),a=!0}},o(e){for(let e=0;e<o.length;e+=1)Object(r.transition_out)(o[e]);Object(r.transition_out)(l),a=!1},d(e){for(let t=0;t<o.length;t+=1)o[t].d(e);e&&Object(r.detach)(t),l&&l.d(e),e&&Object(r.detach)(n)}}}function Pt(e){let t,n,a,o,c;const i=[At,Tt,Ct,It],s=[];function l(e,n){return"timeset"===e[147].key?0:"rank"===e[147].key?1:(268435456&n[0]&&(t=!!["beatSaviorAcc","beatSaviorStats"].includes(e[147].key)),t?2:3)}return n=l(e,[-1]),a=s[n]=i[n](e),{c(){a.c(),o=Object(r.empty)()},m(e,t){s[n].m(e,t),Object(r.insert)(e,o,t),c=!0},p(e,t){let c=n;n=l(e,t),n===c?s[n].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(s[c],1,1,()=>{s[c]=null}),Object(r.check_outros)(),a=s[n],a||(a=s[n]=i[n](e),a.c()),Object(r.transition_in)(a,1),a.m(o.parentNode,o))},i(e){c||(Object(r.transition_in)(a),c=!0)},o(e){Object(r.transition_out)(a),c=!1},d(e){s[n].d(e),e&&Object(r.detach)(o)}}}function It(e){let t,n,a,o=e[40](e[144],e[141],e[147].key),c=o&&qt(e),i="pp"===e[147].key&&"sniper_mode"!==e[16].songType.id&&zt(e);return{c(){c&&c.c(),t=Object(r.space)(),i&&i.c(),n=Object(r.empty)()},m(e,o){c&&c.m(e,o),Object(r.insert)(e,t,o),i&&i.m(e,o),Object(r.insert)(e,n,o),a=!0},p(e,a){285212672&a[0]&&(o=e[40](e[144],e[141],e[147].key)),o?c?(c.p(e,a),285212672&a[0]&&Object(r.transition_in)(c,1)):(c=qt(e),c.c(),Object(r.transition_in)(c,1),c.m(t.parentNode,t)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)()),"pp"===e[147].key&&"sniper_mode"!==e[16].songType.id?i?(i.p(e,a),268500992&a[0]&&Object(r.transition_in)(i,1)):(i=zt(e),i.c(),Object(r.transition_in)(i,1),i.m(n.parentNode,n)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)())},i(e){a||(Object(r.transition_in)(c),Object(r.transition_in)(i),a=!0)},o(e){Object(r.transition_out)(c),Object(r.transition_out)(i),a=!1},d(e){c&&c.d(e),e&&Object(r.detach)(t),i&&i.d(e),e&&Object(r.detach)(n)}}}function Ct(e){return{c:r.noop,m:r.noop,p:r.noop,i:r.noop,o:r.noop,d:r.noop}}function Tt(e){let t,n,a,o;const c=[{rank:e[40](e[144],e[141],e[147].key)},{countryRank:e[40](e[144],e[141],"ssplCountryRank")},{country:e[2]},{leaderboardId:e[141].leaderboardId},{playerId:e[144].id},{lastUpdated:e[40](e[144],e[141],"lastUpdated")},{timeset:e[40](e[144],e[141],"timeset")},{recentPlay:e[144].id===e[0]?new Date(Math.max(e[144].recentPlay,e[3])):e[144].recentPlay},e[147].valueProps];let i={};for(let e=0;e<c.length;e+=1)i=Object(r.assign)(i,c[e]);return n=new U.default({props:i}),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class",a=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,i){const s=285212685&i[0]|512&i[1]?Object(r.get_spread_update)(c,[285212672&i[0]|512&i[1]&&{rank:e[40](e[144],e[141],e[147].key)},16777216&i[0]|512&i[1]&&{countryRank:e[40](e[144],e[141],"ssplCountryRank")},4&i[0]&&{country:e[2]},16777216&i[0]&&{leaderboardId:e[141].leaderboardId},16777216&i[0]&&{playerId:e[144].id},16777216&i[0]|512&i[1]&&{lastUpdated:e[40](e[144],e[141],"lastUpdated")},16777216&i[0]|512&i[1]&&{timeset:e[40](e[144],e[141],"timeset")},16777225&i[0]&&{recentPlay:e[144].id===e[0]?new Date(Math.max(e[144].recentPlay,e[3])):e[144].recentPlay},268435456&i[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};n.$set(s),(!o||268435456&i[0]&&a!==(a=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq"))&&Object(r.attr)(t,"class",a)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function At(e){let t,n,a,o;const c=[{date:e[40](e[144],e[141],e[147].key)},e[147].valueProps];let i={};for(let e=0;e<c.length;e+=1)i=Object(r.assign)(i,c[e]);return n=new T.default({props:i}),{c(){t=Object(r.element)("strong"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class",a=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,i){const s=285212672&i[0]|512&i[1]?Object(r.get_spread_update)(c,[{date:e[40](e[144],e[141],e[147].key)},268435456&i[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};n.$set(s),(!o||268435456&i[0]&&a!==(a=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq"))&&Object(r.attr)(t,"class",a)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function qt(e){let t,n,a,o,c,i,s=e[147].compactLabel&&Rt(e);const l=[{value:e[40](e[144],e[141],e[147].key)},{prevValue:!e[38](e[4],"diff")||"sniper_mode"===e[16].songType.id&&e[144].id===e[0]?null:e[40](e[144],e[141],"prev"+Object(d.capitalize)(e[147].key))},{prevLabel:e[144].prevLabel},{inline:!0},e[147].valueProps];let u={};for(let e=0;e<l.length;e+=1)u=Object(r.assign)(u,l[e]);return o=new E.default({props:u}),{c(){t=Object(r.element)("div"),s&&s.c(),n=Object(r.space)(),a=Object(r.element)("strong"),Object(r.create_component)(o.$$.fragment),Object(r.attr)(a,"class",c=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq")},m(e,c){Object(r.insert)(e,t,c),s&&s.m(t,null),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.mount_component)(o,a,null),i=!0},p(e,u){e[147].compactLabel?s?s.p(e,u):(s=Rt(e),s.c(),s.m(t,n)):s&&(s.d(1),s=null);const b=285278225&u[0]|640&u[1]?Object(r.get_spread_update)(l,[285212672&u[0]|512&u[1]&&{value:e[40](e[144],e[141],e[147].key)},{prevValue:!e[38](e[4],"diff")||"sniper_mode"===e[16].songType.id&&e[144].id===e[0]?null:e[40](e[144],e[141],"prev"+Object(d.capitalize)(e[147].key))},16777216&u[0]&&{prevLabel:e[144].prevLabel},l[3],268435456&u[0]&&Object(r.get_spread_object)(e[147].valueProps)]):{};o.$set(b),(!i||268435456&u[0]&&c!==(c=Object(r.null_to_empty)("compact-"+e[147].key+"-val")+" svelte-189d5aq"))&&Object(r.attr)(a,"class",c)},i(e){i||(Object(r.transition_in)(o.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(o.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),s&&s.d(),Object(r.destroy_component)(o)}}}function Rt(e){let t,n,a=e[147].compactLabel+"",o="acc"===e[147].key&&e[40](e[144],e[141],"mods")?" ("+e[40](e[144],e[141],"mods")+")":"";return{c(){t=Object(r.text)(a),n=Object(r.text)(o)},m(e,a){Object(r.insert)(e,t,a),Object(r.insert)(e,n,a)},p(e,c){268435456&c[0]&&a!==(a=e[147].compactLabel+"")&&Object(r.set_data)(t,a),285212672&c[0]&&o!==(o="acc"===e[147].key&&e[40](e[144],e[141],"mods")?" ("+e[40](e[144],e[141],"mods")+")":"")&&Object(r.set_data)(n,o)},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n)}}}function zt(e){let t,n;return t=new q.default({props:{leaderboardId:e[141].leaderboardId,pp:e[40](e[144],e[141],e[147].key)}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16777216&n[0]&&(r.leaderboardId=e[141].leaderboardId),285212672&n[0]&&(r.pp=e[40](e[144],e[141],e[147].key)),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function Et(e,t){let n,a,o,c=("diffPp"!==t[147].key||t[144].id!==t[0]||"what_to_play"===t[16].songType.id)&&Pt(t);return{key:e,first:null,c(){n=Object(r.empty)(),c&&c.c(),a=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),c&&c.m(e,t),Object(r.insert)(e,a,t),o=!0},p(e,t){"diffPp"!==e[147].key||e[144].id!==e[0]||"what_to_play"===e[16].songType.id?c?(c.p(e,t),285278209&t[0]&&Object(r.transition_in)(c,1)):(c=Pt(e),c.c(),Object(r.transition_in)(c,1),c.m(a.parentNode,a)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)())},i(e){o||(Object(r.transition_in)(c),o=!0)},o(e){Object(r.transition_out)(c),o=!1},d(e){e&&Object(r.detach)(n),c&&c.d(e),e&&Object(r.detach)(a)}}}function Bt(e){let t,n;return t=new V.default({props:{data:e[40](e[144],e[141],"beatSavior"),showAcc:e[29],showStats:e[30],showGrid:!1}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16777216&n[0]&&(r.data=e[40](e[144],e[141],"beatSavior")),536870912&n[0]&&(r.showAcc=e[29]),1073741824&n[0]&&(r.showStats=e[30]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function Dt(e,t){let n,a,o,c,i,s,l,d,u=t[24].series.length>1&&wt(t);const b=[St,xt],p=[];function f(e,t){return 16842752&t[0]&&(c=!("what_to_play"!==e[16].songType.id&&!e[40](e[144],e[141],"score"))),c?0:1}return i=f(t,[-1]),s=p[i]=b[i](t),{key:e,first:null,c(){n=Object(r.element)("div"),a=Object(r.element)("div"),u&&u.c(),o=Object(r.space)(),s.c(),l=Object(r.space)(),Object(r.attr)(a,"class","score svelte-189d5aq"),Object(r.toggle_class)(a,"best",t[40](t[144],t[141],"best")&&t[24].series.length>1),Object(r.attr)(n,"class","column svelte-189d5aq"),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.append)(n,a),u&&u.m(a,null),Object(r.append)(a,o),p[i].m(a,null),Object(r.append)(n,l),d=!0},p(e,t){e[24].series.length>1?u?(u.p(e,t),16777216&t[0]&&Object(r.transition_in)(u,1)):(u=wt(e),u.c(),Object(r.transition_in)(u,1),u.m(a,o)):u&&(Object(r.group_outros)(),Object(r.transition_out)(u,1,1,()=>{u=null}),Object(r.check_outros)());let n=i;i=f(e,t),i===n?p[i].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(p[n],1,1,()=>{p[n]=null}),Object(r.check_outros)(),s=p[i],s||(s=p[i]=b[i](e),s.c()),Object(r.transition_in)(s,1),s.m(a,null)),16777216&t[0]|512&t[1]&&Object(r.toggle_class)(a,"best",e[40](e[144],e[141],"best")&&e[24].series.length>1)},i(e){d||(Object(r.transition_in)(u),Object(r.transition_in)(s),d=!0)},o(e){Object(r.transition_out)(u),Object(r.transition_out)(s),d=!1},d(e){e&&Object(r.detach)(n),u&&u.d(),p[i].d()}}}function Lt(e){let t,n;return t=new L.default({props:{leaderboardId:e[141].leaderboardId,showDifferences:!!e[38](e[4],"diff"),showBgCover:!1,onlySelectedDiff:!0,type:"cached"}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16777216&n[0]&&(r.leaderboardId=e[141].leaderboardId),16&n[0]&&(r.showDifferences=!!e[38](e[4],"diff")),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function Nt(e){let t,n,a,o,c=[],i=new Map,s=e[24].series;const l=e=>e[144].id;for(let t=0;t<s.length;t+=1){let n=le(e,s,t),r=l(n);i.set(r,c[t]=Dt(r,n))}let d=!!e[141].leaderboardOpened&&Lt(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div");for(let e=0;e<c.length;e+=1)c[e].c();a=Object(r.space)(),d&&d.c(),Object(r.attr)(n,"class","columns is-multiline is-mobile svelte-189d5aq"),Object(r.attr)(t,"class","scores svelte-189d5aq"),Object(r.attr)(t,"slot","main"),Object(r.toggle_class)(t,"bigger",1===e[24].series.length)},m(e,i){Object(r.insert)(e,t,i),Object(r.append)(t,n);for(let e=0;e<c.length;e+=1)c[e].m(n,null);Object(r.append)(t,a),d&&d.m(t,null),o=!0},p(e,a){if(1900085277&a[0]|1573537&a[1]){const t=e[24].series;Object(r.group_outros)(),c=Object(r.update_keyed_each)(c,a,l,1,e,t,i,n,r.outro_and_destroy_block,Dt,null,le),Object(r.check_outros)()}e[141].leaderboardOpened?d?(d.p(e,a),16777216&a[0]&&Object(r.transition_in)(d,1)):(d=Lt(e),d.c(),Object(r.transition_in)(d,1),d.m(t,null)):d&&(Object(r.group_outros)(),Object(r.transition_out)(d,1,1,()=>{d=null}),Object(r.check_outros)()),16777216&a[0]&&Object(r.toggle_class)(t,"bigger",1===e[24].series.length)},i(e){if(!o){for(let e=0;e<s.length;e+=1)Object(r.transition_in)(c[e]);Object(r.transition_in)(d),o=!0}},o(e){for(let e=0;e<c.length;e+=1)Object(r.transition_out)(c[e]);Object(r.transition_out)(d),o=!1},d(e){e&&Object(r.detach)(t);for(let e=0;e<c.length;e+=1)c[e].d();d&&d.d()}}}function Ft(e){let t,n;return t=new M.default({props:{hash:e[141].hash,bsExistsForPlayer:e[141].bsExistsForPlayer,twitchUrl:e[141].video&&e[141].video.url&&e[7].includes("twitch")?e[141].video.url:null}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16777216&n[0]&&(r.hash=e[141].hash),16777216&n[0]&&(r.bsExistsForPlayer=e[141].bsExistsForPlayer),16777344&n[0]&&(r.twitchUrl=e[141].video&&e[141].video.url&&e[7].includes("twitch")?e[141].video.url:null),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function Mt(e){let t,n,a,o,c;a=new B.default({props:{type:"text",iconFa:e[141].leaderboardOpened?"fas fa-chevron-up":"fas fa-chevron-right"}}),a.$on("click",(function(...t){return e[76](e[141],e[142],e[143],...t)}));let i=e[32].length>0&&e[141]&&Ft(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),Object(r.create_component)(a.$$.fragment),o=Object(r.space)(),i&&i.c(),Object(r.attr)(n,"class","card-icons"),Object(r.attr)(t,"slot","footer"),Object(r.attr)(t,"class","svelte-189d5aq")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),Object(r.append)(n,o),i&&i.m(n,null),c=!0},p(t,o){e=t;const c={};16777216&o[0]&&(c.iconFa=e[141].leaderboardOpened?"fas fa-chevron-up":"fas fa-chevron-right"),a.$set(c),e[32].length>0&&e[141]?i?(i.p(e,o),16777216&o[0]|2&o[1]&&Object(r.transition_in)(i,1)):(i=Ft(e),i.c(),Object(r.transition_in)(i,1),i.m(n,null)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)())},i(e){c||(Object(r.transition_in)(a.$$.fragment,e),Object(r.transition_in)(i),c=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),Object(r.transition_out)(i),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a),i&&i.d()}}}function Ut(e){let t,n;return{c(){t=Object(r.space)(),n=Object(r.space)()},m(e,a){Object(r.insert)(e,t,a),Object(r.insert)(e,n,a)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n)}}}function Vt(e,t){let n,a,o,c,i,s,l;function d(...e){return t[77](t[141],t[142],t[143],...e)}return a=new F.default({props:{leaderboardId:t[141].leaderboardId,hash:t[141].hash,padding:"1em",iconSize:"0.875em",songName:t[141].name,songAuthorName:t[141].songAuthor,levelAuthorName:t[141].levelAuthor,diffInfo:t[141].diffInfo,stars:t[27].find(tn)?t[141].stars:t[141].stars?0:null,maxPp:t[27].find(nn)?t[141].maxPp:null,duration:t[27].find(rn)?t[141].length:null,bpm:t[27].find(an)?t[141].bpm:null,njs:t[27].find(on)?t[141].njs:null,nps:t[27].find(cn)?t[141].nps:null,$$slots:{default:[Ut],footer:[Mt],main:[Nt],"before-header":[_t]},$$scope:{ctx:t}}}),{key:e,first:null,c(){n=Object(r.element)("div"),Object(r.create_component)(a.$$.fragment),o=Object(r.space)(),Object(r.attr)(n,"class",c=Object(r.null_to_empty)("song-card column is-full is-half-tablet "+(t[24].series>1?"is-one-third-fullhd":"is-one-quarter-widescreen is-one-third-desktop")+" card-"+t[141].leaderboardId)+" svelte-189d5aq"),Object(r.toggle_class)(n,"full-width",!!t[141].leaderboardOpened),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.mount_component)(a,n,null),Object(r.append)(n,o),i=!0,s||(l=Object(r.listen)(n,"dblclick",d),s=!0)},p(e,o){t=e;const s={};16777216&o[0]&&(s.leaderboardId=t[141].leaderboardId),16777216&o[0]&&(s.hash=t[141].hash),16777216&o[0]&&(s.songName=t[141].name),16777216&o[0]&&(s.songAuthorName=t[141].songAuthor),16777216&o[0]&&(s.levelAuthorName=t[141].levelAuthor),16777216&o[0]&&(s.diffInfo=t[141].diffInfo),150994944&o[0]&&(s.stars=t[27].find(tn)?t[141].stars:t[141].stars?0:null),150994944&o[0]&&(s.maxPp=t[27].find(nn)?t[141].maxPp:null),150994944&o[0]&&(s.duration=t[27].find(rn)?t[141].length:null),150994944&o[0]&&(s.bpm=t[27].find(an)?t[141].bpm:null),150994944&o[0]&&(s.njs=t[27].find(on)?t[141].njs:null),150994944&o[0]&&(s.nps=t[27].find(cn)?t[141].nps:null),1900085501&o[0]|35&o[1]|2048&o[5]&&(s.$$scope={dirty:o,ctx:t}),a.$set(s),(!i||16777216&o[0]&&c!==(c=Object(r.null_to_empty)("song-card column is-full is-half-tablet "+(t[24].series>1?"is-one-third-fullhd":"is-one-quarter-widescreen is-one-third-desktop")+" card-"+t[141].leaderboardId)+" svelte-189d5aq"))&&Object(r.attr)(n,"class",c),16777216&o[0]&&Object(r.toggle_class)(n,"full-width",!!t[141].leaderboardOpened)},i(e){i||(Object(r.transition_in)(a.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(n),Object(r.destroy_component)(a),s=!1,l()}}}function Ht(e){let t,n,a,o=e[36].songBrowser.transformingTheUniverse+"";return{c(){t=Object(r.element)("div"),n=Object(r.element)("h3"),a=Object(r.text)(o),Object(r.attr)(t,"class","info svelte-189d5aq")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(n,a)},p(e,t){32&t[1]&&o!==(o=e[36].songBrowser.transformingTheUniverse+"")&&Object(r.set_data)(a,o)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function Wt(e){let t,n,a,o;function c(t){e[89].call(null,t)}function i(t){e[90].call(null,t)}let s={totalItems:e[20],itemsPerPageValues:e[37],hide:e[17]};return void 0!==e[18]&&(s.currentPage=e[18]),void 0!==e[19]&&(s.itemsPerPage=e[19]),t=new I.default({props:s}),r.binding_callbacks.push(()=>Object(r.bind)(t,"currentPage",c)),r.binding_callbacks.push(()=>Object(r.bind)(t,"itemsPerPage",i)),t.$on("page-changed",e[58]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,n){Object(r.mount_component)(t,e,n),o=!0},p(e,o){const c={};1048576&o[0]&&(c.totalItems=e[20]),131072&o[0]&&(c.hide=e[17]),!n&&262144&o[0]&&(n=!0,c.currentPage=e[18],Object(r.add_flush_callback)(()=>n=!1)),!a&&524288&o[0]&&(a=!0,c.itemsPerPage=e[19],Object(r.add_flush_callback)(()=>a=!1)),t.$set(c)},i(e){o||(Object(r.transition_in)(t.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),o=!1},d(e){Object(r.destroy_component)(t,e)}}}function Zt(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O,j,m,g,h,y;a=new B.default({props:{iconFa:"fas fa-eye"+(e[5]||e[6]&&e[6].length?"-slash":""),title:e[5]||e[6]&&e[6].length?e[36].songBrowser.playlist.hideChecks:e[36].songBrowser.playlist.showChecks,label:e[6].length?e[6].length:"",disabled:e[6]&&e[6].length}}),a.$on("click",e[91]),c=new B.default({props:{iconFa:"fas fa-check",title:e[36].songBrowser.playlist.checkAll}}),c.$on("click",e[55]),s=new B.default({props:{iconFa:"far fa-file-alt",title:e[36].songBrowser.playlist.checkPage}}),s.$on("click",e[56]),d=new B.default({props:{iconFa:"fas fa-broom",title:e[36].songBrowser.playlist.clear,disabled:!e[6].length}}),d.$on("click",e[57]),p=new B.default({props:{label:e[36].songBrowser.playlist.label,iconFa:"fas fa-music",title:e[36].songBrowser.playlist.export,disabled:!e[6].length}}),p.$on("click",e[49]),O=new B.default({props:{label:e[36].songBrowser.csv.label,iconFa:"fas fa-download",title:e[36].songBrowser.csv.export}}),O.$on("click",e[48]),m=new B.default({props:{type:"default",title:e[36].beatSavior.avgStatsTooltip,$$slots:{default:[Kt]},$$scope:{ctx:e}}}),m.$on("click",e[47]);let v=e[12]&&Xt(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("span"),Object(r.create_component)(a.$$.fragment),o=Object(r.space)(),Object(r.create_component)(c.$$.fragment),i=Object(r.space)(),Object(r.create_component)(s.$$.fragment),l=Object(r.space)(),Object(r.create_component)(d.$$.fragment),u=Object(r.space)(),b=Object(r.element)("span"),Object(r.create_component)(p.$$.fragment),f=Object(r.space)(),Object(r.create_component)(O.$$.fragment),j=Object(r.space)(),Object(r.create_component)(m.$$.fragment),g=Object(r.space)(),v&&v.c(),h=Object(r.empty)(),Object(r.attr)(n,"class","button-group svelte-189d5aq"),Object(r.attr)(b,"class","button-group svelte-189d5aq"),Object(r.attr)(t,"class","actions svelte-189d5aq")},m(e,_){Object(r.insert)(e,t,_),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),Object(r.append)(n,o),Object(r.mount_component)(c,n,null),Object(r.append)(n,i),Object(r.mount_component)(s,n,null),Object(r.append)(n,l),Object(r.mount_component)(d,n,null),Object(r.append)(t,u),Object(r.append)(t,b),Object(r.mount_component)(p,b,null),Object(r.append)(b,f),Object(r.mount_component)(O,b,null),Object(r.append)(b,j),Object(r.mount_component)(m,b,null),Object(r.insert)(e,g,_),v&&v.m(e,_),Object(r.insert)(e,h,_),y=!0},p(e,t){const n={};96&t[0]&&(n.iconFa="fas fa-eye"+(e[5]||e[6]&&e[6].length?"-slash":"")),96&t[0]|32&t[1]&&(n.title=e[5]||e[6]&&e[6].length?e[36].songBrowser.playlist.hideChecks:e[36].songBrowser.playlist.showChecks),64&t[0]&&(n.label=e[6].length?e[6].length:""),64&t[0]&&(n.disabled=e[6]&&e[6].length),a.$set(n);const o={};32&t[1]&&(o.title=e[36].songBrowser.playlist.checkAll),c.$set(o);const i={};32&t[1]&&(i.title=e[36].songBrowser.playlist.checkPage),s.$set(i);const l={};32&t[1]&&(l.title=e[36].songBrowser.playlist.clear),64&t[0]&&(l.disabled=!e[6].length),d.$set(l);const u={};32&t[1]&&(u.label=e[36].songBrowser.playlist.label),32&t[1]&&(u.title=e[36].songBrowser.playlist.export),64&t[0]&&(u.disabled=!e[6].length),p.$set(u);const b={};32&t[1]&&(b.label=e[36].songBrowser.csv.label),32&t[1]&&(b.title=e[36].songBrowser.csv.export),O.$set(b);const f={};32&t[1]&&(f.title=e[36].beatSavior.avgStatsTooltip),32&t[1]|2048&t[5]&&(f.$$scope={dirty:t,ctx:e}),m.$set(f),e[12]?v?(v.p(e,t),4096&t[0]&&Object(r.transition_in)(v,1)):(v=Xt(e),v.c(),Object(r.transition_in)(v,1),v.m(h.parentNode,h)):v&&(Object(r.group_outros)(),Object(r.transition_out)(v,1,1,()=>{v=null}),Object(r.check_outros)())},i(e){y||(Object(r.transition_in)(a.$$.fragment,e),Object(r.transition_in)(c.$$.fragment,e),Object(r.transition_in)(s.$$.fragment,e),Object(r.transition_in)(d.$$.fragment,e),Object(r.transition_in)(p.$$.fragment,e),Object(r.transition_in)(O.$$.fragment,e),Object(r.transition_in)(m.$$.fragment,e),Object(r.transition_in)(v),y=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),Object(r.transition_out)(c.$$.fragment,e),Object(r.transition_out)(s.$$.fragment,e),Object(r.transition_out)(d.$$.fragment,e),Object(r.transition_out)(p.$$.fragment,e),Object(r.transition_out)(O.$$.fragment,e),Object(r.transition_out)(m.$$.fragment,e),Object(r.transition_out)(v),y=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a),Object(r.destroy_component)(c),Object(r.destroy_component)(s),Object(r.destroy_component)(d),Object(r.destroy_component)(p),Object(r.destroy_component)(O),Object(r.destroy_component)(m),e&&Object(r.detach)(g),v&&v.d(e),e&&Object(r.detach)(h)}}}function Kt(e){let t,n,a,o,c,i,s=e[36].beatSavior.avgStatsBtn+"";return n=new W.default({}),{c(){t=Object(r.element)("span"),Object(r.create_component)(n.$$.fragment),a=Object(r.space)(),o=Object(r.element)("span"),c=Object(r.text)(s),Object(r.attr)(t,"class","beat-savior-avg-stats-icon svelte-189d5aq"),Object(r.attr)(o,"class","beat-savior-avg-stats svelte-189d5aq")},m(e,s){Object(r.insert)(e,t,s),Object(r.mount_component)(n,t,null),Object(r.insert)(e,a,s),Object(r.insert)(e,o,s),Object(r.append)(o,c),i=!0},p(e,t){(!i||32&t[1])&&s!==(s=e[36].beatSavior.avgStatsBtn+"")&&Object(r.set_data)(c,s)},i(e){i||(Object(r.transition_in)(n.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),e&&Object(r.detach)(a),e&&Object(r.detach)(o)}}}function Xt(e){let t,n;return t=new Z.default({props:{closeable:!0,width:"35em",$$slots:{default:[Jt]},$$scope:{ctx:e}}}),t.$on("close",e[92]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};8192&n[0]|2048&n[5]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function Jt(e){let t,n,a,o,c,i,s,l=Object(v.trans)("beatSavior.avgStatsHeader",{num:e[13]&&e[13].total?e[13].total:0})+"";return i=new H.default({props:{data:e[13],showGrid:!0,showChart:!1,dataIsAvg:!0,switchable:!1}}),{c(){t=Object(r.element)("header"),n=Object(r.element)("div"),a=Object(r.text)(l),o=Object(r.space)(),c=Object(r.element)("main"),Object(r.create_component)(i.$$.fragment),Object(r.attr)(n,"class","menu-label"),Object(r.attr)(c,"class","beat-savior-avg-stats-modal svelte-189d5aq")},m(e,l){Object(r.insert)(e,t,l),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.insert)(e,o,l),Object(r.insert)(e,c,l),Object(r.mount_component)(i,c,null),s=!0},p(e,t){(!s||8192&t[0])&&l!==(l=Object(v.trans)("beatSavior.avgStatsHeader",{num:e[13]&&e[13].total?e[13].total:0})+"")&&Object(r.set_data)(a,l);const n={};8192&t[0]&&(n.data=e[13]),i.$set(n)},i(e){s||(Object(r.transition_in)(i.$$.fragment,e),s=!0)},o(e){Object(r.transition_out)(i.$$.fragment,e),s=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(o),e&&Object(r.detach)(c),Object(r.destroy_component)(i)}}}function Qt(e){let t,n,a=e[8]&&ue(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[8]?a?(a.p(e,n),256&n[0]&&Object(r.transition_in)(a,1)):(a=ue(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function Yt(e,t){return e[t]?e[t]:null}function Gt(e,t,n){return function(e,t){e.forEach(e=>{["bpm","njs","nps"].includes(e.key)&&(e.valueProps.suffix="compact"===t.id?" "+e.key.toUpperCase():"")})}(e,t),e.filter(e=>n===e.type)}function en(e,t=0){if(e){var n=e.getBoundingClientRect().top-t+window.pageYOffset;window.scrollTo({top:n,behavior:"smooth"})}}const tn=e=>"stars"===e.key,nn=e=>"maxPp"===e.key,rn=e=>"length"===e.key,an=e=>"bpm"===e.key,on=e=>"njs"===e.key,cn=e=>"nps"===e.key;function sn(e,t,P){let I;Object(r.component_subscribe)(e,v._,e=>P(36,I=e));const C=Object(a.createEventDispatcher)();let{playerId:T}=t,{snipedIds:A=[]}=t,{minPpPerMap:q=1}=t,{country:R}=t,{recentPlay:z=null}=t,{songType:E=null}=t,B="keep-view",D=null,L=0,N=[],F=!1,M=[],U=["bsr","bs","preview","twitch","oneclick"],V=!1,H=[],W=[],Z=0,K=100,X=null,J=null,Q=null,Y=!1,G=null,ee=!1,te={songTypes:[{id:"all",_key:"songBrowser.types.all"},{id:"rankeds",_key:"songBrowser.types.ranked_only"},{id:"unrankeds",_key:"songBrowser.types.unranked_only"},{id:"rankeds_unplayed",_key:"songBrowser.types.not_played_only"},{id:"what_to_play",_key:"profile.aside.whatToPlay"},{id:"sniper_mode",_key:"songBrowser.types.sniper_mode"}],countryRankOps:[{id:">",label:">"},{id:">=",label:">="},{id:"<=",label:"<="},{id:"<",label:"<"}],songTypeOptions:[{id:"all",_key:"songBrowser.typesOptions.all"},{id:"not_best",_key:"songBrowser.typesOptions.not_best"},{id:"best",_key:"songBrowser.typesOptions.best"}],viewTypes:[{id:"compact",_key:"songBrowser.viewTypes.compact"},{id:"tabular",_key:"songBrowser.viewTypes.tabular"},{id:"cards",_key:"songBrowser.viewTypes.cards"}],sortTypes:[{_key:"songBrowser.fields.timeset",field:"timeset"},{_key:"songBrowser.fields.stars",field:"stars"},{_key:"songBrowser.fields.pp",field:"pp"},{_key:"songBrowser.fields.acc",field:"acc"},{_key:"songBrowser.fields.rank",field:"rank"},{_key:"songBrowser.fields.diffPp",field:"diffPp"},{_key:"songBrowser.fields.diffPp",field:"bestDiffPp"},{_key:"songBrowser.fields.estimatedAcc",field:"estimatedAcc"},{_key:"songBrowser.fields.estimatedPp",field:"estimatedPp"}],sortOrders:[{_key:"songBrowser.sort.descending",order:"desc"},{_key:"songBrowser.sort.ascending",order:"asc"}],columns:[{_key:"songBrowser.fields.stars",_keyName:"songBrowser.fields.starsShort",name:"*",key:"stars",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:"*"}},{_key:"songBrowser.fields.maxPp",_keyName:"songBrowser.fields.maxPpShort",name:"Max PP",key:"maxPp",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:"pp"}},{_key:"songBrowser.fields.bpm",_keyName:"songBrowser.fields.bpmShort",name:"BPM",key:"bpm",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:"",digits:0}},{_key:"songBrowser.fields.njs",_keyName:"songBrowser.fields.njsShort",name:"NJS",key:"njs",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:"",digits:0}},{_key:"songBrowser.fields.nps",_keyName:"songBrowser.fields.npsShort",name:"NPS",key:"nps",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-",suffix:""}},{_key:"songBrowser.fields.duration",_keyName:"songBrowser.fields.durationShort",name:"Czas",key:"length",selected:!1,type:"song",displayed:!0,valueProps:{zero:"-"}},{_key:"songBrowser.fields.estimatedPp",_keyName:"songBrowser.fields.estimatedPpShort",_keyCompactLabel:"songBrowser.estimatedShort",name:"PP",key:"estimatedPp",selected:!0,type:"series",valueProps:{zero:"-",suffix:"pp"},displayed:!1},{_key:"songBrowser.fields.estimatedAcc",_keyName:"songBrowser.fields.estimatedAccShort",_keyCompactLabel:"songBrowser.estimatedShort",compactLabel:null,name:"Est. Acc",key:"estimatedAcc",selected:!0,type:"series",displayed:!1,valueProps:{zero:"-",suffix:"%"}},{_key:"songBrowser.fields.diffPp",_keyName:"songBrowser.fields.diffPpShort",compactLabel:null,name:"+PP",key:"diffPp",selected:!1,type:"series",displayed:!1,valueProps:{zero:"-",suffix:"pp global",withSign:!0,useColorsForValue:!0}},{_key:"songBrowser.fields.timeset",_keyName:"songBrowser.fields.timesetShort",compactLabel:null,name:"Data",key:"timeset",selected:!0,type:"series",displayed:!0,valueProps:{prevValue:null}},{_key:"songBrowser.fields.rank",_keyName:"songBrowser.fields.rankShort",compactLabel:null,name:"Rank",key:"rank",selected:!0,type:"series",displayed:!0},{_key:"songBrowser.fields.pp",_keyName:"songBrowser.fields.ppShort",name:"PP",key:"pp",selected:!0,type:"series",valueProps:{zero:"-",suffix:"pp"},displayed:!0},{_key:"songBrowser.fields.weightedPp",_keyName:"songBrowser.fields.weightedPpShort",_keyCompactLabel:"songBrowser.fields.weighted",compactLabel:"Waż.",name:"wPP",key:"weightedPp",selected:!1,type:"series",displayed:!0,valueProps:{zero:"-",suffix:"pp"}},{_key:"songBrowser.fields.acc",_keyName:"songBrowser.fields.accShort",compactLabel:null,name:"Acc",key:"acc",selected:!0,type:"series",displayed:!0,valueProps:{zero:"-",suffix:"%"}},{_key:"songBrowser.fields.score",_keyName:"songBrowser.fields.scoreShort",compactLabel:null,name:"Wynik",key:"score",selected:!0,type:"series",displayed:!0,valueProps:{digits:0,zero:"-"}},{_key:"songBrowser.fields.beatSaviorAcc",_keyName:"songBrowser.fields.beatSaviorAccShort",compactLabel:null,name:"Beat Savior Acc",key:"beatSaviorAcc",selected:!0,type:"series",displayed:!0,valueProps:{zero:"-"}},{_key:"songBrowser.fields.beatSaviorStats",_keyName:"songBrowser.fields.beatSaviorStatsShort",compactLabel:null,name:"Beat Savior Stats",key:"beatSaviorStats",selected:!0,type:"series",displayed:!0,valueProps:{zero:"-"}},{_key:"songBrowser.fields.diff",_keyName:"songBrowser.fields.diffShort",name:"Różnice",key:"diff",selected:!0,type:"other",displayed:!0},{_key:"songBrowser.fields.icons",name:"",key:"icons",type:"additional",displayed:!0,selected:!0}],icons:[{_key:"songBrowser.icons.bsr",id:"bsr"},{_key:"songBrowser.icons.beatsaver",id:"bs"},{_key:"songBrowser.icons.oneclick",id:"oneclick"},{_key:"songBrowser.icons.preview",id:"preview"},{_key:"songBrowser.icons.twitch",id:"twitch"}]};const ne=(e,t,n="key")=>e.find(e=>e[n]&&e[n]===t);let re=[{...ne(te.sortTypes,"timeset","field"),type:"series",subtype:0,field:"timeset",enabled:!0}],ae={songType:E?te.songTypes.find(e=>e.id===E):te.songTypes[0],songTypeOption:te.songTypeOptions[0],name:"",starsFilter:{from:0,to:K},minPpDiff:1,sortBy:re[0],sortOrder:te.sortOrders[0],countryRankOp:te.countryRankOps.find(e=>">="===e.id),countryRankVal:1};const oe=()=>[T].concat(A),ce=async()=>{const e=oe(),t=await Promise.all(e.map(async e=>Object(p.getScoresByPlayerId)(e)));return e.reduce((e,n,r)=>(e[n]=Object(d.convertArrayToObjectByKey)(t[r],"leaderboardId"),e),{})},ie=async(e=!0)=>{const t=oe(),n=(await Promise.all(t.map(async e=>Object(p.getPlayerInfo)(e)))).filter(e=>e);if(e){const e=await ce();return n.map(t=>({...t,scores:e[t.id]?e[t.id]:{}}))}return n},se=async()=>{const e=await ie(),t=await _.default.getProfileByPlayerId(T),n=t&&t.lastUpdated?Object(l.timestampFromString)(t.lastUpdated):"",r=e.map(e=>e.id+":"+(e.recentPlay?Object(l.timestampFromString)(e.recentPlay):"null")).join(":")+":"+n+":"+ae.countryRankVal+":"+ae.countryRankOp.id+":"+ae.minPpDiff+":"+ae.name+":"+ae.songType.id+":"+ae.songTypeOption.id+":"+ae.sortBy.field+":"+ae.sortBy.type+":"+ae.sortBy.subtype+":"+ae.sortOrder.order+":"+ae.starsFilter.from+":"+ae.starsFilter.to;L!==r&&P(95,L=r)},le=async e=>{let t=[];["sniper_mode","what_to_play"].includes(ae.songType.id)&&t.push({...ne(te.sortTypes,"bestDiffPp","field"),type:"song",subtype:null,field:"bestDiffPp",enabled:!0}),"what_to_play"===ae.songType.id&&(t.push({...ne(te.sortTypes,"estimatedAcc","field"),type:"series",subtype:0,field:"estimatedAcc",enabled:!0}),t.push({...ne(te.sortTypes,"estimatedPp","field"),type:"series",subtype:0,field:"estimatedPp",enabled:!0})),"unrankeds"!==ae.songType.id&&t.push({...ne(te.sortTypes,"stars","field"),type:"song",subtype:null,field:"stars",enabled:!0});const n=oe(),r=await ie(!1);r.length&&r.forEach((e,r)=>{const a=e?e.name:null;if(a){const o=[];[{...ne(te.sortTypes,"timeset","field"),field:"timeset",enabled:e.id!==T||"rankeds_unplayed"!==ae.songType.id},{...ne(te.sortTypes,"diffPp","field"),field:"diffPp",enabled:["sniper_mode","what_to_play"].includes(ae.songType.id)&&0!==r},{...ne(te.sortTypes,"pp","field"),field:"pp",enabled:!["rankeds_unplayed","unrankeds"].includes(ae.songType.id)},{...ne(te.sortTypes,"acc","field"),field:"acc",enabled:["rankeds","sniper_mode"].includes(ae.songType.id)},{...ne(te.sortTypes,"rank","field"),field:"rank",enabled:!["rankeds_unplayed","what_to_play"].includes(ae.songType.id)}].forEach(e=>{e.enabled&&o.push({_key:e._key,label:e.label,type:"series",subtype:r,field:e.field,enabled:!0})}),o.length&&(n.length>1&&t.push({label:a,type:"label"}),t=t.concat(o))}}),P(15,re=t);const a=await Object(h.getConfig)("songBrowser"),o=["sniper_mode","what_to_play"].includes(ae.songType.id)?"bestDiffPp":a.defaultSort?a.defaultSort:"timeset",c=re.find(e=>e.field===o);P(16,ae.sortBy=c||t[0],ae),await se()};let de={};const ue=Object(g.default)(async(e,t=q,n=95)=>{const r=(await(async(e,t=!0)=>t?await Object(p.getRankedScoresByPlayerId)(e):await Object(p.getScoresByPlayerId)())(e,!0)).sort((e,t)=>t.pp-e.pp).map(e=>e.pp);return Object(c.findRawPp)(r,t)/c.PP_PER_STAR/Object(c.ppFactorFromAcc)(n)});let be=!0,pe=0,fe=10,Oe=0;N=te.columns.filter(e=>e.selected&&e.displayed);let je=te.viewTypes[0],me=[],ge=!1;async function he(){const e=await Object(h.getConfig)("others");B=e.viewUpdates?e.viewUpdates:"keep-view"}async function ye(){de=await Object(i.getRankedSongs)(),P(10,K=Object.values(de).map(e=>e.stars).reduce((e,t)=>t>e?t:e,0)),J=null}Object(a.onMount)(async()=>{T||P(0,T=await Object(h.getMainPlayerId)()),R||P(2,R=await Object(y.getActiveCountry)());const e=await Object(p.getPlayerInfo)(T);e&&P(23,ge=Object(p.isCountryPlayer)(e,R));const t=await Object(h.getConfig)("songBrowser");if(!A||!A.length){H=await Object(p.getCountryRanking)(R);const e=H.find(e=>e.id===T);e&&e.ssplCountryRank&&e.ssplCountryRank[R]&&(e.ssplCountryRank[R]>1&&W.push(H[e.ssplCountryRank[R]-1-1].id),e.ssplCountryRank[R]<H.length&&W.push(H[e.ssplCountryRank[R]+1-1].id)),t.compareTo&&Array.isArray(t.compareTo)&&P(1,A=[...t.compareTo])}if(await ye(),P(16,ae.starsFilter=Object.assign({},ae.starsFilter,{to:K}),ae),P(9,Z=await ue(T,q)),X=Object(w.default)(),P(7,U=t&&t.showIcons?t.showIcons:U),t.defaultView){const e=te.viewTypes.find(e=>e.id===t.defaultView);e&&P(21,je=e)}if(t.defaultType&&!E){const e=te.songTypes.find(e=>e.id===t.defaultType);e&&P(16,ae.songType=e,ae)}t.showColumns&&P(4,N=te.columns.filter(e=>t.showColumns.includes(e.key)&&e.displayed)),t.itemsPerPage&&P(19,fe=t.itemsPerPage),await Pe(),P(22,me=(await Object(p.getAllActivePlayers)(R)).reduce((e,t)=>{if(t&&t.name){let{id:n,name:r,avatar:a}=t;e.push({id:n,label:r,avatar:a})}return e},[]).sort((e,t)=>e.label.toLowerCase().replace(/[^a-zAZ]/g,"").localeCompare(t.label.toLowerCase().replace(/[^a-zAZ]/g,""))).filter(e=>e.id!==T)),await he();const n=b.default.on("player-scores-updated",async({playerId:e})=>{e&&oe().includes(e)&&(J=null,await se())}),r=b.default.on("player-beat-savior-updated",async({playerId:e})=>{e&&oe().includes(e)&&(J=null,await se())}),a=b.default.on("rankeds-changed",async()=>await ye()),o=b.default.on("sspl-country-ranks-cache-updated",({ssplCountryRanks:e})=>{e&&Se&&Se.songs&&Se.series&&Se.series.length&&(Se.songs.forEach(t=>{e[t.leaderboardId]&&Se.series.forEach(n=>{n.scores&&n.scores[t.leaderboardId]&&e[t.leaderboardId][n.id]&&(n.scores[t.leaderboardId].ssplCountryRank=e[t.leaderboardId][n.id])})}),P(24,Se))}),c=b.default.on("config-changed",he),i=b.default.on("player-twitch-videos-updated",async({playerId:e})=>{e&&oe().includes(e)&&await se()});return P(8,V=!0),()=>{n(),a(),o(),c(),i(),r()}});const ve=Object(g.default)(c.getTotalPlayerPp),_e=Object(g.default)(async(e,t)=>await ve(e,t)-await ve(e)),we=(e,t)=>t&&t.scores&&t.scores[e]?t.scores[e]:null;async function ke(e,t="bestRealPp"){const n=Object(d.convertArrayToObjectByKey)(e.filter(e=>e[t]).map(e=>({leaderboardId:e.leaderboardId,pp:e[t]})),"leaderboardId");return await ve(T,n)}const $e=(e,t,n=!1)=>!(we(e,t)&&we(e,t).best||n&&!we(e,t));function xe(e){P(24,Se=e)}let Se={songs:[],series:[]};async function Pe(){switch(ae.songType.id){case"unrankeds":ne(te.columns,"pp").displayed=!1,ne(te.columns,"weightedPp").displayed=!1,ne(te.columns,"diffPp").displayed=!1,ne(te.columns,"estimatedAcc").displayed=!1,ne(te.columns,"estimatedPp").displayed=!1,P(4,N=te.columns.filter(e=>e.displayed&&N.includes(e))),await le();break;case"all":ne(te.columns,"pp").displayed=!0,ne(te.columns,"weightedPp").displayed=!0,ne(te.columns,"diffPp").displayed=!1,ne(te.columns,"estimatedAcc").displayed=!1,ne(te.columns,"estimatedPp").displayed=!1,P(4,N=te.columns.filter(e=>e.displayed&&N.includes(e))),P(16,ae.starsFilter.from=0,ae),await le();break;case"sniper_mode":ne(te.columns,"pp").displayed=!0,ne(te.columns,"weightedPp").displayed=!0,ne(te.columns,"diffPp").displayed=!0,ne(te.columns,"estimatedAcc").displayed=!1,ne(te.columns,"estimatedPp").displayed=!1,P(4,N=te.columns.filter(e=>e.displayed&&(N.includes(e)||["diffPp","pp"].includes(e.key)))),P(16,ae.starsFilter.from=ae.starsFilter.from>Z?ae.starsFilter.from:Object(m.round)(Z,1),ae),A.length||P(1,A=[...W]),await le();break;case"what_to_play":ne(te.columns,"pp").displayed=!0,ne(te.columns,"weightedPp").displayed=!0,ne(te.columns,"diffPp").displayed=!0,ne(te.columns,"estimatedAcc").displayed=!0,ne(te.columns,"estimatedPp").displayed=!0,P(4,N=te.columns.filter(e=>e.displayed&&(N.includes(e)||["pp","diffPp","estimatedAcc","estimatedPp"].includes(e.key)))),P(16,ae.starsFilter.from=0,ae),await le();break;case"rankeds":default:ne(te.columns,"pp").displayed=!0,ne(te.columns,"weightedPp").displayed=!0,ne(te.columns,"diffPp").displayed=!1,ne(te.columns,"estimatedAcc").displayed=!1,ne(te.columns,"estimatedPp").displayed=!1,P(4,N=te.columns.filter(e=>e.displayed&&(N.includes(e)||["pp"].includes(e.key)))),P(16,ae.starsFilter.from=0,ae),await le()}P(18,pe=0),P(14,te.columns=te.columns.splice(0),te),ae.songType&&C("song-type-changed",ae.songType.id)}const Ie=Object(u.default)(e=>{P(16,ae.name=e.target.value,ae),se()},400),Ce=Object(u.default)(e=>{P(16,ae.starsFilter=Object.assign({},ae.starsFilter),ae),se()},400),Te=Object(u.default)(e=>{P(16,ae.countryRankVal=e.target.value,ae),se()},400),Ae=Object(u.default)(e=>{P(16,ae.minPpDiff=e.detail,ae),se()},800),qe=(e,t,n)=>{switch(n.sortBy.type){case"song":return e[n.sortBy.field];case"series":default:const r=n.sortBy.subtype,a=n.sortBy.field;return t[r]&&t[r].scores&&t[r].scores[e.leaderboardId]?t[r].scores[e.leaderboardId][a]:null}};async function Re(){return(["rankeds_unplayed","what_to_play"].includes(ae.songType.id)?Object.values(de):Object.values(Object.values(await ce()).reduce((e,t)=>({...e,...t}),{}))).filter(e=>!M||!M.length||M.includes(e.leaderboardId))}let ze,Ee,Be,De,Le,Ne,Fe,Me,Ue,Ve,He,We=!1;async function Ze(e,t){A[t-1]&&(P(1,A[t-1]=e.detail.value.id,A),await le(),P(25,We=!0))}async function Ke(e){A[e-1]&&(P(1,A=A.filter((t,n)=>n!==e-1)),await le(),P(25,We=!0))}function Xe(e){P(6,M=Object(d.arrayUnique)(M.concat(e)))}async function Je(e,t=0){await Object(a.tick)();const n=document.querySelector(e);n&&en(n,60+t)}function Qe(e){C("browser-type-changed",e)}return e.$$set=e=>{"playerId"in e&&P(0,T=e.playerId),"snipedIds"in e&&P(1,A=e.snipedIds),"minPpPerMap"in e&&P(61,q=e.minPpPerMap),"country"in e&&P(2,R=e.country),"recentPlay"in e&&P(3,z=e.recentPlay),"songType"in e&&P(62,E=e.songType)},e.$$.update=()=>{16384&e.$$.dirty[0]&&P(26,ze=te.columns.filter(e=>e.displayed)),2097168&e.$$.dirty[0]&&P(27,Ee=Gt(N,je,"song")),2097168&e.$$.dirty[0]&&P(28,Be=Gt(N,je,"series")),268435456&e.$$.dirty[0]&&P(29,De=Be.map(e=>e.key).includes("beatSaviorAcc")),268435456&e.$$.dirty[0]&&P(30,Le=Be.map(e=>e.key).includes("beatSaviorStats")),1610612736&e.$$.dirty[0]&&P(31,Ne=De||Le),2097168&e.$$.dirty[0]&&P(32,Fe=Gt(N,je,"additional")),65552&e.$$.dirty[0]&&P(33,Me=!!ne(N,"diffPp")&&"sniper_mode"===ae.songType.id),256&e.$$.dirty[0]|4&e.$$.dirty[3]&&P(101,Ue=V?async function(e){P(17,be=!0),P(18,pe=0),await Object(s.delay)(0);try{const e={},t=await ie(!0);if(!t.length)return;const n=await Object($.getSsplCountryRanks)(),r=await Promise.all(t.map(async t=>{const{scores:r,stats:a,weeklyDiff:o,url:i,lastUpdated:s,userHistory:u,...b}=t,p="sniper_mode"===ae.songType.id;return b.prevTotalPp=p?await ve(T):null,b.totalPp=b.prevTotalPp,e[t.id]||(e[t.id]=Object.values(r).filter(e=>e.pp>0).sort((e,t)=>t.pp-e.pp)),Object.assign({},b,{lastUpdated:s?Object(l.dateFromString)(s):null,scores:Object(d.convertArrayToObjectByKey)(Object.values(r).map(t=>{const{id:r,name:a,songAuthorName:o,levelAuthorName:i,diff:s,maxScoreEx:d,playerId:u,...p}=t;return p.timeset=Object(l.dateFromString)(t.timeset),p.ssplCountryRank=n[p.leaderboardId]&&n[p.leaderboardId][b.id]?n[p.leaderboardId][b.id]:null,p.countryRank=R&&p.ssplCountryRank&&p.ssplCountryRank[R]?p.ssplCountryRank[R].rank:null,p.pp>0&&!p.weightedPp&&(p.weightedPp=Object(c.getWeightedPp)(e[u],t.leaderboardId,!0),t.weightedPp=p.weightedPp),p}),"leaderboardId")})})),a=await Promise.all(Object.values(t.reduce((e,t)=>Object.assign({},e,t.scores),{})).map(async e=>{const t=e.maxScoreEx?e.maxScoreEx:null;return{leaderboardId:e.leaderboardId,hash:e.hash,name:e.name.trim(),songAuthor:e.songAuthorName,levelAuthor:e.levelAuthorName,diffInfo:e.diffInfo,stars:e.stars?e.stars:null,oldStars:null,maxScoreEx:t}})),o=Object(d.convertArrayToObjectByKey)(a,"leaderboardId");i.RANKED.forEach(e=>{o[e]&&(de={...de,[e]:{...o[e],stars:.01}})}),i.UNRANKED.forEach(e=>{delete de[e]});let s=[];switch(ae.songType.id){case"sniper_mode":s=Object.values(Object.assign(Object(d.convertArrayToObjectByKey)(a,"leaderboardId"),de));break;case"what_to_play":if(X&&(!J&&r.length&&(X.init(Object.values(r[0].scores),de),J=X.estimate()),J&&J.scores&&J.scores.length&&r.length)){const e=J.scores.filter(e=>!e.pp||e.pp<e.estimatedPp);s=e.map(e=>({...e,...de[e.leaderboardId]?de[e.leaderboardId]:{}})),e.forEach(e=>{const t=r[0].scores[e.leaderboardId];t?(t.estimatedAcc=e.estimatedAcc,t.estimatedPp=e.estimatedPp,t.diffPp=e.ppDiff):r[0].scores[e.leaderboardId]=e})}break;case"rankeds_unplayed":s=Object.values(de).filter(e=>!r[0].scores[e.leaderboardId]);break;default:s=a.map(e=>de[e.leaderboardId]&&!e.stars?Object.assign({},e,{stars:de[e.leaderboardId].stars}):e)}const u=(await Promise.all(s.filter(e=>{return(!ae.name.length||(t=e,!(n=ae.name).length||(t.name+" "+t.songAuthor+" "+t.levelAuthor).toLowerCase().includes(n.toLowerCase())))&&(!e.stars&&["unrankeds","all"].includes(ae.songType.id)||"unrankeds"!==ae.songType.id&&((e,t,n=null)=>e.stars&&e.stars>=t&&(!n||e.stars<=n))(e,ae.starsFilter.from,ae.starsFilter.to));var t,n}).map(async e=>{e.bestIdx=null,e.bestRealIdx=null,e.bestAcc=0,e.bestRealAcc=0,e.bestScore=0,e.bestRealScore=0,e.bestPp=0,e.bestRealPp=0,e.bestDiffPp=0,e.bestRealDiffPp=0;for(let t=0;t<r.length;t++){const n=r[t];if(n.scores[e.leaderboardId]){const a=o[e.leaderboardId],c=a&&a.maxScoreEx?a.maxScoreEx:null;if(n.scores[e.leaderboardId].acc=Object(f.getAccFromScore)({...n.scores[e.leaderboardId],maxScoreEx:c}),n.scores[e.leaderboardId].diffPp=null,0===t){const t=await Object(p.getPlayerSongScoreHistory)(n.scores[e.leaderboardId],c);t&&t.length&&(n.prevLabel=Object(v.trans)("songBrowser.former"),["pp","score","uScore"].forEach(r=>{n.scores[e.leaderboardId]["prev"+Object(d.capitalize)(r)]=t[0][r]}),n.scores[e.leaderboardId].prevTimeset=new Date(t[0].timestamp),n.scores[e.leaderboardId].prevAcc=Object(f.getAccFromScore)({maxScoreEx:c,score:n.scores[e.leaderboardId].prevScore,uScore:n.scores[e.leaderboardId].prevUScore}))}if(t>0){n.prevLabel=r[0].name;const t=r[0].scores[e.leaderboardId];["acc","pp","score","timeset","uScore"].forEach(r=>{n.scores[e.leaderboardId]["prev"+Object(d.capitalize)(r)]=t?t[r]:null})}}}const{bestIdx:t,playedByCnt:n}=((e,t,n="score")=>{let r=null,a=null,o=0;return e.forEach((e,c)=>{const i=e.scores[t]&&e.scores[t][n]?e.scores[t][n]:null;i&&(o++,(!a||i>a)&&(a=i,r=c))}),{bestIdx:r,bestValue:a,playedByCnt:o}})(r,e.leaderboardId,"score");if(e.playedByCnt=n,null!==t){const a=r[t].scores[e.leaderboardId];a&&(a.best=!0,a.playedByCnt=n,e.bestIdx=t,e.bestAcc=a.acc,e.bestScore=a.score,e.bestPp=a.pp,e.bestDiffPp=a.diffPp,e.bestRealIdx=t,e.bestRealAcc=a.acc,e.bestRealScore=a.score,e.bestRealPp=a.pp,e.bestRealDiffPp=a.diffPp)}if("sniper_mode"===ae.songType.id){for(const t in r){if(r[0].scores[e.leaderboardId]&&r[0].scores[e.leaderboardId].best)continue;const n=r[t];n.scores[e.leaderboardId]&&(n.scores[e.leaderboardId].diffPp=n.scores[e.leaderboardId].pp>0&&0!==t?await _e(r[0].id,{[e.leaderboardId]:{pp:n.scores[e.leaderboardId].pp}}):null)}e.bestIdx&&(e.bestDiffPp=r[e.bestIdx].scores[e.leaderboardId].diffPp),e.bestRealIdx&&(e.bestRealDiffPp=r[e.bestRealIdx].scores[e.leaderboardId].diffPp)}return"what_to_play"===ae.songType.id&&(e.bestDiffPp=e.ppDiff,r.length&&(r[0].scores[e.leaderboardId].diffPp=e.ppDiff)),e}))).filter(e=>{return("sniper_mode"===ae.songType.id&&$e(e.leaderboardId,r[0])&&((e,t=1)=>e.bestDiffPp&&e.bestDiffPp>t)(e,ae.minPpDiff)||"sniper_mode"!==ae.songType.id&&(!A||!A.length)||"sniper_mode"!==ae.songType.id&&("all"===ae.songTypeOption.id||"not_best"===ae.songTypeOption.id&&$e(e.leaderboardId,r[0],!0)&&e.playedByCnt>=2||"best"===ae.songTypeOption.id&&(t=e.leaderboardId,n=r[0],we(t,n)&&!!we(t,n).best)&&e.playedByCnt>=2))&&(!ge||["rankeds_unplayed","what_to_play"].includes(ae.songType.id)||((e,t,n,r=">=")=>{const a=we(e,t);if(!a||!a.countryRank)return!0;const o=a.countryRank;switch(r){case">":return o>n;case"<":return o<n;case"<=":return o<=n;case">=":default:return o>=n}})(e.leaderboardId,r[0],ae.countryRankVal,ae.countryRankOp.id));var t,n}).sort((e,t)=>{let n=qe(e,r,ae),a=qe(t,r,ae);return n||(n=null),a||(a=null),"asc"===ae.sortOrder.order?n-a:a-n});let b=r[0].totalPp,O=r[0].totalPp;if("sniper_mode"===ae.songType.id){const e=u.map(e=>e.leaderboardId);for(const t of r){const n=Object(d.convertArrayToObjectByKey)(Object.values(t.scores).filter(t=>e.includes(t.leaderboardId)&&(!r[0].scores[t.leaderboardId]||t.pp>r[0].scores[t.leaderboardId].pp)).map(e=>({leaderboardId:e.leaderboardId,pp:e.pp})),"leaderboardId");t.totalPp=await ve(T,n)}A.length>=1&&(b=1===A.length?r[1].totalPp:await ke(u,"bestRealPp"),O=1===A.length?r[1].totalPp:await ke(u,"bestPp"))}return P(17,be=!1),{songs:u,series:r,bestTotalRealPp:b,bestTotalPp:O}}catch(e){o.default.error(e)}}():null),786432&e.$$.dirty[0]|256&e.$$.dirty[3]&&P(34,Ve=async function(e,t,n){xe({songs:[],series:[]});const r=await e;if(!r)return;P(20,Oe=r.songs.length);const a=Object.assign({},r,{songs:r.songs.slice(t*n,(t+1)*n),total:Oe}),o=[];function i(e,t){for(const n in t){const r=t[n];if(r.scores[e.leaderboardId]&&e.maxScoreEx){const t=e.maxScoreEx;r.scores[e.leaderboardId].acc=Object(f.getAccFromScore)({...r.scores[e.leaderboardId],maxScoreEx:t}),r.scores[e.leaderboardId].prevAcc=Object(f.getAccFromScore)({maxScoreEx:t,score:r.scores[e.leaderboardId].prevScore,uScore:r.scores[e.leaderboardId].prevUScore})}}}async function s(e,t,n){const r=await _.default.getProfileByPlayerId(e);if(r&&r.videos){const e=Object(l.addToDate)(t,1e3*-n),a=r.videos.map(e=>Object.assign({},e,{created_at:Object(l.dateFromString)(e.created_at),ended_at:Object(l.addToDate)(Object(l.dateFromString)(e.created_at),Object(l.durationToMillis)(e.duration))})).find(t=>t.created_at<=e&&e<t.ended_at);return a?Object.assign({},a,{url:a.url+"?t="+Object(l.millisToDuration)(e-a.created_at)}):null}}for(const e in a.songs){const n=a.songs[e],r=a.series[0]&&a.series[0].scores&&a.series[0].scores[n.leaderboardId]?a.series[0].scores[n.leaderboardId]:null,l=a.series[0].id;if(r&&l)if(r.beatSavior)n.bsExistsForPlayer=a.series[0].id;else if(r.hash&&r.diffInfo&&r.diffInfo.diff){const e=l+"_"+r.hash+"_"+r.diffInfo.diff.toLowerCase();Object(S.default)().getFromIndex("beat-savior-songId",e).then(e=>{e&&(n.bsExistsForPlayer=l)})}if(n.maxPp=n.stars*c.PP_PER_STAR*Object(c.ppFactorFromAcc)(100),!n.maxScoreEx||!n.bpm)try{const e=await Object(f.getSongDiffInfo)(n.hash,n.diffInfo,n.leaderboardId,!0);if(e){if(n.maxScoreEx=e.maxScore,n.bpm=e.bpm,n.njs=e.njs,n.nps=e.notes&&e.seconds?e.notes/e.seconds:null,n.length=e.seconds,n.key=e.key,a.series[0]&&a.series[0].scores&&a.series[0].scores[n.leaderboardId]){const t=await s(a.series[0].id,a.series[0].scores[n.leaderboardId].timeset,e.seconds);t&&(n.video=t)}}else o.push({promise:Object(f.getSongDiffInfo)(n.hash,n.diffInfo,n.leaderboardId,!1),song:n,current:t})}catch(e){}i(n,a.series)}o.length&&Promise.allSettled(o.map(e=>e.promise)).then(e=>Promise.all(e.map(async(e,t)=>{if("fulfilled"===e.status){const n=e.value,r=o[t].song;if(n){if(r.maxScoreEx=n.maxScore,r.bpm=n.bpm,r.njs=n.njs,r.nps=n.notes&&n.seconds?n.notes/n.seconds:null,r.length=n.seconds,r.key=n.key,a.series[0]&&a.series[0].scores&&a.series[0].scores[r.leaderboardId]){const e=await s(a.series[0].id,a.series[0].scores[r.leaderboardId].timeset,n.seconds);e&&(r.video=e)}i(r,a.series)}}}))).then(e=>{o.length&&o[0].current===pe&&xe(a)});try{const e=a.series&&a.series.length?a.songs.reduce((e,t)=>{if(a.series[0].scores&&a.series[0].scores[t.leaderboardId]){const n=a.series[0].scores[t.leaderboardId].lastUpdated,r=a.series[0].scores[t.leaderboardId].timeset,o=Object(l.dateFromString)(n||r),c=(new Date-Object(l.dateFromString)(r))/6e4;(new Date-Object(l.dateFromString)(o))/6e4>60&&c<10080&&e.push(t.leaderboardId)}return e},[]):[];if(e.length){const t=new Date(Math.max(a.series[0].recentPlay,z));Object(k.refreshPlayerScoreRank)(a.series[0].id,e,t).then(e=>{})}}catch(e){}return xe(a),a}(Ue,pe,fe)),4194306&e.$$.dirty[0]&&P(35,He=me.length&&A.length<3),4&e.$$.dirty[3]&&async function(){if(D){const e=D,t=await Ue;if(!t)return;switch(B){case"keep-view":const n=t.songs.findIndex(n=>"asc"===ae.sortOrder.order?qe(n,t.series,ae)>=e:qe(n,t.series,ae)<=e),r=n>=0?Math.floor(n/fe):0;r!==pe&&P(18,pe=r);break;case"always":default:0!==pe&&P(18,pe=0)}}}(),32&e.$$.dirty[1]&&(Object.keys(te).forEach(e=>{te[e].forEach(t=>{switch(e){case"columns":t._keyName&&(t.name=Object(v.trans)(t._keyName)),t._keyCompactLabel&&(t.compactLabel=Object(v.trans)(t._keyCompactLabel))}t._key&&(t.label=Object(v.trans)(t._key))})}),re.forEach(e=>{e._key&&(e.label=Object(v.trans)(e._key))}),P(15,re=[...re]),P(14,te={...te}),P(16,ae=Object.assign({},ae))),1&e.$$.dirty[2]&&async function(e){e&&ae.songType&&ae.songType.id!==e&&(P(16,ae.songType=te.songTypes.find(t=>t.id===e),ae),await Object(a.tick)(),await Pe())}(E)},[T,A,R,z,N,F,M,U,V,Z,K,Q,Y,G,te,re,ae,be,pe,fe,Oe,je,me,ge,Se,We,ze,Ee,Be,De,Le,Ne,Fe,Me,Ve,He,I,[5,8,10,12,15,20,24,25,48,50],ne,se,function(e,t,n,r=!1){const a=r?"prev"+Object(d.capitalize)(n):n,o=e.scores&&e.scores[t.leaderboardId]?e.scores[t.leaderboardId]:null;if(!o)return null;switch(n){case"beatSaviorAcc":return o.beatSavior?Object(x.getAccTooltipFromTrackers)(o.beatSavior.trackers,["accLeft","accRight"],"<br />"):null;case"beatSaviorStats":return o.beatSavior?Object(x.getAccTooltipFromTrackers)(o.beatSavior.trackers,["maxCombo","nbOfPause","miss","bombHit","nbOfWallHit"],"<br />"):null;default:return o&&o[a]?o[a]:null}},Pe,Ie,Ce,Te,e=>{["ArrowUp","ArrowDown","Tab","F5"].includes(e.key)||e.preventDefault()},Ae,async function(){const e=(await Re()).filter(e=>e.beatSavior).reduce((e,t)=>{const n=Object(x.extractBeatSaviorTrackersData)(t.beatSavior.trackers,!1);return n?(e.total++,["left","right"].forEach(t=>{const r=t[0].toUpperCase()+t.substr(1),a="total"+r,o="acc"+r,c=t+"AverageCut";Number.isFinite(n[o])&&(e[a]++,e[o]+=n[o],n[c]&&Array.isArray(n[c])&&n[c].forEach((t,n)=>e[c][n]+=Number.isFinite(t)?t:0))}),n.gridAcc&&Array.isArray(n.gridAcc)&&n.gridAcc.forEach((t,n)=>{Number.isFinite(t)&&(e.gridAcc[n]+=t,e.totalGridAcc[n]++)}),e.fc+=n.fc?1:0,e.miss+=Number.isFinite(n.miss)?n.miss:0,e.nbOfPause+=Number.isFinite(n.nbOfPause)?n.nbOfPause:0,e.bombHit+=Number.isFinite(n.bombHit)?n.bombHit:0,e.nbOfWallHit+=Number.isFinite(n.nbOfWallHit)?n.nbOfWallHit:0,t.beatSavior.saberAColor&&(e.saberAColor=t.beatSavior.saberAColor),t.beatSavior.saberBColor&&(e.saberBColor=t.beatSavior.saberBColor),e):e},{total:0,totalLeft:0,totalRight:0,totalGridAcc:[0,0,0,0,0,0,0,0,0,0,0,0],fc:0,miss:0,nbOfPause:0,bombHit:0,nbOfWallHit:0,accLeft:0,accRight:0,leftAverageCut:[0,0,0],rightAverageCut:[0,0,0],gridAcc:[0,0,0,0,0,0,0,0,0,0,0,0],saberAColor:{r:255,g:0,b:0,a:1},saberBColor:{r:0,g:0,b:255,a:1}});e.total&&(["fc","miss","nbOfPause","bombHit","nbOfWallHit"].forEach(t=>{e[t]=e[t]/e.total}),e.gridAcc.forEach((t,n)=>e.gridAcc[n]=e.totalGridAcc[n]?t/e.totalGridAcc[n]:0),["left","right"].forEach(t=>{const n=t[0].toUpperCase()+t.substr(1),r="total"+n,a="acc"+n,o=t+"AverageCut";e[r]&&Number.isFinite(e[a])&&(e[a]=e[a]/e[r],e[o]&&Array.isArray(e[o])&&e[o].forEach((t,n)=>e[o][n]=t/e[r]))})),P(13,G=e),P(12,Y=!0)},async function(){const e=await Re(),t=await Promise.all(e.map(async e=>{const t=Object(f.getHumanDiffInfo)(e.diffInfo);let n=e.maxScoreEx;if(!n)try{n=await Object(f.getSongMaxScore)(e.hash,e.diffInfo,e.leaderboardId,!0)}catch(e){}return Object.assign({},e,{difficulty:t?t.name:"",maxScore:n||"",songAuthor:e.songAuthor?e.songAuthor:e.songAuthorName,levelAuthor:e.levelAuthor?e.levelAuthor:e.levelAuthorName,stars:e.stars?e.stars:de&&e.leaderboardId&&de[e.leaderboardId]?de[e.leaderboardId].stars:null})})),n=Object(O.generateCsv)(t,[{field:"leaderboardId",label:"ID"},{field:"name",label:"Song"},{field:"songAuthor",label:"Song author"},{field:"levelAuthor",label:"Level author"},{field:"stars",label:"Stars"},{field:"difficulty",label:"Difficulty"},{field:"maxScore",label:"Max score"},{field:"timeset",label:"Date"},{field:"score",label:"Score"},{field:"mods",label:"Mods"},{field:"uScore",label:"Score w/mod"},{field:"pp",label:"PP"},{field:"weightedPp",label:"Weighted PP"}]);Object(O.downloadCsv)("scores.csv",n)},async function(){const e=(await Re()).map(e=>({hash:e.hash})),t={playlistTitle:"SSPL playlist",playlistAuthor:"https://github.com/motzel/ScoreSaberCountryLeaderboard",playlistDescription:"",image:(await Promise.resolve().then(n.bind(null,155))).default,songs:e};Object(j.downloadJson)("playlist-"+(new Date).toISOString().replace(/:/g,"_")+".json",JSON.stringify(t))},Ze,Ke,async function(){me.length&&(P(1,A=[...A,me.filter(e=>!A.includes(e.id))[0].id]),await le(),P(25,We=!0))},async function(){const e=await Object(h.getConfig)();e.songBrowser&&(e.songBrowser.compareTo=A,await Object(h.setConfig)(e),P(25,We=!1))},function(e){M.includes(e)?P(6,M=M.filter(t=>t!==e)):Xe([e])},async function(){Xe((await Ue).songs.map(e=>e.leaderboardId))},async function(){Xe(Se.songs.map(e=>e.leaderboardId))},function(){P(6,M=[])},async function(){!async function(){if(D=null,!Se||!Se.songs.length)return;const e=pe*fe,t=await Ue;if(t&&t.songs[e]){const n=qe(t.songs[e],t.series,ae);if(!n)return;D=n}}(),ee&&(await Object(a.tick)(),en(Q,106)),ee=!0},Je,Qe,q,E,()=>Qe("recent"),()=>Qe("top"),function(e){ae.songType=e,P(16,ae)},function(e){ae.songTypeOption=e,P(16,ae)},function(e){ae.countryRankOp=e,P(16,ae)},function(e){je=e,P(21,je)},function(e){N=e,P(4,N)},function(e){ze=e,P(26,ze),P(14,te)},function(e){ae.sortBy=e,P(16,ae)},function(e){ae.sortOrder=e,P(16,ae)},(e,t)=>t.id===e.id,(e,t)=>Ze(t,e),e=>Ke(e),(e,t,n)=>{P(24,t[n].leaderboardOpened=!e.leaderboardOpened,Se),Je(".card-"+e.leaderboardId)},(e,t,n)=>{P(24,t[n].leaderboardOpened=!e.leaderboardOpened,Se),Je(".card-"+e.leaderboardId)},function(e){r.binding_callbacks[e?"unshift":"push"](()=>{Q=e,P(11,Q)})},(e,t)=>t.id===e.id,(e,t)=>Ze(t,e),e=>Ke(e),(e,t)=>t.id===e.id,(e,t)=>Ze(t,e),e=>Ke(e),(e,t,n)=>{P(24,t[n].leaderboardOpened=!e.leaderboardOpened,Se),Je(".tr-"+e.leaderboardId)},(e,t,n)=>{P(24,t[n].leaderboardOpened=!e.leaderboardOpened,Se),Je(".tr-"+e.leaderboardId)},e=>toggleLeaderboardOpen(e),function(e){r.binding_callbacks[e?"unshift":"push"](()=>{Q=e,P(11,Q)})},function(e){pe=e,P(18,pe)},function(e){fe=e,P(19,fe)},()=>P(5,F=!F),()=>P(12,Y=!1)]}class ln extends r.SvelteComponent{constructor(e){var t;super(),K.getElementById("svelte-189d5aq-style")||((t=Object(r.element)("style")).id="svelte-189d5aq-style",t.textContent=".header.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{display:flex;justify-content:center;align-items:center;margin-bottom:.75rem}.switch-types.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{display:flex;font-size:.75rem;text-align:center}.switch-types button{font-weight:500;margin-right:.125rem!important}.filters.svelte-189d5aq .columns.svelte-189d5aq.svelte-189d5aq{max-width:15rem}.card-view.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{font-size:.8rem}.card-view.columns.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{margin-left:.5rem;margin-right:.5rem;margin-top:.5rem}.card-view.svelte-189d5aq>.column.svelte-189d5aq.svelte-189d5aq{padding:.5rem}.card-view.svelte-189d5aq .column.svelte-189d5aq>.song-card.svelte-189d5aq{display:flex;position:relative;min-height:100%;width:100%}.card-view.svelte-189d5aq>.song-card.svelte-189d5aq .card-icons{margin-top:0;display:flex;justify-content:space-between;align-items:center}.card-view.svelte-189d5aq>.song-card.full-width.svelte-189d5aq.svelte-189d5aq{width:100%}.card-view.svelte-189d5aq .column.svelte-189d5aq>.song-card.svelte-189d5aq .box{width:100%}.card-view.svelte-189d5aq .check.svelte-189d5aq.svelte-189d5aq{position:absolute;top:.5em;right:.5em}.card-view.svelte-189d5aq .scores.bigger.svelte-189d5aq.svelte-189d5aq{font-size:.875rem}.card-view .scores.bigger table.ranking, table.ranking table.ranking.sspl{font-size:1rem}.card-view.svelte-189d5aq .scores .column.svelte-189d5aq.svelte-189d5aq:nth-child(2n){padding:.75rem .75rem .75rem .5rem}.card-view.svelte-189d5aq .scores .column.svelte-189d5aq.svelte-189d5aq:nth-child(2n+1){padding:.75rem .5rem .75rem .75rem}.card-view.svelte-189d5aq .score.svelte-189d5aq.svelte-189d5aq{position:relative;min-width:6.75rem}.card-view.svelte-189d5aq .score.svelte-189d5aq .dropdown-trigger button{background:transparent;font-weight:bold}.card-view.svelte-189d5aq .score.best .player-name strong.svelte-189d5aq.svelte-189d5aq,.card-view.svelte-189d5aq .score.best.svelte-189d5aq .dropdown-trigger button{color:var(--increase)!important}.card-view.svelte-189d5aq .score.svelte-189d5aq .what-if{top:2em}.card-view.svelte-189d5aq .scores.svelte-189d5aq .leaderboard-container{font-size:1rem}.columns.svelte-189d5aq>div.svelte-189d5aq.svelte-189d5aq{max-width:100%}table.ranking.sspl.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{font-size:0.875rem;border-width:1px}th.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq,td.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{vertical-align:middle !important;padding:0.25em !important;border-color:var(--textColor) !important}th.check.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq,td.check.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{width:1.25rem}thead.svelte-189d5aq th.svelte-189d5aq.svelte-189d5aq{text-align:center;vertical-align:bottom !important;border-bottom-width:2px}thead.svelte-189d5aq th.player-sel.svelte-189d5aq.svelte-189d5aq{max-width:12rem;position:relative}thead th.player-sel .multi-select .dropdown, thead th.player-sel .multi-select .dropdown-trigger{width:100%}thead.svelte-189d5aq th.player-sel .player-remove.svelte-189d5aq.svelte-189d5aq,.card-view.svelte-189d5aq .score .player-remove.svelte-189d5aq.svelte-189d5aq{display:none;position:absolute;top:.125rem;right:.125rem;color:var(--decrease, red);cursor:pointer}thead.svelte-189d5aq th.player-sel:hover .player-remove.svelte-189d5aq.svelte-189d5aq,.card-view.svelte-189d5aq .score:hover .player-remove.svelte-189d5aq.svelte-189d5aq{display:inline}.card-view.svelte-189d5aq .score:hover .player-remove.svelte-189d5aq.svelte-189d5aq{top:0}thead.svelte-189d5aq th.song.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.stars.svelte-189d5aq.svelte-189d5aq{vertical-align:middle !important}thead.svelte-189d5aq th.song.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.maxPp.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.bpm.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.njs.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.nps.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.length.svelte-189d5aq.svelte-189d5aq{vertical-align:middle !important}th.diff.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq,td.diff.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{width:1.5rem;padding:0}thead.svelte-189d5aq th.series.svelte-189d5aq.svelte-189d5aq{width:6rem;border-bottom-style:dotted;border-bottom-width:1px}thead.svelte-189d5aq th.stars.svelte-189d5aq.svelte-189d5aq{width:2rem}thead.svelte-189d5aq th.bpm.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.njs.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.nps.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.length.svelte-189d5aq.svelte-189d5aq{width:2.5rem}thead.svelte-189d5aq th.maxPp.svelte-189d5aq.svelte-189d5aq{width:3rem}thead.svelte-189d5aq th.rank.svelte-189d5aq.svelte-189d5aq{width:4rem}thead.svelte-189d5aq th.acc.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.pp.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.diffPp.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.score.svelte-189d5aq.svelte-189d5aq,thead.svelte-189d5aq th.weightedPp.svelte-189d5aq.svelte-189d5aq{width:3rem}thead.svelte-189d5aq th.timeset.svelte-189d5aq.svelte-189d5aq{width:5.5rem}thead.svelte-189d5aq th.beatSaviorStats.svelte-189d5aq.svelte-189d5aq{min-width:5.7rem}thead.svelte-189d5aq th.icons.svelte-189d5aq.svelte-189d5aq{width:4.9rem}tbody.svelte-189d5aq td.acc.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.pp.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.diffPp.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.score.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.weightedPp.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.timeset.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.rank.svelte-189d5aq.svelte-189d5aq{text-align:center}tbody.svelte-189d5aq td.stars.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.maxPp.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.bpm.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.njs.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.nps.svelte-189d5aq.svelte-189d5aq,tbody.svelte-189d5aq td.length.svelte-189d5aq.svelte-189d5aq{text-align:center}th.top.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq,td.top.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{border-top-style:solid;border-top-width:1px}td.down.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{border-bottom-style:solid;border-bottom-width:1px}th.series.down.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{border-bottom-width:2px;border-bottom-style:solid}th.left.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq,td.left.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{border-left-style:solid;border-left-width:1px}th.left.middle.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq,td.left.middle.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{border-left-style:dotted;border-left-width:1px}tbody.svelte-189d5aq td.song.svelte-189d5aq>div.svelte-189d5aq{display:flex;justify-content:space-between}tbody.svelte-189d5aq td.song figure.svelte-189d5aq.svelte-189d5aq{display:flex;justify-content:flex-start;align-items:center;margin:0}tbody.svelte-189d5aq td.song img.svelte-189d5aq.svelte-189d5aq{flex:0 1 40px;width:40px;height:40px;margin:0 1em 0 .5em}tbody.svelte-189d5aq td.song .songinfo.svelte-189d5aq.svelte-189d5aq{text-align:left;font-size:.95rem;font-weight:500}tbody.svelte-189d5aq td.song .songinfo.svelte-189d5aq.svelte-189d5aq{color:var(--alternate)}tbody.svelte-189d5aq td.song .songinfo small.svelte-189d5aq.svelte-189d5aq{font-size:0.75em;color:var(--ppColour)}tbody.svelte-189d5aq td.icons.svelte-189d5aq.svelte-189d5aq{width:4.9rem;text-align:right}tbody td.icons button{margin-bottom:.25em !important}tbody.svelte-189d5aq tr.item.opened td.svelte-189d5aq.svelte-189d5aq{border-bottom-style:dashed}tbody.svelte-189d5aq tr.leaderboard.svelte-189d5aq.svelte-189d5aq{display:none}tbody.svelte-189d5aq tr.leaderboard.opened.svelte-189d5aq.svelte-189d5aq{display:table-row}tbody.svelte-189d5aq tr.leaderboard td.svelte-189d5aq.svelte-189d5aq{padding:1rem 1rem 1.5rem 1rem!important}table.ranking.svelte-189d5aq tbody tr.leaderboard.svelte-189d5aq.svelte-189d5aq:hover{background-color:inherit!important}tfoot.svelte-189d5aq th.svelte-189d5aq.svelte-189d5aq{text-align:center !important;vertical-align:middle !important;border-top-width:2px}tfoot.svelte-189d5aq th.song.svelte-189d5aq.svelte-189d5aq{text-align:left !important}tbody.svelte-189d5aq td.svelte-189d5aq.svelte-189d5aq{position:relative}tbody.svelte-189d5aq td.best.svelte-189d5aq.svelte-189d5aq{background:var(--highlight)}tbody.svelte-189d5aq td.compact.svelte-189d5aq.svelte-189d5aq{width:12rem;text-align:center}tbody.svelte-189d5aq td.compact.left.series-1.svelte-189d5aq .beat-savior .left .donut{margin-right:0}tbody.svelte-189d5aq td.compact.left.series-1.svelte-189d5aq .beat-savior .right .donut{margin-left:0}tbody.svelte-189d5aq td.compact.left.series-1.svelte-189d5aq .beat-savior .stats{margin-bottom:.5rem}tbody.svelte-189d5aq td.compact.left.series-1.svelte-189d5aq.svelte-189d5aq:not(.with-cols){border-left:none}.compact-timeset-val.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{border-bottom:1px dashed var(--textColor)}.compact-diffPp-val.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{font-size:1.25em}.compact-pp-val.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq,.compact-estimatedPp-val.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{font-size:1.15em;color:var(--ppColour) !important}.compact-acc-val.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq,.compact-estimatedAcc-val.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{font-size:1.1em}.filters.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{display:flex;flex-wrap:wrap;margin:-1.5rem 0 1rem -1.5rem;width:calc(100% + 1.5rem);align-items:flex-end}.filters.svelte-189d5aq>*{display:flex;flex-direction:column;justify-content:space-around;min-height:4rem;margin:1.5rem 0 0 1.5rem}.filters.svelte-189d5aq header.svelte-189d5aq.svelte-189d5aq{display:block;text-align:center;color:#888}.filters input{font-size:1rem;color:var(--textColor);background:var(--foreground);border:none;border-bottom:1px solid var(--textColor)}.filters.svelte-189d5aq .filter-name.svelte-189d5aq.svelte-189d5aq{min-width:12rem}.filters.svelte-189d5aq .filter-name input.svelte-189d5aq.svelte-189d5aq{width:100%}.filters.svelte-189d5aq .filter-country-rank .values.svelte-189d5aq.svelte-189d5aq{display:flex}.filters.svelte-189d5aq .filter-country-rank .values input[type=number].svelte-189d5aq.svelte-189d5aq{max-width:3rem;text-align:center}.filters .filter-diff-pp > div{position:relative;top:.5em}.player-compare-btns.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{font-size:.875rem}div.info.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{padding-top:2rem;text-align:center}input.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{font-size:1rem;border:none;color:var(--textColor, #000);background-color:var(--foreground, #fff);outline:none}input.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{border-bottom:1px solid var(--textColor, #000)}input.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq::placeholder{color:#666;opacity:1}.actions.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{margin-top:1rem;font-size:.75rem}.button-group.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{display:inline-block;margin-right:1rem}.button-group.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq:last-of-type{margin-right:0}.beat-savior-avg-stats-icon.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{margin:0 .45em}.beat-savior-avg-stats.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{margin-right:.45em}.beat-savior-avg-stats-modal.svelte-189d5aq.svelte-189d5aq.svelte-189d5aq{font-size:1.5rem;margin-top:.5em}",Object(r.append)(K.head,t)),Object(r.init)(this,e,sn,Qt,r.safe_not_equal,{playerId:0,snipedIds:1,minPpPerMap:61,country:2,recentPlay:3,songType:62},[-1,-1,-1,-1,-1,-1])}}t.default=ln},function(e,t,n){"use strict";n.r(t),n.d(t,"copyToClipboard",(function(){return o}));var r=n(3);function a(e){var 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{document.execCommand("copy")}catch(e){r.default.error("Fallback: Oops, unable to copy to clipboard",e)}document.body.removeChild(t)}function o(e){navigator.permissions.query({name:"clipboard-write"}).then(t=>{"granted"===t.state||"prompt"===t.state?navigator.clipboard.writeText(e).then(()=>{}):a(e)}).catch(()=>a(e))}},function(e,t,n){"use strict";n.r(t),n.d(t,"generateCsv",(function(){return o})),n.d(t,"downloadCsv",(function(){return c}));var r=n(86),a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:",";return t.map(t=>{var n=e[t.field]?e[t.field]:"";switch(!0){case n instanceof Date:n=n.toISOString();break;case null==n:n="";break;default:n=n.toString()}return(n=n.replace(/"/g,'""')).match(/("|,|\\n)/)?'"'.concat(n,'"'):n}).join(n)},o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:",",r=t.reduce((e,t)=>(e[t.field]=t.label,e),{});return a(r,t,n)+"\n"+e.map(e=>a(e,t,n)).join("\n")},c=(e,t)=>Object(r.default)(t,e,"text/csv;charset=utf-8;")},function(e,t,n){"use strict";n.r(t),n.d(t,"downloadJson",(function(){return a}));var r=n(86),a=(e,t)=>Object(r.default)(t,e,"application/json;charset=utf-8;")},function(e,t,n){"use strict";function r(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}n.r(t),t.default=function(e){var t,n={};return t=function*(){var t=JSON.stringify(arguments);return n[t]=n[t]||e.apply(this,arguments),n[t]},function(){var e=this,n=arguments;return new Promise((function(a,o){var c=t.apply(e,n);function i(e){r(c,a,o,i,s,"next",e)}function s(e){r(c,a,o,i,s,"throw",e)}i(void 0)}))}}},function(e,t,n){"use strict";n.r(t);var r=n(7),a=n(6),o=n(63);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.default=()=>{var e=[],t=null,n=[],c=null,s={},l={},d=0,u=0,b=null;function p(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=(e,t,n)=>t+Math.pow(.965,n)*e.pp,a=e&&e.length,o=n>=1&&a?e[n-1]:0;return n=n>0?n:0,a?t.reduce((e,t,a)=>r(t,e,a+n),o):t.reduce((t,n,a)=>(t=r(n,t,a),e[a]=t,t),0)}return{init:(o,f)=>{if(!f||!o||!o.length)return!1;var O=o.filter(e=>e.pp).map(e=>i(i({},e),{},{timeset:Object(r.dateFromString)(e.timeset)})),j=O.reduce((e,t)=>t.timeset>e?t.timeset:e,null);return!!j&&(j<=c||(c=j,e=[],t=i({},f),b=Date.now(),n=O.map(e=>{var n,r,a,o;return{leaderboardId:e.leaderboardId,timeCoeff:1+Math.max(b-e.timeset,0)/1296e6,stars:null===(n=t)||void 0===n||null===(r=n[e.leaderboardId])||void 0===r?void 0:r.stars,acc:null!==(a=null==e?void 0:e.acc)&&void 0!==a?a:(null==e?void 0:e.maxScoreEx)?(null!==(o=e.uScore)&&void 0!==o?o:e.score)/e.maxScoreEx*100:null,pp:e.pp}}).filter(e=>e.stars&&e.acc).sort((e,t)=>t.pp-e.pp),s=n.reduce((e,t,n)=>(e[t.leaderboardId]=n,e),{}),l=Object(a.convertArrayToObjectByKey)(n,"leaderboardId"),d=Math.max(...n.map(e=>e.stars)),u=p(n)),!0)},estimate:function(){if(!b)throw"Estimator has not been initialized yet";return{recentRankedPlay:c,scores:Object.values(t).map(e=>{var t,r,a,c=null===(t=l)||void 0===t?void 0:t[e.leaderboardId],b=null!==(r=null==c?void 0:c.acc)&&void 0!==r?r:null,f=null!==(a=null==c?void 0:c.pp)&&void 0!==a?a:null,O=function(e,t,n){var r=t.reduce((t,n)=>{var r=2*Math.abs(e-n.stars),a=e>n.stars?r*r*r:1,o=1/(1+r*n.timeCoeff*a);return t.weight+=o,t.sum+=n.acc*o,t},{weight:0,sum:0}),a=r.weight?r.sum/r.weight:0;if(e>n){var o=2*Math.abs(e-n);a/=1+o*o}return a}(e.stars,n,d),j=o.PP_PER_STAR*e.stars*Object(o.ppFactorFromAcc)(O),m=u;if(j&&(!f||f<j)){var g=n;if(c){var h,y,v=null!==(h=null===(y=s)||void 0===y?void 0:y[e.leaderboardId])&&void 0!==h?h:-1;v>=0&&(g=n.slice(0,v).concat(n.slice(v+1)))}var _=g.findIndex(e=>e.pp<j),w=_>=0?[{pp:j}].concat(g.slice(_)):[{pp:j}];m=j&&(!f||f<j)?p(w,_<0?g.length:_):0}return i(i({},e),{},{acc:b,pp:f,estimatedAcc:O,estimatedPp:j,ppDiff:Math.max(m-u,0),totalPp:u,newTotalPp:m})})}}}}},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(39);const o=e=>({song:1&e}),c=e=>({song:e[0]});function i(e){let t,n,i;const s=e[2].default,l=Object(r.create_slot)(s,e,e[1],c),d=l||function(e){let t,n,a,o=e[0].songAuthor+"",c=e[0].name+"";return{c(){t=Object(r.text)(o),n=Object(r.text)(" - "),a=Object(r.text)(c)},m(e,o){Object(r.insert)(e,t,o),Object(r.insert)(e,n,o),Object(r.insert)(e,a,o)},p(e,n){1&n&&o!==(o=e[0].songAuthor+"")&&Object(r.set_data)(t,o),1&n&&c!==(c=e[0].name+"")&&Object(r.set_data)(a,c)},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),e&&Object(r.detach)(a)}}}(e);return{c(){t=Object(r.element)("a"),d&&d.c(),Object(r.attr)(t,"href",n=a.SCORESABER_URL+"/leaderboard/"+encodeURIComponent(e[0].leaderboardId))},m(e,n){Object(r.insert)(e,t,n),d&&d.m(t,null),i=!0},p(e,u){l?l.p&&3&u&&Object(r.update_slot)(l,s,e,e[1],u,o,c):d&&d.p&&1&u&&d.p(e,u),(!i||1&u&&n!==(n=a.SCORESABER_URL+"/leaderboard/"+encodeURIComponent(e[0].leaderboardId)))&&Object(r.attr)(t,"href",n)},i(e){i||(Object(r.transition_in)(d,e),i=!0)},o(e){Object(r.transition_out)(d,e),i=!1},d(e){e&&Object(r.detach)(t),d&&d.d(e)}}}function s(e){let t,n,a=e[0]&&i(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=i(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function l(e,t,n){let{$$slots:r={},$$scope:a}=t,{song:o}=t;return e.$$set=e=>{"song"in e&&n(0,o=e.song),"$$scope"in e&&n(1,a=e.$$scope)},[o,a,r]}class d extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,l,s,r.safe_not_equal,{song:0})}}t.default=d},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58);function o(e,t,n){const r=e.slice();return r[30]=t[n],r}function c(e,t,n){const r=e.slice();return r[33]=t[n],r}function i(e){let t,n,a,o,c,i,d,u,b,p;function f(e,t){return"simple"===e[5]?l:s}let O=f(e),j=O(e),m=e[3]&&e[3].length&&T(e);return{c(){t=Object(r.element)("nav"),n=Object(r.element)("div"),a=Object(r.text)(e[11]),o=Object(r.text)(" - "),c=Object(r.text)(e[12]),i=Object(r.text)(" / "),d=Object(r.text)(e[2]),u=Object(r.space)(),b=Object(r.element)("ul"),j.c(),p=Object(r.space)(),m&&m.c(),Object(r.attr)(n,"class","position svelte-5tykr0"),Object(r.attr)(b,"class","pagination-list svelte-5tykr0"),Object(r.toggle_class)(b,"simple","simple"===e[5]),Object(r.attr)(t,"class","pagination svelte-5tykr0")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(n,o),Object(r.append)(n,c),Object(r.append)(n,i),Object(r.append)(n,d),Object(r.append)(t,u),Object(r.append)(t,b),j.m(b,null),Object(r.append)(t,p),m&&m.m(t,null)},p(e,n){2048&n[0]&&Object(r.set_data)(a,e[11]),4096&n[0]&&Object(r.set_data)(c,e[12]),4&n[0]&&Object(r.set_data)(d,e[2]),O===(O=f(e))&&j?j.p(e,n):(j.d(1),j=O(e),j&&(j.c(),j.m(b,null))),32&n[0]&&Object(r.toggle_class)(b,"simple","simple"===e[5]),e[3]&&e[3].length?m?m.p(e,n):(m=T(e),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},d(e){e&&Object(r.detach)(t),j.d(),m&&m.d()}}}function s(e){let t,n,a,o=e[6]&&d(e),i=e[10],s=[];for(let t=0;t<i.length;t+=1)s[t]=O(c(e,i,t));let l=e[7]&&j(e);return{c(){o&&o.c(),t=Object(r.space)();for(let e=0;e<s.length;e+=1)s[e].c();n=Object(r.space)(),l&&l.c(),a=Object(r.empty)()},m(e,c){o&&o.m(e,c),Object(r.insert)(e,t,c);for(let t=0;t<s.length;t+=1)s[t].m(e,c);Object(r.insert)(e,n,c),l&&l.m(e,c),Object(r.insert)(e,a,c)},p(e,r){if(e[6]?o?o.p(e,r):(o=d(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null),9473&r[0]){let t;for(i=e[10],t=0;t<i.length;t+=1){const a=c(e,i,t);s[t]?s[t].p(a,r):(s[t]=O(a),s[t].c(),s[t].m(n.parentNode,n))}for(;t<s.length;t+=1)s[t].d(1);s.length=i.length}e[7]?l?l.p(e,r):(l=j(e),l.c(),l.m(a.parentNode,a)):l&&(l.d(1),l=null)},d(e){o&&o.d(e),e&&Object(r.detach)(t),Object(r.destroy_each)(s,e),e&&Object(r.detach)(n),l&&l.d(e),e&&Object(r.detach)(a)}}}function l(e){let t,n,a;function o(e,t){return 0!==e[0]?y:h}let c=o(e),i=c(e);function s(e,t){return e[0]!==e[9]-1?x:$}let l=s(e),d=l(e);return{c(){t=Object(r.element)("li"),i.c(),n=Object(r.space)(),d.c(),Object(r.attr)(t,"data-page",a=0)},m(e,a){Object(r.insert)(e,t,a),i.m(t,null),Object(r.append)(t,n),d.m(t,null)},p(e,r){c===(c=o(e))&&i?i.p(e,r):(i.d(1),i=c(e),i&&(i.c(),i.m(t,n))),l===(l=s(e))&&d?d.p(e,r):(d.d(1),d=l(e),d&&(d.c(),d.m(t,null)))},d(e){e&&Object(r.detach)(t),i.d(),d.d()}}}function d(e){let t,n,a,o,c,i,s,l;function d(e,t){return 0===e[8]?b:u}let p=d(e),f=p(e);return{c(){t=Object(r.element)("li"),n=Object(r.element)("a"),f.c(),c=Object(r.space)(),i=Object(r.element)("li"),i.innerHTML='<span class="pagination-ellipsis">…</span>',Object(r.attr)(n,"href","#"),Object(r.attr)(n,"class",a=Object(r.null_to_empty)("pagination-link"+(0===e[0]?" is-current":""))+" svelte-5tykr0"),Object(r.attr)(t,"data-page",o=0)},m(a,o){Object(r.insert)(a,t,o),Object(r.append)(t,n),f.m(n,null),Object(r.insert)(a,c,o),Object(r.insert)(a,i,o),s||(l=Object(r.listen)(n,"click",Object(r.prevent_default)(e[21])),s=!0)},p(e,t){p!==(p=d(e))&&(f.d(1),f=p(e),f&&(f.c(),f.m(n,null))),1&t[0]&&a!==(a=Object(r.null_to_empty)("pagination-link"+(0===e[0]?" is-current":""))+" svelte-5tykr0")&&Object(r.attr)(n,"class",a)},d(e){e&&Object(r.detach)(t),f.d(),e&&Object(r.detach)(c),e&&Object(r.detach)(i),s=!1,l()}}}function u(e){let t;return{c(){t=Object(r.text)("1")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function b(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-spinner fa-spin")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function p(e){let t,n=e[33]+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){1024&a[0]&&n!==(n=e[33]+"")&&Object(r.set_data)(t,n)},d(e){e&&Object(r.detach)(t)}}}function f(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-spinner fa-spin")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,d(e){e&&Object(r.detach)(t)}}}function O(e){let t,n,a,o,c,i;function s(e,t){return e[8]===e[33]-1?f:p}let l=s(e),d=l(e);function u(...t){return e[22](e[33],...t)}return{c(){t=Object(r.element)("li"),n=Object(r.element)("a"),d.c(),Object(r.attr)(n,"href","#"),Object(r.attr)(n,"class",a=Object(r.null_to_empty)("pagination-link"+(e[0]===e[33]-1?" is-current":""))+" svelte-5tykr0"),Object(r.attr)(t,"data-page",o=e[33])},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),d.m(n,null),c||(i=Object(r.listen)(n,"click",Object(r.prevent_default)(u)),c=!0)},p(c,i){l===(l=s(e=c))&&d?d.p(e,i):(d.d(1),d=l(e),d&&(d.c(),d.m(n,null))),1025&i[0]&&a!==(a=Object(r.null_to_empty)("pagination-link"+(e[0]===e[33]-1?" is-current":""))+" svelte-5tykr0")&&Object(r.attr)(n,"class",a),1024&i[0]&&o!==(o=e[33])&&Object(r.attr)(t,"data-page",o)},d(e){e&&Object(r.detach)(t),d.d(),c=!1,i()}}}function j(e){let t,n,a,o,c,i,s,l;function d(e,t){return e[8]===e[9]-1?g:m}let u=d(e),b=u(e);return{c(){t=Object(r.element)("li"),t.innerHTML='<span class="pagination-ellipsis">…</span>',n=Object(r.space)(),a=Object(r.element)("li"),o=Object(r.element)("a"),b.c(),Object(r.attr)(o,"href","#"),Object(r.attr)(o,"class",c=Object(r.null_to_empty)("pagination-link"+(e[0]===e[9]-1?" is-current":""))+" svelte-5tykr0"),Object(r.attr)(a,"data-page",i=e[9]-1)},m(c,i){Object(r.insert)(c,t,i),Object(r.insert)(c,n,i),Object(r.insert)(c,a,i),Object(r.append)(a,o),b.m(o,null),s||(l=Object(r.listen)(o,"click",Object(r.prevent_default)(e[23])),s=!0)},p(e,t){u===(u=d(e))&&b?b.p(e,t):(b.d(1),b=u(e),b&&(b.c(),b.m(o,null))),513&t[0]&&c!==(c=Object(r.null_to_empty)("pagination-link"+(e[0]===e[9]-1?" is-current":""))+" svelte-5tykr0")&&Object(r.attr)(o,"class",c),512&t[0]&&i!==(i=e[9]-1)&&Object(r.attr)(a,"data-page",i)},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),e&&Object(r.detach)(a),b.d(),s=!1,l()}}}function m(e){let t;return{c(){t=Object(r.text)(e[9])},m(e,n){Object(r.insert)(e,t,n)},p(e,n){512&n[0]&&Object(r.set_data)(t,e[9])},d(e){e&&Object(r.detach)(t)}}}function g(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-spinner fa-spin")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,d(e){e&&Object(r.detach)(t)}}}function h(e){let t,n,a;return{c(){t=Object(r.element)("span"),t.innerHTML='<i class="fas fa-step-backward"></i>',n=Object(r.space)(),a=Object(r.element)("span"),a.innerHTML='<i class="fas fa-chevron-left"></i>',Object(r.attr)(t,"class","pagination-link disabled svelte-5tykr0"),Object(r.attr)(a,"class","pagination-link disabled svelte-5tykr0")},m(e,o){Object(r.insert)(e,t,o),Object(r.insert)(e,n,o),Object(r.insert)(e,a,o)},p:r.noop,d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),e&&Object(r.detach)(a)}}}function y(e){let t,n,a,o,c;function i(e,t){return 0===e[8]?_:v}let s=i(e),l=s(e);function d(e,t){return 0===e[8]?k:w}let u=d(e),b=u(e);return{c(){t=Object(r.element)("a"),l.c(),n=Object(r.space)(),a=Object(r.element)("a"),b.c(),Object(r.attr)(t,"href","#"),Object(r.attr)(t,"class","pagination-link svelte-5tykr0"),Object(r.attr)(a,"href","#"),Object(r.attr)(a,"class","pagination-link svelte-5tykr0")},m(i,s){Object(r.insert)(i,t,s),l.m(t,null),Object(r.insert)(i,n,s),Object(r.insert)(i,a,s),b.m(a,null),o||(c=[Object(r.listen)(t,"click",Object(r.prevent_default)(e[17])),Object(r.listen)(a,"click",Object(r.prevent_default)(e[18]))],o=!0)},p(e,n){s!==(s=i(e))&&(l.d(1),l=s(e),l&&(l.c(),l.m(t,null))),u!==(u=d(e))&&(b.d(1),b=u(e),b&&(b.c(),b.m(a,null)))},d(e){e&&Object(r.detach)(t),l.d(),e&&Object(r.detach)(n),e&&Object(r.detach)(a),b.d(),o=!1,Object(r.run_all)(c)}}}function v(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-step-backward")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function _(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-spinner fa-spin")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function w(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-chevron-left")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function k(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-spinner fa-spin")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function $(e){let t,n,a;return{c(){t=Object(r.element)("span"),t.innerHTML='<i class="fas fa-chevron-right"></i>',n=Object(r.space)(),a=Object(r.element)("span"),a.innerHTML='<i class="fas fa-step-forward"></i>',Object(r.attr)(t,"class","pagination-link disabled svelte-5tykr0"),Object(r.attr)(a,"class","pagination-link disabled svelte-5tykr0")},m(e,o){Object(r.insert)(e,t,o),Object(r.insert)(e,n,o),Object(r.insert)(e,a,o)},p:r.noop,d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),e&&Object(r.detach)(a)}}}function x(e){let t,n,a,o,c;function i(e,t){return e[8]===e[9]-1?P:S}let s=i(e),l=s(e);function d(e,t){return e[8]===e[9]-1?C:I}let u=d(e),b=u(e);return{c(){t=Object(r.element)("a"),l.c(),n=Object(r.space)(),a=Object(r.element)("a"),b.c(),Object(r.attr)(t,"href","#"),Object(r.attr)(t,"class","pagination-link svelte-5tykr0"),Object(r.attr)(a,"href","#"),Object(r.attr)(a,"class","pagination-link svelte-5tykr0")},m(i,s){Object(r.insert)(i,t,s),l.m(t,null),Object(r.insert)(i,n,s),Object(r.insert)(i,a,s),b.m(a,null),o||(c=[Object(r.listen)(t,"click",Object(r.prevent_default)(e[19])),Object(r.listen)(a,"click",Object(r.prevent_default)(e[20]))],o=!0)},p(e,n){s!==(s=i(e))&&(l.d(1),l=s(e),l&&(l.c(),l.m(t,null))),u!==(u=d(e))&&(b.d(1),b=u(e),b&&(b.c(),b.m(a,null)))},d(e){e&&Object(r.detach)(t),l.d(),e&&Object(r.detach)(n),e&&Object(r.detach)(a),b.d(),o=!1,Object(r.run_all)(c)}}}function S(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-chevron-right")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function P(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-spinner fa-spin")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function I(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-step-forward")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function C(e){let t;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class","fas fa-spinner fa-spin")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function T(e){let t,n,a,c,i=e[3],s=[];for(let t=0;t<i.length;t+=1)s[t]=A(o(e,i,t));return{c(){t=Object(r.element)("div"),n=Object(r.element)("select");for(let e=0;e<s.length;e+=1)s[e].c();Object(r.attr)(n,"class","svelte-5tykr0"),void 0===e[1]&&Object(r.add_render_callback)(()=>e[24].call(n)),Object(r.attr)(t,"class","items-per-page svelte-5tykr0")},m(o,i){Object(r.insert)(o,t,i),Object(r.append)(t,n);for(let e=0;e<s.length;e+=1)s[e].m(n,null);Object(r.select_option)(n,e[1]),a||(c=[Object(r.listen)(n,"change",e[24]),Object(r.listen)(n,"change",e[14])],a=!0)},p(e,t){if(8&t[0]){let r;for(i=e[3],r=0;r<i.length;r+=1){const a=o(e,i,r);s[r]?s[r].p(a,t):(s[r]=A(a),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}10&t[0]&&Object(r.select_option)(n,e[1])},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(s,e),a=!1,Object(r.run_all)(c)}}}function A(e){let t,n,a,o=e[30]+"";return{c(){t=Object(r.element)("option"),n=Object(r.text)(o),t.__value=a=e[30],t.value=t.__value},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,c){8&c[0]&&o!==(o=e[30]+"")&&Object(r.set_data)(n,o),8&c[0]&&a!==(a=e[30])&&(t.__value=a,t.value=t.__value)},d(e){e&&Object(r.detach)(t)}}}function q(e){let t,n=e[9]>1&&!e[4]&&i(e);return{c(){n&&n.c(),t=Object(r.empty)()},m(e,a){n&&n.m(e,a),Object(r.insert)(e,t,a)},p(e,r){e[9]>1&&!e[4]?n?n.p(e,r):(n=i(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:r.noop,o:r.noop,d(e){n&&n.d(e),e&&Object(r.detach)(t)}}}function R(e,t,n){const o=Object(a.createEventDispatcher)();let{totalItems:c=0}=t,{currentPage:i=0}=t,{itemsPerPage:s=10}=t,{itemsPerPageValues:l=[5,10,15,20,25]}=t,{displayMax:d}=t;d||(d=11);let u,b,p,f,O,{hide:j=!1}=t,{beforePageChanged:m}=t,{mode:g="pages"}=t,h=!1,y=!1,v=s,_=null;function w(e=!1){let t=(i+1)*s-1;t>c-1&&(t=c-1),o("page-changed",{currentPage:i,itemsPerPage:s,from:i*s,to:t,total:c,initial:e})}async function k(e){if(m){n(8,_=e);const t=await m(e);if(n(8,_=null),!t)return}n(0,i=e),w(!1)}return Object(a.onMount)(()=>{w(!0)}),e.$$set=e=>{"totalItems"in e&&n(2,c=e.totalItems),"currentPage"in e&&n(0,i=e.currentPage),"itemsPerPage"in e&&n(1,s=e.itemsPerPage),"itemsPerPageValues"in e&&n(3,l=e.itemsPerPageValues),"displayMax"in e&&n(15,d=e.displayMax),"hide"in e&&n(4,j=e.hide),"beforePageChanged"in e&&n(16,m=e.beforePageChanged),"mode"in e&&n(5,g=e.mode)},e.$$.update=()=>{6&e.$$.dirty[0]&&n(9,u=Math.ceil(c/s)),512&e.$$.dirty[0]&&(b=Array(u).fill(null).map((e,t)=>t+1)),33281&e.$$.dirty[0]&&n(10,p=function(e,t,r){const a=e>r,o=Math.floor(r/2),c=t>o&&a?t-o+1:0;return n(6,h=t>o&&a),n(7,y=t+o+1<e&&a),i>u-1&&n(0,i=u-1),i<0&&n(0,i=0),b.slice(c-(a&&!y?o-e+t+1:0),c+r-(h?1:0)-(y?1:0))}(u,i,d)),3&e.$$.dirty[0]&&n(11,f=i*s+1),7&e.$$.dirty[0]&&n(12,O=function(e,t,n){const r=(e+1)*t;return r>n?n:r}(i,s,c))},[i,s,c,l,j,g,h,y,_,u,p,f,O,k,function(){const e=v*i;v=s,n(0,i=Math.floor(e/s))},d,m,()=>k(0),()=>k(i-1),()=>k(i+1),()=>k(u-1),()=>k(0),e=>k(e-1),()=>k(u-1),function(){s=Object(r.select_value)(this),n(1,s),n(3,l)}]}class z extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-5tykr0-style")||((t=Object(r.element)("style")).id="svelte-5tykr0-style",t.textContent="select.svelte-5tykr0{font-size:1em;border:none;color:var(--textColor, #000);background-color:var(--foreground, #fff);outline:none}.pagination.svelte-5tykr0{margin-top:1em}.pagination-list.svelte-5tykr0{max-width:none !important;justify-content:center;margin-top:0;margin-bottom:0!important}.pagination-list.simple.svelte-5tykr0{justify-content:flex-end}.pagination-previous.svelte-5tykr0,.pagination-next.svelte-5tykr0,.pagination-link.svelte-5tykr0{border-color:var(--alternate)}.pagination-link.is-current.svelte-5tykr0{color:var(--textColor);background-color:var(--selected);border-color:var(--selected)}.pagination-link.svelte-5tykr0:focus{border-color:#dbdbdb !important}.position.svelte-5tykr0{order:0\n    }.pagination-list.svelte-5tykr0{order:1\n    }.items-per-page.svelte-5tykr0{order:2\n    }",Object(r.append)(document.head,t)),Object(r.init)(this,e,R,q,r.safe_not_equal,{totalItems:2,currentPage:0,itemsPerPage:1,itemsPerPageValues:3,displayMax:15,hide:4,beforePageChanged:16,mode:5},[-1,-1])}}t.default=z},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9);function c(e){let t,n,a,o,c,i,s,l,d,u=e[5].common.to+"";return{c(){t=Object(r.element)("div"),n=Object(r.element)("input"),a=Object(r.space)(),o=Object(r.element)("span"),c=Object(r.text)(u),i=Object(r.space)(),s=Object(r.element)("input"),Object(r.attr)(n,"type","number"),Object(r.attr)(n,"min",e[1]),Object(r.attr)(n,"max",e[2]),Object(r.attr)(n,"step",e[3]),n.disabled=e[4],Object(r.attr)(n,"class","svelte-mxs8t2"),Object(r.attr)(s,"type","number"),Object(r.attr)(s,"min",e[1]),Object(r.attr)(s,"max",e[2]),Object(r.attr)(s,"step",e[3]),s.disabled=e[4],Object(r.attr)(s,"class","svelte-mxs8t2")},m(u,b){Object(r.insert)(u,t,b),Object(r.append)(t,n),Object(r.set_input_value)(n,e[0].from),Object(r.append)(t,a),Object(r.append)(t,o),Object(r.append)(o,c),Object(r.append)(t,i),Object(r.append)(t,s),Object(r.set_input_value)(s,e[0].to),l||(d=[Object(r.listen)(n,"input",e[9]),Object(r.listen)(n,"input",e[10]),Object(r.listen)(n,"keydown",e[7]),Object(r.listen)(s,"input",e[11]),Object(r.listen)(s,"input",e[12]),Object(r.listen)(s,"keydown",e[7])],l=!0)},p(e,[t]){2&t&&Object(r.attr)(n,"min",e[1]),4&t&&Object(r.attr)(n,"max",e[2]),8&t&&Object(r.attr)(n,"step",e[3]),16&t&&(n.disabled=e[4]),1&t&&Object(r.to_number)(n.value)!==e[0].from&&Object(r.set_input_value)(n,e[0].from),32&t&&u!==(u=e[5].common.to+"")&&Object(r.set_data)(c,u),2&t&&Object(r.attr)(s,"min",e[1]),4&t&&Object(r.attr)(s,"max",e[2]),8&t&&Object(r.attr)(s,"step",e[3]),16&t&&(s.disabled=e[4]),1&t&&Object(r.to_number)(s.value)!==e[0].to&&Object(r.set_input_value)(s,e[0].to)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),l=!1,Object(r.run_all)(d)}}}function i(e,t,n){let c;Object(r.component_subscribe)(e,o._,e=>n(5,c=e));const i=Object(a.createEventDispatcher)();let{min:s=0}=t,{max:l=100}=t,{value:d={from:s,to:l}}=t,{step:u=1}=t,{disabled:b=!1}=t,{disableDirectEditing:p=!0}=t;function f(){i("change",d)}return e.$$set=e=>{"min"in e&&n(1,s=e.min),"max"in e&&n(2,l=e.max),"value"in e&&n(0,d=e.value),"step"in e&&n(3,u=e.step),"disabled"in e&&n(4,b=e.disabled),"disableDirectEditing"in e&&n(8,p=e.disableDirectEditing)},[d,s,l,u,b,c,f,function(e){p&&!["ArrowUp","ArrowDown","Tab","F5"].includes(e.key)&&e.preventDefault()},p,function(){d.from=Object(r.to_number)(this.value),n(0,d)},e=>{n(0,d.from=d.from?d.from>d.to?d.to:d.from:s,d),f()},function(){d.to=Object(r.to_number)(this.value),n(0,d)},e=>{n(0,d.to=d.to?d.to<d.from?d.from:d.to:l,d),f()}]}class s extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-mxs8t2-style")||((t=Object(r.element)("style")).id="svelte-mxs8t2-style",t.textContent="input[type=number].svelte-mxs8t2{width:3rem;text-align:center}",Object(r.append)(document.head,t)),Object(r.init)(this,e,i,c,r.safe_not_equal,{min:1,max:2,value:0,step:3,disabled:4,disableDirectEditing:8})}}t.default=s},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(101),c=n(63),i=n(8),s=n(36),l=n(9),d=n(15);function u(e){let t,n,a,c,s,l,d,u,b,p,f,O,j,m,g,h,y=e[7].whatif.label+"",v=Object(i.formatNumber)(e[3].currentTotalPp)+"",_=Object(i.formatNumber)(e[3].diff)+"",w=Object(i.formatNumber)(e[3].newTotalPp)+"";return{c(){t=Object(r.element)("button"),t.textContent="?",a=Object(r.space)(),c=Object(r.element)("div"),s=Object(r.text)(y),l=Object(r.space)(),d=Object(r.text)(v),u=Object(r.text)(" + "),b=Object(r.element)("strong"),p=Object(r.text)(_),f=Object(r.text)(" =\n        "),O=Object(r.element)("strong"),j=Object(r.text)(w),m=Object(r.text)("pp"),Object(r.attr)(t,"class","what-if"),Object(r.attr)(b,"class","svelte-s90139"),Object(r.attr)(O,"class","inc svelte-s90139"),Object(r.attr)(c,"class","tooltip svelte-s90139")},m(i,y){Object(r.insert)(i,t,y),e[11](t),Object(r.insert)(i,a,y),Object(r.insert)(i,c,y),Object(r.append)(c,s),Object(r.append)(c,l),Object(r.append)(c,d),Object(r.append)(c,u),Object(r.append)(c,b),Object(r.append)(b,p),Object(r.append)(c,f),Object(r.append)(c,O),Object(r.append)(O,j),Object(r.append)(O,m),e[12](c),g||(h=[Object(r.action_destroyer)(n=o.hoverable.call(null,t)),Object(r.listen)(t,"hover",e[8]),Object(r.listen)(t,"unhover",e[9])],g=!0)},p(e,t){128&t&&y!==(y=e[7].whatif.label+"")&&Object(r.set_data)(s,y),8&t&&v!==(v=Object(i.formatNumber)(e[3].currentTotalPp)+"")&&Object(r.set_data)(d,v),8&t&&_!==(_=Object(i.formatNumber)(e[3].diff)+"")&&Object(r.set_data)(p,_),8&t&&w!==(w=Object(i.formatNumber)(e[3].newTotalPp)+"")&&Object(r.set_data)(j,w)},d(n){n&&Object(r.detach)(t),e[11](null),n&&Object(r.detach)(a),n&&Object(r.detach)(c),e[12](null),g=!1,Object(r.run_all)(h)}}}function b(e){let t,n=e[0]&&e[5]&&e[6]&&(!e[4]||Object(i.round)(e[0])>Object(i.round)(e[4])),a=n&&u(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,n){a&&a.m(e,n),Object(r.insert)(e,t,n)},p(e,[r]){113&r&&(n=e[0]&&e[5]&&e[6]&&(!e[4]||Object(i.round)(e[0])>Object(i.round)(e[4]))),n?a?a.p(e,r):(a=u(e),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},i:r.noop,o:r.noop,d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function p(e,t,n){let o;Object(r.component_subscribe)(e,l._,e=>n(7,o=e));let i,u,b,p,f,{leaderboardId:O}=t,{pp:j=0}=t,m={currentTotalPp:0,newTotalPp:0,diff:0};return Object(a.onMount)(async e=>{if(n(5,p=await Object(s.getMainPlayerId)()),p){n(6,f=await Object(d.getScoresByPlayerId)(p));const e=await Object(d.getSongScoreByPlayerId)(p,O);n(4,b=e?e.pp:void 0)}}),e.$$set=e=>{"leaderboardId"in e&&n(10,O=e.leaderboardId),"pp"in e&&n(0,j=e.pp)},[j,i,u,m,b,p,f,o,async function(e){const t=await Object(c.getWhatIfScore)(await Object(s.getMainPlayerId)(),O,j);n(3,m=Object.assign({},m,t)),n(2,u.style.display="inline-block",u)},function(e){n(2,u.style.display="none",u)},O,function(e){r.binding_callbacks[e?"unshift":"push"](()=>{i=e,n(1,i)})},function(e){r.binding_callbacks[e?"unshift":"push"](()=>{u=e,n(2,u)})}]}class f extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-s90139-style")||((t=Object(r.element)("style")).id="svelte-s90139-style",t.textContent=".tooltip.svelte-s90139{display:none;position:absolute;top:0;right:1rem;z-index:10;width:21rem;padding:.25rem;font-size:.875rem;font-weight:normal;text-align:center;color:var(--textColor);background-color:var(--foreground);border:1px solid var(--textColor)}strong.svelte-s90139{color:inherit !important;background-color:inherit !important}.inc.svelte-s90139{color:#42b129!important}",Object(r.append)(document.head,t)),Object(r.init)(this,e,p,b,r.safe_not_equal,{leaderboardId:10,pp:0})}}t.default=f},function(e,t,n){"use strict";function r(e){function t(t){e.dispatchEvent(new CustomEvent("hover",{detail:{target:t.target,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}}))}function n(t){e.dispatchEvent(new CustomEvent("unhover",{detail:{target:t.target,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}}))}return e.addEventListener("mouseover",t),e.addEventListener("mouseout",n),{destroy(){e.removeEventListener("mouseover",t),e.removeEventListener("mouseout",n)}}}n.r(t),n.d(t,"hoverable",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(8);function o(e){let t,n;return{c(){t=Object(r.element)("span"),n=Object(r.text)(e[0])},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,[t]){1&t&&Object(r.set_data)(n,e[0])},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function c(e,t,n){let r,{value:o=0}=t,{zero:c="-"}=t,{suffix:i=""}=t,{withZeroSuffix:s=!1}=t,{inline:l=!1}=t;return e.$$set=e=>{"value"in e&&n(1,o=e.value),"zero"in e&&n(2,c=e.zero),"suffix"in e&&n(3,i=e.suffix),"withZeroSuffix"in e&&n(4,s=e.withZeroSuffix),"inline"in e&&n(5,l=e.inline)},e.$$.update=()=>{30&e.$$.dirty&&n(0,r=o?Math.floor(o/60)+":"+Object(a.padNumber)(Math.round(o%60))+i:c+(s?i:""))},[r,o,c,i,s,l]}class i extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,c,o,r.safe_not_equal,{value:1,zero:2,suffix:3,withZeroSuffix:4,inline:5})}}t.default=i},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(22);function o(e){let t,n,a,o,c=(e[0]?e[2].shortName:e[2].fullName)+"";return{c(){t=Object(r.element)("span"),n=Object(r.text)(c),Object(r.attr)(t,"class",a=Object(r.null_to_empty)("diff "+(e[1]?"reversed":""))+" svelte-19swrtt"),Object(r.set_style)(t,"color",e[1]?"white":e[2].color),Object(r.set_style)(t,"background-color",e[1]?e[2].color:"transparent"),Object(r.attr)(t,"title",o=e[0]&&"Standard"!==e[2].type?e[2].type:"")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,i){5&i&&c!==(c=(e[0]?e[2].shortName:e[2].fullName)+"")&&Object(r.set_data)(n,c),2&i&&a!==(a=Object(r.null_to_empty)("diff "+(e[1]?"reversed":""))+" svelte-19swrtt")&&Object(r.attr)(t,"class",a),6&i&&Object(r.set_style)(t,"color",e[1]?"white":e[2].color),6&i&&Object(r.set_style)(t,"background-color",e[1]?e[2].color:"transparent"),5&i&&o!==(o=e[0]&&"Standard"!==e[2].type?e[2].type:"")&&Object(r.attr)(t,"title",o)},d(e){e&&Object(r.detach)(t)}}}function c(e){let t,n=e[2]&&o(e);return{c(){n&&n.c(),t=Object(r.empty)()},m(e,a){n&&n.m(e,a),Object(r.insert)(e,t,a)},p(e,[r]){e[2]?n?n.p(e,r):(n=o(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:r.noop,o:r.noop,d(e){n&&n.d(e),e&&Object(r.detach)(t)}}}function i(e,t,n){let r,{diff:o}=t,{useShortName:c=!1}=t,{reverseColors:i=!1}=t;return e.$$set=e=>{"diff"in e&&n(3,o=e.diff),"useShortName"in e&&n(0,c=e.useShortName),"reverseColors"in e&&n(1,i=e.reverseColors)},e.$$.update=()=>{8&e.$$.dirty&&n(2,r=o?Object(a.getHumanDiffInfo)(o):null)},[c,i,r,o]}class s extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-19swrtt-style")||((t=Object(r.element)("style")).id="svelte-19swrtt-style",t.textContent=".diff.svelte-19swrtt{display:inline-block}.reversed.svelte-19swrtt{font-weight:600;padding:0 2px;min-width:1.5rem}",Object(r.append)(document.head,t)),Object(r.init)(this,e,i,c,r.safe_not_equal,{diff:3,useShortName:0,reverseColors:1})}}t.default=s},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9),c=n(13),i=n(22),s=n(105),l=n(107),d=n(6),u=n(39),b=n(36);function p(e){let t,n;return t=new s.default({props:{leaderboardId:e[0],diffs:e[13],scores:e[1]&&e[1].scores?e[1].scores:[],song:e[1]&&e[1].song?e[1].song:{},pageNum:e[11]+1,totalItems:e[14],maxScore:e[12],highlight:e[6],pauseLoading:!1,$$slots:{default:[f,({data:e,diffs:t,totalItems:n,error:r,beforeChanged:a,isPaused:o,isLoading:c,initialized:i,hash:s})=>({32:e,13:t,14:n,33:r,34:a,35:o,36:c,16:i,15:s}),({data:e,diffs:t,totalItems:n,error:r,beforeChanged:a,isPaused:o,isLoading:c,initialized:i,hash:s})=>[(t?8192:0)|(n?16384:0)|(i?65536:0)|(s?32768:0),(e?2:0)|(r?4:0)|(a?8:0)|(o?16:0)|(c?32:0)]]},$$scope:{ctx:e}}}),t.$on("leaderboard-page-loaded",e[19]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n[0]&&(r.leaderboardId=e[0]),8192&n[0]&&(r.diffs=e[13]),2&n[0]&&(r.scores=e[1]&&e[1].scores?e[1].scores:[]),2&n[0]&&(r.song=e[1]&&e[1].song?e[1].song:{}),2048&n[0]&&(r.pageNum=e[11]+1),16384&n[0]&&(r.totalItems=e[14]),4096&n[0]&&(r.maxScore=e[12]),64&n[0]&&(r.highlight=e[6]),126909&n[0]|126&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function f(e){let t,n,a;function o(t){e[21].call(null,t)}let c={leaderboardId:e[0],initialized:e[16],data:e[32],hash:e[15],diffs:e[13],error:e[33],currentPage:e[11],totalItems:e[14],onlySelectedDiff:e[7],showDifferences:e[3],showBgCover:e[4],bgLeft:e[8],bgTop:e[5],bgWidth:e[9],bgHeight:e[10],isLoading:e[36],beforeChanged:e[34],isPaused:e[35]};return void 0!==e[2]&&(c.type=e[2]),t=new l.default({props:c}),r.binding_callbacks.push(()=>Object(r.bind)(t,"type",o)),t.$on("diff-change",e[17]),t.$on("browse",e[18]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,n){Object(r.mount_component)(t,e,n),a=!0},p(e,a){const o={};1&a[0]&&(o.leaderboardId=e[0]),65536&a[0]&&(o.initialized=e[16]),2&a[1]&&(o.data=e[32]),32768&a[0]&&(o.hash=e[15]),8192&a[0]&&(o.diffs=e[13]),4&a[1]&&(o.error=e[33]),2048&a[0]&&(o.currentPage=e[11]),16384&a[0]&&(o.totalItems=e[14]),128&a[0]&&(o.onlySelectedDiff=e[7]),8&a[0]&&(o.showDifferences=e[3]),16&a[0]&&(o.showBgCover=e[4]),256&a[0]&&(o.bgLeft=e[8]),32&a[0]&&(o.bgTop=e[5]),512&a[0]&&(o.bgWidth=e[9]),1024&a[0]&&(o.bgHeight=e[10]),32&a[1]&&(o.isLoading=e[36]),8&a[1]&&(o.beforeChanged=e[34]),16&a[1]&&(o.isPaused=e[35]),!n&&4&a[0]&&(n=!0,o.type=e[2],Object(r.add_flush_callback)(()=>n=!1)),t.$set(o)},i(e){a||(Object(r.transition_in)(t.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),a=!1},d(e){Object(r.destroy_component)(t,e)}}}function O(e){let t,n,a=e[16]&&p(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[16]?a?(a.p(e,n),65536&n[0]&&Object(r.transition_in)(a,1)):(a=p(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function j(e,t,n){let s;Object(r.component_subscribe)(e,o._,e=>n(25,s=e));const l=Object(a.createEventDispatcher)();let{leaderboardId:p}=t,{startAtRank:f=1}=t,{highlight:O=[]}=t,{leaderboardPage:j={}}=t,{type:m="live"}=t,{onlySelectedDiff:g=!1}=t,{showDifferences:h=!0}=t,{showBgCover:y=!0}=t,{bgLeft:v="0rem"}=t,{bgTop:_="0rem"}=t,{bgWidth:w="0rem"}=t,{bgHeight:k="0rem"}=t,$=m,x=null,S=j&&j.diffs?j.diffs:[],P=Math.floor((f-1)/u.SCORES_PER_PAGE),I=0,C=null,T=null;const A=_;let q=null,R=!1;async function z(){const e=await Object(b.getConfig)("songLeaderboard");n(4,y=y&&!(!e||!1===e.showBgCover)),n(3,h=h&&!(!e||!e.showDiff))}return Object(a.onMount)(async()=>{await z(),n(24,q=await Object(b.getMainPlayerId)());const e=c.default.on("config-changed",z);return p&&Object(d.isEmpty)(j)&&n(16,R=!0),e}),e.$$set=e=>{"leaderboardId"in e&&n(0,p=e.leaderboardId),"startAtRank"in e&&n(20,f=e.startAtRank),"highlight"in e&&n(6,O=e.highlight),"leaderboardPage"in e&&n(1,j=e.leaderboardPage),"type"in e&&n(2,m=e.type),"onlySelectedDiff"in e&&n(7,g=e.onlySelectedDiff),"showDifferences"in e&&n(3,h=e.showDifferences),"showBgCover"in e&&n(4,y=e.showBgCover),"bgLeft"in e&&n(8,v=e.bgLeft),"bgTop"in e&&n(5,_=e.bgTop),"bgWidth"in e&&n(9,w=e.bgWidth),"bgHeight"in e&&n(10,k=e.bgHeight)},e.$$.update=()=>{16785409&e.$$.dirty[0]&&function(e,t,r){if(e&&(e.length>1||1===e.length&&e[0].id!==r)||t)return void n(5,_=A);const a=A.match(/^([\d-.]+)(.*)$/);a&&["rem","em"].includes(a[2])&&n(5,_=parseFloat(a[1])+2+a[2])}(S,q,p),2&e.$$.dirty[0]&&function(e){if(Object(d.isEmpty)(e))return;const t=(t,n=null)=>e&&e[t]?e[t]:n,r=t("currentDiff");if(x!==r){n(23,x=r),n(13,S=t("diffs",[]).filter(e=>!g||e.id===p).map(e=>g?{...e,name:s.plugin.liveButton}:e)),n(11,P=e&&e.pageNum?e.pageNum-1:0),n(14,I=t("totalItems",0));const a=t("song");n(15,C=a&&a.hash?a.hash:null),n(16,R=!0)}"cached"===$?$=null:n(2,m="live")}(j),8421377&e.$$.dirty[0]&&async function(e,t,r){e&&t&&r&&n(12,T=await Object(i.getLeaderboardMaxScore)(e,t,r))}(p,C,x)},[p,j,m,h,y,_,O,g,v,w,k,P,T,S,I,C,R,function(e){e&&e.detail&&e.detail.leaderboardId&&e.detail.type&&(n(0,p=e.detail.leaderboardId),n(11,P=e.detail.page?e.detail.page:0),n(2,m=e.detail.type),l("diff-change",e.detail))},function(e){e&&e.detail&&e.detail.hasOwnProperty("currentPage")&&(n(11,P=e.detail.currentPage),l("browse",{leaderboardId:p,type:m,page:P}))},function(e){e&&e.detail&&n(1,j=e.detail)},f,function(e){m=e,n(2,m)}]}class m extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,j,O,r.safe_not_equal,{leaderboardId:0,startAtRank:20,highlight:6,leaderboardPage:1,type:2,onlySelectedDiff:7,showDifferences:3,showBgCover:4,bgLeft:8,bgTop:5,bgWidth:9,bgHeight:10},[-1,-1])}}t.default=m},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(13),c=n(40),i=n(39),s=n(9),l=n(6),d=n(106),u=n(22),b=n(36);const p=e=>({data:8&e,diffs:2&e,totalItems:1&e,error:16&e,isLoading:32&e,isPaused:4&e,hash:128&e,initialized:64&e}),f=e=>({data:e[3],diffs:e[1],totalItems:e[0],error:e[4],isLoading:e[5],isPaused:e[2],beforeChanged:e[8],hash:e[7],initialized:e[6]});function O(e){let t;const n=e[16].default,a=Object(r.create_slot)(n,e,e[15],f);return{c(){a&&a.c()},m(e,n){a&&a.m(e,n),t=!0},p(e,[t]){a&&a.p&&33023&t&&Object(r.update_slot)(a,n,e,e[15],t,p,f)},i(e){t||(Object(r.transition_in)(a,e),t=!0)},o(e){Object(r.transition_out)(a,e),t=!1},d(e){a&&a.d(e)}}}function j(e,t,n){let p;Object(r.component_subscribe)(e,s._,e=>n(21,p=e));let{$$slots:f={},$$scope:O}=t;const j=Object(a.createEventDispatcher)();let{leaderboardId:m=null}=t,{scores:g=[]}=t,{song:h={}}=t,{diffs:y=[]}=t,{pageNum:v=1}=t,{totalItems:_=0}=t,{pauseLoading:w=!1}=t,{maxScore:k}=t,{highlight:$=[]}=t,x=g&&g.length?{scores:g,pageNum:v,totalItems:_,pageQty:Math.ceil(_/i.PLAYS_PER_PAGE),leaderboardId:m}:null,S=[],P=null,I={},C=null,T=!1,A=!1,q=h&&h.hash?h.hash:null,R=null;const z=async()=>{if(!(m&&S&&S.length&&I&&S[0].leaderboardId===m&&x&&x.leaderboardId===m))return;const e=k+"::"+m+"::"+x.pageNum+"::"+Object.values(I).map(e=>e.score&&e.playerId?e.playerId+"/"+e.score:"").join("::");R!==e&&(R=e,n(3,S=await Promise.all(S.map(async e=>{if(!e||!e.playerId)return e;const t=I[e.playerId]&&I[e.playerId].leaderboardId===e.leaderboardId?I[e.playerId]:null;return await Object(d.enhanceScore)(e,t,k)}))))};async function E(e){if(!e)return;const t=await Object(u.getSongScores)(e);n(19,I=t&&t.length?Object(l.convertArrayToObjectByKey)(t,"playerId"):{}),z()}async function B(e){e?(n(0,_=e.totalItems&&!isNaN(e.totalItems)?e.totalItems:_),n(3,S=e.scores.map(t=>({...t,leaderboardId:e.leaderboardId,highlight:t&&t.playerId&&(t.playerId===P||$&&$.includes(t.playerId))}))),await Object(a.tick)(),z()):n(3,S=[])}async function D(e,t){if(e&&A&&!w){if(t||(t=v),x&&x.pageNum===t&&x.leaderboardId===e)return!0;n(4,C=null);try{n(5,T=!0);const r=await Object(c.fetchSsSongLeaderboardPage)(e,t);if(!r||!r.scores||isNaN(r.totalItems))throw"Download error";n(17,x={...r}),n(9,v=t),n(7,q=r&&r.song&&r.song.hash?r.song.hash:q),n(5,T=!1),j("leaderboard-page-loaded",x)}catch(e){return n(5,T=!1),n(4,C=p.common.downloadError),!1}return!0}}return Object(a.onMount)(async()=>{P=await Object(b.getMainPlayerId)(),await E(m),x&&await B(x);const e=o.default.on("data-refreshed",async()=>{E(m)}),t=o.default.on("player-scores-updated",async()=>{await E(m)});return n(6,A=!0),()=>{e(),t()}}),e.$$set=e=>{"leaderboardId"in e&&n(10,m=e.leaderboardId),"scores"in e&&n(11,g=e.scores),"song"in e&&n(12,h=e.song),"diffs"in e&&n(1,y=e.diffs),"pageNum"in e&&n(9,v=e.pageNum),"totalItems"in e&&n(0,_=e.totalItems),"pauseLoading"in e&&n(2,w=e.pauseLoading),"maxScore"in e&&n(13,k=e.maxScore),"highlight"in e&&n(14,$=e.highlight),"$$scope"in e&&n(15,O=e.$$scope)},e.$$.update=()=>{131072&e.$$.dirty&&x&&B(x),1092&e.$$.dirty&&D(m,void 0),1024&e.$$.dirty&&E(m),664576&e.$$.dirty&&z()},[_,y,w,S,C,T,A,q,async function(e){return"live"!==e.type||await D(e.leaderboardId,e.page+1)},v,m,g,h,k,$,O,f]}class m extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,j,O,r.safe_not_equal,{leaderboardId:10,scores:11,song:12,diffs:1,pageNum:9,totalItems:0,pauseLoading:2,maxScore:13,highlight:14})}}t.default=m},function(e,t,n){"use strict";n.r(t),n.d(t,"enhanceScore",(function(){return f})),n.d(t,"findTwitchVideo",(function(){return O}));var r=n(22),a=n(7),o=n(23),c=n(8),i=n(14);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){u(o,r,a,c,i,"next",e)}function i(e){u(o,r,a,c,i,"throw",e)}c(void 0)}))}}n(87);var p,f=(p=b((function*(e,t,n){var s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],d={};try{var u,b,p,f,O,j=null!=n?n:null==t?void 0:t.maxScoreEx,m=Object(a.dateFromString)(e.timeset),g=(null==t?void 0:t.timeset)&&m&&(null==t||null===(u=t.timeset)||void 0===u?void 0:u.getTime())===m.getTime()&&(null==t?void 0:t.pp)&&e.pp&&Math.abs(Object(c.round)(t.pp)-Object(c.round)(e.pp))<=.015;d=g?l(l(l({},e),t),{},{maxScoreEx:j,rank:e.rank,pp:t.pp?t.pp:e.pp}):l({},e),!j||!d.score||(null===(b=d)||void 0===b||null===(p=b.mods)||void 0===p?void 0:p.length)&&"-"!==(null===(f=d)||void 0===f?void 0:f.mods)||(d.acc=100*d.score/j);var h=e.timeset&&(null==t?void 0:t.timeset)&&t.timeset<e.timeset;!d.acc&&d.score&&j&&(d.acc=Object(r.getAccFromScore)({score:d.score,maxScoreEx:j})),!d.score&&d.acc&&(d.score=j?Math.round(d.acc*j/100):null,d.scoreApproximate=!0),d.hidden=!!(null==t?void 0:t.acc)&&Object(o.shouldBeHidden)(Object.assign({},t,{id:t.playerId,acc:t.acc}));var y=(Array.isArray(null==t?void 0:t.history)&&t.history.length?t.history:[]).sort((e,t)=>t.score-e.score)[0];(h||y)&&(d.prevRank=h?t.rank:y.rank,d.prevPp=h?t.pp:y.pp,d.prevScore=h?t.score:y.score,d.prevTimeset=h?Object(a.dateFromString)(t.timeset):new Date(y.timestamp),d.prevAcc=Object(r.getAccFromScore)({score:h?t.score:y.score,uScore:h?t.uScore:y.uScore,maxScoreEx:j})),(null==t||null===(O=t.beatSavior)||void 0===O?void 0:O.trackers)&&(d.accTooltip=Object(i.getAccTooltipFromTrackers)(t.beatSavior.trackers),d.beatSavior=t.beatSavior),s&&e.beatSavior&&(d.bsExistsForPlayer=e.playerId)}catch(e){}return d})),function(e,t,n){return p.apply(this,arguments)});function O(e,t,n){return j.apply(this,arguments)}function j(){return(j=b((function*(e,t,n){if(!(e&&e.videos&&t&&n))return null;var r=Object(a.addToDate)(t,1e3*-n),o=e.videos.map(e=>Object.assign({},e,{created_at:Object(a.dateFromString)(e.created_at),ended_at:Object(a.addToDate)(Object(a.dateFromString)(e.created_at),Object(a.durationToMillis)(e.duration))})).find(e=>e.created_at<=r&&r<e.ended_at);return o?Object.assign({},o,{url:o.url+"?t="+Object(a.millisToDuration)(r-o.created_at)}):null}))).apply(this,arguments)}},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9),c=n(39),i=n(108),s=n(98),l=n(115),d=n(116);const u=e=>({score:4&e}),b=e=>({score:e[27]});function p(e,t,n){const r=e.slice();return r[27]=t[n],r}function f(e){let t,n,a,o,c,i,s;function l(t){e[24].call(null,t)}let u={leaderboardId:e[1],diffs:e[3],beforeDiffChanged:e[20]};void 0!==e[0]&&(u.type=e[0]),t=new d.default({props:u}),r.binding_callbacks.push(()=>Object(r.bind)(t,"type",l)),t.$on("diff-change",e[25]);const b=[j,O],p=[];function f(e,t){return"cached"===e[0]?0:1}return c=f(e),i=p[c]=b[c](e),{c(){Object(r.create_component)(t.$$.fragment),a=Object(r.space)(),o=Object(r.element)("div"),i.c(),Object(r.attr)(o,"class","content")},m(e,n){Object(r.mount_component)(t,e,n),Object(r.insert)(e,a,n),Object(r.insert)(e,o,n),p[c].m(o,null),s=!0},p(e,a){const s={};2&a&&(s.leaderboardId=e[1]),8&a&&(s.diffs=e[3]),!n&&1&a&&(n=!0,s.type=e[0],Object(r.add_flush_callback)(()=>n=!1)),t.$set(s);let l=c;c=f(e),c===l?p[c].p(e,a):(Object(r.group_outros)(),Object(r.transition_out)(p[l],1,1,()=>{p[l]=null}),Object(r.check_outros)(),i=p[c],i||(i=p[c]=b[c](e),i.c()),Object(r.transition_in)(i,1),i.m(o,null))},i(e){s||(Object(r.transition_in)(t.$$.fragment,e),Object(r.transition_in)(i),s=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),Object(r.transition_out)(i),s=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(a),e&&Object(r.detach)(o),p[c].d()}}}function O(e){let t,n,a,o,i,l,d;const u=[h,g,m],b=[];function p(e,t){return e[2]&&e[2].length?0:e[13]?1:e[6]?-1:2}~(n=p(e))&&(a=b[n]=u[n](e)),i=new s.default({props:{currentPage:e[4],itemsPerPage:c.SCORES_PER_PAGE,totalItems:e[5],itemsPerPageValues:null,beforePageChanged:e[19],hide:e[7]}}),i.$on("page-changed",e[18]);let f=e[6]&&v(e);return{c(){t=Object(r.element)("div"),a&&a.c(),o=Object(r.space)(),Object(r.create_component)(i.$$.fragment),l=Object(r.space)(),f&&f.c(),Object(r.attr)(t,"class","leaderboard-container svelte-1rxvu09"),Object(r.set_style)(t,"--background-image","url(/imports/images/songs/"+(e[12]&&e[16]&&e[16].length?e[16]:"")+".png)"),Object(r.set_style)(t,"--bgLeft",e[8]),Object(r.set_style)(t,"--bgTop",e[9]),Object(r.set_style)(t,"--bgHeight",e[11]),Object(r.set_style)(t,"--bgWidth",e[10])},m(e,a){Object(r.insert)(e,t,a),~n&&b[n].m(t,null),Object(r.append)(t,o),Object(r.mount_component)(i,t,null),Object(r.append)(t,l),f&&f.m(t,null),d=!0},p(e,c){let s=n;n=p(e),n===s?~n&&b[n].p(e,c):(a&&(Object(r.group_outros)(),Object(r.transition_out)(b[s],1,1,()=>{b[s]=null}),Object(r.check_outros)()),~n?(a=b[n],a||(a=b[n]=u[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,o)):a=null);const l={};16&c&&(l.currentPage=e[4]),32&c&&(l.totalItems=e[5]),128&c&&(l.hide=e[7]),i.$set(l),e[6]?f?f.p(e,c):(f=v(e),f.c(),f.m(t,null)):f&&(f.d(1),f=null),(!d||69632&c)&&Object(r.set_style)(t,"--background-image","url(/imports/images/songs/"+(e[12]&&e[16]&&e[16].length?e[16]:"")+".png)"),(!d||256&c)&&Object(r.set_style)(t,"--bgLeft",e[8]),(!d||512&c)&&Object(r.set_style)(t,"--bgTop",e[9]),(!d||2048&c)&&Object(r.set_style)(t,"--bgHeight",e[11]),(!d||1024&c)&&Object(r.set_style)(t,"--bgWidth",e[10])},i(e){d||(Object(r.transition_in)(a),Object(r.transition_in)(i.$$.fragment,e),d=!0)},o(e){Object(r.transition_out)(a),Object(r.transition_out)(i.$$.fragment,e),d=!1},d(e){e&&Object(r.detach)(t),~n&&b[n].d(),Object(r.destroy_component)(i),f&&f.d()}}}function j(e){let t,n;return t=new l.default({props:{leaderboardId:e[1],tableOnly:!0,showDiff:e[15],showBgCover:e[12],bgWidth:e[10],bgHeight:e[11],bgLeft:e[8],bgTop:e[9]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};2&n&&(r.leaderboardId=e[1]),32768&n&&(r.showDiff=e[15]),4096&n&&(r.showBgCover=e[12]),1024&n&&(r.bgWidth=e[10]),2048&n&&(r.bgHeight=e[11]),256&n&&(r.bgLeft=e[8]),512&n&&(r.bgTop=e[9]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function m(e){let t,n,a=e[17].common.noData+"";return{c(){t=Object(r.element)("p"),n=Object(r.text)(a)},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){131072&t&&a!==(a=e[17].common.noData+"")&&Object(r.set_data)(n,a)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function g(e){let t;return{c(){t=Object(r.element)("div"),t.innerHTML='<i class="fas fa-spinner fa-spin"></i>',Object(r.attr)(t,"class","loading svelte-1rxvu09")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function h(e){let t,n,a,o,c,i,s,l,d,u,b,f,O,j,m,g,h,v,_,w,k,$,x,S,P,I,C,T,A=e[17].songBrowser.fields.rankShort+"",q=e[17].songLeaderboard.player+"",R=e[17].songBrowser.fields.score+"",z=e[17].songBrowser.fields.timesetShort+"",E=e[17].songLeaderboard.mods+"",B=e[17].songBrowser.fields.percentageShort+"",D=e[17].songBrowser.fields.pp+"",L=[],N=new Map,F=e[2];const M=e=>e[27].playerId;for(let t=0;t<F.length;t+=1){let n=p(e,F,t),r=M(n);N.set(r,L[t]=y(r,n))}return{c(){t=Object(r.element)("table"),n=Object(r.element)("thead"),a=Object(r.element)("tr"),o=Object(r.element)("th"),c=Object(r.space)(),i=Object(r.element)("th"),s=Object(r.text)(A),l=Object(r.space)(),d=Object(r.element)("th"),u=Object(r.text)(q),b=Object(r.space)(),f=Object(r.element)("th"),O=Object(r.text)(R),j=Object(r.space)(),m=Object(r.element)("th"),g=Object(r.text)(z),h=Object(r.space)(),v=Object(r.element)("th"),_=Object(r.text)(E),w=Object(r.space)(),k=Object(r.element)("th"),$=Object(r.text)(B),x=Object(r.space)(),S=Object(r.element)("th"),P=Object(r.text)(D),I=Object(r.space)(),C=Object(r.element)("tbody");for(let e=0;e<L.length;e+=1)L[e].c();Object(r.attr)(o,"class","picture svelte-1rxvu09"),Object(r.attr)(i,"class","rank svelte-1rxvu09"),Object(r.attr)(d,"class","player svelte-1rxvu09"),Object(r.attr)(f,"class","score svelte-1rxvu09"),Object(r.attr)(m,"class","timeset svelte-1rxvu09"),Object(r.attr)(v,"class","mods svelte-1rxvu09"),Object(r.attr)(k,"class","percentage svelte-1rxvu09"),Object(r.attr)(S,"class","pp svelte-1rxvu09"),Object(r.attr)(t,"class","ranking songs sspl")},m(e,p){Object(r.insert)(e,t,p),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(a,o),Object(r.append)(a,c),Object(r.append)(a,i),Object(r.append)(i,s),Object(r.append)(a,l),Object(r.append)(a,d),Object(r.append)(d,u),Object(r.append)(a,b),Object(r.append)(a,f),Object(r.append)(f,O),Object(r.append)(a,j),Object(r.append)(a,m),Object(r.append)(m,g),Object(r.append)(a,h),Object(r.append)(a,v),Object(r.append)(v,_),Object(r.append)(a,w),Object(r.append)(a,k),Object(r.append)(k,$),Object(r.append)(a,x),Object(r.append)(a,S),Object(r.append)(S,P),Object(r.append)(t,I),Object(r.append)(t,C);for(let e=0;e<L.length;e+=1)L[e].m(C,null);T=!0},p(e,t){if((!T||131072&t)&&A!==(A=e[17].songBrowser.fields.rankShort+"")&&Object(r.set_data)(s,A),(!T||131072&t)&&q!==(q=e[17].songLeaderboard.player+"")&&Object(r.set_data)(u,q),(!T||131072&t)&&R!==(R=e[17].songBrowser.fields.score+"")&&Object(r.set_data)(O,R),(!T||131072&t)&&z!==(z=e[17].songBrowser.fields.timesetShort+"")&&Object(r.set_data)(g,z),(!T||131072&t)&&E!==(E=e[17].songLeaderboard.mods+"")&&Object(r.set_data)(_,E),(!T||131072&t)&&B!==(B=e[17].songBrowser.fields.percentageShort+"")&&Object(r.set_data)($,B),(!T||131072&t)&&D!==(D=e[17].songBrowser.fields.pp+"")&&Object(r.set_data)(P,D),4194308&t){const n=e[2];Object(r.group_outros)(),L=Object(r.update_keyed_each)(L,t,M,1,e,n,N,C,r.outro_and_destroy_block,y,null,p),Object(r.check_outros)()}},i(e){if(!T){for(let e=0;e<F.length;e+=1)Object(r.transition_in)(L[e]);T=!0}},o(e){for(let e=0;e<L.length;e+=1)Object(r.transition_out)(L[e]);T=!1},d(e){e&&Object(r.detach)(t);for(let e=0;e<L.length;e+=1)L[e].d()}}}function y(e,t){let n,a;const o=t[23].default,c=Object(r.create_slot)(o,t,t[22],b),s=c||function(e){let t,n,a;return t=new i.default({props:{score:e[27]}}),{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)()},m(e,o){Object(r.mount_component)(t,e,o),Object(r.insert)(e,n,o),a=!0},p(e,n){const r={};4&n&&(r.score=e[27]),t.$set(r)},i(e){a||(Object(r.transition_in)(t.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),a=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n)}}}(t);return{key:e,first:null,c(){n=Object(r.empty)(),s&&s.c(),this.first=n},m(e,t){Object(r.insert)(e,n,t),s&&s.m(e,t),a=!0},p(e,t){c?c.p&&4194308&t&&Object(r.update_slot)(c,o,e,e[22],t,u,b):s&&s.p&&4&t&&s.p(e,t)},i(e){a||(Object(r.transition_in)(s,e),a=!0)},o(e){Object(r.transition_out)(s,e),a=!1},d(e){e&&Object(r.detach)(n),s&&s.d(e)}}}function v(e){let t,n;return{c(){t=Object(r.element)("div"),n=Object(r.text)(e[6]),Object(r.attr)(t,"class","error has-text-centered")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){64&t&&Object(r.set_data)(n,e[6])},d(e){e&&Object(r.detach)(t)}}}function _(e){let t,n,a=e[14]&&f(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[14]?a?(a.p(e,n),16384&n&&Object(r.transition_in)(a,1)):(a=f(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function w(e,t,n){let c;Object(r.component_subscribe)(e,o._,e=>n(17,c=e));let{$$slots:i={},$$scope:s}=t;const l=Object(a.createEventDispatcher)();let{leaderboardId:d}=t,{data:u=[]}=t,{diffs:b=[]}=t,{currentPage:p=0}=t,{totalItems:f=0}=t,{error:O=null}=t,{isPaused:j=!1}=t,{beforeChanged:m}=t,{bgLeft:g="0rem"}=t,{bgTop:h="0rem"}=t,{bgWidth:y="0rem"}=t,{bgHeight:v="0rem"}=t,{showBgCover:_=!0}=t,{type:w="live"}=t,{isLoading:k=!1}=t,{initialized:$=!1}=t,{showDifferences:x=!0}=t,{hash:S=null}=t;return e.$$set=e=>{"leaderboardId"in e&&n(1,d=e.leaderboardId),"data"in e&&n(2,u=e.data),"diffs"in e&&n(3,b=e.diffs),"currentPage"in e&&n(4,p=e.currentPage),"totalItems"in e&&n(5,f=e.totalItems),"error"in e&&n(6,O=e.error),"isPaused"in e&&n(7,j=e.isPaused),"beforeChanged"in e&&n(21,m=e.beforeChanged),"bgLeft"in e&&n(8,g=e.bgLeft),"bgTop"in e&&n(9,h=e.bgTop),"bgWidth"in e&&n(10,y=e.bgWidth),"bgHeight"in e&&n(11,v=e.bgHeight),"showBgCover"in e&&n(12,_=e.showBgCover),"type"in e&&n(0,w=e.type),"isLoading"in e&&n(13,k=e.isLoading),"initialized"in e&&n(14,$=e.initialized),"showDifferences"in e&&n(15,x=e.showDifferences),"hash"in e&&n(16,S=e.hash),"$$scope"in e&&n(22,s=e.$$scope)},[w,d,u,b,p,f,O,j,g,h,y,v,_,k,$,x,S,c,function(e){l("browse",{currentPage:e.detail.currentPage})},async function(e){return!m||m({leaderboardId:d,page:e,type:"live"})},async function(e){return!m||m(e)},m,s,i,function(e){w=e,n(0,w)},function(t){Object(r.bubble)(e,t)}]}class k extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1rxvu09-style")||((t=Object(r.element)("style")).id="svelte-1rxvu09-style",t.textContent=".loading.svelte-1rxvu09{text-align:center;font-size:3rem}.leaderboard-container.svelte-1rxvu09{position:relative}.leaderboard-container.svelte-1rxvu09:before{position:absolute;content:' ';background-image:var(--background-image);left:var(--bgLeft, 0);top:var(--bgTop, 0);width:calc(100% + var(--bgWidth, 0) - var(--bgLeft, 0));height:calc(100% + var(--bgHeight, 0) - var(--bgTop, 0));background-repeat:no-repeat;background-size:cover;opacity:0.1;pointer-events:none}th.svelte-1rxvu09{padding:.5rem !important;text-align:center!important}th.picture.svelte-1rxvu09{width:2.25rem}th.rank.svelte-1rxvu09{width:3.75rem;text-align:left!important}th.player.svelte-1rxvu09{text-align:left!important}th.score.svelte-1rxvu09{width:5rem!important;min-width:auto!important;text-align:left!important}th.timeset.svelte-1rxvu09{width:7.9rem;text-align:left!important}th.mods.svelte-1rxvu09{width:3.75rem}th.pp.svelte-1rxvu09{width:6rem}",Object(r.append)(document.head,t)),Object(r.init)(this,e,w,_,r.safe_not_equal,{leaderboardId:1,data:2,diffs:3,currentPage:4,totalItems:5,error:6,isPaused:7,beforeChanged:21,bgLeft:8,bgTop:9,bgWidth:10,bgHeight:11,showBgCover:12,type:0,isLoading:13,initialized:14,showDifferences:15,hash:16})}}t.default=k},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(59),c=(n(9),n(13)),i=n(8),s=n(100),l=n(109),d=n(64),u=n(36),b=n(110),p=n(113),f=n(114),O=n(74);function j(e){let t,n,a,c,s,u,O,j,h,y,v,_,w,k,$,x,S,P,I,C,T,A,q,R,z,E,B,D,L,N=e[0].timesetAgo+"",F=(e[0].mods?e[0].mods:"-")+"";a=new b.default({props:{playerId:e[0].playerId,url:e[0].picture}}),u=new p.default({props:{rank:e[0].rank,url:""}}),h=new f.default({props:{user:e[0].playerId&&e[0].playerName?{id:e[0].playerId,name:e[0].playerName,country:e[0].country}:null}}),_=new d.default({props:{value:e[0].score,prevValue:e[2]?e[0].prevScore:null,digits:0}});let M=e[0].prevScore&&e[2]&&m(e);q=new d.default({props:{value:e[0].acc,withZeroSuffix:!1,prevValue:e[2]?e[0].prevAcc:null,suffix:"%",zero:"-",title:e[0].accTooltip}}),E=new l.default({props:{pp:e[0].pp,prevPp:e[2]?e[0].prevPp:null,zero:Object(i.formatNumber)(0),withZeroSuffix:!0}});let U=e[1]&&g(e);return{c(){t=Object(r.element)("tr"),n=Object(r.element)("td"),Object(r.create_component)(a.$$.fragment),c=Object(r.space)(),s=Object(r.element)("td"),Object(r.create_component)(u.$$.fragment),O=Object(r.space)(),j=Object(r.element)("td"),Object(r.create_component)(h.$$.fragment),y=Object(r.space)(),v=Object(r.element)("td"),Object(r.create_component)(_.$$.fragment),w=Object(r.space)(),k=Object(r.element)("td"),$=Object(r.element)("div"),x=Object(r.text)(N),S=Object(r.space)(),M&&M.c(),P=Object(r.space)(),I=Object(r.element)("td"),C=Object(r.text)(F),T=Object(r.space)(),A=Object(r.element)("td"),Object(r.create_component)(q.$$.fragment),R=Object(r.space)(),z=Object(r.element)("td"),Object(r.create_component)(E.$$.fragment),B=Object(r.space)(),U&&U.c(),Object(r.attr)(n,"class","picture svelte-1a78mry"),Object(r.attr)(s,"class","rank svelte-1a78mry"),Object(r.attr)(j,"class","player svelte-1a78mry"),Object(r.attr)(v,"class","score svelte-1a78mry"),Object(r.attr)(k,"class","timeset svelte-1a78mry"),Object(r.attr)(I,"class","mods svelte-1a78mry"),Object(r.attr)(A,"class","percentage svelte-1a78mry"),Object(r.attr)(z,"class","pp svelte-1a78mry"),Object(r.toggle_class)(t,"main",e[0].highlight)},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),Object(r.append)(t,c),Object(r.append)(t,s),Object(r.mount_component)(u,s,null),Object(r.append)(t,O),Object(r.append)(t,j),Object(r.mount_component)(h,j,null),Object(r.append)(t,y),Object(r.append)(t,v),Object(r.mount_component)(_,v,null),Object(r.append)(t,w),Object(r.append)(t,k),Object(r.append)(k,$),Object(r.append)($,x),Object(r.append)(k,S),M&&M.m(k,null),Object(r.append)(t,P),Object(r.append)(t,I),Object(r.append)(I,C),Object(r.append)(t,T),Object(r.append)(t,A),Object(r.mount_component)(q,A,null),Object(r.append)(t,R),Object(r.append)(t,z),Object(r.mount_component)(E,z,null),Object(r.append)(z,B),U&&U.m(z,null),L=!0},p(e,n){const o={};1&n&&(o.playerId=e[0].playerId),1&n&&(o.url=e[0].picture),a.$set(o);const c={};1&n&&(c.rank=e[0].rank),u.$set(c);const i={};1&n&&(i.user=e[0].playerId&&e[0].playerName?{id:e[0].playerId,name:e[0].playerName,country:e[0].country}:null),h.$set(i);const s={};1&n&&(s.value=e[0].score),5&n&&(s.prevValue=e[2]?e[0].prevScore:null),_.$set(s),(!L||1&n)&&N!==(N=e[0].timesetAgo+"")&&Object(r.set_data)(x,N),e[0].prevScore&&e[2]?M?(M.p(e,n),5&n&&Object(r.transition_in)(M,1)):(M=m(e),M.c(),Object(r.transition_in)(M,1),M.m(k,null)):M&&(Object(r.group_outros)(),Object(r.transition_out)(M,1,1,()=>{M=null}),Object(r.check_outros)()),(!L||1&n)&&F!==(F=(e[0].mods?e[0].mods:"-")+"")&&Object(r.set_data)(C,F);const l={};1&n&&(l.value=e[0].acc),5&n&&(l.prevValue=e[2]?e[0].prevAcc:null),1&n&&(l.title=e[0].accTooltip),q.$set(l);const d={};1&n&&(d.pp=e[0].pp),5&n&&(d.prevPp=e[2]?e[0].prevPp:null),E.$set(d),e[1]?U?(U.p(e,n),2&n&&Object(r.transition_in)(U,1)):(U=g(e),U.c(),Object(r.transition_in)(U,1),U.m(z,null)):U&&(Object(r.group_outros)(),Object(r.transition_out)(U,1,1,()=>{U=null}),Object(r.check_outros)()),1&n&&Object(r.toggle_class)(t,"main",e[0].highlight)},i(e){L||(Object(r.transition_in)(a.$$.fragment,e),Object(r.transition_in)(u.$$.fragment,e),Object(r.transition_in)(h.$$.fragment,e),Object(r.transition_in)(_.$$.fragment,e),Object(r.transition_in)(M),Object(r.transition_in)(q.$$.fragment,e),Object(r.transition_in)(E.$$.fragment,e),Object(r.transition_in)(U),D||Object(r.add_render_callback)(()=>{D=Object(r.create_in_transition)(t,o.fly,{x:50,duration:500}),D.start()}),L=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),Object(r.transition_out)(u.$$.fragment,e),Object(r.transition_out)(h.$$.fragment,e),Object(r.transition_out)(_.$$.fragment,e),Object(r.transition_out)(M),Object(r.transition_out)(q.$$.fragment,e),Object(r.transition_out)(E.$$.fragment,e),Object(r.transition_out)(U),L=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a),Object(r.destroy_component)(u),Object(r.destroy_component)(h),Object(r.destroy_component)(_),M&&M.d(),Object(r.destroy_component)(q),Object(r.destroy_component)(E),U&&U.d()}}}function m(e){let t,n,a,o;return a=new O.default({props:{date:e[0].prevTimeset,noDate:" "}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("small"),Object(r.create_component)(a.$$.fragment),Object(r.attr)(n,"class","svelte-1a78mry")},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),o=!0},p(e,t){const n={};1&t&&(n.date=e[0].prevTimeset),a.$set(n)},i(e){o||(Object(r.transition_in)(a.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a)}}}function g(e){let t,n;return t=new s.default({props:{leaderboardId:e[0].leaderboardId,pp:e[0].pp}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n&&(r.leaderboardId=e[0].leaderboardId),1&n&&(r.pp=e[0].pp),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function h(e){let t,n,a=e[0]&&j(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=j(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function y(e,t,n){let{score:r={}}=t,o=!0,i=!0;async function s(){const e=await Object(u.getConfig)("songLeaderboard");n(1,o=!(!e||!e.showWhatIfPp)),n(2,i=i&&!(!e||!e.showDiff))}return Object(a.onMount)(async()=>(await s(),c.default.on("config-changed",s))),e.$$set=e=>{"score"in e&&n(0,r=e.score)},[r,o,i]}class v extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1a78mry-style")||((t=Object(r.element)("style")).id="svelte-1a78mry-style",t.textContent=".content table tbody tr:last-child table td, .content table tbody tr:last-child table th{border-bottom-width:1px}.content table tbody tr:last-child table tr:last-child td, .content table tbody tr:last-child table tr:last-child th{border-bottom-width:0px}td.svelte-1a78mry.svelte-1a78mry{vertical-align:middle !important;padding:.5rem!important}td.picture.svelte-1a78mry.svelte-1a78mry{padding:.5rem 0!important}td.score.svelte-1a78mry.svelte-1a78mry,td.pp.svelte-1a78mry.svelte-1a78mry{width:6rem}td.timeset.svelte-1a78mry small.svelte-1a78mry{display:block;color:var(--faded)}td.mods.svelte-1a78mry.svelte-1a78mry,td.percentage.svelte-1a78mry.svelte-1a78mry,td.pp.svelte-1a78mry.svelte-1a78mry{text-align:center}",Object(r.append)(document.head,t)),Object(r.init)(this,e,y,h,r.safe_not_equal,{score:0})}}t.default=v},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9),c=n(63),i=n(8),s=n(64);function l(e){let t,n,a,o,c;const i=[{value:e[4]},{zero:e[2]},{withZeroSuffix:e[3]},{suffix:"pp"},e[7],{prevValue:e[4]-e[5]},{prevTitle:e[6].profile.ppAttribution}];let l={};for(let e=0;e<i.length;e+=1)l=Object(r.assign)(l,i[e]);return a=new s.default({props:l}),{c(){t=Object(r.element)("span"),n=Object(r.text)("("),Object(r.create_component)(a.$$.fragment),o=Object(r.text)(")"),Object(r.attr)(t,"class","scoreTop ppWeightedValue")},m(e,i){Object(r.insert)(e,t,i),Object(r.append)(t,n),Object(r.mount_component)(a,t,null),Object(r.append)(t,o),c=!0},p(e,t){const n=252&t?Object(r.get_spread_update)(i,[16&t&&{value:e[4]},4&t&&{zero:e[2]},8&t&&{withZeroSuffix:e[3]},i[3],128&t&&Object(r.get_spread_object)(e[7]),48&t&&{prevValue:e[4]-e[5]},64&t&&{prevTitle:e[6].profile.ppAttribution}]):{};a.$set(n)},i(e){c||(Object(r.transition_in)(a.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a)}}}function d(e){let t,n,a,o,c;const i=[{value:e[0]},{zero:e[2]},{withZeroSuffix:e[3]},{prevValue:e[1]},{suffix:"pp"},e[7]];let d={};for(let e=0;e<i.length;e+=1)d=Object(r.assign)(d,i[e]);n=new s.default({props:d});let u=null!==e[4]&&void 0!==e[4]&&l(e);return{c(){t=Object(r.element)("span"),Object(r.create_component)(n.$$.fragment),a=Object(r.space)(),u&&u.c(),o=Object(r.empty)(),Object(r.attr)(t,"class","scoreTop ppValue")},m(e,i){Object(r.insert)(e,t,i),Object(r.mount_component)(n,t,null),Object(r.insert)(e,a,i),u&&u.m(e,i),Object(r.insert)(e,o,i),c=!0},p(e,[t]){const a=143&t?Object(r.get_spread_update)(i,[1&t&&{value:e[0]},4&t&&{zero:e[2]},8&t&&{withZeroSuffix:e[3]},2&t&&{prevValue:e[1]},i[4],128&t&&Object(r.get_spread_object)(e[7])]):{};n.$set(a),null!==e[4]&&void 0!==e[4]?u?(u.p(e,t),16&t&&Object(r.transition_in)(u,1)):(u=l(e),u.c(),Object(r.transition_in)(u,1),u.m(o.parentNode,o)):u&&(Object(r.group_outros)(),Object(r.transition_out)(u,1,1,()=>{u=null}),Object(r.check_outros)())},i(e){c||(Object(r.transition_in)(n.$$.fragment,e),Object(r.transition_in)(u),c=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),Object(r.transition_out)(u),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),e&&Object(r.detach)(a),u&&u.d(e),e&&Object(r.detach)(o)}}}function u(e,t,n){const s=["pp","prevPp","zero","withZeroSuffix","weighted","playerId","leaderboardId"];let l,d=Object(r.compute_rest_props)(t,s);Object(r.component_subscribe)(e,o._,e=>n(6,l=e));let{pp:u=0}=t,{prevPp:b=null}=t,{zero:p="-"}=t,{withZeroSuffix:f=!1}=t,{weighted:O=null}=t,{playerId:j=null}=t,{leaderboardId:m=null}=t,g=null;return Object(a.onMount)(async()=>{if(j){const e=await Object(c.getWhatIfScore)(j,m,0);e.diff&&n(5,g=Object(i.round)(-e.diff))}}),e.$$set=e=>{t=Object(r.assign)(Object(r.assign)({},t),Object(r.exclude_internal_props)(e)),n(7,d=Object(r.compute_rest_props)(t,s)),"pp"in e&&n(0,u=e.pp),"prevPp"in e&&n(1,b=e.prevPp),"zero"in e&&n(2,p=e.zero),"withZeroSuffix"in e&&n(3,f=e.withZeroSuffix),"weighted"in e&&n(4,O=e.weighted),"playerId"in e&&n(8,j=e.playerId),"leaderboardId"in e&&n(9,m=e.leaderboardId)},[u,b,p,f,O,g,l,d,j,m]}class b extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,u,d,r.safe_not_equal,{pp:0,prevPp:1,zero:2,withZeroSuffix:3,weighted:4,playerId:8,leaderboardId:9})}}t.default=b},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(15),o=n(111);function c(e){return{c:r.noop,m:r.noop,p:r.noop,i:r.noop,o:r.noop,d:r.noop}}function i(e){let t,n,o,c,i;const d=[l,s],u=[];function b(e,t){return e[4]?0:1}return n=b(e),o=u[n]=d[n](e),{c(){t=Object(r.element)("a"),o.c(),Object(r.attr)(t,"href",c=Object(a.getPlayerProfileUrl)(e[0],!0))},m(e,a){Object(r.insert)(e,t,a),u[n].m(t,null),i=!0},p(e,s){let l=n;n=b(e),n===l?u[n].p(e,s):(Object(r.group_outros)(),Object(r.transition_out)(u[l],1,1,()=>{u[l]=null}),Object(r.check_outros)(),o=u[n],o||(o=u[n]=d[n](e),o.c()),Object(r.transition_in)(o,1),o.m(t,null)),(!i||1&s&&c!==(c=Object(a.getPlayerProfileUrl)(e[0],!0)))&&Object(r.attr)(t,"href",c)},i(e){i||(Object(r.transition_in)(o),i=!0)},o(e){Object(r.transition_out)(o),i=!1},d(e){e&&Object(r.detach)(t),u[n].d()}}}function s(e){let t,n,a,c;return n=new o.default({}),{c(){t=Object(r.element)("figure"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class",a=Object(r.null_to_empty)("image is-"+e[1]+"x"+e[1])+" svelte-bw17ze")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),c=!0},p(e,n){(!c||2&n&&a!==(a=Object(r.null_to_empty)("image is-"+e[1]+"x"+e[1])+" svelte-bw17ze"))&&Object(r.attr)(t,"class",a)},i(e){c||(Object(r.transition_in)(n.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function l(e){let t,n,a,o;return{c(){t=Object(r.element)("figure"),n=Object(r.element)("img"),n.src!==(a=e[4])&&Object(r.attr)(n,"src",a),Object(r.set_style)(n,"border-radius","50%"),Object(r.attr)(t,"class",o=Object(r.null_to_empty)("image is-"+e[1]+"x"+e[1])+" svelte-bw17ze")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,c){4&c&&n.src!==(a=e[4])&&Object(r.attr)(n,"src",a),2&c&&o!==(o=Object(r.null_to_empty)("image is-"+e[1]+"x"+e[1])+" svelte-bw17ze")&&Object(r.attr)(t,"class",o)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function d(e){return{c:r.noop,m:r.noop,p:r.noop,i:r.noop,o:r.noop,d:r.noop}}function u(e){let t,n,a,o={ctx:e,current:null,token:null,hasCatch:!1,pending:d,then:i,catch:c,value:4,blocks:[,,,]};return Object(r.handle_promise)(n=e[2],o),{c(){t=Object(r.empty)(),o.block.c()},m(e,n){Object(r.insert)(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,a=!0},p(t,[a]){if(e=t,o.ctx=e,4&a&&n!==(n=e[2])&&Object(r.handle_promise)(n,o));else{const t=e.slice();t[4]=o.resolved,o.block.p(t,a)}},i(e){a||(Object(r.transition_in)(o.block),a=!0)},o(e){for(let e=0;e<3;e+=1){const t=o.blocks[e];Object(r.transition_out)(t)}a=!1},d(e){e&&Object(r.detach)(t),o.block.d(e),o.token=null,o=null}}}function b(e,t,n){let r,{playerId:o=null}=t,{url:c}=t,{size:i=24}=t;return e.$$set=e=>{"playerId"in e&&n(0,o=e.playerId),"url"in e&&n(3,c=e.url),"size"in e&&n(1,i=e.size)},e.$$.update=()=>{9&e.$$.dirty&&n(2,r=c?Promise.resolve(c):Object(a.getPlayerAvatarUrl)(o))},[o,i,r,c]}class p extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-bw17ze-style")||((t=Object(r.element)("style")).id="svelte-bw17ze-style",t.textContent="figure.svelte-bw17ze{margin:0}",Object(r.append)(document.head,t)),Object(r.init)(this,e,b,u,r.safe_not_equal,{playerId:0,url:3,size:1})}}t.default=p},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(112);function o(e){let t,n,o,c;return{c(){t=Object(r.element)("img"),t.src!==(n=a.default)&&Object(r.attr)(t,"src",n),Object(r.attr)(t,"class","svelte-1t6b51o")},m(n,a){Object(r.insert)(n,t,a),o||(c=Object(r.listen)(t,"click",e[0]),o=!0)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),o=!1,c()}}}function c(e){return[function(t){Object(r.bubble)(e,t)}]}class i extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1t6b51o-style")||((t=Object(r.element)("style")).id="svelte-1t6b51o-style",t.textContent="img.svelte-1t6b51o{cursor:pointer}",Object(r.append)(document.head,t)),Object(r.init)(this,e,c,o,r.safe_not_equal,{})}}t.default=i},function(e,t,n){"use strict";n.r(t),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAYCAYAAAACqyaBA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LIKIuXbzK3OL/yiWyM3rbyRzVJXl4xH30vAGxu2sj1e3fYv7att3G52LxKdHndjkDZcVhyykyg51JNdfkde3ePlg3jQX//ALZt88VDh/irLx7aUPzw2m6PIH4tH67YLG9q1PxzyeHqsemhWcWZz7atHctlc3dHRq+zhPUI/r/tqWm1gKHlswAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wNS0wNlQxNjowOTo0NCswMDowMNB9vSQAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDUtMDZUMTY6MDk6NDQrMDA6MDChIAWYAAAAAElFTkSuQmCC"},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(64);function o(e){let t,n,a,o;const s=[i,c],l=[];function d(e,t){return e[2]?0:1}return n=d(e),a=l[n]=s[n](e),{c(){t=Object(r.element)("small"),a.c()},m(e,a){Object(r.insert)(e,t,a),l[n].m(t,null),o=!0},p(e,o){let c=n;n=d(e),n===c?l[n].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(l[c],1,1,()=>{l[c]=null}),Object(r.check_outros)(),a=l[n],a||(a=l[n]=s[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null))},i(e){o||(Object(r.transition_in)(a),o=!0)},o(e){Object(r.transition_out)(a),o=!1},d(e){e&&Object(r.detach)(t),l[n].d()}}}function c(e){let t,n,o;return n=new a.default({props:{value:e[1],zero:"-",digits:0}}),{c(){t=Object(r.text)("#"),Object(r.create_component)(n.$$.fragment)},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,e,a),o=!0},p(e,t){const r={};2&t&&(r.value=e[1]),n.$set(r)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n,e)}}}function i(e){let t,n,o,c;return o=new a.default({props:{value:e[1],zero:"-",digits:0}}),{c(){t=Object(r.element)("a"),n=Object(r.text)("#"),Object(r.create_component)(o.$$.fragment),Object(r.attr)(t,"href",e[2])},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.mount_component)(o,t,null),c=!0},p(e,n){const a={};2&n&&(a.value=e[1]),o.$set(a),(!c||4&n)&&Object(r.attr)(t,"href",e[2])},i(e){c||(Object(r.transition_in)(o.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(o.$$.fragment,e),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(o)}}}function s(e){let t,n,c,i,s,l;c=new a.default({props:{value:e[0],zero:"-",digits:0}});let d=e[1]&&o(e);return{c(){t=Object(r.element)("span"),n=Object(r.text)("#"),Object(r.create_component)(c.$$.fragment),i=Object(r.space)(),d&&d.c(),s=Object(r.empty)()},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.mount_component)(c,t,null),Object(r.insert)(e,i,a),d&&d.m(e,a),Object(r.insert)(e,s,a),l=!0},p(e,[t]){const n={};1&t&&(n.value=e[0]),c.$set(n),e[1]?d?(d.p(e,t),2&t&&Object(r.transition_in)(d,1)):(d=o(e),d.c(),Object(r.transition_in)(d,1),d.m(s.parentNode,s)):d&&(Object(r.group_outros)(),Object(r.transition_out)(d,1,1,()=>{d=null}),Object(r.check_outros)())},i(e){l||(Object(r.transition_in)(c.$$.fragment,e),Object(r.transition_in)(d),l=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),Object(r.transition_out)(d),l=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c),e&&Object(r.detach)(i),d&&d.d(e),e&&Object(r.detach)(s)}}}function l(e,t,n){let{rank:r}=t,{subRank:a}=t,{url:o}=t;return e.$$set=e=>{"rank"in e&&n(0,r=e.rank),"subRank"in e&&n(1,a=e.subRank),"url"in e&&n(2,o=e.url)},[r,a,o]}class d extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,l,s,r.safe_not_equal,{rank:0,subRank:1,url:2})}}t.default=d},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(15);function o(e){let t,n,o,i,s,l=e[2]&&c(e);return{c(){t=Object(r.element)("a"),l&&l.c(),n=Object(r.space)(),o=Object(r.element)("span"),i=Object(r.text)(e[3]),Object(r.attr)(o,"class","player-name"),Object(r.attr)(t,"href",s=Object(a.getPlayerProfileUrl)(e[1],!0))},m(e,a){Object(r.insert)(e,t,a),l&&l.m(t,null),Object(r.append)(t,n),Object(r.append)(t,o),Object(r.append)(o,i)},p(e,o){e[2]?l?l.p(e,o):(l=c(e),l.c(),l.m(t,n)):l&&(l.d(1),l=null),8&o&&Object(r.set_data)(i,e[3]),2&o&&s!==(s=Object(a.getPlayerProfileUrl)(e[1],!0))&&Object(r.attr)(t,"href",s)},d(e){e&&Object(r.detach)(t),l&&l.d()}}}function c(e){let t,n;return{c(){t=Object(r.element)("img"),t.src!==(n="/imports/images/flags/"+e[2]+".png")&&Object(r.attr)(t,"src",n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){4&a&&t.src!==(n="/imports/images/flags/"+e[2]+".png")&&Object(r.attr)(t,"src",n)},d(e){e&&Object(r.detach)(t)}}}function i(e){let t,n=e[0]&&o(e);return{c(){n&&n.c(),t=Object(r.empty)()},m(e,a){n&&n.m(e,a),Object(r.insert)(e,t,a)},p(e,[r]){e[0]?n?n.p(e,r):(n=o(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:r.noop,o:r.noop,d(e){n&&n.d(e),e&&Object(r.detach)(t)}}}function s(e,t,n){let r,a,o,{user:c}=t;return e.$$set=e=>{"user"in e&&n(0,c=e.user)},e.$$.update=()=>{1&e.$$.dirty&&n(1,r=c&&c.id?c.id:null),1&e.$$.dirty&&n(2,a=c&&c.country?c.country.toLowerCase():null),1&e.$$.dirty&&n(3,o=c&&c.name?c.name:"???")},[c,r,a,o]}class l extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,s,i,r.safe_not_equal,{user:0})}}t.default=l},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(59),c=n(62),i=n(110),s=n(113),l=n(114),d=n(74),u=n(109),b=n(64),p=n(79),f=n(100),O=n(70),j=n(39),m=n(36),g=n(22),h=n(13),y=n(9),v=n(35);function _(e,t,n){const r=e.slice();return r[19]=t[n],r[21]=n,r}function w(e){let t,n,a,o,c,i,s;const l=[$,k],d=[];function u(e,t){return e[5]?1:0}n=u(e),a=d[n]=l[n](e);const b=[S,x],p=[];function f(e,t){return e[11]?0:1}return c=f(e),i=p[c]=b[c](e),{c(){t=Object(r.element)("div"),a.c(),o=Object(r.space)(),i.c(),Object(r.attr)(t,"class","leaderboard-container svelte-1lp04a"),Object(r.set_style)(t,"--background-image","url(/imports/images/songs/"+(e[1]&&e[11]&&e[11].length?e[11][0].songHash:"")+".png)"),Object(r.set_style)(t,"--bgLeft",e[6]),Object(r.set_style)(t,"--bgTop",e[7]),Object(r.set_style)(t,"--bgHeight",e[9]),Object(r.set_style)(t,"--bgWidth",e[8])},m(e,a){Object(r.insert)(e,t,a),d[n].m(t,null),Object(r.append)(t,o),p[c].m(t,null),s=!0},p(e,O){let j=n;n=u(e),n===j?d[n].p(e,O):(Object(r.group_outros)(),Object(r.transition_out)(d[j],1,1,()=>{d[j]=null}),Object(r.check_outros)(),a=d[n],a||(a=d[n]=l[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,o));let m=c;c=f(e),c===m?p[c].p(e,O):(Object(r.group_outros)(),Object(r.transition_out)(p[m],1,1,()=>{p[m]=null}),Object(r.check_outros)(),i=p[c],i||(i=p[c]=b[c](e),i.c()),Object(r.transition_in)(i,1),i.m(t,null)),(!s||2050&O)&&Object(r.set_style)(t,"--background-image","url(/imports/images/songs/"+(e[1]&&e[11]&&e[11].length?e[11][0].songHash:"")+".png)"),(!s||64&O)&&Object(r.set_style)(t,"--bgLeft",e[6]),(!s||128&O)&&Object(r.set_style)(t,"--bgTop",e[7]),(!s||512&O)&&Object(r.set_style)(t,"--bgHeight",e[9]),(!s||256&O)&&Object(r.set_style)(t,"--bgWidth",e[8])},i(e){s||(Object(r.transition_in)(a),Object(r.transition_in)(i),s=!0)},o(e){Object(r.transition_out)(a),Object(r.transition_out)(i),s=!1},d(e){e&&Object(r.detach)(t),d[n].d(),p[c].d()}}}function k(e){let t,n,a,o;function c(t){e[16].call(null,t)}let i={country:e[2]};return void 0!==e[3]&&(i.value=e[3]),n=new p.default({props:i}),r.binding_callbacks.push(()=>Object(r.bind)(n,"value",c)),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","refresh svelte-1lp04a")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,t){const o={};4&t&&(o.country=e[2]),!a&&8&t&&(a=!0,o.value=e[3],Object(r.add_flush_callback)(()=>a=!1)),n.$set(o)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function $(e){let t,n,a,o,c,i;function s(t){e[15].call(null,t)}let l={country:e[2]};return void 0!==e[3]&&(l.value=e[3]),n=new p.default({props:l}),r.binding_callbacks.push(()=>Object(r.bind)(n,"value",s)),c=new O.default({}),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),o=Object(r.space)(),Object(r.create_component)(c.$$.fragment),Object(r.attr)(t,"class","refresh svelte-1lp04a")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),Object(r.append)(t,o),Object(r.mount_component)(c,t,null),i=!0},p(e,t){const o={};4&t&&(o.country=e[2]),!a&&8&t&&(a=!0,o.value=e[3],Object(r.add_flush_callback)(()=>a=!1)),n.$set(o)},i(e){i||(Object(r.transition_in)(n.$$.fragment,e),Object(r.transition_in)(c.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),Object(r.transition_out)(c.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),Object(r.destroy_component)(c)}}}function x(e){let t,n,a,o=e[14].songLeaderboard.searching+"";return{c(){t=Object(r.element)("div"),n=Object(r.element)("p"),a=Object(r.text)(o),Object(r.attr)(t,"class","first-fetch svelte-1lp04a")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(n,a)},p(e,t){16384&t&&o!==(o=e[14].songLeaderboard.searching+"")&&Object(r.set_data)(a,o)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function S(e){let t,n,a,o;const c=[I,P],i=[];function s(e,t){return e[11].length?0:1}return t=s(e),n=i[t]=c[t](e),{c(){n.c(),a=Object(r.empty)()},m(e,n){i[t].m(e,n),Object(r.insert)(e,a,n),o=!0},p(e,o){let l=t;t=s(e),t===l?i[t].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),n=i[t],n||(n=i[t]=c[t](e),n.c()),Object(r.transition_in)(n,1),n.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(n),o=!0)},o(e){Object(r.transition_out)(n),o=!1},d(e){i[t].d(e),e&&Object(r.detach)(a)}}}function P(e){let t,n,a,o=e[14].songLeaderboard.nobodyPlayed+"";return{c(){t=Object(r.element)("div"),n=Object(r.element)("p"),a=Object(r.text)(o),Object(r.attr)(t,"class","first-fetch svelte-1lp04a")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(n,a)},p(e,t){16384&t&&o!==(o=e[14].songLeaderboard.nobodyPlayed+"")&&Object(r.set_data)(a,o)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function I(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O,j,m,g,h,y,v,w,k,$,x,S,P,I,C=e[14].songLeaderboard.player+"",A=e[14].songBrowser.fields.score+"",q=e[14].songBrowser.fields.timesetShort+"",R=e[14].songLeaderboard.mods+"",z=e[14].songBrowser.fields.acc+"",E=e[14].songBrowser.fields.pp+"",B=[],D=new Map,L=e[11];const N=e=>e[19].id;for(let t=0;t<L.length;t+=1){let n=_(e,L,t),r=N(n);D.set(r,B[t]=T(r,n))}return{c(){t=Object(r.element)("table"),n=Object(r.element)("thead"),a=Object(r.element)("tr"),o=Object(r.element)("th"),c=Object(r.space)(),i=Object(r.element)("th"),i.textContent="#",s=Object(r.space)(),l=Object(r.element)("th"),d=Object(r.text)(C),u=Object(r.space)(),b=Object(r.element)("th"),p=Object(r.text)(A),f=Object(r.space)(),O=Object(r.element)("th"),j=Object(r.text)(q),m=Object(r.space)(),g=Object(r.element)("th"),h=Object(r.text)(R),y=Object(r.space)(),v=Object(r.element)("th"),w=Object(r.text)(z),k=Object(r.space)(),$=Object(r.element)("th"),x=Object(r.text)(E),S=Object(r.space)(),P=Object(r.element)("tbody");for(let e=0;e<B.length;e+=1)B[e].c();Object(r.attr)(o,"class","picture svelte-1lp04a"),Object(r.attr)(i,"class","rank svelte-1lp04a"),Object(r.attr)(l,"class","player svelte-1lp04a"),Object(r.attr)(b,"class","score svelte-1lp04a"),Object(r.attr)(O,"class","timeset svelte-1lp04a"),Object(r.attr)(g,"class","mods svelte-1lp04a"),Object(r.attr)(v,"class","percentage svelte-1lp04a"),Object(r.attr)($,"class","pp svelte-1lp04a"),Object(r.attr)(P,"class","svelte-1lp04a"),Object(r.attr)(t,"class","ranking sspl svelte-1lp04a")},m(e,_){Object(r.insert)(e,t,_),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(a,o),Object(r.append)(a,c),Object(r.append)(a,i),Object(r.append)(a,s),Object(r.append)(a,l),Object(r.append)(l,d),Object(r.append)(a,u),Object(r.append)(a,b),Object(r.append)(b,p),Object(r.append)(a,f),Object(r.append)(a,O),Object(r.append)(O,j),Object(r.append)(a,m),Object(r.append)(a,g),Object(r.append)(g,h),Object(r.append)(a,y),Object(r.append)(a,v),Object(r.append)(v,w),Object(r.append)(a,k),Object(r.append)(a,$),Object(r.append)($,x),Object(r.append)(t,S),Object(r.append)(t,P);for(let e=0;e<B.length;e+=1)B[e].m(P,null);I=!0},p(e,t){if((!I||16384&t)&&C!==(C=e[14].songLeaderboard.player+"")&&Object(r.set_data)(d,C),(!I||16384&t)&&A!==(A=e[14].songBrowser.fields.score+"")&&Object(r.set_data)(p,A),(!I||16384&t)&&q!==(q=e[14].songBrowser.fields.timesetShort+"")&&Object(r.set_data)(j,q),(!I||16384&t)&&R!==(R=e[14].songLeaderboard.mods+"")&&Object(r.set_data)(h,R),(!I||16384&t)&&z!==(z=e[14].songBrowser.fields.acc+"")&&Object(r.set_data)(w,z),(!I||16384&t)&&E!==(E=e[14].songBrowser.fields.pp+"")&&Object(r.set_data)(x,E),7185&t){const n=e[11];Object(r.group_outros)(),B=Object(r.update_keyed_each)(B,t,N,1,e,n,D,P,r.outro_and_destroy_block,T,null,_),Object(r.check_outros)()}},i(e){if(!I){for(let e=0;e<L.length;e+=1)Object(r.transition_in)(B[e]);I=!0}},o(e){for(let e=0;e<B.length;e+=1)Object(r.transition_out)(B[e]);I=!1},d(e){e&&Object(r.detach)(t);for(let e=0;e<B.length;e+=1)B[e].d()}}}function C(e){let t,n;return t=new f.default({props:{leaderboardId:e[4],pp:e[19].pp}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16&n&&(r.leaderboardId=e[4]),2048&n&&(r.pp=e[19].pp),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function T(e,t){let n,a,c,p,f,O,m,g,h,y,v,_,w,k,$,x,S,P,I,T,A,q,R,z,E,B,D,L,N,F,M=(t[19].mods&&t[19].mods.length?t[19].mods:"-")+"";c=new i.default({props:{playerId:t[19].id}}),O=new s.default({props:{rank:t[21]+1,url:"/leaderboard/"+encodeURIComponent(t[4])+"?page="+encodeURIComponent(Math.ceil(t[19].rank/j.SCORES_PER_PAGE))}}),h=new l.default({props:{user:t[19]}}),_=new b.default({props:{value:t[19].score,digits:0,zero:"-",prevValue:t[0]&&t[19].playHistory&&t[19].playHistory.length?t[19].playHistory[0].score:null}}),$=new d.default({props:{date:t[19].timeset,prevDate:t[0]&&t[19].playHistory&&t[19].playHistory.length?t[19].playHistory[0].timeset:null}}),A=new b.default({props:{value:t[19].acc,zero:"-",suffix:"%",title:t[19].accTooltip,prevValue:t[0]&&t[19].playHistory&&t[19].playHistory.length?t[19].playHistory[0].acc:null}}),z=new u.default({props:{pp:t[19].pp,prevPp:t[0]&&t[19].playHistory&&t[19].playHistory.length?t[19].playHistory[0].pp:null}});let U=t[12]&&C(t);return{key:e,first:null,c(){n=Object(r.element)("tr"),a=Object(r.element)("td"),Object(r.create_component)(c.$$.fragment),p=Object(r.space)(),f=Object(r.element)("td"),Object(r.create_component)(O.$$.fragment),m=Object(r.space)(),g=Object(r.element)("td"),Object(r.create_component)(h.$$.fragment),y=Object(r.space)(),v=Object(r.element)("td"),Object(r.create_component)(_.$$.fragment),w=Object(r.space)(),k=Object(r.element)("td"),Object(r.create_component)($.$$.fragment),x=Object(r.space)(),S=Object(r.element)("td"),P=Object(r.text)(M),I=Object(r.space)(),T=Object(r.element)("td"),Object(r.create_component)(A.$$.fragment),q=Object(r.space)(),R=Object(r.element)("td"),Object(r.create_component)(z.$$.fragment),E=Object(r.space)(),U&&U.c(),B=Object(r.space)(),Object(r.attr)(a,"class","picture svelte-1lp04a"),Object(r.attr)(f,"class","rank svelte-1lp04a"),Object(r.attr)(g,"class","player svelte-1lp04a"),Object(r.attr)(v,"class","score svelte-1lp04a"),Object(r.attr)(k,"class","timeset svelte-1lp04a"),Object(r.attr)(S,"class","mods svelte-1lp04a"),Object(r.attr)(T,"class","percentage svelte-1lp04a"),Object(r.attr)(R,"class","pp svelte-1lp04a"),Object(r.attr)(n,"class",D=Object(r.null_to_empty)((t[19].hidden?"hidden":"")+(t[10].includes(t[19].id)?" main":""))+" svelte-1lp04a"),Object(r.attr)(n,"data-id",L=t[19].id),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.append)(n,a),Object(r.mount_component)(c,a,null),Object(r.append)(n,p),Object(r.append)(n,f),Object(r.mount_component)(O,f,null),Object(r.append)(n,m),Object(r.append)(n,g),Object(r.mount_component)(h,g,null),Object(r.append)(n,y),Object(r.append)(n,v),Object(r.mount_component)(_,v,null),Object(r.append)(n,w),Object(r.append)(n,k),Object(r.mount_component)($,k,null),Object(r.append)(n,x),Object(r.append)(n,S),Object(r.append)(S,P),Object(r.append)(n,I),Object(r.append)(n,T),Object(r.mount_component)(A,T,null),Object(r.append)(n,q),Object(r.append)(n,R),Object(r.mount_component)(z,R,null),Object(r.append)(R,E),U&&U.m(R,null),Object(r.append)(n,B),F=!0},p(e,t){const a={};2048&t&&(a.playerId=e[19].id),c.$set(a);const o={};2048&t&&(o.rank=e[21]+1),2064&t&&(o.url="/leaderboard/"+encodeURIComponent(e[4])+"?page="+encodeURIComponent(Math.ceil(e[19].rank/j.SCORES_PER_PAGE))),O.$set(o);const i={};2048&t&&(i.user=e[19]),h.$set(i);const s={};2048&t&&(s.value=e[19].score),2049&t&&(s.prevValue=e[0]&&e[19].playHistory&&e[19].playHistory.length?e[19].playHistory[0].score:null),_.$set(s);const l={};2048&t&&(l.date=e[19].timeset),2049&t&&(l.prevDate=e[0]&&e[19].playHistory&&e[19].playHistory.length?e[19].playHistory[0].timeset:null),$.$set(l),(!F||2048&t)&&M!==(M=(e[19].mods&&e[19].mods.length?e[19].mods:"-")+"")&&Object(r.set_data)(P,M);const d={};2048&t&&(d.value=e[19].acc),2048&t&&(d.title=e[19].accTooltip),2049&t&&(d.prevValue=e[0]&&e[19].playHistory&&e[19].playHistory.length?e[19].playHistory[0].acc:null),A.$set(d);const u={};2048&t&&(u.pp=e[19].pp),2049&t&&(u.prevPp=e[0]&&e[19].playHistory&&e[19].playHistory.length?e[19].playHistory[0].pp:null),z.$set(u),e[12]?U?(U.p(e,t),4096&t&&Object(r.transition_in)(U,1)):(U=C(e),U.c(),Object(r.transition_in)(U,1),U.m(R,null)):U&&(Object(r.group_outros)(),Object(r.transition_out)(U,1,1,()=>{U=null}),Object(r.check_outros)()),(!F||3072&t&&D!==(D=Object(r.null_to_empty)((e[19].hidden?"hidden":"")+(e[10].includes(e[19].id)?" main":""))+" svelte-1lp04a"))&&Object(r.attr)(n,"class",D),(!F||2048&t&&L!==(L=e[19].id))&&Object(r.attr)(n,"data-id",L)},i(e){F||(Object(r.transition_in)(c.$$.fragment,e),Object(r.transition_in)(O.$$.fragment,e),Object(r.transition_in)(h.$$.fragment,e),Object(r.transition_in)(_.$$.fragment,e),Object(r.transition_in)($.$$.fragment,e),Object(r.transition_in)(A.$$.fragment,e),Object(r.transition_in)(z.$$.fragment,e),Object(r.transition_in)(U),N||Object(r.add_render_callback)(()=>{N=Object(r.create_in_transition)(n,o.fly,{x:50,duration:500}),N.start()}),F=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),Object(r.transition_out)(O.$$.fragment,e),Object(r.transition_out)(h.$$.fragment,e),Object(r.transition_out)(_.$$.fragment,e),Object(r.transition_out)($.$$.fragment,e),Object(r.transition_out)(A.$$.fragment,e),Object(r.transition_out)(z.$$.fragment,e),Object(r.transition_out)(U),F=!1},d(e){e&&Object(r.detach)(n),Object(r.destroy_component)(c),Object(r.destroy_component)(O),Object(r.destroy_component)(h),Object(r.destroy_component)(_),Object(r.destroy_component)($),Object(r.destroy_component)(A),Object(r.destroy_component)(z),U&&U.d()}}}function A(e){let t,n,a=e[13]&&w(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[13]?a?(a.p(e,n),8192&n&&Object(r.transition_in)(a,1)):(a=w(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function q(e,t,n){let o;Object(r.component_subscribe)(e,y._,e=>n(14,o=e));let{leaderboardId:i}=t,{tableOnly:s=!1}=t,{showDiff:l}=t,{bgLeft:d="0rem"}=t,{bgTop:u="0rem"}=t,{bgWidth:b="0rem"}=t,{bgHeight:p="0rem"}=t,{highlight:f=[]}=t,{showBgCover:O=!0}=t,{country:j=null}=t,{leaderboardType:_}=t,w=null,k=!1,$=!1;async function x(){i&&_&&(!["country","country_and_friends"].includes(_)||j)&&n(11,w=await Object(g.getLeaderboard)(i,j,_))}async function S(){const e=await Object(m.getConfig)("songLeaderboard");n(0,l=l&&!(!e||!e.showDiff)),n(12,k=!!e.showWhatIfPp&&!s),n(1,O=O&&!1!==e.showBgCover)}return Object(a.onMount)(async()=>{const e=await Object(m.getMainPlayerId)();e&&f.push(e),j||n(2,j=await Object(v.getActiveCountry)()),await S();const t=h.default.on("data-refreshed",async()=>await x()),r=h.default.on("player-scores-updated",Object(c.default)(async()=>await x(),3e3)),a=h.default.on("config-changed",S);return n(13,$=!0),()=>{t(),r(),a()}}),e.$$set=e=>{"leaderboardId"in e&&n(4,i=e.leaderboardId),"tableOnly"in e&&n(5,s=e.tableOnly),"showDiff"in e&&n(0,l=e.showDiff),"bgLeft"in e&&n(6,d=e.bgLeft),"bgTop"in e&&n(7,u=e.bgTop),"bgWidth"in e&&n(8,b=e.bgWidth),"bgHeight"in e&&n(9,p=e.bgHeight),"highlight"in e&&n(10,f=e.highlight),"showBgCover"in e&&n(1,O=e.showBgCover),"country"in e&&n(2,j=e.country),"leaderboardType"in e&&n(3,_=e.leaderboardType)},e.$$.update=()=>{28&e.$$.dirty&&x()},[l,O,j,_,i,s,d,u,b,p,f,w,k,$,o,function(e){_=e,n(3,_)},function(e){_=e,n(3,_)}]}class R extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1lp04a-style")||((t=Object(r.element)("style")).id="svelte-1lp04a-style",t.textContent=".leaderboard-container.svelte-1lp04a.svelte-1lp04a{position:relative}.leaderboard-container.svelte-1lp04a.svelte-1lp04a:before{position:absolute;content:' ';background-image:var(--background-image);left:var(--bgLeft, 0);top:var(--bgTop, 0);width:calc(100% + var(--bgWidth, 0) - var(--bgLeft, 0));height:calc(100% + var(--bgHeight, 0) - var(--bgTop, 0));background-repeat:no-repeat;background-size:cover;opacity:0.1;pointer-events:none}.sspl.svelte-1lp04a tbody.svelte-1lp04a{padding-bottom:2rem}.sspl.svelte-1lp04a th.svelte-1lp04a,.sspl.svelte-1lp04a td.svelte-1lp04a{padding:.5rem}.sspl.svelte-1lp04a thead th.rank.svelte-1lp04a{width:2rem}.sspl.svelte-1lp04a thead th.svelte-1lp04a{text-align:left}.sspl.svelte-1lp04a thead th.mods.svelte-1lp04a,.sspl.svelte-1lp04a thead th.percentage.svelte-1lp04a,.sspl.svelte-1lp04a thead th.pp.svelte-1lp04a,.sspl.svelte-1lp04a tbody td.mods.svelte-1lp04a,.sspl.svelte-1lp04a tbody td.percentage.svelte-1lp04a,.sspl.svelte-1lp04a tbody td.pp.svelte-1lp04a{text-align:center}.sspl.svelte-1lp04a thead th.timeset.svelte-1lp04a{width:7.9rem}.sspl.svelte-1lp04a thead th.rank.svelte-1lp04a{width:3.75rem}.sspl.svelte-1lp04a thead th.score.svelte-1lp04a{width:5rem}.sspl.svelte-1lp04a .pp.svelte-1lp04a{width:6rem}.sspl.svelte-1lp04a thead th.mods.svelte-1lp04a{width:3.75rem}.sspl.svelte-1lp04a .picture.svelte-1lp04a{padding:.5rem 0}.refresh.svelte-1lp04a.svelte-1lp04a{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;padding-top:.5rem;margin-right:.5rem}.refresh.svelte-1lp04a .dropdown-trigger .button{background-color:transparent}.first-fetch.svelte-1lp04a.svelte-1lp04a{text-align:center\n    }",Object(r.append)(document.head,t)),Object(r.init)(this,e,q,A,r.safe_not_equal,{leaderboardId:4,tableOnly:5,showDiff:0,bgLeft:6,bgTop:7,bgWidth:8,bgHeight:9,highlight:10,showBgCover:1,country:2,leaderboardType:3})}}t.default=R},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9),c=n(36),i=n(73);function s(e,t,n){const r=e.slice();return r[12]=t[n],r}function l(e){let t,n,a,o,c,i,s,l=e[1]&&e[1].length&&d(e);return{c(){t=Object(r.element)("header"),n=Object(r.element)("div"),a=Object(r.space)(),o=Object(r.element)("div"),l&&l.c(),c=Object(r.space)(),i=Object(r.element)("div"),Object(r.attr)(n,"class","left"),Object(r.attr)(o,"class","switch-types svelte-1gqaur0"),Object(r.attr)(i,"class","right"),Object(r.attr)(t,"class","svelte-1gqaur0")},m(e,d){Object(r.insert)(e,t,d),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o),l&&l.m(o,null),Object(r.append)(t,c),Object(r.append)(t,i),s=!0},p(e,t){e[1]&&e[1].length?l?(l.p(e,t),2&t&&Object(r.transition_in)(l,1)):(l=d(e),l.c(),Object(r.transition_in)(l,1),l.m(o,null)):l&&(Object(r.group_outros)(),Object(r.transition_out)(l,1,1,()=>{l=null}),Object(r.check_outros)())},i(e){s||(Object(r.transition_in)(l),s=!0)},o(e){Object(r.transition_out)(l),s=!1},d(e){e&&Object(r.detach)(t),l&&l.d()}}}function d(e){let t,n,a,o=[],c=new Map,i=e[1];const l=e=>e[12].id;for(let t=0;t<i.length;t+=1){let n=s(e,i,t),r=l(n);c.set(r,o[t]=u(r,n))}let d=e[3]&&b(e);return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=Object(r.space)(),d&&d.c(),n=Object(r.empty)()},m(e,c){for(let t=0;t<o.length;t+=1)o[t].m(e,c);Object(r.insert)(e,t,c),d&&d.m(e,c),Object(r.insert)(e,n,c),a=!0},p(e,a){if(151&a){const n=e[1];Object(r.group_outros)(),o=Object(r.update_keyed_each)(o,a,l,1,e,n,c,t.parentNode,r.outro_and_destroy_block,u,t,s),Object(r.check_outros)()}e[3]?d?(d.p(e,a),8&a&&Object(r.transition_in)(d,1)):(d=b(e),d.c(),Object(r.transition_in)(d,1),d.m(n.parentNode,n)):d&&(Object(r.group_outros)(),Object(r.transition_out)(d,1,1,()=>{d=null}),Object(r.check_outros)())},i(e){if(!a){for(let e=0;e<i.length;e+=1)Object(r.transition_in)(o[e]);Object(r.transition_in)(d),a=!0}},o(e){for(let e=0;e<o.length;e+=1)Object(r.transition_out)(o[e]);Object(r.transition_out)(d),a=!1},d(e){for(let t=0;t<o.length;t+=1)o[t].d(e);e&&Object(r.detach)(t),d&&d.d(e),e&&Object(r.detach)(n)}}}function u(e,t){let n,a,o;return a=new i.default({props:{iconFa:t[4]===t[12].id?"fas fa-spinner fa-spin":null,label:t[12].name,color:"#dbdbdb",bgColor:t[12].color,notSelected:t[12].id!==t[2]||"live"!==t[0]}}),a.$on("click",(function(...e){return t[9](t[12],...e)})),{key:e,first:null,c(){n=Object(r.empty)(),Object(r.create_component)(a.$$.fragment),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.mount_component)(a,e,t),o=!0},p(e,n){t=e;const r={};18&n&&(r.iconFa=t[4]===t[12].id?"fas fa-spinner fa-spin":null),2&n&&(r.label=t[12].name),2&n&&(r.bgColor=t[12].color),7&n&&(r.notSelected=t[12].id!==t[2]||"live"!==t[0]),a.$set(r)},i(e){o||(Object(r.transition_in)(a.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(n),Object(r.destroy_component)(a,e)}}}function b(e){let t,n;return t=new i.default({props:{iconFa:"fas fa-database",type:"danger",label:e[6].plugin.cachedButton,notSelected:"cached"!==e[0]}}),t.$on("click",e[10]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};64&n&&(r.label=e[6].plugin.cachedButton),1&n&&(r.notSelected="cached"!==e[0]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function p(e){let t,n,a=e[5]&&(e[1]&&(e[1].length>1||1===e[1].length&&e[1][0].id!==e[2])||e[3])&&l(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[5]&&(e[1]&&(e[1].length>1||1===e[1].length&&e[1][0].id!==e[2])||e[3])?a?(a.p(e,n),46&n&&Object(r.transition_in)(a,1)):(a=l(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function f(e,t,n){let i;Object(r.component_subscribe)(e,o._,e=>n(6,i=e));const s=Object(a.createEventDispatcher)();let{diffs:l}=t,{leaderboardId:d}=t,{type:u="live"}=t,{beforeDiffChanged:b}=t,p=null,f=null,O=!1;async function j(e,t){const r={leaderboardId:e,page:0,type:t};if(b){n(4,f=e);const t=await b(r);if(n(4,f=null),!t)return}n(0,u=t),s("diff-change",r)}return Object(a.onMount)(async()=>{n(3,p=await Object(c.getMainPlayerId)()),n(5,O=!0)}),e.$$set=e=>{"diffs"in e&&n(1,l=e.diffs),"leaderboardId"in e&&n(2,d=e.leaderboardId),"type"in e&&n(0,u=e.type),"beforeDiffChanged"in e&&n(8,b=e.beforeDiffChanged)},[u,l,d,p,f,O,i,j,b,e=>j(e.id,"live"),()=>j(d,"cached")]}class O extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1gqaur0-style")||((t=Object(r.element)("style")).id="svelte-1gqaur0-style",t.textContent="header.svelte-1gqaur0{display:flex;justify-content:space-between;align-items:center}.switch-types.svelte-1gqaur0{display:flex;font-size:.75rem;text-align:center}.switch-types button{font-weight:500;margin-right:.125rem!important}",Object(r.append)(document.head,t)),Object(r.init)(this,e,f,p,r.safe_not_equal,{diffs:1,leaderboardId:2,type:0,beforeDiffChanged:8})}}t.default=O},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58);function o(e){let t,n,a,o;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class",n=Object(r.null_to_empty)("fas "+(e[0]?"fa-check-square":"fa-square"))+" svelte-5hgvi0")},m(n,c){Object(r.insert)(n,t,c),a||(o=Object(r.listen)(t,"click",e[1]),a=!0)},p(e,[a]){1&a&&n!==(n=Object(r.null_to_empty)("fas "+(e[0]?"fa-check-square":"fa-square"))+" svelte-5hgvi0")&&Object(r.attr)(t,"class",n)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),a=!1,o()}}}function c(e,t,n){const r=Object(a.createEventDispatcher)();let{checked:o=!1}=t,{disabled:c=!1}=t;return e.$$set=e=>{"checked"in e&&n(0,o=e.checked),"disabled"in e&&n(2,c=e.disabled)},[o,function(){c||(n(0,o=!o),r("click",o))},c]}class i extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-5hgvi0-style")||((t=Object(r.element)("style")).id="svelte-5hgvi0-style",t.textContent="i.disabled.svelte-5hgvi0{opacity:50%}",Object(r.append)(document.head,t)),Object(r.init)(this,e,c,o,r.safe_not_equal,{checked:0,disabled:2})}}t.default=i},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=(n(22),n(36)),c=n(39),i=n(9),s=n(119),l=n(64),d=n(103),u=n(102);const b=e=>({}),p=e=>({}),f=e=>({}),O=e=>({}),j=e=>({}),m=e=>({});function g(e){let t,n,a,o,i,s,d,u,g,x,S,P,I,C,T,A,q,R,z,E,B,D,L,N,F,M,U,V,H,W,Z,K,X,J,Q,Y,G=(null!==e[7]&&void 0!==e[7]?e[20].songLeaderboard.ranked:e[20].songLeaderboard.unranked)+"";const ee=e[22]["before-header"],te=Object(r.create_slot)(ee,e,e[21],m);let ne=e[9]&&h(e);F=new l.default({props:{value:e[7],digits:2,zero:"",suffix:"★"}});let re=e[8]&&y(e),ae=e[10]&&v(e),oe=e[11]&&_(e),ce=e[12]&&w(e),ie=e[13]&&k(e);const se=e[22].main,le=Object(r.create_slot)(se,e,e[21],O),de=e[22].footer,ue=Object(r.create_slot)(de,e,e[21],p),be=ue||function(e){let t,n,a=e[15]&&e[2]&&$(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[15]&&e[2]?a?(a.p(e,n),32772&n&&Object(r.transition_in)(a,1)):(a=$(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),te&&te.c(),a=Object(r.space)(),o=Object(r.element)("header"),i=Object(r.element)("h1"),s=Object(r.element)("a"),d=Object(r.text)(e[3]),u=Object(r.space)(),g=Object(r.text)(e[4]),S=Object(r.space)(),P=Object(r.element)("h2"),I=Object(r.element)("a"),C=Object(r.text)(e[5]),T=Object(r.space)(),A=Object(r.element)("small"),q=Object(r.text)(e[6]),z=Object(r.space)(),E=Object(r.element)("h3"),ne&&ne.c(),B=Object(r.space)(),D=Object(r.element)("span"),L=Object(r.text)(G),N=Object(r.space)(),Object(r.create_component)(F.$$.fragment),M=Object(r.space)(),re&&re.c(),U=Object(r.space)(),V=Object(r.element)("div"),ae&&ae.c(),H=Object(r.space)(),oe&&oe.c(),W=Object(r.space)(),ce&&ce.c(),Z=Object(r.space)(),ie&&ie.c(),K=Object(r.space)(),X=Object(r.element)("main"),le&&le.c(),J=Object(r.space)(),Q=Object(r.element)("footer"),be&&be.c(),Object(r.attr)(s,"href",x=c.SCORESABER_URL+"/leaderboard/"+encodeURIComponent(e[1])),Object(r.attr)(i,"class","title is-4 svelte-js03an"),Object(r.attr)(A,"class","svelte-js03an"),Object(r.attr)(I,"href",R=c.SCORESABER_URL+"/leaderboard/"+encodeURIComponent(e[1])),Object(r.attr)(P,"class","title is-5 svelte-js03an"),Object(r.attr)(D,"class","status block svelte-js03an"),Object(r.toggle_class)(D,"unranked",null===e[7]||void 0===e[7]),Object(r.attr)(V,"class","stats svelte-js03an"),Object(r.attr)(E,"class","title is-6 svelte-js03an"),Object(r.attr)(o,"class","svelte-js03an"),Object(r.attr)(X,"class","svelte-js03an"),Object(r.attr)(Q,"class","svelte-js03an"),Object(r.attr)(n,"class","song-card svelte-js03an"),Object(r.set_style)(n,"--background-image","url(/imports/images/songs/"+(e[0]&&e[2]&&e[2].length?e[2]:"")+".png)"),Object(r.set_style)(n,"--bgLeft",e[16]),Object(r.set_style)(n,"--bgTop",e[17]),Object(r.attr)(t,"class","box has-shadow svelte-js03an"),Object(r.set_style)(t,"--padding",e[18]),Object(r.set_style)(t,"--iconSize",e[19])},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),te&&te.m(n,null),Object(r.append)(n,a),Object(r.append)(n,o),Object(r.append)(o,i),Object(r.append)(i,s),Object(r.append)(s,d),Object(r.append)(s,u),Object(r.append)(s,g),Object(r.append)(o,S),Object(r.append)(o,P),Object(r.append)(P,I),Object(r.append)(I,C),Object(r.append)(I,T),Object(r.append)(I,A),Object(r.append)(A,q),Object(r.append)(o,z),Object(r.append)(o,E),ne&&ne.m(E,null),Object(r.append)(E,B),Object(r.append)(E,D),Object(r.append)(D,L),Object(r.append)(D,N),Object(r.mount_component)(F,D,null),Object(r.append)(D,M),re&&re.m(D,null),Object(r.append)(E,U),Object(r.append)(E,V),ae&&ae.m(V,null),Object(r.append)(V,H),oe&&oe.m(V,null),Object(r.append)(V,W),ce&&ce.m(V,null),Object(r.append)(V,Z),ie&&ie.m(V,null),Object(r.append)(n,K),Object(r.append)(n,X),le&&le.m(X,null),Object(r.append)(n,J),Object(r.append)(n,Q),be&&be.m(Q,null),Y=!0},p(e,a){te&&te.p&&2097152&a&&Object(r.update_slot)(te,ee,e,e[21],a,j,m),(!Y||8&a)&&Object(r.set_data)(d,e[3]),(!Y||16&a)&&Object(r.set_data)(g,e[4]),(!Y||2&a&&x!==(x=c.SCORESABER_URL+"/leaderboard/"+encodeURIComponent(e[1])))&&Object(r.attr)(s,"href",x),(!Y||32&a)&&Object(r.set_data)(C,e[5]),(!Y||64&a)&&Object(r.set_data)(q,e[6]),(!Y||2&a&&R!==(R=c.SCORESABER_URL+"/leaderboard/"+encodeURIComponent(e[1])))&&Object(r.attr)(I,"href",R),e[9]?ne?(ne.p(e,a),512&a&&Object(r.transition_in)(ne,1)):(ne=h(e),ne.c(),Object(r.transition_in)(ne,1),ne.m(E,B)):ne&&(Object(r.group_outros)(),Object(r.transition_out)(ne,1,1,()=>{ne=null}),Object(r.check_outros)()),(!Y||1048704&a)&&G!==(G=(null!==e[7]&&void 0!==e[7]?e[20].songLeaderboard.ranked:e[20].songLeaderboard.unranked)+"")&&Object(r.set_data)(L,G);const o={};128&a&&(o.value=e[7]),F.$set(o),e[8]?re?(re.p(e,a),256&a&&Object(r.transition_in)(re,1)):(re=y(e),re.c(),Object(r.transition_in)(re,1),re.m(D,null)):re&&(Object(r.group_outros)(),Object(r.transition_out)(re,1,1,()=>{re=null}),Object(r.check_outros)()),128&a&&Object(r.toggle_class)(D,"unranked",null===e[7]||void 0===e[7]),e[10]?ae?(ae.p(e,a),1024&a&&Object(r.transition_in)(ae,1)):(ae=v(e),ae.c(),Object(r.transition_in)(ae,1),ae.m(V,H)):ae&&(Object(r.group_outros)(),Object(r.transition_out)(ae,1,1,()=>{ae=null}),Object(r.check_outros)()),e[11]?oe?(oe.p(e,a),2048&a&&Object(r.transition_in)(oe,1)):(oe=_(e),oe.c(),Object(r.transition_in)(oe,1),oe.m(V,W)):oe&&(Object(r.group_outros)(),Object(r.transition_out)(oe,1,1,()=>{oe=null}),Object(r.check_outros)()),e[12]?ce?(ce.p(e,a),4096&a&&Object(r.transition_in)(ce,1)):(ce=w(e),ce.c(),Object(r.transition_in)(ce,1),ce.m(V,Z)):ce&&(Object(r.group_outros)(),Object(r.transition_out)(ce,1,1,()=>{ce=null}),Object(r.check_outros)()),e[13]?ie?(ie.p(e,a),8192&a&&Object(r.transition_in)(ie,1)):(ie=k(e),ie.c(),Object(r.transition_in)(ie,1),ie.m(V,null)):ie&&(Object(r.group_outros)(),Object(r.transition_out)(ie,1,1,()=>{ie=null}),Object(r.check_outros)()),le&&le.p&&2097152&a&&Object(r.update_slot)(le,se,e,e[21],a,f,O),ue?ue.p&&2097152&a&&Object(r.update_slot)(ue,de,e,e[21],a,b,p):be&&be.p&&49156&a&&be.p(e,a),(!Y||5&a)&&Object(r.set_style)(n,"--background-image","url(/imports/images/songs/"+(e[0]&&e[2]&&e[2].length?e[2]:"")+".png)"),(!Y||65536&a)&&Object(r.set_style)(n,"--bgLeft",e[16]),(!Y||131072&a)&&Object(r.set_style)(n,"--bgTop",e[17]),(!Y||262144&a)&&Object(r.set_style)(t,"--padding",e[18]),(!Y||524288&a)&&Object(r.set_style)(t,"--iconSize",e[19])},i(e){Y||(Object(r.transition_in)(te,e),Object(r.transition_in)(ne),Object(r.transition_in)(F.$$.fragment,e),Object(r.transition_in)(re),Object(r.transition_in)(ae),Object(r.transition_in)(oe),Object(r.transition_in)(ce),Object(r.transition_in)(ie),Object(r.transition_in)(le,e),Object(r.transition_in)(be,e),Y=!0)},o(e){Object(r.transition_out)(te,e),Object(r.transition_out)(ne),Object(r.transition_out)(F.$$.fragment,e),Object(r.transition_out)(re),Object(r.transition_out)(ae),Object(r.transition_out)(oe),Object(r.transition_out)(ce),Object(r.transition_out)(ie),Object(r.transition_out)(le,e),Object(r.transition_out)(be,e),Y=!1},d(e){e&&Object(r.detach)(t),te&&te.d(e),ne&&ne.d(),Object(r.destroy_component)(F),re&&re.d(),ae&&ae.d(),oe&&oe.d(),ce&&ce.d(),ie&&ie.d(),le&&le.d(e),be&&be.d(e)}}}function h(e){let t,n,a;return n=new d.default({props:{diff:e[9],reverseColors:!0}}),{c(){t=Object(r.element)("span"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","diff block svelte-js03an")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(e,t){const r={};512&t&&(r.diff=e[9]),n.$set(r)},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function y(e){let t,n,a,o;return n=new l.default({props:{value:e[8],digits:2,zero:"",suffix:e[20].songLeaderboard.maxPpSuffix}}),{c(){t=Object(r.text)("("),Object(r.create_component)(n.$$.fragment),a=Object(r.text)(")")},m(e,c){Object(r.insert)(e,t,c),Object(r.mount_component)(n,e,c),Object(r.insert)(e,a,c),o=!0},p(e,t){const r={};256&t&&(r.value=e[8]),1048576&t&&(r.suffix=e[20].songLeaderboard.maxPpSuffix),n.$set(r)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n,e),e&&Object(r.detach)(a)}}}function v(e){let t,n,a,o,c;return o=new u.default({props:{value:e[10]}}),{c(){t=Object(r.element)("span"),n=Object(r.element)("i"),a=Object(r.space)(),Object(r.create_component)(o.$$.fragment),Object(r.attr)(n,"class","fas fa-clock"),Object(r.attr)(t,"class","time block svelte-js03an")},m(e,i){Object(r.insert)(e,t,i),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.mount_component)(o,t,null),c=!0},p(e,t){const n={};1024&t&&(n.value=e[10]),o.$set(n)},i(e){c||(Object(r.transition_in)(o.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(o.$$.fragment,e),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(o)}}}function _(e){let t,n,a,o,c,i;return c=new l.default({props:{value:e[11],digits:0,suffix:e[20].songBrowser.fields.bpmShort.toLowerCase()}}),{c(){t=Object(r.element)("span"),n=Object(r.element)("i"),a=Object(r.space)(),o=Object(r.element)("strong"),Object(r.create_component)(c.$$.fragment),Object(r.attr)(n,"class","fas fa-drum"),Object(r.attr)(t,"class","bpm block svelte-js03an")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o),Object(r.mount_component)(c,o,null),i=!0},p(e,t){const n={};2048&t&&(n.value=e[11]),1048576&t&&(n.suffix=e[20].songBrowser.fields.bpmShort.toLowerCase()),c.$set(n)},i(e){i||(Object(r.transition_in)(c.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c)}}}function w(e){let t,n,a,o,c,i;return c=new l.default({props:{value:e[12],digits:0,suffix:e[20].songBrowser.fields.njsShort.toLowerCase()}}),{c(){t=Object(r.element)("span"),n=Object(r.element)("i"),a=Object(r.space)(),o=Object(r.element)("strong"),Object(r.create_component)(c.$$.fragment),Object(r.attr)(n,"class","fas fa-tachometer-alt"),Object(r.attr)(t,"class","njs block svelte-js03an")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o),Object(r.mount_component)(c,o,null),i=!0},p(e,t){const n={};4096&t&&(n.value=e[12]),1048576&t&&(n.suffix=e[20].songBrowser.fields.njsShort.toLowerCase()),c.$set(n)},i(e){i||(Object(r.transition_in)(c.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c)}}}function k(e){let t,n,a,o,c,i;return c=new l.default({props:{value:e[13],digits:2,suffix:e[20].songBrowser.fields.npsShort.toLowerCase()}}),{c(){t=Object(r.element)("span"),n=Object(r.element)("i"),a=Object(r.space)(),o=Object(r.element)("strong"),Object(r.create_component)(c.$$.fragment),Object(r.attr)(n,"class","fas fa-fire"),Object(r.attr)(t,"class","nps block svelte-js03an")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o),Object(r.mount_component)(c,o,null),i=!0},p(e,t){const n={};8192&t&&(n.value=e[13]),1048576&t&&(n.suffix=e[20].songBrowser.fields.npsShort.toLowerCase()),c.$set(n)},i(e){i||(Object(r.transition_in)(c.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c)}}}function $(e){let t,n;return t=new s.default({props:{hash:e[2],twitchUrl:e[14]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4&n&&(r.hash=e[2]),16384&n&&(r.twitchUrl=e[14]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function x(e){let t,n,a=e[3]&&e[3].length&&g(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[3]&&e[3].length?a?(a.p(e,n),8&n&&Object(r.transition_in)(a,1)):(a=g(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function S(e,t,n){let c;Object(r.component_subscribe)(e,i._,e=>n(20,c=e));let{$$slots:s={},$$scope:l}=t,{leaderboardId:d}=t,{hash:u}=t,{songName:b=""}=t,{songSubName:p=""}=t,{songAuthorName:f=""}=t,{levelAuthorName:O=""}=t,{stars:j=null}=t,{maxPp:m}=t,{diffInfo:g}=t,{duration:h}=t,{bpm:y}=t,{njs:v}=t,{nps:_}=t,{twitchUrl:w}=t,{showIcons:k=!0}=t,{bgLeft:$="0rem"}=t,{bgTop:x="0rem"}=t,{padding:S="1.25em"}=t,{iconSize:P="1em"}=t,{showBgCover:I=!0}=t,C=["bsr","bs","preview","twitch","oneclick"];return Object(a.onMount)(async()=>{const e=await Object(o.getConfig)();C=e&&e.songBrowser&&e.songBrowser.showIcons?e.songBrowser.showIcons:C,n(0,I=I&&e&&e.songLeaderboard&&!1!==e.songLeaderboard.showBgCover)}),e.$$set=e=>{"leaderboardId"in e&&n(1,d=e.leaderboardId),"hash"in e&&n(2,u=e.hash),"songName"in e&&n(3,b=e.songName),"songSubName"in e&&n(4,p=e.songSubName),"songAuthorName"in e&&n(5,f=e.songAuthorName),"levelAuthorName"in e&&n(6,O=e.levelAuthorName),"stars"in e&&n(7,j=e.stars),"maxPp"in e&&n(8,m=e.maxPp),"diffInfo"in e&&n(9,g=e.diffInfo),"duration"in e&&n(10,h=e.duration),"bpm"in e&&n(11,y=e.bpm),"njs"in e&&n(12,v=e.njs),"nps"in e&&n(13,_=e.nps),"twitchUrl"in e&&n(14,w=e.twitchUrl),"showIcons"in e&&n(15,k=e.showIcons),"bgLeft"in e&&n(16,$=e.bgLeft),"bgTop"in e&&n(17,x=e.bgTop),"padding"in e&&n(18,S=e.padding),"iconSize"in e&&n(19,P=e.iconSize),"showBgCover"in e&&n(0,I=e.showBgCover),"$$scope"in e&&n(21,l=e.$$scope)},[I,d,u,b,p,f,O,j,m,g,h,y,v,_,w,k,$,x,S,P,c,l,s]}class P extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-js03an-style")||((t=Object(r.element)("style")).id="svelte-js03an-style",t.textContent=".box.svelte-js03an.svelte-js03an{position:relative;height:100%;padding:var(--padding)}.song-card.svelte-js03an.svelte-js03an{display:flex;flex-direction:column;justify-content:space-between;height:100%}.song-card.svelte-js03an.svelte-js03an:before{position:absolute;content:' ';background-image:var(--background-image);left:var(--bgLeft, 0);top:var(--bgTop, 0);width:calc(100% - var(--bgLeft) - var(--bgLeft));height:calc(100% - var(--bgTop) - var(--bgTop));background-repeat:no-repeat;background-size:cover;opacity:0.1;pointer-events:none}header.svelte-js03an.svelte-js03an{color:var(--alternate)}header.svelte-js03an .title.svelte-js03an{color:inherit !important}header.svelte-js03an h1.svelte-js03an{font-size:1.5em!important;margin-bottom:.25em}header.svelte-js03an h2.svelte-js03an{font-size:1.25em!important;margin-top:0;margin-bottom:.5em}header.svelte-js03an h3.title.svelte-js03an{font-size:1em!important;margin-top:0}header.svelte-js03an h3.title .status.svelte-js03an{color:var(--increase, #42b129) !important}header.svelte-js03an h3.title .status.unranked.svelte-js03an{color:var(--decrease, #f94022) !important}header.svelte-js03an .block.svelte-js03an{display:inline-block;margin-right:.5em;margin-bottom:.5em;color:var(--textColor, #fff) !important}header.svelte-js03an small.svelte-js03an{font-size:0.75em;color:var(--ppColour)}header.svelte-js03an .diff.svelte-js03an .reversed{display:inline-block;padding:.1em .25em .25em .25em;border-radius:.25em}header.svelte-js03an .stats.svelte-js03an{display:flex;justify-content:space-around}main.svelte-js03an.svelte-js03an{margin:.75em 0 1.25em}footer.svelte-js03an.svelte-js03an{font-size:var(--iconSize);text-align:right}footer.svelte-js03an>div{margin-top:0}footer.svelte-js03an button{margin-bottom:0}",Object(r.append)(document.head,t)),Object(r.init)(this,e,S,x,r.safe_not_equal,{leaderboardId:1,hash:2,songName:3,songSubName:4,songAuthorName:5,levelAuthorName:6,stars:7,maxPp:8,diffInfo:9,duration:10,bpm:11,njs:12,nps:13,twitchUrl:14,showIcons:15,bgLeft:16,bgTop:17,padding:18,iconSize:19,showBgCover:0})}}t.default=P},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(13),c=n(24),i=n(36),s=n(92),l=n(120),d=n.n(l),u=n(9),b=n(73),p=n(84);function f(e){let t,n,a,o,c,i,s,l=e[3].includes("bsr"),d=e[3].includes("bs"),u=e[3].includes("oneclick"),b=e[3].includes("preview"),p=e[3].includes("twitch")&&e[0]&&e[0].length,f=!1,v=l&&O(e),_=d&&j(e),w=u&&m(e),k=b&&g(e),$=p&&h(e),x=f&&y(e);return{c(){v&&v.c(),t=Object(r.space)(),_&&_.c(),n=Object(r.space)(),w&&w.c(),a=Object(r.space)(),k&&k.c(),o=Object(r.space)(),$&&$.c(),c=Object(r.space)(),x&&x.c(),i=Object(r.empty)()},m(e,l){v&&v.m(e,l),Object(r.insert)(e,t,l),_&&_.m(e,l),Object(r.insert)(e,n,l),w&&w.m(e,l),Object(r.insert)(e,a,l),k&&k.m(e,l),Object(r.insert)(e,o,l),$&&$.m(e,l),Object(r.insert)(e,c,l),x&&x.m(e,l),Object(r.insert)(e,i,l),s=!0},p(e,s){8&s&&(l=e[3].includes("bsr")),l?v?(v.p(e,s),8&s&&Object(r.transition_in)(v,1)):(v=O(e),v.c(),Object(r.transition_in)(v,1),v.m(t.parentNode,t)):v&&(Object(r.group_outros)(),Object(r.transition_out)(v,1,1,()=>{v=null}),Object(r.check_outros)()),8&s&&(d=e[3].includes("bs")),d?_?(_.p(e,s),8&s&&Object(r.transition_in)(_,1)):(_=j(e),_.c(),Object(r.transition_in)(_,1),_.m(n.parentNode,n)):_&&(Object(r.group_outros)(),Object(r.transition_out)(_,1,1,()=>{_=null}),Object(r.check_outros)()),8&s&&(u=e[3].includes("oneclick")),u?w?(w.p(e,s),8&s&&Object(r.transition_in)(w,1)):(w=m(e),w.c(),Object(r.transition_in)(w,1),w.m(a.parentNode,a)):w&&(Object(r.group_outros)(),Object(r.transition_out)(w,1,1,()=>{w=null}),Object(r.check_outros)()),8&s&&(b=e[3].includes("preview")),b?k?(k.p(e,s),8&s&&Object(r.transition_in)(k,1)):(k=g(e),k.c(),Object(r.transition_in)(k,1),k.m(o.parentNode,o)):k&&(Object(r.group_outros)(),Object(r.transition_out)(k,1,1,()=>{k=null}),Object(r.check_outros)()),9&s&&(p=e[3].includes("twitch")&&e[0]&&e[0].length),p?$?($.p(e,s),9&s&&Object(r.transition_in)($,1)):($=h(e),$.c(),Object(r.transition_in)($,1),$.m(c.parentNode,c)):$&&(Object(r.group_outros)(),Object(r.transition_out)($,1,1,()=>{$=null}),Object(r.check_outros)()),10&s&&(f=!1),f?x?(x.p(e,s),10&s&&Object(r.transition_in)(x,1)):(x=y(e),x.c(),Object(r.transition_in)(x,1),x.m(i.parentNode,i)):x&&(Object(r.group_outros)(),Object(r.transition_out)(x,1,1,()=>{x=null}),Object(r.check_outros)())},i(e){s||(Object(r.transition_in)(v),Object(r.transition_in)(_),Object(r.transition_in)(w),Object(r.transition_in)(k),Object(r.transition_in)($),Object(r.transition_in)(x),s=!0)},o(e){Object(r.transition_out)(v),Object(r.transition_out)(_),Object(r.transition_out)(w),Object(r.transition_out)(k),Object(r.transition_out)($),Object(r.transition_out)(x),s=!1},d(e){v&&v.d(e),e&&Object(r.detach)(t),_&&_.d(e),e&&Object(r.detach)(n),w&&w.d(e),e&&Object(r.detach)(a),k&&k.d(e),e&&Object(r.detach)(o),$&&$.d(e),e&&Object(r.detach)(c),x&&x.d(e),e&&Object(r.detach)(i)}}}function O(e){let t,n;return t=new b.default({props:{iconFa:"fas fa-exclamation",title:e[4].songBrowser.icons.bsrTooltip}}),t.$on("click",(function(){Object(r.is_function)(Object(s.copyToClipboard)("!bsr "+e[2]))&&Object(s.copyToClipboard)("!bsr "+e[2]).apply(this,arguments)})),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(n,r){e=n;const a={};16&r&&(a.title=e[4].songBrowser.icons.bsrTooltip),t.$set(a)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function j(e){let t,n,a,o;return n=new b.default({props:{icon:d.a,title:e[4].songBrowser.icons.beatSaverTooltip}}),{c(){t=Object(r.element)("a"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"href",a="https://beatsaver.com/maps/"+e[2]),Object(r.attr)(t,"target","_blank")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,c){const i={};16&c&&(i.title=e[4].songBrowser.icons.beatSaverTooltip),n.$set(i),(!o||4&c&&a!==(a="https://beatsaver.com/maps/"+e[2]))&&Object(r.attr)(t,"href",a)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function m(e){let t,n,a,o;return n=new b.default({props:{iconFa:"far fa-hand-pointer",title:e[4].songBrowser.icons.oneclick}}),{c(){t=Object(r.element)("a"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"href",a="beatsaver://"+e[2])},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,c){const i={};16&c&&(i.title=e[4].songBrowser.icons.oneclick),n.$set(i),(!o||4&c&&a!==(a="beatsaver://"+e[2]))&&Object(r.attr)(t,"href",a)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function g(e){let t,n,a,o;return n=new b.default({props:{iconFa:"fa fa-play-circle",title:e[4].songBrowser.icons.preview}}),{c(){t=Object(r.element)("a"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"href",a="https://skystudioapps.com/bs-viewer/?id="+e[2]),Object(r.attr)(t,"target","_blank")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),o=!0},p(e,c){const i={};16&c&&(i.title=e[4].songBrowser.icons.preview),n.$set(i),(!o||4&c&&a!==(a="https://skystudioapps.com/bs-viewer/?id="+e[2]))&&Object(r.attr)(t,"href",a)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function h(e){let t,n,a;return n=new b.default({props:{iconFa:"fab fa-twitch",type:"twitch",title:e[4].songBrowser.icons.twitchTooltip}}),{c(){t=Object(r.element)("a"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","video"),Object(r.attr)(t,"href",e[0]),Object(r.attr)(t,"target","_blank")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(e,o){const c={};16&o&&(c.title=e[4].songBrowser.icons.twitchTooltip),n.$set(c),(!a||1&o)&&Object(r.attr)(t,"href",e[0])},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function y(e){let t,n;return t=new b.default({props:{title:e[4].songBrowser.icons.beatSaviorTooltip,$$slots:{default:[v]},$$scope:{ctx:e}}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};16&n&&(r.title=e[4].songBrowser.icons.beatSaviorTooltip),128&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function v(e){let t,n;return t=new p.default({}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function _(e){let t,n,a=e[2]&&e[2].length&&f(e);return{c(){t=Object(r.element)("div"),a&&a.c()},m(e,o){Object(r.insert)(e,t,o),a&&a.m(t,null),n=!0},p(e,[n]){e[2]&&e[2].length?a?(a.p(e,n),4&n&&Object(r.transition_in)(a,1)):(a=f(e),a.c(),Object(r.transition_in)(a,1),a.m(t,null)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){e&&Object(r.detach)(t),a&&a.d()}}}function w(e,t,n){let s;Object(r.component_subscribe)(e,u._,e=>n(4,s=e));let l,{hash:d}=t,{twitchUrl:b}=t,{bsExistsForPlayer:p=null}=t,f=["bsr","bs","preview","twitch","oneclick","beatsavior"];async function O(){const e=await Object(i.getConfig)("songBrowser");n(3,f=e&&e.showIcons?e.showIcons:f)}return Object(a.onMount)(async()=>{await O();const e=await Object(c.getSongByHash)(d);return e&&e.key&&n(2,l=e.key),o.default.on("config-changed",O)}),e.$$set=e=>{"hash"in e&&n(5,d=e.hash),"twitchUrl"in e&&n(0,b=e.twitchUrl),"bsExistsForPlayer"in e&&n(1,p=e.bsExistsForPlayer)},[b,p,l,f,s,d]}class k extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,w,_,r.safe_not_equal,{hash:5,twitchUrl:0,bsExistsForPlayer:1})}}t.default=k},function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" version="1.1"><g fill="none" stroke="#000000" stroke-width="10"><path d="M 100,7 189,47 100,87 12,47 Z" stroke-linejoin="round"></path><path d="M 189,47 189,155 100,196 12,155 12,47" stroke-linejoin="round"></path><path d="M 100,87 100,196" stroke-linejoin="round"></path><path d="M 26,77 85,106 53,130 Z" stroke-linejoin="round"></path></g></svg>'},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(122),c=n(60),i=n(7),s=n(13),l=n(8),d=n(9),u=n(64),b=n(38);function p(e){let t;return{c(){t=Object(r.element)("span"),t.textContent="-"},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function f(e){let t,n,a,o;const c=[j,O],i=[];function s(e,t){return e[2]?0:1}return t=s(e),n=i[t]=c[t](e),{c(){n.c(),a=Object(r.empty)()},m(e,n){i[t].m(e,n),Object(r.insert)(e,a,n),o=!0},p(e,o){let l=t;t=s(e),t===l?i[t].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),n=i[t],n||(n=i[t]=c[t](e),n.c()),Object(r.transition_in)(n,1),n.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(n),o=!0)},o(e){Object(r.transition_out)(n),o=!1},d(e){i[t].d(e),e&&Object(r.detach)(a)}}}function O(e){let t,n,a,o,c,i,s,b,p;return c=new u.default({props:{value:e[9],prefix:"#",zero:"-",digits:0}}),{c(){t=Object(r.element)("a"),n=Object(r.element)("i"),a=Object(r.space)(),o=Object(r.element)("span"),Object(r.create_component)(c.$$.fragment),Object(r.attr)(n,"class","fas fa-globe-americas"),Object(r.toggle_class)(n,"fa-spin",e[4]),Object(r.attr)(o,"class","value svelte-1ccwjri"),Object(r.attr)(t,"title",i=Object(d.trans)("songBrowser.rankOfDate",{date:Object(l.formatDate)(e[6])})),Object(r.attr)(t,"class","svelte-1ccwjri"),Object(r.toggle_class)(t,"faded",e[5])},m(i,l){Object(r.insert)(i,t,l),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o),Object(r.mount_component)(c,o,null),s=!0,b||(p=Object(r.listen)(t,"click",e[13]),b=!0)},p(e,a){16&a&&Object(r.toggle_class)(n,"fa-spin",e[4]);const o={};512&a&&(o.value=e[9]),c.$set(o),(!s||64&a&&i!==(i=Object(d.trans)("songBrowser.rankOfDate",{date:Object(l.formatDate)(e[6])})))&&Object(r.attr)(t,"title",i),32&a&&Object(r.toggle_class)(t,"faded",e[5])},i(e){s||(Object(r.transition_in)(c.$$.fragment,e),s=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),s=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c),b=!1,p()}}}function j(e){let t,n,a,o,c;return o=new u.default({props:{value:e[9],prefix:"#",zero:"-",digits:0}}),{c(){t=Object(r.element)("i"),n=Object(r.space)(),a=Object(r.element)("span"),Object(r.create_component)(o.$$.fragment),Object(r.attr)(t,"class","fas fa-globe-americas"),Object(r.toggle_class)(t,"fa-spin",e[4]),Object(r.attr)(a,"class","value svelte-1ccwjri")},m(e,i){Object(r.insert)(e,t,i),Object(r.insert)(e,n,i),Object(r.insert)(e,a,i),Object(r.mount_component)(o,a,null),c=!0},p(e,n){16&n&&Object(r.toggle_class)(t,"fa-spin",e[4]);const a={};512&n&&(a.value=e[9]),o.$set(a)},i(e){c||(Object(r.transition_in)(o.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(o.$$.fragment,e),c=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),e&&Object(r.detach)(a),Object(r.destroy_component)(o)}}}function m(e){let t,n,a,o,c,i,s,l;i=new u.default({props:{value:e[10],prefix:"#",zero:"-",digits:0}});let d=e[1]&&g(e);return{c(){t=Object(r.element)("span"),n=Object(r.element)("img"),o=Object(r.space)(),c=Object(r.element)("span"),Object(r.create_component)(i.$$.fragment),d&&d.c(),n.src!==(a="/imports/images/flags/"+e[0]+".png")&&Object(r.attr)(n,"src",a),Object(r.attr)(c,"class","value svelte-1ccwjri"),Object(r.attr)(c,"title",s=!e[1]&&e[0]&&e[10]&&e[7]?"#"+e[10]+" / "+e[7]:""),Object(r.attr)(t,"class","country-rank svelte-1ccwjri"),Object(r.set_style)(t,"display",e[3]?"inline":"block"),Object(r.toggle_class)(t,"faded",e[8])},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.append)(t,o),Object(r.append)(t,c),Object(r.mount_component)(i,c,null),d&&d.m(c,null),l=!0},p(e,o){(!l||1&o&&n.src!==(a="/imports/images/flags/"+e[0]+".png"))&&Object(r.attr)(n,"src",a);const u={};1024&o&&(u.value=e[10]),i.$set(u),e[1]?d?(d.p(e,o),2&o&&Object(r.transition_in)(d,1)):(d=g(e),d.c(),Object(r.transition_in)(d,1),d.m(c,null)):d&&(Object(r.group_outros)(),Object(r.transition_out)(d,1,1,()=>{d=null}),Object(r.check_outros)()),(!l||1155&o&&s!==(s=!e[1]&&e[0]&&e[10]&&e[7]?"#"+e[10]+" / "+e[7]:""))&&Object(r.attr)(c,"title",s),(!l||8&o)&&Object(r.set_style)(t,"display",e[3]?"inline":"block"),256&o&&Object(r.toggle_class)(t,"faded",e[8])},i(e){l||(Object(r.transition_in)(i.$$.fragment,e),Object(r.transition_in)(d),l=!0)},o(e){Object(r.transition_out)(i.$$.fragment,e),Object(r.transition_out)(d),l=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(i),d&&d.d()}}}function g(e){let t,n;return t=new u.default({props:{value:e[7],prefix:"/",zero:"-",digits:0}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};128&n&&(r.value=e[7]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function h(e){let t,n,a,o,c=!e[9]&&!(e[0]&&e[10])&&p(),i=e[9]&&f(e),s=e[0]&&e[10]&&m(e);return{c(){c&&c.c(),t=Object(r.space)(),i&&i.c(),n=Object(r.space)(),s&&s.c(),a=Object(r.empty)()},m(e,l){c&&c.m(e,l),Object(r.insert)(e,t,l),i&&i.m(e,l),Object(r.insert)(e,n,l),s&&s.m(e,l),Object(r.insert)(e,a,l),o=!0},p(e,[o]){e[9]||e[0]&&e[10]?c&&(c.d(1),c=null):c||(c=p(),c.c(),c.m(t.parentNode,t)),e[9]?i?(i.p(e,o),512&o&&Object(r.transition_in)(i,1)):(i=f(e),i.c(),Object(r.transition_in)(i,1),i.m(n.parentNode,n)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)()),e[0]&&e[10]?s?(s.p(e,o),1025&o&&Object(r.transition_in)(s,1)):(s=m(e),s.c(),Object(r.transition_in)(s,1),s.m(a.parentNode,a)):s&&(Object(r.group_outros)(),Object(r.transition_out)(s,1,1,()=>{s=null}),Object(r.check_outros)())},i(e){o||(Object(r.transition_in)(i),Object(r.transition_in)(s),o=!0)},o(e){Object(r.transition_out)(i),Object(r.transition_out)(s),o=!1},d(e){c&&c.d(e),e&&Object(r.detach)(t),i&&i.d(e),e&&Object(r.detach)(n),s&&s.d(e),e&&Object(r.detach)(a)}}}function y(e,t,n){let l,d,u,p,{rank:f}=t,{countryRank:O}=t,{country:j}=t,{lastUpdated:m}=t,{leaderboardId:g}=t,{playerId:h}=t,{timeset:y}=t,{recentPlay:v=null}=t,{showCountryTotal:_=!1}=t,{disableUpdating:w=!1}=t,{inline:k=!0}=t,{cachedRecentPlay:$=null}=t,x=!1,S=!1,P=Object(i.dateFromString)(m||y);const I=Object(o.tweened)(f,{duration:500,easing:c.cubicOut});Object(r.component_subscribe)(e,I,e=>n(9,l=e));const C=Object(o.tweened)(u,{duration:500,easing:c.cubicOut});let T;return Object(r.component_subscribe)(e,C,e=>n(10,d=e)),Object(a.onMount)(()=>{if(!w){const e=s.default.on("player-score-update-start",({playerId:e,leaderboardId:t})=>{e===h&&t===g&&n(4,x=!0),setTimeout(()=>n(4,x=!1),1e4)}),t=s.default.on("player-score-updated",({playerId:e,leaderboardId:t,rank:r,lastUpdated:a,timeset:o})=>{r&&e===h&&t===g&&(n(4,x=!1),n(6,P=Object(i.dateFromString)(a||o)),I.set(r))}),r=s.default.on("player-score-update-failed",({playerId:e,leaderboardId:t})=>{e===h&&t===g&&n(4,x=!1)});return()=>{e(),t(),r()}}}),e.$$set=e=>{"rank"in e&&n(14,f=e.rank),"countryRank"in e&&n(15,O=e.countryRank),"country"in e&&n(0,j=e.country),"lastUpdated"in e&&n(16,m=e.lastUpdated),"leaderboardId"in e&&n(17,g=e.leaderboardId),"playerId"in e&&n(18,h=e.playerId),"timeset"in e&&n(19,y=e.timeset),"recentPlay"in e&&n(20,v=e.recentPlay),"showCountryTotal"in e&&n(1,_=e.showCountryTotal),"disableUpdating"in e&&n(2,w=e.disableUpdating),"inline"in e&&n(3,k=e.inline),"cachedRecentPlay"in e&&n(21,$=e.cachedRecentPlay)},e.$$.update=()=>{if(2621440&e.$$.dirty&&n(8,T=$&&y&&Object(i.dateFromString)($)<Object(i.dateFromString)(y)),16384&e.$$.dirty&&I.set(f),32769&e.$$.dirty&&j&&O&&O[j]&&(n(22,u=O[j].rank),n(7,p=O[j].total)),4194304&e.$$.dirty&&C.set(u),64&e.$$.dirty&&P){const e=(new Date-Object(i.dateFromString)(P))/864e5;n(5,S=isNaN(e)||e>1)}},[j,_,w,k,x,S,P,p,T,l,d,I,C,async function(){h&&g&&!x&&(n(4,x=!0),await Object(b.refreshPlayerScoreRank)(h,[g],v))},f,O,m,g,h,y,v,$]}class v extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1ccwjri-style")||((t=Object(r.element)("style")).id="svelte-1ccwjri-style",t.textContent="a.svelte-1ccwjri{color:var(--textColor) !important}.faded.svelte-1ccwjri{color:var(--faded) !important}.value.svelte-1ccwjri{font-weight:500}.country-rank.svelte-1ccwjri{margin-left:.25rem}",Object(r.append)(document.head,t)),Object(r.init)(this,e,y,h,r.safe_not_equal,{rank:14,countryRank:15,country:0,lastUpdated:16,leaderboardId:17,playerId:18,timeset:19,recentPlay:20,showCountryTotal:1,disableUpdating:2,inline:3,cachedRecentPlay:21})}}t.default=v},function(e,t,n){"use strict";n.r(t),n.d(t,"spring",(function(){return i})),n.d(t,"tweened",(function(){return l}));var r=n(54),a=n(55),o=n(60);function c(e){return"[object Date]"===Object.prototype.toString.call(e)}function i(e,t={}){const n=Object(r.writable)(e),{stiffness:o=.15,damping:i=.8,precision:s=.01}=t;let l,d,u,b=e,p=e,f=1,O=0,j=!1;function m(t,r={}){p=t;const o=u={};if(null==e||r.hard||g.stiffness>=1&&g.damping>=1)return j=!0,l=Object(a.now)(),b=t,n.set(e=p),Promise.resolve();if(r.soft){const e=!0===r.soft?.5:+r.soft;O=1/(60*e),f=0}return d||(l=Object(a.now)(),j=!1,d=Object(a.loop)(t=>{if(j)return j=!1,d=null,!1;f=Math.min(f+O,1);const r={inv_mass:f,opts:g,settled:!0,dt:60*(t-l)/1e3},a=function e(t,n,r,a){if("number"==typeof r||c(r)){const e=a-r,o=(r-n)/(t.dt||1/60),i=(o+(t.opts.stiffness*e-t.opts.damping*o)*t.inv_mass)*t.dt;return Math.abs(i)<t.opts.precision&&Math.abs(e)<t.opts.precision?a:(t.settled=!1,c(r)?new Date(r.getTime()+i):r+i)}if(Array.isArray(r))return r.map((o,c)=>e(t,n[c],r[c],a[c]));if("object"==typeof r){const o={};for(const c in r)o[c]=e(t,n[c],r[c],a[c]);return o}throw new Error(`Cannot spring ${typeof r} values`)}(r,b,e,p);return l=t,b=e,n.set(e=a),r.settled&&(d=null),!r.settled})),new Promise(e=>{d.promise.then(()=>{o===u&&e()})})}const g={set:m,update:(t,n)=>m(t(p,e),n),subscribe:n.subscribe,stiffness:o,damping:i,precision:s};return g}function s(e,t){if(e===t||e!=e)return()=>e;const n=typeof e;if(n!==typeof t||Array.isArray(e)!==Array.isArray(t))throw new Error("Cannot interpolate values of different type");if(Array.isArray(e)){const n=t.map((t,n)=>s(e[n],t));return e=>n.map(t=>t(e))}if("object"===n){if(!e||!t)throw new Error("Object cannot be null");if(c(e)&&c(t)){e=e.getTime();const n=(t=t.getTime())-e;return t=>new Date(e+t*n)}const n=Object.keys(t),r={};return n.forEach(n=>{r[n]=s(e[n],t[n])}),e=>{const t={};return n.forEach(n=>{t[n]=r[n](e)}),t}}if("number"===n){const n=t-e;return t=>e+t*n}throw new Error(`Cannot interpolate ${n} values`)}function l(e,t={}){const n=Object(r.writable)(e);let c,i=e;function l(r,l){if(null==e)return n.set(e=r),Promise.resolve();i=r;let d=c,u=!1,{delay:b=0,duration:p=400,easing:f=o.linear,interpolate:O=s}=Object(a.assign)(Object(a.assign)({},t),l);if(0===p)return d&&(d.abort(),d=null),n.set(e=i),Promise.resolve();const j=Object(a.now)()+b;let m;return c=Object(a.loop)(t=>{if(t<j)return!0;u||(m=O(e,r),"function"==typeof p&&(p=p(e,r)),u=!0),d&&(d.abort(),d=null);const a=t-j;return a>p?(n.set(e=r),!1):(n.set(e=m(f(a/p))),!0)}),c.promise}return{set:l,update:(t,n)=>l(t(i,e),n),subscribe:n.subscribe}}},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(14),o=n(124);function c(e){let t,n,a;return n=new o.default({props:{data:e[3],showAcc:e[0],showStats:e[1],showGrid:e[2]}}),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","svelte-5gm870")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(e,t){const r={};8&t&&(r.data=e[3]),1&t&&(r.showAcc=e[0]),2&t&&(r.showStats=e[1]),4&t&&(r.showGrid=e[2]),n.$set(r)},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function i(e){let t,n,a=e[3]&&c(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[3]?a?(a.p(e,n),8&n&&Object(r.transition_in)(a,1)):(a=c(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function s(e,t,n){let{data:r}=t,{showAcc:o=!0}=t,{showStats:c=!0}=t,{showGrid:i=!1}=t,s=null;return e.$$set=e=>{"data"in e&&n(4,r=e.data),"showAcc"in e&&n(0,o=e.showAcc),"showStats"in e&&n(1,c=e.showStats),"showGrid"in e&&n(2,i=e.showGrid)},e.$$.update=()=>{16&e.$$.dirty&&n(3,s=function(e){if(!e||!e.trackers)return null;const t=Object(a.extractBeatSaviorTrackersData)(e.trackers);return t?{...t,saberAColor:e.saberAColor,saberBColor:e.saberBColor}:null}(r))},[o,c,i,s,r]}class l extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-5gm870-style")||((t=Object(r.element)("style")).id="svelte-5gm870-style",t.textContent="div.svelte-5gm870{max-width:20em}",Object(r.append)(document.head,t)),Object(r.init)(this,e,s,i,r.safe_not_equal,{data:4,showAcc:0,showStats:1,showGrid:2})}}t.default=l},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(9),o=n(125),c=n(128),i=n(129),s=n(130);function l(e){let t,n,a,o;const c=[u,d],i=[];function s(e,t){return e[5]?0:1}return n=s(e),a=i[n]=c[n](e),{c(){t=Object(r.element)("div"),a.c(),Object(r.attr)(t,"class","beat-savior svelte-d4kmoo"),Object(r.toggle_class)(t,"switchable",e[5])},m(e,a){Object(r.insert)(e,t,a),i[n].m(t,null),o=!0},p(e,o){let l=n;n=s(e),n===l?i[n].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),a=i[n],a||(a=i[n]=c[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null)),32&o&&Object(r.toggle_class)(t,"switchable",e[5])},i(e){o||(Object(r.transition_in)(a),o=!0)},o(e){Object(r.transition_out)(a),o=!1},d(e){e&&Object(r.detach)(t),i[n].d()}}}function d(e){let t,n,a,o,c,i=e[1]&&b(e),s=e[3]&&p(e),l=e[4]&&f(e),d=e[2]&&O(e);return{c(){i&&i.c(),t=Object(r.space)(),s&&s.c(),n=Object(r.space)(),l&&l.c(),a=Object(r.space)(),d&&d.c(),o=Object(r.empty)()},m(e,u){i&&i.m(e,u),Object(r.insert)(e,t,u),s&&s.m(e,u),Object(r.insert)(e,n,u),l&&l.m(e,u),Object(r.insert)(e,a,u),d&&d.m(e,u),Object(r.insert)(e,o,u),c=!0},p(e,c){e[1]?i?(i.p(e,c),2&c&&Object(r.transition_in)(i,1)):(i=b(e),i.c(),Object(r.transition_in)(i,1),i.m(t.parentNode,t)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)()),e[3]?s?(s.p(e,c),8&c&&Object(r.transition_in)(s,1)):(s=p(e),s.c(),Object(r.transition_in)(s,1),s.m(n.parentNode,n)):s&&(Object(r.group_outros)(),Object(r.transition_out)(s,1,1,()=>{s=null}),Object(r.check_outros)()),e[4]?l?(l.p(e,c),16&c&&Object(r.transition_in)(l,1)):(l=f(e),l.c(),Object(r.transition_in)(l,1),l.m(a.parentNode,a)):l&&(Object(r.group_outros)(),Object(r.transition_out)(l,1,1,()=>{l=null}),Object(r.check_outros)()),e[2]?d?(d.p(e,c),4&c&&Object(r.transition_in)(d,1)):(d=O(e),d.c(),Object(r.transition_in)(d,1),d.m(o.parentNode,o)):d&&(Object(r.group_outros)(),Object(r.transition_out)(d,1,1,()=>{d=null}),Object(r.check_outros)())},i(e){c||(Object(r.transition_in)(i),Object(r.transition_in)(s),Object(r.transition_in)(l),Object(r.transition_in)(d),c=!0)},o(e){Object(r.transition_out)(i),Object(r.transition_out)(s),Object(r.transition_out)(l),Object(r.transition_out)(d),c=!1},d(e){i&&i.d(e),e&&Object(r.detach)(t),s&&s.d(e),e&&Object(r.detach)(n),l&&l.d(e),e&&Object(r.detach)(a),d&&d.d(e),e&&Object(r.detach)(o)}}}function u(e){let t,n,a,l,d,u,b,p,f,O,j,m,g,h,y,v,_;return u=new o.default({props:{data:e[0]}}),p=new i.default({props:{data:e[0],dataIsAvg:e[6]}}),j=new c.default({props:{data:e[0]}}),h=new s.default({props:{data:e[0]}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("i"),l=Object(r.space)(),d=Object(r.element)("div"),Object(r.create_component)(u.$$.fragment),b=Object(r.space)(),Object(r.create_component)(p.$$.fragment),f=Object(r.space)(),O=Object(r.element)("div"),Object(r.create_component)(j.$$.fragment),m=Object(r.space)(),g=Object(r.element)("div"),Object(r.create_component)(h.$$.fragment),Object(r.attr)(n,"class","fa fa-exchange-alt svelte-d4kmoo"),Object(r.attr)(n,"title",a="acc"===e[7]?e[8].beatSavior.switchToGridView:"grid"===e[7]?e[8].beatSavior.switchToChartView:e[8].beatSavior.switchToAccView),Object(r.attr)(t,"class","switch svelte-d4kmoo"),Object(r.attr)(d,"class","acc svelte-d4kmoo"),Object(r.toggle_class)(d,"not-visible","acc"!==e[7]),Object(r.attr)(O,"class","svelte-d4kmoo"),Object(r.toggle_class)(O,"not-visible","grid"!==e[7]),Object(r.attr)(g,"class","chart svelte-d4kmoo"),Object(r.toggle_class)(g,"not-visible","chart"!==e[7])},m(a,o){Object(r.insert)(a,t,o),Object(r.append)(t,n),Object(r.insert)(a,l,o),Object(r.insert)(a,d,o),Object(r.mount_component)(u,d,null),Object(r.append)(d,b),Object(r.mount_component)(p,d,null),Object(r.insert)(a,f,o),Object(r.insert)(a,O,o),Object(r.mount_component)(j,O,null),Object(r.insert)(a,m,o),Object(r.insert)(a,g,o),Object(r.mount_component)(h,g,null),y=!0,v||(_=Object(r.listen)(n,"click",e[9]),v=!0)},p(e,t){(!y||384&t&&a!==(a="acc"===e[7]?e[8].beatSavior.switchToGridView:"grid"===e[7]?e[8].beatSavior.switchToChartView:e[8].beatSavior.switchToAccView))&&Object(r.attr)(n,"title",a);const o={};1&t&&(o.data=e[0]),u.$set(o);const c={};1&t&&(c.data=e[0]),64&t&&(c.dataIsAvg=e[6]),p.$set(c),128&t&&Object(r.toggle_class)(d,"not-visible","acc"!==e[7]);const i={};1&t&&(i.data=e[0]),j.$set(i),128&t&&Object(r.toggle_class)(O,"not-visible","grid"!==e[7]);const s={};1&t&&(s.data=e[0]),h.$set(s),128&t&&Object(r.toggle_class)(g,"not-visible","chart"!==e[7])},i(e){y||(Object(r.transition_in)(u.$$.fragment,e),Object(r.transition_in)(p.$$.fragment,e),Object(r.transition_in)(j.$$.fragment,e),Object(r.transition_in)(h.$$.fragment,e),y=!0)},o(e){Object(r.transition_out)(u.$$.fragment,e),Object(r.transition_out)(p.$$.fragment,e),Object(r.transition_out)(j.$$.fragment,e),Object(r.transition_out)(h.$$.fragment,e),y=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(l),e&&Object(r.detach)(d),Object(r.destroy_component)(u),Object(r.destroy_component)(p),e&&Object(r.detach)(f),e&&Object(r.detach)(O),Object(r.destroy_component)(j),e&&Object(r.detach)(m),e&&Object(r.detach)(g),Object(r.destroy_component)(h),v=!1,_()}}}function b(e){let t,n;return t=new o.default({props:{data:e[0]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n&&(r.data=e[0]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function p(e){let t,n;return t=new c.default({props:{data:e[0]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n&&(r.data=e[0]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function f(e){let t,n;return t=new s.default({props:{data:e[0]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n&&(r.data=e[0]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function O(e){let t,n;return t=new i.default({props:{data:e[0],dataIsAvg:e[6]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n&&(r.data=e[0]),64&n&&(r.dataIsAvg=e[6]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function j(e){let t,n,a=e[0]&&l(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=l(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function m(e,t,n){let o;Object(r.component_subscribe)(e,a._,e=>n(8,o=e));let{data:c=null}=t,{showAcc:i=!0}=t,{showStats:s=!0}=t,{showGrid:l=!0}=t,{showChart:d=!0}=t,{switchable:u=!0}=t,{dataIsAvg:b=!1}=t,p="acc";return e.$$set=e=>{"data"in e&&n(0,c=e.data),"showAcc"in e&&n(1,i=e.showAcc),"showStats"in e&&n(2,s=e.showStats),"showGrid"in e&&n(3,l=e.showGrid),"showChart"in e&&n(4,d=e.showChart),"switchable"in e&&n(5,u=e.switchable),"dataIsAvg"in e&&n(6,b=e.dataIsAvg)},[c,i,s,l,d,u,b,p,o,()=>n(7,p="acc"===p?"grid":"grid"===p?"chart":"acc")]}class g extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-d4kmoo-style")||((t=Object(r.element)("style")).id="svelte-d4kmoo-style",t.textContent=".switch.svelte-d4kmoo.svelte-d4kmoo{position:relative;z-index:1;height:1rem;margin:0;padding:0}.switch.svelte-d4kmoo i.fa.svelte-d4kmoo{position:absolute;top:0;right:0;cursor:pointer}.beat-savior.svelte-d4kmoo.svelte-d4kmoo{text-align:center}.beat-savior.svelte-d4kmoo>*{margin:.5em 0}.beat-savior.svelte-d4kmoo>*:last-child{margin-bottom:0}.beat-savior.switchable.svelte-d4kmoo.svelte-d4kmoo{display:grid;grid-template-columns:1fr;grid-template-rows:1fr;overflow:hidden}.beat-savior.switchable.svelte-d4kmoo>.svelte-d4kmoo{grid-area:1 / 1 / 1 / 1}.beat-savior.switchable.svelte-d4kmoo>div.svelte-d4kmoo{transition:opacity 500ms ease-in-out, transform 500ms ease-in-out;opacity:1;will-change:transform, opacity}.beat-savior.switchable.svelte-d4kmoo>div.not-visible.svelte-d4kmoo{opacity:0;transform:translate(-100%, 0);max-height:4.5em}.beat-savior.switchable.svelte-d4kmoo>div.acc.svelte-d4kmoo{margin-top:calc(2.0em + .38px)}.beat-savior.switchable.svelte-d4kmoo>div.acc.svelte-d4kmoo .acc{margin-bottom:1em}.beat-savior.switchable.svelte-d4kmoo>div.chart.svelte-d4kmoo{margin-top:1em}",Object(r.append)(document.head,t)),Object(r.init)(this,e,m,j,r.safe_not_equal,{data:0,showAcc:1,showStats:2,showGrid:3,showChart:4,switchable:5,dataIsAvg:6})}}t.default=g},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(126);function o(e){let t,n,o,c,i;return n=new a.default({props:{value:e[0].accLeft,cut:e[0].leftAverageCut,color:e[0].saberAColor,hand:"left"}}),c=new a.default({props:{value:e[0].accRight,cut:e[0].rightAverageCut,color:e[0].saberBColor,hand:"right"}}),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),o=Object(r.space)(),Object(r.create_component)(c.$$.fragment),Object(r.attr)(t,"class","acc svelte-6k4kuk")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),Object(r.append)(t,o),Object(r.mount_component)(c,t,null),i=!0},p(e,t){const r={};1&t&&(r.value=e[0].accLeft),1&t&&(r.cut=e[0].leftAverageCut),1&t&&(r.color=e[0].saberAColor),n.$set(r);const a={};1&t&&(a.value=e[0].accRight),1&t&&(a.cut=e[0].rightAverageCut),1&t&&(a.color=e[0].saberBColor),c.$set(a)},i(e){i||(Object(r.transition_in)(n.$$.fragment,e),Object(r.transition_in)(c.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),Object(r.transition_out)(c.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),Object(r.destroy_component)(c)}}}function c(e){let t,n,a=e[0]&&o(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=o(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function i(e,t,n){let{data:r=null}=t;return e.$$set=e=>{"data"in e&&n(0,r=e.data)},[r]}class s extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-6k4kuk-style")||((t=Object(r.element)("style")).id="svelte-6k4kuk-style",t.textContent=".acc.svelte-6k4kuk{display:inline-flex;justify-content:space-between;align-items:center}",Object(r.append)(document.head,t)),Object(r.init)(this,e,i,c,r.safe_not_equal,{data:0})}}t.default=s},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(127),o=n(9),c=n(8);function i(e,t,n){const r=e.slice();return r[10]=t[n],r[12]=n,r}function s(e,t,n){const r=e.slice();return r[10]=t[n],r[12]=n,r}function l(e){let t,n=e[4],a=[];for(let t=0;t<n.length;t+=1)a[t]=d(s(e,n,t));return{c(){t=Object(r.element)("div");for(let e=0;e<a.length;e+=1)a[e].c();Object(r.attr)(t,"class","cuts svelte-nuchlq")},m(e,n){Object(r.insert)(e,t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null)},p(e,r){if(48&r){let o;for(n=e[4],o=0;o<n.length;o+=1){const c=s(e,n,o);a[o]?a[o].p(c,r):(a[o]=d(c),a[o].c(),a[o].m(t,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=n.length}},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(a,e)}}}function d(e){let t,n,a,o=e[10]+"";return{c(){t=Object(r.element)("span"),n=Object(r.text)(o),Object(r.attr)(t,"title",a=0===e[12]?e[5].beatSavior.beforeCut:1===e[12]?e[5].beatSavior.accuracy:e[5].beatSavior.afterCut)},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,c){16&c&&o!==(o=e[10]+"")&&Object(r.set_data)(n,o),32&c&&a!==(a=0===e[12]?e[5].beatSavior.beforeCut:1===e[12]?e[5].beatSavior.accuracy:e[5].beatSavior.afterCut)&&Object(r.attr)(t,"title",a)},d(e){e&&Object(r.detach)(t)}}}function u(e){let t,n=e[4],a=[];for(let t=0;t<n.length;t+=1)a[t]=b(i(e,n,t));return{c(){t=Object(r.element)("div");for(let e=0;e<a.length;e+=1)a[e].c();Object(r.attr)(t,"class","cuts svelte-nuchlq")},m(e,n){Object(r.insert)(e,t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null)},p(e,r){if(48&r){let o;for(n=e[4],o=0;o<n.length;o+=1){const c=i(e,n,o);a[o]?a[o].p(c,r):(a[o]=b(c),a[o].c(),a[o].m(t,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=n.length}},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(a,e)}}}function b(e){let t,n,a,o=e[10]+"";return{c(){t=Object(r.element)("span"),n=Object(r.text)(o),Object(r.attr)(t,"title",a=0===e[12]?e[5].beatSavior.beforeCut:1===e[12]?e[5].beatSavior.accuracy:e[5].beatSavior.afterCut)},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,c){16&c&&o!==(o=e[10]+"")&&Object(r.set_data)(n,o),32&c&&a!==(a=0===e[12]?e[5].beatSavior.beforeCut:1===e[12]?e[5].beatSavior.accuracy:e[5].beatSavior.afterCut)&&Object(r.attr)(t,"title",a)},d(e){e&&Object(r.detach)(t)}}}function p(e){let t,n,o,c,i,s,d,b=e[4]&&"left"===e[1]&&l(e);c=new a.default({props:{value:e[0],percentage:e[2],color:e[3]}});let p=e[4]&&"right"===e[1]&&u(e);return{c(){t=Object(r.element)("section"),b&&b.c(),n=Object(r.space)(),o=Object(r.element)("div"),Object(r.create_component)(c.$$.fragment),i=Object(r.space)(),p&&p.c(),Object(r.attr)(o,"class","donut svelte-nuchlq"),Object(r.attr)(t,"class",s=Object(r.null_to_empty)(e[1])+" svelte-nuchlq")},m(e,a){Object(r.insert)(e,t,a),b&&b.m(t,null),Object(r.append)(t,n),Object(r.append)(t,o),Object(r.mount_component)(c,o,null),Object(r.append)(t,i),p&&p.m(t,null),d=!0},p(e,[a]){e[4]&&"left"===e[1]?b?b.p(e,a):(b=l(e),b.c(),b.m(t,n)):b&&(b.d(1),b=null);const o={};1&a&&(o.value=e[0]),4&a&&(o.percentage=e[2]),8&a&&(o.color=e[3]),c.$set(o),e[4]&&"right"===e[1]?p?p.p(e,a):(p=u(e),p.c(),p.m(t,null)):p&&(p.d(1),p=null),(!d||2&a&&s!==(s=Object(r.null_to_empty)(e[1])+" svelte-nuchlq"))&&Object(r.attr)(t,"class",s)},i(e){d||(Object(r.transition_in)(c.$$.fragment,e),d=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),d=!1},d(e){e&&Object(r.detach)(t),b&&b.d(),Object(r.destroy_component)(c),p&&p.d()}}}function f(e,t,n){let a;Object(r.component_subscribe)(e,o._,e=>n(5,a=e));let i,s,l,d,{value:u}=t,{cut:b}=t,{color:p}=t,{hand:f="left"}=t;return e.$$set=e=>{"value"in e&&n(0,u=e.value),"cut"in e&&n(6,b=e.cut),"color"in e&&n(7,p=e.color),"hand"in e&&n(1,f=e.hand)},e.$$.update=()=>{1&e.$$.dirty&&n(8,i=Number.isFinite(u)&&u>=0&&u<=115?u:0),256&e.$$.dirty&&n(2,s=i/115),128&e.$$.dirty&&n(3,l=function(e){const t=["r","g","b","a"];return e&&t.reduce((t,n)=>t&&Number.isFinite(e[n])&&e[n]>=0&&e[n]<=1,!0)?"rgba("+t.reduce((t,n)=>t.concat("a"!==n?Math.round(255*e[n]):e[n]),[])+")":"left"===f?"rgba(168,32,32,1)":"rgba(32,100,168,1)"}(p)),64&e.$$.dirty&&n(4,d=b&&Array.isArray(b)?b.map(e=>Number.isFinite(e)?Object(c.formatNumber)(e):0):null)},[u,f,s,l,d,a,b,p]}class O extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-nuchlq-style")||((t=Object(r.element)("style")).id="svelte-nuchlq-style",t.textContent="section.svelte-nuchlq{display:inline-flex}.cuts.svelte-nuchlq{display:flex;flex-direction:column;justify-content:space-between;font-size:.875em;text-align:center}.donut.svelte-nuchlq{width:4.5em;margin:0 .5em}",Object(r.append)(document.head,t)),Object(r.init)(this,e,f,p,r.safe_not_equal,{value:0,cut:6,color:7,hand:1})}}t.default=O},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(64),o=n(8);function c(e){let t,n,o,c,i,s,l,d,u;return o=new a.default({props:{value:e[0]}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("span"),Object(r.create_component)(o.$$.fragment),c=Object(r.space)(),i=Object(r.svg_element)("svg"),s=Object(r.svg_element)("g"),l=Object(r.svg_element)("circle"),Object(r.attr)(l,"id","circle"),Object(r.attr)(l,"class","circle_animation svelte-1l781if"),Object(r.attr)(l,"r","69.85699"),Object(r.attr)(l,"cy","81"),Object(r.attr)(l,"cx","81"),Object(r.attr)(l,"stroke-width","12"),Object(r.attr)(l,"stroke",e[1]),Object(r.attr)(l,"fill","none"),Object(r.attr)(i,"width","100%"),Object(r.attr)(i,"height","100%"),Object(r.attr)(i,"viewBox","0 0 160 160"),Object(r.attr)(i,"xmlns","http://www.w3.org/2000/svg"),Object(r.attr)(i,"class","svelte-1l781if"),Object(r.attr)(t,"class","donut svelte-1l781if"),Object(r.set_style)(t,"--percentage",e[2]?e[2]:0),Object(r.attr)(t,"title",d=e[3]+"%")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.mount_component)(o,n,null),Object(r.append)(t,c),Object(r.append)(t,i),Object(r.append)(i,s),Object(r.append)(s,l),u=!0},p(e,[n]){const a={};1&n&&(a.value=e[0]),o.$set(a),(!u||2&n)&&Object(r.attr)(l,"stroke",e[1]),(!u||4&n)&&Object(r.set_style)(t,"--percentage",e[2]?e[2]:0),(!u||8&n&&d!==(d=e[3]+"%"))&&Object(r.attr)(t,"title",d)},i(e){u||(Object(r.transition_in)(o.$$.fragment,e),u=!0)},o(e){Object(r.transition_out)(o.$$.fragment,e),u=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(o)}}}function i(e,t,n){let r,a,{value:c=0}=t,{percentage:i=0}=t,{color:s="#6fdb6f"}=t,{digits:l=2}=t;return e.$$set=e=>{"value"in e&&n(0,c=e.value),"percentage"in e&&n(4,i=e.percentage),"color"in e&&n(1,s=e.color),"digits"in e&&n(5,l=e.digits)},e.$$.update=()=>{16&e.$$.dirty&&n(2,r=440*(1-i)),48&e.$$.dirty&&n(3,a=Object(o.formatNumber)(100*i,l))},[c,s,r,a,i,l]}class s extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1l781if-style")||((t=Object(r.element)("style")).id="svelte-1l781if-style",t.textContent=".donut.svelte-1l781if{position:relative;display:inline-flex;justify-content:center;align-items:center;width:4.5em;height:4.5em;font-size:.875em}svg.svelte-1l781if{position:absolute;top:0;bottom:0;left:0;right:0;transform:rotate(-90deg)}.circle_animation.svelte-1l781if{stroke-dasharray:440;stroke-dashoffset:var(--percentage, 0)!important;-webkit-animation:donut 1s ease-out forwards;animation:donut 1s ease-out forwards}",Object(r.append)(document.head,t)),Object(r.init)(this,e,i,c,r.safe_not_equal,{value:0,percentage:4,color:1,digits:5})}}t.default=s},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(8),o=n(64);function c(e,t,n){const r=e.slice();return r[1]=t[n],r}function i(e){let t,n,a=e[0].gridAcc,o=[];for(let t=0;t<a.length;t+=1)o[t]=s(c(e,a,t));const i=e=>Object(r.transition_out)(o[e],1,1,()=>{o[e]=null});return{c(){t=Object(r.element)("div");for(let e=0;e<o.length;e+=1)o[e].c();Object(r.attr)(t,"class","grid svelte-1v3emnm")},m(e,a){Object(r.insert)(e,t,a);for(let e=0;e<o.length;e+=1)o[e].m(t,null);n=!0},p(e,n){if(1&n){let l;for(a=e[0].gridAcc,l=0;l<a.length;l+=1){const i=c(e,a,l);o[l]?(o[l].p(i,n),Object(r.transition_in)(o[l],1)):(o[l]=s(i),o[l].c(),Object(r.transition_in)(o[l],1),o[l].m(t,null))}for(Object(r.group_outros)(),l=a.length;l<o.length;l+=1)i(l);Object(r.check_outros)()}},i(e){if(!n){for(let e=0;e<a.length;e+=1)Object(r.transition_in)(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)Object(r.transition_out)(o[e]);n=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(o,e)}}}function s(e){let t,n,c;return n=new o.default({props:{value:e[1],digits:2,title:Number.isFinite(e[1])?Object(a.formatNumber)(e[1]/d*100)+"%":""}}),{c(){t=Object(r.element)("span"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","svelte-1v3emnm")},m(e,a){Object(r.insert)(e,t,a),Object(r.mount_component)(n,t,null),c=!0},p(e,t){const r={};1&t&&(r.value=e[1]),1&t&&(r.title=Number.isFinite(e[1])?Object(a.formatNumber)(e[1]/d*100)+"%":""),n.$set(r)},i(e){c||(Object(r.transition_in)(n.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function l(e){let t,n,a=e[0]&&e[0].gridAcc&&Array.isArray(e[0].gridAcc)&&12===e[0].gridAcc.length,o=a&&i(e);return{c(){o&&o.c(),t=Object(r.empty)()},m(e,a){o&&o.m(e,a),Object(r.insert)(e,t,a),n=!0},p(e,[n]){1&n&&(a=e[0]&&e[0].gridAcc&&Array.isArray(e[0].gridAcc)&&12===e[0].gridAcc.length),a?o?(o.p(e,n),1&n&&Object(r.transition_in)(o,1)):(o=i(e),o.c(),Object(r.transition_in)(o,1),o.m(t.parentNode,t)):o&&(Object(r.group_outros)(),Object(r.transition_out)(o,1,1,()=>{o=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(o),n=!0)},o(e){Object(r.transition_out)(o),n=!1},d(e){o&&o.d(e),e&&Object(r.detach)(t)}}}const d=115;function u(e,t,n){let{data:r=null}=t;return e.$$set=e=>{"data"in e&&n(0,r=e.data)},[r]}class b extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1v3emnm-style")||((t=Object(r.element)("style")).id="svelte-1v3emnm-style",t.textContent=".grid.svelte-1v3emnm.svelte-1v3emnm{display:inline-grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-column-gap:.5em;grid-row-gap:.5em;font-size:.75em}.grid.svelte-1v3emnm>span.svelte-1v3emnm{display:flex;align-items:center;justify-content:center;background-color:var(--dimmed);width:3.5em;height:3.5em}",Object(r.append)(document.head,t)),Object(r.init)(this,e,u,l,r.safe_not_equal,{data:0})}}t.default=b},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(9),o=n(64);function c(e){let t,n,a,c,l,d,u,p,f,O,j,m,g,h,y,v,_,w,k,$,x,S,P,I,C,T,A;const q=[s,i],R=[];function z(e,t){return e[1]?(1&t&&(n=!!Number.isFinite(e[0].fc)),n?1:-1):0}~(a=z(e,-1))&&(c=R[a]=q[a](e));let E=(!e[0].fc||e[1])&&b(e);return j=new o.default({props:{value:e[0].nbOfPause,digits:e[1]?2:0,title:e[2].beatSavior.pauses}}),w=new o.default({props:{value:e[0].bombHit,digits:e[1]?2:0,title:e[2].beatSavior.bombHit}}),C=new o.default({props:{value:e[0].nbOfWallHit,digits:e[1]?2:0,title:e[2].beatSavior.wallHit}}),{c(){t=Object(r.element)("div"),c&&c.c(),l=Object(r.space)(),E&&E.c(),d=Object(r.space)(),u=Object(r.element)("span"),p=Object(r.element)("i"),f=Object(r.space)(),O=Object(r.element)("strong"),Object(r.create_component)(j.$$.fragment),g=Object(r.space)(),h=Object(r.element)("span"),y=Object(r.element)("i"),v=Object(r.space)(),_=Object(r.element)("strong"),Object(r.create_component)(w.$$.fragment),$=Object(r.space)(),x=Object(r.element)("span"),S=Object(r.element)("i"),P=Object(r.space)(),I=Object(r.element)("strong"),Object(r.create_component)(C.$$.fragment),Object(r.attr)(p,"class","fas fa-pause-circle"),Object(r.attr)(u,"title",m=e[2].beatSavior.pauses),Object(r.attr)(u,"class","block svelte-tvpko8"),Object(r.attr)(y,"class","fas fa-bomb"),Object(r.attr)(h,"title",k=e[2].beatSavior.bombHit),Object(r.attr)(h,"class","block svelte-tvpko8"),Object(r.attr)(S,"class","fas fa-gopuram"),Object(r.attr)(x,"title",T=e[2].beatSavior.wallHit),Object(r.attr)(x,"class","block svelte-tvpko8"),Object(r.attr)(t,"class","stats svelte-tvpko8"),Object(r.toggle_class)(t,"avg",e[1])},m(e,n){Object(r.insert)(e,t,n),~a&&R[a].m(t,null),Object(r.append)(t,l),E&&E.m(t,null),Object(r.append)(t,d),Object(r.append)(t,u),Object(r.append)(u,p),Object(r.append)(u,f),Object(r.append)(u,O),Object(r.mount_component)(j,O,null),Object(r.append)(t,g),Object(r.append)(t,h),Object(r.append)(h,y),Object(r.append)(h,v),Object(r.append)(h,_),Object(r.mount_component)(w,_,null),Object(r.append)(t,$),Object(r.append)(t,x),Object(r.append)(x,S),Object(r.append)(x,P),Object(r.append)(x,I),Object(r.mount_component)(C,I,null),A=!0},p(e,n){let o=a;a=z(e,n),a===o?~a&&R[a].p(e,n):(c&&(Object(r.group_outros)(),Object(r.transition_out)(R[o],1,1,()=>{R[o]=null}),Object(r.check_outros)()),~a?(c=R[a],c||(c=R[a]=q[a](e),c.c()),Object(r.transition_in)(c,1),c.m(t,l)):c=null),!e[0].fc||e[1]?E?(E.p(e,n),3&n&&Object(r.transition_in)(E,1)):(E=b(e),E.c(),Object(r.transition_in)(E,1),E.m(t,d)):E&&(Object(r.group_outros)(),Object(r.transition_out)(E,1,1,()=>{E=null}),Object(r.check_outros)());const i={};1&n&&(i.value=e[0].nbOfPause),2&n&&(i.digits=e[1]?2:0),4&n&&(i.title=e[2].beatSavior.pauses),j.$set(i),(!A||4&n&&m!==(m=e[2].beatSavior.pauses))&&Object(r.attr)(u,"title",m);const s={};1&n&&(s.value=e[0].bombHit),2&n&&(s.digits=e[1]?2:0),4&n&&(s.title=e[2].beatSavior.bombHit),w.$set(s),(!A||4&n&&k!==(k=e[2].beatSavior.bombHit))&&Object(r.attr)(h,"title",k);const p={};1&n&&(p.value=e[0].nbOfWallHit),2&n&&(p.digits=e[1]?2:0),4&n&&(p.title=e[2].beatSavior.wallHit),C.$set(p),(!A||4&n&&T!==(T=e[2].beatSavior.wallHit))&&Object(r.attr)(x,"title",T),2&n&&Object(r.toggle_class)(t,"avg",e[1])},i(e){A||(Object(r.transition_in)(c),Object(r.transition_in)(E),Object(r.transition_in)(j.$$.fragment,e),Object(r.transition_in)(w.$$.fragment,e),Object(r.transition_in)(C.$$.fragment,e),A=!0)},o(e){Object(r.transition_out)(c),Object(r.transition_out)(E),Object(r.transition_out)(j.$$.fragment,e),Object(r.transition_out)(w.$$.fragment,e),Object(r.transition_out)(C.$$.fragment,e),A=!1},d(e){e&&Object(r.detach)(t),~a&&R[a].d(),E&&E.d(),Object(r.destroy_component)(j),Object(r.destroy_component)(w),Object(r.destroy_component)(C)}}}function i(e){let t,n,a,c,i;return c=new o.default({props:{value:100*e[0].fc,digits:2,suffix:"%"}}),{c(){t=Object(r.element)("span"),n=Object(r.element)("strong"),n.textContent="FC",a=Object(r.space)(),Object(r.create_component)(c.$$.fragment),Object(r.attr)(n,"class","full-combo svelte-tvpko8"),Object(r.attr)(t,"class","block svelte-tvpko8")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.mount_component)(c,t,null),i=!0},p(e,t){const n={};1&t&&(n.value=100*e[0].fc),c.$set(n)},i(e){i||(Object(r.transition_in)(c.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c)}}}function s(e){let t,n,a,o,c,i,s=!e[0].fc&&l(e);const b=[u,d],p=[];function f(e,t){return e[0].fc?0:1}return a=f(e),o=p[a]=b[a](e),{c(){t=Object(r.element)("span"),s&&s.c(),n=Object(r.element)("strong"),o.c(),Object(r.attr)(n,"class","svelte-tvpko8"),Object(r.toggle_class)(n,"full-combo",e[0].fc),Object(r.attr)(t,"title",c=e[2].beatSavior.maxCombo),Object(r.attr)(t,"class","block svelte-tvpko8")},m(e,o){Object(r.insert)(e,t,o),s&&s.m(t,null),Object(r.append)(t,n),p[a].m(n,null),i=!0},p(e,d){e[0].fc?s&&(s.d(1),s=null):s||(s=l(e),s.c(),s.m(t,n));let u=a;a=f(e),a===u?p[a].p(e,d):(Object(r.group_outros)(),Object(r.transition_out)(p[u],1,1,()=>{p[u]=null}),Object(r.check_outros)(),o=p[a],o||(o=p[a]=b[a](e),o.c()),Object(r.transition_in)(o,1),o.m(n,null)),1&d&&Object(r.toggle_class)(n,"full-combo",e[0].fc),(!i||4&d&&c!==(c=e[2].beatSavior.maxCombo))&&Object(r.attr)(t,"title",c)},i(e){i||(Object(r.transition_in)(o),i=!0)},o(e){Object(r.transition_out)(o),i=!1},d(e){e&&Object(r.detach)(t),s&&s.d(),p[a].d()}}}function l(e){let t,n;return{c(){t=Object(r.element)("i"),n=Object(r.space)(),Object(r.attr)(t,"class","fas fa-cube")},m(e,a){Object(r.insert)(e,t,a),Object(r.insert)(e,n,a)},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n)}}}function d(e){let t,n;return t=new o.default({props:{value:e[0].maxCombo,digits:0,title:e[2].beatSavior.maxCombo}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};1&n&&(r.value=e[0].maxCombo),4&n&&(r.title=e[2].beatSavior.maxCombo),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function u(e){let t;return{c(){t=Object(r.text)("FC")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function b(e){let t,n,a,c,i,s,l;return i=new o.default({props:{value:e[0].miss,digits:e[1]?2:0,title:e[2].beatSavior.misses}}),{c(){t=Object(r.element)("span"),n=Object(r.element)("i"),a=Object(r.space)(),c=Object(r.element)("strong"),Object(r.create_component)(i.$$.fragment),Object(r.attr)(n,"class","fas fa-times"),Object(r.attr)(t,"title",s=e[2].beatSavior.misses),Object(r.attr)(t,"class","block svelte-tvpko8")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,c),Object(r.mount_component)(i,c,null),l=!0},p(e,n){const a={};1&n&&(a.value=e[0].miss),2&n&&(a.digits=e[1]?2:0),4&n&&(a.title=e[2].beatSavior.misses),i.$set(a),(!l||4&n&&s!==(s=e[2].beatSavior.misses))&&Object(r.attr)(t,"title",s)},i(e){l||(Object(r.transition_in)(i.$$.fragment,e),l=!0)},o(e){Object(r.transition_out)(i.$$.fragment,e),l=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(i)}}}function p(e){let t,n,a=e[0]&&c(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=c(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function f(e,t,n){let o;Object(r.component_subscribe)(e,a._,e=>n(2,o=e));let{data:c=null}=t,{dataIsAvg:i=!1}=t;return e.$$set=e=>{"data"in e&&n(0,c=e.data),"dataIsAvg"in e&&n(1,i=e.dataIsAvg)},[c,i,o]}class O extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-tvpko8-style")||((t=Object(r.element)("style")).id="svelte-tvpko8-style",t.textContent=".stats.svelte-tvpko8.svelte-tvpko8{display:flex;justify-content:space-around}.stats.avg.svelte-tvpko8.svelte-tvpko8{font-size:0.75em}.stats.svelte-tvpko8 .block.svelte-tvpko8{margin-bottom:0}.full-combo.svelte-tvpko8.svelte-tvpko8{color:darkorange !important}",Object(r.append)(document.head,t)),Object(r.init)(this,e,f,p,r.safe_not_equal,{data:0,dataIsAvg:1})}}t.default=O},function(e,t,n){"use strict";n.r(t);var r=n(55),a=(n(9),n(36)),o=n(88),c=n(58),i=n(13),s=n(8);function l(e){let t,n,a;return{c(){t=Object(r.element)("section"),n=Object(r.element)("main"),a=Object(r.element)("canvas"),Object(r.attr)(a,"class","chartjs-render-monitor"),Object(r.attr)(n,"id","chart-section"),Object(r.set_style)(t,"--height",e[0]),Object(r.attr)(t,"class","svelte-d4okf3")},m(o,c){Object(r.insert)(o,t,c),Object(r.append)(t,n),Object(r.append)(n,a),e[3](a)},p(e,[n]){1&n&&Object(r.set_style)(t,"--height",e[0])},i:r.noop,o:r.noop,d(n){n&&Object(r.detach)(t),e[3](null)}}}function d(e,t,n){let{data:l=null}=t,{height:d="120px"}=t,u=null,b=null,p="darkss",f=null;async function O(){const e=await Object(a.getConfig)("others");p=e&&e.theme?e.theme:"darkss",f=Object(o.getTheme)(p).reduce((e,t)=>(e[t[0]]=t[1],e),{})}return Object(c.onMount)(async()=>{await O();const e=i.default.on("config-changed",async()=>await O());return()=>{e()}}),e.$$set=e=>{"data"in e&&n(2,l=e.data),"height"in e&&n(0,d=e.height)},e.$$.update=()=>{6&e.$$.dirty&&async function(e,t){if(!e||!t||!Object.keys(t).length)return;b&&b.destroy();const n=f&&f.alternate?f.alternate:"#3e95cd",r=[{yAxisID:"acc-axis",data:["acc"].concat(Object.values(t).map(e=>100*e)),borderColor:n,borderWidth:2,fill:!1,pointRadius:0,round:2,type:"line"}];b=new Chart(e,{responsive:!0,onResize(e,t){e.resize(),e.render(!0)},type:"bar",data:{labels:Object.keys(t).map(e=>Math.floor(e/60)+":"+(e%60).toString().padStart(2,"0")),datasets:r},options:{legend:{display:!1},maintainAspectRatio:!1,title:{display:!1},tooltips:{mode:"index",intersect:!1,displayColors:!1,callbacks:{title:(e,t)=>{if(!e.length)return"";const n=[e[0].xLabel?e[0].xLabel:""];return e.forEach(e=>e.yLabel?n.push(Object(s.formatNumber)(e.yLabel,2)+"%"):""),n},label:()=>""}},hover:{mode:"nearest",intersect:!0},scales:{xAxes:[{scaleLabel:{display:!1},ticks:{autoSkip:!0,autoSkipPadding:4}}],yAxes:[{id:"acc-axis",position:"left",scaleLabel:{display:!1}}]}}})}(u,l&&l.graph?l.graph:null)},[d,u,l,function(e){r.binding_callbacks[e?"unshift":"push"](()=>{u=e,n(1,u)})}]}class u extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-d4okf3-style")||((t=Object(r.element)("style")).id="svelte-d4okf3-style",t.textContent="section.svelte-d4okf3{margin:0 auto !important;height:var(--height) !important}",Object(r.append)(document.head,t)),Object(r.init)(this,e,d,l,r.safe_not_equal,{data:2,height:0})}}t.default=u},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(13),c=n(1),i=n(40),s=n(39),l=n(9),d=n(7),u=n(15),b=n(6),p=n(106),f=n(38),O=n(50),j=n(35),m=n(22);const g=e=>({songs:4&e,series:8&e,totalItems:1&e,error:16&e,isPaused:2&e}),h=e=>({songs:e[2],series:e[3],totalItems:e[0],error:e[4],isPaused:e[1],beforePageChanged:e[5]});function y(e){let t;const n=e[14].default,a=Object(r.create_slot)(n,e,e[13],h);return{c(){a&&a.c()},m(e,n){a&&a.m(e,n),t=!0},p(e,[t]){a&&a.p&&8223&t&&Object(r.update_slot)(a,n,e,e[13],t,g,h)},i(e){t||(Object(r.transition_in)(a,e),t=!0)},o(e){Object(r.transition_out)(a,e),t=!1},d(e){a&&a.d(e)}}}function v(e,t,n){let g;Object(r.component_subscribe)(e,l._,e=>n(21,g=e));let{$$slots:h={},$$scope:y}=t;const v=Object(a.createEventDispatcher)();let{playerId:_=null}=t,{players:w=[]}=t,{scores:k=[]}=t,{pageNum:$=1}=t,{totalItems:x=0}=t,{type:S="recent"}=t,{playerTwitchProfile:P=null}=t,{pauseLoading:I=!1}=t,{recentPlay:C=null}=t,T=k&&k.length?{scores:k,pageNum:$,totalItems:x,pageQty:Math.ceil(x/s.PLAYS_PER_PAGE),type:S,playerId:_,recentPlay:C}:null,A=[],q=[],R={},z=null,E=null,B=!1,D={};const L=async e=>{if(!(A&&q&&A.length&&q.length&&R))return;const t=e=>e&&e.pageNum&&e.type&&e.playerId?e.playerId+"-"+e.type+"-"+e.pageNum:null,r=t(e),a=[];if(n(3,q=await Promise.all(q.map(async(e,t)=>await Promise.all(e.map(async(e,n)=>{if(!e)return e;const r=w[n],o=R[n]&&R[n][e.leaderboardId],c=A[t];if(P&&c&&c.diffInfo&&c.hash&&e.timeset&&0===n){const t=await Object(m.getSongDiffInfo)(c.hash,c.diffInfo,!0);if(t&&t.length){const n=await Object(p.findTwitchVideo)(P,Object(d.dateFromString)(e.timeset),t.seconds);n&&(c.video=n)}}if(z&&r&&0===n){const t=await Object(O.getSsplCountryRanks)();t&&t[e.leaderboardId]&&t[e.leaderboardId][r.playerId]&&(e.ssplCountryRank=t[e.leaderboardId][r.playerId],e.country=z)}const i=!!(e.leaderboardId&&e.hash&&e.diffInfo);let s=i?await Object(m.getLeaderboardMaxScore)(e.leaderboardId,e.hash,e.diffInfo.diff,[],!0):null;return i&&!s&&(D.hasOwnProperty(e.leaderboardId)?s=D[e.leaderboardId]:a.push(async()=>D[e.leaderboardId]=await Object(m.getLeaderboardMaxScore)(e.leaderboardId,e.hash,e.diffInfo.diff))),await Object(p.enhanceScore)(e,o,s,!0)}))))),a&&a.length&&Promise.all(a.map(e=>e())).then(e=>{r===t(T)&&L(T)}),q&&q.length&&w&&w.length){const e=q.map(e=>e&&e[0]&&e[0].rank?{leaderboardId:e[0].leaderboardId,rank:e[0].rank}:null).filter(e=>e);Object(f.setRefreshedPlayerScores)(w[0].playerId,e,!0,!1)}n(2,A)},N=async e=>{e&&e.length&&(R=(await Promise.all(e.map(async e=>Object(u.getScoresByPlayerId)(e.playerId)))).map(e=>Object(b.convertArrayToObjectByKey)(e,"leaderboardId")))};function F(e){if(!e||!w||!w.length)return n(2,A=[]),void n(3,q=[]);n(0,x=e.totalItems&&!isNaN(e.totalItems)?e.totalItems:x);const t=e.scores.map(e=>{const{diffInfo:t,hash:n,leaderboardId:r,levelAuthorName:a,songDiff:o,songImg:c,songName:i,songAuthorName:s}=e;return{diffInfo:t,diff:o,hash:n,leaderboardId:r,levelAuthor:a,name:i,songAuthor:s,img:c}}),r=e.scores.map(t=>{const{lastUpdated:n,leaderboardId:r,mods:a,acc:o,pp:c,ppWeighted:i,rank:s,score:l,timeset:u,hash:b,diffInfo:p}=t,f=[{leaderboardId:r,lastUpdated:n,mods:a,acc:o,pp:c,ppWeighted:i,rank:s,score:l,hash:b,diffInfo:p,playerId:e.playerId,timeset:Object(d.dateFromString)(u)}];return w&&w.length>1&&w.slice(1).map((e,t)=>{f.push(R[t+1]&&R[t+1][r]?R[t+1][r]:null)}),f});n(2,A=t),n(3,q=r),L(e)}async function M(e,t,r){if(e&&B&&!I&&(r||(r=$),!T||T.pageNum!==r||T.type!==t||T.playerId!==e||!(T.recentPlay===C||T.recentPlay&&C&&T.recentPlay>=C))){n(4,E=null);try{const a=await Object(i.fetchSsProfilePage)(e,r,t);if(!a||!a.scores||isNaN(a.totalItems))throw"Download error";let s=null;a&&"recent"===a.type&&1===a.pageNum&&a.scores&&a.scores.length&&a.scores[0].timeset&&Object(b.isDateObject)(a.scores[0].timeset)&&(s=a.scores[0].timeset,o.default.publish("recent-play-updated",{nodeId:Object(c.default)().getId(),playerId:e,recentPlay:s})),a&&o.default.publish("player-profile-page-parsed",{nodeId:Object(c.default)().getId(),playerId:e,profilePage:a}),s=s||C,n(15,T={...a,recentPlay:s}),n(9,C=s),n(7,$=r),n(8,S=t),v("scores-page-loaded",T)}catch(e){return n(4,E=g.common.downloadError),!1}return!0}}let U=null;return Object(a.onMount)(async()=>{z=await Object(j.getActiveCountry)(),await N(w),await Object(O.getSsplCountryRanks)();const e=async()=>{await N(w),F(T)},t=e=>(w||[]).map(e=>e.playerId).includes(e),r=o.default.on("data-refreshed",async()=>{await e()}),a=o.default.on("player-scores-updated",async({playerId:n})=>{t(n)&&await e()}),c=o.default.on("player-beat-savior-updated",async({playerId:n})=>{t(n)&&await e()});return n(18,B=!0),()=>{a(),r(),c()}}),e.$$set=e=>{"playerId"in e&&n(6,_=e.playerId),"players"in e&&n(10,w=e.players),"scores"in e&&n(11,k=e.scores),"pageNum"in e&&n(7,$=e.pageNum),"totalItems"in e&&n(0,x=e.totalItems),"type"in e&&n(8,S=e.type),"playerTwitchProfile"in e&&n(12,P=e.playerTwitchProfile),"pauseLoading"in e&&n(1,I=e.pauseLoading),"recentPlay"in e&&n(9,C=e.recentPlay),"$$scope"in e&&n(13,y=e.$$scope)},e.$$.update=()=>{36864&e.$$.dirty&&T&&F(T),1024&e.$$.dirty&&async function(e){if(!(e&&e.length||_))return;const t=e.map(e=>e.playerId).join(":");t!==U&&(U=t,n(6,_=e&&e.length?e[0].playerId:_),await N(e),F(T),e&&e.length&&e[0].playerId!==_&&n(6,_=e[0].playerId))}(w),262978&e.$$.dirty&&M(_,S,void 0)},[x,I,A,q,E,async function(e){return await M(_,S,e+1)},_,$,S,C,w,k,P,y,h]}class _ extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,v,y,r.safe_not_equal,{playerId:6,players:10,scores:11,pageNum:7,totalItems:0,type:8,playerTwitchProfile:12,pauseLoading:1,recentPlay:9})}}t.default=_},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9),c=n(39),i=n(98),s=n(73),l=n(67),d=n(133),u=n(15),b=n(36);const p=e=>({song:8&e[0],series:16&e[0]}),f=e=>({song:e[34],series:e[4]});function O(e,t,n){const r=e.slice();return r[34]=t[n],r[36]=n,r}function j(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function m(e){let t,n;return t=new s.default({props:{iconFa:"fas fa-database",type:"danger",label:e[15].plugin.cachedButton,notSelected:!0}}),t.$on("click",e[17]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};32768&n[0]&&(r.label=e[15].plugin.cachedButton),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function g(e){let t,n,a,o=e[0]&&e[0].length<e[11]&&h(e),c=e[14]&&e[7]&&y(e);return{c(){o&&o.c(),t=Object(r.space)(),c&&c.c(),n=Object(r.empty)()},m(e,i){o&&o.m(e,i),Object(r.insert)(e,t,i),c&&c.m(e,i),Object(r.insert)(e,n,i),a=!0},p(e,a){e[0]&&e[0].length<e[11]?o?(o.p(e,a),2049&a[0]&&Object(r.transition_in)(o,1)):(o=h(e),o.c(),Object(r.transition_in)(o,1),o.m(t.parentNode,t)):o&&(Object(r.group_outros)(),Object(r.transition_out)(o,1,1,()=>{o=null}),Object(r.check_outros)()),e[14]&&e[7]?c?(c.p(e,a),16512&a[0]&&Object(r.transition_in)(c,1)):(c=y(e),c.c(),Object(r.transition_in)(c,1),c.m(n.parentNode,n)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)())},i(e){a||(Object(r.transition_in)(o),Object(r.transition_in)(c),a=!0)},o(e){Object(r.transition_out)(o),Object(r.transition_out)(c),a=!1},d(e){o&&o.d(e),e&&Object(r.detach)(t),c&&c.d(e),e&&Object(r.detach)(n)}}}function h(e){let t,n;return t=new s.default({props:{iconFa:"fas fa-balance-scale",title:e[15].songBrowser.compare.add}}),t.$on("click",e[18]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};32768&n[0]&&(r.title=e[15].songBrowser.compare.add),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function y(e){let t,n;return t=new s.default({props:{iconFa:"fas fa-save",type:"primary",title:e[15].songBrowser.compare.saveAsDefault}}),t.$on("click",e[21]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};32768&n[0]&&(r.title=e[15].songBrowser.compare.saveAsDefault),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function v(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O,m=e[15].songBrowser.fields.rank+"",g=e[15].songBrowser.songHeader+"",h=e[15].songBrowser.fields.timesetShort+"",y=e[0],v=[];for(let t=0;t<y.length;t+=1)v[t]=k(j(e,y,t));const _=e=>Object(r.transition_out)(v[e],1,1,()=>{v[e]=null});return{c(){t=Object(r.element)("thead"),n=Object(r.element)("tr"),a=Object(r.element)("th"),o=Object(r.text)(m),c=Object(r.space)(),i=Object(r.element)("th"),s=Object(r.text)(g),l=Object(r.space)(),d=Object(r.element)("th"),u=Object(r.text)(h),b=Object(r.space)();for(let e=0;e<v.length;e+=1)v[e].c();p=Object(r.space)(),f=Object(r.element)("th"),Object(r.attr)(a,"class","rank svelte-w1pss8"),Object(r.attr)(i,"class","song svelte-w1pss8"),Object(r.attr)(i,"colspan","2"),Object(r.attr)(d,"class","timeset svelte-w1pss8"),Object(r.attr)(f,"class","icons svelte-w1pss8")},m(e,j){Object(r.insert)(e,t,j),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(a,o),Object(r.append)(n,c),Object(r.append)(n,i),Object(r.append)(i,s),Object(r.append)(n,l),Object(r.append)(n,d),Object(r.append)(d,u),Object(r.append)(n,b);for(let e=0;e<v.length;e+=1)v[e].m(n,null);Object(r.append)(n,p),Object(r.append)(n,f),O=!0},p(e,t){if((!O||32768&t[0])&&m!==(m=e[15].songBrowser.fields.rank+"")&&Object(r.set_data)(o,m),(!O||32768&t[0])&&g!==(g=e[15].songBrowser.songHeader+"")&&Object(r.set_data)(s,g),(!O||32768&t[0])&&h!==(h=e[15].songBrowser.fields.timesetShort+"")&&Object(r.set_data)(u,h),1613825&t[0]){let a;for(y=e[0],a=0;a<y.length;a+=1){const o=j(e,y,a);v[a]?(v[a].p(o,t),Object(r.transition_in)(v[a],1)):(v[a]=k(o),v[a].c(),Object(r.transition_in)(v[a],1),v[a].m(n,p))}for(Object(r.group_outros)(),a=y.length;a<v.length;a+=1)_(a);Object(r.check_outros)()}},i(e){if(!O){for(let e=0;e<y.length;e+=1)Object(r.transition_in)(v[e]);O=!0}},o(e){v=v.filter(Boolean);for(let e=0;e<v.length;e+=1)Object(r.transition_out)(v[e]);O=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(v,e)}}}function _(e){let t,n=e[37].name+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){1&a[0]&&n!==(n=e[37].name+"")&&Object(r.set_data)(t,n)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function w(e){let t,n,a,o,c,i,s,d;function u(...t){return e[26](e[37],...t)}function b(...t){return e[28](e[39],...t)}return n=new l.default({props:{items:e[13],value:e[13].find(u),right:!0}}),n.$on("change",(function(...t){return e[27](e[39],...t)})),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),a=Object(r.space)(),o=Object(r.element)("i"),Object(r.attr)(o,"class","fas fa-times player-remove svelte-w1pss8"),Object(r.attr)(o,"title",c=e[15].songBrowser.compare.remove),Object(r.attr)(t,"class","player-header svelte-w1pss8")},m(e,c){Object(r.insert)(e,t,c),Object(r.mount_component)(n,t,null),Object(r.append)(t,a),Object(r.append)(t,o),i=!0,s||(d=Object(r.listen)(o,"click",b),s=!0)},p(t,a){e=t;const s={};8192&a[0]&&(s.items=e[13]),8193&a[0]&&(s.value=e[13].find(u)),n.$set(s),(!i||32768&a[0]&&c!==(c=e[15].songBrowser.compare.remove))&&Object(r.attr)(o,"title",c)},i(e){i||(Object(r.transition_in)(n.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),s=!1,d()}}}function k(e){let t,n,a,o;const c=[w,_],i=[];return n=function(e,t){return e[39]>0?0:1}(e),a=i[n]=c[n](e),{c(){t=Object(r.element)("th"),a.c(),Object(r.attr)(t,"class","score svelte-w1pss8"),Object(r.toggle_class)(t,"main",0===e[39])},m(e,a){Object(r.insert)(e,t,a),i[n].m(t,null),o=!0},p(e,t){a.p(e,t)},i(e){o||(Object(r.transition_in)(a),o=!0)},o(e){Object(r.transition_out)(a),o=!1},d(e){e&&Object(r.detach)(t),i[n].d()}}}function $(e,t){let n,a;const o=t[23].default,c=Object(r.create_slot)(o,t,t[22],f),i=c||function(e){let t,n,a;return t=new d.default({props:{song:e[34],series:e[4][e[36]],cachedRecentPlay:e[9]}}),{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)()},m(e,o){Object(r.mount_component)(t,e,o),Object(r.insert)(e,n,o),a=!0},p(e,n){const r={};8&n[0]&&(r.song=e[34]),24&n[0]&&(r.series=e[4][e[36]]),512&n[0]&&(r.cachedRecentPlay=e[9]),t.$set(r)},i(e){a||(Object(r.transition_in)(t.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),a=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n)}}}(t);return{key:e,first:null,c(){n=Object(r.empty)(),i&&i.c(),this.first=n},m(e,t){Object(r.insert)(e,n,t),i&&i.m(e,t),a=!0},p(e,t){c?c.p&&4194328&t[0]&&Object(r.update_slot)(c,o,e,e[22],t,p,f):i&&i.p&&536&t[0]&&i.p(e,t)},i(e){a||(Object(r.transition_in)(i,e),a=!0)},o(e){Object(r.transition_out)(i,e),a=!1},d(e){e&&Object(r.detach)(n),i&&i.d(e)}}}function x(e){let t,n;return{c(){t=Object(r.element)("div"),n=Object(r.text)(e[6]),Object(r.attr)(t,"class","error has-text-centered")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){64&t[0]&&Object(r.set_data)(n,e[6])},d(e){e&&Object(r.detach)(t)}}}function S(e){let t,n,a,o,l,d,u,b,p,f,j,h,y,_,w,k,S,P,I,C,T=[],A=new Map;l=new s.default({props:{iconFa:"fa fa-clock",type:"recent"===e[2]?"primary":"default",label:e[15].songBrowser.ssScoreType.recent,notSelected:"recent"!==e[2]}}),l.$on("click",e[24]),u=new s.default({props:{iconFa:"fa fa-cubes",type:"top"===e[2]?"primary":"default",label:e[15].songBrowser.ssScoreType.top,notSelected:"top"!==e[2]}}),u.$on("click",e[25]);let q=e[7]&&m(e),R=e[13]&&e[13].length&&g(e),z=e[0]&&e[0].length>1&&e[13]&&e[13].length&&v(e),E=e[3];const B=e=>e[34].leaderboardId;for(let t=0;t<E.length;t+=1){let n=O(e,E,t),r=B(n);A.set(r,T[t]=$(r,n))}function D(t){e[29].call(null,t)}let L={itemsPerPage:c.PLAYS_PER_PAGE,totalItems:e[5],itemsPerPageValues:null,beforePageChanged:e[10],hide:e[8]};void 0!==e[1]&&(L.currentPage=e[1]),k=new i.default({props:L}),r.binding_callbacks.push(()=>Object(r.bind)(k,"currentPage",D)),k.$on("page-changed",e[16]);let N=e[6]&&x(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),a=Object(r.space)(),o=Object(r.element)("div"),Object(r.create_component)(l.$$.fragment),d=Object(r.space)(),Object(r.create_component)(u.$$.fragment),b=Object(r.space)(),q&&q.c(),p=Object(r.space)(),f=Object(r.element)("div"),R&&R.c(),j=Object(r.space)(),h=Object(r.element)("table"),z&&z.c(),y=Object(r.space)(),_=Object(r.element)("tbody");for(let e=0;e<T.length;e+=1)T[e].c();w=Object(r.space)(),Object(r.create_component)(k.$$.fragment),P=Object(r.space)(),N&&N.c(),I=Object(r.empty)(),Object(r.attr)(n,"class","left"),Object(r.attr)(o,"class","switch-types svelte-w1pss8"),Object(r.attr)(f,"class","compare svelte-w1pss8"),Object(r.attr)(t,"class","header svelte-w1pss8"),Object(r.attr)(h,"class","ranking songs sspl")},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o),Object(r.mount_component)(l,o,null),Object(r.append)(o,d),Object(r.mount_component)(u,o,null),Object(r.append)(o,b),q&&q.m(o,null),Object(r.append)(t,p),Object(r.append)(t,f),R&&R.m(f,null),Object(r.insert)(e,j,c),Object(r.insert)(e,h,c),z&&z.m(h,null),Object(r.append)(h,y),Object(r.append)(h,_);for(let e=0;e<T.length;e+=1)T[e].m(_,null);Object(r.insert)(e,w,c),Object(r.mount_component)(k,e,c),Object(r.insert)(e,P,c),N&&N.m(e,c),Object(r.insert)(e,I,c),C=!0},p(e,t){const n={};4&t[0]&&(n.type="recent"===e[2]?"primary":"default"),32768&t[0]&&(n.label=e[15].songBrowser.ssScoreType.recent),4&t[0]&&(n.notSelected="recent"!==e[2]),l.$set(n);const a={};if(4&t[0]&&(a.type="top"===e[2]?"primary":"default"),32768&t[0]&&(a.label=e[15].songBrowser.ssScoreType.top),4&t[0]&&(a.notSelected="top"!==e[2]),u.$set(a),e[7]?q?(q.p(e,t),128&t[0]&&Object(r.transition_in)(q,1)):(q=m(e),q.c(),Object(r.transition_in)(q,1),q.m(o,null)):q&&(Object(r.group_outros)(),Object(r.transition_out)(q,1,1,()=>{q=null}),Object(r.check_outros)()),e[13]&&e[13].length?R?(R.p(e,t),8192&t[0]&&Object(r.transition_in)(R,1)):(R=g(e),R.c(),Object(r.transition_in)(R,1),R.m(f,null)):R&&(Object(r.group_outros)(),Object(r.transition_out)(R,1,1,()=>{R=null}),Object(r.check_outros)()),e[0]&&e[0].length>1&&e[13]&&e[13].length?z?(z.p(e,t),8193&t[0]&&Object(r.transition_in)(z,1)):(z=v(e),z.c(),Object(r.transition_in)(z,1),z.m(h,y)):z&&(Object(r.group_outros)(),Object(r.transition_out)(z,1,1,()=>{z=null}),Object(r.check_outros)()),4194840&t[0]){const n=e[3];Object(r.group_outros)(),T=Object(r.update_keyed_each)(T,t,B,1,e,n,A,_,r.outro_and_destroy_block,$,null,O),Object(r.check_outros)()}const c={};32&t[0]&&(c.totalItems=e[5]),1024&t[0]&&(c.beforePageChanged=e[10]),256&t[0]&&(c.hide=e[8]),!S&&2&t[0]&&(S=!0,c.currentPage=e[1],Object(r.add_flush_callback)(()=>S=!1)),k.$set(c),e[6]?N?N.p(e,t):(N=x(e),N.c(),N.m(I.parentNode,I)):N&&(N.d(1),N=null)},i(e){if(!C){Object(r.transition_in)(l.$$.fragment,e),Object(r.transition_in)(u.$$.fragment,e),Object(r.transition_in)(q),Object(r.transition_in)(R),Object(r.transition_in)(z);for(let e=0;e<E.length;e+=1)Object(r.transition_in)(T[e]);Object(r.transition_in)(k.$$.fragment,e),C=!0}},o(e){Object(r.transition_out)(l.$$.fragment,e),Object(r.transition_out)(u.$$.fragment,e),Object(r.transition_out)(q),Object(r.transition_out)(R),Object(r.transition_out)(z);for(let e=0;e<T.length;e+=1)Object(r.transition_out)(T[e]);Object(r.transition_out)(k.$$.fragment,e),C=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(l),Object(r.destroy_component)(u),q&&q.d(),R&&R.d(),e&&Object(r.detach)(j),e&&Object(r.detach)(h),z&&z.d();for(let e=0;e<T.length;e+=1)T[e].d();e&&Object(r.detach)(w),Object(r.destroy_component)(k,e),e&&Object(r.detach)(P),N&&N.d(e),e&&Object(r.detach)(I)}}}function P(e,t,n){let c;Object(r.component_subscribe)(e,o._,e=>n(15,c=e));let{$$slots:i={},$$scope:s}=t;const l=Object(a.createEventDispatcher)();let{players:d}=t,{songs:p=[]}=t,{series:f=[]}=t,{currentPage:O=0}=t,{totalItems:j=0}=t,{error:m=null}=t,{type:g="recent"}=t,{isCached:h=!1}=t,{isPaused:y=!1}=t,{cachedRecentPlay:v}=t,{beforePageChanged:_}=t,{maxComparePlayers:w=4}=t,k=null,$=null,x=!1;function S(e){n(2,g=e),n(1,O=0),l("browse",{type:g,currentPage:O})}Object(a.onMount)(async()=>{!async function(){n(13,k=(await Object(u.getPlayers)()).map(e=>({label:e.name,playerId:e.id})).sort((e,t)=>e.label.toLowerCase().replace(/[^a-zAZ]/g,"").localeCompare(t.label.toLowerCase().replace(/[^a-zAZ]/g,""))))}(),$=await Object(b.getMainPlayerId)(),x=!0});let P=!1;function I(e){n(0,d=d.filter((t,n)=>n!==e)),n(14,P=!0)}function C(e,t){e&&e.detail&&e.detail.value&&d&&d[t]&&(n(0,d[t]={playerId:e.detail.value.playerId,name:e.detail.value.label},d),n(14,P=!0))}return e.$$set=e=>{"players"in e&&n(0,d=e.players),"songs"in e&&n(3,p=e.songs),"series"in e&&n(4,f=e.series),"currentPage"in e&&n(1,O=e.currentPage),"totalItems"in e&&n(5,j=e.totalItems),"error"in e&&n(6,m=e.error),"type"in e&&n(2,g=e.type),"isCached"in e&&n(7,h=e.isCached),"isPaused"in e&&n(8,y=e.isPaused),"cachedRecentPlay"in e&&n(9,v=e.cachedRecentPlay),"beforePageChanged"in e&&n(10,_=e.beforePageChanged),"maxComparePlayers"in e&&n(11,w=e.maxComparePlayers),"$$scope"in e&&n(22,s=e.$$scope)},[d,O,g,p,f,j,m,h,y,v,_,w,S,k,P,c,function(){l("browse",{type:g,currentPage:O})},function(){l("transform-profile")},function(){k&&k.length&&d&&!(d.length>=w)&&(n(0,d=d.concat([k[0]]).slice(0,w)),n(14,P=!0))},I,C,async function(){if(n(14,P=!1),!d)return;const e=d.map(e=>e.playerId).slice(1).filter(e=>e!==$),t=await Object(b.getConfig)();t&&(t.songBrowser||(t.songBrowser={}),t.songBrowser.compareTo=e,await Object(b.setConfig)(t))},s,i,()=>S("recent"),()=>S("top"),(e,t)=>t.playerId===e.playerId,(e,t)=>C(t,e),e=>I(e),function(e){O=e,n(1,O)}]}class I extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-w1pss8-style")||((t=Object(r.element)("style")).id="svelte-w1pss8-style",t.textContent=".header.svelte-w1pss8.svelte-w1pss8{display:flex;justify-content:space-between;align-items:center}.compare.svelte-w1pss8.svelte-w1pss8{font-size:.75rem}.switch-types.svelte-w1pss8.svelte-w1pss8{display:flex;font-size:.75rem;text-align:center}.switch-types button{font-weight:500;margin-right:.125rem!important}th.svelte-w1pss8.svelte-w1pss8{vertical-align:bottom}th.song.svelte-w1pss8.svelte-w1pss8{padding-left:0}th.rank.svelte-w1pss8.svelte-w1pss8,th.timeset.svelte-w1pss8.svelte-w1pss8{text-align:center!important}th.rank.svelte-w1pss8.svelte-w1pss8{width:7rem}th.timeset.svelte-w1pss8.svelte-w1pss8{width:8.5rem}th.score.svelte-w1pss8.svelte-w1pss8{width:11rem}th.score.main.svelte-w1pss8.svelte-w1pss8{width:14.5rem}th.icons.svelte-w1pss8.svelte-w1pss8{width:4rem;padding-right:0}.player-header.svelte-w1pss8.svelte-w1pss8{display:flex;justify-content:space-between;align-items:center}.player-header.svelte-w1pss8 i.svelte-w1pss8{color:var(--decrease);cursor:pointer;padding-top:.25rem;padding-left:.5rem}",Object(r.append)(document.head,t)),Object(r.init)(this,e,P,S,r.safe_not_equal,{players:0,songs:3,series:4,currentPage:1,totalItems:5,error:6,type:2,isCached:7,isPaused:8,cachedRecentPlay:9,beforePageChanged:10,maxComparePlayers:11,onTypeChange:12},[-1,-1])}get onTypeChange(){return this.$$.ctx[12]}}t.default=I},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(59),c=n(9),i=n(13),s=n(8),l=n(100),d=n(109),u=n(64),b=n(121),p=n(103),f=n(97),O=n(74),j=n(36),m=n(119),g=n(104),h=n(73),y=n(123),v=n(84);function _(e,t,n){const r=e.slice();return r[12]=t[n],r[14]=n,r}function w(e,t,n){const r=e.slice();return r[12]=t[n],r[14]=n,r}function k(e){let t,n,a,c,i,s,l,d,u,b,j,m,g,y,v,k,S,P,I,C,T=e[1],A=[];for(let t=0;t<T.length;t+=1)A[t]=$(w(e,T,t));const q=e=>Object(r.transition_out)(A[e],1,1,()=>{A[e]=null});i=new p.default({props:{diff:e[0].diffInfo,useShortName:!0,reverseColors:!0}}),u=new f.default({props:{song:e[0],$$slots:{default:[x]},$$scope:{ctx:e}}}),j=new h.default({props:{type:"text",iconFa:e[5]?"fas fa-chevron-down":"fas fa-chevron-right"}}),j.$on("click",e[8]),y=new O.default({props:{date:e[1][0].timeset}});let R=e[1],D=[];for(let t=0;t<R.length;t+=1)D[t]=z(_(e,R,t));const L=e=>Object(r.transition_out)(D[e],1,1,()=>{D[e]=null});let N=e[0]&&e[0].hash&&E(e),F=e[5]&&B(e);return{c(){t=Object(r.element)("tr"),n=Object(r.element)("td");for(let e=0;e<A.length;e+=1)A[e].c();a=Object(r.space)(),c=Object(r.element)("td"),Object(r.create_component)(i.$$.fragment),s=Object(r.space)(),l=Object(r.element)("td"),d=Object(r.element)("div"),Object(r.create_component)(u.$$.fragment),b=Object(r.space)(),Object(r.create_component)(j.$$.fragment),m=Object(r.space)(),g=Object(r.element)("td"),Object(r.create_component)(y.$$.fragment),v=Object(r.space)();for(let e=0;e<D.length;e+=1)D[e].c();k=Object(r.space)(),N&&N.c(),P=Object(r.space)(),F&&F.c(),I=Object(r.empty)(),Object(r.attr)(n,"class","rank svelte-1ioddkh"),Object(r.attr)(c,"class","diff svelte-1ioddkh"),Object(r.attr)(d,"class","svelte-1ioddkh"),Object(r.attr)(l,"class","song svelte-1ioddkh"),Object(r.attr)(g,"class","timeset svelte-1ioddkh")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n);for(let e=0;e<A.length;e+=1)A[e].m(n,null);Object(r.append)(t,a),Object(r.append)(t,c),Object(r.mount_component)(i,c,null),Object(r.append)(t,s),Object(r.append)(t,l),Object(r.append)(l,d),Object(r.mount_component)(u,d,null),Object(r.append)(d,b),Object(r.mount_component)(j,d,null),Object(r.append)(t,m),Object(r.append)(t,g),Object(r.mount_component)(y,g,null),Object(r.append)(t,v);for(let e=0;e<D.length;e+=1)D[e].m(t,null);Object(r.append)(t,k),N&&N.m(t,null),Object(r.insert)(e,P,o),F&&F.m(e,o),Object(r.insert)(e,I,o),C=!0},p(e,a){if(6&a){let t;for(T=e[1],t=0;t<T.length;t+=1){const o=w(e,T,t);A[t]?(A[t].p(o,a),Object(r.transition_in)(A[t],1)):(A[t]=$(o),A[t].c(),Object(r.transition_in)(A[t],1),A[t].m(n,null))}for(Object(r.group_outros)(),t=T.length;t<A.length;t+=1)q(t);Object(r.check_outros)()}const o={};1&a&&(o.diff=e[0].diffInfo),i.$set(o);const c={};1&a&&(c.song=e[0]),65537&a&&(c.$$scope={dirty:a,ctx:e}),u.$set(c);const s={};32&a&&(s.iconFa=e[5]?"fas fa-chevron-down":"fas fa-chevron-right"),j.$set(s);const l={};if(2&a&&(l.date=e[1][0].timeset),y.$set(l),218&a){let n;for(R=e[1],n=0;n<R.length;n+=1){const o=_(e,R,n);D[n]?(D[n].p(o,a),Object(r.transition_in)(D[n],1)):(D[n]=z(o),D[n].c(),Object(r.transition_in)(D[n],1),D[n].m(t,k))}for(Object(r.group_outros)(),n=R.length;n<D.length;n+=1)L(n);Object(r.check_outros)()}e[0]&&e[0].hash?N?(N.p(e,a),1&a&&Object(r.transition_in)(N,1)):(N=E(e),N.c(),Object(r.transition_in)(N,1),N.m(t,null)):N&&(Object(r.group_outros)(),Object(r.transition_out)(N,1,1,()=>{N=null}),Object(r.check_outros)()),e[5]?F?(F.p(e,a),32&a&&Object(r.transition_in)(F,1)):(F=B(e),F.c(),Object(r.transition_in)(F,1),F.m(I.parentNode,I)):F&&(Object(r.group_outros)(),Object(r.transition_out)(F,1,1,()=>{F=null}),Object(r.check_outros)())},i(e){if(!C){for(let e=0;e<T.length;e+=1)Object(r.transition_in)(A[e]);Object(r.transition_in)(i.$$.fragment,e),Object(r.transition_in)(u.$$.fragment,e),Object(r.transition_in)(j.$$.fragment,e),Object(r.transition_in)(y.$$.fragment,e);for(let e=0;e<R.length;e+=1)Object(r.transition_in)(D[e]);Object(r.transition_in)(N),S||Object(r.add_render_callback)(()=>{S=Object(r.create_in_transition)(t,o.fly,{x:50,duration:500}),S.start()}),Object(r.transition_in)(F),C=!0}},o(e){A=A.filter(Boolean);for(let e=0;e<A.length;e+=1)Object(r.transition_out)(A[e]);Object(r.transition_out)(i.$$.fragment,e),Object(r.transition_out)(u.$$.fragment,e),Object(r.transition_out)(j.$$.fragment,e),Object(r.transition_out)(y.$$.fragment,e),D=D.filter(Boolean);for(let e=0;e<D.length;e+=1)Object(r.transition_out)(D[e]);Object(r.transition_out)(N),Object(r.transition_out)(F),C=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(A,e),Object(r.destroy_component)(i),Object(r.destroy_component)(u),Object(r.destroy_component)(j),Object(r.destroy_component)(y),Object(r.destroy_each)(D,e),N&&N.d(),e&&Object(r.detach)(P),F&&F.d(e),e&&Object(r.detach)(I)}}}function $(e){let t,n,a=0===e[14]&&function(e){let t,n,a;return t=new b.default({props:{rank:e[12].rank,countryRank:e[12].ssplCountryRank,country:e[12].country,disableUpdating:!0,timeset:e[12].timeset,cachedRecentPlay:e[2],inline:!1}}),{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)()},m(e,o){Object(r.mount_component)(t,e,o),Object(r.insert)(e,n,o),a=!0},p(e,n){const r={};2&n&&(r.rank=e[12].rank),2&n&&(r.countryRank=e[12].ssplCountryRank),2&n&&(r.country=e[12].country),2&n&&(r.timeset=e[12].timeset),4&n&&(r.cachedRecentPlay=e[2]),t.$set(r)},i(e){a||(Object(r.transition_in)(t.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),a=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n)}}}(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,t){0===e[14]&&a.p(e,t)},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function x(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O=e[0].name+"",j=e[0].songAuthor+"",m=e[0].levelAuthor+"";return{c(){t=Object(r.element)("figure"),n=Object(r.element)("img"),o=Object(r.space)(),c=Object(r.element)("div"),i=Object(r.element)("span"),s=Object(r.text)(O),l=Object(r.space)(),d=Object(r.element)("div"),u=Object(r.text)(j),b=Object(r.space)(),p=Object(r.element)("small"),f=Object(r.text)(m),n.src!==(a="/imports/images/songs/"+e[0].hash+".png")&&Object(r.attr)(n,"src",a),Object(r.attr)(n,"class","svelte-1ioddkh"),Object(r.attr)(i,"class","name"),Object(r.attr)(p,"class","svelte-1ioddkh"),Object(r.attr)(d,"class","author"),Object(r.attr)(c,"class","songinfo svelte-1ioddkh"),Object(r.attr)(t,"class","svelte-1ioddkh")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.append)(t,o),Object(r.append)(t,c),Object(r.append)(c,i),Object(r.append)(i,s),Object(r.append)(c,l),Object(r.append)(c,d),Object(r.append)(d,u),Object(r.append)(d,b),Object(r.append)(d,p),Object(r.append)(p,f)},p(e,t){1&t&&n.src!==(a="/imports/images/songs/"+e[0].hash+".png")&&Object(r.attr)(n,"src",a),1&t&&O!==(O=e[0].name+"")&&Object(r.set_data)(s,O),1&t&&j!==(j=e[0].songAuthor+"")&&Object(r.set_data)(u,j),1&t&&m!==(m=e[0].levelAuthor+"")&&Object(r.set_data)(f,m)},d(e){e&&Object(r.detach)(t)}}}function S(e){let t;return{c(){t=Object(r.element)("div"),t.textContent="-",Object(r.attr)(t,"class","empty")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function P(e){let t,n,a,o,c,i,s=e[12].pp&&I(e),l=e[12].acc&&C(e),d=e[12].score&&A(e),u=e[12].beatSavior&&e[12].accTooltip&&e[6]&&q(e),b=e[3]&&R(e);return{c(){s&&s.c(),t=Object(r.space)(),l&&l.c(),n=Object(r.space)(),d&&d.c(),a=Object(r.space)(),u&&u.c(),o=Object(r.space)(),b&&b.c(),c=Object(r.empty)()},m(e,p){s&&s.m(e,p),Object(r.insert)(e,t,p),l&&l.m(e,p),Object(r.insert)(e,n,p),d&&d.m(e,p),Object(r.insert)(e,a,p),u&&u.m(e,p),Object(r.insert)(e,o,p),b&&b.m(e,p),Object(r.insert)(e,c,p),i=!0},p(e,i){e[12].pp?s?(s.p(e,i),2&i&&Object(r.transition_in)(s,1)):(s=I(e),s.c(),Object(r.transition_in)(s,1),s.m(t.parentNode,t)):s&&(Object(r.group_outros)(),Object(r.transition_out)(s,1,1,()=>{s=null}),Object(r.check_outros)()),e[12].acc?l?(l.p(e,i),2&i&&Object(r.transition_in)(l,1)):(l=C(e),l.c(),Object(r.transition_in)(l,1),l.m(n.parentNode,n)):l&&(Object(r.group_outros)(),Object(r.transition_out)(l,1,1,()=>{l=null}),Object(r.check_outros)()),e[12].score?d?(d.p(e,i),2&i&&Object(r.transition_in)(d,1)):(d=A(e),d.c(),Object(r.transition_in)(d,1),d.m(a.parentNode,a)):d&&(Object(r.group_outros)(),Object(r.transition_out)(d,1,1,()=>{d=null}),Object(r.check_outros)()),e[12].beatSavior&&e[12].accTooltip&&e[6]?u?(u.p(e,i),66&i&&Object(r.transition_in)(u,1)):(u=q(e),u.c(),Object(r.transition_in)(u,1),u.m(o.parentNode,o)):u&&(Object(r.group_outros)(),Object(r.transition_out)(u,1,1,()=>{u=null}),Object(r.check_outros)()),e[3]?b?(b.p(e,i),8&i&&Object(r.transition_in)(b,1)):(b=R(e),b.c(),Object(r.transition_in)(b,1),b.m(c.parentNode,c)):b&&(Object(r.group_outros)(),Object(r.transition_out)(b,1,1,()=>{b=null}),Object(r.check_outros)())},i(e){i||(Object(r.transition_in)(s),Object(r.transition_in)(l),Object(r.transition_in)(d),Object(r.transition_in)(u),Object(r.transition_in)(b),i=!0)},o(e){Object(r.transition_out)(s),Object(r.transition_out)(l),Object(r.transition_out)(d),Object(r.transition_out)(u),Object(r.transition_out)(b),i=!1},d(e){s&&s.d(e),e&&Object(r.detach)(t),l&&l.d(e),e&&Object(r.detach)(n),d&&d.d(e),e&&Object(r.detach)(a),u&&u.d(e),e&&Object(r.detach)(o),b&&b.d(e),e&&Object(r.detach)(c)}}}function I(e){let t,n;return t=new d.default({props:{playerId:e[12].playerId,leaderboardId:e[12].leaderboardId,pp:e[12].pp,prevPp:e[14]>0||!e[4]?null:e[12].prevPp,zero:Object(s.formatNumber)(0),withZeroSuffix:!0,weighted:e[12].ppWeighted,inline:!0}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};2&n&&(r.playerId=e[12].playerId),2&n&&(r.leaderboardId=e[12].leaderboardId),2&n&&(r.pp=e[12].pp),18&n&&(r.prevPp=e[14]>0||!e[4]?null:e[12].prevPp),2&n&&(r.weighted=e[12].ppWeighted),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function C(e){let t,n,a,o,c,i,s,l,d,b=e[7].songBrowser.fields.acc+"";c=new u.default({props:{value:e[12].acc,withZeroSuffix:!0,prevValue:e[14]>0||!e[4]?null:e[12].prevAcc,inline:!0,suffix:"%"+(e[12].mods&&e[12].mods.length?" ("+e[12].mods+")":""),suffixPrev:"%"}});let p=e[12].beatSavior&&e[12].accTooltip&&T(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("span"),a=Object(r.text)(b),o=Object(r.text)(":\n                "),Object(r.create_component)(c.$$.fragment),i=Object(r.space)(),p&&p.c(),Object(r.attr)(n,"class","scoreBottom svelte-1ioddkh"),Object(r.toggle_class)(n,"clickable",e[12].beatSavior&&e[12].accTooltip),Object(r.toggle_class)(t,"bigger",!e[12].pp)},m(u,b){Object(r.insert)(u,t,b),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(n,o),Object(r.mount_component)(c,n,null),Object(r.append)(n,i),p&&p.m(n,null),s=!0,l||(d=Object(r.listen)(n,"click",e[9]),l=!0)},p(e,o){(!s||128&o)&&b!==(b=e[7].songBrowser.fields.acc+"")&&Object(r.set_data)(a,b);const i={};2&o&&(i.value=e[12].acc),18&o&&(i.prevValue=e[14]>0||!e[4]?null:e[12].prevAcc),2&o&&(i.suffix="%"+(e[12].mods&&e[12].mods.length?" ("+e[12].mods+")":"")),c.$set(i),e[12].beatSavior&&e[12].accTooltip?p?(p.p(e,o),2&o&&Object(r.transition_in)(p,1)):(p=T(e),p.c(),Object(r.transition_in)(p,1),p.m(n,null)):p&&(Object(r.group_outros)(),Object(r.transition_out)(p,1,1,()=>{p=null}),Object(r.check_outros)()),2&o&&Object(r.toggle_class)(n,"clickable",e[12].beatSavior&&e[12].accTooltip),2&o&&Object(r.toggle_class)(t,"bigger",!e[12].pp)},i(e){s||(Object(r.transition_in)(c.$$.fragment,e),Object(r.transition_in)(p),s=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),Object(r.transition_out)(p),s=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c),p&&p.d(),l=!1,d()}}}function T(e){let t,n;return t=new v.default({props:{title:e[12].beatSavior&&e[12].accTooltip?e[12].accTooltip+"\n"+e[7].beatSavior.clickToShowDetails:null}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};130&n&&(r.title=e[12].beatSavior&&e[12].accTooltip?e[12].accTooltip+"\n"+e[7].beatSavior.clickToShowDetails:null),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function A(e){let t,n,a,o,c,i,s=e[7].songBrowser.fields.score+"";return c=new u.default({props:{value:e[12].score,prevValue:e[14]>0||!e[4]?null:e[12].prevScore,inline:!0,digits:0,prefix:e[12].scoreApproximate?"~":""}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("span"),a=Object(r.text)(s),o=Object(r.text)(":\n                "),Object(r.create_component)(c.$$.fragment),Object(r.attr)(n,"class","scoreBottom svelte-1ioddkh")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(n,o),Object(r.mount_component)(c,n,null),i=!0},p(e,t){(!i||128&t)&&s!==(s=e[7].songBrowser.fields.score+"")&&Object(r.set_data)(a,s);const n={};2&t&&(n.value=e[12].score),18&t&&(n.prevValue=e[14]>0||!e[4]?null:e[12].prevScore),2&t&&(n.prefix=e[12].scoreApproximate?"~":""),c.$set(n)},i(e){i||(Object(r.transition_in)(c.$$.fragment,e),i=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c)}}}function q(e){let t,n;return t=new y.default({props:{data:e[12].beatSavior,showAcc:!0,showStats:!0,showGrid:!1}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};2&n&&(r.data=e[12].beatSavior),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function R(e){let t,n;return t=new l.default({props:{leaderboardId:e[12].leaderboardId,pp:e[12].pp}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};2&n&&(r.leaderboardId=e[12].leaderboardId),2&n&&(r.pp=e[12].pp),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function z(e){let t,n,a,o;const c=[P,S],i=[];function s(e,t){return e[12]?0:1}return n=s(e),a=i[n]=c[n](e),{c(){t=Object(r.element)("td"),a.c(),Object(r.attr)(t,"class","score svelte-1ioddkh"),Object(r.toggle_class)(t,"main",0===e[14])},m(e,a){Object(r.insert)(e,t,a),i[n].m(t,null),o=!0},p(e,o){let l=n;n=s(e),n===l?i[n].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),a=i[n],a||(a=i[n]=c[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null))},i(e){o||(Object(r.transition_in)(a),o=!0)},o(e){Object(r.transition_out)(a),o=!1},d(e){e&&Object(r.detach)(t),i[n].d()}}}function E(e){let t,n,a;return n=new m.default({props:{hash:e[0].hash,twitchUrl:e[0].video&&e[0].video.url?e[0].video.url:null,bsExistsForPlayer:e[1][0]&&e[1][0].bsExistsForPlayer?e[1][0].bsExistsForPlayer:null}}),{c(){t=Object(r.element)("td"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","icons svelte-1ioddkh")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(e,t){const r={};1&t&&(r.hash=e[0].hash),1&t&&(r.twitchUrl=e[0].video&&e[0].video.url?e[0].video.url:null),2&t&&(r.bsExistsForPlayer=e[1][0]&&e[1][0].bsExistsForPlayer?e[1][0].bsExistsForPlayer:null),n.$set(r)},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function B(e){let t,n,a,o,c,i,s;return a=new g.default({props:{leaderboardId:e[0].leaderboardId,onlySelectedDiff:!0,startAtRank:e[1]&&e[1][0]&&e[1][0].rank?e[1][0].rank:1,highlight:e[1]&&e[1][0]&&e[1][0].playerId?[e[1][0].playerId]:[],bgLeft:"-2rem",bgTop:"-3rem",bgWidth:"2rem",bgHeight:"2rem"}}),{c(){t=Object(r.element)("tr"),n=Object(r.element)("td"),Object(r.create_component)(a.$$.fragment),Object(r.attr)(n,"colspan",o=6+e[1].length),Object(r.attr)(n,"class","svelte-1ioddkh"),Object(r.attr)(t,"class","details svelte-1ioddkh")},m(o,l){Object(r.insert)(o,t,l),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),c=!0,i||(s=Object(r.listen)(n,"dblclick",e[10]),i=!0)},p(e,t){const i={};1&t&&(i.leaderboardId=e[0].leaderboardId),2&t&&(i.startAtRank=e[1]&&e[1][0]&&e[1][0].rank?e[1][0].rank:1),2&t&&(i.highlight=e[1]&&e[1][0]&&e[1][0].playerId?[e[1][0].playerId]:[]),a.$set(i),(!c||2&t&&o!==(o=6+e[1].length))&&Object(r.attr)(n,"colspan",o)},i(e){c||(Object(r.transition_in)(a.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a),i=!1,s()}}}function D(e){let t,n,a=e[0]&&k(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=k(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function L(e,t,n){let o;Object(r.component_subscribe)(e,c._,e=>n(7,o=e));let{song:s=null}=t,{series:l=[]}=t,{cachedRecentPlay:d=null}=t,u=!0,b=!0,p=!1,f=!1;async function O(){const e=await Object(j.getConfig)("songLeaderboard");n(3,u=!(!e||!e.showWhatIfPp)),n(4,b=!(!e||!e.showDiff))}return Object(a.onMount)(async()=>(await O(),i.default.on("config-changed",O))),e.$$set=e=>{"song"in e&&n(0,s=e.song),"series"in e&&n(1,l=e.series),"cachedRecentPlay"in e&&n(2,d=e.cachedRecentPlay)},[s,l,d,u,b,p,f,o,()=>n(5,p=!p),()=>n(6,f=!f),()=>n(5,p=!p)]}class N extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1ioddkh-style")||((t=Object(r.element)("style")).id="svelte-1ioddkh-style",t.textContent="td.svelte-1ioddkh.svelte-1ioddkh{vertical-align:middle !important}td.rank.svelte-1ioddkh.svelte-1ioddkh{width:7rem;text-align:center!important}td.diff.svelte-1ioddkh.svelte-1ioddkh{width:1.5rem;padding:0}td.song.svelte-1ioddkh>div.svelte-1ioddkh{display:flex;justify-content:space-between;align-items:center}tr.details.svelte-1ioddkh.svelte-1ioddkh:hover{background-color:inherit!important}tr.details.svelte-1ioddkh td.svelte-1ioddkh{padding-top:1rem;padding-bottom:2rem}td.song.svelte-1ioddkh figure.svelte-1ioddkh{display:flex;justify-content:flex-start;align-items:center;margin:0}td.song.svelte-1ioddkh img.svelte-1ioddkh{flex:0 1 40px;width:40px;height:40px;margin:0 1em 0 .5em}td.song.svelte-1ioddkh .songinfo.svelte-1ioddkh{text-align:left;font-size:.95rem;font-weight:500}td.song.svelte-1ioddkh .songinfo.svelte-1ioddkh{color:var(--alternate)}td.song.svelte-1ioddkh .songinfo small.svelte-1ioddkh{font-size:0.75em;color:var(--ppColour)}td.timeset.svelte-1ioddkh.svelte-1ioddkh{width:8.5rem;text-align:center}td.score.svelte-1ioddkh.svelte-1ioddkh{position:relative;width:11rem}td.score.svelte-1ioddkh .bigger .scoreBottom.svelte-1ioddkh{font-size:1rem}td.score.main.svelte-1ioddkh.svelte-1ioddkh{width:17rem}td.score.main .what-if{right:.5rem}td.score.svelte-1ioddkh .beatsavior-icon{display:inline-block;position:relative;top:5px;margin-left:4px}td.icons.svelte-1ioddkh.svelte-1ioddkh{font-size:0.65rem;width:4rem;padding-right:0}.clickable.svelte-1ioddkh.svelte-1ioddkh{cursor:pointer}",Object(r.append)(document.head,t)),Object(r.init)(this,e,L,D,r.safe_not_equal,{song:0,series:1,cachedRecentPlay:2})}}t.default=N},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9),c=n(13),i=n(113),s=n(114),l=n(109),d=n(39),u=n(15),b=n(8),p=n(6),f=n(12),O=n(25),j=n(35),m=n(41),g=n(23);function h(e,t,n){const r=e.slice();return r[24]=t[n],r}function y(e){let t,n,a,o;const c=[k,w,_],i=[];function s(e,t){return e[5]&&e[5].length?0:e[2]?1:2}return t=s(e),n=i[t]=c[t](e),{c(){n.c(),a=Object(r.empty)()},m(e,n){i[t].m(e,n),Object(r.insert)(e,a,n),o=!0},p(e,o){let l=t;t=s(e),t===l?i[t].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),n=i[t],n||(n=i[t]=c[t](e),n.c()),Object(r.transition_in)(n,1),n.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(n),o=!0)},o(e){Object(r.transition_out)(n),o=!1},d(e){i[t].d(e),e&&Object(r.detach)(a)}}}function v(e){let t;return{c(){t=Object(r.element)("div"),t.innerHTML='<i class="fas fa-sun fa-spin fa-3x"></i>',Object(r.attr)(t,"class","spinner-box svelte-8lzvkx")},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function _(e){let t,n,a=e[4].common.noData+"";return{c(){t=Object(r.element)("p"),n=Object(r.text)(a)},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){16&t&&a!==(a=e[4].common.noData+"")&&Object(r.set_data)(n,a)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function w(e){let t,n;return{c(){t=Object(r.element)("p"),n=Object(r.text)(e[2]),Object(r.attr)(t,"class","error svelte-8lzvkx")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){4&t&&Object(r.set_data)(n,e[2])},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function k(e){let t,n,a,o=e[5],c=[];for(let t=0;t<o.length;t+=1)c[t]=$(h(e,o,t));const i=e=>Object(r.transition_out)(c[e],1,1,()=>{c[e]=null});return{c(){t=Object(r.element)("table"),n=Object(r.element)("tbody");for(let e=0;e<c.length;e+=1)c[e].c();Object(r.attr)(t,"class","sspl svelte-8lzvkx")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n);for(let e=0;e<c.length;e+=1)c[e].m(n,null);a=!0},p(e,t){if(33&t){let a;for(o=e[5],a=0;a<o.length;a+=1){const i=h(e,o,a);c[a]?(c[a].p(i,t),Object(r.transition_in)(c[a],1)):(c[a]=$(i),c[a].c(),Object(r.transition_in)(c[a],1),c[a].m(n,null))}for(Object(r.group_outros)(),a=o.length;a<c.length;a+=1)i(a);Object(r.check_outros)()}},i(e){if(!a){for(let e=0;e<o.length;e+=1)Object(r.transition_in)(c[e]);a=!0}},o(e){c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)Object(r.transition_out)(c[e]);a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)(c,e)}}}function $(e){let t,n,a,o,c,d,u,p,f,O,j;return a=new i.default({props:{rank:e[24].miniRank}}),d=new s.default({props:{user:e[24]}}),f=new l.default({props:{pp:e[24].pp,zero:Object(b.formatNumber)(0),prevPp:e[0],inline:!0}}),{c(){t=Object(r.element)("tr"),n=Object(r.element)("td"),Object(r.create_component)(a.$$.fragment),o=Object(r.space)(),c=Object(r.element)("td"),Object(r.create_component)(d.$$.fragment),u=Object(r.space)(),p=Object(r.element)("td"),Object(r.create_component)(f.$$.fragment),O=Object(r.space)(),Object(r.attr)(n,"class","rank svelte-8lzvkx"),Object(r.attr)(c,"class","player svelte-8lzvkx"),Object(r.attr)(p,"class","pp svelte-8lzvkx")},m(e,i){Object(r.insert)(e,t,i),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),Object(r.append)(t,o),Object(r.append)(t,c),Object(r.mount_component)(d,c,null),Object(r.append)(t,u),Object(r.append)(t,p),Object(r.mount_component)(f,p,null),Object(r.append)(t,O),j=!0},p(e,t){const n={};32&t&&(n.rank=e[24].miniRank),a.$set(n);const r={};32&t&&(r.user=e[24]),d.$set(r);const o={};32&t&&(o.pp=e[24].pp),1&t&&(o.prevPp=e[0]),f.$set(o)},i(e){j||(Object(r.transition_in)(a.$$.fragment,e),Object(r.transition_in)(d.$$.fragment,e),Object(r.transition_in)(f.$$.fragment,e),j=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),Object(r.transition_out)(d.$$.fragment,e),Object(r.transition_out)(f.$$.fragment,e),j=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a),Object(r.destroy_component)(d),Object(r.destroy_component)(f)}}}function x(e){let t,n,a,o;const c=[v,y],i=[];function s(e,t){return e[1]||!e[3]?0:e[3]?1:-1}return~(t=s(e))&&(n=i[t]=c[t](e)),{c(){n&&n.c(),a=Object(r.empty)()},m(e,n){~t&&i[t].m(e,n),Object(r.insert)(e,a,n),o=!0},p(e,[o]){let l=t;t=s(e),t===l?~t&&i[t].p(e,o):(n&&(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)()),~t?(n=i[t],n||(n=i[t]=c[t](e),n.c()),Object(r.transition_in)(n,1),n.m(a.parentNode,a)):n=null)},i(e){o||(Object(r.transition_in)(n),o=!0)},o(e){Object(r.transition_out)(n),o=!1},d(e){~t&&i[t].d(e),e&&Object(r.detach)(a)}}}function S(e,t,n){let i;Object(r.component_subscribe)(e,o._,e=>n(4,i=e));let s,{type:l="country"}=t,{country:h}=t,{rank:y}=t,{playerId:v}=t,{playerPp:_}=t,{numOfItems:w=5}=t;w<2&&(w=2);let k=null,$=null,x={global:{},country:{}},S={},P=null,I=!1,C=null,T=!1;const A=async()=>{n(11,s=await Object(j.getActiveCountry)()),s&&n(12,k=await Object(u.getActiveCountryPlayers)(s))};function q(e){return Math.ceil(e/d.PLAYERS_PER_PAGE)}async function R(e,t,r,a,o,c,s){if(!e||null===s||I)return;n(15,P=null),n(2,C=null),x.country[a]||(x.country[a]={});const l="global"===t?x.global:x.country[a],u="global"===t?d.GLOBAL_URL:d.COUNTRY_URL;if(!l.players||!l.players.length||c&&l.rank!==c){if(!c)return;n(1,I=!0),n(15,P=null);try{let e=await async function(e,t,n){const r=q(t),a=t-(w-(w>2?2:1)),o=q(a),c=q(a+1),i=[...new Set([r,0===o?1:o,c])];let s=[];for(const t of i)s=s.concat(await Object(f.fetchHtmlPage)(O.default.SCORESABER,Object(b.substituteVars)(e,{page:t,country:n})).then(e=>Object(m.parseSsLeaderboardScores)(e)).then(e=>e.map(e=>{const{tr:t,mods:n,percent:r,score:a,timesetAgo:o,rank:c,playerId:i,playerName:s,...l}=e;return{...l,id:i,name:s,miniRank:c}})));return s.sort((e,t)=>t.pp-e.pp)}(u,c,a);if("country"===t&&a===o&&k&&s){const t=k.filter(e=>e.country.toLowerCase()!==o);r=Object.assign({},r,Object(p.convertArrayToObjectByKey)(t.map(e=>({id:e.id,pp:e.pp})),"playerId")),e=e.concat(t).map(e=>(r[e.id]&&r[e.id].pp&&(e.pp=r[e.id].pp),e)).sort((e,t)=>t.pp-e.pp).map((e,t)=>({...e,miniRank:t+1,name:Object(g.getPlayerName)(e.name,t)}))}n(15,P=l.players=e),l.rank=c,n(1,I=!1)}catch{n(1,I=!1),n(2,C=i.common.downloadError)}}else n(15,P=l.players)}function z(e,t,r){r&&n(13,$=!(!t||!t.find(t=>t.id===e)))}let E;return Object(a.onMount)(async()=>(await A(),await z(v,k,!0),await R(!0,l,S,h,s,y,$),n(3,T=!0),c.default.on("config-changed",A))),e.$$set=e=>{"type"in e&&n(7,l=e.type),"country"in e&&n(8,h=e.country),"rank"in e&&n(9,y=e.rank),"playerId"in e&&n(10,v=e.playerId),"playerPp"in e&&n(0,_=e.playerPp),"numOfItems"in e&&n(6,w=e.numOfItems)},e.$$.update=()=>{5128&e.$$.dirty&&z(v,k,T),11144&e.$$.dirty&&R(T,l,S,h,s,y,$),34185&e.$$.dirty&&function(e,t,r,a,o){if(!T)return;if(!(e&&e.length&&a&&o&&t))return;const c="global"===t?x.global:x.country[r];if(!c||!c.players)return;const i=e.find(e=>e.id===a);i&&(i.pp=o,n(15,P=c.players=e.slice(0)))}(P,l,h,v,_),32768&e.$$.dirty&&n(5,E=function(e){if(!e||!v)return null;const t=e.findIndex(e=>e.id===v);if(t<0)return null;let n=t-(w-(w>2?2:1))-(t+1===e.length?1:0);return n<0&&(n=0),e.slice(n,n+w)}(P))},[_,I,C,T,i,E,w,l,h,y,v]}class P extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-8lzvkx-style")||((t=Object(r.element)("style")).id="svelte-8lzvkx-style",t.textContent=".spinner-box.svelte-8lzvkx.svelte-8lzvkx{padding:.5rem;text-align:center}table.svelte-8lzvkx.svelte-8lzvkx{width:100%}table.svelte-8lzvkx tbody td.svelte-8lzvkx{padding:0.25em 0.25em;border-bottom:1px solid var(--dimmed)}td.rank.svelte-8lzvkx.svelte-8lzvkx{min-width:3.75em;text-align:right}td.player.svelte-8lzvkx.svelte-8lzvkx{overflow-x:hidden;white-space:nowrap;text-overflow:ellipsis;width:14em;max-width:14rem}td.pp.svelte-8lzvkx.svelte-8lzvkx{min-width:10.75em;text-align:left!important}.error.svelte-8lzvkx.svelte-8lzvkx{font-weight:500;color:red}",Object(r.append)(document.head,t)),Object(r.init)(this,e,S,x,r.safe_not_equal,{type:7,country:8,rank:9,playerId:10,playerPp:0,numOfItems:6})}}t.default=P},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(59),o=n(9),c=n(66),i=n(64),s=n(74);function l(e,t,n){const r=e.slice();return r[4]=t[n],r}function d(e){let t,n,a,o;t=new c.default({props:{label:e[2].profile.twitch.vodsBadge,fluid:!0,color:"#dbdbdb",bgColor:"#9146ff",$$slots:{value:[b]},$$scope:{ctx:e}}});let i=e[0]&&e[0].videos&&e[0].videos.length>0&&e[1]&&p(e);return{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),i&&i.c(),a=Object(r.empty)()},m(e,c){Object(r.mount_component)(t,e,c),Object(r.insert)(e,n,c),i&&i.m(e,c),Object(r.insert)(e,a,c),o=!0},p(e,n){const o={};4&n&&(o.label=e[2].profile.twitch.vodsBadge),131&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o),e[0]&&e[0].videos&&e[0].videos.length>0&&e[1]?i?(i.p(e,n),3&n&&Object(r.transition_in)(i,1)):(i=p(e),i.c(),Object(r.transition_in)(i,1),i.m(a.parentNode,a)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)())},i(e){o||(Object(r.transition_in)(t.$$.fragment,e),Object(r.transition_in)(i),o=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),Object(r.transition_out)(i),o=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),i&&i.d(e),e&&Object(r.detach)(a)}}}function u(e){let t,n,a,o;return{c(){t=Object(r.element)("i"),Object(r.attr)(t,"class",n=Object(r.null_to_empty)(e[1]?"fas fa-chevron-up details":"fas fa-chevron-right details")+" svelte-b4h0yq")},m(n,c){Object(r.insert)(n,t,c),a||(o=Object(r.listen)(t,"click",e[3]),a=!0)},p(e,a){2&a&&n!==(n=Object(r.null_to_empty)(e[1]?"fas fa-chevron-up details":"fas fa-chevron-right details")+" svelte-b4h0yq")&&Object(r.attr)(t,"class",n)},d(e){e&&Object(r.detach)(t),a=!1,o()}}}function b(e){let t,n,a,o;n=new i.default({props:{value:e[0]&&e[0].videos?e[0].videos.length:0,digits:0}});let c=e[0]&&e[0].videos&&e[0].videos.length>0&&u(e);return{c(){t=Object(r.element)("span"),Object(r.create_component)(n.$$.fragment),a=Object(r.space)(),c&&c.c(),Object(r.attr)(t,"slot","value")},m(e,i){Object(r.insert)(e,t,i),Object(r.mount_component)(n,t,null),Object(r.append)(t,a),c&&c.m(t,null),o=!0},p(e,r){const a={};1&r&&(a.value=e[0]&&e[0].videos?e[0].videos.length:0),n.$set(a),e[0]&&e[0].videos&&e[0].videos.length>0?c?c.p(e,r):(c=u(e),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(e){o||(Object(r.transition_in)(n.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),c&&c.d()}}}function p(e){let t,n,o,c,i,s,d,u,b,p,O,j,m,g,h,y,v=e[2].songBrowser.fields.timesetShort+"",_=e[2].profile.twitch.video+"",w=e[2].songBrowser.fields.duration+"",k=e[0].videos,$=[];for(let t=0;t<k.length;t+=1)$[t]=f(l(e,k,t));const x=e=>Object(r.transition_out)($[e],1,1,()=>{$[e]=null});return{c(){t=Object(r.element)("div"),n=Object(r.element)("table"),o=Object(r.element)("thead"),c=Object(r.element)("tr"),i=Object(r.element)("th"),s=Object(r.text)(v),d=Object(r.space)(),u=Object(r.element)("th"),b=Object(r.text)(_),p=Object(r.space)(),O=Object(r.element)("th"),j=Object(r.text)(w),m=Object(r.space)(),g=Object(r.element)("tbody");for(let e=0;e<$.length;e+=1)$[e].c();Object(r.attr)(i,"class","date svelte-b4h0yq"),Object(r.attr)(O,"class","duration svelte-b4h0yq"),Object(r.attr)(n,"class","svelte-b4h0yq"),Object(r.attr)(t,"class","content")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),Object(r.append)(n,o),Object(r.append)(o,c),Object(r.append)(c,i),Object(r.append)(i,s),Object(r.append)(c,d),Object(r.append)(c,u),Object(r.append)(u,b),Object(r.append)(c,p),Object(r.append)(c,O),Object(r.append)(O,j),Object(r.append)(n,m),Object(r.append)(n,g);for(let e=0;e<$.length;e+=1)$[e].m(g,null);y=!0},p(e,t){if((!y||4&t)&&v!==(v=e[2].songBrowser.fields.timesetShort+"")&&Object(r.set_data)(s,v),(!y||4&t)&&_!==(_=e[2].profile.twitch.video+"")&&Object(r.set_data)(b,_),(!y||4&t)&&w!==(w=e[2].songBrowser.fields.duration+"")&&Object(r.set_data)(j,w),1&t){let n;for(k=e[0].videos,n=0;n<k.length;n+=1){const a=l(e,k,n);$[n]?($[n].p(a,t),Object(r.transition_in)($[n],1)):($[n]=f(a),$[n].c(),Object(r.transition_in)($[n],1),$[n].m(g,null))}for(Object(r.group_outros)(),n=k.length;n<$.length;n+=1)x(n);Object(r.check_outros)()}},i(e){if(!y){for(let e=0;e<k.length;e+=1)Object(r.transition_in)($[e]);Object(r.add_render_callback)(()=>{h||(h=Object(r.create_bidirectional_transition)(t,a.slide,{duration:500},!0)),h.run(1)}),y=!0}},o(e){$=$.filter(Boolean);for(let e=0;e<$.length;e+=1)Object(r.transition_out)($[e]);h||(h=Object(r.create_bidirectional_transition)(t,a.slide,{duration:500},!1)),h.run(0),y=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_each)($,e),e&&h&&h.end()}}}function f(e){let t,n,a,o,c,i,l,d,u,b,p,f,O,j=e[4].title+"",m=e[4].duration+"";return a=new s.default({props:{date:e[4].created_at}}),{c(){t=Object(r.element)("tr"),n=Object(r.element)("td"),Object(r.create_component)(a.$$.fragment),o=Object(r.space)(),c=Object(r.element)("td"),i=Object(r.element)("a"),l=Object(r.text)(j),u=Object(r.space)(),b=Object(r.element)("td"),p=Object(r.text)(m),f=Object(r.space)(),Object(r.attr)(i,"href",d=e[4].url),Object(r.attr)(i,"target","_blank"),Object(r.attr)(i,"rel","noopener"),Object(r.attr)(b,"class","duration svelte-b4h0yq")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),Object(r.append)(t,o),Object(r.append)(t,c),Object(r.append)(c,i),Object(r.append)(i,l),Object(r.append)(t,u),Object(r.append)(t,b),Object(r.append)(b,p),Object(r.append)(t,f),O=!0},p(e,t){const n={};1&t&&(n.date=e[4].created_at),a.$set(n),(!O||1&t)&&j!==(j=e[4].title+"")&&Object(r.set_data)(l,j),(!O||1&t&&d!==(d=e[4].url))&&Object(r.attr)(i,"href",d),(!O||1&t)&&m!==(m=e[4].duration+"")&&Object(r.set_data)(p,m)},i(e){O||(Object(r.transition_in)(a.$$.fragment,e),O=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),O=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a)}}}function O(e){let t,n,a=e[0]&&d(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=d(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function j(e,t,n){let a;Object(r.component_subscribe)(e,o._,e=>n(2,a=e));let{playerTwitchProfile:c}=t,i=!1;return e.$$set=e=>{"playerTwitchProfile"in e&&n(0,c=e.playerTwitchProfile)},[c,i,a,()=>n(1,i=!i)]}class m extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-b4h0yq-style")||((t=Object(r.element)("style")).id="svelte-b4h0yq-style",t.textContent=".details.svelte-b4h0yq{cursor:pointer;margin-left:.25rem}table.svelte-b4h0yq{font-size:0.75em}th.date.svelte-b4h0yq{width:7em}th.duration.svelte-b4h0yq{width:6.1em}td.duration.svelte-b4h0yq{text-align:center}",Object(r.append)(document.head,t)),Object(r.init)(this,e,j,O,r.safe_not_equal,{playerTwitchProfile:0})}}t.default=m},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9),c=n(46),i=n(96),s=n(13),l=n(97),d=n(103),u=n(64),b=n(98),p=n(137);function f(e,t,n){const r=e.slice();return r[18]=t[n],r}function O(e){let t,n,a,o,c,i,s,l,d,u,b,f,O,g,h,y,v,_,w,k,$=e[5].profile.aside.whatToPlay+"";function x(t){e[8].call(null,t)}let S={values:e[2].switches};void 0!==e[3].type&&(S.value=e[3].type),f=new p.default({props:S}),r.binding_callbacks.push(()=>Object(r.bind)(f,"value",x));const P=[m,j],I=[];function C(e,t){return e[0].length?0:1}return y=C(e),v=I[y]=P[y](e),{c(){t=Object(r.element)("div"),n=Object(r.element)("header"),a=Object(r.element)("div"),o=Object(r.element)("i"),c=Object(r.space)(),i=Object(r.element)("a"),s=Object(r.text)($),l=Object(r.space)(),d=Object(r.element)("a"),d.innerHTML='<i class="fas fa-external-link-alt"></i>',u=Object(r.space)(),b=Object(r.element)("div"),Object(r.create_component)(f.$$.fragment),g=Object(r.space)(),h=Object(r.element)("div"),v.c(),Object(r.attr)(o,"class","fas fa-play-circle"),Object(r.attr)(i,"class","svelte-10bx1yt"),Object(r.attr)(d,"class","show-full svelte-10bx1yt"),Object(r.attr)(n,"class","svelte-10bx1yt"),Object(r.attr)(b,"class","switcher svelte-10bx1yt"),Object(r.attr)(t,"class","box has-shadow ranking svelte-10bx1yt")},m(p,O){Object(r.insert)(p,t,O),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(a,o),Object(r.append)(a,c),Object(r.append)(a,i),Object(r.append)(i,s),Object(r.append)(n,l),Object(r.append)(n,d),Object(r.append)(t,u),Object(r.append)(t,b),Object(r.mount_component)(f,b,null),Object(r.append)(t,g),Object(r.append)(t,h),I[y].m(h,null),_=!0,w||(k=[Object(r.listen)(i,"click",e[6]),Object(r.listen)(d,"click",e[6])],w=!0)},p(e,t){(!_||32&t)&&$!==($=e[5].profile.aside.whatToPlay+"")&&Object(r.set_data)(s,$);const n={};4&t&&(n.values=e[2].switches),!O&&8&t&&(O=!0,n.value=e[3].type,Object(r.add_flush_callback)(()=>O=!1)),f.$set(n);let a=y;y=C(e),y===a?I[y].p(e,t):(Object(r.group_outros)(),Object(r.transition_out)(I[a],1,1,()=>{I[a]=null}),Object(r.check_outros)(),v=I[y],v||(v=I[y]=P[y](e),v.c()),Object(r.transition_in)(v,1),v.m(h,null))},i(e){_||(Object(r.transition_in)(f.$$.fragment,e),Object(r.transition_in)(v),_=!0)},o(e){Object(r.transition_out)(f.$$.fragment,e),Object(r.transition_out)(v),_=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(f),I[y].d(),w=!1,Object(r.run_all)(k)}}}function j(e){let t,n,a=e[5].common.noData+"";return{c(){t=Object(r.element)("p"),n=Object(r.text)(a)},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){32&t&&a!==(a=e[5].common.noData+"")&&Object(r.set_data)(n,a)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function m(e){let t,n,a,o,c,i,s,l,d,u,p,O=[],j=new Map,m=e[5].profile.whatToPlay.algorithmBy+"",g=e[0].slice(e[1]*v,(e[1]+1)*v);const y=e=>e[18].leaderboardId;for(let t=0;t<g.length;t+=1){let n=f(e,g,t),r=y(n);j.set(r,O[t]=h(r,n))}function _(t){e[9].call(null,t)}let w={totalItems:e[0].length,itemsPerPage:v,itemsPerPageValues:null,mode:"simple"};return void 0!==e[1]&&(w.currentPage=e[1]),o=new b.default({props:w}),r.binding_callbacks.push(()=>Object(r.bind)(o,"currentPage",_)),{c(){t=Object(r.element)("table"),n=Object(r.element)("tbody");for(let e=0;e<O.length;e+=1)O[e].c();a=Object(r.space)(),Object(r.create_component)(o.$$.fragment),i=Object(r.space)(),s=Object(r.element)("small"),l=Object(r.text)(m),d=Object(r.space)(),u=Object(r.element)("a"),u.textContent="BaliBalo",Object(r.attr)(t,"class","sspl svelte-10bx1yt"),Object(r.attr)(u,"href","https://github.com/BaliBalo/ScoreSaber"),Object(r.attr)(u,"target","_blank"),Object(r.attr)(u,"rel","noopener"),Object(r.attr)(u,"class","svelte-10bx1yt"),Object(r.attr)(s,"class","balibalo svelte-10bx1yt")},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n);for(let e=0;e<O.length;e+=1)O[e].m(n,null);Object(r.insert)(e,a,c),Object(r.mount_component)(o,e,c),Object(r.insert)(e,i,c),Object(r.insert)(e,s,c),Object(r.append)(s,l),Object(r.append)(s,d),Object(r.append)(s,u),p=!0},p(e,t){if(3&t){const a=e[0].slice(e[1]*v,(e[1]+1)*v);Object(r.group_outros)(),O=Object(r.update_keyed_each)(O,t,y,1,e,a,j,n,r.outro_and_destroy_block,h,null,f),Object(r.check_outros)()}const a={};1&t&&(a.totalItems=e[0].length),!c&&2&t&&(c=!0,a.currentPage=e[1],Object(r.add_flush_callback)(()=>c=!1)),o.$set(a),(!p||32&t)&&m!==(m=e[5].profile.whatToPlay.algorithmBy+"")&&Object(r.set_data)(l,m)},i(e){if(!p){for(let e=0;e<g.length;e+=1)Object(r.transition_in)(O[e]);Object(r.transition_in)(o.$$.fragment,e),p=!0}},o(e){for(let e=0;e<O.length;e+=1)Object(r.transition_out)(O[e]);Object(r.transition_out)(o.$$.fragment,e),p=!1},d(e){e&&Object(r.detach)(t);for(let e=0;e<O.length;e+=1)O[e].d();e&&Object(r.detach)(a),Object(r.destroy_component)(o,e),e&&Object(r.detach)(i),e&&Object(r.detach)(s)}}}function g(e){let t,n,a,o,c,i,s,l,u,b,p,f,O,j=e[18].name+"",m=e[18].songAuthor+"",g=e[18].levelAuthor+"";return n=new d.default({props:{diff:e[18].diffInfo,useShortName:!0,reverseColors:!0}}),{c(){t=Object(r.element)("figure"),Object(r.create_component)(n.$$.fragment),a=Object(r.space)(),o=Object(r.element)("div"),c=Object(r.element)("span"),i=Object(r.text)(j),s=Object(r.space)(),l=Object(r.element)("div"),u=Object(r.text)(m),b=Object(r.space)(),p=Object(r.element)("small"),f=Object(r.text)(g),Object(r.attr)(c,"class","name"),Object(r.attr)(p,"class","svelte-10bx1yt"),Object(r.attr)(l,"class","author"),Object(r.attr)(o,"class","songinfo svelte-10bx1yt"),Object(r.attr)(t,"class","svelte-10bx1yt")},m(e,d){Object(r.insert)(e,t,d),Object(r.mount_component)(n,t,null),Object(r.append)(t,a),Object(r.append)(t,o),Object(r.append)(o,c),Object(r.append)(c,i),Object(r.append)(o,s),Object(r.append)(o,l),Object(r.append)(l,u),Object(r.append)(l,b),Object(r.append)(l,p),Object(r.append)(p,f),O=!0},p(e,t){const a={};3&t&&(a.diff=e[18].diffInfo),n.$set(a),(!O||3&t)&&j!==(j=e[18].name+"")&&Object(r.set_data)(i,j),(!O||3&t)&&m!==(m=e[18].songAuthor+"")&&Object(r.set_data)(u,m),(!O||3&t)&&g!==(g=e[18].levelAuthor+"")&&Object(r.set_data)(f,g)},i(e){O||(Object(r.transition_in)(n.$$.fragment,e),O=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),O=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function h(e,t){let n,a,o,c,i,s,d,b,p,f,O,j,m,h,y,v,_,w,k,$,x,S;return c=new l.default({props:{song:t[18],$$slots:{default:[g]},$$scope:{ctx:t}}}),f=new u.default({props:{value:t[18].estimatedAcc,prevValue:t[18].acc,suffix:"%",inline:!0}}),y=new u.default({props:{value:t[18].estimatedPp,prevValue:t[18].pp,suffix:"pp",inline:!0}}),$=new u.default({props:{value:t[18].ppDiff,prefix:"+",suffix:"pp",inline:!0}}),{key:e,first:null,c(){n=Object(r.element)("tr"),a=Object(r.element)("td"),o=Object(r.element)("div"),Object(r.create_component)(c.$$.fragment),i=Object(r.space)(),s=Object(r.element)("div"),d=Object(r.element)("div"),b=Object(r.element)("i"),p=Object(r.space)(),Object(r.create_component)(f.$$.fragment),O=Object(r.space)(),j=Object(r.element)("div"),m=Object(r.element)("i"),h=Object(r.space)(),Object(r.create_component)(y.$$.fragment),v=Object(r.space)(),_=Object(r.element)("div"),w=Object(r.element)("i"),k=Object(r.space)(),Object(r.create_component)($.$$.fragment),x=Object(r.space)(),Object(r.attr)(o,"class","song svelte-10bx1yt"),Object(r.attr)(b,"class","fa fa-crosshairs"),Object(r.attr)(m,"class","fa fa-table"),Object(r.attr)(w,"class","fa fa-chart-line"),Object(r.attr)(_,"class","ppDiff svelte-10bx1yt"),Object(r.attr)(s,"class","values svelte-10bx1yt"),Object(r.attr)(a,"class","svelte-10bx1yt"),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.append)(n,a),Object(r.append)(a,o),Object(r.mount_component)(c,o,null),Object(r.append)(a,i),Object(r.append)(a,s),Object(r.append)(s,d),Object(r.append)(d,b),Object(r.append)(d,p),Object(r.mount_component)(f,d,null),Object(r.append)(s,O),Object(r.append)(s,j),Object(r.append)(j,m),Object(r.append)(j,h),Object(r.mount_component)(y,j,null),Object(r.append)(s,v),Object(r.append)(s,_),Object(r.append)(_,w),Object(r.append)(_,k),Object(r.mount_component)($,_,null),Object(r.append)(n,x),S=!0},p(e,t){const n={};3&t&&(n.song=e[18]),2097155&t&&(n.$$scope={dirty:t,ctx:e}),c.$set(n);const r={};3&t&&(r.value=e[18].estimatedAcc),3&t&&(r.prevValue=e[18].acc),f.$set(r);const a={};3&t&&(a.value=e[18].estimatedPp),3&t&&(a.prevValue=e[18].pp),y.$set(a);const o={};3&t&&(o.value=e[18].ppDiff),$.$set(o)},i(e){S||(Object(r.transition_in)(c.$$.fragment,e),Object(r.transition_in)(f.$$.fragment,e),Object(r.transition_in)(y.$$.fragment,e),Object(r.transition_in)($.$$.fragment,e),S=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),Object(r.transition_out)(f.$$.fragment,e),Object(r.transition_out)(y.$$.fragment,e),Object(r.transition_out)($.$$.fragment,e),S=!1},d(e){e&&Object(r.detach)(n),Object(r.destroy_component)(c),Object(r.destroy_component)(f),Object(r.destroy_component)(y),Object(r.destroy_component)($)}}}function y(e){let t,n,a=e[4]&&e[0]&&O(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[4]&&e[0]?a?(a.p(e,n),17&n&&Object(r.transition_in)(a,1)):(a=O(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}let v=5;function _(e,t,n){let l;Object(r.component_subscribe)(e,o._,e=>n(5,l=e));const d=Object(a.createEventDispatcher)();let{playerScores:u=[]}=t,b={},p=null,f=null,O=null,j=0,m={switches:[{_key:"profile.whatToPlay.all",id:"all"},{_key:"profile.whatToPlay.notPlayed",id:"not-played"},{_key:"profile.whatToPlay.toImprove",id:"to-improve"}]},g={type:m.switches[0]},h=!0;async function y(){n(10,b=await Object(c.getRankedSongs)())}return Object(a.onMount)(async()=>{await y(),n(11,p=Object(i.default)());const e=s.default.on("rankeds-changed",async()=>await y());return n(4,h=!0),()=>{e()}}),e.$$set=e=>{"playerScores"in e&&n(7,u=e.playerScores)},e.$$.update=()=>{3216&e.$$.dirty&&async function(e,t,r){if(e&&h&&e.init(t,r)){const t=e.estimate();n(12,f=t.scores.filter(e=>!e.pp||e.pp<e.estimatedPp).map(e=>({leaderboardId:e.leaderboardId,hash:e.hash,diffInfo:e.diffInfo,name:e.name,songAuthor:e.songAuthor,levelAuthor:e.levelAuthor,stars:e.stars,estimatedAcc:e.estimatedAcc,estimatedPp:e.estimatedPp,acc:e.acc,pp:e.pp,ppDiff:e.ppDiff})).sort((e,t)=>t.ppDiff-e.ppDiff)),n(1,j=0)}}(p,u,b),4104&e.$$.dirty&&function(e,t){if(e&&t&&t.id){switch(t.id){case"not-played":n(0,O=e.filter(e=>!e.pp));break;case"to-improve":n(0,O=e.filter(e=>e.pp));break;case"all":default:n(0,O=e)}n(1,j=0)}}(f,g.type),32&e.$$.dirty&&(Object.keys(m).forEach(e=>{m[e].forEach(e=>{e._key&&(e.label=Object(o.trans)(e._key))})}),n(2,m={...m}),n(3,g={...g}))},[O,j,m,g,h,l,function(){d("show-full")},u,function(e){g.type=e,n(3,g)},function(e){j=e,n(1,j)}]}class w extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-10bx1yt-style")||((t=Object(r.element)("style")).id="svelte-10bx1yt-style",t.textContent=".box.svelte-10bx1yt.svelte-10bx1yt{padding:.5rem}header.svelte-10bx1yt.svelte-10bx1yt{display:flex;justify-content:space-between;font-size:1.1em;font-weight:500;margin-bottom:.5em}header.svelte-10bx1yt a.svelte-10bx1yt{color:inherit!important}.switcher.svelte-10bx1yt.svelte-10bx1yt{padding:.5em 0}table.svelte-10bx1yt.svelte-10bx1yt{width:100%;font-size:1em}table.svelte-10bx1yt tbody td.svelte-10bx1yt{padding:0.25em 0.25em;border-bottom:1px solid var(--dimmed)}.song.svelte-10bx1yt figure.svelte-10bx1yt{display:flex;justify-content:flex-start;align-items:center;margin:0;line-height:1.25}.song.svelte-10bx1yt .songinfo.svelte-10bx1yt{text-align:left;font-weight:500;margin-left:.5em}.song.svelte-10bx1yt .songinfo.svelte-10bx1yt{color:var(--alternate)}.song.svelte-10bx1yt .songinfo small.svelte-10bx1yt{font-size:0.75em;color:var(--ppColour)}.song figure .diff{padding:.25em}.values.svelte-10bx1yt.svelte-10bx1yt{display:flex;justify-content:space-around;align-items:center;margin-top:.15em}.values > div > span{font-weight:500}.values small.inline{margin-left:.2em}.values.svelte-10bx1yt .ppDiff.svelte-10bx1yt{color:var(--ppColour)}.balibalo.svelte-10bx1yt.svelte-10bx1yt{display:block;margin-top:1em;color:var(--dimmed);text-align:right}.balibalo.svelte-10bx1yt a.svelte-10bx1yt{color:inherit !important;text-decoration:underline}",Object(r.append)(document.head,t)),Object(r.init)(this,e,_,y,r.safe_not_equal,{playerScores:7})}}t.default=w},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(73);function c(e,t,n){const r=e.slice();return r[7]=t[n],r}function i(e){let t,n,a=e[1]&&e[1].length&&s(e);return{c(){t=Object(r.element)("div"),a&&a.c(),Object(r.attr)(t,"class","switch-types svelte-21ef13")},m(e,o){Object(r.insert)(e,t,o),a&&a.m(t,null),n=!0},p(e,n){e[1]&&e[1].length?a?(a.p(e,n),2&n&&Object(r.transition_in)(a,1)):(a=s(e),a.c(),Object(r.transition_in)(a,1),a.m(t,null)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){e&&Object(r.detach)(t),a&&a.d()}}}function s(e){let t,n,a=e[1],o=[];for(let t=0;t<a.length;t+=1)o[t]=l(c(e,a,t));const i=e=>Object(r.transition_out)(o[e],1,1,()=>{o[e]=null});return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=Object(r.empty)()},m(e,a){for(let t=0;t<o.length;t+=1)o[t].m(e,a);Object(r.insert)(e,t,a),n=!0},p(e,n){if(15&n){let s;for(a=e[1],s=0;s<a.length;s+=1){const i=c(e,a,s);o[s]?(o[s].p(i,n),Object(r.transition_in)(o[s],1)):(o[s]=l(i),o[s].c(),Object(r.transition_in)(o[s],1),o[s].m(t.parentNode,t))}for(Object(r.group_outros)(),s=a.length;s<o.length;s+=1)i(s);Object(r.check_outros)()}},i(e){if(!n){for(let e=0;e<a.length;e+=1)Object(r.transition_in)(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)Object(r.transition_out)(o[e]);n=!1},d(e){Object(r.destroy_each)(o,e),e&&Object(r.detach)(t)}}}function l(e){let t,n;return t=new o.default({props:{iconFa:e[2]===e[7]?"fas fa-spinner fa-spin":e[7].icon,label:e[7].label,type:e[7]===e[0]?"primary":"default",notSelected:e[7]!==e[0]}}),t.$on("click",(function(...t){return e[5](e[7],...t)})),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(n,r){e=n;const a={};6&r&&(a.iconFa=e[2]===e[7]?"fas fa-spinner fa-spin":e[7].icon),2&r&&(a.label=e[7].label),3&r&&(a.type=e[7]===e[0]?"primary":"default"),3&r&&(a.notSelected=e[7]!==e[0]),t.$set(a)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function d(e){let t,n,a=e[1]&&(e[1].length>1||1===e[1].length&&e[1][0]!==e[0])&&i(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[1]&&(e[1].length>1||1===e[1].length&&e[1][0]!==e[0])?a?(a.p(e,n),3&n&&Object(r.transition_in)(a,1)):(a=i(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function u(e,t,n){const r=Object(a.createEventDispatcher)();let{values:o}=t,{value:c=(o&&o.length?o:null)}=t,{beforeChanged:i}=t,s=null;async function l(e){if(i){n(2,s=e);const t=await i(e);if(n(2,s=null),!t)return}n(0,c=e),r("change",e)}return e.$$set=e=>{"values"in e&&n(1,o=e.values),"value"in e&&n(0,c=e.value),"beforeChanged"in e&&n(4,i=e.beforeChanged)},[c,o,s,l,i,e=>l(e)]}class b extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-21ef13-style")||((t=Object(r.element)("style")).id="svelte-21ef13-style",t.textContent=".switch-types.svelte-21ef13{display:flex;justify-content:center;align-items:center;font-size:.75rem;text-align:center}.switch-types button{font-weight:500;margin-right:.125rem !important}",Object(r.append)(document.head,t)),Object(r.init)(this,e,u,d,r.safe_not_equal,{values:1,value:0,beforeChanged:4})}}t.default=b},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(9),o=n(139),c=n(141),i=n(73),s=n(65),l=n(67),d=n(70),u=n(15),b=n(79),p=n(142);const{document:f}=r.globals;function O(e){let t,n,a,u,f,O,j,g,h,y,v,_,w,k,$,x,S,P,I,C,T,A,q,R,z,E,B,D,L,N,F,M,U,V,H,W,Z,K,X,J,Q,Y,G,ee,te,ne,re=e[7].dashboard.rankingHeader+"",ae=e[7].dashboard.lastScores+"",oe=e[7].dashboard.bestScores+"";function ce(t){e[10].call(null,t)}let ie={country:e[0]};function se(t){e[11].call(null,t)}void 0!==e[3]&&(ie.value=e[3]),a=new b.default({props:ie}),r.binding_callbacks.push(()=>Object(r.bind)(a,"value",ce)),k=new i.default({props:{iconFa:"fas fa-exchange-alt",label:e[7].dashboard.showOriginal,type:"primary"}}),k.$on("click",m),x=new o.default({props:{country:e[0],overridePlayersPp:e[1],itemsPerPage:20,filterFunc:e[9],refreshTag:e[2]}}),P=new p.default({}),D=new d.default({});let le={items:e[4].lastSongsPeriods,right:!0};function de(t){e[12].call(null,t)}void 0!==e[5].selectedSongPeriod&&(le.value=e[5].selectedSongPeriod),F=new l.default({props:le}),r.binding_callbacks.push(()=>Object(r.bind)(F,"value",se)),V=new c.default({props:{country:e[0],sortBy:"timeset",filterFunc:e[8],refreshTag:e[2],leaderboardType:e[3],min:new Date(Date.now()-1e3*e[5].selectedSongPeriod.value*60*60*24),itemsPerPage:5,pagesDisplayMax:7,noRank:!0}});let ue={min:.1,max:700,step:1,suffix:"pp",inline:!0};return void 0!==e[6]&&(ue.value=e[6]),Y=new s.default({props:ue}),r.binding_callbacks.push(()=>Object(r.bind)(Y,"value",de)),te=new c.default({props:{country:e[0],sortBy:"pp",filterFunc:e[8],min:e[6],itemsPerPage:5,pagesDisplayMax:7,refreshTag:e[2],leaderboardType:e[3]}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),Object(r.create_component)(a.$$.fragment),f=Object(r.space)(),O=Object(r.element)("div"),j=Object(r.element)("div"),g=Object(r.element)("div"),h=Object(r.element)("header"),y=Object(r.element)("h2"),v=Object(r.text)(re),_=Object(r.space)(),w=Object(r.element)("nav"),Object(r.create_component)(k.$$.fragment),$=Object(r.space)(),Object(r.create_component)(x.$$.fragment),S=Object(r.space)(),Object(r.create_component)(P.$$.fragment),I=Object(r.space)(),C=Object(r.element)("div"),T=Object(r.element)("div"),A=Object(r.element)("header"),q=Object(r.element)("h2"),R=Object(r.element)("div"),z=Object(r.text)(ae),E=Object(r.space)(),B=Object(r.element)("div"),Object(r.create_component)(D.$$.fragment),L=Object(r.space)(),N=Object(r.element)("nav"),Object(r.create_component)(F.$$.fragment),U=Object(r.space)(),Object(r.create_component)(V.$$.fragment),H=Object(r.space)(),W=Object(r.element)("div"),Z=Object(r.element)("header"),K=Object(r.element)("h2"),X=Object(r.text)(oe),J=Object(r.space)(),Q=Object(r.element)("nav"),Object(r.create_component)(Y.$$.fragment),ee=Object(r.space)(),Object(r.create_component)(te.$$.fragment),Object(r.attr)(n,"class","filters svelte-cvipah"),Object(r.attr)(y,"class","title is-5 svelte-cvipah"),Object(r.attr)(w,"class","svelte-cvipah"),Object(r.attr)(h,"class","svelte-cvipah"),Object(r.attr)(g,"class","ranking box has-shadow svelte-cvipah"),Object(r.attr)(j,"class","leaderboard content column is-full-tablet is-half-widescreen is-two-fifths-fullhd"),Object(r.attr)(R,"class","title is-5 svelte-cvipah"),Object(r.attr)(B,"class","refresh svelte-cvipah"),Object(r.attr)(q,"class","svelte-cvipah"),Object(r.attr)(N,"class","svelte-cvipah"),Object(r.attr)(A,"class","svelte-cvipah"),Object(r.attr)(T,"class","box has-shadow svelte-cvipah"),Object(r.attr)(K,"class","title is-5 svelte-cvipah"),Object(r.attr)(Q,"class","svelte-cvipah"),Object(r.attr)(Z,"class","svelte-cvipah"),Object(r.attr)(W,"class","box has-shadow svelte-cvipah"),Object(r.attr)(C,"class","scores content column is-full-tablet is-half-widescreen is-three-fifths-fullhd"),Object(r.attr)(O,"class","columns is-multiline"),Object(r.attr)(t,"class","sspl-page-container")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.mount_component)(a,n,null),Object(r.append)(t,f),Object(r.append)(t,O),Object(r.append)(O,j),Object(r.append)(j,g),Object(r.append)(g,h),Object(r.append)(h,y),Object(r.append)(y,v),Object(r.append)(h,_),Object(r.append)(h,w),Object(r.mount_component)(k,w,null),Object(r.append)(g,$),Object(r.mount_component)(x,g,null),Object(r.append)(j,S),Object(r.mount_component)(P,j,null),Object(r.append)(O,I),Object(r.append)(O,C),Object(r.append)(C,T),Object(r.append)(T,A),Object(r.append)(A,q),Object(r.append)(q,R),Object(r.append)(R,z),Object(r.append)(q,E),Object(r.append)(q,B),Object(r.mount_component)(D,B,null),Object(r.append)(A,L),Object(r.append)(A,N),Object(r.mount_component)(F,N,null),Object(r.append)(T,U),Object(r.mount_component)(V,T,null),Object(r.append)(C,H),Object(r.append)(C,W),Object(r.append)(W,Z),Object(r.append)(Z,K),Object(r.append)(K,X),Object(r.append)(Z,J),Object(r.append)(Z,Q),Object(r.mount_component)(Y,Q,null),Object(r.append)(W,ee),Object(r.mount_component)(te,W,null),ne=!0},p(e,t){const n={};1&t&&(n.country=e[0]),!u&&8&t&&(u=!0,n.value=e[3],Object(r.add_flush_callback)(()=>u=!1)),a.$set(n),(!ne||128&t)&&re!==(re=e[7].dashboard.rankingHeader+"")&&Object(r.set_data)(v,re);const o={};128&t&&(o.label=e[7].dashboard.showOriginal),k.$set(o);const c={};1&t&&(c.country=e[0]),2&t&&(c.overridePlayersPp=e[1]),4&t&&(c.refreshTag=e[2]),x.$set(c),(!ne||128&t)&&ae!==(ae=e[7].dashboard.lastScores+"")&&Object(r.set_data)(z,ae);const i={};16&t&&(i.items=e[4].lastSongsPeriods),!M&&32&t&&(M=!0,i.value=e[5].selectedSongPeriod,Object(r.add_flush_callback)(()=>M=!1)),F.$set(i);const s={};1&t&&(s.country=e[0]),4&t&&(s.refreshTag=e[2]),8&t&&(s.leaderboardType=e[3]),32&t&&(s.min=new Date(Date.now()-1e3*e[5].selectedSongPeriod.value*60*60*24)),V.$set(s),(!ne||128&t)&&oe!==(oe=e[7].dashboard.bestScores+"")&&Object(r.set_data)(X,oe);const l={};!G&&64&t&&(G=!0,l.value=e[6],Object(r.add_flush_callback)(()=>G=!1)),Y.$set(l);const d={};1&t&&(d.country=e[0]),64&t&&(d.min=e[6]),4&t&&(d.refreshTag=e[2]),8&t&&(d.leaderboardType=e[3]),te.$set(d)},i(e){ne||(Object(r.transition_in)(a.$$.fragment,e),Object(r.transition_in)(k.$$.fragment,e),Object(r.transition_in)(x.$$.fragment,e),Object(r.transition_in)(P.$$.fragment,e),Object(r.transition_in)(D.$$.fragment,e),Object(r.transition_in)(F.$$.fragment,e),Object(r.transition_in)(V.$$.fragment,e),Object(r.transition_in)(Y.$$.fragment,e),Object(r.transition_in)(te.$$.fragment,e),ne=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),Object(r.transition_out)(k.$$.fragment,e),Object(r.transition_out)(x.$$.fragment,e),Object(r.transition_out)(P.$$.fragment,e),Object(r.transition_out)(D.$$.fragment,e),Object(r.transition_out)(F.$$.fragment,e),Object(r.transition_out)(V.$$.fragment,e),Object(r.transition_out)(Y.$$.fragment,e),Object(r.transition_out)(te.$$.fragment,e),ne=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(a),Object(r.destroy_component)(k),Object(r.destroy_component)(x),Object(r.destroy_component)(P),Object(r.destroy_component)(D),Object(r.destroy_component)(F),Object(r.destroy_component)(V),Object(r.destroy_component)(Y),Object(r.destroy_component)(te)}}}function j(e){let t,n,a=e[0]&&O(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=O(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function m(){const e=document.querySelector("body > .section > .container.original"),t=document.querySelector("body > .section > main");e&&t&&(t.style.display="none",e.style.display="block")}function g(e,t,n){let o;Object(r.component_subscribe)(e,a._,e=>n(7,o=e));let c,{country:i}=t,{overridePlayersPp:s={}}=t,l=[],d=null,b={lastSongsPeriods:[{_key:"dashboard.periods.last3Days",value:3},{_key:"dashboard.periods.lastWeek",value:7},{_key:"dashboard.periods.last2Weeks",value:14},{_key:"dashboard.periods.lastMonth",value:30}]},p={selectedSongPeriod:b.lastSongsPeriods.find(e=>14===e.value)},f=300;return e.$$set=e=>{"country"in e&&n(0,i=e.country),"overridePlayersPp"in e&&n(1,s=e.overridePlayersPp)},e.$$.update=()=>{128&e.$$.dirty&&(Object.keys(b).forEach(e=>{b[e].forEach(e=>{e._key&&(e.label=Object(a.trans)(e._key))})}),n(4,b={...b}),n(5,p={...p})),8&e.$$.dirty&&async function(e){let t;switch(e){case"all":t=await Object(u.getAllActivePlayers)(i);break;case"manually_added":t=await Object(u.getFriends)(i,!0);break;case"country":default:t=await Object(u.getActiveCountryPlayers)(i,!0)}l=t?t.filter(e=>e.name).map(e=>e.id).filter(e=>e):[],n(2,d=c)}(c)},[i,s,d,c,b,p,f,o,function(e){return l&&l.includes(e.playerId)},function(e){return l&&l.includes(e.id)},function(e){c=e,n(3,c)},function(e){p.selectedSongPeriod=e,n(5,p)},function(e){f=e,n(6,f)}]}class h extends r.SvelteComponent{constructor(e){var t;super(),f.getElementById("svelte-cvipah-style")||((t=Object(r.element)("style")).id="svelte-cvipah-style",t.textContent=".filters.svelte-cvipah.svelte-cvipah.svelte-cvipah{display:flex;justify-content:flex-start;margin-bottom:.5rem;margin-top:2.5rem}.box.svelte-cvipah.svelte-cvipah.svelte-cvipah{min-height:12rem;overflow-x:hidden;padding:.75rem 1rem 1rem 1rem}.box.svelte-cvipah h2.svelte-cvipah.svelte-cvipah{margin-bottom:0}.box.svelte-cvipah h2.svelte-cvipah.svelte-cvipah{display:flex;align-items:center}.box.svelte-cvipah h2 .title.svelte-cvipah.svelte-cvipah{margin-bottom:0}.box.svelte-cvipah h2 .refresh.svelte-cvipah.svelte-cvipah{margin-left:1rem;margin-top:-.25em;font-size:1rem}header.svelte-cvipah.svelte-cvipah.svelte-cvipah{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}header.svelte-cvipah nav.svelte-cvipah.svelte-cvipah{max-width:15rem}.ranking.svelte-cvipah header.svelte-cvipah nav.svelte-cvipah{font-size:.8em!important}",Object(r.append)(f.head,t)),Object(r.init)(this,e,g,j,r.safe_not_equal,{country:0,overridePlayersPp:1})}}t.default=h},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(113),c=n(114),i=n(109),s=n(64),l=n(140),d=n(110),u=n(39),b=n(7),p=n(15),f=n(9),O=n(8),j=n(23);function m(e){let t,n;return t=new l.default({props:{header:e[2],rows:e[1],itemsPerPage:e[0],pagesDisplayMax:7,className:"ranking global sspl",$$slots:{default:[$],"body-col":[k,({key:e,rowIdx:t,row:n})=>({10:e,11:t,12:n}),({key:e,rowIdx:t,row:n})=>(e?1024:0)|(t?2048:0)|(n?4096:0)],"head-col":[g,({col:e})=>({13:e}),({col:e})=>e?8192:0]},$$scope:{ctx:e}}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};2&n&&(r.rows=e[1]),1&n&&(r.itemsPerPage=e[0]),31744&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function g(e){let t,n,a=e[13].label+"";return{c(){t=Object(r.element)("span"),n=Object(r.text)(a),Object(r.attr)(t,"slot","head-col")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){8192&t&&a!==(a=e[13].label+"")&&Object(r.set_data)(n,a)},d(e){e&&Object(r.detach)(t)}}}function h(e){let t,n;return t=new s.default({props:{value:e[12].change?e[12].change:0,zero:"0",digits:0,withSign:!0}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4096&n&&(r.value=e[12].change?e[12].change:0),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function y(e){let t,n;return t=new i.default({props:{pp:e[12].pp,zero:Object(O.formatNumber)(0),prevPp:e[12].prevPp,inline:!0}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4096&n&&(r.pp=e[12].pp),4096&n&&(r.prevPp=e[12].prevPp),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function v(e){let t,n;return t=new c.default({props:{user:e[12]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4096&n&&(r.user=e[12]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function _(e){let t,n;return t=new o.default({props:{rank:e[11]+1,url:"/global/"+encodeURIComponent(Math.ceil(e[12].rank/u.PLAYERS_PER_PAGE))}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};2048&n&&(r.rank=e[11]+1),4096&n&&(r.url="/global/"+encodeURIComponent(Math.ceil(e[12].rank/u.PLAYERS_PER_PAGE))),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function w(e){let t,n;return t=new d.default({props:{playerId:e[12].id}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4096&n&&(r.playerId=e[12].id),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function k(e){let t,n,a,o;const c=[w,_,v,y,h],i=[];function s(e,t){return"picture"===e[10]?0:"rank"===e[10]?1:"player"===e[10]?2:"pp"===e[10]?3:"weeklyDiff"===e[10]?4:-1}return~(n=s(e))&&(a=i[n]=c[n](e)),{c(){t=Object(r.element)("span"),a&&a.c(),Object(r.attr)(t,"slot","body-col")},m(e,a){Object(r.insert)(e,t,a),~n&&i[n].m(t,null),o=!0},p(e,o){let l=n;n=s(e),n===l?~n&&i[n].p(e,o):(a&&(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)()),~n?(a=i[n],a||(a=i[n]=c[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null)):a=null)},i(e){o||(Object(r.transition_in)(a),o=!0)},o(e){Object(r.transition_out)(a),o=!1},d(e){e&&Object(r.detach)(t),~n&&i[n].d()}}}function $(e){let t;return{c(){t=Object(r.space)()},m(e,n){Object(r.insert)(e,t,n)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t)}}}function x(e){let t,n,a=e[1]&&e[1].length&&m(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[1]&&e[1].length?a?(a.p(e,n),2&n&&Object(r.transition_in)(a,1)):(a=m(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function S(e,t,n){let{country:r}=t,{overridePlayersPp:o={}}=t,{itemsPerPage:c=25}=t,{filterFunc:i=null}=t,{refreshTag:s=null}=t,l=[];Object(a.onMount)(async()=>{n(7,l=await Object(p.getAllPlayersRanking)(r))});let d=[];const u=[{label:"",key:"picture",className:"picture"},{label:"#",key:"rank",className:"rank"},{label:Object(f.trans)("dashboard.ranking.header.player"),key:"player",className:"player"},{label:Object(f.trans)("dashboard.ranking.header.pp"),key:"pp",className:"pp"},{label:Object(f.trans)("dashboard.ranking.header.change"),key:"weeklyDiff",className:"diff"}];return e.$$set=e=>{"country"in e&&n(3,r=e.country),"overridePlayersPp"in e&&n(4,o=e.overridePlayersPp),"itemsPerPage"in e&&n(0,c=e.itemsPerPage),"filterFunc"in e&&n(5,i=e.filterFunc),"refreshTag"in e&&n(6,s=e.refreshTag)},e.$$.update=()=>{240&e.$$.dirty&&l&&s&&n(1,d=l.map(e=>{o[e.id]&&o[e.id].pp&&(e.pp=o[e.id].pp);const{weeklyDiff:t}=e;return{...e,change:t,weeklyDiff_className:"diff "+(t?t>0?"inc":"dec":"")}}).sort((e,t)=>t.pp-e.pp).filter(e=>!i||i(e)).map((e,t)=>({...e,name:Object(j.getPlayerName)(e.name,t)}))),240&e.$$.dirty&&async function(){const e=Object(b.toSSTimestamp)(Object(b.daysAgo)(7)),t=Object(b.toSSTimestamp)(Object(b.daysAgo)(21)),r=(await Object(p.getAllPlayersHistory)(new Date(t),new Date(e))).reduce((e,t)=>(e[t.playerId]||(e[t.playerId]={}),e[t.playerId][t.timestamp.getTime()]=t,e),{});n(1,d=d.map(t=>{const n=r[t.id]?Object(b.getFirstNotNewerThan)(e,Object.keys(r[t.id])):null;return{...t,prevPp:n&&t.pp!==r[t.id][n].pp?r[t.id][n].pp:null}}))}()},[c,d,u,r,o,i,s]}class P extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1xd9al-style")||((t=Object(r.element)("style")).id="svelte-1xd9al-style",t.textContent=".sspl .picture{padding:.5rem 0;width:1.5rem}",Object(r.append)(document.head,t)),Object(r.init)(this,e,S,x,r.safe_not_equal,{country:3,overridePlayersPp:4,itemsPerPage:0,filterFunc:5,refreshTag:6})}}t.default=P},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(6),c=n(13),i=n(98),s=n(73),l=n(36),d=n(9);const u=e=>({}),b=e=>({}),p=e=>({col:256&e[0]}),f=e=>({col:e[38]});function O(e,t,n){const r=e.slice();return r[38]=t[n],r}const j=e=>({}),m=e=>({}),g=e=>({rowIdx:1027&e[0],row:1024&e[0]}),h=e=>({rowIdx:e[43]+e[0]*e[1],row:e[41]}),y=e=>({key:128&e[0],rowIdx:1027&e[0],colIdx:128&e[0],row:1024&e[0],col:1152&e[0],head:128&e[0]}),v=e=>({key:e[44].key,rowIdx:e[43]+e[0]*e[1],colIdx:e[46],row:e[41],col:void 0!==e[41][e[44].key]?e[41][e[44].key]:null,head:e[44]});function _(e,t,n){const r=e.slice();return r[44]=t[n],r[46]=n,r}function w(e,t,n){const r=e.slice();return r[41]=t[n],r[43]=n,r}const k=e=>({}),$=e=>({}),x=e=>({col:128&e[0]}),S=e=>({col:e[38]});function P(e,t,n){const r=e.slice();return r[38]=t[n],r}const I=e=>({}),C=e=>({});function T(e){return{c:r.noop,m:r.noop,p:r.noop,i:r.noop,o:r.noop,d:r.noop}}function A(e){let t,n,a,o;const c=[R,q],i=[];function s(e,t){return e[10].length?0:1}return t=s(e),n=i[t]=c[t](e),{c(){n.c(),a=Object(r.empty)()},m(e,n){i[t].m(e,n),Object(r.insert)(e,a,n),o=!0},p(e,o){let l=t;t=s(e),t===l?i[t].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)(),n=i[t],n||(n=i[t]=c[t](e),n.c()),Object(r.transition_in)(n,1),n.m(a.parentNode,a))},i(e){o||(Object(r.transition_in)(n),o=!0)},o(e){Object(r.transition_out)(n),o=!1},d(e){i[t].d(e),e&&Object(r.detach)(a)}}}function q(e){let t;const n=e[24].empty,a=Object(r.create_slot)(n,e,e[23],b),o=a||function(e){let t;return{c(){t=Object(r.text)(e[13])},m(e,n){Object(r.insert)(e,t,n)},p(e,n){8192&n[0]&&Object(r.set_data)(t,e[13])},d(e){e&&Object(r.detach)(t)}}}(e);return{c(){o&&o.c()},m(e,n){o&&o.m(e,n),t=!0},p(e,t){a?a.p&&8388608&t[0]&&Object(r.update_slot)(a,n,e,e[23],t,u,b):o&&o.p&&8192&t[0]&&o.p(e,t)},i(e){t||(Object(r.transition_in)(o,e),t=!0)},o(e){Object(r.transition_out)(o,e),t=!1},d(e){o&&o.d(e)}}}function R(e){let t,n,a,o,c,i,s,l;const d=e[24].head,u=Object(r.create_slot)(d,e,e[23],C),b=u||function(e){let t,n,a=e[7]&&e[7].length&&null!==e[7][0].label&&z(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[7]&&e[7].length&&null!==e[7][0].label?a?(a.p(e,n),128&n[0]&&Object(r.transition_in)(a,1)):(a=z(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}(e),p=e[24].body,f=Object(r.create_slot)(p,e,e[23],$),O=f||function(e){let t,n,a=e[10]&&e[10].length&&D(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[10]&&e[10].length?a?(a.p(e,n),1024&n[0]&&Object(r.transition_in)(a,1)):(a=D(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}(e),g=e[24].foot,h=Object(r.create_slot)(g,e,e[23],m),y=h||function(e){let t,n,a=e[8]&&e[8].length&&U(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[8]&&e[8].length?a?(a.p(e,n),256&n[0]&&Object(r.transition_in)(a,1)):(a=U(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}(e);return{c(){t=Object(r.element)("table"),n=Object(r.element)("thead"),b&&b.c(),a=Object(r.space)(),o=Object(r.element)("tbody"),O&&O.c(),c=Object(r.space)(),i=Object(r.element)("tfoot"),y&&y.c(),Object(r.attr)(o,"class","svelte-1egyjib"),Object(r.attr)(t,"class",s=Object(r.null_to_empty)(e[5])+" svelte-1egyjib")},m(e,s){Object(r.insert)(e,t,s),Object(r.append)(t,n),b&&b.m(n,null),Object(r.append)(t,a),Object(r.append)(t,o),O&&O.m(o,null),Object(r.append)(t,c),Object(r.append)(t,i),y&&y.m(i,null),l=!0},p(e,n){u?u.p&&8388608&n[0]&&Object(r.update_slot)(u,d,e,e[23],n,I,C):b&&b.p&&8388800&n[0]&&b.p(e,n),f?f.p&&8388608&n[0]&&Object(r.update_slot)(f,p,e,e[23],n,k,$):O&&O.p&&8390339&n[0]&&O.p(e,n),h?h.p&&8388608&n[0]&&Object(r.update_slot)(h,g,e,e[23],n,j,m):y&&y.p&&8388864&n[0]&&y.p(e,n),(!l||32&n[0]&&s!==(s=Object(r.null_to_empty)(e[5])+" svelte-1egyjib"))&&Object(r.attr)(t,"class",s)},i(e){l||(Object(r.transition_in)(b,e),Object(r.transition_in)(O,e),Object(r.transition_in)(y,e),l=!0)},o(e){Object(r.transition_out)(b,e),Object(r.transition_out)(O,e),Object(r.transition_out)(y,e),l=!1},d(e){e&&Object(r.detach)(t),b&&b.d(e),O&&O.d(e),y&&y.d(e)}}}function z(e){let t,n,a,o=[],c=new Map,i=e[6]&&E(e),s=e[7];const l=e=>e[38];for(let t=0;t<s.length;t+=1){let n=P(e,s,t),r=l(n);c.set(r,o[t]=B(r,n))}return{c(){t=Object(r.element)("tr"),i&&i.c(),n=Object(r.space)();for(let e=0;e<o.length;e+=1)o[e].c()},m(e,c){Object(r.insert)(e,t,c),i&&i.m(t,null),Object(r.append)(t,n);for(let e=0;e<o.length;e+=1)o[e].m(t,null);a=!0},p(e,a){if(e[6]?i||(i=E(e),i.c(),i.m(t,n)):i&&(i.d(1),i=null),8388736&a[0]){const n=e[7];Object(r.group_outros)(),o=Object(r.update_keyed_each)(o,a,l,1,e,n,c,t,r.outro_and_destroy_block,B,null,P),Object(r.check_outros)()}},i(e){if(!a){for(let e=0;e<s.length;e+=1)Object(r.transition_in)(o[e]);a=!0}},o(e){for(let e=0;e<o.length;e+=1)Object(r.transition_out)(o[e]);a=!1},d(e){e&&Object(r.detach)(t),i&&i.d();for(let e=0;e<o.length;e+=1)o[e].d()}}}function E(e){let t;return{c(){t=Object(r.element)("th"),Object(r.attr)(t,"class","col--details-btn svelte-1egyjib")},m(e,n){Object(r.insert)(e,t,n)},d(e){e&&Object(r.detach)(t)}}}function B(e,t){let n,a,o,c;const i=t[24]["head-col"],s=Object(r.create_slot)(i,t,t[23],S),l=s||function(e){let t,n=e[38].label+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){128&a[0]&&n!==(n=e[38].label+"")&&Object(r.set_data)(t,n)},d(e){e&&Object(r.detach)(t)}}}(t);return{key:e,first:null,c(){n=Object(r.element)("th"),l&&l.c(),a=Object(r.space)(),Object(r.attr)(n,"class",o=Object(r.null_to_empty)(t[38].className?t[38].className:"")+" svelte-1egyjib"),this.first=n},m(e,t){Object(r.insert)(e,n,t),l&&l.m(n,null),Object(r.append)(n,a),c=!0},p(e,t){s?s.p&&8388736&t[0]&&Object(r.update_slot)(s,i,e,e[23],t,x,S):l&&l.p&&128&t[0]&&l.p(e,t),(!c||128&t[0]&&o!==(o=Object(r.null_to_empty)(e[38].className?e[38].className:"")+" svelte-1egyjib"))&&Object(r.attr)(n,"class",o)},i(e){c||(Object(r.transition_in)(l,e),c=!0)},o(e){Object(r.transition_out)(l,e),c=!1},d(e){e&&Object(r.detach)(n),l&&l.d(e)}}}function D(e){let t,n,a=[],o=new Map,c=e[10];const i=e=>e[41];for(let t=0;t<c.length;t+=1){let n=w(e,c,t),r=i(n);o.set(r,a[t]=M(r,n))}return{c(){for(let e=0;e<a.length;e+=1)a[e].c();t=Object(r.empty)()},m(e,o){for(let t=0;t<a.length;t+=1)a[t].m(e,o);Object(r.insert)(e,t,o),n=!0},p(e,n){if(8406723&n[0]){const c=e[10];Object(r.group_outros)(),a=Object(r.update_keyed_each)(a,n,i,1,e,c,o,t.parentNode,r.outro_and_destroy_block,M,t,w),Object(r.check_outros)()}},i(e){if(!n){for(let e=0;e<c.length;e+=1)Object(r.transition_in)(a[e]);n=!0}},o(e){for(let e=0;e<a.length;e+=1)Object(r.transition_out)(a[e]);n=!1},d(e){for(let t=0;t<a.length;t+=1)a[t].d(e);e&&Object(r.detach)(t)}}}function L(e){let t,n,a;return n=new s.default({props:{type:"text",iconFa:e[9].includes(e[43]+e[0]*e[1])?"fas fa-chevron-down":"fas fa-chevron-right"}}),n.$on("click",(function(...t){return e[25](e[43],...t)})),{c(){t=Object(r.element)("td"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","col--details-btn svelte-1egyjib")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(t,r){e=t;const a={};1539&r[0]&&(a.iconFa=e[9].includes(e[43]+e[0]*e[1])?"fas fa-chevron-down":"fas fa-chevron-right"),n.$set(a)},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function N(e,t){let n,a,o,c;const i=t[24]["body-col"],s=Object(r.create_slot)(i,t,t[23],v),l=s||function(e){let t,n=(e[41][e[44].key]?e[41][e[44].key]:"")+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){1152&a[0]&&n!==(n=(e[41][e[44].key]?e[41][e[44].key]:"")+"")&&Object(r.set_data)(t,n)},d(e){e&&Object(r.detach)(t)}}}(t);return{key:e,first:null,c(){n=Object(r.element)("td"),l&&l.c(),a=Object(r.space)(),Object(r.attr)(n,"class",o=Object(r.null_to_empty)(t[41][t[44].key+"_className"]?t[41][t[44].key+"_className"]:t[44].className?t[44].className:"")+" svelte-1egyjib"),this.first=n},m(e,t){Object(r.insert)(e,n,t),l&&l.m(n,null),Object(r.append)(n,a),c=!0},p(e,t){s?s.p&&8389763&t[0]&&Object(r.update_slot)(s,i,e,e[23],t,y,v):l&&l.p&&1152&t[0]&&l.p(e,t),(!c||1152&t[0]&&o!==(o=Object(r.null_to_empty)(e[41][e[44].key+"_className"]?e[41][e[44].key+"_className"]:e[44].className?e[44].className:"")+" svelte-1egyjib"))&&Object(r.attr)(n,"class",o)},i(e){c||(Object(r.transition_in)(l,e),c=!0)},o(e){Object(r.transition_out)(l,e),c=!1},d(e){e&&Object(r.detach)(n),l&&l.d(e)}}}function F(e){let t,n,a,o,c,i,s;const l=e[24].details,d=Object(r.create_slot)(l,e,e[23],h);function u(...t){return e[26](e[43],...t)}return{c(){t=Object(r.element)("tr"),n=Object(r.element)("td"),d&&d.c(),o=Object(r.space)(),Object(r.attr)(n,"class","col--details svelte-1egyjib"),Object(r.attr)(n,"colspan",a=e[7].length+1),Object(r.attr)(t,"class","row--details svelte-1egyjib")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n),d&&d.m(n,null),Object(r.append)(t,o),c=!0,i||(s=Object(r.listen)(t,"dblclick",u),i=!0)},p(t,o){e=t,d&&d.p&&8389635&o[0]&&Object(r.update_slot)(d,l,e,e[23],o,g,h),(!c||128&o[0]&&a!==(a=e[7].length+1))&&Object(r.attr)(n,"colspan",a)},i(e){c||(Object(r.transition_in)(d,e),c=!0)},o(e){Object(r.transition_out)(d,e),c=!1},d(e){e&&Object(r.detach)(t),d&&d.d(e),i=!1,s()}}}function M(e,t){let n,a,o,c,i,s=[],l=new Map,d=t[6]&&t[9].includes(t[43]+t[0]*t[1]),u=t[6]&&L(t),b=t[7];const p=e=>e[44];for(let e=0;e<b.length;e+=1){let n=_(t,b,e),r=p(n);l.set(r,s[e]=N(r,n))}let f=d&&F(t);return{key:e,first:null,c(){n=Object(r.element)("tr"),u&&u.c(),a=Object(r.space)();for(let e=0;e<s.length;e+=1)s[e].c();o=Object(r.space)(),f&&f.c(),c=Object(r.empty)(),this.first=n},m(e,t){Object(r.insert)(e,n,t),u&&u.m(n,null),Object(r.append)(n,a);for(let e=0;e<s.length;e+=1)s[e].m(n,null);Object(r.insert)(e,o,t),f&&f.m(e,t),Object(r.insert)(e,c,t),i=!0},p(e,t){if(e[6]?u?(u.p(e,t),64&t[0]&&Object(r.transition_in)(u,1)):(u=L(e),u.c(),Object(r.transition_in)(u,1),u.m(n,a)):u&&(Object(r.group_outros)(),Object(r.transition_out)(u,1,1,()=>{u=null}),Object(r.check_outros)()),8389763&t[0]){const a=e[7];Object(r.group_outros)(),s=Object(r.update_keyed_each)(s,t,p,1,e,a,l,n,r.outro_and_destroy_block,N,null,_),Object(r.check_outros)()}1603&t[0]&&(d=e[6]&&e[9].includes(e[43]+e[0]*e[1])),d?f?(f.p(e,t),1603&t[0]&&Object(r.transition_in)(f,1)):(f=F(e),f.c(),Object(r.transition_in)(f,1),f.m(c.parentNode,c)):f&&(Object(r.group_outros)(),Object(r.transition_out)(f,1,1,()=>{f=null}),Object(r.check_outros)())},i(e){if(!i){Object(r.transition_in)(u);for(let e=0;e<b.length;e+=1)Object(r.transition_in)(s[e]);Object(r.transition_in)(f),i=!0}},o(e){Object(r.transition_out)(u);for(let e=0;e<s.length;e+=1)Object(r.transition_out)(s[e]);Object(r.transition_out)(f),i=!1},d(e){e&&Object(r.detach)(n),u&&u.d();for(let e=0;e<s.length;e+=1)s[e].d();e&&Object(r.detach)(o),f&&f.d(e),e&&Object(r.detach)(c)}}}function U(e){let t,n,a=[],o=new Map,c=e[8];const i=e=>e[38];for(let t=0;t<c.length;t+=1){let n=O(e,c,t),r=i(n);o.set(r,a[t]=V(r,n))}return{c(){t=Object(r.element)("tr");for(let e=0;e<a.length;e+=1)a[e].c()},m(e,o){Object(r.insert)(e,t,o);for(let e=0;e<a.length;e+=1)a[e].m(t,null);n=!0},p(e,n){if(8388864&n[0]){const c=e[8];Object(r.group_outros)(),a=Object(r.update_keyed_each)(a,n,i,1,e,c,o,t,r.outro_and_destroy_block,V,null,O),Object(r.check_outros)()}},i(e){if(!n){for(let e=0;e<c.length;e+=1)Object(r.transition_in)(a[e]);n=!0}},o(e){for(let e=0;e<a.length;e+=1)Object(r.transition_out)(a[e]);n=!1},d(e){e&&Object(r.detach)(t);for(let e=0;e<a.length;e+=1)a[e].d()}}}function V(e,t){let n,a,o,c;const i=t[24]["foot-col"],s=Object(r.create_slot)(i,t,t[23],f),l=s||function(e){let t,n=e[38].label+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){256&a[0]&&n!==(n=e[38].label+"")&&Object(r.set_data)(t,n)},d(e){e&&Object(r.detach)(t)}}}(t);return{key:e,first:null,c(){n=Object(r.element)("th"),l&&l.c(),a=Object(r.space)(),Object(r.attr)(n,"class",o=Object(r.null_to_empty)(t[38].className?t[38].className:"")+" svelte-1egyjib"),this.first=n},m(e,t){Object(r.insert)(e,n,t),l&&l.m(n,null),Object(r.append)(n,a),c=!0},p(e,t){s?s.p&&8388864&t[0]&&Object(r.update_slot)(s,i,e,e[23],t,p,f):l&&l.p&&256&t[0]&&l.p(e,t),(!c||256&t[0]&&o!==(o=Object(r.null_to_empty)(e[38].className?e[38].className:"")+" svelte-1egyjib"))&&Object(r.attr)(n,"class",o)},i(e){c||(Object(r.transition_in)(l,e),c=!0)},o(e){Object(r.transition_out)(l,e),c=!1},d(e){e&&Object(r.detach)(n),l&&l.d(e)}}}function H(e){return{c:r.noop,m:r.noop,p:r.noop,i:r.noop,o:r.noop,d:r.noop}}function W(e){let t,n,a,o;function c(t){e[27].call(null,t)}function s(t){e[28].call(null,t)}let l={totalItems:e[12],itemsPerPageValues:e[4],displayMax:e[3]};return void 0!==e[0]&&(l.currentPage=e[0]),void 0!==e[1]&&(l.itemsPerPage=e[1]),t=new i.default({props:l}),r.binding_callbacks.push(()=>Object(r.bind)(t,"currentPage",c)),r.binding_callbacks.push(()=>Object(r.bind)(t,"itemsPerPage",s)),t.$on("page-changed",e[15]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,n){Object(r.mount_component)(t,e,n),o=!0},p(e,o){const c={};4096&o[0]&&(c.totalItems=e[12]),16&o[0]&&(c.itemsPerPageValues=e[4]),8&o[0]&&(c.displayMax=e[3]),!n&&1&o[0]&&(n=!0,c.currentPage=e[0],Object(r.add_flush_callback)(()=>n=!1)),!a&&2&o[0]&&(a=!0,c.itemsPerPage=e[1],Object(r.add_flush_callback)(()=>a=!1)),t.$set(c)},i(e){o||(Object(r.transition_in)(t.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),o=!1},d(e){Object(r.destroy_component)(t,e)}}}function Z(e){let t,n,a,o,c={ctx:e,current:null,token:null,hasCatch:!1,pending:H,then:A,catch:T,value:37,blocks:[,,,]};Object(r.handle_promise)(t=e[11],c);let i=e[2]&&e[12]>e[1]&&W(e);return{c(){c.block.c(),n=Object(r.space)(),i&&i.c(),a=Object(r.empty)()},m(e,t){c.block.m(e,c.anchor=t),c.mount=()=>n.parentNode,c.anchor=n,Object(r.insert)(e,n,t),i&&i.m(e,t),Object(r.insert)(e,a,t),o=!0},p(n,o){if(e=n,c.ctx=e,2048&o[0]&&t!==(t=e[11])&&Object(r.handle_promise)(t,c));else{const t=e.slice();t[37]=c.resolved,c.block.p(t,o)}e[2]&&e[12]>e[1]?i?(i.p(e,o),4102&o[0]&&Object(r.transition_in)(i,1)):(i=W(e),i.c(),Object(r.transition_in)(i,1),i.m(a.parentNode,a)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)())},i(e){o||(Object(r.transition_in)(c.block),Object(r.transition_in)(i),o=!0)},o(e){for(let e=0;e<3;e+=1){const t=c.blocks[e];Object(r.transition_out)(t)}Object(r.transition_out)(i),o=!1},d(e){c.block.d(e),c.token=null,c=null,e&&Object(r.detach)(n),i&&i.d(e),e&&Object(r.detach)(a)}}}function K(e,t,n){let i;Object(r.component_subscribe)(e,d._,e=>n(31,i=e));let{$$slots:s={},$$scope:u}=t,{header:b=[]}=t,{rows:p=[]}=t,{footer:f=[]}=t,{paged:O=!0}=t,{onDataPage:j=null}=t,{pagesDisplayMax:m}=t,{page:g=0}=t,{itemsPerPage:h=10}=t,{itemsPerPageValues:y=[5,10,15,20,25,50]}=t;y.length&&!y.find(e=>e===h)&&(h=y[0]);let v,_,{total:w=p.length}=t,{className:k}=t,{withDetails:$=!1}=t,{rowIdentifierFunc:x=null}=t,{refreshTag:S=null}=t,P="keep-view",I=null;const C=(e,t)=>e&&"object"==typeof e&&void 0!==e.label?e:{key:t,label:e};let T=[];function A(e){const t=e+g*h,r=T.includes(t);n(9,T=r?T.filter(e=>e!==t):[...T,t])}let q,R,z,E=[];async function B(){const e=await Object(l.getConfig)("others");P=e.viewUpdates?e.viewUpdates:"keep-view"}return Object(a.onMount)(async()=>(await B(),c.default.on("config-changed",B))),e.$$set=e=>{"header"in e&&n(16,b=e.header),"rows"in e&&n(17,p=e.rows),"footer"in e&&n(18,f=e.footer),"paged"in e&&n(2,O=e.paged),"onDataPage"in e&&n(19,j=e.onDataPage),"pagesDisplayMax"in e&&n(3,m=e.pagesDisplayMax),"page"in e&&n(0,g=e.page),"itemsPerPage"in e&&n(1,h=e.itemsPerPage),"itemsPerPageValues"in e&&n(4,y=e.itemsPerPageValues),"total"in e&&n(20,w=e.total),"className"in e&&n(5,k=e.className),"withDetails"in e&&n(6,$=e.withDetails),"rowIdentifierFunc"in e&&n(21,x=e.rowIdentifierFunc),"refreshTag"in e&&n(22,S=e.refreshTag),"$$scope"in e&&n(23,u=e.$$scope)},e.$$.update=()=>{196608&e.$$.dirty[0]&&(Array.isArray(b)&&b.length?n(7,v=b.map(C)):n(7,v=Array(p.length&&Array.isArray(p[0])?p[0].length:0).fill(null).map(C))),262144&e.$$.dirty[0]&&Array.isArray(f)&&f.length&&n(8,_=f.map(C)),4325379&e.$$.dirty[0]&&n(11,q=async function(e,t,r){if(n(10,E=e.slice(t*r,(t+1)*r)),!j)return E;let a=j(E,t,r);if(Object(o.isPromise)(a)){if(n(10,E=await a),Array.isArray(E))return E;a=E}return a&&a.enhancePromise&&"function"==typeof a.enhancePromise&&a.enhancePromise().then(e=>{e&&n(10,E=e)}),a&&a.data?n(10,E=a.data):n(10,E=a),E}(p,g,h)),131072&e.$$.dirty[0]&&n(12,R=p.length),1&e.$$.dirty[1]&&n(13,z=i.common.noData),131072&e.$$.dirty[0]&&async function(e){if(I&&x)switch(await q,P){case"keep-view":const t=e.findIndex(e=>x(e)<=I),r=t>=0?Math.floor(t/h):0;r!==g&&n(0,g=r);break;case"always":default:0!==g&&n(0,g=0)}}(p)},[g,h,O,m,y,k,$,v,_,T,E,q,R,z,A,function(){!function(){if(!x)return;const e=g*h;p&&p[e]&&(I=x(p[e]))}()},b,p,f,j,w,x,S,u,s,e=>A(e),e=>A(e),function(e){g=e,n(0,g)},function(e){h=e,n(1,h)}]}class X extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1egyjib-style")||((t=Object(r.element)("style")).id="svelte-1egyjib-style",t.textContent="tbody.svelte-1egyjib td.svelte-1egyjib{vertical-align:middle}.col--details.svelte-1egyjib.svelte-1egyjib{border-top-style:dotted;padding:0}.row--details.svelte-1egyjib.svelte-1egyjib:hover{background-color:inherit!important}.col--details-btn.svelte-1egyjib.svelte-1egyjib{width:2rem;padding-left:0;padding-right:.25rem}",Object(r.append)(document.head,t)),Object(r.init)(this,e,K,Z,r.safe_not_equal,{header:16,rows:17,footer:18,paged:2,onDataPage:19,pagesDisplayMax:3,page:0,itemsPerPage:1,itemsPerPageValues:4,total:20,className:5,withDetails:6,rowIdentifierFunc:21,refreshTag:22},[-1,-1])}}t.default=X},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(13),c=n(62),i=n(15),s=n(22),l=n(9),d=n(140),u=n(110),b=n(113),p=n(114),f=n(109),O=n(74),j=n(97),m=n(64),g=n(103),h=n(115),y=n(6);function v(e){let t,n,a=e[20].label+"";return{c(){t=Object(r.element)("span"),n=Object(r.text)(a),Object(r.attr)(t,"slot","head-col")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){1048576&t&&a!==(a=e[20].label+"")&&Object(r.set_data)(n,a)},d(e){e&&Object(r.detach)(t)}}}function _(e){let t,n;return t=new f.default({props:{pp:e[18].pp,zero:"-"}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};262144&n&&(r.pp=e[18].pp),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function w(e){let t,n;return t=new m.default({props:{value:e[18].acc,zero:"-",suffix:"%"}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};262144&n&&(r.value=e[18].acc),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function k(e){let t,n;return t=new O.default({props:{date:e[18].timeset}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};262144&n&&(r.date=e[18].timeset),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function $(e){let t,n,a,o,c;return n=new g.default({props:{diff:e[18].diffInfo,useShortName:!0,reverseColors:!0}}),o=new j.default({props:{song:e[18],$$slots:{default:[I]},$$scope:{ctx:e}}}),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),a=Object(r.space)(),Object(r.create_component)(o.$$.fragment),Object(r.attr)(t,"class","song-cont svelte-91yefg")},m(e,i){Object(r.insert)(e,t,i),Object(r.mount_component)(n,t,null),Object(r.append)(t,a),Object(r.mount_component)(o,t,null),c=!0},p(e,t){const r={};262144&t&&(r.diff=e[18].diffInfo),n.$set(r);const a={};262144&t&&(a.song=e[18]),2359296&t&&(a.$$scope={dirty:t,ctx:e}),o.$set(a)},i(e){c||(Object(r.transition_in)(n.$$.fragment,e),Object(r.transition_in)(o.$$.fragment,e),c=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),Object(r.transition_out)(o.$$.fragment,e),c=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),Object(r.destroy_component)(o)}}}function x(e){let t,n;return t=new p.default({props:{user:e[18].playerInfo}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};262144&n&&(r.user=e[18].playerInfo),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function S(e){let t,n;return t=new b.default({props:{rank:e[18].rank}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};262144&n&&(r.rank=e[18].rank),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function P(e){let t,n;return t=new u.default({props:{playerId:e[18].playerId}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};262144&n&&(r.playerId=e[18].playerId),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function I(e){let t,n,a,o,c,i,s,l,d,u,b=e[18].name+"",p=e[18].songAuthorName+"",f=e[18].levelAuthorName+"";return{c(){t=Object(r.element)("figure"),n=Object(r.element)("div"),a=Object(r.element)("span"),o=Object(r.text)(b),c=Object(r.space)(),i=Object(r.element)("div"),s=Object(r.text)(p),l=Object(r.space)(),d=Object(r.element)("small"),u=Object(r.text)(f),Object(r.attr)(a,"class","name"),Object(r.attr)(i,"class","author"),Object(r.attr)(n,"class","songinfo")},m(e,b){Object(r.insert)(e,t,b),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(a,o),Object(r.append)(n,c),Object(r.append)(n,i),Object(r.append)(i,s),Object(r.append)(i,l),Object(r.append)(i,d),Object(r.append)(d,u)},p(e,t){262144&t&&b!==(b=e[18].name+"")&&Object(r.set_data)(o,b),262144&t&&p!==(p=e[18].songAuthorName+"")&&Object(r.set_data)(s,p),262144&t&&f!==(f=e[18].levelAuthorName+"")&&Object(r.set_data)(u,f)},d(e){e&&Object(r.detach)(t)}}}function C(e){let t,n,a,o;const c=[P,S,x,$,k,w,_],i=[];function s(e,t){return"picture"===e[19]?0:"rank"===e[19]?1:"player"===e[19]?2:"song"===e[19]?3:"timeset"===e[19]?4:"acc"===e[19]?5:"pp"===e[19]?6:-1}return~(n=s(e))&&(a=i[n]=c[n](e)),{c(){t=Object(r.element)("span"),a&&a.c(),Object(r.attr)(t,"slot","body-col")},m(e,a){Object(r.insert)(e,t,a),~n&&i[n].m(t,null),o=!0},p(e,o){let l=n;n=s(e),n===l?~n&&i[n].p(e,o):(a&&(Object(r.group_outros)(),Object(r.transition_out)(i[l],1,1,()=>{i[l]=null}),Object(r.check_outros)()),~n?(a=i[n],a||(a=i[n]=c[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null)):a=null)},i(e){o||(Object(r.transition_in)(a),o=!0)},o(e){Object(r.transition_out)(a),o=!1},d(e){e&&Object(r.detach)(t),~n&&i[n].d()}}}function T(e){let t,n,a;return n=new h.default({props:{leaderboardId:e[18].leaderboardId,leaderboardType:e[4],country:e[0],tableOnly:!0,showDiff:!1,highlight:[e[18].playerId],bgLeft:"-1rem",bgWidth:"1rem"}}),{c(){t=Object(r.element)("span"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"slot","details")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(e,t){const r={};262144&t&&(r.leaderboardId=e[18].leaderboardId),16&t&&(r.leaderboardType=e[4]),1&t&&(r.country=e[0]),262144&t&&(r.highlight=[e[18].playerId]),n.$set(r)},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function A(e){let t,n;return{c(){t=Object(r.space)(),n=Object(r.space)()},m(e,a){Object(r.insert)(e,t,a),Object(r.insert)(e,n,a)},p:r.noop,i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n)}}}function q(e){let t,n,a;function o(t){e[14].call(null,t)}let c={header:e[7],rows:e[6],refreshTag:e[3],itemsPerPage:e[1],pagesDisplayMax:e[2],onDataPage:e[8],withDetails:!0,rowIdentifierFunc:e[9],className:"ranking global sspl",$$slots:{default:[A],details:[T,({row:e})=>({18:e}),({row:e})=>e?262144:0],"body-col":[C,({key:e,row:t})=>({19:e,18:t}),({key:e,row:t})=>(e?524288:0)|(t?262144:0)],"head-col":[v,({col:e})=>({20:e}),({col:e})=>e?1048576:0]},$$scope:{ctx:e}};return void 0!==e[5]&&(c.page=e[5]),t=new d.default({props:c}),r.binding_callbacks.push(()=>Object(r.bind)(t,"page",o)),{c(){Object(r.create_component)(t.$$.fragment)},m(e,n){Object(r.mount_component)(t,e,n),a=!0},p(e,[a]){const o={};64&a&&(o.rows=e[6]),8&a&&(o.refreshTag=e[3]),2&a&&(o.itemsPerPage=e[1]),4&a&&(o.pagesDisplayMax=e[2]),3932177&a&&(o.$$scope={dirty:a,ctx:e}),!n&&32&a&&(n=!0,o.page=e[5],Object(r.add_flush_callback)(()=>n=!1)),t.$set(o)},i(e){a||(Object(r.transition_in)(t.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),a=!1},d(e){Object(r.destroy_component)(t,e)}}}function R(e,t,n){let{country:r}=t,{sortBy:d="timeset"}=t,{min:u}=t,{noRank:b=!1}=t,{itemsPerPage:p=10}=t,{pagesDisplayMax:f=10}=t,{filterFunc:O=null}=t,{refreshTag:j=null}=t,{leaderboardType:m=null}=t,g=0,h=[];const v=[{label:"",key:"picture",className:"picture"},{label:"#",key:"rank",className:"rank"},{label:Object(l.trans)("dashboard.ranking.header.player"),key:"player",className:"player"},{label:Object(l.trans)("dashboard.ranking.header.song"),key:"song",className:"song"},{label:Object(l.trans)("dashboard.ranking.header.timeset"),key:"timeset",className:"timeset"},{label:Object(l.trans)("dashboard.ranking.header.acc"),key:"acc",className:"acc"},{label:Object(l.trans)("dashboard.ranking.header.pp"),key:"pp",className:"pp"}].filter(e=>!b||"rank"!==e.key);let _=[];async function w(){if(null===j)return;const e="timeset"===d?await Object(i.getAllScoresSince)(u||void 0):"pp"===d?await Object(i.getAllScoresWithPpOver)(u||void 0):await Object(i.getAllScoresSince)(),t=await Object(i.getAllActivePlayers)(r),a=t?Object(y.convertArrayToObjectByKey)(t,"id"):{},o=Object.keys(a);n(15,_=e.filter(e=>o.includes(e.playerId)).map(e=>{const t=a[e.playerId],{id:n,country:r,name:o}=t;return{...e,playerInfo:{id:n,country:r,name:o}}}))}return Object(a.onMount)(async()=>{const e=o.default.on("data-refreshed",async()=>await w()),t=o.default.on("player-scores-updated",Object(c.default)(async()=>await w(),2e3));return()=>{e(),t()}}),e.$$set=e=>{"country"in e&&n(0,r=e.country),"sortBy"in e&&n(10,d=e.sortBy),"min"in e&&n(11,u=e.min),"noRank"in e&&n(12,b=e.noRank),"itemsPerPage"in e&&n(1,p=e.itemsPerPage),"pagesDisplayMax"in e&&n(2,f=e.pagesDisplayMax),"filterFunc"in e&&n(13,O=e.filterFunc),"refreshTag"in e&&n(3,j=e.refreshTag),"leaderboardType"in e&&n(4,m=e.leaderboardType)},e.$$.update=()=>{40976&e.$$.dirty&&function(){if(!_||!_.length)return[];n(6,h=_.filter(e=>(null==u||e[d]&&e[d]>=u)&&(!O||O(e))).sort((e,t)=>t[d]-e[d]).map((e,t)=>({...e,rank:t+1})))}(),3081&e.$$.dirty&&w()},[r,p,f,j,m,g,h,v,async function(e,t){const n=[];for(const r in e)if(!e[r].acc)if(!e[r].maxScoreEx&&e[r].diffInfo)try{const a=await Object(s.getSongDiffInfo)(e[r].hash,e[r].diffInfo,e[r].leaderboardId,!0);a?(e[r].maxScoreEx=a.maxScore,e[r].acc=Object(s.getAccFromScore)(e[r])):n.push({promise:Object(s.getSongDiffInfo)(e[r].hash,e[r].diffInfo,e[r].leaderboardId,!1),song:e[r],page:t})}catch(e){}else e[r].acc=Object(s.getAccFromScore)(e[r]);return{data:e,enhancePromise:async()=>(n.length&&await Promise.allSettled(n.map(e=>e.promise)).then(e=>(e.forEach(async(e,t)=>{if("fulfilled"===e.status){const r=e.value,a=n[t].song;r&&(a.maxScoreEx=r.maxScore,a.acc=Object(s.getAccFromScore)(a))}}),e)),n.length&&n[0].page===g?e:null)}},e=>e[d]?e[d]:null,d,u,b,O,function(e){g=e,n(5,g)}]}class z extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-91yefg-style")||((t=Object(r.element)("style")).id="svelte-91yefg-style",t.textContent=".sspl tbody{padding-bottom:2rem;font-size:.95rem}.sspl th,.sspl td{padding:.5rem}.sspl .picture{padding:.5rem 0;width:1.5rem}.sspl thead th.rank{width:2rem}.sspl thead th.player{min-width:8.2rem;max-width:10rem}.sspl tbody td.player .player-name{font-size:inherit !important}.song-cont.svelte-91yefg{display:flex;align-items:center}.song-cont figure{margin-left:.5rem}.sspl td.song .songinfo{text-align:left;font-weight:500}.sspl td.song .songinfo{color:var(--alternate)}.sspl td.song .songinfo small{font-size:0.75em;color:var(--ppColour)}.sspl thead th.timeset{width:9.5rem}.sspl thead th,.sspl tbody td.acc,.sspl tbody td.pp{text-align:center}.sspl .pp{width:6rem}",Object(r.append)(document.head,t)),Object(r.init)(this,e,R,q,r.safe_not_equal,{country:0,sortBy:10,min:11,noRank:12,itemsPerPage:1,pagesDisplayMax:2,filterFunc:13,refreshTag:3,leaderboardType:4})}}t.default=z},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(9),o=n(13),c=n(73),i=n(82);function s(e){let t,n;return t=new i.default({props:{closeable:!1,width:"auto",height:"auto",$$slots:{default:[l]},$$scope:{ctx:e}}}),t.$on("close",e[5]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};66&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function l(e){let t,n,a,o,i,s,l,d,u,b,p,f=e[1].dashboard.removeCurrentCountryConfirmationTitle+"",O=e[1].dashboard.removeCurrentCountryConfirmationContent+"";return d=new c.default({props:{iconFa:"far fa-trash-alt",label:e[1].dashboard.removeCurrentCountry,type:"primary"}}),d.$on("click",e[2]),b=new c.default({props:{label:e[1].common.cancel}}),b.$on("click",e[3]),{c(){t=Object(r.element)("main"),n=Object(r.text)(f),a=Object(r.space)(),o=Object(r.element)("p"),i=Object(r.text)(O),s=Object(r.space)(),l=Object(r.element)("footer"),Object(r.create_component)(d.$$.fragment),u=Object(r.space)(),Object(r.create_component)(b.$$.fragment),Object(r.attr)(o,"class","svelte-140x8nj"),Object(r.attr)(t,"class","svelte-140x8nj"),Object(r.attr)(l,"class","svelte-140x8nj")},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o),Object(r.append)(o,i),Object(r.insert)(e,s,c),Object(r.insert)(e,l,c),Object(r.mount_component)(d,l,null),Object(r.append)(l,u),Object(r.mount_component)(b,l,null),p=!0},p(e,t){(!p||2&t)&&f!==(f=e[1].dashboard.removeCurrentCountryConfirmationTitle+"")&&Object(r.set_data)(n,f),(!p||2&t)&&O!==(O=e[1].dashboard.removeCurrentCountryConfirmationContent+"")&&Object(r.set_data)(i,O);const a={};2&t&&(a.label=e[1].dashboard.removeCurrentCountry),d.$set(a);const o={};2&t&&(o.label=e[1].common.cancel),b.$set(o)},i(e){p||(Object(r.transition_in)(d.$$.fragment,e),Object(r.transition_in)(b.$$.fragment,e),p=!0)},o(e){Object(r.transition_out)(d.$$.fragment,e),Object(r.transition_out)(b.$$.fragment,e),p=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(s),e&&Object(r.detach)(l),Object(r.destroy_component)(d),Object(r.destroy_component)(b)}}}function d(e){let t,n,a,o,i;n=new c.default({props:{iconFa:"far fa-trash-alt",label:e[1].dashboard.removeCurrentCountry,type:"text"}}),n.$on("click",e[4]);let l=e[0]&&s(e);return{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),a=Object(r.space)(),l&&l.c(),o=Object(r.empty)(),Object(r.attr)(t,"class","remove-button svelte-140x8nj")},m(e,c){Object(r.insert)(e,t,c),Object(r.mount_component)(n,t,null),Object(r.insert)(e,a,c),l&&l.m(e,c),Object(r.insert)(e,o,c),i=!0},p(e,[t]){const a={};2&t&&(a.label=e[1].dashboard.removeCurrentCountry),n.$set(a),e[0]?l?(l.p(e,t),1&t&&Object(r.transition_in)(l,1)):(l=s(e),l.c(),Object(r.transition_in)(l,1),l.m(o.parentNode,o)):l&&(Object(r.group_outros)(),Object(r.transition_out)(l,1,1,()=>{l=null}),Object(r.check_outros)())},i(e){i||(Object(r.transition_in)(n.$$.fragment,e),Object(r.transition_in)(l),i=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),Object(r.transition_out)(l),i=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n),e&&Object(r.detach)(a),l&&l.d(e),e&&Object(r.detach)(o)}}}function u(e,t,n){let c;Object(r.component_subscribe)(e,a._,e=>n(1,c=e));let i=!1;return[i,c,function(){o.default.publish("country-set",{country:null,persist:!0,reload:!0}),n(0,i=!1)},function(){n(0,i=!1)},()=>n(0,i=!0),()=>n(0,i=!1)]}class b extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-140x8nj-style")||((t=Object(r.element)("style")).id="svelte-140x8nj-style",t.textContent="'.ss-modal'{height:auto}main.svelte-140x8nj.svelte-140x8nj{margin-top:.5rem;font-size:1.25rem;color:var(--alternate)}main.svelte-140x8nj p.svelte-140x8nj{margin-top:1rem;font-size:1rem;color:var(--textColor)}footer.svelte-140x8nj.svelte-140x8nj{margin-top:2rem;display:flex;justify-content:flex-end}footer.svelte-140x8nj .button{margin-right:.25rem !important}.remove-button.svelte-140x8nj.svelte-140x8nj{font-size:.75em;text-align:right}",Object(r.append)(document.head,t)),Object(r.init)(this,e,u,d,r.safe_not_equal,{})}}t.default=b},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(35),c=n(15);function i(e,t,n){const r=e.slice();return r[1]=t[n],r}function s(e){let t,n,a,o,c=[],s=new Map,d=e[0];const u=e=>e[1].id;for(let t=0;t<d.length;t+=1){let n=i(e,d,t),r=u(n);s.set(r,c[t]=l(r,n))}return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),n.innerHTML='Friends\n        <i class="fa fa-caret-down svelte-iilayn"></i>',a=Object(r.space)(),o=Object(r.element)("div");for(let e=0;e<c.length;e+=1)c[e].c();Object(r.attr)(n,"class","svelte-iilayn"),Object(r.attr)(o,"class","dropdown-content svelte-iilayn"),Object(r.attr)(t,"class","dropdown svelte-iilayn")},m(e,i){Object(r.insert)(e,t,i),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,o);for(let e=0;e<c.length;e+=1)c[e].m(o,null)},p(e,t){if(1&t){const n=e[0];c=Object(r.update_keyed_each)(c,t,u,1,e,n,s,o,r.destroy_block,l,null,i)}},d(e){e&&Object(r.detach)(t);for(let e=0;e<c.length;e+=1)c[e].d()}}}function l(e,t){let n,a,o,c=t[1].name+"";return{key:e,first:null,c(){n=Object(r.element)("a"),a=Object(r.text)(c),Object(r.attr)(n,"href",o=t[1].url),Object(r.attr)(n,"class","svelte-iilayn"),this.first=n},m(e,t){Object(r.insert)(e,n,t),Object(r.append)(n,a)},p(e,t){1&t&&c!==(c=e[1].name+"")&&Object(r.set_data)(a,c),1&t&&o!==(o=e[1].url)&&Object(r.attr)(n,"href",o)},d(e){e&&Object(r.detach)(n)}}}function d(e){let t,n=e[0]&&s(e);return{c(){n&&n.c(),t=Object(r.empty)()},m(e,a){n&&n.m(e,a),Object(r.insert)(e,t,a)},p(e,[r]){e[0]?n?n.p(e,r):(n=s(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:r.noop,o:r.noop,d(e){n&&n.d(e),e&&Object(r.detach)(t)}}}function u(e,t,n){let r=null;return Object(a.onMount)(async()=>{const e=await Object(c.getFriends)(await Object(o.getActiveCountry)());n(0,r=e.map(e=>({id:e.id,name:e.name,url:e.url})).sort((e,t)=>e.name.localeCompare(t.name)))}),[r]}class b extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-iilayn-style")||((t=Object(r.element)("style")).id="svelte-iilayn-style",t.textContent=".dropdown.svelte-iilayn.svelte-iilayn{position:relative;display:inline-block}.dropdown-content.svelte-iilayn.svelte-iilayn{background-color:var(--background);display:none;position:absolute;min-width:160px;max-height:70vh;overflow-y:auto;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);z-index:1}.svelte-iilayn.svelte-iilayn::-webkit-scrollbar{width:10px}.svelte-iilayn.svelte-iilayn::-webkit-scrollbar-track{background-color:var(--background)}.svelte-iilayn.svelte-iilayn::-webkit-scrollbar-thumb{background:#888;border-radius:5px}.svelte-iilayn.svelte-iilayn::-webkit-scrollbar-thumb:hover{background:#555}.dropdown-content.svelte-iilayn a.svelte-iilayn{color:black;padding:12px 16px;text-decoration:none;display:block}.dropdown-content.svelte-iilayn a.svelte-iilayn:hover{background-color:var(--hover)}.dropdown.svelte-iilayn:hover .dropdown-content.svelte-iilayn{display:block}",Object(r.append)(document.head,t)),Object(r.init)(this,e,u,d,r.safe_not_equal,{})}}t.default=b},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(8),c=n(39),i=n(35);function s(e){let t;function n(e,t){return e[1]&&e[1].length?d:l}let a=n(e),o=a(e);return{c(){t=Object(r.element)("figure"),o.c(),Object(r.attr)(t,"class","flag")},m(e,n){Object(r.insert)(e,t,n),o.m(t,null)},p(e,r){a===(a=n(e))&&o?o.p(e,r):(o.d(1),o=a(e),o&&(o.c(),o.m(t,null)))},d(e){e&&Object(r.detach)(t),o.d()}}}function l(e){let t,n;return{c(){t=Object(r.element)("img"),t.src!==(n="/imports/images/flags/"+e[0]+".png")&&Object(r.attr)(t,"src",n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){1&a&&t.src!==(n="/imports/images/flags/"+e[0]+".png")&&Object(r.attr)(t,"src",n)},d(e){e&&Object(r.detach)(t)}}}function d(e){let t,n,a;return{c(){t=Object(r.element)("a"),n=Object(r.element)("img"),n.src!==(a="/imports/images/flags/"+e[0]+".png")&&Object(r.attr)(n,"src",a),Object(r.attr)(t,"href",e[1])},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,o){1&o&&n.src!==(a="/imports/images/flags/"+e[0]+".png")&&Object(r.attr)(n,"src",a),2&o&&Object(r.attr)(t,"href",e[1])},d(e){e&&Object(r.detach)(t)}}}function u(e){let t,n=e[0]&&e[0].length&&s(e);return{c(){n&&n.c(),t=Object(r.empty)()},m(e,a){n&&n.m(e,a),Object(r.insert)(e,t,a)},p(e,[r]){e[0]&&e[0].length?n?n.p(e,r):(n=s(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:r.noop,o:r.noop,d(e){n&&n.d(e),e&&Object(r.detach)(t)}}}function b(e,t,n){let{country:r}=t,{url:s}=t;return Object(a.onMount)(async()=>{r||n(0,r=await Object(i.getActiveCountry)()),!r||!r.length||s&&s.length||n(1,s=Object(o.substituteVars)(c.COUNTRY_URL,{page:1,country:r}))}),e.$$set=e=>{"country"in e&&n(0,r=e.country),"url"in e&&n(1,s=e.url)},[r,s]}class p extends r.SvelteComponent{constructor(e){super(),Object(r.init)(this,e,b,u,r.safe_not_equal,{country:0,url:1})}}t.default=p},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(13),c=n(9),i=n(35),s=n(73),l=n(82),d=n(70);function u(e){let t,n,a,o;t=new s.default({props:{iconFa:"far fa-flag",label:e[5].dashboard.setCurrentCountry,type:"text"}}),t.$on("click",e[8]);let c=e[1]&&b(e);return{c(){Object(r.create_component)(t.$$.fragment),n=Object(r.space)(),c&&c.c(),a=Object(r.empty)()},m(e,i){Object(r.mount_component)(t,e,i),Object(r.insert)(e,n,i),c&&c.m(e,i),Object(r.insert)(e,a,i),o=!0},p(e,n){const o={};32&n&&(o.label=e[5].dashboard.setCurrentCountry),t.$set(o),e[1]?c?(c.p(e,n),2&n&&Object(r.transition_in)(c,1)):(c=b(e),c.c(),Object(r.transition_in)(c,1),c.m(a.parentNode,a)):c&&(Object(r.group_outros)(),Object(r.transition_out)(c,1,1,()=>{c=null}),Object(r.check_outros)())},i(e){o||(Object(r.transition_in)(t.$$.fragment,e),Object(r.transition_in)(c),o=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),Object(r.transition_out)(c),o=!1},d(e){Object(r.destroy_component)(t,e),e&&Object(r.detach)(n),c&&c.d(e),e&&Object(r.detach)(a)}}}function b(e){let t,n;return t=new l.default({props:{closeable:!1,width:"auto",height:"auto",$$slots:{default:[g]},$$scope:{ctx:e}}}),t.$on("close",e[10]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4157&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function p(e){let t,n,a,o,c,i,s,l,u=e[5].dashboard.onboardingLine1+"",b=e[5].dashboard.onboardingLine2+"";return s=new d.default({props:{refreshLabel:"Start",showLastDownloaded:!1,forceShowProgress:!0,persistEachDl:!0}}),e[9](s),{c(){t=Object(r.element)("p"),n=Object(r.text)(u),a=Object(r.space)(),o=Object(r.element)("p"),c=Object(r.text)(b),i=Object(r.space)(),Object(r.create_component)(s.$$.fragment),Object(r.attr)(t,"class","svelte-kdopu9"),Object(r.attr)(o,"class","svelte-kdopu9")},m(e,d){Object(r.insert)(e,t,d),Object(r.append)(t,n),Object(r.insert)(e,a,d),Object(r.insert)(e,o,d),Object(r.append)(o,c),Object(r.insert)(e,i,d),Object(r.mount_component)(s,e,d),l=!0},p(e,t){(!l||32&t)&&u!==(u=e[5].dashboard.onboardingLine1+"")&&Object(r.set_data)(n,u),(!l||32&t)&&b!==(b=e[5].dashboard.onboardingLine2+"")&&Object(r.set_data)(c,b),s.$set({})},i(e){l||(Object(r.transition_in)(s.$$.fragment,e),l=!0)},o(e){Object(r.transition_out)(s.$$.fragment,e),l=!1},d(n){n&&Object(r.detach)(t),n&&Object(r.detach)(a),n&&Object(r.detach)(o),n&&Object(r.detach)(i),e[9](null),Object(r.destroy_component)(s,n)}}}function f(e){let t;function n(e,t){return e[4]?j:O}let a=n(e),o=a(e);return{c(){o.c(),t=Object(r.empty)()},m(e,n){o.m(e,n),Object(r.insert)(e,t,n)},p(e,r){a===(a=n(e))&&o?o.p(e,r):(o.d(1),o=a(e),o&&(o.c(),o.m(t.parentNode,t)))},i:r.noop,o:r.noop,d(e){o.d(e),e&&Object(r.detach)(t)}}}function O(e){let t,n=Object(c.trans)("dashboard.areYouSureSetCurrentCountry",{country:e[0]?e[0].toUpperCase():null})+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){1&a&&n!==(n=Object(c.trans)("dashboard.areYouSureSetCurrentCountry",{country:e[0]?e[0].toUpperCase():null})+"")&&Object(r.set_data)(t,n)},d(e){e&&Object(r.detach)(t)}}}function j(e){let t,n=Object(c.trans)("dashboard.areYouSureChangeCurrentCountry",{country:e[0]?e[0].toUpperCase():null,currentCountry:e[4].toUpperCase()})+"";return{c(){t=Object(r.text)(n)},m(e,n){Object(r.insert)(e,t,n)},p(e,a){17&a&&n!==(n=Object(c.trans)("dashboard.areYouSureChangeCurrentCountry",{country:e[0]?e[0].toUpperCase():null,currentCountry:e[4].toUpperCase()})+"")&&Object(r.set_data)(t,n)},d(e){e&&Object(r.detach)(t)}}}function m(e){let t,n;return t=new s.default({props:{iconFa:"far fa-flag",label:e[5].dashboard.setCurrentCountry,type:"primary"}}),t.$on("click",e[6]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};32&n&&(r.label=e[5].dashboard.setCurrentCountry),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function g(e){let t,n,a,o,c,i,l,d;const u=[f,p],b=[];function O(e,t){return e[2]?1:0}n=O(e),a=b[n]=u[n](e);let j=!e[2]&&m(e);return l=new s.default({props:{label:e[5].common.cancel}}),l.$on("click",e[7]),{c(){t=Object(r.element)("main"),a.c(),o=Object(r.space)(),c=Object(r.element)("footer"),j&&j.c(),i=Object(r.space)(),Object(r.create_component)(l.$$.fragment),Object(r.attr)(t,"class","svelte-kdopu9"),Object(r.attr)(c,"class","svelte-kdopu9")},m(e,a){Object(r.insert)(e,t,a),b[n].m(t,null),Object(r.insert)(e,o,a),Object(r.insert)(e,c,a),j&&j.m(c,null),Object(r.append)(c,i),Object(r.mount_component)(l,c,null),d=!0},p(e,o){let s=n;n=O(e),n===s?b[n].p(e,o):(Object(r.group_outros)(),Object(r.transition_out)(b[s],1,1,()=>{b[s]=null}),Object(r.check_outros)(),a=b[n],a||(a=b[n]=u[n](e),a.c()),Object(r.transition_in)(a,1),a.m(t,null)),e[2]?j&&(Object(r.group_outros)(),Object(r.transition_out)(j,1,1,()=>{j=null}),Object(r.check_outros)()):j?(j.p(e,o),4&o&&Object(r.transition_in)(j,1)):(j=m(e),j.c(),Object(r.transition_in)(j,1),j.m(c,i));const d={};32&o&&(d.label=e[5].common.cancel),l.$set(d)},i(e){d||(Object(r.transition_in)(a),Object(r.transition_in)(j),Object(r.transition_in)(l.$$.fragment,e),d=!0)},o(e){Object(r.transition_out)(a),Object(r.transition_out)(j),Object(r.transition_out)(l.$$.fragment,e),d=!1},d(e){e&&Object(r.detach)(t),b[n].d(),e&&Object(r.detach)(o),e&&Object(r.detach)(c),j&&j.d(),Object(r.destroy_component)(l)}}}function h(e){let t,n,a=e[0]&&u(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=u(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function y(e,t,n){let s;Object(r.component_subscribe)(e,c._,e=>n(5,s=e));let l,d,{country:u}=t,b=!1,p=!1,f=!1;return Object(a.onMount)(async()=>{n(4,d=await Object(i.getActiveCountry)()),o.default.on("start-data-refreshing",()=>{f=!1}),o.default.on("data-refreshed",()=>{f=!0,o.default.publish("reload-browser-cmd")})}),e.$$set=e=>{"country"in e&&n(0,u=e.country)},[u,b,p,l,d,s,function(){n(2,p=!0),f=!1,o.default.publish("dl-manager-pause-cmd"),o.default.publish("country-set",{country:u,persist:!0})},function(){l&&l.stopRefreshing(),n(1,b=!1),n(2,p=!1),f=!1,o.default.publish("country-set",{country:d,persist:!0}),o.default.publish("dl-manager-unpause-cmd")},()=>n(1,b=!0),function(e){r.binding_callbacks[e?"unshift":"push"](()=>{l=e,n(3,l)})},()=>n(1,b=!1)]}class v extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-kdopu9-style")||((t=Object(r.element)("style")).id="svelte-kdopu9-style",t.textContent="'.ss-modal'{height:auto}main.svelte-kdopu9.svelte-kdopu9{margin-top:.5rem;font-size:1.25rem;color:var(--alternate)}main.svelte-kdopu9 p.svelte-kdopu9{font-size:1rem}main.svelte-kdopu9 .refresh-widget .btn-cont{font-size:.75em}main.svelte-kdopu9 .refresh-widget progress + div{font-size:1rem}footer.svelte-kdopu9.svelte-kdopu9{margin-top:2rem;display:flex;justify-content:flex-end}footer.svelte-kdopu9 .button{margin-right:.25rem !important}",Object(r.append)(document.head,t)),Object(r.init)(this,e,y,h,r.safe_not_equal,{country:0})}}t.default=v},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(13),c=(n(9),n(73)),i=n(82);function s(e){let t,n;return t=new i.default({props:{closeable:!1,width:"auto",height:"auto",$$slots:{default:[u]},$$scope:{ctx:e}}}),t.$on("close",e[3]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};23&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function l(e){let t,n;return{c(){t=Object(r.element)("p"),n=Object(r.text)(e[1]),Object(r.attr)(t,"class","svelte-110r7rb")},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){2&t&&Object(r.set_data)(n,e[1])},d(e){e&&Object(r.detach)(t)}}}function d(e){let t,n;return t=new c.default({props:{label:e[2]}}),t.$on("click",e[3]),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};4&n&&(r.label=e[2]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function u(e){let t,n,a,o,c,i,s,u=e[1]&&e[1].length&&l(e),b=e[2]&&d(e);return{c(){t=Object(r.element)("main"),n=Object(r.element)("header"),a=Object(r.text)(e[0]),o=Object(r.space)(),u&&u.c(),c=Object(r.space)(),i=Object(r.element)("footer"),b&&b.c(),Object(r.attr)(n,"class","svelte-110r7rb"),Object(r.attr)(t,"class","svelte-110r7rb"),Object(r.attr)(i,"class","svelte-110r7rb")},m(e,l){Object(r.insert)(e,t,l),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(t,o),u&&u.m(t,null),Object(r.insert)(e,c,l),Object(r.insert)(e,i,l),b&&b.m(i,null),s=!0},p(e,n){(!s||1&n)&&Object(r.set_data)(a,e[0]),e[1]&&e[1].length?u?u.p(e,n):(u=l(e),u.c(),u.m(t,null)):u&&(u.d(1),u=null),e[2]?b?(b.p(e,n),4&n&&Object(r.transition_in)(b,1)):(b=d(e),b.c(),Object(r.transition_in)(b,1),b.m(i,null)):b&&(Object(r.group_outros)(),Object(r.transition_out)(b,1,1,()=>{b=null}),Object(r.check_outros)())},i(e){s||(Object(r.transition_in)(b),s=!0)},o(e){Object(r.transition_out)(b),s=!1},d(e){e&&Object(r.detach)(t),u&&u.d(),e&&Object(r.detach)(c),e&&Object(r.detach)(i),b&&b.d()}}}function b(e){let t,n,a=e[0]&&e[0].length&&s(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,[n]){e[0]&&e[0].length?a?(a.p(e,n),1&n&&Object(r.transition_in)(a,1)):(a=s(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function p(e,t,n){let{message:r}=t,{secondaryMessage:c}=t,{closeButtonLabel:i}=t;function s(){n(0,r=null),n(1,c=null),n(2,i=null)}return Object(a.onMount)(async()=>{o.default.on("show-global-message",({message:e,secondaryMessage:t,closeButtonLabel:a})=>{n(0,r=e),n(1,c=t),n(2,i=a)}),o.default.on("hide-global-message",()=>s())}),e.$$set=e=>{"message"in e&&n(0,r=e.message),"secondaryMessage"in e&&n(1,c=e.secondaryMessage),"closeButtonLabel"in e&&n(2,i=e.closeButtonLabel)},[r,c,i,s]}class f extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-110r7rb-style")||((t=Object(r.element)("style")).id="svelte-110r7rb-style",t.textContent="'.ss-modal'{height:auto}main.svelte-110r7rb.svelte-110r7rb{margin-top:.5rem;font-size:1.25rem;color:var(--textColor)}header.svelte-110r7rb.svelte-110r7rb{margin-bottom:1rem;color:var(--alternate)}main.svelte-110r7rb p.svelte-110r7rb{font-size:1rem}footer.svelte-110r7rb.svelte-110r7rb{margin-top:2rem;display:flex;justify-content:flex-end}footer.svelte-110r7rb .button{margin-right:.25rem !important}",Object(r.append)(document.head,t)),Object(r.init)(this,e,p,b,r.safe_not_equal,{message:0,secondaryMessage:1,closeButtonLabel:2})}}t.default=f},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(41),o=n(148),c=n(149),i=n(104);function s(e){let t,n,a;return n=new c.default({props:{data:e[5]}}),{c(){t=Object(r.element)("div"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","box has-shadow chart svelte-1e9s0qe")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(e,t){const r={};32&t&&(r.data=e[5]),n.$set(r)},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function l(e){let t,n,a,c,l,d,u,b,p,f,O,j;function m(t){e[10].call(null,t)}function g(t){e[11].call(null,t)}let h={type:e[3],startAtRank:e[2],bgWidth:"1.4rem",bgLeft:"-1.4rem",bgHeight:"1rem",bgTop:"-3.25rem"};void 0!==e[0]&&(h.leaderboardId=e[0]),void 0!==e[1]&&(h.leaderboardPage=e[1]),l=new i.default({props:h}),r.binding_callbacks.push(()=>Object(r.bind)(l,"leaderboardId",m)),r.binding_callbacks.push(()=>Object(r.bind)(l,"leaderboardPage",g)),l.$on("diff-change",e[8]),l.$on("browse",e[9]);const y=[{leaderboardId:e[0]},{difficulty:e[4]},{songInfo:e[7]},e[6]];let v={};for(let e=0;e<y.length;e+=1)v=Object(r.assign)(v,y[e]);f=new o.default({props:v});let _=e[5]&&e[5].length&&s(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),a=Object(r.element)("div"),c=Object(r.element)("div"),Object(r.create_component)(l.$$.fragment),b=Object(r.space)(),p=Object(r.element)("div"),Object(r.create_component)(f.$$.fragment),O=Object(r.space)(),_&&_.c(),Object(r.attr)(c,"class","box has-shadow"),Object(r.attr)(a,"class","column"),Object(r.attr)(p,"class","column is-one-third-desktop"),Object(r.attr)(n,"class","columns"),Object(r.attr)(t,"class","container")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(a,c),Object(r.mount_component)(l,c,null),Object(r.append)(n,b),Object(r.append)(n,p),Object(r.mount_component)(f,p,null),Object(r.append)(p,O),_&&_.m(p,null),j=!0},p(e,[t]){const n={};8&t&&(n.type=e[3]),4&t&&(n.startAtRank=e[2]),!d&&1&t&&(d=!0,n.leaderboardId=e[0],Object(r.add_flush_callback)(()=>d=!1)),!u&&2&t&&(u=!0,n.leaderboardPage=e[1],Object(r.add_flush_callback)(()=>u=!1)),l.$set(n);const a=209&t?Object(r.get_spread_update)(y,[1&t&&{leaderboardId:e[0]},16&t&&{difficulty:e[4]},128&t&&{songInfo:e[7]},64&t&&Object(r.get_spread_object)(e[6])]):{};f.$set(a),e[5]&&e[5].length?_?(_.p(e,t),32&t&&Object(r.transition_in)(_,1)):(_=s(e),_.c(),Object(r.transition_in)(_,1),_.m(p,null)):_&&(Object(r.group_outros)(),Object(r.transition_out)(_,1,1,()=>{_=null}),Object(r.check_outros)())},i(e){j||(Object(r.transition_in)(l.$$.fragment,e),Object(r.transition_in)(f.$$.fragment,e),Object(r.transition_in)(_),j=!0)},o(e){Object(r.transition_out)(l.$$.fragment,e),Object(r.transition_out)(f.$$.fragment,e),Object(r.transition_out)(_),j=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(l),Object(r.destroy_component)(f),_&&_.d()}}}function d(e,t,n){let{leaderboardId:r}=t,{startAtRank:o=1}=t,{leaderboardPage:c={}}=t,{type:i="live"}=t,s=null,l=null,d=null,u=null;function b(e){if(!e||!e.detail||!e.detail.leaderboardId)return;const t=new URL(Object(a.getSongLeaderboardUrl)(e.detail.leaderboardId,e.detail.page?e.detail.page+1:1));history.replaceState(null,"",t.toString())}return e.$$set=e=>{"leaderboardId"in e&&n(0,r=e.leaderboardId),"startAtRank"in e&&n(2,o=e.startAtRank),"leaderboardPage"in e&&n(1,c=e.leaderboardPage),"type"in e&&n(3,i=e.type)},e.$$.update=()=>{2&e.$$.dirty&&function(e){if(!e)return;const t=(t,n=null)=>e&&e[t]?e[t]:n,r=t("currentDiff");s!==r&&(n(4,s=r),n(5,l=t("diffChart")),n(6,d=t("song")),n(7,u=d?{metadata:d}:null))}(c)},[r,c,o,i,s,l,d,u,b,function(e){b(e)},function(e){r=e,n(0,r)},function(e){c=e,n(1,c)}]}class u extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-1e9s0qe-style")||((t=Object(r.element)("style")).id="svelte-1e9s0qe-style",t.textContent=".chart.svelte-1e9s0qe{margin-top:1.5rem}",Object(r.append)(document.head,t)),Object(r.init)(this,e,d,l,r.safe_not_equal,{leaderboardId:0,startAtRank:2,leaderboardPage:1,type:3})}}t.default=u},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(59),c=n(122),i=n(60),s=n(22),l=n(36),d=n(13),u=n(9),b=n(119),p=n(64),f=n(103),O=n(102),j=n(87);const m=e=>({}),g=e=>({});function h(e){let t,n,a,o,c,i,s,l,d,u,b,p,f,O,j,h,$,x,R,z,E,B,D,L,N,F=e[0].metadata.songName+"",M=(e[0].metadata.songSubName?e[0].metadata.songSubName:"")+"",U=e[0].metadata.songAuthorName+"",V=e[0].metadata.levelAuthorName+"",H=e[2]&&y(e),W=e[8]&&v(e),Z=e[7]&&_(e),K=e[0].seconds&&w(e);const X=e[35].main,J=Object(r.create_slot)(X,e,e[34],g),Q=J||function(e){let t,n,a,o,c,i,s,l,d=(e[9]||e[10])&&k(e),u=e[12]&&S(e),b=e[13]&&P(e),p=e[14]&&I(e),f=e[15]&&C(e),O=e[16]&&T(e),j=e[17]&&A(e);return{c(){d&&d.c(),t=Object(r.space)(),u&&u.c(),n=Object(r.space)(),b&&b.c(),a=Object(r.space)(),p&&p.c(),o=Object(r.space)(),f&&f.c(),c=Object(r.space)(),O&&O.c(),i=Object(r.space)(),j&&j.c(),s=Object(r.empty)()},m(e,m){d&&d.m(e,m),Object(r.insert)(e,t,m),u&&u.m(e,m),Object(r.insert)(e,n,m),b&&b.m(e,m),Object(r.insert)(e,a,m),p&&p.m(e,m),Object(r.insert)(e,o,m),f&&f.m(e,m),Object(r.insert)(e,c,m),O&&O.m(e,m),Object(r.insert)(e,i,m),j&&j.m(e,m),Object(r.insert)(e,s,m),l=!0},p(e,l){e[9]||e[10]?d?(d.p(e,l),1536&l[0]&&Object(r.transition_in)(d,1)):(d=k(e),d.c(),Object(r.transition_in)(d,1),d.m(t.parentNode,t)):d&&(Object(r.group_outros)(),Object(r.transition_out)(d,1,1,()=>{d=null}),Object(r.check_outros)()),e[12]?u?(u.p(e,l),4096&l[0]&&Object(r.transition_in)(u,1)):(u=S(e),u.c(),Object(r.transition_in)(u,1),u.m(n.parentNode,n)):u&&(Object(r.group_outros)(),Object(r.transition_out)(u,1,1,()=>{u=null}),Object(r.check_outros)()),e[13]?b?(b.p(e,l),8192&l[0]&&Object(r.transition_in)(b,1)):(b=P(e),b.c(),Object(r.transition_in)(b,1),b.m(a.parentNode,a)):b&&(Object(r.group_outros)(),Object(r.transition_out)(b,1,1,()=>{b=null}),Object(r.check_outros)()),e[14]?p?(p.p(e,l),16384&l[0]&&Object(r.transition_in)(p,1)):(p=I(e),p.c(),Object(r.transition_in)(p,1),p.m(o.parentNode,o)):p&&(Object(r.group_outros)(),Object(r.transition_out)(p,1,1,()=>{p=null}),Object(r.check_outros)()),e[15]?f?(f.p(e,l),32768&l[0]&&Object(r.transition_in)(f,1)):(f=C(e),f.c(),Object(r.transition_in)(f,1),f.m(c.parentNode,c)):f&&(Object(r.group_outros)(),Object(r.transition_out)(f,1,1,()=>{f=null}),Object(r.check_outros)()),e[16]?O?(O.p(e,l),65536&l[0]&&Object(r.transition_in)(O,1)):(O=T(e),O.c(),Object(r.transition_in)(O,1),O.m(i.parentNode,i)):O&&(Object(r.group_outros)(),Object(r.transition_out)(O,1,1,()=>{O=null}),Object(r.check_outros)()),e[17]?j?(j.p(e,l),131072&l[0]&&Object(r.transition_in)(j,1)):(j=A(e),j.c(),Object(r.transition_in)(j,1),j.m(s.parentNode,s)):j&&(Object(r.group_outros)(),Object(r.transition_out)(j,1,1,()=>{j=null}),Object(r.check_outros)())},i(e){l||(Object(r.transition_in)(d),Object(r.transition_in)(u),Object(r.transition_in)(b),Object(r.transition_in)(p),Object(r.transition_in)(f),Object(r.transition_in)(O),Object(r.transition_in)(j),l=!0)},o(e){Object(r.transition_out)(d),Object(r.transition_out)(u),Object(r.transition_out)(b),Object(r.transition_out)(p),Object(r.transition_out)(f),Object(r.transition_out)(O),Object(r.transition_out)(j),l=!1},d(e){d&&d.d(e),e&&Object(r.detach)(t),u&&u.d(e),e&&Object(r.detach)(n),b&&b.d(e),e&&Object(r.detach)(a),p&&p.d(e),e&&Object(r.detach)(o),f&&f.d(e),e&&Object(r.detach)(c),O&&O.d(e),e&&Object(r.detach)(i),j&&j.d(e),e&&Object(r.detach)(s)}}}(e);let Y=e[1]&&q(e);return{c(){t=Object(r.element)("div"),n=Object(r.element)("div"),a=Object(r.element)("div"),o=Object(r.element)("header"),c=Object(r.element)("h1"),i=Object(r.text)(F),s=Object(r.space)(),l=Object(r.text)(M),d=Object(r.space)(),u=Object(r.element)("h2"),b=Object(r.element)("span"),p=Object(r.text)(U),f=Object(r.space)(),O=Object(r.element)("small"),j=Object(r.text)(V),h=Object(r.space)(),$=Object(r.element)("h3"),H&&H.c(),x=Object(r.space)(),W&&W.c(),R=Object(r.space)(),Z&&Z.c(),z=Object(r.space)(),K&&K.c(),E=Object(r.space)(),B=Object(r.element)("main"),Q&&Q.c(),D=Object(r.space)(),L=Object(r.element)("footer"),Y&&Y.c(),Object(r.attr)(c,"class","title is-4 svelte-103w9s3"),Object(r.attr)(O,"class","svelte-103w9s3"),Object(r.attr)(u,"class","title is-5 svelte-103w9s3"),Object(r.attr)($,"class","title is-6 svelte-103w9s3"),Object(r.toggle_class)($,"unranked",e[2]&&"Ranked"!==e[2]),Object(r.attr)(o,"class","svelte-103w9s3"),Object(r.attr)(B,"class","svelte-103w9s3"),Object(r.attr)(L,"class","svelte-103w9s3"),Object(r.attr)(a,"class","song-card svelte-103w9s3"),Object(r.set_style)(a,"--background-image","url(/imports/images/songs/"+(e[5]&&e[1]&&e[1].length?e[1]:"")+".png)"),Object(r.set_style)(a,"--bgLeft",e[3]),Object(r.set_style)(a,"--bgTop",e[4]),Object(r.attr)(n,"class","box has-shadow svelte-103w9s3"),Object(r.attr)(t,"class","is-square svelte-103w9s3")},m(e,m){Object(r.insert)(e,t,m),Object(r.append)(t,n),Object(r.append)(n,a),Object(r.append)(a,o),Object(r.append)(o,c),Object(r.append)(c,i),Object(r.append)(c,s),Object(r.append)(c,l),Object(r.append)(o,d),Object(r.append)(o,u),Object(r.append)(u,b),Object(r.append)(b,p),Object(r.append)(u,f),Object(r.append)(u,O),Object(r.append)(O,j),Object(r.append)(o,h),Object(r.append)(o,$),H&&H.m($,null),Object(r.append)($,x),W&&W.m($,null),Object(r.append)($,R),Z&&Z.m($,null),Object(r.append)($,z),K&&K.m($,null),Object(r.append)(a,E),Object(r.append)(a,B),Q&&Q.m(B,null),Object(r.append)(a,D),Object(r.append)(a,L),Y&&Y.m(L,null),N=!0},p(e,t){(!N||1&t[0])&&F!==(F=e[0].metadata.songName+"")&&Object(r.set_data)(i,F),(!N||1&t[0])&&M!==(M=(e[0].metadata.songSubName?e[0].metadata.songSubName:"")+"")&&Object(r.set_data)(l,M),(!N||1&t[0])&&U!==(U=e[0].metadata.songAuthorName+"")&&Object(r.set_data)(p,U),(!N||1&t[0])&&V!==(V=e[0].metadata.levelAuthorName+"")&&Object(r.set_data)(j,V),e[2]?H?H.p(e,t):(H=y(e),H.c(),H.m($,x)):H&&(H.d(1),H=null),e[8]?W?(W.p(e,t),256&t[0]&&Object(r.transition_in)(W,1)):(W=v(e),W.c(),Object(r.transition_in)(W,1),W.m($,R)):W&&(Object(r.group_outros)(),Object(r.transition_out)(W,1,1,()=>{W=null}),Object(r.check_outros)()),e[7]?Z?(Z.p(e,t),128&t[0]&&Object(r.transition_in)(Z,1)):(Z=_(e),Z.c(),Object(r.transition_in)(Z,1),Z.m($,z)):Z&&(Object(r.group_outros)(),Object(r.transition_out)(Z,1,1,()=>{Z=null}),Object(r.check_outros)()),e[0].seconds?K?(K.p(e,t),1&t[0]&&Object(r.transition_in)(K,1)):(K=w(e),K.c(),Object(r.transition_in)(K,1),K.m($,null)):K&&(Object(r.group_outros)(),Object(r.transition_out)(K,1,1,()=>{K=null}),Object(r.check_outros)()),4&t[0]&&Object(r.toggle_class)($,"unranked",e[2]&&"Ranked"!==e[2]),J?J.p&&8&t[1]&&Object(r.update_slot)(J,X,e,e[34],t,m,g):Q&&Q.p&&261632&t[0]&&Q.p(e,t),e[1]?Y?(Y.p(e,t),2&t[0]&&Object(r.transition_in)(Y,1)):(Y=q(e),Y.c(),Object(r.transition_in)(Y,1),Y.m(L,null)):Y&&(Object(r.group_outros)(),Object(r.transition_out)(Y,1,1,()=>{Y=null}),Object(r.check_outros)()),(!N||34&t[0])&&Object(r.set_style)(a,"--background-image","url(/imports/images/songs/"+(e[5]&&e[1]&&e[1].length?e[1]:"")+".png)"),(!N||8&t[0])&&Object(r.set_style)(a,"--bgLeft",e[3]),(!N||16&t[0])&&Object(r.set_style)(a,"--bgTop",e[4])},i(e){N||(Object(r.transition_in)(W),Object(r.transition_in)(Z),Object(r.transition_in)(K),Object(r.transition_in)(Q,e),Object(r.transition_in)(Y),N=!0)},o(e){Object(r.transition_out)(W),Object(r.transition_out)(Z),Object(r.transition_out)(K),Object(r.transition_out)(Q,e),Object(r.transition_out)(Y),N=!1},d(e){e&&Object(r.detach)(t),H&&H.d(),W&&W.d(),Z&&Z.d(),K&&K.d(),Q&&Q.d(e),Y&&Y.d()}}}function y(e){let t,n;return{c(){t=Object(r.element)("span"),n=Object(r.text)(e[2])},m(e,a){Object(r.insert)(e,t,a),Object(r.append)(t,n)},p(e,t){4&t[0]&&Object(r.set_data)(n,e[2])},d(e){e&&Object(r.detach)(t)}}}function v(e){let t,n;return t=new p.default({props:{value:e[8],digits:2,zero:"",suffix:"★"}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};256&n[0]&&(r.value=e[8]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function _(e){let t,n,a;return n=new f.default({props:{diff:e[7],reverseColors:!0}}),{c(){t=Object(r.element)("span"),Object(r.create_component)(n.$$.fragment),Object(r.attr)(t,"class","diff svelte-103w9s3")},m(e,o){Object(r.insert)(e,t,o),Object(r.mount_component)(n,t,null),a=!0},p(e,t){const r={};128&t[0]&&(r.diff=e[7]),n.$set(r)},i(e){a||(Object(r.transition_in)(n.$$.fragment,e),a=!0)},o(e){Object(r.transition_out)(n.$$.fragment,e),a=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(n)}}}function w(e){let t,n,a,c,i,s;return c=new O.default({props:{value:e[0].seconds}}),{c(){t=Object(r.element)("span"),n=Object(r.element)("i"),a=Object(r.space)(),Object(r.create_component)(c.$$.fragment),Object(r.attr)(n,"class","fas fa-clock"),Object(r.attr)(t,"class","time svelte-103w9s3")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.mount_component)(c,t,null),s=!0},p(e,t){const n={};1&t[0]&&(n.value=e[0].seconds),c.$set(n)},i(e){s||(Object(r.transition_in)(c.$$.fragment,e),Object(r.add_render_callback)(()=>{i||(i=Object(r.create_bidirectional_transition)(t,o.fade,{duration:500},!0)),i.run(1)}),s=!0)},o(e){Object(r.transition_out)(c.$$.fragment,e),i||(i=Object(r.create_bidirectional_transition)(t,o.fade,{duration:500},!1)),i.run(0),s=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(c),e&&i&&i.end()}}}function k(e){let t,n,a,c,i=e[9]&&$(e),s=e[9]!==e[10]&&x(e);return{c(){t=Object(r.element)("div"),i&&i.c(),n=Object(r.space)(),s&&s.c()},m(e,a){Object(r.insert)(e,t,a),i&&i.m(t,null),Object(r.append)(t,n),s&&s.m(t,null),c=!0},p(e,a){e[9]?i?(i.p(e,a),512&a[0]&&Object(r.transition_in)(i,1)):(i=$(e),i.c(),Object(r.transition_in)(i,1),i.m(t,n)):i&&(Object(r.group_outros)(),Object(r.transition_out)(i,1,1,()=>{i=null}),Object(r.check_outros)()),e[9]!==e[10]?s?(s.p(e,a),1536&a[0]&&Object(r.transition_in)(s,1)):(s=x(e),s.c(),Object(r.transition_in)(s,1),s.m(t,null)):s&&(Object(r.group_outros)(),Object(r.transition_out)(s,1,1,()=>{s=null}),Object(r.check_outros)())},i(e){c||(Object(r.transition_in)(i),Object(r.transition_in)(s),Object(r.add_render_callback)(()=>{a||(a=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!0)),a.run(1)}),c=!0)},o(e){Object(r.transition_out)(i),Object(r.transition_out)(s),a||(a=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!1)),a.run(0),c=!1},d(e){e&&Object(r.detach)(t),i&&i.d(),s&&s.d(),e&&a&&a.end()}}}function $(e){let t,n,a,o,c,i,s,l=e[11].songCard.scores+"";return i=new p.default({props:{value:e[9],digits:0}}),{c(){t=Object(r.element)("i"),n=Object(r.space)(),a=Object(r.text)(l),o=Object(r.text)(": "),c=Object(r.element)("strong"),Object(r.create_component)(i.$$.fragment),Object(r.attr)(t,"class","fas fa-align-justify svelte-103w9s3")},m(e,l){Object(r.insert)(e,t,l),Object(r.insert)(e,n,l),Object(r.insert)(e,a,l),Object(r.insert)(e,o,l),Object(r.insert)(e,c,l),Object(r.mount_component)(i,c,null),s=!0},p(e,t){(!s||2048&t[0])&&l!==(l=e[11].songCard.scores+"")&&Object(r.set_data)(a,l);const n={};512&t[0]&&(n.value=e[9]),i.$set(n)},i(e){s||(Object(r.transition_in)(i.$$.fragment,e),s=!0)},o(e){Object(r.transition_out)(i.$$.fragment,e),s=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),e&&Object(r.detach)(a),e&&Object(r.detach)(o),e&&Object(r.detach)(c),Object(r.destroy_component)(i)}}}function x(e){let t,n,a,o;return a=new p.default({props:{value:e[10],digits:0}}),{c(){t=Object(r.text)(" / "),n=Object(r.element)("strong"),Object(r.create_component)(a.$$.fragment)},m(e,c){Object(r.insert)(e,t,c),Object(r.insert)(e,n,c),Object(r.mount_component)(a,n,null),o=!0},p(e,t){const n={};1024&t[0]&&(n.value=e[10]),a.$set(n)},i(e){o||(Object(r.transition_in)(a.$$.fragment,e),o=!0)},o(e){Object(r.transition_out)(a.$$.fragment,e),o=!1},d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(n),Object(r.destroy_component)(a)}}}function S(e){let t,n,a,c,i,s,l,d,u,b=e[11].songCard.notes+"";return l=new p.default({props:{value:e[12],digits:0}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("i"),a=Object(r.space)(),c=Object(r.text)(b),i=Object(r.text)(": "),s=Object(r.element)("strong"),Object(r.create_component)(l.$$.fragment),Object(r.attr)(n,"class","fas fa-music svelte-103w9s3")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,c),Object(r.append)(t,i),Object(r.append)(t,s),Object(r.mount_component)(l,s,null),u=!0},p(e,t){(!u||2048&t[0])&&b!==(b=e[11].songCard.notes+"")&&Object(r.set_data)(c,b);const n={};4096&t[0]&&(n.value=e[12]),l.$set(n)},i(e){u||(Object(r.transition_in)(l.$$.fragment,e),Object(r.add_render_callback)(()=>{d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!0)),d.run(1)}),u=!0)},o(e){Object(r.transition_out)(l.$$.fragment,e),d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!1)),d.run(0),u=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(l),e&&d&&d.end()}}}function P(e){let t,n,a,c,i,s,l,d,u,b=e[11].songBrowser.fields.bpm+"";return l=new p.default({props:{value:e[13],digits:0}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("i"),a=Object(r.space)(),c=Object(r.text)(b),i=Object(r.text)(": "),s=Object(r.element)("strong"),Object(r.create_component)(l.$$.fragment),Object(r.attr)(n,"class","fas fa-drum svelte-103w9s3")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,c),Object(r.append)(t,i),Object(r.append)(t,s),Object(r.mount_component)(l,s,null),u=!0},p(e,t){(!u||2048&t[0])&&b!==(b=e[11].songBrowser.fields.bpm+"")&&Object(r.set_data)(c,b);const n={};8192&t[0]&&(n.value=e[13]),l.$set(n)},i(e){u||(Object(r.transition_in)(l.$$.fragment,e),Object(r.add_render_callback)(()=>{d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!0)),d.run(1)}),u=!0)},o(e){Object(r.transition_out)(l.$$.fragment,e),d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!1)),d.run(0),u=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(l),e&&d&&d.end()}}}function I(e){let t,n,a,c,i,s,l,d,u,b=e[11].songBrowser.fields.njs+"";return l=new p.default({props:{value:e[14],digits:0}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("i"),a=Object(r.space)(),c=Object(r.text)(b),i=Object(r.text)(": "),s=Object(r.element)("strong"),Object(r.create_component)(l.$$.fragment),Object(r.attr)(n,"class","fas fa-tachometer-alt svelte-103w9s3")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,c),Object(r.append)(t,i),Object(r.append)(t,s),Object(r.mount_component)(l,s,null),u=!0},p(e,t){(!u||2048&t[0])&&b!==(b=e[11].songBrowser.fields.njs+"")&&Object(r.set_data)(c,b);const n={};16384&t[0]&&(n.value=e[14]),l.$set(n)},i(e){u||(Object(r.transition_in)(l.$$.fragment,e),Object(r.add_render_callback)(()=>{d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!0)),d.run(1)}),u=!0)},o(e){Object(r.transition_out)(l.$$.fragment,e),d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!1)),d.run(0),u=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(l),e&&d&&d.end()}}}function C(e){let t,n,a,c,i,s,l,d,u,b=e[11].songBrowser.fields.nps+"";return l=new p.default({props:{value:e[15],digits:2}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("i"),a=Object(r.space)(),c=Object(r.text)(b),i=Object(r.text)(": "),s=Object(r.element)("strong"),Object(r.create_component)(l.$$.fragment),Object(r.attr)(n,"class","fas fa-fire svelte-103w9s3")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,c),Object(r.append)(t,i),Object(r.append)(t,s),Object(r.mount_component)(l,s,null),u=!0},p(e,t){(!u||2048&t[0])&&b!==(b=e[11].songBrowser.fields.nps+"")&&Object(r.set_data)(c,b);const n={};32768&t[0]&&(n.value=e[15]),l.$set(n)},i(e){u||(Object(r.transition_in)(l.$$.fragment,e),Object(r.add_render_callback)(()=>{d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!0)),d.run(1)}),u=!0)},o(e){Object(r.transition_out)(l.$$.fragment,e),d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!1)),d.run(0),u=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(l),e&&d&&d.end()}}}function T(e){let t,n,a,c,i,s,l,d,u,b=e[11].songCard.bombs+"";return l=new p.default({props:{value:e[16],digits:0,zero:"0"}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("i"),a=Object(r.space)(),c=Object(r.text)(b),i=Object(r.text)(": "),s=Object(r.element)("strong"),Object(r.create_component)(l.$$.fragment),Object(r.attr)(n,"class","fas fa-bomb svelte-103w9s3")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,c),Object(r.append)(t,i),Object(r.append)(t,s),Object(r.mount_component)(l,s,null),u=!0},p(e,t){(!u||2048&t[0])&&b!==(b=e[11].songCard.bombs+"")&&Object(r.set_data)(c,b);const n={};65536&t[0]&&(n.value=e[16]),l.$set(n)},i(e){u||(Object(r.transition_in)(l.$$.fragment,e),Object(r.add_render_callback)(()=>{d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!0)),d.run(1)}),u=!0)},o(e){Object(r.transition_out)(l.$$.fragment,e),d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!1)),d.run(0),u=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(l),e&&d&&d.end()}}}function A(e){let t,n,a,c,i,s,l,d,u,b=e[11].songCard.obstacles+"";return l=new p.default({props:{value:e[17],digits:0,zero:"0"}}),{c(){t=Object(r.element)("div"),n=Object(r.element)("i"),a=Object(r.space)(),c=Object(r.text)(b),i=Object(r.text)(": "),s=Object(r.element)("strong"),Object(r.create_component)(l.$$.fragment),Object(r.attr)(n,"class","fas fa-skull svelte-103w9s3")},m(e,o){Object(r.insert)(e,t,o),Object(r.append)(t,n),Object(r.append)(t,a),Object(r.append)(t,c),Object(r.append)(t,i),Object(r.append)(t,s),Object(r.mount_component)(l,s,null),u=!0},p(e,t){(!u||2048&t[0])&&b!==(b=e[11].songCard.obstacles+"")&&Object(r.set_data)(c,b);const n={};131072&t[0]&&(n.value=e[17]),l.$set(n)},i(e){u||(Object(r.transition_in)(l.$$.fragment,e),Object(r.add_render_callback)(()=>{d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!0)),d.run(1)}),u=!0)},o(e){Object(r.transition_out)(l.$$.fragment,e),d||(d=Object(r.create_bidirectional_transition)(t,o.fly,{x:100,duration:500},!1)),d.run(0),u=!1},d(e){e&&Object(r.detach)(t),Object(r.destroy_component)(l),e&&d&&d.end()}}}function q(e){let t,n;return t=new b.default({props:{hash:e[1],bsExistsForPlayer:e[6]}}),{c(){Object(r.create_component)(t.$$.fragment)},m(e,a){Object(r.mount_component)(t,e,a),n=!0},p(e,n){const r={};2&n[0]&&(r.hash=e[1]),64&n[0]&&(r.bsExistsForPlayer=e[6]),t.$set(r)},i(e){n||(Object(r.transition_in)(t.$$.fragment,e),n=!0)},o(e){Object(r.transition_out)(t.$$.fragment,e),n=!1},d(e){Object(r.destroy_component)(t,e)}}}function R(e){let t,n,a=e[0]&&h(e);return{c(){a&&a.c(),t=Object(r.empty)()},m(e,o){a&&a.m(e,o),Object(r.insert)(e,t,o),n=!0},p(e,n){e[0]?a?(a.p(e,n),1&n[0]&&Object(r.transition_in)(a,1)):(a=h(e),a.c(),Object(r.transition_in)(a,1),a.m(t.parentNode,t)):a&&(Object(r.group_outros)(),Object(r.transition_out)(a,1,1,()=>{a=null}),Object(r.check_outros)())},i(e){n||(Object(r.transition_in)(a),n=!0)},o(e){Object(r.transition_out)(a),n=!1},d(e){a&&a.d(e),e&&Object(r.detach)(t)}}}function z(e,t,n){let o,b,p,f,O,m,g,h,y,v;Object(r.component_subscribe)(e,u._,e=>n(11,f=e));let{$$slots:_={},$$scope:w}=t;Object(a.createEventDispatcher)();let k,$,{leaderboardId:x}=t,{songInfo:S}=t,{hash:P}=t,{scores:I=0}=t,{totalScores:C=0}=t,{status:T}=t,{stars:A=0}=t,{bpm:q=0}=t,{noteCount:R=0}=t,{difficulty:z}=t,{bgLeft:E="0rem"}=t,{bgTop:B="0rem"}=t,D=!0,L=null,N=["bsr","bs","preview","twitch","oneclick"];const F=Object(c.tweened)(0,{duration:500,easing:i.cubicOut});Object(r.component_subscribe)(e,F,e=>n(8,o=e));const M=Object(c.tweened)(0,{duration:500,easing:i.cubicOut});Object(r.component_subscribe)(e,M,e=>n(10,p=e));const U=Object(c.tweened)(0,{duration:500,easing:i.cubicOut});Object(r.component_subscribe)(e,U,e=>n(9,b=e));const V=Object(c.tweened)(0,{duration:500,easing:i.cubicOut});Object(r.component_subscribe)(e,V,e=>n(12,O=e));const H=Object(c.tweened)(0,{duration:500,easing:i.cubicOut});Object(r.component_subscribe)(e,H,e=>n(13,m=e));const W=Object(c.tweened)(0,{duration:500,easing:i.cubicOut});Object(r.component_subscribe)(e,W,e=>n(14,g=e));const Z=Object(c.tweened)(0,{duration:500,easing:i.cubicOut});Object(r.component_subscribe)(e,Z,e=>n(15,h=e));const K=Object(c.tweened)(0,{duration:500,easing:i.cubicOut});Object(r.component_subscribe)(e,K,e=>n(16,y=e));const X=Object(c.tweened)(0,{duration:500,easing:i.cubicOut});async function J(){const e=await Object(l.getConfig)("songBrowser");N=e&&e.showIcons?e.showIcons:N,n(5,D=!1!==e.showBgCover)}return Object(r.component_subscribe)(e,X,e=>n(17,v=e)),Object(a.onMount)(async()=>{if(k=await Object(l.getMainPlayerId)(),k&&P&&z){const e=k+"_"+P+"_"+z.toLowerCase();await Object(j.default)().getFromIndex("beat-savior-songId",e)&&n(6,L=k)}return await J(),d.default.on("config-changed",J)}),e.$$set=e=>{"leaderboardId"in e&&n(27,x=e.leaderboardId),"songInfo"in e&&n(0,S=e.songInfo),"hash"in e&&n(1,P=e.hash),"scores"in e&&n(28,I=e.scores),"totalScores"in e&&n(29,C=e.totalScores),"status"in e&&n(2,T=e.status),"stars"in e&&n(30,A=e.stars),"bpm"in e&&n(31,q=e.bpm),"noteCount"in e&&n(32,R=e.noteCount),"difficulty"in e&&n(33,z=e.difficulty),"bgLeft"in e&&n(3,E=e.bgLeft),"bgTop"in e&&n(4,B=e.bgTop),"$$scope"in e&&n(34,w=e.$$scope)},e.$$.update=()=>{4&e.$$.dirty[1]&&function(e){e&&n(7,$={diff:e,type:"Standard"})}(z),134217728&e.$$.dirty[0]&&async function(e){if(e){const t=await Object(s.getSongScores)(e);t&&t.length&&n(7,$=t[0].diffInfo)}}(x),130&e.$$.dirty[0]&&async function(e,t){if(e&&e.length&&t){const r=await Object(s.getSongDiffInfo)(e,t);r&&n(0,S=r)}}(P,$),1073741824&e.$$.dirty[0]&&F.set(A),268435456&e.$$.dirty[0]&&U.set(I),536870912&e.$$.dirty[0]&&M.set(C),1&e.$$.dirty[0]|2&e.$$.dirty[1]&&V.set(S&&S.notes?S.notes:R),1&e.$$.dirty[0]|1&e.$$.dirty[1]&&H.set(S&&S.bpm?S.bpm:q),1&e.$$.dirty[0]&&W.set(S&&S.njs?S.njs:0),1&e.$$.dirty[0]&&Z.set(S&&S.nps?S.nps:0),1&e.$$.dirty[0]&&K.set(S&&S.bombs?S.bombs:0),1&e.$$.dirty[0]&&X.set(S&&S.obstacles?S.obstacles:0)},[S,P,T,E,B,D,L,$,o,b,p,f,O,m,g,h,y,v,F,M,U,V,H,W,Z,K,X,x,I,C,A,q,R,z,w,_]}class E extends r.SvelteComponent{constructor(e){var t;super(),document.getElementById("svelte-103w9s3-style")||((t=Object(r.element)("style")).id="svelte-103w9s3-style",t.textContent="@media screen and (min-width: 1216px){.is-square.svelte-103w9s3.svelte-103w9s3{position:relative;padding-top:100%;overflow:hidden}.box.svelte-103w9s3.svelte-103w9s3{position:absolute;top:0;left:0;width:100%;height:100%}}@media screen and (max-width: 1215px){.box.svelte-103w9s3.svelte-103w9s3{position:relative}}.song-card.svelte-103w9s3.svelte-103w9s3{display:flex;flex-direction:column;justify-content:space-between;height:100%}.song-card.svelte-103w9s3.svelte-103w9s3:before{position:absolute;content:' ';background-image:var(--background-image);left:var(--bgLeft, 0);top:var(--bgTop, 0);width:calc(100% - var(--bgLeft) - var(--bgLeft));height:calc(100% - var(--bgTop) - var(--bgTop));background-repeat:no-repeat;background-size:cover;opacity:0.1;pointer-events:none}header.svelte-103w9s3.svelte-103w9s3{color:var(--alternate)}header.svelte-103w9s3 .title.svelte-103w9s3{color:inherit !important}header.svelte-103w9s3 h1.svelte-103w9s3{font-size:1.5em!important;margin-bottom:.5em}header.svelte-103w9s3 h2.svelte-103w9s3{font-size:1.25em!important;margin-top:0;margin-bottom:.5em}header.svelte-103w9s3 h3.title.svelte-103w9s3{font-size:1em!important;margin-top:0;color:var(--increase, #42b129) !important}header.svelte-103w9s3 h3.title.unranked.svelte-103w9s3{color:var(--decrease, #f94022) !important}header.svelte-103w9s3 .time.svelte-103w9s3{color:var(--textColor, #fff) !important}header.svelte-103w9s3 small.svelte-103w9s3{font-size:0.75em;color:var(--ppColour)}header.svelte-103w9s3 .diff.svelte-103w9s3 .reversed{display:inline-block;padding:.1em .25em .25em .25em;margin-left:.5em;margin-right:.5em;border-radius:.25em}main.svelte-103w9s3 i.svelte-103w9s3{width:1em;text-align:center}footer.svelte-103w9s3.svelte-103w9s3{text-align:right}footer.svelte-103w9s3>div{margin-top:0}footer.svelte-103w9s3 button{margin-bottom:0}",Object(r.append)(document.head,t)),Object(r.init)(this,e,z,R,r.safe_not_equal,{leaderboardId:27,songInfo:0,hash:1,scores:28,totalScores:29,status:2,stars:30,bpm:31,noteCount:32,difficulty:33,bgLeft:3,bgTop:4},[-1,-1])}}t.default=E},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n(58),o=n(9);const{document:c}=r.globals;function i(e){let t,n,a,o,c=e[0].songLeaderboard.difficultyGraph+"";return{c(){t=Object(r.element)("h3"),n=Object(r.text)(c),a=Object(r.space)(),o=Object(r.element)("main"),Object(r.attr)(t,"class","title is-5 svelte-43tqki"),Object(r.attr)(o,"id","diffChart"),Object(r.attr)(o,"class","svelte-43tqki")},m(e,c){Object(r.insert)(e,t,c),Object(r.append)(t,n),Object(r.insert)(e,a,c),Object(r.insert)(e,o,c)},p(e,[t]){1&t&&c!==(c=e[0].songLeaderboard.difficultyGraph+"")&&Object(r.set_data)(n,c)},i:r.noop,o:r.noop,d(e){e&&Object(r.detach)(t),e&&Object(r.detach)(a),e&&Object(r.detach)(o)}}}function s(e,t,n){let c;Object(r.component_subscribe)(e,o._,e=>n(0,c=e));let{data:i=null}=t,s=null,l=null;return Object(a.onMount)(async()=>{n(2,s=document.getElementById("diffChart"))}),e.$$set=e=>{"data"in e&&n(1,i=e.data)},e.$$.update=()=>{6&e.$$.dirty&&async function(e,t){e&&t&&t.length&&(l&&l.destroy(),l=c3.generate({bindto:e,data:{columns:[["difficulty",...t]],color:{difficulty:"var(--selected)"}},axis:{x:{show:!1},y:{show:!1}},legend:{show:!1},responsive:!0,onResize(e,t){e.resize(),e.render(!0)},tooltip:{show:!1}}))}(s,i)},[c,i]}class l extends r.SvelteComponent{constructor(e){var t;super(),c.getElementById("svelte-43tqki-style")||((t=Object(r.element)("style")).id="svelte-43tqki-style",t.textContent="main.svelte-43tqki{margin:0 auto !important;height:300px !important}h3.svelte-43tqki{margin-bottom:.5rem !important;color:var(--alternate) !important}",Object(r.append)(c.head,t)),Object(r.init)(this,e,s,i,r.safe_not_equal,{data:1})}}t.default=l},function(e,t,n){"use strict";n.r(t),n.d(t,"TYPES",(function(){return R}));var r=n(13),a=n(1),o=n(36),c=n(151),i=n(15),s=n(7),l=n(38),d=n(46),u=n(76),b=n(3),p=n(35),f=n(11),O=n(12);function j(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){y(o,r,a,c,i,"next",e)}function i(e){y(o,r,a,c,i,"throw",e)}c(void 0)}))}}var _,w,k,$,x,S,P,I,C,T,A=!1,q=!1,R={RANKEDS:"rankeds",ACTIVE_PLAYERS:"active-players",PLAYER_SCORES:"player-score"},z=(T=v((function*(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:15e5,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};b.default.debug("Starting enqueuing scores of player ".concat(t),"DlManager");var f="".concat(R.PLAYER_SCORES,"-").concat(t);if(!e.contains(f)){var O=yield Object(i.getPlayerInfo)(t);if(O){var m=Object(s.dateFromString)(null!==(n=null==O?void 0:O.lastUpdated)&&void 0!==n?n:null),h=o||!m||Date.now()-m>d;if(b.default.trace("Scores of player ".concat(t," last updated on ").concat(m?m.toISOString():"NEVER",". ").concat(h?o?"FORCED":"":"SKIPPED"),"DlManager"),h){b.default.debug("Scores of player ".concat(t," enqueued"),"DlManager");var y=g({type:R.PLAYER_SCORES,nodeId:Object(a.default)().getId(),playerId:t},p);e.add(v((function*(){return yield Object(l.updatePlayerScores)(t,!0,t=>{var{id:n}=t,a=j(t,["id"]);r.default.publish("bg-download-progress",g(g({size:e.size()+1,label:f},y),a))})})),f,u,c,y)}}}})),function(e,t){return T.apply(this,arguments)}),E=(C=v((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=yield Object(o.getMainPlayerId)();if(r){var a=yield Object(i.getPlayerInfo)(r);(null==a?void 0:a.lastUpdated)?yield z(e,r,t,v((function*(){try{yield Object(O.delay)(s.SECOND),yield Object(f.updateBeatSaviorData)(r)}catch(e){}n&&(yield n())})),18e4,100,{mainPlayerId:!0}):yield D(e,!0,v((function*(){yield z(e,r,t,n,18e4,100,{mainPlayerId:!0})})),101)}})),function(e){return C.apply(this,arguments)}),B=(I=v((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;b.default.debug("Starting enqueuing  rankeds","DlManager");var r=R.RANKEDS;if(!e.contains(r)){var o=Object(s.dateFromString)(yield Object(d.getRankedSongsLastUpdated)()),c=t||!o||Date.now()-o>36e5;if(b.default.trace("Rankeds last updated on ".concat(o?o.toISOString():"NEVER",". ").concat(c?t?"FORCED":"":"SKIPPED"),"DlManager"),c){b.default.debug("Rankeds enqueued","DlManager");var i={type:R.RANKEDS,nodeId:Object(a.default)().getId()};e.add(v((function*(){return yield Object(u.updateRankeds)()})),r,200,n,i)}}})),function(e){return I.apply(this,arguments)}),D=(P=v((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:20;b.default.debug("Starting enqueuing active players","DlManager");var o=R.ACTIVE_PLAYERS;if(!e.contains(o)){var c=Object(s.dateFromString)(yield Object(l.getActivePlayersLastUpdate)()),i=t||!c||Date.now()-c>18e5;if(b.default.trace("Active players last updated on ".concat(c?c.toISOString():"NEVER",". ").concat(i?t?"FORCED":"":"SKIPPED"),"DlManager"),i){b.default.debug("Active players enqueued","DlManager");var d={type:R.ACTIVE_PLAYERS,nodeId:Object(a.default)().getId()};e.add(v((function*(){return yield Object(l.updateActivePlayers)(!0)})),o,r,n,d)}}})),function(e){return P.apply(this,arguments)}),L=(S=v((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;b.default.debug("Starting enqueuing active players scores","DlManager");var r=yield Object(o.getMainPlayerId)(),a=(yield Object(i.getAllActivePlayersIds)(yield Object(p.getActiveCountry)())).filter(e=>e!==r);b.default.trace("Active players: ".concat(JSON.stringify(a)),"DlManager");for(var c=0;c<a.length;c++)yield z(e,a[c],t,n,15e5,1)})),function(e){return S.apply(this,arguments)}),N=!1,F=(x=v((function*(e){if(b.default.debug("Try to process queue. isPaused: ".concat(q?"ON":"OFF",", BgDownload: ").concat(A?"ON":"OFF",", isMaster: ").concat(Object(a.default)().isMaster(),", queueIsProcessed: ").concat(N),"DlManager"),N)b.default.debug("Queue processing in progress. SKIPPED");else if(A&&!q&&Object(a.default)().isMaster())try{N=!0;var t=e.size();if(t||b.default.debug("Start queue processing. Queue size: ".concat(t),"DlManager"),t){var n;for(b.default.info("Start queue processing. Queue size: ".concat(t),"DlManager"),r.default.publish("bg-download-started",{size:t});n=e.next();){var o=e.size()+1;r.default.publish("bg-download-job-started",{size:o,label:n.label}),b.default.debug("Start processing job ".concat(n.label,". Queue size: ").concat(o),"DlManager"),b.default.trace("Job metadata: ".concat(JSON.stringify(n.metadata)),"DlManager"),yield n.item(),n.then&&(b.default.debug("Start processing then after job ".concat(n.label),"DlManager"),yield n.then(),b.default.debug("then() function after job ".concat(n.label," processed"),"DlManager")),b.default.debug("Job ".concat(n.label," processed. Queue size: ").concat(o),"DlManager"),r.default.publish("bg-download-job-processed",{size:o,label:n.label})}r.default.publish("bg-download-stopped"),b.default.info("Queue processed","DlManager")}N=!1}catch(e){N=!1,r.default.publish("bg-download-error",e),r.default.publish("bg-download-stopped")}else e.clear()})),function(e){return x.apply(this,arguments)}),M=($=v((function*(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(b.default.debug("Try to enqueue type ".concat(t,". BgDownload: ").concat(A?"ON":"OFF",", isMaster: ").concat(Object(a.default)().isMaster(),", forced: ").concat(n),"DlManager"),A&&Object(a.default)().isMaster())switch(t){case R.RANKEDS:yield B(e,n,o);break;case R.ACTIVE_PLAYERS:yield D(e,n,o);break;case R.PLAYER_SCORES:(null==r?void 0:r.playerId)?yield z(e,r.playerId,n,o):yield L(e,n,o)}else e.clear()})),function(e,t){return $.apply(this,arguments)}),U=(k=v((function*(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];b.default.debug("Try to enqueue & process queue. BgDownload: ".concat(A?"ON":"OFF",", isMaster: ").concat(Object(a.default)().isMaster()),"DlManager"),A&&Object(a.default)().isMaster()?(yield E(e,t),yield M(e,R.RANKEDS,t),yield M(e,R.ACTIVE_PLAYERS,t),yield M(e,R.PLAYER_SCORES,t),yield F(e)):e.clear()})),function(e){return k.apply(this,arguments)}),V=(w=v((function*(e){Object(a.default)().isMaster()&&(yield U(e),_=setInterval(()=>U(e),6e4))})),function(e){return w.apply(this,arguments)});t.default=v((function*(){var e,t,n,i=Object(c.default)(),s=Object(a.default)().getMasterId();A=yield Object(o.isBackgroundDownloadEnabled)(),r.default.on("config-changed",v((function*(){var e=yield Object(o.isBackgroundDownloadEnabled)(!0),t=A;A=e,t!==e&&(yield U(i))}))),r.default.on("master-node-elected",(n=v((function*(e){s!==e&&(yield V(i)),Object(a.default)().isMaster()||_&&(clearInterval(_),_=null),s=e})),function(e){return n.apply(this,arguments)})),r.default.on("player-added",(t=v((function*(e){var{playerId:t,nodeId:n}=e;yield M(i,R.ACTIVE_PLAYERS,!0,null,v((function*(){return yield M(i,R.PLAYER_SCORES,!0,{playerId:t})}))),yield F(i)})),function(e){return t.apply(this,arguments)})),r.default.on("player-added-to-friends",(e=v((function*(e){var{playerId:t,nodeId:n}=e;yield M(i,R.ACTIVE_PLAYERS,!0,null,v((function*(){return yield M(i,R.PLAYER_SCORES,!0,{playerId:t})}))),yield F(i)})),function(t){return e.apply(this,arguments)})),r.default.on("dl-manager-pause-cmd",()=>{b.default.debug("Pause Dl Manager","DlManager"),q=!0,i.clear()}),r.default.on("dl-manager-unpause-cmd",()=>{b.default.debug("Unpause Dl Manager","DlManager"),q=!1,i.clear()}),yield V(i)}))},function(e,t,n){"use strict";n.r(t),t.default=()=>{var e=[];return{isEmpty:()=>!e.length,size:()=>e.length,clear:()=>{e=[]},add:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return(e=e.concat([{item:t,label:n,priority:r,then:a,metadata:o}]).sort((e,t)=>t.priority-e.priority)).length},next:()=>e.length?e.shift():null,contains:t=>!!e.find(e=>e.label===t)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"setupDataFixes",(function(){return x}));var r=n(37),a=n(3),o=n(19),c=n(36),i=n(7),s=n(24);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function p(e,t,n,r,a,o,c){try{var i=e[o](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){p(o,r,a,c,i,"next",e)}function i(e){p(o,r,a,c,i,"throw",e)}c(void 0)}))}}var O,j,m,g,h,y,v,_,w=(_=f((function*(){return Object(r.default)().get("data-fix",!0)})),function(){return _.apply(this,arguments)}),k=(v=f((function*(e){return Object(r.default)().set(e,"data-fix")})),function(e){return v.apply(this,arguments)}),$={"rankeds-20201129":{validTo:new Date(2021,0,1),apply:(h=f((function*(){return a.default.info("Apply rankeds dl fix (20201129)"),o.db.runInTransaction(["rankeds-changes","rankeds","key-value"],(e=f((function*(e){for(var t,n=yield e.objectStore("rankeds-changes").index("rankeds-changes-timestamp").openCursor(IDBKeyRange.lowerBound(160664616e4)),r=[];n;)yield n.delete(),n.value.leaderboardId&&r.push(n.value.leaderboardId),n=yield n.continue();var a=e.objectStore("rankeds");yield Promise.all(r.map(e=>a.delete(e))),a=e.objectStore("key-value");var o=null!==(t=yield a.get("data-fix"))&&void 0!==t?t:[];o.push("rankeds-20201129"),yield a.put(o,"data-fix")})),function(t){return e.apply(this,arguments)}));var e})),function(){return h.apply(this,arguments)})},"config-chart-20210108":{apply:(g=f((function*(){var e;a.default.info("Apply config showChart fix (20210108)");var t=yield Object(c.getConfig)();t&&t.profile&&(t.profile.showChart=!0===t.profile.showChart?"rank":!1===t.profile.showChart?"none":t.profile.showChart,yield Object(c.setConfig)(t));var n=null!==(e=yield w())&&void 0!==e?e:[];n.push("config-chart-20210108"),yield k(n)})),function(){return g.apply(this,arguments)})},"rankeds-20210117":{apply:(m=f((function*(){return a.default.info("Apply rankeds diff fix (20210117)"),o.db.runInTransaction(["rankeds","key-value"],(e=f((function*(e){for(var t,n=yield e.objectStore("rankeds").openCursor();n;){var r=n.value,{diff:a}=r,o=b(r,["diff"]);if(a&&!n.value.diffInfo){var c=d(d({},o),{},{diffInfo:a});n.update(c)}n=yield n.continue()}var i=e.objectStore("key-value"),s=null!==(t=yield i.get("data-fix"))&&void 0!==t?t:[];s.push("rankeds-20210117"),yield i.put(s,"data-fix")})),function(t){return e.apply(this,arguments)}));var e})),function(){return m.apply(this,arguments)})},"april-fools-2021":{validTo:new Date(2021,3,30),apply:(j=f((function*(){a.default.info("Apply april fools fix (2021)");var e,t=new Date(2021,2,31),n=["lastRankedsRefetch","lastUpdated","profileLastUpdated","beatSaviorLastUpdated"],r=["activePlayersLastUpdate","lastUpdated","rankedSongsLastUpdated"];return o.db.runInTransaction(["players","key-value"],(e=f((function*(e){for(var a,o=yield e.objectStore("players").openCursor(),c=function*(){var e=o.value,r=!1;n.forEach(n=>{e[n]&&Object(i.dateFromString)(e[n])>t&&(e[n]=t,r=!0)}),r&&(yield o.update(e)),o=yield o.continue()};o;)yield*c();for(o=yield e.objectStore("key-value").openCursor();o;){var s=o.value;r.includes(o.key)&&Object(i.dateFromString)(s)>t&&(yield o.update(t)),o=yield o.continue()}var l=e.objectStore("key-value"),d=null!==(a=yield l.get("data-fix"))&&void 0!==a?a:[];d.push("april-fools-2021"),yield l.put(d,"data-fix")})),function(t){return e.apply(this,arguments)}))})),function(){return j.apply(this,arguments)})},"beatsaver-20210807":{apply:(O=f((function*(e){return a.default.info("Converting BeatSaver songs to a new format...","DBFix"),o.db.runInTransaction(["songs","songs-beatmaps","key-value"],(t=f((function*(t){for(var n=t.objectStore("songs-beatmaps"),r=yield t.objectStore("songs").openCursor(),o=0;r;){var c,i=r.value;if(null==i||null===(c=i.metadata)||void 0===c?void 0:c.characteristics){var l=Object(s.convertOldBeatSaverToBeatMaps)(i);l?(n.put(l),o++):a.default.info("Unable to convert, deleting a song","DBFix")}else a.default.info("No metadata characteristics, skipping a song","DBFix");r=yield r.continue()}var d=t.objectStore("key-value"),u=yield d.get("data-fix");(u=u&&Array.isArray(u)?u:[]).push(e),yield d.put(u,"data-fix"),a.default.info("".concat(o," BeatSaver song(s) converted"),"DBFix")})),function(e){return t.apply(this,arguments)}));var t})),function(e){return O.apply(this,arguments)})}},x=(y=f((function*(){var e,t=null!==(e=yield w())&&void 0!==e?e:[],n=Object.keys($).filter(e=>!t.includes(e)&&(!$[e].validTo||$[e].validTo>new Date));if(n.length)for(var r of n)yield $[r].apply(r)})),function(){return y.apply(this,arguments)})},function(e,t,n){(t=n(154)(!1)).push([e.i,".sspl .player-name{font-size:1.1em;font-weight:700}.card-view .inc,.sspl-page .inc,.sspl .diff.inc,.sspl .inc{color:var(--increase)!important}.card-view .dec,.sspl-page .dec,.sspl .dec,.sspl .diff.dec{color:var(--decrease)!important}.what-if{position:absolute;top:1em;right:0;font-weight:700;padding:0}table.ranking.songs th.score,table.ranking td.pp{position:relative}table.ranking tbody tr.hidden{opacity:.05}.content table.ranking.global.sspl .diff,.content table.ranking.global.sspl .pp{text-align:center}.box .tabs a{border-bottom:none}.box .tabs li:hover{border-bottom:1px solid #000;margin-bottom:-1px}.tabs li.is-active{border-bottom:1px solid #3273dc;margin-bottom:-1px}img.bloodtrail{height:24px}.sspl .rank small{font-size:.75rem;margin-left:.5rem;color:#d3d3d3}.text-center{text-align:center}.offset_tab{margin-left:auto}table.ranking.songs.sspl th.score{min-width:11rem}.content .box>.refresh{position:absolute;top:.5rem;right:.5rem;font-size:1rem}.pagination select.type,.sspl select,.sspl thead .diff select{font-size:1rem;font-weight:700;border:none;color:var(--textColor,#000);background-color:var(--background,#fff);outline:none}.pp-boundary{color:var(--textColor,#000)}.sspl tbody tr.main{background-color:var(--highlight)}table.ranking tbody tr:hover{background-color:var(--hover)!important}table.ranking.songs{max-width:none!important}.flex-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;justify-content:flex-start!important}.flex-center,.flex-start{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center!important;-webkit-align-items:center!important;align-items:center!important}.flex-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;justify-content:center!important}.flex-align-start{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.flex-justify-between{-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.flex-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.flex-wrap{-webkit-flex-wrap:wrap;flex-wrap:wrap}.full-width{width:100%}.el-group button{margin-bottom:.5em}.el-group button:not(:last-child){margin-right:.5em}.column.avatar.enlarge{margin-right:1rem}.column.avatar.enlarge img.is-96x96{width:150px;height:150px}.column.avatar.main img.is-96x96{border:2px solid var(--increase,\"#42b129\")}body .navbar,body .navbar.has-shadow{background-color:var(--navBg,var(--foreground,\"#252525\"))!important}body .navbar .navbar-item{color:var(--navText,var(--textColor,\"#eee\"))!important}body .navbar .navbar-item.is-active,body .navbar .navbar-item:hover,body .navbar .navbar-link.is-active,body .navbar .navbar-link:hover{background-color:var(--navHover,var(--hover,\"#333\"))!important}body .navbar-item.sspl-avatar{padding:6px .75rem}body .navbar-item.sspl-avatar figure{width:40px;height:40px}body .navbar-item.sspl-avatar img{max-height:none}body .navbar-item.sspl-avatar figure.flag{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}body .navbar-item.sspl-avatar figure.flag img{width:auto;height:.875rem}body .select select{background-color:var(--background)!important;color:var(--textColor)!important}.sspl th{font-weight:500}.beatsaver_bg{background-image:url(\"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' version='1.1'%3E%3Cg fill='none' stroke='%23000000' stroke-width='10'%3E %3Cpath d='M 100,7 189,47 100,87 12,47 Z' stroke-linejoin='round'/%3E %3Cpath d='M 189,47 189,155 100,196 12,155 12,47' stroke-linejoin='round'/%3E %3Cpath d='M 100,87 100,196' stroke-linejoin='round'/%3E %3Cpath d='M 26,77 85,106 53,130 Z' stroke-linejoin='round'/%3E %3C/g%3E %3C/svg%3E\");background-repeat:no-repeat;background-position:50%;background-size:85%;width:100%;height:100%}@media screen and (min-width:1024px) and (max-width:1407px){.container{max-width:none;width:auto}}.fa-spin-x{-webkit-animation:fa-spin-x 2s linear infinite;animation:fa-spin-x 2s linear infinite}@-webkit-keyframes fa-spin-x{0%{-webkit-transform:rotateX(0deg);transform:rotateX(0deg)}to{-webkit-transform:rotateX(1turn);transform:rotateX(1turn)}}@keyframes fa-spin-x{0%{-webkit-transform:rotateX(0deg);transform:rotateX(0deg)}to{-webkit-transform:rotateX(1turn);transform:rotateX(1turn)}}.sspl-page{margin-top:-1rem;margin-bottom:1.5rem}.error{font-weight:500;color:var(--decrease)}.onboarding-hint{font-size:.875rem;padding-bottom:.25rem}.pulse{-webkit-animation:pulse 1.5s infinite;animation:pulse 1.5s infinite}@-webkit-keyframes pulse{0%{color:var(--dimmed)}50%{color:var(--decrease)}to{color:var(--dimmed)}}@keyframes pulse{0%{color:var(--dimmed)}50%{color:var(--decrease)}to{color:var(--dimmed)}}.sspl-page-container{width:100%;margin:0 auto}@media screen and (min-width:1750px){.sspl-page-container{max-width:1750px!important}}nav.navbar .sspl-page-container{width:-webkit-calc(100% - 3rem);width:calc(100% - 3rem);max-width:-webkit-calc(100% - 3rem);max-width:calc(100% - 3rem)}@media screen and (min-width:1024px) and (max-width:1300px){nav.navbar .sspl-page-container .navbar-end>a{display:none}}",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,a,o=e[1]||"",c=e[3];if(!c)return o;if(t&&"function"==typeof btoa){var i=(n=c,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(a," */")),s=c.sources.map((function(e){return"/*# sourceURL=".concat(c.sourceRoot||"").concat(e," */")}));return[o].concat(s).concat([i]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var o=0;o<this.length;o++){var c=this[o][0];null!=c&&(a[c]=!0)}for(var i=0;i<e.length;i++){var s=[].concat(e[i]);r&&a[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},function(e,t,n){"use strict";n.r(t),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAU0AAAFNCAYAAACE8D3EAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAIXRFWHRDcmVhdGlvbiBUaW1lADIwMjA6MDg6MTMgMjE6MDA6NDJ7lTXKAADb0ElEQVR4Xuy9BYBkx3Xuf6ZhmGeZebUoZrQFlkEyySRTzI4dx44hyXsv8PIPx3YSO3Hy4sSOY4ghBskgRovW0kq7Wi0z8w5Dz/T0zP/71e2a7entmR1emPvt1lzoewtPfXVOVd0qCxEiRIgQIUKECBEiRIgQIUKECBEiRIgQIUKECBEiRIgQIUKECBEiRIhBoLu7Oy99GiJEiBAhToNI+hgiRIgQIQaIUNMMESJEiAEi1DRDhAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECFChAgRIkSIECHOOPLSxxAhRgvIWDw47QHXRXLF+cERdKWPkW79LlcWNSvVdWfKrF1HHSyqe8X8huO3iNkx/dCc/q1UnlTxrAJt0fkx/d6sZ/WTxfBXx0K5pO43cJTjN/3k4pmnP0kF1pr+zYPfuSaOHBNyIcYpQtIM0R+8fMTkIBtxjUORLgr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