@everymatrix/pam-metadata 1.71.2

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.
Files changed (54) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-42065499.js +1184 -0
  3. package/dist/cjs/index.cjs.js +10 -0
  4. package/dist/cjs/loader.cjs.js +15 -0
  5. package/dist/cjs/pam-metadata-f2657afb.js +227 -0
  6. package/dist/cjs/pam-metadata.cjs.js +25 -0
  7. package/dist/cjs/pam-metadata_2.cjs.entry.js +183 -0
  8. package/dist/collection/collection-manifest.json +19 -0
  9. package/dist/collection/components/pam-metadata/index.js +1 -0
  10. package/dist/collection/components/pam-metadata/pam-metadata.css +28 -0
  11. package/dist/collection/components/pam-metadata/pam-metadata.js +272 -0
  12. package/dist/collection/index.js +1 -0
  13. package/dist/collection/utils/locale.utils.js +71 -0
  14. package/dist/esm/app-globals-0f993ce5.js +3 -0
  15. package/dist/esm/index-c1c08349.js +1157 -0
  16. package/dist/esm/index.js +2 -0
  17. package/dist/esm/loader.js +11 -0
  18. package/dist/esm/pam-metadata-072ea225.js +225 -0
  19. package/dist/esm/pam-metadata.js +20 -0
  20. package/dist/esm/pam-metadata_2.entry.js +178 -0
  21. package/dist/index.cjs.js +1 -0
  22. package/dist/index.js +1 -0
  23. package/dist/pam-metadata/app-globals-0f993ce5.js +1 -0
  24. package/dist/pam-metadata/index-c1c08349.js +2 -0
  25. package/dist/pam-metadata/index.esm.js +1 -0
  26. package/dist/pam-metadata/pam-metadata-072ea225.js +1 -0
  27. package/dist/pam-metadata/pam-metadata.esm.js +1 -0
  28. package/dist/pam-metadata/pam-metadata_2.entry.js +1 -0
  29. package/dist/stencil.config.dev.js +19 -0
  30. package/dist/stencil.config.js +19 -0
  31. package/dist/storybook/main.js +43 -0
  32. package/dist/storybook/preview.js +9 -0
  33. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-metadata/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  34. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-metadata/.stencil/packages/stencil/pam-metadata/stencil.config.d.ts +2 -0
  35. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-metadata/.stencil/packages/stencil/pam-metadata/stencil.config.dev.d.ts +2 -0
  36. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-metadata/.stencil/packages/stencil/pam-metadata/storybook/main.d.ts +3 -0
  37. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-metadata/.stencil/packages/stencil/pam-metadata/storybook/preview.d.ts +70 -0
  38. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-metadata/.stencil/tools/plugins/index.d.ts +3 -0
  39. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-metadata/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  40. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-metadata/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  41. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-metadata/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  42. package/dist/types/components/pam-metadata/index.d.ts +1 -0
  43. package/dist/types/components/pam-metadata/pam-metadata.d.ts +26 -0
  44. package/dist/types/components.d.ts +55 -0
  45. package/dist/types/index.d.ts +1 -0
  46. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  47. package/dist/types/utils/locale.utils.d.ts +4 -0
  48. package/loader/cdn.js +1 -0
  49. package/loader/index.cjs.js +1 -0
  50. package/loader/index.d.ts +24 -0
  51. package/loader/index.es2017.js +1 -0
  52. package/loader/index.js +2 -0
  53. package/loader/package.json +11 -0
  54. package/package.json +26 -0
@@ -0,0 +1,2 @@
1
+ export { P as PamMetadata } from './pam-metadata-072ea225.js';
2
+ import './index-c1c08349.js';
@@ -0,0 +1,11 @@
1
+ import { b as bootstrapLazy } from './index-c1c08349.js';
2
+ export { s as setNonce } from './index-c1c08349.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ const defineCustomElements = async (win, options) => {
6
+ if (typeof window === 'undefined') return undefined;
7
+ await globalScripts();
8
+ return bootstrapLazy([["pam-metadata_2",[[1,"pam-metadata",{"language":[513],"endpoint":[513],"session":[513],"userId":[513,"user-id"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
9
+ };
10
+
11
+ export { defineCustomElements };
@@ -0,0 +1,225 @@
1
+ import { r as registerInstance, h } from './index-c1c08349.js';
2
+
3
+ /**
4
+ * @name setClientStyling
5
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
6
+ * @param {HTMLElement} stylingContainer The reference element of the widget
7
+ * @param {string} clientStyling The style content
8
+ */
9
+ function setClientStyling(stylingContainer, clientStyling) {
10
+ if (stylingContainer) {
11
+ const sheet = document.createElement('style');
12
+ sheet.innerHTML = clientStyling;
13
+ stylingContainer.appendChild(sheet);
14
+ }
15
+ }
16
+
17
+ /**
18
+ * @name setClientStylingURL
19
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
20
+ * @param {HTMLElement} stylingContainer The reference element of the widget
21
+ * @param {string} clientStylingUrl The URL of the style content
22
+ */
23
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
24
+ const url = new URL(clientStylingUrl);
25
+
26
+ fetch(url.href)
27
+ .then((res) => res.text())
28
+ .then((data) => {
29
+ const cssFile = document.createElement('style');
30
+ cssFile.innerHTML = data;
31
+ if (stylingContainer) {
32
+ stylingContainer.appendChild(cssFile);
33
+ }
34
+ })
35
+ .catch((err) => {
36
+ console.error('There was an error while trying to load client styling from URL', err);
37
+ });
38
+ }
39
+
40
+ /**
41
+ * @name setStreamLibrary
42
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
43
+ * @param {HTMLElement} stylingContainer The highest element of the widget
44
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
45
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
46
+ */
47
+ function setStreamStyling(stylingContainer, domain, subscription) {
48
+ if (window.emMessageBus) {
49
+ const sheet = document.createElement('style');
50
+
51
+ window.emMessageBus.subscribe(domain, (data) => {
52
+ sheet.innerHTML = data;
53
+ if (stylingContainer) {
54
+ stylingContainer.appendChild(sheet);
55
+ }
56
+ });
57
+ }
58
+ }
59
+
60
+ const DEFAULT_LANGUAGE = 'en';
61
+ const TRANSLATIONS = {
62
+ "en": {
63
+ title: "Player Info",
64
+ lastLoginText: "Last login date: {lastLoginTimestamp}.",
65
+ errorFetchMessage: "There was an error when fetching last login date"
66
+ },
67
+ "tr": {
68
+ title: "Oyuncu Bilgisi",
69
+ lastLoginText: "Son giriş tarihi: {lastLoginTimestamp}.",
70
+ errorFetchMessage: "Son giriş tarihi alınırken bir hata oluştu"
71
+ },
72
+ "ro": {
73
+ title: "Informații jucător",
74
+ lastLoginText: "Data ultimei autentificări: {lastLoginTimestamp}.",
75
+ errorFetchMessage: "A apărut o eroare la preluarea datei ultimei autentificări"
76
+ },
77
+ "hr": {
78
+ title: "Informacije o igraču",
79
+ lastLoginText: "Datum zadnje prijave: {lastLoginTimestamp}.",
80
+ errorFetchMessage: "Došlo je do pogreške prilikom dohvaćanja datuma zadnje prijave"
81
+ },
82
+ "pt-br": {
83
+ title: "Informações do Jogador",
84
+ lastLoginText: "Data do último login: {lastLoginTimestamp}.",
85
+ errorFetchMessage: "Ocorreu um erro ao buscar a data do último login"
86
+ },
87
+ "es-mx": {
88
+ title: "Información del Jugador",
89
+ lastLoginText: "Fecha del último inicio de sesión: {lastLoginTimestamp}.",
90
+ errorFetchMessage: "Hubo un error al obtener la fecha del último inicio de sesión"
91
+ },
92
+ "es": {
93
+ title: "Información del Jugador",
94
+ lastLoginText: "Fecha del último inicio de sesión: {lastLoginTimestamp}.",
95
+ errorFetchMessage: "Hubo un error al obtener la fecha del último inicio de sesión"
96
+ },
97
+ "pt": {
98
+ title: "Informações do Jogador",
99
+ lastLoginText: "Data do último login: {lastLoginTimestamp}.",
100
+ errorFetchMessage: "Ocorreu um erro ao buscar a data do último login"
101
+ }
102
+ };
103
+ const getTranslations = (url) => {
104
+ return new Promise((resolve) => {
105
+ fetch(url)
106
+ .then((res) => res.json())
107
+ .then((data) => {
108
+ Object.keys(data).forEach((lang) => {
109
+ if (!TRANSLATIONS[lang]) {
110
+ TRANSLATIONS[lang] = {};
111
+ }
112
+ for (let key in data[lang]) {
113
+ TRANSLATIONS[lang][key] = data[lang][key];
114
+ }
115
+ });
116
+ resolve(true);
117
+ });
118
+ });
119
+ };
120
+ const translate = (key, customLang, values) => {
121
+ const lang = customLang;
122
+ let translation = TRANSLATIONS[((lang !== undefined) && (lang in TRANSLATIONS)) ? lang : DEFAULT_LANGUAGE][key];
123
+ if (values !== undefined) {
124
+ for (const [key, value] of Object.entries(values.values)) {
125
+ const regex = new RegExp(`{${key}}`, 'g');
126
+ translation = translation.replace(regex, value);
127
+ }
128
+ }
129
+ return translation;
130
+ };
131
+
132
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
133
+
134
+ var dayjs_min = {exports: {}};
135
+
136
+ (function (module, exports) {
137
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,M={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])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.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();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
138
+ }(dayjs_min));
139
+
140
+ const dayjs = dayjs_min.exports;
141
+
142
+ const pamMetadataCss = ":host{display:block}.PamMetadata .LoadingSkeleton{width:100%;display:flex;flex-direction:column;gap:10px}.PamMetadata .LoadingSkeleton .Title{width:100px}.PamMetadata .LoadingSkeleton .Text{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}";
143
+ const PamMetadataStyle0 = pamMetadataCss;
144
+
145
+ const PamMetadata = class {
146
+ constructor(hostRef) {
147
+ registerInstance(this, hostRef);
148
+ this.data = null;
149
+ this.getData = () => {
150
+ const url = new URL(`api/v1/players/${this.userId}/player-identifiable-information/`, this.endpoint);
151
+ const headers = new Headers({ 'X-SessionID': this.session });
152
+ const options = { method: 'GET', headers };
153
+ return fetch(url.href, options).then(res => {
154
+ if (res.ok) {
155
+ return res.json().then(res => res);
156
+ }
157
+ throw new Error;
158
+ }).catch(() => {
159
+ window.postMessage({ type: 'WidgetNotification', data: { type: 'error', message: translate('errorFetchMessage', this.language) } }, window.location.href);
160
+ return null;
161
+ });
162
+ };
163
+ this.formatDate = (date) => {
164
+ return dayjs(date).format(this.dateFormat);
165
+ };
166
+ this.loadingSkeleton = (h("div", { class: "LoadingSkeleton" }, h("div", { class: "Title" }, h("ui-skeleton", { structure: "title", width: "100%", height: "18px" })), h("div", { class: "Text" }, h("ui-skeleton", { structure: "text", width: "100%", height: "14px" }))));
167
+ this.language = 'en';
168
+ this.endpoint = '';
169
+ this.session = '';
170
+ this.userId = '';
171
+ this.dateFormat = 'DD/MM/YYYY HH:mm';
172
+ this.mbSource = '';
173
+ this.clientStyling = '';
174
+ this.clientStylingUrl = '';
175
+ this.translationUrl = '';
176
+ this.isLoading = true;
177
+ }
178
+ handleClientStylingChange(newValue, oldValue) {
179
+ if (newValue != oldValue) {
180
+ setClientStyling(this.stylingContainer, this.clientStyling);
181
+ }
182
+ }
183
+ handleClientStylingUrlChange(newValue, oldValue) {
184
+ if (newValue != oldValue) {
185
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
186
+ }
187
+ }
188
+ handleMbSourceChange(newValue, oldValue) {
189
+ if (newValue != oldValue) {
190
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
191
+ }
192
+ }
193
+ componentWillLoad() {
194
+ this.getData().then(res => res && (this.data = res.player, this.isLoading = false));
195
+ if (this.translationUrl) {
196
+ return getTranslations(this.translationUrl);
197
+ }
198
+ }
199
+ componentDidLoad() {
200
+ if (this.stylingContainer) {
201
+ if (this.mbSource)
202
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
203
+ if (this.clientStyling)
204
+ setClientStyling(this.stylingContainer, this.clientStyling);
205
+ if (this.clientStylingUrl)
206
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
207
+ }
208
+ }
209
+ disconnectedCallback() {
210
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
211
+ }
212
+ render() {
213
+ return (h("div", { key: '36a2665c4e000c17c8bc847b009f64a91d1b1ce4', ref: (el) => (this.stylingContainer = el), class: "PamMetadata" }, this.isLoading
214
+ ? this.loadingSkeleton
215
+ : h("div", { class: "TextContainer" }, h("h4", null, translate('title')), h("div", { innerHTML: translate('lastLoginText', this.language, { values: { lastLoginTimestamp: this.formatDate(this.data.statusInfo.lastLogin) } }) }))));
216
+ }
217
+ static get watchers() { return {
218
+ "clientStyling": ["handleClientStylingChange"],
219
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
220
+ "mbSource": ["handleMbSourceChange"]
221
+ }; }
222
+ };
223
+ PamMetadata.style = PamMetadataStyle0;
224
+
225
+ export { PamMetadata as P };
@@ -0,0 +1,20 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-c1c08349.js';
2
+ export { s as setNonce } from './index-c1c08349.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ /*
6
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
7
+ */
8
+ var patchBrowser = () => {
9
+ const importMeta = import.meta.url;
10
+ const opts = {};
11
+ if (importMeta !== "") {
12
+ opts.resourcesUrl = new URL(".", importMeta).href;
13
+ }
14
+ return promiseResolve(opts);
15
+ };
16
+
17
+ patchBrowser().then(async (options) => {
18
+ await globalScripts();
19
+ return bootstrapLazy([["pam-metadata_2",[[1,"pam-metadata",{"language":[513],"endpoint":[513],"session":[513],"userId":[513,"user-id"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
20
+ });
@@ -0,0 +1,178 @@
1
+ export { P as pam_metadata } from './pam-metadata-072ea225.js';
2
+ import { r as registerInstance, h, H as Host } from './index-c1c08349.js';
3
+
4
+ const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{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)}.Circle{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%}.Text{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)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{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)}.Image{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)}.Logo{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)}}";
5
+ const UiSkeletonStyle0 = uiSkeletonCss;
6
+
7
+ const UiSkeleton = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.stylingValue = {
11
+ width: this.handleStylingProps(this.width),
12
+ height: this.handleStylingProps(this.height),
13
+ borderRadius: this.handleStylingProps(this.borderRadius),
14
+ marginBottom: this.handleStylingProps(this.marginBottom),
15
+ marginTop: this.handleStylingProps(this.marginTop),
16
+ marginLeft: this.handleStylingProps(this.marginLeft),
17
+ marginRight: this.handleStylingProps(this.marginRight),
18
+ size: this.handleStylingProps(this.size)
19
+ };
20
+ this.structure = undefined;
21
+ this.width = 'unset';
22
+ this.height = 'unset';
23
+ this.borderRadius = 'unset';
24
+ this.marginBottom = 'unset';
25
+ this.marginTop = 'unset';
26
+ this.marginLeft = 'unset';
27
+ this.marginRight = 'unset';
28
+ this.animation = true;
29
+ this.rows = 0;
30
+ this.size = '100%';
31
+ }
32
+ handleStructureChange(newValue, oldValue) {
33
+ if (oldValue !== newValue) {
34
+ this.handleStructure(newValue);
35
+ }
36
+ }
37
+ handleStylingProps(value) {
38
+ switch (typeof value) {
39
+ case 'number':
40
+ return value === 0 ? 0 : `${value}px`;
41
+ case 'undefined':
42
+ return 'unset';
43
+ case 'string':
44
+ if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
45
+ value.endsWith('px') ||
46
+ value.endsWith('%')) {
47
+ return value;
48
+ }
49
+ else {
50
+ return 'unset';
51
+ }
52
+ default:
53
+ return 'unset';
54
+ }
55
+ }
56
+ handleStructure(structure) {
57
+ switch (structure) {
58
+ case 'logo':
59
+ return this.renderLogo();
60
+ case 'image':
61
+ return this.renderImage();
62
+ case 'title':
63
+ return this.renderTitle();
64
+ case 'text':
65
+ return this.renderText();
66
+ case 'rectangle':
67
+ return this.renderRectangle();
68
+ case 'circle':
69
+ return this.renderCircle();
70
+ default:
71
+ return null;
72
+ }
73
+ }
74
+ renderLogo() {
75
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Logo ' + (this.animation ? 'Skeleton' : '') })));
76
+ }
77
+ renderImage() {
78
+ return h("div", { class: 'Image ' + (this.animation ? 'Skeleton' : '') });
79
+ }
80
+ renderTitle() {
81
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Title ' + (this.animation ? 'Skeleton' : '') })));
82
+ }
83
+ renderText() {
84
+ return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: 'Text ' + (this.animation ? 'Skeleton' : '') })))));
85
+ }
86
+ renderRectangle() {
87
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Rectangle ' + (this.animation ? 'Skeleton' : '') })));
88
+ }
89
+ renderCircle() {
90
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Circle ' + (this.animation ? 'Skeleton' : '') })));
91
+ }
92
+ render() {
93
+ let styleBlock = '';
94
+ switch (this.structure) {
95
+ case 'logo':
96
+ styleBlock = `
97
+ :host {
98
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
99
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
100
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
101
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
102
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
103
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
104
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
105
+ }
106
+ `;
107
+ break;
108
+ case 'image':
109
+ styleBlock = `
110
+ :host {
111
+ --emw-skeleton-image-width: ${this.stylingValue.width};
112
+ --emw-skeleton-image-height: ${this.stylingValue.height};
113
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
114
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
115
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
116
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
117
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
118
+ }
119
+ `;
120
+ break;
121
+ case 'title':
122
+ styleBlock = `
123
+ :host {
124
+ --emw-skeleton-title-width: ${this.stylingValue.width};
125
+ --emw-skeleton-title-height: ${this.stylingValue.height};
126
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
127
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
128
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
129
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
130
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
131
+ }
132
+ `;
133
+ break;
134
+ case 'text':
135
+ styleBlock = `
136
+ :host {
137
+ --emw-skeleton-text-width: ${this.stylingValue.width};
138
+ --emw-skeleton-text-height: ${this.stylingValue.height};
139
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
140
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
141
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
142
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
143
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
144
+ }
145
+ `;
146
+ break;
147
+ case 'rectangle':
148
+ styleBlock = `
149
+ :host {
150
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
151
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
152
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
153
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
154
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
155
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
156
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
157
+ }
158
+ `;
159
+ break;
160
+ case 'circle':
161
+ styleBlock = `
162
+ :host {
163
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
164
+ }
165
+ `;
166
+ break;
167
+ default:
168
+ styleBlock = '';
169
+ }
170
+ return (h(Host, { key: 'e6b885bfd985ce7663d990756fe9101e25eb97f0' }, h("style", { key: '06ae24c7bb74f4dacfc12ae58085333f9dc89da5' }, styleBlock), this.handleStructure(this.structure)));
171
+ }
172
+ static get watchers() { return {
173
+ "structure": ["handleStructureChange"]
174
+ }; }
175
+ };
176
+ UiSkeleton.style = UiSkeletonStyle0;
177
+
178
+ export { UiSkeleton as ui_skeleton };
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>(0,console.error)(e,t),s=new Map,r=new Map,i="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},u=c.document||{head:{}},a={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},f=e=>Promise.resolve(e),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),d=!1,m=[],p=[],y=(e,t)=>n=>{e.push(n),d||(d=!0,t&&4&a.l?v(w):a.raf(w))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){o(e)}e.length=0},w=()=>{$(m),$(p),(d=m.length>0)&&a.raf(w)},v=e=>f().then(e),b=y(p,!0),S={},g=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>O,map:()=>E,ok:()=>k,unwrap:()=>P,unwrapErr:()=>x});var k=e=>({isOk:!0,isErr:!1,value:e}),O=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>k(e))):k(n)}if(e.isErr)return O(e.value);throw"should never get here"}var C,M,P=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},L=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!g(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.m=o,u},T=(e,t)=>({l:0,p:e,i:t,$:null,h:null,u:null,m:null}),A={},F=new WeakMap,H=e=>"sc-"+e.v,N=(e,t,n,l,o,s)=>{if(n!==l){let r=((e,t)=>t in e)(e,t);if(t.toLowerCase(),"class"===t){const t=e.classList,o=U(n),s=U(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else{const i=g(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&s||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}}},R=/\s/,U=e=>e?e.split(R):[],W=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of D(Object.keys(o)))e in s||N(l,e,o[e],void 0,n,t.l);for(const e of D(Object.keys(s)))N(l,e,o[e],s[e],n,t.l)};function D(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var q=!1,G=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=u.createTextNode(l.i);else if(o=l.$=u.createElement(l.p),W(null,l,q),null!=C&&o["s-si"]!==C&&o.classList.add(o["s-si"]=C),l.h)for(r=0;r<l.h.length;++r)s=G(e,l,r),s&&o.appendChild(s);return o["s-hn"]=M,o},V=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=G(null,n,o),r&&(l[o].$=r,J(i,r,t)))},_=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;I(t),e&&e.remove()}}},z=(e,t,n=!1)=>e.p===t.p&&(!!n||e.m===t.m),B=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(W(e,t,q),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],m=l.length-1,p=l[0],y=l[m];for(;i<=f&&c<=m;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==p)p=l[++c];else if(null==y)y=l[--m];else if(z(h,p,o))B(h,p,o),h=t[++i],p=l[++c];else if(z(d,y,o))B(d,y,o),d=t[--f],y=l[--m];else if(z(h,y,o))B(h,y,o),J(e,h.$,d.$.nextSibling),h=t[++i],y=l[--m];else if(z(d,p,o))B(d,p,o),J(e,d.$,h.$),d=t[--f],p=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].m&&t[a].m===p.m){u=a;break}u>=0?(r=t[u],r.p!==p.p?s=G(t&&t[c],n,u):(B(r,p,o),t[u]=void 0,s=r.$),p=l[++c]):(s=G(t&&t[c],n,c),p=l[++c]),s&&J(h.$.parentNode,s,h.$)}i>f?V(e,null==l[m+1]?null:l[m+1].$,n,l,c,m):c>m&&_(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),V(l,null,t,s,0,s.length-1)):null!==o&&_(o,0,o.length-1)):e.i!==r&&(l.data=r)},I=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(I)},J=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),K=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},Q=(e,t)=>{if(e.l|=16,!(4&e.l))return K(e,e.j),b((()=>X(e,t)));e.l|=512},X=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=oe(n,"componentWillLoad")),Y(l,(()=>ee(e,n,t)))},Y=(e,t)=>Z(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),Z=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ee=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=H(t),o=r.get(l);if(e=11===e.nodeType?e:u,o)if("string"==typeof o){let s,r=F.get(e=e.head||e);if(r||F.set(e,r=new Set),!r.has(l)){{s=u.createElement("style"),s.innerHTML=o;const t=null!=(n=a.O)?n:j(u);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=i),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);te(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ne(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},te=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||T(null,null),r=(e=>e&&e.p===A)(t)?t:L(null,null,t);if(M=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.p=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,C=l["s-sc"],B(s,r,n)})(e,t,l)}catch(t){o(t,e.$hostElement$)}return null},ne=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,se(t),oe(n,"componentDidLoad"),e.P(t),l||le()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>Q(e,!1))),e.l&=-517},le=()=>{se(u.documentElement),v((()=>(e=>{const t=a.ce("appload",{detail:{namespace:"pam-metadata"}});return e.dispatchEvent(t),t})(c)))},oe=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){o(e)}},se=e=>e.classList.add("hydrated"),re=(e,t,l)=>{var s,r;const i=e.prototype;if(t.L||t.T||e.watchers){e.watchers&&!t.T&&(t.T=e.watchers);const c=Object.entries(null!=(s=t.L)?s:{});if(c.map((([e,[s]])=>{(31&s||2&l&&32&s)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).A.get(t))(0,e)},set(l){((e,t,l,s)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${s.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.A.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||g(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,s.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.A.set(t,l),a)){if(s.T&&128&u){const e=s.T[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){o(e,i)}}))}2==(18&u)&&Q(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){a.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.T)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.T)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},ie=e=>{oe(e,"disconnectedCallback")},ce=(e,l={})=>{var f;const d=[],m=l.exclude||[],p=c.customElements,y=u.head,$=y.querySelector("meta[charset]"),w=u.createElement("style"),v=[];let b,S=!0;Object.assign(a,l),a.o=new URL(l.resourcesUrl||"./",u.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var i;const c={l:l[0],v:l[1],L:l[2],F:l[3]};4&c.l&&(g=!0),c.L=l[2],c.M=[],c.T=null!=(i=l[4])?i:{};const u=c.v,f=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,A:new Map};l.H=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),S?v.push(this):a.jmp((()=>(e=>{if(!(1&a.l)){const t=n(e),l=t.k,i=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.H)&&t.H.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){K(t,t.j=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.N){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.N;if(!n)return;const l=s.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(s.set(n,e),e[t])),o)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.R}" was not found`);l.isProxied||(n.T=l.watchers,re(l,n,2),l.isProxied=!0);const r=()=>{};t.l|=8;try{new l(t)}catch(e){o(e)}t.l&=-9,t.l|=128,r()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=H(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);h&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const i=t.j,c=()=>Q(t,!0);i&&i["s-rc"]?i["s-rc"].push(c):c()})(e,t,l)}i()}})(this)))}disconnectedCallback(){a.jmp((()=>(async()=>{if(!(1&a.l)){const e=n(this);(null==e?void 0:e.t)?ie(e.t):(null==e?void 0:e.H)&&e.H.then((()=>ie(e.t)))}})()))}componentOnReady(){return n(this).H}};c.N=e[0],m.includes(u)||p.get(u)||(d.push(u),p.define(u,re(f,c,1)))}))})),d.length>0&&(g&&(w.textContent+=i),w.textContent+=d.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(f=a.O)?f:j(u);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}S=!1,v.length?v.map((e=>e.connectedCallback())):a.jmp((()=>b=setTimeout(le,30)))},ue=e=>a.O=e;export{A as H,ce as b,L as h,f as p,l as r,ue as s}
@@ -0,0 +1 @@
1
+ export{P as PamMetadata}from"./pam-metadata-072ea225.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){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])},T=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},S=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=T,x.i=b,x.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function g(t){this.$L=T(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=S(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return S(t)<this.startOf(e)},p.isBefore=function(t,e){return this.endOf(e)<S(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=S(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=S(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=T(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 S.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])}})),S.extend=function(t,e){return t.$i||(t(e,D,S),t.$i=!0),S},S.locale=T,S.isDayjs=b,S.unix=function(t){return S(1e3*t)},S.en=y[M],S.Ls=y,S.p={},S}();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 .Title{width:100px}.PamMetadata .LoadingSkeleton .Text{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}
@@ -0,0 +1 @@
1
+ import{p as t,b as n}from"./index-c1c08349.js";export{s as setNonce}from"./index-c1c08349.js";import{g as a}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,a={};return""!==n&&(a.resourcesUrl=new URL(".",n).href),t(a)})().then((async t=>(await a(),n([["pam-metadata_2",[[1,"pam-metadata",{language:[513],endpoint:[513],session:[513],userId:[513,"user-id"],dateFormat:[513,"date-format"],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isLoading:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]]],t))));
@@ -0,0 +1 @@
1
+ export{P as pam_metadata}from"./pam-metadata-072ea225.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:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Title "+(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:"Text "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Circle "+(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:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},t("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};i.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{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)}.Circle{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%}.Text{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)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{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)}.Image{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)}.Logo{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}
@@ -0,0 +1,19 @@
1
+ import { sass } from "@stencil/sass";
2
+ export const config = {
3
+ namespace: 'pam-metadata',
4
+ taskQueue: 'async',
5
+ sourceMap: false,
6
+ minifyJs: true,
7
+ extras: {
8
+ experimentalImportInjection: true
9
+ },
10
+ plugins: [sass()],
11
+ outputTargets: [
12
+ {
13
+ type: 'www'
14
+ },
15
+ {
16
+ type: 'docs-readme'
17
+ }
18
+ ]
19
+ };
@@ -0,0 +1,19 @@
1
+ import { cleanPackageJsonStencil } from "../../../tools/plugins";
2
+ import { sass } from "@stencil/sass";
3
+ export const config = {
4
+ namespace: 'pam-metadata',
5
+ taskQueue: 'async',
6
+ sourceMap: false,
7
+ minifyJs: true,
8
+ hashFileNames: false,
9
+ extras: {
10
+ experimentalImportInjection: true
11
+ },
12
+ plugins: [cleanPackageJsonStencil(), sass()],
13
+ outputTargets: [
14
+ {
15
+ type: 'dist',
16
+ esmLoaderPath: '../loader'
17
+ }
18
+ ]
19
+ };