@everymatrix/pam-metadata 1.85.16 → 1.85.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const pamMetadata = require('./pam-metadata-b2ed464a.js');
5
+ const pamMetadata = require('./pam-metadata-f197abb7.js');
6
6
  require('./index-42065499.js');
7
7
 
8
8
 
@@ -23,6 +23,8 @@ function setClientStyling(stylingContainer, clientStyling) {
23
23
  * @param {string} clientStylingUrl The URL of the style content
24
24
  */
25
25
  function setClientStylingURL(stylingContainer, clientStylingUrl) {
26
+ if (!stylingContainer || !clientStylingUrl) return;
27
+
26
28
  const url = new URL(clientStylingUrl);
27
29
 
28
30
  fetch(url.href)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const pamMetadata = require('./pam-metadata-b2ed464a.js');
5
+ const pamMetadata = require('./pam-metadata-f197abb7.js');
6
6
  const index = require('./index-42065499.js');
7
7
 
8
8
  const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { P as PamMetadata } from './pam-metadata-ee589587.js';
1
+ export { P as PamMetadata } from './pam-metadata-d5caad2b.js';
2
2
  import './index-c1c08349.js';
@@ -21,6 +21,8 @@ function setClientStyling(stylingContainer, clientStyling) {
21
21
  * @param {string} clientStylingUrl The URL of the style content
22
22
  */
23
23
  function setClientStylingURL(stylingContainer, clientStylingUrl) {
24
+ if (!stylingContainer || !clientStylingUrl) return;
25
+
24
26
  const url = new URL(clientStylingUrl);
25
27
 
26
28
  fetch(url.href)
@@ -1,4 +1,4 @@
1
- export { P as pam_metadata } from './pam-metadata-ee589587.js';
1
+ export { P as pam_metadata } from './pam-metadata-d5caad2b.js';
2
2
  import { r as registerInstance, h, H as Host } from './index-c1c08349.js';
3
3
 
4
4
  const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
@@ -1 +1 @@
1
- export{P as PamMetadata}from"./pam-metadata-ee589587.js";import"./index-c1c08349.js";
1
+ export{P as PamMetadata}from"./pam-metadata-d5caad2b.js";import"./index-c1c08349.js";
@@ -0,0 +1 @@
1
+ import{r as t,h as e}from"./index-c1c08349.js";function n(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function i(t,e){if(!t||!e)return;const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function r(t,e){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{n.innerHTML=e,t&&t.appendChild(n)}))}}const s={en:{title:"Player Info",lastLoginText:"Last login date: {lastLoginTimestamp}.",errorFetchMessage:"There was an error when fetching last login date"},tr:{title:"Oyuncu Bilgisi",lastLoginText:"Son giriş tarihi: {lastLoginTimestamp}.",errorFetchMessage:"Son giriş tarihi alınırken bir hata oluştu"},ro:{title:"Informații jucător",lastLoginText:"Data ultimei autentificări: {lastLoginTimestamp}.",errorFetchMessage:"A apărut o eroare la preluarea datei ultimei autentificări"},hr:{title:"Informacije o igraču",lastLoginText:"Datum zadnje prijave: {lastLoginTimestamp}.",errorFetchMessage:"Došlo je do pogreške prilikom dohvaćanja datuma zadnje prijave"},"pt-br":{title:"Informações do Jogador",lastLoginText:"Data do último login: {lastLoginTimestamp}.",errorFetchMessage:"Ocorreu um erro ao buscar a data do último login"},"es-mx":{title:"Información del Jugador",lastLoginText:"Fecha del último inicio de sesión: {lastLoginTimestamp}.",errorFetchMessage:"Hubo un error al obtener la fecha del último inicio de sesión"},es:{title:"Información del Jugador",lastLoginText:"Fecha del último inicio de sesión: {lastLoginTimestamp}.",errorFetchMessage:"Hubo un error al obtener la fecha del último inicio de sesión"},pt:{title:"Informações do Jogador",lastLoginText:"Data do último login: {lastLoginTimestamp}.",errorFetchMessage:"Ocorreu um erro ao buscar a data do último login"}},a=(t,e,n)=>{let i=s[void 0!==e&&e in s?e:"en"][t];if(void 0!==n)for(const[t,e]of Object.entries(n.values)){const n=new RegExp(`{${t}}`,"g");i=i.replace(n,e)}return i};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var o={exports:{}};o.exports=function(){var t=6e4,e=36e5,n="millisecond",i="second",r="minute",s="hour",a="day",o="week",u="month",c="quarter",h="year",l="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},p=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},v={s:p,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+p(i,2,"0")+":"+p(r,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(i,u),s=n-r<0,a=e.clone().add(i+(s?-1:1),u);return+(-(i+(n-r)/(s?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:h,w:o,d:a,D:l,h:s,m:r,s:i,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},M="en",y={};y[M]=g;var w="$isDayjsObject",b=function(t){return t instanceof D||!(!t||!t[w])},S=function t(e,n,i){var r;if(!e)return M;if("string"==typeof e){var s=e.toLowerCase();y[s]&&(r=s),n&&(y[s]=n,r=s);var a=e.split("-");if(!r&&a.length>1)return t(a[0])}else{var o=e.name;y[o]=e,r=o}return!i&&r&&(M=r),r||!i&&M},T=function(t,e){if(b(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new D(n)},x=v;x.l=S,x.i=b,x.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function g(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var p=g.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(x.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(f);if(i){var r=i[2]-1||0,s=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return x},p.isValid=function(){return!(this.$d.toString()===d)},p.isSame=function(t,e){var n=T(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return T(t)<this.startOf(e)},p.isBefore=function(t,e){return this.endOf(e)<T(t)},p.$g=function(t,e,n){return x.u(t)?this[e]:this.set(n,t)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(t,e){var n=this,c=!!x.u(e)||e,d=x.p(t),f=function(t,e){var i=x.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return c?i:i.endOf(a)},m=function(t,e){return x.w(n.toDate()[t].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},g=this.$W,p=this.$M,v=this.$D,M="set"+(this.$u?"UTC":"");switch(d){case h:return c?f(1,0):f(31,11);case u:return c?f(1,p):f(0,p+1);case o:var y=this.$locale().weekStart||0,w=(g<y?g+7:g)-y;return f(c?v-w:v+(6-w),p);case a:case l:return m(M+"Hours",0);case s:return m(M+"Minutes",1);case r:return m(M+"Seconds",2);case i:return m(M+"Milliseconds",3);default:return this.clone()}},p.endOf=function(t){return this.startOf(t,!1)},p.$set=function(t,e){var o,c=x.p(t),d="set"+(this.$u?"UTC":""),f=(o={},o[a]=d+"Date",o[l]=d+"Date",o[u]=d+"Month",o[h]=d+"FullYear",o[s]=d+"Hours",o[r]=d+"Minutes",o[i]=d+"Seconds",o[n]=d+"Milliseconds",o)[c],m=c===a?this.$D+(e-this.$W):e;if(c===u||c===h){var g=this.clone().set(l,1);g.$d[f](m),g.init(),this.$d=g.set(l,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},p.set=function(t,e){return this.clone().$set(t,e)},p.get=function(t){return this[x.p(t)]()},p.add=function(n,c){var l,d=this;n=Number(n);var f=x.p(c),m=function(t){var e=T(d);return x.w(e.date(e.date()+Math.round(t*n)),d)};if(f===u)return this.set(u,this.$M+n);if(f===h)return this.set(h,this.$y+n);if(f===a)return m(1);if(f===o)return m(7);var g=(l={},l[r]=t,l[s]=e,l[i]=1e3,l)[f]||1,p=this.$d.getTime()+n*g;return x.w(p,this)},p.subtract=function(t,e){return this.add(-1*t,e)},p.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var i=t||"YYYY-MM-DDTHH:mm:ssZ",r=x.z(this),s=this.$H,a=this.$m,o=this.$M,u=n.weekdays,c=n.months,h=function(t,n,r,s){return t&&(t[n]||t(e,i))||r[n].slice(0,s)},l=function(t){return x.s(s%12||12,t,"0")},f=n.meridiem||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(m,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return x.s(e.$y,4,"0");case"M":return o+1;case"MM":return x.s(o+1,2,"0");case"MMM":return h(n.monthsShort,o,c,3);case"MMMM":return h(c,o);case"D":return e.$D;case"DD":return x.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,u,2);case"ddd":return h(n.weekdaysShort,e.$W,u,3);case"dddd":return u[e.$W];case"H":return String(s);case"HH":return x.s(s,2,"0");case"h":return l(1);case"hh":return l(2);case"a":return f(s,a,!0);case"A":return f(s,a,!1);case"m":return String(a);case"mm":return x.s(a,2,"0");case"s":return String(e.$s);case"ss":return x.s(e.$s,2,"0");case"SSS":return x.s(e.$ms,3,"0");case"Z":return r}return null}(t)||r.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(n,l,d){var f,m=this,g=x.p(l),p=T(n),v=(p.utcOffset()-this.utcOffset())*t,M=this-p,y=function(){return x.m(m,p)};switch(g){case h:f=y()/12;break;case u:f=y();break;case c:f=y()/3;break;case o:f=(M-v)/6048e5;break;case a:f=(M-v)/864e5;break;case s:f=M/e;break;case r:f=M/t;break;case i:f=M/1e3;break;default:f=M}return d?f:x.a(f)},p.daysInMonth=function(){return this.endOf(u).$D},p.$locale=function(){return y[this.$L]},p.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=S(t,e,!0);return i&&(n.$L=i),n},p.clone=function(){return x.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},g}(),L=D.prototype;return T.prototype=L,[["$ms",n],["$s",i],["$m",r],["$H",s],["$W",a],["$M",u],["$y",h],["$D",l]].forEach((function(t){L[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),T.extend=function(t,e){return t.$i||(t(e,D,T),t.$i=!0),T},T.locale=S,T.isDayjs=b,T.unix=function(t){return T(1e3*t)},T.en=y[M],T.Ls=y,T.p={},T}();const u=o.exports,c=class{constructor(n){t(this,n),this.data=null,this.getData=()=>{const t=new URL(`api/v1/players/${this.userId}/player-identifiable-information/`,this.endpoint),e=new Headers({"X-SessionID":this.session});return fetch(t.href,{method:"GET",headers:e}).then((t=>{if(t.ok)return t.json().then((t=>t));throw new Error})).catch((()=>(window.postMessage({type:"WidgetNotification",data:{type:"error",message:a("errorFetchMessage",this.language)}},window.location.href),null)))},this.formatDate=t=>u(t).format(this.dateFormat),this.loadingSkeleton=e("div",{class:"LoadingSkeleton"},e("div",{class:"Title"},e("ui-skeleton",{structure:"title",width:"100%",height:"18px"})),e("div",{class:"Text"},e("ui-skeleton",{structure:"text",width:"100%",height:"14px"}))),this.language="en",this.endpoint="",this.session="",this.userId="",this.dateFormat="DD/MM/YYYY HH:mm",this.mbSource="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isLoading=!0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&i(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&r(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){if(this.getData().then((t=>t&&(this.data=t.player,this.isLoading=!1))),this.translationUrl)return t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{s[e]||(s[e]={});for(let n in t[e])s[e][n]=t[e][n]})),e(!0)}))}));var t}componentDidLoad(){this.stylingContainer&&(this.mbSource&&r(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"36a2665c4e000c17c8bc847b009f64a91d1b1ce4",ref:t=>this.stylingContainer=t,class:"PamMetadata"},this.isLoading?this.loadingSkeleton:e("div",{class:"TextContainer"},e("h4",null,a("title")),e("div",{innerHTML:a("lastLoginText",this.language,{values:{lastLoginTimestamp:this.formatDate(this.data.statusInfo.lastLogin)}})})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};c.style=":host{display:block}.PamMetadata .LoadingSkeleton{width:100%;display:flex;flex-direction:column;gap:10px}.PamMetadata .LoadingSkeleton .SkeletonTitle{width:100px}.PamMetadata .LoadingSkeleton .SkeletonText{width:200px}.PamMetadata .TextContainer{display:flex;flex-direction:column;color:var(--emw--color-typography, #000000);font-size:var(--emw--font-size-small, 12px)}.PamMetadata .TextContainer h4{color:var(--emw--color-primary, #22B04E);font-size:var(--emw--font-size-medium, 18px);margin-top:5px;margin-bottom:5px}";export{c as P}
@@ -1 +1 @@
1
- export{P as pam_metadata}from"./pam-metadata-ee589587.js";import{r as e,h as t,H as n}from"./index-c1c08349.js";const i=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},t("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};i.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{i as ui_skeleton}
1
+ export{P as pam_metadata}from"./pam-metadata-d5caad2b.js";import{r as e,h as t,H as n}from"./index-c1c08349.js";const i=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},t("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};i.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{i as ui_skeleton}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/pam-metadata",
3
- "version": "1.85.16",
3
+ "version": "1.85.18",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as e}from"./index-c1c08349.js";function n(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function i(t,e){const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function r(t,e){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{n.innerHTML=e,t&&t.appendChild(n)}))}}const s={en:{title:"Player Info",lastLoginText:"Last login date: {lastLoginTimestamp}.",errorFetchMessage:"There was an error when fetching last login date"},tr:{title:"Oyuncu Bilgisi",lastLoginText:"Son giriş tarihi: {lastLoginTimestamp}.",errorFetchMessage:"Son giriş tarihi alınırken bir hata oluştu"},ro:{title:"Informații jucător",lastLoginText:"Data ultimei autentificări: {lastLoginTimestamp}.",errorFetchMessage:"A apărut o eroare la preluarea datei ultimei autentificări"},hr:{title:"Informacije o igraču",lastLoginText:"Datum zadnje prijave: {lastLoginTimestamp}.",errorFetchMessage:"Došlo je do pogreške prilikom dohvaćanja datuma zadnje prijave"},"pt-br":{title:"Informações do Jogador",lastLoginText:"Data do último login: {lastLoginTimestamp}.",errorFetchMessage:"Ocorreu um erro ao buscar a data do último login"},"es-mx":{title:"Información del Jugador",lastLoginText:"Fecha del último inicio de sesión: {lastLoginTimestamp}.",errorFetchMessage:"Hubo un error al obtener la fecha del último inicio de sesión"},es:{title:"Información del Jugador",lastLoginText:"Fecha del último inicio de sesión: {lastLoginTimestamp}.",errorFetchMessage:"Hubo un error al obtener la fecha del último inicio de sesión"},pt:{title:"Informações do Jogador",lastLoginText:"Data do último login: {lastLoginTimestamp}.",errorFetchMessage:"Ocorreu um erro ao buscar a data do último login"}},a=(t,e,n)=>{let i=s[void 0!==e&&e in s?e:"en"][t];if(void 0!==n)for(const[t,e]of Object.entries(n.values)){const n=new RegExp(`{${t}}`,"g");i=i.replace(n,e)}return i};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var o={exports:{}};o.exports=function(){var t=6e4,e=36e5,n="millisecond",i="second",r="minute",s="hour",a="day",o="week",u="month",c="quarter",h="year",l="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},p=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},v={s:p,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+p(i,2,"0")+":"+p(r,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(i,u),s=n-r<0,a=e.clone().add(i+(s?-1:1),u);return+(-(i+(n-r)/(s?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:h,w:o,d:a,D:l,h:s,m:r,s:i,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},M="en",y={};y[M]=g;var w="$isDayjsObject",b=function(t){return t instanceof D||!(!t||!t[w])},S=function t(e,n,i){var r;if(!e)return M;if("string"==typeof e){var s=e.toLowerCase();y[s]&&(r=s),n&&(y[s]=n,r=s);var a=e.split("-");if(!r&&a.length>1)return t(a[0])}else{var o=e.name;y[o]=e,r=o}return!i&&r&&(M=r),r||!i&&M},T=function(t,e){if(b(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new D(n)},x=v;x.l=S,x.i=b,x.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function g(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var p=g.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(x.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(f);if(i){var r=i[2]-1||0,s=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return x},p.isValid=function(){return!(this.$d.toString()===d)},p.isSame=function(t,e){var n=T(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return T(t)<this.startOf(e)},p.isBefore=function(t,e){return this.endOf(e)<T(t)},p.$g=function(t,e,n){return x.u(t)?this[e]:this.set(n,t)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(t,e){var n=this,c=!!x.u(e)||e,d=x.p(t),f=function(t,e){var i=x.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return c?i:i.endOf(a)},m=function(t,e){return x.w(n.toDate()[t].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},g=this.$W,p=this.$M,v=this.$D,M="set"+(this.$u?"UTC":"");switch(d){case h:return c?f(1,0):f(31,11);case u:return c?f(1,p):f(0,p+1);case o:var y=this.$locale().weekStart||0,w=(g<y?g+7:g)-y;return f(c?v-w:v+(6-w),p);case a:case l:return m(M+"Hours",0);case s:return m(M+"Minutes",1);case r:return m(M+"Seconds",2);case i:return m(M+"Milliseconds",3);default:return this.clone()}},p.endOf=function(t){return this.startOf(t,!1)},p.$set=function(t,e){var o,c=x.p(t),d="set"+(this.$u?"UTC":""),f=(o={},o[a]=d+"Date",o[l]=d+"Date",o[u]=d+"Month",o[h]=d+"FullYear",o[s]=d+"Hours",o[r]=d+"Minutes",o[i]=d+"Seconds",o[n]=d+"Milliseconds",o)[c],m=c===a?this.$D+(e-this.$W):e;if(c===u||c===h){var g=this.clone().set(l,1);g.$d[f](m),g.init(),this.$d=g.set(l,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},p.set=function(t,e){return this.clone().$set(t,e)},p.get=function(t){return this[x.p(t)]()},p.add=function(n,c){var l,d=this;n=Number(n);var f=x.p(c),m=function(t){var e=T(d);return x.w(e.date(e.date()+Math.round(t*n)),d)};if(f===u)return this.set(u,this.$M+n);if(f===h)return this.set(h,this.$y+n);if(f===a)return m(1);if(f===o)return m(7);var g=(l={},l[r]=t,l[s]=e,l[i]=1e3,l)[f]||1,p=this.$d.getTime()+n*g;return x.w(p,this)},p.subtract=function(t,e){return this.add(-1*t,e)},p.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var i=t||"YYYY-MM-DDTHH:mm:ssZ",r=x.z(this),s=this.$H,a=this.$m,o=this.$M,u=n.weekdays,c=n.months,h=function(t,n,r,s){return t&&(t[n]||t(e,i))||r[n].slice(0,s)},l=function(t){return x.s(s%12||12,t,"0")},f=n.meridiem||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(m,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return x.s(e.$y,4,"0");case"M":return o+1;case"MM":return x.s(o+1,2,"0");case"MMM":return h(n.monthsShort,o,c,3);case"MMMM":return h(c,o);case"D":return e.$D;case"DD":return x.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,u,2);case"ddd":return h(n.weekdaysShort,e.$W,u,3);case"dddd":return u[e.$W];case"H":return String(s);case"HH":return x.s(s,2,"0");case"h":return l(1);case"hh":return l(2);case"a":return f(s,a,!0);case"A":return f(s,a,!1);case"m":return String(a);case"mm":return x.s(a,2,"0");case"s":return String(e.$s);case"ss":return x.s(e.$s,2,"0");case"SSS":return x.s(e.$ms,3,"0");case"Z":return r}return null}(t)||r.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(n,l,d){var f,m=this,g=x.p(l),p=T(n),v=(p.utcOffset()-this.utcOffset())*t,M=this-p,y=function(){return x.m(m,p)};switch(g){case h:f=y()/12;break;case u:f=y();break;case c:f=y()/3;break;case o:f=(M-v)/6048e5;break;case a:f=(M-v)/864e5;break;case s:f=M/e;break;case r:f=M/t;break;case i:f=M/1e3;break;default:f=M}return d?f:x.a(f)},p.daysInMonth=function(){return this.endOf(u).$D},p.$locale=function(){return y[this.$L]},p.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=S(t,e,!0);return i&&(n.$L=i),n},p.clone=function(){return x.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},g}(),L=D.prototype;return T.prototype=L,[["$ms",n],["$s",i],["$m",r],["$H",s],["$W",a],["$M",u],["$y",h],["$D",l]].forEach((function(t){L[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),T.extend=function(t,e){return t.$i||(t(e,D,T),t.$i=!0),T},T.locale=S,T.isDayjs=b,T.unix=function(t){return T(1e3*t)},T.en=y[M],T.Ls=y,T.p={},T}();const u=o.exports,c=class{constructor(n){t(this,n),this.data=null,this.getData=()=>{const t=new URL(`api/v1/players/${this.userId}/player-identifiable-information/`,this.endpoint),e=new Headers({"X-SessionID":this.session});return fetch(t.href,{method:"GET",headers:e}).then((t=>{if(t.ok)return t.json().then((t=>t));throw new Error})).catch((()=>(window.postMessage({type:"WidgetNotification",data:{type:"error",message:a("errorFetchMessage",this.language)}},window.location.href),null)))},this.formatDate=t=>u(t).format(this.dateFormat),this.loadingSkeleton=e("div",{class:"LoadingSkeleton"},e("div",{class:"Title"},e("ui-skeleton",{structure:"title",width:"100%",height:"18px"})),e("div",{class:"Text"},e("ui-skeleton",{structure:"text",width:"100%",height:"14px"}))),this.language="en",this.endpoint="",this.session="",this.userId="",this.dateFormat="DD/MM/YYYY HH:mm",this.mbSource="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isLoading=!0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&i(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&r(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){if(this.getData().then((t=>t&&(this.data=t.player,this.isLoading=!1))),this.translationUrl)return t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{s[e]||(s[e]={});for(let n in t[e])s[e][n]=t[e][n]})),e(!0)}))}));var t}componentDidLoad(){this.stylingContainer&&(this.mbSource&&r(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"36a2665c4e000c17c8bc847b009f64a91d1b1ce4",ref:t=>this.stylingContainer=t,class:"PamMetadata"},this.isLoading?this.loadingSkeleton:e("div",{class:"TextContainer"},e("h4",null,a("title")),e("div",{innerHTML:a("lastLoginText",this.language,{values:{lastLoginTimestamp:this.formatDate(this.data.statusInfo.lastLogin)}})})))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};c.style=":host{display:block}.PamMetadata .LoadingSkeleton{width:100%;display:flex;flex-direction:column;gap:10px}.PamMetadata .LoadingSkeleton .SkeletonTitle{width:100px}.PamMetadata .LoadingSkeleton .SkeletonText{width:200px}.PamMetadata .TextContainer{display:flex;flex-direction:column;color:var(--emw--color-typography, #000000);font-size:var(--emw--font-size-small, 12px)}.PamMetadata .TextContainer h4{color:var(--emw--color-primary, #22B04E);font-size:var(--emw--font-size-medium, 18px);margin-top:5px;margin-bottom:5px}";export{c as P}