@streamlayer/react 0.29.6 → 0.29.7

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.
@@ -51,6 +51,19 @@
51
51
  .g1jhb9lu{color:var(--color-neutrals-gray7);font-weight:550;font-size:12px;}
52
52
  .ds6gfsv{font-weight:400;font-size:16px;color:var(--color-primary-green2);margin-bottom:12px;padding-right:10px;font-family:var(--font-serif);}
53
53
  .xkzz16s{background-color:var(--color-primary-green1);color:var(--color-white);border-radius:40px;border:none;outline:none;cursor:pointer;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:14px;font-weight:550;padding:0px 16px;height:44px;}.xkzz16s:hover{background-color:var(--color-primary-green2);cursor:pointer;}
54
+ .i1j5f618{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-column-gap:8px;column-gap:8px;}
55
+ .n1fqaem9{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}
56
+ .o1jovu9m{width:46px;height:46px;object-fit:cover;object-position:center;border-radius:50%;}
57
+ .a12ibiz8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:2px;color:var(--color-neutrals-gray9);font-weight:var(--font-weight-default);}
58
+ .r1r4eua{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-column-gap:4px;column-gap:4px;font-size:12px;font-family:var(--font-serif);}
59
+ .l1ymr3ce{font-size:12px;line-height:20px;}
60
+ .tfx5umz{box-sizing:border-box;background-color:var(--color-neutrals-white);border-radius:8px;width:100%;}
61
+ .e1a1fcxr{border:none;outline:none;background-color:var(--color-primary-green1);color:var(--color-white);border-radius:40px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:14px;font-weight:550;width:100%;padding:0px 16px;height:44px;}.e1a1fcxr:hover{background-color:var(--color-primary-green2);cursor:pointer;}
62
+ .i1iknwgy{color:var(--color-neutrals-gray9);font-size:12px;font-weight:var(--font-weight-default);line-height:18px;}
63
+ .n1uc9lmn{max-width:100%;border-radius:8px;}
64
+ .ae4b7qd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:12px;color:var(--color-neutrals-gray9);font-weight:var(--font-weight-default);margin-bottom:16px;}
65
+ .l1udpjlr{padding-bottom:12px;border-bottom:0.7px solid var(--color-neutrals-gray3);margin-bottom:12px;}
66
+ .d7ui2j0{padding:0px 24px 0px 12px;color:var(--color-primary-green2);border-left:2px solid var(--color-primary-green2);font-size:12px;font-family:var(--font-serif);font-weight:var(--font-weight-default);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;word-break:break-word;text-overflow:ellipsis;max-height:32px;}
54
67
  .s1aopxp8{overflow:hidden;width:100%;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:1;max-height:2500px;-webkit-animation:containerShowIn-s1aopxp8 ease-out;animation:containerShowIn-s1aopxp8 ease-out;-webkit-animation-duration:var(--animation-duration);animation-duration:var(--animation-duration);}@-webkit-keyframes containerShowIn-s1aopxp8{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;max-height:0;}80%{opacity:0;-webkit-transform:scale(0.9);-ms-transform:scale(0.9);transform:scale(0.9);max-height:2500px;}85%{-webkit-transform:scale(0.9);-ms-transform:scale(0.9);transform:scale(0.9);max-height:2500px;}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:1;max-height:2500px;}}@keyframes containerShowIn-s1aopxp8{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;max-height:0;}80%{opacity:0;-webkit-transform:scale(0.9);-ms-transform:scale(0.9);transform:scale(0.9);max-height:2500px;}85%{-webkit-transform:scale(0.9);-ms-transform:scale(0.9);transform:scale(0.9);max-height:2500px;}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:1;max-height:2500px;}}
55
68
  .c1t0h6s{-webkit-animation:containerHide-c1t0h6s ease-out;animation:containerHide-c1t0h6s ease-out;-webkit-animation-duration:var(--animation-duration);animation-duration:var(--animation-duration);-webkit-animation-direction:reverse;animation-direction:reverse;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;}@-webkit-keyframes containerHide-c1t0h6s{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;max-height:0;}80%{opacity:0;-webkit-transform:scale(0.9);-ms-transform:scale(0.9);transform:scale(0.9);max-height:2500px;}85%{-webkit-transform:scale(0.9);-ms-transform:scale(0.9);transform:scale(0.9);max-height:2500px;}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:1;max-height:2500px;}}@keyframes containerHide-c1t0h6s{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;max-height:0;}80%{opacity:0;-webkit-transform:scale(0.9);-ms-transform:scale(0.9);transform:scale(0.9);max-height:2500px;}85%{-webkit-transform:scale(0.9);-ms-transform:scale(0.9);transform:scale(0.9);max-height:2500px;}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:1;max-height:2500px;}}
56
69
  .d1qqtt3e{position:relative;top:var(--header-height);-webkit-animation-duration:calc(var(--animation-duration) * 3);animation-duration:calc(var(--animation-duration) * 3);}.d1qqtt3e > div{padding:var(--container-padding);}
package/lib/es/masters.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../index-0d23b24e.js";
3
- import { M as L, a as c } from "../masters-e3fde211.js";
3
+ import { M as L, a as c } from "../masters-915bbbeb.js";
4
4
  import "react";
5
5
  import "./useStreamLayerApp.js";
6
6
  import "@streamlayer/sdk-web";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),p=require("./index-b0206045.cjs"),re=require("@nanostores/react"),J=require("./masters-541db712.cjs"),$=require("react"),C=require("@streamlayer/sdk-web-types"),ne=require("./common-f34b9d88.cjs"),Ot=require("react-countdown-circle-timer"),de=require("./index-89c19a6e.cjs");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("./cjs/useStreamLayerApp.js");require("@streamlayer/sdk-web");const kt=()=>p.C1,Lt=()=>p.C1,Bt=p.styled_default("div")({name:"a",class:"acysrl1",propsAsIs:!1}),Rt=p.styled_default("div")({name:"l",class:"lo57cjm",propsAsIs:!1}),Ut=p.styled_default(kt())({name:"p",class:"p14kwh4y",propsAsIs:!0}),Ft=p.styled_default("span")({name:"s",class:"sxun7sq",propsAsIs:!1}),$t=p.styled_default("button")({name:"c",class:"c1i8ida8",propsAsIs:!1}),Qt=p.styled_default(Lt())({name:"g",class:"g1m0xfmw",propsAsIs:!0}),mt=({type:i,close:n,label:a})=>{const u=i?J.o[i]:{label:a,iconName:void 0};return c.jsxs(Bt,{children:[c.jsxs(Rt,{children:[(u==null?void 0:u.iconName)&&c.jsx(Ut,{name:u.iconName}),(u==null?void 0:u.label)&&c.jsx(Ft,{children:u.label})]}),c.jsx($t,{onClick:n,children:c.jsx(Qt,{name:"icon-cross"})})]})};const qt=p.styled_default("div")({name:"t",class:"taj61ja",propsAsIs:!1}),Pt=p.styled_default("div")({name:"r",class:"r19fxewd",propsAsIs:!1}),Yt=p.styled_default("div")({name:"i",class:"i1whkbqh",propsAsIs:!1}),Ke=({indicator:i,title:n})=>c.jsxs(qt,{children:[c.jsx(Pt,{children:n}),c.jsx(Yt,{children:i})]});const Wt=p.styled_default("div")({name:"i",class:"i4lbhzs",propsAsIs:!1}),Vt=p.styled_default("div")({name:"o",class:"ordquhq",propsAsIs:!1}),Ht=p.styled_default("div")({name:"n",class:"nwzed99",propsAsIs:!1}),Ae=({indicator:i,title:n})=>c.jsxs(Wt,{children:[c.jsx(Vt,{children:i}),c.jsx(Ht,{children:n})]});const Gt=p.styled_default("div")({name:"o",class:"o15y0waw",propsAsIs:!1}),Zt=p.styled_default("div")({name:"i",class:"ihjewwf",propsAsIs:!1}),Jt=p.styled_default("div")({name:"n",class:"n10e9lv8",propsAsIs:!1}),Kt=p.styled_default("div")({name:"r",class:"r13bxv",propsAsIs:!1}),Xt=p.styled_default("img")({name:"a",class:"a1fi59c9",propsAsIs:!1}),er=p.styled_default("div")({name:"s",class:"s1kkihge",propsAsIs:!1}),tr=p.styled_default("div")({name:"c",class:"cy4f4t",propsAsIs:!1}),rr=p.styled_default("div")({name:"p",class:"p18cnlx1",propsAsIs:!1}),ir=p.styled_default("img")({name:"l",class:"lboqgs5",propsAsIs:!1}),nr=p.styled_default("div")({name:"d",class:"d1oaal4",propsAsIs:!1}),sr=p.styled_default("div")({name:"x",class:"x1yzgo0u",propsAsIs:!1}),or=p.styled_default("div")({name:"f",class:"f1l9i8s8",propsAsIs:!1}),ar=p.styled_default("div")({name:"g",class:"g4cgl4u",propsAsIs:!1}),lr=p.styled_default("div")({name:"h",class:"h1qn1tmd",propsAsIs:!1}),cr=p.styled_default("div")({name:"u",class:"u1gsbhq4",propsAsIs:!1}),ur=p.styled_default("div")({name:"m",class:"mvj8oco",propsAsIs:!1}),dr=p.styled_default("button")({name:"v",class:"viqiaf2",propsAsIs:!1}),fr="data:image/svg+xml;base64,PHN2ZyB3a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uNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=",yt=({avatar:i,name:n,points:a,friendsRank:u,rank:d,streak:g,correct:y,incorrect:o,inTop:x,average:E})=>c.jsxs(Gt,{children:[c.jsx(Zt,{children:c.jsxs(Kt,{children:[c.jsxs(dr,{children:[i&&c.jsx(Xt,{alt:"avatar",src:i}),!i&&c.jsx(ur,{children:ne.o(n||"")})]}),c.jsxs(er,{children:[c.jsx(tr,{children:n}),c.jsxs(rr,{children:[c.jsxs(nr,{children:[c.jsx(ir,{alt:"rank-icon",src:fr}),c.jsxs(sr,{children:[ne.i(a),c.jsx(or,{children:"PTS"})]})]}),c.jsx(ar,{}),c.jsxs("div",{children:["TOP ",x||0,"%"]})]})]})]})}),c.jsxs(Jt,{children:[c.jsxs(lr,{children:[c.jsx(Ke,{indicator:u||0,title:"Friends rank"}),c.jsx(Ke,{indicator:d||0,title:"Global rank"})]}),c.jsxs(cr,{children:[c.jsx(Ae,{indicator:g||0,title:"Win streak"}),c.jsx(Ae,{indicator:y||0,title:"Correct"}),c.jsx(Ae,{indicator:o||0,title:"Incorrect"}),c.jsx(Ae,{indicator:`${E||0}%`,title:"Succ. rate"})]})]})]});const hr=()=>p.C1,pr=p.styled_default("div")({name:"c",class:"ciyeb68",propsAsIs:!1}),mr=p.styled_default(hr())({name:"n",class:"nfic4xc",propsAsIs:!0}),Xe=p.styled_default("div")({name:"d",class:"d1pd1p66",propsAsIs:!1}),et=p.styled_default("div")({name:"p",class:"p132yxcv",propsAsIs:!1}),yr=p.styled_default("span")({name:"l",class:"l4a8aw",propsAsIs:!1}),Ce=p.styled_default("span")({name:"g",class:"gzdx7pk",propsAsIs:!1}),gr=p.styled_default("div")({name:"s",class:"smnc4zm",propsAsIs:!1}),xr=({feedbackMessages:i,questionVotedCorrectly:n,questionVoted:a,questionType:u,hasCorrectAnswer:d,questionStatus:g})=>{const y=a&&(u===C.QuestionType.TRIVIA||u===C.QuestionType.PREDICTION);if(!y&&g!==C.QuestionStatus.RESOLVED)return null;const o=u===C.QuestionType.PREDICTION&&!d,x=n?"correct":"incorrect",E=n?i.correctFeedback:i.incorrectFeedback;return c.jsxs(pr,{"data-isPrediction":o,children:[g===C.QuestionStatus.RESOLVED&&u===C.QuestionType.TRIVIA&&!a&&c.jsxs(c.Fragment,{children:[c.jsx(Xe,{children:c.jsx(p.C1,{name:"questionExpired"})}),c.jsxs("div",{children:[c.jsx(et,{children:c.jsx(Ce,{children:"Question Expired"})}),c.jsx(gr,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),y&&o&&c.jsxs(c.Fragment,{children:[c.jsx(mr,{name:"icon-prediction"}),c.jsx(Ce,{children:"Stay tuned to see if your prediction was correct."})]}),y&&d&&c.jsxs(c.Fragment,{children:[c.jsx(Xe,{"data-feedbackType":x,children:c.jsx(p.C1,{name:x})}),c.jsx("div",{children:c.jsxs(et,{children:[c.jsx(yr,{"data-feedbackType":x,children:E==null?void 0:E.title}),c.jsx(Ce,{children:E==null?void 0:E.description})]})})]})]})};const Ir=p.styled_default("div")({name:"o",class:"olc1eph",propsAsIs:!1}),wr=p.styled_default("div")({name:"n",class:"n1yoh29a",propsAsIs:!1}),_r=p.styled_default("div")({name:"p",class:"pjkr5mb",propsAsIs:!1}),Mr=p.styled_default("div")({name:"r",class:"r82wnnx",propsAsIs:!1});const Ar=()=>gt,Er=()=>gt,Tr=()=>p.C1,jr=p.styled_default("button")({name:"c",class:"cpm4u8k",propsAsIs:!1}),vr=p.styled_default("div")({name:"l",class:"lwfomc3",propsAsIs:!1}),Nr=p.styled_default("span")({name:"d",class:"dmltvg2",propsAsIs:!1}),Sr=p.styled_default("div")({name:"s",class:"stfjpqz",propsAsIs:!1}),zr=p.styled_default("div")({name:"p",class:"p198m24r",propsAsIs:!1}),gt=p.styled_default("img")({name:"r",class:"rbq5eu7",propsAsIs:!1}),Dr=p.styled_default(Ar())({name:"g",class:"g1iv6oeb",propsAsIs:!0}),br=p.styled_default(Er())({name:"h",class:"h1qtxlqc",propsAsIs:!0}),Cr=p.styled_default("span")({name:"u",class:"udm736q",propsAsIs:!1}),Or=p.styled_default("span")({name:"b",class:"b1da34tx",propsAsIs:!1}),kr=p.styled_default("span")({name:"x",class:"x1dqwq83",propsAsIs:!1}),Lr=p.styled_default(Tr())({name:"v",class:"v10s9my2",propsAsIs:!0}),tt={[C.QuestionImages.CENTERED]:i=>c.jsx(Dr,{alt:"option-icon",src:i}),[C.QuestionImages.TRANSPARENT]:i=>c.jsx(Sr,{children:c.jsx(zr,{style:{backgroundImage:`url(${i})`}})}),[C.QuestionImages.ROUNDED]:i=>c.jsx(br,{alt:"option-icon",src:i}),[C.QuestionImages.NONE]:()=>null,[C.QuestionImages.UNSET]:()=>null},Br=({questionType:i,hasCorrectAnswer:n,correct:a,youVoted:u,questionVoted:d})=>{if(i===C.QuestionType.POLL&&u)return"correct";if(i===C.QuestionType.PREDICTION){if(n&&d)return u?a?"correct":"incorrect":a?"correct":"unset";if(u)return"correct"}return i===C.QuestionType.TRIVIA&&d?u?a?"correct":"incorrect":a?"correct":"unset":"unset"},Rr=({questionType:i,questionVoted:n,correct:a,hasCorrectAnswer:u,questionStatus:d})=>i===C.QuestionType.TRIVIA?n&&a:i===C.QuestionType.PREDICTION?n&&a&&u||d===C.QuestionStatus.RESOLVED&&a:!1,Ur=i=>{var n;const{id:a,icon:u,text:d,percentageDecimal:g,onVote:y,youSelected:o,questionVoted:x,imageMode:E=C.QuestionImages.ROUNDED,answerTimeExpired:j,questionStatus:v,isLoading:I,questionType:A,correct:T,hasCorrectAnswer:h}=i,_=Br(i),w=Rr({questionType:A,questionVoted:x,correct:T,hasCorrectAnswer:h,questionStatus:v}),M=x||v===C.QuestionStatus.RESOLVED&&A===C.QuestionType.PREDICTION;return c.jsxs(jr,{value:a,"data-selected":o,"data-answerState":_,disabled:x||I||j,onClick:y,children:[M&&c.jsx(vr,{"data-answerState":_,style:{width:`${g}%`}}),c.jsxs(Nr,{children:[u&&((n=tt[E])==null?void 0:n.call(tt,u)),c.jsx(Cr,{children:d}),M&&c.jsxs(Or,{children:[w&&c.jsx(Lr,{name:"selected"}),c.jsxs(kr,{children:[g,"%"]})]})]})]})};const Fr=[de.E.PRIMARY_GREEN1,de.E.SECONDARY_RED1,de.E.SECONDARY_RED1],$r=[10,10,0],Qr=p.styled_default("div")({name:"A",class:"a1f928zy",propsAsIs:!1}),qr=de.E.SECONDARY_GREEN6,rt=de.E.SECONDARY_RED3,Pr=de.E.NEUTRALS_GRAY3,Yr=({isPlaying:i=!0,duration:n=30,onTimerExpired:a})=>{const[u,d]=$.useState(n>10?qr:rt),g=({remainingTime:x})=>c.jsx(Qr,{children:x}),y=$.useCallback(()=>{a==null||a(),d(Pr)},[a,d]),o=$.useCallback(x=>{x===10&&d(rt)},[d]);return c.jsx(Ot.CountdownCircleTimer,{isPlaying:i,duration:n,colors:Fr,colorsTime:$r,size:32,strokeWidth:2,trailStrokeWidth:2,trailColor:u,onComplete:y,onUpdate:o,children:g})};const Wr=()=>p.C1,Vr=p.styled_default("div")({name:"a",class:"a1r7f3z4",propsAsIs:!1}),Hr=p.styled_default("div")({name:"s",class:"sblndl",propsAsIs:!1}),Gr=p.styled_default("div")({name:"l",class:"l7ka1tv",propsAsIs:!1}),Zr=p.styled_default(Wr())({name:"p",class:"p1edlxt3",propsAsIs:!0}),Jr=p.styled_default("div")({name:"g",class:"ghm08u2",propsAsIs:!1}),Kr=p.styled_default("span")({name:"c",class:"c12nsh46",propsAsIs:!1}),Xr=p.styled_default("span")({name:"d",class:"dlr9eoc",propsAsIs:!1}),ei=({title:i,points:n,isPlayingTimer:a,isTimer:u,onTimerExpired:d})=>c.jsxs(Vr,{children:[c.jsxs(Hr,{children:[i&&c.jsx(Gr,{children:i}),n!==void 0&&c.jsxs(c.Fragment,{children:[c.jsx(Zr,{name:"icon-trophy"}),c.jsxs(Jr,{children:[c.jsx(Kr,{children:n}),c.jsx(Xr,{children:"PTS"})]})]})]}),u&&c.jsx(Yr,{isPlaying:a,onTimerExpired:d})]}),ti=({openedQuestion:i,vote:n})=>{var a;const u=i.subject,d=i.type,g=(a=i.options)==null?void 0:a.options,[y,o]=$.useState(!1),[x,E]=$.useState(!1),[j,v]=$.useState(""),I=i==null?void 0:i.id,A=$.useCallback(async M=>{if(I){const N=M.currentTarget.value;v(N),E(!0),await n(I,N),E(!1)}},[I,v,n]),T=$.useMemo(()=>i==null?void 0:i.answers.find(M=>M.youVoted===!0),[i]),h=$.useMemo(()=>!!(i!=null&&i.answers.find(M=>M.correct===!0)),[i]),_=$.useMemo(()=>i?i.answers.map(M=>({...M,questionVoted:!!T,youSelected:j===M.id,isLoading:x,hasCorrectAnswer:h,questionType:i.type,answerTimeExpired:y,questionStatus:i.status,onVote:A})):[],[h,y,x,i,T,A,j]),w=g&&(g.case==="trivia"||g.case==="prediction")?g.value:void 0;return c.jsx(J.r,{"data-question-header":"true",children:c.jsx(Ir,{children:c.jsxs(wr,{children:[w&&c.jsx(xr,{feedbackMessages:w,questionVoted:!!T,questionVotedCorrectly:T==null?void 0:T.correct,questionType:d,hasCorrectAnswer:h,questionStatus:i.status}),c.jsx(ei,{title:y?"Expired":"To win",points:y?void 0:100,onTimerExpired:()=>o(!0),isTimer:!0}),c.jsx(_r,{children:u}),c.jsx(Mr,{children:_.map(M=>c.jsx(Ur,{...M},M.id))})]})})})};const ri=p.styled_default("div")({name:"e",class:"e1eio0mt",propsAsIs:!1}),ii=p.styled_default("div")({name:"i",class:"iigl87b",propsAsIs:!1}),ni=p.styled_default("h3")({name:"n",class:"n1o2cwub",propsAsIs:!1}),si=p.styled_default("div")({name:"r",class:"r3uxe45",propsAsIs:!1}),oi=p.styled_default("div")({name:"l",class:"lrqius",propsAsIs:!1}),xt=({created:i,title:n,instantView:a})=>{const u=$.useMemo(()=>{if(i){const d=new Date(i);if(ne.r(d))return{date:ne.a(d),time:ne.n(d)}}return null},[i]);return c.jsxs(ri,{children:[u&&c.jsxs(oi,{children:[u.date," · ",u.time]}),(a==null?void 0:a.video)&&c.jsx(J.w,{source:a.video.url,poster:a.video.thumbnailUrl}),c.jsxs(ii,{children:[c.jsx(ni,{children:(a==null?void 0:a.heading)||n}),c.jsx(si,{children:a==null?void 0:a.body})]})]})};const ai=p.styled_default("div")({name:"o",class:"o18unvw4",propsAsIs:!1}),li=p.styled_default("a")({name:"n",class:"ns0uvk8",propsAsIs:!1}),ci=({instantView:i,...n})=>c.jsxs(ai,{children:[c.jsx(xt,{instantView:i,...n}),(i==null?void 0:i.webLink)&&c.jsxs(li,{href:i==null?void 0:i.webLink.url,target:"_blank",children:["Explore more of the Masters History",c.jsx(p.C1,{name:"icon-external-link"})]})]});const ui=p.styled_default("div")({name:"d",class:"dk8r1eq",propsAsIs:!1}),di=({openedQuestion:i})=>{var n;return((n=i==null?void 0:i.attributes)==null?void 0:n.attributes.case)==="insight"?c.jsx(ci,{created:i.attributes.created,...i.attributes.attributes.value}):null},fi=({extendedQuestion:i,vote:n})=>{const{loading:a,data:u}=i;return!a&&u?c.jsx(ti,{vote:n,openedQuestion:u}):null},hi=({gamification:i})=>{var n;const a=re.useStore(i.openedQuestion.$store),u=re.useStore(i.openedQuestion.$extendedStore);if(!a)return null;const d=a.type;return c.jsxs(ui,{children:[c.jsx(mt,{close:i.closeQuestion,type:((n=a.attributes)==null?void 0:n.type)||C.QuestionType.UNSET}),d==="question"&&c.jsx(fi,{vote:i.submitAnswer,extendedQuestion:u}),d!=="question"&&c.jsx(di,{openedQuestion:a})]})};const pi=p.styled_default("div")({name:"t",class:"tcim9sm",propsAsIs:!1}),mi=p.styled_default("div")({name:"e",class:"e8wco6o",propsAsIs:!1}),yi=p.styled_default("button")({name:"n",class:"n1ardwzl",propsAsIs:!1}),gi=p.styled_default("span")({name:"i",class:"i1vk8ojx",propsAsIs:!1});var ge=(i=>(i.HOME="home",i.LEADERBOARD="leaderboard",i))(ge||{});const it=({title:i,active:n,onClick:a})=>c.jsx(yi,{onClick:a,"data-selected":n,children:c.jsx(gi,{children:i})}),xi=({activePage:i="home",toggleActivePage:n})=>c.jsx(pi,{children:c.jsxs(mi,{"data-position":i==="home"?"left":"right",children:[c.jsx(it,{title:"Home",active:i==="home",onClick:()=>n("home")}),c.jsx(it,{title:"Leader Board",active:i==="leaderboard",onClick:()=>n("leaderboard")})]})});var It={},wt={},Te={};Te.byteLength=_i;Te.toByteArray=Ai;Te.fromByteArray=ji;var Z=[],q=[],Ii=typeof Uint8Array<"u"?Uint8Array:Array,Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ce=0,wi=Oe.length;ce<wi;++ce)Z[ce]=Oe[ce],q[Oe.charCodeAt(ce)]=ce;q["-".charCodeAt(0)]=62;q["_".charCodeAt(0)]=63;function _t(i){var n=i.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=i.indexOf("=");a===-1&&(a=n);var u=a===n?0:4-a%4;return[a,u]}function _i(i){var n=_t(i),a=n[0],u=n[1];return(a+u)*3/4-u}function Mi(i,n,a){return(n+a)*3/4-a}function Ai(i){var n,a=_t(i),u=a[0],d=a[1],g=new Ii(Mi(i,u,d)),y=0,o=d>0?u-4:u,x;for(x=0;x<o;x+=4)n=q[i.charCodeAt(x)]<<18|q[i.charCodeAt(x+1)]<<12|q[i.charCodeAt(x+2)]<<6|q[i.charCodeAt(x+3)],g[y++]=n>>16&255,g[y++]=n>>8&255,g[y++]=n&255;return d===2&&(n=q[i.charCodeAt(x)]<<2|q[i.charCodeAt(x+1)]>>4,g[y++]=n&255),d===1&&(n=q[i.charCodeAt(x)]<<10|q[i.charCodeAt(x+1)]<<4|q[i.charCodeAt(x+2)]>>2,g[y++]=n>>8&255,g[y++]=n&255),g}function Ei(i){return Z[i>>18&63]+Z[i>>12&63]+Z[i>>6&63]+Z[i&63]}function Ti(i,n,a){for(var u,d=[],g=n;g<a;g+=3)u=(i[g]<<16&16711680)+(i[g+1]<<8&65280)+(i[g+2]&255),d.push(Ei(u));return d.join("")}function ji(i){for(var n,a=i.length,u=a%3,d=[],g=16383,y=0,o=a-u;y<o;y+=g)d.push(Ti(i,y,y+g>o?o:y+g));return u===1?(n=i[a-1],d.push(Z[n>>2]+Z[n<<4&63]+"==")):u===2&&(n=(i[a-2]<<8)+i[a-1],d.push(Z[n>>10]+Z[n>>4&63]+Z[n<<2&63]+"=")),d.join("")}var We={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */We.read=function(i,n,a,u,d){var g,y,o=d*8-u-1,x=(1<<o)-1,E=x>>1,j=-7,v=a?d-1:0,I=a?-1:1,A=i[n+v];for(v+=I,g=A&(1<<-j)-1,A>>=-j,j+=o;j>0;g=g*256+i[n+v],v+=I,j-=8);for(y=g&(1<<-j)-1,g>>=-j,j+=u;j>0;y=y*256+i[n+v],v+=I,j-=8);if(g===0)g=1-E;else{if(g===x)return y?NaN:(A?-1:1)*(1/0);y=y+Math.pow(2,u),g=g-E}return(A?-1:1)*y*Math.pow(2,g-u)};We.write=function(i,n,a,u,d,g){var y,o,x,E=g*8-d-1,j=(1<<E)-1,v=j>>1,I=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=u?0:g-1,T=u?1:-1,h=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(o=isNaN(n)?1:0,y=j):(y=Math.floor(Math.log(n)/Math.LN2),n*(x=Math.pow(2,-y))<1&&(y--,x*=2),y+v>=1?n+=I/x:n+=I*Math.pow(2,1-v),n*x>=2&&(y++,x/=2),y+v>=j?(o=0,y=j):y+v>=1?(o=(n*x-1)*Math.pow(2,d),y=y+v):(o=n*Math.pow(2,v-1)*Math.pow(2,d),y=0));d>=8;i[a+A]=o&255,A+=T,o/=256,d-=8);for(y=y<<d|o,E+=d;E>0;i[a+A]=y&255,A+=T,y/=256,E-=8);i[a+A-T]|=h*128};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),p=require("./index-b0206045.cjs"),re=require("@nanostores/react"),J=require("./masters-440bed5b.cjs"),$=require("react"),C=require("@streamlayer/sdk-web-types"),ne=require("./common-f34b9d88.cjs"),Ot=require("react-countdown-circle-timer"),de=require("./index-89c19a6e.cjs");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("./cjs/useStreamLayerApp.js");require("@streamlayer/sdk-web");const kt=()=>p.C1,Lt=()=>p.C1,Bt=p.styled_default("div")({name:"a",class:"acysrl1",propsAsIs:!1}),Rt=p.styled_default("div")({name:"l",class:"lo57cjm",propsAsIs:!1}),Ut=p.styled_default(kt())({name:"p",class:"p14kwh4y",propsAsIs:!0}),Ft=p.styled_default("span")({name:"s",class:"sxun7sq",propsAsIs:!1}),$t=p.styled_default("button")({name:"c",class:"c1i8ida8",propsAsIs:!1}),Qt=p.styled_default(Lt())({name:"g",class:"g1m0xfmw",propsAsIs:!0}),mt=({type:i,close:n,label:a})=>{const u=i?J.o[i]:{label:a,iconName:void 0};return c.jsxs(Bt,{children:[c.jsxs(Rt,{children:[(u==null?void 0:u.iconName)&&c.jsx(Ut,{name:u.iconName}),(u==null?void 0:u.label)&&c.jsx(Ft,{children:u.label})]}),c.jsx($t,{onClick:n,children:c.jsx(Qt,{name:"icon-cross"})})]})};const qt=p.styled_default("div")({name:"t",class:"taj61ja",propsAsIs:!1}),Pt=p.styled_default("div")({name:"r",class:"r19fxewd",propsAsIs:!1}),Yt=p.styled_default("div")({name:"i",class:"i1whkbqh",propsAsIs:!1}),Ke=({indicator:i,title:n})=>c.jsxs(qt,{children:[c.jsx(Pt,{children:n}),c.jsx(Yt,{children:i})]});const Wt=p.styled_default("div")({name:"i",class:"i4lbhzs",propsAsIs:!1}),Vt=p.styled_default("div")({name:"o",class:"ordquhq",propsAsIs:!1}),Ht=p.styled_default("div")({name:"n",class:"nwzed99",propsAsIs:!1}),Ae=({indicator:i,title:n})=>c.jsxs(Wt,{children:[c.jsx(Vt,{children:i}),c.jsx(Ht,{children:n})]});const Gt=p.styled_default("div")({name:"o",class:"o15y0waw",propsAsIs:!1}),Zt=p.styled_default("div")({name:"i",class:"ihjewwf",propsAsIs:!1}),Jt=p.styled_default("div")({name:"n",class:"n10e9lv8",propsAsIs:!1}),Kt=p.styled_default("div")({name:"r",class:"r13bxv",propsAsIs:!1}),Xt=p.styled_default("img")({name:"a",class:"a1fi59c9",propsAsIs:!1}),er=p.styled_default("div")({name:"s",class:"s1kkihge",propsAsIs:!1}),tr=p.styled_default("div")({name:"c",class:"cy4f4t",propsAsIs:!1}),rr=p.styled_default("div")({name:"p",class:"p18cnlx1",propsAsIs:!1}),ir=p.styled_default("img")({name:"l",class:"lboqgs5",propsAsIs:!1}),nr=p.styled_default("div")({name:"d",class:"d1oaal4",propsAsIs:!1}),sr=p.styled_default("div")({name:"x",class:"x1yzgo0u",propsAsIs:!1}),or=p.styled_default("div")({name:"f",class:"f1l9i8s8",propsAsIs:!1}),ar=p.styled_default("div")({name:"g",class:"g4cgl4u",propsAsIs:!1}),lr=p.styled_default("div")({name:"h",class:"h1qn1tmd",propsAsIs:!1}),cr=p.styled_default("div")({name:"u",class:"u1gsbhq4",propsAsIs:!1}),ur=p.styled_default("div")({name:"m",class:"mvj8oco",propsAsIs:!1}),dr=p.styled_default("button")({name:"v",class:"viqiaf2",propsAsIs:!1}),fr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OT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n||"")})]}),c.jsxs(er,{children:[c.jsx(tr,{children:n}),c.jsxs(rr,{children:[c.jsxs(nr,{children:[c.jsx(ir,{alt:"rank-icon",src:fr}),c.jsxs(sr,{children:[ne.i(a),c.jsx(or,{children:"PTS"})]})]}),c.jsx(ar,{}),c.jsxs("div",{children:["TOP ",x||0,"%"]})]})]})]})}),c.jsxs(Jt,{children:[c.jsxs(lr,{children:[c.jsx(Ke,{indicator:u||0,title:"Friends rank"}),c.jsx(Ke,{indicator:d||0,title:"Global rank"})]}),c.jsxs(cr,{children:[c.jsx(Ae,{indicator:g||0,title:"Win streak"}),c.jsx(Ae,{indicator:y||0,title:"Correct"}),c.jsx(Ae,{indicator:o||0,title:"Incorrect"}),c.jsx(Ae,{indicator:`${E||0}%`,title:"Succ. rate"})]})]})]});const hr=()=>p.C1,pr=p.styled_default("div")({name:"c",class:"ciyeb68",propsAsIs:!1}),mr=p.styled_default(hr())({name:"n",class:"nfic4xc",propsAsIs:!0}),Xe=p.styled_default("div")({name:"d",class:"d1pd1p66",propsAsIs:!1}),et=p.styled_default("div")({name:"p",class:"p132yxcv",propsAsIs:!1}),yr=p.styled_default("span")({name:"l",class:"l4a8aw",propsAsIs:!1}),Ce=p.styled_default("span")({name:"g",class:"gzdx7pk",propsAsIs:!1}),gr=p.styled_default("div")({name:"s",class:"smnc4zm",propsAsIs:!1}),xr=({feedbackMessages:i,questionVotedCorrectly:n,questionVoted:a,questionType:u,hasCorrectAnswer:d,questionStatus:g})=>{const y=a&&(u===C.QuestionType.TRIVIA||u===C.QuestionType.PREDICTION);if(!y&&g!==C.QuestionStatus.RESOLVED)return null;const o=u===C.QuestionType.PREDICTION&&!d,x=n?"correct":"incorrect",E=n?i.correctFeedback:i.incorrectFeedback;return c.jsxs(pr,{"data-isPrediction":o,children:[g===C.QuestionStatus.RESOLVED&&u===C.QuestionType.TRIVIA&&!a&&c.jsxs(c.Fragment,{children:[c.jsx(Xe,{children:c.jsx(p.C1,{name:"questionExpired"})}),c.jsxs("div",{children:[c.jsx(et,{children:c.jsx(Ce,{children:"Question Expired"})}),c.jsx(gr,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),y&&o&&c.jsxs(c.Fragment,{children:[c.jsx(mr,{name:"icon-prediction"}),c.jsx(Ce,{children:"Stay tuned to see if your prediction was correct."})]}),y&&d&&c.jsxs(c.Fragment,{children:[c.jsx(Xe,{"data-feedbackType":x,children:c.jsx(p.C1,{name:x})}),c.jsx("div",{children:c.jsxs(et,{children:[c.jsx(yr,{"data-feedbackType":x,children:E==null?void 0:E.title}),c.jsx(Ce,{children:E==null?void 0:E.description})]})})]})]})};const Ir=p.styled_default("div")({name:"o",class:"olc1eph",propsAsIs:!1}),wr=p.styled_default("div")({name:"n",class:"n1yoh29a",propsAsIs:!1}),_r=p.styled_default("div")({name:"p",class:"pjkr5mb",propsAsIs:!1}),Mr=p.styled_default("div")({name:"r",class:"r82wnnx",propsAsIs:!1});const Ar=()=>gt,Er=()=>gt,Tr=()=>p.C1,jr=p.styled_default("button")({name:"c",class:"cpm4u8k",propsAsIs:!1}),vr=p.styled_default("div")({name:"l",class:"lwfomc3",propsAsIs:!1}),Nr=p.styled_default("span")({name:"d",class:"dmltvg2",propsAsIs:!1}),Sr=p.styled_default("div")({name:"s",class:"stfjpqz",propsAsIs:!1}),zr=p.styled_default("div")({name:"p",class:"p198m24r",propsAsIs:!1}),gt=p.styled_default("img")({name:"r",class:"rbq5eu7",propsAsIs:!1}),Dr=p.styled_default(Ar())({name:"g",class:"g1iv6oeb",propsAsIs:!0}),br=p.styled_default(Er())({name:"h",class:"h1qtxlqc",propsAsIs:!0}),Cr=p.styled_default("span")({name:"u",class:"udm736q",propsAsIs:!1}),Or=p.styled_default("span")({name:"b",class:"b1da34tx",propsAsIs:!1}),kr=p.styled_default("span")({name:"x",class:"x1dqwq83",propsAsIs:!1}),Lr=p.styled_default(Tr())({name:"v",class:"v10s9my2",propsAsIs:!0}),tt={[C.QuestionImages.CENTERED]:i=>c.jsx(Dr,{alt:"option-icon",src:i}),[C.QuestionImages.TRANSPARENT]:i=>c.jsx(Sr,{children:c.jsx(zr,{style:{backgroundImage:`url(${i})`}})}),[C.QuestionImages.ROUNDED]:i=>c.jsx(br,{alt:"option-icon",src:i}),[C.QuestionImages.NONE]:()=>null,[C.QuestionImages.UNSET]:()=>null},Br=({questionType:i,hasCorrectAnswer:n,correct:a,youVoted:u,questionVoted:d})=>{if(i===C.QuestionType.POLL&&u)return"correct";if(i===C.QuestionType.PREDICTION){if(n&&d)return u?a?"correct":"incorrect":a?"correct":"unset";if(u)return"correct"}return i===C.QuestionType.TRIVIA&&d?u?a?"correct":"incorrect":a?"correct":"unset":"unset"},Rr=({questionType:i,questionVoted:n,correct:a,hasCorrectAnswer:u,questionStatus:d})=>i===C.QuestionType.TRIVIA?n&&a:i===C.QuestionType.PREDICTION?n&&a&&u||d===C.QuestionStatus.RESOLVED&&a:!1,Ur=i=>{var n;const{id:a,icon:u,text:d,percentageDecimal:g,onVote:y,youSelected:o,questionVoted:x,imageMode:E=C.QuestionImages.ROUNDED,answerTimeExpired:j,questionStatus:v,isLoading:I,questionType:A,correct:T,hasCorrectAnswer:h}=i,_=Br(i),w=Rr({questionType:A,questionVoted:x,correct:T,hasCorrectAnswer:h,questionStatus:v}),M=x||v===C.QuestionStatus.RESOLVED&&A===C.QuestionType.PREDICTION;return c.jsxs(jr,{value:a,"data-selected":o,"data-answerState":_,disabled:x||I||j,onClick:y,children:[M&&c.jsx(vr,{"data-answerState":_,style:{width:`${g}%`}}),c.jsxs(Nr,{children:[u&&((n=tt[E])==null?void 0:n.call(tt,u)),c.jsx(Cr,{children:d}),M&&c.jsxs(Or,{children:[w&&c.jsx(Lr,{name:"selected"}),c.jsxs(kr,{children:[g,"%"]})]})]})]})};const Fr=[de.E.PRIMARY_GREEN1,de.E.SECONDARY_RED1,de.E.SECONDARY_RED1],$r=[10,10,0],Qr=p.styled_default("div")({name:"A",class:"a1f928zy",propsAsIs:!1}),qr=de.E.SECONDARY_GREEN6,rt=de.E.SECONDARY_RED3,Pr=de.E.NEUTRALS_GRAY3,Yr=({isPlaying:i=!0,duration:n=30,onTimerExpired:a})=>{const[u,d]=$.useState(n>10?qr:rt),g=({remainingTime:x})=>c.jsx(Qr,{children:x}),y=$.useCallback(()=>{a==null||a(),d(Pr)},[a,d]),o=$.useCallback(x=>{x===10&&d(rt)},[d]);return c.jsx(Ot.CountdownCircleTimer,{isPlaying:i,duration:n,colors:Fr,colorsTime:$r,size:32,strokeWidth:2,trailStrokeWidth:2,trailColor:u,onComplete:y,onUpdate:o,children:g})};const Wr=()=>p.C1,Vr=p.styled_default("div")({name:"a",class:"a1r7f3z4",propsAsIs:!1}),Hr=p.styled_default("div")({name:"s",class:"sblndl",propsAsIs:!1}),Gr=p.styled_default("div")({name:"l",class:"l7ka1tv",propsAsIs:!1}),Zr=p.styled_default(Wr())({name:"p",class:"p1edlxt3",propsAsIs:!0}),Jr=p.styled_default("div")({name:"g",class:"ghm08u2",propsAsIs:!1}),Kr=p.styled_default("span")({name:"c",class:"c12nsh46",propsAsIs:!1}),Xr=p.styled_default("span")({name:"d",class:"dlr9eoc",propsAsIs:!1}),ei=({title:i,points:n,isPlayingTimer:a,isTimer:u,onTimerExpired:d})=>c.jsxs(Vr,{children:[c.jsxs(Hr,{children:[i&&c.jsx(Gr,{children:i}),n!==void 0&&c.jsxs(c.Fragment,{children:[c.jsx(Zr,{name:"icon-trophy"}),c.jsxs(Jr,{children:[c.jsx(Kr,{children:n}),c.jsx(Xr,{children:"PTS"})]})]})]}),u&&c.jsx(Yr,{isPlaying:a,onTimerExpired:d})]}),ti=({openedQuestion:i,vote:n})=>{var a;const u=i.subject,d=i.type,g=(a=i.options)==null?void 0:a.options,[y,o]=$.useState(!1),[x,E]=$.useState(!1),[j,v]=$.useState(""),I=i==null?void 0:i.id,A=$.useCallback(async M=>{if(I){const N=M.currentTarget.value;v(N),E(!0),await n(I,N),E(!1)}},[I,v,n]),T=$.useMemo(()=>i==null?void 0:i.answers.find(M=>M.youVoted===!0),[i]),h=$.useMemo(()=>!!(i!=null&&i.answers.find(M=>M.correct===!0)),[i]),_=$.useMemo(()=>i?i.answers.map(M=>({...M,questionVoted:!!T,youSelected:j===M.id,isLoading:x,hasCorrectAnswer:h,questionType:i.type,answerTimeExpired:y,questionStatus:i.status,onVote:A})):[],[h,y,x,i,T,A,j]),w=g&&(g.case==="trivia"||g.case==="prediction")?g.value:void 0;return c.jsx(J.r,{"data-question-header":"true",children:c.jsx(Ir,{children:c.jsxs(wr,{children:[w&&c.jsx(xr,{feedbackMessages:w,questionVoted:!!T,questionVotedCorrectly:T==null?void 0:T.correct,questionType:d,hasCorrectAnswer:h,questionStatus:i.status}),c.jsx(ei,{title:y?"Expired":"To win",points:y?void 0:100,onTimerExpired:()=>o(!0),isTimer:!0}),c.jsx(_r,{children:u}),c.jsx(Mr,{children:_.map(M=>c.jsx(Ur,{...M},M.id))})]})})})};const ri=p.styled_default("div")({name:"e",class:"e1eio0mt",propsAsIs:!1}),ii=p.styled_default("div")({name:"i",class:"iigl87b",propsAsIs:!1}),ni=p.styled_default("h3")({name:"n",class:"n1o2cwub",propsAsIs:!1}),si=p.styled_default("div")({name:"r",class:"r3uxe45",propsAsIs:!1}),oi=p.styled_default("div")({name:"l",class:"lrqius",propsAsIs:!1}),xt=({created:i,title:n,instantView:a})=>{const u=$.useMemo(()=>{if(i){const d=new Date(i);if(ne.r(d))return{date:ne.a(d),time:ne.n(d)}}return null},[i]);return c.jsxs(ri,{children:[u&&c.jsxs(oi,{children:[u.date," · ",u.time]}),(a==null?void 0:a.video)&&c.jsx(J.w,{source:a.video.url,poster:a.video.thumbnailUrl}),c.jsxs(ii,{children:[c.jsx(ni,{children:(a==null?void 0:a.heading)||n}),c.jsx(si,{children:a==null?void 0:a.body})]})]})};const ai=p.styled_default("div")({name:"o",class:"o18unvw4",propsAsIs:!1}),li=p.styled_default("a")({name:"n",class:"ns0uvk8",propsAsIs:!1}),ci=({instantView:i,...n})=>c.jsxs(ai,{children:[c.jsx(xt,{instantView:i,...n}),(i==null?void 0:i.webLink)&&c.jsxs(li,{href:i==null?void 0:i.webLink.url,target:"_blank",children:["Explore more of the Masters History",c.jsx(p.C1,{name:"icon-external-link"})]})]});const ui=p.styled_default("div")({name:"d",class:"dk8r1eq",propsAsIs:!1}),di=({openedQuestion:i})=>{var n;return((n=i==null?void 0:i.attributes)==null?void 0:n.attributes.case)==="insight"?c.jsx(ci,{created:i.attributes.created,...i.attributes.attributes.value}):null},fi=({extendedQuestion:i,vote:n})=>{const{loading:a,data:u}=i;return!a&&u?c.jsx(ti,{vote:n,openedQuestion:u}):null},hi=({gamification:i})=>{var n;const a=re.useStore(i.openedQuestion.$store),u=re.useStore(i.openedQuestion.$extendedStore);if(!a)return null;const d=a.type;return c.jsxs(ui,{children:[c.jsx(mt,{close:i.closeQuestion,type:((n=a.attributes)==null?void 0:n.type)||C.QuestionType.UNSET}),d==="question"&&c.jsx(fi,{vote:i.submitAnswer,extendedQuestion:u}),d!=="question"&&c.jsx(di,{openedQuestion:a})]})};const pi=p.styled_default("div")({name:"t",class:"tcim9sm",propsAsIs:!1}),mi=p.styled_default("div")({name:"e",class:"e8wco6o",propsAsIs:!1}),yi=p.styled_default("button")({name:"n",class:"n1ardwzl",propsAsIs:!1}),gi=p.styled_default("span")({name:"i",class:"i1vk8ojx",propsAsIs:!1});var ge=(i=>(i.HOME="home",i.LEADERBOARD="leaderboard",i))(ge||{});const it=({title:i,active:n,onClick:a})=>c.jsx(yi,{onClick:a,"data-selected":n,children:c.jsx(gi,{children:i})}),xi=({activePage:i="home",toggleActivePage:n})=>c.jsx(pi,{children:c.jsxs(mi,{"data-position":i==="home"?"left":"right",children:[c.jsx(it,{title:"Home",active:i==="home",onClick:()=>n("home")}),c.jsx(it,{title:"Leader Board",active:i==="leaderboard",onClick:()=>n("leaderboard")})]})});var It={},wt={},Te={};Te.byteLength=_i;Te.toByteArray=Ai;Te.fromByteArray=ji;var Z=[],q=[],Ii=typeof Uint8Array<"u"?Uint8Array:Array,Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ce=0,wi=Oe.length;ce<wi;++ce)Z[ce]=Oe[ce],q[Oe.charCodeAt(ce)]=ce;q["-".charCodeAt(0)]=62;q["_".charCodeAt(0)]=63;function _t(i){var n=i.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=i.indexOf("=");a===-1&&(a=n);var u=a===n?0:4-a%4;return[a,u]}function _i(i){var n=_t(i),a=n[0],u=n[1];return(a+u)*3/4-u}function Mi(i,n,a){return(n+a)*3/4-a}function Ai(i){var n,a=_t(i),u=a[0],d=a[1],g=new Ii(Mi(i,u,d)),y=0,o=d>0?u-4:u,x;for(x=0;x<o;x+=4)n=q[i.charCodeAt(x)]<<18|q[i.charCodeAt(x+1)]<<12|q[i.charCodeAt(x+2)]<<6|q[i.charCodeAt(x+3)],g[y++]=n>>16&255,g[y++]=n>>8&255,g[y++]=n&255;return d===2&&(n=q[i.charCodeAt(x)]<<2|q[i.charCodeAt(x+1)]>>4,g[y++]=n&255),d===1&&(n=q[i.charCodeAt(x)]<<10|q[i.charCodeAt(x+1)]<<4|q[i.charCodeAt(x+2)]>>2,g[y++]=n>>8&255,g[y++]=n&255),g}function Ei(i){return Z[i>>18&63]+Z[i>>12&63]+Z[i>>6&63]+Z[i&63]}function Ti(i,n,a){for(var u,d=[],g=n;g<a;g+=3)u=(i[g]<<16&16711680)+(i[g+1]<<8&65280)+(i[g+2]&255),d.push(Ei(u));return d.join("")}function ji(i){for(var n,a=i.length,u=a%3,d=[],g=16383,y=0,o=a-u;y<o;y+=g)d.push(Ti(i,y,y+g>o?o:y+g));return u===1?(n=i[a-1],d.push(Z[n>>2]+Z[n<<4&63]+"==")):u===2&&(n=(i[a-2]<<8)+i[a-1],d.push(Z[n>>10]+Z[n>>4&63]+Z[n<<2&63]+"=")),d.join("")}var We={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */We.read=function(i,n,a,u,d){var g,y,o=d*8-u-1,x=(1<<o)-1,E=x>>1,j=-7,v=a?d-1:0,I=a?-1:1,A=i[n+v];for(v+=I,g=A&(1<<-j)-1,A>>=-j,j+=o;j>0;g=g*256+i[n+v],v+=I,j-=8);for(y=g&(1<<-j)-1,g>>=-j,j+=u;j>0;y=y*256+i[n+v],v+=I,j-=8);if(g===0)g=1-E;else{if(g===x)return y?NaN:(A?-1:1)*(1/0);y=y+Math.pow(2,u),g=g-E}return(A?-1:1)*y*Math.pow(2,g-u)};We.write=function(i,n,a,u,d,g){var y,o,x,E=g*8-d-1,j=(1<<E)-1,v=j>>1,I=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=u?0:g-1,T=u?1:-1,h=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(o=isNaN(n)?1:0,y=j):(y=Math.floor(Math.log(n)/Math.LN2),n*(x=Math.pow(2,-y))<1&&(y--,x*=2),y+v>=1?n+=I/x:n+=I*Math.pow(2,1-v),n*x>=2&&(y++,x/=2),y+v>=j?(o=0,y=j):y+v>=1?(o=(n*x-1)*Math.pow(2,d),y=y+v):(o=n*Math.pow(2,v-1)*Math.pow(2,d),y=0));d>=8;i[a+A]=o&255,A+=T,o/=256,d-=8);for(y=y<<d|o,E+=d;E>0;i[a+A]=y&255,A+=T,y/=256,E-=8);i[a+A-T]|=h*128};/*!
2
2
  * The buffer module from node.js, for the browser.
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -1,7 +1,7 @@
1
1
  import { jsxs as v, jsx as p, Fragment as ye } from "react/jsx-runtime";
2
2
  import { s as g, C as Q } from "./index-616b0bcd.js";
3
3
  import { useStore as re } from "@nanostores/react";
4
- import { o as Et, r as Tt, w as Wt, e as We, n as Vt, f as Ht } from "./masters-e3fde211.js";
4
+ import { o as Et, r as Tt, w as Wt, e as We, n as Vt, f as Ht } from "./masters-915bbbeb.js";
5
5
  import { useState as xe, useCallback as Ve, useMemo as Se, Component as Gt, createElement as ze, PureComponent as vt } from "react";
6
6
  import { QuestionType as q, QuestionStatus as we, QuestionImages as ue, PickHistoryStatus as Ne } from "@streamlayer/sdk-web-types";
7
7
  import { o as Nt, i as _t, r as Zt, a as Jt, n as Kt } from "./common-2d2a3ba3.js";
@@ -0,0 +1 @@
1
+ "use strict";const s=require("react/jsx-runtime"),I=require("./index-89c19a6e.cjs"),o=require("react"),u=require("@streamlayer/sdk-web-types"),y=require("@nanostores/react"),A=require("@streamlayer/sdk-web-interfaces"),e=require("./index-b0206045.cjs"),S=require("@streamlayer/sdk-web-notifications"),V=({feature:t,sdk:a,children:l,className:n})=>{const d=y.useStore(t.status),{slStreamId:r}=y.useStore(a.sdkStore);return r!=null&&r.loading?s.jsx("div",{className:n,children:"event is loading..."}):r!=null&&r.data?d!==A.FeatureStatus.Ready?s.jsx("div",{className:n,children:"wait feature..."}):l:s.jsx("div",{className:n,children:"event is forbidden..."})},K=o.lazy(()=>Promise.resolve().then(()=>require("./index-6b781147.cjs"))),H=({sdk:t,feature:a,className:l})=>{const n=o.useMemo(()=>a&&a.featureConfig.get().type===u.FeatureType.GAMES?s.jsx(V,{className:l,sdk:t,feature:a,children:s.jsx(K,{className:l,gamification:a,sdk:t})}):null,[t,a,l]);return s.jsx(o.Suspense,{fallback:s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:n})};const J=e.styled_default("button")({name:"e",class:"enu64b2",propsAsIs:!1}),X=e.styled_default("span")({name:"t",class:"tw2meku",propsAsIs:!1}),Z=e.styled_default("span")({name:"a",class:"aka8vam",propsAsIs:!1}),N=({disabled:t,active:a,onClick:l,label:n,icon:d})=>s.jsx(J,{onClick:l,disabled:t,"data-selected":a,children:s.jsxs(s.Fragment,{children:[d&&s.jsx(X,{children:d}),s.jsx(Z,{children:n})]})});const ss=()=>e.C1,es=e.styled_default(ss())({name:"a",class:"a10lggiw",propsAsIs:!0}),g="channels",ts=t=>{var a;return s.jsx(N,{...t,id:"channels",label:"Channels",icon:s.jsx(es,{name:"icon-btn-channels","data-selected":(a=t.active)==null?void 0:a.toString()})})};const as=()=>e.C1,ls=e.styled_default(as())({name:"d",class:"d1x5s8ie",propsAsIs:!0}),f="featuredGroups",ns=t=>{var a;return s.jsx(N,{...t,label:"FG+",id:"featuredGroups",icon:s.jsx(ls,{name:"icon-btn-feature-groups","data-selected":(a=t.active)==null?void 0:a.toString()})})};const rs=()=>e.C1,ds=e.styled_default(rs())({name:"n",class:"ntav86o",propsAsIs:!0}),k="leaderboard",cs=t=>{var a;return s.jsx(N,{...t,label:"Leader Board",id:"leaderboard",icon:s.jsx(ds,{name:"icon-btn-leaderboard","data-selected":(a=t.active)==null?void 0:a.toString()})})};const is=e.styled_default("div")({name:"n",class:"n1rlvhvz",propsAsIs:!1}),os=({children:t,className:a})=>s.jsx(is,{className:a,children:t});const us=()=>os,ps=e.styled_default(us())({name:"n",class:"n9bnom",propsAsIs:!0}),xs=({activeOverlay:t,setActiveOverlay:a,sdkReady:l,className:n})=>s.jsxs(ps,{className:n,children:[s.jsx(ts,{active:t===g,onClick:()=>a(g)}),s.jsx(ns,{active:t===f,disabled:!l,onClick:()=>{a(f)}}),s.jsx(cs,{active:t===k,onClick:()=>a(k)})]}),M={[u.QuestionType.TWEET]:{label:"Insight",iconName:"icon-insight"},[u.QuestionType.PROMOTION]:{label:"Insight",iconName:"icon-insight"},[u.QuestionType.UNSET]:void 0,[u.QuestionType.FACTOID]:{label:"Insight",iconName:"icon-insight"},[u.QuestionType.POLL]:{label:"Poll",iconName:"icon-poll"},[u.QuestionType.TRIVIA]:{label:"Trivia",iconName:"icon-trivia"},[u.QuestionType.PREDICTION]:{label:"Prediction",iconName:"icon-prediction"}};const fs=e.styled_default("div")({name:"i",class:"i1bwjtdb",propsAsIs:!1}),js=e.styled_default("video")({name:"e",class:"enb7moc",propsAsIs:!1}),ys=e.styled_default("img")({name:"r",class:"r1ws5lyh",propsAsIs:!1}),ms=e.styled_default("div")({name:"s",class:"soibf55",propsAsIs:!1}),U=({poster:t,source:a})=>{const l=o.useRef(null),[n,d]=o.useState(!1),[r,c]=o.useState(!0);return s.jsxs(fs,{onClick:()=>{const i=l==null?void 0:l.current;i&&d(j=>j?(i.pause(),!1):(i.play(),c(!1),!0))},children:[s.jsx(js,{ref:l,src:a,onEnded:()=>{var i;(i=l==null?void 0:l.current)==null||i.load(),d(!1),c(!0)},style:{visibility:r?"hidden":"visible"}}),s.jsx(ys,{src:t,style:{visibility:r?"visible":"hidden"}}),s.jsx(ms,{children:!n&&s.jsx(e.C1,{name:"icon-play"})})]})};const hs=e.styled_default("div")({name:"r",class:"rcr31jh",propsAsIs:!1}),vs=e.styled_default("div")({name:"i",class:"ihj4z8w",propsAsIs:!1}),_s=e.styled_default("h3")({name:"t",class:"t1oks4sz",propsAsIs:!1}),Is=e.styled_default("div")({name:"n",class:"n18s3mno",propsAsIs:!1}),As=e.styled_default("button")({name:"l",class:"lc8mqwv",propsAsIs:!1}),$s=({video:t,heading:a,body:l,action:n})=>s.jsxs(hs,{children:[(t==null?void 0:t.url)&&s.jsx(U,{source:t.url,poster:t.thumbnailUrl}),s.jsxs(vs,{children:[s.jsx(_s,{children:a}),s.jsx(Is,{children:l}),n&&s.jsx(As,{onClick:n,children:"View Insight"})]})]});const gs=()=>p,bs=()=>p,ks=()=>p,Ss=()=>p,Ts=()=>p,ws=()=>p,Ns=()=>p,Cs=()=>p,Es=()=>p,Fs=()=>p,qs=()=>p,Os=()=>p,Ls=()=>p,Rs=()=>p,h=e.styled_default("div")({name:"o",class:"oeeit6",propsAsIs:!1}),p=e.styled_default("div")({name:"e",class:"e1v245rb",propsAsIs:!1}),zs=e.styled_default(gs())({name:"n",class:"neiocf7",propsAsIs:!0}),Ps=e.styled_default(bs())({name:"t",class:"t1vmkqme",propsAsIs:!0}),Qs=e.styled_default(ks())({name:"r",class:"r1ln3ryw",propsAsIs:!0}),C=e.styled_default(Ss())({name:"a",class:"a1s6rgzs",propsAsIs:!0}),E=e.styled_default(Ts())({name:"h",class:"h13kvn19",propsAsIs:!0}),F=e.styled_default(ws())({name:"d",class:"dcrmlko",propsAsIs:!0}),q=e.styled_default(Ns())({name:"m",class:"m16755u3",propsAsIs:!0}),O=e.styled_default(Cs())({name:"c",class:"cdwashk",propsAsIs:!0}),L=e.styled_default(Es())({name:"w",class:"w1lh1meo",propsAsIs:!0}),R=e.styled_default(Fs())({name:"p",class:"p1y0qeoo",propsAsIs:!0}),Ds=e.styled_default(qs())({name:"L",class:"l1wanjqa",propsAsIs:!0}),Gs=e.styled_default(Os())({name:"l",class:"l1aaziu",propsAsIs:!0}),Ms=e.styled_default(Ls())({name:"f",class:"fwkppnn",propsAsIs:!0}),Us=e.styled_default(Rs())({name:"u",class:"uw10l4r",propsAsIs:!0}),Ws=({step:t,correct:a})=>s.jsxs(s.Fragment,{children:[s.jsxs(h,{"data-active":t===1,"data-first-screen":"true",children:[s.jsx(zs,{}),s.jsx(Ps,{}),s.jsx(Qs,{})]}),s.jsxs(h,{"data-active":t===2,children:[s.jsx(C,{}),s.jsx(E,{}),s.jsx(F,{})]}),s.jsxs(h,{"data-active":t===3,children:[s.jsx(C,{}),s.jsx(E,{}),s.jsx(F,{})]}),a?s.jsxs(s.Fragment,{children:[s.jsxs(h,{"data-active":t===4,"data-correct":"false",children:[s.jsx(q,{}),s.jsx(O,{}),s.jsx(L,{}),s.jsx(R,{})]}),s.jsxs(h,{"data-active":t===5,"data-correct":"false","data-last-screen":"true",children:[s.jsx(q,{}),s.jsx(O,{}),s.jsx(L,{}),s.jsx(R,{})]})]}):s.jsxs(h,{"data-active":t===4,"data-correct":"false","data-last-screen":"true",children:[s.jsx(Ds,{}),s.jsx(Gs,{}),s.jsx(Ms,{}),s.jsx(Us,{})]})]});const Ys=()=>$,Bs=()=>e.C1,Vs=()=>e.C1,Ks=e.styled_default("div")({name:"c",class:"c1iwvsrd",propsAsIs:!1}),Hs=e.styled_default("div")({name:"s",class:"s16ztc4y",propsAsIs:!1}),v=e.styled_default("div")({name:"l",class:"lpu10kq",propsAsIs:!1}),_=e.styled_default("div")({name:"p",class:"pv9ujcb",propsAsIs:!1}),$=e.styled_default("div")({name:"o",class:"ow7lyj4",propsAsIs:!1}),z=e.styled_default(Ys())({name:"d",class:"d1xtwn2m",propsAsIs:!0}),b=e.styled_default("div")({name:"f",class:"f1bvvudl",propsAsIs:!1}),T=e.styled_default(Bs())({name:"g",class:"g56gji0",propsAsIs:!0}),P=e.styled_default("button")({name:"x",class:"x8gvwg8",propsAsIs:!1}),Q=e.styled_default(Vs())({name:"u",class:"uckrlxs",propsAsIs:!0}),Js=({close:t,votedAnswer:a,correct:l,correctAnswerTitle:n})=>{const[d,r]=o.useState(1);return o.useEffect(()=>{const c=setInterval(()=>{r(i=>l&&i>4||!l&&i>3?i:++i)},6e3);return()=>clearInterval(c)},[l]),s.jsxs(Ks,{"data-bg-color-white":d>3,children:[s.jsx(Ws,{step:d,correct:l}),s.jsxs(Hs,{"data-active-number":d,children:[s.jsxs(v,{children:[s.jsx(_,{children:"Master"}),s.jsx(z,{children:"FEATURED GROUPS +"})]}),s.jsxs(v,{children:[s.jsx(_,{children:"Prediction results are in!"}),s.jsx(z,{children:"FEATURED GROUPS +"})]}),s.jsxs(v,{children:[s.jsx(_,{children:"Who holds the most birdies in golf?"}),s.jsxs($,{children:["Your Pick: ",s.jsx(b,{children:a==null?void 0:a.title})]})]}),l?s.jsxs(s.Fragment,{children:[s.jsxs(v,{"data-color-green":"true",children:[s.jsx(_,{children:"Congratulations! You answered correctly."}),s.jsxs($,{children:[s.jsx(T,{name:"selected"}),"Your Pick: ",s.jsx(b,{children:a==null?void 0:a.title})]})]}),s.jsxs(v,{"data-color-green":"true",children:[s.jsx(P,{onClick:t,children:s.jsx(Q,{name:"icon-cross"})}),s.jsxs(_,{children:["+",a==null?void 0:a.points," points"]}),s.jsxs($,{children:[s.jsx(T,{name:"selected"}),"Your Pick: ",s.jsx(b,{children:a==null?void 0:a.title})]})]})]}):s.jsxs(v,{children:[s.jsx(P,{onClick:t,children:s.jsx(Q,{name:"icon-cross"})}),s.jsxs(_,{"data-incorrect":"true",children:["Better luck next time! Correct: ",n,"."]}),s.jsxs($,{"data-incorrect":"true",children:[s.jsx(T,{name:"circleClose"}),"Your Pick: ",s.jsx(b,{children:a==null?void 0:a.title})]})]})]})]})};const Xs=()=>e.C1,Zs=()=>e.C1,se=e.styled_default("div")({name:"p",class:"p16oo5uk",propsAsIs:!1}),ee=e.styled_default("div")({name:"a",class:"a18c5k3h",propsAsIs:!1}),te=e.styled_default(Xs())({name:"c",class:"czv5t8k",propsAsIs:!0}),ae=e.styled_default("div")({name:"s",class:"s1wp1emp",propsAsIs:!1}),le=e.styled_default(Zs())({name:"l",class:"l1nz0q6x",propsAsIs:!0}),ne=e.styled_default("span")({name:"g",class:"g1jhb9lu",propsAsIs:!1}),re=e.styled_default("div")({name:"d",class:"ds6gfsv",propsAsIs:!1}),de=e.styled_default("button")({name:"x",class:"xkzz16s",propsAsIs:!1});const ce=e.styled_default("div")({name:"i",class:"i1j5f618",propsAsIs:!1}),ie=e.styled_default("div")({name:"n",class:"n1fqaem9",propsAsIs:!1}),oe=e.styled_default("img")({name:"o",class:"o1jovu9m",propsAsIs:!1}),ue=e.styled_default("div")({name:"a",class:"a12ibiz8",propsAsIs:!1}),pe=e.styled_default("div")({name:"r",class:"r1r4eua",propsAsIs:!1}),xe=e.styled_default("div")({name:"l",class:"l1ymr3ce",propsAsIs:!1}),fe=({image:t,name:a,userName:l,verified:n})=>s.jsxs(ce,{children:[s.jsx(ie,{children:s.jsx(oe,{src:t})}),s.jsxs(ue,{children:[s.jsxs(pe,{children:[a," ",n&&s.jsx(e.C1,{name:"icon-twitter-verified"})]}),s.jsx(xe,{children:l})]})]});const je=e.styled_default("div")({name:"t",class:"tfx5umz",propsAsIs:!1}),ye=e.styled_default("button")({name:"e",class:"e1a1fcxr",propsAsIs:!1}),me=e.styled_default("div")({name:"i",class:"i1iknwgy",propsAsIs:!1}),he=e.styled_default("img")({name:"n",class:"n1uc9lmn",propsAsIs:!1}),ve=e.styled_default("div")({name:"a",class:"ae4b7qd",propsAsIs:!1}),_e=e.styled_default("div")({name:"l",class:"l1udpjlr",propsAsIs:!1}),Ie=e.styled_default("blockquote")({name:"d",class:"d7ui2j0",propsAsIs:!1}),Ae=({account:t,body:a,image:l,title:n,action:d})=>s.jsxs(je,{children:[s.jsx(_e,{children:s.jsx(Ie,{children:n})}),s.jsxs(ve,{children:[s.jsx(fe,{...t}),s.jsx(me,{children:a}),l&&s.jsx(he,{src:l})]}),d&&s.jsx(ye,{onClick:d,children:"View Tweet"})]}),D=({close:t,action:a,data:{questionType:l,question:n,insight:d,tweet:r}})=>{const c=M[l];return c?n!=null&&n.predictionResult?s.jsx(Js,{close:t,...n}):s.jsxs(se,{children:[s.jsx(ee,{onClick:t,children:s.jsx(te,{name:"icon-cross"})}),l!==u.QuestionType.TWEET&&s.jsxs(ae,{children:[s.jsx(le,{name:c.iconName}),s.jsx(ne,{children:c.label})]}),l===u.QuestionType.FACTOID&&s.jsx($s,{...d,action:a}),l===u.QuestionType.TWEET&&s.jsx(Ae,{...r,action:a}),l!==u.QuestionType.FACTOID&&l!==u.QuestionType.TWEET&&s.jsxs(s.Fragment,{children:[s.jsx(re,{children:n==null?void 0:n.title}),s.jsx(de,{onClick:a,children:"Answer"})]})]}):null};const $e=e.styled_default("div")({name:"s",class:"s1aopxp8",propsAsIs:!1}),ge="c1t0h6s",W=({children:t,style:a,className:l,hiding:n})=>s.jsx($e,{style:a,className:e.cx_default(l,n&&ge),children:t});const be=()=>W,G=e.styled_default(be())({name:"d",class:"d1qqtt3e",propsAsIs:!0}),ke=({sdk:t})=>{const a=t.getNotificationsStore(),l=y.useStore(a),n=o.useMemo(()=>{if(!(l!=null&&l.size))return null;for(const d of l.values())if(d.type===S.NotificationType.ONBOARDING)return d;return l.values().next().value},[l]);return(n==null?void 0:n.type)===S.NotificationType.QUESTION?s.jsx(G,{hiding:n.hiding,children:s.jsx("div",{children:s.jsx(D,{...n})})}):(n==null?void 0:n.type)===S.NotificationType.QUESTION_RESOLVED?s.jsx(G,{hiding:n.hiding,children:s.jsx("div",{children:s.jsx(D,{...n})})}):null};const Se=()=>Y,Te=e.styled_default("div")({name:"i",class:"idhrx8x",propsAsIs:!1}),w=e.styled_default("div")({name:"r",class:"r1k6v4ep",propsAsIs:!1}),Y=e.styled_default("div")({name:"n",class:"n1v8kucd",propsAsIs:!1}),we=e.styled_default(Se())({name:"e",class:"e16yw7z1",propsAsIs:!0}),Ne=t=>{const[a,l]=o.useState(!1),n=y.useStore(t.status),{data:d}=y.useStore(t.getUserStore()),r=n==="ready",[c,i]=o.useState(f),j=o.useCallback((x,m)=>{i(m),m===f?(x&&t.createEventSession(x),t.openFeature(u.FeatureType.GAMES)):t.closeFeature()},[t]);return o.useEffect(()=>{!r&&c===f&&(i(g),t.closeFeature())},[r,c,t]),{sdkEnabled:a,sdkReady:r,activeOverlay:c,activateAndLoadOverlay:j,enableSdk:x=>{t.initializeApp().then(({enabled:m,err:B})=>{if(l(!0),B){j(x,g);return}if(m){j(x,f);return}})},disableSdk:()=>{l(!1),t.disableApp()},isLogged:!!d}},Ce=t=>{const a=y.useStore(t.getActiveFeature()),l=y.useStore(t.streamStore()),[n,d]=o.useState(null);return o.useEffect(()=>{const r=t.getFeatures();if(a)for(const[c,i]of r)c===a?i.status.get()===A.FeatureStatus.Suspended&&(i.enable(),d(i)):i.status.get()===A.FeatureStatus.Ready&&i.disable();else{for(const[,c]of r)c.status.get()===A.FeatureStatus.Ready&&c.disable();d(null)}return()=>{for(const[,c]of r)c.status.get()===A.FeatureStatus.Ready&&c.disable()}},[a,t,l]),[a,n]},Ee=({sdk:t,className:a})=>{const[,l]=Ce(t);return s.jsx(H,{className:a,feature:l,sdk:t})},Fe=({sdk:t,overlays:a,children:l})=>{const{sdkEnabled:n,sdkReady:d,activeOverlay:r,activateAndLoadOverlay:c,enableSdk:i,disableSdk:j,isLogged:x}=Ne(t);return s.jsxs(Te,{children:[n&&s.jsx(xs,{sdkReady:d,activeOverlay:r,className:I.f,setActiveOverlay:m=>c("",m)}),n&&s.jsx(ke,{sdk:t}),s.jsx(w,{"data-nav":n.toString(),style:{display:!n||r===g?"block":"none"},children:l&&l({enableSdk:i,disableSdk:j})}),s.jsx(w,{"data-nav":n.toString(),style:{display:r===k?"block":"none"},children:a&&r===k&&a[r]}),x&&n&&r===f&&s.jsx(Ee,{className:I.f,sdk:t}),!x&&n&&r===f&&s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})},qe=({sdkKey:t,plugins:a,children:l,production:n=!0})=>s.jsx(I.StreamLayerProvider,{sdkKey:t,plugins:a,production:n,autoEnable:!1,children:l}),Oe=({children:t,overlays:a})=>{const{sdk:l,status:n}=o.useContext(I.StreamLayerContext);if(n===I.StreamLayerStatus.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return l?s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(I.p,{style:{height:"100%"},children:s.jsx(Fe,{sdk:l,overlays:a,children:t})})}):t({})};exports.MastersStreamLayerProvider=qe;exports.MastersStreamLayerSDKReact=Oe;exports.e=we;exports.f=W;exports.n=Y;exports.o=M;exports.r=w;exports.w=U;