@everymatrix/general-about-us 1.74.7 → 1.74.10

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 (28) hide show
  1. package/dist/cjs/general-about-us.cjs.js +2 -2
  2. package/dist/cjs/general-about-us_2.cjs.entry.js +479 -0
  3. package/dist/cjs/{index-6dfdd1cd.js → index-2df20f4a.js} +10 -3
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +8 -1
  6. package/dist/collection/components/general-about-us/general-about-us.css +13 -0
  7. package/dist/collection/components/general-about-us/general-about-us.js +13 -8
  8. package/dist/esm/general-about-us.js +3 -3
  9. package/dist/esm/general-about-us_2.entry.js +474 -0
  10. package/dist/esm/{index-75dfea3e.js → index-86b7910e.js} +10 -4
  11. package/dist/esm/loader.js +3 -3
  12. package/dist/general-about-us/general-about-us.esm.js +1 -1
  13. package/dist/general-about-us/general-about-us_2.entry.js +1 -0
  14. package/dist/general-about-us/{index-75dfea3e.js → index-86b7910e.js} +2 -2
  15. package/dist/types/components/general-about-us/general-about-us.d.ts +1 -0
  16. package/package.json +1 -1
  17. package/dist/cjs/general-about-us.cjs.entry.js +0 -300
  18. package/dist/esm/general-about-us.entry.js +0 -296
  19. package/dist/general-about-us/general-about-us.entry.js +0 -1
  20. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → sebastian.strulea/Documents/work}/widgets-monorepo/packages/stencil/general-about-us/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  21. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → sebastian.strulea/Documents/work}/widgets-monorepo/packages/stencil/general-about-us/.stencil/packages/stencil/general-about-us/stencil.config.d.ts +0 -0
  22. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → sebastian.strulea/Documents/work}/widgets-monorepo/packages/stencil/general-about-us/.stencil/packages/stencil/general-about-us/stencil.config.dev.d.ts +0 -0
  23. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → sebastian.strulea/Documents/work}/widgets-monorepo/packages/stencil/general-about-us/.stencil/packages/stencil/general-about-us/storybook/main.d.ts +0 -0
  24. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → sebastian.strulea/Documents/work}/widgets-monorepo/packages/stencil/general-about-us/.stencil/packages/stencil/general-about-us/storybook/preview.d.ts +0 -0
  25. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → sebastian.strulea/Documents/work}/widgets-monorepo/packages/stencil/general-about-us/.stencil/tools/plugins/index.d.ts +0 -0
  26. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → sebastian.strulea/Documents/work}/widgets-monorepo/packages/stencil/general-about-us/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  27. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → sebastian.strulea/Documents/work}/widgets-monorepo/packages/stencil/general-about-us/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  28. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → sebastian.strulea/Documents/work}/widgets-monorepo/packages/stencil/general-about-us/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,296 +0,0 @@
1
- import { r as registerInstance, h } from './index-75dfea3e.js';
2
-
3
- const DEFAULT_LANGUAGE = 'en';
4
- const TRANSLATIONS = {
5
- en: {
6
- error: 'Error',
7
- noResults: 'Loading, please wait ...',
8
- },
9
- hu: {
10
- error: 'Error',
11
- noResults: 'Loading, please wait ...',
12
- },
13
- ro: {
14
- error: 'Eroare',
15
- noResults: 'Loading, please wait ...',
16
- },
17
- fr: {
18
- error: 'Error',
19
- noResults: 'Loading, please wait ...',
20
- },
21
- ar: {
22
- error: 'خطأ',
23
- noResults: 'Loading, please wait ...',
24
- },
25
- hr: {
26
- error: 'Greška',
27
- noResults: 'Učitavanje, molimo pričekajte ...',
28
- }
29
- };
30
- const translate = (key, customLang) => {
31
- const lang = customLang;
32
- return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
33
- };
34
-
35
- /**
36
- * @name setClientStyling
37
- * @description Method used to create and append to the passed element of the widget a style element with the content received
38
- * @param {HTMLElement} stylingContainer The reference element of the widget
39
- * @param {string} clientStyling The style content
40
- */
41
- function setClientStyling(stylingContainer, clientStyling) {
42
- if (stylingContainer) {
43
- const sheet = document.createElement('style');
44
- sheet.innerHTML = clientStyling;
45
- stylingContainer.appendChild(sheet);
46
- }
47
- }
48
-
49
- /**
50
- * @name setClientStylingURL
51
- * @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
52
- * @param {HTMLElement} stylingContainer The reference element of the widget
53
- * @param {string} clientStylingUrl The URL of the style content
54
- */
55
- function setClientStylingURL(stylingContainer, clientStylingUrl) {
56
- const url = new URL(clientStylingUrl);
57
-
58
- fetch(url.href)
59
- .then((res) => res.text())
60
- .then((data) => {
61
- const cssFile = document.createElement('style');
62
- cssFile.innerHTML = data;
63
- if (stylingContainer) {
64
- stylingContainer.appendChild(cssFile);
65
- }
66
- })
67
- .catch((err) => {
68
- console.error('There was an error while trying to load client styling from URL', err);
69
- });
70
- }
71
-
72
- /**
73
- * @name setStreamLibrary
74
- * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
75
- * @param {HTMLElement} stylingContainer The highest element of the widget
76
- * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
77
- * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
78
- */
79
- function setStreamStyling(stylingContainer, domain, subscription) {
80
- if (window.emMessageBus) {
81
- const sheet = document.createElement('style');
82
-
83
- window.emMessageBus.subscribe(domain, (data) => {
84
- sheet.innerHTML = data;
85
- if (stylingContainer) {
86
- stylingContainer.appendChild(sheet);
87
- }
88
- });
89
- }
90
- }
91
-
92
- function checkDeviceType() {
93
- const userAgent = navigator.userAgent.toLowerCase();
94
- const width = screen.availWidth;
95
- const height = screen.availHeight;
96
- if (userAgent.includes('iphone')) {
97
- return 'mobile';
98
- }
99
- if (userAgent.includes('android')) {
100
- if (height > width && width < 800) {
101
- return 'mobile';
102
- }
103
- if (width > height && height < 800) {
104
- return 'tablet';
105
- }
106
- }
107
- return 'desktop';
108
- }
109
- function checkCustomDeviceWidth() {
110
- const width = screen.availWidth;
111
- if (width < 600) {
112
- return 'mobile';
113
- }
114
- else if (width >= 600 && width < 1100) {
115
- return 'tablet';
116
- }
117
- }
118
- function getDeviceCustom() {
119
- const userAgent = navigator.userAgent.toLowerCase();
120
- let source = '';
121
- source = (userAgent.includes('android') || userAgent.includes('iphone') || userAgent.includes('ipad')) ? checkCustomDeviceWidth() : 'desktop';
122
- return source;
123
- }
124
- const getDevice = () => {
125
- let userAgent = window.navigator.userAgent.toLocaleLowerCase();
126
- if (userAgent.includes('android/i'))
127
- return 'android';
128
- if (userAgent.includes('iphone/i'))
129
- return 'iPhone';
130
- if (userAgent.includes('ipad/i') || userAgent.includes('ipod/i'))
131
- return 'iPad';
132
- return 'PC';
133
- };
134
- const getDevicePlatform = () => {
135
- const device = getDevice();
136
- if (device) {
137
- if (device === 'PC') {
138
- return 'dk';
139
- }
140
- else if (device === 'iPad' || device === 'iPhone') {
141
- return 'mtWeb';
142
- }
143
- else {
144
- return 'mtWeb';
145
- }
146
- }
147
- };
148
-
149
- const chevronSvg = 'data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyBoZWlnaHQ9IjY0cHgiIHdpZHRoPSI2NHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCAxODUuMzQzIDE4NS4zNDMiIHhtbDpzcGFjZT0icHJlc2VydmUiIGZpbGw9IiNENUYzREYiIHN0cm9rZT0iI0Q1RjNERiI+Cg08ZyBpZD0iU1ZHUmVwb19iZ0NhcnJpZXIiIHN0cm9rZS13aWR0aD0iMCIvPgoNPGcgaWQ9IlNWR1JlcG9fdHJhY2VyQ2FycmllciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cg08ZyBpZD0iU1ZHUmVwb19pY29uQ2FycmllciI+IDxnPiA8Zz4gPHBhdGggc3R5bGU9ImZpbGw6I2VjZjlmMDsiIGQ9Ik01MS43MDcsMTg1LjM0M2MtMi43NDEsMC01LjQ5My0xLjA0NC03LjU5My0zLjE0OWMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTgxLDAtMTUuMTc1IGw3NC4zNTItNzQuMzQ3TDQ0LjExNCwxOC4zMmMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTg3LDAtMTUuMTc1YzQuMTk0LTQuMTk0LDEwLjk4Ny00LjE5NCwxNS4xOCwwbDgxLjkzNCw4MS45MzQgYzQuMTk0LDQuMTk0LDQuMTk0LDEwLjk4NywwLDE1LjE3NWwtODEuOTM0LDgxLjkzOUM1Ny4yMDEsMTg0LjI5Myw1NC40NTQsMTg1LjM0Myw1MS43MDcsMTg1LjM0M3oiLz4gPC9nPiA8L2c+IDwvZz4KDTwvc3ZnPg==';
150
-
151
- const generalAboutUsCss = ":host {\n display: block;\n font-family: inherit;\n}\n\np {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\nbutton {\n font-family: inherit;\n}\n\n.AboutUsError .ErrorInfo {\n color: var(--emw--color-error, #ed0909);\n}\n\n.AboutUsWrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: var(--emw--color-background, #000000);\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n}\n\n@keyframes fadeInAnimation {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.ItemImage {\n position: relative;\n width: 100%;\n max-width: 100%;\n height: auto;\n border-radius: var(--emw--border-radius-large, 10px);\n background: var(--emw--color-background, black);\n}\n.ItemImage .ForegroundImage {\n z-index: 3;\n pointer-events: none;\n opacity: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 10px);\n}\n.ItemImage .BackgroundImage {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 10px);\n z-index: 2;\n top: 20px;\n filter: blur(16px);\n opacity: 0.7;\n transform: scale(1.01);\n}\n.ItemImage .ItemDetails {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 16px;\n width: 60%;\n padding: 40px;\n}\n.ItemImage .ItemDetails > div {\n position: relative;\n height: auto;\n z-index: 10;\n overflow: hidden;\n}\n.ItemImage .Title {\n padding: 20px 0px 10px 0px;\n font-size: var(--emw--font-size-x-large, 38px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-typography, white);\n}\n.ItemImage .Title .FirstWord {\n text-transform: uppercase;\n letter-spacing: 1px;\n background: var(--emw--color-primary, #1EC450);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.ItemImage .Description {\n font-size: var(--emw--font-size-small-plus, 16px);\n font-weight: var(--emw--font-weight-normal, 400);\n color: var(--emw--color-gray-100, #D1D1D2);\n}\n.ItemImage button {\n position: relative;\n width: auto;\n padding: 10px 24px;\n color: var(--emw--button-text-color, white);\n font-size: var(--emw--font-size-small, 16px);\n border: var(--emw--button-border, 3px solid) var(--emw--button-border-color, #063B17);\n border-radius: var(--emw--button-border-radius, 10px);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 20;\n animation: ButtonEffect 4s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n}\n.ItemImage button:hover {\n opacity: 0.8;\n}\n.ItemImage button img.Chevron {\n position: relative;\n height: var(--emw--size-standard, 12px);\n margin-left: var(--emw--spacing-small-minus, 6px);\n}\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n\n@container (max-width: 475px) {\n .AboutUsWrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: var(--emw--spacing-small-minus, 10px);\n max-width: 100%;\n background-color: var(--emw--color-background, #000000);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n .AboutUsWrapper .ItemDetails {\n padding: 30px;\n }\n .AboutUsWrapper .ItemDetails .Title {\n font-size: var(--emw--font-size-large, 28px);\n padding: 0;\n }\n .AboutUsWrapper .ItemDetails .Button {\n font-size: var(--emw--font-size-small, 14px);\n padding: 8px 20px;\n }\n .AboutUsWrapper .ItemDetails > div {\n border-radius: var(--emw--border-radius-medium, 5px);\n gap: var(--emw--spacing-2x-small, 4px);\n }\n .AboutUsWrapper .Description {\n text-align: left;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-normal, 400);\n }\n .AboutUsWrapper button {\n padding-bottom: 10px;\n line-height: 15px;\n padding: 10px;\n }\n}\n@container (max-width: 800px) {\n .Title {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n}";
152
- const GeneralAboutUsStyle0 = generalAboutUsCss;
153
-
154
- const GeneralAboutUs = class {
155
- constructor(hostRef) {
156
- registerInstance(this, hostRef);
157
- this.handleClick = (url, target, location, isExternal) => {
158
- window.postMessage({ type: 'NavigateTo', path: url, target: target, locations: location, externalLink: isExternal || false }, window.location.href);
159
- // @ts-ignore Analytics event
160
- if (typeof gtag == 'function') {
161
- // @ts-ignore
162
- gtag('event', 'GeneralAboutUs', {
163
- 'context': 'AboutUsContent'
164
- });
165
- }
166
- };
167
- this.setImage = (image) => {
168
- let source = '';
169
- this.device = checkDeviceType();
170
- switch (this.device) {
171
- case 'mobile':
172
- source = image.imageMobile;
173
- break;
174
- case 'tablet':
175
- source = image.imageTablet;
176
- break;
177
- case 'desktop':
178
- source = image.imageDesktop;
179
- break;
180
- }
181
- return source;
182
- };
183
- this.formatTitle = (title, language) => {
184
- let firstWord, restOfTitle;
185
- // Check for common languages that do not use space - here: Chinese, Japanese, Thai
186
- if (['zh', 'ja', 'th'].includes(language)) {
187
- firstWord = title.substring(0, 1);
188
- restOfTitle = title.substring(1);
189
- }
190
- else {
191
- const words = title.split(' ');
192
- firstWord = words.shift();
193
- restOfTitle = words.join(' ');
194
- }
195
- return h("div", { class: "Title" }, h("span", { class: "FirstWord" }, firstWord, " "), h("span", null, restOfTitle));
196
- };
197
- this.cmsEndpoint = undefined;
198
- this.language = 'en';
199
- this.userRoles = 'everyone';
200
- this.cmsEnv = 'stage';
201
- this.mbSource = undefined;
202
- this.clientStyling = '';
203
- this.clientStylingUrl = '';
204
- this.hasErrors = false;
205
- this.isLoading = true;
206
- this.device = '';
207
- }
208
- watchEndpoint(newValue, oldValue) {
209
- if (newValue && newValue != oldValue && this.cmsEndpoint) {
210
- this.getAboutUs();
211
- }
212
- }
213
- handleClientStylingChange(newValue, oldValue) {
214
- if (newValue != oldValue) {
215
- setClientStyling(this.stylingContainer, this.clientStyling);
216
- }
217
- }
218
- handleClientStylingChangeURL(newValue, oldValue) {
219
- if (newValue != oldValue) {
220
- if (this.clientStylingUrl)
221
- setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
222
- }
223
- }
224
- componentWillLoad() {
225
- if (this.cmsEndpoint && this.language) {
226
- return this.getAboutUs();
227
- }
228
- }
229
- componentDidLoad() {
230
- this.device = getDeviceCustom();
231
- if (this.stylingContainer) {
232
- if (window.emMessageBus != undefined) {
233
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
234
- }
235
- else {
236
- if (this.clientStyling)
237
- setClientStyling(this.stylingContainer, this.clientStyling);
238
- if (this.clientStylingUrl)
239
- setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
240
- }
241
- }
242
- }
243
- disconnectedCallback() {
244
- this.stylingSubscription && this.stylingSubscription.unsubscribe();
245
- }
246
- getAboutUs() {
247
- let url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
248
- url.searchParams.append('env', this.cmsEnv);
249
- url.searchParams.append('userRoles', this.userRoles);
250
- url.searchParams.append('device', getDevicePlatform());
251
- return new Promise((resolve, reject) => {
252
- this.isLoading = true;
253
- fetch(url.href)
254
- .then((res) => res.json())
255
- .then((aboutUsContent) => {
256
- const keysToKeep = ['title', 'description', 'images', 'button', 'externalLink', 'targetType', 'locations'];
257
- const aboutUsArrContent = Object.entries(aboutUsContent)
258
- .filter(([key]) => keysToKeep.includes(key))
259
- .reduce((acc, [key, value]) => {
260
- acc[key] = value;
261
- return acc;
262
- }, {});
263
- this.aboutUsData = aboutUsArrContent;
264
- resolve(aboutUsArrContent);
265
- }).catch((err) => {
266
- console.error(err);
267
- this.hasErrors = true;
268
- reject(err);
269
- }).finally(() => {
270
- this.isLoading = false;
271
- });
272
- });
273
- }
274
- render() {
275
- var _a, _b, _c, _d, _e;
276
- return (h("div", { key: '92051e1b64b1668fc702bb339e4bfc47b24d9406', ref: el => this.stylingContainer = el }, this.hasErrors ? (h("div", { class: "AboutUsError" }, h("div", { class: "ErrorInfo" }, translate('error', this.language)))) : !this.isLoading ? (h("div", { class: "AboutUsWrapper" }, h("div", { class: "ItemImage" }, h("div", { class: "ForegroundImage", style: { background: `linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),
277
- linear-gradient(to bottom left, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%),
278
- linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 100%),
279
- url(${this.setImage((_a = this.aboutUsData) === null || _a === void 0 ? void 0 : _a.images)}) no-repeat center center / cover` } }), h("img", { class: "BackgroundImage", src: this.setImage(this.aboutUsData.images), alt: "image" }), h("div", { class: "ItemDetails" }, this.formatTitle((_b = this.aboutUsData) === null || _b === void 0 ? void 0 : _b.title, this.language), h("div", { class: "Description", innerHTML: (_c = this.aboutUsData) === null || _c === void 0 ? void 0 : _c.description }), h("button", { class: "Button", onClick: () => {
280
- var _a, _b, _c, _d, _e;
281
- return this.handleClick((_b = (_a = this.aboutUsData) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.buttonUrl, (_c = this.aboutUsData) === null || _c === void 0 ? void 0 : _c.targetType, (_d = this.aboutUsData) === null || _d === void 0 ? void 0 : _d.locations, (_e = this.aboutUsData) === null || _e === void 0 ? void 0 : _e.externalLink);
282
- } }, (_e = (_d = this.aboutUsData) === null || _d === void 0 ? void 0 : _d.button) === null || _e === void 0 ? void 0 :
283
- _e.buttonText, h("img", { src: chevronSvg, alt: "right chevron", class: "Chevron" })))))) : null));
284
- }
285
- static get watchers() { return {
286
- "cmsEndpoint": ["watchEndpoint"],
287
- "language": ["watchEndpoint"],
288
- "userRoles": ["watchEndpoint"],
289
- "device": ["watchEndpoint"],
290
- "clientStyling": ["handleClientStylingChange"],
291
- "clientStylingUrl": ["handleClientStylingChangeURL"]
292
- }; }
293
- };
294
- GeneralAboutUs.style = GeneralAboutUsStyle0;
295
-
296
- export { GeneralAboutUs as general_about_us };
@@ -1 +0,0 @@
1
- import{r as n,h as t}from"./index-75dfea3e.js";const i={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."}};function e(n,t){if(n){const i=document.createElement("style");i.innerHTML=t,n.appendChild(i)}}function o(n,t){const i=new URL(t);fetch(i.href).then((n=>n.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,n&&n.appendChild(i)})).catch((n=>{console.error("There was an error while trying to load client styling from URL",n)}))}const r=class{constructor(i){n(this,i),this.handleClick=(n,t,i,e)=>{window.postMessage({type:"NavigateTo",path:n,target:t,locations:i,externalLink:e||!1},window.location.href),"function"==typeof gtag&&gtag("event","GeneralAboutUs",{context:"AboutUsContent"})},this.setImage=n=>{let t="";switch(this.device=function(){const n=navigator.userAgent.toLowerCase(),t=screen.availWidth,i=screen.availHeight;if(n.includes("iphone"))return"mobile";if(n.includes("android")){if(i>t&&t<800)return"mobile";if(t>i&&i<800)return"tablet"}return"desktop"}(),this.device){case"mobile":t=n.imageMobile;break;case"tablet":t=n.imageTablet;break;case"desktop":t=n.imageDesktop}return t},this.formatTitle=(n,i)=>{let e,o;if(["zh","ja","th"].includes(i))e=n.substring(0,1),o=n.substring(1);else{const t=n.split(" ");e=t.shift(),o=t.join(" ")}return t("div",{class:"Title"},t("span",{class:"FirstWord"},e," "),t("span",null,o))},this.cmsEndpoint=void 0,this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.hasErrors=!1,this.isLoading=!0,this.device=""}watchEndpoint(n,t){n&&n!=t&&this.cmsEndpoint&&this.getAboutUs()}handleClientStylingChange(n,t){n!=t&&e(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(n,t){n!=t&&this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getAboutUs()}componentDidLoad(){this.device=function(){const n=navigator.userAgent.toLowerCase();let t="";return t=n.includes("android")||n.includes("iphone")||n.includes("ipad")?function(){const n=screen.availWidth;return n<600?"mobile":n>=600&&n<1100?"tablet":void 0}():"desktop",t}(),this.stylingContainer&&(null!=window.emMessageBus?function(n,t){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{i.innerHTML=t,n&&n.appendChild(i)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&e(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}getAboutUs(){let n=new URL(`${this.cmsEndpoint}/${this.language}/homepage`);return n.searchParams.append("env",this.cmsEnv),n.searchParams.append("userRoles",this.userRoles),n.searchParams.append("device",(()=>{const n=(()=>{let n=window.navigator.userAgent.toLocaleLowerCase();return n.includes("android/i")?"android":n.includes("iphone/i")?"iPhone":n.includes("ipad/i")||n.includes("ipod/i")?"iPad":"PC"})();if(n)return"PC"===n?"dk":"mtWeb"})()),new Promise(((t,i)=>{this.isLoading=!0,fetch(n.href).then((n=>n.json())).then((n=>{const i=["title","description","images","button","externalLink","targetType","locations"],e=Object.entries(n).filter((([n])=>i.includes(n))).reduce(((n,[t,i])=>(n[t]=i,n)),{});this.aboutUsData=e,t(e)})).catch((n=>{console.error(n),this.hasErrors=!0,i(n)})).finally((()=>{this.isLoading=!1}))}))}render(){var n,e,o,r,a,s;return t("div",{key:"92051e1b64b1668fc702bb339e4bfc47b24d9406",ref:n=>this.stylingContainer=n},this.hasErrors?t("div",{class:"AboutUsError"},t("div",{class:"ErrorInfo"},i[void 0!==(s=this.language)&&s in i?s:"en"].error)):this.isLoading?null:t("div",{class:"AboutUsWrapper"},t("div",{class:"ItemImage"},t("div",{class:"ForegroundImage",style:{background:`linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%),\n linear-gradient(to bottom left, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%),\n linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 100%),\n url(${this.setImage(null===(n=this.aboutUsData)||void 0===n?void 0:n.images)}) no-repeat center center / cover`}}),t("img",{class:"BackgroundImage",src:this.setImage(this.aboutUsData.images),alt:"image"}),t("div",{class:"ItemDetails"},this.formatTitle(null===(e=this.aboutUsData)||void 0===e?void 0:e.title,this.language),t("div",{class:"Description",innerHTML:null===(o=this.aboutUsData)||void 0===o?void 0:o.description}),t("button",{class:"Button",onClick:()=>{var n,t,i,e,o;return this.handleClick(null===(t=null===(n=this.aboutUsData)||void 0===n?void 0:n.button)||void 0===t?void 0:t.buttonUrl,null===(i=this.aboutUsData)||void 0===i?void 0:i.targetType,null===(e=this.aboutUsData)||void 0===e?void 0:e.locations,null===(o=this.aboutUsData)||void 0===o?void 0:o.externalLink)}},null===(a=null===(r=this.aboutUsData)||void 0===r?void 0:r.button)||void 0===a?void 0:a.buttonText,t("img",{src:"data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyBoZWlnaHQ9IjY0cHgiIHdpZHRoPSI2NHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCAxODUuMzQzIDE4NS4zNDMiIHhtbDpzcGFjZT0icHJlc2VydmUiIGZpbGw9IiNENUYzREYiIHN0cm9rZT0iI0Q1RjNERiI+Cg08ZyBpZD0iU1ZHUmVwb19iZ0NhcnJpZXIiIHN0cm9rZS13aWR0aD0iMCIvPgoNPGcgaWQ9IlNWR1JlcG9fdHJhY2VyQ2FycmllciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cg08ZyBpZD0iU1ZHUmVwb19pY29uQ2FycmllciI+IDxnPiA8Zz4gPHBhdGggc3R5bGU9ImZpbGw6I2VjZjlmMDsiIGQ9Ik01MS43MDcsMTg1LjM0M2MtMi43NDEsMC01LjQ5My0xLjA0NC03LjU5My0zLjE0OWMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTgxLDAtMTUuMTc1IGw3NC4zNTItNzQuMzQ3TDQ0LjExNCwxOC4zMmMtNC4xOTQtNC4xOTQtNC4xOTQtMTAuOTg3LDAtMTUuMTc1YzQuMTk0LTQuMTk0LDEwLjk4Ny00LjE5NCwxNS4xOCwwbDgxLjkzNCw4MS45MzQgYzQuMTk0LDQuMTk0LDQuMTk0LDEwLjk4NywwLDE1LjE3NWwtODEuOTM0LDgxLjkzOUM1Ny4yMDEsMTg0LjI5Myw1NC40NTQsMTg1LjM0Myw1MS43MDcsMTg1LjM0M3oiLz4gPC9nPiA8L2c+IDwvZz4KDTwvc3ZnPg==",alt:"right chevron",class:"Chevron"}))))))}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],userRoles:["watchEndpoint"],device:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};r.style=":host {\n display: block;\n font-family: inherit;\n}\n\np {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\nbutton {\n font-family: inherit;\n}\n\n.AboutUsError .ErrorInfo {\n color: var(--emw--color-error, #ed0909);\n}\n\n.AboutUsWrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: var(--emw--color-background, #000000);\n width: 100%;\n border-radius: var(--emw--border-radius-large, 15px);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n}\n\n@keyframes fadeInAnimation {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.ItemImage {\n position: relative;\n width: 100%;\n max-width: 100%;\n height: auto;\n border-radius: var(--emw--border-radius-large, 10px);\n background: var(--emw--color-background, black);\n}\n.ItemImage .ForegroundImage {\n z-index: 3;\n pointer-events: none;\n opacity: 1;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 10px);\n}\n.ItemImage .BackgroundImage {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: opacity 0.5s ease, filter 0.5s ease;\n border-radius: var(--emw--border-radius-large, 10px);\n z-index: 2;\n top: 20px;\n filter: blur(16px);\n opacity: 0.7;\n transform: scale(1.01);\n}\n.ItemImage .ItemDetails {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 16px;\n width: 60%;\n padding: 40px;\n}\n.ItemImage .ItemDetails > div {\n position: relative;\n height: auto;\n z-index: 10;\n overflow: hidden;\n}\n.ItemImage .Title {\n padding: 20px 0px 10px 0px;\n font-size: var(--emw--font-size-x-large, 38px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-typography, white);\n}\n.ItemImage .Title .FirstWord {\n text-transform: uppercase;\n letter-spacing: 1px;\n background: var(--emw--color-primary, #1EC450);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.ItemImage .Description {\n font-size: var(--emw--font-size-small-plus, 16px);\n font-weight: var(--emw--font-weight-normal, 400);\n color: var(--emw--color-gray-100, #D1D1D2);\n}\n.ItemImage button {\n position: relative;\n width: auto;\n padding: 10px 24px;\n color: var(--emw--button-text-color, white);\n font-size: var(--emw--font-size-small, 16px);\n border: var(--emw--button-border, 3px solid) var(--emw--button-border-color, #063B17);\n border-radius: var(--emw--button-border-radius, 10px);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 20;\n animation: ButtonEffect 4s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n}\n.ItemImage button:hover {\n opacity: 0.8;\n}\n.ItemImage button img.Chevron {\n position: relative;\n height: var(--emw--size-standard, 12px);\n margin-left: var(--emw--spacing-small-minus, 6px);\n}\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n\n@container (max-width: 475px) {\n .AboutUsWrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: var(--emw--spacing-small-minus, 10px);\n max-width: 100%;\n background-color: var(--emw--color-background, #000000);\n animation: fadeInAnimation ease 1.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n .AboutUsWrapper .ItemDetails {\n padding: 30px;\n }\n .AboutUsWrapper .ItemDetails .Title {\n font-size: var(--emw--font-size-large, 28px);\n padding: 0;\n }\n .AboutUsWrapper .ItemDetails .Button {\n font-size: var(--emw--font-size-small, 14px);\n padding: 8px 20px;\n }\n .AboutUsWrapper .ItemDetails > div {\n border-radius: var(--emw--border-radius-medium, 5px);\n gap: var(--emw--spacing-2x-small, 4px);\n }\n .AboutUsWrapper .Description {\n text-align: left;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-normal, 400);\n }\n .AboutUsWrapper button {\n padding-bottom: 10px;\n line-height: 15px;\n padding: 10px;\n }\n}\n@container (max-width: 800px) {\n .Title {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n}";export{r as general_about_us}