var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,r){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:r})}else{e.raw=r}return e};System.register(["./p-641f968d.system.js","./p-7265bbcb.system.js","./p-b6504987.system.js","./p-30c1ef36.system.js","./p-4bd679a7.system.js","./p-456ccda6.system.js"],(function(e){"use strict";var r,n,t,a,i,o,s,d,l,u,f;return{setters:[function(e){r=e.r;n=e.h},function(e){t=e.i},function(e){a=e.n},function(e){i=e.d;o=e.H;s=e.J;d=e.w;l=e.i},function(e){u=e.c},function(e){f=e.L}],execute:function(){var v=i.gql(__makeTemplateObject(["\n  query ($type: String!, $filter: UserLeaderboardFilterInput) {\n    viewer {\n      ... on User {\n        leaderboardRank(type: $type, filter: $filter) {\n          rowNumber\n          rank\n          denseRank\n        }\n      }\n    }\n  }\n"],["\n  query ($type: String!, $filter: UserLeaderboardFilterInput) {\n    viewer {\n      ... on User {\n        leaderboardRank(type: $type, filter: $filter) {\n          rowNumber\n          rank\n          denseRank\n        }\n      }\n    }\n  }\n"]));function c(e){var r,n,a,i;var l=o();var u=(r=e.programId)!==null&&r!==void 0?r:l;var f=s();var c=u?{type:e.leaderboardType,filter:{programId_eq:u}}:{type:e.leaderboardType,filter:{}};if(e.interval){c.filter["interval"]=e.interval}var p=d(v,c,!(f===null||f===void 0?void 0:f.jwt)).data;var y=((n=p===null||p===void 0?void 0:p.viewer)===null||n===void 0?void 0:n.leaderboardRank)?t.formatMessage({id:"rankText",defaultMessage:e.rankText},{rank:(i=(a=p===null||p===void 0?void 0:p.viewer)===null||a===void 0?void 0:a.leaderboardRank)===null||i===void 0?void 0:i[e.rankType]}):e.unrankedText||"unranked";return{data:{rank:y}}}var p="p,.P{font-size:var(--sl-font-size-small);color:var(--sqm-text);margin-top:0px}p.Subtitle,.P.Subtitle{color:var(--sqm-text-subdued);margin:0px}";var y=e("sqm_leaderboard_rank",function(){function e(e){r(this,e);this.rankText="You are currently in {rank, selectordinal, one {#st} two {#nd} few {#rd} other {#th} } place!";a(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=l()?b(this):c(this);return n(f,Object.assign({},e))};return e}());function b(e){var r=t.formatMessage({id:"rankText",defaultMessage:e.rankText},{rank:1})||"1st";return u({data:{rank:r}},e.demoData||{},{arrayMerge:function(e,r){return r}})}y.style=p}}}));