@everymatrix/mini-games-hub 0.2.4 → 0.2.5

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 (44) hide show
  1. package/components/{GameCard-CYdVVTcL.js → GameCard-B3YKo9k6.js} +30 -30
  2. package/components/{GameCard-QmoS59XQ.js → GameCard-BQ6hFy67.js} +30 -30
  3. package/components/{GameCard-8BFvabU5.cjs → GameCard-C-zSlvo1.cjs} +3 -3
  4. package/components/GameCard-vgoswSWl.cjs +3 -0
  5. package/components/{MiniGamesHub-C9am57eJ.js → MiniGamesHub-C0q9vZFD.js} +287 -736
  6. package/components/MiniGamesHub-CfiDjCz7.cjs +16 -0
  7. package/components/{MiniGamesHub-DyGuSoR2.js → MiniGamesHub-D5Y5OYt-.js} +267 -756
  8. package/components/MiniGamesHub-DYwmUNTy.cjs +16 -0
  9. package/components/WheelOfFortune-2WKhJAdZ.cjs +617 -0
  10. package/components/{WheelOfFortune-RHE9xBAC.cjs → WheelOfFortune-BJ9iMr53.cjs} +1 -1
  11. package/components/{WheelOfFortune-kaN0fwVR.js → WheelOfFortune-DC57_QGF.js} +5 -5
  12. package/components/{WheelOfFortune-ZxcSVMfw.js → WheelOfFortune-u6v6YLc5.js} +5 -5
  13. package/components/WheelOfFortuneDrawResults-BKkTmsVC.cjs +1 -0
  14. package/components/{WheelOfFortuneDrawResults-N4gTWA1Q.js → WheelOfFortuneDrawResults-D3rgrYi_.js} +2 -2
  15. package/components/{WheelOfFortuneDrawResults-DWNjltAi.cjs → WheelOfFortuneDrawResults-DTufAeXD.cjs} +1 -1
  16. package/components/{WheelOfFortuneDrawResults-BkeJ179O.js → WheelOfFortuneDrawResults-gx2xkUtF.js} +2 -2
  17. package/components/WheelOfFortuneHistory-B-Yadw5p.js +213 -0
  18. package/components/{WheelOfFortuneHistory-ClStJRIB.cjs → WheelOfFortuneHistory-DdXxYW6M.cjs} +5 -6
  19. package/components/WheelOfFortuneHistory-DhFZUmGd.cjs +12 -0
  20. package/components/{WheelOfFortuneHistory-D1EcBSTP.js → WheelOfFortuneHistory-IM5H-der.js} +77 -78
  21. package/components/WheelOfFortuneRules-BM75DT61.js +107 -0
  22. package/components/WheelOfFortuneRules-D-xnWFIU.cjs +3 -0
  23. package/components/WheelOfFortuneRules-DkQOlpqR.js +118 -0
  24. package/components/WheelOfFortuneRules-_a2c-LEy.cjs +3 -0
  25. package/components/WheelOfFortuneWheel-CUs0nOjA.cjs +3 -0
  26. package/components/{WheelOfFortuneWheel-C7SxKPAD.cjs → WheelOfFortuneWheel-D9nXwM0H.cjs} +1 -1
  27. package/components/{WheelOfFortuneWheel-COOZH6--.js → WheelOfFortuneWheel-D_tfW-rK.js} +1 -1
  28. package/components/{WheelOfFortuneWheel-D8QRG4xb.js → WheelOfFortuneWheel-DmTRvIN6.js} +1 -1
  29. package/components/sparkles-DplvhrIm.cjs +1 -0
  30. package/components/spin-controller-HS3m99tB.cjs +1 -0
  31. package/components/{utils-wnIzjZal.js → utils-B86dsoC-.js} +22 -21
  32. package/components/{utils-d6rcfAwp.js → utils-BtFS7k_l.js} +22 -21
  33. package/components/utils-By_D2O28.cjs +3 -0
  34. package/components/{utils-BAUifQls.cjs → utils-CSIl6eA7.cjs} +1 -1
  35. package/es2015/mini-games-hub.cjs +1 -1
  36. package/es2015/mini-games-hub.js +1 -1
  37. package/esnext/mini-games-hub.cjs +1 -0
  38. package/esnext/mini-games-hub.js +1 -1
  39. package/package.json +12 -11
  40. package/components/MiniGamesHub-ym_blJPQ.cjs +0 -94
  41. package/components/WheelOfFortuneHistory-BuSnWEtS.js +0 -214
  42. package/components/WheelOfFortuneRules-C6rN9zFn.cjs +0 -5
  43. package/components/WheelOfFortuneRules-DmdPkzHe.js +0 -109
  44. package/components/WheelOfFortuneRules-L9sAOXJI.js +0 -120
@@ -26,11 +26,11 @@ var de = (l, r, o) => new Promise((I, S) => {
26
26
  }, c = (s) => s.done ? I(s.value) : Promise.resolve(s.value).then(E, a);
27
27
  c((o = o.apply(l, r)).next());
28
28
  });
29
- import { d as Ie, c as Ee, a as De, v as Xe, p as f, o as He, i as ge, g as Oe, W as Ze, m as _, j as R, u as Ue, n as fe, b as J, f as Q, s as Ve, e as Ke, q as qe, w as Je } from "./WheelOfFortuneWheel-D8QRG4xb.js";
30
- import { a5 as Ne, b0 as Qe, b1 as v, aQ as $e, ad as en, L as n, aJ as p, b3 as k, b6 as M, ar as N, a9 as nn, bb as Y, b4 as tn, aU as m, bk as rn, b9 as A, ba as C } from "./utils-d6rcfAwp.js";
31
- import { W as an } from "./WheelOfFortuneHistory-D1EcBSTP.js";
32
- import { W as on } from "./WheelOfFortuneDrawResults-BkeJ179O.js";
33
- import { W as sn } from "./WheelOfFortuneRules-L9sAOXJI.js";
29
+ import { d as Ie, c as Ee, a as De, v as Xe, p as f, o as He, i as ge, g as Oe, W as Ze, m as _, j as R, u as Ue, n as fe, b as J, f as Q, s as Ve, e as Ke, q as qe, w as Je } from "./WheelOfFortuneWheel-DmTRvIN6.js";
30
+ import { a5 as Ne, b0 as Qe, b1 as v, aQ as $e, ad as en, L as n, aJ as p, b3 as k, b6 as M, ar as N, a9 as nn, bb as Y, b4 as tn, aU as m, bk as rn, b9 as A, ba as C } from "./utils-BtFS7k_l.js";
31
+ import { W as an } from "./WheelOfFortuneHistory-IM5H-der.js";
32
+ import { W as on } from "./WheelOfFortuneDrawResults-gx2xkUtF.js";
33
+ import { W as sn } from "./WheelOfFortuneRules-DkQOlpqR.js";
34
34
  import { p as ln } from "./constants-BYsDpbRv.js";
35
35
  var pn = Q('<video autoplay="" loop="" playsinline=""><source type="video/mp4" class="svelte-17ly5gn"/></video>', 2), cn = Q("<button> </button>"), dn = Q('<div><!> <button><svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-17ly5gn"><path d="M6.41602 0.508789C6.52096 0.508793 6.59652 0.539241 6.66797 0.602539C6.7386 0.67644 6.76557 0.747068 6.76562 0.837891C6.76562 0.932337 6.7377 1.00571 6.66113 1.08203H6.66016L2.52344 5.21777L1.6543 6.08691H12.3633C12.475 6.08691 12.5456 6.11894 12.6084 6.18164C12.6712 6.24445 12.7034 6.31429 12.7031 6.4248C12.7029 6.53664 12.67 6.60779 12.6064 6.67188C12.5449 6.73387 12.4767 6.76611 12.3662 6.76562H1.6543L2.52344 7.63477L6.68066 11.791C6.75777 11.8681 6.77865 11.933 6.77637 12.0098C6.77383 12.0944 6.7457 12.1683 6.66797 12.249C6.58857 12.3195 6.50864 12.3512 6.40918 12.3545C6.33349 12.357 6.26929 12.3368 6.19238 12.2598L0.592773 6.66016C0.553631 6.62101 0.537222 6.59146 0.530273 6.57227C0.516661 6.53445 0.508264 6.48865 0.508789 6.43164C0.509411 6.36947 0.519283 6.31813 0.53418 6.27539C0.539753 6.25947 0.553255 6.23167 0.591797 6.19336L6.19238 0.592773C6.24602 0.539241 6.30834 0.508789 6.41602 0.508789Z" stroke="white" stroke-width="1.018" class="svelte-17ly5gn"></path></svg> <p class="svelte-17ly5gn"> </p></button> <div><h3 class="svelte-17ly5gn"> </h3> <p class="svelte-17ly5gn"> </p></div> <div></div> <div class="svelte-17ly5gn"><!></div> <!></div>');
36
36
  const gn = {
@@ -1,8 +1,8 @@
1
- import { d as Ce, c as Se, a as Pe, v as Te, p as l, o as We, i as re, g as je, W as Fe, m as x, j, u as Ge, n as ae, b as H, f as Z, s as Le, e as Re, q as Me, w as Ye } from "./WheelOfFortuneWheel-COOZH6--.js";
2
- import { a5 as Ie, b0 as Ee, b1 as h, aQ as De, ad as Xe, L as n, aJ as a, ar as O, a9 as He, bb as F, b6 as G, b3 as Oe, b5 as w, aU as p, bf as k, b9 as z, bk as Ze } from "./utils-wnIzjZal.js";
3
- import { W as Ue } from "./WheelOfFortuneHistory-BuSnWEtS.js";
4
- import { W as Ve } from "./WheelOfFortuneDrawResults-N4gTWA1Q.js";
5
- import { W as Ke } from "./WheelOfFortuneRules-DmdPkzHe.js";
1
+ import { d as Ce, c as Se, a as Pe, v as Te, p as l, o as We, i as re, g as je, W as Fe, m as x, j, u as Ge, n as ae, b as H, f as Z, s as Le, e as Re, q as Me, w as Ye } from "./WheelOfFortuneWheel-D_tfW-rK.js";
2
+ import { a5 as Ie, b0 as Ee, b1 as h, aQ as De, ad as Xe, L as n, aJ as a, ar as O, a9 as He, bb as F, b6 as G, b3 as Oe, b5 as w, aU as p, bf as k, b9 as z, bk as Ze } from "./utils-B86dsoC-.js";
3
+ import { W as Ue } from "./WheelOfFortuneHistory-B-Yadw5p.js";
4
+ import { W as Ve } from "./WheelOfFortuneDrawResults-D3rgrYi_.js";
5
+ import { W as Ke } from "./WheelOfFortuneRules-BM75DT61.js";
6
6
  import { p as qe } from "./constants-BYsDpbRv.js";
7
7
  var Je = Z('<video autoplay="" loop="" playsinline=""><source type="video/mp4" class="svelte-17ly5gn"/></video>', 2), Ne = Z("<button> </button>"), Qe = Z('<div><!> <button><svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-17ly5gn"><path d="M6.41602 0.508789C6.52096 0.508793 6.59652 0.539241 6.66797 0.602539C6.7386 0.67644 6.76557 0.747068 6.76562 0.837891C6.76562 0.932337 6.7377 1.00571 6.66113 1.08203H6.66016L2.52344 5.21777L1.6543 6.08691H12.3633C12.475 6.08691 12.5456 6.11894 12.6084 6.18164C12.6712 6.24445 12.7034 6.31429 12.7031 6.4248C12.7029 6.53664 12.67 6.60779 12.6064 6.67188C12.5449 6.73387 12.4767 6.76611 12.3662 6.76562H1.6543L2.52344 7.63477L6.68066 11.791C6.75777 11.8681 6.77865 11.933 6.77637 12.0098C6.77383 12.0944 6.7457 12.1683 6.66797 12.249C6.58857 12.3195 6.50864 12.3512 6.40918 12.3545C6.33349 12.357 6.26929 12.3368 6.19238 12.2598L0.592773 6.66016C0.553631 6.62101 0.537222 6.59146 0.530273 6.57227C0.516661 6.53445 0.508264 6.48865 0.508789 6.43164C0.509411 6.36947 0.519283 6.31813 0.53418 6.27539C0.539753 6.25947 0.553255 6.23167 0.591797 6.19336L6.19238 0.592773C6.24602 0.539241 6.30834 0.508789 6.41602 0.508789Z" stroke="white" stroke-width="1.018" class="svelte-17ly5gn"></path></svg> <p class="svelte-17ly5gn"> </p></button> <div><h3 class="svelte-17ly5gn"> </h3> <p class="svelte-17ly5gn"> </p></div> <div></div> <div class="svelte-17ly5gn"><!></div> <!></div>');
8
8
  const $e = {
@@ -0,0 +1 @@
1
+ "use strict";const t=require("./WheelOfFortuneWheel-CUs0nOjA.cjs"),e=require("./utils-By_D2O28.cjs"),ce=require("./error-YyYl7p6_.cjs"),de=require("./sparkles-DplvhrIm.cjs");var E=t.from_html('<span class="button-spinner"></span>'),_e=t.from_html('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'),L=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),pe=t.from_html('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'),ue=t.from_html('<h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>',1),me=t.from_html('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),ve=t.from_html('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');function U(J,w){e.push(w,!0);const r=()=>t.store_get(e.$format,"$_",H),[H,K]=t.setup_stores(),x=t.prop(w,"result",7),M=t.prop(w,"endpoint",7),F=t.prop(w,"session",7),P=t.prop(w,"liteMode",7,!1),T=t.prop(w,"onFetchRemainingTimes",7,()=>{}),D=e.user_derived(()=>x()?.success!==!0),A=e.user_derived(()=>x()?.type),O=e.user_derived(()=>e.get(A)==="noprize"),X=new Set(["loyalty"]),Y={bonus:r()("prizeBonus"),role:r()("prizeRole"),tournament:r()("prizeTournament"),ticket:r()("prizeTicket"),loyalty:r()("prizeLoyalty"),challenge:r()("prizeChallenge"),custom:r()("prizeCustom")},Z=[{t:"-0.7em",l:"5%",s:"0.45em",d:"680ms"},{t:"-0.5em",l:"22%",s:"0.28em",d:"760ms"},{t:"-0.9em",l:"40%",s:"0.38em",d:"820ms"},{t:"-0.6em",l:"58%",s:"0.3em",d:"740ms"},{t:"-0.8em",l:"76%",s:"0.42em",d:"900ms"},{t:"-0.4em",l:"92%",s:"0.25em",d:"860ms"},{t:"0.1em",l:"14%",s:"0.22em",d:"800ms"},{t:"0em",l:"72%",s:"0.2em",d:"950ms"}];let R=e.state(void 0),m=e.state("initial"),d=e.state(null);e.user_effect(()=>{e.get(R)&&e.get(m)==="claimSuccess"&&!P()&&de.burstSuccessConfetti(e.get(R))}),e.user_effect(()=>{(e.get(O)||e.get(D))&&e.untrack(()=>T()())});const q=s=>{const a=new URL(`${M()}/v1/wof/draw/${x().lotteryProgramID}`),i=new Headers;F()&&i.append("X-SessionId",F()),i.append("Content-Type","application/json");const c={action:s,guid:x().guid};return fetch(a,{method:"PUT",headers:i,body:JSON.stringify(c)}).then(o=>o.json())},B=async()=>{e.set(d,"claim");try{const s=await q(0),a=e.normalizeDrawResult(s,"draw"),i=a?.state==="fulfilled"&&a?.completed,c=a?.state==="drawn"&&!a?.completed;i?e.set(m,"claimSuccess"):e.set(m,"claimFailed")}catch(s){console.log(s),e.set(m,"claimFailed")}finally{e.set(d,null),T()()}},Q=async()=>{e.set(d,"reject"),e.set(m,"initial");const s=T();try{window.postMessage({type:"BackToWheel",skipFetch:!0},window.location.href),await q(2),s?.()}catch(a){console.log(a)}finally{e.set(d,null)}},V=()=>{window.postMessage({type:"BackToWheel"},window.location.href)},W=()=>{window.postMessage({type:"SpinAgain"},window.location.href)};var $={get result(){return x()},set result(s){x(s),e.flushSync()},get endpoint(){return M()},set endpoint(s){M(s),e.flushSync()},get session(){return F()},set session(s){F(s),e.flushSync()},get liteMode(){return P()},set liteMode(s=!1){P(s),e.flushSync()},get onFetchRemainingTimes(){return T()},set onFetchRemainingTimes(s=()=>{}){T(s),e.flushSync()}},C=ve(),G=e.child(C);t.bind_this(G,s=>e.set(R,s),()=>e.get(R));var I=e.sibling(G,2);{var ee=s=>{var a=_e(),i=e.child(a),c=e.only_child(i,!0),o=e.sibling(i,2);t.html(o,()=>r()("rejectWarningText"),!0),e.reset(o);var _=e.sibling(o,2),n=e.child(_),l=e.child(n);let p;var u=e.only_child(l,!0),g=e.sibling(l,2);{var h=y=>{var S=E();t.append(y,S)};t.if_block(g,y=>{e.get(d)==="claim"&&y(h)})}e.reset(n);var k=e.sibling(n,2),b=e.child(k);let j;var f=e.only_child(b,!0),v=e.sibling(b,2);{var z=y=>{var S=E();t.append(y,S)};t.if_block(v,y=>{e.get(d)==="reject"&&y(z)})}e.reset(k),e.reset(_),e.reset(a),e.template_effect((y,S,oe)=>{t.set_text(c,y),n.disabled=!!e.get(d),p=t.set_style(l,"",p,{opacity:e.get(d)==="claim"?0:1}),t.set_text(u,S),k.disabled=!!e.get(d),j=t.set_style(b,"",j,{opacity:e.get(d)==="reject"?0:1}),t.set_text(f,oe)},[()=>r()("areYouSure"),()=>r()("keepPrize"),()=>r()("rejectPrize")]),t.delegated("click",n,B),t.delegated("click",k,Q),t.append(s,a)};t.if_block(I,s=>{e.get(m)==="rejectModal"&&s(ee)})}var N=e.sibling(I,2),te=e.child(N);{var se=s=>{var a=L(),i=e.first_child(a),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,g,h)=>{t.set_text(c,u),t.set_text(_,g),t.set_text(p,h)},[()=>r()("prizeAssignedTitle"),()=>r()("prizeAssigned"),()=>r()("backToGame")]),t.delegated("click",l,V),t.append(s,a)},ae=s=>{var a=L(),i=e.first_child(a),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,g,h)=>{t.set_text(c,u),t.set_text(_,g),t.set_text(p,h)},[()=>r()("drawFailedTitle"),()=>r()("drawFailed"),()=>r()("backToGame")]),t.delegated("click",l,W),t.append(s,a)},re=s=>{var a=L(),i=e.first_child(a),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,g,h)=>{t.set_text(c,u),t.set_text(_,g),l.disabled=!!e.get(d),t.set_text(p,h)},[()=>r()("noPrizeTitle"),()=>r()("noPrize"),()=>r()("spinAgain")]),t.delegated("click",l,W),t.append(s,a)},ie=s=>{var a=ue(),i=e.first_child(a),c=e.child(i),o=e.sibling(c);t.each(o,17,()=>Z,t.index,(f,v)=>{var z=pe();e.template_effect(()=>t.set_style(z,`top:${e.get(v).t??""};left:${e.get(v).l??""};font-size:${e.get(v).s??""};animation-delay:${e.get(v).d??""}`)),t.append(f,z)}),e.reset(i);var _=e.sibling(i,2);t.html(_,()=>r()("success",{values:{prize:Y[e.get(A)],form:X.has(e.get(A))?"plural":"singular"}}),!0),e.reset(_);var n=e.sibling(_,2),l=e.child(n),p=e.child(l);let u;var g=e.only_child(p,!0),h=e.sibling(p,2);{var k=f=>{var v=E();t.append(f,v)};t.if_block(h,f=>{e.get(d)==="claim"&&f(k)})}e.reset(l);var b=e.sibling(l,2),j=e.only_child(b,!0);e.reset(n),e.template_effect((f,v,z)=>{t.set_text(c,`${f??""} `),l.disabled=!!e.get(d),u=t.set_style(p,"",u,{opacity:e.get(d)==="claim"?0:1}),t.set_text(g,v),b.disabled=!!e.get(d),t.set_text(j,z)},[()=>r()("congratulations"),()=>r()("claimReward"),()=>r()("reject")]),t.delegated("click",l,B),t.delegated("click",b,()=>e.set(m,"rejectModal")),t.append(s,a)},le=s=>{var a=me(),i=e.first_child(a),c=e.sibling(i,2),o=e.only_child(c,!0),_=e.sibling(c,2),n=e.child(_),l=e.only_child(n,!0);e.reset(_),e.template_effect((p,u)=>{t.set_attribute(i,"src",ce.Error),t.set_text(o,p),t.set_text(l,u)},[()=>r()("errorJSON"),()=>r()("backToGame")]),t.delegated("click",n,W),t.append(s,a)};t.if_block(te,s=>{e.get(m)==="claimSuccess"?s(se):e.get(m)==="claimFailed"?s(ae,1):e.get(O)?s(re,2):e.get(D)?s(le,-1):s(ie,3)})}e.reset(N),e.reset(C),t.append(J,C);var ne=e.pop($);return K(),ne}t.delegate(["click"]);t.create_custom_element(U,{result:{},endpoint:{},session:{},liteMode:{},onFetchRemainingTimes:{}},[],[],{mode:"open"});exports.WheelOfFortuneDrawResults=U;
@@ -1,5 +1,5 @@
1
- import { d as Re, c as Se, p as W, r as Fe, i as B, b as h, s as je, f as j, e as Me, t as ne, j as d, u as N, n as R, g as Pe, h as Ae, q as Ee } from "./WheelOfFortuneWheel-COOZH6--.js";
2
- import { a5 as Le, ad as oe, L as t, ae as Ce, a9 as We, b3 as Be, b1 as Y, bb as Z, aU as D, b6 as f, b5 as o, b9 as p, aJ as g, bf as v, ar as F, b2 as G, b8 as De } from "./utils-wnIzjZal.js";
1
+ import { d as Re, c as Se, p as W, r as Fe, i as B, b as h, s as je, f as j, e as Me, t as ne, j as d, u as N, n as R, g as Pe, h as Ae, q as Ee } from "./WheelOfFortuneWheel-D_tfW-rK.js";
2
+ import { a5 as Le, ad as oe, L as t, ae as Ce, a9 as We, b3 as Be, b1 as Y, bb as Z, aU as D, b6 as f, b5 as o, b9 as p, aJ as g, bf as v, ar as F, b2 as G, b8 as De } from "./utils-B86dsoC-.js";
3
3
  import { E as Ge } from "./error-DJgbe-Bh.js";
4
4
  import { a as Ue } from "./sparkles-CSfeD2Zu.js";
5
5
  var Q = j('<span class="button-spinner"></span>'), Ie = j('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'), V = j('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), Je = j('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'), Ne = j('<h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>', 1), Oe = j('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), qe = j('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');
@@ -1 +1 @@
1
- "use strict";var B=(C,x,a)=>new Promise((E,M)=>{var k=m=>{try{S(a.next(m))}catch(y){M(y)}},j=m=>{try{S(a.throw(m))}catch(y){M(y)}},S=m=>m.done?E(m.value):Promise.resolve(m.value).then(k,j);S((a=a.apply(C,x)).next())});const t=require("./WheelOfFortuneWheel-C7SxKPAD.cjs"),e=require("./utils-BAUifQls.cjs"),_e=require("./error-YyYl7p6_.cjs"),pe=require("./sparkles-BnriHiyw.cjs");var G=t.from_html('<span class="button-spinner"></span>'),ue=t.from_html('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'),I=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),ve=t.from_html('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'),me=t.from_html('<h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>',1),ge=t.from_html('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),he=t.from_html('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');function Q(C,x){e.push(x,!0);const a=()=>t.store_get(e.$format,"$_",E),[E,M]=t.setup_stores(),k=t.prop(x,"result",7),j=t.prop(x,"endpoint",7),S=t.prop(x,"session",7),m=t.prop(x,"liteMode",7,!1),y=t.prop(x,"onFetchRemainingTimes",7,()=>{}),N=e.user_derived(()=>{var s;return((s=k())==null?void 0:s.success)!==!0}),L=e.user_derived(()=>{var s;return(s=k())==null?void 0:s.type}),U=e.user_derived(()=>e.get(L)==="noprize"),V=new Set(["loyalty"]),D={bonus:a()("prizeBonus"),role:a()("prizeRole"),tournament:a()("prizeTournament"),ticket:a()("prizeTicket"),loyalty:a()("prizeLoyalty"),challenge:a()("prizeChallenge"),custom:a()("prizeCustom")},$=[{t:"-0.7em",l:"5%",s:"0.45em",d:"680ms"},{t:"-0.5em",l:"22%",s:"0.28em",d:"760ms"},{t:"-0.9em",l:"40%",s:"0.38em",d:"820ms"},{t:"-0.6em",l:"58%",s:"0.3em",d:"740ms"},{t:"-0.8em",l:"76%",s:"0.42em",d:"900ms"},{t:"-0.4em",l:"92%",s:"0.25em",d:"860ms"},{t:"0.1em",l:"14%",s:"0.22em",d:"800ms"},{t:"0em",l:"72%",s:"0.2em",d:"950ms"}];let P=e.state(void 0),h=e.state("initial"),d=e.state(null);e.user_effect(()=>{e.get(P)&&e.get(h)==="claimSuccess"&&!m()&&pe.burstSuccessConfetti(e.get(P))}),e.user_effect(()=>{(e.get(U)||e.get(N))&&e.untrack(()=>y()())});const J=s=>{const r=new URL(`${j()}/v1/wof/draw/${k().lotteryProgramID}`),i=new Headers;S()&&i.append("X-SessionId",S()),i.append("Content-Type","application/json");const c={action:s,guid:k().guid};return fetch(r,{method:"PUT",headers:i,body:JSON.stringify(c)}).then(o=>o.json())},H=()=>B(this,null,function*(){e.set(d,"claim");try{const s=yield J(0),r=e.normalizeDrawResult(s,"draw"),i=(r==null?void 0:r.state)==="fulfilled"&&(r==null?void 0:r.completed),c=(r==null?void 0:r.state)==="drawn"&&!(r!=null&&r.completed);i?e.set(h,"claimSuccess"):e.set(h,"claimFailed")}catch(s){console.log(s),e.set(h,"claimFailed")}finally{e.set(d,null),y()()}}),ee=()=>B(this,null,function*(){e.set(d,"reject"),e.set(h,"initial");const s=y();try{window.postMessage({type:"BackToWheel",skipFetch:!0},window.location.href),yield J(2),s==null||s()}catch(r){console.log(r)}finally{e.set(d,null)}}),te=()=>{window.postMessage({type:"BackToWheel"},window.location.href)},O=()=>{window.postMessage({type:"SpinAgain"},window.location.href)};var se={get result(){return k()},set result(s){k(s),e.flushSync()},get endpoint(){return j()},set endpoint(s){j(s),e.flushSync()},get session(){return S()},set session(s){S(s),e.flushSync()},get liteMode(){return m()},set liteMode(s=!1){m(s),e.flushSync()},get onFetchRemainingTimes(){return y()},set onFetchRemainingTimes(s=()=>{}){y(s),e.flushSync()}},q=he(),K=e.child(q);t.bind_this(K,s=>e.set(P,s),()=>e.get(P));var X=e.sibling(K,2);{var re=s=>{var r=ue(),i=e.child(r),c=e.only_child(i,!0),o=e.sibling(i,2);t.html(o,()=>a()("rejectWarningText"),!0),e.reset(o);var _=e.sibling(o,2),n=e.child(_),l=e.child(n);let p;var u=e.only_child(l,!0),b=e.sibling(l,2);{var w=v=>{var T=G();t.append(v,T)};t.if_block(b,v=>{e.get(d)==="claim"&&v(w)})}e.reset(n);var R=e.sibling(n,2),F=e.child(R);let A;var g=e.only_child(F,!0),f=e.sibling(F,2);{var z=v=>{var T=G();t.append(v,T)};t.if_block(f,v=>{e.get(d)==="reject"&&v(z)})}e.reset(R),e.reset(_),e.reset(r),e.template_effect((v,T,W)=>{t.set_text(c,v),n.disabled=!!e.get(d),p=t.set_style(l,"",p,{opacity:e.get(d)==="claim"?0:1}),t.set_text(u,T),R.disabled=!!e.get(d),A=t.set_style(F,"",A,{opacity:e.get(d)==="reject"?0:1}),t.set_text(g,W)},[()=>a()("areYouSure"),()=>a()("keepPrize"),()=>a()("rejectPrize")]),t.delegated("click",n,H),t.delegated("click",R,ee),t.append(s,r)};t.if_block(X,s=>{e.get(h)==="rejectModal"&&s(re)})}var Y=e.sibling(X,2),ae=e.child(Y);{var ie=s=>{var r=I(),i=e.first_child(r),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,b,w)=>{t.set_text(c,u),t.set_text(_,b),t.set_text(p,w)},[()=>a()("prizeAssignedTitle"),()=>a()("prizeAssigned"),()=>a()("backToGame")]),t.delegated("click",l,te),t.append(s,r)},le=s=>{var r=I(),i=e.first_child(r),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,b,w)=>{t.set_text(c,u),t.set_text(_,b),t.set_text(p,w)},[()=>a()("drawFailedTitle"),()=>a()("drawFailed"),()=>a()("backToGame")]),t.delegated("click",l,O),t.append(s,r)},ne=s=>{var r=I(),i=e.first_child(r),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,b,w)=>{t.set_text(c,u),t.set_text(_,b),l.disabled=!!e.get(d),t.set_text(p,w)},[()=>a()("noPrizeTitle"),()=>a()("noPrize"),()=>a()("spinAgain")]),t.delegated("click",l,O),t.append(s,r)},oe=s=>{var r=me(),i=e.first_child(r),c=e.child(i),o=e.sibling(c);t.each(o,17,()=>$,t.index,(g,f)=>{var z=ve();e.template_effect(()=>{var v,T,W,Z;return t.set_style(z,`top:${(v=e.get(f).t)!=null?v:""};left:${(T=e.get(f).l)!=null?T:""};font-size:${(W=e.get(f).s)!=null?W:""};animation-delay:${(Z=e.get(f).d)!=null?Z:""}`)}),t.append(g,z)}),e.reset(i);var _=e.sibling(i,2);t.html(_,()=>a()("success",{values:{prize:D[e.get(L)],form:V.has(e.get(L))?"plural":"singular"}}),!0),e.reset(_);var n=e.sibling(_,2),l=e.child(n),p=e.child(l);let u;var b=e.only_child(p,!0),w=e.sibling(p,2);{var R=g=>{var f=G();t.append(g,f)};t.if_block(w,g=>{e.get(d)==="claim"&&g(R)})}e.reset(l);var F=e.sibling(l,2),A=e.only_child(F,!0);e.reset(n),e.template_effect((g,f,z)=>{t.set_text(c,`${g!=null?g:""} `),l.disabled=!!e.get(d),u=t.set_style(p,"",u,{opacity:e.get(d)==="claim"?0:1}),t.set_text(b,f),F.disabled=!!e.get(d),t.set_text(A,z)},[()=>a()("congratulations"),()=>a()("claimReward"),()=>a()("reject")]),t.delegated("click",l,H),t.delegated("click",F,()=>e.set(h,"rejectModal")),t.append(s,r)},ce=s=>{var r=ge(),i=e.first_child(r),c=e.sibling(i,2),o=e.only_child(c,!0),_=e.sibling(c,2),n=e.child(_),l=e.only_child(n,!0);e.reset(_),e.template_effect((p,u)=>{t.set_attribute(i,"src",_e.Error),t.set_text(o,p),t.set_text(l,u)},[()=>a()("errorJSON"),()=>a()("backToGame")]),t.delegated("click",n,O),t.append(s,r)};t.if_block(ae,s=>{e.get(h)==="claimSuccess"?s(ie):e.get(h)==="claimFailed"?s(le,1):e.get(U)?s(ne,2):e.get(N)?s(ce,-1):s(oe,3)})}e.reset(Y),e.reset(q),t.append(C,q);var de=e.pop(se);return M(),de}t.delegate(["click"]);t.create_custom_element(Q,{result:{},endpoint:{},session:{},liteMode:{},onFetchRemainingTimes:{}},[],[],{mode:"open"});exports.WheelOfFortuneDrawResults=Q;
1
+ "use strict";var B=(C,x,a)=>new Promise((E,M)=>{var k=m=>{try{S(a.next(m))}catch(y){M(y)}},j=m=>{try{S(a.throw(m))}catch(y){M(y)}},S=m=>m.done?E(m.value):Promise.resolve(m.value).then(k,j);S((a=a.apply(C,x)).next())});const t=require("./WheelOfFortuneWheel-D9nXwM0H.cjs"),e=require("./utils-CSIl6eA7.cjs"),_e=require("./error-YyYl7p6_.cjs"),pe=require("./sparkles-BnriHiyw.cjs");var G=t.from_html('<span class="button-spinner"></span>'),ue=t.from_html('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'),I=t.from_html('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),ve=t.from_html('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'),me=t.from_html('<h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>',1),ge=t.from_html('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>',1),he=t.from_html('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');function Q(C,x){e.push(x,!0);const a=()=>t.store_get(e.$format,"$_",E),[E,M]=t.setup_stores(),k=t.prop(x,"result",7),j=t.prop(x,"endpoint",7),S=t.prop(x,"session",7),m=t.prop(x,"liteMode",7,!1),y=t.prop(x,"onFetchRemainingTimes",7,()=>{}),N=e.user_derived(()=>{var s;return((s=k())==null?void 0:s.success)!==!0}),L=e.user_derived(()=>{var s;return(s=k())==null?void 0:s.type}),U=e.user_derived(()=>e.get(L)==="noprize"),V=new Set(["loyalty"]),D={bonus:a()("prizeBonus"),role:a()("prizeRole"),tournament:a()("prizeTournament"),ticket:a()("prizeTicket"),loyalty:a()("prizeLoyalty"),challenge:a()("prizeChallenge"),custom:a()("prizeCustom")},$=[{t:"-0.7em",l:"5%",s:"0.45em",d:"680ms"},{t:"-0.5em",l:"22%",s:"0.28em",d:"760ms"},{t:"-0.9em",l:"40%",s:"0.38em",d:"820ms"},{t:"-0.6em",l:"58%",s:"0.3em",d:"740ms"},{t:"-0.8em",l:"76%",s:"0.42em",d:"900ms"},{t:"-0.4em",l:"92%",s:"0.25em",d:"860ms"},{t:"0.1em",l:"14%",s:"0.22em",d:"800ms"},{t:"0em",l:"72%",s:"0.2em",d:"950ms"}];let P=e.state(void 0),h=e.state("initial"),d=e.state(null);e.user_effect(()=>{e.get(P)&&e.get(h)==="claimSuccess"&&!m()&&pe.burstSuccessConfetti(e.get(P))}),e.user_effect(()=>{(e.get(U)||e.get(N))&&e.untrack(()=>y()())});const J=s=>{const r=new URL(`${j()}/v1/wof/draw/${k().lotteryProgramID}`),i=new Headers;S()&&i.append("X-SessionId",S()),i.append("Content-Type","application/json");const c={action:s,guid:k().guid};return fetch(r,{method:"PUT",headers:i,body:JSON.stringify(c)}).then(o=>o.json())},H=()=>B(this,null,function*(){e.set(d,"claim");try{const s=yield J(0),r=e.normalizeDrawResult(s,"draw"),i=(r==null?void 0:r.state)==="fulfilled"&&(r==null?void 0:r.completed),c=(r==null?void 0:r.state)==="drawn"&&!(r!=null&&r.completed);i?e.set(h,"claimSuccess"):e.set(h,"claimFailed")}catch(s){console.log(s),e.set(h,"claimFailed")}finally{e.set(d,null),y()()}}),ee=()=>B(this,null,function*(){e.set(d,"reject"),e.set(h,"initial");const s=y();try{window.postMessage({type:"BackToWheel",skipFetch:!0},window.location.href),yield J(2),s==null||s()}catch(r){console.log(r)}finally{e.set(d,null)}}),te=()=>{window.postMessage({type:"BackToWheel"},window.location.href)},O=()=>{window.postMessage({type:"SpinAgain"},window.location.href)};var se={get result(){return k()},set result(s){k(s),e.flushSync()},get endpoint(){return j()},set endpoint(s){j(s),e.flushSync()},get session(){return S()},set session(s){S(s),e.flushSync()},get liteMode(){return m()},set liteMode(s=!1){m(s),e.flushSync()},get onFetchRemainingTimes(){return y()},set onFetchRemainingTimes(s=()=>{}){y(s),e.flushSync()}},q=he(),K=e.child(q);t.bind_this(K,s=>e.set(P,s),()=>e.get(P));var X=e.sibling(K,2);{var re=s=>{var r=ue(),i=e.child(r),c=e.only_child(i,!0),o=e.sibling(i,2);t.html(o,()=>a()("rejectWarningText"),!0),e.reset(o);var _=e.sibling(o,2),n=e.child(_),l=e.child(n);let p;var u=e.only_child(l,!0),b=e.sibling(l,2);{var w=v=>{var T=G();t.append(v,T)};t.if_block(b,v=>{e.get(d)==="claim"&&v(w)})}e.reset(n);var R=e.sibling(n,2),F=e.child(R);let A;var g=e.only_child(F,!0),f=e.sibling(F,2);{var z=v=>{var T=G();t.append(v,T)};t.if_block(f,v=>{e.get(d)==="reject"&&v(z)})}e.reset(R),e.reset(_),e.reset(r),e.template_effect((v,T,W)=>{t.set_text(c,v),n.disabled=!!e.get(d),p=t.set_style(l,"",p,{opacity:e.get(d)==="claim"?0:1}),t.set_text(u,T),R.disabled=!!e.get(d),A=t.set_style(F,"",A,{opacity:e.get(d)==="reject"?0:1}),t.set_text(g,W)},[()=>a()("areYouSure"),()=>a()("keepPrize"),()=>a()("rejectPrize")]),t.delegated("click",n,H),t.delegated("click",R,ee),t.append(s,r)};t.if_block(X,s=>{e.get(h)==="rejectModal"&&s(re)})}var Y=e.sibling(X,2),ae=e.child(Y);{var ie=s=>{var r=I(),i=e.first_child(r),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,b,w)=>{t.set_text(c,u),t.set_text(_,b),t.set_text(p,w)},[()=>a()("prizeAssignedTitle"),()=>a()("prizeAssigned"),()=>a()("backToGame")]),t.delegated("click",l,te),t.append(s,r)},le=s=>{var r=I(),i=e.first_child(r),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,b,w)=>{t.set_text(c,u),t.set_text(_,b),t.set_text(p,w)},[()=>a()("drawFailedTitle"),()=>a()("drawFailed"),()=>a()("backToGame")]),t.delegated("click",l,O),t.append(s,r)},ne=s=>{var r=I(),i=e.first_child(r),c=e.only_child(i,!0),o=e.sibling(i,2),_=e.only_child(o,!0),n=e.sibling(o,2),l=e.child(n),p=e.only_child(l,!0);e.reset(n),e.template_effect((u,b,w)=>{t.set_text(c,u),t.set_text(_,b),l.disabled=!!e.get(d),t.set_text(p,w)},[()=>a()("noPrizeTitle"),()=>a()("noPrize"),()=>a()("spinAgain")]),t.delegated("click",l,O),t.append(s,r)},oe=s=>{var r=me(),i=e.first_child(r),c=e.child(i),o=e.sibling(c);t.each(o,17,()=>$,t.index,(g,f)=>{var z=ve();e.template_effect(()=>{var v,T,W,Z;return t.set_style(z,`top:${(v=e.get(f).t)!=null?v:""};left:${(T=e.get(f).l)!=null?T:""};font-size:${(W=e.get(f).s)!=null?W:""};animation-delay:${(Z=e.get(f).d)!=null?Z:""}`)}),t.append(g,z)}),e.reset(i);var _=e.sibling(i,2);t.html(_,()=>a()("success",{values:{prize:D[e.get(L)],form:V.has(e.get(L))?"plural":"singular"}}),!0),e.reset(_);var n=e.sibling(_,2),l=e.child(n),p=e.child(l);let u;var b=e.only_child(p,!0),w=e.sibling(p,2);{var R=g=>{var f=G();t.append(g,f)};t.if_block(w,g=>{e.get(d)==="claim"&&g(R)})}e.reset(l);var F=e.sibling(l,2),A=e.only_child(F,!0);e.reset(n),e.template_effect((g,f,z)=>{t.set_text(c,`${g!=null?g:""} `),l.disabled=!!e.get(d),u=t.set_style(p,"",u,{opacity:e.get(d)==="claim"?0:1}),t.set_text(b,f),F.disabled=!!e.get(d),t.set_text(A,z)},[()=>a()("congratulations"),()=>a()("claimReward"),()=>a()("reject")]),t.delegated("click",l,H),t.delegated("click",F,()=>e.set(h,"rejectModal")),t.append(s,r)},ce=s=>{var r=ge(),i=e.first_child(r),c=e.sibling(i,2),o=e.only_child(c,!0),_=e.sibling(c,2),n=e.child(_),l=e.only_child(n,!0);e.reset(_),e.template_effect((p,u)=>{t.set_attribute(i,"src",_e.Error),t.set_text(o,p),t.set_text(l,u)},[()=>a()("errorJSON"),()=>a()("backToGame")]),t.delegated("click",n,O),t.append(s,r)};t.if_block(ae,s=>{e.get(h)==="claimSuccess"?s(ie):e.get(h)==="claimFailed"?s(le,1):e.get(U)?s(ne,2):e.get(N)?s(ce,-1):s(oe,3)})}e.reset(Y),e.reset(q),t.append(C,q);var de=e.pop(se);return M(),de}t.delegate(["click"]);t.create_custom_element(Q,{result:{},endpoint:{},session:{},liteMode:{},onFetchRemainingTimes:{}},[],[],{mode:"open"});exports.WheelOfFortuneDrawResults=Q;
@@ -14,8 +14,8 @@ var $ = (Y, R, a) => new Promise((Z, O) => {
14
14
  }, M = (g) => g.done ? Z(g.value) : Promise.resolve(g.value).then(j, G);
15
15
  M((a = a.apply(Y, R)).next());
16
16
  });
17
- import { d as Re, c as je, p as U, r as Me, i as I, b as y, s as Pe, f as C, e as Ae, t as ue, j as d, u as X, n as A, g as Ee, h as Le, q as Ce } from "./WheelOfFortuneWheel-D8QRG4xb.js";
18
- import { a5 as We, ad as pe, L as s, ae as Be, a9 as Ge, b4 as Ue, b1 as ee, bb as te, b3 as o, b6 as f, aU as J, aJ as k, b9 as v, ba as m, ar as L, b2 as N, b8 as Ie } from "./utils-d6rcfAwp.js";
17
+ import { d as Re, c as je, p as U, r as Me, i as I, b as y, s as Pe, f as C, e as Ae, t as ue, j as d, u as X, n as A, g as Ee, h as Le, q as Ce } from "./WheelOfFortuneWheel-DmTRvIN6.js";
18
+ import { a5 as We, ad as pe, L as s, ae as Be, a9 as Ge, b4 as Ue, b1 as ee, bb as te, b3 as o, b6 as f, aU as J, aJ as k, b9 as v, ba as m, ar as L, b2 as N, b8 as Ie } from "./utils-BtFS7k_l.js";
19
19
  import { E as Je } from "./error-DJgbe-Bh.js";
20
20
  import { a as Ne } from "./sparkles-CTrQ372y.js";
21
21
  var ae = C('<span class="button-spinner"></span>'), Oe = C('<div class="confirm-modal-content"><p class="confirm-modal-title"> </p> <p class="confirm-modal-body"></p> <div class="confirm-modal-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"><span> </span> <!></button></div></div>'), se = C('<h2 class="draw-result-title"> </h2> <p class="draw-result-description"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), qe = C('<span class="draw-result-sparkle" aria-hidden="true">✦</span>'), He = C('<h2 class="draw-result-title"> <!></h2> <p class="draw-result-description"></p> <div class="draw-result-actions"><button class="primary-cta"><span> </span> <!></button> <button class="secondary-cta"> </button></div>', 1), Ke = C('<img alt="Error" class="draw-result-error-image"/> <p class="draw-result-description draw-result-description--error"> </p> <div class="draw-result-actions"><button class="secondary-cta"> </button></div>', 1), Xe = C('<div class="draw-result-panel"><div class="draw-result-confetti-layer"></div> <!> <div class="draw-result-stack"><!></div></div>');
@@ -0,0 +1,213 @@
1
+ import { d as Aa, c as Fa, a as Za, p as oa, o as Da, i as R, b as l, s as Ga, f as b, e as Ua, g as la, h as ia, j as n, k as ga, l as _a, m as qa, n as na, q as fa } from "./WheelOfFortuneWheel-D_tfW-rK.js";
2
+ import { b1 as X, aQ as Ja, a9 as Oa, aU as pa, a5 as Qa, b3 as Xa, b6 as k, L as a, b9 as m, aJ as j, b8 as Ka, b2 as K, b5 as s, bf as p, ar as B, bh as ua, bb as va } from "./utils-B86dsoC-.js";
3
+ var Na = b('<div class="lucky-wheel-history-item skeleton-row svelte-4la0az"></div>'), Va = b('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>', 1), ha = _a('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'), xa = _a('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'), Ya = b('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'), $a = b('<span class="pagination-ellipsis svelte-4la0az">&hellip;</span>'), ae = b("<button> </button>"), ee = b('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">&#8249;</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">&#8250;</button></div>'), te = b('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>', 1), se = b('<h2 class="no-history svelte-4la0az"> </h2>'), re = b('<div class="history-list svelte-4la0az"><!></div>');
4
+ const oe = {
5
+ hash: "svelte-4la0az",
6
+ code: ` *,
7
+ *::before,
8
+ *::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;} .history-list {display:flex;flex-direction:column;gap:6px;width:90%;margin:0 auto;} .history-grid {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;} .date-time-cell {display:flex;flex-direction:column;gap:2px;} .date-time-cell span:last-child {opacity:0.6;font-size:10px;} .lucky-wheel-history-item {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;} .lucky-wheel-history-header {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;} .history-icon {display:flex;align-items:center;justify-content:center;} .no-history {width:100%;font-size:14px;font-weight:400;margin-top:12px;} .lucky-wheel-pagination {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;} .pagination-pages {display:flex;align-items:center;gap:4px;} .pagination-ellipsis {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;} .pagination-button {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;} .pagination-button:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));} .pagination-button:disabled {opacity:0.4;cursor:not-allowed;} .pagination-page {min-width:32px;text-align:center;padding:6px 8px;} .pagination-nav {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;} .pagination-page.active {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
9
+ @keyframes svelte-4la0az-skeleton-pulse {
10
+ 0%, 100% {
11
+ opacity: 0.3;
12
+ }
13
+ 50% {
14
+ opacity: 0.6;
15
+ }
16
+ } .skeleton-row {pointer-events:none;
17
+ animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;height:40px;}`
18
+ };
19
+ function le(ca, A) {
20
+ Qa(A, !0), Za(ca, oe);
21
+ const t = () => Ga(Xa, "$_", ma), [ma, ba] = Ua(), N = oa(A, "programId", 7), V = oa(A, "endpoint", 7), F = oa(A, "session", 7);
22
+ let Y = X(!0), f = X(Ja([])), ya = X(!1);
23
+ const H = 10;
24
+ let d = X(1);
25
+ const Z = va(() => a(f) && a(f).length > 0 ? Math.ceil(a(f).length / H) : 1), za = va(() => a(f) && a(f).length > 0 ? a(f).slice((a(d) - 1) * H, a(d) * H) : []), wa = {
26
+ bonus: t()("prizeBonus"),
27
+ role: t()("prizeRole"),
28
+ tournament: t()("prizeTournament"),
29
+ ticket: t()("prizeTicket"),
30
+ loyalty: t()("prizeLoyalty"),
31
+ challenge: t()("prizeChallenge"),
32
+ noprize: t()("noWin"),
33
+ custom: t()("prizeCustom")
34
+ }, Ca = va(() => {
35
+ const e = a(Z);
36
+ if (e <= 5)
37
+ return Array.from({ length: e }, (i, u) => u + 1);
38
+ const r = [], g = a(d);
39
+ r.push(1), g > 3 && r.push("...");
40
+ const c = Math.max(2, g - 1), L = Math.min(e - 1, g + 1);
41
+ for (let i = c; i <= L; i++)
42
+ r.push(i);
43
+ return g < e - 2 && r.push("..."), e > 1 && r.push(e), r;
44
+ }), $ = (e) => {
45
+ e < 1 || e > a(Z) || (j(d, e, !0), window.scrollTo({ top: 0, behavior: "smooth" }));
46
+ }, ka = () => {
47
+ j(Y, !0);
48
+ const e = new URL(`${V()}/v1/wof/outcome/${N()}`), r = new Headers();
49
+ F() && r.append("X-SessionId", F()), fetch(e, { method: "GET", headers: r, cache: "no-store" }).then((c) => c.json()).then((c) => {
50
+ j(f, c?.items.map((L) => Ka(L, "history")), !0), j(d, 1);
51
+ }).catch((c) => {
52
+ console.log(c), j(ya, !0);
53
+ }).finally(() => j(Y, !1));
54
+ };
55
+ Da(() => {
56
+ ka();
57
+ });
58
+ var La = {
59
+ get programId() {
60
+ return N();
61
+ },
62
+ set programId(e) {
63
+ N(e), pa();
64
+ },
65
+ get endpoint() {
66
+ return V();
67
+ },
68
+ set endpoint(e) {
69
+ V(e), pa();
70
+ },
71
+ get session() {
72
+ return F();
73
+ },
74
+ set session(e) {
75
+ F(e), pa();
76
+ }
77
+ }, aa = re(), Ia = k(aa);
78
+ {
79
+ var Ma = (e) => {
80
+ var r = Va(), g = K(r), c = s(k(g), 2), L = p(c, !0), i = s(c, 2), u = p(i, !0), y = s(i, 2), M = p(y, !0), ea = s(y, 2), D = p(ea, !0);
81
+ m(g);
82
+ var ta = s(g, 2);
83
+ la(ta, 17, () => Array(H), ia, (E, G, U, q) => {
84
+ var J = Na();
85
+ l(E, J);
86
+ }), B(
87
+ (E, G, U, q) => {
88
+ n(L, E), n(u, G), n(M, U), n(D, q);
89
+ },
90
+ [
91
+ () => t()("name"),
92
+ () => t()("date"),
93
+ () => t()("spin"),
94
+ () => t()("assigned")
95
+ ]
96
+ ), l(e, r);
97
+ }, Ea = (e) => {
98
+ var r = ga(), g = K(r);
99
+ {
100
+ var c = (i) => {
101
+ var u = te(), y = K(u), M = s(k(y), 2), ea = p(M, !0), D = s(M, 2), ta = p(D, !0), E = s(D, 2), G = p(E, !0), U = s(E, 2), q = p(U, !0);
102
+ m(y);
103
+ var J = s(y, 2);
104
+ la(J, 17, () => a(za), ia, (I, v, z) => {
105
+ var h = Ya(), T = k(h), S = p(T), x = s(T, 2), O = p(x, !0), W = s(x, 2), Q = k(W), sa = p(Q, !0), w = s(Q, 2), C = p(w, !0);
106
+ m(W);
107
+ var P = s(W, 2), ra = k(P);
108
+ {
109
+ var ja = (o) => {
110
+ var _ = ha();
111
+ l(o, _);
112
+ }, Ba = (o) => {
113
+ var _ = xa();
114
+ l(o, _);
115
+ };
116
+ R(ra, (o) => {
117
+ a(v).state === "drawn" || a(v).state === "fulfilled" ? o(ja) : o(Ba, -1);
118
+ });
119
+ }
120
+ m(P);
121
+ var da = s(P, 2), Ha = k(da);
122
+ {
123
+ var Sa = (o) => {
124
+ var _ = ha();
125
+ l(o, _);
126
+ }, Wa = (o) => {
127
+ var _ = xa();
128
+ l(o, _);
129
+ };
130
+ R(Ha, (o) => {
131
+ a(v).completed && a(v).state === "fulfilled" ? o(Sa) : o(Wa, -1);
132
+ });
133
+ }
134
+ m(da), m(h), B(
135
+ (o, _) => {
136
+ n(S, `${(a(d) - 1) * H + z + 1}.`), n(O, wa[a(v).type] || "-"), n(sa, o), n(C, _);
137
+ },
138
+ [
139
+ () => ua(a(v).time).date,
140
+ () => ua(a(v).time).time
141
+ ]
142
+ ), l(I, h);
143
+ });
144
+ var Pa = s(J, 2);
145
+ {
146
+ var Ra = (I) => {
147
+ var v = ee(), z = k(v), h = s(z, 2);
148
+ la(h, 21, () => a(Ca), ia, (S, x) => {
149
+ var O = ga(), W = K(O);
150
+ {
151
+ var Q = (w) => {
152
+ var C = $a();
153
+ l(w, C);
154
+ }, sa = (w) => {
155
+ var C = ae();
156
+ let P;
157
+ var ra = p(C, !0);
158
+ B(() => {
159
+ P = qa(C, 1, "pagination-button pagination-page svelte-4la0az", null, P, { active: a(d) === a(x) }), n(ra, a(x));
160
+ }), na("click", C, () => $(a(x))), l(w, C);
161
+ };
162
+ R(W, (w) => {
163
+ a(x) === "..." ? w(Q) : w(sa, -1);
164
+ });
165
+ }
166
+ l(S, O);
167
+ }), m(h);
168
+ var T = s(h, 2);
169
+ m(v), B(
170
+ (S, x) => {
171
+ z.disabled = a(d) === 1, fa(z, "aria-label", S), T.disabled = a(d) === a(Z), fa(T, "aria-label", x);
172
+ },
173
+ [() => t()("previous"), () => t()("next")]
174
+ ), na("click", z, () => $(a(d) - 1)), na("click", T, () => $(a(d) + 1)), l(I, v);
175
+ };
176
+ R(Pa, (I) => {
177
+ a(Z) > 1 && I(Ra);
178
+ });
179
+ }
180
+ B(
181
+ (I, v, z, h) => {
182
+ n(ea, I), n(ta, v), n(G, z), n(q, h);
183
+ },
184
+ [
185
+ () => t()("name"),
186
+ () => t()("date"),
187
+ () => t()("spin"),
188
+ () => t()("assigned")
189
+ ]
190
+ ), l(i, u);
191
+ }, L = (i) => {
192
+ var u = se(), y = p(u, !0);
193
+ B((M) => n(y, M), [() => t()("noHistory")]), l(i, u);
194
+ };
195
+ R(g, (i) => {
196
+ a(f) && a(f).length > 0 ? i(c) : i(L, -1);
197
+ });
198
+ }
199
+ l(e, r);
200
+ };
201
+ R(Ia, (e) => {
202
+ a(Y) ? e(Ma) : e(Ea, -1);
203
+ });
204
+ }
205
+ m(aa), l(ca, aa);
206
+ var Ta = Oa(La);
207
+ return ba(), Ta;
208
+ }
209
+ Aa(["click"]);
210
+ Fa(le, { programId: {}, endpoint: {}, session: {} }, [], [], { mode: "open" });
211
+ export {
212
+ le as W
213
+ };
@@ -1,7 +1,6 @@
1
- "use strict";const t=require("./WheelOfFortuneWheel-C7SxKPAD.cjs"),e=require("./utils-BAUifQls.cjs");var me=t.from_html('<div class="lucky-wheel-history-item skeleton-row svelte-4la0az"></div>'),xe=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>',1),Q=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'),V=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'),ye=t.from_html('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'),ze=t.from_html('<span class="pagination-ellipsis svelte-4la0az">&hellip;</span>'),be=t.from_html("<button> </button>"),we=t.from_html('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">&#8249;</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">&#8250;</button></div>'),Ce=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>',1),ke=t.from_html('<h2 class="no-history svelte-4la0az"> </h2>'),Le=t.from_html('<div class="history-list svelte-4la0az"><!></div>');const Ie={hash:"svelte-4la0az",code:`.svelte-4la0az,
2
- .svelte-4la0az::before,
3
- .svelte-4la0az::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.history-list.svelte-4la0az {display:flex;flex-direction:column;gap:6px;width:90%;margin:0 auto;}.history-grid.svelte-4la0az {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;}.date-time-cell.svelte-4la0az {display:flex;flex-direction:column;gap:2px;}.date-time-cell.svelte-4la0az span:where(.svelte-4la0az):last-child {opacity:0.6;font-size:10px;}.lucky-wheel-history-item.svelte-4la0az {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;}.lucky-wheel-history-header.svelte-4la0az {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;}.history-icon.svelte-4la0az {display:flex;align-items:center;justify-content:center;}.no-history.svelte-4la0az {width:100%;font-size:14px;font-weight:400;margin-top:12px;}.lucky-wheel-pagination.svelte-4la0az {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;}.pagination-pages.svelte-4la0az {display:flex;align-items:center;gap:4px;}.pagination-ellipsis.svelte-4la0az {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;}.pagination-button.svelte-4la0az {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;}.pagination-button.svelte-4la0az:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));}.pagination-button.svelte-4la0az:disabled {opacity:0.4;cursor:not-allowed;}.pagination-page.svelte-4la0az {min-width:32px;text-align:center;padding:6px 8px;}.pagination-nav.svelte-4la0az {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;}.pagination-page.active.svelte-4la0az {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
4
-
1
+ "use strict";const t=require("./WheelOfFortuneWheel-D9nXwM0H.cjs"),e=require("./utils-CSIl6eA7.cjs");var me=t.from_html('<div class="lucky-wheel-history-item skeleton-row svelte-4la0az"></div>'),xe=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>',1),Q=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'),V=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'),ye=t.from_html('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'),be=t.from_html('<span class="pagination-ellipsis svelte-4la0az">&hellip;</span>'),ze=t.from_html("<button> </button>"),we=t.from_html('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">&#8249;</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">&#8250;</button></div>'),Ce=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>',1),ke=t.from_html('<h2 class="no-history svelte-4la0az"> </h2>'),Le=t.from_html('<div class="history-list svelte-4la0az"><!></div>');const Ie={hash:"svelte-4la0az",code:` *,
2
+ *::before,
3
+ *::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;} .history-list {display:flex;flex-direction:column;gap:6px;width:90%;margin:0 auto;} .history-grid {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;} .date-time-cell {display:flex;flex-direction:column;gap:2px;} .date-time-cell span:last-child {opacity:0.6;font-size:10px;} .lucky-wheel-history-item {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;} .lucky-wheel-history-header {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;} .history-icon {display:flex;align-items:center;justify-content:center;} .no-history {width:100%;font-size:14px;font-weight:400;margin-top:12px;} .lucky-wheel-pagination {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;} .pagination-pages {display:flex;align-items:center;gap:4px;} .pagination-ellipsis {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;} .pagination-button {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;} .pagination-button:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));} .pagination-button:disabled {opacity:0.4;cursor:not-allowed;} .pagination-page {min-width:32px;text-align:center;padding:6px 8px;} .pagination-nav {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;} .pagination-page.active {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
5
4
  @keyframes svelte-4la0az-skeleton-pulse {
6
5
  0%, 100% {
7
6
  opacity: 0.3;
@@ -9,5 +8,5 @@
9
8
  50% {
10
9
  opacity: 0.6;
11
10
  }
12
- }.skeleton-row.svelte-4la0az {pointer-events:none;
13
- animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;height:40px;}`};function Y(K,T){e.push(T,!0),t.append_styles(K,Ie);const l=()=>t.store_get(e.$format,"$_",$),[$,ee]=t.setup_stores(),A=t.prop(T,"programId",7),D=t.prop(T,"endpoint",7),E=t.prop(T,"session",7);let O=e.state(!0),c=e.state(e.proxy([])),te=e.state(!1);const L=10;let p=e.state(1);const F=e.user_derived(()=>e.get(c)&&e.get(c).length>0?Math.ceil(e.get(c).length/L):1),ae=e.user_derived(()=>e.get(c)&&e.get(c).length>0?e.get(c).slice((e.get(p)-1)*L,e.get(p)*L):[]),le={bonus:l()("prizeBonus"),role:l()("prizeRole"),tournament:l()("prizeTournament"),ticket:l()("prizeTicket"),loyalty:l()("prizeLoyalty"),challenge:l()("prizeChallenge"),noprize:l()("noWin"),custom:l()("prizeCustom")},se=e.user_derived(()=>{const a=e.get(F);if(a<=5)return Array.from({length:a},(o,d)=>d+1);const s=[],v=e.get(p);s.push(1),v>3&&s.push("...");const r=Math.max(2,v-1),y=Math.min(a-1,v+1);for(let o=r;o<=y;o++)s.push(o);return v<a-2&&s.push("..."),a>1&&s.push(a),s}),Z=a=>{a<1||a>e.get(F)||(e.set(p,a,!0),window.scrollTo({top:0,behavior:"smooth"}))},ie=()=>{e.set(O,!0);const a=new URL(`${D()}/v1/wof/outcome/${A()}`),s=new Headers;E()&&s.append("X-SessionId",E()),fetch(a,{method:"GET",headers:s,cache:"no-store"}).then(r=>r.json()).then(r=>{e.set(c,r==null?void 0:r.items.map(y=>e.normalizeDrawResult(y,"history")),!0),e.set(p,1)}).catch(r=>{console.log(r),e.set(te,!0)}).finally(()=>e.set(O,!1))};t.onMount(()=>{ie()});var re={get programId(){return A()},set programId(a){A(a),e.flushSync()},get endpoint(){return D()},set endpoint(a){D(a),e.flushSync()},get session(){return E()},set session(a){E(a),e.flushSync()}},q=Le(),oe=e.child(q);{var ne=a=>{var s=xe(),v=e.first_child(s),r=e.sibling(e.child(v),2),y=e.only_child(r,!0),o=e.sibling(r,2),d=e.only_child(o,!0),_=e.sibling(o,2),b=e.only_child(_,!0),G=e.sibling(_,2),H=e.only_child(G,!0);e.reset(v);var U=e.sibling(v,2);t.each(U,17,()=>Array(L),t.index,(w,S,W,P)=>{var R=me();t.append(w,R)}),e.template_effect((w,S,W,P)=>{t.set_text(y,w),t.set_text(d,S),t.set_text(b,W),t.set_text(H,P)},[()=>l()("name"),()=>l()("date"),()=>l()("spin"),()=>l()("assigned")]),t.append(a,s)},pe=a=>{var s=t.comment(),v=e.first_child(s);{var r=o=>{var d=Ce(),_=e.first_child(d),b=e.sibling(e.child(_),2),G=e.only_child(b,!0),H=e.sibling(b,2),U=e.only_child(H,!0),w=e.sibling(H,2),S=e.only_child(w,!0),W=e.sibling(w,2),P=e.only_child(W,!0);e.reset(_);var R=e.sibling(_,2);t.each(R,17,()=>e.get(ae),t.index,(z,n,u)=>{var g=ye(),C=e.child(g),I=e.only_child(C),f=e.sibling(C,2),B=e.only_child(f,!0),M=e.sibling(f,2),j=e.child(M),X=e.only_child(j,!0),m=e.sibling(j,2),x=e.only_child(m,!0);e.reset(M);var k=e.sibling(M,2),J=e.child(k);{var ge=i=>{var h=Q();t.append(i,h)},fe=i=>{var h=V();t.append(i,h)};t.if_block(J,i=>{e.get(n).state==="drawn"||e.get(n).state==="fulfilled"?i(ge):i(fe,-1)})}e.reset(k);var N=e.sibling(k,2),he=e.child(N);{var _e=i=>{var h=Q();t.append(i,h)},ue=i=>{var h=V();t.append(i,h)};t.if_block(he,i=>{e.get(n).completed&&e.get(n).state==="fulfilled"?i(_e):i(ue,-1)})}e.reset(N),e.reset(g),e.template_effect((i,h)=>{t.set_text(I,`${(e.get(p)-1)*L+u+1}.`),t.set_text(B,le[e.get(n).type]||"-"),t.set_text(X,i),t.set_text(x,h)},[()=>e.formatDateTimeForHistory(e.get(n).time).date,()=>e.formatDateTimeForHistory(e.get(n).time).time]),t.append(z,g)});var ce=e.sibling(R,2);{var de=z=>{var n=we(),u=e.child(n),g=e.sibling(u,2);t.each(g,21,()=>e.get(se),t.index,(I,f)=>{var B=t.comment(),M=e.first_child(B);{var j=m=>{var x=ze();t.append(m,x)},X=m=>{var x=be();let k;var J=e.only_child(x,!0);e.template_effect(()=>{k=t.set_class(x,1,"pagination-button pagination-page svelte-4la0az",null,k,{active:e.get(p)===e.get(f)}),t.set_text(J,e.get(f))}),t.delegated("click",x,()=>Z(e.get(f))),t.append(m,x)};t.if_block(M,m=>{e.get(f)==="..."?m(j):m(X,-1)})}t.append(I,B)}),e.reset(g);var C=e.sibling(g,2);e.reset(n),e.template_effect((I,f)=>{u.disabled=e.get(p)===1,t.set_attribute(u,"aria-label",I),C.disabled=e.get(p)===e.get(F),t.set_attribute(C,"aria-label",f)},[()=>l()("previous"),()=>l()("next")]),t.delegated("click",u,()=>Z(e.get(p)-1)),t.delegated("click",C,()=>Z(e.get(p)+1)),t.append(z,n)};t.if_block(ce,z=>{e.get(F)>1&&z(de)})}e.template_effect((z,n,u,g)=>{t.set_text(G,z),t.set_text(U,n),t.set_text(S,u),t.set_text(P,g)},[()=>l()("name"),()=>l()("date"),()=>l()("spin"),()=>l()("assigned")]),t.append(o,d)},y=o=>{var d=ke(),_=e.only_child(d,!0);e.template_effect(b=>t.set_text(_,b),[()=>l()("noHistory")]),t.append(o,d)};t.if_block(v,o=>{e.get(c)&&e.get(c).length>0?o(r):o(y,-1)})}t.append(a,s)};t.if_block(oe,a=>{e.get(O)?a(ne):a(pe,-1)})}e.reset(q),t.append(K,q);var ve=e.pop(re);return ee(),ve}t.delegate(["click"]);t.create_custom_element(Y,{programId:{},endpoint:{},session:{}},[],[],{mode:"open"});exports.WheelOfFortuneHistory=Y;
11
+ } .skeleton-row {pointer-events:none;
12
+ animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;height:40px;}`};function Y(K,T){e.push(T,!0),t.append_styles(K,Ie);const l=()=>t.store_get(e.$format,"$_",$),[$,ee]=t.setup_stores(),A=t.prop(T,"programId",7),D=t.prop(T,"endpoint",7),E=t.prop(T,"session",7);let O=e.state(!0),d=e.state(e.proxy([])),te=e.state(!1);const L=10;let p=e.state(1);const F=e.user_derived(()=>e.get(d)&&e.get(d).length>0?Math.ceil(e.get(d).length/L):1),ae=e.user_derived(()=>e.get(d)&&e.get(d).length>0?e.get(d).slice((e.get(p)-1)*L,e.get(p)*L):[]),le={bonus:l()("prizeBonus"),role:l()("prizeRole"),tournament:l()("prizeTournament"),ticket:l()("prizeTicket"),loyalty:l()("prizeLoyalty"),challenge:l()("prizeChallenge"),noprize:l()("noWin"),custom:l()("prizeCustom")},se=e.user_derived(()=>{const a=e.get(F);if(a<=5)return Array.from({length:a},(o,v)=>v+1);const s=[],c=e.get(p);s.push(1),c>3&&s.push("...");const r=Math.max(2,c-1),y=Math.min(a-1,c+1);for(let o=r;o<=y;o++)s.push(o);return c<a-2&&s.push("..."),a>1&&s.push(a),s}),Z=a=>{a<1||a>e.get(F)||(e.set(p,a,!0),window.scrollTo({top:0,behavior:"smooth"}))},ie=()=>{e.set(O,!0);const a=new URL(`${D()}/v1/wof/outcome/${A()}`),s=new Headers;E()&&s.append("X-SessionId",E()),fetch(a,{method:"GET",headers:s,cache:"no-store"}).then(r=>r.json()).then(r=>{e.set(d,r==null?void 0:r.items.map(y=>e.normalizeDrawResult(y,"history")),!0),e.set(p,1)}).catch(r=>{console.log(r),e.set(te,!0)}).finally(()=>e.set(O,!1))};t.onMount(()=>{ie()});var re={get programId(){return A()},set programId(a){A(a),e.flushSync()},get endpoint(){return D()},set endpoint(a){D(a),e.flushSync()},get session(){return E()},set session(a){E(a),e.flushSync()}},q=Le(),oe=e.child(q);{var ne=a=>{var s=xe(),c=e.first_child(s),r=e.sibling(e.child(c),2),y=e.only_child(r,!0),o=e.sibling(r,2),v=e.only_child(o,!0),_=e.sibling(o,2),z=e.only_child(_,!0),G=e.sibling(_,2),H=e.only_child(G,!0);e.reset(c);var U=e.sibling(c,2);t.each(U,17,()=>Array(L),t.index,(w,S,W,P)=>{var R=me();t.append(w,R)}),e.template_effect((w,S,W,P)=>{t.set_text(y,w),t.set_text(v,S),t.set_text(z,W),t.set_text(H,P)},[()=>l()("name"),()=>l()("date"),()=>l()("spin"),()=>l()("assigned")]),t.append(a,s)},pe=a=>{var s=t.comment(),c=e.first_child(s);{var r=o=>{var v=Ce(),_=e.first_child(v),z=e.sibling(e.child(_),2),G=e.only_child(z,!0),H=e.sibling(z,2),U=e.only_child(H,!0),w=e.sibling(H,2),S=e.only_child(w,!0),W=e.sibling(w,2),P=e.only_child(W,!0);e.reset(_);var R=e.sibling(_,2);t.each(R,17,()=>e.get(ae),t.index,(b,n,u)=>{var g=ye(),C=e.child(g),I=e.only_child(C),f=e.sibling(C,2),B=e.only_child(f,!0),M=e.sibling(f,2),j=e.child(M),X=e.only_child(j,!0),m=e.sibling(j,2),x=e.only_child(m,!0);e.reset(M);var k=e.sibling(M,2),J=e.child(k);{var ge=i=>{var h=Q();t.append(i,h)},fe=i=>{var h=V();t.append(i,h)};t.if_block(J,i=>{e.get(n).state==="drawn"||e.get(n).state==="fulfilled"?i(ge):i(fe,-1)})}e.reset(k);var N=e.sibling(k,2),he=e.child(N);{var _e=i=>{var h=Q();t.append(i,h)},ue=i=>{var h=V();t.append(i,h)};t.if_block(he,i=>{e.get(n).completed&&e.get(n).state==="fulfilled"?i(_e):i(ue,-1)})}e.reset(N),e.reset(g),e.template_effect((i,h)=>{t.set_text(I,`${(e.get(p)-1)*L+u+1}.`),t.set_text(B,le[e.get(n).type]||"-"),t.set_text(X,i),t.set_text(x,h)},[()=>e.formatDateTimeForHistory(e.get(n).time).date,()=>e.formatDateTimeForHistory(e.get(n).time).time]),t.append(b,g)});var de=e.sibling(R,2);{var ve=b=>{var n=we(),u=e.child(n),g=e.sibling(u,2);t.each(g,21,()=>e.get(se),t.index,(I,f)=>{var B=t.comment(),M=e.first_child(B);{var j=m=>{var x=be();t.append(m,x)},X=m=>{var x=ze();let k;var J=e.only_child(x,!0);e.template_effect(()=>{k=t.set_class(x,1,"pagination-button pagination-page svelte-4la0az",null,k,{active:e.get(p)===e.get(f)}),t.set_text(J,e.get(f))}),t.delegated("click",x,()=>Z(e.get(f))),t.append(m,x)};t.if_block(M,m=>{e.get(f)==="..."?m(j):m(X,-1)})}t.append(I,B)}),e.reset(g);var C=e.sibling(g,2);e.reset(n),e.template_effect((I,f)=>{u.disabled=e.get(p)===1,t.set_attribute(u,"aria-label",I),C.disabled=e.get(p)===e.get(F),t.set_attribute(C,"aria-label",f)},[()=>l()("previous"),()=>l()("next")]),t.delegated("click",u,()=>Z(e.get(p)-1)),t.delegated("click",C,()=>Z(e.get(p)+1)),t.append(b,n)};t.if_block(de,b=>{e.get(F)>1&&b(ve)})}e.template_effect((b,n,u,g)=>{t.set_text(G,b),t.set_text(U,n),t.set_text(S,u),t.set_text(P,g)},[()=>l()("name"),()=>l()("date"),()=>l()("spin"),()=>l()("assigned")]),t.append(o,v)},y=o=>{var v=ke(),_=e.only_child(v,!0);e.template_effect(z=>t.set_text(_,z),[()=>l()("noHistory")]),t.append(o,v)};t.if_block(c,o=>{e.get(d)&&e.get(d).length>0?o(r):o(y,-1)})}t.append(a,s)};t.if_block(oe,a=>{e.get(O)?a(ne):a(pe,-1)})}e.reset(q),t.append(K,q);var ce=e.pop(re);return ee(),ce}t.delegate(["click"]);t.create_custom_element(Y,{programId:{},endpoint:{},session:{}},[],[],{mode:"open"});exports.WheelOfFortuneHistory=Y;
@@ -0,0 +1,12 @@
1
+ "use strict";const t=require("./WheelOfFortuneWheel-CUs0nOjA.cjs"),e=require("./utils-By_D2O28.cjs");var me=t.from_html('<div class="lucky-wheel-history-item skeleton-row svelte-4la0az"></div>'),xe=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!>',1),Q=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-4la0az"></path></svg>'),V=t.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-4la0az"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-4la0az"></path></svg>'),ye=t.from_html('<div class="lucky-wheel-history-item history-grid svelte-4la0az"><p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <div class="date-time-cell svelte-4la0az"><span class="svelte-4la0az"> </span> <span class="svelte-4la0az"> </span></div> <div class="history-icon svelte-4la0az"><!></div> <div class="history-icon svelte-4la0az"><!></div></div>'),be=t.from_html('<span class="pagination-ellipsis svelte-4la0az">&hellip;</span>'),ze=t.from_html("<button> </button>"),we=t.from_html('<div class="lucky-wheel-pagination svelte-4la0az"><button class="pagination-button pagination-nav svelte-4la0az">&#8249;</button> <div class="pagination-pages svelte-4la0az"></div> <button class="pagination-button pagination-nav svelte-4la0az">&#8250;</button></div>'),Ce=t.from_html('<div class="lucky-wheel-history-header history-grid svelte-4la0az"><p class="svelte-4la0az">#</p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p> <p class="svelte-4la0az"> </p></div> <!> <!>',1),ke=t.from_html('<h2 class="no-history svelte-4la0az"> </h2>'),Le=t.from_html('<div class="history-list svelte-4la0az"><!></div>');const Ie={hash:"svelte-4la0az",code:` *,
2
+ *::before,
3
+ *::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;} .history-list {display:flex;flex-direction:column;gap:6px;width:90%;margin:0 auto;} .history-grid {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;} .date-time-cell {display:flex;flex-direction:column;gap:2px;} .date-time-cell span:last-child {opacity:0.6;font-size:10px;} .lucky-wheel-history-item {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;} .lucky-wheel-history-header {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;} .history-icon {display:flex;align-items:center;justify-content:center;} .no-history {width:100%;font-size:14px;font-weight:400;margin-top:12px;} .lucky-wheel-pagination {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;} .pagination-pages {display:flex;align-items:center;gap:4px;} .pagination-ellipsis {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;} .pagination-button {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;} .pagination-button:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));} .pagination-button:disabled {opacity:0.4;cursor:not-allowed;} .pagination-page {min-width:32px;text-align:center;padding:6px 8px;} .pagination-nav {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;} .pagination-page.active {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
4
+ @keyframes svelte-4la0az-skeleton-pulse {
5
+ 0%, 100% {
6
+ opacity: 0.3;
7
+ }
8
+ 50% {
9
+ opacity: 0.6;
10
+ }
11
+ } .skeleton-row {pointer-events:none;
12
+ animation: svelte-4la0az-skeleton-pulse 1.4s ease-in-out infinite;height:40px;}`};function Y(K,T){e.push(T,!0),t.append_styles(K,Ie);const l=()=>t.store_get(e.$format,"$_",$),[$,ee]=t.setup_stores(),A=t.prop(T,"programId",7),D=t.prop(T,"endpoint",7),E=t.prop(T,"session",7);let O=e.state(!0),d=e.state(e.proxy([])),te=e.state(!1);const L=10;let p=e.state(1);const F=e.user_derived(()=>e.get(d)&&e.get(d).length>0?Math.ceil(e.get(d).length/L):1),ae=e.user_derived(()=>e.get(d)&&e.get(d).length>0?e.get(d).slice((e.get(p)-1)*L,e.get(p)*L):[]),le={bonus:l()("prizeBonus"),role:l()("prizeRole"),tournament:l()("prizeTournament"),ticket:l()("prizeTicket"),loyalty:l()("prizeLoyalty"),challenge:l()("prizeChallenge"),noprize:l()("noWin"),custom:l()("prizeCustom")},se=e.user_derived(()=>{const a=e.get(F);if(a<=5)return Array.from({length:a},(r,v)=>v+1);const s=[],c=e.get(p);s.push(1),c>3&&s.push("...");const n=Math.max(2,c-1),y=Math.min(a-1,c+1);for(let r=n;r<=y;r++)s.push(r);return c<a-2&&s.push("..."),a>1&&s.push(a),s}),Z=a=>{a<1||a>e.get(F)||(e.set(p,a,!0),window.scrollTo({top:0,behavior:"smooth"}))},ie=()=>{e.set(O,!0);const a=new URL(`${D()}/v1/wof/outcome/${A()}`),s=new Headers;E()&&s.append("X-SessionId",E()),fetch(a,{method:"GET",headers:s,cache:"no-store"}).then(n=>n.json()).then(n=>{e.set(d,n?.items.map(y=>e.normalizeDrawResult(y,"history")),!0),e.set(p,1)}).catch(n=>{console.log(n),e.set(te,!0)}).finally(()=>e.set(O,!1))};t.onMount(()=>{ie()});var re={get programId(){return A()},set programId(a){A(a),e.flushSync()},get endpoint(){return D()},set endpoint(a){D(a),e.flushSync()},get session(){return E()},set session(a){E(a),e.flushSync()}},q=Le(),oe=e.child(q);{var ne=a=>{var s=xe(),c=e.first_child(s),n=e.sibling(e.child(c),2),y=e.only_child(n,!0),r=e.sibling(n,2),v=e.only_child(r,!0),_=e.sibling(r,2),z=e.only_child(_,!0),G=e.sibling(_,2),H=e.only_child(G,!0);e.reset(c);var U=e.sibling(c,2);t.each(U,17,()=>Array(L),t.index,(w,S,W,P)=>{var R=me();t.append(w,R)}),e.template_effect((w,S,W,P)=>{t.set_text(y,w),t.set_text(v,S),t.set_text(z,W),t.set_text(H,P)},[()=>l()("name"),()=>l()("date"),()=>l()("spin"),()=>l()("assigned")]),t.append(a,s)},pe=a=>{var s=t.comment(),c=e.first_child(s);{var n=r=>{var v=Ce(),_=e.first_child(v),z=e.sibling(e.child(_),2),G=e.only_child(z,!0),H=e.sibling(z,2),U=e.only_child(H,!0),w=e.sibling(H,2),S=e.only_child(w,!0),W=e.sibling(w,2),P=e.only_child(W,!0);e.reset(_);var R=e.sibling(_,2);t.each(R,17,()=>e.get(ae),t.index,(b,o,u)=>{var g=ye(),C=e.child(g),I=e.only_child(C),f=e.sibling(C,2),B=e.only_child(f,!0),M=e.sibling(f,2),j=e.child(M),X=e.only_child(j,!0),m=e.sibling(j,2),x=e.only_child(m,!0);e.reset(M);var k=e.sibling(M,2),J=e.child(k);{var ge=i=>{var h=Q();t.append(i,h)},fe=i=>{var h=V();t.append(i,h)};t.if_block(J,i=>{e.get(o).state==="drawn"||e.get(o).state==="fulfilled"?i(ge):i(fe,-1)})}e.reset(k);var N=e.sibling(k,2),he=e.child(N);{var _e=i=>{var h=Q();t.append(i,h)},ue=i=>{var h=V();t.append(i,h)};t.if_block(he,i=>{e.get(o).completed&&e.get(o).state==="fulfilled"?i(_e):i(ue,-1)})}e.reset(N),e.reset(g),e.template_effect((i,h)=>{t.set_text(I,`${(e.get(p)-1)*L+u+1}.`),t.set_text(B,le[e.get(o).type]||"-"),t.set_text(X,i),t.set_text(x,h)},[()=>e.formatDateTimeForHistory(e.get(o).time).date,()=>e.formatDateTimeForHistory(e.get(o).time).time]),t.append(b,g)});var de=e.sibling(R,2);{var ve=b=>{var o=we(),u=e.child(o),g=e.sibling(u,2);t.each(g,21,()=>e.get(se),t.index,(I,f)=>{var B=t.comment(),M=e.first_child(B);{var j=m=>{var x=be();t.append(m,x)},X=m=>{var x=ze();let k;var J=e.only_child(x,!0);e.template_effect(()=>{k=t.set_class(x,1,"pagination-button pagination-page svelte-4la0az",null,k,{active:e.get(p)===e.get(f)}),t.set_text(J,e.get(f))}),t.delegated("click",x,()=>Z(e.get(f))),t.append(m,x)};t.if_block(M,m=>{e.get(f)==="..."?m(j):m(X,-1)})}t.append(I,B)}),e.reset(g);var C=e.sibling(g,2);e.reset(o),e.template_effect((I,f)=>{u.disabled=e.get(p)===1,t.set_attribute(u,"aria-label",I),C.disabled=e.get(p)===e.get(F),t.set_attribute(C,"aria-label",f)},[()=>l()("previous"),()=>l()("next")]),t.delegated("click",u,()=>Z(e.get(p)-1)),t.delegated("click",C,()=>Z(e.get(p)+1)),t.append(b,o)};t.if_block(de,b=>{e.get(F)>1&&b(ve)})}e.template_effect((b,o,u,g)=>{t.set_text(G,b),t.set_text(U,o),t.set_text(S,u),t.set_text(P,g)},[()=>l()("name"),()=>l()("date"),()=>l()("spin"),()=>l()("assigned")]),t.append(r,v)},y=r=>{var v=ke(),_=e.only_child(v,!0);e.template_effect(z=>t.set_text(_,z),[()=>l()("noHistory")]),t.append(r,v)};t.if_block(c,r=>{e.get(d)&&e.get(d).length>0?r(n):r(y,-1)})}t.append(a,s)};t.if_block(oe,a=>{e.get(O)?a(ne):a(pe,-1)})}e.reset(q),t.append(K,q);var ce=e.pop(re);return ee(),ce}t.delegate(["click"]);t.create_custom_element(Y,{programId:{},endpoint:{},session:{}},[],[],{mode:"open"});exports.WheelOfFortuneHistory=Y;