@everymatrix/lottery-tipping-ticket-controller 1.85.17 → 1.85.18
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 +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{lottery-tipping-ticket-controller-1e79780d.js → lottery-tipping-ticket-controller-0ac12c3a.js} +2 -0
- package/dist/esm/general-tooltip_7.entry.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{lottery-tipping-ticket-controller-e914932b.js → lottery-tipping-ticket-controller-d705ad02.js} +2 -0
- package/dist/lottery-tipping-ticket-controller/general-tooltip_7.entry.js +1 -1
- package/dist/lottery-tipping-ticket-controller/index.esm.js +1 -1
- package/dist/lottery-tipping-ticket-controller/{lottery-tipping-ticket-controller-e914932b.js → lottery-tipping-ticket-controller-d705ad02.js} +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3e1fe885.js');
|
|
6
|
-
const lotteryTippingTicketController = require('./lottery-tipping-ticket-controller-
|
|
6
|
+
const lotteryTippingTicketController = require('./lottery-tipping-ticket-controller-0ac12c3a.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @name startOfDay
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const lotteryTippingTicketController = require('./lottery-tipping-ticket-controller-
|
|
5
|
+
const lotteryTippingTicketController = require('./lottery-tipping-ticket-controller-0ac12c3a.js');
|
|
6
6
|
require('./index-3e1fe885.js');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -23,6 +23,8 @@ function setClientStyling(stylingContainer, clientStyling) {
|
|
|
23
23
|
* @param {string} clientStylingUrl The URL of the style content
|
|
24
24
|
*/
|
|
25
25
|
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
26
|
+
if (!stylingContainer || !clientStylingUrl) return;
|
|
27
|
+
|
|
26
28
|
const url = new URL(clientStylingUrl);
|
|
27
29
|
|
|
28
30
|
fetch(url.href)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement, c as createEvent } from './index-e3ec645c.js';
|
|
2
|
-
import { r as requiredArgs, t as toDate, s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, f as formatDate$1, c as resolveTranslationUrl$1, p as parseISO, d as format } from './lottery-tipping-ticket-controller-
|
|
3
|
-
export { L as lottery_tipping_ticket_controller } from './lottery-tipping-ticket-controller-
|
|
2
|
+
import { r as requiredArgs, t as toDate, s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, f as formatDate$1, c as resolveTranslationUrl$1, p as parseISO, d as format } from './lottery-tipping-ticket-controller-d705ad02.js';
|
|
3
|
+
export { L as lottery_tipping_ticket_controller } from './lottery-tipping-ticket-controller-d705ad02.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @name startOfDay
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { L as LotteryTippingTicketController } from './lottery-tipping-ticket-controller-
|
|
1
|
+
export { L as LotteryTippingTicketController } from './lottery-tipping-ticket-controller-d705ad02.js';
|
|
2
2
|
import './index-e3ec645c.js';
|
|
@@ -21,6 +21,8 @@ function setClientStyling(stylingContainer, clientStyling) {
|
|
|
21
21
|
* @param {string} clientStylingUrl The URL of the style content
|
|
22
22
|
*/
|
|
23
23
|
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
24
|
+
if (!stylingContainer || !clientStylingUrl) return;
|
|
25
|
+
|
|
24
26
|
const url = new URL(clientStylingUrl);
|
|
25
27
|
|
|
26
28
|
fetch(url.href)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,g as n,c as i}from"./index-e3ec645c.js";import{r,t as o,s as a,a as s,b as l,f as c,c as d,p as h,d as p}from"./lottery-tipping-ticket-controller-e914932b.js";export{L as lottery_tipping_ticket_controller}from"./lottery-tipping-ticket-controller-e914932b.js";function g(t){r(1,arguments);var e=o(t);return e.setHours(0,0,0,0),e}const m=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return e("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},e("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),e("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},e("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},e("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),e("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return n(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};m.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);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}";const f=["ro","en","fr","ar","hr","zh"],b={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},u=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const n=e.getBoundingClientRect(),i=Math.max(n.width,n.height),r={top:t.clientY-n.top-i/2,left:t.clientX-n.left-i/2,size:i};this.ripples=[...this.ripples,r],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==r))}),600)},this.variant="primary",this.size="medium",this.disabled=!1,this.loading=!1,this.text=void 0,this.mbSource=void 0,this.language="en",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.ripples=[]}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const i=await n.json();e=i,Object.keys(e).forEach((t=>{for(let n in e[t])b[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}render(){const{variant:t,disabled:n,size:i}=this,r=n||this.loading;return e("button",{key:"19094b8ffd0d13c7e3cdc7139d559214803f0e73",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${i}`]:!0,"btn--loading":this.loading},disabled:r,onClick:this.handleClick},this.loading?e("div",{class:"loading-container"},e("span",{class:"content"},this.text||(()=>{const t=this.language;let e=b[void 0!==t&&f.includes(t)?t:"en"].loading;return e})()),e("span",{class:"spinner"})):e("span",{class:"content"},this.text),e("div",{key:"e7e7542f0b79c5bf8e41969e23dd77d9fdec4462",class:"ripple-container"},this.ripples.map(((t,n)=>e("span",{key:n,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return n(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};u.style=':host{display:inline-block;font-family:"PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif}.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:6px;font-weight:500;cursor:pointer;outline:none;overflow:hidden;transition:background-color 0.2s, border-color 0.2s, color 0.2s;user-select:none;-webkit-tap-highlight-color:transparent}.btn .content{position:relative}.btn:disabled{cursor:not-allowed;opacity:0.5}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:2px solid rgba(255, 255, 255, 0.3);border-radius:50%;border-top-color:white;animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:#08104a}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:rgba(0, 0, 0, 0.2)}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:#dcdcdc;color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:#a6a6a6}.btn--outline:active:not(:disabled){background-color:#e6e6e6}.btn--dashed{background-color:transparent;border-style:dashed;border-color:#dcdcdc;color:#333}.btn--dashed:hover:not(:disabled){border-color:#a6a6a6;color:#0052d9}.btn--text{background-color:transparent;color:#0052d9;border-color:transparent}.btn--text:hover:not(:disabled){background-color:#f2f2f2}.btn--text:active:not(:disabled){background-color:#e6e6e6}.btn--small{height:28px;font-size:12px;padding:0 12px}.btn--medium{height:34px;font-size:14px;padding:0 18px}.btn--large{height:40px;font-size:16px;padding:0 24px}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:rgba(255, 255, 255, 0.3);transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:rgba(0, 0, 0, 0.1)}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}';const y=class{constructor(e){t(this,e),this.lotteryTippingBulletToggleEvent=i(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?e("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):e("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};y.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const v=class{constructor(e){t(this,e),this.lotteryTippingBulletGroupToggleEvent=i(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return e("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},e("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,n)=>e("div",{key:n},e("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":n,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};v.style="";const w=["ro","en","fr","ar","hr"],x={en:{stop:"Stop",at:"at",turnover:"Turnover: "},ro:{stop:"Oprește",at:"la"},fr:{stop:"Arrêtez",at:"à"},ar:{stop:"توقف",at:"في"},hr:{stop:"Stop",at:"u"}},k=(t,e)=>{const n=e;return x[void 0!==n&&w.includes(n)?n:"en"][t]},C=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.logoUrl=void 0,this.stopTime="",this.period=void 0,this.formattedTurnover=void 0}get formattedStopTime(){let t="";return this.stopTime?(t=c({date:this.stopTime,format:"dd/MM/yyyy HH:mm"}),function(t){return r(1,arguments),function(t,e){r(2,arguments);var n=g(t),i=g(e);return n.getTime()===i.getTime()}(t,Date.now())}(new Date(this.stopTime))&&(t=c({date:this.stopTime,format:"HH:mm"})),t):t}get formattedPeriod(){let t="";return t=c({date:this.period,format:"EEEE"}),"wednesday"===t.toLowerCase()&&(t="MIDWEEK"),t.toUpperCase()}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}async componentWillLoad(){this.translationUrl&&d(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"e9286d0a6a9433698703b9c04d6d50892a7b3168",ref:t=>this.stylingContainer=t,class:"lottery-tipping-ticket-banner__container"},e("section",{key:"d787e64156f76cf6d12bd552513971301534860c",class:"banner"},e("div",{key:"027baf0c88733d1430801c96b5b338f79f92f22c",class:"left"},this.logoUrl&&e("img",{key:"7b41d5635a2121ccf394aca19de48e10e9a93357",alt:"Betting",src:this.logoUrl,class:"logo"})),e("div",{key:"73e6c3ffa336b020a3819a72b71117b8084381b1",class:"mid period"},this.formattedPeriod),e("div",{key:"922ae894814157f68aa8f0774c8aa5ca06e1e7cd",class:"right"},e("span",{key:"efaf79b1ff5617f2ba92cfef464232041cd87fbf",class:"pill"},e("strong",{key:"c842562b15a13407038933da9d1cc7c6fafa0b76"},k("stop",this.language))," ",k("at",this.language)," ",this.formattedStopTime),e("span",{key:"3e79a5ec17cbcf0896d58196286fa0b637988f69",class:"pill"},e("strong",{key:"1158b00abffb1c6bf04e9eec10b4c996d04f118e"},k("turnover",this.language))," ",this.formattedTurnover))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};C.style=".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 1rem;\n background: var(--emw--color-primary, #fed275);\n border-top: 2px solid var(--emw--color-primary, #fed275);\n border-bottom: 2px solid var(--emw--color-primary, #fed275);\n gap: 0.5rem;\n white-space: nowrap;\n position: relative;\n height: 46px;\n}\n\n.left {\n flex: 1;\n gap: 0.4rem;\n}\n.left .logo {\n width: 216px;\n position: absolute;\n top: -7px;\n}\n\n.brand {\n font-weight: 700;\n color: var(--emw--color-typography, #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-typography, #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 padding: 0.25rem 0.7rem;\n font-size: 0.9rem;\n color: var(--emw--color-gray-400, #000);\n display: inline-flex;\n align-items: baseline;\n}\n\n.pill > strong {\n font-weight: 700;\n}";const T=["ro","en","fr","ar","hr"],_={en:{homeTeam:"Home team:",awayTeam:"Away team:",selectionCleared:"Your selection has been cleared.",selectionOnLineCleared:"Your selection on this line will be cleared.",loading:"Loading...",error:"Error!",noData:"No data available.",lineInfo:"Line {currentPage} of {totalPages}",clearAll:"Clear All",cancel:"Cancel",confirm:"Confirm"},ro:{homeTeam:"Echipa gazdă:",awayTeam:"Echipa oaspete:",selectionCleared:"Selecția dvs. a fost ștearsă.",selectionOnLineCleared:"Selecția dvs. de pe această linie va fi ștearsă.",loading:"Se încarcă...',n error: 'Eroare!",noData:"Nu sunt date disponibile.",lineInfo:"Linia {currentPage} din {totalPages}",clearAll:"Șterge tot",cancel:"Anulează",confirm:"Confirmă"},fr:{homeTeam:"Équipe à domicile:",awayTeam:"Équipe à l'extérieur:",selectionCleared:"Votre sélection a été effacée.",selectionOnLineCleared:"Votre sélection sur cette ligne sera effacée.",loading:"Chargement...',n error: 'Erreur!",noData:"Aucune donnée disponible.",lineInfo:"Ligne {currentPage} sur {totalPages}",clearAll:"Tout effacer",cancel:"Annuler",confirm:"Confirmer"},ar:{homeTeam:"الفريق المضيف:",awayTeam:"الفريق الضيف:",selectionCleared:"تم مسح اختيارك.",selectionOnLineCleared:"سيتم مسح اختيارك في هذا السطر.",loading:"جار التحميل...',n error: 'خطأ!",noData:"لا توجد بيانات متاحة.",lineInfo:"السطر {currentPage} من {totalPages}",clearAll:"مسح الكل",cancel:"إلغاء",confirm:"تأكيد"},hr:{homeTeam:"Domaći tim:",awayTeam:"Gostujući tim:",selectionCleared:"Vaš odabir je obrisan.",selectionOnLineCleared:"Vaš odabir na ovoj liniji bit će obrisan.",loading:"Učitavanje...',n error: 'Greška!",noData:"Nema dostupnih podataka.",lineInfo:"Linija {currentPage} od {totalPages}",clearAll:"Očisti sve",cancel:"Odustani",confirm:"Potvrdi"}},S=(t,e,n)=>{const i=e;let r=_[void 0!==i&&T.includes(i)?i:"en"][t];return n&&Object.keys(n).forEach((t=>{r=r.replace(`{${t}}`,n[t])})),r},B=t=>{Object.keys(t).forEach((e=>{for(let n in t[e])_[e][n]=t[e][n]}))},O=[{value:"1"},{value:"X"},{value:"2"}];var j=function(){return j=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},j.apply(this,arguments)},M={primaryColor:"#333",secondaryColor:"#E6E6E6"};function z(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var n=e.placeholders||M;return H(t.icon(n.primaryColor,n.secondaryColor),e)}return H(t.icon,e)}function H(t,e){var n="svg"===t.tag?j(j({},t.attrs),e.extraSVGAttrs||{}):t.attrs,i=Object.keys(n).reduce((function(t,e){var i=n[e],r="".concat(e,'="').concat(i,'"');return t.push(r),t}),[]),r=i.length?" "+i.join(" "):"",o=(t.children||[]).map((function(t){return H(t,e)})).join("");return o&&o.length?"<".concat(t.tag).concat(r,">").concat(o,"</").concat(t.tag,">"):"<".concat(t.tag).concat(r," />")}const A=z({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),D=z({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),P=z({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),$=z({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"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),X=z({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),E=class{constructor(n){t(this,n),this.lotteryTippingBulletBetEvent=i(this,"lotteryTippingBulletBetSelect",7),this.lotteryTippingCurrentPageChangeEvent=i(this,"lotteryTippingCurrentPageChange",7),this.eventNameRender=(t,n)=>e("div",{class:"flex gap-1 eventNameContainer__item"},e("span",{class:"eventNameContainer__item--title"},n),e("general-tooltip",null,e("span",{slot:"trigger",class:"icon info-icon",innerHTML:P,style:{width:"18px"}}),e("div",{slot:"content"},e("div",{class:"match-info"},e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},S("homeTeam",this.language)),e("div",{class:"match-info-item-value"},t.homeName)),e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},S("awayTeam",this.language)),e("div",{class:"match-info-item-value"},t.awayName)))))),this.columns=[{title:"",value:"index",width:3},{title:"",value:"eventName",width:70,render:this.eventNameRender},{title:"",value:"startTime",width:22,align:"right",nowrap:!0,render:(t,e)=>(({date:t,type:e="date",format:n})=>{try{const i=h(t);if(isNaN(i.getTime()))throw new Error(`Invalid date: ${t}`);if(n)return p(i,n);let r="dd/MM/yyyy";return"time"===e?r="dd/MM/yyyy HH:mm:ss":"week"===e&&(r="ccc dd/MM/yyyy HH:mm:ss"),p(i,r)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>e("lottery-tipping-bullet-group",{theme:"text",bulletConfigContent:JSON.stringify(O)}),value:"results",width:5,render:(t,n,i)=>{var r,o;return e("lottery-tipping-bullet-group",{mode:this.mode,bulletConfigContent:JSON.stringify(null===(o=null===(r=this.bulletConfigLineGroup)||void 0===r?void 0:r[this.currentPage-1])||void 0===o?void 0:o[i]),"position-idx":`${this.currentPage-1}-${i}`})}}],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.translationData=void 0,this.clientStylingUrlContent="",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.totalPages=void 0,this.minTotalPages=0,this.maxTotalPages=0,this.mode="multi",this.readPretty=!1,this.defaultBulletConfigLineGroup=void 0,this.bulletConfigLineGroup=[[[]]],this.currentPage=1,this.isLoading=!0,this.hasErrors=!1,this.dialogConfig={visible:!1},this.ticketDataSource=[]}handleNewTranslations(){this.isLoading=!0,B(JSON.parse(this.translationUrl)),this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&B(JSON.parse(this.translationUrl))}componentDidLoad(){console.log(111,this.stylingContainer),this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}get parsedDefaultBulletConfigLineGroup(){if("string"==typeof this.defaultBulletConfigLineGroup&&this.defaultBulletConfigLineGroup)try{const t=JSON.parse(this.defaultBulletConfigLineGroup);return this.readPrettyHandler(t)}catch(t){return void console.error("Error parsing defaultBulletConfigLineGroup:",t)}}readPrettyHandler(t){return this.readPretty?(this.currentPage=1,this.minTotalPages=1,this.maxTotalPages=this.totalPages,null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>Object.assign(Object.assign({},t),{disabled:!0})))))))):t}initLineForBulletConfig(){var t;return Array.from({length:null===(t=this.ticketDataSource)||void 0===t?void 0:t.length},(()=>[...O]))}_resetBulletConfig(){this.bulletConfigLineGroup=Array.from({length:this.totalPages}).map(this.initLineForBulletConfig.bind(this))}fetchMatchData(){let t=new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}/findDrawEvents`);this.gameId&&this.drawId&&(this.isLoading=!0,(t=>fetch(t).then((t=>t.json())))(t.href).then((t=>{this.ticketDataSource=t||[],this.isLoading=!1,this.updateBulletConfigLineGroup()})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)})))}updateBulletConfigLineGroup(){this.parsedDefaultBulletConfigLineGroup&&this.parsedDefaultBulletConfigLineGroup.length>0?this.bulletConfigLineGroup=this.parsedDefaultBulletConfigLineGroup:this._resetBulletConfig()}connectedCallback(){this.fetchMatchData()}handleClearAll(){this._resetBulletConfig(),(({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})})({message:S("selectionCleared",this.language)}),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}async resetBulletConfig({minLineNumber:t,maxLineNumber:e,defaultBoards:n}){this.totalPages=n,this.minTotalPages=t,this.maxTotalPages=e,this.currentPage=1,this._resetBulletConfig(),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}lotteryTippingBulletGroupSelectionHandler(t){const{bulletConfigArr:e,positionIdx:n}=t.detail,[i,r]=n.split("-");this.bulletConfigLineGroup[i][r]=e,this.bulletConfigLineGroup=[...this.bulletConfigLineGroup],this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!0})}async getData(){return await this.validateBulletConfigLineGroup(),this.bulletConfigLineGroup}validateBulletConfigLineGroup(){if("[[[]]]"===JSON.stringify(this.bulletConfigLineGroup))return Promise.resolve(this.bulletConfigLineGroup);const t=this.bulletConfigLineGroup.length;return t!==this.totalPages||t<this.minTotalPages||t>this.maxTotalPages?(this._resetBulletConfig(),Promise.reject(new Error("Invalid bullet config line group length"))):Promise.resolve(this.bulletConfigLineGroup)}prevPage(){this.swapCard("prev",(()=>{this.currentPage>1&&this.currentPage--}))}nextPage(){this.swapCard("next",(()=>{this.currentPage<this.totalPages&&this.currentPage++}))}handleAddLine(){this.swapCard("add",(()=>{this.totalPages<=this.maxTotalPages-1&&(this.bulletConfigLineGroup.push(this.initLineForBulletConfig()),this.totalPages++,this.currentPage++,this.lotteryTippingBulletBetEvent.emit())}))}handleRemoveLine(){(()=>{if(this.totalPages>=this.minTotalPages+1){const t=()=>{this.dialogConfig={visible:!1}},e=()=>{this.bulletConfigLineGroup.splice(this.currentPage-1,1),this.totalPages--,1!==this.currentPage&&this.currentPage--,this.lotteryTippingBulletBetEvent.emit(),this.swapCard("remove",t)};this.dialogConfig={visible:!0,content:S("selectionOnLineCleared",this.language),onConfirm:e,onCancel:t}}})()}swapCard(t,e){const n=this.mainContainer;if(!n)return;const{out:i,in:r}={next:{out:"card-out-left",in:"card-in-left"},prev:{out:"card-out-right",in:"card-in-right"},remove:{out:"card-out-down",in:"card-in-right"},add:{out:"card-out-left",in:"card-in-up"}}[t];n.classList.add(i),n.addEventListener("animationend",(()=>{n.classList.remove(i),e();const t=this.mainContainer;t&&(t.classList.add(r),t.addEventListener("animationend",(()=>t.classList.remove(r)),{once:!0}))}),{once:!0})}handleCurrentPageChange(){this.lotteryTippingCurrentPageChangeEvent.emit({currentPage:this.currentPage})}renderLoading(){return e("div",{class:"loading-wrap"},e("section",{class:"dots-container"},e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"})))}render(){var t,n,i,r;if(this.isLoading)return this.renderLoading();if(this.hasErrors)return e("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},e("p",null,S("error",this.language)));const o=({columns:t,dataSource:n,hideHead:i=!1,grid:r=!0,bordered:o=!0})=>e("table",{class:{bordered:o,grid:r,"my-table-component":!0}},!i&&e("thead",null,e("tr",null,t.map((t=>{var n;return e("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(n=t.title)||void 0===n?void 0:n.call(t))})))),e("tbody",null,n.map(((n,i)=>e("tr",{key:i},t.map((t=>e("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(n,n[t.value],i):n[t.value])))))))),a=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,s=this.totalPages>this.minTotalPages;return 0===this.ticketDataSource.length||0===this.minTotalPages||0===this.maxTotalPages?e("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},e("div",{class:"LotteryTippingTicketBet__empty"},e("p",null,S("noData",this.language)))):this.readPretty?e("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},e("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e(o,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),this.totalPages>1&&e("div",null,e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,S("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},e("span",{class:"icon",innerHTML:$})),e("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},e("span",{class:"icon",innerHTML:X})))))))):e("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},e("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},e("button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(a||s)},onClick:this.handleClearAll.bind(this)},S("clearAll",this.language))),e("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e(o,{columns:this.columns,dataSource:(null===(n=this.ticketDataSource)||void 0===n?void 0:n.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),(a||s)&&e("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},a&&e("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleAddLine.bind(this)},e("span",{class:"icon",innerHTML:A})),s&&e("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleRemoveLine.bind(this)},e("span",{class:"icon",innerHTML:D})))),e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,S("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},e("span",{class:"icon",innerHTML:$})),e("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},e("span",{class:"icon",innerHTML:X}))))),this.dialogConfig.visible&&e("vaadin-confirm-dialog",{rejectButtonVisible:!0,rejectText:S("cancel",this.language),confirmText:S("confirm",this.language),opened:null===(i=this.dialogConfig)||void 0===i?void 0:i.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(r=this.dialogConfig)||void 0===r?void 0:r.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],sessionId:["fetchMatchData"],drawId:["fetchMatchData"],defaultBulletConfigLineGroup:["fetchMatchData"],currentPage:["handleCurrentPageChange"]}}};E.style=".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-typography, #000);\n background: var(--emw--color-background, #fff);\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: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #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-typography, #000);\n background: var(--emw--color-background, #fff);\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-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #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 color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\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 color: var(--emw--color-typography, #000);\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-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n border-radius: 8px;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item: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.LotteryTippingTicketBet__lineOperatorGroup--item .icon {\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 .icon {\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-background-secondary, #f5f5f5);\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-typography-secondary, #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 transition: all 0.3s ease;\n cursor: pointer;\n opacity: 0.9;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.my-pagination .btn .icon {\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-color: var(--emw--color-background-tertiary, #ccc);\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--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}\n\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40vh;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";export{m as general_tooltip,u as lottery_button,y as lottery_tipping_bullet,v as lottery_tipping_bullet_group,C as lottery_tipping_ticket_banner,E as lottery_tipping_ticket_bet}
|
|
1
|
+
import{r as t,h as e,g as n,c as i}from"./index-e3ec645c.js";import{r,t as a,s as o,a as s,b as l,f as c,c as d,p as h,d as p}from"./lottery-tipping-ticket-controller-d705ad02.js";export{L as lottery_tipping_ticket_controller}from"./lottery-tipping-ticket-controller-d705ad02.js";function g(t){r(1,arguments);var e=a(t);return e.setHours(0,0,0,0),e}const m=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return e("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},e("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),e("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},e("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},e("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),e("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return n(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};m.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);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}";const f=["ro","en","fr","ar","hr","zh"],b={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},u=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const n=e.getBoundingClientRect(),i=Math.max(n.width,n.height),r={top:t.clientY-n.top-i/2,left:t.clientX-n.left-i/2,size:i};this.ripples=[...this.ripples,r],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==r))}),600)},this.variant="primary",this.size="medium",this.disabled=!1,this.loading=!1,this.text=void 0,this.mbSource=void 0,this.language="en",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.ripples=[]}handleClientStylingChange(t,e){t!=e&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const i=await n.json();e=i,Object.keys(e).forEach((t=>{for(let n in e[t])b[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}render(){const{variant:t,disabled:n,size:i}=this,r=n||this.loading;return e("button",{key:"19094b8ffd0d13c7e3cdc7139d559214803f0e73",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${i}`]:!0,"btn--loading":this.loading},disabled:r,onClick:this.handleClick},this.loading?e("div",{class:"loading-container"},e("span",{class:"content"},this.text||(()=>{const t=this.language;let e=b[void 0!==t&&f.includes(t)?t:"en"].loading;return e})()),e("span",{class:"spinner"})):e("span",{class:"content"},this.text),e("div",{key:"e7e7542f0b79c5bf8e41969e23dd77d9fdec4462",class:"ripple-container"},this.ripples.map(((t,n)=>e("span",{key:n,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return n(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};u.style=':host{display:inline-block;font-family:"PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif}.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:6px;font-weight:500;cursor:pointer;outline:none;overflow:hidden;transition:background-color 0.2s, border-color 0.2s, color 0.2s;user-select:none;-webkit-tap-highlight-color:transparent}.btn .content{position:relative}.btn:disabled{cursor:not-allowed;opacity:0.5}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:2px solid rgba(255, 255, 255, 0.3);border-radius:50%;border-top-color:white;animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:#08104a}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:rgba(0, 0, 0, 0.2)}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:#dcdcdc;color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:#a6a6a6}.btn--outline:active:not(:disabled){background-color:#e6e6e6}.btn--dashed{background-color:transparent;border-style:dashed;border-color:#dcdcdc;color:#333}.btn--dashed:hover:not(:disabled){border-color:#a6a6a6;color:#0052d9}.btn--text{background-color:transparent;color:#0052d9;border-color:transparent}.btn--text:hover:not(:disabled){background-color:#f2f2f2}.btn--text:active:not(:disabled){background-color:#e6e6e6}.btn--small{height:28px;font-size:12px;padding:0 12px}.btn--medium{height:34px;font-size:14px;padding:0 18px}.btn--large{height:40px;font-size:16px;padding:0 24px}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:rgba(255, 255, 255, 0.3);transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:rgba(0, 0, 0, 0.1)}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}';const y=class{constructor(e){t(this,e),this.lotteryTippingBulletToggleEvent=i(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?e("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):e("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};y.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const v=class{constructor(e){t(this,e),this.lotteryTippingBulletGroupToggleEvent=i(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return e("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},e("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,n)=>e("div",{key:n},e("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":n,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};v.style="";const w=["ro","en","fr","ar","hr"],x={en:{stop:"Stop",at:"at",turnover:"Turnover: "},ro:{stop:"Oprește",at:"la"},fr:{stop:"Arrêtez",at:"à"},ar:{stop:"توقف",at:"في"},hr:{stop:"Stop",at:"u"}},k=(t,e)=>{const n=e;return x[void 0!==n&&w.includes(n)?n:"en"][t]},C=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.logoUrl=void 0,this.stopTime="",this.period=void 0,this.formattedTurnover=void 0}get formattedStopTime(){let t="";return this.stopTime?(t=c({date:this.stopTime,format:"dd/MM/yyyy HH:mm"}),function(t){return r(1,arguments),function(t,e){r(2,arguments);var n=g(t),i=g(e);return n.getTime()===i.getTime()}(t,Date.now())}(new Date(this.stopTime))&&(t=c({date:this.stopTime,format:"HH:mm"})),t):t}get formattedPeriod(){let t="";return t=c({date:this.period,format:"EEEE"}),"wednesday"===t.toLowerCase()&&(t="MIDWEEK"),t.toUpperCase()}handleClientStylingChange(t,e){t!=e&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}async componentWillLoad(){this.translationUrl&&d(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"e9286d0a6a9433698703b9c04d6d50892a7b3168",ref:t=>this.stylingContainer=t,class:"lottery-tipping-ticket-banner__container"},e("section",{key:"d787e64156f76cf6d12bd552513971301534860c",class:"banner"},e("div",{key:"027baf0c88733d1430801c96b5b338f79f92f22c",class:"left"},this.logoUrl&&e("img",{key:"7b41d5635a2121ccf394aca19de48e10e9a93357",alt:"Betting",src:this.logoUrl,class:"logo"})),e("div",{key:"73e6c3ffa336b020a3819a72b71117b8084381b1",class:"mid period"},this.formattedPeriod),e("div",{key:"922ae894814157f68aa8f0774c8aa5ca06e1e7cd",class:"right"},e("span",{key:"efaf79b1ff5617f2ba92cfef464232041cd87fbf",class:"pill"},e("strong",{key:"c842562b15a13407038933da9d1cc7c6fafa0b76"},k("stop",this.language))," ",k("at",this.language)," ",this.formattedStopTime),e("span",{key:"3e79a5ec17cbcf0896d58196286fa0b637988f69",class:"pill"},e("strong",{key:"1158b00abffb1c6bf04e9eec10b4c996d04f118e"},k("turnover",this.language))," ",this.formattedTurnover))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};C.style=".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 1rem;\n background: var(--emw--color-primary, #fed275);\n border-top: 2px solid var(--emw--color-primary, #fed275);\n border-bottom: 2px solid var(--emw--color-primary, #fed275);\n gap: 0.5rem;\n white-space: nowrap;\n position: relative;\n height: 46px;\n}\n\n.left {\n flex: 1;\n gap: 0.4rem;\n}\n.left .logo {\n width: 216px;\n position: absolute;\n top: -7px;\n}\n\n.brand {\n font-weight: 700;\n color: var(--emw--color-typography, #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-typography, #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 padding: 0.25rem 0.7rem;\n font-size: 0.9rem;\n color: var(--emw--color-gray-400, #000);\n display: inline-flex;\n align-items: baseline;\n}\n\n.pill > strong {\n font-weight: 700;\n}";const T=["ro","en","fr","ar","hr"],_={en:{homeTeam:"Home team:",awayTeam:"Away team:",selectionCleared:"Your selection has been cleared.",selectionOnLineCleared:"Your selection on this line will be cleared.",loading:"Loading...",error:"Error!",noData:"No data available.",lineInfo:"Line {currentPage} of {totalPages}",clearAll:"Clear All",cancel:"Cancel",confirm:"Confirm"},ro:{homeTeam:"Echipa gazdă:",awayTeam:"Echipa oaspete:",selectionCleared:"Selecția dvs. a fost ștearsă.",selectionOnLineCleared:"Selecția dvs. de pe această linie va fi ștearsă.",loading:"Se încarcă...',n error: 'Eroare!",noData:"Nu sunt date disponibile.",lineInfo:"Linia {currentPage} din {totalPages}",clearAll:"Șterge tot",cancel:"Anulează",confirm:"Confirmă"},fr:{homeTeam:"Équipe à domicile:",awayTeam:"Équipe à l'extérieur:",selectionCleared:"Votre sélection a été effacée.",selectionOnLineCleared:"Votre sélection sur cette ligne sera effacée.",loading:"Chargement...',n error: 'Erreur!",noData:"Aucune donnée disponible.",lineInfo:"Ligne {currentPage} sur {totalPages}",clearAll:"Tout effacer",cancel:"Annuler",confirm:"Confirmer"},ar:{homeTeam:"الفريق المضيف:",awayTeam:"الفريق الضيف:",selectionCleared:"تم مسح اختيارك.",selectionOnLineCleared:"سيتم مسح اختيارك في هذا السطر.",loading:"جار التحميل...',n error: 'خطأ!",noData:"لا توجد بيانات متاحة.",lineInfo:"السطر {currentPage} من {totalPages}",clearAll:"مسح الكل",cancel:"إلغاء",confirm:"تأكيد"},hr:{homeTeam:"Domaći tim:",awayTeam:"Gostujući tim:",selectionCleared:"Vaš odabir je obrisan.",selectionOnLineCleared:"Vaš odabir na ovoj liniji bit će obrisan.",loading:"Učitavanje...',n error: 'Greška!",noData:"Nema dostupnih podataka.",lineInfo:"Linija {currentPage} od {totalPages}",clearAll:"Očisti sve",cancel:"Odustani",confirm:"Potvrdi"}},S=(t,e,n)=>{const i=e;let r=_[void 0!==i&&T.includes(i)?i:"en"][t];return n&&Object.keys(n).forEach((t=>{r=r.replace(`{${t}}`,n[t])})),r},B=t=>{Object.keys(t).forEach((e=>{for(let n in t[e])_[e][n]=t[e][n]}))},O=[{value:"1"},{value:"X"},{value:"2"}];var j=function(){return j=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},j.apply(this,arguments)},M={primaryColor:"#333",secondaryColor:"#E6E6E6"};function z(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var n=e.placeholders||M;return H(t.icon(n.primaryColor,n.secondaryColor),e)}return H(t.icon,e)}function H(t,e){var n="svg"===t.tag?j(j({},t.attrs),e.extraSVGAttrs||{}):t.attrs,i=Object.keys(n).reduce((function(t,e){var i=n[e],r="".concat(e,'="').concat(i,'"');return t.push(r),t}),[]),r=i.length?" "+i.join(" "):"",a=(t.children||[]).map((function(t){return H(t,e)})).join("");return a&&a.length?"<".concat(t.tag).concat(r,">").concat(a,"</").concat(t.tag,">"):"<".concat(t.tag).concat(r," />")}const A=z({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),D=z({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),P=z({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:"currentColor"}}),$=z({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"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),X=z({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},{extraSVGAttrs:{width:"20px",height:"20px",fill:"currentColor"}}),E=class{constructor(n){t(this,n),this.lotteryTippingBulletBetEvent=i(this,"lotteryTippingBulletBetSelect",7),this.lotteryTippingCurrentPageChangeEvent=i(this,"lotteryTippingCurrentPageChange",7),this.eventNameRender=(t,n)=>e("div",{class:"flex gap-1 eventNameContainer__item"},e("span",{class:"eventNameContainer__item--title"},n),e("general-tooltip",null,e("span",{slot:"trigger",class:"icon info-icon",innerHTML:P,style:{width:"18px"}}),e("div",{slot:"content"},e("div",{class:"match-info"},e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},S("homeTeam",this.language)),e("div",{class:"match-info-item-value"},t.homeName)),e("div",{class:"match-info-item"},e("div",{class:"match-info-item-label"},S("awayTeam",this.language)),e("div",{class:"match-info-item-value"},t.awayName)))))),this.columns=[{title:"",value:"index",width:3},{title:"",value:"eventName",width:70,render:this.eventNameRender},{title:"",value:"startTime",width:22,align:"right",nowrap:!0,render:(t,e)=>(({date:t,type:e="date",format:n})=>{try{const i=h(t);if(isNaN(i.getTime()))throw new Error(`Invalid date: ${t}`);if(n)return p(i,n);let r="dd/MM/yyyy";return"time"===e?r="dd/MM/yyyy HH:mm:ss":"week"===e&&(r="ccc dd/MM/yyyy HH:mm:ss"),p(i,r)}catch(t){return console.error("Error formatting date:",t.message),""}})({date:e,format:"ccc HH:mm"})},{title:()=>e("lottery-tipping-bullet-group",{theme:"text",bulletConfigContent:JSON.stringify(O)}),value:"results",width:5,render:(t,n,i)=>{var r,a;return e("lottery-tipping-bullet-group",{mode:this.mode,bulletConfigContent:JSON.stringify(null===(a=null===(r=this.bulletConfigLineGroup)||void 0===r?void 0:r[this.currentPage-1])||void 0===a?void 0:a[i]),"position-idx":`${this.currentPage-1}-${i}`})}}],this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.translationData=void 0,this.clientStylingUrlContent="",this.sessionId=void 0,this.endpoint="",this.gameId=void 0,this.drawId=void 0,this.totalPages=void 0,this.minTotalPages=0,this.maxTotalPages=0,this.mode="multi",this.readPretty=!1,this.defaultBulletConfigLineGroup=void 0,this.bulletConfigLineGroup=[[[]]],this.currentPage=1,this.isLoading=!0,this.hasErrors=!1,this.dialogConfig={visible:!1},this.ticketDataSource=[]}handleNewTranslations(){this.isLoading=!0,B(JSON.parse(this.translationUrl)),this.isLoading=!1}handleClientStylingChange(t,e){t!=e&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&B(JSON.parse(this.translationUrl))}componentDidLoad(){console.log(111,this.stylingContainer),this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}get parsedDefaultBulletConfigLineGroup(){if("string"==typeof this.defaultBulletConfigLineGroup&&this.defaultBulletConfigLineGroup)try{const t=JSON.parse(this.defaultBulletConfigLineGroup);return this.readPrettyHandler(t)}catch(t){return void console.error("Error parsing defaultBulletConfigLineGroup:",t)}}readPrettyHandler(t){return this.readPretty?(this.currentPage=1,this.minTotalPages=1,this.maxTotalPages=this.totalPages,null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>null==t?void 0:t.map((t=>Object.assign(Object.assign({},t),{disabled:!0})))))))):t}initLineForBulletConfig(){var t;return Array.from({length:null===(t=this.ticketDataSource)||void 0===t?void 0:t.length},(()=>[...O]))}_resetBulletConfig(){this.bulletConfigLineGroup=Array.from({length:this.totalPages}).map(this.initLineForBulletConfig.bind(this))}fetchMatchData(){let t=new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}/findDrawEvents`);this.gameId&&this.drawId&&(this.isLoading=!0,(t=>fetch(t).then((t=>t.json())))(t.href).then((t=>{this.ticketDataSource=t||[],this.isLoading=!1,this.updateBulletConfigLineGroup()})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)})))}updateBulletConfigLineGroup(){this.parsedDefaultBulletConfigLineGroup&&this.parsedDefaultBulletConfigLineGroup.length>0?this.bulletConfigLineGroup=this.parsedDefaultBulletConfigLineGroup:this._resetBulletConfig()}connectedCallback(){this.fetchMatchData()}handleClearAll(){this._resetBulletConfig(),(({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})})({message:S("selectionCleared",this.language)}),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}async resetBulletConfig({minLineNumber:t,maxLineNumber:e,defaultBoards:n}){this.totalPages=n,this.minTotalPages=t,this.maxTotalPages=e,this.currentPage=1,this._resetBulletConfig(),this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!1})}lotteryTippingBulletGroupSelectionHandler(t){const{bulletConfigArr:e,positionIdx:n}=t.detail,[i,r]=n.split("-");this.bulletConfigLineGroup[i][r]=e,this.bulletConfigLineGroup=[...this.bulletConfigLineGroup],this.lotteryTippingBulletBetEvent.emit({hasSelectBullet:!0})}async getData(){return await this.validateBulletConfigLineGroup(),this.bulletConfigLineGroup}validateBulletConfigLineGroup(){if("[[[]]]"===JSON.stringify(this.bulletConfigLineGroup))return Promise.resolve(this.bulletConfigLineGroup);const t=this.bulletConfigLineGroup.length;return t!==this.totalPages||t<this.minTotalPages||t>this.maxTotalPages?(this._resetBulletConfig(),Promise.reject(new Error("Invalid bullet config line group length"))):Promise.resolve(this.bulletConfigLineGroup)}prevPage(){this.swapCard("prev",(()=>{this.currentPage>1&&this.currentPage--}))}nextPage(){this.swapCard("next",(()=>{this.currentPage<this.totalPages&&this.currentPage++}))}handleAddLine(){this.swapCard("add",(()=>{this.totalPages<=this.maxTotalPages-1&&(this.bulletConfigLineGroup.push(this.initLineForBulletConfig()),this.totalPages++,this.currentPage++,this.lotteryTippingBulletBetEvent.emit())}))}handleRemoveLine(){(()=>{if(this.totalPages>=this.minTotalPages+1){const t=()=>{this.dialogConfig={visible:!1}},e=()=>{this.bulletConfigLineGroup.splice(this.currentPage-1,1),this.totalPages--,1!==this.currentPage&&this.currentPage--,this.lotteryTippingBulletBetEvent.emit(),this.swapCard("remove",t)};this.dialogConfig={visible:!0,content:S("selectionOnLineCleared",this.language),onConfirm:e,onCancel:t}}})()}swapCard(t,e){const n=this.mainContainer;if(!n)return;const{out:i,in:r}={next:{out:"card-out-left",in:"card-in-left"},prev:{out:"card-out-right",in:"card-in-right"},remove:{out:"card-out-down",in:"card-in-right"},add:{out:"card-out-left",in:"card-in-up"}}[t];n.classList.add(i),n.addEventListener("animationend",(()=>{n.classList.remove(i),e();const t=this.mainContainer;t&&(t.classList.add(r),t.addEventListener("animationend",(()=>t.classList.remove(r)),{once:!0}))}),{once:!0})}handleCurrentPageChange(){this.lotteryTippingCurrentPageChangeEvent.emit({currentPage:this.currentPage})}renderLoading(){return e("div",{class:"loading-wrap"},e("section",{class:"dots-container"},e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"}),e("div",{class:"dot"})))}render(){var t,n,i,r;if(this.isLoading)return this.renderLoading();if(this.hasErrors)return e("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},e("p",null,S("error",this.language)));const a=({columns:t,dataSource:n,hideHead:i=!1,grid:r=!0,bordered:a=!0})=>e("table",{class:{bordered:a,grid:r,"my-table-component":!0}},!i&&e("thead",null,e("tr",null,t.map((t=>{var n;return e("th",{key:t.value,style:{width:t.width+"%",textAlign:t.align}},"string"==typeof t.title?t.title:null===(n=t.title)||void 0===n?void 0:n.call(t))})))),e("tbody",null,n.map(((n,i)=>e("tr",{key:i},t.map((t=>e("td",{key:t.value,style:{width:t.width+"%",textAlign:t.align},class:{"no-wrap":t.nowrap}},t.render?t.render(n,n[t.value],i):n[t.value])))))))),o=this.totalPages<this.maxTotalPages&&this.currentPage===this.totalPages,s=this.totalPages>this.minTotalPages;return 0===this.ticketDataSource.length||0===this.minTotalPages||0===this.maxTotalPages?e("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},e("div",{class:"LotteryTippingTicketBet__empty"},e("p",null,S("noData",this.language)))):this.readPretty?e("div",{class:"LotteryTippingTicketBet__container",ref:t=>this.stylingContainer=t},e("div",{class:"LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e(a,{columns:this.columns,dataSource:(null===(t=this.ticketDataSource)||void 0===t?void 0:t.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),this.totalPages>1&&e("div",null,e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,S("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},e("span",{class:"icon",innerHTML:$})),e("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},e("span",{class:"icon",innerHTML:X})))))))):e("div",{ref:t=>this.stylingContainer=t,class:"LotteryTippingTicketBet__container"},e("div",{class:"LotteryTippingTicketBet__tableToolbar flex justify-end gap-1"},e("button",{class:{"LotteryTippingTicketBet__tableToolbar--item":!0,"mr-0":!(o||s)},onClick:this.handleClearAll.bind(this)},S("clearAll",this.language))),e("div",{class:"flex align-center LotteryTippingTicketBet__main",ref:t=>this.mainContainer=t},e(a,{columns:this.columns,dataSource:(null===(n=this.ticketDataSource)||void 0===n?void 0:n.map(((t,e)=>Object.assign(Object.assign({},t),{index:e+1}))))||[],hideHead:!1,grid:!1,bordered:!1}),(o||s)&&e("div",{class:"LotteryTippingTicketBet__lineOperatorGroup"},o&&e("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleAddLine.bind(this)},e("span",{class:"icon",innerHTML:A})),s&&e("div",{class:{"LotteryTippingTicketBet__lineOperatorGroup--item":!0},onClick:this.handleRemoveLine.bind(this)},e("span",{class:"icon",innerHTML:D})))),e("div",{class:"border-line"}),e("div",{class:"LotteryTippingTicketBet__footer"},e("div",{class:"my-pagination flex justify-between"},e("span",null,S("lineInfo",this.language,{currentPage:this.currentPage,totalPages:this.totalPages})),e("div",{class:"flex gap-1"},e("span",{class:"btn "+(1===this.currentPage?"disabled":""),onClick:this.prevPage.bind(this)},e("span",{class:"icon",innerHTML:$})),e("span",{class:"btn "+(this.currentPage===this.totalPages?"disabled":""),onClick:this.nextPage.bind(this)},e("span",{class:"icon",innerHTML:X}))))),this.dialogConfig.visible&&e("vaadin-confirm-dialog",{rejectButtonVisible:!0,rejectText:S("cancel",this.language),confirmText:S("confirm",this.language),opened:null===(i=this.dialogConfig)||void 0===i?void 0:i.visible,onConfirm:this.dialogConfig.onConfirm,onReject:this.dialogConfig.onCancel},null===(r=this.dialogConfig)||void 0===r?void 0:r.content))}static get assetsDirs(){return["../static"]}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],gameId:["fetchMatchData"],sessionId:["fetchMatchData"],drawId:["fetchMatchData"],defaultBulletConfigLineGroup:["fetchMatchData"],currentPage:["handleCurrentPageChange"]}}};E.style=".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-typography, #000);\n background: var(--emw--color-background, #fff);\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: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #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-typography, #000);\n background: var(--emw--color-background, #fff);\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-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #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 color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\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 color: var(--emw--color-typography, #000);\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-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n border-radius: 8px;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item: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.LotteryTippingTicketBet__lineOperatorGroup--item .icon {\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 .icon {\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-background-secondary, #f5f5f5);\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-typography-secondary, #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 transition: all 0.3s ease;\n cursor: pointer;\n opacity: 0.9;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.my-pagination .btn .icon {\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-color: var(--emw--color-background-tertiary, #ccc);\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--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}\n\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40vh;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";export{m as general_tooltip,u as lottery_button,y as lottery_tipping_bullet,v as lottery_tipping_bullet_group,C as lottery_tipping_ticket_banner,E as lottery_tipping_ticket_bet}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{L as LotteryTippingTicketController}from"./lottery-tipping-ticket-controller-
|
|
1
|
+
export{L as LotteryTippingTicketController}from"./lottery-tipping-ticket-controller-d705ad02.js";import"./index-e3ec645c.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./index-e3ec645c.js";function o(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function s(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function r(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}var n=Object.defineProperty,a=Object.defineProperties,l=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(t,e,i)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,p=(t,e)=>{for(var i in e||(e={}))d.call(e,i)&&u(t,i,e[i]);if(h)for(var i of h(e))c.call(e,i)&&u(t,i,e[i]);return t},m=(t,e)=>a(t,l(e)),v=(t,e,i)=>(u(t,"symbol"!=typeof e?e+"":e,i),i),f=(t,e,i)=>new Promise(((o,s)=>{var r=t=>{try{a(i.next(t))}catch(t){s(t)}},n=t=>{try{a(i.throw(t))}catch(t){s(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
|
|
1
|
+
import{r as t,c as e,h as i}from"./index-e3ec645c.js";function o(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function s(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function r(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}var n=Object.defineProperty,a=Object.defineProperties,l=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(t,e,i)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,p=(t,e)=>{for(var i in e||(e={}))d.call(e,i)&&u(t,i,e[i]);if(h)for(var i of h(e))c.call(e,i)&&u(t,i,e[i]);return t},m=(t,e)=>a(t,l(e)),v=(t,e,i)=>(u(t,"symbol"!=typeof e?e+"":e,i),i),f=(t,e,i)=>new Promise(((o,s)=>{var r=t=>{try{a(i.next(t))}catch(t){s(t)}},n=t=>{try{a(i.throw(t))}catch(t){s(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|