@everymatrix/lottery-tipping-latest-result 1.86.27 → 1.86.28
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_6.cjs.entry.js → general-tooltip_7.cjs.entry.js} +428 -254
- package/dist/cjs/{index-2ca263e9.js → index-6a03d840.js} +3 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{lottery-tipping-latest-result-3b809e79.js → lottery-tipping-latest-result-1763f6ca.js} +75 -46
- package/dist/cjs/lottery-tipping-latest-result.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/lottery-tipping-calendar/lottery-tipping-calendar.css +1 -1
- package/dist/collection/components/lottery-tipping-calendar/lottery-tipping-calendar.js +2 -2
- package/dist/collection/components/lottery-tipping-latest-result/lottery-tipping-latest-result.css +6 -0
- package/dist/collection/components/lottery-tipping-latest-result/lottery-tipping-latest-result.js +46 -38
- package/dist/collection/utils/api.js +10 -0
- package/dist/collection/utils/utils.js +22 -25
- package/dist/esm/{general-tooltip_6.entry.js → general-tooltip_7.entry.js} +429 -256
- package/dist/esm/{index-32d8a144.js → index-52961f92.js} +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{lottery-tipping-latest-result-c2b7bf41.js → lottery-tipping-latest-result-59297760.js} +75 -46
- package/dist/esm/lottery-tipping-latest-result.js +3 -3
- package/dist/lottery-tipping-latest-result/{general-tooltip_6.entry.js → general-tooltip_7.entry.js} +239 -239
- package/dist/lottery-tipping-latest-result/{index-32d8a144.js → index-52961f92.js} +2 -2
- package/dist/lottery-tipping-latest-result/index.esm.js +1 -1
- package/dist/lottery-tipping-latest-result/lottery-tipping-latest-result-59297760.js +1 -0
- package/dist/lottery-tipping-latest-result/lottery-tipping-latest-result.esm.js +1 -1
- package/dist/types/components/lottery-tipping-latest-result/lottery-tipping-latest-result.d.ts +4 -4
- package/dist/types/components.d.ts +0 -8
- package/dist/types/models/index.d.ts +17 -0
- package/dist/types/utils/api.d.ts +6 -0
- package/dist/types/utils/utils.d.ts +4 -2
- package/package.json +1 -1
- package/dist/lottery-tipping-latest-result/lottery-tipping-latest-result-c2b7bf41.js +0 -1
|
@@ -52,10 +52,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
52
52
|
}
|
|
53
53
|
switch(bundleId) {
|
|
54
54
|
|
|
55
|
-
case 'general-
|
|
55
|
+
case 'general-tooltip_7':
|
|
56
56
|
return import(
|
|
57
57
|
/* webpackMode: "lazy" */
|
|
58
|
-
'./general-
|
|
58
|
+
'./general-tooltip_7.entry.js').then(processMod, consoleError);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
return import(
|
|
@@ -1335,4 +1335,4 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
1335
1335
|
// src/runtime/nonce.ts
|
|
1336
1336
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1337
1337
|
|
|
1338
|
-
export { bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1338
|
+
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { L as LotteryTippingLatestResult } from './lottery-tipping-latest-result-
|
|
2
|
-
import './index-
|
|
1
|
+
export { L as LotteryTippingLatestResult } from './lottery-tipping-latest-result-59297760.js';
|
|
2
|
+
import './index-52961f92.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-52961f92.js';
|
|
2
|
+
export { s as setNonce } from './index-52961f92.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["general-
|
|
8
|
+
return bootstrapLazy([["general-tooltip_7",[[1,"lottery-tipping-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[1537,"game-id"],"playerId":[1538,"player-id"],"sessionId":[1537,"session-id"],"hasDrawDates":[32],"lastestDate":[32],"drawList":[32],"curDrawItem":[32],"curDrawItemIdx":[32],"curDrawSelection":[32],"curDrawSelectionBettingType":[32],"curDrawSelectionMap":[32],"curPrizes":[32],"curPrizeMap":[32],"curTurnOver":[32],"isLoading":[32],"playTypes":[32],"bettingTypes":[32],"vendorGameId":[32],"isLoadingTurnover":[32]},[[0,"changeDate","handleChangeDate"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-bet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"totalPages":[1538,"total-pages"],"minTotalPages":[514,"min-total-pages"],"maxTotalPages":[514,"max-total-pages"],"mode":[513],"readPretty":[516,"read-pretty"],"defaultBulletConfigLineGroup":[513,"default-bullet-config-line-group"],"translationData":[32],"clientStylingUrlContent":[32],"bulletConfigLineGroup":[32],"currentPage":[32],"isLoading":[32],"hasErrors":[32],"dialogConfig":[32],"ticketDataSource":[32],"resetBulletConfig":[64],"getData":[64]},[[0,"lotteryTippingBulletGroupToggle","lotteryTippingBulletGroupSelectionHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"sessionId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultBulletConfigLineGroup":["fetchMatchData"],"currentPage":["handleCurrentPageChange"]}],[1,"lottery-tipping-calendar",{"date":[1],"highLightDates":[16],"language":[513],"translationUrl":[520,"translation-url"],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"date":["handleDateChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-tipping-bullet-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[513,"position-idx"],"theme":[513],"mode":[513],"bulletConfigContent":[513,"bullet-config-content"]},[[0,"lotteryTippingBulletToggle","lotteryTippingBulletSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"general-tooltip",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"position":[1],"delay":[2],"isVisible":[32],"_tooltipId":[32]},[[1,"mouseenter","handleMouseEnterOrFocus"],[0,"focusin","handleMouseEnterOrFocus"],[1,"mouseleave","handleMouseLeaveOrBlur"],[0,"focusout","handleMouseLeaveOrBlur"],[0,"keydown","handleKeyDown"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-bullet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[514,"position-idx"],"theme":[513],"value":[513],"disabled":[516],"isSelected":[516,"is-selected"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-52961f92.js';
|
|
2
2
|
|
|
3
3
|
// This icon file is generated automatically.
|
|
4
4
|
var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
|
|
@@ -382,32 +382,29 @@ const bulletMap = {
|
|
|
382
382
|
'2': '2'
|
|
383
383
|
};
|
|
384
384
|
function parseBulletNumber(numberArr) {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
value: bulletMap[key]
|
|
390
|
-
});
|
|
391
|
-
});
|
|
392
|
-
return bulletArr;
|
|
385
|
+
return numberArr.map((v, index) => ({
|
|
386
|
+
isSelected: v === 1,
|
|
387
|
+
value: bulletMap[index]
|
|
388
|
+
}));
|
|
393
389
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
390
|
+
const outcomeIndexMap = {
|
|
391
|
+
H: 0,
|
|
392
|
+
D: 1,
|
|
393
|
+
A: 2
|
|
394
|
+
};
|
|
395
|
+
const parseEachLineNumber = (outcomes) => {
|
|
396
|
+
const res = outcomes.map((matchOutcomes) => {
|
|
397
|
+
const selected = matchOutcomes[0];
|
|
398
|
+
const result = [0, 0, 0];
|
|
399
|
+
selected.forEach((outcome) => {
|
|
400
|
+
const idx = outcomeIndexMap[outcome];
|
|
401
|
+
if (idx !== undefined)
|
|
402
|
+
result[idx] = 1;
|
|
403
|
+
});
|
|
404
|
+
return parseBulletNumber(result);
|
|
408
405
|
});
|
|
409
|
-
return
|
|
410
|
-
}
|
|
406
|
+
return res;
|
|
407
|
+
};
|
|
411
408
|
function thousandSeperator(value) {
|
|
412
409
|
if (value === 0) {
|
|
413
410
|
return '0';
|
|
@@ -437,7 +434,17 @@ async function fetchGameInfo(endpoint, gameId) {
|
|
|
437
434
|
}
|
|
438
435
|
}
|
|
439
436
|
|
|
440
|
-
|
|
437
|
+
async function fetchSaleStatistics({ endpoint, gameId, drawId }) {
|
|
438
|
+
try {
|
|
439
|
+
const res = await fetchRequest(`${endpoint}/games/${gameId}/draws/${drawId}/saleStatistics`);
|
|
440
|
+
return res;
|
|
441
|
+
}
|
|
442
|
+
catch (error) {
|
|
443
|
+
return Promise.reject(error);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
const lotteryTippingLatestResultCss = ".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\n\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .loading-wrap {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}";
|
|
441
448
|
const LotteryTippingLatestResultStyle0 = lotteryTippingLatestResultCss;
|
|
442
449
|
|
|
443
450
|
const leftArrowIcon = renderIconDefinitionToSVGElement(LeftOutlined$1, {
|
|
@@ -455,7 +462,6 @@ const LotteryTippingLatestResult = class {
|
|
|
455
462
|
this.translationUrl = '';
|
|
456
463
|
this.language = 'en';
|
|
457
464
|
this.endpoint = undefined;
|
|
458
|
-
this.endpointTicket = undefined;
|
|
459
465
|
this.gameId = undefined;
|
|
460
466
|
this.playerId = undefined;
|
|
461
467
|
this.sessionId = undefined;
|
|
@@ -470,10 +476,11 @@ const LotteryTippingLatestResult = class {
|
|
|
470
476
|
this.curPrizes = undefined;
|
|
471
477
|
this.curPrizeMap = {};
|
|
472
478
|
this.curTurnOver = 0;
|
|
473
|
-
this.isLoading =
|
|
479
|
+
this.isLoading = true;
|
|
474
480
|
this.playTypes = null;
|
|
475
481
|
this.bettingTypes = undefined;
|
|
476
482
|
this.vendorGameId = undefined;
|
|
483
|
+
this.isLoadingTurnover = false;
|
|
477
484
|
}
|
|
478
485
|
handleClientStylingChange(newValue, oldValue) {
|
|
479
486
|
if (newValue != oldValue) {
|
|
@@ -494,8 +501,20 @@ const LotteryTippingLatestResult = class {
|
|
|
494
501
|
if (this.translationUrl) {
|
|
495
502
|
getTranslations(JSON.parse(this.translationUrl));
|
|
496
503
|
}
|
|
497
|
-
this.
|
|
498
|
-
|
|
504
|
+
this.initData();
|
|
505
|
+
}
|
|
506
|
+
async initData() {
|
|
507
|
+
try {
|
|
508
|
+
this.isLoading = true;
|
|
509
|
+
await Promise.all([this.getGameById(), this.fetDrawList()]);
|
|
510
|
+
this.getTurnOver();
|
|
511
|
+
}
|
|
512
|
+
catch (e) {
|
|
513
|
+
console.error(e);
|
|
514
|
+
}
|
|
515
|
+
finally {
|
|
516
|
+
this.isLoading = false;
|
|
517
|
+
}
|
|
499
518
|
}
|
|
500
519
|
componentDidLoad() {
|
|
501
520
|
if (this.stylingContainer) {
|
|
@@ -513,7 +532,6 @@ const LotteryTippingLatestResult = class {
|
|
|
513
532
|
async getGameById() {
|
|
514
533
|
var _a, _b, _c, _d;
|
|
515
534
|
try {
|
|
516
|
-
this.isLoading = true;
|
|
517
535
|
const gameInfo = await fetchGameInfo(this.endpoint, this.gameId);
|
|
518
536
|
this.vendorGameId = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.type;
|
|
519
537
|
this.playTypes = (_b = (_a = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.rules) === null || _a === void 0 ? void 0 : _a.poolGame) === null || _b === void 0 ? void 0 : _b.playTypes;
|
|
@@ -522,9 +540,6 @@ const LotteryTippingLatestResult = class {
|
|
|
522
540
|
catch (e) {
|
|
523
541
|
console.log(e);
|
|
524
542
|
}
|
|
525
|
-
finally {
|
|
526
|
-
this.isLoading = false;
|
|
527
|
-
}
|
|
528
543
|
}
|
|
529
544
|
findLatestDateIdx(dateArr) {
|
|
530
545
|
const currentDate = new Date();
|
|
@@ -542,7 +557,6 @@ const LotteryTippingLatestResult = class {
|
|
|
542
557
|
}
|
|
543
558
|
async fetDrawList() {
|
|
544
559
|
try {
|
|
545
|
-
this.isLoading = true;
|
|
546
560
|
const GAME_DRAW_LIMIT = 9999;
|
|
547
561
|
const filterData = { status: 'PAYABLE', limit: GAME_DRAW_LIMIT };
|
|
548
562
|
const { items } = await fetchRequest(`${this.endpoint}/games/${this.gameId}/draws${toQueryParams(filterData)}`, 'GET');
|
|
@@ -558,7 +572,7 @@ const LotteryTippingLatestResult = class {
|
|
|
558
572
|
this.curDrawItem = filteredItems[this.curDrawItemIdx];
|
|
559
573
|
this.curDrawSelectionBettingType = filteredItems[this.curDrawItemIdx].winningNumbers[0].winning_type;
|
|
560
574
|
this.curDrawItem.winningNumbers.forEach((item) => {
|
|
561
|
-
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.
|
|
575
|
+
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.poolGameOutcomes)];
|
|
562
576
|
});
|
|
563
577
|
this.curDrawItem.prizes.forEach((prize) => {
|
|
564
578
|
const winningType = prize.winningType;
|
|
@@ -572,14 +586,10 @@ const LotteryTippingLatestResult = class {
|
|
|
572
586
|
});
|
|
573
587
|
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
574
588
|
this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
|
|
575
|
-
this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
|
|
576
589
|
}
|
|
577
590
|
catch (e) {
|
|
578
591
|
console.log(e);
|
|
579
592
|
}
|
|
580
|
-
finally {
|
|
581
|
-
this.isLoading = false;
|
|
582
|
-
}
|
|
583
593
|
}
|
|
584
594
|
get displayedPrizes() {
|
|
585
595
|
const correctItems = this.curPrizes
|
|
@@ -598,7 +608,7 @@ const LotteryTippingLatestResult = class {
|
|
|
598
608
|
this.curDrawItem = this.drawList[idx];
|
|
599
609
|
this.curDrawSelectionBettingType = this.curDrawItem.winningNumbers[0].winning_type;
|
|
600
610
|
this.curDrawItem.winningNumbers.forEach((item) => {
|
|
601
|
-
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.
|
|
611
|
+
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.poolGameOutcomes)];
|
|
602
612
|
});
|
|
603
613
|
this.curPrizeMap = {};
|
|
604
614
|
this.curDrawItem.prizes.forEach((prize) => {
|
|
@@ -613,7 +623,7 @@ const LotteryTippingLatestResult = class {
|
|
|
613
623
|
});
|
|
614
624
|
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
615
625
|
this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
|
|
616
|
-
this.
|
|
626
|
+
this.getTurnOver();
|
|
617
627
|
}
|
|
618
628
|
handleChangeDate(e) {
|
|
619
629
|
const idx = e.detail;
|
|
@@ -629,12 +639,31 @@ const LotteryTippingLatestResult = class {
|
|
|
629
639
|
this.changeCurDateItem(++this.curDrawItemIdx);
|
|
630
640
|
}
|
|
631
641
|
}
|
|
642
|
+
async getTurnOver() {
|
|
643
|
+
var _a, _b, _c;
|
|
644
|
+
if (!((_a = this.curDrawItem) === null || _a === void 0 ? void 0 : _a.id))
|
|
645
|
+
return;
|
|
646
|
+
try {
|
|
647
|
+
this.isLoadingTurnover = true;
|
|
648
|
+
const res = await fetchSaleStatistics({
|
|
649
|
+
endpoint: this.endpoint,
|
|
650
|
+
gameId: this.vendorGameId,
|
|
651
|
+
drawId: this.curDrawItem.id
|
|
652
|
+
});
|
|
653
|
+
this.curTurnOver = (_c = (_b = res === null || res === void 0 ? void 0 : res.wagerSegment) === null || _b === void 0 ? void 0 : _b.totalSalesCrossDraw) !== null && _c !== void 0 ? _c : 0;
|
|
654
|
+
}
|
|
655
|
+
catch (e) {
|
|
656
|
+
console.error(e);
|
|
657
|
+
}
|
|
658
|
+
finally {
|
|
659
|
+
this.isLoadingTurnover = false;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
632
662
|
handleDrawBettingTypeChange(bettingType) {
|
|
633
663
|
this.curDrawSelectionBettingType = bettingType;
|
|
634
664
|
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
635
665
|
this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
|
|
636
|
-
|
|
637
|
-
this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
|
|
666
|
+
this.getTurnOver();
|
|
638
667
|
}
|
|
639
668
|
getBettingTypeName(bettingType) {
|
|
640
669
|
var _a, _b;
|
|
@@ -642,10 +671,10 @@ const LotteryTippingLatestResult = class {
|
|
|
642
671
|
return name !== null && name !== void 0 ? name : bettingType;
|
|
643
672
|
}
|
|
644
673
|
render() {
|
|
645
|
-
return (h("div", { key: '
|
|
674
|
+
return (h("div", { key: 'e104fc35ddcdaad1e461bcc867f779dc90254bc6', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (h("div", { key: '085e418338a52262e8866f300be8e67f4d3bbfc7', class: "result-wrapper" }, h("div", { key: '7cf61f06f845fb6aabe53896163fa402b1e52a26', class: "date-selection" }, h("div", { key: 'da4abd68318c454324a665f6e02257dda4f224be', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), h("div", { key: '938f8f160c10eae2678dc7a98027a3421409f096', class: "date-selection-calendar" }, h("lottery-tipping-calendar", { key: 'c8048c6977b3740b8d2e0e7eff3292c329cdc4be', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), h("div", { key: 'eb17af80ec1b1c38f9d51b878013477290c824d7', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), h("div", { key: 'ab7ad2efffe5f9437db6a77b0b0c60e3d9454c5e', class: "winning-result" }, h("div", { key: 'e6a7ae5ba4c6c967858bb6e4e9a7a75246ec86f2', class: "betting-type" }, h("div", { key: '341e5ee07c3e588b154d3a73373bed40a8e51a90', class: "betting-type-title" }, translate('bettingType', this.language)), h("div", { key: 'f824ded5140f92aee54748939fecb5aac692cd6f', class: "betting-type-text" }, h("div", { key: '85cb8c0a387b378b36f05af6703c023d9b0819f9', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (h("button", { class: {
|
|
646
675
|
LotteryTippingTicketController__segment: true,
|
|
647
676
|
'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
|
|
648
|
-
}, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '
|
|
677
|
+
}, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), h("lottery-tipping-ticket-bet", { key: '06293a063a9ac5f0f59ab8ec9033df764eadd511', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.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, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), this.isLoadingTurnover ? (h("div", { class: "loading-wrap" }, h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (h("div", { class: "prize-result" }, h("div", { class: "prize-result-title" }, translate('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), h("div", { class: "prize-result-table" }, h("div", { class: "prize-result-table-header" }, h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, translate('prizes', this.language)), h("div", { class: "prize-result-table-column" }, translate('numberOfWinners', this.language)), h("div", { class: "prize-result-table-column" }, translate('prizeMoney', this.language)))), h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (h("div", { class: "prize-result-table-row" }, h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), h("div", { class: "prize-result-table-column" }, prize.players), h("div", { class: "prize-result-table-column" }, thousandSeperator(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (h("div", { key: '9aa470442a1f2b4600d0f7727210e71cebf934c8' }, translate('noLatestResult', this.language))), this.isLoading && h("div", { key: '4568a1cda8eca35552d84075fbc4507d397e3178', class: "loading-wrap" }, translate('loading', this.language))));
|
|
649
678
|
}
|
|
650
679
|
static get watchers() { return {
|
|
651
680
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-52961f92.js';
|
|
2
|
+
export { s as setNonce } from './index-52961f92.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["general-
|
|
19
|
+
return bootstrapLazy([["general-tooltip_7",[[1,"lottery-tipping-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[1537,"game-id"],"playerId":[1538,"player-id"],"sessionId":[1537,"session-id"],"hasDrawDates":[32],"lastestDate":[32],"drawList":[32],"curDrawItem":[32],"curDrawItemIdx":[32],"curDrawSelection":[32],"curDrawSelectionBettingType":[32],"curDrawSelectionMap":[32],"curPrizes":[32],"curPrizeMap":[32],"curTurnOver":[32],"isLoading":[32],"playTypes":[32],"bettingTypes":[32],"vendorGameId":[32],"isLoadingTurnover":[32]},[[0,"changeDate","handleChangeDate"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-bet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"totalPages":[1538,"total-pages"],"minTotalPages":[514,"min-total-pages"],"maxTotalPages":[514,"max-total-pages"],"mode":[513],"readPretty":[516,"read-pretty"],"defaultBulletConfigLineGroup":[513,"default-bullet-config-line-group"],"translationData":[32],"clientStylingUrlContent":[32],"bulletConfigLineGroup":[32],"currentPage":[32],"isLoading":[32],"hasErrors":[32],"dialogConfig":[32],"ticketDataSource":[32],"resetBulletConfig":[64],"getData":[64]},[[0,"lotteryTippingBulletGroupToggle","lotteryTippingBulletGroupSelectionHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"sessionId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultBulletConfigLineGroup":["fetchMatchData"],"currentPage":["handleCurrentPageChange"]}],[1,"lottery-tipping-calendar",{"date":[1],"highLightDates":[16],"language":[513],"translationUrl":[520,"translation-url"],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"date":["handleDateChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-tipping-bullet-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[513,"position-idx"],"theme":[513],"mode":[513],"bulletConfigContent":[513,"bullet-config-content"]},[[0,"lotteryTippingBulletToggle","lotteryTippingBulletSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"general-tooltip",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"position":[1],"delay":[2],"isVisible":[32],"_tooltipId":[32]},[[1,"mouseenter","handleMouseEnterOrFocus"],[0,"focusin","handleMouseEnterOrFocus"],[1,"mouseleave","handleMouseLeaveOrBlur"],[0,"focusout","handleMouseLeaveOrBlur"],[0,"keydown","handleKeyDown"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-bullet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[514,"position-idx"],"theme":[513],"value":[513],"disabled":[516],"isSelected":[516,"is-selected"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
|
|
20
20
|
});
|