@everymatrix/lottery-hakuna-ticket-history 0.0.23 → 0.0.24

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 (29) hide show
  1. package/dist/cjs/index-62b3d460.js +64 -0
  2. package/dist/cjs/index-dc95b9af.js +6 -2
  3. package/dist/cjs/index.cjs.js +2 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{lottery-button_8.cjs.entry.js → lottery-button_7.cjs.entry.js} +98 -268
  6. package/dist/cjs/{lottery-hakuna-ticket-history-ec8bf5d5.js → lottery-hakuna-ticket-history-49bed503.js} +51 -124
  7. package/dist/cjs/lottery-hakuna-ticket-history.cjs.js +1 -1
  8. package/dist/cjs/lottery-infinite-scroll.cjs.entry.js +223 -0
  9. package/dist/collection/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.css +8 -0
  10. package/dist/collection/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.js +51 -8
  11. package/dist/collection/components/lottery-infinite-scroll/lottery-infinite-scroll.js +4 -4
  12. package/dist/esm/index-30f31c84.js +60 -0
  13. package/dist/esm/index-50addd47.js +6 -2
  14. package/dist/esm/index.js +2 -1
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/{lottery-button_8.entry.js → lottery-button_7.entry.js} +71 -241
  17. package/dist/esm/{lottery-hakuna-ticket-history-35d86d50.js → lottery-hakuna-ticket-history-844d94d7.js} +46 -115
  18. package/dist/esm/lottery-hakuna-ticket-history.js +1 -1
  19. package/dist/esm/lottery-infinite-scroll.entry.js +219 -0
  20. package/dist/lottery-hakuna-ticket-history/index-30f31c84.js +1 -0
  21. package/dist/lottery-hakuna-ticket-history/index.esm.js +1 -1
  22. package/dist/lottery-hakuna-ticket-history/lottery-button_7.entry.js +1 -0
  23. package/dist/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history-844d94d7.js +1 -0
  24. package/dist/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.esm.js +1 -1
  25. package/dist/lottery-hakuna-ticket-history/lottery-infinite-scroll.entry.js +1 -0
  26. package/dist/types/components/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history.d.ts +5 -0
  27. package/package.json +1 -1
  28. package/dist/lottery-hakuna-ticket-history/lottery-button_8.entry.js +0 -1
  29. package/dist/lottery-hakuna-ticket-history/lottery-hakuna-ticket-history-35d86d50.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as t,h as e}from"./index-50addd47.js";import{s as n,a as r,b as i}from"./index-30f31c84.js";var a,o,s,u;function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function d(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function c(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function l(t){c(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===h(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}!function(t){t.Lottery="Lottery",t.PoolGame="PoolGame"}(a||(a={})),function(t){t.Tipping="HomeDrawAway",t.Oddsbomben="CorrectScore"}(o||(o={})),function(t){t.Settled="Settled",t.Purchased="Purchased",t.Canceled="Canceled"}(s||(s={})),function(t){t.WON="Won",t.LOST="Lost"}(u||(u={}));var f={};function m(){return f}function v(t){c(1,arguments);var e=l(t),n=e.getUTCDay(),r=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function g(t){c(1,arguments);var e=l(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=v(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=v(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function w(t,e){var n,r,i,a,o,s,u,h;c(1,arguments);var f=m(),v=d(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:f.weekStartsOn)&&void 0!==r?r:null===(u=f.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=l(t),w=g.getUTCDay(),y=(w<v?7:0)+w-v;return g.setUTCDate(g.getUTCDate()-y),g.setUTCHours(0,0,0,0),g}function y(t,e){var n,r,i,a,o,s,u,h;c(1,arguments);var f=l(t),v=f.getUTCFullYear(),g=m(),y=d(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:g.firstWeekContainsDate)&&void 0!==r?r:null===(u=g.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(v+1,0,y),b.setUTCHours(0,0,0,0);var p=w(b,e),x=new Date(0);x.setUTCFullYear(v,0,y),x.setUTCHours(0,0,0,0);var k=w(x,e);return f.getTime()>=p.getTime()?v+1:f.getTime()>=k.getTime()?v:v-1}function b(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}const p=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return b("yy"===e?r%100:r,e.length)},x=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):b(n+1,2)},k=function(t,e){return b(t.getUTCDate(),e.length)},M=function(t,e){return b(t.getUTCHours()%12||12,e.length)},S=function(t,e){return b(t.getUTCHours(),e.length)},E=function(t,e){return b(t.getUTCMinutes(),e.length)},D=function(t,e){return b(t.getUTCSeconds(),e.length)},P=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return b(Math.floor(r*Math.pow(10,n-3)),e.length)};var T={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return p(t,e)},Y:function(t,e,n,r){var i=y(t,r),a=i>0?i:1-i;return"YY"===e?b(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):b(a,e.length)},R:function(t,e){return b(g(t),e.length)},u:function(t,e){return b(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return b(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return b(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return x(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return b(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){c(1,arguments);var n=l(t),r=w(n,e).getTime()-function(t,e){var n,r,i,a,o,s,u,h;c(1,arguments);var l=m(),f=d(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:l.firstWeekContainsDate)&&void 0!==r?r:null===(u=l.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:1),v=y(t,e),g=new Date(0);return g.setUTCFullYear(v,0,f),g.setUTCHours(0,0,0,0),w(g,e)}(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):b(i,e.length)},I:function(t,e,n){var r=function(t){c(1,arguments);var e=l(t),n=v(e).getTime()-function(t){c(1,arguments);var e=g(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),v(n)}(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):b(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):k(t,e)},D:function(t,e,n){var r=function(t){c(1,arguments);var e=l(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((n-r)/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):b(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return b(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return b(a,e.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return b(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return M(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):S(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):b(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):b(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):E(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):D(t,e)},S:function(t,e){return P(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return j(i);case"XXXX":case"XX":return _(i);default:return _(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return j(i);case"xxxx":case"xx":return _(i);default:return _(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+C(i,":");default:return"GMT"+_(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+C(i,":");default:return"GMT"+_(i,":")}},t:function(t,e,n,r){return b(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,r){return b((r._originalDate||t).getTime(),e.length)}};function C(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+b(a,2)}function j(t,e){return t%60==0?(t>0?"-":"+")+b(Math.abs(t)/60,2):_(t,e)}function _(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+b(Math.floor(i/60),2)+n+b(i%60,2)}const W=T;var O=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},z=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Y={p:z,P:function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return O(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",O(i,e)).replace("{{time}}",z(a,e))}};const R=Y;var L=["D","DD"],q=["YY","YYYY"];function A(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var G={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function N(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var Q,B={date:N({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:N({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:N({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},U={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function $(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var i=t.defaultFormattingWidth||t.defaultWidth,a=null!=n&&n.width?String(n.width):i;r=t.formattingValues[a]||t.formattingValues[i]}else{var o=t.defaultWidth,s=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[s]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function X(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!i)return null;var a,o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(o))return e}(s):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(o))return e}(s);return a=t.valueCallback?t.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:e.slice(o.length)}}}const I={code:"en-US",formatDistance:function(t,e,n){var r,i=G[t];return r="string"==typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:B,formatRelative:function(t){return U[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:$({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:$({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:$({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:$({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:$({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Q={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(Q.matchPattern);if(!n)return null;var r=n[0],i=t.match(Q.parsePattern);if(!i)return null;var a=Q.valueCallback?Q.valueCallback(i[0]):i[0];return{value:a=e.valueCallback?e.valueCallback(a):a,rest:t.slice(r.length)}}),era:X({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:X({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:X({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:X({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:X({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var H=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,J=/^'([^]*?)'?$/,Z=/''/g,K=/[a-zA-Z]/;function V(t,e,n){var r,i,a,o,s,u,f,v,g,w,y,b,p,x,k,M,S,E;c(2,arguments);var D=String(e),P=m(),T=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:P.locale)&&void 0!==r?r:I,C=d(null!==(a=null!==(o=null!==(s=null!==(u=null==n?void 0:n.firstWeekContainsDate)&&void 0!==u?u:null==n||null===(f=n.locale)||void 0===f||null===(v=f.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==s?s:P.firstWeekContainsDate)&&void 0!==o?o:null===(g=P.locale)||void 0===g||null===(w=g.options)||void 0===w?void 0:w.firstWeekContainsDate)&&void 0!==a?a:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=d(null!==(y=null!==(b=null!==(p=null!==(x=null==n?void 0:n.weekStartsOn)&&void 0!==x?x:null==n||null===(k=n.locale)||void 0===k||null===(M=k.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==p?p:P.weekStartsOn)&&void 0!==b?b:null===(S=P.locale)||void 0===S||null===(E=S.options)||void 0===E?void 0:E.weekStartsOn)&&void 0!==y?y:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var _=l(t);if(!function(t){if(c(1,arguments),!function(t){return c(1,arguments),t instanceof Date||"object"===h(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=l(t);return!isNaN(Number(e))}(_))throw new RangeError("Invalid time value");var O=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(_),z=function(t,e){return c(2,arguments),function(t,e){c(2,arguments);var n=l(t).getTime(),r=d(e);return new Date(n+r)}(t,-d(e))}(_,O),Y={firstWeekContainsDate:C,weekStartsOn:j,locale:T,_originalDate:_};return D.match(F).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,R[e])(t,T.formatLong):t})).join("").match(H).map((function(r){if("''"===r)return"'";var i,a,o=r[0];if("'"===o)return(a=(i=r).match(J))?a[1].replace(Z,"'"):i;var s=W[o];if(s)return null!=n&&n.useAdditionalWeekYearTokens||-1===q.indexOf(r)||A(r,e,String(t)),null!=n&&n.useAdditionalDayOfYearTokens||!(-1!==L.indexOf(r))||A(r,e,String(t)),s(z,r,T.localize,Y);if(o.match(K))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}function tt(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let r=0;r<e;r++){if(!tt(t[r]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!tt(e))return!1;n++}return n===e}(t):!t)}const et="?";function nt(t,e){return t&&t.length>0?t.map((t=>{const[n,r]=V(new Date(t.createdAt),`MMM d,yyyy${et}HH:mm:ss a 'UTC'`).split(et);return{id:t.id,name:(null==e?void 0:e.name)||t.gameName,imageSrc:null==e?void 0:e.imageSrc,totalAmount:(null==e?void 0:e.currency)?`${null==e?void 0:e.currency} ${t.amount}`:t.amount,date:n,time:r,selectedNumbers:t.selection.map((t=>t.selections)).join(",")}})):[]}async function rt({endpoint:t,filterData:e,sessionId:n,meta:r}){const{items:i=[],total:a}=await function(t,e="GET",n=null,r={}){return new Promise(((i,a)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},r);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const u={method:e,headers:s,body:null};n&&"GET"!==e&&"HEAD"!==e?u.body=JSON.stringify(n):delete u.body,fetch(t,u).then((t=>t.ok?t.json():t.json().then((e=>{a({status:t.status,statusText:t.statusText,code:e.code||"UNKNOWN_ERROR",message:e.message||"An unknown error occurred",data:e.data||null})}),(()=>a({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>i(t)),(t=>a(t)))}))}(`${t}/tickets${function(t){const e={};Object.entries(t).forEach((([t,n])=>{tt(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(e)}`,"GET",null,{Authorization:`Bearer ${n}`})||{items:[],total:0};return{items:nt(i,r),total:a}}const it=["ro","en","fr","ar","hr"],at={en:{releaseToRefresh:"Release to refresh...",youHaveReachedTheEnd:"You have reached the end.",failToShowTicketList:"Fail to show ticket list.",unauthorized:"Unauthorized, please login."}},ot=(t,e,n)=>{const r=e;let i=at[void 0!==r&&it.includes(r)?r:"en"][t];return n&&Object.keys(n).forEach((t=>{i=i.replace(`{${t}}`,n[t])})),i},st=class{constructor(n){t(this,n),this.page=0,this.vendorGameType=a.Lottery,this.customStyle=`\n :host {\n --lottery-hakuna-ticket-history-item-container-min-width: ${this.minItemWidth}px;\n\n .lottery-hakuna-ticket-history-item__container {\n justify-content: flex-start;\n }\n }\n\n .lottery-hakuna-ticket-history-item__container-wrapper {\n height: 100%;\n box-sizing: border-box;\n }\n .lottery-hakuna-ticket-history-item__container {\n height: 100%;\n box-sizing: border-box;\n }\n `,this.handleLoadMore=()=>{!this.isLoading&&this.hasMore&&this.getTicketList(this.page+1)},this.handleRefresh=()=>{this.isRefreshing||(this.page=1,this.getTicketList(1,!0))},this.renderSkeleton=()=>e("lottery-hakuna-ticket-history-item",{"client-styling":this.customStyle+(this.clientStyling||""),"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,translationUrl:this.translationUrl,language:this.language,showSkeleton:!0}),this.renderItem=t=>e("lottery-hakuna-ticket-history-item",{"client-styling":this.customStyle+(this.clientStyling||""),"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,translationUrl:this.translationUrl,language:this.language,key:t.id,"history-item-name":t.name,"history-item-image-src":t.imageSrc,"ticket-id":t.id,"total-amount":t.totalAmount,date:t.date,time:t.time,"selected-numbers":t.selectedNumbers}),this.renderSkeletonList=t=>e("div",{class:"lottery-hakuna-ticket-history__list"},Array(t).fill(0).map((()=>this.renderSkeleton()))),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId="",this.scrollThreshold="0px 0px 200px 0px",this.scrollContainerHeight=500,this.ticketHistoryTitle="YOUR TICKET",this.ticketHistoryItemImageSrc=void 0,this.ticketHistoryItemName=void 0,this.ticketHistoryItemCurrency="R",this.listLoadingText=void 0,this.listRefreshingText=void 0,this.listEndText=void 0,this.limit=10,this.visibleTickets=[],this.hasMore=!1,this.isLoading=!1,this.isRefreshing=!1,this.errorMessage=void 0,this.minItemWidth=300,this.showSkeleton=!0,this.ticketList=[],this.isLoadingList=!1}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&r(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&i(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])at[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.getAllTickets()}async getAllTickets(){try{this.isLoadingList=!0;const{items:t}=await rt({endpoint:this.endpoint,filterData:{offset:0,limit:100,vendorGameType:this.vendorGameType},sessionId:this.sessionId,meta:{name:this.ticketHistoryItemName,imageSrc:this.ticketHistoryItemImageSrc,currency:this.ticketHistoryItemCurrency}});this.ticketList=t}catch(t){if(401===t.status)return this.errorMessage=ot("unauthorized",this.language),void window.postMessage({type:"SessionExpired"},window.location.href);this.errorMessage=ot("failToShowTicketList",this.language)}finally{this.isLoadingList=!1}}async getTicketList(t,e=!1){try{if(!this.endpoint||!this.sessionId)return Promise.reject(new Error("Endpoint and sessionId are required"));if(t<=0||!this.limit)return;e?this.isRefreshing=!0:this.isLoading=!0;const{items:n,total:r}=await rt({endpoint:this.endpoint,filterData:{offset:(t-1)*this.limit,limit:this.limit,vendorGameType:this.vendorGameType},sessionId:this.sessionId,meta:{name:this.ticketHistoryItemName,imageSrc:this.ticketHistoryItemImageSrc,currency:this.ticketHistoryItemCurrency}});this.visibleTickets=e?[...n]:[...this.visibleTickets,...n],this.hasMore=t<Math.ceil(r/this.limit),this.page=t,this.isLoading=!1,this.isRefreshing=!1,this.errorMessage=null}catch(t){if(this.isLoading=!1,this.isRefreshing=!1,401===t.status)return this.errorMessage=ot("unauthorized",this.language),void window.postMessage({type:"SessionExpired"},window.location.href);this.errorMessage=ot("failToShowTicketList",this.language)}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&i(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderTicketList(){return e("div",{class:"lottery-hakuna-ticket-history__list"},this.ticketList.map((t=>this.renderItem(t))))}renderInfoIcon(){return e("svg",{width:"45",height:"45",viewBox:"0 0 45 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M22.5 5.625C13.1802 5.625 5.625 13.1802 5.625 22.5C5.625 31.8198 13.1802 39.375 22.5 39.375C31.8198 39.375 39.375 31.8198 39.375 22.5C39.375 13.1802 31.8198 5.625 22.5 5.625ZM1.875 22.5C1.875 11.1091 11.1091 1.875 22.5 1.875C33.8909 1.875 43.125 11.1091 43.125 22.5C43.125 33.8909 33.8909 43.125 22.5 43.125C11.1091 43.125 1.875 33.8909 1.875 22.5ZM22.5 13.125C23.5355 13.125 24.375 13.9645 24.375 15V22.5C24.375 23.5355 23.5355 24.375 22.5 24.375C21.4645 24.375 20.625 23.5355 20.625 22.5V15C20.625 13.9645 21.4645 13.125 22.5 13.125ZM20.625 30C20.625 28.9645 21.4645 28.125 22.5 28.125H22.5188C23.5543 28.125 24.3938 28.9645 24.3938 30C24.3938 31.0355 23.5543 31.875 22.5188 31.875H22.5C21.4645 31.875 20.625 31.0355 20.625 30Z"}))}render(){return e("div",{key:"0433d863f5272aa244a014381b58b82b9c975bed",class:"lottery-hakuna-ticket-history__container",ref:t=>this.stylingContainer=t},e("div",{key:"df8f56cc99e845b5a65858d649fa59b8945b49d2",class:"lottery-hakuna-ticket-history__title"},this.ticketHistoryTitle),this.errorMessage&&e("div",{key:"b880a26e24fb2b2ae1590b6c6d4b963de598c6f3",class:"lottery-hakuna-ticket-history__error-message"},this.renderInfoIcon(),e("span",{key:"1248f83b4635123f760d49e9ca26013aa268dc26"},this.errorMessage)),this.isLoadingList?this.renderSkeletonList(8):this.renderTicketList())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};st.style=":host{display:block}.lottery-hakuna-ticket-history__container{padding:var(--lottery-hakuna-container-padding, 0);display:flex;flex-direction:var(--lottery-hakuna-container-flex-direction, column);align-items:var(--lottery-hakuna-container-align-items, center)}.lottery-hakuna-ticket-history__title{color:var(--lottery-hakuna-title-color, #000);font-size:var(--lottery-hakuna-title-font-size, 14px);font-style:var(--lottery-hakuna-title-font-style, normal);font-weight:var(--lottery-hakuna-title-font-weight, 700);line-height:var(--lottery-hakuna-title-line-height, normal);text-transform:var(--lottery-hakuna-title-text-transform, uppercase);margin-bottom:var(--lottery-hakuna-title-margin-bottom, 18px)}lottery-hakuna-ticket-history-item{width:var(--lottery-hakuna-ticket-history-item-width, 100%)}lottery-infinite-scroll{max-width:var(--lottery-hakuna-ticket-history-item-max-width, 100%);height:var(--lottery-hakuna-ticket-history-item-height, 500px)}.lottery-hakuna-ticket-history__end-message{width:var(--lottery-hakuna-end-message-width, 100%);text-align:var(--lottery-hakuna-end-message-text-align, center);font-size:var(--lottery-hakuna-end-message-font-size, 14px)}.lottery-hakuna-ticket-history__loading-more{width:var(--lottery-hakuna-loading-more-width, 100%);display:flex;align-items:center;justify-content:center;font-size:var(--lottery-hakuna-loading-more-font-size, 14px);gap:var(--lottery-hakuna-loading-spinner-text-gap, 8px);}.lottery-hakuna-ticket-history__loading-more .loading-spinner{animation:spin var(--lottery-hakuna-loading-spinner-animation-duration, 1s) linear infinite;color:var(--lottery-hakuna-loading-spinner-color, currentColor);}.lottery-hakuna-ticket-history__loading-more .loading-spinner svg{width:var(--lottery-hakuna-loading-spinner-size, 16px);height:var(--lottery-hakuna-loading-spinner-size, 16px)}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.lottery-hakuna-ticket-history__error-message{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:10px}.lottery-hakuna-ticket-history__error-message svg{width:20px;height:20px}.lottery-hakuna-ticket-history__list{display:grid;grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));gap:10px;box-sizing:border-box;width:100%}";export{st as L}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./index-50addd47.js";export{s as setNonce}from"./index-50addd47.js";import{g as l}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((async e=>(await l(),t([["lottery-button_8",[[1,"lottery-hakuna-ticket-history",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],endpoint:[513],gameId:[513,"game-id"],playerId:[514,"player-id"],sessionId:[513,"session-id"],scrollThreshold:[1,"scroll-threshold"],scrollContainerHeight:[2,"scroll-container-height"],ticketHistoryTitle:[1,"ticket-history-title"],ticketHistoryItemImageSrc:[1,"ticket-history-item-image-src"],ticketHistoryItemName:[1,"ticket-history-item-name"],ticketHistoryItemCurrency:[1,"ticket-history-item-currency"],listLoadingText:[1,"list-loading-text"],listRefreshingText:[1,"list-refreshing-text"],listEndText:[1,"list-end-text"],limit:[2],minItemWidth:[2,"min-item-width"],showSkeleton:[4,"show-skeleton"],visibleTickets:[32],hasMore:[32],isLoading:[32],isRefreshing:[32],errorMessage:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-hakuna-ticket-history-item",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],historyItemName:[1,"history-item-name"],historyItemImageSrc:[1,"history-item-image-src"],ticketId:[8,"ticket-id"],totalAmount:[1,"total-amount"],date:[1],time:[1],selectedNumbers:[1,"selected-numbers"],showSkeleton:[4,"show-skeleton"],selectedNumbersCount:[2,"selected-numbers-count"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-infinite-scroll",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],items:[16],hasMore:[4,"has-more"],isLoading:[4,"is-loading"],isRefreshing:[4,"is-refreshing"],threshold:[1],containerHeight:[1,"container-height"],renderItem:[16],renderSkeleton:[16],skeletonCount:[2,"skeleton-count"],pullTriggerDistance:[2,"pull-trigger-distance"],minItemWidth:[2,"min-item-width"],gridGap:[2,"grid-gap"],pullDistance:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],isRefreshing:["handleRefreshingChange"]}],[1,"lottery-selection-group",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],splitToken:[513,"split-token"],selectionGroupId:[513,"selection-group-id"],selectionGroupLabel:[513,"selection-group-label"],type:[513],selectedBulletTexts:[513,"selected-bullet-texts"],maxSelectedCount:[514,"max-selected-count"],maxDisplayBulletsCount:[514,"max-display-bullets-count"],bulletTexts:[513,"bullet-texts"],maxIntegerBulletText:[514,"max-integer-bullet-text"],minIntegerBulletText:[514,"min-integer-bullet-text"],bulletTextType:[513,"bullet-text-type"],hasBorder:[516,"has-border"],hasBackground:[516,"has-background"],dialogTitle:[513,"dialog-title"],dialogInputPlaceholder:[513,"dialog-input-placeholder"],dialogConfig:[32],inputInfo:[32]},[[0,"lotteryBulletClick","lotteryBulletClickHandler"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}],[1,"lottery-button",{variant:[513],size:[513],color:[513],disabled:[516],loading:[516],text:[513],mbSource:[513,"mb-source"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],ripples:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-selection",{value:[520],text:[513],idx:[514],type:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],hasBorder:[516,"has-border"],hasBackground:[516,"has-background"],deleteIconSvg:[513,"delete-icon-svg"],deleteIconWidth:[513,"delete-icon-width"],deleteIconHeight:[513,"delete-icon-height"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-dialog",{mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],visible:[516],dialogTitle:[1,"dialog-title"],width:[1],closable:[4],mask:[4],maskClosable:[4,"mask-closable"],animationDuration:[2,"animation-duration"],fullscreen:[4],showFooter:[4,"show-footer"],showCancelBtn:[4,"show-cancel-btn"],language:[513],translationUrl:[520,"translation-url"],dialogClass:[1,"dialog-class"],dialogStyle:[16]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],e))));
1
+ import{p as e,b as t}from"./index-50addd47.js";export{s as setNonce}from"./index-50addd47.js";import{g as l}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((async e=>(await l(),t([["lottery-infinite-scroll",[[1,"lottery-infinite-scroll",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],items:[16],hasMore:[4,"has-more"],isLoading:[4,"is-loading"],isRefreshing:[4,"is-refreshing"],threshold:[1],containerHeight:[1,"container-height"],renderItem:[16],renderSkeleton:[16],skeletonCount:[2,"skeleton-count"],pullTriggerDistance:[2,"pull-trigger-distance"],minItemWidth:[2,"min-item-width"],gridGap:[2,"grid-gap"],pullDistance:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],isRefreshing:["handleRefreshingChange"]}]]],["lottery-button_7",[[1,"lottery-hakuna-ticket-history",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],endpoint:[513],gameId:[513,"game-id"],playerId:[514,"player-id"],sessionId:[513,"session-id"],scrollThreshold:[1,"scroll-threshold"],scrollContainerHeight:[2,"scroll-container-height"],ticketHistoryTitle:[1,"ticket-history-title"],ticketHistoryItemImageSrc:[1,"ticket-history-item-image-src"],ticketHistoryItemName:[1,"ticket-history-item-name"],ticketHistoryItemCurrency:[1,"ticket-history-item-currency"],listLoadingText:[1,"list-loading-text"],listRefreshingText:[1,"list-refreshing-text"],listEndText:[1,"list-end-text"],limit:[2],minItemWidth:[2,"min-item-width"],showSkeleton:[4,"show-skeleton"],visibleTickets:[32],hasMore:[32],isLoading:[32],isRefreshing:[32],errorMessage:[32],ticketList:[32],isLoadingList:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-hakuna-ticket-history-item",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],historyItemName:[1,"history-item-name"],historyItemImageSrc:[1,"history-item-image-src"],ticketId:[8,"ticket-id"],totalAmount:[1,"total-amount"],date:[1],time:[1],selectedNumbers:[1,"selected-numbers"],showSkeleton:[4,"show-skeleton"],selectedNumbersCount:[2,"selected-numbers-count"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-selection-group",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],translationUrl:[513,"translation-url"],splitToken:[513,"split-token"],selectionGroupId:[513,"selection-group-id"],selectionGroupLabel:[513,"selection-group-label"],type:[513],selectedBulletTexts:[513,"selected-bullet-texts"],maxSelectedCount:[514,"max-selected-count"],maxDisplayBulletsCount:[514,"max-display-bullets-count"],bulletTexts:[513,"bullet-texts"],maxIntegerBulletText:[514,"max-integer-bullet-text"],minIntegerBulletText:[514,"min-integer-bullet-text"],bulletTextType:[513,"bullet-text-type"],hasBorder:[516,"has-border"],hasBackground:[516,"has-background"],dialogTitle:[513,"dialog-title"],dialogInputPlaceholder:[513,"dialog-input-placeholder"],dialogConfig:[32],inputInfo:[32]},[[0,"lotteryBulletClick","lotteryBulletClickHandler"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}],[1,"lottery-button",{variant:[513],size:[513],color:[513],disabled:[516],loading:[516],text:[513],mbSource:[513,"mb-source"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],ripples:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-selection",{value:[520],text:[513],idx:[514],type:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],hasBorder:[516,"has-border"],hasBackground:[516,"has-background"],deleteIconSvg:[513,"delete-icon-svg"],deleteIconWidth:[513,"delete-icon-width"],deleteIconHeight:[513,"delete-icon-height"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}],[1,"lottery-tipping-dialog",{mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],visible:[516],dialogTitle:[1,"dialog-title"],width:[1],closable:[4],mask:[4],maskClosable:[4,"mask-closable"],animationDuration:[2,"animation-duration"],fullscreen:[4],showFooter:[4,"show-footer"],showCancelBtn:[4,"show-cancel-btn"],language:[513],translationUrl:[520,"translation-url"],dialogClass:[1,"dialog-class"],dialogStyle:[16]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,g as s}from"./index-50addd47.js";import{b as n,s as r,a as l}from"./index-30f31c84.js";const o=["ro","en","fr","ar","hr"],h={en:{noMoreData:"No more data",loading:"Loading...",release:"Release",refreshing:"Refreshing...",pull:"Pull"}},a=(t,i,e)=>{const s=i;let n=h[void 0!==s&&o.includes(s)?s:"en"][t];return e&&Object.keys(e).forEach((t=>{n=n.replace(`{${t}}`,e[t])})),n},c=class{constructor(e){t(this,e),this.loadMore=i(this,"loadMore",7),this.refresh=i(this,"refresh",7),this.startY=0,this.isTouching=!1,this.handleTouchStart=t=>{this.scrollContainer.scrollTop<=0&&(this.startY=t.touches[0].clientY,this.isTouching=!0)},this.handleTouchMove=t=>{if(!this.isTouching||this.isRefreshing)return;const i=t.touches[0].clientY-this.startY;i>0&&this.scrollContainer.scrollTop<=0?(t.cancelable&&t.preventDefault(),this.pullDistance=Math.pow(i,.8)):(this.isTouching=!1,this.pullDistance=0)},this.handleTouchEnd=()=>{this.isTouching=!1,this.pullDistance>=this.pullTriggerDistance?(this.pullDistance=this.pullTriggerDistance,this.refresh.emit()):this.pullDistance=0},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.items=[],this.hasMore=!1,this.isLoading=!1,this.isRefreshing=!1,this.threshold="0px 0px 200px 0px",this.containerHeight="100%",this.renderItem=void 0,this.renderSkeleton=void 0,this.skeletonCount=6,this.pullTriggerDistance=60,this.minItemWidth=340,this.gridGap=10,this.pullDistance=0}componentDidLoad(){this.initObserver(),this.scrollContainer&&(this.mbSource&&n(this.scrollContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.scrollContainer,this.clientStyling),this.clientStylingUrl&&l(this.scrollContainer,this.clientStylingUrl))}handleClientStylingChange(t,i){t!=i&&r(this.scrollContainer,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&l(this.scrollContainer,this.clientStylingUrl)}handleMbSourceChange(t,i){t!=i&&n(this.scrollContainer,`${this.mbSource}.Style`)}componentWillLoad(){(async t=>{if(t)try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const s=await e.json();i=s,Object.keys(i).forEach((t=>{for(let e in i[t])h[t][e]=i[t][e]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var i})(this.translationUrl)}componentDidUpdate(){this.hasMore&&!this.isLoading&&this.initObserver()}disconnectedCallback(){this.disconnectObserver(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleRefreshingChange(t){t||(this.pullDistance=0)}disconnectObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}initObserver(){this.disconnectObserver(),this.hasMore&&!this.isLoading&&this.sentinel&&(this.observer=new IntersectionObserver((t=>{t[0].isIntersecting&&this.hasMore&&!this.isLoading&&this.loadMore.emit()}),{root:this.scrollContainer,rootMargin:this.threshold,threshold:.1}),this.observer.observe(this.sentinel))}render(){const{items:t,minItemWidth:i,gridGap:s}=this,n=0===t.length&&!!this.renderSkeleton&&this.isLoading,r=n?new Array(this.skeletonCount).fill(null):t,l={transform:`translateY(${this.pullDistance}px)`,transition:this.isTouching?"none":"transform 0.3s ease-out"},o={display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${i}px, 1fr))`,gap:`${s}px`,boxSizing:"border-box"};return e("div",{key:"e47cafd444a010ce552fabd3c00722e32b1b3cd8",class:"lottery-infinite-scroll__container",style:{height:this.containerHeight,overflowY:"auto",position:"relative"},ref:t=>this.scrollContainer=t,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},e("div",{key:"ee21b030a6f83432edfce4b6cf2719c045fde57f",class:"ptr-indicator",style:Object.assign(Object.assign({},l),{position:"absolute",top:"0",left:"0",width:"100%",height:`${this.pullTriggerDistance}px`,display:"flex",alignItems:"center",justifyContent:"center",marginTop:`-${this.pullTriggerDistance}px`,pointerEvents:"none"})},this.isRefreshing?e("slot",{name:"refresh-loading"},a("refreshing",this.language)):e("slot",{name:"pull-hint"},a(this.pullDistance>this.pullTriggerDistance?"release":"pull",this.language))),e("div",{key:"15dd187e7683d16112b6366f94a840153c2c32a4",class:"scroll-content-wrapper",style:l},e("div",{key:"241ba9f947b2846d78a0beae5806e60f0ac86c8f",class:"list-content",style:o},r.map(((t,i)=>e("div",{key:i,class:"list-item-wrapper"},n?this.renderSkeleton(i):this.renderItem(t,i))))),e("div",{key:"c014157ee2f47cc6020d8cffb06136c6e78e2323",class:"lottery-infinite-scroll__sentinel",ref:t=>this.sentinel=t,style:{height:"20px",display:"flex",justifyContent:"center",visibility:this.hasMore||this.isLoading&&!n?"visible":"hidden"}},this.isLoading?e("slot",{name:"loading-more"},a("loading",this.language)):null),!this.hasMore&&!this.isLoading&&t.length>0&&e("div",{key:"d363303795035f2f1a1bd8ace34999084171a866",class:"end-message",style:{textAlign:"center",padding:"10px"}},e("slot",{key:"1be1f840fa161f07a2ecd14c11d0168f5d1156c6",name:"end-message"},a("noMoreData",this.language)))))}get el(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],isRefreshing:["handleRefreshingChange"]}}};c.style=":host{display:block;width:100%}.lottery-infinite-scroll__container{display:block;width:100%;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-right:10px;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--emw-hakuna-bg-secondary, #120505) var(--lottery-infinite-scroll-scrollbar-track-background, transparent);}.lottery-infinite-scroll__container::-webkit-scrollbar{width:var(--lottery-infinite-scroll-scrollbar-width, 2px)}.lottery-infinite-scroll__container::-webkit-scrollbar-track{background:var(--lottery-infinite-scroll-scrollbar-track-background, transparent)}.lottery-infinite-scroll__container::-webkit-scrollbar-thumb{background:var(--emw-hakuna-bg-secondary, #120505);border-radius:var(--lottery-infinite-scroll-scrollbar-thumb-border-radius, 2px)}.lottery-infinite-scroll__sentinel{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__sentinel.virtual-scroll-sentinel{height:1px;pointer-events:none;opacity:0;position:absolute;width:100%}.lottery-infinite-scroll__sentinel:not(.virtual-scroll-sentinel){height:1px;}.lottery-infinite-scroll__end-message{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__end-message.virtual-scroll-end-message{position:absolute;width:100%}.ptr-indicator{height:var(--pull-trigger-distance, 60px);margin-top:calc(-1 * var(--pull-trigger-distance, 60px));display:flex;align-items:center;justify-content:center;position:absolute;top:0;width:100%;z-index:10;font-size:14px;color:#666;}";export{c as lottery_infinite_scroll}
@@ -106,6 +106,8 @@ export declare class LotteryHakunaTicketHistory {
106
106
  * Whether to show skeleton
107
107
  */
108
108
  showSkeleton: boolean;
109
+ ticketList: TicketItem[];
110
+ isLoadingList: boolean;
109
111
  private page;
110
112
  private vendorGameType;
111
113
  private stylingContainer;
@@ -115,6 +117,7 @@ export declare class LotteryHakunaTicketHistory {
115
117
  handleClientStylingUrlChange(newValue: any, oldValue: any): void;
116
118
  handleMbSourceChange(newValue: any, oldValue: any): void;
117
119
  componentWillLoad(): void;
120
+ getAllTickets(): Promise<void>;
118
121
  private getTicketList;
119
122
  componentDidLoad(): void;
120
123
  disconnectedCallback(): void;
@@ -122,6 +125,8 @@ export declare class LotteryHakunaTicketHistory {
122
125
  handleRefresh: () => void;
123
126
  private renderSkeleton;
124
127
  private renderItem;
128
+ private renderTicketList;
129
+ private renderSkeletonList;
125
130
  private renderInfoIcon;
126
131
  render(): any;
127
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-hakuna-ticket-history",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as e,g as i,c as r,H as o}from"./index-50addd47.js";import{s as n,a,b as s,r as l}from"./lottery-hakuna-ticket-history-35d86d50.js";export{L as lottery_hakuna_ticket_history}from"./lottery-hakuna-ticket-history-35d86d50.js";const h={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},c=["ro","en","fr","ar","hr","zh"],d={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},g=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const i=e.getBoundingClientRect(),r=Math.max(i.width,i.height),o={top:t.clientY-i.top-r/2,left:t.clientX-i.left-r/2,size:r};this.ripples=[...this.ripples,o],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==o))}),600)},this.variant="primary",this.size="medium",this.color=void 0,this.disabled=!1,this.loading=!1,this.text=void 0,this.mbSource=void 0,this.language="en",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.ripples=[]}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])d[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}render(){const{variant:t,disabled:i,size:r,color:o}=this,n=i||this.loading,a={};if(o)switch(t){case"primary":default:Object.assign(a,{backgroundColor:o,borderColor:o});break;case"outline":case"dashed":Object.assign(a,{color:o,borderColor:o});break;case"text":Object.assign(a,{color:o})}return e("button",{key:"aa74ad98c90e7548228557bf8a8d26b125d4a83a",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${r}`]:!0,"btn--loading":this.loading},style:o?a:void 0,disabled:n,onClick:this.handleClick,ref:t=>this.stylingContainer=t},this.loading?e("div",{class:"loading-container"},e("span",{class:"content"},this.text||(()=>{const t=this.language;let e=d[void 0!==t&&c.includes(t)?t:"en"].loading;return e})()),e("span",{class:"spinner"})):e("span",{class:"content"},e("slot",{name:"icon-left"}),this.text||e("slot",null),e("slot",{name:"icon-right"})),e("div",{key:"302ea02be395bb24989d4abc040a513e23fa029a",class:"ripple-container"},this.ripples.map(((t,i)=>e("span",{key:i,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};g.style=":host{display:inline-block}.btn{font:inherit;position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--lottery-button-border-radius, 6px);font-weight:var(--lottery-button-font-weight, 500);cursor:pointer;outline:none;overflow:hidden;transition:var(--lottery-button-transition, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s);user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:var(--lottery-button-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.5))}.btn .content{position:relative;display:inline-flex;align-items:center;gap:var(--lottery-button-content-gap, 0.5em)}.btn .content ::slotted(span){display:inline-flex;align-items:center}.btn:hover:not(:disabled){box-shadow:var(--lottery-button-hover-box-shadow, 0 4px 8px 0 rgba(0, 0, 0, 0.5))}.btn:disabled{cursor:not-allowed;opacity:var(--lottery-button-disabled-opacity, 0.5)}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:var(--lottery-button-spinner-border, 2px solid rgba(255, 255, 255, 0.3));border-radius:50%;border-top-color:var(--lottery-button-spinner-color, white);animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:var(--lottery-button-primary-active-bg, #08104a)}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:var(--lottery-button-spinner-inverse-border-color, rgba(0, 0, 0, 0.2))}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:var(--lottery-button-outline-border-color, #dcdcdc);color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--lottery-button-outline-hover-border-color, #a6a6a6)}.btn--outline:active:not(:disabled){background-color:var(--lottery-button-outline-active-bg, #e6e6e6)}.btn--dashed{background-color:transparent;border-style:dashed;border-color:var(--lottery-button-dashed-border-color, #dcdcdc);color:var(--lottery-button-dashed-color, #333)}.btn--dashed:hover:not(:disabled){border-color:var(--lottery-button-dashed-hover-border-color, #a6a6a6);color:var(--lottery-button-dashed-hover-color, #0052d9)}.btn--text{background-color:transparent;color:var(--lottery-button-text-color, #0052d9);border-color:transparent}.btn--text:hover:not(:disabled){background-color:var(--lottery-button-text-hover-bg, #f2f2f2)}.btn--text:active:not(:disabled){background-color:var(--lottery-button-text-active-bg, #e6e6e6)}.btn--custom-color:hover:not(:disabled){opacity:var(--lottery-button-custom-hover-opacity, 0.9)}.btn--custom-color:active:not(:disabled){opacity:var(--lottery-button-custom-active-opacity, 0.8)}.btn--small{height:var(--lottery-button-small-height, 28px);font-size:var(--lottery-button-small-font-size, 12px);padding:var(--lottery-button-small-padding, 0 12px)}.btn--medium{height:var(--lottery-button-medium-height, 34px);font-size:var(--lottery-button-medium-font-size, 14px);padding:var(--lottery-button-medium-padding, 0 18px)}.btn--large{height:var(--lottery-button-large-height, 40px);font-size:var(--lottery-button-large-font-size, 16px);padding:var(--lottery-button-large-padding, 0 24px)}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:var(--lottery-button-ripple-light, rgba(255, 255, 255, 0.3));transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:var(--lottery-button-ripple-dark, rgba(0, 0, 0, 0.03))}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";const u=["ro","en","fr","ar","hr"],b={en:{total:"Total:"}},y=class{constructor(i){t(this,i),this.selectionGroupStyle="\n :host{\n --lottery-selection-width: 24px;\n --lottery-selection-height: 24px;\n --lottery-selection-padding: 10px;\n --lottery-selection-border-radius: 6px;\n --lottery-selection-border-width: 1px;\n --lottery-selection-border-color: var(--emw-hakuna-color-primary, #c52217);\n\n --lottery-selection-color: var(--emw-hakuna-text-primary, #ffffff);\n --lottery-selection-font-size: 14px;\n --lottery-selection-font-weight: 500;\n\n --lottery-selection-hover-background: transparent;\n --lottery-selection-hover-border-color: var(--emw-hakuna-color-primary, #c52217);\n --lottery-selection-hover-color: var(--emw-hakuna-text-primary, #ffffff);\n\n .lottery-selection__button{\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);\n line-height: normal;\n }\n .lottery-selection__button:hover{\n cursor: default;\n }\n --lottery-selection-group-item-gap:6px;\n }\n ",this.renderSkeleton=()=>e("div",{class:"lottery-hakuna-ticket-history-item__container"},e("div",{class:"lottery-hakuna-ticket-history-item__top"},e("div",{class:"lottery-hakuna-ticket-history-item__country-wrapper"},e("ui-skeleton",{structure:"image",width:"30px",height:"20px"}),e("ui-skeleton",{structure:"title",width:"86px",height:"17px",marginBottom:0})),e("div",{class:"lottery-hakuna-ticket-history-item__details"},e("ui-skeleton",{structure:"text",width:"60%",height:"20px"}))),e("div",{class:"lottery-hakuna-ticket-history-item__bottom"},e("div",{class:"lottery-hakuna-ticket-history-item__numbers-wrapper"},new Array(this.selectedNumbersCount).fill(e("ui-skeleton",{borderRadius:"8px",structure:"rectangle",width:"24px",height:"24px"}))),e("div",{class:"lottery-hakuna-ticket-history-item__date-wrapper"},e("ui-skeleton",{structure:"text",width:"180px",height:"14px"})))),this.renderMain=()=>e("div",{class:"lottery-hakuna-ticket-history-item__container"},e("div",{class:"lottery-hakuna-ticket-history-item__top"},e("div",{class:"lottery-hakuna-ticket-history-item__country-wrapper"},this.historyItemImageSrc&&e("img",{src:this.historyItemImageSrc,alt:this.historyItemName,class:"lottery-hakuna-ticket-history-item__country-flag"}),e("span",{class:"lottery-hakuna-ticket-history-item__country-name"},this.historyItemName)),e("div",{class:"lottery-hakuna-ticket-history-item__details"},e("span",{class:"lottery-hakuna-ticket-history-item__meta"},(()=>{const t=this.language;let e=b[void 0!==t&&u.includes(t)?t:"en"].total;return e})(),e("span",{class:"lottery-hakuna-ticket-history-item__meta-value"},this.totalAmount)))),e("div",{class:"lottery-hakuna-ticket-history-item__bottom"},e("div",{class:"lottery-hakuna-ticket-history-item__numbers-wrapper"},this.selectedNumbers&&e("lottery-selection-group",{type:"preview",bulletTexts:this.selectedNumbers,clientStyling:this.selectionGroupStyle+(this.clientStyling||""),clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource,hasBorder:!0,hasBackground:!1,selectionGroupId:this.ticketId?this.ticketId.toString():void 0})),e("div",{class:"lottery-hakuna-ticket-history-item__date-wrapper"},this.date&&e("div",null,this.date),this.time&&e("div",null,this.time)))),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.historyItemName=void 0,this.historyItemImageSrc=void 0,this.ticketId=void 0,this.totalAmount=void 0,this.date=void 0,this.time=void 0,this.selectedNumbers=void 0,this.showSkeleton=!1,this.selectedNumbersCount=6}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}async componentWillLoad(){(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])b[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"d22e301e9824aa3539e0c11ed52a1bddc5e1fb9c",ref:t=>this.stylingContainer=t,class:"lottery-hakuna-ticket-history-item__container-wrapper"},this.showSkeleton?this.renderSkeleton():this.renderMain())}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};y.style=".lottery-hakuna-ticket-history-item__container{display:flex;padding:var(--lottery-hakuna-ticket-history-item-container-padding, 20px);flex-direction:column;justify-content:center;gap:var(--lottery-hakuna-ticket-history-item-container-gap, 16px);border-radius:var(--lottery-hakuna-ticket-history-item-container-border-radius, 12px);border:1px solid transparent;min-width:var(--lottery-hakuna-ticket-history-item-container-min-width, 200px);background-origin:border-box;background-clip:padding-box, border-box;background-image:linear-gradient(var(--emw-hakuna-bg-secondary, #120505), var(--emw-hakuna-bg-secondary, #120505)), linear-gradient(to top left, var(--emw-hakuna-color-primary, #c52217) var(--lottery-hakuna-ticket-history-item-border-gradient-start-stop, 22%), var(--emw-hakuna-bg-primary, #2c2525) var(--lottery-hakuna-ticket-history-item-border-gradient-end-stop, 68%))}.lottery-hakuna-ticket-history-item__top{display:flex;justify-content:space-between;align-items:center}.lottery-hakuna-ticket-history-item__country-wrapper{display:flex;align-items:center;gap:10px}.lottery-hakuna-ticket-history-item__country-flag{width:var(--lottery-hakuna-ticket-history-item-country-flag-width, 30px);object-fit:cover;aspect-ratio:var(--lottery-hakuna-ticket-history-item-country-flag-aspect-ratio, 3/2)}.lottery-hakuna-ticket-history-item__country-name{color:var(--lottery-hakuna-ticket-history-item-country-name-color, #fff);font-size:var(--lottery-hakuna-ticket-history-item-country-name-font-size, 14px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-country-name-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-country-name-line-height, normal)}.lottery-hakuna-ticket-history-item__details{display:flex;gap:var(--lottery-hakuna-ticket-history-item-details-gap, 13px);color:var(--emw-hakuna-text-secondary, #b4a5a5);font-size:var(--lottery-hakuna-ticket-history-item-details-font-size, 10px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-details-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-details-line-height, normal)}.lottery-hakuna-ticket-history-item__meta{display:flex;gap:var(--lottery-hakuna-ticket-history-item-meta-gap, 10px)}.lottery-hakuna-ticket-history-item__meta-value{color:var(--lottery-hakuna-ticket-history-item-meta-value-color, inherit)}.lottery-hakuna-ticket-history-item__bottom{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.lottery-hakuna-ticket-history-item__numbers-wrapper{flex:1;display:flex;align-items:flex-start;gap:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-gap, 8px);box-shadow:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-box-shadow, 0 1px 2px 0 rgba(0, 0, 0, 0.25))}.lottery-hakuna-ticket-history-item__date-wrapper{color:var(--lottery-hakuna-ticket-history-item-date-wrapper-color, #fffefe);text-align:var(--lottery-hakuna-ticket-history-item-date-wrapper-text-align, right);font-size:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-size, 8px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-weight, 400);line-height:var(--lottery-hakuna-ticket-history-item-date-wrapper-line-height, 125%);min-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-min-width, 70px);max-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-max-width, 100px)}lottery-selection-group{width:100%}ui-skeleton{--emw-skeleton-primary-color:#414141;--emw-skeleton-secondary-color:#2f2929}";const p=["ro","en","fr","ar","hr"],m={en:{noMoreData:"No more data",loading:"Loading...",release:"Release",refreshing:"Refreshing...",pull:"Pull"}},f=(t,e,i)=>{const r=e;let o=m[void 0!==r&&p.includes(r)?r:"en"][t];return i&&Object.keys(i).forEach((t=>{o=o.replace(`{${t}}`,i[t])})),o},v=class{constructor(e){t(this,e),this.loadMore=r(this,"loadMore",7),this.refresh=r(this,"refresh",7),this.startY=0,this.isTouching=!1,this.handleTouchStart=t=>{this.scrollContainer.scrollTop<=0&&(this.startY=t.touches[0].clientY,this.isTouching=!0)},this.handleTouchMove=t=>{if(!this.isTouching||this.isRefreshing)return;const e=t.touches[0].clientY-this.startY;e>0&&this.scrollContainer.scrollTop<=0?(t.cancelable&&t.preventDefault(),this.pullDistance=Math.pow(e,.8)):(this.isTouching=!1,this.pullDistance=0)},this.handleTouchEnd=()=>{this.isTouching=!1,this.pullDistance>=this.pullTriggerDistance?(this.pullDistance=this.pullTriggerDistance,this.refresh.emit()):this.pullDistance=0},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.items=[],this.hasMore=!1,this.isLoading=!1,this.isRefreshing=!1,this.threshold="0px 0px 200px 0px",this.containerHeight="100%",this.renderItem=void 0,this.renderSkeleton=void 0,this.skeletonCount=6,this.pullTriggerDistance=60,this.minItemWidth=340,this.gridGap=10,this.pullDistance=0}componentDidLoad(){this.initObserver(),this.scrollContainer&&(this.mbSource&&s(this.scrollContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.scrollContainer,this.clientStyling),this.clientStylingUrl&&a(this.scrollContainer,this.clientStylingUrl))}handleClientStylingChange(t,e){t!=e&&n(this.scrollContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.scrollContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.scrollContainer,`${this.mbSource}.Style`)}componentWillLoad(){(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])m[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidUpdate(){this.hasMore&&!this.isLoading&&this.initObserver()}disconnectedCallback(){this.disconnectObserver(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleRefreshingChange(t){t||(this.pullDistance=0)}disconnectObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}initObserver(){this.disconnectObserver(),this.hasMore&&!this.isLoading&&this.sentinel&&(this.observer=new IntersectionObserver((t=>{t[0].isIntersecting&&this.hasMore&&!this.isLoading&&this.loadMore.emit()}),{root:this.scrollContainer,rootMargin:this.threshold,threshold:.1}),this.observer.observe(this.sentinel))}render(){const{items:t,minItemWidth:i,gridGap:r}=this,o=0===t.length&&!!this.renderSkeleton&&this.isLoading,n=o?new Array(this.skeletonCount).fill(null):t,a={transform:`translateY(${this.pullDistance}px)`,transition:this.isTouching?"none":"transform 0.3s ease-out"},s={display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${i}px, 1fr))`,gap:`${r}px`,boxSizing:"border-box"};return e("div",{key:"5f9372a0c2d0cdf00685cbedf062fb333d1e5348",class:"lottery-infinite-scroll__container",style:{height:this.containerHeight,overflowY:"auto",position:"relative"},ref:t=>this.scrollContainer=t,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},e("div",{key:"c43a2673188fbb50c93637f766f1926301ba08e9",class:"ptr-indicator",style:Object.assign(Object.assign({},a),{position:"absolute",top:"0",left:"0",width:"100%",height:`${this.pullTriggerDistance}px`,display:"flex",alignItems:"center",justifyContent:"center",marginTop:`-${this.pullTriggerDistance}px`,pointerEvents:"none"})},this.isRefreshing?e("slot",{name:"refresh-loading"},f("refreshing",this.language)):e("slot",{name:"pull-hint"},f(this.pullDistance>this.pullTriggerDistance?"release":"pull",this.language))),e("div",{key:"b6a6334401bb3c0ea8d776e028f57836ee0d36ac",class:"scroll-content-wrapper",style:a},e("div",{key:"16f58f44ce104fbdc4eacb2c3dfa9d3c7c7e6bdb",class:"list-content",style:s},n.map(((t,i)=>e("div",{key:i,class:"list-item-wrapper"},o?this.renderSkeleton(i):this.renderItem(t,i))))),e("div",{key:"1ed8b2ce72d85a68a48e9330ad2b9b9194346dfb",class:"lottery-infinite-scroll__sentinel",ref:t=>this.sentinel=t,style:{height:"20px",display:"flex",justifyContent:"center",visibility:this.hasMore||this.isLoading&&!o?"visible":"hidden"}},this.isLoading?e("slot",{name:"loading-more"},f("loading",this.language)):null),!this.hasMore&&!this.isLoading&&t.length>0&&e("div",{key:"3b8207a9dc1451c683eb1920b798574be4fbd975",class:"end-message",style:{textAlign:"center",padding:"10px"}},e("slot",{key:"157e109d933e5613cf882c5dd01212647bfeba79",name:"end-message"},f("noMoreData",this.language)))))}get el(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],isRefreshing:["handleRefreshingChange"]}}};v.style=":host{display:block;width:100%}.lottery-infinite-scroll__container{display:block;width:100%;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-right:10px;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--emw-hakuna-bg-secondary, #120505) var(--lottery-infinite-scroll-scrollbar-track-background, transparent);}.lottery-infinite-scroll__container::-webkit-scrollbar{width:var(--lottery-infinite-scroll-scrollbar-width, 2px)}.lottery-infinite-scroll__container::-webkit-scrollbar-track{background:var(--lottery-infinite-scroll-scrollbar-track-background, transparent)}.lottery-infinite-scroll__container::-webkit-scrollbar-thumb{background:var(--emw-hakuna-bg-secondary, #120505);border-radius:var(--lottery-infinite-scroll-scrollbar-thumb-border-radius, 2px)}.lottery-infinite-scroll__sentinel{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__sentinel.virtual-scroll-sentinel{height:1px;pointer-events:none;opacity:0;position:absolute;width:100%}.lottery-infinite-scroll__sentinel:not(.virtual-scroll-sentinel){height:1px;}.lottery-infinite-scroll__end-message{width:100%;display:block;text-align:center;}.lottery-infinite-scroll__end-message.virtual-scroll-end-message{position:absolute;width:100%}.ptr-indicator{height:var(--pull-trigger-distance, 60px);margin-top:calc(-1 * var(--pull-trigger-distance, 60px));display:flex;align-items:center;justify-content:center;position:absolute;top:0;width:100%;z-index:10;font-size:14px;color:#666;}";const k=class{constructor(e){t(this,e),this.lotteryBulletClickHandler=r(this,"lotteryBulletClick",7),this.value=0,this.text=void 0,this.idx=void 0,this.type="toggle",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.hasBorder=!0,this.hasBackground=!0,this.deleteIconSvg="",this.deleteIconWidth="16px",this.deleteIconHeight="16px"}handleClientStylingChange(t,e){t!==e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&s(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){"disabled"!==this.type&&"readonly"!==this.type&&(console.log("bullet clicked",this.type,this.idx,this.text,this.value),this.lotteryBulletClickHandler.emit({type:this.type,idx:this.idx,text:this.text,value:this.value}))}render(){let t;return t=this.deleteIconSvg?function(t){let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/on[a-z]+=[\"'][^\"']*[\"']/gi,""),e=e.replace(/javascript:/gi,""),e}(this.deleteIconSvg):l(h,{extraSVGAttrs:{width:this.deleteIconWidth,height:this.deleteIconHeight,fill:"currentColor"}}),e("div",{key:"0d1e8aaa80a907a7467410f6b27b4b6175e82299",class:"lottery-selection",ref:t=>this.stylingContainer=t},e("button",{key:"11a2402abbc290dc877ad95f3433092c3a0d8419",class:{"lottery-selection__button":!0,"lottery-selection__button--selected":1==this.value,"lottery-selection__button--disabled":"disabled"===this.type,"lottery-selection__button--no-border":!this.hasBorder,"lottery-selection__button--no-background":!this.hasBackground,isDeleteByIcon:"delete"===this.type,isCallDialogBtn:"input"===this.type||"readonly"===this.type},onClick:this.handleClick.bind(this),disabled:"disabled"===this.type},"delete"===this.type&&e("span",{key:"f99001d936a8f7bdf8adc5c46e82caf730a9442a",class:"lottery-selection__delete-icon",innerHTML:t}),e("span",{key:"55775e2492a1fe45cc8a457ac0a0d206744461ab",class:"lottery-selection__text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};k.style=":host{display:inline-block}.lottery-selection__button{display:flex;align-items:center;justify-content:center;width:var(--lottery-selection-width, 32px);height:var(--lottery-selection-height, 32px);padding:var(--lottery-selection-padding, 0);box-sizing:border-box;background:var(--lottery-selection-background, var(--emw--color-background, #fff));border:var(--lottery-selection-border-width, 2px) var(--lottery-selection-border-style, solid) var(--lottery-selection-border-color, var(--emw--color-primary, #0d196e));border-radius:var(--lottery-selection-border-radius, var(--emw--border-radius-medium, 8px));color:var(--lottery-selection-color, var(--emw--color-typography, #000));font-weight:var(--lottery-selection-font-weight, bold);font-size:var(--lottery-selection-font-size, 1em);cursor:pointer;user-select:none;}.lottery-selection__button:hover{background:var(--lottery-selection-hover-background, var(--emw--color-background, #fff));border-color:var(--lottery-selection-hover-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-hover-color, var(--emw--color-typography, #000))}.lottery-selection__button .lottery-selection__delete-icon{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__text{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__delete-icon{display:flex;align-items:center;justify-content:center;fill:var(--lottery-selection-delete-icon-color, var(--emw--color-typography, #000));vertical-align:middle}.lottery-selection__button.lottery-selection__button--selected{background-color:var(--lottery-selection-selected-background, var(--emw--color-primary, #0d196e));border-color:var(--lottery-selection-selected-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-selected-color, var(--emw--color-typography-inverse, #fff))}.lottery-selection__button.lottery-selection__button--disabled{background-color:var(--lottery-selection-disabled-background, var(--emw--color-gray-50, #f5f5f5));border-color:var(--lottery-selection-disabled-border-color, var(--emw--color-gray-100, #e6e6e6));color:var(--lottery-selection-disabled-color, var(--emw--color-gray-150, #6f6f6f));cursor:not-allowed;pointer-events:none;}.lottery-selection__button.lottery-selection__button--no-border{border:none}.lottery-selection__button.lottery-selection__button--no-background{background:transparent}";const w=["ro","en","fr","ar","hr","zh"],x={en:{noTicketBoard:"No ticket board available.",selectionCleared:"Your selection has been cleared.",clearAll:"Clear All",stopAt:"Stop at",turnover:"Turnover: ",pleaseFillIn:"Please fill in all the selection input!",fillIn:"Fill in",noBets:"Sorry. No bets have been placed so far. Check back later!",search:"Search",clear:"Clear",oddsChart:"Odds Chart",ticketSuccess:"Ticket purchased successfully.",stakePerLine:"Stake per Line:",lowestOdds:"Lowest Odds:",highestOdds:"Highest Odds:",orderSummary:"ORDER SUMMARY",ticket:"Ticket",lines:"Lines",total:"Total",submit:"Submit",loading:"Loading",enterValidNumber:"Please enter a valid number.",enterNumberBetween:"Please enter a number between {min} and {max}.",numberAlreadySelected:"This number has already been selected.",enterScoreUpTo:"Please enter the score (Up to {maxScore})",enterValue:"Please enter a value",myChoices:"My Choices",teams:"Teams",scores:"Scores",euro:"Euro",cancel:"Cancel",confirm:"Confirm"},ro:{},fr:{},ar:{},hr:{}},_=(t,e,i)=>{const r=e;let o=x[void 0!==r&&w.includes(r)?r:"en"][t];return i&&Object.keys(i).forEach((t=>{o=o.replace(`{${t}}`,i[t])})),o};function S(t,e){return new Set(t?t.split(e):[])}function C(t,e){return e.filter((e=>e!==t))}function $(t,e){return e.concat([t])}const z=class{constructor(e){t(this,e),this.bulletGroupUpdateSelectedBulletTexts=r(this,"bulletGroupUpdateSelection",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.splitToken=",",this.selectionGroupId=void 0,this.selectionGroupLabel=void 0,this.type="bet",this.selectedBulletTexts=null,this.maxSelectedCount=null,this.maxDisplayBulletsCount=11,this.bulletTexts=null,this.maxIntegerBulletText=null,this.minIntegerBulletText=0,this.bulletTextType="integer",this.hasBorder=!0,this.hasBackground=!0,this.dialogTitle=void 0,this.dialogInputPlaceholder=void 0,this.dialogConfig={width:"400px",visible:!1,onConfirm:()=>this.handleFillInAddMore(),onCancel:()=>this.handleCloseAddMoreDialog()},this.inputInfo={valid:!0,errorMessage:"",value:""}}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])x[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&s(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryBulletClickHandler(t){if(t.stopPropagation(),"input"!==t.detail.type)if(["delete","toggle"].includes(t.detail.type))this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:(e=t.detail,i=Array.from(this.selectedSet),r=this.maxSelectedCount,"delete"===e.type?C(e.text,i):"toggle"===e.type?i.includes(e.text)?C(e.text,i):i.length>=r?function(t,e,i){return e.slice(e.length-(i-1)).concat([t])}(e.text,i,r):$(e.text,i):[]).join(this.splitToken),selectionGroupId:this.selectionGroupId});else var e,i,r;else this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!0})}get selectedSet(){return S(this.selectedBulletTexts,this.splitToken)}get bulletTextsSet(){return this.bulletTexts?S(this.bulletTexts,this.splitToken):"integer"===this.bulletTextType&&null!=this.maxIntegerBulletText?S(Array.from({length:Number(this.lastDisplayBulletText)-this.minIntegerBulletText+1},((t,e)=>this.minIntegerBulletText+e)).join(this.splitToken),this.splitToken):new Set}get lastDisplayBulletText(){if("integer"===this.bulletTextType)return null!=this.maxIntegerBulletText?Math.min(this.maxIntegerBulletText,this.minIntegerBulletText+this.maxDisplayBulletsCount-1):this.minIntegerBulletText+this.maxDisplayBulletsCount-1;if(this.bulletTextsSet.size>0){const t=Array.from(this.bulletTextsSet);return t.length>=this.maxDisplayBulletsCount?t[this.maxDisplayBulletsCount-1]:t[t.length-1]}return null}get isSingleSelectionMode(){return 1===this.maxSelectedCount}getBulletToRender(){const t=Array.from(this.bulletTextsSet);let e=t,i=!1;return"text"===this.bulletTextType?t.length>this.maxDisplayBulletsCount?(i=!0,e=t.slice(0,this.maxDisplayBulletsCount-1)):e=t:(i=null!=this.maxIntegerBulletText&&this.maxIntegerBulletText>Number(this.lastDisplayBulletText),e=t),{bulletsToRender:e,showInputButton:i}}renderBulletGroup(){let t=[];if("bet"===this.type){const e=null!==this.maxSelectedCount&&this.selectedSet.size>=this.maxSelectedCount,{bulletsToRender:i,showInputButton:r}=this.getBulletToRender();if(i.forEach(((i,r)=>{let o="toggle";this.selectedSet.has(String(i))||!e||this.isSingleSelectionMode||(o="disabled"),t.push({value:this.selectedSet.has(String(i))?1:0,text:String(i),idx:r,type:o})})),r){let i="input";e&&!this.isSingleSelectionMode&&(i="disabled");const r="text"===this.bulletTextType?"...":`${this.lastDisplayBulletText}+`,o="text"===this.bulletTextType?-1:Number(this.lastDisplayBulletText)+1;"integer"===this.bulletTextType&&t.length>=this.maxDisplayBulletsCount&&t.pop(),t.push({value:0,text:r,idx:o,type:i})}}else if(["choice","preview"].includes(this.type)){const{bulletsToRender:e}=this.getBulletToRender();e.forEach(((e,i)=>{let r="toggle";"preview"===this.type?r="readonly":this.selectedSet.has(String(e))&&(r="delete"),t.push({value:this.selectedSet.has(String(e))?1:0,text:e,idx:i,type:r})}))}return e("div",{class:"lottery-selection-group__item--right"},t.map((t=>e("lottery-selection",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource,text:t.text,idx:t.idx,value:t.value,type:t.type,hasBorder:this.hasBorder,hasBackground:this.hasBackground}))))}handleCloseAddMoreDialog(){this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!1}),this.inputInfo={value:"",errorMessage:"",valid:!0}}handleInputChange(t){const e=t.target.value;this.inputInfo=Object.assign(Object.assign({},this.inputInfo),{value:e}),this.inputInfo=function({value:t,selectedSet:e,maxValue:i,minValue:r,language:o,type:n="integer"}){const a=t.trim();if("integer"===n){if(!/^-?\d+$/.test(a))return{valid:!1,errorMessage:_("enterValidNumber",o),value:t};const n=Number(a);if(isNaN(n))return{valid:!1,errorMessage:_("enterValidNumber",o),value:t};if(void 0!==r&&n<r||void 0!==i&&n>i)return{valid:!1,errorMessage:_("enterNumberBetween",o,{min:r,max:i}),value:t};const s=String(n);if(e.has(s))return{valid:!1,errorMessage:_("numberAlreadySelected",o),value:t}}else if(e.has(a))return{valid:!1,errorMessage:_("numberAlreadySelected",o),value:t};return{valid:!0,errorMessage:"",value:t}}({value:e,selectedSet:this.selectedSet,maxValue:this.maxIntegerBulletText,minValue:"integer"===this.bulletTextType?Number(this.lastDisplayBulletText)+1:void 0,language:this.language,type:this.bulletTextType})}handleFillInAddMore(){if(this.inputInfo.valid){const{value:t}=this.inputInfo;let e,i=t;i="integer"===this.bulletTextType?String(Number(t)):t.trim(),e=this.isSingleSelectionMode?i:$(i,Array.from(this.selectedSet)).join(this.splitToken),this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:e,selectionGroupId:this.selectionGroupId}),this.handleCloseAddMoreDialog()}}render(){return e("div",{key:"66b8e9c63d948eb2f7eb37adb80892dbedd7df9a",class:"lottery-selection-group",ref:t=>this.stylingContainer=t},e("div",{key:"6562fdcad0f352b5e2d03edcc980a9aeab32277e",class:"lottery-selection-group__item"},this.selectionGroupLabel&&e("div",{key:"43c2132e4904a2b69b970d9b2074f120ed4d0986",class:"lottery-selection-group__item--left"},this.selectionGroupLabel),this.renderBulletGroup()),e("lottery-tipping-dialog",{key:"cb693d10e6b499628909571021d8508cdebbe29a",visible:this.dialogConfig.visible,width:this.dialogConfig.width,onCancel:this.dialogConfig.onCancel},e("div",{key:"dd312634574bbe1b4d3de7e82a9c58f58f846c1a",class:"addSelectionDialog"},e("div",{key:"b371b1090598f0219a7c652bab51e9d349703c34",class:"addSelectionDialog-title"},this.dialogTitle||("text"===this.bulletTextType?_("enterValue",this.language):_("enterScoreUpTo",this.language,{maxScore:this.maxIntegerBulletText}))),e("input",{key:"b5f1bb74999246dac8dc20f04e3af893deae6654",type:"text",class:{"dialog-input":!0,invalid:!this.inputInfo.valid},value:this.inputInfo.value,onInput:this.handleInputChange.bind(this),placeholder:this.dialogInputPlaceholder}),e("div",{key:"f33970a6dffdc881ffa9cf2c0bb54b26b27cccd6",class:"error-message"},this.inputInfo.errorMessage)),e("div",{key:"4c580dae14b38aff03e17067b2c0b72d01aa4f42",slot:"footer",class:"addSelectionDialog-footer"},e("lottery-button",{key:"874aa0ffde8fe2d0b08efea0cf951f101ab8dad0",onClick:this.dialogConfig.onCancel,text:_("cancel",this.language),variant:"outline"}),e("lottery-button",{key:"63a556eb5f9ad1cdd357c017756be274d40ef235",onClick:this.dialogConfig.onConfirm,text:_("confirm",this.language),variant:"primary",disabled:!this.inputInfo.valid||!this.inputInfo.value}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};z.style=":host {\n width: 100%;\n}\n\n.lottery-selection-group {\n container-type: inline-size;\n padding: var(--lottery-selection-group-padding, 0);\n background: var(--lottery-selection-group-background, transparent);\n border: var(--lottery-selection-group-border, none);\n border-radius: var(--lottery-selection-group-border-radius, 0);\n}\n.lottery-selection-group__item {\n display: flex;\n flex-direction: var(--lottery-selection-group-flex-direction, row);\n align-items: var(--lottery-selection-group-item-align, center);\n justify-content: var(--lottery-selection-group-item-justify, flex-start);\n gap: var(--lottery-selection-group-item-gap, 16px);\n width: 100%;\n}\n.lottery-selection-group__item--left {\n width: var(--lottery-selection-group-label-width, 130px);\n min-width: var(--lottery-selection-group-label-min-width, auto);\n max-width: var(--lottery-selection-group-label-max-width, none);\n color: var(--lottery-selection-group-label-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-label-font-size, 1em);\n font-weight: var(--lottery-selection-group-label-font-weight, bold);\n text-align: var(--lottery-selection-group-label-align, left);\n white-space: var(--lottery-selection-group-label-white-space, normal);\n}\n.lottery-selection-group__item--right {\n flex: 1;\n display: flex;\n flex-wrap: var(--lottery-selection-group-bullets-wrap, wrap); /* Allow items to wrap */\n gap: var(--lottery-selection-group-bullets-gap, 8px); /* Gap between bullets */\n align-items: var(--lottery-selection-group-bullets-align, center);\n justify-content: var(--lottery-selection-group-bullets-justify, flex-start); /* Align bullets to start */\n}\n@container (max-width: 320px) {\n .lottery-selection-group__item--left {\n width: 100px;\n max-width: 100px;\n }\n}\n\n.dialog-input {\n width: 100%;\n padding: var(--lottery-selection-group-input-padding, 8px);\n border: var(--lottery-selection-group-input-border-width, 1px) var(--lottery-selection-group-input-border-style, solid) var(--lottery-selection-group-input-border-color, var(--emw--color-gray-100, #e6e6e6));\n border-radius: var(--lottery-selection-group-input-radius, 4px);\n background-color: var(--lottery-selection-group-input-bg, #fff);\n color: var(--lottery-selection-group-input-color, #000);\n box-sizing: border-box;\n margin-top: var(--lottery-selection-group-input-margin-top, 10px);\n font-size: var(--lottery-selection-group-input-font-size, 1em);\n}\n.dialog-input::placeholder {\n color: var(--lottery-selection-group-input-placeholder-color, #999);\n}\n\n.dialog-input.invalid,\n.dialog-input.invalid:focus {\n border-color: var(--emw--color-error, #ff3d00);\n outline-color: var(--emw--color-error, #ff3d00);\n}\n\n.error-message {\n color: var(--lottery-selection-group-error-color, var(--emw--color-error, #ff3d00));\n font-size: var(--lottery-selection-group-error-font-size, 12px);\n font-weight: var(--lottery-selection-group-error-font-weight, normal);\n margin-top: 4px;\n}\n\n.addSelectionDialog-title {\n color: var(--lottery-selection-group-dialog-title-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-dialog-title-font-size, 1.2em);\n font-weight: var(--lottery-selection-group-dialog-title-font-weight, bold);\n margin-bottom: var(--lottery-selection-group-dialog-title-margin-bottom, 0);\n}\n.addSelectionDialog-footer {\n display: flex;\n justify-content: var(--lottery-selection-group-dialog-footer-justify, flex-end);\n gap: var(--lottery-selection-group-dialog-footer-gap, 18px);\n margin-top: var(--lottery-selection-group-dialog-footer-margin-top, 0);\n}";const j=["ro","en","fr","ar","hr"],T={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},M=(t,e)=>{const i=e;return T[void 0!==i&&j.includes(i)?i:"en"][t]},U=class{constructor(e){t(this,e),this.open=r(this,"open",7),this.close=r(this,"close",7),this.confirm=r(this,"confirm",7),this.cancel=r(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&s(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();e=r,Object.keys(e).forEach((t=>{for(let i in e[t])T[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(){this.maskClosable&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const t=Object.assign({width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},this.dialogStyle||{}),i=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],r=["mask",this.visible?"mask-enter":"mask-leave"],o=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return e("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:i.join(" "),ref:t=>this.stylingContainer=t},e("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:r.join(" "),onClick:this.handleMaskClick.bind(this)}),e("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:o,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},(this.dialogTitle||this.closable)&&e("div",{key:"04d54878aa24e0d9eb98bc921ea3edfacd6de3af",class:"dialog-header"},e("h2",{key:"f6f6c279de47e49cde86d0c907b9b40a115926b3",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&e("button",{key:"e1625473e5460cd667961923bf678c9a91b69c82",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),e("div",{key:"fb0db8dd765832cf1d8e8b682131e4c97a93ac22",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},e("slot",{key:"75336f59c2a8fe6775fc12ed4e2e26ff6bb6b508"})),this.showFooter&&e("div",{key:"a305086a2830265317abb0fd6f59b4a053fd54a9",class:"dialog-footer"},e("slot",{key:"cb330ea63908002f4f8b4b8139d5843c2570302e",name:"footer"},this.showCancelBtn&&e("button",{key:"c3d2c15195e56efd6d388265e9ccb87030627b7b",class:"cancel-btn",onClick:this.handleClose.bind(this)},M("cancel",this.language)),e("button",{key:"af9c96b4e1ce82f9ecb73e2b9f4e93cba0382d76",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},M("confirm",this.language))))))}get el(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};U.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";const O=class{constructor(e){t(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(t,e){e!==t&&this.handleStructure(t)}handleStylingProps(t){switch(typeof t){case"number":return 0===t?0:`${t}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(t)||t.endsWith("px")||t.endsWith("%")?t:"unset"}}handleStructure(t){switch(t){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return e("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return e("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((t,i)=>e("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return e("div",{class:"SkeletonContainer"},e("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let t="";switch(this.structure){case"logo":t=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":t=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":t=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":t=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":t=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":t=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:t=""}return e(o,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},e("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},t),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};O.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{g as lottery_button,y as lottery_hakuna_ticket_history_item,v as lottery_infinite_scroll,k as lottery_selection,z as lottery_selection_group,U as lottery_tipping_dialog,O as ui_skeleton}
@@ -1 +0,0 @@
1
- import{r as t,h as e}from"./index-50addd47.js";function n(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function r(t,e){if(!t||!e)return;const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function i(t,e){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{n.innerHTML=e,t&&t.appendChild(n)}))}}var a,o,s,u;function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function h(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function d(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function l(t){d(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===c(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}!function(t){t.Lottery="Lottery",t.PoolGame="PoolGame"}(a||(a={})),function(t){t.Tipping="HomeDrawAway",t.Oddsbomben="CorrectScore"}(o||(o={})),function(t){t.Settled="Settled",t.Purchased="Purchased",t.Canceled="Canceled"}(s||(s={})),function(t){t.WON="Won",t.LOST="Lost"}(u||(u={}));var f={};function m(){return f}function v(t){d(1,arguments);var e=l(t),n=e.getUTCDay(),r=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function g(t){d(1,arguments);var e=l(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=v(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=v(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function y(t,e){var n,r,i,a,o,s,u,c;d(1,arguments);var f=m(),v=h(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:f.weekStartsOn)&&void 0!==r?r:null===(u=f.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=l(t),y=g.getUTCDay(),w=(y<v?7:0)+y-v;return g.setUTCDate(g.getUTCDate()-w),g.setUTCHours(0,0,0,0),g}function w(t,e){var n,r,i,a,o,s,u,c;d(1,arguments);var f=l(t),v=f.getUTCFullYear(),g=m(),w=h(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:g.firstWeekContainsDate)&&void 0!==r?r:null===(u=g.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(v+1,0,w),b.setUTCHours(0,0,0,0);var p=y(b,e),x=new Date(0);x.setUTCFullYear(v,0,w),x.setUTCHours(0,0,0,0);var k=y(x,e);return f.getTime()>=p.getTime()?v+1:f.getTime()>=k.getTime()?v:v-1}function b(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}const p=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return b("yy"===e?r%100:r,e.length)},x=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):b(n+1,2)},k=function(t,e){return b(t.getUTCDate(),e.length)},M=function(t,e){return b(t.getUTCHours()%12||12,e.length)},S=function(t,e){return b(t.getUTCHours(),e.length)},E=function(t,e){return b(t.getUTCMinutes(),e.length)},C=function(t,e){return b(t.getUTCSeconds(),e.length)},D=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return b(Math.floor(r*Math.pow(10,n-3)),e.length)};var P={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return p(t,e)},Y:function(t,e,n,r){var i=w(t,r),a=i>0?i:1-i;return"YY"===e?b(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):b(a,e.length)},R:function(t,e){return b(g(t),e.length)},u:function(t,e){return b(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return b(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return b(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return x(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return b(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){d(1,arguments);var n=l(t),r=y(n,e).getTime()-function(t,e){var n,r,i,a,o,s,u,c;d(1,arguments);var l=m(),f=h(null!==(n=null!==(r=null!==(i=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(o=e.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:l.firstWeekContainsDate)&&void 0!==r?r:null===(u=l.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),v=w(t,e),g=new Date(0);return g.setUTCFullYear(v,0,f),g.setUTCHours(0,0,0,0),y(g,e)}(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):b(i,e.length)},I:function(t,e,n){var r=function(t){d(1,arguments);var e=l(t),n=v(e).getTime()-function(t){d(1,arguments);var e=g(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),v(n)}(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):b(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):k(t,e)},D:function(t,e,n){var r=function(t){d(1,arguments);var e=l(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((n-r)/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):b(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return b(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return b(a,e.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return b(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return M(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):S(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):b(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):b(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):E(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):C(t,e)},S:function(t,e){return D(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return j(i);case"XXXX":case"XX":return _(i);default:return _(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return j(i);case"xxxx":case"xx":return _(i);default:return _(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+T(i,":");default:return"GMT"+_(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+T(i,":");default:return"GMT"+_(i,":")}},t:function(t,e,n,r){return b(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,r){return b((r._originalDate||t).getTime(),e.length)}};function T(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+b(a,2)}function j(t,e){return t%60==0?(t>0?"-":"+")+b(Math.abs(t)/60,2):_(t,e)}function _(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+b(Math.floor(i/60),2)+n+b(i%60,2)}const O=P;var R=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},W=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},z={p:W,P:function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return R(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",R(i,e)).replace("{{time}}",W(a,e))}};const L=z;var Y=["D","DD"],q=["YY","YYYY"];function G(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var A={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function N(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var U,B={date:N({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:N({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:N({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function $(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var i=t.defaultFormattingWidth||t.defaultWidth,a=null!=n&&n.width?String(n.width):i;r=t.formattingValues[a]||t.formattingValues[i]}else{var o=t.defaultWidth,s=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[s]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function H(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!i)return null;var a,o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(o))return e}(s):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(o))return e}(s);return a=t.valueCallback?t.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:e.slice(o.length)}}}const I={code:"en-US",formatDistance:function(t,e,n){var r,i=A[t];return r="string"==typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:B,formatRelative:function(t){return Q[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:$({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:$({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:$({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:$({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:$({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(U={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(U.matchPattern);if(!n)return null;var r=n[0],i=t.match(U.parsePattern);if(!i)return null;var a=U.valueCallback?U.valueCallback(i[0]):i[0];return{value:a=e.valueCallback?e.valueCallback(a):a,rest:t.slice(r.length)}}),era:H({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:H({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:H({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:H({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:H({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var X=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,J=/^'([^]*?)'?$/,Z=/''/g,K=/[a-zA-Z]/;function V(t,e,n){var r,i,a,o,s,u,f,v,g,y,w,b,p,x,k,M,S,E;d(2,arguments);var C=String(e),D=m(),P=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:D.locale)&&void 0!==r?r:I,T=h(null!==(a=null!==(o=null!==(s=null!==(u=null==n?void 0:n.firstWeekContainsDate)&&void 0!==u?u:null==n||null===(f=n.locale)||void 0===f||null===(v=f.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==s?s:D.firstWeekContainsDate)&&void 0!==o?o:null===(g=D.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.firstWeekContainsDate)&&void 0!==a?a:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=h(null!==(w=null!==(b=null!==(p=null!==(x=null==n?void 0:n.weekStartsOn)&&void 0!==x?x:null==n||null===(k=n.locale)||void 0===k||null===(M=k.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==p?p:D.weekStartsOn)&&void 0!==b?b:null===(S=D.locale)||void 0===S||null===(E=S.options)||void 0===E?void 0:E.weekStartsOn)&&void 0!==w?w:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!P.localize)throw new RangeError("locale must contain localize property");if(!P.formatLong)throw new RangeError("locale must contain formatLong property");var _=l(t);if(!function(t){if(d(1,arguments),!function(t){return d(1,arguments),t instanceof Date||"object"===c(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=l(t);return!isNaN(Number(e))}(_))throw new RangeError("Invalid time value");var R=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(_),W=function(t,e){return d(2,arguments),function(t,e){d(2,arguments);var n=l(t).getTime(),r=h(e);return new Date(n+r)}(t,-h(e))}(_,R),z={firstWeekContainsDate:T,weekStartsOn:j,locale:P,_originalDate:_};return C.match(F).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,P.formatLong):t})).join("").match(X).map((function(r){if("''"===r)return"'";var i,a,o=r[0];if("'"===o)return(a=(i=r).match(J))?a[1].replace(Z,"'"):i;var s=O[o];if(s)return null!=n&&n.useAdditionalWeekYearTokens||-1===q.indexOf(r)||G(r,e,String(t)),null!=n&&n.useAdditionalDayOfYearTokens||!(-1!==Y.indexOf(r))||G(r,e,String(t)),s(W,r,P.localize,z);if(o.match(K))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}function tt(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let r=0;r<e;r++){if(!tt(t[r]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!tt(e))return!1;n++}return n===e}(t):!t)}const et="?";function nt(t,e){return t&&t.length>0?t.map((t=>{const[n,r]=V(new Date(t.createdAt),`MMM d,yyyy${et}HH:mm:ss a 'UTC'`).split(et);return{id:t.id,name:(null==e?void 0:e.name)||t.gameName,imageSrc:null==e?void 0:e.imageSrc,totalAmount:(null==e?void 0:e.currency)?`${null==e?void 0:e.currency} ${t.amount}`:t.amount,date:n,time:r,selectedNumbers:t.selection.map((t=>t.selections)).join(",")}})):[]}async function rt({endpoint:t,filterData:e,sessionId:n,meta:r}){const{items:i=[],total:a}=await function(t,e="GET",n=null,r={}){return new Promise(((i,a)=>{const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),s=Object.assign({"Content-Type":"application/json"},r);"GET"!==e&&"HEAD"!==e&&(s["X-Idempotency-Key"]=o);const u={method:e,headers:s,body:null};n&&"GET"!==e&&"HEAD"!==e?u.body=JSON.stringify(n):delete u.body,fetch(t,u).then((t=>t.ok?t.json():t.json().then((e=>{a({status:t.status,statusText:t.statusText,code:e.code||"UNKNOWN_ERROR",message:e.message||"An unknown error occurred",data:e.data||null})}),(()=>a({status:t.status,statusText:t.statusText,code:"PARSE_ERROR",message:"Failed to parse error response"}))))).then((t=>i(t)),(t=>a(t)))}))}(`${t}/tickets${function(t){const e={};Object.entries(t).forEach((([t,n])=>{tt(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(e)}`,"GET",null,{Authorization:`Bearer ${n}`})||{items:[],total:0};return{items:nt(i,r),total:a}}const it=["ro","en","fr","ar","hr"],at={en:{releaseToRefresh:"Release to refresh...",youHaveReachedTheEnd:"You have reached the end.",failToShowTicketList:"Fail to show ticket list.",unauthorized:"Unauthorized, please login."}},ot=(t,e,n)=>{const r=e;let i=at[void 0!==r&&it.includes(r)?r:"en"][t];return n&&Object.keys(n).forEach((t=>{i=i.replace(`{${t}}`,n[t])})),i};var st=function(){return st=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},st.apply(this,arguments)},ut={primaryColor:"#333",secondaryColor:"#E6E6E6"};function ct(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var n=e.placeholders||ut;return ht(t.icon(n.primaryColor,n.secondaryColor),e)}return ht(t.icon,e)}function ht(t,e){var n="svg"===t.tag?st(st({},t.attrs),e.extraSVGAttrs||{}):t.attrs,r=Object.keys(n).reduce((function(t,e){var r=n[e],i="".concat(e,'="').concat(r,'"');return t.push(i),t}),[]),i=r.length?" "+r.join(" "):"",a=(t.children||[]).map((function(t){return ht(t,e)})).join("");return a&&a.length?"<".concat(t.tag).concat(i,">").concat(a,"</").concat(t.tag,">"):"<".concat(t.tag).concat(i," />")}const dt=ct({icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},{extraSVGAttrs:{width:"14px",height:"14px",fill:"currentColor"}}),lt=class{constructor(n){t(this,n),this.page=0,this.vendorGameType=a.Lottery,this.customStyle=`\n :host {\n --lottery-hakuna-ticket-history-item-container-min-width: ${this.minItemWidth}px;\n\n .lottery-hakuna-ticket-history-item__container {\n justify-content: flex-start;\n }\n }\n\n .lottery-hakuna-ticket-history-item__container-wrapper {\n height: 100%;\n box-sizing: border-box;\n }\n .lottery-hakuna-ticket-history-item__container {\n height: 100%;\n box-sizing: border-box;\n }\n `,this.handleLoadMore=()=>{!this.isLoading&&this.hasMore&&this.getTicketList(this.page+1)},this.handleRefresh=()=>{this.isRefreshing||(this.page=1,this.getTicketList(1,!0))},this.renderSkeleton=()=>e("lottery-hakuna-ticket-history-item",{"client-styling":this.customStyle+(this.clientStyling||""),"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,translationUrl:this.translationUrl,language:this.language,showSkeleton:!0}),this.renderItem=t=>e("lottery-hakuna-ticket-history-item",{"client-styling":this.customStyle+(this.clientStyling||""),"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,translationUrl:this.translationUrl,language:this.language,key:t.id,"history-item-name":t.name,"history-item-image-src":t.imageSrc,"ticket-id":t.id,"total-amount":t.totalAmount,date:t.date,time:t.time,"selected-numbers":t.selectedNumbers}),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId="",this.scrollThreshold="0px 0px 200px 0px",this.scrollContainerHeight=500,this.ticketHistoryTitle="YOUR TICKET",this.ticketHistoryItemImageSrc=void 0,this.ticketHistoryItemName=void 0,this.ticketHistoryItemCurrency="R",this.listLoadingText=void 0,this.listRefreshingText=void 0,this.listEndText=void 0,this.limit=10,this.visibleTickets=[],this.hasMore=!1,this.isLoading=!1,this.isRefreshing=!1,this.errorMessage=void 0,this.minItemWidth=300,this.showSkeleton=!0}handleClientStylingChange(t,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&r(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&i(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){(async t=>{if(t)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();e=r,Object.keys(e).forEach((t=>{for(let n in e[t])at[t][n]=e[t][n]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl),this.getTicketList(1)}async getTicketList(t,e=!1){try{if(!this.endpoint||!this.sessionId)return Promise.reject(new Error("Endpoint and sessionId are required"));if(t<=0||!this.limit)return;e?this.isRefreshing=!0:this.isLoading=!0;const{items:n,total:r}=await rt({endpoint:this.endpoint,filterData:{offset:(t-1)*this.limit,limit:this.limit,vendorGameType:this.vendorGameType},sessionId:this.sessionId,meta:{name:this.ticketHistoryItemName,imageSrc:this.ticketHistoryItemImageSrc,currency:this.ticketHistoryItemCurrency}});this.visibleTickets=e?[...n]:[...this.visibleTickets,...n],this.hasMore=t<Math.ceil(r/this.limit),this.page=t,this.isLoading=!1,this.isRefreshing=!1,this.errorMessage=null}catch(t){if(this.isLoading=!1,this.isRefreshing=!1,401===t.status)return this.errorMessage=ot("unauthorized",this.language),void window.postMessage({type:"SessionExpired"},window.location.href);this.errorMessage=ot("failToShowTicketList",this.language)}}componentDidLoad(){this.stylingContainer&&(this.mbSource&&i(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}renderInfoIcon(){return e("svg",{width:"45",height:"45",viewBox:"0 0 45 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M22.5 5.625C13.1802 5.625 5.625 13.1802 5.625 22.5C5.625 31.8198 13.1802 39.375 22.5 39.375C31.8198 39.375 39.375 31.8198 39.375 22.5C39.375 13.1802 31.8198 5.625 22.5 5.625ZM1.875 22.5C1.875 11.1091 11.1091 1.875 22.5 1.875C33.8909 1.875 43.125 11.1091 43.125 22.5C43.125 33.8909 33.8909 43.125 22.5 43.125C11.1091 43.125 1.875 33.8909 1.875 22.5ZM22.5 13.125C23.5355 13.125 24.375 13.9645 24.375 15V22.5C24.375 23.5355 23.5355 24.375 22.5 24.375C21.4645 24.375 20.625 23.5355 20.625 22.5V15C20.625 13.9645 21.4645 13.125 22.5 13.125ZM20.625 30C20.625 28.9645 21.4645 28.125 22.5 28.125H22.5188C23.5543 28.125 24.3938 28.9645 24.3938 30C24.3938 31.0355 23.5543 31.875 22.5188 31.875H22.5C21.4645 31.875 20.625 31.0355 20.625 30Z"}))}render(){return e("div",{key:"53855de1d22947533c4573d78309a9b00f0f21af",class:"lottery-hakuna-ticket-history__container",ref:t=>this.stylingContainer=t},e("div",{key:"6b8183876d82fa7ee1283be91642dbc6d75ece8b",class:"lottery-hakuna-ticket-history__title"},this.ticketHistoryTitle),this.errorMessage&&e("div",{key:"96d7bd606994bb7a9518c559a485aa475e082177",class:"lottery-hakuna-ticket-history__error-message"},this.renderInfoIcon(),e("span",{key:"8ab84918a1a4db13e9de321b223553cf1ad05fd4"},this.errorMessage)),e("lottery-infinite-scroll",{key:"0fb1e884533627ebf5b9563e2628d823f39f8ff7","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,translationUrl:this.translationUrl,language:this.language,hasMore:this.hasMore,items:[...this.visibleTickets],minItemWidth:this.minItemWidth,threshold:this.scrollThreshold,gridGap:10,isLoading:this.isLoading,isRefreshing:this.isRefreshing,onLoadMore:this.handleLoadMore,onRefresh:this.handleRefresh,renderItem:this.renderItem,renderSkeleton:this.showSkeleton?this.renderSkeleton:null,skeletonCount:this.limit},e("div",{key:"8091dce7a4322f4918b2087ebbf6813a1b5f3a6b",slot:"loading-more",class:"lottery-hakuna-ticket-history__loading-more"},e("span",{key:"44fdefc0599b3c52db7ae9b4e9e8b73193dc315c",class:"loading-spinner",innerHTML:dt})),e("div",{key:"657b6539e005df3dad4b478533e6724445394ce8",slot:"refresh-loading",class:"lottery-hakuna-ticket-history__refresh-loading"},this.listRefreshingText||ot("releaseToRefresh",this.language)),e("div",{key:"8b857eee10585f0fc31f26bf0a3ef2d0b28b16b6",slot:"end-message",class:"lottery-hakuna-ticket-history__end-message"},this.listEndText||ot("youHaveReachedTheEnd",this.language))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};lt.style=":host{display:block}.lottery-hakuna-ticket-history__container{padding:var(--lottery-hakuna-container-padding, 0);display:flex;flex-direction:var(--lottery-hakuna-container-flex-direction, column);align-items:var(--lottery-hakuna-container-align-items, center)}.lottery-hakuna-ticket-history__title{color:var(--lottery-hakuna-title-color, #000);font-size:var(--lottery-hakuna-title-font-size, 14px);font-style:var(--lottery-hakuna-title-font-style, normal);font-weight:var(--lottery-hakuna-title-font-weight, 700);line-height:var(--lottery-hakuna-title-line-height, normal);text-transform:var(--lottery-hakuna-title-text-transform, uppercase);margin-bottom:var(--lottery-hakuna-title-margin-bottom, 18px)}lottery-hakuna-ticket-history-item{width:var(--lottery-hakuna-ticket-history-item-width, 100%)}lottery-infinite-scroll{max-width:var(--lottery-hakuna-ticket-history-item-max-width, 100%);height:var(--lottery-hakuna-ticket-history-item-height, 500px)}.lottery-hakuna-ticket-history__end-message{width:var(--lottery-hakuna-end-message-width, 100%);text-align:var(--lottery-hakuna-end-message-text-align, center);font-size:var(--lottery-hakuna-end-message-font-size, 14px)}.lottery-hakuna-ticket-history__loading-more{width:var(--lottery-hakuna-loading-more-width, 100%);display:flex;align-items:center;justify-content:center;font-size:var(--lottery-hakuna-loading-more-font-size, 14px);gap:var(--lottery-hakuna-loading-spinner-text-gap, 8px);}.lottery-hakuna-ticket-history__loading-more .loading-spinner{animation:spin var(--lottery-hakuna-loading-spinner-animation-duration, 1s) linear infinite;color:var(--lottery-hakuna-loading-spinner-color, currentColor);}.lottery-hakuna-ticket-history__loading-more .loading-spinner svg{width:var(--lottery-hakuna-loading-spinner-size, 16px);height:var(--lottery-hakuna-loading-spinner-size, 16px)}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.lottery-hakuna-ticket-history__error-message{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:10px}.lottery-hakuna-ticket-history__error-message svg{width:20px;height:20px}";export{lt as L,r as a,i as b,ct as r,n as s}