@everymatrix/lottery-oddsbom-ticket-bet 0.5.16 → 0.5.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryOddsbomTicketBet = require('./lottery-oddsbom-ticket-bet-4f14d2d1.js');
5
+ const lotteryOddsbomTicketBet = require('./lottery-oddsbom-ticket-bet-7a5265c7.js');
6
6
  require('./index-b8e9c8e4.js');
7
7
 
8
8
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b8e9c8e4.js');
6
- const lotteryOddsbomTicketBet = require('./lottery-oddsbom-ticket-bet-4f14d2d1.js');
6
+ const lotteryOddsbomTicketBet = require('./lottery-oddsbom-ticket-bet-7a5265c7.js');
7
7
 
8
8
  // This icon file is generated automatically.
9
9
  var ArrowUpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z" } }] }, "name": "arrow-up", "theme": "outlined" };
@@ -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)
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryOddsbomTicketBet } from './lottery-oddsbom-ticket-bet-2da56108.js';
1
+ export { L as LotteryOddsbomTicketBet } from './lottery-oddsbom-ticket-bet-71eb06e5.js';
2
2
  import './index-9dee9d86.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-9dee9d86.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, c as showNotification, t as translate$1, d as stringToBase64, r as resolveTranslationUrl$1, f as formatNumber, g as getTranslations$1, M as MAX_DISPLAY_OPTION_NUM } from './lottery-oddsbom-ticket-bet-2da56108.js';
3
- export { L as lottery_oddsbom_ticket_bet } from './lottery-oddsbom-ticket-bet-2da56108.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, c as showNotification, t as translate$1, d as stringToBase64, r as resolveTranslationUrl$1, f as formatNumber, g as getTranslations$1, M as MAX_DISPLAY_OPTION_NUM } from './lottery-oddsbom-ticket-bet-71eb06e5.js';
3
+ export { L as lottery_oddsbom_ticket_bet } from './lottery-oddsbom-ticket-bet-71eb06e5.js';
4
4
 
5
5
  // This icon file is generated automatically.
6
6
  var ArrowUpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z" } }] }, "name": "arrow-up", "theme": "outlined" };
@@ -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
- export{L as LotteryOddsbomTicketBet}from"./lottery-oddsbom-ticket-bet-2da56108.js";import"./index-9dee9d86.js";
1
+ export{L as LotteryOddsbomTicketBet}from"./lottery-oddsbom-ticket-bet-71eb06e5.js";import"./index-9dee9d86.js";
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,g as o}from"./index-9dee9d86.js";import{s as n,a as s,b as d,c as a,t as l,d as r,r as c,f as h,g as m,M as b}from"./lottery-oddsbom-ticket-bet-2da56108.js";export{L as lottery_oddsbom_ticket_bet}from"./lottery-oddsbom-ticket-bet-2da56108.js";const p={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 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var g=function(){return g=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},g.apply(this,arguments)},f={primaryColor:"#333",secondaryColor:"#E6E6E6"};function u(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||f;return y(t.icon(i.primaryColor,i.secondaryColor),e)}return y(t.icon,e)}function y(t,e){var i="svg"===t.tag?g(g({},t.attrs),e.extraSVGAttrs||{}):t.attrs,o=Object.keys(i).reduce((function(t,e){var o=i[e],n="".concat(e,'="').concat(o,'"');return t.push(n),t}),[]),n=o.length?" "+o.join(" "):"",s=(t.children||[]).map((function(t){return y(t,e)})).join("");return s&&s.length?"<".concat(t.tag).concat(n,">").concat(s,"</").concat(t.tag,">"):"<".concat(t.tag).concat(n," />")}const x=u({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-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-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),v=class{constructor(i){t(this,i),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return i("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},i("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},i("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:x}),i("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};v.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";const w=class{constructor(i){t(this,i),this.addSelectionEvent=e(this,"addSelection",7),this.deleteSelectionEvent=e(this,"deleteSelection",7),this.deleteSelectionOriginEvent=e(this,"deleteSelectionOrigin",7),this.oddsbomBulletGroupToggleEvent=e(this,"oddsbomBulletGroupToggle",7),this.oddsbomBulletGroupAddedByMoreBtnDelEvent=e(this,"oddsbomBulletGroupAddedByMoreBtnDel",7),this.oddsbomBulletCallDialogFromGroupEvent=e(this,"oddsbomBulletCallDialogFromGroup",7),this.selectionIdx=void 0,this.matchIdx=void 0,this.bulletConfigs=[],this.bulletConfigsDeleteOrigin=[],this.addSelectionConfig=void 0,this.isDeleteByIcon=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.bulletListClass=void 0,this.innerBulletConfigs=void 0,this.innerBulletConfigsDeleteOrigin=void 0}handleBulletConfigsChange(t){this.innerBulletConfigs=t.map((t=>Object.assign({},t)))}handleBulletConfigsDeleteOriginChange(t){this.innerBulletConfigsDeleteOrigin=t.map((t=>Object.assign({},t)))}componentWillLoad(){this.handleBulletConfigsChange(this.bulletConfigs)}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}oddsbomBulletToggleHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:o}=this,n=[...this.innerBulletConfigs],s=Object.assign({},n[e]);s.isSelected=!s.isSelected,n[e]=s,this.innerBulletConfigs=n,this.oddsbomBulletGroupToggleEvent.emit({bulletSelctionArr:this.innerBulletConfigs,matchIdx:i,selectionIdx:o})}oddsbomBulletDeleteHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:o}=this,n=[...this.innerBulletConfigsDeleteOrigin],s=Object.assign({},n[e]);s.isSelected=!s.isSelected,n[e]=s,this.innerBulletConfigsDeleteOrigin=n,this.oddsbomBulletGroupToggleEvent.emit({bulletSelctionArr:this.innerBulletConfigsDeleteOrigin,matchIdx:i,selectionIdx:o})}oddsbomBulletAddedByMoreBtnDeleteHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:o}=this;this.oddsbomBulletGroupAddedByMoreBtnDelEvent.emit({delText:e,matchIdx:i,selectionIdx:o})}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleOddsbomBulletCallDialog(){const{matchIdx:t,selectionIdx:e}=this;this.oddsbomBulletCallDialogFromGroupEvent.emit({matchIdx:t,selectionIdx:e})}render(){return i("div",{key:"38102a447cf8fafc8f7a7e5a122c7ccbc2ce8b4a",class:"oddsbomBulletGroup",ref:t=>this.stylingContainer=t},i("div",{key:"59ca1df498575356eb3438b45e9431b1bc7ee2dd",class:`oddsbomBulletGroup-list ${this.bulletListClass||""}`},this.innerBulletConfigs.map((t=>i("lottery-oddsbom-bullet",t.isAddMoreBtn?{text:`${this.addSelectionConfig.maxOverScore}+`,disabled:t.isDisabled,isCallDialogBtn:!0,onOddsbomBulletCallDialog:this.handleOddsbomBulletCallDialog.bind(this)}:{text:t.text,idx:t.idx,isSelected:t.isSelected,disabled:t.isDisabled,isDeleteByIcon:this.isDeleteByIcon,isAddedByMoreBtn:t.isAddedByMoreBtn})))))}static get watchers(){return{bulletConfigs:["handleBulletConfigsChange"],bulletConfigsDeleteOrigin:["handleBulletConfigsDeleteOriginChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};w.style=".oddsbomBulletGroup{width:100%}.oddsbomBulletGroup .oddsbomBulletGroup-list{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.oddsbomBulletGroup .selection-bullet-list{justify-content:flex-end}";const k=u({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),S=u(p,{extraSVGAttrs:{width:"18px",height:"18px",fill:"#0d196e"}}),C=u(p,{extraSVGAttrs:{width:"16px",height:"16px",fill:"#1367e7"}}),B=u({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:"16px",height:"16px",fill:""}}),O=u({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:"16px",height:"16px",fill:""}}),I=class{constructor(i){t(this,i),this.oddsQueryLineChangeEvent=e(this,"oddsQueryLineChange",7),this.oddschartFillInEvent=e(this,"oddschartFillIn",7),this.oddsQueryChangeEvent=e(this,"oddsQueryChange",7),this.handleSearch=async()=>{const t=this.matchItemsContainer.querySelectorAll("lottery-oddsbom-oddschart-input"),e=await Promise.all(Array.from(t).map((t=>t.getValue())));if(e.length!=2*this.matchInfo.length)return void a({theme:"warning",message:l("pleaseFillIn",this.language)});const i=[...this.matchSelection],o=[];for(let t=0;t<e.length;t+=2){const n=e[t],s=e[t+1],d=t/2;n&&s&&(o.push([[`${n}:${s}`]]),i[d]=[n,s])}if(this.matchSelection=[...i],o.length>0){const t=await r(JSON.stringify(o));this.oddsQueryLineChangeEvent.emit({lineSelectionBase64:t,offset:0}),this.hasFillInSelection=!0}},this.handleGroupClick=t=>{this.selectedGroupIndex=t},this.toggleFilterIcon=()=>{this.isAscend=!this.isAscend,this.selectedGroupIndex=-1,this.oddsQueryChangeEvent.emit({ascending:this.isAscend,offset:0,lineSelectionBase64:""})},this.handlePrevPage=()=>{this.curPage>=1&&(this.selectedGroupIndex=-1,this.oddsQueryChangeEvent.emit({offset:this.offset-this.limit,lineSelectionBase64:""}))},this.handleNextPage=()=>{this.curPage<this.totalPage-1&&(this.selectedGroupIndex=-1,this.oddsQueryChangeEvent.emit({offset:this.offset+this.limit,lineSelectionBase64:""}))},this.matchInfo=void 0,this.oddsInfo=void 0,this.total=void 0,this.curPage=void 0,this.limit=void 0,this.offset=void 0,this.filterdOdds=void 0,this.isSearching=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.isLoading=!1,this.language="en",this.translationUrl="",this.isAscend=!0,this.selectedGroupIndex=-1,this.matchSelection=[],this.hasFillInSelection=!1}async initOddsChart(){this.oddsQueryChangeEvent.emit({offset:0,ascending:!0,lineSelectionBase64:""})}async closeOddsChart(){this.hasFillInSelection=!1,this.selectedGroupIndex=-1,this.matchSelection=[],this.isAscend=!0,this.matchItemsContainer&&this.matchItemsContainer.querySelectorAll("lottery-oddsbom-oddschart-input").forEach((t=>{t.clearValue()}))}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}handleMatchInfoChange(t){this.matchSelection=t.map((()=>[-1,-1]))}componentWillLoad(){this.translationUrl&&c(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get totalPage(){return Math.ceil(this.total/this.limit)}generateBulletGroup(t,e,o){let n;try{n=JSON.parse(t)}catch(t){return console.error("Failed to parse line JSON:",t),i("div",{class:"error-message"},"Invalid data format")}let s=n.map((t=>t[0])).map((t=>t[0]));const d=this.selectedGroupIndex===o;return i("div",{class:"oddsbom-oddschart-selection--group",onClick:this.handleGroupClick.bind(this,o)},i("div",{class:"oddsbom-oddschart-selection--group-wrap",style:{flexBasis:160*s.length+"px"}},s.map(((t,e)=>{const o=t.split(":");return i("div",{class:"oddsbom-oddschart-selection-item",key:e},i("div",{class:"oddsbom-oddschart-selection-item--1"},i("lottery-oddsbom-bullet",{text:o[0],"is-reading":!0,"is-selected":d})),i("div",{class:"oddsbom-oddschart-selection-item--2"},i("lottery-oddsbom-bullet",{text:o[1],"is-reading":!0,"is-selected":d})))}))),i("div",{class:"oddsbom-oddschart-selection-odds"},i("div",{class:"oddsbom-oddschart-selection-odds--text"},h(e)),d&&i("div",{class:"oddsbom-oddschart-selection-odds--fillIn"},i("lottery-oddsbom-ticket-button",{text:l("fillIn",this.language),size:"small",variant:"outline",onClick:this.handleFillIn.bind(this,s),language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl}))))}handleFillIn(t){this.oddschartFillInEvent.emit({fillInNums:t})}clearMatchSelection(){this.hasFillInSelection=!1,this.matchItemsContainer&&this.matchItemsContainer.querySelectorAll("lottery-oddsbom-oddschart-input").forEach((t=>{t.clearValue()}))}fillInMatchSelection(){const t=[];this.matchSelection.forEach((e=>{t.push(`${e[0]}:${e[1]}`)})),this.handleFillIn(t)}render(){var t,e;return i("div",{key:"b160d1870184937cdd013a233a4841545d8f769a",class:"oddsbom-oddschart",ref:t=>this.stylingContainer=t},(null===(t=this.matchInfo)||void 0===t?void 0:t.length)&&(null===(e=this.oddsInfo)||void 0===e?void 0:e.length)?this.matchInfo&&i("div",{class:"oddsbom-oddschart-container"},i("div",{class:"oddsbom-oddschart-wrap"},i("div",{class:"oddsbom-oddschart-match",ref:t=>this.matchItemsContainer=t},this.matchInfo.map(((t,e)=>i("div",{class:"oddsbom-oddschart-match-item",key:e},i("div",{class:"oddsbom-oddschart-match-item-name"},i("div",{class:"oddsbom-oddschart-match-item-name--home"},`${e+1}. ${t.eventName.split("vs")[0]}`),i("div",{class:"oddsbom-oddschart-match-item-name--delimiter"},"vs"),i("div",{class:"oddsbom-oddschart-match-item-name--away"},`${t.eventName.split("vs")[1]}`)),i("div",{class:"oddsbom-oddschart-match-item-input"},i("lottery-oddsbom-oddschart-input",null),i("lottery-oddsbom-oddschart-input",null))))),i("div",{class:"oddsbom-oddschart-match-search"},i("lottery-oddsbom-ticket-button",{text:l("search",this.language),variant:"outline",onClick:this.handleSearch}))),this.hasFillInSelection&&!this.isSearching&&(this.filterdOdds?i("div",{class:"oddsbom-oddschart-input-wrap"},i("div",{class:"oddsbom-oddschart-input"},this.matchSelection.map((t=>i("div",{class:"oddsbom-oddschart-input-item"},i("lottery-oddsbom-bullet",{text:t[0],"is-reading":!0,"is-selected":!0}),i("lottery-oddsbom-bullet",{text:t[1],"is-reading":!0,"is-selected":!0})))),i("div",{class:"oddsbom-oddschart-input-odds"},h(this.filterdOdds))),i("div",{class:"oddsbom-oddschart-input-operation"},i("lottery-oddsbom-ticket-button",{text:l("clear",this.language),variant:"outline",size:"small",onClick:this.clearMatchSelection.bind(this)}),i("lottery-oddsbom-ticket-button",{text:l("fillIn",this.language),variant:"outline",size:"small",onClick:this.fillInMatchSelection.bind(this)}))):i("div",{class:"oddsbom-oddschart-input-empty"},i("div",null,i("span",{innerHTML:C,style:{marginRight:"6px",height:"16px"}}),i("span",{style:{fontSize:"14px"}},l("noBets",this.language))),i("div",{class:"oddsbom-oddschart-input-empty-operation"},i("lottery-oddsbom-ticket-button",{text:l("clear",this.language),variant:"text",size:"small",onClick:this.clearMatchSelection.bind(this)}),i("lottery-oddsbom-ticket-button",{text:l("fillIn",this.language),variant:"text",size:"small",onClick:this.fillInMatchSelection.bind(this)})))),i("div",{class:"oddsbom-oddschart-match-filter"},(this.isLoading||this.isSearching)&&i("div",{class:"progress-bar"}),i("span",{onClick:this.toggleFilterIcon,class:"arrow "+(this.isAscend?"ascend":""),innerHTML:k})),i("div",{class:"oddsbom-oddschart-selection"},this.oddsInfo.map(((t,e)=>this.generateBulletGroup(t.lineSelection,t.odds,e)))),i("div",{class:"oddsbom-oddschart-pagination"},i("div",{class:"oddsbom-oddschart-pagination-wrap"},i("div",{class:"oddsbom-oddschart-pagination-prev "+(this.curPage<1?"disabled":""),onClick:this.handlePrevPage},i("div",{class:"oddsbom-oddschart-pagination-icon",innerHTML:B})),i("div",{class:"oddsbom-oddschart-pagination-page"},`${this.curPage+1} / ${this.totalPage}`),i("div",{class:"oddsbom-oddschart-pagination-next "+(this.curPage>=this.totalPage-1?"disabled":""),onClick:this.handleNextPage},i("div",{class:"oddsbom-oddschart-pagination-icon",innerHTML:O})))))):i("div",{class:"empty-wrap"},i("span",{innerHTML:S,style:{marginRight:"6px",height:"18px"}}),i("span",{class:"empty-wrap-text",style:{fontSize:"18px"}},l("noBets",this.language))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],matchInfo:["handleMatchInfoChange"]}}};I.style='.oddsbom-oddschart {\n container-type: inline-size;\n}\n.oddsbom-oddschart-container {\n position: relative;\n}\n.oddsbom-oddschart-match {\n display: flex;\n align-items: flex-end;\n margin-bottom: 4px;\n}\n.oddsbom-oddschart-match-item {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-basis: 160px;\n}\n.oddsbom-oddschart-match-item-name {\n margin-bottom: 8px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.oddsbom-oddschart-match-item-name--home, .oddsbom-oddschart-match-item-name--away, .oddsbom-oddschart-match-item-name--delimiter {\n font-size: 13px;\n height: 16px;\n line-height: 16px;\n overflow: hidden;\n color: var(--emw--color-typography, #000);\n}\n.oddsbom-oddschart-match-item-input {\n display: flex;\n justify-content: space-between;\n}\n.oddsbom-oddschart-match-search {\n flex-basis: 130px;\n text-align: center;\n}\n.oddsbom-oddschart-match-filter {\n display: flex;\n justify-content: flex-end;\n padding: 2px;\n position: relative;\n padding-top: 4px;\n border-top: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.oddsbom-oddschart-input {\n display: flex;\n margin-top: 4px;\n}\n.oddsbom-oddschart-input-empty {\n padding: 12px;\n border: 1px solid var(--emw--color-primary-variant, #1367e7);\n background-color: var(--emw--color-tertiary, #e3f2fd);\n width: 50%;\n min-width: 240px;\n max-width: 360px;\n margin: 4px auto;\n border-radius: 6px;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n}\n.oddsbom-oddschart-input-empty-operation {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-top: 4px;\n}\n.oddsbom-oddschart-input-wrap {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-bottom: 4px;\n}\n.oddsbom-oddschart-input-item {\n display: flex;\n align-items: center;\n flex-basis: 160px;\n justify-content: center;\n gap: 5px;\n}\n.oddsbom-oddschart-input-odds {\n flex-basis: 130px;\n display: flex;\n align-items: center;\n font-size: 14px;\n text-indent: 16px;\n}\n.oddsbom-oddschart-input-operation {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 20px;\n}\n.oddsbom-oddschart-selection--group {\n display: flex;\n margin-bottom: 8px;\n}\n.oddsbom-oddschart-selection--group-wrap {\n display: flex;\n border-radius: 4px;\n}\n.oddsbom-oddschart-selection--group-wrap:hover {\n background: var(--emw--color-gray-50, #f5f5f5);\n cursor: pointer;\n}\n.oddsbom-oddschart-selection-item {\n display: flex;\n flex-basis: 160px;\n justify-content: center;\n gap: 10px;\n}\n.oddsbom-oddschart-selection-odds {\n display: flex;\n gap: 12px;\n align-items: center;\n flex-basis: 130px;\n position: relative;\n text-indent: 16px;\n}\n.oddsbom-oddschart-selection-odds--text {\n font-size: 14px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbom-oddschart-selection-odds--fillIn {\n position: absolute;\n right: 0;\n}\n@container (max-width: 430px) {\n .oddsbom-oddschart .oddsbom-oddschart-selection-odds {\n text-indent: unset;\n }\n .oddsbom-oddschart .oddsbom-oddschart-selection-odds--fillIn {\n right: -22px;\n }\n .oddsbom-oddschart .oddsbom-oddschart-selection-item {\n gap: 4px;\n }\n}\n.oddsbom-oddschart .arrow {\n transition: transform 0.3s ease;\n font-size: 16px;\n display: inline-flex;\n cursor: pointer;\n fill: var(--emw--color-typography, #000);\n display: flex;\n justify-content: center;\n flex-basis: 130px;\n}\n.oddsbom-oddschart .arrow.ascend {\n transform: rotate(180deg);\n}\n\n.empty-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.empty-wrap-text {\n color: var(--emw--color-typography, #000);\n}\n\n.oddsbom-oddschart-pagination {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n margin-top: 10px;\n padding-right: 16px;\n}\n.oddsbom-oddschart-pagination-wrap {\n display: flex;\n align-items: center;\n gap: 12px;\n height: 18px;\n}\n.oddsbom-oddschart-pagination-prev, .oddsbom-oddschart-pagination-next {\n cursor: pointer;\n}\n.oddsbom-oddschart-pagination-prev.disabled, .oddsbom-oddschart-pagination-next.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n.oddsbom-oddschart-pagination-icon {\n display: flex;\n height: 18px;\n align-items: center;\n fill: var(--emw--color-typography, #000);\n}\n.oddsbom-oddschart-pagination-page {\n font-size: 14px;\n color: var(--emw--color-typography, #000);\n}\n\n.progress-bar {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--emw--color-gray-100, #e6e6e6);\n overflow: hidden;\n}\n.progress-bar::after {\n content: "";\n display: block;\n width: 20%;\n height: 100%;\n background-color: var(--emw--color-primary, #0d196e);\n animation: progress 1.5s linear infinite;\n}\n\n@keyframes progress {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(500%);\n }\n}';const _=class{constructor(i){t(this,i),this.valueChange=e(this,"valueChange",7),this.handleInputChange=t=>{const e=t.target.value.trim();this.valueChange.emit(e)},this.handleKeyDown=t=>{"Enter"===t.key&&this.inputElement.blur()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.value=""}async getValue(){return this.inputElement.value}async clearValue(){this.inputElement&&(this.inputElement.value=""),this.value=""}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"eb973f7978b7452788f72a43da5424abbe845361",class:"oddscharts-input",ref:t=>this.stylingContainer=t},i("input",{key:"f24fba10175b944af328b71f8e257d8ad1386af2",ref:t=>this.inputElement=t,type:"text",inputMode:"numeric",value:this.value,onInput:this.handleInputChange,onKeyDown:this.handleKeyDown,autocomplete:"one-time-code"}))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};_.style=".oddscharts-input{display:inline-flex;padding:2px}.oddscharts-input input{width:32px;height:32px;text-align:center;font-size:14px;font-weight:bold;line-height:32px;border:2px solid var(--emw--color-gray-100, #e6e6e6);border-radius:4px;padding:0;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);text-transform:uppercase}.oddscharts-input input:focus{outline:none;border-color:var(--emw--color-primary, #0d196e);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));border-width:2px}.oddscharts-input input:disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed}.oddscharts-input input.error{border-color:var(--emw--color-error, #ff3d00)}.oddscharts-input input.error:focus{box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}";const j=class{constructor(i){t(this,i),this.oddsbomBoardClearEvent=e(this,"oddsbomBoardClear",7),this.oddsbomAddMoreToMatchEvent=e(this,"oddsbomAddMoreToMatch",7),this.ticketBoardInfo=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.addSelectionConfig=void 0,this.bulletsConfig=void 0,this.isInputInvalid=!1,this.errorMessage="",this.dialogConfig={width:"400px",visible:!1,onConfirm:()=>this.handleFillInAddMore(),onCancel:()=>this.handleCloseAddMoreDialog()},this.curAddMoreInfo={matchIdx:0,selectionIdx:0,value:""}}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&m(JSON.parse(this.translationUrl))}handleOddsbomBulletGroupToggle(t){const{bulletConfigArr:e}=t.detail;this.bulletsConfig=e}handleOddsbomBulletCallDialogFromGroup(t){const{matchIdx:e,selectionIdx:i}=t.detail;this.curAddMoreInfo=Object.assign(Object.assign({},this.curAddMoreInfo),{matchIdx:e,selectionIdx:i}),this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!0})}handleFillInAddMore(){if(this.isInputInvalid)return void this.handleCloseAddMoreDialog();const{matchIdx:t,selectionIdx:e,value:i}=this.curAddMoreInfo;this.oddsbomAddMoreToMatchEvent.emit({matchIdx:t,selectionIdx:e,value:i}),this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!1}),this.curAddMoreInfo=Object.assign(Object.assign({},this.curAddMoreInfo),{value:""})}handleCloseAddMoreDialog(){this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!1}),this.curAddMoreInfo=Object.assign(Object.assign({},this.curAddMoreInfo),{value:""}),this.isInputInvalid=!1,this.errorMessage=""}handleClearAllSelection(){this.oddsbomBoardClearEvent.emit(),a({message:l("selectionCleared",this.language)})}validateInput(t){const e=Number(t);if(isNaN(e))return this.isInputInvalid=!0,void(this.errorMessage=l("enterValidNumber",this.language));if(e<b||e>this.addSelectionConfig.maxScore)return this.isInputInvalid=!0,void(this.errorMessage=l("enterNumberBetween",this.language,{min:b,max:this.addSelectionConfig.maxScore}));const{matchIdx:i,selectionIdx:o}=this.curAddMoreInfo;if(this.ticketBoardInfo[i].addSelections[o].some((e=>Number(e)===Number(t))))return this.isInputInvalid=!0,void(this.errorMessage=l("numberAlreadySelected",this.language));this.isInputInvalid=!1,this.errorMessage=""}handleInputChange(t){const e=t.target.value;this.curAddMoreInfo=Object.assign(Object.assign({},this.curAddMoreInfo),{value:e}),this.validateInput(e)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"7cacb40559ce42eed5c03326d830461c9dbd2708",class:"oddsbomTicketBoard",ref:t=>this.stylingContainer=t},i("div",{key:"b1c7f38a621320949049f26745232d2a34d644e8",class:"oddsbomTicketBoard-btn"},i("lottery-oddsbom-ticket-button",{key:"ff6c51b5a115cf46e4fc6df5b725a8233a55fa0f",onClick:this.handleClearAllSelection.bind(this),text:l("clearAll",this.language),variant:"outline"})),this.ticketBoardInfo.length?i("div",{class:"oddsbomTicketBoard-list"},this.ticketBoardInfo.map(((t,e)=>i("div",{class:"oddsbomTicketBoard-item"},i("div",{class:"oddsbomTicketBoard-item-header"},`${e+1}. ${t.matchName}`),i("div",{class:"oddsbomTicketBoard-item-match"},i("div",{class:"oddsbomTicketBoard-item-match--left"},t.matchName.split("vs")[0]),i("div",{class:"oddsbomTicketBoard-item-match--right"},i("lottery-oddsbom-bullet-group",{bulletConfigs:t.selections[0],selectionIdx:0,matchIdx:e,addSelectionConfig:this.addSelectionConfig}))),i("div",{class:"oddsbomTicketBoard-item-match"},i("div",{class:"oddsbomTicketBoard-item-match--left"},t.matchName.split("vs")[1]),i("div",{class:"oddsbomTicketBoard-item-match--right"},i("lottery-oddsbom-bullet-group",{bulletConfigs:t.selections[1],selectionIdx:1,matchIdx:e,addSelectionConfig:this.addSelectionConfig}))))))):i("div",{class:"oddsbomTicketBoard-noData"},l("noTicketBoard",this.language)),i("lottery-tipping-dialog",{key:"dbaf34154fcf9a16d3210f03345d80c4a5354125",visible:this.dialogConfig.visible,width:this.dialogConfig.width,onCancel:this.handleCloseAddMoreDialog.bind(this)},i("div",{key:"93370ed84ff6e3483214307e45cb46f767712343",class:"addSelectionDialog"},i("div",{key:"ec774960c7f0bc25dc2d2e55d7b185d520dbbe27",class:"addSelectionDialog-title"},l("enterScoreUpTo",this.language,{maxScore:this.addSelectionConfig.maxScore})),i("input",{key:"d21da9e15f671a9790b343674af722394c5599ce",type:"text",class:{"dialog-input":!0,invalid:this.isInputInvalid},value:this.curAddMoreInfo.value,onInput:this.handleInputChange.bind(this)}),i("div",{key:"ebe2c70cd8a5ba10bdfdc99178356677cd076621",class:"error-message"},this.errorMessage)),i("div",{key:"31ff21b79c853c9f46fc8e8ba0f33b39bf2cda4f",slot:"footer",class:"addSelectionDialog-footer"},i("lottery-oddsbom-ticket-button",{key:"34a4edbfae9233b0ee47ffd929901ad7fe991ffe",onClick:this.dialogConfig.onCancel,text:l("cancel",this.language),variant:"outline"}),i("lottery-oddsbom-ticket-button",{key:"d0ff9fb20917bd30d88b2aaa87cb863069a88328",onClick:this.dialogConfig.onConfirm,text:l("confirm",this.language),variant:"primary",disabled:!this.curAddMoreInfo.value}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};j.style=".oddsbomTicketBoard {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n border-radius: 4px;\n container-type: inline-size;\n min-height: 220px;\n}\n.oddsbomTicketBoard-noData {\n display: flex;\n justify-content: center;\n height: 200px;\n align-items: center;\n}\n.oddsbomTicketBoard-btn {\n display: flex;\n justify-content: flex-end;\n margin: 16px;\n margin-bottom: unset;\n}\n.oddsbomTicketBoard-item {\n display: flex;\n gap: 16px;\n flex-direction: column;\n padding: 24px;\n}\n.oddsbomTicketBoard-item:not(:last-child) {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.oddsbomTicketBoard-item-header {\n font-weight: bold;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomTicketBoard-item-match {\n display: flex;\n align-items: center;\n}\n.oddsbomTicketBoard-item-match--left {\n width: 130px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomTicketBoard-item-match--right {\n flex: 1;\n display: flex;\n align-items: center;\n gap: 12px;\n justify-content: space-evenly;\n}\n@container (max-width: 320px) {\n .oddsbomTicketBoard-item-match--left {\n width: 100px;\n max-width: 100px;\n }\n}\n\n.dialog-input {\n width: 100%;\n padding: 8px;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n border-radius: 4px;\n box-sizing: border-box;\n margin-top: 10px;\n}\n\n.dialog-input.invalid,\n.dialog-input.invalid:focus {\n border-color: var(--emw--color-error, #ff3d00);\n outline-color: var(--emw--color-error, #ff3d00);\n}\n\n.error-message {\n color: var(--emw--color-error, #ff3d00);\n font-size: 12px;\n margin-top: 4px;\n}\n\n.addSelectionDialog-title {\n color: var(--emw--color-typography, #000);\n}\n.addSelectionDialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 18px;\n}";const M=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const i=e.getBoundingClientRect(),o=Math.max(i.width,i.height),n={top:t.clientY-i.top-o/2,left:t.clientX-i.left-o/2,size:o};this.ripples=[...this.ripples,n],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==n))}),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&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&c(this.translationUrl)}render(){const{variant:t,disabled:e,size:o}=this,n=e||this.loading;return i("button",{key:"c0c87c36c7c3f48286729c9133eded8338f137be",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${o}`]:!0,"btn--loading":this.loading},disabled:n,onClick:this.handleClick},this.loading?i("div",{class:"loading-container"},i("span",{class:"content"},this.text||l("loading",this.language)),i("span",{class:"spinner"})):i("span",{class:"content"},this.text),i("div",{key:"8276ad215063ef4217b11f65fb189d6fcccd1f24",class:"ripple-container"},this.ripples.map(((t,e)=>i("span",{key:e,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};M.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 z=u({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),D=class{constructor(e){t(this,e),this.togglePanel=()=>{this.expanded=!this.expanded},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.ticketBoardInfo=void 0,this.language="en",this.expanded=!1,this._ticketBoardInfo=[]}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this._ticketBoardInfo=JSON.parse(JSON.stringify(this.ticketBoardInfo))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleTicketBoradInfoChange(t){this._ticketBoardInfo=JSON.parse(JSON.stringify(t))}generateMatchItemSelection(t,e,o,n,s,d,a){return i("div",{class:"oddsbomSelection-item"},i("div",{class:"oddsbomSelection-item-number"},o+1),i("div",{class:"oddsbomSelection-item-selection"},i("div",{class:"oddsbomSelection-item-team"},i("div",{class:"oddsbomSelection-item-team-name"},t),i("div",{class:"oddsbomSelection-item-team-selection"},i("lottery-oddsbom-bullet-group",{bulletConfigs:n,selectionIdx:0,matchIdx:o,bulletConfigsDeleteOrigin:d,isDeleteByIcon:!0,bulletListClass:"selection-bullet-list"}))),i("div",{class:"oddsbomSelection-item-team"},i("div",{class:"oddsbomSelection-item-team-name"},e),i("div",{class:"oddsbomSelection-item-team-selection"},i("lottery-oddsbom-bullet-group",{bulletConfigs:s,selectionIdx:1,matchIdx:o,bulletConfigsDeleteOrigin:a,isDeleteByIcon:!0,bulletListClass:"selection-bullet-list"})))))}generateSelectionList(){return this._ticketBoardInfo?this._ticketBoardInfo.map(((t,e)=>{var i,o,n,s;const{matchName:d,selections:a}=t,l=d.split("vs")[0],r=d.split("vs")[1],c=a[0].filter((t=>t.isSelected)),h=a[1].filter((t=>t.isSelected)),m=null!==(o=null===(i=t.addSelections)||void 0===i?void 0:i[0])&&void 0!==o?o:[],b=null!==(s=null===(n=t.addSelections)||void 0===n?void 0:n[1])&&void 0!==s?s:[];return m.length>0&&m.forEach((t=>{c.push({text:t,idx:-1,isSelected:!0,isDisabled:!1,isAddedByMoreBtn:!0})})),b.length>0&&b.forEach((t=>{h.push({text:t,idx:-1,isSelected:!0,isDisabled:!1,isAddedByMoreBtn:!0})})),this.generateMatchItemSelection(l,r,e,c,h,a[0],a[1])})):null}render(){return i("div",{key:"8e359b773654d6a1632f69837009ccc29d547561",class:"oddsbomSelection",ref:t=>this.stylingContainer=t},i("div",{key:"93c2575de9e70759118f4d4702f356322c2bcb88",class:"oddsbomSelection-panel"},i("div",{key:"2df0bf1be465b9baa00f44052c623071f78d799d",class:"oddsbomSelection-panel--header",onClick:this.togglePanel},i("div",{key:"c32a79afcab02f683ffb8abc26395e098b080939",class:"oddsbomSelection-panel--header-title"},l("myChoices",this.language)),i("div",{key:"de2b875b0fc538212d15cb7dde2c95b10d49665a",class:"oddsbomSelection-panel--header-icon "+(this.expanded?"expanded":""),innerHTML:z})),i("div",{key:"4a51e00f8ab67d9ab6c1cfd25d47f93c79d7a4bf",class:"oddsbomSelection-panel--content "+(this.expanded?"open":"closed")},i("div",{key:"9f9575c3bb176769cee836c9cf027fc76580b367",class:"oddsbomSelection-panel--content-thead"},i("div",{key:"3dd762c94c915afc9f14b38fdaec73a42b56004e",class:"oddsbomSelection-panel--content-thead-item"},l("teams",this.language)),i("div",{key:"2ea960a6db72e11a7e9157871f70769174f722f0",class:"oddsbomSelection-panel--content-thead-item"},l("scores",this.language))),i("div",{key:"847ef04f0a9e289c796a856c3d16bebc83d2d188",class:"oddsbomSelection-panel--content-tbody"},this.generateSelectionList()))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],ticketBoardInfo:["handleTicketBoradInfoChange"]}}};D.style=".oddsbomSelection {\n container-type: inline-size;\n}\n.oddsbomSelection-panel--header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n height: 40px;\n padding: 0 4px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomSelection-panel--header:hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n border-radius: 4px;\n}\n.oddsbomSelection-panel--header-title {\n font-size: 16px;\n font-weight: 600;\n user-select: none;\n}\n.oddsbomSelection-panel--header-icon {\n transition: transform 0.2s;\n}\n.oddsbomSelection-panel--header-icon.expanded {\n transform: rotate(180deg);\n}\n.oddsbomSelection-panel--content {\n overflow: hidden;\n max-height: 0;\n transition: max-height 0.3s ease, padding 0.3s ease;\n padding: 0 12px;\n font-size: 14px;\n user-select: none;\n}\n.oddsbomSelection-panel--content.open {\n max-height: 19000px;\n padding: 10px 12px;\n background-color: var(--emw--color-background, #fff);\n}\n.oddsbomSelection-panel--content.closed {\n max-height: 0;\n padding-top: 0;\n padding-bottom: 0;\n}\n.oddsbomSelection-panel--content-thead {\n display: flex;\n justify-content: space-between;\n padding: 0 24px;\n margin-bottom: 12px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomSelection-panel--content-tbody {\n padding: 0 18px;\n}\n.oddsbomSelection-item {\n display: flex;\n justify-content: space-between;\n position: relative;\n padding: 8px;\n}\n.oddsbomSelection-item:not(:last-child) {\n border-bottom: 1px dashed var(--emw--color-gray-100, #e6e6e6);\n}\n.oddsbomSelection-item-number {\n position: absolute;\n left: -18px;\n top: 48%;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomSelection-item-selection {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n.oddsbomSelection-item-team {\n display: flex;\n justify-content: space-between;\n align-items: center;\n min-height: 32px;\n color: var();\n}\n.oddsbomSelection-item-team-name {\n max-width: 140px;\n width: 140px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomSelection-item-team-selection {\n display: flex;\n gap: 6px;\n flex: 1;\n justify-content: flex-end;\n}\n@container (max-width: 430px) {\n .oddsbomSelection-item-team-name {\n max-width: 80px;\n width: 80px;\n }\n}\n\n.oddsbomSelection-panel--header-icon {\n fill: var(--emw--color-typography, #000);\n}";const T=["ro","en","fr","ar","hr"],$={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},U=(t,e)=>{const i=e;return $[void 0!==i&&T.includes(i)?i:"en"][t]},A=class{constructor(i){t(this,i),this.open=e(this,"open",7),this.close=e(this,"close",7),this.confirm=e(this,"confirm",7),this.cancel=e(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])$[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(t){this.maskClosable&&t.target===this.el.querySelector(".mask")&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const t={width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},e=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],o=["mask",this.visible?"mask-enter":"mask-leave"],n=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":""].join(" ");return i("div",{key:"716c6488b86fc5a74bcd8c8c8a4eee1b85f75cb7",class:e.join(" "),ref:t=>this.stylingContainer=t},i("div",{key:"161d976b5a15f62c63b56555e161b5b29c0a7771",class:o.join(" "),onClick:this.handleMaskClick.bind(this)}),i("div",{key:"ebd2c356c169765b06c85997dc9906b74358b450",class:n,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},i("div",{key:"2a8616c336447b33d3c4b3f22deee3871abd93c9",class:"dialog-header"},i("h2",{key:"fc4f4f87826620754f8cce73874726cdebcc280e",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&i("button",{key:"1626434c0700df7dc094cbf0c96840476ab65da5",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),i("div",{key:"44d28c0e477e3e16069749f7700ee70b6a486d07",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},i("slot",{key:"745e1329fc3647247245f7aa96d10a06b6b18329"})),this.showFooter&&i("div",{key:"cc3b19ba0ab16fd485f2c4e81a5793a25cecb98f",class:"dialog-footer"},i("slot",{key:"906adc00a3735e096159002b972804cfe147f42e",name:"footer"},this.showCancelBtn&&i("button",{key:"1fc68b04c7c39ca9b7dfb228836eb38c4368c355",class:"cancel-btn",onClick:this.handleClose.bind(this)},U("cancel",this.language)),i("button",{key:"1d054ca93148286249d4989c783a67e1afe33667",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},U("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};A.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-gray-400, #fff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";export{v as lottery_oddsbom_bullet,w as lottery_oddsbom_bullet_group,I as lottery_oddsbom_oddschart,_ as lottery_oddsbom_oddschart_input,j as lottery_oddsbom_ticket_board,M as lottery_oddsbom_ticket_button,D as lottery_oddsbom_ticket_selection,A as lottery_tipping_dialog}
1
+ import{r as t,c as e,h as i,g as o}from"./index-9dee9d86.js";import{s as n,a as s,b as d,c as a,t as l,d as r,r as c,f as h,g as m,M as b}from"./lottery-oddsbom-ticket-bet-71eb06e5.js";export{L as lottery_oddsbom_ticket_bet}from"./lottery-oddsbom-ticket-bet-71eb06e5.js";const p={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 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var g=function(){return g=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},g.apply(this,arguments)},f={primaryColor:"#333",secondaryColor:"#E6E6E6"};function u(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var i=e.placeholders||f;return y(t.icon(i.primaryColor,i.secondaryColor),e)}return y(t.icon,e)}function y(t,e){var i="svg"===t.tag?g(g({},t.attrs),e.extraSVGAttrs||{}):t.attrs,o=Object.keys(i).reduce((function(t,e){var o=i[e],n="".concat(e,'="').concat(o,'"');return t.push(n),t}),[]),n=o.length?" "+o.join(" "):"",s=(t.children||[]).map((function(t){return y(t,e)})).join("");return s&&s.length?"<".concat(t.tag).concat(n,">").concat(s,"</").concat(t.tag,">"):"<".concat(t.tag).concat(n," />")}const x=u({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-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-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),v=class{constructor(i){t(this,i),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return i("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},i("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},i("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:x}),i("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};v.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";const w=class{constructor(i){t(this,i),this.addSelectionEvent=e(this,"addSelection",7),this.deleteSelectionEvent=e(this,"deleteSelection",7),this.deleteSelectionOriginEvent=e(this,"deleteSelectionOrigin",7),this.oddsbomBulletGroupToggleEvent=e(this,"oddsbomBulletGroupToggle",7),this.oddsbomBulletGroupAddedByMoreBtnDelEvent=e(this,"oddsbomBulletGroupAddedByMoreBtnDel",7),this.oddsbomBulletCallDialogFromGroupEvent=e(this,"oddsbomBulletCallDialogFromGroup",7),this.selectionIdx=void 0,this.matchIdx=void 0,this.bulletConfigs=[],this.bulletConfigsDeleteOrigin=[],this.addSelectionConfig=void 0,this.isDeleteByIcon=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.bulletListClass=void 0,this.innerBulletConfigs=void 0,this.innerBulletConfigsDeleteOrigin=void 0}handleBulletConfigsChange(t){this.innerBulletConfigs=t.map((t=>Object.assign({},t)))}handleBulletConfigsDeleteOriginChange(t){this.innerBulletConfigsDeleteOrigin=t.map((t=>Object.assign({},t)))}componentWillLoad(){this.handleBulletConfigsChange(this.bulletConfigs)}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}oddsbomBulletToggleHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:o}=this,n=[...this.innerBulletConfigs],s=Object.assign({},n[e]);s.isSelected=!s.isSelected,n[e]=s,this.innerBulletConfigs=n,this.oddsbomBulletGroupToggleEvent.emit({bulletSelctionArr:this.innerBulletConfigs,matchIdx:i,selectionIdx:o})}oddsbomBulletDeleteHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:o}=this,n=[...this.innerBulletConfigsDeleteOrigin],s=Object.assign({},n[e]);s.isSelected=!s.isSelected,n[e]=s,this.innerBulletConfigsDeleteOrigin=n,this.oddsbomBulletGroupToggleEvent.emit({bulletSelctionArr:this.innerBulletConfigsDeleteOrigin,matchIdx:i,selectionIdx:o})}oddsbomBulletAddedByMoreBtnDeleteHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:o}=this;this.oddsbomBulletGroupAddedByMoreBtnDelEvent.emit({delText:e,matchIdx:i,selectionIdx:o})}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleOddsbomBulletCallDialog(){const{matchIdx:t,selectionIdx:e}=this;this.oddsbomBulletCallDialogFromGroupEvent.emit({matchIdx:t,selectionIdx:e})}render(){return i("div",{key:"38102a447cf8fafc8f7a7e5a122c7ccbc2ce8b4a",class:"oddsbomBulletGroup",ref:t=>this.stylingContainer=t},i("div",{key:"59ca1df498575356eb3438b45e9431b1bc7ee2dd",class:`oddsbomBulletGroup-list ${this.bulletListClass||""}`},this.innerBulletConfigs.map((t=>i("lottery-oddsbom-bullet",t.isAddMoreBtn?{text:`${this.addSelectionConfig.maxOverScore}+`,disabled:t.isDisabled,isCallDialogBtn:!0,onOddsbomBulletCallDialog:this.handleOddsbomBulletCallDialog.bind(this)}:{text:t.text,idx:t.idx,isSelected:t.isSelected,disabled:t.isDisabled,isDeleteByIcon:this.isDeleteByIcon,isAddedByMoreBtn:t.isAddedByMoreBtn})))))}static get watchers(){return{bulletConfigs:["handleBulletConfigsChange"],bulletConfigsDeleteOrigin:["handleBulletConfigsDeleteOriginChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};w.style=".oddsbomBulletGroup{width:100%}.oddsbomBulletGroup .oddsbomBulletGroup-list{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.oddsbomBulletGroup .selection-bullet-list{justify-content:flex-end}";const k=u({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),S=u(p,{extraSVGAttrs:{width:"18px",height:"18px",fill:"#0d196e"}}),C=u(p,{extraSVGAttrs:{width:"16px",height:"16px",fill:"#1367e7"}}),B=u({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:"16px",height:"16px",fill:""}}),O=u({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:"16px",height:"16px",fill:""}}),I=class{constructor(i){t(this,i),this.oddsQueryLineChangeEvent=e(this,"oddsQueryLineChange",7),this.oddschartFillInEvent=e(this,"oddschartFillIn",7),this.oddsQueryChangeEvent=e(this,"oddsQueryChange",7),this.handleSearch=async()=>{const t=this.matchItemsContainer.querySelectorAll("lottery-oddsbom-oddschart-input"),e=await Promise.all(Array.from(t).map((t=>t.getValue())));if(e.length!=2*this.matchInfo.length)return void a({theme:"warning",message:l("pleaseFillIn",this.language)});const i=[...this.matchSelection],o=[];for(let t=0;t<e.length;t+=2){const n=e[t],s=e[t+1],d=t/2;n&&s&&(o.push([[`${n}:${s}`]]),i[d]=[n,s])}if(this.matchSelection=[...i],o.length>0){const t=await r(JSON.stringify(o));this.oddsQueryLineChangeEvent.emit({lineSelectionBase64:t,offset:0}),this.hasFillInSelection=!0}},this.handleGroupClick=t=>{this.selectedGroupIndex=t},this.toggleFilterIcon=()=>{this.isAscend=!this.isAscend,this.selectedGroupIndex=-1,this.oddsQueryChangeEvent.emit({ascending:this.isAscend,offset:0,lineSelectionBase64:""})},this.handlePrevPage=()=>{this.curPage>=1&&(this.selectedGroupIndex=-1,this.oddsQueryChangeEvent.emit({offset:this.offset-this.limit,lineSelectionBase64:""}))},this.handleNextPage=()=>{this.curPage<this.totalPage-1&&(this.selectedGroupIndex=-1,this.oddsQueryChangeEvent.emit({offset:this.offset+this.limit,lineSelectionBase64:""}))},this.matchInfo=void 0,this.oddsInfo=void 0,this.total=void 0,this.curPage=void 0,this.limit=void 0,this.offset=void 0,this.filterdOdds=void 0,this.isSearching=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.isLoading=!1,this.language="en",this.translationUrl="",this.isAscend=!0,this.selectedGroupIndex=-1,this.matchSelection=[],this.hasFillInSelection=!1}async initOddsChart(){this.oddsQueryChangeEvent.emit({offset:0,ascending:!0,lineSelectionBase64:""})}async closeOddsChart(){this.hasFillInSelection=!1,this.selectedGroupIndex=-1,this.matchSelection=[],this.isAscend=!0,this.matchItemsContainer&&this.matchItemsContainer.querySelectorAll("lottery-oddsbom-oddschart-input").forEach((t=>{t.clearValue()}))}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}handleMatchInfoChange(t){this.matchSelection=t.map((()=>[-1,-1]))}componentWillLoad(){this.translationUrl&&c(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get totalPage(){return Math.ceil(this.total/this.limit)}generateBulletGroup(t,e,o){let n;try{n=JSON.parse(t)}catch(t){return console.error("Failed to parse line JSON:",t),i("div",{class:"error-message"},"Invalid data format")}let s=n.map((t=>t[0])).map((t=>t[0]));const d=this.selectedGroupIndex===o;return i("div",{class:"oddsbom-oddschart-selection--group",onClick:this.handleGroupClick.bind(this,o)},i("div",{class:"oddsbom-oddschart-selection--group-wrap",style:{flexBasis:160*s.length+"px"}},s.map(((t,e)=>{const o=t.split(":");return i("div",{class:"oddsbom-oddschart-selection-item",key:e},i("div",{class:"oddsbom-oddschart-selection-item--1"},i("lottery-oddsbom-bullet",{text:o[0],"is-reading":!0,"is-selected":d})),i("div",{class:"oddsbom-oddschart-selection-item--2"},i("lottery-oddsbom-bullet",{text:o[1],"is-reading":!0,"is-selected":d})))}))),i("div",{class:"oddsbom-oddschart-selection-odds"},i("div",{class:"oddsbom-oddschart-selection-odds--text"},h(e)),d&&i("div",{class:"oddsbom-oddschart-selection-odds--fillIn"},i("lottery-oddsbom-ticket-button",{text:l("fillIn",this.language),size:"small",variant:"outline",onClick:this.handleFillIn.bind(this,s),language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrl}))))}handleFillIn(t){this.oddschartFillInEvent.emit({fillInNums:t})}clearMatchSelection(){this.hasFillInSelection=!1,this.matchItemsContainer&&this.matchItemsContainer.querySelectorAll("lottery-oddsbom-oddschart-input").forEach((t=>{t.clearValue()}))}fillInMatchSelection(){const t=[];this.matchSelection.forEach((e=>{t.push(`${e[0]}:${e[1]}`)})),this.handleFillIn(t)}render(){var t,e;return i("div",{key:"b160d1870184937cdd013a233a4841545d8f769a",class:"oddsbom-oddschart",ref:t=>this.stylingContainer=t},(null===(t=this.matchInfo)||void 0===t?void 0:t.length)&&(null===(e=this.oddsInfo)||void 0===e?void 0:e.length)?this.matchInfo&&i("div",{class:"oddsbom-oddschart-container"},i("div",{class:"oddsbom-oddschart-wrap"},i("div",{class:"oddsbom-oddschart-match",ref:t=>this.matchItemsContainer=t},this.matchInfo.map(((t,e)=>i("div",{class:"oddsbom-oddschart-match-item",key:e},i("div",{class:"oddsbom-oddschart-match-item-name"},i("div",{class:"oddsbom-oddschart-match-item-name--home"},`${e+1}. ${t.eventName.split("vs")[0]}`),i("div",{class:"oddsbom-oddschart-match-item-name--delimiter"},"vs"),i("div",{class:"oddsbom-oddschart-match-item-name--away"},`${t.eventName.split("vs")[1]}`)),i("div",{class:"oddsbom-oddschart-match-item-input"},i("lottery-oddsbom-oddschart-input",null),i("lottery-oddsbom-oddschart-input",null))))),i("div",{class:"oddsbom-oddschart-match-search"},i("lottery-oddsbom-ticket-button",{text:l("search",this.language),variant:"outline",onClick:this.handleSearch}))),this.hasFillInSelection&&!this.isSearching&&(this.filterdOdds?i("div",{class:"oddsbom-oddschart-input-wrap"},i("div",{class:"oddsbom-oddschart-input"},this.matchSelection.map((t=>i("div",{class:"oddsbom-oddschart-input-item"},i("lottery-oddsbom-bullet",{text:t[0],"is-reading":!0,"is-selected":!0}),i("lottery-oddsbom-bullet",{text:t[1],"is-reading":!0,"is-selected":!0})))),i("div",{class:"oddsbom-oddschart-input-odds"},h(this.filterdOdds))),i("div",{class:"oddsbom-oddschart-input-operation"},i("lottery-oddsbom-ticket-button",{text:l("clear",this.language),variant:"outline",size:"small",onClick:this.clearMatchSelection.bind(this)}),i("lottery-oddsbom-ticket-button",{text:l("fillIn",this.language),variant:"outline",size:"small",onClick:this.fillInMatchSelection.bind(this)}))):i("div",{class:"oddsbom-oddschart-input-empty"},i("div",null,i("span",{innerHTML:C,style:{marginRight:"6px",height:"16px"}}),i("span",{style:{fontSize:"14px"}},l("noBets",this.language))),i("div",{class:"oddsbom-oddschart-input-empty-operation"},i("lottery-oddsbom-ticket-button",{text:l("clear",this.language),variant:"text",size:"small",onClick:this.clearMatchSelection.bind(this)}),i("lottery-oddsbom-ticket-button",{text:l("fillIn",this.language),variant:"text",size:"small",onClick:this.fillInMatchSelection.bind(this)})))),i("div",{class:"oddsbom-oddschart-match-filter"},(this.isLoading||this.isSearching)&&i("div",{class:"progress-bar"}),i("span",{onClick:this.toggleFilterIcon,class:"arrow "+(this.isAscend?"ascend":""),innerHTML:k})),i("div",{class:"oddsbom-oddschart-selection"},this.oddsInfo.map(((t,e)=>this.generateBulletGroup(t.lineSelection,t.odds,e)))),i("div",{class:"oddsbom-oddschart-pagination"},i("div",{class:"oddsbom-oddschart-pagination-wrap"},i("div",{class:"oddsbom-oddschart-pagination-prev "+(this.curPage<1?"disabled":""),onClick:this.handlePrevPage},i("div",{class:"oddsbom-oddschart-pagination-icon",innerHTML:B})),i("div",{class:"oddsbom-oddschart-pagination-page"},`${this.curPage+1} / ${this.totalPage}`),i("div",{class:"oddsbom-oddschart-pagination-next "+(this.curPage>=this.totalPage-1?"disabled":""),onClick:this.handleNextPage},i("div",{class:"oddsbom-oddschart-pagination-icon",innerHTML:O})))))):i("div",{class:"empty-wrap"},i("span",{innerHTML:S,style:{marginRight:"6px",height:"18px"}}),i("span",{class:"empty-wrap-text",style:{fontSize:"18px"}},l("noBets",this.language))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],matchInfo:["handleMatchInfoChange"]}}};I.style='.oddsbom-oddschart {\n container-type: inline-size;\n}\n.oddsbom-oddschart-container {\n position: relative;\n}\n.oddsbom-oddschart-match {\n display: flex;\n align-items: flex-end;\n margin-bottom: 4px;\n}\n.oddsbom-oddschart-match-item {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-basis: 160px;\n}\n.oddsbom-oddschart-match-item-name {\n margin-bottom: 8px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.oddsbom-oddschart-match-item-name--home, .oddsbom-oddschart-match-item-name--away, .oddsbom-oddschart-match-item-name--delimiter {\n font-size: 13px;\n height: 16px;\n line-height: 16px;\n overflow: hidden;\n color: var(--emw--color-typography, #000);\n}\n.oddsbom-oddschart-match-item-input {\n display: flex;\n justify-content: space-between;\n}\n.oddsbom-oddschart-match-search {\n flex-basis: 130px;\n text-align: center;\n}\n.oddsbom-oddschart-match-filter {\n display: flex;\n justify-content: flex-end;\n padding: 2px;\n position: relative;\n padding-top: 4px;\n border-top: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.oddsbom-oddschart-input {\n display: flex;\n margin-top: 4px;\n}\n.oddsbom-oddschart-input-empty {\n padding: 12px;\n border: 1px solid var(--emw--color-primary-variant, #1367e7);\n background-color: var(--emw--color-tertiary, #e3f2fd);\n width: 50%;\n min-width: 240px;\n max-width: 360px;\n margin: 4px auto;\n border-radius: 6px;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n}\n.oddsbom-oddschart-input-empty-operation {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-top: 4px;\n}\n.oddsbom-oddschart-input-wrap {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-bottom: 4px;\n}\n.oddsbom-oddschart-input-item {\n display: flex;\n align-items: center;\n flex-basis: 160px;\n justify-content: center;\n gap: 5px;\n}\n.oddsbom-oddschart-input-odds {\n flex-basis: 130px;\n display: flex;\n align-items: center;\n font-size: 14px;\n text-indent: 16px;\n}\n.oddsbom-oddschart-input-operation {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 20px;\n}\n.oddsbom-oddschart-selection--group {\n display: flex;\n margin-bottom: 8px;\n}\n.oddsbom-oddschart-selection--group-wrap {\n display: flex;\n border-radius: 4px;\n}\n.oddsbom-oddschart-selection--group-wrap:hover {\n background: var(--emw--color-gray-50, #f5f5f5);\n cursor: pointer;\n}\n.oddsbom-oddschart-selection-item {\n display: flex;\n flex-basis: 160px;\n justify-content: center;\n gap: 10px;\n}\n.oddsbom-oddschart-selection-odds {\n display: flex;\n gap: 12px;\n align-items: center;\n flex-basis: 130px;\n position: relative;\n text-indent: 16px;\n}\n.oddsbom-oddschart-selection-odds--text {\n font-size: 14px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbom-oddschart-selection-odds--fillIn {\n position: absolute;\n right: 0;\n}\n@container (max-width: 430px) {\n .oddsbom-oddschart .oddsbom-oddschart-selection-odds {\n text-indent: unset;\n }\n .oddsbom-oddschart .oddsbom-oddschart-selection-odds--fillIn {\n right: -22px;\n }\n .oddsbom-oddschart .oddsbom-oddschart-selection-item {\n gap: 4px;\n }\n}\n.oddsbom-oddschart .arrow {\n transition: transform 0.3s ease;\n font-size: 16px;\n display: inline-flex;\n cursor: pointer;\n fill: var(--emw--color-typography, #000);\n display: flex;\n justify-content: center;\n flex-basis: 130px;\n}\n.oddsbom-oddschart .arrow.ascend {\n transform: rotate(180deg);\n}\n\n.empty-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.empty-wrap-text {\n color: var(--emw--color-typography, #000);\n}\n\n.oddsbom-oddschart-pagination {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n margin-top: 10px;\n padding-right: 16px;\n}\n.oddsbom-oddschart-pagination-wrap {\n display: flex;\n align-items: center;\n gap: 12px;\n height: 18px;\n}\n.oddsbom-oddschart-pagination-prev, .oddsbom-oddschart-pagination-next {\n cursor: pointer;\n}\n.oddsbom-oddschart-pagination-prev.disabled, .oddsbom-oddschart-pagination-next.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n.oddsbom-oddschart-pagination-icon {\n display: flex;\n height: 18px;\n align-items: center;\n fill: var(--emw--color-typography, #000);\n}\n.oddsbom-oddschart-pagination-page {\n font-size: 14px;\n color: var(--emw--color-typography, #000);\n}\n\n.progress-bar {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: var(--emw--color-gray-100, #e6e6e6);\n overflow: hidden;\n}\n.progress-bar::after {\n content: "";\n display: block;\n width: 20%;\n height: 100%;\n background-color: var(--emw--color-primary, #0d196e);\n animation: progress 1.5s linear infinite;\n}\n\n@keyframes progress {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(500%);\n }\n}';const _=class{constructor(i){t(this,i),this.valueChange=e(this,"valueChange",7),this.handleInputChange=t=>{const e=t.target.value.trim();this.valueChange.emit(e)},this.handleKeyDown=t=>{"Enter"===t.key&&this.inputElement.blur()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.value=""}async getValue(){return this.inputElement.value}async clearValue(){this.inputElement&&(this.inputElement.value=""),this.value=""}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"eb973f7978b7452788f72a43da5424abbe845361",class:"oddscharts-input",ref:t=>this.stylingContainer=t},i("input",{key:"f24fba10175b944af328b71f8e257d8ad1386af2",ref:t=>this.inputElement=t,type:"text",inputMode:"numeric",value:this.value,onInput:this.handleInputChange,onKeyDown:this.handleKeyDown,autocomplete:"one-time-code"}))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};_.style=".oddscharts-input{display:inline-flex;padding:2px}.oddscharts-input input{width:32px;height:32px;text-align:center;font-size:14px;font-weight:bold;line-height:32px;border:2px solid var(--emw--color-gray-100, #e6e6e6);border-radius:4px;padding:0;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);text-transform:uppercase}.oddscharts-input input:focus{outline:none;border-color:var(--emw--color-primary, #0d196e);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));border-width:2px}.oddscharts-input input:disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed}.oddscharts-input input.error{border-color:var(--emw--color-error, #ff3d00)}.oddscharts-input input.error:focus{box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}";const j=class{constructor(i){t(this,i),this.oddsbomBoardClearEvent=e(this,"oddsbomBoardClear",7),this.oddsbomAddMoreToMatchEvent=e(this,"oddsbomAddMoreToMatch",7),this.ticketBoardInfo=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.addSelectionConfig=void 0,this.bulletsConfig=void 0,this.isInputInvalid=!1,this.errorMessage="",this.dialogConfig={width:"400px",visible:!1,onConfirm:()=>this.handleFillInAddMore(),onCancel:()=>this.handleCloseAddMoreDialog()},this.curAddMoreInfo={matchIdx:0,selectionIdx:0,value:""}}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&m(JSON.parse(this.translationUrl))}handleOddsbomBulletGroupToggle(t){const{bulletConfigArr:e}=t.detail;this.bulletsConfig=e}handleOddsbomBulletCallDialogFromGroup(t){const{matchIdx:e,selectionIdx:i}=t.detail;this.curAddMoreInfo=Object.assign(Object.assign({},this.curAddMoreInfo),{matchIdx:e,selectionIdx:i}),this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!0})}handleFillInAddMore(){if(this.isInputInvalid)return void this.handleCloseAddMoreDialog();const{matchIdx:t,selectionIdx:e,value:i}=this.curAddMoreInfo;this.oddsbomAddMoreToMatchEvent.emit({matchIdx:t,selectionIdx:e,value:i}),this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!1}),this.curAddMoreInfo=Object.assign(Object.assign({},this.curAddMoreInfo),{value:""})}handleCloseAddMoreDialog(){this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!1}),this.curAddMoreInfo=Object.assign(Object.assign({},this.curAddMoreInfo),{value:""}),this.isInputInvalid=!1,this.errorMessage=""}handleClearAllSelection(){this.oddsbomBoardClearEvent.emit(),a({message:l("selectionCleared",this.language)})}validateInput(t){const e=Number(t);if(isNaN(e))return this.isInputInvalid=!0,void(this.errorMessage=l("enterValidNumber",this.language));if(e<b||e>this.addSelectionConfig.maxScore)return this.isInputInvalid=!0,void(this.errorMessage=l("enterNumberBetween",this.language,{min:b,max:this.addSelectionConfig.maxScore}));const{matchIdx:i,selectionIdx:o}=this.curAddMoreInfo;if(this.ticketBoardInfo[i].addSelections[o].some((e=>Number(e)===Number(t))))return this.isInputInvalid=!0,void(this.errorMessage=l("numberAlreadySelected",this.language));this.isInputInvalid=!1,this.errorMessage=""}handleInputChange(t){const e=t.target.value;this.curAddMoreInfo=Object.assign(Object.assign({},this.curAddMoreInfo),{value:e}),this.validateInput(e)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"7cacb40559ce42eed5c03326d830461c9dbd2708",class:"oddsbomTicketBoard",ref:t=>this.stylingContainer=t},i("div",{key:"b1c7f38a621320949049f26745232d2a34d644e8",class:"oddsbomTicketBoard-btn"},i("lottery-oddsbom-ticket-button",{key:"ff6c51b5a115cf46e4fc6df5b725a8233a55fa0f",onClick:this.handleClearAllSelection.bind(this),text:l("clearAll",this.language),variant:"outline"})),this.ticketBoardInfo.length?i("div",{class:"oddsbomTicketBoard-list"},this.ticketBoardInfo.map(((t,e)=>i("div",{class:"oddsbomTicketBoard-item"},i("div",{class:"oddsbomTicketBoard-item-header"},`${e+1}. ${t.matchName}`),i("div",{class:"oddsbomTicketBoard-item-match"},i("div",{class:"oddsbomTicketBoard-item-match--left"},t.matchName.split("vs")[0]),i("div",{class:"oddsbomTicketBoard-item-match--right"},i("lottery-oddsbom-bullet-group",{bulletConfigs:t.selections[0],selectionIdx:0,matchIdx:e,addSelectionConfig:this.addSelectionConfig}))),i("div",{class:"oddsbomTicketBoard-item-match"},i("div",{class:"oddsbomTicketBoard-item-match--left"},t.matchName.split("vs")[1]),i("div",{class:"oddsbomTicketBoard-item-match--right"},i("lottery-oddsbom-bullet-group",{bulletConfigs:t.selections[1],selectionIdx:1,matchIdx:e,addSelectionConfig:this.addSelectionConfig}))))))):i("div",{class:"oddsbomTicketBoard-noData"},l("noTicketBoard",this.language)),i("lottery-tipping-dialog",{key:"dbaf34154fcf9a16d3210f03345d80c4a5354125",visible:this.dialogConfig.visible,width:this.dialogConfig.width,onCancel:this.handleCloseAddMoreDialog.bind(this)},i("div",{key:"93370ed84ff6e3483214307e45cb46f767712343",class:"addSelectionDialog"},i("div",{key:"ec774960c7f0bc25dc2d2e55d7b185d520dbbe27",class:"addSelectionDialog-title"},l("enterScoreUpTo",this.language,{maxScore:this.addSelectionConfig.maxScore})),i("input",{key:"d21da9e15f671a9790b343674af722394c5599ce",type:"text",class:{"dialog-input":!0,invalid:this.isInputInvalid},value:this.curAddMoreInfo.value,onInput:this.handleInputChange.bind(this)}),i("div",{key:"ebe2c70cd8a5ba10bdfdc99178356677cd076621",class:"error-message"},this.errorMessage)),i("div",{key:"31ff21b79c853c9f46fc8e8ba0f33b39bf2cda4f",slot:"footer",class:"addSelectionDialog-footer"},i("lottery-oddsbom-ticket-button",{key:"34a4edbfae9233b0ee47ffd929901ad7fe991ffe",onClick:this.dialogConfig.onCancel,text:l("cancel",this.language),variant:"outline"}),i("lottery-oddsbom-ticket-button",{key:"d0ff9fb20917bd30d88b2aaa87cb863069a88328",onClick:this.dialogConfig.onConfirm,text:l("confirm",this.language),variant:"primary",disabled:!this.curAddMoreInfo.value}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};j.style=".oddsbomTicketBoard {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n border-radius: 4px;\n container-type: inline-size;\n min-height: 220px;\n}\n.oddsbomTicketBoard-noData {\n display: flex;\n justify-content: center;\n height: 200px;\n align-items: center;\n}\n.oddsbomTicketBoard-btn {\n display: flex;\n justify-content: flex-end;\n margin: 16px;\n margin-bottom: unset;\n}\n.oddsbomTicketBoard-item {\n display: flex;\n gap: 16px;\n flex-direction: column;\n padding: 24px;\n}\n.oddsbomTicketBoard-item:not(:last-child) {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n.oddsbomTicketBoard-item-header {\n font-weight: bold;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomTicketBoard-item-match {\n display: flex;\n align-items: center;\n}\n.oddsbomTicketBoard-item-match--left {\n width: 130px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomTicketBoard-item-match--right {\n flex: 1;\n display: flex;\n align-items: center;\n gap: 12px;\n justify-content: space-evenly;\n}\n@container (max-width: 320px) {\n .oddsbomTicketBoard-item-match--left {\n width: 100px;\n max-width: 100px;\n }\n}\n\n.dialog-input {\n width: 100%;\n padding: 8px;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n border-radius: 4px;\n box-sizing: border-box;\n margin-top: 10px;\n}\n\n.dialog-input.invalid,\n.dialog-input.invalid:focus {\n border-color: var(--emw--color-error, #ff3d00);\n outline-color: var(--emw--color-error, #ff3d00);\n}\n\n.error-message {\n color: var(--emw--color-error, #ff3d00);\n font-size: 12px;\n margin-top: 4px;\n}\n\n.addSelectionDialog-title {\n color: var(--emw--color-typography, #000);\n}\n.addSelectionDialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 18px;\n}";const M=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const i=e.getBoundingClientRect(),o=Math.max(i.width,i.height),n={top:t.clientY-i.top-o/2,left:t.clientX-i.left-o/2,size:o};this.ripples=[...this.ripples,n],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==n))}),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&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){this.translationUrl&&c(this.translationUrl)}render(){const{variant:t,disabled:e,size:o}=this,n=e||this.loading;return i("button",{key:"c0c87c36c7c3f48286729c9133eded8338f137be",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${o}`]:!0,"btn--loading":this.loading},disabled:n,onClick:this.handleClick},this.loading?i("div",{class:"loading-container"},i("span",{class:"content"},this.text||l("loading",this.language)),i("span",{class:"spinner"})):i("span",{class:"content"},this.text),i("div",{key:"8276ad215063ef4217b11f65fb189d6fcccd1f24",class:"ripple-container"},this.ripples.map(((t,e)=>i("span",{key:e,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};M.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 z=u({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),D=class{constructor(e){t(this,e),this.togglePanel=()=>{this.expanded=!this.expanded},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.ticketBoardInfo=void 0,this.language="en",this.expanded=!1,this._ticketBoardInfo=[]}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this._ticketBoardInfo=JSON.parse(JSON.stringify(this.ticketBoardInfo))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleTicketBoradInfoChange(t){this._ticketBoardInfo=JSON.parse(JSON.stringify(t))}generateMatchItemSelection(t,e,o,n,s,d,a){return i("div",{class:"oddsbomSelection-item"},i("div",{class:"oddsbomSelection-item-number"},o+1),i("div",{class:"oddsbomSelection-item-selection"},i("div",{class:"oddsbomSelection-item-team"},i("div",{class:"oddsbomSelection-item-team-name"},t),i("div",{class:"oddsbomSelection-item-team-selection"},i("lottery-oddsbom-bullet-group",{bulletConfigs:n,selectionIdx:0,matchIdx:o,bulletConfigsDeleteOrigin:d,isDeleteByIcon:!0,bulletListClass:"selection-bullet-list"}))),i("div",{class:"oddsbomSelection-item-team"},i("div",{class:"oddsbomSelection-item-team-name"},e),i("div",{class:"oddsbomSelection-item-team-selection"},i("lottery-oddsbom-bullet-group",{bulletConfigs:s,selectionIdx:1,matchIdx:o,bulletConfigsDeleteOrigin:a,isDeleteByIcon:!0,bulletListClass:"selection-bullet-list"})))))}generateSelectionList(){return this._ticketBoardInfo?this._ticketBoardInfo.map(((t,e)=>{var i,o,n,s;const{matchName:d,selections:a}=t,l=d.split("vs")[0],r=d.split("vs")[1],c=a[0].filter((t=>t.isSelected)),h=a[1].filter((t=>t.isSelected)),m=null!==(o=null===(i=t.addSelections)||void 0===i?void 0:i[0])&&void 0!==o?o:[],b=null!==(s=null===(n=t.addSelections)||void 0===n?void 0:n[1])&&void 0!==s?s:[];return m.length>0&&m.forEach((t=>{c.push({text:t,idx:-1,isSelected:!0,isDisabled:!1,isAddedByMoreBtn:!0})})),b.length>0&&b.forEach((t=>{h.push({text:t,idx:-1,isSelected:!0,isDisabled:!1,isAddedByMoreBtn:!0})})),this.generateMatchItemSelection(l,r,e,c,h,a[0],a[1])})):null}render(){return i("div",{key:"8e359b773654d6a1632f69837009ccc29d547561",class:"oddsbomSelection",ref:t=>this.stylingContainer=t},i("div",{key:"93c2575de9e70759118f4d4702f356322c2bcb88",class:"oddsbomSelection-panel"},i("div",{key:"2df0bf1be465b9baa00f44052c623071f78d799d",class:"oddsbomSelection-panel--header",onClick:this.togglePanel},i("div",{key:"c32a79afcab02f683ffb8abc26395e098b080939",class:"oddsbomSelection-panel--header-title"},l("myChoices",this.language)),i("div",{key:"de2b875b0fc538212d15cb7dde2c95b10d49665a",class:"oddsbomSelection-panel--header-icon "+(this.expanded?"expanded":""),innerHTML:z})),i("div",{key:"4a51e00f8ab67d9ab6c1cfd25d47f93c79d7a4bf",class:"oddsbomSelection-panel--content "+(this.expanded?"open":"closed")},i("div",{key:"9f9575c3bb176769cee836c9cf027fc76580b367",class:"oddsbomSelection-panel--content-thead"},i("div",{key:"3dd762c94c915afc9f14b38fdaec73a42b56004e",class:"oddsbomSelection-panel--content-thead-item"},l("teams",this.language)),i("div",{key:"2ea960a6db72e11a7e9157871f70769174f722f0",class:"oddsbomSelection-panel--content-thead-item"},l("scores",this.language))),i("div",{key:"847ef04f0a9e289c796a856c3d16bebc83d2d188",class:"oddsbomSelection-panel--content-tbody"},this.generateSelectionList()))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],ticketBoardInfo:["handleTicketBoradInfoChange"]}}};D.style=".oddsbomSelection {\n container-type: inline-size;\n}\n.oddsbomSelection-panel--header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n height: 40px;\n padding: 0 4px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomSelection-panel--header:hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n border-radius: 4px;\n}\n.oddsbomSelection-panel--header-title {\n font-size: 16px;\n font-weight: 600;\n user-select: none;\n}\n.oddsbomSelection-panel--header-icon {\n transition: transform 0.2s;\n}\n.oddsbomSelection-panel--header-icon.expanded {\n transform: rotate(180deg);\n}\n.oddsbomSelection-panel--content {\n overflow: hidden;\n max-height: 0;\n transition: max-height 0.3s ease, padding 0.3s ease;\n padding: 0 12px;\n font-size: 14px;\n user-select: none;\n}\n.oddsbomSelection-panel--content.open {\n max-height: 19000px;\n padding: 10px 12px;\n background-color: var(--emw--color-background, #fff);\n}\n.oddsbomSelection-panel--content.closed {\n max-height: 0;\n padding-top: 0;\n padding-bottom: 0;\n}\n.oddsbomSelection-panel--content-thead {\n display: flex;\n justify-content: space-between;\n padding: 0 24px;\n margin-bottom: 12px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomSelection-panel--content-tbody {\n padding: 0 18px;\n}\n.oddsbomSelection-item {\n display: flex;\n justify-content: space-between;\n position: relative;\n padding: 8px;\n}\n.oddsbomSelection-item:not(:last-child) {\n border-bottom: 1px dashed var(--emw--color-gray-100, #e6e6e6);\n}\n.oddsbomSelection-item-number {\n position: absolute;\n left: -18px;\n top: 48%;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomSelection-item-selection {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n.oddsbomSelection-item-team {\n display: flex;\n justify-content: space-between;\n align-items: center;\n min-height: 32px;\n color: var();\n}\n.oddsbomSelection-item-team-name {\n max-width: 140px;\n width: 140px;\n color: var(--emw--color-typography, #000);\n}\n.oddsbomSelection-item-team-selection {\n display: flex;\n gap: 6px;\n flex: 1;\n justify-content: flex-end;\n}\n@container (max-width: 430px) {\n .oddsbomSelection-item-team-name {\n max-width: 80px;\n width: 80px;\n }\n}\n\n.oddsbomSelection-panel--header-icon {\n fill: var(--emw--color-typography, #000);\n}";const T=["ro","en","fr","ar","hr"],$={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},U=(t,e)=>{const i=e;return $[void 0!==i&&T.includes(i)?i:"en"][t]},A=class{constructor(i){t(this,i),this.open=e(this,"open",7),this.close=e(this,"close",7),this.confirm=e(this,"confirm",7),this.cancel=e(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const o=await i.json();e=o,Object.keys(e).forEach((t=>{for(let i in e[t])$[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(t){this.maskClosable&&t.target===this.el.querySelector(".mask")&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const t={width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},e=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],o=["mask",this.visible?"mask-enter":"mask-leave"],n=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":""].join(" ");return i("div",{key:"716c6488b86fc5a74bcd8c8c8a4eee1b85f75cb7",class:e.join(" "),ref:t=>this.stylingContainer=t},i("div",{key:"161d976b5a15f62c63b56555e161b5b29c0a7771",class:o.join(" "),onClick:this.handleMaskClick.bind(this)}),i("div",{key:"ebd2c356c169765b06c85997dc9906b74358b450",class:n,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},i("div",{key:"2a8616c336447b33d3c4b3f22deee3871abd93c9",class:"dialog-header"},i("h2",{key:"fc4f4f87826620754f8cce73874726cdebcc280e",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&i("button",{key:"1626434c0700df7dc094cbf0c96840476ab65da5",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),i("div",{key:"44d28c0e477e3e16069749f7700ee70b6a486d07",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},i("slot",{key:"745e1329fc3647247245f7aa96d10a06b6b18329"})),this.showFooter&&i("div",{key:"cc3b19ba0ab16fd485f2c4e81a5793a25cecb98f",class:"dialog-footer"},i("slot",{key:"906adc00a3735e096159002b972804cfe147f42e",name:"footer"},this.showCancelBtn&&i("button",{key:"1fc68b04c7c39ca9b7dfb228836eb38c4368c355",class:"cancel-btn",onClick:this.handleClose.bind(this)},U("cancel",this.language)),i("button",{key:"1d054ca93148286249d4989c783a67e1afe33667",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},U("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};A.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-gray-400, #fff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";export{v as lottery_oddsbom_bullet,w as lottery_oddsbom_bullet_group,I as lottery_oddsbom_oddschart,_ as lottery_oddsbom_oddschart_input,j as lottery_oddsbom_ticket_board,M as lottery_oddsbom_ticket_button,D as lottery_oddsbom_ticket_selection,A as lottery_tipping_dialog}
@@ -1,4 +1,4 @@
1
- import{r as t,h as e}from"./index-9dee9d86.js";function i(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 o(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function a(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function l(t){a(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===r(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var h={};function d(){return h}function c(t){a(1,arguments);var e=l(t);return e.setHours(0,0,0,0),e}var u=36e5;function p(t){a(1,arguments);var e=l(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function m(t){a(1,arguments);var e=l(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var o=p(s),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var n=p(r);return e.getTime()>=o.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function v(t,e){var i,s,o,r,h,c,u,p;a(1,arguments);var m=d(),v=n(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(h=e.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:m.weekStartsOn)&&void 0!==s?s:null===(u=m.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==i?i:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=l(t),b=f.getUTCDay(),g=(b<v?7:0)+b-v;return f.setUTCDate(f.getUTCDate()-g),f.setUTCHours(0,0,0,0),f}function f(t,e){var i,s,o,r,h,c,u,p;a(1,arguments);var m=l(t),f=m.getUTCFullYear(),b=d(),g=n(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(h=e.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==o?o:b.firstWeekContainsDate)&&void 0!==s?s:null===(u=b.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,g),y.setUTCHours(0,0,0,0);var w=v(y,e),_=new Date(0);_.setUTCFullYear(f,0,g),_.setUTCHours(0,0,0,0);var x=v(_,e);return m.getTime()>=w.getTime()?f+1:m.getTime()>=x.getTime()?f:f-1}function b(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}const g=function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return b("yy"===e?s%100:s,e.length)},y=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):b(i+1,2)},w=function(t,e){return b(t.getUTCDate(),e.length)},_=function(t,e){return b(t.getUTCHours()%12||12,e.length)},x=function(t,e){return b(t.getUTCHours(),e.length)},k=function(t,e){return b(t.getUTCMinutes(),e.length)},C=function(t,e){return b(t.getUTCSeconds(),e.length)},A=function(t,e){var i=e.length,s=t.getUTCMilliseconds();return b(Math.floor(s*Math.pow(10,i-3)),e.length)};var S={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return g(t,e)},Y:function(t,e,i,s){var o=f(t,s),r=o>0?o:1-o;return"YY"===e?b(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):b(r,e.length)},R:function(t,e){return b(m(t),e.length)},u:function(t,e){return b(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return b(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return b(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return y(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return b(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var o=function(t,e){a(1,arguments);var i=l(t),s=v(i,e).getTime()-function(t,e){var i,s,o,r,l,h,c,u;a(1,arguments);var p=d(),m=n(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==o?o:p.firstWeekContainsDate)&&void 0!==s?s:null===(c=p.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==i?i:1),b=f(t,e),g=new Date(0);return g.setUTCFullYear(b,0,m),g.setUTCHours(0,0,0,0),v(g,e)}(i,e).getTime();return Math.round(s/6048e5)+1}(t,s);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):b(o,e.length)},I:function(t,e,i){var s=function(t){a(1,arguments);var e=l(t),i=p(e).getTime()-function(t){a(1,arguments);var e=m(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),p(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):b(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):w(t,e)},D:function(t,e,i){var s=function(t){a(1,arguments);var e=l(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):b(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return b(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return b(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),o=0===s?7:s;switch(e){case"i":return String(o);case"ii":return b(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,o=t.getUTCHours();switch(s=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,o=t.getUTCHours();switch(s=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return _(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):x(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):b(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):b(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):k(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):C(t,e)},S:function(t,e){return A(t,e)},X:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return T(o);case"XXXX":case"XX":return I(o);default:return I(o,":")}},x:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return T(o);case"xxxx":case"xx":return I(o);default:return I(o,":")}},O:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+z(o,":");default:return"GMT"+I(o,":")}},z:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+z(o,":");default:return"GMT"+I(o,":")}},t:function(t,e,i,s){return b(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return b((s._originalDate||t).getTime(),e.length)}};function z(t,e){var i=t>0?"-":"+",s=Math.abs(t),o=Math.floor(s/60),r=s%60;if(0===r)return i+String(o);var n=e||"";return i+String(o)+n+b(r,2)}function T(t,e){return t%60==0?(t>0?"-":"+")+b(Math.abs(t)/60,2):I(t,e)}function I(t,e){var i=e||"",s=t>0?"-":"+",o=Math.abs(t);return s+b(Math.floor(o/60),2)+i+b(o%60,2)}const D=S;var O=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},E=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},M={p:E,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],o=s[1],r=s[2];if(!r)return O(t,e);switch(o){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",O(o,e)).replace("{{time}}",E(r,e))}};const B=M;var P=["D","DD"],N=["YY","YYYY"];function j(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var F={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function $(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var R,L={date:$({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:$({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:$({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function V(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):o;s=t.formattingValues[r]||t.formattingValues[o]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function W(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,o=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var r,n=o[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const U={code:"en-US",formatDistance:function(t,e,i){var s,o=F[t];return s="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:L,formatRelative:function(t){return q[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:V({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:V({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:V({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:V({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:V({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(R={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(R.matchPattern);if(!i)return null;var s=i[0],o=t.match(R.parsePattern);if(!o)return null;var r=R.valueCallback?R.valueCallback(o[0]):o[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(s.length)}}),era:W({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:W({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:W({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:W({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:W({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var H=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Y=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,G=/^'([^]*?)'?$/,K=/''/g,J=/[a-zA-Z]/;function Q(t,e,i){var s,o,h,c,u,p,m,v,f,b,g,y,w,_,x,k,C,A;a(2,arguments);var S=String(e),z=d(),T=null!==(s=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:z.locale)&&void 0!==s?s:U,I=n(null!==(h=null!==(c=null!==(u=null!==(p=null==i?void 0:i.firstWeekContainsDate)&&void 0!==p?p:null==i||null===(m=i.locale)||void 0===m||null===(v=m.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==u?u:z.firstWeekContainsDate)&&void 0!==c?c:null===(f=z.locale)||void 0===f||null===(b=f.options)||void 0===b?void 0:b.firstWeekContainsDate)&&void 0!==h?h:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=n(null!==(g=null!==(y=null!==(w=null!==(_=null==i?void 0:i.weekStartsOn)&&void 0!==_?_:null==i||null===(x=i.locale)||void 0===x||null===(k=x.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:z.weekStartsOn)&&void 0!==y?y:null===(C=z.locale)||void 0===C||null===(A=C.options)||void 0===A?void 0:A.weekStartsOn)&&void 0!==g?g:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var E=l(t);if(!function(t){if(a(1,arguments),!function(t){return a(1,arguments),t instanceof Date||"object"===r(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=l(t);return!isNaN(Number(e))}(E))throw new RangeError("Invalid time value");var M=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(E),F=function(t,e){return a(2,arguments),function(t,e){a(2,arguments);var i=l(t).getTime(),s=n(e);return new Date(i+s)}(t,-n(e))}(E,M),$={firstWeekContainsDate:I,weekStartsOn:O,locale:T,_originalDate:E};return S.match(Y).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,B[e])(t,T.formatLong):t})).join("").match(H).map((function(s){if("''"===s)return"'";var o,r,n=s[0];if("'"===n)return(r=(o=s).match(G))?r[1].replace(K,"'"):o;var a=D[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===N.indexOf(s)||j(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==P.indexOf(s))||j(s,e,String(t)),a(F,s,T.localize,$);if(n.match(J))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return s})).join("")}var X={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Z=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,tt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,et=/^([+-])(\d{2})(?::?(\d{2}))?$/;function it(t){return t?parseInt(t):1}function st(t){return t&&parseFloat(t.replace(",","."))||0}var ot=[31,null,31,30,31,30,31,31,30,31,30,31];function rt(t){return t%400==0||t%4==0&&t%100!=0}function nt(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},s);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=n);const l={method:e,headers:a,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>t.ok?t.json():t.json().then((e=>{r({status:t.status,statusText:t.statusText,code:e.code||"UNKNOWN_ERROR",message:e.message||"An unknown error occurred",data:e.data||null})}),(()=>r({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>o(t)),(t=>r(t)))}))}const at=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},lt=({date:t,type:e="date",format:i})=>{try{const s=function(t,e){var i;a(1,arguments);var s=n(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==s&&1!==s&&0!==s)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var o,r=function(t){var e,i={},s=t.split(X.dateTimeDelimiter);if(s.length>2)return i;if(/:/.test(s[0])?e=s[0]:(i.date=s[0],e=s[1],X.timeZoneDelimiter.test(i.date)&&(i.date=t.split(X.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var o=X.timezone.exec(e);o?(i.time=e.replace(o[1],""),i.timezone=o[1]):i.time=e}return i}(t);if(r.date){var l=function(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),s=t.match(i);if(!s)return{year:NaN,restDateString:""};var o=s[1]?parseInt(s[1]):null,r=s[2]?parseInt(s[2]):null;return{year:null===r?o:100*r,restDateString:t.slice((s[1]||s[2]).length)}}(r.date,s);o=function(t,e){if(null===e)return new Date(NaN);var i=t.match(Z);if(!i)return new Date(NaN);var s=!!i[4],o=it(i[1]),r=it(i[2])-1,n=it(i[3]),a=it(i[4]),l=it(i[5])-1;if(s)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var s=new Date(0);s.setUTCFullYear(t,0,4);var o=7*(e-1)+i+1-(s.getUTCDay()||7);return s.setUTCDate(s.getUTCDate()+o),s}(e,a,l):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(ot[e]||(rt(t)?29:28))}(e,r,n)&&function(t,e){return e>=1&&e<=(rt(t)?366:365)}(e,o)?(h.setUTCFullYear(e,r,Math.max(o,n)),h):new Date(NaN)}(l.restDateString,l.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var h,d=o.getTime(),c=0;if(r.time&&(c=function(t){var e=t.match(tt);if(!e)return NaN;var i=st(e[1]),s=st(e[2]),o=st(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,s,o)?i*u+6e4*s+1e3*o:NaN}(r.time),isNaN(c)))return new Date(NaN);if(!r.timezone){var p=new Date(d+c),m=new Date(0);return m.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),m.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),m}return h=function(t){if("Z"===t)return 0;var e=t.match(et);if(!e)return 0;var i="+"===e[1]?-1:1,s=parseInt(e[2]),o=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,o)?i*(s*u+6e4*o):NaN}(r.timezone),isNaN(h)?new Date(NaN):new Date(d+c+h)}(t);if(isNaN(s.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return Q(s,i);let o="dd/MM/yyyy";return"time"===e?o="dd/MM/yyyy HH:mm:ss":"week"===e&&(o="ccc dd/MM/yyyy HH:mm:ss"),Q(s,o)}catch(t){return console.error("Error formatting date:",t.message),""}};function ht(t,e){return null==t||""===t||(0!==t||!e)&&!1!==t&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let i=0;for(let s=0;s<e;s++){if(!ht(t[s]))return!1;i++}return i===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let i=0;for(const e of Object.values(t)){if(!ht(e))return!1;i++}return i===e}(t):!t)}function dt(t){return new Promise(((e,i)=>{try{const s=new Blob([t],{type:"text/plain;charset=utf-8"}),o=new FileReader;o.onload=()=>{if("string"==typeof o.result){const t=o.result.split(",")[1];e(t)}else i(new Error("无法转换为Base64编码"))},o.onerror=()=>i(o.error),o.readAsDataURL(s)}catch(t){i(t)}}))}function ct(t,e=2){return Number(t).toFixed(e)}const ut=10;var pt=Object.defineProperty,mt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,yt=(t,e,i)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,wt=(t,e)=>{for(var i in e||(e={}))bt.call(e,i)&&yt(t,i,e[i]);if(ft)for(var i of ft(e))gt.call(e,i)&&yt(t,i,e[i]);return t},_t=(t,e)=>mt(t,vt(e)),xt=(t,e,i)=>(yt(t,"symbol"!=typeof e?e+"":e,i),i),kt=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
1
+ import{r as t,h as e}from"./index-9dee9d86.js";function i(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 o(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function a(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function l(t){a(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===r(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var h={};function d(){return h}function c(t){a(1,arguments);var e=l(t);return e.setHours(0,0,0,0),e}var u=36e5;function p(t){a(1,arguments);var e=l(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function m(t){a(1,arguments);var e=l(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var o=p(s),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var n=p(r);return e.getTime()>=o.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function v(t,e){var i,s,o,r,h,c,u,p;a(1,arguments);var m=d(),v=n(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(h=e.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:m.weekStartsOn)&&void 0!==s?s:null===(u=m.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==i?i:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=l(t),b=f.getUTCDay(),g=(b<v?7:0)+b-v;return f.setUTCDate(f.getUTCDate()-g),f.setUTCHours(0,0,0,0),f}function f(t,e){var i,s,o,r,h,c,u,p;a(1,arguments);var m=l(t),f=m.getUTCFullYear(),b=d(),g=n(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(h=e.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==o?o:b.firstWeekContainsDate)&&void 0!==s?s:null===(u=b.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,g),y.setUTCHours(0,0,0,0);var w=v(y,e),_=new Date(0);_.setUTCFullYear(f,0,g),_.setUTCHours(0,0,0,0);var x=v(_,e);return m.getTime()>=w.getTime()?f+1:m.getTime()>=x.getTime()?f:f-1}function b(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}const g=function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return b("yy"===e?s%100:s,e.length)},y=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):b(i+1,2)},w=function(t,e){return b(t.getUTCDate(),e.length)},_=function(t,e){return b(t.getUTCHours()%12||12,e.length)},x=function(t,e){return b(t.getUTCHours(),e.length)},k=function(t,e){return b(t.getUTCMinutes(),e.length)},C=function(t,e){return b(t.getUTCSeconds(),e.length)},A=function(t,e){var i=e.length,s=t.getUTCMilliseconds();return b(Math.floor(s*Math.pow(10,i-3)),e.length)};var S={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return g(t,e)},Y:function(t,e,i,s){var o=f(t,s),r=o>0?o:1-o;return"YY"===e?b(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):b(r,e.length)},R:function(t,e){return b(m(t),e.length)},u:function(t,e){return b(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return b(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return b(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return y(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return b(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var o=function(t,e){a(1,arguments);var i=l(t),s=v(i,e).getTime()-function(t,e){var i,s,o,r,l,h,c,u;a(1,arguments);var p=d(),m=n(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==o?o:p.firstWeekContainsDate)&&void 0!==s?s:null===(c=p.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==i?i:1),b=f(t,e),g=new Date(0);return g.setUTCFullYear(b,0,m),g.setUTCHours(0,0,0,0),v(g,e)}(i,e).getTime();return Math.round(s/6048e5)+1}(t,s);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):b(o,e.length)},I:function(t,e,i){var s=function(t){a(1,arguments);var e=l(t),i=p(e).getTime()-function(t){a(1,arguments);var e=m(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),p(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):b(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):w(t,e)},D:function(t,e,i){var s=function(t){a(1,arguments);var e=l(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):b(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return b(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return b(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),o=0===s?7:s;switch(e){case"i":return String(o);case"ii":return b(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,o=t.getUTCHours();switch(s=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,o=t.getUTCHours();switch(s=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return _(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):x(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):b(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):b(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):k(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):C(t,e)},S:function(t,e){return A(t,e)},X:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return T(o);case"XXXX":case"XX":return I(o);default:return I(o,":")}},x:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return T(o);case"xxxx":case"xx":return I(o);default:return I(o,":")}},O:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+z(o,":");default:return"GMT"+I(o,":")}},z:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+z(o,":");default:return"GMT"+I(o,":")}},t:function(t,e,i,s){return b(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return b((s._originalDate||t).getTime(),e.length)}};function z(t,e){var i=t>0?"-":"+",s=Math.abs(t),o=Math.floor(s/60),r=s%60;if(0===r)return i+String(o);var n=e||"";return i+String(o)+n+b(r,2)}function T(t,e){return t%60==0?(t>0?"-":"+")+b(Math.abs(t)/60,2):I(t,e)}function I(t,e){var i=e||"",s=t>0?"-":"+",o=Math.abs(t);return s+b(Math.floor(o/60),2)+i+b(o%60,2)}const D=S;var O=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},E=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},M={p:E,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],o=s[1],r=s[2];if(!r)return O(t,e);switch(o){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",O(o,e)).replace("{{time}}",E(r,e))}};const B=M;var P=["D","DD"],N=["YY","YYYY"];function j(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var F={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function $(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var R,L={date:$({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:$({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:$({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function V(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):o;s=t.formattingValues[r]||t.formattingValues[o]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function W(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,o=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var r,n=o[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const U={code:"en-US",formatDistance:function(t,e,i){var s,o=F[t];return s="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:L,formatRelative:function(t){return q[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:V({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:V({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:V({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:V({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:V({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(R={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(R.matchPattern);if(!i)return null;var s=i[0],o=t.match(R.parsePattern);if(!o)return null;var r=R.valueCallback?R.valueCallback(o[0]):o[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(s.length)}}),era:W({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:W({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:W({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:W({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:W({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var H=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Y=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,G=/^'([^]*?)'?$/,K=/''/g,J=/[a-zA-Z]/;function Q(t,e,i){var s,o,h,c,u,p,m,v,f,b,g,y,w,_,x,k,C,A;a(2,arguments);var S=String(e),z=d(),T=null!==(s=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:z.locale)&&void 0!==s?s:U,I=n(null!==(h=null!==(c=null!==(u=null!==(p=null==i?void 0:i.firstWeekContainsDate)&&void 0!==p?p:null==i||null===(m=i.locale)||void 0===m||null===(v=m.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==u?u:z.firstWeekContainsDate)&&void 0!==c?c:null===(f=z.locale)||void 0===f||null===(b=f.options)||void 0===b?void 0:b.firstWeekContainsDate)&&void 0!==h?h:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=n(null!==(g=null!==(y=null!==(w=null!==(_=null==i?void 0:i.weekStartsOn)&&void 0!==_?_:null==i||null===(x=i.locale)||void 0===x||null===(k=x.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:z.weekStartsOn)&&void 0!==y?y:null===(C=z.locale)||void 0===C||null===(A=C.options)||void 0===A?void 0:A.weekStartsOn)&&void 0!==g?g:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var E=l(t);if(!function(t){if(a(1,arguments),!function(t){return a(1,arguments),t instanceof Date||"object"===r(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=l(t);return!isNaN(Number(e))}(E))throw new RangeError("Invalid time value");var M=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(E),F=function(t,e){return a(2,arguments),function(t,e){a(2,arguments);var i=l(t).getTime(),s=n(e);return new Date(i+s)}(t,-n(e))}(E,M),$={firstWeekContainsDate:I,weekStartsOn:O,locale:T,_originalDate:E};return S.match(Y).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,B[e])(t,T.formatLong):t})).join("").match(H).map((function(s){if("''"===s)return"'";var o,r,n=s[0];if("'"===n)return(r=(o=s).match(G))?r[1].replace(K,"'"):o;var a=D[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===N.indexOf(s)||j(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==P.indexOf(s))||j(s,e,String(t)),a(F,s,T.localize,$);if(n.match(J))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return s})).join("")}var X={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Z=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,tt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,et=/^([+-])(\d{2})(?::?(\d{2}))?$/;function it(t){return t?parseInt(t):1}function st(t){return t&&parseFloat(t.replace(",","."))||0}var ot=[31,null,31,30,31,30,31,31,30,31,30,31];function rt(t){return t%400==0||t%4==0&&t%100!=0}function nt(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),a=Object.assign({"Content-Type":"application/json"},s);"GET"!==e&&"HEAD"!==e&&(a["X-Idempotency-Key"]=n);const l={method:e,headers:a,body:null};i&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(i):delete l.body,fetch(t,l).then((t=>t.ok?t.json():t.json().then((e=>{r({status:t.status,statusText:t.statusText,code:e.code||"UNKNOWN_ERROR",message:e.message||"An unknown error occurred",data:e.data||null})}),(()=>r({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>o(t)),(t=>r(t)))}))}const at=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},lt=({date:t,type:e="date",format:i})=>{try{const s=function(t,e){var i;a(1,arguments);var s=n(null!==(i=null==e?void 0:e.additionalDigits)&&void 0!==i?i:2);if(2!==s&&1!==s&&0!==s)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var o,r=function(t){var e,i={},s=t.split(X.dateTimeDelimiter);if(s.length>2)return i;if(/:/.test(s[0])?e=s[0]:(i.date=s[0],e=s[1],X.timeZoneDelimiter.test(i.date)&&(i.date=t.split(X.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var o=X.timezone.exec(e);o?(i.time=e.replace(o[1],""),i.timezone=o[1]):i.time=e}return i}(t);if(r.date){var l=function(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),s=t.match(i);if(!s)return{year:NaN,restDateString:""};var o=s[1]?parseInt(s[1]):null,r=s[2]?parseInt(s[2]):null;return{year:null===r?o:100*r,restDateString:t.slice((s[1]||s[2]).length)}}(r.date,s);o=function(t,e){if(null===e)return new Date(NaN);var i=t.match(Z);if(!i)return new Date(NaN);var s=!!i[4],o=it(i[1]),r=it(i[2])-1,n=it(i[3]),a=it(i[4]),l=it(i[5])-1;if(s)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,a,l)?function(t,e,i){var s=new Date(0);s.setUTCFullYear(t,0,4);var o=7*(e-1)+i+1-(s.getUTCDay()||7);return s.setUTCDate(s.getUTCDate()+o),s}(e,a,l):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(ot[e]||(rt(t)?29:28))}(e,r,n)&&function(t,e){return e>=1&&e<=(rt(t)?366:365)}(e,o)?(h.setUTCFullYear(e,r,Math.max(o,n)),h):new Date(NaN)}(l.restDateString,l.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var h,d=o.getTime(),c=0;if(r.time&&(c=function(t){var e=t.match(tt);if(!e)return NaN;var i=st(e[1]),s=st(e[2]),o=st(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,s,o)?i*u+6e4*s+1e3*o:NaN}(r.time),isNaN(c)))return new Date(NaN);if(!r.timezone){var p=new Date(d+c),m=new Date(0);return m.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),m.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),m}return h=function(t){if("Z"===t)return 0;var e=t.match(et);if(!e)return 0;var i="+"===e[1]?-1:1,s=parseInt(e[2]),o=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,o)?i*(s*u+6e4*o):NaN}(r.timezone),isNaN(h)?new Date(NaN):new Date(d+c+h)}(t);if(isNaN(s.getTime()))throw new Error(`Invalid date: ${t}`);if(i)return Q(s,i);let o="dd/MM/yyyy";return"time"===e?o="dd/MM/yyyy HH:mm:ss":"week"===e&&(o="ccc dd/MM/yyyy HH:mm:ss"),Q(s,o)}catch(t){return console.error("Error formatting date:",t.message),""}};function ht(t,e){return null==t||""===t||(0!==t||!e)&&!1!==t&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let i=0;for(let s=0;s<e;s++){if(!ht(t[s]))return!1;i++}return i===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let i=0;for(const e of Object.values(t)){if(!ht(e))return!1;i++}return i===e}(t):!t)}function dt(t){return new Promise(((e,i)=>{try{const s=new Blob([t],{type:"text/plain;charset=utf-8"}),o=new FileReader;o.onload=()=>{if("string"==typeof o.result){const t=o.result.split(",")[1];e(t)}else i(new Error("无法转换为Base64编码"))},o.onerror=()=>i(o.error),o.readAsDataURL(s)}catch(t){i(t)}}))}function ct(t,e=2){return Number(t).toFixed(e)}const ut=10;var pt=Object.defineProperty,mt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,yt=(t,e,i)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,wt=(t,e)=>{for(var i in e||(e={}))bt.call(e,i)&&yt(t,i,e[i]);if(ft)for(var i of ft(e))gt.call(e,i)&&yt(t,i,e[i]);return t},_t=(t,e)=>mt(t,vt(e)),xt=(t,e,i)=>(yt(t,"symbol"!=typeof e?e+"":e,i),i),kt=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-oddsbom-ticket-bet",
3
- "version": "0.5.16",
3
+ "version": "0.5.18",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",