@everymatrix/user-login 1.27.10 → 1.28.0
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.
- package/dist/cjs/{index-82356713.js → index-fe0c4e58.js} +0 -15
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/user-login.cjs.entry.js +2 -4
- package/dist/cjs/user-login.cjs.js +1 -1
- package/dist/collection/components/user-login/user-login.js +2 -19
- package/dist/components/user-login.js +2 -4
- package/dist/esm/{index-9a6bbcb2.js → index-eac3e5db.js} +1 -15
- package/dist/esm/loader.js +1 -1
- package/dist/esm/user-login.entry.js +2 -4
- package/dist/esm/user-login.js +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/user-login/.stencil/packages/user-login/stencil.config.d.ts +2 -0
- package/dist/types/components/user-login/user-login.d.ts +0 -2
- package/dist/types/components.d.ts +0 -1
- package/dist/user-login/p-0c865c25.js +1 -0
- package/dist/user-login/p-30ce16c8.entry.js +1 -0
- package/dist/user-login/user-login.esm.js +1 -1
- package/package.json +1 -1
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/user-login/.stencil/packages/user-login/stencil.config.d.ts +0 -2
- package/dist/user-login/p-8235eaf1.js +0 -1
- package/dist/user-login/p-ac3e3ea8.entry.js +0 -1
|
@@ -572,20 +572,6 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
572
572
|
// synchronous patch
|
|
573
573
|
patch(oldVNode, rootVnode);
|
|
574
574
|
};
|
|
575
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
576
|
-
const createEvent = (ref, name, flags) => {
|
|
577
|
-
const elm = getElement(ref);
|
|
578
|
-
return {
|
|
579
|
-
emit: (detail) => {
|
|
580
|
-
return emitEvent(elm, name, {
|
|
581
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
582
|
-
composed: !!(flags & 2 /* Composed */),
|
|
583
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
584
|
-
detail,
|
|
585
|
-
});
|
|
586
|
-
},
|
|
587
|
-
};
|
|
588
|
-
};
|
|
589
575
|
/**
|
|
590
576
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
591
577
|
* @param elm the target of the Event
|
|
@@ -1235,7 +1221,6 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
1235
1221
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1236
1222
|
|
|
1237
1223
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1238
|
-
exports.createEvent = createEvent;
|
|
1239
1224
|
exports.h = h;
|
|
1240
1225
|
exports.promiseResolve = promiseResolve;
|
|
1241
1226
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-fe0c4e58.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'cz', 'de', 'hr'];
|
|
@@ -94,7 +94,6 @@ const userLoginCss = ":host{display:block;font-family:\"Roboto\", sans-serif}sec
|
|
|
94
94
|
const UserLogin = class {
|
|
95
95
|
constructor(hostRef) {
|
|
96
96
|
index.registerInstance(this, hostRef);
|
|
97
|
-
this.hasToSetConsents = index.createEvent(this, "hasToSetConsents", 7);
|
|
98
97
|
/**
|
|
99
98
|
* Endpoint
|
|
100
99
|
*/
|
|
@@ -160,7 +159,7 @@ const UserLogin = class {
|
|
|
160
159
|
}).then((data) => {
|
|
161
160
|
var _a, _b;
|
|
162
161
|
if ((_a = data.sessionBlockers) === null || _a === void 0 ? void 0 : _a.includes('has-to-set-consents')) {
|
|
163
|
-
|
|
162
|
+
window.postMessage({ type: 'PlayerActions', gmversion: 'gm16' }, window.location.href);
|
|
164
163
|
}
|
|
165
164
|
if ((data === null || data === void 0 ? void 0 : data.hasToSetPass) === true) {
|
|
166
165
|
window.postMessage({ type: 'HasToSetPass' }, window.location.href);
|
|
@@ -171,7 +170,6 @@ const UserLogin = class {
|
|
|
171
170
|
type: 'success',
|
|
172
171
|
message: translate('successMessage', this.lang)
|
|
173
172
|
} }, window.location.href);
|
|
174
|
-
window.postMessage({ type: 'ModalStatus', open: true }, window.location.href);
|
|
175
173
|
this.hasError = false;
|
|
176
174
|
}
|
|
177
175
|
else {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Prop, State, Watch,
|
|
1
|
+
import { Component, Prop, State, Watch, h } from '@stencil/core';
|
|
2
2
|
import { getTranslations, translate } from '../../utils/locale.utils';
|
|
3
3
|
export class UserLogin {
|
|
4
4
|
constructor() {
|
|
@@ -67,7 +67,7 @@ export class UserLogin {
|
|
|
67
67
|
}).then((data) => {
|
|
68
68
|
var _a, _b;
|
|
69
69
|
if ((_a = data.sessionBlockers) === null || _a === void 0 ? void 0 : _a.includes('has-to-set-consents')) {
|
|
70
|
-
|
|
70
|
+
window.postMessage({ type: 'PlayerActions', gmversion: 'gm16' }, window.location.href);
|
|
71
71
|
}
|
|
72
72
|
if ((data === null || data === void 0 ? void 0 : data.hasToSetPass) === true) {
|
|
73
73
|
window.postMessage({ type: 'HasToSetPass' }, window.location.href);
|
|
@@ -78,7 +78,6 @@ export class UserLogin {
|
|
|
78
78
|
type: 'success',
|
|
79
79
|
message: translate('successMessage', this.lang)
|
|
80
80
|
} }, window.location.href);
|
|
81
|
-
window.postMessage({ type: 'ModalStatus', open: true }, window.location.href);
|
|
82
81
|
this.hasError = false;
|
|
83
82
|
}
|
|
84
83
|
else {
|
|
@@ -419,22 +418,6 @@ export class UserLogin {
|
|
|
419
418
|
"errorMessage": {},
|
|
420
419
|
"hasError": {}
|
|
421
420
|
}; }
|
|
422
|
-
static get events() { return [{
|
|
423
|
-
"method": "hasToSetConsents",
|
|
424
|
-
"name": "hasToSetConsents",
|
|
425
|
-
"bubbles": true,
|
|
426
|
-
"cancelable": true,
|
|
427
|
-
"composed": true,
|
|
428
|
-
"docs": {
|
|
429
|
-
"tags": [],
|
|
430
|
-
"text": ""
|
|
431
|
-
},
|
|
432
|
-
"complexType": {
|
|
433
|
-
"original": "boolean",
|
|
434
|
-
"resolved": "boolean",
|
|
435
|
-
"references": {}
|
|
436
|
-
}
|
|
437
|
-
}]; }
|
|
438
421
|
static get watchers() { return [{
|
|
439
422
|
"propName": "translationUrl",
|
|
440
423
|
"methodName": "handleNewTranslations"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement,
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'cz', 'de', 'hr'];
|
|
@@ -92,7 +92,6 @@ const UserLogin$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
92
92
|
super();
|
|
93
93
|
this.__registerHost();
|
|
94
94
|
this.__attachShadow();
|
|
95
|
-
this.hasToSetConsents = createEvent(this, "hasToSetConsents", 7);
|
|
96
95
|
/**
|
|
97
96
|
* Endpoint
|
|
98
97
|
*/
|
|
@@ -158,7 +157,7 @@ const UserLogin$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
158
157
|
}).then((data) => {
|
|
159
158
|
var _a, _b;
|
|
160
159
|
if ((_a = data.sessionBlockers) === null || _a === void 0 ? void 0 : _a.includes('has-to-set-consents')) {
|
|
161
|
-
|
|
160
|
+
window.postMessage({ type: 'PlayerActions', gmversion: 'gm16' }, window.location.href);
|
|
162
161
|
}
|
|
163
162
|
if ((data === null || data === void 0 ? void 0 : data.hasToSetPass) === true) {
|
|
164
163
|
window.postMessage({ type: 'HasToSetPass' }, window.location.href);
|
|
@@ -169,7 +168,6 @@ const UserLogin$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
169
168
|
type: 'success',
|
|
170
169
|
message: translate('successMessage', this.lang)
|
|
171
170
|
} }, window.location.href);
|
|
172
|
-
window.postMessage({ type: 'ModalStatus', open: true }, window.location.href);
|
|
173
171
|
this.hasError = false;
|
|
174
172
|
}
|
|
175
173
|
else {
|
|
@@ -550,20 +550,6 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
550
550
|
// synchronous patch
|
|
551
551
|
patch(oldVNode, rootVnode);
|
|
552
552
|
};
|
|
553
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
554
|
-
const createEvent = (ref, name, flags) => {
|
|
555
|
-
const elm = getElement(ref);
|
|
556
|
-
return {
|
|
557
|
-
emit: (detail) => {
|
|
558
|
-
return emitEvent(elm, name, {
|
|
559
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
560
|
-
composed: !!(flags & 2 /* Composed */),
|
|
561
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
562
|
-
detail,
|
|
563
|
-
});
|
|
564
|
-
},
|
|
565
|
-
};
|
|
566
|
-
};
|
|
567
553
|
/**
|
|
568
554
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
569
555
|
* @param elm the target of the Event
|
|
@@ -1212,4 +1198,4 @@ const flush = () => {
|
|
|
1212
1198
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1213
1199
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1214
1200
|
|
|
1215
|
-
export { bootstrapLazy as b,
|
|
1201
|
+
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, h } from './index-eac3e5db.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'cz', 'de', 'hr'];
|
|
@@ -90,7 +90,6 @@ const userLoginCss = ":host{display:block;font-family:\"Roboto\", sans-serif}sec
|
|
|
90
90
|
const UserLogin = class {
|
|
91
91
|
constructor(hostRef) {
|
|
92
92
|
registerInstance(this, hostRef);
|
|
93
|
-
this.hasToSetConsents = createEvent(this, "hasToSetConsents", 7);
|
|
94
93
|
/**
|
|
95
94
|
* Endpoint
|
|
96
95
|
*/
|
|
@@ -156,7 +155,7 @@ const UserLogin = class {
|
|
|
156
155
|
}).then((data) => {
|
|
157
156
|
var _a, _b;
|
|
158
157
|
if ((_a = data.sessionBlockers) === null || _a === void 0 ? void 0 : _a.includes('has-to-set-consents')) {
|
|
159
|
-
|
|
158
|
+
window.postMessage({ type: 'PlayerActions', gmversion: 'gm16' }, window.location.href);
|
|
160
159
|
}
|
|
161
160
|
if ((data === null || data === void 0 ? void 0 : data.hasToSetPass) === true) {
|
|
162
161
|
window.postMessage({ type: 'HasToSetPass' }, window.location.href);
|
|
@@ -167,7 +166,6 @@ const UserLogin = class {
|
|
|
167
166
|
type: 'success',
|
|
168
167
|
message: translate('successMessage', this.lang)
|
|
169
168
|
} }, window.location.href);
|
|
170
|
-
window.postMessage({ type: 'ModalStatus', open: true }, window.location.href);
|
|
171
169
|
this.hasError = false;
|
|
172
170
|
}
|
|
173
171
|
else {
|
package/dist/esm/user-login.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Event, EventEmitter } from '../../stencil-public-runtime';
|
|
2
1
|
export declare class UserLogin {
|
|
3
2
|
/**
|
|
4
3
|
* Endpoint
|
|
@@ -54,7 +53,6 @@ export declare class UserLogin {
|
|
|
54
53
|
private limitStylingAppends;
|
|
55
54
|
private errorMessage;
|
|
56
55
|
private hasError;
|
|
57
|
-
hasToSetConsents: EventEmitter<boolean>;
|
|
58
56
|
handleNewTranslations(): void;
|
|
59
57
|
componentWillLoad(): Promise<void>;
|
|
60
58
|
private stylingContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",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)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=new WeakMap,a=e=>"sc-"+e.o,f={},h=e=>"object"==(e=typeof e)||"function"===e,$=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!h(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?p(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=p(e,null);return c.u=t,r.length>0&&(c.h=r),c},p=(e,t)=>({t:0,$:e,i:t,p:null,h:null,u:null}),y={},d=(e,t,n,l,o,i)=>{if(n!==l){let c=V(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=w(n),o=w(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=h(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):V(s,u)?u.slice(2):u[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},m=/\s/,w=e=>e?e.split(m):[],b=(e,t,n,l)=>{const s=11===t.p.nodeType&&t.p.host?t.p.host:t.p,o=e&&e.u||f,r=t.u||f;for(l in o)l in r||d(s,l,o[l],void 0,n,t.t);for(l in r)d(s,l,o[l],r[l],n,t.t)},g=(t,l,s)=>{let r,i,c=l.h[s],u=0;if(null!==c.i)r=c.p=o.createTextNode(c.i);else{if(n||(n="svg"===c.$),r=c.p=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.$),n&&"foreignObject"===c.$&&(n=!1),b(null,c,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),c.h)for(u=0;u<c.h.length;++u)i=g(t,c,u),i&&r.appendChild(i);"svg"===c.$?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=g(null,l,o),i&&(s[o].p=i,c.insertBefore(i,n)))},j=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.p,M(l),s.remove())},v=(e,t)=>e.$===t.$,O=(e,t)=>{const l=t.p=e.p,s=e.h,o=t.h,r=t.$,i=t.i;null===i?(n="svg"===r||"foreignObject"!==r&&n,b(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],h=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==h?h=l[--a]:v(c,f)?(O(c,f),c=t[++o],f=l[++r]):v(u,h)?(O(u,h),u=t[--i],h=l[--a]):v(c,h)?(O(c,h),e.insertBefore(c.p,u.p.nextSibling),c=t[++o],h=l[--a]):v(u,f)?(O(u,f),e.insertBefore(u.p,c.p),u=t[--i],f=l[++r]):(s=g(t&&t[r],n,r),f=l[++r],s&&c.p.parentNode.insertBefore(s,c.p));o>i?S(e,null==l[a+1]?null:l[a+1].p,n,l,r,a):r>a&&j(t,o,i)})(l,s,t,o):null!==o?(null!==e.i&&(l.textContent=""),S(l,null,t,o,0,o.length-1)):null!==s&&j(s,0,s.length-1),n&&"svg"===r&&(n=!1)):e.i!==i&&(l.data=i)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(M)},k=(e,t)=>{t&&!e.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.m=t)))},C=(e,t)=>{if(e.t|=16,!(4&e.t))return k(e,e.g),Z((()=>x(e,t)));e.t|=512},x=(e,t)=>{const n=e.S;let l;return t&&(l=R(n,"componentWillLoad")),T(l,(()=>P(e,n,t)))},P=async(e,t,n)=>{const l=e.j,s=l["s-rc"];n&&(e=>{const t=e.v,n=e.j,l=t.t,s=((e,t)=>{let n=a(t),l=G.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=u.get(e=e.head||e);s||u.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);E(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>L(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},E=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.v,r=n.O||p(null,null),i=(e=>e&&e.$===y)(l)?l:$(null,null,l);t=s.tagName,o.M&&(i.u=i.u||{},o.M.map((([e,t])=>i.u[t]=s[e]))),i.$=null,i.t|=4,n.O=i,i.p=r.p=s.shadowRoot||s,e=s["s-sc"],O(r,i)})(n,l)}catch(e){_(e,n.j)}return null},L=e=>{const t=e.j,n=e.g;R(e.S,"componentDidRender"),64&e.t||(e.t|=64,W(t),e.k(t),n||N()),e.m&&(e.m(),e.m=void 0),512&e.t&&Y((()=>C(e,!1))),e.t&=-517},N=()=>{W(o.documentElement),Y((()=>(e=>{const t=r.ce("appload",{detail:{namespace:"user-login"}});return e.dispatchEvent(t),t})(s)))},R=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){_(e)}},T=(e,t)=>e&&e.then?e.then(t):t(),W=e=>e.classList.add("hydrated"),A=(e,t,n)=>{if(t.C){e.watchers&&(t.P=e.watchers);const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>D(this).L.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=D(e),o=s.j,r=s.L.get(t),i=s.t,c=s.S;if(n=((e,t)=>null==e||h(e)?e:1&t?e+"":e)(n,l.C[t][0]),(!(8&i)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(s.L.set(t,n),c)){if(l.P&&128&i){const e=l.P[t];e&&e.map((e=>{try{c[e](n,r,t)}catch(e){_(e,o)}}))}2==(18&i)&&C(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){r.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.M.push([e,s]),s}))}}return e},U=(e,t={})=>{const n=[],l=t.exclude||[],i=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let p,y=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],C:t[2],N:t[3]};s.C=t[2],s.M=[],s.P={};const o=s.o,u=class extends HTMLElement{constructor(e){super(e),H(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){p&&(clearTimeout(p),p=null),y?$.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=D(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){k(t,t.g=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=B(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.P=s.watchers,A(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){_(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=a(n);if(!G.has(t)){const l=()=>{};((e,t,n)=>{let l=G.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,G.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>C(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>{}))}componentOnReady(){return D(this).R}};s.T=e[0],l.includes(o)||i.get(o)||(n.push(o),i.define(o,A(u,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),u.insertBefore(h,f?f.nextSibling:u.firstChild),y=!1,$.length?$.map((e=>e.connectedCallback())):r.jmp((()=>p=setTimeout(N,30)))},q=new WeakMap,D=e=>q.get(e),F=(e,t)=>q.set(t.S=e,t),H=(e,t)=>{const n={t:0,j:e,v:t,L:new Map};return n.R=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],q.set(e,n)},V=(e,t)=>t in e,_=(e,t)=>(0,console.error)(e,t),z=new Map,B=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=z.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(z.set(n,e),e[t])),_)},G=new Map,I=[],J=[],K=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?Y(X):r.raf(X))},Q=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){_(e)}e.length=0},X=()=>{Q(I),Q(J),(l=I.length>0)&&r.raf(X)},Y=e=>i().then(e),Z=K(J,!0);export{U as b,$ as h,i as p,F as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as i}from"./p-0c865c25.js";const t=["ro","en","cz","de","hr"],o={en:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},ro:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},hr:{invalidField:"Ovo polje je nevažeće",forgotPassword:"Zaboravljena lozinka",userEmail:"Korisničko ime ili email",password:"Lozinka",login:"Prijava",genericError:"Došlo je do neočekivane pogreške",successMessage:"Prijava uspješna"},fr:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},cs:{invalidField:"Ovo polje je nevažeće.",forgotPassword:"Zaboravio sam lozinku ",userEmail:"Korisničko ime ili email",password:"Lozinka",login:"Prijava",genericError:"An unexpected error has occured",successMessage:"Login successful"},de:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"}},e=s=>new Promise((i=>{fetch(s).then((s=>s.json())).then((s=>{Object.keys(s).forEach((i=>{for(let t in s[i])o[i][t]=s[i][t]})),i(!0)}))})),r=(s,i,e)=>{const r=i;let n=o[void 0!==r&&t.includes(r)?r:"en"][s];if(void 0!==e)for(const[s,i]of Object.entries(e.values)){const t=new RegExp(`{${s}}`,"g");n=n.replace(t,i)}return n},n=class{constructor(i){s(this,i),this.endpoint="",this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.passwordReset="false",this.userEmailRegexOptions="i",this.passwordRegexOptions="",this.userNameEmail="",this.userPassword="",this.isValidUserEmail=!0,this.isValidPassword=!0,this.isPasswordVisible=!1,this.limitStylingAppends=!1,this.errorMessage="",this.hasError=!1,this.userLogin=async({username:s,password:i})=>{let t={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:s,password:i})};fetch(`${this.endpoint}/v1/player/legislation/login`,t).then((s=>s.json())).then((s=>{var i,t;(null===(i=s.sessionBlockers)||void 0===i?void 0:i.includes("has-to-set-consents"))&&window.postMessage({type:"PlayerActions",gmversion:"gm16"},window.location.href),!0===(null==s?void 0:s.hasToSetPass)&&window.postMessage({type:"HasToSetPass"},window.location.href),s.sessionId?(window.postMessage({type:"UserSessionID",session:s.sessionId,userid:s.userId},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:r("successMessage",this.lang)}},window.location.href),this.hasError=!1):(this.hasError=!0,this.errorMessage=null===(t=null==s?void 0:s.thirdPartyResponse)||void 0===t?void 0:t.message,this.errorMessage&&(console.error(this.errorMessage),this.sendErrorNotification(this.errorMessage)))})).catch((s=>{console.error(s),this.hasError=!0,this.errorMessage=r("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}))},this.debouncedUserLogin=this.debounce(this.userLogin,850),this.handleLogin=()=>{this.debouncedUserLogin({username:this.userNameEmail,password:this.userPassword})},this.setClientStyling=()=>{let s=document.createElement("style");s.innerHTML=this.clientStyling,this.stylingContainer.appendChild(s)},this.setClientStylingURL=()=>{let s=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(s.href).then((s=>s.text())).then((s=>{i.innerHTML=s,setTimeout((()=>{this.stylingContainer.appendChild(i)}),1)}))},this.handleInputChange=(s,i)=>{this.hasError=!1;const t=s.target.value;"user"===i?(this.userNameEmail=t,this.isValidUserEmail=this.userEmailValidation(this.userNameEmail)):(this.userPassword=t,this.isValidPassword=this.passwordValidation(t))},this.userEmailValidation=s=>new RegExp(this.userEmailRegex,this.userEmailRegexOptions).test(s),this.passwordValidation=s=>new RegExp(this.passwordRegex,this.passwordRegexOptions).test(s),this.togglePassword=()=>{this.isPasswordVisible=!this.isPasswordVisible},this.resetPassword=()=>{window.postMessage({type:"NavForgotPassword"},window.location.href)}}handleNewTranslations(){e(this.translationUrl)}async componentWillLoad(){this.translationUrl.length>2&&await e(this.translationUrl)}sendErrorNotification(s){window.postMessage({type:"HasError",error:s},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:s}},window.location.href)}debounce(s,i){let t;return function(...o){clearTimeout(t),t=setTimeout((()=>{s.apply(this,o)}),i)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let s=i("span",{class:"InputIcon"},this.isPasswordVisible&&i("svg",{onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.844",height:"12.887",viewBox:"0 0 18.844 12.887"},i("g",{transform:"translate(-110.856 -23.242)"},i("circle",{class:"PasswordVisibilityIcon",cx:"0.05",cy:"0.05",r:"0.05",transform:"translate(121.017 31.148)"}),i("g",{transform:"translate(117.499 27.37)"},i("path",{class:"PasswordVisibilityIcon",d:"M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z",transform:"translate(-142.164 -39.123)"}),i("path",{class:"PasswordVisibilityIcon",d:"M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z",transform:"translate(-136.413 -42.068)"})),i("g",{transform:"translate(110.856 24.899)"},i("path",{class:"PasswordVisibilityIcon",d:"M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z",transform:"translate(-110.856 -33.157)"}),i("path",{class:"PasswordVisibilityIcon",d:"M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z",transform:"translate(-130.743 -29.617)"})),i("rect",{class:"PasswordVisibilityIcon",width:"0.972",height:"15.861",rx:"0.486",transform:"translate(114.827 23.858) rotate(-39.315)"}))),!this.isPasswordVisible&&i("svg",{onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility PasswordVisible",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.843",height:"10.5",viewBox:"0 0 18.843 10.5"},i("g",{transform:"translate(-14.185 -27.832)"},i("path",{class:"PasswordVisibilityIcon",d:"M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z",transform:"translate(0)"}),i("circle",{class:"PasswordVisibilityIcon",cx:"2.779",cy:"2.779",r:"2.779",transform:"translate(20.827 30.303)"})))),t=i("div",{class:"FormBox"},i("div",{class:"FormValue"},i("div",{class:!this.isValidUserEmail||this.hasError?"InputBox InputInvalidBox":"InputBox"},i("input",{type:"text",placeholder:"",value:this.userNameEmail,onFocus:s=>this.handleInputChange(s,"user"),onInput:s=>this.handleInputChange(s,"user"),required:!0}),i("label",{class:(this.userNameEmail?"FieldFilledIn":"")+" "+(!this.isValidUserEmail||this.hasError?"FieldInvalid":"")},r("userEmail",this.lang)),!this.isValidUserEmail&&i("p",{class:"InvalidField"},r("invalidField",this.lang))),i("div",{class:!this.isValidPassword||this.hasError?"InputBox InputInvalidBox":"InputBox"},s,i("input",{type:this.isPasswordVisible?"text":"password",placeholder:"",value:this.userPassword,onFocus:s=>this.handleInputChange(s,"password"),onInput:s=>this.handleInputChange(s,"password"),required:!0}),i("label",{class:(this.userPassword?"FieldFilledIn":"")+" "+(!this.isValidPassword||this.hasError?"FieldInvalid":"")},r("password",this.lang)),!this.isValidPassword&&i("p",{class:"InvalidField"},r("invalidField",this.lang))),"true"==this.passwordReset&&i("div",{class:"ForgotPassword"},i("button",{onClick:()=>this.resetPassword()},r("forgotPassword",this.lang))),i("button",{disabled:!(this.isValidUserEmail&&this.isValidPassword&&this.userNameEmail&&this.userPassword),class:"SubmitCredentials",onClick:()=>this.handleLogin()},r("login",this.lang)),this.hasError&&i("p",{class:"CredentialsError"},this.errorMessage?this.errorMessage:r("genericError",this.lang))));return i("section",{ref:s=>this.stylingContainer=s},t)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};n.style=':host{display:block;font-family:"Roboto", sans-serif}section{height:100%;width:100%;background-position:center;background-size:cover}.FormBox{height:100%;display:flex;position:relative;background:none;border:none;backdrop-filter:blur(15px) brightness(80%);justify-content:center;align-items:center}.InputBox{position:relative;margin:30px 0;width:310px;border-bottom:2px solid #0797B9}.InputBox.InputInvalidBox::after{content:"";height:2px;width:100%;transition:width 0.6s linear;background:#C23135}.InputBox::after{content:"";display:block;width:0;height:2px;position:relative;top:2px}.InputBox .PasswordVisibilityIcon{fill:#0797B9}.InputBox .InputIcon .TogglePasswordVisibility{cursor:pointer;position:absolute;top:18px;right:0}.InputBox .InputIcon .TogglePasswordVisibility.PasswordVisible{top:19.5px}.InputBox label{position:absolute;top:50%;left:5px;transform:translateY(-50%);color:#0797B9;font-size:1em;pointer-events:none;transition:0.5s}.InputBox label.FieldInvalid{color:#C23135}.InputBox input{width:100%;height:50px;background:transparent;border:none;outline:none;font-size:1em;padding:0 35px 0 5px;color:#fff;box-sizing:border-box}input:focus~label,label.FieldFilledIn{top:-3px;font-size:0.7em}.ForgotPassword button{margin:-10px 0 17px;font-size:0.9em;color:#0797B9;display:flex;justify-content:space-between;background-color:transparent;padding:0;height:unset;border:0;cursor:pointer}.ForgotPassword button:hover{color:#fff}.SubmitCredentials{display:block;margin:0 auto;padding:10px 20px;border-radius:5px;color:#fff;background:linear-gradient(to right, #EA0C66, #77318F);border:none;outline:none;cursor:pointer;font-size:1em}.SubmitCredentials:disabled{background:#707070}.Register{font-size:0.9em;color:#fff;text-align:center;margin:25px 0 10px}.Register p a{text-decoration:none;color:#fff;font-weight:600}.Register p a:hover{text-decoration:underline}.InvalidField{position:absolute;top:45px;color:#C23135;font-size:0.7em}.SubmitCredentials{margin-bottom:20px}.CredentialsError{color:#C23135;font-size:0.7em;padding:0 0 20px 0;margin:0}@media screen and (max-width: 480px){.FormBox{width:100%;border-radius:0px}}';export{n as user_login}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as s,b as e}from"./p-
|
|
1
|
+
import{p as s,b as e}from"./p-0c865c25.js";(()=>{const e=import.meta.url,r={};return""!==e&&(r.resourcesUrl=new URL(".",e).href),s(r)})().then((s=>e([["p-30ce16c8",[[1,"user-login",{endpoint:[513],lang:[1537],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],passwordReset:[513,"password-reset"],userEmailRegex:[513,"user-email-regex"],userEmailRegexOptions:[513,"user-email-regex-options"],passwordRegex:[513,"password-regex"],passwordRegexOptions:[513,"password-regex-options"],userNameEmail:[32],userPassword:[32],isValidUserEmail:[32],isValidPassword:[32],isPasswordVisible:[32],limitStylingAppends:[32],errorMessage:[32],hasError:[32]}]]]],s)));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",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)},c=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=new WeakMap,a=e=>"sc-"+e.o,f={},h=e=>"object"==(e=typeof e)||"function"===e,$=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const 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&&!h(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?d(null,l):l),o=s)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=d(e,null);return i.u=t,r.length>0&&(i.h=r),i},d=(e,t)=>({t:0,$:e,i:t,m:null,h:null,u:null}),m={},p=(e,t,n,l,o,c)=>{if(n!==l){let i=z(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=b(n),o=b(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const s=h(l);if((i||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):z(s,u)?u.slice(2):u[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},y=/\s/,b=e=>e?e.split(y):[],w=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||f,r=t.u||f;for(l in o)l in r||p(s,l,o[l],void 0,n,t.t);for(l in r)p(s,l,o[l],r[l],n,t.t)},g=(t,l,s)=>{let r,c,i=l.h[s],u=0;if(null!==i.i)r=i.m=o.createTextNode(i.i);else{if(n||(n="svg"===i.$),r=i.m=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.$),n&&"foreignObject"===i.$&&(n=!1),w(null,i,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),i.h)for(u=0;u<i.h.length;++u)c=g(t,i,u),c&&r.appendChild(c);"svg"===i.$?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},S=(e,n,l,s,o,r)=>{let c,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=g(null,l,o),c&&(s[o].m=c,i.insertBefore(c,n)))},j=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,M(l),s.remove())},v=(e,t)=>e.$===t.$,O=(e,t)=>{const l=t.m=e.m,s=e.h,o=t.h,r=t.$,c=t.i;null===c?(n="svg"===r||"foreignObject"!==r&&n,w(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,r=0,c=t.length-1,i=t[0],u=t[c],a=l.length-1,f=l[0],h=l[a];for(;o<=c&&r<=a;)null==i?i=t[++o]:null==u?u=t[--c]:null==f?f=l[++r]:null==h?h=l[--a]:v(i,f)?(O(i,f),i=t[++o],f=l[++r]):v(u,h)?(O(u,h),u=t[--c],h=l[--a]):v(i,h)?(O(i,h),e.insertBefore(i.m,u.m.nextSibling),i=t[++o],h=l[--a]):v(u,f)?(O(u,f),e.insertBefore(u.m,i.m),u=t[--c],f=l[++r]):(s=g(t&&t[r],n,r),f=l[++r],s&&i.m.parentNode.insertBefore(s,i.m));o>c?S(e,null==l[a+1]?null:l[a+1].m,n,l,r,a):r>a&&j(t,o,c)})(l,s,t,o):null!==o?(null!==e.i&&(l.textContent=""),S(l,null,t,o,0,o.length-1)):null!==s&&j(s,0,s.length-1),n&&"svg"===r&&(n=!1)):e.i!==c&&(l.data=c)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(M)},k=(e,t,n)=>{const l=(e=>H(e).p)(e);return{emit:e=>C(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},C=(e,t,n)=>{const l=r.ce(t,n);return e.dispatchEvent(l),l},x=(e,t)=>{t&&!e.g&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.g=t)))},P=(e,t)=>{if(e.t|=16,!(4&e.t))return x(e,e.S),te((()=>E(e,t)));e.t|=512},E=(e,t)=>{const n=e.j;let l;return t&&(l=W(n,"componentWillLoad")),A(l,(()=>L(e,n,t)))},L=async(e,t,n)=>{const l=e.p,s=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,s=((e,t)=>{let n=a(t),l=J.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=u.get(e=e.head||e);s||u.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);N(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>R(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},N=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.v,r=n.O||d(null,null),c=(e=>e&&e.$===m)(l)?l:$(null,null,l);t=s.tagName,o.M&&(c.u=c.u||{},o.M.map((([e,t])=>c.u[t]=s[e]))),c.$=null,c.t|=4,n.O=c,c.m=r.m=s.shadowRoot||s,e=s["s-sc"],O(r,c)})(n,l)}catch(e){B(e,n.p)}return null},R=e=>{const t=e.p,n=e.S;W(e.j,"componentDidRender"),64&e.t||(e.t|=64,U(t),e.k(t),n||T()),e.g&&(e.g(),e.g=void 0),512&e.t&&ee((()=>P(e,!1))),e.t&=-517},T=()=>{U(o.documentElement),ee((()=>C(s,"appload",{detail:{namespace:"user-login"}})))},W=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){B(e)}},A=(e,t)=>e&&e.then?e.then(t):t(),U=e=>e.classList.add("hydrated"),q=(e,t,n)=>{if(t.C){e.watchers&&(t.P=e.watchers);const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>H(this).L.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=H(e),o=s.p,r=s.L.get(t),c=s.t,i=s.j;if(n=((e,t)=>null==e||h(e)?e:1&t?e+"":e)(n,l.C[t][0]),(!(8&c)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(s.L.set(t,n),i)){if(l.P&&128&c){const e=l.P[t];e&&e.map((e=>{try{i[e](n,r,t)}catch(e){B(e,o)}}))}2==(18&c)&&P(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){r.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.M.push([e,s]),s}))}}return e},D=(e,t={})=>{const n=[],l=t.exclude||[],c=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let d,m=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],C:t[2],N:t[3]};s.C=t[2],s.M=[],s.P={};const o=s.o,u=class extends HTMLElement{constructor(e){super(e),_(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),m?$.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=H(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){x(t,t.S=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=I(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.P=s.watchers,q(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){B(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=a(n);if(!J.has(t)){const l=()=>{};((e,t,n)=>{let l=J.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,J.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.S,r=()=>P(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>{}))}componentOnReady(){return H(this).R}};s.T=e[0],l.includes(o)||c.get(o)||(n.push(o),c.define(o,q(u,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),u.insertBefore(h,f?f.nextSibling:u.firstChild),m=!1,$.length?$.map((e=>e.connectedCallback())):r.jmp((()=>d=setTimeout(T,30)))},F=new WeakMap,H=e=>F.get(e),V=(e,t)=>F.set(t.j=e,t),_=(e,t)=>{const n={t:0,p:e,v:t,L:new Map};return n.R=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],F.set(e,n)},z=(e,t)=>t in e,B=(e,t)=>(0,console.error)(e,t),G=new Map,I=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=G.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(G.set(n,e),e[t])),B)},J=new Map,K=[],Q=[],X=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?ee(Z):r.raf(Z))},Y=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){B(e)}e.length=0},Z=()=>{Y(K),Y(Q),(l=K.length>0)&&r.raf(Z)},ee=e=>c().then(e),te=X(Q,!0);export{D as b,k as c,$ as h,c as p,V as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,c as i,h as t}from"./p-8235eaf1.js";const o=["ro","en","cz","de","hr"],e={en:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},ro:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},hr:{invalidField:"Ovo polje je nevažeće",forgotPassword:"Zaboravljena lozinka",userEmail:"Korisničko ime ili email",password:"Lozinka",login:"Prijava",genericError:"Došlo je do neočekivane pogreške",successMessage:"Prijava uspješna"},fr:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},cs:{invalidField:"Ovo polje je nevažeće.",forgotPassword:"Zaboravio sam lozinku ",userEmail:"Korisničko ime ili email",password:"Lozinka",login:"Prijava",genericError:"An unexpected error has occured",successMessage:"Login successful"},de:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"}},r=s=>new Promise((i=>{fetch(s).then((s=>s.json())).then((s=>{Object.keys(s).forEach((i=>{for(let t in s[i])e[i][t]=s[i][t]})),i(!0)}))})),n=(s,i,t)=>{const r=i;let n=e[void 0!==r&&o.includes(r)?r:"en"][s];if(void 0!==t)for(const[s,i]of Object.entries(t.values)){const t=new RegExp(`{${s}}`,"g");n=n.replace(t,i)}return n},a=class{constructor(t){s(this,t),this.hasToSetConsents=i(this,"hasToSetConsents",7),this.endpoint="",this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.passwordReset="false",this.userEmailRegexOptions="i",this.passwordRegexOptions="",this.userNameEmail="",this.userPassword="",this.isValidUserEmail=!0,this.isValidPassword=!0,this.isPasswordVisible=!1,this.limitStylingAppends=!1,this.errorMessage="",this.hasError=!1,this.userLogin=async({username:s,password:i})=>{let t={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:s,password:i})};fetch(`${this.endpoint}/v1/player/legislation/login`,t).then((s=>s.json())).then((s=>{var i,t;(null===(i=s.sessionBlockers)||void 0===i?void 0:i.includes("has-to-set-consents"))&&this.hasToSetConsents.emit(),!0===(null==s?void 0:s.hasToSetPass)&&window.postMessage({type:"HasToSetPass"},window.location.href),s.sessionId?(window.postMessage({type:"UserSessionID",session:s.sessionId,userid:s.userId},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:n("successMessage",this.lang)}},window.location.href),window.postMessage({type:"ModalStatus",open:!0},window.location.href),this.hasError=!1):(this.hasError=!0,this.errorMessage=null===(t=null==s?void 0:s.thirdPartyResponse)||void 0===t?void 0:t.message,this.errorMessage&&(console.error(this.errorMessage),this.sendErrorNotification(this.errorMessage)))})).catch((s=>{console.error(s),this.hasError=!0,this.errorMessage=n("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}))},this.debouncedUserLogin=this.debounce(this.userLogin,850),this.handleLogin=()=>{this.debouncedUserLogin({username:this.userNameEmail,password:this.userPassword})},this.setClientStyling=()=>{let s=document.createElement("style");s.innerHTML=this.clientStyling,this.stylingContainer.appendChild(s)},this.setClientStylingURL=()=>{let s=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(s.href).then((s=>s.text())).then((s=>{i.innerHTML=s,setTimeout((()=>{this.stylingContainer.appendChild(i)}),1)}))},this.handleInputChange=(s,i)=>{this.hasError=!1;const t=s.target.value;"user"===i?(this.userNameEmail=t,this.isValidUserEmail=this.userEmailValidation(this.userNameEmail)):(this.userPassword=t,this.isValidPassword=this.passwordValidation(t))},this.userEmailValidation=s=>new RegExp(this.userEmailRegex,this.userEmailRegexOptions).test(s),this.passwordValidation=s=>new RegExp(this.passwordRegex,this.passwordRegexOptions).test(s),this.togglePassword=()=>{this.isPasswordVisible=!this.isPasswordVisible},this.resetPassword=()=>{window.postMessage({type:"NavForgotPassword"},window.location.href)}}handleNewTranslations(){r(this.translationUrl)}async componentWillLoad(){this.translationUrl.length>2&&await r(this.translationUrl)}sendErrorNotification(s){window.postMessage({type:"HasError",error:s},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:s}},window.location.href)}debounce(s,i){let t;return function(...o){clearTimeout(t),t=setTimeout((()=>{s.apply(this,o)}),i)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let s=t("span",{class:"InputIcon"},this.isPasswordVisible&&t("svg",{onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.844",height:"12.887",viewBox:"0 0 18.844 12.887"},t("g",{transform:"translate(-110.856 -23.242)"},t("circle",{class:"PasswordVisibilityIcon",cx:"0.05",cy:"0.05",r:"0.05",transform:"translate(121.017 31.148)"}),t("g",{transform:"translate(117.499 27.37)"},t("path",{class:"PasswordVisibilityIcon",d:"M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z",transform:"translate(-142.164 -39.123)"}),t("path",{class:"PasswordVisibilityIcon",d:"M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z",transform:"translate(-136.413 -42.068)"})),t("g",{transform:"translate(110.856 24.899)"},t("path",{class:"PasswordVisibilityIcon",d:"M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z",transform:"translate(-110.856 -33.157)"}),t("path",{class:"PasswordVisibilityIcon",d:"M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z",transform:"translate(-130.743 -29.617)"})),t("rect",{class:"PasswordVisibilityIcon",width:"0.972",height:"15.861",rx:"0.486",transform:"translate(114.827 23.858) rotate(-39.315)"}))),!this.isPasswordVisible&&t("svg",{onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility PasswordVisible",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.843",height:"10.5",viewBox:"0 0 18.843 10.5"},t("g",{transform:"translate(-14.185 -27.832)"},t("path",{class:"PasswordVisibilityIcon",d:"M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z",transform:"translate(0)"}),t("circle",{class:"PasswordVisibilityIcon",cx:"2.779",cy:"2.779",r:"2.779",transform:"translate(20.827 30.303)"})))),i=t("div",{class:"FormBox"},t("div",{class:"FormValue"},t("div",{class:!this.isValidUserEmail||this.hasError?"InputBox InputInvalidBox":"InputBox"},t("input",{type:"text",placeholder:"",value:this.userNameEmail,onFocus:s=>this.handleInputChange(s,"user"),onInput:s=>this.handleInputChange(s,"user"),required:!0}),t("label",{class:(this.userNameEmail?"FieldFilledIn":"")+" "+(!this.isValidUserEmail||this.hasError?"FieldInvalid":"")},n("userEmail",this.lang)),!this.isValidUserEmail&&t("p",{class:"InvalidField"},n("invalidField",this.lang))),t("div",{class:!this.isValidPassword||this.hasError?"InputBox InputInvalidBox":"InputBox"},s,t("input",{type:this.isPasswordVisible?"text":"password",placeholder:"",value:this.userPassword,onFocus:s=>this.handleInputChange(s,"password"),onInput:s=>this.handleInputChange(s,"password"),required:!0}),t("label",{class:(this.userPassword?"FieldFilledIn":"")+" "+(!this.isValidPassword||this.hasError?"FieldInvalid":"")},n("password",this.lang)),!this.isValidPassword&&t("p",{class:"InvalidField"},n("invalidField",this.lang))),"true"==this.passwordReset&&t("div",{class:"ForgotPassword"},t("button",{onClick:()=>this.resetPassword()},n("forgotPassword",this.lang))),t("button",{disabled:!(this.isValidUserEmail&&this.isValidPassword&&this.userNameEmail&&this.userPassword),class:"SubmitCredentials",onClick:()=>this.handleLogin()},n("login",this.lang)),this.hasError&&t("p",{class:"CredentialsError"},this.errorMessage?this.errorMessage:n("genericError",this.lang))));return t("section",{ref:s=>this.stylingContainer=s},i)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};a.style=':host{display:block;font-family:"Roboto", sans-serif}section{height:100%;width:100%;background-position:center;background-size:cover}.FormBox{height:100%;display:flex;position:relative;background:none;border:none;backdrop-filter:blur(15px) brightness(80%);justify-content:center;align-items:center}.InputBox{position:relative;margin:30px 0;width:310px;border-bottom:2px solid #0797B9}.InputBox.InputInvalidBox::after{content:"";height:2px;width:100%;transition:width 0.6s linear;background:#C23135}.InputBox::after{content:"";display:block;width:0;height:2px;position:relative;top:2px}.InputBox .PasswordVisibilityIcon{fill:#0797B9}.InputBox .InputIcon .TogglePasswordVisibility{cursor:pointer;position:absolute;top:18px;right:0}.InputBox .InputIcon .TogglePasswordVisibility.PasswordVisible{top:19.5px}.InputBox label{position:absolute;top:50%;left:5px;transform:translateY(-50%);color:#0797B9;font-size:1em;pointer-events:none;transition:0.5s}.InputBox label.FieldInvalid{color:#C23135}.InputBox input{width:100%;height:50px;background:transparent;border:none;outline:none;font-size:1em;padding:0 35px 0 5px;color:#fff;box-sizing:border-box}input:focus~label,label.FieldFilledIn{top:-3px;font-size:0.7em}.ForgotPassword button{margin:-10px 0 17px;font-size:0.9em;color:#0797B9;display:flex;justify-content:space-between;background-color:transparent;padding:0;height:unset;border:0;cursor:pointer}.ForgotPassword button:hover{color:#fff}.SubmitCredentials{display:block;margin:0 auto;padding:10px 20px;border-radius:5px;color:#fff;background:linear-gradient(to right, #EA0C66, #77318F);border:none;outline:none;cursor:pointer;font-size:1em}.SubmitCredentials:disabled{background:#707070}.Register{font-size:0.9em;color:#fff;text-align:center;margin:25px 0 10px}.Register p a{text-decoration:none;color:#fff;font-weight:600}.Register p a:hover{text-decoration:underline}.InvalidField{position:absolute;top:45px;color:#C23135;font-size:0.7em}.SubmitCredentials{margin-bottom:20px}.CredentialsError{color:#C23135;font-size:0.7em;padding:0 0 20px 0;margin:0}@media screen and (max-width: 480px){.FormBox{width:100%;border-radius:0px}}';export{a as user_login}
|