@everymatrix/lottery-game-page 0.1.2 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/cjs/helper-accordion_2.cjs.entry.js +126 -0
  2. package/dist/cjs/helper-accordion_2.cjs.entry.js.map +1 -0
  3. package/dist/cjs/helper-filters_2.cjs.entry.js +85 -22255
  4. package/dist/cjs/helper-filters_2.cjs.entry.js.map +1 -0
  5. package/dist/cjs/helper-modal.cjs.entry.js +3 -1
  6. package/dist/cjs/helper-modal.cjs.entry.js.map +1 -0
  7. package/dist/cjs/helper-pagination.cjs.entry.js +3 -1
  8. package/dist/cjs/helper-pagination.cjs.entry.js.map +1 -0
  9. package/dist/cjs/helper-tab.cjs.entry.js +13 -8
  10. package/dist/cjs/helper-tab.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{index-e5770ba2.js → index-65086a23.js} +7 -38
  12. package/dist/cjs/index-65086a23.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +2 -0
  14. package/dist/cjs/index.cjs.js.map +1 -0
  15. package/dist/cjs/loader.cjs.js +4 -2
  16. package/dist/cjs/loader.cjs.js.map +1 -0
  17. package/dist/cjs/lottery-draw-results-history.cjs.entry.js +67 -27
  18. package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +1 -0
  19. package/dist/cjs/lottery-game-details.cjs.entry.js +3 -1
  20. package/dist/cjs/lottery-game-details.cjs.entry.js.map +1 -0
  21. package/dist/cjs/lottery-game-page.cjs.entry.js +52 -13
  22. package/dist/cjs/lottery-game-page.cjs.entry.js.map +1 -0
  23. package/dist/cjs/lottery-game-page.cjs.js +4 -2
  24. package/dist/cjs/lottery-game-page.cjs.js.map +1 -0
  25. package/dist/collection/collection-manifest.json +0 -24
  26. package/dist/collection/components/lottery-game-page/lottery-game-page.css +27 -7
  27. package/dist/collection/components/lottery-game-page/lottery-game-page.js +22 -5
  28. package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +1 -0
  29. package/dist/collection/index.js +1 -0
  30. package/dist/collection/index.js.map +1 -0
  31. package/dist/collection/utils/locale.utils.js +34 -6
  32. package/dist/collection/utils/locale.utils.js.map +1 -0
  33. package/dist/collection/utils/utils.js +1 -0
  34. package/dist/collection/utils/utils.js.map +1 -0
  35. package/dist/components/helper-accordion.js +2 -0
  36. package/dist/components/helper-accordion.js.map +1 -0
  37. package/dist/components/helper-accordion2.js +9 -2
  38. package/dist/components/helper-accordion2.js.map +1 -0
  39. package/dist/components/helper-filters.js +2 -0
  40. package/dist/components/helper-filters.js.map +1 -0
  41. package/dist/components/helper-filters2.js +31 -22211
  42. package/dist/components/helper-filters2.js.map +1 -0
  43. package/dist/components/helper-modal.js +2 -0
  44. package/dist/components/helper-modal.js.map +1 -0
  45. package/dist/components/helper-modal2.js +2 -0
  46. package/dist/components/helper-modal2.js.map +1 -0
  47. package/dist/components/helper-pagination.js +2 -0
  48. package/dist/components/helper-pagination.js.map +1 -0
  49. package/dist/components/helper-tab.js +2 -0
  50. package/dist/components/helper-tab.js.map +1 -0
  51. package/dist/components/helper-tab2.js +14 -8
  52. package/dist/components/helper-tab2.js.map +1 -0
  53. package/dist/components/helper-tabs.js +2 -0
  54. package/dist/components/helper-tabs.js.map +1 -0
  55. package/dist/components/helper-tabs2.js +3 -1
  56. package/dist/components/helper-tabs2.js.map +1 -0
  57. package/dist/components/index.js +2 -0
  58. package/dist/components/index.js.map +1 -0
  59. package/dist/components/lottery-draw-results-history.js +2 -0
  60. package/dist/components/lottery-draw-results-history.js.map +1 -0
  61. package/dist/components/lottery-draw-results-history2.js +78 -46
  62. package/dist/components/lottery-draw-results-history2.js.map +1 -0
  63. package/dist/components/lottery-draw-results.js +2 -0
  64. package/dist/components/lottery-draw-results.js.map +1 -0
  65. package/dist/components/lottery-draw-results2.js +64 -59
  66. package/dist/components/lottery-draw-results2.js.map +1 -0
  67. package/dist/components/lottery-game-details.js +2 -0
  68. package/dist/components/lottery-game-details.js.map +1 -0
  69. package/dist/components/lottery-game-details2.js +2 -0
  70. package/dist/components/lottery-game-details2.js.map +1 -0
  71. package/dist/components/lottery-game-page.js +70 -53
  72. package/dist/components/lottery-game-page.js.map +1 -0
  73. package/dist/esm/helper-accordion_2.entry.js +121 -0
  74. package/dist/esm/helper-accordion_2.entry.js.map +1 -0
  75. package/dist/esm/helper-filters_2.entry.js +89 -22259
  76. package/dist/esm/helper-filters_2.entry.js.map +1 -0
  77. package/dist/esm/helper-modal.entry.js +3 -1
  78. package/dist/esm/helper-modal.entry.js.map +1 -0
  79. package/dist/esm/helper-pagination.entry.js +3 -1
  80. package/dist/esm/helper-pagination.entry.js.map +1 -0
  81. package/dist/esm/helper-tab.entry.js +13 -8
  82. package/dist/esm/helper-tab.entry.js.map +1 -0
  83. package/dist/esm/{index-8f308493.js → index-11dea618.js} +7 -38
  84. package/dist/esm/index-11dea618.js.map +1 -0
  85. package/dist/esm/index.js +2 -0
  86. package/dist/esm/index.js.map +1 -0
  87. package/dist/esm/loader.js +4 -2
  88. package/dist/esm/loader.js.map +1 -0
  89. package/dist/esm/lottery-draw-results-history.entry.js +67 -27
  90. package/dist/esm/lottery-draw-results-history.entry.js.map +1 -0
  91. package/dist/esm/lottery-game-details.entry.js +3 -1
  92. package/dist/esm/lottery-game-details.entry.js.map +1 -0
  93. package/dist/esm/lottery-game-page.entry.js +52 -13
  94. package/dist/esm/lottery-game-page.entry.js.map +1 -0
  95. package/dist/esm/lottery-game-page.js +4 -2
  96. package/dist/esm/lottery-game-page.js.map +1 -0
  97. package/dist/lottery-game-page/index.esm.js +2 -0
  98. package/dist/lottery-game-page/index.esm.js.map +1 -0
  99. package/dist/lottery-game-page/lottery-game-page.esm.js +2 -1
  100. package/dist/lottery-game-page/lottery-game-page.esm.js.map +1 -0
  101. package/dist/lottery-game-page/p-0ffa81cc.entry.js +2 -0
  102. package/dist/lottery-game-page/p-0ffa81cc.entry.js.map +1 -0
  103. package/dist/lottery-game-page/p-3a9ad86b.js +2 -0
  104. package/dist/lottery-game-page/p-3a9ad86b.js.map +1 -0
  105. package/dist/lottery-game-page/p-3e00e24b.entry.js +2 -0
  106. package/dist/lottery-game-page/p-3e00e24b.entry.js.map +1 -0
  107. package/dist/lottery-game-page/p-4a79f68c.entry.js +2 -0
  108. package/dist/lottery-game-page/p-4a79f68c.entry.js.map +1 -0
  109. package/dist/lottery-game-page/p-978fd922.entry.js +2 -0
  110. package/dist/lottery-game-page/p-978fd922.entry.js.map +1 -0
  111. package/dist/lottery-game-page/p-bd53d31a.entry.js +2 -0
  112. package/dist/lottery-game-page/p-bd53d31a.entry.js.map +1 -0
  113. package/dist/lottery-game-page/p-bfa5e84c.entry.js +2 -0
  114. package/dist/lottery-game-page/p-bfa5e84c.entry.js.map +1 -0
  115. package/dist/lottery-game-page/p-dedb92e5.entry.js +2 -0
  116. package/dist/lottery-game-page/p-dedb92e5.entry.js.map +1 -0
  117. package/dist/lottery-game-page/p-f4592d65.entry.js +2 -0
  118. package/dist/lottery-game-page/p-f4592d65.entry.js.map +1 -0
  119. package/dist/stencil.config.js +13 -2
  120. package/dist/stencil.config.js.map +1 -0
  121. package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +3 -0
  122. package/package.json +2 -2
  123. package/dist/cjs/helper-accordion.cjs.entry.js +0 -88
  124. package/dist/cjs/helper-tabs.cjs.entry.js +0 -38
  125. package/dist/cjs/lottery-bullet_2.cjs.entry.js +0 -202
  126. package/dist/cjs/lottery-ticket-controller.cjs.entry.js +0 -69
  127. package/dist/cjs/lottery-ticket.cjs.entry.js +0 -146
  128. package/dist/components/lottery-bullet.js +0 -6
  129. package/dist/components/lottery-bullet2.js +0 -57
  130. package/dist/components/lottery-grid.js +0 -6
  131. package/dist/components/lottery-grid2.js +0 -197
  132. package/dist/components/lottery-ticket-controller.js +0 -6
  133. package/dist/components/lottery-ticket-controller2.js +0 -118
  134. package/dist/components/lottery-ticket.js +0 -6
  135. package/dist/components/lottery-ticket2.js +0 -184
  136. package/dist/esm/helper-accordion.entry.js +0 -84
  137. package/dist/esm/helper-tabs.entry.js +0 -34
  138. package/dist/esm/lottery-bullet_2.entry.js +0 -197
  139. package/dist/esm/lottery-ticket-controller.entry.js +0 -65
  140. package/dist/esm/lottery-ticket.entry.js +0 -142
  141. package/dist/lottery-game-page/p-037dd940.js +0 -1
  142. package/dist/lottery-game-page/p-12251772.entry.js +0 -1
  143. package/dist/lottery-game-page/p-324c7edd.entry.js +0 -2849
  144. package/dist/lottery-game-page/p-43400250.entry.js +0 -1
  145. package/dist/lottery-game-page/p-43f7fac4.entry.js +0 -1
  146. package/dist/lottery-game-page/p-55338096.entry.js +0 -1
  147. package/dist/lottery-game-page/p-581bdfc2.entry.js +0 -1
  148. package/dist/lottery-game-page/p-6977f833.entry.js +0 -1
  149. package/dist/lottery-game-page/p-85f4e95b.entry.js +0 -1
  150. package/dist/lottery-game-page/p-99a61a44.entry.js +0 -1
  151. package/dist/lottery-game-page/p-af9a2dde.entry.js +0 -1
  152. package/dist/lottery-game-page/p-bf66e969.entry.js +0 -1
  153. package/dist/lottery-game-page/p-d1b9da94.entry.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as s}from"./p-3a9ad86b.js";const e=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));const a="en";const o=["ro","en"];const n={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"}};const r=(t,i)=>{const s=i;return n[s!==undefined&&o.includes(s)?s:a][t]};const h='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin-top:20px;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:12px}}@media screen and (max-width: 480px){button{width:70px;font-size:10px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:10px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:#009993;border-color:#009993;color:#fff}}';const l=class{constructor(s){t(this,s);this.hpPageChange=i(this,"hpPageChange",7);this.firstPage=false;this.previousPage=false;this.offset=0;this.limit=1;this.total=1;this.language="en";this.pagesArray=[];this.endInt=0;this.userAgent=window.navigator.userAgent;this.currentPage=1;this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=10;break;case"nextPage":this.offsetInt+=10;break;case"fivePagesBack":this.offsetInt-=30;this.offsetInt=this.offsetInt<0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=30;this.offsetInt=this.offsetInt/10>=this.endInt?this.endInt*10:this.offsetInt;break}this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})};this.paginationNavigation=(t,i)=>{if(!isNaN(t)){if(t===1){this.offsetInt=t-1}else{this.offsetInt=(t-1)*10}}else{if(i===0&&this.currentPage<=4){this.navigateTo("firstPage")}else if(i===0&&this.currentPage>4){this.navigateTo("fivePagesBack")}else if(i===4&&this.endInt-this.currentPage>=2){this.navigateTo("fivePagesForward")}}this.currentPage=this.offsetInt;this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})}}componentWillRender(){this.offsetInt=this.offset;this.currentPage=this.offsetInt/this.limitInt+1;this.limitInt=this.limit;this.totalInt=this.total;this.endInt=Math.ceil(this.totalInt/this.limitInt)-1;this.lastPage=this.offsetInt>=this.endInt*this.limitInt?false:true;if(this.currentPage===1||this.currentPage===2){this.pagesArray=Array.from({length:4},((t,i)=>i+1));this.pagesArray.push("...")}else if(this.currentPage>=3&&this.endInt-this.currentPage>=2){this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1));this.pagesArray.push("...");this.pagesArray.unshift("...")}else if(this.endInt-this.currentPage<3){this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i));this.pagesArray.unshift("...")}}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(e(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage?true:false,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t))))));let i=s("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"firstPage")},r("firstPage",this.language)),s("button",{disabled:!this.previousPage?true:false,onClick:this.navigateTo.bind(this,"previousPage")},r("previousPage",this.language)));if(e(this.userAgent)){i=s("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage?true:false,onClick:this.navigateTo.bind(this,"previousPage")},r("previousPage",this.language)))}let a=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage?true:false,onClick:this.navigateTo.bind(this,"nextPage")},r("nextPage",this.language)),s("button",{disabled:!this.lastPage?true:false,onClick:this.navigateTo.bind(this,"lastPage")},r("lastPage",this.language)));if(e(this.userAgent)){a=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage?true:false,onClick:this.navigateTo.bind(this,"nextPage")},r("nextPage",this.language)))}return s("div",{id:"PaginationContainer"},i,t,a)}};l.style=h;export{l as helper_pagination};
2
+ //# sourceMappingURL=p-4a79f68c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../helper-pagination/dist/collection/utils/utils.js","../helper-pagination/dist/collection/utils/locale.utils.js","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.css?tag=helper-pagination&encapsulation=shadow","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.js"],"names":["isMobile","userAgent","toLowerCase","match","DEFAULT_LANGUAGE","SUPPORTED_LANGUAGES","TRANSLATIONS","en","firstPage","previousPage","nextPage","lastPage","ro","translate","key","customLang","lang","undefined","includes","helperPaginationCss","HelperPagination","[object Object]","hostRef","this","offset","limit","total","language","pagesArray","endInt","window","navigator","currentPage","navigateTo","navigationPage","offsetInt","limitInt","hpPageChange","emit","totalInt","paginationNavigation","pageNumber","index","isNaN","Math","ceil","Array","from","length","_","i","push","unshift","navigationArea","h","class","map","item","disabled","onClick","bind","buttonsLeftSide","buttonsRightSide","id"],"mappings":"kDASO,MAAMA,EAAYC,MACbA,EAAUC,cAAcC,MAAM,aACtCF,EAAUC,cAAcC,MAAM,mBAC9BF,EAAUC,cAAcC,MAAM,sBAC9BF,EAAUC,cAAcC,MAAM,qDCblC,MAAMC,EAAmB,KACzB,MAAMC,EAAsB,CAAC,KAAM,MACnC,MAAMC,EAAe,CACnBC,GAAI,CACFC,UAAW,QACXC,aAAc,WACdC,SAAU,OACVC,SAAU,QAEZC,GAAI,CACFJ,UAAW,QACXC,aAAc,WACdC,SAAU,aACVC,SAAU,WAGP,MAAME,EAAY,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2B,EAAE,MAAO,CAAES,GAAI,uBACrBF,EACAR,EACAS","sourcesContent":["export function format(first, middle, last) {\n return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));\n}\n/**\n * @name isMobile\n * @description A method that returns if the browser used to access the app is from a mobile device or not\n * @param {String} userAgent window.navigator.userAgent\n * @returns {Boolean} true or false\n */\nexport const isMobile = (userAgent) => {\n return !!(userAgent.toLowerCase().match(/android/i) ||\n userAgent.toLowerCase().match(/blackberry|bb/i) ||\n userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||\n userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));\n};\n","const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en'];\nconst TRANSLATIONS = {\n en: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ro: {\n firstPage: 'Prima',\n previousPage: 'Anterior',\n nextPage: 'Urmatoarea',\n lastPage: 'Ultima'\n },\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n#PaginationContainer {\n width: 100%;\n margin-top: 20px;\n display: inline-flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.LeftItems button:not(:first-child), .RightItems button:not(:last-child) {\n margin: 0 10px;\n}\n\n.LeftItems button, .RightItems button {\n padding: 0;\n background-color: #009993;\n border-color: #009993;\n}\n\n.PaginationArea {\n display: inline-flex;\n gap: 10px;\n list-style: none;\n}\n\n.PaginationArea li {\n margin: 0;\n padding: 0;\n}\n\n.PaginationArea li button {\n width: 24px;\n height: 24px;\n display: flex;\n border: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n color: #000;\n cursor: pointer;\n pointer-events: all;\n}\n\n.PaginationItem.ActiveItem button {\n background: #009993;\n border-color: #009993;\n color: #fff;\n}\n\n.PaginationItem.ActiveItem button:disabled {\n pointer-events: none;\n cursor: not-allowed;\n}\n\n.PaginationItem button:hover,\n.PaginationItem button:active {\n background: #009993;\n border-color: #009993;\n color: #fff;\n opacity: 0.8;\n}\n\nbutton {\n width: 100px;\n height: 32px;\n border: 1px solid #524e52;\n border-radius: 5px;\n background: #524e52;\n color: #fff;\n font-size: 14px;\n font: inherit;\n cursor: pointer;\n transition: all 0.1s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n\nbutton:hover,\nbutton:active {\n background: #004D4A;\n border-color: #004D4A;\n}\n\nbutton:disabled {\n background-color: #ccc;\n border-color: #ccc;\n color: #fff;\n cursor: not-allowed;\n}\n\n@media screen and (max-width: 720px) {\n button {\n width: 90px;\n font-size: 12px;\n }\n}\n@media screen and (max-width: 480px) {\n button {\n width: 70px;\n font-size: 10px;\n }\n\n .paginationArea {\n padding: 5px;\n }\n}\n@media screen and (max-width: 320px) {\n button {\n width: 58px;\n font-size: 10px;\n }\n\n .paginationArea {\n padding: 5px;\n gap: 5px;\n }\n}\n/* fix for issue on hover/visited for mobile devices */\n@media (hover: none) {\n .paginationItem button:hover {\n background: inherit;\n border-color: inherit;\n color: inherit;\n opacity: 1;\n }\n\n .paginationItem.activeItem button:hover {\n background: #009993;\n border-color: #009993;\n color: #fff;\n }\n}","import { Component, h, Event, Prop, State } from '@stencil/core';\nimport { isMobile } from \"../../utils/utils\";\nimport { translate } from '../../utils/locale.utils';\nexport class HelperPagination {\n constructor() {\n /**\n * First page boolean value - determines if the page is disabled or active\n */\n this.firstPage = false;\n /**\n * Previous page boolean value - determines if the page is disabled or active\n */\n this.previousPage = false;\n /**\n * The received offset\n */\n this.offset = 0;\n /**\n * The received limit for the number of pages\n */\n this.limit = 1;\n /**\n * The received total number of pages\n */\n this.total = 1;\n /**\n * Language\n */\n this.language = 'en';\n /**\n * In component working variable for the array of pages\n */\n this.pagesArray = [];\n /**\n * In component working variable for last page\n */\n this.endInt = 0;\n this.userAgent = window.navigator.userAgent;\n this.currentPage = 1;\n /**\n * Navigation logic\n */\n this.navigateTo = (navigationPage) => {\n switch (navigationPage) {\n case 'firstPage':\n this.offsetInt = 0;\n break;\n case 'lastPage':\n this.offsetInt = this.endInt * this.limitInt;\n break;\n case 'previousPage':\n this.offsetInt -= 10;\n break;\n case 'nextPage':\n this.offsetInt += 10;\n break;\n case 'fivePagesBack':\n this.offsetInt -= 30;\n this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;\n break;\n case 'fivePagesForward':\n this.offsetInt += 30;\n this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;\n break;\n }\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\n /**\n * Handle navigation from here\n */\n this.paginationNavigation = (pageNumber, index) => {\n if (!isNaN(pageNumber)) {\n if (pageNumber === 1) {\n this.offsetInt = pageNumber - 1;\n }\n else {\n this.offsetInt = (pageNumber - 1) * 10;\n }\n }\n else {\n if (index === 0 && this.currentPage <= 4) {\n this.navigateTo('firstPage');\n }\n else if (index === 0 && this.currentPage > 4) {\n this.navigateTo('fivePagesBack');\n }\n else if (index === 4 && this.endInt - this.currentPage >= 2) {\n this.navigateTo('fivePagesForward');\n }\n }\n this.currentPage = this.offsetInt;\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\n }\n componentWillRender() {\n this.offsetInt = this.offset;\n this.currentPage = this.offsetInt / this.limitInt + 1;\n this.limitInt = this.limit;\n this.totalInt = this.total;\n this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);\n this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;\n /**\n * Construct numbered navigation area based on current page position\n */\n if (this.currentPage === 1 || this.currentPage === 2) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);\n this.pagesArray.push('...');\n }\n else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {\n this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);\n this.pagesArray.push('...');\n this.pagesArray.unshift('...');\n }\n else if ((this.endInt - this.currentPage) < 3) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);\n this.pagesArray.unshift('...');\n }\n }\n render() {\n /**\n * Center navigation area\n */\n let navigationArea = h(\"ul\", { class: \"PaginationArea\" }, this.pagesArray.map((item, index) => {\n return (h(\"li\", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') },\n h(\"button\", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) },\n h(\"span\", null, item))));\n }));\n /**\n * Left navigation area\n */\n let buttonsLeftSide = h(\"div\", { class: \"LeftItems\" },\n h(\"button\", { disabled: !this.previousPage, onClick: this.navigateTo.bind(this, 'firstPage') }, translate('firstPage', this.language)),\n h(\"button\", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));\n if (isMobile(this.userAgent)) {\n buttonsLeftSide =\n h(\"div\", { class: \"LeftItems\" },\n h(\"button\", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));\n }\n /**\n * Right navigation area\n */\n let buttonsRightSide = h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)),\n h(\"button\", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'lastPage') }, translate('lastPage', this.language)));\n if (isMobile(this.userAgent)) {\n buttonsRightSide =\n h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));\n }\n return (h(\"div\", { id: \"PaginationContainer\" },\n buttonsLeftSide,\n navigationArea,\n buttonsRightSide));\n }\n static get is() { return \"helper-pagination\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-pagination.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-pagination.css\"]\n }; }\n static get properties() { return {\n \"firstPage\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"First page boolean value - determines if the page is disabled or active\"\n },\n \"attribute\": \"first-page\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"previousPage\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Previous page boolean value - determines if the page is disabled or active\"\n },\n \"attribute\": \"previous-page\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"offset\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received offset\"\n },\n \"attribute\": \"offset\",\n \"reflect\": true,\n \"defaultValue\": \"0\"\n },\n \"limit\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received limit for the number of pages\"\n },\n \"attribute\": \"limit\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"total\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received total number of pages\"\n },\n \"attribute\": \"total\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n }\n }; }\n static get states() { return {\n \"offsetInt\": {},\n \"lastPage\": {},\n \"limitInt\": {},\n \"totalInt\": {},\n \"pagesArray\": {},\n \"endInt\": {}\n }; }\n static get events() { return [{\n \"method\": \"hpPageChange\",\n \"name\": \"hpPageChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Event that handles the navigation, updating the offset, limit and total values\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as t,h as i}from"./p-3a9ad86b.js";import"@everymatrix/lottery-grid";const r="en";const a=["ro","en"];const l={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterDateRangePlaceholder:"Perioada",filterModalButton:"Cauta",filterOrDate:"sau cauta dupa data"}};const s=(e,t)=>{const i=t;return l[i!==undefined&&a.includes(i)?i:r][e]};const o='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';const n=class{constructor(i){e(this,i);this.filterDraw=t(this,"filterDraw",7);this.filterSelection=t(this,"filterSelection",7);this.filterSelectionReset=t(this,"filterSelectionReset",7);this.showFilterId=true;this.activateTicketSearch=false;this.gameId="";this.playerId="";this.session="";this.postMessage=false;this.language="en";this.showFilterModal=false;this.showClearButton=false;this.filterData={};this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""}}componentDidRender(){this.filterData.ticketDrawId=null;this.filterData.filterFromCalendar=null;this.filterData.filterToCalendar=null;if(document.getElementById("#FilterById"))document.getElementById("#FilterById").value=""}filterSelectionHandler(e){if(this.postMessage)window.postMessage({type:"filterSelection",event:e},window.location.href);if(this.filterData.ticketDrawId)this.filterDraw.emit(e);if(this.filterData.filterFromCalendar||this.filterData.filterToCalendar)this.filterSelection.emit(e)}filterSelectionResetHandler(e){if(this.postMessage)window.postMessage({type:"filterSelectionReset",event:e},window.location.href);this.filterSelectionReset.emit(e)}modalCloseEvent(){this.showFilterModal=false}toggleFilterModal(){this.showFilterModal=true}filterSearch(){this.modalCloseEvent();this.showClearButton=true;this.filterSelectionHandler(this.filterData)}resetSearch(){this.showClearButton=false;this.filterSelectionResetHandler(this.filterDataReset);this.filterData={}}handleTicketDrawId(e){this.filterData.ticketDrawId=e.target.value}handleFilterFrom(e){this.filterData.filterFromCalendar=new Date(e.target.value).toISOString()}handleFilterTo(e){this.filterData.filterToCalendar=new Date(e.target.value).toISOString()}render(){return i("div",{class:"HelperFilters"},i("div",{class:"FilterButtonsWrapper"},i("button",{class:"FilterOpen",onClick:()=>this.toggleFilterModal()},s("filterOpen",this.language)),this.showClearButton?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},s("filterClear",this.language)):null),i("helper-modal",{"title-modal":"Filter Modal",visible:this.showFilterModal},i("div",{class:"FilterModalHeader"},i("h3",{class:"FilterModalTitle"},this.activateTicketSearch?s("filterModalTicketTitle",this.language):s("filterModalDrawTitle",this.language))),i("div",{class:"FilterModalBody"},i("input",{id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:e=>this.handleTicketDrawId(e),class:"FilterModalSearch",placeholder:this.activateTicketSearch?s("filterTicketPlaceholder",this.language):s("filterDrawPlaceholder",this.language)}),i("p",null,s("filterOrDate",this.language)),i("div",{class:"FilterCalendarWrapper"})),i("div",{class:"FilterModalFooter"},i("button",{class:"FilterModalButton",onClick:()=>this.filterSearch()},s("filterModalButton",this.language)))))}};n.style=o;const d="en";const c=["ro","en"];const h={en:{drawResultsHeader:"Last draw results",drawId:"Draw ID",drawName:"Game name",drawDate:"Draw Date",drawNumbersGridDraw:"Draw numbers Grid A",drawNumbersGridTicket:"Draw numbers Grid B",ticketResult:"Ticket result",amountWon:"Amount won",numberOfDraws:"Number of draws",multiplier:"Multiplier:",ticketPurchaseDate:"Ticket Purchase Date",ticketStatus:"Ticket Status",ticketId:"Ticket ID",ticketAmount:"Ticket Amount",winUpTo:"Win up to"},ro:{drawResultsHeader:"Ultimele rezultate extragere",drawId:"Id extragere",drawName:"Numele jocului",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase Grid A",drawNumbersGridTicket:"Numerele extrase Grid B",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplier:"Multiplicator:",ticketPurchaseDate:"Data achizitionarii biletului",ticketStatus:"Statusul biletului",ticketId:"Id biletul",ticketAmount:"Valoarea biletului",winUpTo:"Poti castiga"}};const u=(e,t)=>{const i=t;return h[i!==undefined&&c.includes(i)?i:d][e]};const p='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:#009993;color:#fff;padding:12px;font-size:14px}.DrawResultsArea{margin-top:15px}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:#009993;color:#fff;font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawMultipler label{display:block;margin:15px 0}.DrawResultsBody{padding:0px 20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid #009993}.DrawResultsBody .DrawNumbersGrid{font-size:14px}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.Toggle{cursor:pointer;display:inline-block}.ToggleSwitch{display:inline-block;background:#ccc;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #eee 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#56c080}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px}.DrawTicketsContainer{margin:30px auto}.ExpandableBoxes{position:relative}.ExpandableBox{line-height:12px;font-weight:lighter;width:100%;height:100%;max-height:70px;float:left;margin:0 0 20px 0;border:1px solid #f1f1f1;background:#fff;border-radius:4px;padding:10px;-webkit-transition:all 0.6s ease-in-out;-moz-transition:all 0.6s ease-in-out;-o-transition:all 0.6s ease-in-out;-ms-transition:all 0.6s ease-in-out;transition:all 0.6s ease-in-out;overflow:hidden;box-shadow:rgba(99, 99, 99, 0.2) 0px 2px 8px 0px}.ExpandableBox.ShowBox{max-height:400px;margin:0px 0px 20p 0px}.ExpandableBox.HideBox{width:0;height:0;overflow:hidden;border:none;padding:0;margin:0;opacity:0}';const f=class{constructor(t){e(this,t);this.language="en";this.drawMode=false;this.drawId="";this.gameName="";this.ticketDate="";this.ticketStatus="";this.ticketId="";this.ticketAmount="";this.ticketMultiplier=false;this.ticketDrawCount=0;this.multiplier=3;this.isLoading=true;this.drawResults=[];this.rules={};this.toggleDrawer=[false];this.hasErrors=false;this.errorText="";this.changeBox=e=>{this.toggleDrawer=this.toggleDrawer.map(((t,i)=>{if(i==e){return!t}return t}));if(e>=this.toggleDrawer.length){this.toggleDrawer.push(true)}}}connectedCallback(){let e=[];e.push(this.getGameData());if(this.drawId){e.push(this.getDrawData())}Promise.all(e).then((()=>{this.isLoading=false}))}getDrawData(){return new Promise(((e,t)=>{let i=new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}`);fetch(i.href).then((e=>e.json())).then((t=>{this.drawData=t;e(true);this.isLoading=false})).catch((e=>{t(e);this.isLoading=false}))}))}getGameData(){return new Promise(((e,t)=>{let i=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(i.href).then((e=>e.json())).then((t=>{this.rules={maximumAllowed:t.rules.boards[0].maximumAllowed,totalNumbers:t.rules.boards[0].totalNumbers};e(true);this.isLoading=false;this.hasErrors=false})).catch((e=>{this.isLoading=false;this.hasErrors=true;this.errorText=e;t(e)}))}))}render(){if(this.isLoading){return i("p",null,"Loading, please wait ...")}else if(this.hasErrors){i("p",null,this.errorText)}else{return i("section",{class:"DrawResultsSection"},!this.drawMode?i("div",{class:"DrawResultsArea"},i("div",{class:"TicketInfo"},i("div",{class:"TicketGameName"},u("drawName",this.language),": ",i("span",null,this.gameName)),i("div",{class:"TicketDate"},u("ticketPurchaseDate",this.language),": ",i("span",null,this.ticketDate.slice(0,10))),i("div",{class:"TicketStatus"},u("ticketStatus",this.language),": ",i("span",null,this.ticketStatus))),i("div",{class:"DrawResultsBody"},i("div",{class:"TicketIdContainer"},i("p",null,u("ticketId",this.language),": ",i("span",null,this.ticketId))),i("div",{class:"TicketAmountContainer"},i("p",null,u("ticketAmount",this.language)," ",i("span",null,this.ticketAmount))),i("div",{class:"DrawNumbersGrid"},i("p",null,u("drawNumbersGridTicket",this.language),":"),i("div",{class:"BulletContainer"},i("lottery-grid",{"maximum-allowed":this.rules.maximumAllowed,"total-numbers":this.rules.totalNumbers,"selected-numbers":this.selection,selectable:false,"display-selected":true,language:this.language}))),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},u("winUpTo",this.language)," ",i("span",null,JSON.stringify(this.ticketMultiplier)))),i("div",{class:"NumberOfDrawsContainer"},i("p",null,u("numberOfDraws",this.language),": ",this.ticketDrawCount),i("div",{class:"DrawTicketsContainer"},this.drawResults.map(((e,t)=>i("div",{class:"ExpandableBoxes"},i("div",{class:this.toggleDrawer[t]?"ExpandableBox ShowBox":"ExpandableBox",onClick:()=>this.changeBox(t)},i("div",{class:"TicketResultContainer"},i("p",null,u("ticketResult",this.language),": ",e.status)),e.state=="won"&&i("div",{class:"AmountWonContainer"},i("p",null,u("amountWon",this.language),": ",Number(e.amount).toLocaleString("en")," ",e.currency)),i("div",{class:"DrawIdContainer"},i("p",null,u("drawId",this.language),": ",e.drawId)),i("div",{class:"DrawDateContainer"},i("p",null,u("drawDate",this.language),": ",e.updatedAt.slice(0,10)," | ",e.updatedAt.slice(11,19))),i("div",{class:"DrawNumbersGrid"}),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},u("winUpTo",this.language)," ",e.multiplier)))))))))):i("div",{class:"DrawResultsArea"},this.drawData&&i("div",null,i("div",{class:"DrawResultsHeader"},i("span",null,u("drawId",this.language),": ",this.drawData.id),i("span",null,u("drawDate",this.language),": ",this.drawData.date.slice(0,10))),i("div",{class:"DrawResultsBody"},i("div",{class:"DrawNumbersGrid"},i("p",null,u("drawNumbersGridDraw",this.language),":"),i("div",{class:"BulletContainer"},i("lottery-grid",{"maximum-allowed":this.rules.maximumAllowed,"total-numbers":this.rules.totalNumbers,selectedNumbers:this.drawData.winningNumbers.join(","),"display-selected":true,selectable:false,language:this.language})),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},u("multiplier",this.language)," ",this.multiplier)))))))}}};f.style=p;export{n as helper_filters,f as lottery_draw_results};
2
+ //# sourceMappingURL=p-978fd922.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../helper-filters/dist/collection/utils/locale.utils.js","../helper-filters/dist/collection/components/helper-filters/helper-filters.css?tag=helper-filters&encapsulation=shadow","../helper-filters/dist/collection/components/helper-filters/helper-filters.js","../lottery-draw-results/dist/collection/utils/locale.utils.js","../lottery-draw-results/dist/collection/components/lottery-draw-results/lottery-draw-results.css?tag=lottery-draw-results&encapsulation=shadow","../lottery-draw-results/dist/collection/components/lottery-draw-results/lottery-draw-results.js"],"names":["DEFAULT_LANGUAGE","SUPPORTED_LANGUAGES","TRANSLATIONS","en","filterOpen","filterClear","filterModalTicketTitle","filterModalDrawTitle","filterTicketPlaceholder","filterDrawPlaceholder","filterDateRangePlaceholder","filterModalButton","filterFromCalendar","filterToCalendar","filterOrDate","ro","translate","key","customLang","lang","undefined","includes","helperFiltersCss","HelperFilters","[object Object]","hostRef","this","showFilterId","activateTicketSearch","gameId","playerId","session","postMessage","language","showFilterModal","showClearButton","filterData","filterDataReset","ticketDrawId","document","getElementById","value","event","window","type","location","href","filterDraw","emit","filterSelection","filterSelectionReset","modalCloseEvent","filterSelectionHandler","filterSelectionResetHandler","target","Date","toISOString","h","class","onClick","toggleFilterModal","resetSearch","title-modal","visible","id","onInput","handleTicketDrawId","placeholder","filterSearch","drawResultsHeader","drawId","drawName","drawDate","drawNumbersGridDraw","drawNumbersGridTicket","ticketResult","amountWon","numberOfDraws","multiplier","ticketPurchaseDate","ticketStatus","ticketId","ticketAmount","winUpTo","lotteryDrawResultsCss","LotteryDrawResults","drawMode","gameName","ticketDate","ticketMultiplier","ticketDrawCount","isLoading","drawResults","rules","toggleDrawer","hasErrors","errorText","changeBox","index","map","item","itemIndex","length","push","promises","getGameData","getDrawData","Promise","all","then","resolve","reject","url","URL","endpoint","fetch","response","json","data","drawData","catch","err","maximumAllowed","boards","totalNumbers","slice","maximum-allowed","total-numbers","selected-numbers","selection","selectable","display-selected","JSON","stringify","status","state","Number","amount","toLocaleString","currency","updatedAt","date","selectedNumbers","winningNumbers","join"],"mappings":"oFAAA,MAAMA,EAAmB,KACzB,MAAMC,EAAsB,CAAC,KAAM,MACnC,MAAMC,EAAe,CACnBC,GAAI,CACFC,WAAY,SACZC,YAAa,QACbC,uBAAwB,iBACxBC,qBAAsB,wBACtBC,wBAAyB,yBACzBC,sBAAuB,uBACvBC,2BAA4B,aAC5BC,kBAAmB,SACnBC,mBAAoB,OACpBC,iBAAkB,KAClBC,aAAc,qBAEhBC,GAAI,CACFX,WAAY,WACZC,YAAa,WACbC,uBAAwB,wBACxBC,qBAAsB,0BACtBC,wBAAyB,iBACzBC,sBAAuB,gBACvBC,2BAA4B,WAC5BC,kBAAmB,QACnBG,aAAc,wBAGX,MAAME,EAAY,CAACC,EAAKC,KAC7B,MAAMC,EAAOD,EACb,OAAOhB,EAAaiB,IAASC,WAAanB,EAAoBoB,SAASF,GAAQA,EAAOnB,GAAkBiB,IC9B1G,MAAMK,EAAmB,myECKZC,EAAa,MACxBC,YAAAC,gKAIEC,KAAKC,aAAe,KAIpBD,KAAKE,qBAAuB,MAI5BF,KAAKG,OAAS,GAIdH,KAAKI,SAAW,GAIhBJ,KAAKK,QAAU,GAIfL,KAAKM,YAAc,MAInBN,KAAKO,SAAW,KAChBP,KAAKQ,gBAAkB,MACvBR,KAAKS,gBAAkB,MACvBT,KAAKU,WAAa,GAClBV,KAAKW,gBAAkB,CAAEC,aAAc,GAAI1B,mBAAoB,GAAIC,iBAAkB,IAGvFW,qBACEE,KAAKU,WAAWE,aAAe,KAC/BZ,KAAKU,WAAWxB,mBAAqB,KACrCc,KAAKU,WA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ro', 'en'];\nconst TRANSLATIONS = {\n en: {\n filterOpen: 'Filter',\n filterClear: 'Clear',\n filterModalTicketTitle: 'Ticket Results',\n filterModalDrawTitle: 'Draws Results History',\n filterTicketPlaceholder: 'Search for a ticket ID',\n filterDrawPlaceholder: 'Search for a draw ID',\n filterDateRangePlaceholder: 'Date Range',\n filterModalButton: 'Search',\n filterFromCalendar: 'From',\n filterToCalendar: 'To',\n filterOrDate: 'or search by date'\n },\n ro: {\n filterOpen: 'Filtrare',\n filterClear: 'Stergere',\n filterModalTicketTitle: 'Rezultatele biletelor',\n filterModalDrawTitle: 'Rezultatele draw-urilor',\n filterTicketPlaceholder: 'Cauta ID bilet',\n filterDrawPlaceholder: 'Cauta ID draw',\n filterDateRangePlaceholder: 'Perioada',\n filterModalButton: 'Cauta',\n filterOrDate: 'sau cauta dupa data'\n },\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.FilterButtonsWrapper {\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n}\n.FilterButtonsWrapper .FilterOpen {\n cursor: pointer;\n border-radius: 4px;\n padding: 8px 15px;\n width: max-content;\n border: 1px solid #00958f;\n background: #00958f;\n color: #FFF;\n font-size: 12px;\n transition: all 0.2s linear;\n text-align: center;\n letter-spacing: 0;\n}\n.FilterButtonsWrapper .FilterOpen:hover {\n background: #00958f;\n color: #FFF;\n}\n.FilterButtonsWrapper .FilterClear {\n cursor: pointer;\n border-radius: 4px;\n padding: 8px 15px;\n width: max-content;\n border: 1px solid #00958f;\n background: #FFF;\n color: #000;\n font-size: 12px;\n transition: all 0.2s linear;\n text-align: center;\n letter-spacing: 0;\n}\n.FilterButtonsWrapper .FilterClear:hover {\n background: #00958f;\n color: #FFF;\n}\n\n.FilterModalHeader,\n.FilterModalBody,\n.FilterModalFooter {\n display: flex;\n flex-direction: column;\n gap: 5px;\n align-items: center;\n margin: 20px 0;\n}\n.FilterModalHeader .FilterModalTitle,\n.FilterModalBody .FilterModalTitle,\n.FilterModalFooter .FilterModalTitle {\n margin: 0;\n padding: 0;\n font-weight: 700;\n font-size: 16px;\n color: #009993;\n text-transform: uppercase;\n}\n.FilterModalHeader .FilterModalSearch,\n.FilterModalBody .FilterModalSearch,\n.FilterModalFooter .FilterModalSearch {\n border-radius: 4px;\n background: #e8ebef;\n color: #263445;\n width: 100%;\n height: 26px;\n max-width: 280px;\n padding: 5px;\n font-size: 15px;\n border: none;\n outline: #009993;\n}\n.FilterModalHeader .FilterCalendarWrapper,\n.FilterModalBody .FilterCalendarWrapper,\n.FilterModalFooter .FilterCalendarWrapper {\n display: flex;\n gap: 5px;\n}\n.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,\n.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,\n.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker {\n width: 50%;\n max-width: 143px;\n}\n.FilterModalHeader .FilterModalButton,\n.FilterModalBody .FilterModalButton,\n.FilterModalFooter .FilterModalButton {\n cursor: pointer;\n border-radius: 4px;\n padding: 8px 60px;\n width: max-content;\n margin: 5px;\n border: 1px solid #00958f;\n background: #00958f;\n color: #FFF;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n.FilterModalHeader .FilterModalButton:hover,\n.FilterModalBody .FilterModalButton:hover,\n.FilterModalFooter .FilterModalButton:hover {\n background: #00958f;\n color: #FFF;\n}\n.FilterModalHeader p,\n.FilterModalBody p,\n.FilterModalFooter p {\n margin: 5px 0;\n}","import { Component, h, State, Prop, Event, Listen } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\n// import '@vaadin/date-picker';\n// import '@vaadin/vaadin-date-picker/vaadin-date-picker.js';\nimport '@everymatrix/helper-modal';\nexport class HelperFilters {\n constructor() {\n /**\n * Check if show the filter option by id\n */\n this.showFilterId = true;\n /**\n * Choose if filter by draw ID or ticket ID. By default is draw ID.\n */\n this.activateTicketSearch = false;\n /**\n * Game ID\n */\n this.gameId = '';\n /**\n * Player ID\n */\n this.playerId = '';\n /**\n * Session ID\n */\n this.session = '';\n /**\n * Instead of customEvents the widget triggers postMessages\n */\n this.postMessage = false;\n /**\n * Language\n */\n this.language = 'en';\n this.showFilterModal = false;\n this.showClearButton = false;\n this.filterData = {};\n this.filterDataReset = { ticketDrawId: '', filterFromCalendar: '', filterToCalendar: '' };\n }\n // reset field values each time the filter modal opens\n componentDidRender() {\n this.filterData.ticketDrawId = null;\n this.filterData.filterFromCalendar = null;\n this.filterData.filterToCalendar = null;\n // @TODO: to way binding?\n if (document.getElementById('#FilterById'))\n document.getElementById('#FilterById').value = '';\n }\n filterSelectionHandler(event) {\n if (this.postMessage)\n window.postMessage({ type: 'filterSelection', event }, window.location.href);\n if (this.filterData.ticketDrawId)\n this.filterDraw.emit(event);\n if (this.filterData.filterFromCalendar || this.filterData.filterToCalendar)\n this.filterSelection.emit(event);\n ;\n }\n filterSelectionResetHandler(event) {\n if (this.postMessage)\n window.postMessage({ type: 'filterSelectionReset', event }, window.location.href);\n this.filterSelectionReset.emit(event);\n }\n modalCloseEvent() {\n this.showFilterModal = false;\n }\n // Toggle filter modal\n toggleFilterModal() {\n this.showFilterModal = true;\n }\n // Filter search\n filterSearch() {\n this.modalCloseEvent();\n this.showClearButton = true;\n this.filterSelectionHandler(this.filterData);\n }\n resetSearch() {\n this.showClearButton = false;\n this.filterSelectionResetHandler(this.filterDataReset);\n this.filterData = {};\n }\n handleTicketDrawId(event) {\n this.filterData.ticketDrawId = event.target.value;\n }\n handleFilterFrom(event) {\n this.filterData.filterFromCalendar = new Date(event.target.value).toISOString();\n }\n handleFilterTo(event) {\n this.filterData.filterToCalendar = new Date(event.target.value).toISOString();\n }\n render() {\n return (h(\"div\", { class: \"HelperFilters\" },\n h(\"div\", { class: \"FilterButtonsWrapper\" },\n h(\"button\", { class: \"FilterOpen\", onClick: () => this.toggleFilterModal() }, translate('filterOpen', this.language)),\n this.showClearButton ? h(\"button\", { class: \"FilterClear\", onClick: () => this.resetSearch() }, translate('filterClear', this.language)) : null),\n h(\"helper-modal\", { \"title-modal\": \"Filter Modal\", visible: this.showFilterModal },\n h(\"div\", { class: \"FilterModalHeader\" },\n h(\"h3\", { class: \"FilterModalTitle\" }, this.activateTicketSearch ? translate('filterModalTicketTitle', this.language) : translate('filterModalDrawTitle', this.language))),\n h(\"div\", { class: \"FilterModalBody\" },\n h(\"input\", { id: \"FilterById\", type: \"text\", value: this.filterData.ticketDrawId, onInput: (event) => this.handleTicketDrawId(event), class: \"FilterModalSearch\", placeholder: this.activateTicketSearch ? translate('filterTicketPlaceholder', this.language) : translate('filterDrawPlaceholder', this.language) }),\n h(\"p\", null, translate('filterOrDate', this.language)),\n h(\"div\", { class: \"FilterCalendarWrapper\" })),\n h(\"div\", { class: \"FilterModalFooter\" },\n h(\"button\", { class: \"FilterModalButton\", onClick: () => this.filterSearch() }, translate('filterModalButton', this.language))))));\n }\n static get is() { return \"helper-filters\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-filters.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-filters.css\"]\n }; }\n static get properties() { return {\n \"showFilterId\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Check if show the filter option by id\"\n },\n \"attribute\": \"show-filter-id\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"activateTicketSearch\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Choose if filter by draw ID or ticket ID. By default is draw ID.\"\n },\n \"attribute\": \"activate-ticket-search\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"gameId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Game ID\"\n },\n \"attribute\": \"game-id\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"playerId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Player ID\"\n },\n \"attribute\": \"player-id\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"session\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Session ID\"\n },\n \"attribute\": \"session\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"postMessage\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Instead of customEvents the widget triggers postMessages\"\n },\n \"attribute\": \"post-message\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n }\n }; }\n static get states() { return {\n \"showFilterModal\": {},\n \"showClearButton\": {},\n \"filterData\": {},\n \"filterDataReset\": {}\n }; }\n static get events() { return [{\n \"method\": \"filterDraw\",\n \"name\": \"filterDraw\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"HelperFilters\",\n \"resolved\": \"HelperFilters\",\n \"references\": {\n \"HelperFilters\": {\n \"location\": \"global\"\n }\n }\n }\n }, {\n \"method\": \"filterSelection\",\n \"name\": \"filterSelection\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"HelperFilters\",\n \"resolved\": \"HelperFilters\",\n \"references\": {\n \"HelperFilters\": {\n \"location\": \"global\"\n }\n }\n }\n }, {\n \"method\": \"filterSelectionReset\",\n \"name\": \"filterSelectionReset\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"HelperFilters\",\n \"resolved\": \"HelperFilters\",\n \"references\": {\n \"HelperFilters\": {\n \"location\": \"global\"\n }\n }\n }\n }]; }\n static get listeners() { return [{\n \"name\": \"modalCloseEvent\",\n \"method\": \"modalCloseEvent\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }]; }\n}\n","const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en'];\nconst TRANSLATIONS = {\n en: {\n drawResultsHeader: 'Last draw results',\n drawId: 'Draw ID',\n drawName: 'Game name',\n drawDate: 'Draw Date',\n drawNumbersGridDraw: 'Draw numbers Grid A',\n drawNumbersGridTicket: 'Draw numbers Grid B',\n ticketResult: 'Ticket result',\n amountWon: 'Amount won',\n numberOfDraws: 'Number of draws',\n multiplier: 'Multiplier:',\n ticketPurchaseDate: 'Ticket Purchase Date',\n ticketStatus: 'Ticket Status',\n ticketId: 'Ticket ID',\n ticketAmount: 'Ticket Amount',\n winUpTo: 'Win up to',\n },\n ro: {\n drawResultsHeader: 'Ultimele rezultate extragere',\n drawId: 'Id extragere',\n drawName: 'Numele jocului',\n drawDate: 'Data extragerii',\n drawNumbersGridDraw: 'Numerele extrase Grid A',\n drawNumbersGridTicket: 'Numerele extrase Grid B',\n ticketResult: 'Rezultatul biletului',\n amountWon: 'Suma castigata',\n numberOfDraws: 'Numarul de extrageri',\n multiplier: 'Multiplicator:',\n ticketPurchaseDate: 'Data achizitionarii biletului',\n ticketStatus: 'Statusul biletului',\n ticketId: 'Id biletul',\n ticketAmount: 'Valoarea biletului',\n winUpTo: 'Poti castiga'\n },\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.TicketInfo {\n display: flex;\n flex-direction: row;\n gap: 15px;\n background-color: #009993;\n color: #fff;\n padding: 12px;\n font-size: 14px;\n}\n\n.DrawResultsArea {\n margin-top: 15px;\n}\n\n.DrawResultsSection {\n max-width: 600px;\n margin: 0px auto;\n border-radius: 4px;\n}\n\n.DrawResultsHeader {\n display: flex;\n justify-content: space-between;\n padding: 10px 20px;\n background-color: #009993;\n color: #fff;\n font-size: 14px;\n border-radius: 4px 4px 0 0;\n}\n.DrawResultsHeader h4 {\n text-transform: uppercase;\n font-weight: 400;\n margin: 0;\n padding-top: 15px;\n}\n\n.DrawMultipler label {\n display: block;\n margin: 15px 0;\n}\n\n.DrawResultsBody {\n padding: 0px 20px;\n margin-bottom: 5px;\n border-radius: 0 0 4px 4px;\n border: 1px solid #009993;\n}\n.DrawResultsBody .DrawNumbersGrid {\n font-size: 14px;\n}\n.DrawResultsBody .NumberOfDrawsContainer {\n display: table;\n width: 100%;\n}\n\n.Toggle {\n cursor: pointer;\n display: inline-block;\n}\n\n.ToggleSwitch {\n display: inline-block;\n background: #ccc;\n border-radius: 16px;\n width: 58px;\n height: 24px;\n position: relative;\n vertical-align: middle;\n transition: background 0.25s;\n}\n.ToggleSwitch:before, .ToggleSwitch:after {\n content: \"\";\n}\n.ToggleSwitch:before {\n display: block;\n background: linear-gradient(to bottom, #fff 0%, #eee 100%);\n border-radius: 50%;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);\n width: 16px;\n height: 16px;\n position: absolute;\n top: 4px;\n left: 4px;\n transition: left 0.25s;\n}\n\n.Toggle:hover .ToggleSwitch:before {\n background: linear-gradient(to bottom, #fff 0%, #fff 100%);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);\n}\n\n.ToggleCheckbox:checked + .ToggleSwitch {\n background: #56c080;\n}\n\n.ToggleCheckbox:checked + .ToggleSwitch:before {\n left: 38px;\n}\n\n.ToggleCheckbox {\n position: absolute;\n visibility: hidden;\n}\n\n.Label {\n margin-right: 5px;\n position: relative;\n top: 2px;\n}\n\n.DrawTicketsContainer {\n margin: 30px auto;\n}\n\n.ExpandableBoxes {\n position: relative;\n}\n\n.ExpandableBox {\n line-height: 12px;\n font-weight: lighter;\n width: 100%;\n height: 100%;\n max-height: 70px;\n float: left;\n margin: 0 0 20px 0;\n border: 1px solid #f1f1f1;\n background: #fff;\n border-radius: 4px;\n padding: 10px;\n -webkit-transition: all 0.6s ease-in-out;\n -moz-transition: all 0.6s ease-in-out;\n -o-transition: all 0.6s ease-in-out;\n -ms-transition: all 0.6s ease-in-out;\n transition: all 0.6s ease-in-out;\n overflow: hidden;\n box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;\n}\n\n.ExpandableBox.ShowBox {\n max-height: 400px;\n margin: 0px 0px 20p 0px;\n}\n\n.ExpandableBox.HideBox {\n width: 0;\n height: 0;\n overflow: hidden;\n border: none;\n padding: 0;\n margin: 0;\n opacity: 0;\n}","import { Component, Prop, h, State } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nimport '@everymatrix/lottery-grid';\nexport class LotteryDrawResults {\n constructor() {\n /**\n * Language of the widget\n */\n this.language = 'en';\n /**\n * Shows only the last draw\n */\n this.drawMode = false;\n /**\n * The drawID (option)\n */\n this.drawId = '';\n /**\n * The game name\n */\n this.gameName = '';\n /**\n * The ticket submission date\n */\n this.ticketDate = '';\n /**\n * The ticket status\n */\n this.ticketStatus = '';\n /**\n * The ticket id\n */\n this.ticketId = '';\n /**\n * The ticket amount\n */\n this.ticketAmount = '';\n /**\n * The ticket multiplier\n */\n this.ticketMultiplier = false;\n /**\n * The ticket draw count\n */\n this.ticketDrawCount = 0;\n this.multiplier = 3;\n this.isLoading = true;\n this.drawResults = [];\n this.rules = {};\n this.toggleDrawer = [false];\n this.hasErrors = false;\n this.errorText = '';\n this.changeBox = (index) => {\n this.toggleDrawer = this.toggleDrawer.map((item, itemIndex) => {\n if (itemIndex == index) {\n return !item;\n }\n return item;\n });\n if (index >= this.toggleDrawer.length) {\n this.toggleDrawer.push(true);\n }\n };\n }\n connectedCallback() {\n let promises = [];\n promises.push(this.getGameData());\n if (this.drawId) {\n promises.push(this.getDrawData());\n }\n Promise.all(promises)\n .then(() => {\n this.isLoading = false;\n });\n }\n getDrawData() {\n return new Promise((resolve, reject) => {\n let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}`);\n fetch(url.href)\n .then((response) => {\n // @TODO EXCEPTIONS\n return response.json();\n })\n .then((data) => {\n this.drawData = data;\n resolve(true);\n this.isLoading = false;\n })\n .catch((err) => {\n reject(err);\n this.isLoading = false;\n });\n });\n }\n getGameData() {\n return new Promise((resolve, reject) => {\n let url = new URL(`${this.endpoint}/games/${this.gameId}`);\n fetch(url.href)\n .then((response) => {\n return response.json();\n })\n .then((data) => {\n this.rules = {\n maximumAllowed: data.rules.boards[0].maximumAllowed,\n totalNumbers: data.rules.boards[0].totalNumbers\n };\n resolve(true);\n this.isLoading = false;\n this.hasErrors = false;\n })\n .catch((err) => {\n this.isLoading = false;\n this.hasErrors = true;\n this.errorText = err;\n reject(err);\n });\n });\n }\n render() {\n if (this.isLoading) {\n return (h(\"p\", null, \"Loading, please wait ...\"));\n }\n else if (this.hasErrors) {\n h(\"p\", null, this.errorText);\n }\n else {\n return (h(\"section\", { class: \"DrawResultsSection\" }, !this.drawMode ?\n h(\"div\", { class: \"DrawResultsArea\" },\n h(\"div\", { class: \"TicketInfo\" },\n h(\"div\", { class: \"TicketGameName\" },\n translate('drawName', this.language),\n \": \",\n h(\"span\", null, this.gameName)),\n h(\"div\", { class: \"TicketDate\" },\n translate('ticketPurchaseDate', this.language),\n \": \",\n h(\"span\", null, this.ticketDate.slice(0, 10))),\n h(\"div\", { class: \"TicketStatus\" },\n translate('ticketStatus', this.language),\n \": \",\n h(\"span\", null, this.ticketStatus))),\n h(\"div\", { class: \"DrawResultsBody\" },\n h(\"div\", { class: \"TicketIdContainer\" },\n h(\"p\", null,\n translate('ticketId', this.language),\n \": \",\n h(\"span\", null, this.ticketId))),\n h(\"div\", { class: \"TicketAmountContainer\" },\n h(\"p\", null,\n translate('ticketAmount', this.language),\n \" \",\n h(\"span\", null, this.ticketAmount))),\n h(\"div\", { class: \"DrawNumbersGrid\" },\n h(\"p\", null,\n translate('drawNumbersGridTicket', this.language),\n \":\"),\n h(\"div\", { class: \"BulletContainer\" },\n h(\"lottery-grid\", { \"maximum-allowed\": this.rules.maximumAllowed, \"total-numbers\": this.rules.totalNumbers, \"selected-numbers\": this.selection, selectable: false, \"display-selected\": true, language: this.language }))),\n h(\"div\", { class: \"DrawMultipler\" },\n h(\"label\", { class: \"Label\" },\n translate('winUpTo', this.language),\n \" \",\n h(\"span\", null, JSON.stringify(this.ticketMultiplier)))),\n h(\"div\", { class: \"NumberOfDrawsContainer\" },\n h(\"p\", null,\n translate('numberOfDraws', this.language),\n \": \",\n this.ticketDrawCount),\n h(\"div\", { class: \"DrawTicketsContainer\" }, this.drawResults.map((item, index) => h(\"div\", { class: \"ExpandableBoxes\" },\n h(\"div\", { class: this.toggleDrawer[index] ? 'ExpandableBox ShowBox' : 'ExpandableBox', onClick: () => this.changeBox(index) },\n h(\"div\", { class: \"TicketResultContainer\" },\n h(\"p\", null,\n translate('ticketResult', this.language),\n \": \",\n item.status)),\n item.state == 'won' &&\n h(\"div\", { class: \"AmountWonContainer\" },\n h(\"p\", null,\n translate('amountWon', this.language),\n \": \",\n Number(item.amount).toLocaleString('en'),\n \" \",\n item.currency)),\n h(\"div\", { class: \"DrawIdContainer\" },\n h(\"p\", null,\n translate('drawId', this.language),\n \": \",\n item.drawId)),\n h(\"div\", { class: \"DrawDateContainer\" },\n h(\"p\", null,\n translate('drawDate', this.language),\n \": \",\n item.updatedAt.slice(0, 10),\n \" | \",\n item.updatedAt.slice(11, 19))),\n h(\"div\", { class: \"DrawNumbersGrid\" }),\n h(\"div\", { class: \"DrawMultipler\" },\n h(\"label\", { class: \"Label\" },\n translate('winUpTo', this.language),\n \" \",\n item.multiplier)))))))))\n :\n h(\"div\", { class: \"DrawResultsArea\" }, this.drawData &&\n h(\"div\", null,\n h(\"div\", { class: \"DrawResultsHeader\" },\n h(\"span\", null,\n translate('drawId', this.language),\n \": \",\n this.drawData.id),\n h(\"span\", null,\n translate('drawDate', this.language),\n \": \",\n this.drawData.date.slice(0, 10))),\n h(\"div\", { class: \"DrawResultsBody\" },\n h(\"div\", { class: \"DrawNumbersGrid\" },\n h(\"p\", null,\n translate('drawNumbersGridDraw', this.language),\n \":\"),\n h(\"div\", { class: \"BulletContainer\" },\n h(\"lottery-grid\", { \"maximum-allowed\": this.rules.maximumAllowed, \"total-numbers\": this.rules.totalNumbers, selectedNumbers: this.drawData.winningNumbers.join(','), \"display-selected\": true, selectable: false, language: this.language })),\n h(\"div\", { class: \"DrawMultipler\" },\n h(\"label\", { class: \"Label\" },\n translate('multiplier', this.language),\n \" \",\n this.multiplier))))))));\n }\n }\n static get is() { return \"lottery-draw-results\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-draw-results.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-draw-results.css\"]\n }; }\n static get properties() { return {\n \"endpoint\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Endpoint URL for the source of data\"\n },\n \"attribute\": \"endpoint\",\n \"reflect\": false\n },\n \"gameId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"GameID of the lottery game\"\n },\n \"attribute\": \"game-id\",\n \"reflect\": false\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language of the widget\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n },\n \"playerId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Player ID\"\n },\n \"attribute\": \"player-id\",\n \"reflect\": false\n },\n \"drawMode\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Shows only the last draw\"\n },\n \"attribute\": \"draw-mode\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"drawId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The drawID (option)\"\n },\n \"attribute\": \"draw-id\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"gameName\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The game name\"\n },\n \"attribute\": \"game-name\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"ticketDate\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ticket submission date\"\n },\n \"attribute\": \"ticket-date\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"ticketStatus\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ticket status\"\n },\n \"attribute\": \"ticket-status\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"ticketId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ticket id\"\n },\n \"attribute\": \"ticket-id\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"ticketAmount\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ticket amount\"\n },\n \"attribute\": \"ticket-amount\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"ticketMultiplier\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ticket multiplier\"\n },\n \"attribute\": \"ticket-multiplier\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"ticketDrawCount\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ticket draw count\"\n },\n \"attribute\": \"ticket-draw-count\",\n \"reflect\": false,\n \"defaultValue\": \"0\"\n }\n }; }\n static get states() { return {\n \"multiplier\": {},\n \"isLoading\": {},\n \"drawResults\": {},\n \"rules\": {},\n \"toggleDrawer\": {},\n \"hasErrors\": {},\n \"errorText\": {}\n }; }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as e,h as t}from"./p-3a9ad86b.js";const o=":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";const n=class{constructor(t){e(this,t);this.selectedIndex=0;this.tabContent=""}connectedCallback(){}render(){this.tabContent=t("div",{class:"TabContent"},"Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");if(this.selectedIndex+1==2){this.tabContent=t("div",{class:"TabContent"},t("ol",null,t("li",null,"Register or Login"),t("li",null,"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose “I feel lucky”."),t("li",null,"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")))}else if(this.selectedIndex+1==3){this.tabContent=t("div",{class:"TabContent"},t("ul",null,t("li",null,"What are my odds of winning?"),t("li",null,"How can I find out if I’ve won a draw game?"),t("li",null,"How do I claim my prize?")))}return this.tabContent}};n.style=o;export{n as helper_tab};
2
+ //# sourceMappingURL=p-bd53d31a.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../helper-tabs/dist/collection/components/helper-tab/helper-tab.css?tag=helper-tab&encapsulation=shadow","../helper-tabs/dist/collection/components/helper-tab/helper-tab.js"],"names":["helperTabCss","HelperTab","[object Object]","hostRef","this","selectedIndex","tabContent","h","class"],"mappings":"2CAAA,MAAMA,EAAe,sFCCRC,EAAS,MACpBC,YAAAC,aAIEC,KAAKC,cAAgB,EACrBD,KAAKE,WAAa,GAEpBJ,qBAKAA,SACEE,KAAKE,WAAaC,EAAE,MAAO,CAAEC,MAAO,cAAgB,qPACpD,GAAIJ,KAAKC,cAAgB,GAAK,EAAG,CAC/BD,KAAKE,WAAaC,EAAE,MAAO,CAAEC,MAAO,cAClCD,EAAE,KAAM,KACNA,EAAE,KAAM,KAAM,qBACdA,EAAE,KAAM,KAAM,4IACdA,EAAE,KAAM,KAAM,4LAEf,GAAIH,KAAKC,cAAgB,GAAK,EAAG,CACpCD,KAAKE,WAAaC,EAAE,MAAO,CAAEC,MAAO,cAClCD,EAAE,KAAM,KACNA,EAAE,KAAM,KAAM,gCACdA,EAAE,KAAM,KAAM,+CACdA,EAAE,KAAM,KAAM,8BAEpB,OAAQH,KAAe","sourcesContent":[":host {\n display: block;\n}\n\n.TabContent {\n font-size: 14px;\n color: #000;\n font-weight: normal;\n}","import { Component, h, Prop, State } from '@stencil/core';\nexport class HelperTab {\n constructor() {\n /**\n * Selected index\n */\n this.selectedIndex = 0;\n this.tabContent = '';\n }\n connectedCallback() {\n /**\n * fetch(cmsEndpoint + / + / + selectedIndex)\n */\n }\n render() {\n this.tabContent = h(\"div\", { class: \"TabContent\" }, \"Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.\");\n if (this.selectedIndex + 1 == 2) {\n this.tabContent = h(\"div\", { class: \"TabContent\" },\n h(\"ol\", null,\n h(\"li\", null, \"Register or Login\"),\n h(\"li\", null, \"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \\u201CI feel lucky\\u201D.\"),\n h(\"li\", null, \"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!\")));\n }\n else if (this.selectedIndex + 1 == 3) {\n this.tabContent = h(\"div\", { class: \"TabContent\" },\n h(\"ul\", null,\n h(\"li\", null, \"What are my odds of winning?\"),\n h(\"li\", null, \"How can I find out if I\\u2019ve won a draw game?\"),\n h(\"li\", null, \"How do I claim my prize?\")));\n }\n return (this.tabContent);\n }\n static get is() { return \"helper-tab\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-tab.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-tab.css\"]\n }; }\n static get properties() { return {\n \"selectedIndex\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Selected index\"\n },\n \"attribute\": \"selected-index\",\n \"reflect\": false,\n \"defaultValue\": \"0\"\n },\n \"cmsEndpoint\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Endpoing for CMS\"\n },\n \"attribute\": \"cms-endpoint\",\n \"reflect\": false\n }\n }; }\n static get states() { return {\n \"tabContent\": {}\n }; }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as o,g as s}from"./p-3a9ad86b.js";const i="en";const r=["ro","en"];const n={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"}};const a=(t,e)=>{const o=e;return n[o!==undefined&&r.includes(o)?o:i][t]};const l='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';const c=class{constructor(o){t(this,o);this.accordionEvent=e(this,"helperAccordionAction",7);this.ticketHistoryFlag=false;this.headerTitle="";this.headerSubtitle="";this.description="";this.footer=false;this.deleteTab=false;this.postMessage=false;this.eventName="helperAccordionAction";this.collapsed=true;this.language="en"}connectedCallback(){this.showContent=!this.collapsed}toggleContent(){this.showContent=!this.showContent}deleteAction(){if(this.postMessage){window.postMessage({type:this.eventName},window.location.href)}this.accordionEvent.emit()}render(){return o("div",{class:"Wrapper"},o("div",{class:this.ticketHistoryFlag===true?"HeaderTicketHistory":"Header"},o("p",{class:"Title"},this.headerTitle),o("p",{class:"Subtitle"},this.headerSubtitle),o("p",{class:"Subtitle"},this.description),o("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&o("div",null,o("div",{class:"Content"},o("slot",{name:"accordionContent"}),this.footer&&this.showContent&&o("div",null,this.deleteTab&&o("span",{class:"ActionButton",onClick:()=>this.deleteAction()},a("deleteTicket",this.language))))))}};c.style=l;const d='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}';const p=class{constructor(e){t(this,e);this.disabled=false;this.selected=false;this.selectedIndex=0;this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}]}connectedCallback(){}render(){return o("div",null,o("div",{class:"Tabs"},this.tabs.map(((t,e)=>o("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),o("div",null,o("helper-tab",{selectedIndex:this.selectedIndex})))}get host(){return s(this)}};p.style=d;export{c as helper_accordion,p as helper_tabs};
2
+ //# sourceMappingURL=p-bfa5e84c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../helper-accordion/dist/collection/utils/locale.utils.js","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.css?tag=helper-accordion&encapsulation=shadow","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.js","../helper-tabs/dist/collection/components/helper-tabs/helper-tabs.css?tag=helper-tabs&encapsulation=shadow","../helper-tabs/dist/collection/components/helper-tabs/helper-tabs.js"],"names":["DEFAULT_LANGUAGE","SUPPORTED_LANGUAGES","TRANSLATIONS","en","deleteTicket","ro","translate","key","customLang","lang","undefined","includes","helperAccordionCss","Accordion","[object Object]","hostRef","this","ticketHistoryFlag","headerTitle","headerSubtitle","description","footer","deleteTab","postMessage","eventName","collapsed","language","showContent","window","type","location","href","accordionEvent","emit","h","class","onClick","toggleContent","name","deleteAction","helperTabsCss","HelperTabs","disabled","selected","selectedIndex","tabs","label","map","tab","index"],"mappings":"yDAAA,MAAMA,EAAmB,KACzB,MAAMC,EAAsB,CAAC,KAAM,MACnC,MAAMC,EAAe,CACnBC,GAAI,CACFC,aAAc,iBAEhBC,GAAI,CACFD,aAAc,mBAGX,MAAME,EAAY,CAACC,EAAKC,KAC7B,MAAMC,EAAOD,EACb,OAAON,EAAaO,IAASC,WAAaT,EAAoBU,SAASF,GAAQA,EAAOT,GAAkBO,ICZ1G,MAAMK,EAAqB,w9CCEdC,EAAS,MACpBC,YAAAC,mEAIEC,KAAKC,kBAAoB,MAIzBD,KAAKE,YAAc,GAInBF,KAAKG,eAAiB,GAItBH,KAAKI,YAAc,GAInBJ,KAAKK,OAAS,MAIdL,KAAKM,UAAY,MAIjBN,KAAKO,YAAc,MAInBP,KAAKQ,UAAY,wBAIjBR,KAAKS,UAAY,KAIjBT,KAAKU,SAAW,KAGlBZ,oBACEE,KAAKW,aAAeX,KAAKS,UAE3BX,gBACEE,KAAKW,aAAeX,KAAKW,YAE3Bb,eACE,GAAIE,KAAKO,YAAa,CAEpBK,OAAOL,YAAY,CAAEM,KAAMb,KAAKQ,WAAaI,OAAOE,SAASC,MAE/Df,KAAKgB,eAAeC,OAEtBnB,SACE,OAAQoB,EAAE,MAAO,CAAEC,MAAO,WACxBD,EAAE,MAAO,CAAEC,MAAOnB,KAAKC,oBAAsB,KAAO,sBAAwB,UAC1EiB,EAAE,IAAK,CAAEC,MAAO,SAAWnB,KAAKE,aAChCgB,EAAE,IAAK,CAAEC,MAAO,YAAcnB,KAAKG,gBACnCe,EAAE,IAAK,CAAEC,MAAO,YAAcnB,KAAKI,aACnCc,EAAE,OAAQ,CAAEC,MAAO,SAAUC,QAAS,IAAMpB,KAAKqB,iBAAmBrB,KAAKW,YAAc,IAAM,MAC/FX,KAAKW,aACHO,EAAE,MAAO,KACPA,EAAE,MAAO,CAAEC,MAAO,WAChBD,EAAE,OAAQ,CAAEI,KAAM,qBAClBtB,KAAKK,QAAUL,KAAKW,aAClBO,EAAE,MAAO,KAAMlB,KAAKM,WAClBY,EAAE,OAAQ,CAAEC,MAAO,eAAgBC,QAAS,IAAMpB,KAAKuB,gBAAkBjC,EAAU,eAAgBU,KAAKU,2BCxExH,MAAMc,EAAgB,igBCCTC,EAAU,MACrB3B,YAAAC,aAIEC,KAAK0B,SAAW,MAIhB1B,KAAK2B,SAAW,MAIhB3B,KAAK4B,cAAgB,EAIrB5B,KAAK6B,KAAO,CAAC,CAAEC,MAAO,eAAiB,CAAEA,MAAO,SAAW,CAAEA,MAAO,SAEtEhC,qBAKAA,SACE,OAAQoB,EAAE,MAAO,KACfA,EAAE,MAAO,CAAEC,MAAO,QAAUnB,KAAK6B,KAAKE,KAAI,CAACC,EAAKC,IAAUf,EAAE,SAAU,CAAEC,MAAO,aAAenB,KAAK4B,eAAiBK,EAAQ,UAAY,IAAKb,QAAS,IAAMpB,KAAK4B,cAAgBK,GAASD,EAAIF,UAC9LZ,EAAE,MAAO,KACPA,EAAE,aAAc,CAAEU,cAAe5B,KAAK4B","sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en'];\nconst TRANSLATIONS = {\n en: {\n deleteTicket: 'Delete ticket'\n },\n ro: {\n deleteTicket: 'Sterge biletul'\n },\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.Header {\n border-radius: 4px 4px 0 0;\n background: #009993;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n}\n.Header:hover {\n background: #00ABA4;\n}\n.Header .Title,\n.Header .Subtitle,\n.Header .Description {\n margin: 0;\n font-size: 14px;\n color: #fff;\n}\n.Header .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.HeaderTicketHistory {\n border-radius: 4px;\n background: #F1F1F1;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 5px;\n}\n.HeaderTicketHistory:hover {\n background: #00ABA4;\n}\n.HeaderTicketHistory .Title,\n.HeaderTicketHistory .Subtitle,\n.HeaderTicketHistory .Description {\n margin: 0;\n font-size: 14px;\n color: #000;\n}\n.HeaderTicketHistory .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.Content {\n border-radius: 0 0 4px 4px;\n background: #fff;\n border: 1px solid #009993;\n padding: 10px 15px;\n user-select: none;\n color: #000;\n margin-bottom: 10px;\n}\n\n.ActionButton {\n cursor: pointer;\n display: inline-block;\n border-radius: 4px;\n margin: 20px 0 10px;\n text-transform: uppercase;\n font-size: 12px;\n text-align: center;\n padding: 8px 20px;\n min-width: 80px;\n background: #FF3D00;\n border: 1px solid #FF3D00;\n color: #FFF;\n}\n.ActionButton:hover {\n background: #FF6536;\n border: 1px solid #FF3D00;\n}","import { Component, Prop, h, State, Event } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nexport class Accordion {\n constructor() {\n /**\n * Flag for ticket history\n */\n this.ticketHistoryFlag = false;\n /**\n * Title (top header)\n */\n this.headerTitle = '';\n /**\n * SubTitle (top header)\n */\n this.headerSubtitle = '';\n /**\n * Description\n */\n this.description = '';\n /**\n * Enables footer content\n */\n this.footer = false;\n /**\n * Enables footer button for tab deletion\n */\n this.deleteTab = false;\n /**\n * Activates postMessages as events for actions from the widget\n */\n this.postMessage = false;\n /**\n * Name of the event emitter by the action button\n */\n this.eventName = 'helperAccordionAction';\n /**\n * Collapsed\n */\n this.collapsed = true;\n /**\n * Language\n */\n this.language = 'en';\n }\n // @TODO fix the `any` type :)\n connectedCallback() {\n this.showContent = !this.collapsed;\n }\n toggleContent() {\n this.showContent = !this.showContent;\n }\n deleteAction() {\n if (this.postMessage) {\n // @TODO maybe change the name type, this one sucks\n window.postMessage({ type: this.eventName }, window.location.href);\n }\n this.accordionEvent.emit();\n }\n render() {\n return (h(\"div\", { class: \"Wrapper\" },\n h(\"div\", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' },\n h(\"p\", { class: \"Title\" }, this.headerTitle),\n h(\"p\", { class: \"Subtitle\" }, this.headerSubtitle),\n h(\"p\", { class: \"Subtitle\" }, this.description),\n h(\"span\", { class: \"Expand\", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')),\n this.showContent &&\n h(\"div\", null,\n h(\"div\", { class: \"Content\" },\n h(\"slot\", { name: 'accordionContent' }),\n this.footer && this.showContent &&\n h(\"div\", null, this.deleteTab &&\n h(\"span\", { class: \"ActionButton\", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));\n }\n static get is() { return \"helper-accordion\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-accordion.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-accordion.css\"]\n }; }\n static get properties() { return {\n \"ticketHistoryFlag\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Flag for ticket history\"\n },\n \"attribute\": \"ticket-history-flag\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"headerTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Title (top header)\"\n },\n \"attribute\": \"header-title\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"headerSubtitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"SubTitle (top header)\"\n },\n \"attribute\": \"header-subtitle\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"description\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Description\"\n },\n \"attribute\": \"description\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"footer\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer content\"\n },\n \"attribute\": \"footer\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"deleteTab\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Enables footer button for tab deletion\"\n },\n \"attribute\": \"delete-tab\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"postMessage\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Activates postMessages as events for actions from the widget\"\n },\n \"attribute\": \"post-message\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"eventName\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Name of the event emitter by the action button\"\n },\n \"attribute\": \"event-name\",\n \"reflect\": false,\n \"defaultValue\": \"'helperAccordionAction'\"\n },\n \"collapsed\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Collapsed\"\n },\n \"attribute\": \"collapsed\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n }\n }; }\n static get states() { return {\n \"showContent\": {}\n }; }\n static get events() { return [{\n \"method\": \"accordionEvent\",\n \"name\": \"helperAccordionAction\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Action event\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.Tabs {\n display: flex;\n gap: 10px;\n overflow-x: auto;\n}\n\n.TabButton {\n cursor: pointer;\n width: auto;\n border-radius: 4px;\n padding: 8px 15px;\n margin: 5px 0 10px;\n border: 1px solid #009993;\n background: #FFF;\n color: #000;\n font-size: 12px;\n transition: all 0.2s linear;\n text-align: center;\n letter-spacing: 0;\n white-space: nowrap;\n}\n.TabButton:hover {\n background: #F1F1F1;\n}\n.TabButton.Active {\n background: #009993;\n color: #FFF;\n}","import { Component, Prop, Element, h } from '@stencil/core';\nexport class HelperTabs {\n constructor() {\n /**\n * Tell me if it is disabled\n */\n this.disabled = false;\n /**\n * Tell me what tab is selected\n */\n this.selected = false;\n /**\n * Default selected index\n */\n this.selectedIndex = 0;\n /**\n * Tabs details\n */\n this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];\n }\n connectedCallback() {\n if (this.tabs.length == 0) {\n // fetch CMS data\n }\n }\n render() {\n return (h(\"div\", null,\n h(\"div\", { class: \"Tabs\" }, this.tabs.map((tab, index) => h(\"button\", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))),\n h(\"div\", null,\n h(\"helper-tab\", { selectedIndex: this.selectedIndex }))));\n }\n static get is() { return \"helper-tabs\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-tabs.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-tabs.css\"]\n }; }\n static get properties() { return {\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Tell me if it is disabled\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Gimme names or you die\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"selected\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Tell me what tab is selected\"\n },\n \"attribute\": \"selected\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"cmsEndpoint\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Endpoing for CMS\"\n },\n \"attribute\": \"cms-endpoint\",\n \"reflect\": false\n },\n \"selectedIndex\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Default selected index\"\n },\n \"attribute\": \"selected-index\",\n \"reflect\": true,\n \"defaultValue\": \"0\"\n },\n \"tabs\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"Array<Object>\",\n \"resolved\": \"Object[]\",\n \"references\": {\n \"Array\": {\n \"location\": \"global\"\n },\n \"Object\": {\n \"location\": \"global\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Tabs details\"\n },\n \"defaultValue\": \"[{label: 'How to Play'}, {label: 'About'}, {label: 'FAQs'}]\"\n }\n }; }\n static get elementRef() { return \"host\"; }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as o,c as i,h as e}from"./p-3a9ad86b.js";const s=o=>!!(o.toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));const l=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";const t=class{constructor(e){o(this,e);this.cancel=i(this,"modalCloseEvent",7);this.visible=true;this.userAgent=window.navigator.userAgent}handleHelperModalClose(){this.visible=false;this.cancel.emit()}render(){return this.visible&&e("div",{class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper"},e("div",{class:"HelperModalWrapper HelperModalVisible"},e("div",{class:"HelperModalContent"+(s(this.userAgent)?" HelperModalMobileContent":"")},e("span",{class:"HelperModalClose"+(s(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),e("slot",null))))}};t.style=l;export{t as helper_modal};
2
+ //# sourceMappingURL=p-dedb92e5.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../helper-modal/dist/collection/utils/utils.js","../helper-modal/dist/collection/components/helper-modal/helper-modal.css?tag=helper-modal&encapsulation=shadow","../helper-modal/dist/collection/components/helper-modal/helper-modal.js"],"names":["isMobile","userAgent","toLowerCase","match","helperModalCss","HelperModal","[object Object]","hostRef","this","visible","window","navigator","cancel","emit","h","class","onClick","handleHelperModalClose","bind"],"mappings":"kDAMO,MAAMA,EAAYC,MACbA,EAAUC,cAAcC,MAAM,aACtCF,EAAUC,cAAcC,MAAM,mBAC9BF,EAAUC,cAAcC,MAAM,sBAC9BF,EAAUC,cAAcC,MAAM,qDCVlC,MAAMC,EAAiB,ggCCEVC,EAAW,MACtBC,YAAAC,qDAIEC,KAAKC,QAAU,KACfD,KAAKP,UAAYS,OAAOC,UAAUV,UAEpCK,yBACEE,KAAKC,QAAU,MACfD,KAAKI,OAAOC,OAGdP,SACE,OAASE,KAAKC,SACZK,EAAE,MAAO,CAAEC,MAAOP,KAAKC,QAAU,wCAA0C,sBACzEK,EAAE,MAAO,CAAEC,MAAO,yCAChBD,EAAE,MAAO,CAAEC,MAAO,sBAAwBf,EAASQ,KAAKP,WAAa,4BAA8B,KACjGa,EAAE,OAAQ,CAAEC,MAAO,oBAAsBf,EAASQ,KAAKP,WAAa,0BAA4B,IAAKe,QAASR,KAAKS,uBAAuBC,KAAKV,OAAS,KACxJM,EAAE,OAAQ","sourcesContent":["/**\n * @name isMobile\n * @description A method that returns if the browser used to access the app is from a mobile device or not\n * @param {String} userAgent window.navigator.userAgent\n * @returns {Boolean} true or false\n */\nexport const isMobile = (userAgent) => {\n return !!(userAgent.toLowerCase().match(/android/i) ||\n userAgent.toLowerCase().match(/blackberry|bb/i) ||\n userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||\n userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));\n};\n/**\n * @name getDevice\n * @description A method that returns the type of the device\n * @param {String} userAgent window.navigator.userAgent\n * @returns {String} Android/iPhone/iPad/PC\n */\nexport const getDevice = (userAgent) => {\n if (userAgent.toLowerCase().match(/android/i)) {\n return 'Android';\n }\n if (userAgent.toLowerCase().match(/iphone/i)) {\n return 'iPhone';\n }\n if (userAgent.toLowerCase().match(/ipad|ipod/i)) {\n return 'iPad';\n }\n return 'PC';\n};\n",":host {\n display: block;\n}\n\n.HelperModalWrapper {\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.7);\n opacity: 0;\n visibility: hidden;\n transform: scale(1.1);\n transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;\n z-index: 1;\n}\n\n.HelperModalVisible {\n opacity: 1;\n visibility: visible;\n transform: scale(1);\n transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;\n}\n\n.HelperModalContent {\n position: relative;\n border: solid 1px #848e97;\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.007);\n font-size: 14px;\n padding: 10px 10px 5px 10px;\n background-color: #fff;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: 4px;\n width: 600px;\n max-height: 600px;\n overflow-y: scroll;\n}\n\n.HelperModalMobileContent {\n background: #FFF;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: 4px;\n width: 80%;\n max-height: 350px;\n}\n\n.HelperModalClose {\n cursor: pointer;\n position: absolute;\n top: 15px;\n right: 15px;\n font-size: 20px;\n color: #000;\n}\n\n.HelperModalMobileClose {\n position: absolute;\n top: 15px;\n right: 15px;\n font-size: 20px;\n color: #000;\n}","import { Component, Event, h, Prop } from '@stencil/core';\nimport { isMobile } from \"../../utils/utils\";\nexport class HelperModal {\n constructor() {\n /**\n * Toggles if the helper is visible or not\n */\n this.visible = true;\n this.userAgent = window.navigator.userAgent;\n }\n handleHelperModalClose() {\n this.visible = false;\n this.cancel.emit();\n }\n ;\n render() {\n return ((this.visible &&\n h(\"div\", { class: this.visible ? \"HelperModalWrapper HelperModalVisible\" : \"HelperModalWrapper\" },\n h(\"div\", { class: \"HelperModalWrapper HelperModalVisible\" },\n h(\"div\", { class: \"HelperModalContent\" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') },\n h(\"span\", { class: \"HelperModalClose\" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, \"X\"),\n h(\"slot\", null))))));\n }\n static get is() { return \"helper-modal\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-modal.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-modal.css\"]\n }; }\n static get properties() { return {\n \"titleModal\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Modal title\"\n },\n \"attribute\": \"title-modal\",\n \"reflect\": false\n },\n \"visible\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Toggles if the helper is visible or not\"\n },\n \"attribute\": \"visible\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\n }\n }; }\n static get events() { return [{\n \"method\": \"cancel\",\n \"name\": \"modalCloseEvent\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The event triggered when the modal is closed\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as e,h as t,g as i}from"./p-3a9ad86b.js";import"@everymatrix/lottery-ticket-controller";const a="en";const r=["ro","en","ar"];const s={en:{error:"Error",title:"Chrono",backButton:"Back",lobbyButton:"Lobby",prize:"Prize",winUpTo:"Win up to",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",createTicket:"Create Ticket",modalSuccess:"Purchase successfully completed!",deleteTicketModalTitle:"Delete Ticket",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Cancel",deleteTicketModalConfirm:"Delete",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",lastDrawResultsTitle:"Last Draw Results",modalLogin:"Please login to submit a ticket"},ro:{error:"Eroare",title:"Loto 6/49",backButton:"Inapoi",lobbyButton:"Lobby",prize:"MARELE JACKPOT OMG",winUpTo:"Castiga pana la",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",createTicket:"Creeaza bilet",modalSuccess:"Achizitie efectuata cu succes",deleteTicketModalTitle:"Sterge biletul",deleteTicketModalText:"Esti sigur ca vrei sa stergi acest bilet?",deleteTicketModalCancel:"Anuleaza",deleteTicketModalConfirm:"Sterge",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",lastDrawResultsTitle:"Cele mai recente extrageri",modalLogin:"Please login to submit a ticket"},ar:{error:"خطأ",title:"كرونو",backButton:"خلف",lobbyButton:"ردهة",prize:"جائزة",winUpTo:"الفوز بما يصل الى",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",createTicket:"إنشاء تذكرة",modalSuccess:"!سيتم الشراء بنجاح قريبًا",deleteTicketModalTitle:"حذف التذكرة",deleteTicketModalText:"هل أنت متأكد أنك تريد حذف هذه التذكرة؟",deleteTicketModalCancel:"يلغي",deleteTicketModalConfirm:"حذف",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",lastDrawResultsTitle:"Cele mai recente extrageri",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة"}};const n=(e,t)=>{const i=t;return s[i!==undefined&&r.includes(i)?i:a][e]};const o='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#F1F1F1;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{background:#00958f;color:#FFF}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, #f1f1f1 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;border-bottom:solid 1px #D4D4D4;line-height:50px}.OrderSummary .Ticket span{text-align:right}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}';const l=class{constructor(t){e(this,t);this.language="en";this.autoPick=false;this.resetButton=false;this.tickets=[];this.tabIndex=0;this.hasErrors=false;this.totalAmount=0;this.successVisible=false;this.deleteVisible=false;this.latestDraw={};this.totalWinningsAmount=0;this.isLoggedIn=false;this.loginModalVisible=false;this.multiplier=false;this.quickPick=false}connectedCallback(){this.getGameDetails();this.getDraws();if(this.sessionId){this.isLoggedIn=true}}countdownLogic(e){this.interval=setInterval((()=>{this.daysRemaining=Math.floor((Date.parse(e)-(new Date).getTime())/(1e3*60*60*24));this.hoursRemaining=Math.floor((Date.parse(e)-(new Date).getTime())/(1e3*60*60)-this.daysRemaining*24);this.minutesRemaining=Math.floor((Date.parse(e)-(new Date).getTime())/(1e3*60)-this.daysRemaining*24*60-this.hoursRemaining*60);this.secondsRemaining=Math.floor((Date.parse(e)-(new Date).getTime())/1e3-this.daysRemaining*24*60*60-this.hoursRemaining*60*60-this.minutesRemaining*60)}),1e3)}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let e=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(e.href).then((e=>{if(e.status>=300){this.hasErrors=true;throw new Error("There was an error while fetching the data")}return e.json()})).then((e=>{this.gameData=e;this.basicStake=this.gameData.rules.stakes[0].amount;let t=this.gameData.draws.filter((e=>!e.winningNumbers));this.nextDraw=t[0].id;this.createNewTicket()})).catch((e=>{this.hasErrors=true;console.log("Error",e)}))}calculateTotalAmount(){const{currency:e}=this.gameData.rules.stakes[0];this.totalAmount=0;this.tickets.forEach((e=>{if(e.completed){this.totalAmount+=e.amount*e.stake}}));this.currency=e}gridFilledHandler(e){this.tickets=this.tickets.map((t=>{if(t.ticketId==e.detail.id){let i=t.selectedNumbers||[];i[e.detail.index]=e.detail.selectedNumbers.map((e=>parseInt(e,10)));return{gameId:t.gameId,ticketId:t.ticketId,completed:true,amount:e.detail.draws,stake:t.stake,selectedNumbers:i}}return t}));this.calculateTotalAmount()}gridDirtyHandler(e){this.tickets=this.tickets.map((t=>{if(t.gameId==e.detail.id){return{gameId:t.gameId,ticketId:t.ticketId,completed:false,amount:t.amount,stake:t.stake,grids:[]}}return t}))}deleteTicketHandler(e){this.deleteVisible=true;this.deleteEventData=e}modalCloseEvent(){this.deleteVisible=false;this.loginModalVisible=false}stakeChangeHandler(e){const{ticketId:t,stake:i}=e.detail;this.tickets[t-1].stake=i;this.calculateTotalAmount()}multiplierChangeHandler(e){this.multiplier=e.detail}getDraws(){let e=new URL(`${this.endpoint}/games/${this.gameId}/draws`);let t={method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}};fetch(e.href,t).then((e=>e.json())).then((e=>{var t;let i=e.items.filter((e=>{if(Date.parse(e.date)>(new Date).getTime()){return!e.winningNumbers}}));let a=e.items.filter((e=>e.winningNumbers));this.latestDraw=i[0];this.nextDate=this.latestDraw.date;this.countdownLogic(this.nextDate);this.lastDrawId=a[a.length-1].id;(t=this.latestDraw)===null||t===void 0?void 0:t.prizes.forEach((e=>{this.totalWinningsAmount+=JSON.parse(e.amount)}))}))}confirmDeleteTicketHandler(e){this.tickets=this.tickets.filter((t=>{if(t.ticketId==e.detail.ticketId){return false}return true}));this.calculateTotalAmount();this.deleteVisible=false}createNewTicket(){this.tickets=[...this.tickets,{gameId:this.gameId,ticketId:this.tickets.length+1,completed:false,amount:1,stake:this.basicStake,grids:[]}]}showLoginModal(){this.loginModalVisible=true}submitTickets(){let e=new URL(`${this.endpoint}/tickets`);let t={gameId:this.gameId,tickets:[]};this.tickets.forEach((e=>{t.tickets.push({startingDrawId:this.nextDraw,amount:e.stake,gameId:this.gameId,currency:this.currency,selection:e.selectedNumbers,multiplier:this.multiplier,drawCount:e.amount,quickPick:this.quickPick})}));let i={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`},body:JSON.stringify(t)};fetch(e.href,i).then((e=>{if(e.status>300){throw new Error("err")}return e.json()})).then((e=>{console.log("data",e)}));this.successVisible=true}render(){if(this.hasErrors){return t("div",{class:"GamePage"},t("div",{class:"Title"},n("error",this.language)))}return t("div",{class:"GamePage",dir:this.language=="ar"?"rtl":"ltr"},t("div",{class:"GridBanner"},t("div",{class:"BannerButtonsWrapper"},t("button",{class:"BannerBackButton"},t("span",{class:"BannerBackButtonArrow"},"ᐸ "),n("backButton",this.language)),t("button",{class:"BannerLobbyButton"},n("lobbyButton",this.language))),t("div",{class:"Tabs"},t("div",{class:"TabButton"+(this.tabIndex==0?" Active":""),onClick:()=>this.tabIndex=0},n("buy",this.language)),t("div",{class:"TabButton"+(this.tabIndex==1?" Active":""),onClick:()=>this.tabIndex=1},n("viewLatest",this.language)))),t("div",{class:"NextDrawWrapper"},t("div",{class:"TotalWinnings"},n("winUpTo",this.language),": ",t("span",null,"$",this.totalWinningsAmount.toLocaleString("en-US",{maximumFractionDigits:2}))),t("div",{class:"NextDraw"},t("p",{class:"BannerText"},n("nextDraw",this.language)),t("div",{class:"BannerCountdown"},t("span",{class:"CountdownDays"},this.daysRemaining,"D"),t("span",{class:"CountdownHours"},this.hoursRemaining,"H"),t("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),t("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),this.tabIndex==0&&t("div",{class:"GamePageContent"},t("div",{class:"GameDetails"},t("lottery-game-details",null)),t("div",{class:"TicketsWrapper"},this.tickets.map((e=>t("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":e.ticketId,"game-id":e.gameId,collapsed:false,last:true,language:this.language,"auto-pick":this.autoPick,"reset-button":this.resetButton}))),t("div",{class:"CreateNewTicket"},t("button",{onClick:()=>this.createNewTicket()},"+"),t("span",null,n("createTicket",this.language)))),t("div",{class:"OrderSummary"},t("h3",{class:"OrderSummaryTitle"},n("orderSummaryTitle",this.language)),t("div",{class:"Ticket"},n("orderSummaryTickets",this.language),": ",t("span",null,this.tickets.length)),t("div",{class:"Total"},n("orderSummaryTotal",this.language),": ",t("span",null,this.totalAmount," ",this.currency)),t("div",{class:"ButtonWrapper"},this.isLoggedIn&&t("span",{class:"Button",onClick:()=>this.submitTickets()},n("orderSummarySubmit",this.language)),!this.isLoggedIn&&t("div",null,t("span",{class:"Button",onClick:()=>this.showLoginModal()},n("orderSummarySubmit",this.language)),t("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible},t("p",{class:"SubmitModalSuccess"},n("modalLogin",this.language))))))),this.tabIndex==1&&t("div",null,t("h4",{class:"LastDrawResultsTitle"},n("lastDrawResultsTitle",this.language)),t("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"draw-id":this.lastDrawId,"draw-mode":true}),t("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language})),t("helper-modal",{"title-modal":"Success",visible:this.successVisible},t("p",{class:"SubmitModalSuccess"},n("modalSuccess",this.language))),t("helper-modal",{"title-modal":"Delete Ticket",visible:this.deleteVisible},t("div",{class:"DeleteTicketModalWrapper"},t("h3",{class:"DeleteTicketModalTitle"},n("deleteTicketModalTitle",this.language)),t("p",{class:"DeleteTicketModalText"},n("deleteTicketModalText",this.language)),t("div",{class:"DeleteTicketModalButtons"},t("button",{class:"DeleteTicketModalCancel",onClick:()=>this.modalCloseEvent()},n("deleteTicketModalCancel",this.language)),t("button",{class:"DeleteTicketModalConfirm",onClick:()=>this.confirmDeleteTicketHandler(this.deleteEventData)},n("deleteTicketModalConfirm",this.language))))))}static get assetsDirs(){return["static"]}get element(){return i(this)}};l.style=o;export{l as lottery_game_page};
2
+ //# sourceMappingURL=p-f4592d65.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/lottery-game-page/src/utils/locale.utils.ts","../../../packages/lottery-game-page/src/components/lottery-game-page/lottery-game-page.scss?tag=lottery-game-page&encapsulation=shadow","../../../packages/lottery-game-page/src/components/lottery-game-page/lottery-game-page.tsx"],"names":["DEFAULT_LANGUAGE","SUPPORTED_LANGUAGES","TRANSLATIONS","en","error","title","backButton","lobbyButton","prize","winUpTo","nextDraw","buy","viewLatest","createTicket","modalSuccess","deleteTicketModalTitle","deleteTicketModalText","deleteTicketModalCancel","deleteTicketModalConfirm","orderSummaryTitle","orderSummaryTickets","orderSummaryTotal","orderSummarySubmit","lastDrawResultsTitle","modalLogin","ro","ar","translate","key","customLang","lang","undefined","includes","lotteryGamePageCss","LotteryGamePage","[object Object]","hostRef","this","language","autoPick","resetButton","tickets","tabIndex","hasErrors","totalAmount","successVisible","deleteVisible","latestDraw","totalWinningsAmount","isLoggedIn","loginModalVisible","multiplier","quickPick","getGameDetails","getDraws","sessionId","date","interval","setInterval","daysRemaining","Math","floor","Date","parse","getTime","hoursRemaining","minutesRemaining","secondsRemaining","clearInterval","url","URL","endpoint","gameId","fetch","href","then","res","status","Error","json","data","gameData","basicStake","rules","stakes","amount","draws","filter","item","winningNumbers","id","createNewTicket","catch","err","console","log","currency","forEach","completed","stake","event","map","ticketId","detail","arr","selectedNumbers","index","parseInt","calculateTotalAmount","grids","deleteEventData","drawOptions","method","headers","Content-Type","Accept","response","upcoming","items","past","nextDate","countdownLogic","lastDrawId","length","_a","prizes","element","JSON","body","push","startingDrawId","selection","drawCount","options","Authorization","stringify","h","class","dir","onClick","toLocaleString","maximumFractionDigits","ticket-id","game-id","collapsed","last","auto-pick","reset-button","submitTickets","showLoginModal","title-modal","visible","draw-id","draw-mode","modalCloseEvent","confirmDeleteTicketHandler"],"mappings":"iGAUA,MAAMA,EAAyB,KAC/B,MAAMC,EAAgC,CAAC,KAAM,KAAM,MACnD,MAAMC,EAA6B,CACjCC,GAAI,CACFC,MAAO,QACPC,MAAO,SACPC,WAAY,OACZC,YAAa,QACbC,MAAO,QACPC,QAAS,YACTC,SAAU,iBACVC,IAAK,cACLC,WAAY,sBACZC,aAAc,gBACdC,aAAc,mCACdC,uBAAwB,gBACxBC,sBAAuB,+CACvBC,wBAAyB,SACzBC,yBAA0B,SAC1BC,kBAAmB,gBACnBC,oBAAqB,SACrBC,kBAAmB,QACnBC,mBAAoB,SACpBC,qBAAsB,oBACtBC,WAAY,mCAEdC,GAAI,CACFrB,MAAO,SACPC,MAAO,YACPC,WAAY,SACZC,YAAa,QACbC,MAAO,qBACPC,QAAS,kBACTC,SAAU,wBACVC,IAAK,gBACLC,WAAY,qBACZC,aAAc,gBACdC,aAAc,gCACdC,uBAAwB,iBACxBC,sBAAuB,4CACvBC,wBAAyB,WACzBC,yBAA0B,SAC1BC,kBAAmB,kBACnBC,oBAAqB,QACrBC,kBAAmB,QACnBC,mBAAoB,UACpBC,qBAAsB,6BACtBC,WAAY,mCAEdE,GAAI,CACFtB,MAAO,MACPC,MAAO,QACPC,WAAY,MACZC,YAAa,OACbC,MAAO,QACPC,QAAS,oBACTC,SAAU,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qBAAsBU,KAAKC,WACjGkG,EAAA,eAAA,CAAAc,cAA0B,UAAUC,QAASlH,KAAKa,mBAAmBsF,EAAA,IAAA,CAAGC,MAAM,sBAAsB9G,EAAU,aAAcU,KAAKC,gBAO9ID,KAAKK,UAAY,GAClB8F,EAAA,MAAA,KACEA,EAAA,KAAA,CAAIC,MAAM,wBAAwB9G,EAAU,uBAAwBU,KAAKC,WACzEkG,EAAA,uBAAA,CAAsBjE,SAAUlC,KAAKkC,SAAQwE,UAAW1G,KAAKmC,OAAQlC,SAAUD,KAAKC,SAAQkH,UAAWnH,KAAKqF,WAAU+B,YAAa,OACnIjB,EAAA,+BAAA,CAA8BjE,SAAUlC,KAAKkC,SAAQwE,UAAW1G,KAAKmC,OAAQlC,SAAUD,KAAKC,YAE9FkG,EAAA,eAAA,CAAAc,cAA0B,UAAUC,QAASlH,KAAKQ,gBAAgB2F,EAAA,IAAA,CAAGC,MAAM,sBAAsB9G,EAAU,eAAgBU,KAAKC,YAChIkG,EAAA,eAAA,CAAAc,cAA0B,gBAAgBC,QAASlH,KAAKS,eACtD0F,EAAA,MAAA,CAAKC,MAAM,4BACTD,EAAA,KAAA,CAAIC,MAAM,0BAA0B9G,EAAU,yBAA0BU,KAAKC,WAC7EkG,EAAA,IAAA,CAAGC,MAAM,yBAAyB9G,EAAU,wBAAyBU,KAAKC,WAC1EkG,EAAA,MAAA,CAAKC,MAAM,4BACTD,EAAA,SAAA,CAAQC,MAAM,0BAA0BE,QAAS,IAAMtG,KAAKqH,mBAAoB/H,EAAU,0BAA2BU,KAAKC,WAC1HkG,EAAA,SAAA,CAAQC,MAAM,2BAA2BE,QAAS,IAAMtG,KAAKsH,2BAA2BtH,KAAKyE,kBAAmBnF,EAAU,2BAA4BU,KAAKC","sourcesContent":["interface Translation {\n [key: string]: string;\n}\n\ninterface Translations {\n en: Translation,\n ro: Translation,\n ar: Translation\n}\n\nconst DEFAULT_LANGUAGE: 'en' = 'en'\nconst SUPPORTED_LANGUAGES: string[] = ['ro', 'en', 'ar'];\nconst TRANSLATIONS: Translations = {\n en: {\n error: 'Error',\n title: 'Chrono',\n backButton: 'Back',\n lobbyButton: 'Lobby',\n prize: 'Prize',\n winUpTo: 'Win up to',\n nextDraw: 'Next draw in: ',\n buy: 'Buy tickets',\n viewLatest: 'View latest results',\n createTicket: 'Create Ticket',\n modalSuccess: 'Purchase successfully completed!',\n deleteTicketModalTitle: 'Delete Ticket',\n deleteTicketModalText: 'Are you sure you want to delete this ticket?',\n deleteTicketModalCancel: 'Cancel',\n deleteTicketModalConfirm: 'Delete',\n orderSummaryTitle: 'Order Summary',\n orderSummaryTickets: 'Ticket',\n orderSummaryTotal: 'Total',\n orderSummarySubmit: 'Submit',\n lastDrawResultsTitle: 'Last Draw Results',\n modalLogin: 'Please login to submit a ticket',\n },\n ro: {\n error: 'Eroare',\n title: 'Loto 6/49',\n backButton: 'Inapoi',\n lobbyButton: 'Lobby',\n prize: 'MARELE JACKPOT OMG',\n winUpTo: 'Castiga pana la',\n nextDraw: 'Urmatoarea extragere:',\n buy: 'Cumpara bilet',\n viewLatest: 'Ultimile extrageri',\n createTicket: 'Creeaza bilet',\n modalSuccess: 'Achizitie efectuata cu succes',\n deleteTicketModalTitle: 'Sterge biletul',\n deleteTicketModalText: 'Esti sigur ca vrei sa stergi acest bilet?',\n deleteTicketModalCancel: 'Anuleaza',\n deleteTicketModalConfirm: 'Sterge',\n orderSummaryTitle: 'Rezumat comanda',\n orderSummaryTickets: 'Bilet',\n orderSummaryTotal: 'Total',\n orderSummarySubmit: 'Trimite',\n lastDrawResultsTitle: 'Cele mai recente extrageri',\n modalLogin: 'Please login to submit a ticket',\n },\n ar: {\n error: 'خطأ',\n title: 'كرونو',\n backButton: 'خلف',\n lobbyButton: 'ردهة',\n prize: 'جائزة',\n winUpTo: 'الفوز بما يصل الى',\n nextDraw: 'السحب التالي:',\n buy: 'اشتري تذاكر',\n viewLatest: 'عرض أحدث النتائج',\n createTicket: 'إنشاء تذكرة',\n modalSuccess: '!سيتم الشراء بنجاح قريبًا',\n deleteTicketModalTitle: 'حذف التذكرة',\n deleteTicketModalText: 'هل أنت متأكد أنك تريد حذف هذه التذكرة؟',\n deleteTicketModalCancel: 'يلغي',\n deleteTicketModalConfirm: 'حذف',\n orderSummaryTitle: 'ملخص الطلب',\n orderSummaryTickets: 'تذكرة',\n orderSummaryTotal: 'المجموع',\n orderSummarySubmit: 'يُقدِّم',\n lastDrawResultsTitle: 'Cele mai recente extrageri',\n modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'\n },\n};\n\nexport const translate = (key: string, customLang?): string => {\n const lang: string | undefined = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap');\n\n:host {\n display: block;\n font-family: 'Roboto', sans-serif;\n}\n.GamePage {\n\n .GridBanner {\n background-color: #009993;\n background-repeat: no-repeat;\n background-position: center;\n color: #111;\n padding: 0 20px 10px;\n height: 220px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n .BannerButtonsWrapper {\n display: flex;\n justify-content: space-between;\n padding-top: 16px;\n .BannerBackButton, .BannerLobbyButton {\n background: #fff;\n border: 1px solid #D4D4D4;\n border-radius: 4px;\n padding: 7px 15px;\n font-size: 12px;\n text-transform: uppercase;\n width: 80px;\n }\n }\n .GridBannerArea {\n padding-top: 30px;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n\n .TotalWinnings {\n color: #000;\n font-size: 18px;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: 10px;\n text-transform: uppercase;\n span {\n font-size: 18px;\n font-weight: 700;\n }\n }\n .NextDraw {\n color: #00958f;\n font-size: 24px;\n font-weight: 600;\n margin: 0 auto;\n text-align: center;\n text-transform: uppercase;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n\n .BannerText {\n font-weight: 400;\n font-size: 18px;\n text-transform: uppercase;\n padding: 0;\n margin: 15px 0 0 0;\n }\n\n .BannerCountdown {\n font-size: 22px;\n color: #00958f;\n display: flex;\n gap: 20px;\n }\n }\n\n .Tabs {\n display: flex;\n justify-content: center;\n gap: 10px;\n\n .TabButton {\n border-radius: 4px;\n cursor: pointer;\n padding: 8px 0;\n width: 50%;\n max-width: 200px;\n border: 1px solid #00958f;\n background: #F1F1F1;\n color: #000;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n\n &.Active {\n background: #00958f;\n color: #FFF;\n }\n }\n }\n}\n\n.LastDrawResultsTitle {\n color: #009993;\n padding: 25px 0 10px 0;\n text-align: center;\n border-radius: 4px;\n text-transform: uppercase;\n font-size: 16px;\n font-weight: 600;\n margin: 0;\n}\n\n.NextDrawWrapper {\n padding: 10px 15px;\n background: #F1F1F1;\n background: linear-gradient(0deg, rgba(241,241,241,1) 0%, rgba(253,187,45,0) 100%);\n .BannerText {\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n }\n\n .BannerCountdown {\n font-size: 22px;\n display: flex;\n gap: 8px;\n color: #009993;\n font-weight: bolder;\n justify-content: center;\n }\n}\n\n.GamePageContent {\n padding: 15px;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.GameDetails {\n padding-bottom: 10px;\n margin-bottom: 20px;\n}\n\n.CreateNewTicket {\n background: #004D4A;\n height: 100px;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n\n button {\n cursor: pointer;\n display: inline-block;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n margin: 5px;\n border: 1px solid #FFF;\n background: #FFF;\n color: #004D4A;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n\n &:hover {\n background: #F1F1F1;\n }\n }\n\n span {\n display: inline-block;\n font-size:12px;\n text-align: center;\n margin: 0 auto;\n color: #FFF;\n }\n}\n\n.OrderSummary {\n min-width: 200px;\n border-radius: 4px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-top: 20px;\n background: #fff;\n\n .OrderSummaryTitle {\n font-size: 16px;\n color: #009993;\n text-transform: uppercase;\n text-align: center;\n }\n\n .Ticket {\n display: inline-block;\n color: #000;\n font-size:14px;\n height: 50px;\n border-bottom: solid 1px #D4D4D4;\n line-height: 50px;\n\n span {\n text-align: right;\n }\n }\n\n .Total {\n display: inline-block;\n color: #000;\n font-size:14px;\n height: 50px;\n line-height: 50px;\n\n span {\n text-align: right;\n }\n }\n}\n\n.ButtonWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n\n .Button {\n cursor: pointer;\n border-radius: 4px;\n padding: 8px 60px;\n width: max-content;\n margin: 5px;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n background: #009993;\n border: 1px solid #009993;\n color: #FFF;\n &:hover {\n background: #00ABA4;\n }\n &.ButtonDisabled {\n pointer-events: none;\n background: #ccc;\n border: 1px solid #ccc;\n }\n }\n}\n\n.SubmitModalSuccess {\n text-align: center;\n font-size: 18px;\n padding: 20px;\n}\n\n.DeleteTicketModalWrapper {\n padding: 20px;\n text-align: center;\n .DeleteTicketModalTitle {\n font-size: 16px;\n color: #00958f;\n font-weight: 400;\n text-transform: uppercase;\n margin: 20px 0 40px;\n }\n .DeleteTicketModalText {\n font-size: 14px;\n color: #000;\n line-height: 22px;\n margin-bottom: 40px;\n }\n .DeleteTicketModalButtons {\n display: flex;\n gap: 10px;\n justify-content: center;\n .DeleteTicketModalConfirm {\n cursor: pointer;\n border-radius: 4px;\n padding: 8px 25px;\n width: max-content;\n margin: 5px;\n color: #000;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n background: #FF3D00;\n border: 1px solid #FF3D00;\n color: #FFF;\n &:hover {\n background: #FF6536;\n border: 1px solid #FF3D00;\n }\n }\n .DeleteTicketModalCancel {\n cursor: pointer;\n width: max-content;\n border-radius: 4px;\n padding: 10px 25px;\n margin: 5px;\n border: 1px solid #00958f;\n background: #FFF;\n color: #000;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n\n &:hover {\n background: #F1F1F1;\n }\n }\n }\n}\n\n@media (min-width: 1200px) {\n .GamePageContent {\n .TicketsWrapper {\n float: left;\n width: 49%;\n }\n .GameDetails {\n float: right;\n width: 49%;\n }\n .OrderSummary {\n float: right;\n width: 49%;\n }\n }\n}\n","import { Component, h, Prop, State, Listen, Element, /*getAssetPath */} from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\n// import { isMobile } from \"../../utils/utils\";\n\nimport '@everymatrix/lottery-ticket-controller';\nimport '@everymatrix/helper-modal';\nimport '@everymatrix/lottery-game-details';\nimport '@everymatrix/lottery-draw-results-history';\nimport '@everymatrix/lottery-draw-results';\n\n@Component({\n tag: 'lottery-game-page',\n styleUrl: 'lottery-game-page.scss',\n shadow: true,\n assetsDirs: ['static']\n})\nexport class LotteryGamePage {\n /**\n * Endpoint URL for the source of data\n */\n @Prop() endpoint: string;\n /**\n * GameID of the lottery game\n */\n @Prop() gameId: string;\n /**\n * Player ID\n */\n @Prop() playerId: number;\n /**\n * GIC Session\n */\n @Prop() sessionId: string;\n /**\n * Language of the widget\n */\n @Prop() language: string = 'en';\n /**\n * Shows the auto-pick button\n */\n @Prop() autoPick: boolean = false;\n /**\n * Shows the reset button\n */\n @Prop() resetButton: boolean = false;\n\n @State() tickets: Array<any> = [];\n @State() tabIndex: number = 0;\n @State() hasErrors: boolean = false;\n @State() totalAmount: number = 0;\n @State() successVisible: boolean = false;\n @State() deleteVisible: boolean = false;\n @State() deleteEventData: any;\n\n @State() private daysRemaining: number;\n @State() private hoursRemaining: number;\n @State() private minutesRemaining: number;\n @State() private secondsRemaining: number;\n @State() private latestDraw:any = {};\n @State() private totalWinningsAmount:number = 0;\n @State() private nextDate:string;\n @State() private isLoggedIn:boolean = false;\n @State() private loginModalVisible:boolean = false;\n\n @Element() element: HTMLElement;\n\n // @TODO fix any type\n // private userAgent:string = window.navigator.userAgent;\n private basicStake: number;\n private multiplier: boolean = false;\n private quickPick: boolean = false;\n private nextDraw: string;\n private lastDrawId: string;\n\n private currency: string;\n private gameData:any;\n private interval:any;\n // @TODO fix `any` type later, I'm lazy now\n\n connectedCallback(): void {\n this.getGameDetails();\n this.getDraws();\n\n if (this.sessionId) {\n this.isLoggedIn = true;\n }\n }\n\n countdownLogic(date:any):void {\n this.interval = setInterval(() => {\n this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));\n this.hoursRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60) - this.daysRemaining * 24);\n this.minutesRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60) - this.daysRemaining * 24 * 60 - this.hoursRemaining * 60);\n this.secondsRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / 1000 - this.daysRemaining * 24 * 60 * 60 - this.hoursRemaining * 60 * 60 - this.minutesRemaining * 60);\n }, 1000);\n }\n\n disconnectedCallback(): void {\n clearInterval(this.interval);\n }\n\n getGameDetails(): void {\n let url:URL = new URL(`${this.endpoint}/games/${this.gameId}`);\n\n fetch(url.href)\n .then((res:any) => {\n if (res.status >= 300) {\n this.hasErrors = true;\n throw new Error('There was an error while fetching the data');\n }\n\n return res.json();\n })\n .then((data:any) => {\n this.gameData = data;\n this.basicStake = this.gameData.rules.stakes[0].amount;\n\n let draws = this.gameData.draws.filter((item) => !item.winningNumbers);\n\n this.nextDraw = draws[0].id;\n this.createNewTicket();\n })\n .catch((err:any) => {\n this.hasErrors = true;\n\n console.log('Error', err);\n });\n }\n\n calculateTotalAmount(): void {\n const { currency } = this.gameData.rules.stakes[0];\n\n this.totalAmount = 0;\n\n this.tickets.forEach((item:any) => {\n if (item.completed) {\n this.totalAmount += item.amount * item.stake;\n }\n });\n this.currency = currency;\n }\n\n // @TODO CustomEvent type\n @Listen('ticketCompleted')\n gridFilledHandler(event: CustomEvent<any>): void {\n // @TODO item ts\n this.tickets = this.tickets.map((item:any) => {\n if (item.ticketId == event.detail.id) {\n let arr = item.selectedNumbers || [];\n arr[event.detail.index] = event.detail.selectedNumbers.map((item:string) => parseInt(item, 10));\n\n return {\n gameId: item.gameId,\n ticketId: item.ticketId,\n completed: true,\n amount: event.detail.draws,\n stake: item.stake,\n selectedNumbers: arr\n };\n }\n\n return item;\n });\n\n this.calculateTotalAmount();\n }\n\n @Listen('gridDirty')\n // @TODO fix any type\n gridDirtyHandler(event: CustomEvent<any>) {\n // @TODO item ts\n this.tickets = this.tickets.map((item:any) => {\n if (item.gameId == event.detail.id) {\n return {\n gameId: item.gameId,\n ticketId: item.ticketId,\n completed: false,\n amount: item.amount,\n stake: item.stake,\n grids: []\n };\n }\n\n return item;\n });\n }\n\n // @TODO CustomEvent type\n @Listen('deleteTicket')\n deleteTicketHandler(event: CustomEvent<any>): void {\n this.deleteVisible = true;\n this.deleteEventData = event;\n }\n\n @Listen('modalCloseEvent')\n modalCloseEvent(): void {\n this.deleteVisible = false;\n this.loginModalVisible = false;\n }\n\n @Listen('stakeChange')\n stakeChangeHandler(event:any): void {\n const { ticketId, stake } = event.detail;\n this.tickets[ticketId - 1].stake = stake;\n this.calculateTotalAmount();\n }\n\n @Listen('multiplierChange')\n multiplierChangeHandler(event:CustomEvent<any>): void {\n this.multiplier = event.detail;\n }\n\n getDraws(): void {\n // append from query param with the current date value in order to get the next draw\n let url:URL = new URL(`${this.endpoint}/games/${this.gameId}/draws`);\n\n let drawOptions = {\n method: \"GET\",\n headers: {\n 'Content-Type': \"application/json\",\n 'Accept': 'application/json',\n },\n };\n\n fetch( url.href , drawOptions )\n .then((response:any) => {\n return response.json();\n })\n .then((data:any) => {\n let upcoming:Array<any> = data.items.filter((item:any) => {\n if(Date.parse(item.date) > new Date().getTime()) {\n return !item.winningNumbers;\n }\n });\n\n let past:Array<any> = data.items.filter((item:any) => item.winningNumbers);\n\n this.latestDraw = upcoming[0];\n this.nextDate = this.latestDraw.date;\n this.countdownLogic(this.nextDate);\n\n this.lastDrawId = past[past.length - 1].id;\n // calculate total winnings\n // @TODO fix any type\n this.latestDraw?.prizes.forEach((element:any) => {\n this.totalWinningsAmount += JSON.parse(element.amount);\n });\n });\n };\n\n // @TODO fix any type\n confirmDeleteTicketHandler(event:any): void {\n // @TODO fix any type\n this.tickets = this.tickets.filter((item:any) => {\n if (item.ticketId == event.detail.ticketId) {\n return false;\n }\n\n return true;\n });\n\n this.calculateTotalAmount();\n this.deleteVisible = false;\n }\n\n createNewTicket(): void {\n this.tickets = [\n ...this.tickets,\n { gameId: this.gameId, ticketId: this.tickets.length + 1, completed: false, amount: 1, stake: this.basicStake, grids: [] }\n ];\n }\n\n showLoginModal(): void {\n this.loginModalVisible = true;\n }\n\n submitTickets(): void {\n let url:URL = new URL(`${this.endpoint}/tickets`);\n\n // @TODO Body TS type\n let body:any = {\n gameId: this.gameId,\n tickets: []\n }\n\n this.tickets.forEach((item:any) => {\n body.tickets.push({\n startingDrawId: this.nextDraw,\n amount: item.stake,\n gameId: this.gameId,\n currency: this.currency,\n selection: item.selectedNumbers,\n multiplier: this.multiplier,\n drawCount: item.amount,\n quickPick: this.quickPick,\n })\n });\n \n // @TODO Options TS type\n let options = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${this.sessionId}`\n },\n body: JSON.stringify(body)\n };\n\n fetch(url.href, options)\n .then((res:any) => {\n if (res.status > 300) {\n throw new Error('err');\n }\n\n return res.json();\n })\n .then((data:any) => {\n console.log('data', data)\n });\n\n this.successVisible = true;\n }\n\n render(): void {\n // const backgroundSrc = getAssetPath('./static/chrono_lottery_mobile.png');\n // const backgroundDesktopSrc = getAssetPath('./static/chrono_desktop.png');\n\n if (this.hasErrors) {\n return (\n <div class=\"GamePage\">\n <div class=\"Title\">{translate('error', this.language)}</div>\n </div>\n )\n }\n\n return (\n /* Game details */\n <div class=\"GamePage\" dir={this.language == 'ar' ? 'rtl' : 'ltr'}>\n <div class=\"GridBanner\"\n >\n <div class=\"BannerButtonsWrapper\">\n <button class=\"BannerBackButton\"><span class=\"BannerBackButtonArrow\">&#5176; </span>{translate('backButton', this.language)}</button>\n <button class=\"BannerLobbyButton\">{translate('lobbyButton', this.language)}</button>\n </div>\n <div class=\"Tabs\">\n <div class={'TabButton' + (this.tabIndex == 0 ? ' Active' : '')}\n onClick={() => this.tabIndex = 0}>{translate('buy', this.language)}</div>\n <div class={'TabButton' + (this.tabIndex == 1 ? ' Active' : '')}\n onClick={() => this.tabIndex = 1}>{translate('viewLatest', this.language)}</div>\n </div>\n </div>\n <div class=\"NextDrawWrapper\">\n <div class=\"TotalWinnings\">{translate('winUpTo', this.language)}: <span>${this.totalWinningsAmount.toLocaleString('en-US', {maximumFractionDigits:2})}</span></div>\n <div class=\"NextDraw\">\n <p class=\"BannerText\">{translate('nextDraw', this.language)}</p>\n <div class=\"BannerCountdown\">\n <span class=\"CountdownDays\">{this.daysRemaining}D</span>\n <span class=\"CountdownHours\">{this.hoursRemaining}H</span>\n <span class=\"CountdownMinutes\">{this.minutesRemaining}M</span>\n <span class=\"CountdownSeconds\">{this.secondsRemaining}S</span>\n </div>\n </div>\n </div>\n {this.tabIndex == 0 &&\n <div class=\"GamePageContent\">\n <div class=\"GameDetails\">\n <lottery-game-details></lottery-game-details>\n </div>\n <div class=\"TicketsWrapper\">\n {this.tickets.map((item) =>\n <lottery-ticket-controller\n endpoint={this.endpoint}\n ticket-id={item.ticketId}\n game-id={item.gameId}\n collapsed={false}\n last={true}\n language={this.language}\n auto-pick={this.autoPick}\n reset-button={this.resetButton}\n >\n </lottery-ticket-controller>\n )}\n <div class=\"CreateNewTicket\">\n <button onClick={() => this.createNewTicket()}>+</button>\n <span>{translate('createTicket', this.language)}</span>\n </div>\n </div>\n <div class=\"OrderSummary\">\n <h3 class=\"OrderSummaryTitle\">{translate('orderSummaryTitle', this.language)}</h3>\n <div class=\"Ticket\">{translate('orderSummaryTickets', this.language)}: <span>{this.tickets.length}</span></div>\n <div class=\"Total\">{translate('orderSummaryTotal', this.language)}: <span>{this.totalAmount} {this.currency}</span></div>\n <div class=\"ButtonWrapper\">\n {this.isLoggedIn && \n <span class=\"Button\" onClick={() => this.submitTickets()}>{translate('orderSummarySubmit', this.language)}</span>\n }\n {!this.isLoggedIn &&\n <div>\n <span class=\"Button\" onClick={() => this.showLoginModal()}>{translate('orderSummarySubmit', this.language)}</span>\n <helper-modal title-modal=\"Success\" visible={this.loginModalVisible}><p class=\"SubmitModalSuccess\">{translate('modalLogin', this.language)}</p></helper-modal>\n </div>\n }\n </div>\n </div>\n </div>\n }\n {this.tabIndex == 1 &&\n <div>\n <h4 class=\"LastDrawResultsTitle\">{translate('lastDrawResultsTitle', this.language)}</h4>\n <lottery-draw-results endpoint={this.endpoint} game-id={this.gameId} language={this.language} draw-id={this.lastDrawId} draw-mode={true}></lottery-draw-results>\n <lottery-draw-results-history endpoint={this.endpoint} game-id={this.gameId} language={this.language}></lottery-draw-results-history>\n </div>}\n <helper-modal title-modal=\"Success\" visible={this.successVisible}><p class=\"SubmitModalSuccess\">{translate('modalSuccess', this.language)}</p></helper-modal>\n <helper-modal title-modal=\"Delete Ticket\" visible={this.deleteVisible}>\n <div class=\"DeleteTicketModalWrapper\">\n <h3 class=\"DeleteTicketModalTitle\">{translate('deleteTicketModalTitle', this.language)}</h3>\n <p class=\"DeleteTicketModalText\">{translate('deleteTicketModalText', this.language)}</p>\n <div class=\"DeleteTicketModalButtons\">\n <button class=\"DeleteTicketModalCancel\" onClick={() => this.modalCloseEvent()}>{translate('deleteTicketModalCancel', this.language)}</button>\n <button class=\"DeleteTicketModalConfirm\" onClick={() => this.confirmDeleteTicketHandler(this.deleteEventData)}>{translate('deleteTicketModalConfirm', this.language)}</button>\n </div>\n </div>\n </helper-modal>\n </div>\n );\n }\n}\n"]}
@@ -1,14 +1,19 @@
1
1
  import { sass } from '@stencil/sass';
2
2
  import { nodeResolve } from '@rollup/plugin-node-resolve';
3
+ import nodePolyfills from 'rollup-plugin-node-polyfills';
3
4
  export const config = {
4
5
  namespace: 'lottery-game-page',
5
6
  taskQueue: 'async',
6
7
  plugins: [sass()],
8
+ sourceMap: true,
7
9
  bundles: [{ components: ['lottery-game-page'] }],
8
10
  rollupPlugins: {
9
11
  before: [
10
12
  nodeResolve()
11
13
  ],
14
+ after: [
15
+ nodePolyfills(),
16
+ ]
12
17
  },
13
18
  outputTargets: [
14
19
  {
@@ -16,8 +21,8 @@ export const config = {
16
21
  esmLoaderPath: '../loader',
17
22
  },
18
23
  {
19
- type: 'dist-custom-elements',
20
24
  autoDefineCustomElements: true,
25
+ generateTypeDeclarations: true,
21
26
  copy: [
22
27
  {
23
28
  src: '**/*.{jpg,png}',
@@ -25,9 +30,15 @@ export const config = {
25
30
  warn: true,
26
31
  }
27
32
  ],
33
+ type: 'dist-custom-elements',
28
34
  },
29
35
  {
30
36
  type: 'docs-readme',
31
- }
37
+ },
38
+ {
39
+ type: 'www',
40
+ serviceWorker: null, // disable service workers
41
+ },
32
42
  ],
33
43
  };
44
+ //# sourceMappingURL=stencil.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stencil.config.js","sourceRoot":"","sources":["../../../stencil.config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,aAAa,MAAM,8BAA8B,CAAC;AAEzD,MAAM,CAAC,MAAM,MAAM,GAAW;EAC5B,SAAS,EAAE,mBAAmB;EAC9B,SAAS,EAAE,OAAO;EAClB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;EACjB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,mBAAmB,CAAC,EAAE,CAAC;EAChD,aAAa,EAAE;IACb,MAAM,EAAE;MACN,WAAW,EAAE;KACd;IACD,KAAK,EAAE;MACL,aAAa,EAAE;KAChB;GACF;EACD,aAAa,EAAE;IACb;MACE,IAAI,EAAE,MAAM;MACZ,aAAa,EAAE,WAAW;KAC3B;IACD;MACE,wBAAwB,EAAE,IAAI;MAC9B,wBAAwB,EAAE,IAAI;MAC9B,IAAI,EAAE;QACJ;UACE,GAAG,EAAE,gBAAgB;UACrB,IAAI,EAAE,wBAAwB;UAC9B,IAAI,EAAE,IAAI;SACX;OACF;MACD,IAAI,EAAE,sBAAsB;KAC7B;IACD;MACE,IAAI,EAAE,aAAa;KACpB;IACD;MACE,IAAI,EAAE,KAAK;MACX,aAAa,EAAE,IAAI,EAAE,0BAA0B;KAChD;GACF;CACF,CAAC","sourcesContent":["import { Config } from '@stencil/core';\n\nimport { sass } from '@stencil/sass';\nimport { nodeResolve } from '@rollup/plugin-node-resolve';\nimport nodePolyfills from 'rollup-plugin-node-polyfills';\n\nexport const config: Config = {\n namespace: 'lottery-game-page',\n taskQueue: 'async',\n plugins: [sass()],\n sourceMap: true,\n bundles: [{ components: ['lottery-game-page'] }],\n rollupPlugins: {\n before: [\n nodeResolve()\n ],\n after: [\n nodePolyfills(),\n ]\n },\n outputTargets: [\n {\n type: 'dist',\n esmLoaderPath: '../loader',\n },\n {\n autoDefineCustomElements: true,\n generateTypeDeclarations: true,\n copy: [\n {\n src: '**/*.{jpg,png}',\n dest: 'dist/components/assets',\n warn: true,\n }\n ],\n type: 'dist-custom-elements',\n },\n {\n type: 'docs-readme',\n },\n {\n type: 'www',\n serviceWorker: null, // disable service workers\n },\n ],\n};\n"]}
@@ -46,6 +46,8 @@ export declare class LotteryGamePage {
46
46
  private latestDraw;
47
47
  private totalWinningsAmount;
48
48
  private nextDate;
49
+ private isLoggedIn;
50
+ private loginModalVisible;
49
51
  element: HTMLElement;
50
52
  private basicStake;
51
53
  private multiplier;
@@ -69,6 +71,7 @@ export declare class LotteryGamePage {
69
71
  getDraws(): void;
70
72
  confirmDeleteTicketHandler(event: any): void;
71
73
  createNewTicket(): void;
74
+ showLoginModal(): void;
72
75
  submitTickets(): void;
73
76
  render(): void;
74
77
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-game-page",
3
- "version": "0.1.2",
3
+ "version": "0.1.6",
4
4
  "main": "./dist/index.cjs.js",
5
- "module": "./dist/components/index.js",
5
+ "module": "./dist/components/lottery-game-page.js",
6
6
  "es2015": "./dist/esm/index.mjs",
7
7
  "es2017": "./dist/esm/index.mjs",
8
8
  "types": "./dist/types/index.d.ts",