@everymatrix/lottery-tipping-page 0.1.5 → 0.1.7
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/{general-tooltip_7.cjs.entry.js → general-multi-select_13.cjs.entry.js} +2651 -1315
- package/dist/cjs/{index-335e7b86.js → index-eb012321.js} +7 -3
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{lottery-tipping-page-6e72415a.js → lottery-tipping-page-80f111ca.js} +5 -2
- package/dist/cjs/lottery-tipping-page.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +21 -0
- package/dist/collection/components/lottery-tipping-page/lottery-tipping-page.js +5 -1
- package/dist/esm/{general-tooltip_7.entry.js → general-multi-select_13.entry.js} +2647 -1317
- package/dist/esm/{index-8ab53757.js → index-25e8d5c3.js} +8 -4
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{lottery-tipping-page-5f471e39.js → lottery-tipping-page-ab82834a.js} +5 -2
- package/dist/esm/lottery-tipping-page.js +3 -3
- package/dist/lottery-tipping-page/{general-tooltip_7.entry.js → general-multi-select_13.entry.js} +315 -315
- package/dist/lottery-tipping-page/index-25e8d5c3.js +2 -0
- package/dist/lottery-tipping-page/index.esm.js +1 -1
- package/dist/lottery-tipping-page/lottery-tipping-page-ab82834a.js +1 -0
- package/dist/lottery-tipping-page/lottery-tipping-page.esm.js +1 -1
- package/dist/static/dropdown.svg +2 -0
- package/dist/static/dropup.svg +1 -0
- package/dist/types/components/lottery-tipping-page/lottery-tipping-page.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lottery-tipping-page/index-8ab53757.js +0 -2
- package/dist/lottery-tipping-page/lottery-tipping-page-5f471e39.js +0 -1
|
@@ -1,6 +1,152 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
2
|
-
import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-tipping-page-
|
|
3
|
-
export { L as lottery_tipping_page } from './lottery-tipping-page-
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getAssetPath, h, a as getElement } from './index-25e8d5c3.js';
|
|
2
|
+
import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-tipping-page-ab82834a.js';
|
|
3
|
+
export { L as lottery_tipping_page } from './lottery-tipping-page-ab82834a.js';
|
|
4
|
+
|
|
5
|
+
const generalMultiSelectCss = ".multi-select-container{position:relative;font-family:\"Inter\", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:8px 12px;padding-right:4px;border-radius:4px;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-typography, #555);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-gray-100, #f4f5f7)}.dropdown-item.selected{background:var(--emw--color-primary-variant, #bae7ff);color:var(--emw--color-primary, #0050b3);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}";
|
|
6
|
+
const GeneralMultiSelectStyle0 = generalMultiSelectCss;
|
|
7
|
+
|
|
8
|
+
const GeneralMultiSelect = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.change = createEvent(this, "change", 7);
|
|
12
|
+
this.handleOutsideClick = (e) => {
|
|
13
|
+
// If click happens outside our component root, close both panels
|
|
14
|
+
const path = e.composedPath();
|
|
15
|
+
if (!path.includes(this.el)) {
|
|
16
|
+
this.dropdownOpen = false;
|
|
17
|
+
this.overflowOpen = false;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
this.toggleDropdown = (e) => {
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
this.dropdownOpen = !this.dropdownOpen;
|
|
23
|
+
this.overflowOpen = false; // close overflow if open
|
|
24
|
+
};
|
|
25
|
+
this.isSelected = (value) => this.selectedValues.includes(value);
|
|
26
|
+
this.selectItem = (item) => {
|
|
27
|
+
if (!this.isSelected(item.value)) {
|
|
28
|
+
this.selectedValues = [...this.selectedValues, item.value];
|
|
29
|
+
this.change.emit(this.selectedValues);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
this.toggleItem = (item) => {
|
|
33
|
+
if (this.isSelected(item.value)) {
|
|
34
|
+
this.removeItem(item.value);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.selectItem(item);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
this.removeItem = (value, e) => {
|
|
41
|
+
e && e.stopPropagation();
|
|
42
|
+
this.selectedValues = this.selectedValues.filter((v) => v !== value);
|
|
43
|
+
this.change.emit(this.selectedValues);
|
|
44
|
+
};
|
|
45
|
+
this.downIcon = getAssetPath('../static/dropdown.svg');
|
|
46
|
+
this.upIcon = getAssetPath('../static/dropup.svg');
|
|
47
|
+
/** Touch-capable device? */
|
|
48
|
+
this.isTouch = 'ontouchstart' in window;
|
|
49
|
+
/** Open overflow popover */
|
|
50
|
+
this.openOverflow = () => {
|
|
51
|
+
if (!this.isTouch) {
|
|
52
|
+
// hover only on non-touch
|
|
53
|
+
this.computePopoverPosition();
|
|
54
|
+
this.overflowOpen = true;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
/** Close overflow popover */
|
|
58
|
+
this.closeOverflow = () => {
|
|
59
|
+
if (!this.isTouch) {
|
|
60
|
+
this.overflowOpen = false;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
this.toggleOverflow = (e) => {
|
|
64
|
+
e.stopPropagation();
|
|
65
|
+
this.computePopoverPosition();
|
|
66
|
+
this.overflowOpen = !this.overflowOpen;
|
|
67
|
+
};
|
|
68
|
+
this.mbSource = undefined;
|
|
69
|
+
this.clientStyling = undefined;
|
|
70
|
+
this.clientStylingUrl = undefined;
|
|
71
|
+
this.options = [];
|
|
72
|
+
this.maxVisibleChips = 2;
|
|
73
|
+
this.placeholder = '';
|
|
74
|
+
this.selectedValues = [];
|
|
75
|
+
this.dropdownOpen = false;
|
|
76
|
+
this.overflowOpen = false;
|
|
77
|
+
this.popoverStyle = { top: '0px', left: '0px' };
|
|
78
|
+
}
|
|
79
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
80
|
+
if (newValue != oldValue) {
|
|
81
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
85
|
+
if (newValue != oldValue) {
|
|
86
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
90
|
+
if (newValue != oldValue) {
|
|
91
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
componentDidLoad() {
|
|
95
|
+
if (this.stylingContainer) {
|
|
96
|
+
if (this.mbSource)
|
|
97
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
98
|
+
if (this.clientStyling)
|
|
99
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
100
|
+
if (this.clientStylingUrl)
|
|
101
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async clear() {
|
|
105
|
+
this.selectedValues = [];
|
|
106
|
+
this.change.emit(this.selectedValues);
|
|
107
|
+
}
|
|
108
|
+
componentWillLoad() {
|
|
109
|
+
// Listen for clicks anywhere to close panels on outside click
|
|
110
|
+
document.addEventListener('click', this.handleOutsideClick);
|
|
111
|
+
}
|
|
112
|
+
disconnectedCallback() {
|
|
113
|
+
document.removeEventListener('click', this.handleOutsideClick);
|
|
114
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
115
|
+
}
|
|
116
|
+
get selectedOptions() {
|
|
117
|
+
return this.options.filter((o) => this.isSelected(o.value));
|
|
118
|
+
}
|
|
119
|
+
get visibleChips() {
|
|
120
|
+
return this.selectedOptions.slice(0, this.maxVisibleChips);
|
|
121
|
+
}
|
|
122
|
+
get hiddenChips() {
|
|
123
|
+
return this.selectedOptions.slice(this.maxVisibleChips);
|
|
124
|
+
}
|
|
125
|
+
computePopoverPosition() {
|
|
126
|
+
if (this.overflowChipEl && this.el) {
|
|
127
|
+
const { left: overflowChipElLeft } = this.overflowChipEl.getBoundingClientRect();
|
|
128
|
+
const { left: elLeft, height } = this.el.getBoundingClientRect();
|
|
129
|
+
this.popoverStyle = {
|
|
130
|
+
top: `${height - 10}px`,
|
|
131
|
+
left: `${overflowChipElLeft - elLeft}px`
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
render() {
|
|
136
|
+
var _a;
|
|
137
|
+
return (h("div", { key: '50b48397be3ede1907ab2c2abcd1cf2f43f69c13', class: "general-multi-select-container", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '696a1bb1f221f8f5cf290fac040af10e2e5a115e', class: "multi-select-container", ref: (el) => (this.el = el) }, h("div", { key: '9ea92f01787b26d43054573a11896cf65065b073', class: "flex-row", onClick: this.toggleDropdown }, h("div", { key: 'f79720ca3ec383ee7f95b09483698ee18119c79a', class: "control" }, this.visibleChips.map((opt) => (h("span", { class: "chip" }, h("div", { class: "chip-text", title: opt.text }, opt.text), h("div", { class: "remove-btn", onClick: (e) => this.removeItem(opt.value, e) }, "\u00D7")))), this.hiddenChips.length > 0 && (h("span", { key: '25e9e527c33dd7a315dacb10cc51084fe69b9b7e', class: "chip overflow-chip", ref: (el) => (this.overflowChipEl = el), onMouseEnter: this.openOverflow, onMouseLeave: this.closeOverflow, onClick: this.toggleOverflow }, "\u2022\u2022\u2022")), this.selectedValues.length === 0 && h("span", { key: 'b061de660a55f7a0d41ce9aa650108d3f38a9dc0', class: "placeholder" }, this.placeholder)), h("div", { key: 'f83b6517e88b3976cdc18590f8f1233cb2515230', class: "arrow" }, h("img", { key: '1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba', class: "info-icon", src: this.dropdownOpen ? this.upIcon : this.downIcon, style: { width: '18px' } }))), this.dropdownOpen && (h("div", { key: 'e5b081007bcbdd251ce5ac235c1f19f17852c420', class: "dropdown" }, this.options.map((opt) => (h("div", { class: {
|
|
138
|
+
'dropdown-item': true,
|
|
139
|
+
selected: this.isSelected(opt.value)
|
|
140
|
+
}, onClick: () => this.toggleItem(opt) }, opt.text))))), this.overflowOpen && !!((_a = this.hiddenChips) === null || _a === void 0 ? void 0 : _a.length) && (h("div", { key: 'f8e3289042c69c569bebcd0a40d90f31261c6c12', class: "overflow-popover", style: { top: this.popoverStyle.top, left: this.popoverStyle.left }, onMouseEnter: this.openOverflow, onMouseLeave: this.closeOverflow }, this.hiddenChips.map((opt) => (h("span", { class: "chip" }, h("span", { class: "chip-text", title: opt.text }, opt.text), h("span", { class: "remove-btn", onClick: (e) => this.removeItem(opt.value, e) }, "\u00D7")))))))));
|
|
141
|
+
}
|
|
142
|
+
static get assetsDirs() { return ["../static"]; }
|
|
143
|
+
static get watchers() { return {
|
|
144
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
145
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
146
|
+
"mbSource": ["handleMbSourceChange"]
|
|
147
|
+
}; }
|
|
148
|
+
};
|
|
149
|
+
GeneralMultiSelect.style = GeneralMultiSelectStyle0;
|
|
4
150
|
|
|
5
151
|
const generalTooltipCss = ".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;background-color:var(--emw--color-gray-300, #333);color:var(--emw--color-background, #fff);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";
|
|
6
152
|
const GeneralTooltipStyle0 = generalTooltipCss;
|
|
@@ -255,6 +401,148 @@ const LotteryTippingBulletGroup = class {
|
|
|
255
401
|
};
|
|
256
402
|
LotteryTippingBulletGroup.style = LotteryTippingBulletGroupStyle0;
|
|
257
403
|
|
|
404
|
+
const DEFAULT_LANGUAGE$4 = 'en';
|
|
405
|
+
const SUPPORTED_LANGUAGES$4 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
406
|
+
const TRANSLATIONS$4 = {
|
|
407
|
+
en: {
|
|
408
|
+
cancel: 'Cancel',
|
|
409
|
+
confirm: 'Confirm'
|
|
410
|
+
},
|
|
411
|
+
ro: {
|
|
412
|
+
cancel: 'Anulează',
|
|
413
|
+
confirm: 'Confirmă'
|
|
414
|
+
},
|
|
415
|
+
fr: {
|
|
416
|
+
cancel: 'Annuler',
|
|
417
|
+
confirm: 'Confirmer'
|
|
418
|
+
},
|
|
419
|
+
ar: {
|
|
420
|
+
cancel: 'إلغاء',
|
|
421
|
+
confirm: 'تأكيد'
|
|
422
|
+
},
|
|
423
|
+
hr: {
|
|
424
|
+
cancel: 'Odustani',
|
|
425
|
+
confirm: 'Potvrdi'
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
const translate$4 = (key, customLang) => {
|
|
429
|
+
const lang = customLang;
|
|
430
|
+
return TRANSLATIONS$4[lang !== undefined && SUPPORTED_LANGUAGES$4.includes(lang) ? lang : DEFAULT_LANGUAGE$4][key];
|
|
431
|
+
};
|
|
432
|
+
const getTranslations$3 = (data) => {
|
|
433
|
+
Object.keys(data).forEach((item) => {
|
|
434
|
+
for (let key in data[item]) {
|
|
435
|
+
TRANSLATIONS$4[item][key] = data[item][key];
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
const lotteryTippingDialogCss = ".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;min-height:200px;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-gray-300, #333)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-gray-300, #333);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-gray-300, #333);background:var(--emw--color-background, #fff)}.dialog-footer .cancel-btn:hover{border-color:var(--emw--color-gray-100, #e6e6e6)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-background, #fff);background:var(--emw-pool-game-acition-normal, #4a90e2);box-shadow:0 2px 4px rgba(74, 144, 226, 0.2)}.dialog-footer .confirm-btn:hover{background:var(--emw-pool-game-action-hover, #357abd)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}";
|
|
441
|
+
const LotteryTippingDialogStyle0 = lotteryTippingDialogCss;
|
|
442
|
+
|
|
443
|
+
const LotteryTippingDialog = class {
|
|
444
|
+
constructor(hostRef) {
|
|
445
|
+
registerInstance(this, hostRef);
|
|
446
|
+
this.open = createEvent(this, "open", 7);
|
|
447
|
+
this.close = createEvent(this, "close", 7);
|
|
448
|
+
this.confirm = createEvent(this, "confirm", 7);
|
|
449
|
+
this.cancel = createEvent(this, "cancel", 7);
|
|
450
|
+
this.wasVisible = false;
|
|
451
|
+
this.mbSource = undefined;
|
|
452
|
+
this.clientStyling = '';
|
|
453
|
+
this.clientStylingUrl = '';
|
|
454
|
+
this.visible = undefined;
|
|
455
|
+
this.dialogTitle = '';
|
|
456
|
+
this.width = '520px';
|
|
457
|
+
this.closable = true;
|
|
458
|
+
this.mask = true;
|
|
459
|
+
this.maskClosable = true;
|
|
460
|
+
this.animationDuration = 300;
|
|
461
|
+
this.fullscreen = false;
|
|
462
|
+
this.showFooter = true;
|
|
463
|
+
this.showCancelBtn = true;
|
|
464
|
+
this.language = 'en';
|
|
465
|
+
this.translationUrl = undefined;
|
|
466
|
+
}
|
|
467
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
468
|
+
if (newValue != oldValue) {
|
|
469
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
473
|
+
if (newValue != oldValue) {
|
|
474
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
478
|
+
if (newValue != oldValue) {
|
|
479
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
componentWillLoad() {
|
|
483
|
+
if (this.translationUrl) {
|
|
484
|
+
getTranslations$3(JSON.parse(this.translationUrl));
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
componentWillUpdate() {
|
|
488
|
+
if (this.visible && !this.wasVisible) {
|
|
489
|
+
this.disableBodyScroll();
|
|
490
|
+
}
|
|
491
|
+
else if (!this.visible && this.wasVisible) {
|
|
492
|
+
this.enableBodyScroll();
|
|
493
|
+
}
|
|
494
|
+
this.wasVisible = this.visible;
|
|
495
|
+
}
|
|
496
|
+
disconnectedCallback() {
|
|
497
|
+
this.enableBodyScroll();
|
|
498
|
+
}
|
|
499
|
+
disableBodyScroll() {
|
|
500
|
+
document.body.style.overflow = 'hidden';
|
|
501
|
+
}
|
|
502
|
+
enableBodyScroll() {
|
|
503
|
+
document.body.style.overflow = '';
|
|
504
|
+
}
|
|
505
|
+
handleClose() {
|
|
506
|
+
this.visible = false;
|
|
507
|
+
this.cancel.emit();
|
|
508
|
+
}
|
|
509
|
+
handleMaskClick(e) {
|
|
510
|
+
if (this.maskClosable && e.target === this.el.querySelector('.mask')) {
|
|
511
|
+
this.visible = false;
|
|
512
|
+
this.cancel.emit();
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
handleConfirm() {
|
|
516
|
+
this.visible = false;
|
|
517
|
+
this.confirm.emit();
|
|
518
|
+
}
|
|
519
|
+
render() {
|
|
520
|
+
const dialogStyle = {
|
|
521
|
+
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
522
|
+
'--duration': `${this.animationDuration}ms`
|
|
523
|
+
};
|
|
524
|
+
const dialogWrapperClass = ['dialog-wrapper', this.visible ? 'dialog-wrapper-visible' : ''];
|
|
525
|
+
const maskClass = ['mask', this.visible ? 'mask-enter' : 'mask-leave'];
|
|
526
|
+
const dialogClass = [
|
|
527
|
+
'dialog',
|
|
528
|
+
this.visible ? 'dialog-enter' : 'dialog-leave',
|
|
529
|
+
this.fullscreen ? 'fullscreen' : ''
|
|
530
|
+
].join(' ');
|
|
531
|
+
const contentStyle = {
|
|
532
|
+
maxHeight: 'calc(100vh - 62px)',
|
|
533
|
+
overflowY: 'auto'
|
|
534
|
+
};
|
|
535
|
+
return (h("div", { key: 'cf311658c951f1d8af6d015f02b30e5cfd14e972', class: dialogWrapperClass.join(' ') }, h("div", { key: 'bec49cd133029ca0db51462db39a6b1957d285c7', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), h("div", { key: '7d9b2faf2fee0d483acfc00e4820d0aac82a718a', class: dialogClass, style: dialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, h("div", { key: '9d4c2471258cab88ad9ed6a05e513815d96f13a9', class: "dialog-header" }, h("h2", { key: '8bd30b19c31eb9fddebe8d19c6af454a89f5d234', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (h("button", { key: 'f8e4dfebc9506a6aa79e1c68abdd42686a7bbc2f', class: "close-btn", onClick: this.handleClose.bind(this) }, "x"))), h("div", { key: 'b21127dfcb5912d35d41260798d82c15b59335ef', class: "dialog-content", style: contentStyle }, h("slot", { key: 'ca0dedda350d3aef9e54202f8e7add236d0a8795' })), this.showFooter && (h("div", { key: '2d7ccaf4414d509f30db1909948452efaf74aec1', class: "dialog-footer" }, h("slot", { key: '1f6d67f646936756abe1edf768dd37418683815f', name: "footer" }, this.showCancelBtn && (h("button", { key: '92055092b2978c41eabed218b73e242cafe4accc', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate$4('cancel', this.language))), h("button", { key: 'c950eefc68feb4546665105a0e2d0f2300183d8f', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate$4('confirm', this.language))))))));
|
|
536
|
+
}
|
|
537
|
+
get el() { return getElement(this); }
|
|
538
|
+
static get watchers() { return {
|
|
539
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
540
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
541
|
+
"mbSource": ["handleMbSourceChange"]
|
|
542
|
+
}; }
|
|
543
|
+
};
|
|
544
|
+
LotteryTippingDialog.style = LotteryTippingDialogStyle0;
|
|
545
|
+
|
|
258
546
|
function _typeof(o) {
|
|
259
547
|
"@babel/helpers - typeof";
|
|
260
548
|
|
|
@@ -2792,482 +3080,6 @@ function validateTimezone(_hours, minutes) {
|
|
|
2792
3080
|
return minutes >= 0 && minutes <= 59;
|
|
2793
3081
|
}
|
|
2794
3082
|
|
|
2795
|
-
const formatDate$1 = ({ date, type = 'date', format: format$1 }) => {
|
|
2796
|
-
try {
|
|
2797
|
-
const parsedDate = parseISO(date);
|
|
2798
|
-
if (isNaN(parsedDate.getTime())) {
|
|
2799
|
-
throw new Error(`Invalid date: ${date}`);
|
|
2800
|
-
}
|
|
2801
|
-
if (format$1)
|
|
2802
|
-
return format(parsedDate, format$1);
|
|
2803
|
-
let formatStr = 'dd/MM/yyyy';
|
|
2804
|
-
if (type === 'time') {
|
|
2805
|
-
formatStr = 'dd/MM/yyyy HH:mm:ss';
|
|
2806
|
-
}
|
|
2807
|
-
else if (type === 'week') {
|
|
2808
|
-
formatStr = 'ccc dd/MM/yyyy HH:mm:ss';
|
|
2809
|
-
}
|
|
2810
|
-
return format(parsedDate, formatStr);
|
|
2811
|
-
}
|
|
2812
|
-
catch (error) {
|
|
2813
|
-
console.error('Error formatting date:', error.message);
|
|
2814
|
-
return '';
|
|
2815
|
-
}
|
|
2816
|
-
};
|
|
2817
|
-
const fetcher$1 = (url) => fetch(url, {
|
|
2818
|
-
method: 'GET',
|
|
2819
|
-
headers: {
|
|
2820
|
-
'x-scheme': 'application/json',
|
|
2821
|
-
Accept: 'application/json'
|
|
2822
|
-
}
|
|
2823
|
-
}).then((r) => r.json());
|
|
2824
|
-
const showNotification$1 = ({ message, theme = 'success' }) => {
|
|
2825
|
-
window.postMessage({
|
|
2826
|
-
type: 'ShowNotificationToast',
|
|
2827
|
-
message,
|
|
2828
|
-
theme
|
|
2829
|
-
});
|
|
2830
|
-
};
|
|
2831
|
-
const thousandSeparator = (value) => {
|
|
2832
|
-
if (value === 0) {
|
|
2833
|
-
return '0';
|
|
2834
|
-
}
|
|
2835
|
-
if (!value) {
|
|
2836
|
-
return '';
|
|
2837
|
-
}
|
|
2838
|
-
value = value.toString();
|
|
2839
|
-
const parts = value.split('.');
|
|
2840
|
-
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
2841
|
-
return parts.join('.');
|
|
2842
|
-
};
|
|
2843
|
-
const generateUUID = () => {
|
|
2844
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
2845
|
-
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
2846
|
-
return v.toString(16);
|
|
2847
|
-
});
|
|
2848
|
-
};
|
|
2849
|
-
const TICKET_INVALID_TOKEN = 'TICKET_INVALID_TOKEN';
|
|
2850
|
-
// format results to winning numbers
|
|
2851
|
-
const formatResultsToWinningNumbers = (rawResults) => {
|
|
2852
|
-
const formatMatchCheckRes = (matchRes) => matchRes.map((bulletItem) => (bulletItem.isSelected ? 1 : 0));
|
|
2853
|
-
const resultsForTotalLines = rawResults.map((lineRes) => lineRes.map(formatMatchCheckRes));
|
|
2854
|
-
const result = [];
|
|
2855
|
-
for (let i = 0; i < resultsForTotalLines.length; i++) {
|
|
2856
|
-
const resultsInLine = resultsForTotalLines[i];
|
|
2857
|
-
for (let j = 0; j < resultsInLine.length; j++) {
|
|
2858
|
-
const matchResult = resultsInLine[j];
|
|
2859
|
-
for (let k = 0; k < matchResult.length; k++) {
|
|
2860
|
-
if (!result[i])
|
|
2861
|
-
result[i] = [];
|
|
2862
|
-
if (matchResult[k])
|
|
2863
|
-
result[i].push(k, j);
|
|
2864
|
-
}
|
|
2865
|
-
}
|
|
2866
|
-
}
|
|
2867
|
-
return result;
|
|
2868
|
-
};
|
|
2869
|
-
const doSubmitTicket = ({ body, sessionId, url }) => {
|
|
2870
|
-
const options = {
|
|
2871
|
-
method: 'POST',
|
|
2872
|
-
headers: {
|
|
2873
|
-
'Content-Type': 'application/json',
|
|
2874
|
-
Accept: 'application/json',
|
|
2875
|
-
Authorization: `Bearer ${sessionId}`,
|
|
2876
|
-
'X-Idempotency-Key': generateUUID()
|
|
2877
|
-
},
|
|
2878
|
-
body: JSON.stringify(body)
|
|
2879
|
-
};
|
|
2880
|
-
return fetch(url, options).then((res) => {
|
|
2881
|
-
if (res.status === 401) {
|
|
2882
|
-
throw new Error(TICKET_INVALID_TOKEN);
|
|
2883
|
-
}
|
|
2884
|
-
if (res.status > 300) {
|
|
2885
|
-
throw new Error(res.statusText);
|
|
2886
|
-
}
|
|
2887
|
-
return res.json();
|
|
2888
|
-
});
|
|
2889
|
-
};
|
|
2890
|
-
// BettingTypes, playModes and playTypes
|
|
2891
|
-
const getEnableOptions = (raw = []) => raw.filter((i) => i.enabled);
|
|
2892
|
-
// the first one in bet type config that enabled = true, will be default choice
|
|
2893
|
-
const getDefaultType = ({ playTypeConfig = [], betTypeConfig = [], enabledBettingTypeOptions = [], enabledPlayingModeOptions = [] }) => {
|
|
2894
|
-
const enabledBetTypeConfig = betTypeConfig.filter((i) => i.enabled);
|
|
2895
|
-
for (const item of enabledBetTypeConfig) {
|
|
2896
|
-
const { bettingType, playMode } = playTypeConfig === null || playTypeConfig === void 0 ? void 0 : playTypeConfig.find((i) => i.betTypeId === item.id);
|
|
2897
|
-
if (enabledBettingTypeOptions.map((i) => i.code).includes(bettingType) &&
|
|
2898
|
-
enabledPlayingModeOptions.map((i) => i.code).includes(playMode))
|
|
2899
|
-
return { bettingType, playMode };
|
|
2900
|
-
}
|
|
2901
|
-
return {};
|
|
2902
|
-
};
|
|
2903
|
-
const calculatePlayingModeOptions = ({ bettingType, playTypeConfig, betTypeConfig, enabledPlayingModeOptions }) => {
|
|
2904
|
-
const enabledBetTypeIdConfig = betTypeConfig.filter((i) => i.enabled).map((i) => i.id);
|
|
2905
|
-
const filteredPlayTypesConfig = playTypeConfig.filter((i) => enabledBetTypeIdConfig.includes(i.betTypeId));
|
|
2906
|
-
const selectedBettingTypeFilteredPlayTypesConfig = filteredPlayTypesConfig.filter((i) => i.bettingType === bettingType);
|
|
2907
|
-
const _ = selectedBettingTypeFilteredPlayTypesConfig.map((i) => i.playMode);
|
|
2908
|
-
return enabledPlayingModeOptions.filter((i) => _.includes(i.code));
|
|
2909
|
-
};
|
|
2910
|
-
const getCheckedCountForEachLineAndEachMatch = ({ rawResults }) => {
|
|
2911
|
-
const getMatchCheckRes = (matchRes) => matchRes.filter((bulletItem) => bulletItem.isSelected).length;
|
|
2912
|
-
const checkedCountForEachLineAndEachMatch = rawResults.map((lineRes) => lineRes.length > 0 ? lineRes.map(getMatchCheckRes) : [0]);
|
|
2913
|
-
return checkedCountForEachLineAndEachMatch;
|
|
2914
|
-
};
|
|
2915
|
-
const getPlayTypeConfig = ({ rawData, selectedBettingType, selectedPlayingMode }) => {
|
|
2916
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2917
|
-
const betTypeId = (_d = (_c = (_b = (_a = rawData === null || rawData === void 0 ? void 0 : rawData.rules) === null || _a === void 0 ? void 0 : _a.poolGame) === null || _b === void 0 ? void 0 : _b.playTypes) === null || _c === void 0 ? void 0 : _c.find((i) => i.bettingType === selectedBettingType && i.playMode === selectedPlayingMode)) === null || _d === void 0 ? void 0 : _d.betTypeId;
|
|
2918
|
-
const betType = (_f = (_e = rawData === null || rawData === void 0 ? void 0 : rawData.rules) === null || _e === void 0 ? void 0 : _e.betTypes) === null || _f === void 0 ? void 0 : _f.find((i) => i.id === betTypeId);
|
|
2919
|
-
return { betTypeId, betType };
|
|
2920
|
-
};
|
|
2921
|
-
|
|
2922
|
-
const DEFAULT_LANGUAGE$2 = 'en';
|
|
2923
|
-
const SUPPORTED_LANGUAGES$2 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
2924
|
-
const TRANSLATIONS$2 = {
|
|
2925
|
-
en: {
|
|
2926
|
-
stop: 'Stop',
|
|
2927
|
-
at: 'at'
|
|
2928
|
-
},
|
|
2929
|
-
ro: {
|
|
2930
|
-
stop: 'Oprește',
|
|
2931
|
-
at: 'la'
|
|
2932
|
-
},
|
|
2933
|
-
fr: {
|
|
2934
|
-
stop: 'Arrêtez',
|
|
2935
|
-
at: 'à'
|
|
2936
|
-
},
|
|
2937
|
-
ar: {
|
|
2938
|
-
stop: 'توقف',
|
|
2939
|
-
at: 'في'
|
|
2940
|
-
},
|
|
2941
|
-
hr: {
|
|
2942
|
-
stop: 'Stop',
|
|
2943
|
-
at: 'u'
|
|
2944
|
-
}
|
|
2945
|
-
};
|
|
2946
|
-
const translate$2 = (key, customLang) => {
|
|
2947
|
-
const lang = customLang;
|
|
2948
|
-
return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
|
|
2949
|
-
};
|
|
2950
|
-
|
|
2951
|
-
const DEFAULT_LANGUAGE$1 = 'en';
|
|
2952
|
-
const SUPPORTED_LANGUAGES$1 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
2953
|
-
const TRANSLATIONS$1 = {
|
|
2954
|
-
en: {
|
|
2955
|
-
selectionCleared: 'Your selection will be cleared.',
|
|
2956
|
-
ticketSubmitted: 'Ticket submitted successfully.',
|
|
2957
|
-
ticketFailed: 'Failed to purchase the ticket. Please try again.',
|
|
2958
|
-
lines: 'Lines',
|
|
2959
|
-
line: 'Line',
|
|
2960
|
-
bettingType: 'Betting Type',
|
|
2961
|
-
playingMode: 'Playing Mode',
|
|
2962
|
-
orderSummaryTitle: 'Order Summary',
|
|
2963
|
-
orderSummaryTickets: 'Tickets',
|
|
2964
|
-
orderSummaryTotal: 'Total',
|
|
2965
|
-
orderSummarySubmit: 'Submit',
|
|
2966
|
-
cancel: 'Cancel',
|
|
2967
|
-
confirm: 'Confirm'
|
|
2968
|
-
},
|
|
2969
|
-
ro: {
|
|
2970
|
-
selectionCleared: 'Selecția dvs. va fi ștearsă.',
|
|
2971
|
-
ticketSubmitted: 'Bilet trimis cu succes.',
|
|
2972
|
-
ticketFailed: 'Nu s-a putut achiziționa biletul. Vă rugăm să încercați din nou.',
|
|
2973
|
-
lines: 'Linii',
|
|
2974
|
-
line: 'Linie',
|
|
2975
|
-
bettingType: 'Tip de pariu',
|
|
2976
|
-
playingMode: 'Mod de joc',
|
|
2977
|
-
orderSummaryTitle: 'Sumar comandă',
|
|
2978
|
-
orderSummaryTickets: 'Bilete',
|
|
2979
|
-
orderSummaryTotal: 'Total',
|
|
2980
|
-
orderSummarySubmit: 'Trimite',
|
|
2981
|
-
cancel: 'Anulează',
|
|
2982
|
-
confirm: 'Confirmă'
|
|
2983
|
-
},
|
|
2984
|
-
fr: {
|
|
2985
|
-
selectionCleared: 'Votre sélection sera effacée.',
|
|
2986
|
-
ticketSubmitted: 'Billet soumis avec succès.',
|
|
2987
|
-
ticketFailed: "Échec de l'achat du billet. Veuillez réessayer.",
|
|
2988
|
-
lines: 'Lignes',
|
|
2989
|
-
line: 'Ligne',
|
|
2990
|
-
bettingType: 'Type de pari',
|
|
2991
|
-
playingMode: 'Mode de jeu',
|
|
2992
|
-
orderSummaryTitle: 'Résumé de la commande',
|
|
2993
|
-
orderSummaryTickets: 'Billets',
|
|
2994
|
-
orderSummaryTotal: 'Total',
|
|
2995
|
-
orderSummarySubmit: 'Soumettre',
|
|
2996
|
-
cancel: 'Annuler',
|
|
2997
|
-
confirm: 'Confirmer'
|
|
2998
|
-
},
|
|
2999
|
-
ar: {
|
|
3000
|
-
selectionCleared: 'سيتم مسح اختيارك.',
|
|
3001
|
-
ticketSubmitted: 'تم إرسال التذكرة بنجاح.',
|
|
3002
|
-
ticketFailed: 'فشل شراء التذكرة. يرجى المحاولة مرة أخرى.',
|
|
3003
|
-
lines: 'خطوط',
|
|
3004
|
-
line: 'خط',
|
|
3005
|
-
bettingType: 'نوع الرهان',
|
|
3006
|
-
playingMode: 'وضع اللعب',
|
|
3007
|
-
orderSummaryTitle: 'ملخص الطلب',
|
|
3008
|
-
orderSummaryTickets: 'التذاكر',
|
|
3009
|
-
orderSummaryTotal: 'المجموع',
|
|
3010
|
-
orderSummarySubmit: 'إرسال',
|
|
3011
|
-
cancel: 'إلغاء',
|
|
3012
|
-
confirm: 'تأكيد'
|
|
3013
|
-
},
|
|
3014
|
-
hr: {
|
|
3015
|
-
selectionCleared: 'Vaš odabir bit će obrisan.',
|
|
3016
|
-
ticketSubmitted: 'Listić je uspješno predan.',
|
|
3017
|
-
ticketFailed: 'Kupnja listića nije uspjela. Molimo pokušajte ponovo.',
|
|
3018
|
-
lines: 'Linije',
|
|
3019
|
-
line: 'Linija',
|
|
3020
|
-
bettingType: 'Vrsta oklade',
|
|
3021
|
-
playingMode: 'Način igranja',
|
|
3022
|
-
orderSummaryTitle: 'Sažetak narudžbe',
|
|
3023
|
-
orderSummaryTickets: 'Listići',
|
|
3024
|
-
orderSummaryTotal: 'Ukupno',
|
|
3025
|
-
orderSummarySubmit: 'Pošalji',
|
|
3026
|
-
cancel: 'Odustani',
|
|
3027
|
-
confirm: 'Potvrdi'
|
|
3028
|
-
}
|
|
3029
|
-
};
|
|
3030
|
-
const translate$1 = (key, customLang) => {
|
|
3031
|
-
const lang = customLang;
|
|
3032
|
-
return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
|
|
3033
|
-
};
|
|
3034
|
-
const getTranslations$1 = (data) => {
|
|
3035
|
-
Object.keys(data).forEach((item) => {
|
|
3036
|
-
for (let key in data[item]) {
|
|
3037
|
-
TRANSLATIONS$1[item][key] = data[item][key];
|
|
3038
|
-
}
|
|
3039
|
-
});
|
|
3040
|
-
};
|
|
3041
|
-
const resolveTranslationUrl = async (translationUrl) => {
|
|
3042
|
-
if (translationUrl) {
|
|
3043
|
-
try {
|
|
3044
|
-
const response = await fetch(translationUrl);
|
|
3045
|
-
if (!response.ok) {
|
|
3046
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
3047
|
-
}
|
|
3048
|
-
const translations = await response.json();
|
|
3049
|
-
getTranslations$1(translations);
|
|
3050
|
-
}
|
|
3051
|
-
catch (error) {
|
|
3052
|
-
console.error('Failed to fetch or parse translations from URL:', error);
|
|
3053
|
-
}
|
|
3054
|
-
}
|
|
3055
|
-
};
|
|
3056
|
-
|
|
3057
|
-
const lotteryTippingTicketBannerCss = ".lottery-tipping-ticket-banner__container {\n font-family: system-ui, sans-serif;\n font-size: 14px;\n container-type: inline-size;\n}\n\n.banner {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 1rem;\n background: var(--emw--color-primary, #fed275);\n border-top: 2px solid var(--emw--color-primary-variant, #ffe66f);\n border-bottom: 2px solid var(--emw--color-primary-variant, #ffe66f);\n gap: 0.5rem;\n white-space: nowrap;\n}\n\n.left {\n flex: 1;\n gap: 0.4rem;\n}\n\n.brand {\n font-weight: 700;\n color: var(--emw--color-gray-400, #000);\n}\n\n.mid {\n flex: 1;\n font-size: 1.5rem;\n font-weight: 800;\n font-style: italic;\n letter-spacing: 0.04em;\n color: var(--emw--color-gray-400, #000);\n text-align: center;\n}\n\n.right {\n flex: 1;\n display: flex;\n gap: 0.4rem;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n\n@container (max-width: 420px) {\n .mid {\n text-align: right;\n }\n .right {\n justify-content: center;\n }\n}\n.pill {\n border: 2px solid var(--emw--color-gray-150, #6f6f6f);\n border-radius: 0.4rem;\n padding: 0.25rem 0.7rem;\n font-size: 0.9rem;\n color: var(--emw--color-gray-300, #333);\n display: inline-flex;\n align-items: baseline;\n}\n\n.pill > strong {\n font-weight: 700;\n}";
|
|
3058
|
-
const LotteryTippingTicketBannerStyle0 = lotteryTippingTicketBannerCss;
|
|
3059
|
-
|
|
3060
|
-
const LotteryTippingTicketBanner = class {
|
|
3061
|
-
constructor(hostRef) {
|
|
3062
|
-
registerInstance(this, hostRef);
|
|
3063
|
-
this.mbSource = undefined;
|
|
3064
|
-
this.clientStyling = undefined;
|
|
3065
|
-
this.clientStylingUrl = undefined;
|
|
3066
|
-
this.language = 'en';
|
|
3067
|
-
this.translationUrl = '';
|
|
3068
|
-
this.stopTime = '';
|
|
3069
|
-
this.period = undefined;
|
|
3070
|
-
}
|
|
3071
|
-
get formattedStopTime() {
|
|
3072
|
-
let _temp = '';
|
|
3073
|
-
if (!this.stopTime) {
|
|
3074
|
-
return _temp;
|
|
3075
|
-
}
|
|
3076
|
-
_temp = formatDate$1({ date: this.stopTime, format: 'dd/MM/yyyy HH:mm' });
|
|
3077
|
-
if (isToday(new Date(this.stopTime))) {
|
|
3078
|
-
_temp = formatDate$1({ date: this.stopTime, format: 'HH:mm' });
|
|
3079
|
-
}
|
|
3080
|
-
return _temp;
|
|
3081
|
-
}
|
|
3082
|
-
get formattedPeriod() {
|
|
3083
|
-
let _temp = '';
|
|
3084
|
-
_temp = formatDate$1({ date: this.period, format: 'EEEE' });
|
|
3085
|
-
if (_temp.toLowerCase() === 'wednesday') {
|
|
3086
|
-
_temp = 'MIDWEEK';
|
|
3087
|
-
}
|
|
3088
|
-
return _temp.toUpperCase();
|
|
3089
|
-
}
|
|
3090
|
-
handleClientStylingChange(newValue, oldValue) {
|
|
3091
|
-
if (newValue != oldValue) {
|
|
3092
|
-
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
3093
|
-
}
|
|
3094
|
-
}
|
|
3095
|
-
handleClientStylingUrlChange(newValue, oldValue) {
|
|
3096
|
-
if (newValue != oldValue) {
|
|
3097
|
-
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
3098
|
-
}
|
|
3099
|
-
}
|
|
3100
|
-
handleMbSourceChange(newValue, oldValue) {
|
|
3101
|
-
if (newValue != oldValue) {
|
|
3102
|
-
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
3103
|
-
}
|
|
3104
|
-
}
|
|
3105
|
-
async componentWillLoad() {
|
|
3106
|
-
if (this.translationUrl) {
|
|
3107
|
-
resolveTranslationUrl(this.translationUrl);
|
|
3108
|
-
}
|
|
3109
|
-
}
|
|
3110
|
-
componentDidLoad() {
|
|
3111
|
-
if (this.stylingContainer) {
|
|
3112
|
-
if (this.mbSource)
|
|
3113
|
-
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
3114
|
-
if (this.clientStyling)
|
|
3115
|
-
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
3116
|
-
if (this.clientStylingUrl)
|
|
3117
|
-
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
3118
|
-
}
|
|
3119
|
-
}
|
|
3120
|
-
disconnectedCallback() {
|
|
3121
|
-
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
3122
|
-
}
|
|
3123
|
-
render() {
|
|
3124
|
-
const backgroundImagePath = getAssetPath('../static/tipping-full-color.svg');
|
|
3125
|
-
return (h("div", { key: 'eb93e7946631d234963d841df9e8b753b651c795', ref: (el) => (this.stylingContainer = el), class: "lottery-tipping-ticket-banner__container" }, h("section", { key: '0133e845df14caa912b18e1734ad16c584b7359f', class: "banner" }, h("div", { key: '23bc3b34011dc5533bf70397f974936e238f04fe', class: "left" }, h("img", { key: '52110de0807e79c02d7934ec8a37c1322b73fe84', alt: "Betting", src: backgroundImagePath, class: "logo" })), h("div", { key: 'b5deae59d09b870777c913c5ebfca43886c3cf95', class: "mid period" }, this.formattedPeriod), h("div", { key: 'b404e474850233e2d5e139077fd774f178bc40fa', class: "right" }, h("span", { key: '3b9072c2165a033d17c9572c7cafe2a2c699447b', class: "pill" }, h("strong", { key: 'c560c2c27dc930a963b992c07e02745b18d0002f' }, translate$2('stop', this.language)), "\u00A0", translate$2('at', this.language), "\u00A0", this.formattedStopTime)))));
|
|
3126
|
-
}
|
|
3127
|
-
static get assetsDirs() { return ["../static"]; }
|
|
3128
|
-
static get watchers() { return {
|
|
3129
|
-
"clientStyling": ["handleClientStylingChange"],
|
|
3130
|
-
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
3131
|
-
"mbSource": ["handleMbSourceChange"]
|
|
3132
|
-
}; }
|
|
3133
|
-
};
|
|
3134
|
-
LotteryTippingTicketBanner.style = LotteryTippingTicketBannerStyle0;
|
|
3135
|
-
|
|
3136
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
3137
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
3138
|
-
const TRANSLATIONS = {
|
|
3139
|
-
en: {
|
|
3140
|
-
homeTeam: 'Home team:',
|
|
3141
|
-
awayTeam: 'Away team:',
|
|
3142
|
-
selectionCleared: 'Your selection has been cleared.',
|
|
3143
|
-
selectionOnLineCleared: 'Your selection on this line will be cleared.',
|
|
3144
|
-
loading: 'Loading...',
|
|
3145
|
-
error: 'Error!',
|
|
3146
|
-
noData: 'No data available.',
|
|
3147
|
-
lineInfo: 'Line {currentPage} of {totalPages}',
|
|
3148
|
-
clearAll: 'Clear All',
|
|
3149
|
-
cancel: 'Cancel',
|
|
3150
|
-
confirm: 'Confirm'
|
|
3151
|
-
},
|
|
3152
|
-
ro: {
|
|
3153
|
-
homeTeam: 'Echipa gazdă:',
|
|
3154
|
-
awayTeam: 'Echipa oaspete:',
|
|
3155
|
-
selectionCleared: 'Selecția dvs. a fost ștearsă.',
|
|
3156
|
-
selectionOnLineCleared: 'Selecția dvs. de pe această linie va fi ștearsă.',
|
|
3157
|
-
loading: `Se încarcă...',n error: 'Eroare!`,
|
|
3158
|
-
noData: 'Nu sunt date disponibile.',
|
|
3159
|
-
lineInfo: 'Linia {currentPage} din {totalPages}',
|
|
3160
|
-
clearAll: 'Șterge tot',
|
|
3161
|
-
cancel: 'Anulează',
|
|
3162
|
-
confirm: 'Confirmă'
|
|
3163
|
-
},
|
|
3164
|
-
fr: {
|
|
3165
|
-
homeTeam: 'Équipe à domicile:',
|
|
3166
|
-
awayTeam: `Équipe à l'extérieur:`,
|
|
3167
|
-
selectionCleared: 'Votre sélection a été effacée.',
|
|
3168
|
-
selectionOnLineCleared: 'Votre sélection sur cette ligne sera effacée.',
|
|
3169
|
-
loading: `Chargement...',n error: 'Erreur!`,
|
|
3170
|
-
noData: 'Aucune donnée disponible.',
|
|
3171
|
-
lineInfo: 'Ligne {currentPage} sur {totalPages}',
|
|
3172
|
-
clearAll: 'Tout effacer',
|
|
3173
|
-
cancel: 'Annuler',
|
|
3174
|
-
confirm: 'Confirmer'
|
|
3175
|
-
},
|
|
3176
|
-
ar: {
|
|
3177
|
-
homeTeam: 'الفريق المضيف:',
|
|
3178
|
-
awayTeam: 'الفريق الضيف:',
|
|
3179
|
-
selectionCleared: 'تم مسح اختيارك.',
|
|
3180
|
-
selectionOnLineCleared: 'سيتم مسح اختيارك في هذا السطر.',
|
|
3181
|
-
loading: `جار التحميل...',n error: 'خطأ!`,
|
|
3182
|
-
noData: 'لا توجد بيانات متاحة.',
|
|
3183
|
-
lineInfo: 'السطر {currentPage} من {totalPages}',
|
|
3184
|
-
clearAll: 'مسح الكل',
|
|
3185
|
-
cancel: 'إلغاء',
|
|
3186
|
-
confirm: 'تأكيد'
|
|
3187
|
-
},
|
|
3188
|
-
hr: {
|
|
3189
|
-
homeTeam: 'Domaći tim:',
|
|
3190
|
-
awayTeam: 'Gostujući tim:',
|
|
3191
|
-
selectionCleared: 'Vaš odabir je obrisan.',
|
|
3192
|
-
selectionOnLineCleared: 'Vaš odabir na ovoj liniji bit će obrisan.',
|
|
3193
|
-
loading: `Učitavanje...',n error: 'Greška!`,
|
|
3194
|
-
noData: 'Nema dostupnih podataka.',
|
|
3195
|
-
lineInfo: 'Linija {currentPage} od {totalPages}',
|
|
3196
|
-
clearAll: 'Očisti sve',
|
|
3197
|
-
cancel: 'Odustani',
|
|
3198
|
-
confirm: 'Potvrdi'
|
|
3199
|
-
}
|
|
3200
|
-
};
|
|
3201
|
-
const translate = (key, customLang, replacements) => {
|
|
3202
|
-
const lang = customLang;
|
|
3203
|
-
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
3204
|
-
if (replacements) {
|
|
3205
|
-
Object.keys(replacements).forEach((placeholder) => {
|
|
3206
|
-
translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
|
|
3207
|
-
});
|
|
3208
|
-
}
|
|
3209
|
-
return translation;
|
|
3210
|
-
};
|
|
3211
|
-
const getTranslations = (data) => {
|
|
3212
|
-
Object.keys(data).forEach((item) => {
|
|
3213
|
-
for (let key in data[item]) {
|
|
3214
|
-
TRANSLATIONS[item][key] = data[item][key];
|
|
3215
|
-
}
|
|
3216
|
-
});
|
|
3217
|
-
};
|
|
3218
|
-
|
|
3219
|
-
const formatDate = ({ date, type = 'date', format: format$1 }) => {
|
|
3220
|
-
try {
|
|
3221
|
-
const parsedDate = parseISO(date);
|
|
3222
|
-
if (isNaN(parsedDate.getTime())) {
|
|
3223
|
-
throw new Error(`Invalid date: ${date}`);
|
|
3224
|
-
}
|
|
3225
|
-
if (format$1)
|
|
3226
|
-
return format(parsedDate, format$1);
|
|
3227
|
-
let formatStr = 'dd/MM/yyyy';
|
|
3228
|
-
if (type === 'time') {
|
|
3229
|
-
formatStr = 'dd/MM/yyyy HH:mm:ss';
|
|
3230
|
-
}
|
|
3231
|
-
else if (type === 'week') {
|
|
3232
|
-
formatStr = 'ccc dd/MM/yyyy HH:mm:ss';
|
|
3233
|
-
}
|
|
3234
|
-
return format(parsedDate, formatStr);
|
|
3235
|
-
}
|
|
3236
|
-
catch (error) {
|
|
3237
|
-
console.error('Error formatting date:', error.message);
|
|
3238
|
-
return '';
|
|
3239
|
-
}
|
|
3240
|
-
};
|
|
3241
|
-
const fetcher = (url) => fetch(url).then((r) => r.json());
|
|
3242
|
-
const DEFAULT_BULLET_CONFIG = [
|
|
3243
|
-
{
|
|
3244
|
-
value: '1'
|
|
3245
|
-
},
|
|
3246
|
-
{
|
|
3247
|
-
value: 'X'
|
|
3248
|
-
},
|
|
3249
|
-
{
|
|
3250
|
-
value: '2'
|
|
3251
|
-
}
|
|
3252
|
-
];
|
|
3253
|
-
const SPLIT_TOKEN = '-';
|
|
3254
|
-
const showNotification = ({ message, theme = 'success', position = 'top-end', duration = 3000 }) => {
|
|
3255
|
-
if (!customElements.get('vaadin-notification')) {
|
|
3256
|
-
console.warn('vaadin-notification is not registered. Please ensure it is imported.');
|
|
3257
|
-
}
|
|
3258
|
-
const notification = document.createElement('vaadin-notification');
|
|
3259
|
-
notification.renderer = (root) => {
|
|
3260
|
-
root.textContent = message;
|
|
3261
|
-
};
|
|
3262
|
-
notification.duration = duration;
|
|
3263
|
-
if (theme) {
|
|
3264
|
-
notification.setAttribute('theme', theme);
|
|
3265
|
-
}
|
|
3266
|
-
notification.setAttribute('position', position);
|
|
3267
|
-
document.body.appendChild(notification);
|
|
3268
|
-
notification.opened = true;
|
|
3269
|
-
};
|
|
3270
|
-
|
|
3271
3083
|
var ka=Object.defineProperty,Ta=Object.defineProperties;var Pa=Object.getOwnPropertyDescriptors;var mo=Object.getOwnPropertySymbols;var Oa=Object.prototype.hasOwnProperty,Da=Object.prototype.propertyIsEnumerable;var ri=(s,t,e)=>t in s?ka(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,U=(s,t)=>{for(var e in t||(t={}))Oa.call(t,e)&&ri(s,e,t[e]);if(mo)for(var e of mo(t))Da.call(t,e)&&ri(s,e,t[e]);return s},Me=(s,t)=>Ta(s,Pa(t));var b=(s,t,e)=>(ri(s,typeof t!="symbol"?t+"":t,e),e);var Ne=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
|
|
3272
3084
|
* @license
|
|
3273
3085
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -10253,986 +10065,2159 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10253
10065
|
}
|
|
10254
10066
|
}
|
|
10255
10067
|
|
|
10256
|
-
:host([slot='middle'][opening]) {
|
|
10257
|
-
animation: lumo-notification-enter-fade-in 300ms;
|
|
10258
|
-
}
|
|
10068
|
+
:host([slot='middle'][opening]) {
|
|
10069
|
+
animation: lumo-notification-enter-fade-in 300ms;
|
|
10070
|
+
}
|
|
10071
|
+
|
|
10072
|
+
:host([slot='middle'][closing]) {
|
|
10073
|
+
animation: lumo-notification-exit-fade-out 300ms;
|
|
10074
|
+
}
|
|
10075
|
+
|
|
10076
|
+
:host([slot^='top'][opening]) {
|
|
10077
|
+
animation: lumo-notification-enter-slide-down 300ms;
|
|
10078
|
+
}
|
|
10079
|
+
|
|
10080
|
+
:host([slot^='top'][closing]) {
|
|
10081
|
+
animation: lumo-notification-exit-slide-up 300ms;
|
|
10082
|
+
}
|
|
10083
|
+
|
|
10084
|
+
:host([slot^='bottom'][opening]) {
|
|
10085
|
+
animation: lumo-notification-enter-slide-up 300ms;
|
|
10086
|
+
}
|
|
10087
|
+
|
|
10088
|
+
:host([slot^='bottom'][closing]) {
|
|
10089
|
+
animation: lumo-notification-exit-slide-down 300ms;
|
|
10090
|
+
}
|
|
10091
|
+
|
|
10092
|
+
:host([theme='success']) {
|
|
10093
|
+
--_focus-ring-gap-color: var(--lumo-success-color);
|
|
10094
|
+
--vaadin-focus-ring-color: var(--lumo-success-contrast-color);
|
|
10095
|
+
}
|
|
10096
|
+
|
|
10097
|
+
:host([theme='warning']) {
|
|
10098
|
+
--_focus-ring-gap-color: var(--lumo-warning-color);
|
|
10099
|
+
--vaadin-focus-ring-color: var(--lumo-warning-contrast-color);
|
|
10100
|
+
}
|
|
10101
|
+
|
|
10102
|
+
:host([theme='error']) {
|
|
10103
|
+
--_focus-ring-gap-color: var(--lumo-error-color);
|
|
10104
|
+
--vaadin-focus-ring-color: var(--lumo-error-contrast-color);
|
|
10105
|
+
}
|
|
10106
|
+
|
|
10107
|
+
:host([theme='primary']) {
|
|
10108
|
+
--_focus-ring-gap-color: var(--lumo-primary-color);
|
|
10109
|
+
--vaadin-focus-ring-color: var(--lumo-primary-contrast-color);
|
|
10110
|
+
}
|
|
10111
|
+
|
|
10112
|
+
:host([theme~='primary']) [part='overlay'] {
|
|
10113
|
+
background: var(--lumo-primary-color);
|
|
10114
|
+
color: var(--lumo-primary-contrast-color);
|
|
10115
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
10116
|
+
}
|
|
10117
|
+
|
|
10118
|
+
:host([theme~='primary']) {
|
|
10119
|
+
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
10120
|
+
--vaadin-button-text-color: var(--lumo-primary-contrast-color);
|
|
10121
|
+
--vaadin-button-primary-background: var(--lumo-primary-contrast-color);
|
|
10122
|
+
--vaadin-button-primary-text-color: var(--lumo-primary-text-color);
|
|
10123
|
+
}
|
|
10124
|
+
|
|
10125
|
+
:host([theme~='contrast']) [part='overlay'] {
|
|
10126
|
+
background: var(--lumo-contrast);
|
|
10127
|
+
color: var(--lumo-base-color);
|
|
10128
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
10129
|
+
}
|
|
10130
|
+
|
|
10131
|
+
:host([theme~='contrast']) {
|
|
10132
|
+
--vaadin-button-background: var(--lumo-contrast-20pct);
|
|
10133
|
+
--vaadin-button-text-color: var(--lumo-base-color);
|
|
10134
|
+
--vaadin-button-primary-background: var(--lumo-base-color);
|
|
10135
|
+
--vaadin-button-primary-text-color: var(--lumo-contrast);
|
|
10136
|
+
}
|
|
10137
|
+
|
|
10138
|
+
:host([theme~='success']) [part='overlay'] {
|
|
10139
|
+
background: var(--lumo-success-color);
|
|
10140
|
+
color: var(--lumo-success-contrast-color);
|
|
10141
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
10142
|
+
}
|
|
10143
|
+
|
|
10144
|
+
:host([theme~='success']) {
|
|
10145
|
+
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
10146
|
+
--vaadin-button-text-color: var(--lumo-success-contrast-color);
|
|
10147
|
+
--vaadin-button-primary-background: var(--lumo-success-contrast-color);
|
|
10148
|
+
--vaadin-button-primary-text-color: var(--lumo-success-text-color);
|
|
10149
|
+
}
|
|
10150
|
+
|
|
10151
|
+
:host([theme~='error']) [part='overlay'] {
|
|
10152
|
+
background: var(--lumo-error-color);
|
|
10153
|
+
color: var(--lumo-error-contrast-color);
|
|
10154
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
10155
|
+
}
|
|
10156
|
+
|
|
10157
|
+
:host([theme~='error']) {
|
|
10158
|
+
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
10159
|
+
--vaadin-button-text-color: var(--lumo-error-contrast-color);
|
|
10160
|
+
--vaadin-button-primary-background: var(--lumo-error-contrast-color);
|
|
10161
|
+
--vaadin-button-primary-text-color: var(--lumo-error-text-color);
|
|
10162
|
+
}
|
|
10163
|
+
|
|
10164
|
+
:host([theme~='warning']) [part='overlay'] {
|
|
10165
|
+
background: var(--lumo-warning-color);
|
|
10166
|
+
color: var(--lumo-warning-contrast-color);
|
|
10167
|
+
box-shadow:
|
|
10168
|
+
inset 0 0 0 1px var(--lumo-contrast-20pct),
|
|
10169
|
+
var(--lumo-box-shadow-l);
|
|
10170
|
+
}
|
|
10171
|
+
|
|
10172
|
+
:host([theme~='warning']) {
|
|
10173
|
+
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
10174
|
+
--vaadin-button-text-color: var(--lumo-warning-contrast-color);
|
|
10175
|
+
--vaadin-button-primary-background: var(--lumo-shade-50pct);
|
|
10176
|
+
--vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
|
|
10177
|
+
}
|
|
10178
|
+
`,{moduleId:"lumo-notification-card"});/**
|
|
10179
|
+
* @license
|
|
10180
|
+
* Copyright 2020 Google LLC
|
|
10181
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
10182
|
+
*/const S_=(s,t)=>(s==null?void 0:s._$litType$)!==void 0;/**
|
|
10183
|
+
* @license
|
|
10184
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10185
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10186
|
+
*/class k_ extends On(I(q(g))){static get template(){return v`
|
|
10187
|
+
<style>
|
|
10188
|
+
:host {
|
|
10189
|
+
position: fixed;
|
|
10190
|
+
z-index: 1000;
|
|
10191
|
+
top: 0;
|
|
10192
|
+
left: 0;
|
|
10193
|
+
bottom: 0;
|
|
10194
|
+
right: 0;
|
|
10195
|
+
box-sizing: border-box;
|
|
10196
|
+
|
|
10197
|
+
display: flex;
|
|
10198
|
+
flex-direction: column;
|
|
10199
|
+
align-items: stretch;
|
|
10200
|
+
pointer-events: none;
|
|
10201
|
+
}
|
|
10202
|
+
|
|
10203
|
+
[region-group] {
|
|
10204
|
+
flex: 1 1 0%;
|
|
10205
|
+
display: flex;
|
|
10206
|
+
}
|
|
10207
|
+
|
|
10208
|
+
[region-group='top'] {
|
|
10209
|
+
align-items: flex-start;
|
|
10210
|
+
}
|
|
10211
|
+
|
|
10212
|
+
[region-group='bottom'] {
|
|
10213
|
+
align-items: flex-end;
|
|
10214
|
+
}
|
|
10215
|
+
|
|
10216
|
+
[region-group] > [region] {
|
|
10217
|
+
flex: 1 1 0%;
|
|
10218
|
+
}
|
|
10219
|
+
|
|
10220
|
+
@media (max-width: 420px) {
|
|
10221
|
+
[region-group] {
|
|
10222
|
+
flex-direction: column;
|
|
10223
|
+
align-items: stretch;
|
|
10224
|
+
}
|
|
10225
|
+
|
|
10226
|
+
[region-group='top'] {
|
|
10227
|
+
justify-content: flex-start;
|
|
10228
|
+
}
|
|
10229
|
+
|
|
10230
|
+
[region-group='bottom'] {
|
|
10231
|
+
justify-content: flex-end;
|
|
10232
|
+
}
|
|
10233
|
+
|
|
10234
|
+
[region-group] > [region] {
|
|
10235
|
+
flex: initial;
|
|
10236
|
+
}
|
|
10237
|
+
}
|
|
10238
|
+
</style>
|
|
10239
|
+
|
|
10240
|
+
<div region="top-stretch"><slot name="top-stretch"></slot></div>
|
|
10241
|
+
<div region-group="top">
|
|
10242
|
+
<div region="top-start"><slot name="top-start"></slot></div>
|
|
10243
|
+
<div region="top-center"><slot name="top-center"></slot></div>
|
|
10244
|
+
<div region="top-end"><slot name="top-end"></slot></div>
|
|
10245
|
+
</div>
|
|
10246
|
+
<div region="middle"><slot name="middle"></slot></div>
|
|
10247
|
+
<div region-group="bottom">
|
|
10248
|
+
<div region="bottom-start"><slot name="bottom-start"></slot></div>
|
|
10249
|
+
<div region="bottom-center"><slot name="bottom-center"></slot></div>
|
|
10250
|
+
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
10251
|
+
</div>
|
|
10252
|
+
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
10253
|
+
`}static get is(){return "vaadin-notification-container"}static get properties(){return {opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),qs&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener));}_detectIosNavbar(){const t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class T_ extends I(g){static get template(){return v`
|
|
10254
|
+
<style>
|
|
10255
|
+
:host {
|
|
10256
|
+
display: block;
|
|
10257
|
+
}
|
|
10258
|
+
|
|
10259
|
+
[part='overlay'] {
|
|
10260
|
+
pointer-events: auto;
|
|
10261
|
+
}
|
|
10262
|
+
|
|
10263
|
+
@media (forced-colors: active) {
|
|
10264
|
+
[part='overlay'] {
|
|
10265
|
+
outline: 3px solid;
|
|
10266
|
+
}
|
|
10267
|
+
}
|
|
10268
|
+
</style>
|
|
10269
|
+
|
|
10270
|
+
<div part="overlay">
|
|
10271
|
+
<div part="content">
|
|
10272
|
+
<slot></slot>
|
|
10273
|
+
</div>
|
|
10274
|
+
</div>
|
|
10275
|
+
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class K extends ct($t(q(g))){static get template(){return v`
|
|
10276
|
+
<style>
|
|
10277
|
+
:host {
|
|
10278
|
+
display: none !important;
|
|
10279
|
+
}
|
|
10280
|
+
</style>
|
|
10281
|
+
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
10282
|
+
`}static get is(){return "vaadin-notification"}static get properties(){return {duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return ["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return S_(t)?K._createAndShowNotification(i=>{Sr(t,i);},e):K._createAndShowNotification(i=>{i.innerText=t;},e)}static _createAndShowNotification(t,e){const i=document.createElement(K.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",o=>{o.detail.value||i.remove();}),i}get _container(){return K._container||(K._container=document.createElement("vaadin-notification-container"),document.body.appendChild(K._container)),K._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),to(this);}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1);});}requestContentUpdate(){this.renderer&&this.renderer(this._card,this);}_rendererChanged(t,e,i){if(!i)return;const o=this._oldRenderer!==t;this._oldRenderer=t,o&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate());}open(){this.opened=!0;}close(){this.opened=!1;}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard();}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener);}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1;}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card);}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"));}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard();}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&t!=="none"?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState();},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard();}_positionChanged(){this.opened&&this._animatedAppendNotificationCard();}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),t)));}}x(k_);x(T_);x(K);const Ea=p`
|
|
10283
|
+
:host {
|
|
10284
|
+
-webkit-tap-highlight-color: transparent;
|
|
10285
|
+
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
10286
|
+
}
|
|
10287
|
+
|
|
10288
|
+
/* Dividers */
|
|
10289
|
+
[part='items'] ::slotted(hr) {
|
|
10290
|
+
height: 1px;
|
|
10291
|
+
border: 0;
|
|
10292
|
+
padding: 0;
|
|
10293
|
+
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
10294
|
+
background-color: var(--lumo-contrast-10pct);
|
|
10295
|
+
}
|
|
10296
|
+
`;f("vaadin-list-box",Ea,{moduleId:"lumo-list-box"});/**
|
|
10297
|
+
* @license
|
|
10298
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10299
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10300
|
+
*/f("vaadin-select-item",eo,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",Ea,{moduleId:"lumo-select-list-box"});const P_=p`
|
|
10301
|
+
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
10302
|
+
text-align: start;
|
|
10303
|
+
}
|
|
10304
|
+
|
|
10305
|
+
[part='input-field'] {
|
|
10306
|
+
cursor: var(--lumo-clickable-cursor);
|
|
10307
|
+
}
|
|
10308
|
+
|
|
10309
|
+
[part='input-field'] ::slotted([slot='value']) {
|
|
10310
|
+
font-weight: var(--vaadin-input-field-value-font-weight, 500);
|
|
10311
|
+
}
|
|
10312
|
+
|
|
10313
|
+
[part='input-field'] ::slotted([slot='value']:not([placeholder])) {
|
|
10314
|
+
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
10315
|
+
}
|
|
10316
|
+
|
|
10317
|
+
:host([readonly]) [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
|
|
10318
|
+
color: var(--lumo-secondary-text-color);
|
|
10319
|
+
}
|
|
10320
|
+
|
|
10321
|
+
/* placeholder styles */
|
|
10322
|
+
[part='input-field'] ::slotted([slot='value'][placeholder]) {
|
|
10323
|
+
color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
|
|
10324
|
+
}
|
|
10325
|
+
|
|
10326
|
+
:host(:is([readonly], [disabled])) ::slotted([slot='value'][placeholder]) {
|
|
10327
|
+
opacity: 0;
|
|
10328
|
+
}
|
|
10259
10329
|
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10330
|
+
[part='toggle-button']::before {
|
|
10331
|
+
content: var(--lumo-icons-dropdown);
|
|
10332
|
+
}
|
|
10263
10333
|
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10334
|
+
/* Highlight the toggle button when hovering over the entire component */
|
|
10335
|
+
:host(:hover:not([readonly]):not([disabled])) [part='toggle-button'] {
|
|
10336
|
+
color: var(--lumo-contrast-80pct);
|
|
10337
|
+
}
|
|
10267
10338
|
|
|
10268
|
-
|
|
10269
|
-
|
|
10339
|
+
:host([theme~='small']) [part='input-field'] ::slotted([slot='value']) {
|
|
10340
|
+
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
10341
|
+
--_lumo-selected-item-padding: 0;
|
|
10342
|
+
}
|
|
10343
|
+
`;f("vaadin-select",[Oe,P_],{moduleId:"lumo-select"});f("vaadin-select-value-button",p`
|
|
10344
|
+
:host {
|
|
10345
|
+
font-family: var(--lumo-font-family);
|
|
10346
|
+
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
10347
|
+
padding: 0 0.25em;
|
|
10348
|
+
--_lumo-selected-item-height: var(--lumo-size-m);
|
|
10349
|
+
--_lumo-selected-item-padding: 0.5em;
|
|
10270
10350
|
}
|
|
10271
10351
|
|
|
10272
|
-
|
|
10273
|
-
|
|
10352
|
+
::slotted(*) {
|
|
10353
|
+
min-height: var(--_lumo-selected-item-height);
|
|
10354
|
+
padding-top: var(--_lumo-selected-item-padding);
|
|
10355
|
+
padding-bottom: var(--_lumo-selected-item-padding);
|
|
10356
|
+
font-size: inherit;
|
|
10274
10357
|
}
|
|
10275
10358
|
|
|
10276
|
-
|
|
10277
|
-
|
|
10359
|
+
::slotted(*:hover) {
|
|
10360
|
+
background-color: transparent;
|
|
10278
10361
|
}
|
|
10362
|
+
`,{moduleId:"lumo-select-value-button"});const O_=p`
|
|
10363
|
+
:host {
|
|
10364
|
+
--_lumo-item-selected-icon-display: block;
|
|
10365
|
+
}
|
|
10279
10366
|
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10367
|
+
/* Small viewport adjustment */
|
|
10368
|
+
:host([phone]) {
|
|
10369
|
+
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
10370
|
+
top: 0 !important;
|
|
10371
|
+
right: 0 !important;
|
|
10372
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
10373
|
+
left: 0 !important;
|
|
10374
|
+
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
10375
|
+
align-items: stretch;
|
|
10376
|
+
justify-content: flex-end;
|
|
10377
|
+
}
|
|
10284
10378
|
|
|
10285
|
-
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
}
|
|
10379
|
+
:host([no-vertical-overlap][top-aligned]) [part='overlay'] {
|
|
10380
|
+
margin-block-start: var(--lumo-space-xs);
|
|
10381
|
+
}
|
|
10289
10382
|
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
}
|
|
10383
|
+
:host([no-vertical-overlap][bottom-aligned]) [part='overlay'] {
|
|
10384
|
+
margin-block-end: var(--lumo-space-xs);
|
|
10385
|
+
}
|
|
10294
10386
|
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
}
|
|
10387
|
+
:host([theme~='align-left']) {
|
|
10388
|
+
text-align: left;
|
|
10389
|
+
}
|
|
10299
10390
|
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
box-shadow: var(--lumo-box-shadow-l);
|
|
10304
|
-
}
|
|
10391
|
+
:host([theme~='align-right']) {
|
|
10392
|
+
text-align: right;
|
|
10393
|
+
}
|
|
10305
10394
|
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10395
|
+
:host([theme~='align-center']) {
|
|
10396
|
+
text-align: center;
|
|
10397
|
+
}
|
|
10398
|
+
`;f("vaadin-select-overlay",[Hs,O_],{moduleId:"lumo-select-overlay"});/**
|
|
10399
|
+
* @license
|
|
10400
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10401
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10402
|
+
*/const D_=s=>class extends Ds(fe(s)){static get properties(){return {_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return ["Enter"," "]}get value(){return this._value!==void 0?this._value:this.textContent.trim()}set value(e){this._value=e;}ready(){super.ready();const e=this.getAttribute("value");e!==null&&(this.value=e);}focus(){this.disabled||(super.focus(),this._setFocused(!0));}_shouldSetActive(e){return !this.disabled&&!(e.type==="keydown"&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e);}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.blur());}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click());}};/**
|
|
10403
|
+
* @license
|
|
10404
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10405
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10406
|
+
*/class z_ extends D_(I(R(g))){static get is(){return "vaadin-select-item"}static get template(){return v`
|
|
10407
|
+
<style>
|
|
10408
|
+
:host {
|
|
10409
|
+
display: inline-block;
|
|
10410
|
+
}
|
|
10312
10411
|
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10412
|
+
:host([hidden]) {
|
|
10413
|
+
display: none !important;
|
|
10414
|
+
}
|
|
10415
|
+
</style>
|
|
10416
|
+
<span part="checkmark" aria-hidden="true"></span>
|
|
10417
|
+
<div part="content">
|
|
10418
|
+
<slot></slot>
|
|
10419
|
+
</div>
|
|
10420
|
+
`}ready(){super.ready(),this.setAttribute("role","option");}}x(z_);/**
|
|
10421
|
+
* @license
|
|
10422
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10423
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10424
|
+
*/function M_(s,t){const{scrollLeft:e}=s;return t!=="rtl"?e:s.scrollWidth-s.clientWidth+e}function N_(s,t,e){t!=="rtl"?s.scrollLeft=e:s.scrollLeft=s.clientWidth-s.scrollWidth+e;}/**
|
|
10425
|
+
* @license
|
|
10426
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
10427
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10428
|
+
*/const L_=s=>class extends me(s){get focused(){return (this._getItems()||[]).find(Ns)}get _vertical(){return !0}focus(){const e=this._getItems();if(Array.isArray(e)){const i=this._getAvailableIndex(e,0,null,o=>!Ki(o));i>=0&&this._focus(i);}}_getItems(){return Array.from(this.children)}_onKeyDown(e){if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;const{key:i}=e,o=this._getItems()||[],r=o.indexOf(this.focused);let n,a;const d=!this._vertical&&this.getAttribute("dir")==="rtl"?-1:1;this.__isPrevKey(i)?(a=-d,n=r-d):this.__isNextKey(i)?(a=d,n=r+d):i==="Home"?(a=1,n=0):i==="End"&&(a=-1,n=o.length-1),n=this._getAvailableIndex(o,n,a,h=>!Ki(h)),n>=0&&(e.preventDefault(),this._focus(n,!0));}__isPrevKey(e){return this._vertical?e==="ArrowUp":e==="ArrowLeft"}__isNextKey(e){return this._vertical?e==="ArrowDown":e==="ArrowRight"}_focus(e,i=!1){const o=this._getItems();this._focusItem(o[e],i);}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""));}_getAvailableIndex(e,i,o,r){const n=e.length;let a=i;for(let l=0;typeof a=="number"&&l<n;l+=1,a+=o||1){a<0?a=n-1:a>=n&&(a=0);const d=e[a];if(!d.hasAttribute("disabled")&&this.__isMatchingItem(d,r))return a}return -1}__isMatchingItem(e,i){return typeof i=="function"?i(e):!0}};/**
|
|
10429
|
+
* @license
|
|
10430
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10431
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10432
|
+
*/const V_=s=>class extends L_(s){static get properties(){return {disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return ["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return !this._vertical&&this.getAttribute("dir")==="rtl"}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return this.orientation!=="horizontal"}focus(){this._observer&&this._observer.flush();const e=Array.isArray(this.items)?this.items:[],i=this._getAvailableIndex(e,0,null,o=>o.tabIndex===0&&!Ki(o));i>=0?this._focus(i):super.focus();}ready(){super.ready(),this.addEventListener("click",i=>this._onClick(i));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Ss(e,()=>{this._setItems(this._filterItems(cn(this)));});}_getItems(){return this.items}_enhanceItems(e,i,o,r){if(!r&&e){this.setAttribute("aria-orientation",i||"vertical"),e.forEach(a=>{i?a.setAttribute("orientation",i):a.removeAttribute("orientation");}),this._setFocusable(o<0||!o?0:o);const n=e[o];e.forEach(a=>{a.selected=a===n;}),n&&!n.disabled&&this._scrollToItem(o);}}_filterItems(e){return e.filter(i=>i._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const i=this._filterItems(e.composedPath())[0];let o;i&&!i.disabled&&(o=this.items.indexOf(i))>=0&&(this.selected=o);}_searchKey(e,i){this._searchReset=M.debounce(this._searchReset,ie.after(500),()=>{this._searchBuf="";}),this._searchBuf+=i.toLowerCase(),this.items.some(r=>this.__isMatchingKey(r))||(this._searchBuf=i.toLowerCase());const o=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,o,1,r=>this.__isMatchingKey(r)&&getComputedStyle(r).display!=="none")}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;const i=e.key,o=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(i)&&i.length===1){const r=this._searchKey(o,i);r>=0&&this._focus(r);return}super._onKeyDown(e);}_isItemHidden(e){return getComputedStyle(e).display==="none"}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);const i=this.items[e];this.items.forEach(o=>{o.tabIndex=o===i?0:-1;});}_focus(e){this.items.forEach((i,o)=>{i.focused=o===e;}),this._setFocusable(e),this._scrollToItem(e),super._focus(e);}_scrollToItem(e){const i=this.items[e];if(!i)return;const o=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],r=this._scrollerElement.getBoundingClientRect(),n=(this.items[e+1]||i).getBoundingClientRect(),a=(this.items[e-1]||i).getBoundingClientRect();let l=0;!this._isRTL&&n[o[1]]>=r[o[1]]||this._isRTL&&n[o[1]]<=r[o[1]]?l=n[o[1]]-r[o[1]]:(!this._isRTL&&a[o[0]]<=r[o[0]]||this._isRTL&&a[o[0]]>=r[o[0]])&&(l=a[o[0]]-r[o[0]]),this._scroll(l);}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else {const i=this.getAttribute("dir")||"ltr",o=M_(this._scrollerElement,i)+e;N_(this._scrollerElement,i,o);}}};/**
|
|
10433
|
+
* @license
|
|
10434
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10435
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10436
|
+
*/class B_ extends V_(I(R(J(g)))){static get is(){return "vaadin-select-list-box"}static get template(){return v`
|
|
10437
|
+
<style>
|
|
10438
|
+
:host {
|
|
10439
|
+
display: flex;
|
|
10440
|
+
}
|
|
10318
10441
|
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
--vaadin-button-primary-background: var(--lumo-base-color);
|
|
10323
|
-
--vaadin-button-primary-text-color: var(--lumo-contrast);
|
|
10324
|
-
}
|
|
10442
|
+
:host([hidden]) {
|
|
10443
|
+
display: none !important;
|
|
10444
|
+
}
|
|
10325
10445
|
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10446
|
+
[part='items'] {
|
|
10447
|
+
height: 100%;
|
|
10448
|
+
width: 100%;
|
|
10449
|
+
overflow-y: auto;
|
|
10450
|
+
-webkit-overflow-scrolling: touch;
|
|
10451
|
+
}
|
|
10452
|
+
</style>
|
|
10453
|
+
<div part="items">
|
|
10454
|
+
<slot></slot>
|
|
10455
|
+
</div>
|
|
10456
|
+
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}x(B_);/**
|
|
10457
|
+
* @license
|
|
10458
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10459
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10460
|
+
*/const F_=s=>class extends Us(Jt(R(s))){static get observers(){return ["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0;}_getMenuElement(){return Array.from(this.children).find(e=>e.localName!=="style")}_updateOverlayWidth(e,i){if(e&&i){const o="--vaadin-select-overlay-width",r=getComputedStyle(i).getPropertyValue(o);r===""?this.style.removeProperty(o):this.style.setProperty(o,r);}}};/**
|
|
10461
|
+
* @license
|
|
10462
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10463
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10464
|
+
*/const R_=p`
|
|
10465
|
+
:host {
|
|
10466
|
+
align-items: flex-start;
|
|
10467
|
+
justify-content: flex-start;
|
|
10468
|
+
}
|
|
10331
10469
|
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
--vaadin-button-primary-background: var(--lumo-success-contrast-color);
|
|
10336
|
-
--vaadin-button-primary-text-color: var(--lumo-success-text-color);
|
|
10337
|
-
}
|
|
10470
|
+
:host(:not([phone])) [part='overlay'] {
|
|
10471
|
+
min-width: var(--vaadin-select-overlay-width, var(--vaadin-select-text-field-width));
|
|
10472
|
+
}
|
|
10338
10473
|
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
box-shadow: var(--lumo-box-shadow-l);
|
|
10474
|
+
@media (forced-colors: active) {
|
|
10475
|
+
[part='overlay'] {
|
|
10476
|
+
outline: 3px solid;
|
|
10343
10477
|
}
|
|
10478
|
+
}
|
|
10479
|
+
`;f("vaadin-select-overlay",[Kt,R_],{moduleId:"vaadin-select-overlay-styles"});class $_ extends F_(I(g)){static get is(){return "vaadin-select-overlay"}static get template(){return v`
|
|
10480
|
+
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
10481
|
+
<div part="overlay" id="overlay" tabindex="0">
|
|
10482
|
+
<div part="content" id="content">
|
|
10483
|
+
<slot></slot>
|
|
10484
|
+
</div>
|
|
10485
|
+
</div>
|
|
10486
|
+
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}x($_);/**
|
|
10487
|
+
* @license
|
|
10488
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10489
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10490
|
+
*/const H_=p`
|
|
10491
|
+
:host {
|
|
10492
|
+
display: inline-block;
|
|
10493
|
+
position: relative;
|
|
10494
|
+
outline: none;
|
|
10495
|
+
white-space: nowrap;
|
|
10496
|
+
-webkit-user-select: none;
|
|
10497
|
+
-moz-user-select: none;
|
|
10498
|
+
user-select: none;
|
|
10499
|
+
min-width: 0;
|
|
10500
|
+
width: 0;
|
|
10501
|
+
}
|
|
10344
10502
|
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
}
|
|
10503
|
+
::slotted(*) {
|
|
10504
|
+
padding-left: 0;
|
|
10505
|
+
padding-right: 0;
|
|
10506
|
+
flex: auto;
|
|
10507
|
+
}
|
|
10351
10508
|
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10509
|
+
/* placeholder styles */
|
|
10510
|
+
::slotted(*:not([selected])) {
|
|
10511
|
+
line-height: 1;
|
|
10512
|
+
}
|
|
10513
|
+
|
|
10514
|
+
.vaadin-button-container {
|
|
10515
|
+
display: inline-flex;
|
|
10516
|
+
align-items: center;
|
|
10517
|
+
justify-content: center;
|
|
10518
|
+
text-align: inherit;
|
|
10519
|
+
width: 100%;
|
|
10520
|
+
height: 100%;
|
|
10521
|
+
min-height: inherit;
|
|
10522
|
+
text-shadow: inherit;
|
|
10523
|
+
}
|
|
10359
10524
|
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10525
|
+
[part='label'] {
|
|
10526
|
+
white-space: nowrap;
|
|
10527
|
+
overflow: hidden;
|
|
10528
|
+
text-overflow: ellipsis;
|
|
10529
|
+
width: 100%;
|
|
10530
|
+
line-height: inherit;
|
|
10531
|
+
}
|
|
10532
|
+
`;/**
|
|
10367
10533
|
* @license
|
|
10368
|
-
* Copyright
|
|
10369
|
-
*
|
|
10370
|
-
*/
|
|
10534
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10535
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10536
|
+
*/f("vaadin-select-value-button",H_,{moduleId:"vaadin-select-value-button-styles"});class q_ extends Ws(I(g)){static get is(){return "vaadin-select-value-button"}static get template(){return v`
|
|
10537
|
+
<div class="vaadin-button-container">
|
|
10538
|
+
<span part="label">
|
|
10539
|
+
<slot></slot>
|
|
10540
|
+
</span>
|
|
10541
|
+
</div>
|
|
10542
|
+
`}}x(q_);/**
|
|
10543
|
+
* @license
|
|
10544
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10545
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10546
|
+
*/const U_=p`
|
|
10547
|
+
.sr-only {
|
|
10548
|
+
border: 0 !important;
|
|
10549
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
10550
|
+
-webkit-clip-path: inset(50%) !important;
|
|
10551
|
+
clip-path: inset(50%) !important;
|
|
10552
|
+
height: 1px !important;
|
|
10553
|
+
margin: -1px !important;
|
|
10554
|
+
overflow: hidden !important;
|
|
10555
|
+
padding: 0 !important;
|
|
10556
|
+
position: absolute !important;
|
|
10557
|
+
width: 1px !important;
|
|
10558
|
+
white-space: nowrap !important;
|
|
10559
|
+
}
|
|
10560
|
+
`;/**
|
|
10561
|
+
* @license
|
|
10562
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
10563
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10564
|
+
*/class W_ extends D{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(e,i)=>{i._setFocusElement(e),i.ariaTarget=e,i.stateTarget=e,e.setAttribute("aria-haspopup","listbox");}});}}/**
|
|
10371
10565
|
* @license
|
|
10372
10566
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10373
10567
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10374
|
-
*/class
|
|
10568
|
+
*/const j_=s=>class extends ct(Wt(Ls(me(jt(s))))){static get properties(){return {items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return [...super.delegateAttrs,"invalid"]}static get observers(){return ["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${lt()}`,this._srLabelController=new Cn(this),this._srLabelController.slotName="sr-label";}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1;}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new W_(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Xs(this._phoneMediaQuery,e=>{this._phone=e;})),this._tooltipController=new _e(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController);}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items));}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate();}__itemsChanged(e,i){(e||i)&&this.requestContentUpdate();}_assignMenuElement(e){e&&e!==this.__lastMenuElement&&(this._menuElement=e,this.__initMenuItems(e),e.addEventListener("items-changed",()=>{this.__initMenuItems(e);}),e.addEventListener("selected-changed",()=>this.__updateValueButton()),e.addEventListener("keydown",i=>this._onKeyDownInside(i),!0),e.addEventListener("click",i=>{const o=i.composedPath().find(r=>r._hasVaadinItemMixin);this.__dispatchChangePending=!!(o&&o.value!==void 0&&o.value!==this.value),this.opened=!1;},!0),this.__lastMenuElement=e);}__initMenuItems(e){e.items&&(this._items=e.items);}_valueChanged(e,i){this.toggleAttribute("has-value",!!e),i!==void 0&&!this.__dispatchChangePending&&this.validate();}_onClick(e){this.disabled||(e.preventDefault(),this.opened=!this.readonly);}_onToggleMouseDown(e){e.preventDefault();}_onKeyDown(e){if(e.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(e.key))e.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(e.key)&&e.key.length===1){const i=this._menuElement.selected,o=i!==void 0?i:-1,r=this._menuElement._searchKey(o,e.key);r>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=r);}}}_onKeyDownInside(e){/^(Tab)$/u.test(e.key)&&(this.opened=!1);}_openedChanged(e,i,o){if(!(!i||!o)){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1),i.style.setProperty("--vaadin-select-text-field-width",`${o.offsetWidth}px`);const r=this.hasAttribute("focus-ring");this._openedWithFocusRing=r,r&&this.removeAttribute("focus-ring");}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=e;}}_updateAriaExpanded(e,i){i&&i.setAttribute("aria-expanded",e?"true":"false");}_updateAriaLive(e){this.focusElement&&(e?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"));}__attachSelectedItem(e){let i;const o=e.getAttribute("label");o?i=this.__createItemElement({label:o}):i=e.cloneNode(!0),i._sourceItem=e,this.__appendValueItemElement(i,this.focusElement),i.selected=!0;}__createItemElement(e){const i=document.createElement(e.component||"vaadin-select-item");return e.label&&(i.textContent=e.label),e.value&&(i.value=e.value),e.disabled&&(i.disabled=e.disabled),e.className&&(i.className=e.className),i}__appendValueItemElement(e,i){i.appendChild(e),e.removeAttribute("tabindex"),e.removeAttribute("aria-selected"),e.removeAttribute("role"),e.removeAttribute("focused"),e.removeAttribute("focus-ring"),e.removeAttribute("active"),e.setAttribute("id",this._itemId);}_accessibleNameChanged(e){this._srLabelController.setLabel(e),this._setCustomAriaLabelledBy(e?this._srLabelController.defaultId:null);}_accessibleNameRefChanged(e){this._setCustomAriaLabelledBy(e);}_setCustomAriaLabelledBy(e){const i=this._getLabelIdWithItemId(e);this._fieldAriaController.setLabelId(i,!0);}_getLabelIdWithItemId(e){const o=(this._items?this._items[this._menuElement.selected]:!1)||this.placeholder?this._itemId:"";return e?`${e} ${o}`.trim():null}__updateValueButton(){const e=this.focusElement;if(!e)return;e.innerHTML="";const i=this._items[this._menuElement.selected];if(e.removeAttribute("placeholder"),this._hasContent(i))this.__attachSelectedItem(i);else if(this.placeholder){const r=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(r,e),e.setAttribute("placeholder","");}!this._valueChanging&&i&&(this._selectedChanging=!0,this.value=i.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging);const o=i||this.placeholder?{newId:this._itemId}:{oldId:this._itemId};we(e,"aria-labelledby",o),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId);}_hasContent(e){if(!e)return !1;const i=!!(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()),o=e.childElementCount>0;return i||o}_updateSelectedItem(e,i){if(i){const o=e==null?e:e.toString();this._menuElement.selected=i.reduce((r,n,a)=>r===void 0&&n.value===o?a:r,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging);}}_shouldRemoveFocus(){return !this.opened}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}checkValidity(){return !this.required||this.readonly||!!this.value}__defaultRenderer(e,i){if(!this.items||this.items.length===0){e.textContent="";return}let o=e.firstElementChild;o||(o=document.createElement("vaadin-select-list-box"),e.appendChild(o)),o.textContent="",this.items.forEach(r=>{o.appendChild(this.__createItemElement(r));});}__dispatchChange(){return Ne(this,null,function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1;})}};/**
|
|
10569
|
+
* @license
|
|
10570
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10571
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10572
|
+
*/f("vaadin-select",[$n,Hn,U_],{moduleId:"vaadin-select-styles"});class Y_ extends j_(q(I(g))){static get is(){return "vaadin-select"}static get template(){return v`
|
|
10375
10573
|
<style>
|
|
10376
10574
|
:host {
|
|
10377
|
-
position:
|
|
10378
|
-
z-index: 1000;
|
|
10379
|
-
top: 0;
|
|
10380
|
-
left: 0;
|
|
10381
|
-
bottom: 0;
|
|
10382
|
-
right: 0;
|
|
10383
|
-
box-sizing: border-box;
|
|
10384
|
-
|
|
10385
|
-
display: flex;
|
|
10386
|
-
flex-direction: column;
|
|
10387
|
-
align-items: stretch;
|
|
10388
|
-
pointer-events: none;
|
|
10575
|
+
position: relative;
|
|
10389
10576
|
}
|
|
10390
10577
|
|
|
10391
|
-
[
|
|
10392
|
-
flex: 1
|
|
10393
|
-
display: flex;
|
|
10578
|
+
::slotted([slot='value']) {
|
|
10579
|
+
flex-grow: 1;
|
|
10394
10580
|
}
|
|
10581
|
+
</style>
|
|
10395
10582
|
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10583
|
+
<div class="vaadin-select-container">
|
|
10584
|
+
<div part="label" on-click="_onClick">
|
|
10585
|
+
<slot name="label"></slot>
|
|
10586
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
10587
|
+
</div>
|
|
10399
10588
|
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10589
|
+
<vaadin-input-container
|
|
10590
|
+
part="input-field"
|
|
10591
|
+
readonly="[[readonly]]"
|
|
10592
|
+
disabled="[[disabled]]"
|
|
10593
|
+
invalid="[[invalid]]"
|
|
10594
|
+
theme$="[[_theme]]"
|
|
10595
|
+
on-click="_onClick"
|
|
10596
|
+
>
|
|
10597
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
10598
|
+
<slot name="value"></slot>
|
|
10599
|
+
<div part="toggle-button" slot="suffix" aria-hidden="true" on-mousedown="_onToggleMouseDown"></div>
|
|
10600
|
+
</vaadin-input-container>
|
|
10403
10601
|
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10602
|
+
<div part="helper-text">
|
|
10603
|
+
<slot name="helper"></slot>
|
|
10604
|
+
</div>
|
|
10407
10605
|
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
}
|
|
10606
|
+
<div part="error-message">
|
|
10607
|
+
<slot name="error-message"></slot>
|
|
10608
|
+
</div>
|
|
10609
|
+
</div>
|
|
10413
10610
|
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10611
|
+
<vaadin-select-overlay
|
|
10612
|
+
position-target="[[_inputContainer]]"
|
|
10613
|
+
opened="{{opened}}"
|
|
10614
|
+
with-backdrop="[[_phone]]"
|
|
10615
|
+
phone$="[[_phone]]"
|
|
10616
|
+
theme$="[[_theme]]"
|
|
10617
|
+
no-vertical-overlap$="[[noVerticalOverlap]]"
|
|
10618
|
+
on-vaadin-overlay-open="_onOverlayOpen"
|
|
10619
|
+
></vaadin-select-overlay>
|
|
10417
10620
|
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10621
|
+
<slot name="tooltip"></slot>
|
|
10622
|
+
<div class="sr-only">
|
|
10623
|
+
<slot name="sr-label"></slot>
|
|
10624
|
+
</div>
|
|
10625
|
+
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),to(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}x(Y_);const Sa=p`
|
|
10626
|
+
/* Optical centering */
|
|
10627
|
+
:host::before,
|
|
10628
|
+
:host::after {
|
|
10629
|
+
content: '';
|
|
10630
|
+
flex-basis: 0;
|
|
10631
|
+
flex-grow: 1;
|
|
10632
|
+
}
|
|
10421
10633
|
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
}
|
|
10426
|
-
</style>
|
|
10634
|
+
:host::after {
|
|
10635
|
+
flex-grow: 1.1;
|
|
10636
|
+
}
|
|
10427
10637
|
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
<div region="bottom-center"><slot name="bottom-center"></slot></div>
|
|
10438
|
-
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
10439
|
-
</div>
|
|
10440
|
-
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
10441
|
-
`}static get is(){return "vaadin-notification-container"}static get properties(){return {opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),qs&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener));}_detectIosNavbar(){const t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class T_ extends I(g){static get template(){return v`
|
|
10442
|
-
<style>
|
|
10443
|
-
:host {
|
|
10444
|
-
display: block;
|
|
10445
|
-
}
|
|
10638
|
+
[part='overlay'] {
|
|
10639
|
+
border-radius: var(--lumo-border-radius-l);
|
|
10640
|
+
box-shadow:
|
|
10641
|
+
0 0 0 1px var(--lumo-shade-5pct),
|
|
10642
|
+
var(--lumo-box-shadow-xl);
|
|
10643
|
+
background-image: none;
|
|
10644
|
+
outline: none;
|
|
10645
|
+
-webkit-tap-highlight-color: transparent;
|
|
10646
|
+
}
|
|
10446
10647
|
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10648
|
+
[part='content'] {
|
|
10649
|
+
padding: var(--lumo-space-l);
|
|
10650
|
+
}
|
|
10450
10651
|
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
}
|
|
10455
|
-
}
|
|
10456
|
-
</style>
|
|
10652
|
+
:host(:is([has-header], [has-title])) [part='header'] + [part='content'] {
|
|
10653
|
+
padding-top: 0;
|
|
10654
|
+
}
|
|
10457
10655
|
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class K extends ct($t(q(g))){static get template(){return v`
|
|
10464
|
-
<style>
|
|
10465
|
-
:host {
|
|
10466
|
-
display: none !important;
|
|
10467
|
-
}
|
|
10468
|
-
</style>
|
|
10469
|
-
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
10470
|
-
`}static get is(){return "vaadin-notification"}static get properties(){return {duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return ["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return S_(t)?K._createAndShowNotification(i=>{Sr(t,i);},e):K._createAndShowNotification(i=>{i.innerText=t;},e)}static _createAndShowNotification(t,e){const i=document.createElement(K.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",o=>{o.detail.value||i.remove();}),i}get _container(){return K._container||(K._container=document.createElement("vaadin-notification-container"),document.body.appendChild(K._container)),K._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),to(this);}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1);});}requestContentUpdate(){this.renderer&&this.renderer(this._card,this);}_rendererChanged(t,e,i){if(!i)return;const o=this._oldRenderer!==t;this._oldRenderer=t,o&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate());}open(){this.opened=!0;}close(){this.opened=!1;}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard();}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener);}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1;}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card);}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"));}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard();}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&t!=="none"?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState();},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard();}_positionChanged(){this.opened&&this._animatedAppendNotificationCard();}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),t)));}}x(k_);x(T_);x(K);const Ea=p`
|
|
10471
|
-
:host {
|
|
10472
|
-
-webkit-tap-highlight-color: transparent;
|
|
10473
|
-
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
10656
|
+
[part='header'],
|
|
10657
|
+
[part='header-content'],
|
|
10658
|
+
[part='footer'] {
|
|
10659
|
+
gap: var(--lumo-space-xs) var(--lumo-space-s);
|
|
10660
|
+
line-height: var(--lumo-line-height-s);
|
|
10474
10661
|
}
|
|
10475
10662
|
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
border: 0;
|
|
10480
|
-
padding: 0;
|
|
10481
|
-
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
10482
|
-
background-color: var(--lumo-contrast-10pct);
|
|
10663
|
+
[part='header'] {
|
|
10664
|
+
padding: var(--lumo-space-m);
|
|
10665
|
+
background-color: var(--lumo-base-color);
|
|
10666
|
+
border-radius: var(--lumo-border-radius-l) var(--lumo-border-radius-l) 0 0; /* Needed for Safari */
|
|
10483
10667
|
}
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10668
|
+
|
|
10669
|
+
[part='footer'] {
|
|
10670
|
+
padding: var(--lumo-space-s) var(--lumo-space-m);
|
|
10671
|
+
background-color: var(--lumo-contrast-5pct);
|
|
10672
|
+
border-radius: 0 0 var(--lumo-border-radius-l) var(--lumo-border-radius-l); /* Needed for Safari */
|
|
10673
|
+
}
|
|
10674
|
+
|
|
10675
|
+
[part='title'] {
|
|
10676
|
+
font-size: var(--lumo-font-size-xl);
|
|
10677
|
+
font-weight: 600;
|
|
10678
|
+
color: var(--lumo-header-text-color);
|
|
10679
|
+
margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
|
|
10680
|
+
}
|
|
10681
|
+
|
|
10682
|
+
/* No padding */
|
|
10683
|
+
:host([theme~='no-padding']) [part='content'] {
|
|
10684
|
+
padding: 0 !important;
|
|
10685
|
+
}
|
|
10686
|
+
|
|
10687
|
+
@media (min-height: 320px) {
|
|
10688
|
+
:host([overflow~='top']) [part='header'] {
|
|
10689
|
+
box-shadow: 0 1px 0 0 var(--lumo-contrast-10pct);
|
|
10690
|
+
}
|
|
10491
10691
|
}
|
|
10492
10692
|
|
|
10493
|
-
|
|
10494
|
-
|
|
10693
|
+
/* Animations */
|
|
10694
|
+
|
|
10695
|
+
:host([opening]),
|
|
10696
|
+
:host([closing]) {
|
|
10697
|
+
animation: 0.25s lumo-overlay-dummy-animation;
|
|
10495
10698
|
}
|
|
10496
10699
|
|
|
10497
|
-
[
|
|
10498
|
-
|
|
10700
|
+
:host([opening]) [part='overlay'] {
|
|
10701
|
+
animation: 0.12s 0.05s vaadin-dialog-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
|
10499
10702
|
}
|
|
10500
10703
|
|
|
10501
|
-
|
|
10502
|
-
|
|
10704
|
+
@keyframes vaadin-dialog-enter {
|
|
10705
|
+
0% {
|
|
10706
|
+
opacity: 0;
|
|
10707
|
+
transform: scale(0.95);
|
|
10708
|
+
}
|
|
10503
10709
|
}
|
|
10504
10710
|
|
|
10505
|
-
:host([
|
|
10506
|
-
|
|
10711
|
+
:host([closing]) [part='overlay'] {
|
|
10712
|
+
animation: 0.1s 0.03s vaadin-dialog-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
10507
10713
|
}
|
|
10508
10714
|
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
|
|
10715
|
+
:host([closing]) [part='backdrop'] {
|
|
10716
|
+
animation-delay: 0.05s;
|
|
10512
10717
|
}
|
|
10513
10718
|
|
|
10514
|
-
|
|
10515
|
-
|
|
10719
|
+
@keyframes vaadin-dialog-exit {
|
|
10720
|
+
100% {
|
|
10721
|
+
opacity: 0;
|
|
10722
|
+
transform: scale(1.02);
|
|
10723
|
+
}
|
|
10516
10724
|
}
|
|
10725
|
+
`;f("vaadin-dialog-overlay",[ht,Sa],{moduleId:"lumo-dialog"});f("vaadin-confirm-dialog-overlay",[ht,Sa,p`
|
|
10726
|
+
[part='header'] ::slotted(h3) {
|
|
10727
|
+
margin-top: 0 !important;
|
|
10728
|
+
margin-bottom: 0 !important;
|
|
10729
|
+
margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
|
|
10730
|
+
}
|
|
10517
10731
|
|
|
10518
|
-
|
|
10519
|
-
|
|
10732
|
+
[part='message'] {
|
|
10733
|
+
width: 25em;
|
|
10734
|
+
min-width: 100%;
|
|
10735
|
+
max-width: 100%;
|
|
10736
|
+
}
|
|
10737
|
+
|
|
10738
|
+
::slotted([slot$='button'][theme~='tertiary']) {
|
|
10739
|
+
padding-left: var(--lumo-space-s);
|
|
10740
|
+
padding-right: var(--lumo-space-s);
|
|
10741
|
+
}
|
|
10742
|
+
|
|
10743
|
+
[part='cancel-button'] {
|
|
10744
|
+
flex-grow: 1;
|
|
10745
|
+
}
|
|
10746
|
+
|
|
10747
|
+
@media (max-width: 360px) {
|
|
10748
|
+
[part='footer'] {
|
|
10749
|
+
flex-direction: column-reverse;
|
|
10750
|
+
align-items: stretch;
|
|
10751
|
+
padding: var(--lumo-space-s) var(--lumo-space-l);
|
|
10752
|
+
gap: var(--lumo-space-s);
|
|
10753
|
+
}
|
|
10754
|
+
|
|
10755
|
+
::slotted([slot$='button']) {
|
|
10756
|
+
width: 100%;
|
|
10757
|
+
margin: 0;
|
|
10758
|
+
}
|
|
10759
|
+
}
|
|
10760
|
+
`],{moduleId:"lumo-confirm-dialog-overlay"});/**
|
|
10761
|
+
* @license
|
|
10762
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10763
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10764
|
+
*/const G_=s=>class extends s{static get properties(){return {opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1},overlayRole:{type:String,value:"dialog"}}}ready(){super.ready();const e=this.$.overlay;e.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),e.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),e.addEventListener("vaadin-overlay-closed",this.__handleOverlayClosed.bind(this)),this._overlayElement=e;}__handleOverlayClosed(){this.dispatchEvent(new CustomEvent("closed"));}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0);}disconnectedCallback(){super.disconnectedCallback(),setTimeout(()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1);});}_onOverlayOpened(e){e.detail.value===!1&&(this.opened=!1);}_handleOutsideClick(e){this.noCloseOnOutsideClick&&e.preventDefault();}_handleEscPress(e){this.noCloseOnEsc&&e.preventDefault();}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront();}};/**
|
|
10765
|
+
* @license
|
|
10766
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10767
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10768
|
+
*/const K_=p`
|
|
10769
|
+
[part='header'],
|
|
10770
|
+
[part='header-content'],
|
|
10771
|
+
[part='footer'] {
|
|
10772
|
+
display: flex;
|
|
10773
|
+
align-items: center;
|
|
10774
|
+
flex-wrap: wrap;
|
|
10775
|
+
flex: none;
|
|
10776
|
+
pointer-events: none;
|
|
10777
|
+
z-index: 1;
|
|
10520
10778
|
}
|
|
10521
10779
|
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
color: var(--lumo-contrast-80pct);
|
|
10780
|
+
[part='header'] {
|
|
10781
|
+
flex-wrap: nowrap;
|
|
10525
10782
|
}
|
|
10526
10783
|
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10784
|
+
::slotted([slot='header-content']),
|
|
10785
|
+
::slotted([slot='title']),
|
|
10786
|
+
::slotted([slot='footer']) {
|
|
10787
|
+
display: contents;
|
|
10788
|
+
pointer-events: auto;
|
|
10530
10789
|
}
|
|
10531
|
-
`;f("vaadin-select",[Oe,P_],{moduleId:"lumo-select"});f("vaadin-select-value-button",p`
|
|
10532
|
-
:host {
|
|
10533
|
-
font-family: var(--lumo-font-family);
|
|
10534
|
-
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
10535
|
-
padding: 0 0.25em;
|
|
10536
|
-
--_lumo-selected-item-height: var(--lumo-size-m);
|
|
10537
|
-
--_lumo-selected-item-padding: 0.5em;
|
|
10538
|
-
}
|
|
10539
10790
|
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
font-size: inherit;
|
|
10545
|
-
}
|
|
10791
|
+
::slotted([slot='title']) {
|
|
10792
|
+
font: inherit !important;
|
|
10793
|
+
overflow-wrap: anywhere;
|
|
10794
|
+
}
|
|
10546
10795
|
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
}
|
|
10550
|
-
`,{moduleId:"lumo-select-value-button"});const O_=p`
|
|
10551
|
-
:host {
|
|
10552
|
-
--_lumo-item-selected-icon-display: block;
|
|
10796
|
+
[part='header-content'] {
|
|
10797
|
+
flex: 1;
|
|
10553
10798
|
}
|
|
10554
10799
|
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
|
|
10558
|
-
top: 0 !important;
|
|
10559
|
-
right: 0 !important;
|
|
10560
|
-
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
10561
|
-
left: 0 !important;
|
|
10562
|
-
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
|
|
10563
|
-
align-items: stretch;
|
|
10800
|
+
:host([has-title]) [part='header-content'],
|
|
10801
|
+
[part='footer'] {
|
|
10564
10802
|
justify-content: flex-end;
|
|
10565
10803
|
}
|
|
10566
10804
|
|
|
10567
|
-
:host([
|
|
10568
|
-
|
|
10805
|
+
:host(:not([has-title]):not([has-header])) [part='header'],
|
|
10806
|
+
:host(:not([has-header])) [part='header-content'],
|
|
10807
|
+
:host(:not([has-title])) [part='title'],
|
|
10808
|
+
:host(:not([has-footer])) [part='footer'] {
|
|
10809
|
+
display: none !important;
|
|
10569
10810
|
}
|
|
10570
10811
|
|
|
10571
|
-
:host([
|
|
10572
|
-
|
|
10812
|
+
:host(:is([has-title], [has-header], [has-footer])) [part='content'] {
|
|
10813
|
+
height: auto;
|
|
10573
10814
|
}
|
|
10574
10815
|
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10816
|
+
@media (min-height: 320px) {
|
|
10817
|
+
:host(:is([has-title], [has-header], [has-footer])) .resizer-container {
|
|
10818
|
+
overflow: hidden;
|
|
10819
|
+
display: flex;
|
|
10820
|
+
flex-direction: column;
|
|
10821
|
+
}
|
|
10578
10822
|
|
|
10579
|
-
|
|
10580
|
-
|
|
10823
|
+
:host(:is([has-title], [has-header], [has-footer])) [part='content'] {
|
|
10824
|
+
flex: 1;
|
|
10825
|
+
overflow: auto;
|
|
10826
|
+
}
|
|
10581
10827
|
}
|
|
10582
10828
|
|
|
10583
|
-
|
|
10584
|
-
|
|
10829
|
+
/*
|
|
10830
|
+
NOTE(platosha): Make some min-width to prevent collapsing of the content
|
|
10831
|
+
taking the parent width, e. g., <vaadin-grid> and such.
|
|
10832
|
+
*/
|
|
10833
|
+
[part='content'] {
|
|
10834
|
+
min-width: 12em; /* matches the default <vaadin-text-field> width */
|
|
10585
10835
|
}
|
|
10586
|
-
`;f("vaadin-select-overlay",[Hs,O_],{moduleId:"lumo-select-overlay"});/**
|
|
10587
|
-
* @license
|
|
10588
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10589
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10590
|
-
*/const D_=s=>class extends Ds(fe(s)){static get properties(){return {_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return ["Enter"," "]}get value(){return this._value!==void 0?this._value:this.textContent.trim()}set value(e){this._value=e;}ready(){super.ready();const e=this.getAttribute("value");e!==null&&(this.value=e);}focus(){this.disabled||(super.focus(),this._setFocused(!0));}_shouldSetActive(e){return !this.disabled&&!(e.type==="keydown"&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e);}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.blur());}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click());}};/**
|
|
10591
|
-
* @license
|
|
10592
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10593
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10594
|
-
*/class z_ extends D_(I(R(g))){static get is(){return "vaadin-select-item"}static get template(){return v`
|
|
10595
|
-
<style>
|
|
10596
|
-
:host {
|
|
10597
|
-
display: inline-block;
|
|
10598
|
-
}
|
|
10599
10836
|
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
</style>
|
|
10604
|
-
<span part="checkmark" aria-hidden="true"></span>
|
|
10605
|
-
<div part="content">
|
|
10606
|
-
<slot></slot>
|
|
10607
|
-
</div>
|
|
10608
|
-
`}ready(){super.ready(),this.setAttribute("role","option");}}x(z_);/**
|
|
10609
|
-
* @license
|
|
10610
|
-
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10611
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10612
|
-
*/function M_(s,t){const{scrollLeft:e}=s;return t!=="rtl"?e:s.scrollWidth-s.clientWidth+e}function N_(s,t,e){t!=="rtl"?s.scrollLeft=e:s.scrollLeft=s.clientWidth-s.scrollWidth+e;}/**
|
|
10613
|
-
* @license
|
|
10614
|
-
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
10615
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10616
|
-
*/const L_=s=>class extends me(s){get focused(){return (this._getItems()||[]).find(Ns)}get _vertical(){return !0}focus(){const e=this._getItems();if(Array.isArray(e)){const i=this._getAvailableIndex(e,0,null,o=>!Ki(o));i>=0&&this._focus(i);}}_getItems(){return Array.from(this.children)}_onKeyDown(e){if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;const{key:i}=e,o=this._getItems()||[],r=o.indexOf(this.focused);let n,a;const d=!this._vertical&&this.getAttribute("dir")==="rtl"?-1:1;this.__isPrevKey(i)?(a=-d,n=r-d):this.__isNextKey(i)?(a=d,n=r+d):i==="Home"?(a=1,n=0):i==="End"&&(a=-1,n=o.length-1),n=this._getAvailableIndex(o,n,a,h=>!Ki(h)),n>=0&&(e.preventDefault(),this._focus(n,!0));}__isPrevKey(e){return this._vertical?e==="ArrowUp":e==="ArrowLeft"}__isNextKey(e){return this._vertical?e==="ArrowDown":e==="ArrowRight"}_focus(e,i=!1){const o=this._getItems();this._focusItem(o[e],i);}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""));}_getAvailableIndex(e,i,o,r){const n=e.length;let a=i;for(let l=0;typeof a=="number"&&l<n;l+=1,a+=o||1){a<0?a=n-1:a>=n&&(a=0);const d=e[a];if(!d.hasAttribute("disabled")&&this.__isMatchingItem(d,r))return a}return -1}__isMatchingItem(e,i){return typeof i=="function"?i(e):!0}};/**
|
|
10617
|
-
* @license
|
|
10618
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10619
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10620
|
-
*/const V_=s=>class extends L_(s){static get properties(){return {disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return ["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return !this._vertical&&this.getAttribute("dir")==="rtl"}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return this.orientation!=="horizontal"}focus(){this._observer&&this._observer.flush();const e=Array.isArray(this.items)?this.items:[],i=this._getAvailableIndex(e,0,null,o=>o.tabIndex===0&&!Ki(o));i>=0?this._focus(i):super.focus();}ready(){super.ready(),this.addEventListener("click",i=>this._onClick(i));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Ss(e,()=>{this._setItems(this._filterItems(cn(this)));});}_getItems(){return this.items}_enhanceItems(e,i,o,r){if(!r&&e){this.setAttribute("aria-orientation",i||"vertical"),e.forEach(a=>{i?a.setAttribute("orientation",i):a.removeAttribute("orientation");}),this._setFocusable(o<0||!o?0:o);const n=e[o];e.forEach(a=>{a.selected=a===n;}),n&&!n.disabled&&this._scrollToItem(o);}}_filterItems(e){return e.filter(i=>i._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const i=this._filterItems(e.composedPath())[0];let o;i&&!i.disabled&&(o=this.items.indexOf(i))>=0&&(this.selected=o);}_searchKey(e,i){this._searchReset=M.debounce(this._searchReset,ie.after(500),()=>{this._searchBuf="";}),this._searchBuf+=i.toLowerCase(),this.items.some(r=>this.__isMatchingKey(r))||(this._searchBuf=i.toLowerCase());const o=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,o,1,r=>this.__isMatchingKey(r)&&getComputedStyle(r).display!=="none")}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;const i=e.key,o=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(i)&&i.length===1){const r=this._searchKey(o,i);r>=0&&this._focus(r);return}super._onKeyDown(e);}_isItemHidden(e){return getComputedStyle(e).display==="none"}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);const i=this.items[e];this.items.forEach(o=>{o.tabIndex=o===i?0:-1;});}_focus(e){this.items.forEach((i,o)=>{i.focused=o===e;}),this._setFocusable(e),this._scrollToItem(e),super._focus(e);}_scrollToItem(e){const i=this.items[e];if(!i)return;const o=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],r=this._scrollerElement.getBoundingClientRect(),n=(this.items[e+1]||i).getBoundingClientRect(),a=(this.items[e-1]||i).getBoundingClientRect();let l=0;!this._isRTL&&n[o[1]]>=r[o[1]]||this._isRTL&&n[o[1]]<=r[o[1]]?l=n[o[1]]-r[o[1]]:(!this._isRTL&&a[o[0]]<=r[o[0]]||this._isRTL&&a[o[0]]>=r[o[0]])&&(l=a[o[0]]-r[o[0]]),this._scroll(l);}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else {const i=this.getAttribute("dir")||"ltr",o=M_(this._scrollerElement,i)+e;N_(this._scrollerElement,i,o);}}};/**
|
|
10621
|
-
* @license
|
|
10622
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10623
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10624
|
-
*/class B_ extends V_(I(R(J(g)))){static get is(){return "vaadin-select-list-box"}static get template(){return v`
|
|
10625
|
-
<style>
|
|
10626
|
-
:host {
|
|
10627
|
-
display: flex;
|
|
10628
|
-
}
|
|
10837
|
+
:host([has-bounds-set]) [part='overlay'] {
|
|
10838
|
+
max-width: none;
|
|
10839
|
+
}
|
|
10629
10840
|
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10841
|
+
@media (forced-colors: active) {
|
|
10842
|
+
[part='overlay'] {
|
|
10843
|
+
outline: 3px solid !important;
|
|
10844
|
+
}
|
|
10845
|
+
}
|
|
10846
|
+
`;p`
|
|
10847
|
+
[part='overlay'] {
|
|
10848
|
+
position: relative;
|
|
10849
|
+
overflow: visible;
|
|
10850
|
+
max-height: 100%;
|
|
10851
|
+
display: flex;
|
|
10852
|
+
}
|
|
10633
10853
|
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
overflow-y: auto;
|
|
10638
|
-
-webkit-overflow-scrolling: touch;
|
|
10639
|
-
}
|
|
10640
|
-
</style>
|
|
10641
|
-
<div part="items">
|
|
10642
|
-
<slot></slot>
|
|
10643
|
-
</div>
|
|
10644
|
-
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}x(B_);/**
|
|
10645
|
-
* @license
|
|
10646
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10647
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10648
|
-
*/const F_=s=>class extends Us(Jt(R(s))){static get observers(){return ["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0;}_getMenuElement(){return Array.from(this.children).find(e=>e.localName!=="style")}_updateOverlayWidth(e,i){if(e&&i){const o="--vaadin-select-overlay-width",r=getComputedStyle(i).getPropertyValue(o);r===""?this.style.removeProperty(o):this.style.setProperty(o,r);}}};/**
|
|
10649
|
-
* @license
|
|
10650
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10651
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10652
|
-
*/const R_=p`
|
|
10653
|
-
:host {
|
|
10654
|
-
align-items: flex-start;
|
|
10655
|
-
justify-content: flex-start;
|
|
10854
|
+
[part='content'] {
|
|
10855
|
+
box-sizing: border-box;
|
|
10856
|
+
height: 100%;
|
|
10656
10857
|
}
|
|
10657
10858
|
|
|
10658
|
-
|
|
10659
|
-
|
|
10859
|
+
.resizer-container {
|
|
10860
|
+
overflow: auto;
|
|
10861
|
+
flex-grow: 1;
|
|
10862
|
+
border-radius: inherit; /* prevent child elements being drawn outside part=overlay */
|
|
10660
10863
|
}
|
|
10661
10864
|
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
}
|
|
10865
|
+
[part='overlay'][style] .resizer-container {
|
|
10866
|
+
min-height: 100%;
|
|
10867
|
+
width: 100%;
|
|
10666
10868
|
}
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}x($_);/**
|
|
10675
|
-
* @license
|
|
10676
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10677
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10678
|
-
*/const H_=p`
|
|
10679
|
-
:host {
|
|
10680
|
-
display: inline-block;
|
|
10681
|
-
position: relative;
|
|
10682
|
-
outline: none;
|
|
10683
|
-
white-space: nowrap;
|
|
10869
|
+
|
|
10870
|
+
:host(:not([resizable])) .resizer {
|
|
10871
|
+
display: none;
|
|
10872
|
+
}
|
|
10873
|
+
|
|
10874
|
+
:host([resizable]) [part='title'] {
|
|
10875
|
+
cursor: move;
|
|
10684
10876
|
-webkit-user-select: none;
|
|
10685
|
-
-moz-user-select: none;
|
|
10686
10877
|
user-select: none;
|
|
10687
|
-
min-width: 0;
|
|
10688
|
-
width: 0;
|
|
10689
10878
|
}
|
|
10690
10879
|
|
|
10691
|
-
|
|
10692
|
-
|
|
10693
|
-
|
|
10694
|
-
|
|
10880
|
+
.resizer {
|
|
10881
|
+
position: absolute;
|
|
10882
|
+
height: 16px;
|
|
10883
|
+
width: 16px;
|
|
10695
10884
|
}
|
|
10696
10885
|
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10886
|
+
.resizer.edge {
|
|
10887
|
+
height: 8px;
|
|
10888
|
+
width: 8px;
|
|
10889
|
+
inset: -4px;
|
|
10700
10890
|
}
|
|
10701
10891
|
|
|
10702
|
-
.
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
text-align: inherit;
|
|
10707
|
-
width: 100%;
|
|
10708
|
-
height: 100%;
|
|
10709
|
-
min-height: inherit;
|
|
10710
|
-
text-shadow: inherit;
|
|
10892
|
+
.resizer.edge.n {
|
|
10893
|
+
width: auto;
|
|
10894
|
+
bottom: auto;
|
|
10895
|
+
cursor: ns-resize;
|
|
10711
10896
|
}
|
|
10712
10897
|
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10898
|
+
.resizer.ne {
|
|
10899
|
+
top: -4px;
|
|
10900
|
+
right: -4px;
|
|
10901
|
+
cursor: nesw-resize;
|
|
10902
|
+
}
|
|
10903
|
+
|
|
10904
|
+
.resizer.edge.e {
|
|
10905
|
+
height: auto;
|
|
10906
|
+
left: auto;
|
|
10907
|
+
cursor: ew-resize;
|
|
10908
|
+
}
|
|
10909
|
+
|
|
10910
|
+
.resizer.se {
|
|
10911
|
+
bottom: -4px;
|
|
10912
|
+
right: -4px;
|
|
10913
|
+
cursor: nwse-resize;
|
|
10914
|
+
}
|
|
10915
|
+
|
|
10916
|
+
.resizer.edge.s {
|
|
10917
|
+
width: auto;
|
|
10918
|
+
top: auto;
|
|
10919
|
+
cursor: ns-resize;
|
|
10920
|
+
}
|
|
10921
|
+
|
|
10922
|
+
.resizer.sw {
|
|
10923
|
+
bottom: -4px;
|
|
10924
|
+
left: -4px;
|
|
10925
|
+
cursor: nesw-resize;
|
|
10926
|
+
}
|
|
10927
|
+
|
|
10928
|
+
.resizer.edge.w {
|
|
10929
|
+
height: auto;
|
|
10930
|
+
right: auto;
|
|
10931
|
+
cursor: ew-resize;
|
|
10932
|
+
}
|
|
10933
|
+
|
|
10934
|
+
.resizer.nw {
|
|
10935
|
+
top: -4px;
|
|
10936
|
+
left: -4px;
|
|
10937
|
+
cursor: nwse-resize;
|
|
10719
10938
|
}
|
|
10720
10939
|
`;/**
|
|
10721
10940
|
* @license
|
|
10722
|
-
* Copyright (c)
|
|
10941
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10723
10942
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10724
|
-
*/
|
|
10725
|
-
<div class="vaadin-button-container">
|
|
10726
|
-
<span part="label">
|
|
10727
|
-
<slot></slot>
|
|
10728
|
-
</span>
|
|
10729
|
-
</div>
|
|
10730
|
-
`}}x(q_);/**
|
|
10943
|
+
*/const X_=s=>class extends s{static get properties(){return {ariaLabel:{type:String,value:""},contentHeight:{type:String},contentWidth:{type:String}}}static get observers(){return ["__updateContentHeight(contentHeight, _overlayElement)","__updateContentWidth(contentWidth, _overlayElement)"]}__updateDimension(e,i,o){const r=`--_vaadin-confirm-dialog-content-${i}`;o?e.style.setProperty(r,o):e.style.removeProperty(r);}__updateContentHeight(e,i){i&&this.__updateDimension(i,"height",e);}__updateContentWidth(e,i){i&&this.__updateDimension(i,"width",e);}};/**
|
|
10731
10944
|
* @license
|
|
10732
|
-
* Copyright (c)
|
|
10945
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10733
10946
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10734
|
-
*/const
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10947
|
+
*/const J_=p`
|
|
10948
|
+
:host {
|
|
10949
|
+
--_vaadin-confirm-dialog-content-width: auto;
|
|
10950
|
+
--_vaadin-confirm-dialog-content-height: auto;
|
|
10951
|
+
}
|
|
10952
|
+
|
|
10953
|
+
[part='overlay'] {
|
|
10954
|
+
width: var(--_vaadin-confirm-dialog-content-width);
|
|
10955
|
+
height: var(--_vaadin-confirm-dialog-content-height);
|
|
10956
|
+
}
|
|
10957
|
+
|
|
10958
|
+
::slotted([slot='header']) {
|
|
10959
|
+
pointer-events: auto;
|
|
10960
|
+
}
|
|
10961
|
+
|
|
10962
|
+
/* Make buttons clickable */
|
|
10963
|
+
[part='footer'] > * {
|
|
10964
|
+
pointer-events: all;
|
|
10747
10965
|
}
|
|
10748
10966
|
`;/**
|
|
10749
10967
|
* @license
|
|
10750
|
-
* Copyright (c)
|
|
10968
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10751
10969
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10752
|
-
*/
|
|
10970
|
+
*/f("vaadin-confirm-dialog-overlay",[Kt,K_,J_],{moduleId:"vaadin-confirm-dialog-overlay-styles"});class Q_ extends Jt(R(I(g))){static get is(){return "vaadin-confirm-dialog-overlay"}static get template(){return v`
|
|
10971
|
+
<div part="backdrop" id="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
10972
|
+
<div part="overlay" id="overlay" tabindex="0">
|
|
10973
|
+
<section id="resizerContainer" class="resizer-container">
|
|
10974
|
+
<header part="header"><slot name="header"></slot></header>
|
|
10975
|
+
<div part="content" id="content">
|
|
10976
|
+
<div part="message"><slot></slot></div>
|
|
10977
|
+
</div>
|
|
10978
|
+
<footer part="footer" role="toolbar">
|
|
10979
|
+
<div part="cancel-button">
|
|
10980
|
+
<slot name="cancel-button"></slot>
|
|
10981
|
+
</div>
|
|
10982
|
+
<div part="reject-button">
|
|
10983
|
+
<slot name="reject-button"></slot>
|
|
10984
|
+
</div>
|
|
10985
|
+
<div part="confirm-button">
|
|
10986
|
+
<slot name="confirm-button"></slot>
|
|
10987
|
+
</div>
|
|
10988
|
+
</footer>
|
|
10989
|
+
</section>
|
|
10990
|
+
</div>
|
|
10991
|
+
`}ready(){super.ready(),this.setAttribute("has-header",""),this.setAttribute("has-footer","");}}x(Q_);class Z_ extends X_(G_(ct($t(g)))){static get is(){return "vaadin-confirm-dialog-dialog"}static get template(){return v`
|
|
10992
|
+
<style>
|
|
10993
|
+
:host {
|
|
10994
|
+
display: none;
|
|
10995
|
+
}
|
|
10996
|
+
</style>
|
|
10997
|
+
|
|
10998
|
+
<vaadin-confirm-dialog-overlay
|
|
10999
|
+
id="overlay"
|
|
11000
|
+
opened="[[opened]]"
|
|
11001
|
+
on-opened-changed="_onOverlayOpened"
|
|
11002
|
+
on-mousedown="_bringOverlayToFront"
|
|
11003
|
+
on-touchstart="_bringOverlayToFront"
|
|
11004
|
+
theme$="[[_theme]]"
|
|
11005
|
+
modeless="[[modeless]]"
|
|
11006
|
+
with-backdrop="[[!modeless]]"
|
|
11007
|
+
resizable$="[[resizable]]"
|
|
11008
|
+
aria-label$="[[ariaLabel]]"
|
|
11009
|
+
restore-focus-on-close
|
|
11010
|
+
focus-trap
|
|
11011
|
+
></vaadin-confirm-dialog-overlay>
|
|
11012
|
+
`}}x(Z_);/**
|
|
10753
11013
|
* @license
|
|
10754
|
-
* Copyright (c)
|
|
11014
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10755
11015
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10756
|
-
*/const
|
|
11016
|
+
*/const em=s=>class extends s{static get properties(){return {accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return ["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this);}get __slottedNodes(){return [this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new D(this,"header","h3",{initializer:e=>{this._headerNode=e;}}),this.addController(this._headerController),this._messageController=new D(this,"","div",{multiple:!0,observe:!1,initializer:e=>{const i=document.createElement("div");i.style.display="contents";const o=`confirm-dialog-message-${lt()}`;i.id=o,this.appendChild(i),i.appendChild(e),this._messageNodes=[...this._messageNodes,i];}}),this.addController(this._messageController),this._cancelController=new D(this,"cancel-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("cancel",e);}}),this.addController(this._cancelController),this._rejectController=new D(this,"reject-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("reject",e);}}),this.addController(this._rejectController),this._confirmController=new D(this,"confirm-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("confirm",e);}}),this.addController(this._confirmController);}_initOverlay(e){e.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),e.addEventListener("vaadin-overlay-open",()=>this.__onDialogOpened()),e.addEventListener("vaadin-overlay-closed",()=>this.__onDialogClosed()),e.setAttribute("role","alertdialog");}__onDialogOpened(){const e=this._overlayElement;this.__slottedNodes.forEach(o=>{e.appendChild(o);});const i=e.querySelector('[slot="confirm-button"]');i&&i.focus();}__onDialogClosed(){this.__slottedNodes.forEach(e=>{this.appendChild(e);}),this.dispatchEvent(new CustomEvent("closed"));}__accessibleDescriptionRefChanged(e,i,o){!e||!i||(o!==void 0?we(e,"aria-describedby",{newId:o,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):i.forEach(r=>{we(e,"aria-describedby",{newId:r.id});}),this.__oldAccessibleDescriptionRef=o);}__setupSlottedButton(e,i){const o=`_${e}Button`,r=`__${e}`;this[o]&&this[o]!==i&&this[o].remove(),i.addEventListener("click",this[r]),this[o]=i;}__updateCancelButton(e,i,o,r){e&&(e===this._cancelController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o)),e.toggleAttribute("hidden",!r));}__updateConfirmButton(e,i,o){e&&e===this._confirmController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o));}__updateHeaderNode(e,i){e&&e===this._headerController.defaultNode&&(e.textContent=i);}__updateMessageNodes(e,i){if(e&&e.length>0){const o=e.find(r=>this._messageController.defaultNode&&r===this._messageController.defaultNode.parentElement);o&&(o.firstChild.textContent=i);}}__updateRejectButton(e,i,o,r){e&&(e===this._rejectController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o)),e.toggleAttribute("hidden",!r));}_escPressed(e){e.defaultPrevented||this.__cancel();}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1;}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1;}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1;}_getAriaLabel(e){return e||"confirmation"}};/**
|
|
10757
11017
|
* @license
|
|
10758
|
-
* Copyright (c)
|
|
11018
|
+
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
10759
11019
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10760
|
-
*/
|
|
11020
|
+
*/class tm extends em(q($t(J(g)))){static get template(){return v`
|
|
10761
11021
|
<style>
|
|
10762
|
-
:host
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
::slotted([slot='value']) {
|
|
10767
|
-
flex-grow: 1;
|
|
11022
|
+
:host,
|
|
11023
|
+
[hidden] {
|
|
11024
|
+
display: none !important;
|
|
10768
11025
|
}
|
|
10769
11026
|
</style>
|
|
10770
11027
|
|
|
10771
|
-
<
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
<vaadin-input-container
|
|
10778
|
-
part="input-field"
|
|
10779
|
-
readonly="[[readonly]]"
|
|
10780
|
-
disabled="[[disabled]]"
|
|
10781
|
-
invalid="[[invalid]]"
|
|
10782
|
-
theme$="[[_theme]]"
|
|
10783
|
-
on-click="_onClick"
|
|
10784
|
-
>
|
|
10785
|
-
<slot name="prefix" slot="prefix"></slot>
|
|
10786
|
-
<slot name="value"></slot>
|
|
10787
|
-
<div part="toggle-button" slot="suffix" aria-hidden="true" on-mousedown="_onToggleMouseDown"></div>
|
|
10788
|
-
</vaadin-input-container>
|
|
10789
|
-
|
|
10790
|
-
<div part="helper-text">
|
|
10791
|
-
<slot name="helper"></slot>
|
|
10792
|
-
</div>
|
|
10793
|
-
|
|
10794
|
-
<div part="error-message">
|
|
10795
|
-
<slot name="error-message"></slot>
|
|
10796
|
-
</div>
|
|
10797
|
-
</div>
|
|
10798
|
-
|
|
10799
|
-
<vaadin-select-overlay
|
|
10800
|
-
position-target="[[_inputContainer]]"
|
|
10801
|
-
opened="{{opened}}"
|
|
10802
|
-
with-backdrop="[[_phone]]"
|
|
10803
|
-
phone$="[[_phone]]"
|
|
11028
|
+
<vaadin-confirm-dialog-dialog
|
|
11029
|
+
id="dialog"
|
|
11030
|
+
opened="{{opened}}"
|
|
11031
|
+
overlay-class="[[overlayClass]]"
|
|
11032
|
+
aria-label="[[_getAriaLabel(header)]]"
|
|
10804
11033
|
theme$="[[_theme]]"
|
|
10805
|
-
no-
|
|
10806
|
-
|
|
10807
|
-
|
|
11034
|
+
no-close-on-outside-click
|
|
11035
|
+
no-close-on-esc="[[noCloseOnEsc]]"
|
|
11036
|
+
content-height="[[_contentHeight]]"
|
|
11037
|
+
content-width="[[_contentWidth]]"
|
|
11038
|
+
></vaadin-confirm-dialog-dialog>
|
|
10808
11039
|
|
|
10809
|
-
<
|
|
10810
|
-
|
|
10811
|
-
<slot
|
|
11040
|
+
<div hidden>
|
|
11041
|
+
<slot name="header"></slot>
|
|
11042
|
+
<slot></slot>
|
|
11043
|
+
<slot name="cancel-button"></slot>
|
|
11044
|
+
<slot name="reject-button"></slot>
|
|
11045
|
+
<slot name="confirm-button"></slot>
|
|
10812
11046
|
</div>
|
|
10813
|
-
`}static get
|
|
10814
|
-
/* Optical centering */
|
|
10815
|
-
:host::before,
|
|
10816
|
-
:host::after {
|
|
10817
|
-
content: '';
|
|
10818
|
-
flex-basis: 0;
|
|
10819
|
-
flex-grow: 1;
|
|
10820
|
-
}
|
|
11047
|
+
`}static get is(){return "vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement);}}x(tm);
|
|
10821
11048
|
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
11049
|
+
const DEFAULT_LANGUAGE$3 = 'en';
|
|
11050
|
+
const SUPPORTED_LANGUAGES$3 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
11051
|
+
const TRANSLATIONS$3 = {
|
|
11052
|
+
en: {
|
|
11053
|
+
filter: 'Filter',
|
|
11054
|
+
clear: 'Clear',
|
|
11055
|
+
searchByTicketId: 'Search by Ticket ID',
|
|
11056
|
+
enterTicketId: 'Enter Ticket ID',
|
|
11057
|
+
searchByTicketType: 'Search by Ticket Type',
|
|
11058
|
+
selectTicketType: 'Select Ticket Type',
|
|
11059
|
+
searchByDate: 'Search by Date',
|
|
11060
|
+
from: 'From',
|
|
11061
|
+
to: 'To',
|
|
11062
|
+
normal: 'Normal',
|
|
11063
|
+
subscription: 'Subscription',
|
|
11064
|
+
ticketsHistory: 'Tickets History',
|
|
11065
|
+
settled: 'Settled',
|
|
11066
|
+
purchased: 'Purchased',
|
|
11067
|
+
canceled: 'Canceled',
|
|
11068
|
+
noData: 'No data Avaliable.',
|
|
11069
|
+
ticketId: 'Ticket ID:',
|
|
11070
|
+
ticketType: 'Ticket Type:',
|
|
11071
|
+
ticketAmount: 'Ticket Amount:',
|
|
11072
|
+
lineDetail: 'Line Detail:',
|
|
11073
|
+
seeDetails: 'See Details',
|
|
11074
|
+
numberOfDraw: 'Number of Draw:',
|
|
11075
|
+
ticketResult: 'Ticket Result:',
|
|
11076
|
+
drawId: 'Draw ID:',
|
|
11077
|
+
drawDate: 'Draw Date:',
|
|
11078
|
+
result: 'Result:',
|
|
11079
|
+
prize: 'Prize:',
|
|
11080
|
+
bettingType: 'Betting Type:'
|
|
11081
|
+
},
|
|
11082
|
+
ro: {
|
|
11083
|
+
ticketsHistory: 'Istoric bilete',
|
|
11084
|
+
settled: 'Decontat',
|
|
11085
|
+
purchased: 'Achiziționat',
|
|
11086
|
+
canceled: 'Anulat',
|
|
11087
|
+
noData: 'Nu sunt date disponibile.',
|
|
11088
|
+
ticketId: 'ID bilet:',
|
|
11089
|
+
ticketType: 'Tip bilet:',
|
|
11090
|
+
ticketAmount: 'Suma biletului:',
|
|
11091
|
+
lineDetail: 'Detaliu linie:',
|
|
11092
|
+
seeDetails: 'Vezi detalii',
|
|
11093
|
+
numberOfDraw: 'Număr de extrageri:',
|
|
11094
|
+
ticketResult: 'Rezultat bilet:',
|
|
11095
|
+
drawId: 'ID extragere:',
|
|
11096
|
+
drawDate: 'Data extragerii:',
|
|
11097
|
+
result: 'Rezultat:',
|
|
11098
|
+
prize: 'Premiu:',
|
|
11099
|
+
bettingType: 'Tip de pariu:'
|
|
11100
|
+
},
|
|
11101
|
+
fr: {
|
|
11102
|
+
ticketsHistory: 'Historique des billets',
|
|
11103
|
+
settled: 'Réglé',
|
|
11104
|
+
purchased: 'Acheté',
|
|
11105
|
+
canceled: 'Annulé',
|
|
11106
|
+
noData: 'Aucune donnée disponible.',
|
|
11107
|
+
ticketId: 'ID du billet:',
|
|
11108
|
+
ticketType: 'Type de billet:',
|
|
11109
|
+
ticketAmount: 'Montant du billet:',
|
|
11110
|
+
lineDetail: 'Détail de la ligne:',
|
|
11111
|
+
seeDetails: 'Voir les détails',
|
|
11112
|
+
numberOfDraw: 'Nombre de tirages:',
|
|
11113
|
+
ticketResult: 'Résultat du billet:',
|
|
11114
|
+
drawId: 'ID du tirage:',
|
|
11115
|
+
drawDate: 'Date du tirage:',
|
|
11116
|
+
result: 'Résultat:',
|
|
11117
|
+
prize: 'Prix:',
|
|
11118
|
+
bettingType: 'Type de pari:'
|
|
11119
|
+
},
|
|
11120
|
+
ar: {
|
|
11121
|
+
ticketsHistory: 'سجل التذاكر',
|
|
11122
|
+
settled: 'تمت التسوية',
|
|
11123
|
+
purchased: 'تم شراؤها',
|
|
11124
|
+
canceled: 'تم الإلغاء',
|
|
11125
|
+
noData: 'لا توجد بيانات متاحة.',
|
|
11126
|
+
ticketId: 'معرف التذكرة:',
|
|
11127
|
+
ticketType: 'نوع التذكرة:',
|
|
11128
|
+
ticketAmount: 'مبلغ التذكرة:',
|
|
11129
|
+
lineDetail: 'تفاصيل الخط:',
|
|
11130
|
+
seeDetails: 'انظر التفاصيل',
|
|
11131
|
+
numberOfDraw: 'عدد السحوبات:',
|
|
11132
|
+
ticketResult: 'نتيجة التذكرة:',
|
|
11133
|
+
drawId: 'معرف السحب:',
|
|
11134
|
+
drawDate: 'تاريخ السحب:',
|
|
11135
|
+
result: 'النتيجة:',
|
|
11136
|
+
prize: 'الجائزة:',
|
|
11137
|
+
bettingType: 'نوع الرهان:'
|
|
11138
|
+
},
|
|
11139
|
+
hr: {
|
|
11140
|
+
ticketsHistory: 'Povijest listića',
|
|
11141
|
+
settled: 'Riješeno',
|
|
11142
|
+
purchased: 'Kupljeno',
|
|
11143
|
+
canceled: 'Otkazano',
|
|
11144
|
+
noData: 'Nema dostupnih podataka.',
|
|
11145
|
+
ticketId: 'ID listića:',
|
|
11146
|
+
ticketType: 'Vrsta listića:',
|
|
11147
|
+
ticketAmount: 'Iznos listića:',
|
|
11148
|
+
lineDetail: 'Detalji linije:',
|
|
11149
|
+
seeDetails: 'Vidi detalje',
|
|
11150
|
+
numberOfDraw: 'Broj izvlačenja:',
|
|
11151
|
+
ticketResult: 'Rezultat listića:',
|
|
11152
|
+
drawId: 'ID izvlačenja:',
|
|
11153
|
+
drawDate: 'Datum izvlačenja:',
|
|
11154
|
+
result: 'Rezultat:',
|
|
11155
|
+
prize: 'Nagrada:',
|
|
11156
|
+
bettingType: 'Vrsta oklade:'
|
|
11157
|
+
}
|
|
11158
|
+
};
|
|
11159
|
+
const translate$3 = (key, customLang, replacements) => {
|
|
11160
|
+
const lang = customLang;
|
|
11161
|
+
let translation = TRANSLATIONS$3[lang !== undefined && SUPPORTED_LANGUAGES$3.includes(lang) ? lang : DEFAULT_LANGUAGE$3][key];
|
|
11162
|
+
if (replacements) {
|
|
11163
|
+
Object.keys(replacements).forEach((placeholder) => {
|
|
11164
|
+
translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
|
|
11165
|
+
});
|
|
11166
|
+
}
|
|
11167
|
+
return translation;
|
|
11168
|
+
};
|
|
11169
|
+
const getTranslations$2 = (data) => {
|
|
11170
|
+
Object.keys(data).forEach((item) => {
|
|
11171
|
+
for (let key in data[item]) {
|
|
11172
|
+
TRANSLATIONS$3[item][key] = data[item][key];
|
|
11173
|
+
}
|
|
11174
|
+
});
|
|
11175
|
+
};
|
|
10825
11176
|
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
box-shadow:
|
|
10829
|
-
0 0 0 1px var(--lumo-shade-5pct),
|
|
10830
|
-
var(--lumo-box-shadow-xl);
|
|
10831
|
-
background-image: none;
|
|
10832
|
-
outline: none;
|
|
10833
|
-
-webkit-tap-highlight-color: transparent;
|
|
10834
|
-
}
|
|
11177
|
+
const lotteryTippingFilterCss = ".lottery-tipping-filter .operate-btns{display:flex;gap:10px}.lottery-tipping-filter .operate-btns .operate-btn{background:var(--emw--color-primary, #fed275);border:1px solid var(--emw--color-primary, #fed275);border-radius:16px;padding:8px 10px;font-size:14px;color:rgb(51, 51, 51);font-weight:600;cursor:pointer;transition:0.2s linear}.dialog-content{display:flex;flex-direction:column;align-items:center}.dialog-content .filter-item{margin-bottom:12px}.dialog-content .filter-item-label{text-align:center}.dialog-content .filter-item-val{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}@media screen and (max-width: 480px){.lottery-tipping-filter .operate-btns{gap:4px}}.general-multi-select-container{width:var(--vaadin-field-default-width, 16em)}";
|
|
11178
|
+
const LotteryTippingFilterStyle0 = lotteryTippingFilterCss;
|
|
10835
11179
|
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
11180
|
+
const LotteryTippingFilter = class {
|
|
11181
|
+
constructor(hostRef) {
|
|
11182
|
+
registerInstance(this, hostRef);
|
|
11183
|
+
this.filterChange = createEvent(this, "filterChange", 7);
|
|
11184
|
+
this.filterClear = createEvent(this, "filterClear", 7);
|
|
11185
|
+
this.handleTicketType = (event) => {
|
|
11186
|
+
if (event.detail && event.detail.length) {
|
|
11187
|
+
this.filterData.ticketType = event.detail;
|
|
11188
|
+
}
|
|
11189
|
+
};
|
|
11190
|
+
this.handleFilterFrom = (event) => {
|
|
11191
|
+
const inputElement = event.target;
|
|
11192
|
+
let dateArray = inputElement.value.split('-');
|
|
11193
|
+
if (dateArray.length === 3) {
|
|
11194
|
+
this.filterData = Object.assign(Object.assign({}, this.filterData), { filterFromCalendar: `${dateArray[2]}/${dateArray[1]}/${dateArray[0]}` });
|
|
11195
|
+
}
|
|
11196
|
+
};
|
|
11197
|
+
this.handleFilterTo = (event) => {
|
|
11198
|
+
const inputElement = event.target;
|
|
11199
|
+
let dateArray = inputElement.value.split('-');
|
|
11200
|
+
if (dateArray.length === 3) {
|
|
11201
|
+
this.filterData = Object.assign(Object.assign({}, this.filterData), { filterToCalendar: `${dateArray[2]}/${dateArray[1]}/${dateArray[0]}` });
|
|
11202
|
+
}
|
|
11203
|
+
};
|
|
11204
|
+
this.quickFiltersActive = false;
|
|
11205
|
+
this.mbSource = undefined;
|
|
11206
|
+
this.clientStyling = undefined;
|
|
11207
|
+
this.clientStylingUrl = undefined;
|
|
11208
|
+
this.language = 'en';
|
|
11209
|
+
this.translationUrl = undefined;
|
|
11210
|
+
this.isOpen = false;
|
|
11211
|
+
this.filterData = {
|
|
11212
|
+
filterFromCalendar: '',
|
|
11213
|
+
filterToCalendar: '',
|
|
11214
|
+
ticketId: '',
|
|
11215
|
+
ticketType: []
|
|
11216
|
+
};
|
|
11217
|
+
this.ticketTypeList = undefined;
|
|
11218
|
+
this.showClearButton = false;
|
|
11219
|
+
}
|
|
11220
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
11221
|
+
if (newValue != oldValue) {
|
|
11222
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11223
|
+
}
|
|
11224
|
+
}
|
|
11225
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
11226
|
+
if (newValue != oldValue) {
|
|
11227
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11228
|
+
}
|
|
11229
|
+
}
|
|
11230
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
11231
|
+
if (newValue != oldValue) {
|
|
11232
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11233
|
+
}
|
|
11234
|
+
}
|
|
11235
|
+
componentWillLoad() {
|
|
11236
|
+
if (this.translationUrl) {
|
|
11237
|
+
getTranslations$2(JSON.parse(this.translationUrl));
|
|
11238
|
+
}
|
|
11239
|
+
this.ticketTypeList = [
|
|
11240
|
+
{ label: translate$3('normal', this.language), value: 'NORMAL' },
|
|
11241
|
+
{ label: translate$3('subscription', this.language), value: 'SUBSCRIPTION' }
|
|
11242
|
+
];
|
|
11243
|
+
}
|
|
11244
|
+
componentDidLoad() {
|
|
11245
|
+
if (this.stylingContainer) {
|
|
11246
|
+
if (this.mbSource)
|
|
11247
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11248
|
+
if (this.clientStyling)
|
|
11249
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11250
|
+
if (this.clientStylingUrl)
|
|
11251
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11252
|
+
}
|
|
11253
|
+
}
|
|
11254
|
+
disconnectedCallback() {
|
|
11255
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
11256
|
+
}
|
|
11257
|
+
handleModalClose() {
|
|
11258
|
+
this.isOpen = false;
|
|
11259
|
+
}
|
|
11260
|
+
changeFormate(str) {
|
|
11261
|
+
const [day, month, year] = str.split('/');
|
|
11262
|
+
return `${year}-${month}-${day}`;
|
|
11263
|
+
}
|
|
11264
|
+
formateDate(dateParts) {
|
|
11265
|
+
const { year, month, day } = dateParts;
|
|
11266
|
+
const date = new Date(year, month, day);
|
|
11267
|
+
return format(date, 'dd/MM/yyyy');
|
|
11268
|
+
}
|
|
11269
|
+
parseDate(inputValue) {
|
|
11270
|
+
const [day, month, year] = inputValue.split('/');
|
|
11271
|
+
return { year, month: parseInt(month) - 1, day };
|
|
11272
|
+
}
|
|
11273
|
+
setDateFormate(dom) {
|
|
11274
|
+
dom.i18n = Object.assign(Object.assign({}, dom.i18n), { formatDate: this.formateDate, parseDate: this.parseDate });
|
|
11275
|
+
}
|
|
11276
|
+
clearSelection() {
|
|
11277
|
+
this.comboBox.clear();
|
|
11278
|
+
}
|
|
11279
|
+
resetSearch() {
|
|
11280
|
+
this.showClearButton = false;
|
|
11281
|
+
this.clearSelection();
|
|
11282
|
+
this.filterData = {
|
|
11283
|
+
filterFromCalendar: '',
|
|
11284
|
+
filterToCalendar: '',
|
|
11285
|
+
ticketId: '',
|
|
11286
|
+
ticketType: []
|
|
11287
|
+
};
|
|
11288
|
+
this.filterClear.emit();
|
|
11289
|
+
}
|
|
11290
|
+
handleDialogConfirm() {
|
|
11291
|
+
if (this.filterData.filterFromCalendar && this.filterData.filterToCalendar) {
|
|
11292
|
+
let dateArray = this.filterData.filterFromCalendar.split('/');
|
|
11293
|
+
let dateArrayTo = this.filterData.filterToCalendar.split('/');
|
|
11294
|
+
const transferData = {
|
|
11295
|
+
filterFromCalendar: new Date(Date.UTC(Number(dateArray[2]), Number(dateArray[1]) - 1, Number(dateArray[0]), 0, 0, 0)).toISOString(),
|
|
11296
|
+
filterToCalendar: new Date(Date.UTC(Number(dateArrayTo[2]), Number(dateArrayTo[1]) - 1, Number(dateArrayTo[0]), 23, 59, 59)).toISOString()
|
|
11297
|
+
};
|
|
11298
|
+
this.filterData = Object.assign(Object.assign({}, this.filterData), transferData);
|
|
11299
|
+
}
|
|
11300
|
+
this.filterChange.emit(this.filterData);
|
|
11301
|
+
this.isOpen = false;
|
|
11302
|
+
this.showClearButton = true;
|
|
11303
|
+
}
|
|
11304
|
+
render() {
|
|
11305
|
+
return (h("div", { key: '74aa590f6f92b9df971fd17cb3f573cc6a0a68e9', class: "lottery-tipping-filter", ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'ebf385371627466c5eb06a5ef75a14a467b1badd', class: "operate-btns" }, !this.showClearButton && (h("div", { key: '55c709034e124b51e8b9057980f5a3c3b8c6d5ce', class: "operate-btn", onClick: () => {
|
|
11306
|
+
this.isOpen = true;
|
|
11307
|
+
} }, translate$3('filter', this.language))), (this.showClearButton || this.quickFiltersActive) && (h("div", { key: 'aa747af2461e72fbacc16decd7fc75cd6f640c47', class: "operate-btn", onClick: () => this.resetSearch() }, translate$3('clear', this.language)))), h("lottery-tipping-dialog", { key: 'f8f41b7ff5114a48a840063b5f063e28cc61e31c', "dialog-title": translate$3('ticketResult', this.language), visible: this.isOpen, onCancel: () => {
|
|
11308
|
+
this.isOpen = false;
|
|
11309
|
+
}, onConfirm: this.handleDialogConfirm(), animationDuration: 300, language: this.language, "translation-url": this.translationUrl }, h("div", { key: 'a7510ed9b89b568d6829777bfbbc33bc3fdbb9b4', class: "dialog-content" }, h("div", { key: '25f1a6e8e4f389cc6157468338eb4bac9996a5cd', class: "filter-item" }, h("div", { key: 'a49fded71e3ddc45dc26c7bb47f29132907bcf5f', class: "filter-item-label" }, translate$3('searchByTicketId', this.language)), h("div", { key: '281d3ebd48ab27fbd82328a684fcf3e11bd68176', class: "filter-item-val" }, h("vaadin-text-field", { key: '3ca7edba908e9ff1d6ab16c5c60e5a1cdb06d9c9', placeholder: translate$3('enterTicketId', this.language), value: this.filterData.ticketId, onInput: (event) => {
|
|
11310
|
+
this.filterData.ticketId = event.target.value;
|
|
11311
|
+
} }))), h("div", { key: '9bee76f675ef9934db69a1f06e5b40c4e2e94bf2', class: "filter-item" }, h("div", { key: 'd9251a523137fab3410c0ce8597a70ba7cffaf73', class: "filter-item-label" }, translate$3('searchByTicketType', this.language)), h("div", { key: 'ddc4c4a1c436d874f9c13d4612690d6360815633', class: "general-multi-select-container" }, h("general-multi-select", { key: 'b08fc68491d530937356d519f37362b2e3bf13c8', ref: (el) => (this.comboBox = el), placeholder: translate$3('selectTicketType', this.language), "max-visible-chips": "2", options: this.ticketTypeList.map((item) => ({
|
|
11312
|
+
text: item.label,
|
|
11313
|
+
value: item.value
|
|
11314
|
+
})), onChange: this.handleTicketType, "client-styling": this.clientStyling, "client-styling-Url": this.clientStylingUrl, "mb-source": this.mbSource }))), h("div", { key: '516fd4574674db32d3e8c9994a8c8cfb3b972364', class: "filter-item" }, h("div", { key: 'ce608f365c0297ff7b3aa1cbe64a51505e441f2c', class: "filter-item-label" }, translate$3('searchByDate', this.language)), h("div", { key: '9456716fb9e3a392cbb5c16f706b3dc144b0ccbe', class: "filter-item-val" }, h("vaadin-date-picker", { key: 'fb574b38a9e9143bf47fecd16638d50e2b9605a5', value: this.filterData.filterFromCalendar, max: this.filterData.filterToCalendar === undefined
|
|
11315
|
+
? undefined
|
|
11316
|
+
: this.changeFormate(this.filterData.filterToCalendar), onChange: this.handleFilterFrom, placeholder: translate$3('from', this.language), ref: (el) => this.setDateFormate(el), class: "VaadinDatePicker" }), h("vaadin-date-picker", { key: '3fc353dd8b7919219731934cf76c75ea13c38e35', value: this.filterData.filterToCalendar, min: this.filterData.filterFromCalendar === undefined
|
|
11317
|
+
? undefined
|
|
11318
|
+
: this.changeFormate(this.filterData.filterFromCalendar), onChange: this.handleFilterTo, placeholder: translate$3('to', this.language), ref: (el) => this.setDateFormate(el), class: "VaadinDatePicker" })))))));
|
|
11319
|
+
}
|
|
11320
|
+
static get watchers() { return {
|
|
11321
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
11322
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
11323
|
+
"mbSource": ["handleMbSourceChange"]
|
|
11324
|
+
}; }
|
|
11325
|
+
};
|
|
11326
|
+
LotteryTippingFilter.style = LotteryTippingFilterStyle0;
|
|
10839
11327
|
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
11328
|
+
const generateUUID$1 = () => {
|
|
11329
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
11330
|
+
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
11331
|
+
return v.toString(16);
|
|
11332
|
+
});
|
|
11333
|
+
};
|
|
11334
|
+
function fetchRequest(url, method = 'GET', body = null, headers = {}) {
|
|
11335
|
+
return new Promise((resolve, reject) => {
|
|
11336
|
+
const uuid = generateUUID$1();
|
|
11337
|
+
const headersOrigin = Object.assign({ 'Content-Type': 'application/json' }, headers);
|
|
11338
|
+
if (method !== 'GET' && method !== 'HEAD') {
|
|
11339
|
+
headersOrigin['X-Idempotency-Key'] = uuid;
|
|
11340
|
+
}
|
|
11341
|
+
const options = {
|
|
11342
|
+
method,
|
|
11343
|
+
headers: headersOrigin,
|
|
11344
|
+
body: null
|
|
11345
|
+
};
|
|
11346
|
+
if (body && method !== 'GET' && method !== 'HEAD') {
|
|
11347
|
+
options.body = JSON.stringify(body);
|
|
11348
|
+
}
|
|
11349
|
+
else {
|
|
11350
|
+
delete options.body;
|
|
11351
|
+
}
|
|
11352
|
+
fetch(url, options)
|
|
11353
|
+
.then((response) => {
|
|
11354
|
+
if (!response.ok) {
|
|
11355
|
+
return response.json().then((errorData) => {
|
|
11356
|
+
const error = {
|
|
11357
|
+
status: response.status,
|
|
11358
|
+
statusText: response.statusText,
|
|
11359
|
+
code: errorData.code || 'UNKNOWN_ERROR',
|
|
11360
|
+
message: errorData.message || 'An unknown error occurred',
|
|
11361
|
+
data: errorData.data || null
|
|
11362
|
+
};
|
|
11363
|
+
reject(error);
|
|
11364
|
+
}, () => reject({
|
|
11365
|
+
status: response.status,
|
|
11366
|
+
statusText: response.statusText,
|
|
11367
|
+
code: 'PARSE_ERROR',
|
|
11368
|
+
message: 'Failed to parse error response'
|
|
11369
|
+
}));
|
|
11370
|
+
}
|
|
11371
|
+
else {
|
|
11372
|
+
return response.json();
|
|
11373
|
+
}
|
|
11374
|
+
})
|
|
11375
|
+
.then((data) => resolve(data), (error) => reject(error));
|
|
11376
|
+
});
|
|
11377
|
+
}
|
|
11378
|
+
const fetcher$2 = (url) => fetch(url, {
|
|
11379
|
+
method: 'GET',
|
|
11380
|
+
headers: {
|
|
11381
|
+
'x-scheme': 'application/json',
|
|
11382
|
+
Accept: 'application/json'
|
|
11383
|
+
}
|
|
11384
|
+
}).then((r) => r.json());
|
|
11385
|
+
function isEmptyValueOfArray(arr) {
|
|
11386
|
+
if (arr.length === 0) {
|
|
11387
|
+
return true;
|
|
11388
|
+
}
|
|
11389
|
+
const len = arr.length;
|
|
11390
|
+
let count = 0;
|
|
11391
|
+
for (let i = 0; i < len; i++) {
|
|
11392
|
+
if (isEmptyValue(arr[i])) {
|
|
11393
|
+
count++;
|
|
11394
|
+
}
|
|
11395
|
+
else {
|
|
11396
|
+
return false;
|
|
11397
|
+
}
|
|
11398
|
+
}
|
|
11399
|
+
if (count === len) {
|
|
11400
|
+
return true;
|
|
11401
|
+
}
|
|
11402
|
+
return false;
|
|
11403
|
+
}
|
|
11404
|
+
function isEmptyValueOfObject(obj) {
|
|
11405
|
+
if (Object.keys(obj).length === 0) {
|
|
11406
|
+
return true;
|
|
11407
|
+
}
|
|
11408
|
+
const len = Object.keys(obj).length;
|
|
11409
|
+
let count = 0;
|
|
11410
|
+
for (const val of Object.values(obj)) {
|
|
11411
|
+
if (isEmptyValue(val)) {
|
|
11412
|
+
count++;
|
|
11413
|
+
}
|
|
11414
|
+
else {
|
|
11415
|
+
return false;
|
|
11416
|
+
}
|
|
11417
|
+
}
|
|
11418
|
+
if (count === len) {
|
|
11419
|
+
return true;
|
|
11420
|
+
}
|
|
11421
|
+
return false;
|
|
11422
|
+
}
|
|
11423
|
+
function isEmptyValue(value, allowZero) {
|
|
11424
|
+
if (value === null || value === undefined || value === '') {
|
|
11425
|
+
return true;
|
|
11426
|
+
}
|
|
11427
|
+
else if (value === 0 && allowZero) {
|
|
11428
|
+
return false;
|
|
11429
|
+
}
|
|
11430
|
+
else if (Array.isArray(value)) {
|
|
11431
|
+
return isEmptyValueOfArray(value);
|
|
11432
|
+
}
|
|
11433
|
+
else if (Object.prototype.toString.call(value) === '[object Object]') {
|
|
11434
|
+
return isEmptyValueOfObject(value);
|
|
11435
|
+
}
|
|
11436
|
+
else {
|
|
11437
|
+
return !value;
|
|
11438
|
+
}
|
|
11439
|
+
}
|
|
11440
|
+
function toQueryParams(params) {
|
|
11441
|
+
const finalParams = {};
|
|
11442
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
11443
|
+
if (!isEmptyValue(value, true)) {
|
|
11444
|
+
finalParams[key] = value;
|
|
11445
|
+
}
|
|
11446
|
+
});
|
|
11447
|
+
const queryString = Object.entries(finalParams)
|
|
11448
|
+
.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
|
|
11449
|
+
.join('&');
|
|
11450
|
+
return queryString ? `?${queryString}` : '';
|
|
11451
|
+
}
|
|
11452
|
+
const bulletMap = {
|
|
11453
|
+
'0': '1',
|
|
11454
|
+
'1': 'X',
|
|
11455
|
+
'2': '2'
|
|
11456
|
+
};
|
|
11457
|
+
function parseBulletNumber(numberArr) {
|
|
11458
|
+
const bulletArr = [];
|
|
11459
|
+
Object.keys(bulletMap).forEach((key) => {
|
|
11460
|
+
bulletArr.push({
|
|
11461
|
+
isSelected: numberArr.includes(Number(key)),
|
|
11462
|
+
value: bulletMap[key]
|
|
11463
|
+
});
|
|
11464
|
+
});
|
|
11465
|
+
return bulletArr;
|
|
11466
|
+
}
|
|
11467
|
+
function parseEachLineNumber(numbers) {
|
|
11468
|
+
const result = [];
|
|
11469
|
+
const matchRes = [];
|
|
11470
|
+
for (let i = 0; i < numbers.length; i += 2) {
|
|
11471
|
+
const [resultNumber, matchNumber] = [numbers[i], numbers[i + 1]];
|
|
11472
|
+
if (!matchRes[matchNumber]) {
|
|
11473
|
+
matchRes[matchNumber] = [resultNumber];
|
|
11474
|
+
}
|
|
11475
|
+
else {
|
|
11476
|
+
matchRes[matchNumber].push(resultNumber);
|
|
11477
|
+
}
|
|
11478
|
+
}
|
|
11479
|
+
matchRes.forEach((matchArr) => {
|
|
11480
|
+
result.push(parseBulletNumber(matchArr));
|
|
11481
|
+
});
|
|
11482
|
+
return result;
|
|
11483
|
+
}
|
|
11484
|
+
function thousandSeperator(value) {
|
|
11485
|
+
if (value === 0) {
|
|
11486
|
+
return '0';
|
|
11487
|
+
}
|
|
11488
|
+
if (!value) {
|
|
11489
|
+
return '';
|
|
11490
|
+
}
|
|
11491
|
+
value = value.toString();
|
|
11492
|
+
const parts = value.split('.');
|
|
11493
|
+
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
11494
|
+
return parts.join('.');
|
|
11495
|
+
}
|
|
11496
|
+
const isMobile = (userAgent) => {
|
|
11497
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
11498
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
11499
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
11500
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
11501
|
+
};
|
|
10843
11502
|
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
11503
|
+
const lotteryTippingPaginationCss = ".paginator{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}button{padding:4px 8px;font-size:14px;background:var(--emw--color-background, #fff);border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:var(--emw--border-radius-small, 4px);cursor:pointer;min-width:28px;transition:all 0.2s ease}button.active{color:#333;background:var(--emw--color-primary, #fed275);border-color:var(--emw--color-primary, #fed275);font-weight:bold}button:not(.arrow-btn):hover{background:var(--emw--color-secondary, #fff3b9);border-color:var(--emw--color-secondary, #fff3b9)}button:disabled{cursor:not-allowed;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));user-select:none}.ellipsis{font-weight:bold;color:var(--emw--color-gray-400, #000);border:none}select{padding:4px 8px;border-radius:4px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));font-size:14px}.jump-box{display:flex;align-items:center;gap:4px;margin-left:8px}.jump-box input{width:50px;padding:2px 6px;font-size:14px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:4px;text-align:center}.total-num{user-select:none;font-size:14px;color:var(--emw--color-gray-300, #333)}";
|
|
11504
|
+
const LotteryTippingPaginationStyle0 = lotteryTippingPaginationCss;
|
|
11505
|
+
|
|
11506
|
+
const LotteryTippingPagination = class {
|
|
11507
|
+
constructor(hostRef) {
|
|
11508
|
+
registerInstance(this, hostRef);
|
|
11509
|
+
this.pageChange = createEvent(this, "pageChange", 7);
|
|
11510
|
+
this.pageSizeChange = createEvent(this, "pageSizeChange", 7);
|
|
11511
|
+
this.userAgent = window.navigator.userAgent;
|
|
11512
|
+
this.total = 0;
|
|
11513
|
+
this.pageSizeOptions = [10, 20, 50];
|
|
11514
|
+
this.mbSource = undefined;
|
|
11515
|
+
this.clientStyling = undefined;
|
|
11516
|
+
this.clientStylingUrl = undefined;
|
|
11517
|
+
this.language = 'en';
|
|
11518
|
+
this.translationUrl = undefined;
|
|
11519
|
+
this.current = 1;
|
|
11520
|
+
this.pageSize = 10;
|
|
11521
|
+
this.totalPages = 1;
|
|
11522
|
+
}
|
|
11523
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
11524
|
+
if (newValue != oldValue) {
|
|
11525
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11526
|
+
}
|
|
11527
|
+
}
|
|
11528
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
11529
|
+
if (newValue != oldValue) {
|
|
11530
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11531
|
+
}
|
|
11532
|
+
}
|
|
11533
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
11534
|
+
if (newValue != oldValue) {
|
|
11535
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11536
|
+
}
|
|
11537
|
+
}
|
|
11538
|
+
componentDidLoad() {
|
|
11539
|
+
if (this.stylingContainer) {
|
|
11540
|
+
if (this.mbSource)
|
|
11541
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11542
|
+
if (this.clientStyling)
|
|
11543
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11544
|
+
if (this.clientStylingUrl)
|
|
11545
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11546
|
+
}
|
|
11547
|
+
}
|
|
11548
|
+
componentWillLoad() {
|
|
11549
|
+
if (this.translationUrl) {
|
|
11550
|
+
getTranslations$2(JSON.parse(this.translationUrl));
|
|
11551
|
+
}
|
|
11552
|
+
this.pageSize = this.pageSizeOptions[0];
|
|
11553
|
+
this.updateTotalPages();
|
|
11554
|
+
}
|
|
11555
|
+
updateTotalPages() {
|
|
11556
|
+
this.totalPages = Math.max(Math.ceil(this.total / this.pageSize), 1);
|
|
11557
|
+
if (this.current > this.totalPages) {
|
|
11558
|
+
this.current = this.totalPages;
|
|
11559
|
+
this.pageChange.emit(this.current);
|
|
11560
|
+
}
|
|
11561
|
+
}
|
|
11562
|
+
goToPage(page) {
|
|
11563
|
+
if (page < 1 || page > this.totalPages || page === this.current)
|
|
11564
|
+
return;
|
|
11565
|
+
this.current = page;
|
|
11566
|
+
this.pageChange.emit(page);
|
|
11567
|
+
}
|
|
11568
|
+
changePageSize(newSize) {
|
|
11569
|
+
this.pageSize = newSize;
|
|
11570
|
+
this.pageSizeChange.emit(newSize);
|
|
11571
|
+
this.updateTotalPages();
|
|
11572
|
+
this.goToPage(1);
|
|
11573
|
+
}
|
|
11574
|
+
getPagesToShow() {
|
|
11575
|
+
const result = [];
|
|
11576
|
+
const range = isMobile(this.userAgent) ? 1 : 2;
|
|
11577
|
+
const { totalPages, current } = this;
|
|
11578
|
+
if (totalPages <= 7) {
|
|
11579
|
+
for (let i = 1; i <= totalPages; i++)
|
|
11580
|
+
result.push({ type: 'page', value: i });
|
|
11581
|
+
}
|
|
11582
|
+
else {
|
|
11583
|
+
result.push({ type: 'page', value: 1 });
|
|
11584
|
+
if (current > range + 2)
|
|
11585
|
+
result.push({ type: 'jump', direction: 'prev' });
|
|
11586
|
+
const start = Math.max(2, current - range);
|
|
11587
|
+
const end = Math.min(totalPages - 1, current + range);
|
|
11588
|
+
for (let i = start; i <= end; i++)
|
|
11589
|
+
result.push({ type: 'page', value: i });
|
|
11590
|
+
if (current < totalPages - range - 1)
|
|
11591
|
+
result.push({ type: 'jump', direction: 'next' });
|
|
11592
|
+
result.push({ type: 'page', value: totalPages });
|
|
11593
|
+
}
|
|
11594
|
+
return result;
|
|
11595
|
+
}
|
|
11596
|
+
jumpTo(direction) {
|
|
11597
|
+
const delta = 5;
|
|
11598
|
+
if (direction === 'prev')
|
|
11599
|
+
this.goToPage(Math.max(1, this.current - delta));
|
|
11600
|
+
else
|
|
11601
|
+
this.goToPage(Math.min(this.totalPages, this.current + delta));
|
|
11602
|
+
}
|
|
11603
|
+
render() {
|
|
11604
|
+
const pages = this.getPagesToShow();
|
|
11605
|
+
return (h("div", { key: '056fe5c9fddd61fafba809746de794a8db9c92a9', class: "paginator", ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'a4ceefa8aaeb5a5038e9f15d58f8b7b74f5e6726', class: "total-num" }, translate$3('totalItems', this.language, { total: this.total })), h("button", { key: '08a1c3a20cc576781c97e6dae6ba8db5bba1e0c2', class: "arrow-btn", disabled: this.current <= 1, onClick: () => this.goToPage(this.current - 1) }, "<"), pages.map((item) => {
|
|
11606
|
+
if (item.type === 'page') {
|
|
11607
|
+
return (h("button", { class: { page: true, active: this.current === item.value }, onClick: () => this.goToPage(item.value) }, item.value));
|
|
11608
|
+
}
|
|
11609
|
+
else {
|
|
11610
|
+
return (h("button", { class: "ellipsis", onClick: () => this.jumpTo(item.direction) }, "..."));
|
|
11611
|
+
}
|
|
11612
|
+
}), h("button", { key: '893023765c2a3b55a725c32ab5edb86e14225766', class: "arrow-btn", disabled: this.current >= this.totalPages, onClick: () => this.goToPage(this.current + 1) }, ">"), h("select", { key: 'c3fd4ada29da74ff3e0a5d41efeb3d6eb341bd79', onInput: (e) => this.changePageSize(parseInt(e.target.value)) }, this.pageSizeOptions.map((size) => (h("option", { value: size }, translate$3('perPage', this.language, { size: size }))))), h("div", { key: 'df8b7ad7e45fc12dc25b50cb687d008b546bba5b', class: "jump-box" }, translate$3('goTo', this.language), h("input", { key: 'f12b2591b6cfb79e0163dcbd5631618c69140539', type: "number", min: "1", max: this.totalPages, value: this.current, onKeyDown: (e) => {
|
|
11613
|
+
if (e.key === 'Enter') {
|
|
11614
|
+
const input = e.target;
|
|
11615
|
+
const page = parseInt(input.value);
|
|
11616
|
+
if (!isNaN(page))
|
|
11617
|
+
this.goToPage(page);
|
|
11618
|
+
}
|
|
11619
|
+
}, onInput: (e) => {
|
|
11620
|
+
const input = e.target;
|
|
11621
|
+
if (parseInt(input.value) > this.totalPages) {
|
|
11622
|
+
input.value = this.totalPages.toString();
|
|
11623
|
+
}
|
|
11624
|
+
if (parseInt(input.value) < 1) {
|
|
11625
|
+
input.value = '1';
|
|
11626
|
+
}
|
|
11627
|
+
} }))));
|
|
11628
|
+
}
|
|
11629
|
+
static get watchers() { return {
|
|
11630
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
11631
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
11632
|
+
"mbSource": ["handleMbSourceChange"],
|
|
11633
|
+
"total": ["updateTotalPages"],
|
|
11634
|
+
"pageSize": ["updateTotalPages"]
|
|
11635
|
+
}; }
|
|
11636
|
+
};
|
|
11637
|
+
LotteryTippingPagination.style = LotteryTippingPaginationStyle0;
|
|
11638
|
+
|
|
11639
|
+
// This icon file is generated automatically.
|
|
11640
|
+
var DownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
|
|
11641
|
+
const DownOutlined$1 = DownOutlined;
|
|
11642
|
+
|
|
11643
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
11644
|
+
__assign = Object.assign || function(t) {
|
|
11645
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
11646
|
+
s = arguments[i];
|
|
11647
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11648
|
+
t[p] = s[p];
|
|
11649
|
+
}
|
|
11650
|
+
return t;
|
|
11651
|
+
};
|
|
11652
|
+
return __assign.apply(this, arguments);
|
|
11653
|
+
};
|
|
11654
|
+
var defaultColors = {
|
|
11655
|
+
primaryColor: '#333',
|
|
11656
|
+
secondaryColor: '#E6E6E6'
|
|
11657
|
+
};
|
|
11658
|
+
function renderIconDefinitionToSVGElement(icond, options) {
|
|
11659
|
+
if (options === void 0) { options = {}; }
|
|
11660
|
+
if (typeof icond.icon === 'function') {
|
|
11661
|
+
// two-tone
|
|
11662
|
+
var placeholders = options.placeholders || defaultColors;
|
|
11663
|
+
return renderAbstractNodeToSVGElement(icond.icon(placeholders.primaryColor, placeholders.secondaryColor), options);
|
|
11664
|
+
}
|
|
11665
|
+
// fill, outline
|
|
11666
|
+
return renderAbstractNodeToSVGElement(icond.icon, options);
|
|
11667
|
+
}
|
|
11668
|
+
function renderAbstractNodeToSVGElement(node, options) {
|
|
11669
|
+
var targetAttrs = node.tag === 'svg'
|
|
11670
|
+
? __assign(__assign({}, node.attrs), (options.extraSVGAttrs || {})) : node.attrs;
|
|
11671
|
+
var attrs = Object.keys(targetAttrs).reduce(function (acc, nextKey) {
|
|
11672
|
+
var key = nextKey;
|
|
11673
|
+
var value = targetAttrs[key];
|
|
11674
|
+
var token = "".concat(key, "=\"").concat(value, "\"");
|
|
11675
|
+
acc.push(token);
|
|
11676
|
+
return acc;
|
|
11677
|
+
}, []);
|
|
11678
|
+
var attrsToken = attrs.length ? ' ' + attrs.join(' ') : '';
|
|
11679
|
+
var children = (node.children || [])
|
|
11680
|
+
.map(function (child) { return renderAbstractNodeToSVGElement(child, options); })
|
|
11681
|
+
.join('');
|
|
11682
|
+
if (children && children.length) {
|
|
11683
|
+
return "<".concat(node.tag).concat(attrsToken, ">").concat(children, "</").concat(node.tag, ">");
|
|
11684
|
+
}
|
|
11685
|
+
return "<".concat(node.tag).concat(attrsToken, " />");
|
|
11686
|
+
}
|
|
10850
11687
|
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
background-color: var(--lumo-base-color);
|
|
10854
|
-
border-radius: var(--lumo-border-radius-l) var(--lumo-border-radius-l) 0 0; /* Needed for Safari */
|
|
10855
|
-
}
|
|
11688
|
+
const lotteryTippingPanelCss = ".panel-container{border:2px solid var(--emw--color-gray-300, #333);border-radius:8px;overflow:hidden;font-family:sans-serif;width:calc(100% - 4px)}.panel-header{background-color:var(--emw--color-background, #fff);padding:8px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:14px}.panel-header:hover{background-color:var(--emw--color-primary, #fed275)}.panel-header.active{background-color:var(--emw--color-primary, #fed275)}.header-content{white-space:nowrap;user-select:none}.arrow{transition:transform 0.3s ease;font-size:16px;display:inline-flex}.arrow.expanded{transform:rotate(180deg)}.panel-body{overflow:hidden;max-height:0;transition:max-height 0.3s ease, padding 0.3s ease;background-color:var(--emw--color-background, #fff);padding:0 12px;font-size:14px}.panel-body.open{max-height:500px;padding:10px 12px}.panel-body.closed{max-height:0;padding-top:0;padding-bottom:0}";
|
|
11689
|
+
const LotteryTippingPanelStyle0 = lotteryTippingPanelCss;
|
|
10856
11690
|
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
11691
|
+
const downIcon = renderIconDefinitionToSVGElement(DownOutlined$1, {
|
|
11692
|
+
extraSVGAttrs: { width: '16px', height: '16px', fill: '' }
|
|
11693
|
+
});
|
|
11694
|
+
const lotteryTippingPanel = class {
|
|
11695
|
+
constructor(hostRef) {
|
|
11696
|
+
registerInstance(this, hostRef);
|
|
11697
|
+
this.togglePanel = () => {
|
|
11698
|
+
this.expanded = !this.expanded;
|
|
11699
|
+
};
|
|
11700
|
+
this.mbSource = undefined;
|
|
11701
|
+
this.clientStyling = undefined;
|
|
11702
|
+
this.clientStylingUrl = undefined;
|
|
11703
|
+
this.headerTitle = undefined;
|
|
11704
|
+
this.expanded = false;
|
|
11705
|
+
}
|
|
11706
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
11707
|
+
if (newValue != oldValue) {
|
|
11708
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11709
|
+
}
|
|
11710
|
+
}
|
|
11711
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
11712
|
+
if (newValue != oldValue) {
|
|
11713
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11714
|
+
}
|
|
11715
|
+
}
|
|
11716
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
11717
|
+
if (newValue != oldValue) {
|
|
11718
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11719
|
+
}
|
|
11720
|
+
}
|
|
11721
|
+
componentDidLoad() {
|
|
11722
|
+
if (this.stylingContainer) {
|
|
11723
|
+
if (this.mbSource)
|
|
11724
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
11725
|
+
if (this.clientStyling)
|
|
11726
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
11727
|
+
if (this.clientStylingUrl)
|
|
11728
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
11729
|
+
}
|
|
11730
|
+
}
|
|
11731
|
+
disconnectedCallback() {
|
|
11732
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
11733
|
+
}
|
|
11734
|
+
render() {
|
|
11735
|
+
return (h("div", { key: 'aad4bd39648c6e9df1191429caa1f8b35424d31c', class: "panel-container", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '685317142a2fe2d110bbec41c6561446f1229b5b', class: { 'panel-header': true, active: this.expanded }, onClick: this.togglePanel }, h("div", { key: 'bf42af64a3eac7e8998cb9fe75c465eeaf44b7ba', class: "header-content" }, h("slot", { key: '181469c7a4cbe6030f64d4a08eb3e11390a4f569', name: "header" }, h("span", { key: '25db3b952ba81bff3a17d67ab9c960365abb6852' }, this.headerTitle))), h("span", { key: 'fc10e5fe178aa9b6bbae680b6fe58ca66c3a7df3', class: `arrow ${this.expanded ? 'expanded' : ''}`, innerHTML: downIcon })), h("div", { key: '8ae6e1a6b51eb398625d11d0b94fdbebf3cbcbc1', class: `panel-body ${this.expanded ? 'open' : 'closed'}` }, h("slot", { key: '9fdf6862787be818e8e9655f151630fd2913c4fd', name: "content" }))));
|
|
11736
|
+
}
|
|
11737
|
+
get el() { return getElement(this); }
|
|
11738
|
+
static get watchers() { return {
|
|
11739
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
11740
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
11741
|
+
"mbSource": ["handleMbSourceChange"]
|
|
11742
|
+
}; }
|
|
11743
|
+
};
|
|
11744
|
+
lotteryTippingPanel.style = LotteryTippingPanelStyle0;
|
|
10862
11745
|
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
11746
|
+
const formatDate$1 = ({ date, type = 'date', format: format$1 }) => {
|
|
11747
|
+
try {
|
|
11748
|
+
const parsedDate = parseISO(date);
|
|
11749
|
+
if (isNaN(parsedDate.getTime())) {
|
|
11750
|
+
throw new Error(`Invalid date: ${date}`);
|
|
11751
|
+
}
|
|
11752
|
+
if (format$1)
|
|
11753
|
+
return format(parsedDate, format$1);
|
|
11754
|
+
let formatStr = 'dd/MM/yyyy';
|
|
11755
|
+
if (type === 'time') {
|
|
11756
|
+
formatStr = 'dd/MM/yyyy HH:mm:ss';
|
|
11757
|
+
}
|
|
11758
|
+
else if (type === 'week') {
|
|
11759
|
+
formatStr = 'ccc dd/MM/yyyy HH:mm:ss';
|
|
11760
|
+
}
|
|
11761
|
+
return format(parsedDate, formatStr);
|
|
11762
|
+
}
|
|
11763
|
+
catch (error) {
|
|
11764
|
+
console.error('Error formatting date:', error.message);
|
|
11765
|
+
return '';
|
|
11766
|
+
}
|
|
11767
|
+
};
|
|
11768
|
+
const fetcher$1 = (url) => fetch(url, {
|
|
11769
|
+
method: 'GET',
|
|
11770
|
+
headers: {
|
|
11771
|
+
'x-scheme': 'application/json',
|
|
11772
|
+
Accept: 'application/json'
|
|
11773
|
+
}
|
|
11774
|
+
}).then((r) => r.json());
|
|
11775
|
+
const showNotification$1 = ({ message, theme = 'success' }) => {
|
|
11776
|
+
window.postMessage({
|
|
11777
|
+
type: 'ShowNotificationToast',
|
|
11778
|
+
message,
|
|
11779
|
+
theme
|
|
11780
|
+
});
|
|
11781
|
+
};
|
|
11782
|
+
const thousandSeparator = (value) => {
|
|
11783
|
+
if (value === 0) {
|
|
11784
|
+
return '0';
|
|
11785
|
+
}
|
|
11786
|
+
if (!value) {
|
|
11787
|
+
return '';
|
|
11788
|
+
}
|
|
11789
|
+
value = value.toString();
|
|
11790
|
+
const parts = value.split('.');
|
|
11791
|
+
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
11792
|
+
return parts.join('.');
|
|
11793
|
+
};
|
|
11794
|
+
const generateUUID = () => {
|
|
11795
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
11796
|
+
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
11797
|
+
return v.toString(16);
|
|
11798
|
+
});
|
|
11799
|
+
};
|
|
11800
|
+
const TICKET_INVALID_TOKEN = 'TICKET_INVALID_TOKEN';
|
|
11801
|
+
// format results to winning numbers
|
|
11802
|
+
const formatResultsToWinningNumbers = (rawResults) => {
|
|
11803
|
+
const formatMatchCheckRes = (matchRes) => matchRes.map((bulletItem) => (bulletItem.isSelected ? 1 : 0));
|
|
11804
|
+
const resultsForTotalLines = rawResults.map((lineRes) => lineRes.map(formatMatchCheckRes));
|
|
11805
|
+
const result = [];
|
|
11806
|
+
for (let i = 0; i < resultsForTotalLines.length; i++) {
|
|
11807
|
+
const resultsInLine = resultsForTotalLines[i];
|
|
11808
|
+
for (let j = 0; j < resultsInLine.length; j++) {
|
|
11809
|
+
const matchResult = resultsInLine[j];
|
|
11810
|
+
for (let k = 0; k < matchResult.length; k++) {
|
|
11811
|
+
if (!result[i])
|
|
11812
|
+
result[i] = [];
|
|
11813
|
+
if (matchResult[k])
|
|
11814
|
+
result[i].push(k, j);
|
|
11815
|
+
}
|
|
11816
|
+
}
|
|
11817
|
+
}
|
|
11818
|
+
return result;
|
|
11819
|
+
};
|
|
11820
|
+
const doSubmitTicket = ({ body, sessionId, url }) => {
|
|
11821
|
+
const options = {
|
|
11822
|
+
method: 'POST',
|
|
11823
|
+
headers: {
|
|
11824
|
+
'Content-Type': 'application/json',
|
|
11825
|
+
Accept: 'application/json',
|
|
11826
|
+
Authorization: `Bearer ${sessionId}`,
|
|
11827
|
+
'X-Idempotency-Key': generateUUID()
|
|
11828
|
+
},
|
|
11829
|
+
body: JSON.stringify(body)
|
|
11830
|
+
};
|
|
11831
|
+
return fetch(url, options).then((res) => {
|
|
11832
|
+
if (res.status === 401) {
|
|
11833
|
+
throw new Error(TICKET_INVALID_TOKEN);
|
|
11834
|
+
}
|
|
11835
|
+
if (res.status > 300) {
|
|
11836
|
+
throw new Error(res.statusText);
|
|
11837
|
+
}
|
|
11838
|
+
return res.json();
|
|
11839
|
+
});
|
|
11840
|
+
};
|
|
11841
|
+
// BettingTypes, playModes and playTypes
|
|
11842
|
+
const getEnableOptions = (raw = []) => raw.filter((i) => i.enabled);
|
|
11843
|
+
// the first one in bet type config that enabled = true, will be default choice
|
|
11844
|
+
const getDefaultType = ({ playTypeConfig = [], betTypeConfig = [], enabledBettingTypeOptions = [], enabledPlayingModeOptions = [] }) => {
|
|
11845
|
+
const enabledBetTypeConfig = betTypeConfig.filter((i) => i.enabled);
|
|
11846
|
+
for (const item of enabledBetTypeConfig) {
|
|
11847
|
+
const { bettingType, playMode } = playTypeConfig === null || playTypeConfig === void 0 ? void 0 : playTypeConfig.find((i) => i.betTypeId === item.id);
|
|
11848
|
+
if (enabledBettingTypeOptions.map((i) => i.code).includes(bettingType) &&
|
|
11849
|
+
enabledPlayingModeOptions.map((i) => i.code).includes(playMode))
|
|
11850
|
+
return { bettingType, playMode };
|
|
11851
|
+
}
|
|
11852
|
+
return {};
|
|
11853
|
+
};
|
|
11854
|
+
const calculatePlayingModeOptions = ({ bettingType, playTypeConfig, betTypeConfig, enabledPlayingModeOptions }) => {
|
|
11855
|
+
const enabledBetTypeIdConfig = betTypeConfig.filter((i) => i.enabled).map((i) => i.id);
|
|
11856
|
+
const filteredPlayTypesConfig = playTypeConfig.filter((i) => enabledBetTypeIdConfig.includes(i.betTypeId));
|
|
11857
|
+
const selectedBettingTypeFilteredPlayTypesConfig = filteredPlayTypesConfig.filter((i) => i.bettingType === bettingType);
|
|
11858
|
+
const _ = selectedBettingTypeFilteredPlayTypesConfig.map((i) => i.playMode);
|
|
11859
|
+
return enabledPlayingModeOptions.filter((i) => _.includes(i.code));
|
|
11860
|
+
};
|
|
11861
|
+
const getCheckedCountForEachLineAndEachMatch = ({ rawResults }) => {
|
|
11862
|
+
const getMatchCheckRes = (matchRes) => matchRes.filter((bulletItem) => bulletItem.isSelected).length;
|
|
11863
|
+
const checkedCountForEachLineAndEachMatch = rawResults.map((lineRes) => lineRes.length > 0 ? lineRes.map(getMatchCheckRes) : [0]);
|
|
11864
|
+
return checkedCountForEachLineAndEachMatch;
|
|
11865
|
+
};
|
|
11866
|
+
const getPlayTypeConfig = ({ rawData, selectedBettingType, selectedPlayingMode }) => {
|
|
11867
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11868
|
+
const betTypeId = (_d = (_c = (_b = (_a = rawData === null || rawData === void 0 ? void 0 : rawData.rules) === null || _a === void 0 ? void 0 : _a.poolGame) === null || _b === void 0 ? void 0 : _b.playTypes) === null || _c === void 0 ? void 0 : _c.find((i) => i.bettingType === selectedBettingType && i.playMode === selectedPlayingMode)) === null || _d === void 0 ? void 0 : _d.betTypeId;
|
|
11869
|
+
const betType = (_f = (_e = rawData === null || rawData === void 0 ? void 0 : rawData.rules) === null || _e === void 0 ? void 0 : _e.betTypes) === null || _f === void 0 ? void 0 : _f.find((i) => i.id === betTypeId);
|
|
11870
|
+
return { betTypeId, betType };
|
|
11871
|
+
};
|
|
10869
11872
|
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
11873
|
+
const DEFAULT_LANGUAGE$2 = 'en';
|
|
11874
|
+
const SUPPORTED_LANGUAGES$2 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
11875
|
+
const TRANSLATIONS$2 = {
|
|
11876
|
+
en: {
|
|
11877
|
+
stop: 'Stop',
|
|
11878
|
+
at: 'at'
|
|
11879
|
+
},
|
|
11880
|
+
ro: {
|
|
11881
|
+
stop: 'Oprește',
|
|
11882
|
+
at: 'la'
|
|
11883
|
+
},
|
|
11884
|
+
fr: {
|
|
11885
|
+
stop: 'Arrêtez',
|
|
11886
|
+
at: 'à'
|
|
11887
|
+
},
|
|
11888
|
+
ar: {
|
|
11889
|
+
stop: 'توقف',
|
|
11890
|
+
at: 'في'
|
|
11891
|
+
},
|
|
11892
|
+
hr: {
|
|
11893
|
+
stop: 'Stop',
|
|
11894
|
+
at: 'u'
|
|
11895
|
+
}
|
|
11896
|
+
};
|
|
11897
|
+
const translate$2 = (key, customLang) => {
|
|
11898
|
+
const lang = customLang;
|
|
11899
|
+
return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
|
|
11900
|
+
};
|
|
10874
11901
|
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
11902
|
+
const DEFAULT_LANGUAGE$1 = 'en';
|
|
11903
|
+
const SUPPORTED_LANGUAGES$1 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
11904
|
+
const TRANSLATIONS$1 = {
|
|
11905
|
+
en: {
|
|
11906
|
+
selectionCleared: 'Your selection will be cleared.',
|
|
11907
|
+
ticketSubmitted: 'Ticket submitted successfully.',
|
|
11908
|
+
ticketFailed: 'Failed to purchase the ticket. Please try again.',
|
|
11909
|
+
lines: 'Lines',
|
|
11910
|
+
line: 'Line',
|
|
11911
|
+
bettingType: 'Betting Type',
|
|
11912
|
+
playingMode: 'Playing Mode',
|
|
11913
|
+
orderSummaryTitle: 'Order Summary',
|
|
11914
|
+
orderSummaryTickets: 'Tickets',
|
|
11915
|
+
orderSummaryTotal: 'Total',
|
|
11916
|
+
orderSummarySubmit: 'Submit',
|
|
11917
|
+
cancel: 'Cancel',
|
|
11918
|
+
confirm: 'Confirm'
|
|
11919
|
+
},
|
|
11920
|
+
ro: {
|
|
11921
|
+
selectionCleared: 'Selecția dvs. va fi ștearsă.',
|
|
11922
|
+
ticketSubmitted: 'Bilet trimis cu succes.',
|
|
11923
|
+
ticketFailed: 'Nu s-a putut achiziționa biletul. Vă rugăm să încercați din nou.',
|
|
11924
|
+
lines: 'Linii',
|
|
11925
|
+
line: 'Linie',
|
|
11926
|
+
bettingType: 'Tip de pariu',
|
|
11927
|
+
playingMode: 'Mod de joc',
|
|
11928
|
+
orderSummaryTitle: 'Sumar comandă',
|
|
11929
|
+
orderSummaryTickets: 'Bilete',
|
|
11930
|
+
orderSummaryTotal: 'Total',
|
|
11931
|
+
orderSummarySubmit: 'Trimite',
|
|
11932
|
+
cancel: 'Anulează',
|
|
11933
|
+
confirm: 'Confirmă'
|
|
11934
|
+
},
|
|
11935
|
+
fr: {
|
|
11936
|
+
selectionCleared: 'Votre sélection sera effacée.',
|
|
11937
|
+
ticketSubmitted: 'Billet soumis avec succès.',
|
|
11938
|
+
ticketFailed: "Échec de l'achat du billet. Veuillez réessayer.",
|
|
11939
|
+
lines: 'Lignes',
|
|
11940
|
+
line: 'Ligne',
|
|
11941
|
+
bettingType: 'Type de pari',
|
|
11942
|
+
playingMode: 'Mode de jeu',
|
|
11943
|
+
orderSummaryTitle: 'Résumé de la commande',
|
|
11944
|
+
orderSummaryTickets: 'Billets',
|
|
11945
|
+
orderSummaryTotal: 'Total',
|
|
11946
|
+
orderSummarySubmit: 'Soumettre',
|
|
11947
|
+
cancel: 'Annuler',
|
|
11948
|
+
confirm: 'Confirmer'
|
|
11949
|
+
},
|
|
11950
|
+
ar: {
|
|
11951
|
+
selectionCleared: 'سيتم مسح اختيارك.',
|
|
11952
|
+
ticketSubmitted: 'تم إرسال التذكرة بنجاح.',
|
|
11953
|
+
ticketFailed: 'فشل شراء التذكرة. يرجى المحاولة مرة أخرى.',
|
|
11954
|
+
lines: 'خطوط',
|
|
11955
|
+
line: 'خط',
|
|
11956
|
+
bettingType: 'نوع الرهان',
|
|
11957
|
+
playingMode: 'وضع اللعب',
|
|
11958
|
+
orderSummaryTitle: 'ملخص الطلب',
|
|
11959
|
+
orderSummaryTickets: 'التذاكر',
|
|
11960
|
+
orderSummaryTotal: 'المجموع',
|
|
11961
|
+
orderSummarySubmit: 'إرسال',
|
|
11962
|
+
cancel: 'إلغاء',
|
|
11963
|
+
confirm: 'تأكيد'
|
|
11964
|
+
},
|
|
11965
|
+
hr: {
|
|
11966
|
+
selectionCleared: 'Vaš odabir bit će obrisan.',
|
|
11967
|
+
ticketSubmitted: 'Listić je uspješno predan.',
|
|
11968
|
+
ticketFailed: 'Kupnja listića nije uspjela. Molimo pokušajte ponovo.',
|
|
11969
|
+
lines: 'Linije',
|
|
11970
|
+
line: 'Linija',
|
|
11971
|
+
bettingType: 'Vrsta oklade',
|
|
11972
|
+
playingMode: 'Način igranja',
|
|
11973
|
+
orderSummaryTitle: 'Sažetak narudžbe',
|
|
11974
|
+
orderSummaryTickets: 'Listići',
|
|
11975
|
+
orderSummaryTotal: 'Ukupno',
|
|
11976
|
+
orderSummarySubmit: 'Pošalji',
|
|
11977
|
+
cancel: 'Odustani',
|
|
11978
|
+
confirm: 'Potvrdi'
|
|
10878
11979
|
}
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
11980
|
+
};
|
|
11981
|
+
const translate$1 = (key, customLang) => {
|
|
11982
|
+
const lang = customLang;
|
|
11983
|
+
return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
|
|
11984
|
+
};
|
|
11985
|
+
const getTranslations$1 = (data) => {
|
|
11986
|
+
Object.keys(data).forEach((item) => {
|
|
11987
|
+
for (let key in data[item]) {
|
|
11988
|
+
TRANSLATIONS$1[item][key] = data[item][key];
|
|
11989
|
+
}
|
|
11990
|
+
});
|
|
11991
|
+
};
|
|
11992
|
+
const resolveTranslationUrl = async (translationUrl) => {
|
|
11993
|
+
if (translationUrl) {
|
|
11994
|
+
try {
|
|
11995
|
+
const response = await fetch(translationUrl);
|
|
11996
|
+
if (!response.ok) {
|
|
11997
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
11998
|
+
}
|
|
11999
|
+
const translations = await response.json();
|
|
12000
|
+
getTranslations$1(translations);
|
|
12001
|
+
}
|
|
12002
|
+
catch (error) {
|
|
12003
|
+
console.error('Failed to fetch or parse translations from URL:', error);
|
|
12004
|
+
}
|
|
10896
12005
|
}
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
:host([closing]) [part='overlay'] {
|
|
10900
|
-
animation: 0.1s 0.03s vaadin-dialog-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
10901
|
-
}
|
|
12006
|
+
};
|
|
10902
12007
|
|
|
10903
|
-
:
|
|
10904
|
-
|
|
10905
|
-
}
|
|
12008
|
+
const lotteryTippingTicketBannerCss = ".lottery-tipping-ticket-banner__container {\n font-family: system-ui, sans-serif;\n font-size: 14px;\n container-type: inline-size;\n}\n\n.banner {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 1rem;\n background: var(--emw--color-primary, #fed275);\n border-top: 2px solid var(--emw--color-primary-variant, #ffe66f);\n border-bottom: 2px solid var(--emw--color-primary-variant, #ffe66f);\n gap: 0.5rem;\n white-space: nowrap;\n}\n\n.left {\n flex: 1;\n gap: 0.4rem;\n}\n\n.brand {\n font-weight: 700;\n color: var(--emw--color-gray-400, #000);\n}\n\n.mid {\n flex: 1;\n font-size: 1.5rem;\n font-weight: 800;\n font-style: italic;\n letter-spacing: 0.04em;\n color: var(--emw--color-gray-400, #000);\n text-align: center;\n}\n\n.right {\n flex: 1;\n display: flex;\n gap: 0.4rem;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n\n@container (max-width: 420px) {\n .mid {\n text-align: right;\n }\n .right {\n justify-content: center;\n }\n}\n.pill {\n border: 2px solid var(--emw--color-gray-150, #6f6f6f);\n border-radius: 0.4rem;\n padding: 0.25rem 0.7rem;\n font-size: 0.9rem;\n color: var(--emw--color-gray-300, #333);\n display: inline-flex;\n align-items: baseline;\n}\n\n.pill > strong {\n font-weight: 700;\n}";
|
|
12009
|
+
const LotteryTippingTicketBannerStyle0 = lotteryTippingTicketBannerCss;
|
|
10906
12010
|
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
12011
|
+
const LotteryTippingTicketBanner = class {
|
|
12012
|
+
constructor(hostRef) {
|
|
12013
|
+
registerInstance(this, hostRef);
|
|
12014
|
+
this.mbSource = undefined;
|
|
12015
|
+
this.clientStyling = undefined;
|
|
12016
|
+
this.clientStylingUrl = undefined;
|
|
12017
|
+
this.language = 'en';
|
|
12018
|
+
this.translationUrl = '';
|
|
12019
|
+
this.stopTime = '';
|
|
12020
|
+
this.period = undefined;
|
|
10911
12021
|
}
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
margin-bottom: 0 !important;
|
|
10917
|
-
margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
|
|
10918
|
-
}
|
|
10919
|
-
|
|
10920
|
-
[part='message'] {
|
|
10921
|
-
width: 25em;
|
|
10922
|
-
min-width: 100%;
|
|
10923
|
-
max-width: 100%;
|
|
10924
|
-
}
|
|
10925
|
-
|
|
10926
|
-
::slotted([slot$='button'][theme~='tertiary']) {
|
|
10927
|
-
padding-left: var(--lumo-space-s);
|
|
10928
|
-
padding-right: var(--lumo-space-s);
|
|
10929
|
-
}
|
|
10930
|
-
|
|
10931
|
-
[part='cancel-button'] {
|
|
10932
|
-
flex-grow: 1;
|
|
10933
|
-
}
|
|
10934
|
-
|
|
10935
|
-
@media (max-width: 360px) {
|
|
10936
|
-
[part='footer'] {
|
|
10937
|
-
flex-direction: column-reverse;
|
|
10938
|
-
align-items: stretch;
|
|
10939
|
-
padding: var(--lumo-space-s) var(--lumo-space-l);
|
|
10940
|
-
gap: var(--lumo-space-s);
|
|
12022
|
+
get formattedStopTime() {
|
|
12023
|
+
let _temp = '';
|
|
12024
|
+
if (!this.stopTime) {
|
|
12025
|
+
return _temp;
|
|
10941
12026
|
}
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
12027
|
+
_temp = formatDate$1({ date: this.stopTime, format: 'dd/MM/yyyy HH:mm' });
|
|
12028
|
+
if (isToday(new Date(this.stopTime))) {
|
|
12029
|
+
_temp = formatDate$1({ date: this.stopTime, format: 'HH:mm' });
|
|
12030
|
+
}
|
|
12031
|
+
return _temp;
|
|
12032
|
+
}
|
|
12033
|
+
get formattedPeriod() {
|
|
12034
|
+
let _temp = '';
|
|
12035
|
+
_temp = formatDate$1({ date: this.period, format: 'EEEE' });
|
|
12036
|
+
if (_temp.toLowerCase() === 'wednesday') {
|
|
12037
|
+
_temp = 'MIDWEEK';
|
|
12038
|
+
}
|
|
12039
|
+
return _temp.toUpperCase();
|
|
12040
|
+
}
|
|
12041
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
12042
|
+
if (newValue != oldValue) {
|
|
12043
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
12044
|
+
}
|
|
12045
|
+
}
|
|
12046
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
12047
|
+
if (newValue != oldValue) {
|
|
12048
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
12049
|
+
}
|
|
12050
|
+
}
|
|
12051
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
12052
|
+
if (newValue != oldValue) {
|
|
12053
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
10946
12054
|
}
|
|
10947
|
-
}
|
|
10948
|
-
`],{moduleId:"lumo-confirm-dialog-overlay"});/**
|
|
10949
|
-
* @license
|
|
10950
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10951
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10952
|
-
*/const G_=s=>class extends s{static get properties(){return {opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1},overlayRole:{type:String,value:"dialog"}}}ready(){super.ready();const e=this.$.overlay;e.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),e.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),e.addEventListener("vaadin-overlay-closed",this.__handleOverlayClosed.bind(this)),this._overlayElement=e;}__handleOverlayClosed(){this.dispatchEvent(new CustomEvent("closed"));}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0);}disconnectedCallback(){super.disconnectedCallback(),setTimeout(()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1);});}_onOverlayOpened(e){e.detail.value===!1&&(this.opened=!1);}_handleOutsideClick(e){this.noCloseOnOutsideClick&&e.preventDefault();}_handleEscPress(e){this.noCloseOnEsc&&e.preventDefault();}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront();}};/**
|
|
10953
|
-
* @license
|
|
10954
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10955
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10956
|
-
*/const K_=p`
|
|
10957
|
-
[part='header'],
|
|
10958
|
-
[part='header-content'],
|
|
10959
|
-
[part='footer'] {
|
|
10960
|
-
display: flex;
|
|
10961
|
-
align-items: center;
|
|
10962
|
-
flex-wrap: wrap;
|
|
10963
|
-
flex: none;
|
|
10964
|
-
pointer-events: none;
|
|
10965
|
-
z-index: 1;
|
|
10966
|
-
}
|
|
10967
|
-
|
|
10968
|
-
[part='header'] {
|
|
10969
|
-
flex-wrap: nowrap;
|
|
10970
|
-
}
|
|
10971
|
-
|
|
10972
|
-
::slotted([slot='header-content']),
|
|
10973
|
-
::slotted([slot='title']),
|
|
10974
|
-
::slotted([slot='footer']) {
|
|
10975
|
-
display: contents;
|
|
10976
|
-
pointer-events: auto;
|
|
10977
|
-
}
|
|
10978
|
-
|
|
10979
|
-
::slotted([slot='title']) {
|
|
10980
|
-
font: inherit !important;
|
|
10981
|
-
overflow-wrap: anywhere;
|
|
10982
|
-
}
|
|
10983
|
-
|
|
10984
|
-
[part='header-content'] {
|
|
10985
|
-
flex: 1;
|
|
10986
|
-
}
|
|
10987
|
-
|
|
10988
|
-
:host([has-title]) [part='header-content'],
|
|
10989
|
-
[part='footer'] {
|
|
10990
|
-
justify-content: flex-end;
|
|
10991
|
-
}
|
|
10992
|
-
|
|
10993
|
-
:host(:not([has-title]):not([has-header])) [part='header'],
|
|
10994
|
-
:host(:not([has-header])) [part='header-content'],
|
|
10995
|
-
:host(:not([has-title])) [part='title'],
|
|
10996
|
-
:host(:not([has-footer])) [part='footer'] {
|
|
10997
|
-
display: none !important;
|
|
10998
|
-
}
|
|
10999
|
-
|
|
11000
|
-
:host(:is([has-title], [has-header], [has-footer])) [part='content'] {
|
|
11001
|
-
height: auto;
|
|
11002
|
-
}
|
|
11003
|
-
|
|
11004
|
-
@media (min-height: 320px) {
|
|
11005
|
-
:host(:is([has-title], [has-header], [has-footer])) .resizer-container {
|
|
11006
|
-
overflow: hidden;
|
|
11007
|
-
display: flex;
|
|
11008
|
-
flex-direction: column;
|
|
11009
12055
|
}
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
12056
|
+
async componentWillLoad() {
|
|
12057
|
+
if (this.translationUrl) {
|
|
12058
|
+
resolveTranslationUrl(this.translationUrl);
|
|
12059
|
+
}
|
|
11014
12060
|
}
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
:host([has-bounds-set]) [part='overlay'] {
|
|
11026
|
-
max-width: none;
|
|
11027
|
-
}
|
|
11028
|
-
|
|
11029
|
-
@media (forced-colors: active) {
|
|
11030
|
-
[part='overlay'] {
|
|
11031
|
-
outline: 3px solid !important;
|
|
12061
|
+
componentDidLoad() {
|
|
12062
|
+
if (this.stylingContainer) {
|
|
12063
|
+
if (this.mbSource)
|
|
12064
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
12065
|
+
if (this.clientStyling)
|
|
12066
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
12067
|
+
if (this.clientStylingUrl)
|
|
12068
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
12069
|
+
}
|
|
11032
12070
|
}
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
overflow: auto;
|
|
11049
|
-
flex-grow: 1;
|
|
11050
|
-
border-radius: inherit; /* prevent child elements being drawn outside part=overlay */
|
|
11051
|
-
}
|
|
11052
|
-
|
|
11053
|
-
[part='overlay'][style] .resizer-container {
|
|
11054
|
-
min-height: 100%;
|
|
11055
|
-
width: 100%;
|
|
11056
|
-
}
|
|
11057
|
-
|
|
11058
|
-
:host(:not([resizable])) .resizer {
|
|
11059
|
-
display: none;
|
|
11060
|
-
}
|
|
11061
|
-
|
|
11062
|
-
:host([resizable]) [part='title'] {
|
|
11063
|
-
cursor: move;
|
|
11064
|
-
-webkit-user-select: none;
|
|
11065
|
-
user-select: none;
|
|
11066
|
-
}
|
|
11067
|
-
|
|
11068
|
-
.resizer {
|
|
11069
|
-
position: absolute;
|
|
11070
|
-
height: 16px;
|
|
11071
|
-
width: 16px;
|
|
11072
|
-
}
|
|
11073
|
-
|
|
11074
|
-
.resizer.edge {
|
|
11075
|
-
height: 8px;
|
|
11076
|
-
width: 8px;
|
|
11077
|
-
inset: -4px;
|
|
11078
|
-
}
|
|
11079
|
-
|
|
11080
|
-
.resizer.edge.n {
|
|
11081
|
-
width: auto;
|
|
11082
|
-
bottom: auto;
|
|
11083
|
-
cursor: ns-resize;
|
|
11084
|
-
}
|
|
11085
|
-
|
|
11086
|
-
.resizer.ne {
|
|
11087
|
-
top: -4px;
|
|
11088
|
-
right: -4px;
|
|
11089
|
-
cursor: nesw-resize;
|
|
11090
|
-
}
|
|
11091
|
-
|
|
11092
|
-
.resizer.edge.e {
|
|
11093
|
-
height: auto;
|
|
11094
|
-
left: auto;
|
|
11095
|
-
cursor: ew-resize;
|
|
11096
|
-
}
|
|
11097
|
-
|
|
11098
|
-
.resizer.se {
|
|
11099
|
-
bottom: -4px;
|
|
11100
|
-
right: -4px;
|
|
11101
|
-
cursor: nwse-resize;
|
|
11102
|
-
}
|
|
11103
|
-
|
|
11104
|
-
.resizer.edge.s {
|
|
11105
|
-
width: auto;
|
|
11106
|
-
top: auto;
|
|
11107
|
-
cursor: ns-resize;
|
|
11108
|
-
}
|
|
11109
|
-
|
|
11110
|
-
.resizer.sw {
|
|
11111
|
-
bottom: -4px;
|
|
11112
|
-
left: -4px;
|
|
11113
|
-
cursor: nesw-resize;
|
|
11114
|
-
}
|
|
11115
|
-
|
|
11116
|
-
.resizer.edge.w {
|
|
11117
|
-
height: auto;
|
|
11118
|
-
right: auto;
|
|
11119
|
-
cursor: ew-resize;
|
|
11120
|
-
}
|
|
11121
|
-
|
|
11122
|
-
.resizer.nw {
|
|
11123
|
-
top: -4px;
|
|
11124
|
-
left: -4px;
|
|
11125
|
-
cursor: nwse-resize;
|
|
11126
|
-
}
|
|
11127
|
-
`;/**
|
|
11128
|
-
* @license
|
|
11129
|
-
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
11130
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11131
|
-
*/const X_=s=>class extends s{static get properties(){return {ariaLabel:{type:String,value:""},contentHeight:{type:String},contentWidth:{type:String}}}static get observers(){return ["__updateContentHeight(contentHeight, _overlayElement)","__updateContentWidth(contentWidth, _overlayElement)"]}__updateDimension(e,i,o){const r=`--_vaadin-confirm-dialog-content-${i}`;o?e.style.setProperty(r,o):e.style.removeProperty(r);}__updateContentHeight(e,i){i&&this.__updateDimension(i,"height",e);}__updateContentWidth(e,i){i&&this.__updateDimension(i,"width",e);}};/**
|
|
11132
|
-
* @license
|
|
11133
|
-
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
11134
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11135
|
-
*/const J_=p`
|
|
11136
|
-
:host {
|
|
11137
|
-
--_vaadin-confirm-dialog-content-width: auto;
|
|
11138
|
-
--_vaadin-confirm-dialog-content-height: auto;
|
|
11139
|
-
}
|
|
11140
|
-
|
|
11141
|
-
[part='overlay'] {
|
|
11142
|
-
width: var(--_vaadin-confirm-dialog-content-width);
|
|
11143
|
-
height: var(--_vaadin-confirm-dialog-content-height);
|
|
11144
|
-
}
|
|
11145
|
-
|
|
11146
|
-
::slotted([slot='header']) {
|
|
11147
|
-
pointer-events: auto;
|
|
11148
|
-
}
|
|
12071
|
+
disconnectedCallback() {
|
|
12072
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
12073
|
+
}
|
|
12074
|
+
render() {
|
|
12075
|
+
const backgroundImagePath = getAssetPath('../static/tipping-full-color.svg');
|
|
12076
|
+
return (h("div", { key: 'eb93e7946631d234963d841df9e8b753b651c795', ref: (el) => (this.stylingContainer = el), class: "lottery-tipping-ticket-banner__container" }, h("section", { key: '0133e845df14caa912b18e1734ad16c584b7359f', class: "banner" }, h("div", { key: '23bc3b34011dc5533bf70397f974936e238f04fe', class: "left" }, h("img", { key: '52110de0807e79c02d7934ec8a37c1322b73fe84', alt: "Betting", src: backgroundImagePath, class: "logo" })), h("div", { key: 'b5deae59d09b870777c913c5ebfca43886c3cf95', class: "mid period" }, this.formattedPeriod), h("div", { key: 'b404e474850233e2d5e139077fd774f178bc40fa', class: "right" }, h("span", { key: '3b9072c2165a033d17c9572c7cafe2a2c699447b', class: "pill" }, h("strong", { key: 'c560c2c27dc930a963b992c07e02745b18d0002f' }, translate$2('stop', this.language)), "\u00A0", translate$2('at', this.language), "\u00A0", this.formattedStopTime)))));
|
|
12077
|
+
}
|
|
12078
|
+
static get assetsDirs() { return ["../static"]; }
|
|
12079
|
+
static get watchers() { return {
|
|
12080
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
12081
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
12082
|
+
"mbSource": ["handleMbSourceChange"]
|
|
12083
|
+
}; }
|
|
12084
|
+
};
|
|
12085
|
+
LotteryTippingTicketBanner.style = LotteryTippingTicketBannerStyle0;
|
|
11149
12086
|
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
:
|
|
11182
|
-
|
|
12087
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
12088
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
12089
|
+
const TRANSLATIONS = {
|
|
12090
|
+
en: {
|
|
12091
|
+
homeTeam: 'Home team:',
|
|
12092
|
+
awayTeam: 'Away team:',
|
|
12093
|
+
selectionCleared: 'Your selection has been cleared.',
|
|
12094
|
+
selectionOnLineCleared: 'Your selection on this line will be cleared.',
|
|
12095
|
+
loading: 'Loading...',
|
|
12096
|
+
error: 'Error!',
|
|
12097
|
+
noData: 'No data available.',
|
|
12098
|
+
lineInfo: 'Line {currentPage} of {totalPages}',
|
|
12099
|
+
clearAll: 'Clear All',
|
|
12100
|
+
cancel: 'Cancel',
|
|
12101
|
+
confirm: 'Confirm'
|
|
12102
|
+
},
|
|
12103
|
+
ro: {
|
|
12104
|
+
homeTeam: 'Echipa gazdă:',
|
|
12105
|
+
awayTeam: 'Echipa oaspete:',
|
|
12106
|
+
selectionCleared: 'Selecția dvs. a fost ștearsă.',
|
|
12107
|
+
selectionOnLineCleared: 'Selecția dvs. de pe această linie va fi ștearsă.',
|
|
12108
|
+
loading: `Se încarcă...',n error: 'Eroare!`,
|
|
12109
|
+
noData: 'Nu sunt date disponibile.',
|
|
12110
|
+
lineInfo: 'Linia {currentPage} din {totalPages}',
|
|
12111
|
+
clearAll: 'Șterge tot',
|
|
12112
|
+
cancel: 'Anulează',
|
|
12113
|
+
confirm: 'Confirmă'
|
|
12114
|
+
},
|
|
12115
|
+
fr: {
|
|
12116
|
+
homeTeam: 'Équipe à domicile:',
|
|
12117
|
+
awayTeam: `Équipe à l'extérieur:`,
|
|
12118
|
+
selectionCleared: 'Votre sélection a été effacée.',
|
|
12119
|
+
selectionOnLineCleared: 'Votre sélection sur cette ligne sera effacée.',
|
|
12120
|
+
loading: `Chargement...',n error: 'Erreur!`,
|
|
12121
|
+
noData: 'Aucune donnée disponible.',
|
|
12122
|
+
lineInfo: 'Ligne {currentPage} sur {totalPages}',
|
|
12123
|
+
clearAll: 'Tout effacer',
|
|
12124
|
+
cancel: 'Annuler',
|
|
12125
|
+
confirm: 'Confirmer'
|
|
12126
|
+
},
|
|
12127
|
+
ar: {
|
|
12128
|
+
homeTeam: 'الفريق المضيف:',
|
|
12129
|
+
awayTeam: 'الفريق الضيف:',
|
|
12130
|
+
selectionCleared: 'تم مسح اختيارك.',
|
|
12131
|
+
selectionOnLineCleared: 'سيتم مسح اختيارك في هذا السطر.',
|
|
12132
|
+
loading: `جار التحميل...',n error: 'خطأ!`,
|
|
12133
|
+
noData: 'لا توجد بيانات متاحة.',
|
|
12134
|
+
lineInfo: 'السطر {currentPage} من {totalPages}',
|
|
12135
|
+
clearAll: 'مسح الكل',
|
|
12136
|
+
cancel: 'إلغاء',
|
|
12137
|
+
confirm: 'تأكيد'
|
|
12138
|
+
},
|
|
12139
|
+
hr: {
|
|
12140
|
+
homeTeam: 'Domaći tim:',
|
|
12141
|
+
awayTeam: 'Gostujući tim:',
|
|
12142
|
+
selectionCleared: 'Vaš odabir je obrisan.',
|
|
12143
|
+
selectionOnLineCleared: 'Vaš odabir na ovoj liniji bit će obrisan.',
|
|
12144
|
+
loading: `Učitavanje...',n error: 'Greška!`,
|
|
12145
|
+
noData: 'Nema dostupnih podataka.',
|
|
12146
|
+
lineInfo: 'Linija {currentPage} od {totalPages}',
|
|
12147
|
+
clearAll: 'Očisti sve',
|
|
12148
|
+
cancel: 'Odustani',
|
|
12149
|
+
confirm: 'Potvrdi'
|
|
12150
|
+
}
|
|
12151
|
+
};
|
|
12152
|
+
const translate = (key, customLang, replacements) => {
|
|
12153
|
+
const lang = customLang;
|
|
12154
|
+
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
12155
|
+
if (replacements) {
|
|
12156
|
+
Object.keys(replacements).forEach((placeholder) => {
|
|
12157
|
+
translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
|
|
12158
|
+
});
|
|
12159
|
+
}
|
|
12160
|
+
return translation;
|
|
12161
|
+
};
|
|
12162
|
+
const getTranslations = (data) => {
|
|
12163
|
+
Object.keys(data).forEach((item) => {
|
|
12164
|
+
for (let key in data[item]) {
|
|
12165
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
11183
12166
|
}
|
|
11184
|
-
|
|
12167
|
+
});
|
|
12168
|
+
};
|
|
11185
12169
|
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
on-touchstart="_bringOverlayToFront"
|
|
11192
|
-
theme$="[[_theme]]"
|
|
11193
|
-
modeless="[[modeless]]"
|
|
11194
|
-
with-backdrop="[[!modeless]]"
|
|
11195
|
-
resizable$="[[resizable]]"
|
|
11196
|
-
aria-label$="[[ariaLabel]]"
|
|
11197
|
-
restore-focus-on-close
|
|
11198
|
-
focus-trap
|
|
11199
|
-
></vaadin-confirm-dialog-overlay>
|
|
11200
|
-
`}}x(Z_);/**
|
|
11201
|
-
* @license
|
|
11202
|
-
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
11203
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11204
|
-
*/const em=s=>class extends s{static get properties(){return {accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return ["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this);}get __slottedNodes(){return [this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new D(this,"header","h3",{initializer:e=>{this._headerNode=e;}}),this.addController(this._headerController),this._messageController=new D(this,"","div",{multiple:!0,observe:!1,initializer:e=>{const i=document.createElement("div");i.style.display="contents";const o=`confirm-dialog-message-${lt()}`;i.id=o,this.appendChild(i),i.appendChild(e),this._messageNodes=[...this._messageNodes,i];}}),this.addController(this._messageController),this._cancelController=new D(this,"cancel-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("cancel",e);}}),this.addController(this._cancelController),this._rejectController=new D(this,"reject-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("reject",e);}}),this.addController(this._rejectController),this._confirmController=new D(this,"confirm-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("confirm",e);}}),this.addController(this._confirmController);}_initOverlay(e){e.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),e.addEventListener("vaadin-overlay-open",()=>this.__onDialogOpened()),e.addEventListener("vaadin-overlay-closed",()=>this.__onDialogClosed()),e.setAttribute("role","alertdialog");}__onDialogOpened(){const e=this._overlayElement;this.__slottedNodes.forEach(o=>{e.appendChild(o);});const i=e.querySelector('[slot="confirm-button"]');i&&i.focus();}__onDialogClosed(){this.__slottedNodes.forEach(e=>{this.appendChild(e);}),this.dispatchEvent(new CustomEvent("closed"));}__accessibleDescriptionRefChanged(e,i,o){!e||!i||(o!==void 0?we(e,"aria-describedby",{newId:o,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):i.forEach(r=>{we(e,"aria-describedby",{newId:r.id});}),this.__oldAccessibleDescriptionRef=o);}__setupSlottedButton(e,i){const o=`_${e}Button`,r=`__${e}`;this[o]&&this[o]!==i&&this[o].remove(),i.addEventListener("click",this[r]),this[o]=i;}__updateCancelButton(e,i,o,r){e&&(e===this._cancelController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o)),e.toggleAttribute("hidden",!r));}__updateConfirmButton(e,i,o){e&&e===this._confirmController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o));}__updateHeaderNode(e,i){e&&e===this._headerController.defaultNode&&(e.textContent=i);}__updateMessageNodes(e,i){if(e&&e.length>0){const o=e.find(r=>this._messageController.defaultNode&&r===this._messageController.defaultNode.parentElement);o&&(o.firstChild.textContent=i);}}__updateRejectButton(e,i,o,r){e&&(e===this._rejectController.defaultNode&&(e.textContent=i,e.setAttribute("theme",o)),e.toggleAttribute("hidden",!r));}_escPressed(e){e.defaultPrevented||this.__cancel();}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1;}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1;}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1;}_getAriaLabel(e){return e||"confirmation"}};/**
|
|
11205
|
-
* @license
|
|
11206
|
-
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
11207
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11208
|
-
*/class tm extends em(q($t(J(g)))){static get template(){return v`
|
|
11209
|
-
<style>
|
|
11210
|
-
:host,
|
|
11211
|
-
[hidden] {
|
|
11212
|
-
display: none !important;
|
|
12170
|
+
const formatDate = ({ date, type = 'date', format: format$1 }) => {
|
|
12171
|
+
try {
|
|
12172
|
+
const parsedDate = parseISO(date);
|
|
12173
|
+
if (isNaN(parsedDate.getTime())) {
|
|
12174
|
+
throw new Error(`Invalid date: ${date}`);
|
|
11213
12175
|
}
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
12176
|
+
if (format$1)
|
|
12177
|
+
return format(parsedDate, format$1);
|
|
12178
|
+
let formatStr = 'dd/MM/yyyy';
|
|
12179
|
+
if (type === 'time') {
|
|
12180
|
+
formatStr = 'dd/MM/yyyy HH:mm:ss';
|
|
12181
|
+
}
|
|
12182
|
+
else if (type === 'week') {
|
|
12183
|
+
formatStr = 'ccc dd/MM/yyyy HH:mm:ss';
|
|
12184
|
+
}
|
|
12185
|
+
return format(parsedDate, formatStr);
|
|
12186
|
+
}
|
|
12187
|
+
catch (error) {
|
|
12188
|
+
console.error('Error formatting date:', error.message);
|
|
12189
|
+
return '';
|
|
12190
|
+
}
|
|
12191
|
+
};
|
|
12192
|
+
const fetcher = (url) => fetch(url).then((r) => r.json());
|
|
12193
|
+
const DEFAULT_BULLET_CONFIG = [
|
|
12194
|
+
{
|
|
12195
|
+
value: '1'
|
|
12196
|
+
},
|
|
12197
|
+
{
|
|
12198
|
+
value: 'X'
|
|
12199
|
+
},
|
|
12200
|
+
{
|
|
12201
|
+
value: '2'
|
|
12202
|
+
}
|
|
12203
|
+
];
|
|
12204
|
+
const SPLIT_TOKEN = '-';
|
|
12205
|
+
const showNotification = ({ message, theme = 'success', position = 'top-end', duration = 3000 }) => {
|
|
12206
|
+
if (!customElements.get('vaadin-notification')) {
|
|
12207
|
+
console.warn('vaadin-notification is not registered. Please ensure it is imported.');
|
|
12208
|
+
}
|
|
12209
|
+
const notification = document.createElement('vaadin-notification');
|
|
12210
|
+
notification.renderer = (root) => {
|
|
12211
|
+
root.textContent = message;
|
|
12212
|
+
};
|
|
12213
|
+
notification.duration = duration;
|
|
12214
|
+
if (theme) {
|
|
12215
|
+
notification.setAttribute('theme', theme);
|
|
12216
|
+
}
|
|
12217
|
+
notification.setAttribute('position', position);
|
|
12218
|
+
document.body.appendChild(notification);
|
|
12219
|
+
notification.opened = true;
|
|
12220
|
+
};
|
|
11236
12221
|
|
|
11237
12222
|
const lotteryTippingTicketBetCss = ".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-gray-400, #000);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.table-wrapper {\n overflow-x: auto; /* Handle horizontal scroll if content overflows */\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background-color: var(--emw--color-gray-50, #f5f5f5);\n color: var(--emw--color-gray-400, #000);\n font-weight: 500;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-gray-400, #000);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-gray-50, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-gray-50, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.btn {\n background: transparent;\n font-size: 14px;\n transition: all 0.2s ease;\n}\n.btn:hover {\n cursor: pointer;\n}\n\n.btn:hover {\n background-color: var(--emw--color-gray-100, #e6e6e6);\n}\n\n.btn.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.btn.disabled:hover {\n cursor: not-allowed !important;\n}\n\n.LotteryTippingTicketBet__tableToolbar {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.LotteryTippingTicketBet__tableToolbar--item {\n background-color: transparent;\n cursor: pointer;\n font-weight: 500;\n white-space: nowrap;\n display: inline-flex;\n border-radius: 1.6rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n padding-left: 1rem;\n padding-right: 1rem;\n margin-right: 2rem;\n}\n.LotteryTippingTicketBet__tableToolbar--item.mr-0 {\n margin-right: 0rem !important;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup {\n flex-basis: 2rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-radius: 8px;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n background-color: var(--emw--color-background, #fff);\n border-radius: 8px;\n box-shadow: 0 1px 4px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover {\n background-color: var(--emw--color-gray-50, #f5f5f5);\n box-shadow: 0 2px 6px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));\n transform: scale(1.05);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item img {\n width: 20px;\n height: 20px;\n transition: filter 0.2s ease-in-out;\n filter: grayscale(0.3);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover img {\n filter: grayscale(0);\n transform: rotate(3deg);\n}\n\ndiv.border-line {\n margin-top: 1rem;\n height: 1px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--emw--color-gray-100, #e6e6e6);\n transition: all 0.3s ease;\n}\n\n.LotteryTippingTicketBet__footer {\n padding: 0.5rem;\n}\n\n.my-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n font-size: 0.8rem;\n color: var(--emw--color-gray-300, #333);\n}\n\n.my-pagination span {\n font-weight: 500;\n user-select: none;\n}\n\n.my-pagination .btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n color: white;\n transition: all 0.3s ease;\n cursor: pointer;\n box-shadow: 0 4px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));\n opacity: 0.9;\n}\n\n.my-pagination .btn img {\n width: 20px;\n height: 20px;\n transition: transform 0.2s ease;\n}\n\n.my-pagination .btn:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.my-pagination .btn.disabled {\n background: var(--emw--color-gray-100, #e6e6e6);\n cursor: not-allowed;\n opacity: 0.5;\n transform: scale(1);\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item {\n line-height: 1rem;\n}\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n .LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 0 !important;\n }\n}\n/* Fade-In Keyframes */\n@keyframes fadeInLeft {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n/* Fade-Out Keyframes */\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes fadeInRight {\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slide-left {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n}\n@keyframes slide-left {\n 0% {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@-webkit-keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n 100% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n@keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n/* Apply to your card classes */\n.card-in-left {\n -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-left {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-right {\n -webkit-animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-right {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-up {\n -webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-down {\n animation: fadeOut 0.2s ease-out both;\n}";
|
|
11238
12223
|
const LotteryTippingTicketBetStyle0 = lotteryTippingTicketBetCss;
|
|
@@ -11887,4 +12872,349 @@ const LotteryTippingTicketController = class {
|
|
|
11887
12872
|
};
|
|
11888
12873
|
LotteryTippingTicketController.style = LotteryTippingTicketControllerStyle0;
|
|
11889
12874
|
|
|
11890
|
-
|
|
12875
|
+
var DrawResult;
|
|
12876
|
+
(function (DrawResult) {
|
|
12877
|
+
DrawResult["WON"] = "Won";
|
|
12878
|
+
DrawResult["LOST"] = "Lost";
|
|
12879
|
+
})(DrawResult || (DrawResult = {}));
|
|
12880
|
+
|
|
12881
|
+
const lotteryTippingTicketHistoryCss = "@keyframes skeleton-loading{0%{background-position:200% 0}100%{background-position:-200% 0}}.lottery-tipping-ticket-history{padding:12px}.lottery-tipping-ticket-history .ticket-history-title{margin:20px 0;text-align:center;font-size:20px;font-weight:700}.lottery-tipping-ticket-history .ticket-info{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .ticket-info-item{display:flex;align-items:center;user-select:none}.lottery-tipping-ticket-history .ticket-info-label{margin-right:12px}.lottery-tipping-ticket-history .ticket-info-val{color:var(--emw--color-typography, #555)}.lottery-tipping-ticket-history .ticket-list-wrap{display:flex;flex-direction:column;gap:12px}.lottery-tipping-ticket-history .draw-info-skeleton{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;display:flex;flex-direction:column;gap:10px;padding:10px}.lottery-tipping-ticket-history .skeleton-line{height:16px;border-radius:4px;background:linear-gradient(90deg, var(--emw--color-gray-100, #e6e6e6) 25%, var(--emw--color-gray-50, #f5f5f5) 50%, var(--emw--color-gray-100, #e6e6e6) 75%);background-size:200% 100%;animation:skeleton-loading 1.2s infinite}.lottery-tipping-ticket-history .draw-info{width:30%;min-width:300px;border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));border-radius:5px;padding:12px;margin-top:20px;display:flex;flex-direction:column;gap:8px;user-select:none}.lottery-tipping-ticket-history .draw-info-item{display:flex}.lottery-tipping-ticket-history .draw-info-label{margin-right:6px}.lottery-tipping-ticket-history .draw-info-val{color:var(--emw--color-typography, #555)}.lottery-tipping-ticket-history .show-detail-link{color:var(--emw-pool-game-acition-normal, #4a90e2);text-decoration:underline;cursor:pointer}.lottery-tipping-ticket-history .filter-wrap{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status{display:flex;gap:12px;align-items:center}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn{background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #fed275);border-radius:4px;padding:10px 8px;font-size:12px;text-transform:uppercase;color:var(--emw--color-typography, #555);cursor:pointer;transition:all 0.2s linear}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn:hover{background-color:var(--emw--color-secondary, #fff3b9)}.lottery-tipping-ticket-history .filter-wrap .filter-status-btn.active{background:var(--emw--color-secondary, #fff3b9);color:var(--emw--color-gray-300, #333);border:2px solid var(--emw--color-gray-300, #333)}.lottery-tipping-ticket-history .pagination-wrap{margin-top:20px;display:flex;justify-content:flex-end}@media screen and (min-width: 1200px){.lottery-tipping-ticket-history{padding:24px;width:60%;margin:0 auto}}@media screen and (max-width: 480px){.lottery-tipping-ticket-history{padding:2px}.lottery-tipping-ticket-history .filter-wrap .filter-status{gap:4px}}.loading-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.loading-wrap .dots-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.loading-wrap .dot{height:14px;width:14px;margin-right:14px;border-radius:14px;background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);animation:pulse 1.5s infinite ease-in-out}.loading-wrap .dot:last-child{margin-right:0}.loading-wrap .dot:nth-child(1){animation-delay:-0.3s}.loading-wrap .dot:nth-child(2){animation-delay:-0.1s}.loading-wrap .dot:nth-child(3){animation-delay:0.1s}@keyframes pulse{0%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 var(--emw-pool-game-ticket-history-loading-box-shadow-normal, rgba(178, 212, 252, 0.7))}50%{transform:scale(1.2);background-color:var(--emw-pool-game-ticket-history-loading-active, #6793fb);box-shadow:0 0 0 10px var(--emw-pool-game-ticket-history-loading-box-shadow-active, rgba(178, 212, 252, 0))}100%{transform:scale(0.8);background-color:var(--emw-pool-game-ticket-history-loading-normal, #b3d4fc);box-shadow:0 0 0 0 rgba(178, 212, 252, 0.7)}}.empty-wrap{margin:20px 0;display:flex;align-items:center;justify-content:center;min-height:40vh}.betting-type{margin-bottom:16px;display:flex;align-items:center;gap:20px}.betting-type-title{font-weight:600;font-size:16px}.betting-type-text{font-size:16px}.LotteryTippingTicketController__segmented-control{height:2.2rem;display:inline-flex;background-color:var(--emw--color-gray-100, #e6e6e6);border-radius:2rem;padding:0.2rem}.LotteryTippingTicketController__segment{background-color:transparent;border:none;padding:0.3rem 0.8rem;cursor:pointer;font-weight:500;border-radius:2rem;outline:none;transition:background-color 0.25s ease, color 0.25s ease;white-space:nowrap}.LotteryTippingTicketController__segment--active{background-color:var(--emw--color-background, #fff);color:var(--emw--color-gray-400, #000);font-weight:600}.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover{background-color:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}";
|
|
12882
|
+
const LotteryTippingTicketHistoryStyle0 = lotteryTippingTicketHistoryCss;
|
|
12883
|
+
|
|
12884
|
+
const LotteryTippingTicketHistory = class {
|
|
12885
|
+
constructor(hostRef) {
|
|
12886
|
+
registerInstance(this, hostRef);
|
|
12887
|
+
this.logout = createEvent(this, "logout", 7);
|
|
12888
|
+
this.ticketTypeMap = {
|
|
12889
|
+
NORMAL: 'Normal',
|
|
12890
|
+
SYNDICATE: 'Syndicate',
|
|
12891
|
+
SUBSCRIPTION: 'Subscription'
|
|
12892
|
+
};
|
|
12893
|
+
this.resultMap = { [DrawResult.WON]: 'Win', [DrawResult.LOST]: 'Lose' };
|
|
12894
|
+
this.displayPrizeCategory = (details) => {
|
|
12895
|
+
const prizeMap = new Map();
|
|
12896
|
+
details.forEach((detail) => {
|
|
12897
|
+
let prizeName = detail.divisionDisplayName;
|
|
12898
|
+
let amount = detail.amount;
|
|
12899
|
+
let currency = detail.currency;
|
|
12900
|
+
if (prizeName && prizeName != 'None') {
|
|
12901
|
+
if (prizeMap.has(prizeName)) {
|
|
12902
|
+
prizeMap.set(prizeName, {
|
|
12903
|
+
amount: prizeMap.get(prizeName)['amount'] + amount,
|
|
12904
|
+
currency,
|
|
12905
|
+
times: prizeMap.get(prizeName)['times'] + 1
|
|
12906
|
+
});
|
|
12907
|
+
}
|
|
12908
|
+
else {
|
|
12909
|
+
prizeMap.set(prizeName, { amount, currency, times: 1 });
|
|
12910
|
+
}
|
|
12911
|
+
}
|
|
12912
|
+
});
|
|
12913
|
+
const resultArr = [];
|
|
12914
|
+
for (let [key, val] of prizeMap.entries()) {
|
|
12915
|
+
resultArr.push({ prizeName: key, amount: val['amount'], currency: val['currency'], times: val['times'] });
|
|
12916
|
+
}
|
|
12917
|
+
resultArr.sort((p1, p2) => p2.prizeName.localeCompare(p1.prizeName));
|
|
12918
|
+
return resultArr;
|
|
12919
|
+
};
|
|
12920
|
+
this.endpoint = undefined;
|
|
12921
|
+
this.endpointTicket = undefined;
|
|
12922
|
+
this.gameId = undefined;
|
|
12923
|
+
this.playerId = undefined;
|
|
12924
|
+
this.sessionId = '';
|
|
12925
|
+
this.drawId = undefined;
|
|
12926
|
+
this.mbSource = undefined;
|
|
12927
|
+
this.clientStyling = undefined;
|
|
12928
|
+
this.clientStylingUrl = undefined;
|
|
12929
|
+
this.language = 'en';
|
|
12930
|
+
this.translationUrl = '';
|
|
12931
|
+
this.ticketHistory = [];
|
|
12932
|
+
this.activeStatus = '';
|
|
12933
|
+
this.statusOptions = undefined;
|
|
12934
|
+
this.isLoading = false;
|
|
12935
|
+
this.rawData = {};
|
|
12936
|
+
this.filterData = {
|
|
12937
|
+
offset: 0,
|
|
12938
|
+
limit: 10,
|
|
12939
|
+
state: '',
|
|
12940
|
+
from: '',
|
|
12941
|
+
to: '',
|
|
12942
|
+
wagerType: '',
|
|
12943
|
+
vendorGameType: 'PoolGame',
|
|
12944
|
+
id: ''
|
|
12945
|
+
};
|
|
12946
|
+
this.paginationInfo = {
|
|
12947
|
+
current: 1,
|
|
12948
|
+
total: 0,
|
|
12949
|
+
pageSize: 10
|
|
12950
|
+
};
|
|
12951
|
+
this.quickFiltersActive = false;
|
|
12952
|
+
this.showCurrentTicketLine = false;
|
|
12953
|
+
this.curTicketItem = undefined;
|
|
12954
|
+
this.curSelection = [];
|
|
12955
|
+
this.curSelectionIdx = 0;
|
|
12956
|
+
this.showCurrentDrawResult = false;
|
|
12957
|
+
this.curDrawItem = undefined;
|
|
12958
|
+
this.curDrawSelection = [];
|
|
12959
|
+
this.curDrawSelectionBettingType = undefined;
|
|
12960
|
+
this.curDrawSelectionMap = {};
|
|
12961
|
+
}
|
|
12962
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
12963
|
+
if (newValue != oldValue) {
|
|
12964
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
12965
|
+
}
|
|
12966
|
+
}
|
|
12967
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
12968
|
+
if (newValue != oldValue) {
|
|
12969
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
12970
|
+
}
|
|
12971
|
+
}
|
|
12972
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
12973
|
+
if (newValue != oldValue) {
|
|
12974
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
12975
|
+
}
|
|
12976
|
+
}
|
|
12977
|
+
componentDidLoad() {
|
|
12978
|
+
if (this.stylingContainer) {
|
|
12979
|
+
if (this.mbSource)
|
|
12980
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
12981
|
+
if (this.clientStyling)
|
|
12982
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
12983
|
+
if (this.clientStylingUrl)
|
|
12984
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
12985
|
+
}
|
|
12986
|
+
}
|
|
12987
|
+
connectedCallback() {
|
|
12988
|
+
const fetchData = () => {
|
|
12989
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
12990
|
+
this.isLoading = true;
|
|
12991
|
+
fetcher$2(url.href)
|
|
12992
|
+
.then((res) => {
|
|
12993
|
+
this.rawData = res;
|
|
12994
|
+
})
|
|
12995
|
+
.finally(() => {
|
|
12996
|
+
this.isLoading = false;
|
|
12997
|
+
});
|
|
12998
|
+
};
|
|
12999
|
+
fetchData();
|
|
13000
|
+
}
|
|
13001
|
+
disconnectedCallback() {
|
|
13002
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
13003
|
+
}
|
|
13004
|
+
async fetchTicketList() {
|
|
13005
|
+
this.isLoading = true;
|
|
13006
|
+
try {
|
|
13007
|
+
const { items, total } = await fetchRequest(`${this.endpointTicket}/tickets${toQueryParams(this.filterData)}`, 'GET', null, {
|
|
13008
|
+
Authorization: `Bearer ${this.sessionId}`
|
|
13009
|
+
});
|
|
13010
|
+
this.ticketHistory = items;
|
|
13011
|
+
this.paginationInfo.total = total;
|
|
13012
|
+
this.isLoading = false;
|
|
13013
|
+
if (items.length > 0) {
|
|
13014
|
+
this.getDrawResult();
|
|
13015
|
+
}
|
|
13016
|
+
}
|
|
13017
|
+
catch (e) {
|
|
13018
|
+
console.log('in fetchTicketList error is: ', e);
|
|
13019
|
+
if (e.status === 401) {
|
|
13020
|
+
this.showNotification(e.message, 'error');
|
|
13021
|
+
this.logout.emit();
|
|
13022
|
+
}
|
|
13023
|
+
}
|
|
13024
|
+
finally {
|
|
13025
|
+
this.isLoading = false;
|
|
13026
|
+
}
|
|
13027
|
+
}
|
|
13028
|
+
async fetchDrwaResult(gameId, drawId) {
|
|
13029
|
+
try {
|
|
13030
|
+
const res = await fetchRequest(`${this.endpoint}/games/${gameId}/draws/${drawId}`, 'GET', {});
|
|
13031
|
+
return res;
|
|
13032
|
+
}
|
|
13033
|
+
catch (e) {
|
|
13034
|
+
console.log(e);
|
|
13035
|
+
}
|
|
13036
|
+
}
|
|
13037
|
+
showNotification(message, theme = '', position = 'top-end') {
|
|
13038
|
+
const notification = document.createElement('vaadin-notification');
|
|
13039
|
+
notification.renderer = (root) => {
|
|
13040
|
+
root.textContent = message;
|
|
13041
|
+
};
|
|
13042
|
+
notification.duration = 5000;
|
|
13043
|
+
if (theme) {
|
|
13044
|
+
notification.setAttribute('theme', theme);
|
|
13045
|
+
}
|
|
13046
|
+
notification.setAttribute('position', position);
|
|
13047
|
+
document.body.appendChild(notification);
|
|
13048
|
+
notification.opened = true;
|
|
13049
|
+
}
|
|
13050
|
+
getDivision(detail, drawData) {
|
|
13051
|
+
var _a;
|
|
13052
|
+
let division = detail.division;
|
|
13053
|
+
let prize = (_a = drawData.prizes) === null || _a === void 0 ? void 0 : _a.filter((prize) => prize.order === division);
|
|
13054
|
+
if (prize && prize.length) {
|
|
13055
|
+
return prize[0].division;
|
|
13056
|
+
}
|
|
13057
|
+
else {
|
|
13058
|
+
return null;
|
|
13059
|
+
}
|
|
13060
|
+
}
|
|
13061
|
+
async getDrawResult() {
|
|
13062
|
+
const idMapper = new Map();
|
|
13063
|
+
this.ticketHistory.forEach((item, ticketIndex) => {
|
|
13064
|
+
item.drawResults.forEach((drawResult, drawIndex) => {
|
|
13065
|
+
const id = `${drawResult.drawId}-${item.gameId}`;
|
|
13066
|
+
if (!idMapper.has(id)) {
|
|
13067
|
+
idMapper.set(id, {
|
|
13068
|
+
drawId: drawResult.drawId,
|
|
13069
|
+
gameId: item.gameId,
|
|
13070
|
+
indices: [{ ticketIndex, drawIndex }]
|
|
13071
|
+
});
|
|
13072
|
+
}
|
|
13073
|
+
else {
|
|
13074
|
+
idMapper.get(id).indices.push({ ticketIndex, drawIndex });
|
|
13075
|
+
}
|
|
13076
|
+
});
|
|
13077
|
+
});
|
|
13078
|
+
let updatedTicketHistory = [...this.ticketHistory];
|
|
13079
|
+
await Promise.all(Array.from(idMapper.values()).map(async ({ gameId, drawId, indices }) => {
|
|
13080
|
+
try {
|
|
13081
|
+
const drawData = await this.fetchDrwaResult(gameId, drawId);
|
|
13082
|
+
if (drawData) {
|
|
13083
|
+
indices.forEach(({ ticketIndex, drawIndex }) => {
|
|
13084
|
+
const updatedDrawResult = Object.assign(Object.assign({}, updatedTicketHistory[ticketIndex].drawResults[drawIndex]), { tempDrawData: Object.assign(Object.assign({}, drawData), { vendorGameId: updatedTicketHistory[ticketIndex].vendorGameId }), prizeDetails: this.displayPrizeCategory(updatedTicketHistory[ticketIndex].drawResults[drawIndex].details) });
|
|
13085
|
+
const updatedDrawResults = [...updatedTicketHistory[ticketIndex].drawResults];
|
|
13086
|
+
updatedDrawResults[drawIndex] = updatedDrawResult;
|
|
13087
|
+
updatedTicketHistory[ticketIndex] = Object.assign(Object.assign({}, updatedTicketHistory[ticketIndex]), { drawResults: updatedDrawResults });
|
|
13088
|
+
});
|
|
13089
|
+
}
|
|
13090
|
+
}
|
|
13091
|
+
catch (error) {
|
|
13092
|
+
console.error(`failed to fetch draw result (gameId: ${gameId}, drawId: ${drawId}):`, error);
|
|
13093
|
+
}
|
|
13094
|
+
}));
|
|
13095
|
+
this.ticketHistory = updatedTicketHistory;
|
|
13096
|
+
}
|
|
13097
|
+
componentWillLoad() {
|
|
13098
|
+
if (this.translationUrl) {
|
|
13099
|
+
getTranslations$2(JSON.parse(this.translationUrl));
|
|
13100
|
+
}
|
|
13101
|
+
this.statusOptions = [
|
|
13102
|
+
{
|
|
13103
|
+
label: translate$3('settled', this.language),
|
|
13104
|
+
value: 'Settled'
|
|
13105
|
+
},
|
|
13106
|
+
{
|
|
13107
|
+
label: translate$3('purchased', this.language),
|
|
13108
|
+
value: 'Purchased'
|
|
13109
|
+
},
|
|
13110
|
+
{
|
|
13111
|
+
label: translate$3('canceled', this.language),
|
|
13112
|
+
value: 'Canceled'
|
|
13113
|
+
}
|
|
13114
|
+
];
|
|
13115
|
+
this.fetchTicketList();
|
|
13116
|
+
}
|
|
13117
|
+
changeStatus(status) {
|
|
13118
|
+
this.activeStatus = status;
|
|
13119
|
+
this.filterData.state = status;
|
|
13120
|
+
this.quickFiltersActive = true;
|
|
13121
|
+
this.fetchTicketList();
|
|
13122
|
+
}
|
|
13123
|
+
handlePageSizeChange(event) {
|
|
13124
|
+
this.filterData.limit = event.detail;
|
|
13125
|
+
this.fetchTicketList();
|
|
13126
|
+
}
|
|
13127
|
+
handlePageChange(event) {
|
|
13128
|
+
this.filterData.offset = (event.detail - 1) * this.filterData.limit;
|
|
13129
|
+
this.fetchTicketList();
|
|
13130
|
+
}
|
|
13131
|
+
handleShowTicketLineDetial(item) {
|
|
13132
|
+
this.curSelectionIdx = 0;
|
|
13133
|
+
this.showCurrentTicketLine = true;
|
|
13134
|
+
this.curTicketItem = item;
|
|
13135
|
+
this.curSelection = this.parseSelection();
|
|
13136
|
+
}
|
|
13137
|
+
handleShowCurrentDraw(item) {
|
|
13138
|
+
this.showCurrentDrawResult = true;
|
|
13139
|
+
this.curDrawItem = item;
|
|
13140
|
+
this.curDrawSelectionBettingType = item.winningNumbers[0].winning_type;
|
|
13141
|
+
this.curDrawItem.winningNumbers.forEach((item) => {
|
|
13142
|
+
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.numbers)];
|
|
13143
|
+
});
|
|
13144
|
+
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
13145
|
+
}
|
|
13146
|
+
parseSelection() {
|
|
13147
|
+
const result = [];
|
|
13148
|
+
this.curTicketItem.selection.forEach((selection, index) => {
|
|
13149
|
+
result[index] = parseEachLineNumber(selection.selections);
|
|
13150
|
+
});
|
|
13151
|
+
return result;
|
|
13152
|
+
}
|
|
13153
|
+
handleFilterChange(e) {
|
|
13154
|
+
const filterData = e.detail;
|
|
13155
|
+
this.filterData.from = filterData.filterFromCalendar;
|
|
13156
|
+
this.filterData.to = filterData.filterToCalendar;
|
|
13157
|
+
this.filterData.id = filterData.ticketId;
|
|
13158
|
+
this.filterData.wagerType = filterData.ticketType;
|
|
13159
|
+
this.fetchTicketList();
|
|
13160
|
+
}
|
|
13161
|
+
handleFilterClear() {
|
|
13162
|
+
this.activeStatus = '';
|
|
13163
|
+
this.quickFiltersActive = false;
|
|
13164
|
+
this.filterData = {
|
|
13165
|
+
offset: 0,
|
|
13166
|
+
limit: 10,
|
|
13167
|
+
state: '',
|
|
13168
|
+
from: '',
|
|
13169
|
+
to: '',
|
|
13170
|
+
wagerType: '',
|
|
13171
|
+
vendorGameType: 'PoolGame',
|
|
13172
|
+
id: ''
|
|
13173
|
+
};
|
|
13174
|
+
this.fetchTicketList();
|
|
13175
|
+
}
|
|
13176
|
+
get playTypeConfig() {
|
|
13177
|
+
var _a, _b, _c;
|
|
13178
|
+
return (_c = (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.poolGame) === null || _c === void 0 ? void 0 : _c.playTypes;
|
|
13179
|
+
}
|
|
13180
|
+
get bettingTypeConfig() {
|
|
13181
|
+
var _a, _b, _c;
|
|
13182
|
+
return (_c = (_b = (_a = this.rawData) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.poolGame) === null || _c === void 0 ? void 0 : _c.bettingTypes;
|
|
13183
|
+
}
|
|
13184
|
+
getBettingType(betTypeId) {
|
|
13185
|
+
var _a;
|
|
13186
|
+
return (_a = this.playTypeConfig.find((item) => item.betTypeId === betTypeId)['bettingType']) !== null && _a !== void 0 ? _a : '';
|
|
13187
|
+
}
|
|
13188
|
+
handlePoolGameCurrentPageChange(e) {
|
|
13189
|
+
const { currentPage } = e.detail;
|
|
13190
|
+
this.curSelectionIdx = currentPage - 1;
|
|
13191
|
+
}
|
|
13192
|
+
handleDrawBettingTypeChange(bettingType) {
|
|
13193
|
+
this.curDrawSelectionBettingType = bettingType;
|
|
13194
|
+
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
13195
|
+
}
|
|
13196
|
+
getBettingTypeName(bettingType) {
|
|
13197
|
+
var _a, _b;
|
|
13198
|
+
const name = (_b = (_a = this.bettingTypeConfig) === null || _a === void 0 ? void 0 : _a.find((item) => item.code === bettingType)) === null || _b === void 0 ? void 0 : _b.name;
|
|
13199
|
+
return name !== null && name !== void 0 ? name : bettingType;
|
|
13200
|
+
}
|
|
13201
|
+
render() {
|
|
13202
|
+
return (h("div", { key: '27d7945395c1bd5cf8c50fabcf9358dd10a2f379', class: "lottery-tipping-ticket-history", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '29bf61bc1b7a2f34bf24814c5d256bc84b703fa9', class: "ticket-history-title" }, translate$3('ticketsHistory', this.language)), h("div", { key: 'aabcc336535e36248c07afac1b3777c8e00e6d36', class: "filter-wrap" }, h("div", { key: '6a2ce1224363104c27d63026e3d246f70db12516', class: "filter-status" }, this.statusOptions.map((status) => (h("div", { class: 'filter-status-btn' + (this.activeStatus == status.value ? ' active' : ''), onClick: () => this.changeStatus(status.value) }, status.label)))), h("div", { key: '740826baea69e1adf534bcf9a2bb4d5083fa9d90', class: "filter-operation" }, h("lottery-tipping-filter", { key: '395ebb8b2c040804adb4e0a87daff0d01a0598cf', "quick-filters-active": this.quickFiltersActive, language: this.language, "translation-url": this.translationUrl }))), this.isLoading && (h("div", { key: 'c27852dcd7902ac43a1ff7408476e5f8667c1010', class: "loading-wrap" }, h("section", { key: '9ab2fea4cafdefe3accbc0e49be19ec16158cd14', class: "dots-container" }, h("div", { key: 'c5d6c3227c51c462eb4bcca926b7ab70e3676dfd', class: "dot" }), h("div", { key: '9ac68a72b257614a1c048a870f18753fe85967db', class: "dot" }), h("div", { key: '6c5d426f926a5726a3d88ad509fc6e38f715c10d', class: "dot" }), h("div", { key: '90959f4befb4d2308a1cf1651dd76f7be71b3e34', class: "dot" }), h("div", { key: '1e8dda2f5e4e460cb0f4aa7897b19fad23d98834', class: "dot" })))), !this.isLoading && (!this.ticketHistory || this.ticketHistory.length == 0) && (h("div", { key: '452303d3d8221e2c3905b1d0d2e81651f1e62038', class: "empty-wrap" }, translate$3('noData', this.language))), !this.isLoading && this.ticketHistory && this.ticketHistory.length != 0 && (h("div", { key: 'e7c5d75d70077d6b65a006fa6169ff9d2edca2ea', class: "ticket-list-wrap" }, this.ticketHistory.map((item) => (h("lottery-tipping-panel", { "header-title": format(new Date(item.createdAt), 'dd/MM/yyyy HH:mm:ss') + ' ' + item.state }, h("div", { class: "panel-content", slot: "content" }, h("div", { class: "ticket-info" }, h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$3('ticketId', this.language)), h("div", { class: "ticket-info-val" }, item.id, " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$3('ticketType', this.language)), h("div", { class: "ticket-info-val" }, this.ticketTypeMap[item.wagerType], " ")), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$3('ticketAmount', this.language)), h("div", { class: "ticket-info-val" }, `${item.amount} ${item.currency}`)), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$3('lineDetail', this.language)), h("div", { class: "ticket-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowTicketLineDetial(item) }, translate$3('seeDetails', this.language)))), h("div", { class: "ticket-info-item" }, h("div", { class: "ticket-info-label" }, translate$3('numberOfDraw', this.language)), h("div", { class: "ticket-info-val" }, item.drawCount))), item.state == 'Settled' &&
|
|
13203
|
+
item.drawResults.map((drawResultItem) => (h("div", { class: "draw-info-container" }, drawResultItem.tempDrawData ? (h("div", { class: "draw-info" }, h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$3('ticketResult', this.language)), h("div", { class: "draw-info-val" }, this.resultMap[drawResultItem.state])), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$3('drawId', this.language)), h("div", { class: "draw-info-val" }, drawResultItem.drawId)), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$3('drawDate', this.language)), h("div", { class: "draw-info-val" }, format(new Date(drawResultItem.tempDrawData.date), 'dd/MM/yyyy'))), h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$3('result', this.language)), h("div", { class: "draw-info-val" }, h("span", { class: "show-detail-link", onClick: () => this.handleShowCurrentDraw(drawResultItem.tempDrawData) }, translate$3('seeDetails', this.language)))), drawResultItem.state === DrawResult.WON && (h("div", { class: "draw-info-item" }, h("div", { class: "draw-info-label" }, translate$3('prize', this.language)), h("div", { class: "draw-info-val1" }, h("div", { style: { height: '20px' } }), drawResultItem.prizeDetails.map((prizeItem) => (h("span", null, h("div", null, h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.prizeName, prizeItem.times > 1 ? ' x ' + prizeItem.times : '', ":", ' '), h("span", { style: { 'margin-right': '4px', color: 'rgb(85, 85, 85)' } }, thousandSeperator(prizeItem.amount)), h("span", { style: { color: 'rgb(85, 85, 85)' } }, prizeItem.currency)))))))))) : (h("div", { class: "draw-info-skeleton" }, [...Array(5)].map(() => (h("div", { class: "skeleton-line" })))))))))))))), h("lottery-tipping-dialog", { key: '913a521d05ae95b088fba515d951bc79b1433938', visible: this.showCurrentTicketLine, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
|
|
13204
|
+
this.showCurrentTicketLine = false;
|
|
13205
|
+
}, language: this.language, "translation-url": this.translationUrl }, this.curSelection && this.curSelection.length && (h("div", { key: '6608c983a4bc781f4beac6488b0857abfb59ca48' }, h("div", { key: '77690236f6e654e8f178bdb6fb76f49826b02a60', class: "betting-type" }, h("div", { key: '30d239aa23d01edb20049b5fbbbbc094c6742f75', class: "betting-type-title" }, translate$3('bettingType', this.language)), h("div", { key: '93770717ac08bbacc84d9de8b16133073e36d4c9', class: "betting-type-text" }, this.getBettingTypeName(this.getBettingType(this.curTicketItem.selection[this.curSelectionIdx].betType)))), h("lottery-tipping-ticket-bet", { key: '11641a37abe2ca65ecb706f94ce8a911f9e849d9', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curTicketItem.vendorGameId, "draw-id": this.curTicketItem.startingDrawId, "default-bullet-config-line-group": JSON.stringify(this.curSelection), "read-pretty": true, "total-pages": this.curSelection.length, language: this.language, "translation-url": this.translationUrl })))), h("lottery-tipping-dialog", { key: 'fdac976410e6b1b1e1ea20072d5c4caa474f4130', visible: this.showCurrentDrawResult, width: !isMobile(window.navigator.userAgent) ? '720px' : undefined, fullscreen: isMobile(window.navigator.userAgent), closable: true, showFooter: false, onCancel: () => {
|
|
13206
|
+
this.showCurrentDrawResult = false;
|
|
13207
|
+
}, language: this.language, "translation-url": this.translationUrl }, this.curDrawSelection && this.curDrawSelection.length && (h("div", { key: 'b495d8bb01c4bb18edf951889850d56700564d8b' }, h("div", { key: '77443b43ee363dd2051da4a8c6cb004f2acab410', class: "betting-type" }, h("div", { key: 'ada4a3803b9073e78c248790f24de86900e5776f', class: "betting-type-title" }, translate$3('bettingType', this.language)), h("div", { key: '20826ed1192db8acfb25310c31252cb7f5a75f2a', class: "betting-type-text" }, h("div", { key: '7721c04879283138870833b3ce0b881cd84aec6c', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
|
|
13208
|
+
LotteryTippingTicketController__segment: true,
|
|
13209
|
+
'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
|
|
13210
|
+
}, onClick: () => this.handleDrawBettingTypeChange(bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: 'b8b29a1a6e6bda2ce5004765e219e58d8e12bb2f', endpoint: this.endpoint, "session-id": this.sessionId, "game-id": this.curDrawItem.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "translation-url": this.translationUrl })))), h("div", { key: 'a84c658d87e936cbf20731a64bc753f13c099024', class: "pagination-wrap" }, h("lottery-tipping-pagination", { key: 'fdf7443bd153e90c131e4ba937f08d611706a56d', total: this.paginationInfo.total, current: this.paginationInfo.current, "page-size": this.paginationInfo.pageSize, language: this.language, "translation-url": this.translationUrl }))));
|
|
13211
|
+
}
|
|
13212
|
+
static get watchers() { return {
|
|
13213
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
13214
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
13215
|
+
"mbSource": ["handleMbSourceChange"]
|
|
13216
|
+
}; }
|
|
13217
|
+
};
|
|
13218
|
+
LotteryTippingTicketHistory.style = LotteryTippingTicketHistoryStyle0;
|
|
13219
|
+
|
|
13220
|
+
export { GeneralMultiSelect as general_multi_select, GeneralTooltip as general_tooltip, LotteryTippingBullet as lottery_tipping_bullet, LotteryTippingBulletGroup as lottery_tipping_bullet_group, LotteryTippingDialog as lottery_tipping_dialog, LotteryTippingFilter as lottery_tipping_filter, LotteryTippingPagination as lottery_tipping_pagination, lotteryTippingPanel as lottery_tipping_panel, LotteryTippingTicketBanner as lottery_tipping_ticket_banner, LotteryTippingTicketBet as lottery_tipping_ticket_bet, LotteryTippingTicketController as lottery_tipping_ticket_controller, LotteryTippingTicketHistory as lottery_tipping_ticket_history };
|