@streamlayer/react 1.23.1 → 1.23.2

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 (159) hide show
  1. package/lib/cjs/Question.js +1 -1
  2. package/lib/cjs/advertisement.js +28 -223
  3. package/lib/cjs/analytics.js +1 -1
  4. package/lib/cjs/auth.js +1 -1
  5. package/lib/cjs/bet-pack.js +1 -1
  6. package/lib/cjs/feature.js +1 -1
  7. package/lib/cjs/gamification-feature.js +1 -1
  8. package/lib/cjs/gamification-feature2.js +1 -1
  9. package/lib/cjs/hooks-WfHlJH12.js +1 -1
  10. package/lib/cjs/index-eShKGO10.js +1 -5
  11. package/lib/cjs/index.js +1 -1
  12. package/lib/cjs/index10.js +1 -1
  13. package/lib/cjs/index11.js +3 -4
  14. package/lib/cjs/index12.js +1 -1
  15. package/lib/cjs/index13.js +3 -1
  16. package/lib/cjs/index14.js +1 -1
  17. package/lib/cjs/index15.js +1 -1
  18. package/lib/cjs/index16.js +3 -5
  19. package/lib/cjs/index2.js +1 -1
  20. package/lib/cjs/index3.js +1 -1
  21. package/lib/cjs/index4.js +3 -5
  22. package/lib/cjs/index5.js +1 -1
  23. package/lib/cjs/index6.js +1 -1
  24. package/lib/cjs/index7.js +1 -1
  25. package/lib/cjs/index8.js +1 -1
  26. package/lib/cjs/index9.js +1 -1
  27. package/lib/cjs/insight.js +1 -1
  28. package/lib/cjs/masters.js +1 -1
  29. package/lib/cjs/masters2.js +1 -13
  30. package/lib/cjs/notification.js +1 -1
  31. package/lib/cjs/pause-ad.js +1 -1
  32. package/lib/cjs/points.js +1 -1
  33. package/lib/cjs/polymarket.js +5 -15
  34. package/lib/cjs/sl-types.js +1 -15
  35. package/lib/cjs/storage.js +1 -1
  36. package/lib/cjs/style.css +1 -0
  37. package/lib/cjs/theme.js +1 -17
  38. package/lib/cjs/useStreamLayerApp.js +1 -1
  39. package/lib/cjs/useStreamLayerApp2.js +3 -17
  40. package/lib/cjs/utils.js +1 -47
  41. package/lib/classic/cjs/Question.js +1 -1
  42. package/lib/classic/cjs/advertisement.js +28 -223
  43. package/lib/classic/cjs/analytics.js +1 -1
  44. package/lib/classic/cjs/auth.js +1 -1
  45. package/lib/classic/cjs/bet-pack.js +3 -5
  46. package/lib/classic/cjs/feature.js +1 -1
  47. package/lib/classic/cjs/gamification-feature.js +1 -1
  48. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -1
  49. package/lib/classic/cjs/index-eShKGO10.js +1 -5
  50. package/lib/classic/cjs/index.js +1 -1
  51. package/lib/classic/cjs/index10.js +1 -1
  52. package/lib/classic/cjs/index11.js +1 -1
  53. package/lib/classic/cjs/index12.js +1 -1
  54. package/lib/classic/cjs/index13.js +3 -4
  55. package/lib/classic/cjs/index2.js +3 -5
  56. package/lib/classic/cjs/index3.js +1 -1
  57. package/lib/classic/cjs/index4.js +1 -1
  58. package/lib/classic/cjs/index5.js +1 -1
  59. package/lib/classic/cjs/index6.js +1 -1
  60. package/lib/classic/cjs/index7.js +1 -1
  61. package/lib/classic/cjs/index8.js +1 -1
  62. package/lib/classic/cjs/index9.js +3 -1
  63. package/lib/classic/cjs/insight.js +1 -1
  64. package/lib/classic/cjs/notification.js +1 -1
  65. package/lib/classic/cjs/notification2.js +1 -1
  66. package/lib/classic/cjs/pause-ad.js +1 -1
  67. package/lib/classic/cjs/points.js +1 -1
  68. package/lib/classic/cjs/polymarket.js +5 -15
  69. package/lib/classic/cjs/sl-types.js +1 -15
  70. package/lib/classic/cjs/style.css +1 -0
  71. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  72. package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
  73. package/lib/classic/cjs/utils.js +1 -47
  74. package/lib/classic/es/Question.js +277 -264
  75. package/lib/classic/es/advertisement.js +34990 -18881
  76. package/lib/classic/es/analytics.js +58 -56
  77. package/lib/classic/es/auth.js +14 -8
  78. package/lib/classic/es/bet-pack.js +2448 -2419
  79. package/lib/classic/es/feature.js +93 -48
  80. package/lib/classic/es/gamification-feature.js +2 -2
  81. package/lib/classic/es/hooks-WfHlJH12.js +78 -78
  82. package/lib/classic/es/index-eShKGO10.js +948 -948
  83. package/lib/classic/es/index.js +13 -13
  84. package/lib/classic/es/index10.js +68 -67
  85. package/lib/classic/es/index11.js +2903 -2159
  86. package/lib/classic/es/index12.js +124 -119
  87. package/lib/classic/es/index13.js +581 -566
  88. package/lib/classic/es/index2.js +2098 -1763
  89. package/lib/classic/es/index3.js +11 -11
  90. package/lib/classic/es/index4.js +127 -127
  91. package/lib/classic/es/index5.js +3 -4
  92. package/lib/classic/es/index6.js +8 -3
  93. package/lib/classic/es/index7.js +6 -5
  94. package/lib/classic/es/index8.js +8 -7
  95. package/lib/classic/es/index9.js +225 -223
  96. package/lib/classic/es/insight.js +58 -53
  97. package/lib/classic/es/notification.js +3 -3
  98. package/lib/classic/es/notification2.js +764 -722
  99. package/lib/classic/es/pause-ad.js +190 -167
  100. package/lib/classic/es/points.js +55 -48
  101. package/lib/classic/es/polymarket.js +4209 -4031
  102. package/lib/classic/es/sl-types.js +193 -125
  103. package/lib/classic/es/useStreamLayerApp.js +2 -2
  104. package/lib/classic/es/useStreamLayerApp2.js +9714 -7603
  105. package/lib/classic/es/utils.js +28 -28
  106. package/lib/classic/index.d.ts +1 -0
  107. package/lib/classic/style.css +1 -0
  108. package/lib/dist/cjs/gamification-feature.js +1 -1
  109. package/lib/dist/cjs/index-eShKGO10.js +1 -5
  110. package/lib/dist/cjs/index.js +1 -1
  111. package/lib/dist/cjs/masters.js +3 -77
  112. package/lib/dist/es/gamification-feature.js +2 -2
  113. package/lib/dist/es/index-eShKGO10.js +948 -948
  114. package/lib/dist/es/index.js +7 -8
  115. package/lib/dist/es/masters.js +18197 -14750
  116. package/lib/dist/index.d.ts +12 -2
  117. package/lib/dist/style.css +1 -1
  118. package/lib/es/Question.js +108 -106
  119. package/lib/es/advertisement.js +34990 -18881
  120. package/lib/es/analytics.js +58 -56
  121. package/lib/es/auth.js +14 -8
  122. package/lib/es/bet-pack.js +29 -17
  123. package/lib/es/feature.js +93 -48
  124. package/lib/es/gamification-feature.js +2 -2
  125. package/lib/es/gamification-feature2.js +2 -2
  126. package/lib/es/hooks-WfHlJH12.js +78 -78
  127. package/lib/es/index-eShKGO10.js +948 -948
  128. package/lib/es/index.js +14 -13
  129. package/lib/es/index10.js +176 -166
  130. package/lib/es/index11.js +581 -566
  131. package/lib/es/index12.js +124 -119
  132. package/lib/es/index13.js +225 -223
  133. package/lib/es/index14.js +68 -67
  134. package/lib/es/index15.js +2903 -2159
  135. package/lib/es/index16.js +1005 -806
  136. package/lib/es/index2.js +1117 -984
  137. package/lib/es/index3.js +3 -4
  138. package/lib/es/index4.js +2424 -2407
  139. package/lib/es/index5.js +11 -11
  140. package/lib/es/index6.js +127 -127
  141. package/lib/es/index7.js +8 -3
  142. package/lib/es/index8.js +5 -5
  143. package/lib/es/index9.js +8 -7
  144. package/lib/es/insight.js +58 -53
  145. package/lib/es/masters.js +6 -5
  146. package/lib/es/masters2.js +696 -559
  147. package/lib/es/notification.js +696 -655
  148. package/lib/es/pause-ad.js +190 -167
  149. package/lib/es/points.js +56 -49
  150. package/lib/es/polymarket.js +4209 -4031
  151. package/lib/es/sl-types.js +200 -132
  152. package/lib/es/storage.js +75 -74
  153. package/lib/es/theme.js +177 -31
  154. package/lib/es/useStreamLayerApp.js +2 -2
  155. package/lib/es/useStreamLayerApp2.js +9714 -7603
  156. package/lib/es/utils.js +28 -28
  157. package/lib/index.d.ts +1 -0
  158. package/lib/style.css +1 -1
  159. package/package.json +23 -20
@@ -1,5 +1,3 @@
1
- "use strict";const g2=require("nanostores"),M=require("./feature.js"),u=require("react"),s=require("./sl-types.js"),e=require("react/jsx-runtime"),T=require("./index9.js"),z=require("./index12.js"),O=require("react-dom"),v2=require("./utils.js"),q=require("./storage.js"),j2=require("./index10.js"),u2=require("./index13.js"),b=require("./useStreamLayerApp2.js"),$=require("./index6.js"),I2=require("./index5.js"),A2=require("./index11.js"),L2=require("./analytics.js"),w2=i=>g2.atom(i),b2=i=>{const t=s.useStore(i.getActiveFeature()),n=s.useStore(i.streamStore()),[l,r]=u.useState(null);return u.useEffect(()=>{const o=i.getFeatures();if(!t)r(null);else for(const[c,d]of o)c===t?(d.status.get()===M.FeatureStatus.Suspended&&d.enable(),r(d)):d.status.get()===M.FeatureStatus.Ready&&d.disable();return()=>{for(const[,c]of o)c.status.get()===M.FeatureStatus.Ready&&c.disable()}},[t,i,n]),[t,l]},$2=s.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),T2=s.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),H2=s.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),D=({indicator:i,title:t})=>e.jsxs($2,{children:[e.jsx(T2,{children:t}),e.jsx(H2,{children:i})]}),V2=s.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),k2=s.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),z2=s.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),R=({indicator:i,title:t})=>e.jsxs(V2,{children:[e.jsx(k2,{children:i}),e.jsx(z2,{children:t})]}),S2=s.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),q2=s.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),R2=s.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),F2=s.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),E2=s.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),B2=s.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),M2=s.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),N2=s.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),Z2=s.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),O2=s.styled_default("div")({name:"RtsContainer",class:"r2vgnxv",propsAsIs:!1}),W2=s.styled_default("div")({name:"RtsDivider",class:"roqn06j",propsAsIs:!1}),G2=s.styled_default("div")({name:"Rts",class:"r15adx7c",propsAsIs:!1}),Q=s.styled_default("div")({name:"RtsIndicator",class:"rv59lta",propsAsIs:!1}),U=s.styled_default("div")({name:"RtsLabel",class:"r55lotb",propsAsIs:!1}),P2=s.styled_default("div")({name:"Divider",class:"d1knfgqt",propsAsIs:!1}),D2=s.styled_default("div")({name:"Ranks",class:"r1mqo824",propsAsIs:!1}),Q2=s.styled_default("div")({name:"Statistics",class:"sxareh6",propsAsIs:!1}),U2=s.styled_default("div")({name:"AvatarPlaceholder",class:"amcu48h",propsAsIs:!1}),Y2=s.styled_default("button")({name:"UserAccountBtn",class:"u32nfkp",propsAsIs:!1}),K2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e",J2=({loading:i,hideFriendsRank:t,avatar:n,name:l,points:r,friendsRank:o,rank:c,streak:d,correct:h,incorrect:y,inTop:j,successRate:v})=>e.jsxs(S2,{"data-loading":i,children:[e.jsx(q2,{children:e.jsx(T.i,{loading:i,children:e.jsxs(F2,{children:[e.jsxs(Y2,{children:[n&&e.jsx(E2,{alt:"avatar",src:n}),!n&&e.jsx(U2,{children:z.I(l||"")})]}),e.jsxs(B2,{children:[e.jsx(M2,{children:l}),e.jsxs(N2,{children:[e.jsxs(O2,{children:[e.jsxs(G2,{children:[e.jsx(Z2,{alt:"rank-icon",src:K2}),e.jsxs(Q,{children:[z.s(r),e.jsx(U,{children:"PTS"})]})]}),t&&e.jsxs(Q,{children:[e.jsx(W2,{}),c||0,e.jsx(U,{children:"global rank"})]})]}),!t&&e.jsxs(e.Fragment,{children:[e.jsx(P2,{}),e.jsxs("div",{children:["TOP ",j||0,"%"]})]})]})]})]})})}),e.jsxs(R2,{children:[!t&&e.jsxs(D2,{children:[e.jsx(T.i,{loading:i,style:{width:"100%"},children:e.jsx(D,{indicator:o||0,title:"Friends rank"})}),e.jsx(T.i,{loading:i,style:{width:"100%"},children:e.jsx(D,{indicator:c||0,title:"Global rank"})})]}),e.jsx(T.i,{loading:i,children:e.jsxs(Q2,{children:[e.jsx(R,{indicator:d||0,title:"Win streak"}),e.jsx(R,{indicator:h||0,title:"Correct"}),e.jsx(R,{indicator:y||0,title:"Incorrect"}),e.jsx(R,{indicator:`${v||0}%`,title:"Succ. rate"})]})})]})]}),X2=s.styled_default("div")({name:"StaticContainer",class:"svm502q",propsAsIs:!1}),e0=`
2
- .sl-pill-button {
3
- display: none !important;
4
- }
5
- `,h2=()=>window.innerWidth>=s.A.md&&window.innerWidth<s.A.lg?76:53,Y=i=>{var t;const n=h2();return Math.round((((t=i.current)==null?void 0:t.getBoundingClientRect().y)||0)-n)<=0},s0=({children:i,container:t,useContainer:n,staticStyles:l})=>{const[r]=u.useState(()=>Y(t)),[o,c]=u.useState(!1);return u.useEffect(()=>{if(!t.current||!r)return c(!0),()=>{};const d=window.scrollY;return c(!0),()=>{Y(t)&&window.scrollTo({top:d,behavior:"instant"})}},[]),u.useEffect(()=>{if(o&&t.current&&r){const d=h2();window.scrollTo({top:t.current.offsetTop-d,behavior:"instant"})}},[o]),!t.current||!o?null:n?O.createPortal(e.jsxs(X2,{className:"StaticContainer",children:[i,e.jsx("style",{children:v2.u}),e.jsx("style",{children:e0})]}),t.current,"modal-node"):O.createPortal(e.jsxs(e.Fragment,{children:[i,e.jsx("style",{children:l})]}),t.current,"modal-node")},t0=s.styled_default("button")({name:"Container",class:"cpjnajb",propsAsIs:!1}),i0=s.styled_default("div")({name:"Content",class:"c4m6kaz",propsAsIs:!1}),n0=s.styled_default("span")({name:"Title",class:"t1h8t9cc",propsAsIs:!1}),l0=()=>e.jsx(t0,{children:e.jsxs(i0,{children:[e.jsx($.B1,{name:"iconCopySuccess"}),e.jsx(n0,{children:"Link Copied to Clipboard"})]})}),C2=i=>{const t=u.useRef(),[n,l]=u.useState(null),r=u.useCallback(async o=>{var c;if(o&&(c=navigator==null?void 0:navigator.clipboard)!=null&&c.writeText){t.current&&(clearTimeout(t.current),l(null));try{await navigator.clipboard.writeText(o),i.current&&(l(O.createPortal(e.jsx(l0,{}),i.current)),t.current=setTimeout(()=>{l(null)},1e3))}catch(d){console.error("Unable to copy to clipboard",d)}}},[i]);return u.useEffect(()=>()=>{clearTimeout(t.current)},[]),[r,n]};let L;typeof window<"u"?L=window:typeof self<"u"?L=self:L=b.global;let W=null,G=null;const K=20,N=L.clearTimeout,J=L.setTimeout,Z=L.cancelAnimationFrame||L.mozCancelAnimationFrame||L.webkitCancelAnimationFrame,X=L.requestAnimationFrame||L.mozRequestAnimationFrame||L.webkitRequestAnimationFrame;Z==null||X==null?(W=N,G=function(t){return J(t,K)}):(W=function([t,n]){Z(t),N(n)},G=function(t){const n=X(function(){N(l),t()}),l=J(function(){Z(n),t()},K);return[n,l]});function a0(i){let t,n,l,r,o,c,d;const h=typeof document<"u"&&document.attachEvent;if(!h){c=function(f){const C=f.__resizeTriggers__,A=C.firstElementChild,g=C.lastElementChild,w=A.firstElementChild;g.scrollLeft=g.scrollWidth,g.scrollTop=g.scrollHeight,w.style.width=A.offsetWidth+1+"px",w.style.height=A.offsetHeight+1+"px",A.scrollLeft=A.scrollWidth,A.scrollTop=A.scrollHeight},o=function(f){return f.offsetWidth!==f.__resizeLast__.width||f.offsetHeight!==f.__resizeLast__.height},d=function(f){if(f.target.className&&typeof f.target.className.indexOf=="function"&&f.target.className.indexOf("contract-trigger")<0&&f.target.className.indexOf("expand-trigger")<0)return;const C=this;c(this),this.__resizeRAF__&&W(this.__resizeRAF__),this.__resizeRAF__=G(function(){o(C)&&(C.__resizeLast__.width=C.offsetWidth,C.__resizeLast__.height=C.offsetHeight,C.__resizeListeners__.forEach(function(w){w.call(C,f)}))})};let a=!1,p="";l="animationstart";const m="Webkit Moz O ms".split(" ");let _="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),x="";{const f=document.createElement("fakeelement");if(f.style.animationName!==void 0&&(a=!0),a===!1){for(let C=0;C<m.length;C++)if(f.style[m[C]+"AnimationName"]!==void 0){x=m[C],p="-"+x.toLowerCase()+"-",l=_[C],a=!0;break}}}n="resizeanim",t="@"+p+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",r=p+"animation: 1ms "+n+"; "}const y=function(a){if(!a.getElementById("detectElementResize")){const p=(t||"")+".resize-triggers { "+(r||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',m=a.head||a.getElementsByTagName("head")[0],_=a.createElement("style");_.id="detectElementResize",_.type="text/css",i!=null&&_.setAttribute("nonce",i),_.styleSheet?_.styleSheet.cssText=p:_.appendChild(a.createTextNode(p)),m.appendChild(_)}};return{addResizeListener:function(a,p){if(h)a.attachEvent("onresize",p);else{if(!a.__resizeTriggers__){const m=a.ownerDocument,_=L.getComputedStyle(a);_&&_.position==="static"&&(a.style.position="relative"),y(m),a.__resizeLast__={},a.__resizeListeners__=[],(a.__resizeTriggers__=m.createElement("div")).className="resize-triggers";const x=m.createElement("div");x.className="expand-trigger",x.appendChild(m.createElement("div"));const f=m.createElement("div");f.className="contract-trigger",a.__resizeTriggers__.appendChild(x),a.__resizeTriggers__.appendChild(f),a.appendChild(a.__resizeTriggers__),c(a),a.addEventListener("scroll",d,!0),l&&(a.__resizeTriggers__.__animationListener__=function(A){A.animationName===n&&c(a)},a.__resizeTriggers__.addEventListener(l,a.__resizeTriggers__.__animationListener__))}a.__resizeListeners__.push(p)}},removeResizeListener:function(a,p){if(h)a.detachEvent("onresize",p);else if(a.__resizeListeners__.splice(a.__resizeListeners__.indexOf(p),1),!a.__resizeListeners__.length){a.removeEventListener("scroll",d,!0),a.__resizeTriggers__.__animationListener__&&(a.__resizeTriggers__.removeEventListener(l,a.__resizeTriggers__.__animationListener__),a.__resizeTriggers__.__animationListener__=null);try{a.__resizeTriggers__=!a.removeChild(a.__resizeTriggers__)}catch{}}}}}class r0 extends u.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:l,onResize:r}=this.props;if(this._parentNode){const o=window.getComputedStyle(this._parentNode)||{},c=parseFloat(o.paddingLeft||"0"),d=parseFloat(o.paddingRight||"0"),h=parseFloat(o.paddingTop||"0"),y=parseFloat(o.paddingBottom||"0"),j=this._parentNode.getBoundingClientRect(),v=j.height-h-y,a=j.width-c-d,p=this._parentNode.offsetHeight-h-y,m=this._parentNode.offsetWidth-c-d;(!n&&(this.state.height!==p||this.state.scaledHeight!==v)||!l&&(this.state.width!==m||this.state.scaledWidth!==a))&&(this.setState({height:p,width:m,scaledHeight:v,scaledWidth:a}),typeof r=="function"&&r({height:p,scaledHeight:v,scaledWidth:a,width:m}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props,n=this._autoSizer?this._autoSizer.parentNode:null;if(n!=null&&n.ownerDocument&&n.ownerDocument.defaultView&&n instanceof n.ownerDocument.defaultView.HTMLElement){this._parentNode=n;const l=n.ownerDocument.defaultView.ResizeObserver;l!=null?(this._resizeObserver=new l(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(n)):(this._detectElementResize=a0(t),this._detectElementResize.addResizeListener(n,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:n,defaultWidth:l,disableHeight:r=!1,disableWidth:o=!1,doNotBailOutOnEmptyChildren:c=!1,nonce:d,onResize:h,style:y={},tagName:j="div",...v}=this.props,{height:a,scaledHeight:p,scaledWidth:m,width:_}=this.state,x={overflow:"visible"},f={};let C=!1;return r||(a===0&&(C=!0),x.height=0,f.height=a,f.scaledHeight=p),o||(_===0&&(C=!0),x.width=0,f.width=_,f.scaledWidth=m),c&&(C=!1),u.createElement(j,{ref:this._setRef,style:{...x,...y},...v},!C&&t(f))}}const o0=s.styled_default("div")({name:"Container",class:"c1itm4k7",propsAsIs:!1}),d0=s.styled_default("div")({name:"IconContainer",class:"i1w4fsni",propsAsIs:!1}),c0=()=>$.B1,p0=s.styled_default(c0())({name:"InviteGameIcon",class:"i19m85r1",propsAsIs:!0}),u0=s.styled_default("div")({name:"Content",class:"c1mbu204",propsAsIs:!1}),h0=s.styled_default("div")({name:"Heading",class:"h1amdqtv",propsAsIs:!1}),C0=s.styled_default("div")({name:"Subtext",class:"s1lhlj9j",propsAsIs:!1}),f0=s.styled_default("div")({name:"LinkContainer",class:"l1wot35e",propsAsIs:!1}),m0=s.styled_default("div")({name:"LinkInfo",class:"l1jdw39q",propsAsIs:!1}),_0=s.styled_default("span")({name:"LinkTitle",class:"l1cr5mk",propsAsIs:!1}),x0=s.styled_default("span")({name:"LinkAddress",class:"lvi87q4",propsAsIs:!1}),y0=()=>$.B1,g0=s.styled_default(y0())({name:"LinkIcon",class:"l1pqlvw3",propsAsIs:!0}),f2=({inviteLink:i,inviteCardTitle:t,inviteCardSubtext:n,primaryColor:l,className:r})=>{const o=u.useRef(null),[c,d]=C2(o),[h]=L2.f$1({type:"invitation",action:"sent",payload:{from:b.InvitationFrom.MENU}});return e.jsxs(o0,{className:r,children:[e.jsx(d0,{style:{backgroundColor:l},children:e.jsx(p0,{name:"invite-game-icon"})}),e.jsxs(u0,{children:[e.jsx(h0,{children:t||""}),e.jsx(C0,{children:n||""})]}),i&&e.jsxs(f0,{ref:o,"data-a":"intr",onClick:h(()=>c(i)),children:[e.jsxs(m0,{children:[e.jsx(_0,{children:"Invite link"}),e.jsx(x0,{children:i})]}),e.jsx(g0,{name:"icon-copy"})]}),d]})},v0=()=>q.r,j0=s.styled_default(v0())({name:"Container",class:"cll3md7",propsAsIs:!0}),I0=()=>q.S,A0=s.styled_default(I0())({name:"ActionBtn",class:"a10g1iik",propsAsIs:!0}),L0=({questionId:i,...t})=>e.jsxs(j0,{"data-a":"intr","data-name":i,children:[e.jsx(j2.O,{questionId:i,...t}),e.jsx(A0,{"data-a":"intr","data-name":i,children:"View Insight"})]}),w0=()=>q.r,b0=s.styled_default(w0())({name:"Container",class:"cl56x6b",propsAsIs:!0}),$0=s.styled_default("button")({name:"ActionButton",class:"a11pzf92",propsAsIs:!1}),T0=s.styled_default("blockquote")({name:"Quote",class:"q1hbaleq",propsAsIs:!1}),H0=({...i})=>e.jsxs(b0,{"data-a":"intr","data-name":i.tweetId,children:[i.title&&e.jsx(T0,{children:i.title}),e.jsx(z.b,{...i}),e.jsx($0,{"data-a":"intr","data-name":i.tweetId,children:"View Insight"})]}),e2=s.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),V0=({questions:i,openQuestion:t,controlVideo:n})=>{const l=r=>{const o=r.target.getAttribute("data-name");o&&(u2.wt(),t(o,{openedFrom:"list"}))};return i?e.jsx(e2,{"data-a":"intr",onClick:l,children:i==null?void 0:i.map(r=>{var o,c,d;if(r.type==="question"&&((o=r.attributes)==null?void 0:o.attributes.case)==="question"){const h=r.attributes.attributes.value;return e.jsx(q.R,{...h},h.questionId)}if(r.type==="insight"&&((c=r.attributes)==null?void 0:c.attributes.case)==="insight"){const h=r.attributes.attributes.value;return e.jsx(L0,{controlVideo:n,...h},h.questionId)}if(r.type==="tweet"&&((d=r.attributes)==null?void 0:d.attributes.case)==="tweet"){const h=r.attributes.attributes.value,y=r.attributes.id;return e.jsx(H0,{controlVideo:n,...h,tweetId:y},y)}return null})}):e.jsx(e2,{children:Array.from({length:5}).map((r,o)=>e.jsx(q.D,{},o))})},k0=s.styled_default("div")({name:"InsightContainer",class:"i1pqqgpo",propsAsIs:!1}),z0=s.styled_default("img")({name:"Image",class:"igj7luu",propsAsIs:!1}),S0=s.styled_default("div")({name:"ImageContainer",class:"i1qne9g6",propsAsIs:!1}),q0=s.styled_default("div")({name:"InsightContent",class:"itpr98r",propsAsIs:!1}),R0=s.styled_default("h3")({name:"Title",class:"t17iaqp8",propsAsIs:!1}),F0=s.styled_default("div")({name:"Description",class:"d16t3y7s",propsAsIs:!1}),E0=s.styled_default("button")({name:"ActionBtn",class:"a12495er",propsAsIs:!1}),B0=({video:i,image:t,imageMode:n,heading:l,body:r,action:o,controlVideo:c})=>e.jsxs(k0,{children:[(i==null?void 0:i.url)&&e.jsx(u2.Et,{source:i.url,poster:i.thumbnailUrl,controlVideo:c}),t&&!(i!=null&&i.url)&&e.jsx(S0,{"data-rounded":n===b.QuestionImages.ROUNDED,children:e.jsx(z0,{src:t,alt:l})}),e.jsxs(q0,{children:[e.jsx(R0,{children:l}),e.jsx(F0,{children:r}),o&&e.jsx(E0,{onClick:o,children:"View Insight"})]})]}),M0=s.styled_default("div")({name:"Container",class:"c1eptrjd",propsAsIs:!1}),N0=s.styled_default("div")({name:"CloseIconWrap",class:"crylm65",propsAsIs:!1}),Z0=()=>$.B1,O0=s.styled_default(Z0())({name:"CloseIcon",class:"c9mrcz7",propsAsIs:!0}),W0=s.styled_default("div")({name:"Header",class:"hw3lzv4",propsAsIs:!1}),G0=()=>$.B1,P0=s.styled_default(G0())({name:"TypeIcon",class:"t1rrb3kf",propsAsIs:!0}),D0=s.styled_default("span")({name:"TypeName",class:"t1ydnjov",propsAsIs:!1}),Q0=s.styled_default("div")({name:"Question",class:"qlf90cl",propsAsIs:!1}),U0=s.styled_default("button")({name:"AnswerButton",class:"a1e0nhcl",propsAsIs:!1}),Y0=s.styled_default("div")({name:"Container",class:"c1t4f0x4",propsAsIs:!1}),K0=s.styled_default("button")({name:"ActionBtn",class:"a16w1nl6",propsAsIs:!1}),J0=s.styled_default("div")({name:"QuoteWrap",class:"q14u54rf",propsAsIs:!1}),X0=s.styled_default("blockquote")({name:"Quote",class:"q1hxm6zo",propsAsIs:!1}),e1=({action:i,...t})=>e.jsxs(Y0,{children:[t.title&&e.jsx(J0,{children:e.jsx(X0,{children:t.title})}),e.jsx(z.b,{...t}),i&&e.jsx(K0,{onClick:i,children:"View Insight"})]}),s1=({close:i,action:t,controlVideo:n,data:{questionType:l,question:r,insight:o,tweet:c}})=>{const d=z.e[l];return d?e.jsxs(M0,{onClick:t,style:l===b.QuestionType.TWEET?{paddingTop:"12px"}:{},children:[e.jsx(N0,{"data-a":"intr",onClick:h=>{h.stopPropagation(),i&&i(h)},children:e.jsx(O0,{name:"icon-cross"})}),l!==b.QuestionType.TWEET&&e.jsxs(W0,{children:[e.jsx(P0,{"data-type-trivia":l===b.QuestionType.TRIVIA,"data-type-poll":l===b.QuestionType.POLL,name:d.iconName}),e.jsx(D0,{children:d.label})]}),l===b.QuestionType.FACTOID&&o&&e.jsx(B0,{...o,action:t,controlVideo:n}),l===b.QuestionType.TWEET&&c&&e.jsx(e1,{...c,action:t,controlVideo:n}),l!==b.QuestionType.FACTOID&&l!==b.QuestionType.TWEET&&e.jsxs(e.Fragment,{children:[e.jsx(Q0,{children:r==null?void 0:r.title}),e.jsx(U0,{children:"Answer"})]})]}):null},V=s.styled_default("div")({name:"BGWrap",class:"b1dqe0sz",propsAsIs:!1}),I=s.styled_default("div")({name:"BGLineBase",class:"b1v6w7ni",propsAsIs:!1}),t1=()=>I,i1=s.styled_default(t1())({name:"BGOneLineOne",class:"b2nqb1p",propsAsIs:!0}),n1=()=>I,l1=s.styled_default(n1())({name:"BGOneLineTwo",class:"b1xxgmbk",propsAsIs:!0}),a1=()=>I,r1=s.styled_default(a1())({name:"BGOneLineThree",class:"b63lwcb",propsAsIs:!0}),o1=()=>I,s2=s.styled_default(o1())({name:"BGTwoLineOne",class:"b2iah4",propsAsIs:!0}),d1=()=>I,t2=s.styled_default(d1())({name:"BGTwoLineTwo",class:"b1xezvf6",propsAsIs:!0}),c1=()=>I,i2=s.styled_default(c1())({name:"BGTwoLineThree",class:"b1jz1hg0",propsAsIs:!0}),p1=()=>I,n2=s.styled_default(p1())({name:"BGThreeLineOne",class:"b18ho1tk",propsAsIs:!0}),u1=()=>I,l2=s.styled_default(u1())({name:"BGThreeLineTwo",class:"b14uvjfm",propsAsIs:!0}),h1=()=>I,a2=s.styled_default(h1())({name:"BGThreeLineThree",class:"b11c3ns7",propsAsIs:!0}),C1=()=>I,r2=s.styled_default(C1())({name:"BGThreeLineFour",class:"b1bqhhet",propsAsIs:!0}),f1=()=>I,m1=s.styled_default(f1())({name:"BGFourLineOne",class:"b1xyzi7o",propsAsIs:!0}),_1=()=>I,x1=s.styled_default(_1())({name:"BGFourLineTwo",class:"byo0rup",propsAsIs:!0}),y1=()=>I,g1=s.styled_default(y1())({name:"BGFourLineThree",class:"b1oyiqgv",propsAsIs:!0}),v1=()=>I,j1=s.styled_default(v1())({name:"BGFourLineFour",class:"bx3ddqw",propsAsIs:!0}),I1=({step:i,correct:t})=>e.jsxs(e.Fragment,{children:[e.jsxs(V,{"data-active":i===1,"data-first-screen":"true",children:[e.jsx(i1,{}),e.jsx(l1,{}),e.jsx(r1,{})]}),e.jsxs(V,{"data-active":i===2,children:[e.jsx(s2,{}),e.jsx(t2,{}),e.jsx(i2,{})]}),e.jsxs(V,{"data-active":i===3,children:[e.jsx(s2,{}),e.jsx(t2,{}),e.jsx(i2,{})]}),t?e.jsxs(e.Fragment,{children:[e.jsxs(V,{"data-active":i===4,"data-correct":"true",children:[e.jsx(n2,{}),e.jsx(l2,{}),e.jsx(a2,{}),e.jsx(r2,{})]}),e.jsxs(V,{"data-active":i===5,"data-correct":"true",children:[e.jsx(n2,{}),e.jsx(l2,{}),e.jsx(a2,{}),e.jsx(r2,{})]})]}):e.jsxs(V,{"data-active":i===4,"data-correct":"false",children:[e.jsx(m1,{}),e.jsx(x1,{}),e.jsx(g1,{}),e.jsx(j1,{})]})]}),A1=118,L1=()=>A2.f,w1=s.styled_default(L1())({name:"Container",class:"c10131zw",propsAsIs:!0}),b1=s.styled_default("div")({name:"InnerContainer",class:"ir6k2eo",propsAsIs:!1}),H=s.styled_default("div")({name:"Content",class:"c1hwoq9l",propsAsIs:!1}),S=s.styled_default("div")({name:"Title",class:"t4ujo4g",propsAsIs:!1}),$1=()=>S,T1=s.styled_default($1())({name:"PointsTitle",class:"p1pjil1h",propsAsIs:!0}),F=s.styled_default("div")({name:"Subtitle",class:"s1iorwr9",propsAsIs:!1}),o2=s.styled_default("div")({name:"SubtitleFG",class:"s51sv9d",propsAsIs:!1}),E=s.styled_default("div")({name:"AnswerText",class:"a1lbk2ye",propsAsIs:!1}),H1=()=>$.B1,m2=s.styled_default(H1())({name:"FeedbackIcon",class:"frcvk3t",propsAsIs:!0}),V1=()=>m2,d2=s.styled_default(V1())({name:"FeedbackIconCorrect",class:"f33p82r",propsAsIs:!0}),k1=()=>m2,z1=s.styled_default(k1())({name:"FeedbackIconIncorrect",class:"f12r9net",propsAsIs:!0}),c2=s.styled_default("div")({name:"CloseIconWrap",class:"c1fw6699",propsAsIs:!1}),S1=()=>$.B1,p2=s.styled_default(S1())({name:"CloseIcon",class:"c115o126",propsAsIs:!0}),q1="data:image/svg+xml,%3csvg%20width='154'%20height='37'%20viewBox='0%200%20154%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M70.9776%2030.8796L74.668%2018.1381C75.0696%2016.7473%2076.1186%2015.6318%2077.4936%2015.1371L77.5928%2014.7217H72.466L63.7623%2024.9662L60.431%2014.7217H55.7389L55.6255%2015.1371C56.4288%2015.5291%2056.8683%2016.7052%2056.8683%2017.662V17.7227C56.8683%2023.1787%2052.781%2032.5598%2047.0352%2032.5598C44.8002%2032.5598%2043.6425%2031.0009%2043.6425%2029.7035C43.6425%2028.1306%2044.975%2027.0105%2046.3831%2027.0105C47.744%2027.0105%2047.9519%2027.5099%2048.741%2027.5099C49.2182%2027.5099%2049.6766%2027.2672%2049.9081%2026.8518C50.2672%2026.1984%2049.9931%2025.4049%2049.3363%2025.0922L48.9772%2024.9242C45.6271%2023.3327%2041.7383%2025.7457%2041.7383%2029.4188V29.4701C41.7383%2032.1444%2043.8646%2034.38%2046.5674%2034.4733C53.5417%2034.716%2058.2055%2025.4236%2058.9473%2018.6188L59.486%2020.4577L62.2313%2028.5927H63.2709L71.8518%2018.4741L68.2512%2030.8936C67.8401%2032.3171%2066.6966%2033.4232%2065.2412%2033.7966L65.142%2034.212H72.0408L72.1542%2033.7966C71.1383%2033.2039%2070.6516%2032.0044%2070.9776%2030.8796Z'%20fill='white'/%3e%3cpath%20d='M88.2952%2021.6521H88.2385C85.016%2021.6568%2081.5571%2021.9648%2079.7143%2027.1361C78.1692%2031.4813%2077.7487%2033.2828%2076.539%2033.2828C75.7641%2033.2828%2075.9531%2031.794%2074.7954%2031.794C74.2709%2031.794%2073.7275%2032.2094%2073.6897%2032.8068C73.6236%2033.8429%2075.0317%2034.4683%2076.0949%2034.4683C79.3316%2034.4683%2080.5696%2032.1347%2080.9759%2031.0472C81.0279%2030.9072%2081.3162%2030.1371%2081.6517%2029.2317H85.0538L84.4773%2031.3273C84.1749%2032.4334%2083.5464%2033.3388%2082.488%2033.8009L82.3982%2034.2163H87.9597L88.0637%2033.8009C87.3124%2033.1848%2086.9816%2032.2%2087.2273%2031.2853L89.3206%2023.4257C89.4812%2022.8236%2089.9018%2022.3242%2090.4783%2022.0628L90.568%2021.6475H88.7536H88.2952V21.6521ZM85.3231%2028.2189H82.0202C82.3935%2027.2108%2082.7526%2026.2493%2082.8755%2025.9366C83.7118%2023.757%2085.2995%2022.8749%2086.8399%2022.7536L86.8257%2022.7676L85.3231%2028.2189Z'%20fill='white'/%3e%3cpath%20d='M116.358%2022.5486C116.538%2022.2545%20116.708%2021.8112%20116.708%2021.5591C116.732%2021.0877%20116.297%2020.7237%20115.829%2020.8217C115.456%2020.9011%20115.187%2021.2324%20115.191%2021.6058C115.196%2021.9978%20115.12%2022.4226%20114.95%2022.6279C114.558%2023.104%20113.934%2023.062%20111.062%2022.2452V22.2405C110.797%2022.1659%20110.509%2022.0819%20110.206%2021.9978C110.187%2021.9932%20110.173%2021.9885%20110.159%2021.9838C108.723%2021.6011%20106.941%2021.2464%20105.774%2021.8205C105.765%2021.8252%20105.755%2021.8298%20105.746%2021.8345C104.602%2022.3992%20103.808%2023.4727%20103.567%2024.7142C103.53%2024.8962%20103.506%2025.0455%20103.501%2025.0969C103.468%2025.7456%20104.068%2026.2544%20104.711%2026.1143C105.235%2026.0023%20105.604%2025.5403%20105.59%2025.0129C105.58%2024.4808%20105.472%2023.7667%20105.765%2023.286C106.237%2022.6279%20106.729%2022.5812%20108.935%2023.3047L106.544%2031.323C106.214%2032.4291%20105.406%2033.3345%20104.338%2033.7966L104.238%2034.212H109.961L110.074%2033.7966C109.337%2033.1852%20109.03%2032.1957%20109.299%2031.2809L111.392%2024.0561C112.309%2024.2428%20113.24%2024.2941%20114.147%2024.0374L114.473%2023.9441C115.196%2023.7527%20115.943%2023.2347%20116.358%2022.5486Z'%20fill='white'/%3e%3cpath%20d='M118.649%2021.6523L118.536%2022.0677C119.245%2022.5531%20119.561%2023.4259%20119.335%2024.2427L117.208%2031.3228C116.877%2032.429%20116.069%2033.3344%20115.002%2033.7964L114.902%2034.2118H117.931H118.21H125.18L126.101%2030.8934H125.666L125.51%2031.2108C124.934%2032.3963%20123.72%2033.1524%20122.382%2033.1524H119.429L121.003%2027.5937H122.259C123.105%2027.5937%20123.743%2028.3545%20123.582%2029.1759H124.012L125.043%2025.4188H124.613C124.362%2026.1142%20123.696%2026.5763%20122.949%2026.5809H121.291L122.382%2022.7258L125.515%2022.7211C126.536%2022.7211%20127.301%2023.6452%20127.098%2024.6347H127.528L128.35%2021.6523H118.649Z'%20fill='white'/%3e%3cpath%20d='M138.251%2021.6582H131.333L131.22%2022.0736C131.881%2022.5263%20132.207%2023.3197%20132.056%2024.0898L129.892%2031.324C129.561%2032.4301%20128.753%2033.3356%20127.685%2033.7976L127.586%2034.213H133.303L133.417%2033.7976C132.68%2033.1862%20132.373%2032.2014%20132.637%2031.282L133.686%2027.5949H134.126C134.787%2027.5949%20135.34%2028.085%20135.416%2028.7337C135.439%2028.9437%20135.77%2031.506%20136.035%2032.3881C136.379%2033.5409%20136.833%2034.213%20137.868%2034.213H140.453L140.552%2033.7976L140.183%2033.5829C139.451%2033.1536%20138.922%2032.4908%20138.685%2031.6087C138.463%2030.7779%20138.043%2029.2284%20137.84%2028.4117C137.736%2027.9916%20137.202%2027.5996%20136.654%2027.5996H137.523C139.087%2027.5996%20140.457%2026.5681%20140.878%2025.0839C141.365%2023.3617%20140.056%2021.6582%20138.251%2021.6582ZM138.369%2024.6872C138.029%2025.812%20136.98%2026.5868%20135.789%2026.5868H133.974L135.071%2022.7317H136.89C137.925%2022.727%20138.662%2023.7118%20138.369%2024.6872Z'%20fill='white'/%3e%3cpath%20d='M100.265%2022.2961C100.081%2022.2961%2099.6794%2022.1701%2099.0651%2021.9181C98.4508%2021.6661%2097.8318%2021.54%2097.2034%2021.54C95.904%2021.54%2094.8219%2021.9554%2093.9336%2022.8422C93.1964%2023.5796%2092.8704%2024.401%2092.8704%2025.1105C92.8704%2025.8665%2093.3193%2026.7533%2094.2124%2027.4721C95.0582%2028.1488%2095.937%2028.8022%2096.8206%2029.465C97.7468%2030.1977%2098.2098%2030.8745%2098.2098%2031.4252C98.2098%2032.634%2097.416%2033.2828%2095.7669%2033.2828C94.0942%2033.2828%2092.9366%2032.074%2092.568%2029.8057H92.1144L90.8008%2034.2162H91.226C91.7694%2033.8382%2092.1569%2033.6001%2092.946%2033.6001C93.6973%2033.6001%2094.5006%2034.4729%2096.2158%2034.4729C97.5814%2034.4729%2098.6682%2034.1929%2099.5943%2033.2781C100.383%2032.4753%20100.776%2031.3552%20100.776%2030.4404C100.776%2029.591%20100.237%2028.6062%2099.2966%2027.8921C98.4886%2027.2807%2097.6286%2026.7347%2096.7923%2026.1419C95.8898%2025.4792%2095.4362%2024.9144%2095.4362%2024.2937C95.4362%2023.9483%2095.611%2023.6076%2095.9559%2023.2622C96.3954%2022.8282%2096.986%2022.7302%2097.7751%2022.7302C99.3581%2022.7302%20100.464%2023.5983%20100.558%2025.4325H100.974L102.08%2021.5447H101.664C101.215%2022.0441%20100.752%2022.2961%20100.265%2022.2961Z'%20fill='white'/%3e%3cpath%20d='M149.201%2022.7304C150.784%2022.7304%20151.89%2023.6032%20151.984%2025.4327H152.4L153.501%2021.5449H153.085C152.646%2022.049%20152.182%2022.301%20151.696%2022.301C151.512%2022.301%20151.11%2022.175%20150.496%2021.923C149.881%2021.6709%20149.262%2021.5449%20148.634%2021.5449C147.334%2021.5449%20146.252%2021.9603%20145.364%2022.8471C144.627%2023.5845%20144.296%2024.4059%20144.296%2025.1153C144.296%2025.8714%20144.745%2026.7582%20145.638%2027.477C146.484%2028.1537%20147.363%2028.8071%20148.246%2029.4699C149.173%2030.2026%20149.636%2030.8794%20149.636%2031.4301C149.636%2032.6389%20148.842%2033.2876%20147.193%2033.2876C145.52%2033.2876%20144.362%2032.0788%20143.994%2029.8106H143.54L142.227%2034.2211H142.642C143.186%2033.843%20143.573%2033.605%20144.358%2033.605C145.109%2033.605%20145.912%2034.4778%20147.627%2034.4778C148.993%2034.4778%20150.075%2034.1978%20151.006%2033.283C151.795%2032.4802%20152.187%2031.3601%20152.187%2030.4453C152.187%2029.6005%20151.649%2028.6111%20150.708%2027.897C149.9%2027.2856%20149.04%2026.7395%20148.204%2026.1468C147.301%2025.4841%20146.848%2024.9193%20146.848%2024.2986C146.848%2023.9532%20147.023%2023.6125%20147.368%2023.2671C147.826%2022.8237%20148.412%2022.7304%20149.201%2022.7304Z'%20fill='white'/%3e%3cpath%20d='M26.5433%202.60035C26.0377%202.44633%2025.5321%202.72169%2025.0265%203.00173C24.8469%203.09974%2024.7194%203.27243%2024.6768%203.46845L23.883%207.13222C23.8547%207.26757%2023.9775%207.38891%2024.1145%207.36091C24.9509%207.17422%2025.7447%206.4508%2026.5811%206.70283C27.5167%206.98753%2028.4522%205.81606%2029.3878%205.83006V1.60156C28.4475%201.60623%2027.4789%202.88505%2026.5433%202.60035Z'%20fill='white'/%3e%3cpath%20d='M38.4856%2013.8398C38.2871%2013.7044%2038.1643%2013.4851%2038.1643%2013.2471V12.5796C38.1643%2011.9822%2037.6729%2011.4922%2037.0633%2011.4922H36.6239C36.0994%2011.4922%2035.6174%2011.7536%2035.3339%2012.1876L33.9164%2014.3485C33.7746%2014.5632%2033.5383%2014.6892%2033.2832%2014.6892H32.3287C31.8562%2014.6892%2031.4215%2014.9459%2031.1947%2015.3566C30.9631%2015.7814%2030.552%2016.0754%2030.0843%2016.1734V1.1403C30.0843%200.94894%2029.9283%200.794922%2029.7346%200.794922C29.5409%200.794922%2029.3849%200.94894%2029.3849%201.1403V1.60702V5.83552V16.1827C28.9171%2016.0847%2028.506%2015.7907%2028.2745%2015.3613C28.0524%2014.9506%2027.6177%2014.6939%2027.1405%2014.6939H26.4979C25.9875%2014.6939%2025.5292%2014.9879%2025.3213%2015.45L24.7873%2016.6308C24.7023%2016.8175%2024.5133%2016.9388%2024.3054%2016.9388C24.0975%2016.9388%2023.9085%2016.8175%2023.8234%2016.6308L23.2895%2015.45C23.0816%2014.9926%2022.6232%2014.6939%2022.1129%2014.6939H4.00135C3.85487%2014.6939%203.73674%2014.8106%203.73674%2014.9553C3.73674%2015.2633%203.48158%2015.5107%203.17444%2015.5107H2.39007C2.24359%2015.5107%202.12546%2015.6273%202.12546%2015.772V16.6728C2.12546%2017.5176%201.96008%2018.339%201.62931%2019.1184L1.15207%2020.2526C0.707907%2021.3027%200.5%2022.3901%200.5%2023.4589V26.0726C0.5%2026.7773%200.603954%2027.4914%200.811861%2028.1868C1.39306%2030.1377%202.7161%2031.7339%204.53529%2032.6767L7.43182%2034.1842C7.46962%2034.2029%207.51214%2034.2122%207.55467%2034.2122L9.69517%2034.2309C10.196%2034.2355%2010.6875%2034.3616%2011.1269%2034.6043L12.2751%2035.239C12.3129%2035.2623%2012.3602%2035.2717%2012.4074%2035.2717H13.9431C14.4818%2035.2717%2015.0157%2035.4163%2015.474%2035.6917C15.474%2035.6917%2016.2253%2036.1444%2016.4805%2036.2891C16.8869%2036.5225%2017.3783%2036.7465%2018.2335%2036.7932C18.4273%2036.8025%2018.621%2036.7325%2018.7675%2036.5972C18.9092%2036.4618%2018.9943%2036.2704%2018.9943%2036.0791V35.0616C18.9943%2034.3242%2019.4337%2033.6521%2020.1189%2033.3581L22.4673%2032.3406C22.7886%2032.2006%2023.1477%2032.1773%2023.4832%2032.28L24.3621%2032.5367C24.7354%2032.644%2025.1323%2032.6487%2025.5056%2032.5367L27.5846%2031.9253C27.8587%2031.8459%2028.1517%2031.8459%2028.4304%2031.9299L29.2763%2032.1633C29.6684%2032.2706%2029.9472%2032.6347%2029.9472%2033.0361V35.071C29.9472%2036.0184%2030.7269%2036.7932%2031.6861%2036.7932C32.4043%2036.7932%2033.0328%2036.3405%2033.2501%2035.6637C33.6423%2034.4456%2033.8408%2033.1761%2033.8408%2031.8973V31.0292C33.8408%2030.4131%2034.1006%2029.8204%2034.5543%2029.3956L35.419%2028.5882C36.0002%2028.0421%2036.3356%2027.2674%2036.3356%2026.474V21.6481C36.3356%2020.9013%2036.5625%2020.1779%2036.9972%2019.5618C37.0302%2019.5198%2037.0444%2019.4638%2037.0444%2019.4125V18.2737C37.0444%2017.5316%2037.2712%2016.8128%2037.6965%2016.2014L38.5517%2014.9739C38.5848%2014.9319%2038.599%2014.8806%2038.599%2014.8246V14.0545C38.6037%2013.9098%2038.5139%2013.8585%2038.4856%2013.8398ZM30.0843%2025.2838C30.6654%2025.3725%2031.1002%2025.6665%2031.1002%2026.0212C31.1002%2026.3759%2030.6702%2026.67%2030.0843%2026.7587V25.2838ZM5.22516%2032.4433L4.78572%2032.2146C3.59026%2031.5939%202.63577%2030.6698%201.9837%2029.545V28.1355C2.73028%2029.2043%203.74619%2030.1144%204.98891%2030.7631L5.22516%2030.8845V32.4433ZM7.43654%2033.5961L6.2647%2032.9894V31.4305L7.43182%2032.0373H7.43654V33.5961ZM12.3129%2034.6556L11.3868%2034.1422C10.8812%2033.8622%2010.3142%2033.7128%209.73297%2033.7035V32.0793C10.2197%2032.0886%2010.7016%2032.2146%2011.1269%2032.448L12.2751%2033.0827C12.2846%2033.0874%2012.2987%2033.0874%2012.3129%2033.0921V34.6556ZM18.4603%2035.0616V35.8551V36.0791C18.4603%2036.1304%2018.4367%2036.1818%2018.3989%2036.2191C18.3611%2036.2564%2018.3139%2036.2705%2018.2619%2036.2705C17.52%2036.2331%2017.0948%2036.0418%2016.7498%2035.8411C16.4994%2035.6964%2015.7528%2035.2483%2015.7481%2035.2483C15.2803%2034.9683%2014.7511%2034.8143%2014.2077%2034.7723V33.1387C14.6519%2033.1808%2015.0866%2033.3114%2015.474%2033.5401L16.1214%2033.9228C16.8302%2034.3429%2017.6382%2034.5809%2018.4603%2034.6276V35.0616ZM24.8582%2032.0886C24.7448%2032.084%2024.6267%2032.0653%2024.5133%2032.0326L23.6344%2031.7713C23.4454%2031.7152%2023.2517%2031.6966%2023.0579%2031.6966V30.0677C23.1997%2030.0677%2023.3414%2030.0817%2023.4832%2030.1237L24.3621%2030.3804C24.5227%2030.4271%2024.6928%2030.4504%2024.8582%2030.4598V32.0886ZM30.363%2032.4807C30.1929%2032.0886%2029.8574%2031.7759%2029.4275%2031.6592L28.5864%2031.4259C28.3879%2031.3652%2028.18%2031.3419%2027.9721%2031.3419V29.7177C28.1328%2029.713%2028.2934%2029.7317%2028.4493%2029.783L29.1392%2029.9977C29.8716%2030.2264%2030.363%2030.8891%2030.363%2031.6452V32.4807ZM32.787%2035.365C32.7729%2035.4117%2032.7634%2035.4584%2032.7492%2035.505C32.6028%2035.9624%2032.1775%2036.2658%2031.6955%2036.2658C31.653%2036.2658%2031.6105%2036.2564%2031.568%2036.2518V34.6323C31.601%2034.6369%2031.6294%2034.6416%2031.6625%2034.6416C32.135%2034.6416%2032.565%2034.3802%2032.7918%2033.9835V35.365H32.787ZM37.3232%2015.0486C36.794%2015.8047%2036.5152%2016.6915%2036.5152%2017.6109V18.4137L36.1041%2019.0017C35.5702%2019.7625%2035.2867%2020.6539%2035.2867%2021.578V25.6245C35.2867%2026.2779%2035.0126%2026.9173%2034.5306%2027.3654L33.6659%2028.1775C33.0847%2028.7236%2032.7634%2029.489%2032.787%2030.2824L32.7918%2030.4644C32.8248%2031.5146%2032.6878%2032.56%2032.3901%2033.5681C32.2956%2033.8902%2031.9932%2034.1142%2031.6577%2034.1142C31.2372%2034.1142%2030.8923%2033.7782%2030.8923%2033.3581V31.6452C30.8923%2030.6558%2030.2496%2029.7923%2029.2952%2029.4983L28.6053%2029.2836C28.2225%2029.1669%2027.8209%2029.1623%2027.4334%2029.2743L25.3544%2029.881C25.0803%2029.9604%2024.7873%2029.9604%2024.5133%2029.881L23.6344%2029.6243C23.1808%2029.489%2022.6894%2029.5217%2022.2547%2029.7083L20.4071%2030.5111C19.2258%2031.0245%2018.4651%2032.1773%2018.4651%2033.4515V34.1095C17.7374%2034.0675%2017.0286%2033.8528%2016.4002%2033.4795L15.7528%2033.0967C15.2047%2032.7747%2014.581%2032.602%2013.9431%2032.602H12.4736L11.3868%2031.9999C10.8717%2031.7152%2010.2905%2031.5659%209.69989%2031.5612L7.62082%2031.5472L5.23461%2030.3057C1.61514%2028.4249%200.0700101%2024.1917%201.64349%2020.4579L2.12073%2019.3238C2.47512%2018.4837%202.6594%2017.5922%202.6594%2016.6775V16.0427H3.17444C3.68476%2016.0427%204.11948%2015.6927%204.2376%2015.2213H22.1176C22.4153%2015.2213%2022.6894%2015.394%2022.8075%2015.6647L23.3414%2016.8455C23.5115%2017.2235%2023.8896%2017.4662%2024.3101%2017.4662C24.7259%2017.4662%2025.1087%2017.2235%2025.2788%2016.8455L25.8127%2015.66C25.9356%2015.3893%2026.2049%2015.2166%2026.5026%2015.2166H27.1452C27.424%2015.2166%2027.6791%2015.366%2027.8114%2015.6087C28.1375%2016.2061%2028.7234%2016.6075%2029.3897%2016.7148V24.145C28.317%2024.2617%2027.4949%2024.8918%2027.4949%2025.6572C27.4949%2026.5066%2028.4966%2027.1927%2029.7346%2027.1927C30.9726%2027.1927%2031.9743%2026.5066%2031.9743%2025.6572C31.9743%2024.8918%2031.1521%2024.257%2030.0795%2024.145V16.7101C30.7458%2016.6028%2031.3317%2016.2014%2031.6577%2015.604C31.79%2015.3613%2032.0452%2015.212%2032.324%2015.212H33.2785C33.7179%2015.212%2034.1195%2014.9926%2034.3605%2014.6286L35.7781%2012.4676C35.9624%2012.1829%2036.2789%2012.0149%2036.6239%2012.0149H37.0633C37.3752%2012.0149%2037.6303%2012.2669%2037.6303%2012.575V13.2424C37.6303%2013.5644%2037.7579%2013.8725%2037.98%2014.1012L37.3232%2015.0486ZM29.3849%2025.2838V26.7587C28.8037%2026.67%2028.3737%2026.3759%2028.3737%2026.0212C28.3737%2025.6665%2028.8037%2025.3678%2029.3849%2025.2838Z'%20fill='white'/%3e%3c/svg%3e",R1="data:image/svg+xml,%3csvg%20width='159'%20height='28'%20viewBox='0%200%20159%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6919_71839)'%3e%3cpath%20d='M4.13243%2025.9198C5.34921%2026.9052%207.05161%2027.0267%208.39597%2026.224L22.9838%2017.5138C25.4013%2016.0703%2025.4117%2012.5721%2023.0028%2011.1144L17.4686%207.76522C15.4767%206.55981%2012.8918%207.10053%2011.5501%209.00325L3.27399%2020.7399C2.14132%2022.3462%202.44805%2024.5556%203.97544%2025.7926L4.13243%2025.9198Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M4.11673%202.57147C5.33939%201.58127%207.0516%201.46387%208.39797%202.27791L22.9843%2011.0971C25.3835%2012.5477%2025.3874%2016.0265%2022.9914%2017.4824L17.5405%2020.7946C15.5485%2022.005%2012.9594%2021.4661%2011.6157%2019.5615L3.27518%207.7386C2.142%206.1323%202.44856%203.92248%203.97619%202.68529L4.11673%202.57147Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M49.8088%2020.0063C47.924%2020.0063%2046.7521%2018.7437%2046.7521%2016.6748V13.1359H50.1977V10.9296H46.7521V7.34668L44.2736%209.18483V10.9271H42.8892V13.1333H44.2736V16.6515C44.2736%2020.2137%2046.3632%2022.4174%2049.8321%2022.4174H50.361V20.0063H49.8088Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M30.4704%2019.5631L32.6818%2017.8339C33.6722%2019.4231%2035.01%2020.2761%2036.7159%2020.2761C38.5826%2020.2761%2039.757%2019.0783%2039.757%2017.5798C39.757%2015.8505%2037.9137%2015.2983%2035.977%2014.6761C33.6956%2013.9398%2031.23%2013.0168%2031.23%209.92907C31.23%207.37018%2033.5115%205.34277%2036.6226%205.34277C39.1815%205.34277%2040.7707%206.33314%2042.0618%207.83166L40.0111%209.35351C39.2515%208.17907%2038.1211%207.55685%2036.6226%207.55685C34.9167%207.55685%2033.8096%208.57055%2033.8096%209.88499C33.8096%2011.4976%2035.5856%2012.0291%2037.5196%2012.6746C39.8244%2013.4576%2042.3367%2014.4506%2042.3367%2017.585C42.3367%2020.1672%2040.2159%2022.6328%2036.7367%2022.6328C33.8563%2022.6328%2031.8963%2021.4117%2030.4678%2019.5683L30.4704%2019.5631Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M58.9189%2016.7007C58.9189%2013.3225%2061.5141%2010.6807%2064.8923%2010.6807C68.2704%2010.6807%2070.7982%2013.1384%2070.7982%2016.5399V17.5044H61.286C61.6075%2019.2725%2062.9867%2020.4444%2064.9856%2020.4444C66.5489%2020.4444%2067.7441%2019.6173%2068.3404%2018.3755L70.3627%2019.5007C69.3515%2021.3855%2067.5367%2022.6247%2064.9856%2022.6247C61.356%2022.6247%2058.9189%2020.0296%2058.9189%2016.6981V16.7007ZM61.4001%2015.4147H68.2938C67.9256%2013.7607%2066.663%2012.8403%2064.8923%2012.8403C63.1215%2012.8403%2061.8589%2013.8981%2061.4001%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M51.8955%2016.6752C51.8955%2013.113%2053.9851%2010.9326%2057.454%2010.9326H58.5559V13.323H57.4307C55.5459%2013.323%2054.33%2014.6322%2054.3533%2016.7011V22.423H51.8955V16.6804V16.6752Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M72.0138%2016.6774C72.0138%2013.3226%2074.6557%2010.7041%2077.9638%2010.7041C81.272%2010.7041%2083.8672%2013.3226%2083.8672%2016.6774V22.42H81.456V20.9267C80.6523%2022.0052%2079.4105%2022.6274%2077.8938%2022.6274C74.609%2022.6274%2072.0112%2020.0556%2072.0112%2016.6774H72.0138ZM81.5027%2016.6774C81.5027%2014.6319%2079.9394%2013.0011%2077.9638%2013.0011C75.9883%2013.0011%2074.4249%2014.6319%2074.4249%2016.6774C74.4249%2018.723%2075.9649%2020.3537%2077.9638%2020.3537C79.9627%2020.3537%2081.5027%2018.6997%2081.5027%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M85.4155%2015.978C85.4155%2012.9214%2087.5052%2010.6943%2090.6085%2010.6943C92.3766%2010.6943%2093.8026%2011.4073%2094.697%2012.6025C95.5474%2011.4073%2096.9266%2010.6943%2098.6948%2010.6943C101.819%2010.6943%20104.002%2012.8773%20104.002%2015.978V22.4103H101.544V16.0014C101.544%2014.2566%20100.372%2013.038%2098.6948%2013.038C97.0174%2013.038%2095.9155%2014.2799%2095.9389%2015.934V22.4129H93.4811V16.004C93.4811%2014.2592%2092.2859%2013.0406%2090.6085%2013.0406C88.9311%2013.0406%2087.8526%2014.2825%2087.8733%2015.9366V22.4154H85.4155V15.9832V15.978Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M105.578%205.6416H108.082V20.0227H114.859V22.4131H105.578V5.6416Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M138.483%2016.7007C138.483%2013.3225%20141.078%2010.6807%20144.456%2010.6807C147.834%2010.6807%20150.362%2013.1384%20150.362%2016.5399V17.5044H140.85C141.171%2019.2725%20142.551%2020.4444%20144.55%2020.4444C146.113%2020.4444%20147.308%2019.6173%20147.904%2018.3755L149.927%2019.5007C148.916%2021.3855%20147.101%2022.6247%20144.55%2022.6247C140.92%2022.6247%20138.483%2020.0296%20138.483%2016.6981V16.7007ZM140.964%2015.4147H147.858C147.49%2013.7607%20146.227%2012.8403%20144.456%2012.8403C142.685%2012.8403%20141.423%2013.8981%20140.964%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M115.269%2016.6774C115.269%2013.3226%20117.911%2010.7041%20121.219%2010.7041C124.527%2010.7041%20127.122%2013.3226%20127.122%2016.6774V22.42H124.711V20.9267C123.907%2022.0052%20122.665%2022.6274%20121.149%2022.6274C117.864%2022.6274%20115.266%2020.0556%20115.266%2016.6774H115.269ZM124.758%2016.6774C124.758%2014.6319%20123.194%2013.0011%20121.219%2013.0011C119.243%2013.0011%20117.68%2014.6319%20117.68%2016.6774C117.68%2018.723%20119.22%2020.3537%20121.219%2020.3537C123.218%2020.3537%20124.758%2018.6997%20124.758%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M131.67%2021.8547L126.915%2010.9658H129.557L132.912%2018.938L136.082%2010.9658H138.678L131.74%2027.7606H129.212L131.67%2021.8573V21.8547Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M151.897%2016.6674C151.897%2013.1052%20153.987%2010.9248%20157.455%2010.9248H158.557V13.3152H157.432C155.547%2013.3152%20154.331%2014.6244%20154.355%2016.6933V22.4152H151.897V16.6726V16.6674Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6919_71839'%3e%3crect%20width='158.12'%20height='28'%20fill='white'%20style='fill:white;fill-opacity:1;'%20transform='translate(0.44043)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",F1=(i,t,n)=>i===t?"translateY(0px)":i>t?`translateY(${n}px)`:"translateY(-100%)",E1=({close:i,votedAnswer:t,mastersApp:n,correct:l,correctAnswerTitle:r,questionTitle:o,saveHeight:c,style:d,hiding:h})=>{const[y,j]=u.useState(1),v=u.useRef({});u.useEffect(()=>{const _=setInterval(()=>{j(x=>l&&x>4||!l&&x>3?x:++x)},3e3);return()=>clearInterval(_)},[l]),u.useEffect(()=>{var _,x;v.current[y]&&c(((x=(_=v.current[y])==null?void 0:_.getBoundingClientRect())==null?void 0:x.height)||A1)},[y,c]);const a=_=>x=>{v.current&&(v.current[_]=x)},p=_=>({transform:F1(_,y,d.height)}),m={...d};return n&&m.height&&typeof m.height=="number"&&(m.height+=32),e.jsx(w1,{style:d.height?m:{...d,paddingTop:0,paddingBottom:0},hiding:h,children:e.jsxs(b1,{style:{height:d.height,minHeight:d.height,backgroundColor:y>3?l?"var(--color-sdk-prediction-result-success-bg)":"var(--color-sdk-prediction-result-incorrect-bg)":"var(--color-primary-1)"},children:[e.jsx(I1,{step:y,correct:l}),n&&e.jsxs(H,{ref:a(1),style:p(1),children:[e.jsx("img",{alt:"sponsor-logo",src:q1}),e.jsx(o2,{children:"Featured Groups +"})]}),!n&&e.jsx(H,{ref:a(1),style:p(1),children:e.jsx("img",{alt:"sponsor-logo",src:R1})}),e.jsxs(H,{ref:a(2),style:p(2),children:[e.jsx(S,{children:"Prediction results are in!"}),n&&e.jsx(o2,{children:"Featured Groups +"})]}),e.jsxs(H,{ref:a(3),style:p(3),children:[e.jsx(S,{children:o}),e.jsx(F,{children:e.jsxs(E,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})})]}),l?e.jsxs(e.Fragment,{children:[e.jsxs(H,{ref:a(4),style:{...p(4),color:"var(--color-sdk-prediction-result-success-text)"},children:[e.jsxs(S,{children:["Congratulations!",e.jsx("br",{}),"You answered correctly."]}),e.jsxs(F,{children:[e.jsx(d2,{name:"selected"}),e.jsxs(E,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]})]}),e.jsxs(H,{ref:a(5),style:{...p(5),color:"var(--color-sdk-prediction-result-success-text)"},children:[e.jsx(T1,{children:y===5&&e.jsx(I2.d,{delay:.5,prefix:"+",suffix:" points",value:t==null?void 0:t.points})}),e.jsxs(F,{children:[e.jsx(d2,{name:"selected"}),e.jsxs(E,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),e.jsx(c2,{"data-a":"intr",onClick:i,children:e.jsx(p2,{name:"icon-cross"})})]})]}):e.jsxs(H,{ref:a(4),style:p(4),children:[e.jsxs(S,{style:{color:"var(--color-sdk-prediction-result-error-title)"},children:["Better luck next time!",e.jsx("br",{}),"Correct: ",r,"."]}),e.jsxs(F,{style:{color:"var(--color-sdk-prediction-result-error-subtitle)"},children:[e.jsx(z1,{name:"circleClose"}),e.jsxs(E,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),e.jsx(c2,{"data-a":"intr",onClick:i,children:e.jsx(p2,{name:"icon-cross"})})]})]})})},B1=i=>{const[t,n]=u.useState(!1),[l,r]=u.useState(!1),o=u.useRef(null),c=u.useCallback(()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},1e3)},[]),d=u.useCallback(async h=>{n(!0);const y=h.map(j=>new Promise((v,a)=>{const p=new Image;p.onload=()=>v(j),p.onerror=()=>a(),p.src=j}));await Promise.allSettled(y),n(!1)},[]);return u.useEffect(()=>{i&&(c(),d(i))},[i,c,d]),{loading:t,throttled:l}},M1=s.styled_default("div")({name:"Container",class:"cl51m2q",propsAsIs:!1}),N1=s.styled_default("img")({name:"Avatar",class:"a2yhhhr",propsAsIs:!1}),Z1=s.styled_default("div")({name:"AvatarPlaceholder",class:"a1dtxxlr",propsAsIs:!1}),O1=s.styled_default("div")({name:"Content",class:"c12clm3w",propsAsIs:!1}),W1=s.styled_default("span")({name:"Name",class:"n14lctn7",propsAsIs:!1}),G1=({avatar:i,name:t})=>e.jsxs(M1,{children:[i&&e.jsx(N1,{src:i}),!i&&e.jsx(Z1,{children:z.I(t||"")}),e.jsxs(O1,{children:[e.jsxs(W1,{children:[t," "]}),"is waiting for you!"]})]}),P1=s.styled_default("div")({name:"Container",class:"c1htq1lb",propsAsIs:!1}),D1=s.styled_default("div")({name:"Graphic",class:"gjyzpp7",propsAsIs:!1}),Q1=s.styled_default("img")({name:"GraphicImage",class:"g16mldgz",propsAsIs:!1}),U1=s.styled_default("div")({name:"Headline",class:"h69js65",propsAsIs:!1}),Y1=s.styled_default("div")({name:"TaglineContainer",class:"tmm7qmo",propsAsIs:!1}),K1=s.styled_default("div")({name:"Tagline",class:"t17knuw2",propsAsIs:!1}),J1=s.styled_default("div")({name:"Content",class:"c1b74psg",propsAsIs:!1}),X1=s.styled_default("div")({name:"StepsContainer",class:"s1y99ug7",propsAsIs:!1}),ee=s.styled_default("span")({name:"StepIndicator",class:"sgf3v5n",propsAsIs:!1}),se=s.styled_default("div")({name:"InvitingUserWrap",class:"i1sj6gn8",propsAsIs:!1}),te=({loading:i,steps:t,currentStep:n,inviterName:l})=>{const{headline:r,tagline:o}=t[n];return e.jsxs(P1,{children:[o&&e.jsx(Y1,{children:e.jsx(T.i,{loading:i,children:e.jsx(K1,{children:o})})}),e.jsxs(J1,{"data-welcome-screen":n===0,children:[e.jsx(D1,{children:e.jsx(T.i,{loading:i,children:t.map(({graphicSrc:c},d)=>e.jsx(Q1,{src:c,"data-active":n===d}))})}),r&&e.jsx(T.i,{loading:i,children:e.jsx(U1,{children:r})})]}),l&&n===0&&e.jsx(se,{children:e.jsx(G1,{name:l})}),e.jsx(X1,{style:i?{visibility:"hidden"}:{},children:Array.from({length:t.length}).map((c,d)=>e.jsx(ee,{"data-active":n===d},d))})]})},ie=s.styled_default("div")({name:"Container",class:"cm0bev",propsAsIs:!1}),ne=s.styled_default("div")({name:"Content",class:"ce7x737",propsAsIs:!1}),le=s.styled_default("div")({name:"Title",class:"tc2tor6",propsAsIs:!1}),ae=s.styled_default("div")({name:"RulesList",class:"r1k5klql",propsAsIs:!1}),re=s.styled_default("div")({name:"RulesItem",class:"r1tf3ft2",propsAsIs:!1}),oe=s.styled_default("div")({name:"RuleIcon",class:"rwpvg1k",propsAsIs:!1}),de=s.styled_default("div")({name:"RuleText",class:"rbxiag0",propsAsIs:!1}),ce=s.styled_default("button")({name:"TermsButton",class:"t6cyrry",propsAsIs:!1}),pe=({rules:i,rulesTitle:t,termsText:n,primaryColor:l,openTerms:r})=>e.jsxs(ie,{children:[e.jsxs(ne,{children:[e.jsx(le,{children:t}),e.jsx(ae,{children:i==null?void 0:i.map(({label:o,icon:c},d)=>e.jsxs(re,{children:[c&&e.jsx(oe,{style:{backgroundColor:l},children:e.jsx($.B1,{name:c,"data-icon":c})}),e.jsx(de,{children:o})]},d))})]}),n&&e.jsx(ce,{"data-a":"intr",onClick:r,children:"See Terms and Conditions"})]}),ue=s.styled_default("div")({name:"Container",class:"cj0g35h",propsAsIs:!1}),he=s.styled_default("div")({name:"Content",class:"c1xkhrbn",propsAsIs:!1}),Ce=s.styled_default("div")({name:"Title",class:"tifzb8b",propsAsIs:!1}),fe=s.styled_default("div")({name:"ScrollingText",class:"stduw5c",propsAsIs:!1}),me=({termsTitle:i,termsText:t})=>e.jsx(ue,{children:e.jsxs(he,{children:[e.jsx(Ce,{children:i}),e.jsx(fe,{children:t})]})}),_e=s.styled_default("button")({name:"SButton",class:"s1nve60q",propsAsIs:!1}),xe=s.styled_default("span")({name:"ButtonLabel",class:"b1xoswwx",propsAsIs:!1}),ye=({disabled:i,variant:t="primary",onClick:n,children:l,...r})=>e.jsx(_e,{"data-a":"intr",onClick:n,disabled:i,"data-variant":t,...r,children:e.jsx(xe,{children:l})}),ge=s.styled_default("div")({name:"Container",class:"c18uddbs",propsAsIs:!1}),ve=s.styled_default("div")({name:"Content",class:"cvcfjf6",propsAsIs:!1}),je=s.styled_default("div")({name:"OnboardingHeader",class:"o1ie27lw",propsAsIs:!1}),Ie=s.styled_default("button")({name:"CloseBtn",class:"c15cjkwi",propsAsIs:!1}),Ae=()=>$.B1,Le=s.styled_default(Ae())({name:"IconClose",class:"i1mavjt2",propsAsIs:!0}),we=s.styled_default("div")({name:"OnboardingFooter",class:"o1x0dyzv",propsAsIs:!1}),be=()=>ye,$e=s.styled_default(be())({name:"OnboardingActionBtn",class:"o1jfi9c3",propsAsIs:!0}),k={steps:!1,rules:!1,inviteCard:!1},Te=({gamification:i,steps:t,rules:n,rulesBtnLabel:l,rulesTitle:r,termsTitle:o,termsText:c,primaryColor:d,inviteLink:h,inviteCardTitle:y,inviteCardSubtext:j,inviteCardBtnLabel:v,loading:a,inviterName:p,sdk:m,onClose:_})=>{const[x,f]=u.useState(0),[C,A]=u.useState(!1),[g,w]=u.useState(k);u.useEffect(()=>{t!=null&&t.length?w({...k,steps:!0}):n!=null&&n.length?w({...k,rules:!0}):w({...k,inviteCard:!0})},[]);const _2=u.useMemo(()=>g.steps&&x===0?"Continue":g.rules?C||!l?"Got it":l:g.inviteCard?v||"Play Now":"Next",[g,x,C,l,v]),x2=u.useCallback(()=>{t!=null&&t.length&&x<t.length-1?f(B=>++B):n!=null&&n.length&&g.steps?w({...k,rules:!0}):g.rules&&w({...k,inviteCard:!0})},[x,t==null?void 0:t.length,n==null?void 0:n.length,g,f,w]),y2=async()=>{g.inviteCard?await i.onboardingStatus.submitInplay():g.rules&&C?A(!1):x2()};return u.useEffect(()=>{!a&&p&&m.inviteDisplayed()},[a,p,m]),e.jsx(r0,{children:({width:B,height:P})=>e.jsxs(ge,{style:{width:B,height:P,maxHeight:P},children:[e.jsx(je,{children:e.jsx(Ie,{"data-a":"intr",onClick:_,children:e.jsx(Le,{name:"icon-close-btn-gray"})})}),e.jsxs(ve,{children:[g.steps&&(t==null?void 0:t.length)&&e.jsx(te,{loading:a,steps:t,currentStep:x,inviterName:p}),g.rules&&!C&&e.jsx(pe,{rules:n,rulesTitle:r,termsText:c,primaryColor:d,openTerms:()=>A(!0)}),g.rules&&C&&e.jsx(me,{termsTitle:o,termsText:c}),g.inviteCard&&e.jsx(f2,{inviteLink:h,inviteCardTitle:y,inviteCardSubtext:j,primaryColor:d})]}),e.jsx(we,{children:e.jsx(T.i,{loading:a,style:{width:"100%"},children:e.jsx($e,{"data-a":"intr",onClick:y2,children:_2})})})]})})},He=s.styled_default("button")({name:"Container",class:"crkmfw1",propsAsIs:!1}),Ve=s.styled_default("div")({name:"Content",class:"c11awpy4",propsAsIs:!1}),ke=s.styled_default("span")({name:"Title",class:"t154z7mh",propsAsIs:!1}),ze=({title:i,onClick:t,className:n,style:l})=>e.jsx(He,{"data-a":"intr",onClick:t,className:n,style:l,children:e.jsxs(Ve,{"data-a":"intr",children:[e.jsx($.B1,{"data-a":"intr",name:"iconUp"}),i&&e.jsx(ke,{"data-a":"intr",children:i})]})});exports.D=E1;exports.I=B1;exports.M=f2;exports.T=s0;exports.T$1=C2;exports.createSingleStore=w2;exports.f=ze;exports.k=V0;exports.p=b2;exports.tn=Te;exports.w=s1;exports.z=J2;
1
+ "use strict";require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.symbol.to-primitive.js"),require("core-js/modules/es.array.filter.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.date.to-primitive.js"),require("core-js/modules/es.number.constructor.js"),require("core-js/modules/es.object.define-properties.js"),require("core-js/modules/es.object.define-property.js"),require("core-js/modules/es.object.get-own-property-descriptor.js"),require("core-js/modules/es.object.get-own-property-descriptors.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.reflect.construct.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.array.from.js"),require("core-js/modules/es.array.index-of.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.array.map.js"),require("core-js/modules/es.array.splice.js"),require("core-js/modules/es.object.assign.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.parse-float.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/esnext.promise.all-settled.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/web.dom-collections.iterator.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=["children","defaultHeight","defaultWidth","disableHeight","disableWidth","doNotBailOutOnEmptyChildren","nonce","onResize","style","tagName"],s=["questionId"],r=["action"],n=["disabled","variant","onClick","children"];function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,r)}return s}function a(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?i(Object(s),!0).forEach(function(t){l(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):i(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}function l(e,t,s){return(t=d(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function o(e,t){if(null==e)return{};var s,r,n=function(e,t){if(null==e)return{};var s={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;s[r]=e[r]}return s}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],-1===t.indexOf(s)&&{}.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function c(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(t){var s=function(t,s){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,s||"default");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===s?String:Number)(t)}(t,"string");return"symbol"==e(s)?s:s+""}function u(t,s,r){return s=f(s),function(t,s){if(s&&("object"==e(s)||"function"==typeof s))return s;if(void 0!==s)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,p()?Reflect.construct(s,r||[],f(t).constructor):s.apply(t,r))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!e})()}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function m(){
2
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
+ var e,t,s="function"==typeof Symbol?Symbol:{},r=s.iterator||"@@iterator",n=s.toStringTag||"@@toStringTag";function i(s,r,n,i){var o=r&&r.prototype instanceof l?r:l,c=Object.create(o.prototype);return C(c,"_invoke",function(s,r,n){var i,l,o,c=0,d=n||[],u=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,s){return i=t,l=0,o=e,p.n=s,a}};function f(s,r){for(l=s,o=r,t=0;!u&&c&&!n&&t<d.length;t++){var n,i=d[t],f=p.p,h=i[2];s>3?(n=h===r)&&(o=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=f&&((n=s<2&&f<i[1])?(l=0,p.v=r,p.n=i[1]):f<h&&(n=s<3||i[0]>r||r>h)&&(i[4]=s,i[5]=r,p.n=h,l=0))}if(n||s>1)return a;throw u=!0,r}return function(n,d,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&f(d,h),l=d,o=h;(t=l<2?e:o)||!u;){i||(l?l<3?(l>1&&(p.n=-1),f(l,o)):p.n=o:p.v=o);try{if(c=2,i){if(l||(n="next"),t=i[n]){if(!(t=t.call(i,o)))throw TypeError("iterator result is not an object");if(!t.done)return t;o=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(o=TypeError("The iterator does not provide a '"+n+"' method"),l=1);i=e}else if((t=(u=p.n<0)?o:s.call(r,p))!==a)break}catch(m){i=e,l=1,o=m}finally{c=1}}return{value:t,done:u}}}(s,n,i),!0),c}var a={};function l(){}function o(){}function c(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(C(t={},r,function(){return this}),t),u=c.prototype=l.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,C(e,n,"GeneratorFunction")),e.prototype=Object.create(u),e}return o.prototype=c,C(u,"constructor",c),C(c,"constructor",o),o.displayName="GeneratorFunction",C(c,n,"GeneratorFunction"),C(u),C(u,n,"Generator"),C(u,r,function(){return this}),C(u,"toString",function(){return"[object Generator]"}),(m=function(){return{w:i,m:p}})()}function C(e,t,s,r){var n=Object.defineProperty;try{n({},"",{})}catch(i){n=0}(C=function(e,t,s,r){function i(t,s){C(e,t,function(e){return this._invoke(t,s,e)})}t?n?n(e,t,{value:s,enumerable:!r,configurable:!r,writable:!r}):e[t]=s:(i("next",0),i("throw",1),i("return",2))})(e,t,s,r)}function y(e,t,s,r,n,i,a){try{var l=e[i](a),o=l.value}catch(c){return void s(c)}l.done?t(o):Promise.resolve(o).then(r,n)}function v(e){return function(){var t=this,s=arguments;return new Promise(function(r,n){var i=e.apply(t,s);function a(e){y(i,r,n,a,l,"next",e)}function l(e){y(i,r,n,a,l,"throw",e)}a(void 0)})}}function j(e,t){var s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!s){if(Array.isArray(e)||(s=g(e))||t&&e&&"number"==typeof e.length){s&&(e=s);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){s=s.call(e)},n:function(){var e=s.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==s.return||s.return()}finally{if(l)throw i}}}}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var s=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=s){var r,n,i,a,l=[],o=!0,c=!1;try{if(i=(s=s.call(e)).next,0===t){if(Object(s)!==s)return;o=!1}else for(;!(o=(r=i.call(s)).done)&&(l.push(r.value),l.length!==t);o=!0);}catch(d){c=!0,n=d}finally{try{if(!o&&null!=s.return&&(a=s.return(),Object(a)!==a))return}finally{if(c)throw n}}return l}}(e,t)||g(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){if(e){if("string"==typeof e)return x(e,t);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=Array(t);s<t;s++)r[s]=e[s];return r}var b,w=require("./feature.js"),I=require("./useStreamLayerApp2.js"),A=require("react"),L=require("./sl-types.js"),T=require("react/jsx-runtime"),H=require("./index9.js"),k=require("./index12.js"),V=require("react-dom"),q=require("./utils.js"),z=require("./storage.js"),O=require("./index10.js"),S=require("./index13.js"),E=require("./index6.js"),R=require("./index5.js"),B=require("./index11.js"),M=require("./analytics.js"),P=L.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),F=L.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),N=L.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),Z=function(e){var t=e.indicator,s=e.title;return T.jsxs(P,{children:[T.jsx(F,{children:s}),T.jsx(N,{children:t})]})},W=L.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),G=L.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),D=L.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),Q=function(e){var t=e.indicator,s=e.title;return T.jsxs(W,{children:[T.jsx(G,{children:t}),T.jsx(D,{children:s})]})},U=L.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),Y=L.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),$=L.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),J=L.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),K=L.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),X=L.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),ee=L.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),te=L.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),se=L.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),re=L.styled_default("div")({name:"RtsContainer",class:"r2vgnxv",propsAsIs:!1}),ne=L.styled_default("div")({name:"RtsDivider",class:"roqn06j",propsAsIs:!1}),ie=L.styled_default("div")({name:"Rts",class:"r15adx7c",propsAsIs:!1}),ae=L.styled_default("div")({name:"RtsIndicator",class:"rv59lta",propsAsIs:!1}),le=L.styled_default("div")({name:"RtsLabel",class:"r55lotb",propsAsIs:!1}),oe=L.styled_default("div")({name:"Divider",class:"d1knfgqt",propsAsIs:!1}),ce=L.styled_default("div")({name:"Ranks",class:"r1mqo824",propsAsIs:!1}),de=L.styled_default("div")({name:"Statistics",class:"sxareh6",propsAsIs:!1}),ue=L.styled_default("div")({name:"AvatarPlaceholder",class:"amcu48h",propsAsIs:!1}),pe=L.styled_default("button")({name:"UserAccountBtn",class:"u32nfkp",propsAsIs:!1}),fe=L.styled_default("div")({name:"StaticContainer",class:"svm502q",propsAsIs:!1}),he=function(){return window.innerWidth>=L.A.md&&window.innerWidth<L.A.lg?76:53},me=function(e){var t,s=he();return Math.round(((null==(t=e.current)?void 0:t.getBoundingClientRect().y)||0)-s)<=0},Ce=L.styled_default("button")({name:"Container",class:"cpjnajb",propsAsIs:!1}),ye=L.styled_default("div")({name:"Content",class:"c4m6kaz",propsAsIs:!1}),ve=L.styled_default("span")({name:"Title",class:"t1h8t9cc",propsAsIs:!1}),je=function(){return T.jsx(Ce,{children:T.jsxs(ye,{children:[T.jsx(E.B1,{name:"iconCopySuccess"}),T.jsx(ve,{children:"Link Copied to Clipboard"})]})})},_e=function(e){var t=A.useRef(),s=_(A.useState(null),2),r=s[0],n=s[1],i=A.useCallback(function(){var s=v(m().m(function s(r){var i,a;return m().w(function(s){for(;;)switch(s.p=s.n){case 0:if(!r||null==(i=null==navigator?void 0:navigator.clipboard)||!i.writeText){s.n=4;break}return t.current&&(clearTimeout(t.current),n(null)),s.p=1,s.n=2,navigator.clipboard.writeText(r);case 2:e.current&&(n(V.createPortal(T.jsx(je,{}),e.current)),t.current=setTimeout(function(){n(null)},1e3)),s.n=4;break;case 3:s.p=3,a=s.v,console.error("Unable to copy to clipboard",a);case 4:return s.a(2)}},s,null,[[1,3]])}));return function(e){return s.apply(this,arguments)}}(),[e]);return A.useEffect(function(){return function(){clearTimeout(t.current)}},[]),[i,r]};b="undefined"!=typeof window?window:"undefined"!=typeof self?self:I.global;var ge=null,xe=null,be=b.clearTimeout,we=b.setTimeout,Ie=b.cancelAnimationFrame||b.mozCancelAnimationFrame||b.webkitCancelAnimationFrame,Ae=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame;function Le(e){var t,s,r,n,i,a,l,o="undefined"!=typeof document&&document.attachEvent;if(!o){a=function(e){var t=e.__resizeTriggers__,s=t.firstElementChild,r=t.lastElementChild,n=s.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,n.style.width=s.offsetWidth+1+"px",n.style.height=s.offsetHeight+1+"px",s.scrollLeft=s.scrollWidth,s.scrollTop=s.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},l=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;a(this),this.__resizeRAF__&&ge(this.__resizeRAF__),this.__resizeRAF__=xe(function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(s){s.call(t,e)}))})}};var c=!1,d="";r="animationstart";var u="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f=document.createElement("fakeelement");if(void 0!==f.style.animationName&&(c=!0),!1===c)for(var h=0;h<u.length;h++)if(void 0!==f.style[u[h]+"AnimationName"]){d="-"+u[h].toLowerCase()+"-",r=p[h],c=!0;break}t="@"+d+"keyframes "+(s="resizeanim")+" { from { opacity: 0; } to { opacity: 0; } } ",n=d+"animation: 1ms "+s+"; "}return{addResizeListener:function(i,c){if(o)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){var d=i.ownerDocument,u=b.getComputedStyle(i);u&&"static"===u.position&&(i.style.position="relative"),function(s){if(!s.getElementById("detectElementResize")){var r=(t||"")+".resize-triggers { "+(n||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=s.head||s.getElementsByTagName("head")[0],a=s.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(s.createTextNode(r)),i.appendChild(a)}}(d),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=d.createElement("div")).className="resize-triggers";var p=d.createElement("div");p.className="expand-trigger",p.appendChild(d.createElement("div"));var f=d.createElement("div");f.className="contract-trigger",i.__resizeTriggers__.appendChild(p),i.__resizeTriggers__.appendChild(f),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",l,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===s&&a(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(o)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",l,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(s){}}}}}null==Ie||null==Ae?(ge=be,xe=function(e){return we(e,20)}):(ge=function(e){var t=_(e,2),s=t[0],r=t[1];Ie(s),be(r)},xe=function(e){var t=Ae(function(){be(s),e()}),s=we(function(){Ie(t),e()},20);return[t,s]});var Te=function(){function e(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return(t=u(this,e,[].concat(r))).state={height:t.props.defaultHeight||0,scaledHeight:t.props.defaultHeight||0,scaledWidth:t.props.defaultWidth||0,width:t.props.defaultWidth||0},t._autoSizer=null,t._detectElementResize=null,t._parentNode=null,t._resizeObserver=null,t._timeoutId=null,t._onResize=function(){t._timeoutId=null;var e=t.props,s=e.disableHeight,r=e.disableWidth,n=e.onResize;if(t._parentNode){var i=window.getComputedStyle(t._parentNode)||{},a=parseFloat(i.paddingLeft||"0"),l=parseFloat(i.paddingRight||"0"),o=parseFloat(i.paddingTop||"0"),c=parseFloat(i.paddingBottom||"0"),d=t._parentNode.getBoundingClientRect(),u=d.height-o-c,p=d.width-a-l,f=t._parentNode.offsetHeight-o-c,h=t._parentNode.offsetWidth-a-l;(s||t.state.height===f&&t.state.scaledHeight===u)&&(r||t.state.width===h&&t.state.scaledWidth===p)||(t.setState({height:f,width:h,scaledHeight:u,scaledWidth:p}),"function"==typeof n&&n({height:f,scaledHeight:u,scaledWidth:p,width:h}))}},t._setRef=function(e){t._autoSizer=e},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(e,A.Component),s=e,(r=[{key:"componentDidMount",value:function(){var e=this,t=this.props.nonce,s=this._autoSizer?this._autoSizer.parentNode:null;if(null!=s&&s.ownerDocument&&s.ownerDocument.defaultView&&s instanceof s.ownerDocument.defaultView.HTMLElement){this._parentNode=s;var r=s.ownerDocument.defaultView.ResizeObserver;null!=r?(this._resizeObserver=new r(function(){e._timeoutId=setTimeout(e._onResize,0)}),this._resizeObserver.observe(s)):(this._detectElementResize=Le(t),this._detectElementResize.addResizeListener(s,this._onResize)),this._onResize()}}},{key:"componentWillUnmount",value:function(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}},{key:"render",value:function(){var e=this.props,s=e.children,r=(e.defaultHeight,e.defaultWidth,e.disableHeight),n=void 0!==r&&r,i=e.disableWidth,l=void 0!==i&&i,c=e.doNotBailOutOnEmptyChildren,d=void 0!==c&&c,u=(e.nonce,e.onResize,e.style),p=void 0===u?{}:u,f=e.tagName,h=void 0===f?"div":f,m=o(e,t),C=this.state,y=C.height,v=C.scaledHeight,j=C.scaledWidth,_=C.width,g={overflow:"visible"},x={},b=!1;return n||(0===y&&(b=!0),g.height=0,x.height=y,x.scaledHeight=v),l||(0===_&&(b=!0),g.width=0,x.width=_,x.scaledWidth=j),d&&(b=!1),A.createElement(h,a({ref:this._setRef,style:a(a({},g),p)},m),!b&&s(x))}}])&&c(s.prototype,r),n&&c(s,n),Object.defineProperty(s,"prototype",{writable:!1}),s;var s,r,n}(),He=L.styled_default("div")({name:"Container",class:"c1itm4k7",propsAsIs:!1}),ke=L.styled_default("div")({name:"IconContainer",class:"i1w4fsni",propsAsIs:!1}),Ve=L.styled_default(E.B1)({name:"InviteGameIcon",class:"i19m85r1",propsAsIs:!0}),qe=L.styled_default("div")({name:"Content",class:"c1mbu204",propsAsIs:!1}),ze=L.styled_default("div")({name:"Heading",class:"h1amdqtv",propsAsIs:!1}),Oe=L.styled_default("div")({name:"Subtext",class:"s1lhlj9j",propsAsIs:!1}),Se=L.styled_default("div")({name:"LinkContainer",class:"l1wot35e",propsAsIs:!1}),Ee=L.styled_default("div")({name:"LinkInfo",class:"l1jdw39q",propsAsIs:!1}),Re=L.styled_default("span")({name:"LinkTitle",class:"l1cr5mk",propsAsIs:!1}),Be=L.styled_default("span")({name:"LinkAddress",class:"lvi87q4",propsAsIs:!1}),Me=L.styled_default(E.B1)({name:"LinkIcon",class:"l1pqlvw3",propsAsIs:!0}),Pe=function(e){var t=e.inviteLink,s=e.inviteCardTitle,r=e.inviteCardSubtext,n=e.primaryColor,i=e.className,a=A.useRef(null),l=_(_e(a),2),o=l[0],c=l[1],d=_(M.f$1({type:"invitation",action:"sent",payload:{from:I.InvitationFrom.MENU}}),1)[0];return T.jsxs(He,{className:i,children:[T.jsx(ke,{style:{backgroundColor:n},children:T.jsx(Ve,{name:"invite-game-icon"})}),T.jsxs(qe,{children:[T.jsx(ze,{children:s||""}),T.jsx(Oe,{children:r||""})]}),t&&T.jsxs(Se,{ref:a,"data-a":"intr",onClick:d(function(){return o(t)}),children:[T.jsxs(Ee,{children:[T.jsx(Re,{children:"Invite link"}),T.jsx(Be,{children:t})]}),T.jsx(Me,{name:"icon-copy"})]}),c]})},Fe=L.styled_default(z.r)({name:"Container",class:"cll3md7",propsAsIs:!0}),Ne=L.styled_default(z.S)({name:"ActionBtn",class:"a10g1iik",propsAsIs:!0}),Ze=function(e){var t=e.questionId,r=o(e,s);return T.jsxs(Fe,{"data-a":"intr","data-name":t,children:[T.jsx(O.O,a({questionId:t},r)),T.jsx(Ne,{"data-a":"intr","data-name":t,children:"View Insight"})]})},We=L.styled_default(z.r)({name:"Container",class:"cl56x6b",propsAsIs:!0}),Ge=L.styled_default("button")({name:"ActionButton",class:"a11pzf92",propsAsIs:!1}),De=L.styled_default("blockquote")({name:"Quote",class:"q1hbaleq",propsAsIs:!1}),Qe=function(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return T.jsxs(We,{"data-a":"intr","data-name":t.tweetId,children:[t.title&&T.jsx(De,{children:t.title}),T.jsx(k.b,a({},t)),T.jsx(Ge,{"data-a":"intr","data-name":t.tweetId,children:"View Insight"})]})},Ue=L.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),Ye=L.styled_default("div")({name:"InsightContainer",class:"i1pqqgpo",propsAsIs:!1}),$e=L.styled_default("img")({name:"Image",class:"igj7luu",propsAsIs:!1}),Je=L.styled_default("div")({name:"ImageContainer",class:"i1qne9g6",propsAsIs:!1}),Ke=L.styled_default("div")({name:"InsightContent",class:"itpr98r",propsAsIs:!1}),Xe=L.styled_default("h3")({name:"Title",class:"t17iaqp8",propsAsIs:!1}),et=L.styled_default("div")({name:"Description",class:"d16t3y7s",propsAsIs:!1}),tt=L.styled_default("button")({name:"ActionBtn",class:"a12495er",propsAsIs:!1}),st=function(e){var t=e.video,s=e.image,r=e.imageMode,n=e.heading,i=e.body,a=e.action,l=e.controlVideo;return T.jsxs(Ye,{children:[(null==t?void 0:t.url)&&T.jsx(S.Et,{source:t.url,poster:t.thumbnailUrl,controlVideo:l}),s&&!(null!=t&&t.url)&&T.jsx(Je,{"data-rounded":r===I.QuestionImages.ROUNDED,children:T.jsx($e,{src:s,alt:n})}),T.jsxs(Ke,{children:[T.jsx(Xe,{children:n}),T.jsx(et,{children:i}),a&&T.jsx(tt,{onClick:a,children:"View Insight"})]})]})},rt=L.styled_default("div")({name:"Container",class:"c1eptrjd",propsAsIs:!1}),nt=L.styled_default("div")({name:"CloseIconWrap",class:"crylm65",propsAsIs:!1}),it=L.styled_default(E.B1)({name:"CloseIcon",class:"c9mrcz7",propsAsIs:!0}),at=L.styled_default("div")({name:"Header",class:"hw3lzv4",propsAsIs:!1}),lt=L.styled_default(E.B1)({name:"TypeIcon",class:"t1rrb3kf",propsAsIs:!0}),ot=L.styled_default("span")({name:"TypeName",class:"t1ydnjov",propsAsIs:!1}),ct=L.styled_default("div")({name:"Question",class:"qlf90cl",propsAsIs:!1}),dt=L.styled_default("button")({name:"AnswerButton",class:"a1e0nhcl",propsAsIs:!1}),ut=L.styled_default("div")({name:"Container",class:"c1t4f0x4",propsAsIs:!1}),pt=L.styled_default("button")({name:"ActionBtn",class:"a16w1nl6",propsAsIs:!1}),ft=L.styled_default("div")({name:"QuoteWrap",class:"q14u54rf",propsAsIs:!1}),ht=L.styled_default("blockquote")({name:"Quote",class:"q1hxm6zo",propsAsIs:!1}),mt=function(e){var t=e.action,s=o(e,r);return T.jsxs(ut,{children:[s.title&&T.jsx(ft,{children:T.jsx(ht,{children:s.title})}),T.jsx(k.b,a({},s)),t&&T.jsx(pt,{onClick:t,children:"View Insight"})]})},Ct=L.styled_default("div")({name:"BGWrap",class:"b1dqe0sz",propsAsIs:!1}),yt=L.styled_default("div")({name:"BGLineBase",class:"b1v6w7ni",propsAsIs:!1}),vt=L.styled_default(yt)({name:"BGOneLineOne",class:"b2nqb1p",propsAsIs:!0}),jt=L.styled_default(yt)({name:"BGOneLineTwo",class:"b1xxgmbk",propsAsIs:!0}),_t=L.styled_default(yt)({name:"BGOneLineThree",class:"b63lwcb",propsAsIs:!0}),gt=L.styled_default(yt)({name:"BGTwoLineOne",class:"b2iah4",propsAsIs:!0}),xt=L.styled_default(yt)({name:"BGTwoLineTwo",class:"b1xezvf6",propsAsIs:!0}),bt=L.styled_default(yt)({name:"BGTwoLineThree",class:"b1jz1hg0",propsAsIs:!0}),wt=L.styled_default(yt)({name:"BGThreeLineOne",class:"b18ho1tk",propsAsIs:!0}),It=L.styled_default(yt)({name:"BGThreeLineTwo",class:"b14uvjfm",propsAsIs:!0}),At=L.styled_default(yt)({name:"BGThreeLineThree",class:"b11c3ns7",propsAsIs:!0}),Lt=L.styled_default(yt)({name:"BGThreeLineFour",class:"b1bqhhet",propsAsIs:!0}),Tt=L.styled_default(yt)({name:"BGFourLineOne",class:"b1xyzi7o",propsAsIs:!0}),Ht=L.styled_default(yt)({name:"BGFourLineTwo",class:"byo0rup",propsAsIs:!0}),kt=L.styled_default(yt)({name:"BGFourLineThree",class:"b1oyiqgv",propsAsIs:!0}),Vt=L.styled_default(yt)({name:"BGFourLineFour",class:"bx3ddqw",propsAsIs:!0}),qt=function(e){var t=e.step,s=e.correct;return T.jsxs(T.Fragment,{children:[T.jsxs(Ct,{"data-active":1===t,"data-first-screen":"true",children:[T.jsx(vt,{}),T.jsx(jt,{}),T.jsx(_t,{})]}),T.jsxs(Ct,{"data-active":2===t,children:[T.jsx(gt,{}),T.jsx(xt,{}),T.jsx(bt,{})]}),T.jsxs(Ct,{"data-active":3===t,children:[T.jsx(gt,{}),T.jsx(xt,{}),T.jsx(bt,{})]}),s?T.jsxs(T.Fragment,{children:[T.jsxs(Ct,{"data-active":4===t,"data-correct":"true",children:[T.jsx(wt,{}),T.jsx(It,{}),T.jsx(At,{}),T.jsx(Lt,{})]}),T.jsxs(Ct,{"data-active":5===t,"data-correct":"true",children:[T.jsx(wt,{}),T.jsx(It,{}),T.jsx(At,{}),T.jsx(Lt,{})]})]}):T.jsxs(Ct,{"data-active":4===t,"data-correct":"false",children:[T.jsx(Tt,{}),T.jsx(Ht,{}),T.jsx(kt,{}),T.jsx(Vt,{})]})]})},zt=L.styled_default(B.f)({name:"Container",class:"c10131zw",propsAsIs:!0}),Ot=L.styled_default("div")({name:"InnerContainer",class:"ir6k2eo",propsAsIs:!1}),St=L.styled_default("div")({name:"Content",class:"c1hwoq9l",propsAsIs:!1}),Et=L.styled_default("div")({name:"Title",class:"t4ujo4g",propsAsIs:!1}),Rt=L.styled_default(Et)({name:"PointsTitle",class:"p1pjil1h",propsAsIs:!0}),Bt=L.styled_default("div")({name:"Subtitle",class:"s1iorwr9",propsAsIs:!1}),Mt=L.styled_default("div")({name:"SubtitleFG",class:"s51sv9d",propsAsIs:!1}),Pt=L.styled_default("div")({name:"AnswerText",class:"a1lbk2ye",propsAsIs:!1}),Ft=L.styled_default(E.B1)({name:"FeedbackIcon",class:"frcvk3t",propsAsIs:!0}),Nt=L.styled_default(Ft)({name:"FeedbackIconCorrect",class:"f33p82r",propsAsIs:!0}),Zt=L.styled_default(Ft)({name:"FeedbackIconIncorrect",class:"f12r9net",propsAsIs:!0}),Wt=L.styled_default("div")({name:"CloseIconWrap",class:"c1fw6699",propsAsIs:!1}),Gt=L.styled_default(E.B1)({name:"CloseIcon",class:"c115o126",propsAsIs:!0}),Dt=function(e,t,s){return e===t?"translateY(0px)":e>t?"translateY(".concat(s,"px)"):"translateY(-100%)"},Qt=L.styled_default("div")({name:"Container",class:"cl51m2q",propsAsIs:!1}),Ut=L.styled_default("img")({name:"Avatar",class:"a2yhhhr",propsAsIs:!1}),Yt=L.styled_default("div")({name:"AvatarPlaceholder",class:"a1dtxxlr",propsAsIs:!1}),$t=L.styled_default("div")({name:"Content",class:"c12clm3w",propsAsIs:!1}),Jt=L.styled_default("span")({name:"Name",class:"n14lctn7",propsAsIs:!1}),Kt=function(e){var t=e.avatar,s=e.name;return T.jsxs(Qt,{children:[t&&T.jsx(Ut,{src:t}),!t&&T.jsx(Yt,{children:k.I(s||"")}),T.jsxs($t,{children:[T.jsxs(Jt,{children:[s," "]}),"is waiting for you!"]})]})},Xt=L.styled_default("div")({name:"Container",class:"c1htq1lb",propsAsIs:!1}),es=L.styled_default("div")({name:"Graphic",class:"gjyzpp7",propsAsIs:!1}),ts=L.styled_default("img")({name:"GraphicImage",class:"g16mldgz",propsAsIs:!1}),ss=L.styled_default("div")({name:"Headline",class:"h69js65",propsAsIs:!1}),rs=L.styled_default("div")({name:"TaglineContainer",class:"tmm7qmo",propsAsIs:!1}),ns=L.styled_default("div")({name:"Tagline",class:"t17knuw2",propsAsIs:!1}),is=L.styled_default("div")({name:"Content",class:"c1b74psg",propsAsIs:!1}),as=L.styled_default("div")({name:"StepsContainer",class:"s1y99ug7",propsAsIs:!1}),ls=L.styled_default("span")({name:"StepIndicator",class:"sgf3v5n",propsAsIs:!1}),os=L.styled_default("div")({name:"InvitingUserWrap",class:"i1sj6gn8",propsAsIs:!1}),cs=function(e){var t=e.loading,s=e.steps,r=e.currentStep,n=e.inviterName,i=s[r],a=i.headline,l=i.tagline;return T.jsxs(Xt,{children:[l&&T.jsx(rs,{children:T.jsx(H.i,{loading:t,children:T.jsx(ns,{children:l})})}),T.jsxs(is,{"data-welcome-screen":0===r,children:[T.jsx(es,{children:T.jsx(H.i,{loading:t,children:s.map(function(e,t){var s=e.graphicSrc;return T.jsx(ts,{src:s,"data-active":r===t})})})}),a&&T.jsx(H.i,{loading:t,children:T.jsx(ss,{children:a})})]}),n&&0===r&&T.jsx(os,{children:T.jsx(Kt,{name:n})}),T.jsx(as,{style:t?{visibility:"hidden"}:{},children:Array.from({length:s.length}).map(function(e,t){return T.jsx(ls,{"data-active":r===t},t)})})]})},ds=L.styled_default("div")({name:"Container",class:"cm0bev",propsAsIs:!1}),us=L.styled_default("div")({name:"Content",class:"ce7x737",propsAsIs:!1}),ps=L.styled_default("div")({name:"Title",class:"tc2tor6",propsAsIs:!1}),fs=L.styled_default("div")({name:"RulesList",class:"r1k5klql",propsAsIs:!1}),hs=L.styled_default("div")({name:"RulesItem",class:"r1tf3ft2",propsAsIs:!1}),ms=L.styled_default("div")({name:"RuleIcon",class:"rwpvg1k",propsAsIs:!1}),Cs=L.styled_default("div")({name:"RuleText",class:"rbxiag0",propsAsIs:!1}),ys=L.styled_default("button")({name:"TermsButton",class:"t6cyrry",propsAsIs:!1}),vs=function(e){var t=e.rules,s=e.rulesTitle,r=e.termsText,n=e.primaryColor,i=e.openTerms;return T.jsxs(ds,{children:[T.jsxs(us,{children:[T.jsx(ps,{children:s}),T.jsx(fs,{children:null==t?void 0:t.map(function(e,t){var s=e.label,r=e.icon;return T.jsxs(hs,{children:[r&&T.jsx(ms,{style:{backgroundColor:n},children:T.jsx(E.B1,{name:r,"data-icon":r})}),T.jsx(Cs,{children:s})]},t)})})]}),r&&T.jsx(ys,{"data-a":"intr",onClick:i,children:"See Terms and Conditions"})]})},js=L.styled_default("div")({name:"Container",class:"cj0g35h",propsAsIs:!1}),_s=L.styled_default("div")({name:"Content",class:"c1xkhrbn",propsAsIs:!1}),gs=L.styled_default("div")({name:"Title",class:"tifzb8b",propsAsIs:!1}),xs=L.styled_default("div")({name:"ScrollingText",class:"stduw5c",propsAsIs:!1}),bs=function(e){var t=e.termsTitle,s=e.termsText;return T.jsx(js,{children:T.jsxs(_s,{children:[T.jsx(gs,{children:t}),T.jsx(xs,{children:s})]})})},ws=L.styled_default("button")({name:"SButton",class:"s1nve60q",propsAsIs:!1}),Is=L.styled_default("span")({name:"ButtonLabel",class:"b1xoswwx",propsAsIs:!1}),As=function(e){var t=e.disabled,s=e.variant,r=void 0===s?"primary":s,i=e.onClick,l=e.children,c=o(e,n);return T.jsx(ws,a(a({"data-a":"intr",onClick:i,disabled:t,"data-variant":r},c),{},{children:T.jsx(Is,{children:l})}))},Ls=L.styled_default("div")({name:"Container",class:"c18uddbs",propsAsIs:!1}),Ts=L.styled_default("div")({name:"Content",class:"cvcfjf6",propsAsIs:!1}),Hs=L.styled_default("div")({name:"OnboardingHeader",class:"o1ie27lw",propsAsIs:!1}),ks=L.styled_default("button")({name:"CloseBtn",class:"c15cjkwi",propsAsIs:!1}),Vs=L.styled_default(E.B1)({name:"IconClose",class:"i1mavjt2",propsAsIs:!0}),qs=L.styled_default("div")({name:"OnboardingFooter",class:"o1x0dyzv",propsAsIs:!1}),zs=L.styled_default(As)({name:"OnboardingActionBtn",class:"o1jfi9c3",propsAsIs:!0}),Os={steps:!1,rules:!1,inviteCard:!1},Ss=L.styled_default("button")({name:"Container",class:"crkmfw1",propsAsIs:!1}),Es=L.styled_default("div")({name:"Content",class:"c11awpy4",propsAsIs:!1}),Rs=L.styled_default("span")({name:"Title",class:"t154z7mh",propsAsIs:!1});exports.D=function(e){var t=e.close,s=e.votedAnswer,r=e.mastersApp,n=e.correct,i=e.correctAnswerTitle,l=e.questionTitle,o=e.saveHeight,c=e.style,d=e.hiding,u=_(A.useState(1),2),p=u[0],f=u[1],h=A.useRef({});A.useEffect(function(){var e=setInterval(function(){f(function(e){return n&&e>4||!n&&e>3?e:++e})},3e3);return function(){return clearInterval(e)}},[n]),A.useEffect(function(){var e,t;h.current[p]&&o((null==(t=null==(e=h.current[p])?void 0:e.getBoundingClientRect())?void 0:t.height)||118)},[p,o]);var m=function(e){return function(t){h.current&&(h.current[e]=t)}},C=function(e){return{transform:Dt(e,p,c.height)}},y=a({},c);return r&&y.height&&"number"==typeof y.height&&(y.height+=32),T.jsx(zt,{style:c.height?y:a(a({},c),{},{paddingTop:0,paddingBottom:0}),hiding:d,children:T.jsxs(Ot,{style:{height:c.height,minHeight:c.height,backgroundColor:p>3?n?"var(--color-sdk-prediction-result-success-bg)":"var(--color-sdk-prediction-result-incorrect-bg)":"var(--color-primary-1)"},children:[T.jsx(qt,{step:p,correct:n}),r&&T.jsxs(St,{ref:m(1),style:C(1),children:[T.jsx("img",{alt:"sponsor-logo",src:"data:image/svg+xml,%3csvg%20width='154'%20height='37'%20viewBox='0%200%20154%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M70.9776%2030.8796L74.668%2018.1381C75.0696%2016.7473%2076.1186%2015.6318%2077.4936%2015.1371L77.5928%2014.7217H72.466L63.7623%2024.9662L60.431%2014.7217H55.7389L55.6255%2015.1371C56.4288%2015.5291%2056.8683%2016.7052%2056.8683%2017.662V17.7227C56.8683%2023.1787%2052.781%2032.5598%2047.0352%2032.5598C44.8002%2032.5598%2043.6425%2031.0009%2043.6425%2029.7035C43.6425%2028.1306%2044.975%2027.0105%2046.3831%2027.0105C47.744%2027.0105%2047.9519%2027.5099%2048.741%2027.5099C49.2182%2027.5099%2049.6766%2027.2672%2049.9081%2026.8518C50.2672%2026.1984%2049.9931%2025.4049%2049.3363%2025.0922L48.9772%2024.9242C45.6271%2023.3327%2041.7383%2025.7457%2041.7383%2029.4188V29.4701C41.7383%2032.1444%2043.8646%2034.38%2046.5674%2034.4733C53.5417%2034.716%2058.2055%2025.4236%2058.9473%2018.6188L59.486%2020.4577L62.2313%2028.5927H63.2709L71.8518%2018.4741L68.2512%2030.8936C67.8401%2032.3171%2066.6966%2033.4232%2065.2412%2033.7966L65.142%2034.212H72.0408L72.1542%2033.7966C71.1383%2033.2039%2070.6516%2032.0044%2070.9776%2030.8796Z'%20fill='white'/%3e%3cpath%20d='M88.2952%2021.6521H88.2385C85.016%2021.6568%2081.5571%2021.9648%2079.7143%2027.1361C78.1692%2031.4813%2077.7487%2033.2828%2076.539%2033.2828C75.7641%2033.2828%2075.9531%2031.794%2074.7954%2031.794C74.2709%2031.794%2073.7275%2032.2094%2073.6897%2032.8068C73.6236%2033.8429%2075.0317%2034.4683%2076.0949%2034.4683C79.3316%2034.4683%2080.5696%2032.1347%2080.9759%2031.0472C81.0279%2030.9072%2081.3162%2030.1371%2081.6517%2029.2317H85.0538L84.4773%2031.3273C84.1749%2032.4334%2083.5464%2033.3388%2082.488%2033.8009L82.3982%2034.2163H87.9597L88.0637%2033.8009C87.3124%2033.1848%2086.9816%2032.2%2087.2273%2031.2853L89.3206%2023.4257C89.4812%2022.8236%2089.9018%2022.3242%2090.4783%2022.0628L90.568%2021.6475H88.7536H88.2952V21.6521ZM85.3231%2028.2189H82.0202C82.3935%2027.2108%2082.7526%2026.2493%2082.8755%2025.9366C83.7118%2023.757%2085.2995%2022.8749%2086.8399%2022.7536L86.8257%2022.7676L85.3231%2028.2189Z'%20fill='white'/%3e%3cpath%20d='M116.358%2022.5486C116.538%2022.2545%20116.708%2021.8112%20116.708%2021.5591C116.732%2021.0877%20116.297%2020.7237%20115.829%2020.8217C115.456%2020.9011%20115.187%2021.2324%20115.191%2021.6058C115.196%2021.9978%20115.12%2022.4226%20114.95%2022.6279C114.558%2023.104%20113.934%2023.062%20111.062%2022.2452V22.2405C110.797%2022.1659%20110.509%2022.0819%20110.206%2021.9978C110.187%2021.9932%20110.173%2021.9885%20110.159%2021.9838C108.723%2021.6011%20106.941%2021.2464%20105.774%2021.8205C105.765%2021.8252%20105.755%2021.8298%20105.746%2021.8345C104.602%2022.3992%20103.808%2023.4727%20103.567%2024.7142C103.53%2024.8962%20103.506%2025.0455%20103.501%2025.0969C103.468%2025.7456%20104.068%2026.2544%20104.711%2026.1143C105.235%2026.0023%20105.604%2025.5403%20105.59%2025.0129C105.58%2024.4808%20105.472%2023.7667%20105.765%2023.286C106.237%2022.6279%20106.729%2022.5812%20108.935%2023.3047L106.544%2031.323C106.214%2032.4291%20105.406%2033.3345%20104.338%2033.7966L104.238%2034.212H109.961L110.074%2033.7966C109.337%2033.1852%20109.03%2032.1957%20109.299%2031.2809L111.392%2024.0561C112.309%2024.2428%20113.24%2024.2941%20114.147%2024.0374L114.473%2023.9441C115.196%2023.7527%20115.943%2023.2347%20116.358%2022.5486Z'%20fill='white'/%3e%3cpath%20d='M118.649%2021.6523L118.536%2022.0677C119.245%2022.5531%20119.561%2023.4259%20119.335%2024.2427L117.208%2031.3228C116.877%2032.429%20116.069%2033.3344%20115.002%2033.7964L114.902%2034.2118H117.931H118.21H125.18L126.101%2030.8934H125.666L125.51%2031.2108C124.934%2032.3963%20123.72%2033.1524%20122.382%2033.1524H119.429L121.003%2027.5937H122.259C123.105%2027.5937%20123.743%2028.3545%20123.582%2029.1759H124.012L125.043%2025.4188H124.613C124.362%2026.1142%20123.696%2026.5763%20122.949%2026.5809H121.291L122.382%2022.7258L125.515%2022.7211C126.536%2022.7211%20127.301%2023.6452%20127.098%2024.6347H127.528L128.35%2021.6523H118.649Z'%20fill='white'/%3e%3cpath%20d='M138.251%2021.6582H131.333L131.22%2022.0736C131.881%2022.5263%20132.207%2023.3197%20132.056%2024.0898L129.892%2031.324C129.561%2032.4301%20128.753%2033.3356%20127.685%2033.7976L127.586%2034.213H133.303L133.417%2033.7976C132.68%2033.1862%20132.373%2032.2014%20132.637%2031.282L133.686%2027.5949H134.126C134.787%2027.5949%20135.34%2028.085%20135.416%2028.7337C135.439%2028.9437%20135.77%2031.506%20136.035%2032.3881C136.379%2033.5409%20136.833%2034.213%20137.868%2034.213H140.453L140.552%2033.7976L140.183%2033.5829C139.451%2033.1536%20138.922%2032.4908%20138.685%2031.6087C138.463%2030.7779%20138.043%2029.2284%20137.84%2028.4117C137.736%2027.9916%20137.202%2027.5996%20136.654%2027.5996H137.523C139.087%2027.5996%20140.457%2026.5681%20140.878%2025.0839C141.365%2023.3617%20140.056%2021.6582%20138.251%2021.6582ZM138.369%2024.6872C138.029%2025.812%20136.98%2026.5868%20135.789%2026.5868H133.974L135.071%2022.7317H136.89C137.925%2022.727%20138.662%2023.7118%20138.369%2024.6872Z'%20fill='white'/%3e%3cpath%20d='M100.265%2022.2961C100.081%2022.2961%2099.6794%2022.1701%2099.0651%2021.9181C98.4508%2021.6661%2097.8318%2021.54%2097.2034%2021.54C95.904%2021.54%2094.8219%2021.9554%2093.9336%2022.8422C93.1964%2023.5796%2092.8704%2024.401%2092.8704%2025.1105C92.8704%2025.8665%2093.3193%2026.7533%2094.2124%2027.4721C95.0582%2028.1488%2095.937%2028.8022%2096.8206%2029.465C97.7468%2030.1977%2098.2098%2030.8745%2098.2098%2031.4252C98.2098%2032.634%2097.416%2033.2828%2095.7669%2033.2828C94.0942%2033.2828%2092.9366%2032.074%2092.568%2029.8057H92.1144L90.8008%2034.2162H91.226C91.7694%2033.8382%2092.1569%2033.6001%2092.946%2033.6001C93.6973%2033.6001%2094.5006%2034.4729%2096.2158%2034.4729C97.5814%2034.4729%2098.6682%2034.1929%2099.5943%2033.2781C100.383%2032.4753%20100.776%2031.3552%20100.776%2030.4404C100.776%2029.591%20100.237%2028.6062%2099.2966%2027.8921C98.4886%2027.2807%2097.6286%2026.7347%2096.7923%2026.1419C95.8898%2025.4792%2095.4362%2024.9144%2095.4362%2024.2937C95.4362%2023.9483%2095.611%2023.6076%2095.9559%2023.2622C96.3954%2022.8282%2096.986%2022.7302%2097.7751%2022.7302C99.3581%2022.7302%20100.464%2023.5983%20100.558%2025.4325H100.974L102.08%2021.5447H101.664C101.215%2022.0441%20100.752%2022.2961%20100.265%2022.2961Z'%20fill='white'/%3e%3cpath%20d='M149.201%2022.7304C150.784%2022.7304%20151.89%2023.6032%20151.984%2025.4327H152.4L153.501%2021.5449H153.085C152.646%2022.049%20152.182%2022.301%20151.696%2022.301C151.512%2022.301%20151.11%2022.175%20150.496%2021.923C149.881%2021.6709%20149.262%2021.5449%20148.634%2021.5449C147.334%2021.5449%20146.252%2021.9603%20145.364%2022.8471C144.627%2023.5845%20144.296%2024.4059%20144.296%2025.1153C144.296%2025.8714%20144.745%2026.7582%20145.638%2027.477C146.484%2028.1537%20147.363%2028.8071%20148.246%2029.4699C149.173%2030.2026%20149.636%2030.8794%20149.636%2031.4301C149.636%2032.6389%20148.842%2033.2876%20147.193%2033.2876C145.52%2033.2876%20144.362%2032.0788%20143.994%2029.8106H143.54L142.227%2034.2211H142.642C143.186%2033.843%20143.573%2033.605%20144.358%2033.605C145.109%2033.605%20145.912%2034.4778%20147.627%2034.4778C148.993%2034.4778%20150.075%2034.1978%20151.006%2033.283C151.795%2032.4802%20152.187%2031.3601%20152.187%2030.4453C152.187%2029.6005%20151.649%2028.6111%20150.708%2027.897C149.9%2027.2856%20149.04%2026.7395%20148.204%2026.1468C147.301%2025.4841%20146.848%2024.9193%20146.848%2024.2986C146.848%2023.9532%20147.023%2023.6125%20147.368%2023.2671C147.826%2022.8237%20148.412%2022.7304%20149.201%2022.7304Z'%20fill='white'/%3e%3cpath%20d='M26.5433%202.60035C26.0377%202.44633%2025.5321%202.72169%2025.0265%203.00173C24.8469%203.09974%2024.7194%203.27243%2024.6768%203.46845L23.883%207.13222C23.8547%207.26757%2023.9775%207.38891%2024.1145%207.36091C24.9509%207.17422%2025.7447%206.4508%2026.5811%206.70283C27.5167%206.98753%2028.4522%205.81606%2029.3878%205.83006V1.60156C28.4475%201.60623%2027.4789%202.88505%2026.5433%202.60035Z'%20fill='white'/%3e%3cpath%20d='M38.4856%2013.8398C38.2871%2013.7044%2038.1643%2013.4851%2038.1643%2013.2471V12.5796C38.1643%2011.9822%2037.6729%2011.4922%2037.0633%2011.4922H36.6239C36.0994%2011.4922%2035.6174%2011.7536%2035.3339%2012.1876L33.9164%2014.3485C33.7746%2014.5632%2033.5383%2014.6892%2033.2832%2014.6892H32.3287C31.8562%2014.6892%2031.4215%2014.9459%2031.1947%2015.3566C30.9631%2015.7814%2030.552%2016.0754%2030.0843%2016.1734V1.1403C30.0843%200.94894%2029.9283%200.794922%2029.7346%200.794922C29.5409%200.794922%2029.3849%200.94894%2029.3849%201.1403V1.60702V5.83552V16.1827C28.9171%2016.0847%2028.506%2015.7907%2028.2745%2015.3613C28.0524%2014.9506%2027.6177%2014.6939%2027.1405%2014.6939H26.4979C25.9875%2014.6939%2025.5292%2014.9879%2025.3213%2015.45L24.7873%2016.6308C24.7023%2016.8175%2024.5133%2016.9388%2024.3054%2016.9388C24.0975%2016.9388%2023.9085%2016.8175%2023.8234%2016.6308L23.2895%2015.45C23.0816%2014.9926%2022.6232%2014.6939%2022.1129%2014.6939H4.00135C3.85487%2014.6939%203.73674%2014.8106%203.73674%2014.9553C3.73674%2015.2633%203.48158%2015.5107%203.17444%2015.5107H2.39007C2.24359%2015.5107%202.12546%2015.6273%202.12546%2015.772V16.6728C2.12546%2017.5176%201.96008%2018.339%201.62931%2019.1184L1.15207%2020.2526C0.707907%2021.3027%200.5%2022.3901%200.5%2023.4589V26.0726C0.5%2026.7773%200.603954%2027.4914%200.811861%2028.1868C1.39306%2030.1377%202.7161%2031.7339%204.53529%2032.6767L7.43182%2034.1842C7.46962%2034.2029%207.51214%2034.2122%207.55467%2034.2122L9.69517%2034.2309C10.196%2034.2355%2010.6875%2034.3616%2011.1269%2034.6043L12.2751%2035.239C12.3129%2035.2623%2012.3602%2035.2717%2012.4074%2035.2717H13.9431C14.4818%2035.2717%2015.0157%2035.4163%2015.474%2035.6917C15.474%2035.6917%2016.2253%2036.1444%2016.4805%2036.2891C16.8869%2036.5225%2017.3783%2036.7465%2018.2335%2036.7932C18.4273%2036.8025%2018.621%2036.7325%2018.7675%2036.5972C18.9092%2036.4618%2018.9943%2036.2704%2018.9943%2036.0791V35.0616C18.9943%2034.3242%2019.4337%2033.6521%2020.1189%2033.3581L22.4673%2032.3406C22.7886%2032.2006%2023.1477%2032.1773%2023.4832%2032.28L24.3621%2032.5367C24.7354%2032.644%2025.1323%2032.6487%2025.5056%2032.5367L27.5846%2031.9253C27.8587%2031.8459%2028.1517%2031.8459%2028.4304%2031.9299L29.2763%2032.1633C29.6684%2032.2706%2029.9472%2032.6347%2029.9472%2033.0361V35.071C29.9472%2036.0184%2030.7269%2036.7932%2031.6861%2036.7932C32.4043%2036.7932%2033.0328%2036.3405%2033.2501%2035.6637C33.6423%2034.4456%2033.8408%2033.1761%2033.8408%2031.8973V31.0292C33.8408%2030.4131%2034.1006%2029.8204%2034.5543%2029.3956L35.419%2028.5882C36.0002%2028.0421%2036.3356%2027.2674%2036.3356%2026.474V21.6481C36.3356%2020.9013%2036.5625%2020.1779%2036.9972%2019.5618C37.0302%2019.5198%2037.0444%2019.4638%2037.0444%2019.4125V18.2737C37.0444%2017.5316%2037.2712%2016.8128%2037.6965%2016.2014L38.5517%2014.9739C38.5848%2014.9319%2038.599%2014.8806%2038.599%2014.8246V14.0545C38.6037%2013.9098%2038.5139%2013.8585%2038.4856%2013.8398ZM30.0843%2025.2838C30.6654%2025.3725%2031.1002%2025.6665%2031.1002%2026.0212C31.1002%2026.3759%2030.6702%2026.67%2030.0843%2026.7587V25.2838ZM5.22516%2032.4433L4.78572%2032.2146C3.59026%2031.5939%202.63577%2030.6698%201.9837%2029.545V28.1355C2.73028%2029.2043%203.74619%2030.1144%204.98891%2030.7631L5.22516%2030.8845V32.4433ZM7.43654%2033.5961L6.2647%2032.9894V31.4305L7.43182%2032.0373H7.43654V33.5961ZM12.3129%2034.6556L11.3868%2034.1422C10.8812%2033.8622%2010.3142%2033.7128%209.73297%2033.7035V32.0793C10.2197%2032.0886%2010.7016%2032.2146%2011.1269%2032.448L12.2751%2033.0827C12.2846%2033.0874%2012.2987%2033.0874%2012.3129%2033.0921V34.6556ZM18.4603%2035.0616V35.8551V36.0791C18.4603%2036.1304%2018.4367%2036.1818%2018.3989%2036.2191C18.3611%2036.2564%2018.3139%2036.2705%2018.2619%2036.2705C17.52%2036.2331%2017.0948%2036.0418%2016.7498%2035.8411C16.4994%2035.6964%2015.7528%2035.2483%2015.7481%2035.2483C15.2803%2034.9683%2014.7511%2034.8143%2014.2077%2034.7723V33.1387C14.6519%2033.1808%2015.0866%2033.3114%2015.474%2033.5401L16.1214%2033.9228C16.8302%2034.3429%2017.6382%2034.5809%2018.4603%2034.6276V35.0616ZM24.8582%2032.0886C24.7448%2032.084%2024.6267%2032.0653%2024.5133%2032.0326L23.6344%2031.7713C23.4454%2031.7152%2023.2517%2031.6966%2023.0579%2031.6966V30.0677C23.1997%2030.0677%2023.3414%2030.0817%2023.4832%2030.1237L24.3621%2030.3804C24.5227%2030.4271%2024.6928%2030.4504%2024.8582%2030.4598V32.0886ZM30.363%2032.4807C30.1929%2032.0886%2029.8574%2031.7759%2029.4275%2031.6592L28.5864%2031.4259C28.3879%2031.3652%2028.18%2031.3419%2027.9721%2031.3419V29.7177C28.1328%2029.713%2028.2934%2029.7317%2028.4493%2029.783L29.1392%2029.9977C29.8716%2030.2264%2030.363%2030.8891%2030.363%2031.6452V32.4807ZM32.787%2035.365C32.7729%2035.4117%2032.7634%2035.4584%2032.7492%2035.505C32.6028%2035.9624%2032.1775%2036.2658%2031.6955%2036.2658C31.653%2036.2658%2031.6105%2036.2564%2031.568%2036.2518V34.6323C31.601%2034.6369%2031.6294%2034.6416%2031.6625%2034.6416C32.135%2034.6416%2032.565%2034.3802%2032.7918%2033.9835V35.365H32.787ZM37.3232%2015.0486C36.794%2015.8047%2036.5152%2016.6915%2036.5152%2017.6109V18.4137L36.1041%2019.0017C35.5702%2019.7625%2035.2867%2020.6539%2035.2867%2021.578V25.6245C35.2867%2026.2779%2035.0126%2026.9173%2034.5306%2027.3654L33.6659%2028.1775C33.0847%2028.7236%2032.7634%2029.489%2032.787%2030.2824L32.7918%2030.4644C32.8248%2031.5146%2032.6878%2032.56%2032.3901%2033.5681C32.2956%2033.8902%2031.9932%2034.1142%2031.6577%2034.1142C31.2372%2034.1142%2030.8923%2033.7782%2030.8923%2033.3581V31.6452C30.8923%2030.6558%2030.2496%2029.7923%2029.2952%2029.4983L28.6053%2029.2836C28.2225%2029.1669%2027.8209%2029.1623%2027.4334%2029.2743L25.3544%2029.881C25.0803%2029.9604%2024.7873%2029.9604%2024.5133%2029.881L23.6344%2029.6243C23.1808%2029.489%2022.6894%2029.5217%2022.2547%2029.7083L20.4071%2030.5111C19.2258%2031.0245%2018.4651%2032.1773%2018.4651%2033.4515V34.1095C17.7374%2034.0675%2017.0286%2033.8528%2016.4002%2033.4795L15.7528%2033.0967C15.2047%2032.7747%2014.581%2032.602%2013.9431%2032.602H12.4736L11.3868%2031.9999C10.8717%2031.7152%2010.2905%2031.5659%209.69989%2031.5612L7.62082%2031.5472L5.23461%2030.3057C1.61514%2028.4249%200.0700101%2024.1917%201.64349%2020.4579L2.12073%2019.3238C2.47512%2018.4837%202.6594%2017.5922%202.6594%2016.6775V16.0427H3.17444C3.68476%2016.0427%204.11948%2015.6927%204.2376%2015.2213H22.1176C22.4153%2015.2213%2022.6894%2015.394%2022.8075%2015.6647L23.3414%2016.8455C23.5115%2017.2235%2023.8896%2017.4662%2024.3101%2017.4662C24.7259%2017.4662%2025.1087%2017.2235%2025.2788%2016.8455L25.8127%2015.66C25.9356%2015.3893%2026.2049%2015.2166%2026.5026%2015.2166H27.1452C27.424%2015.2166%2027.6791%2015.366%2027.8114%2015.6087C28.1375%2016.2061%2028.7234%2016.6075%2029.3897%2016.7148V24.145C28.317%2024.2617%2027.4949%2024.8918%2027.4949%2025.6572C27.4949%2026.5066%2028.4966%2027.1927%2029.7346%2027.1927C30.9726%2027.1927%2031.9743%2026.5066%2031.9743%2025.6572C31.9743%2024.8918%2031.1521%2024.257%2030.0795%2024.145V16.7101C30.7458%2016.6028%2031.3317%2016.2014%2031.6577%2015.604C31.79%2015.3613%2032.0452%2015.212%2032.324%2015.212H33.2785C33.7179%2015.212%2034.1195%2014.9926%2034.3605%2014.6286L35.7781%2012.4676C35.9624%2012.1829%2036.2789%2012.0149%2036.6239%2012.0149H37.0633C37.3752%2012.0149%2037.6303%2012.2669%2037.6303%2012.575V13.2424C37.6303%2013.5644%2037.7579%2013.8725%2037.98%2014.1012L37.3232%2015.0486ZM29.3849%2025.2838V26.7587C28.8037%2026.67%2028.3737%2026.3759%2028.3737%2026.0212C28.3737%2025.6665%2028.8037%2025.3678%2029.3849%2025.2838Z'%20fill='white'/%3e%3c/svg%3e"}),T.jsx(Mt,{children:"Featured Groups +"})]}),!r&&T.jsx(St,{ref:m(1),style:C(1),children:T.jsx("img",{alt:"sponsor-logo",src:"data:image/svg+xml,%3csvg%20width='159'%20height='28'%20viewBox='0%200%20159%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6919_71839)'%3e%3cpath%20d='M4.13243%2025.9198C5.34921%2026.9052%207.05161%2027.0267%208.39597%2026.224L22.9838%2017.5138C25.4013%2016.0703%2025.4117%2012.5721%2023.0028%2011.1144L17.4686%207.76522C15.4767%206.55981%2012.8918%207.10053%2011.5501%209.00325L3.27399%2020.7399C2.14132%2022.3462%202.44805%2024.5556%203.97544%2025.7926L4.13243%2025.9198Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M4.11673%202.57147C5.33939%201.58127%207.0516%201.46387%208.39797%202.27791L22.9843%2011.0971C25.3835%2012.5477%2025.3874%2016.0265%2022.9914%2017.4824L17.5405%2020.7946C15.5485%2022.005%2012.9594%2021.4661%2011.6157%2019.5615L3.27518%207.7386C2.142%206.1323%202.44856%203.92248%203.97619%202.68529L4.11673%202.57147Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M49.8088%2020.0063C47.924%2020.0063%2046.7521%2018.7437%2046.7521%2016.6748V13.1359H50.1977V10.9296H46.7521V7.34668L44.2736%209.18483V10.9271H42.8892V13.1333H44.2736V16.6515C44.2736%2020.2137%2046.3632%2022.4174%2049.8321%2022.4174H50.361V20.0063H49.8088Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M30.4704%2019.5631L32.6818%2017.8339C33.6722%2019.4231%2035.01%2020.2761%2036.7159%2020.2761C38.5826%2020.2761%2039.757%2019.0783%2039.757%2017.5798C39.757%2015.8505%2037.9137%2015.2983%2035.977%2014.6761C33.6956%2013.9398%2031.23%2013.0168%2031.23%209.92907C31.23%207.37018%2033.5115%205.34277%2036.6226%205.34277C39.1815%205.34277%2040.7707%206.33314%2042.0618%207.83166L40.0111%209.35351C39.2515%208.17907%2038.1211%207.55685%2036.6226%207.55685C34.9167%207.55685%2033.8096%208.57055%2033.8096%209.88499C33.8096%2011.4976%2035.5856%2012.0291%2037.5196%2012.6746C39.8244%2013.4576%2042.3367%2014.4506%2042.3367%2017.585C42.3367%2020.1672%2040.2159%2022.6328%2036.7367%2022.6328C33.8563%2022.6328%2031.8963%2021.4117%2030.4678%2019.5683L30.4704%2019.5631Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M58.9189%2016.7007C58.9189%2013.3225%2061.5141%2010.6807%2064.8923%2010.6807C68.2704%2010.6807%2070.7982%2013.1384%2070.7982%2016.5399V17.5044H61.286C61.6075%2019.2725%2062.9867%2020.4444%2064.9856%2020.4444C66.5489%2020.4444%2067.7441%2019.6173%2068.3404%2018.3755L70.3627%2019.5007C69.3515%2021.3855%2067.5367%2022.6247%2064.9856%2022.6247C61.356%2022.6247%2058.9189%2020.0296%2058.9189%2016.6981V16.7007ZM61.4001%2015.4147H68.2938C67.9256%2013.7607%2066.663%2012.8403%2064.8923%2012.8403C63.1215%2012.8403%2061.8589%2013.8981%2061.4001%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M51.8955%2016.6752C51.8955%2013.113%2053.9851%2010.9326%2057.454%2010.9326H58.5559V13.323H57.4307C55.5459%2013.323%2054.33%2014.6322%2054.3533%2016.7011V22.423H51.8955V16.6804V16.6752Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M72.0138%2016.6774C72.0138%2013.3226%2074.6557%2010.7041%2077.9638%2010.7041C81.272%2010.7041%2083.8672%2013.3226%2083.8672%2016.6774V22.42H81.456V20.9267C80.6523%2022.0052%2079.4105%2022.6274%2077.8938%2022.6274C74.609%2022.6274%2072.0112%2020.0556%2072.0112%2016.6774H72.0138ZM81.5027%2016.6774C81.5027%2014.6319%2079.9394%2013.0011%2077.9638%2013.0011C75.9883%2013.0011%2074.4249%2014.6319%2074.4249%2016.6774C74.4249%2018.723%2075.9649%2020.3537%2077.9638%2020.3537C79.9627%2020.3537%2081.5027%2018.6997%2081.5027%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M85.4155%2015.978C85.4155%2012.9214%2087.5052%2010.6943%2090.6085%2010.6943C92.3766%2010.6943%2093.8026%2011.4073%2094.697%2012.6025C95.5474%2011.4073%2096.9266%2010.6943%2098.6948%2010.6943C101.819%2010.6943%20104.002%2012.8773%20104.002%2015.978V22.4103H101.544V16.0014C101.544%2014.2566%20100.372%2013.038%2098.6948%2013.038C97.0174%2013.038%2095.9155%2014.2799%2095.9389%2015.934V22.4129H93.4811V16.004C93.4811%2014.2592%2092.2859%2013.0406%2090.6085%2013.0406C88.9311%2013.0406%2087.8526%2014.2825%2087.8733%2015.9366V22.4154H85.4155V15.9832V15.978Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M105.578%205.6416H108.082V20.0227H114.859V22.4131H105.578V5.6416Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M138.483%2016.7007C138.483%2013.3225%20141.078%2010.6807%20144.456%2010.6807C147.834%2010.6807%20150.362%2013.1384%20150.362%2016.5399V17.5044H140.85C141.171%2019.2725%20142.551%2020.4444%20144.55%2020.4444C146.113%2020.4444%20147.308%2019.6173%20147.904%2018.3755L149.927%2019.5007C148.916%2021.3855%20147.101%2022.6247%20144.55%2022.6247C140.92%2022.6247%20138.483%2020.0296%20138.483%2016.6981V16.7007ZM140.964%2015.4147H147.858C147.49%2013.7607%20146.227%2012.8403%20144.456%2012.8403C142.685%2012.8403%20141.423%2013.8981%20140.964%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M115.269%2016.6774C115.269%2013.3226%20117.911%2010.7041%20121.219%2010.7041C124.527%2010.7041%20127.122%2013.3226%20127.122%2016.6774V22.42H124.711V20.9267C123.907%2022.0052%20122.665%2022.6274%20121.149%2022.6274C117.864%2022.6274%20115.266%2020.0556%20115.266%2016.6774H115.269ZM124.758%2016.6774C124.758%2014.6319%20123.194%2013.0011%20121.219%2013.0011C119.243%2013.0011%20117.68%2014.6319%20117.68%2016.6774C117.68%2018.723%20119.22%2020.3537%20121.219%2020.3537C123.218%2020.3537%20124.758%2018.6997%20124.758%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M131.67%2021.8547L126.915%2010.9658H129.557L132.912%2018.938L136.082%2010.9658H138.678L131.74%2027.7606H129.212L131.67%2021.8573V21.8547Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M151.897%2016.6674C151.897%2013.1052%20153.987%2010.9248%20157.455%2010.9248H158.557V13.3152H157.432C155.547%2013.3152%20154.331%2014.6244%20154.355%2016.6933V22.4152H151.897V16.6726V16.6674Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6919_71839'%3e%3crect%20width='158.12'%20height='28'%20fill='white'%20style='fill:white;fill-opacity:1;'%20transform='translate(0.44043)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"})}),T.jsxs(St,{ref:m(2),style:C(2),children:[T.jsx(Et,{children:"Prediction results are in!"}),r&&T.jsx(Mt,{children:"Featured Groups +"})]}),T.jsxs(St,{ref:m(3),style:C(3),children:[T.jsx(Et,{children:l}),T.jsx(Bt,{children:T.jsxs(Pt,{children:[T.jsx("span",{children:"Your Pick:"})," ",null==s?void 0:s.title]})})]}),n?T.jsxs(T.Fragment,{children:[T.jsxs(St,{ref:m(4),style:a(a({},C(4)),{},{color:"var(--color-sdk-prediction-result-success-text)"}),children:[T.jsxs(Et,{children:["Congratulations!",T.jsx("br",{}),"You answered correctly."]}),T.jsxs(Bt,{children:[T.jsx(Nt,{name:"selected"}),T.jsxs(Pt,{children:[T.jsx("span",{children:"Your Pick:"})," ",null==s?void 0:s.title]})]})]}),T.jsxs(St,{ref:m(5),style:a(a({},C(5)),{},{color:"var(--color-sdk-prediction-result-success-text)"}),children:[T.jsx(Rt,{children:5===p&&T.jsx(R.d,{delay:.5,prefix:"+",suffix:" points",value:null==s?void 0:s.points})}),T.jsxs(Bt,{children:[T.jsx(Nt,{name:"selected"}),T.jsxs(Pt,{children:[T.jsx("span",{children:"Your Pick:"})," ",null==s?void 0:s.title]})]}),T.jsx(Wt,{"data-a":"intr",onClick:t,children:T.jsx(Gt,{name:"icon-cross"})})]})]}):T.jsxs(St,{ref:m(4),style:C(4),children:[T.jsxs(Et,{style:{color:"var(--color-sdk-prediction-result-error-title)"},children:["Better luck next time!",T.jsx("br",{}),"Correct: ",i,"."]}),T.jsxs(Bt,{style:{color:"var(--color-sdk-prediction-result-error-subtitle)"},children:[T.jsx(Zt,{name:"circleClose"}),T.jsxs(Pt,{children:[T.jsx("span",{children:"Your Pick:"})," ",null==s?void 0:s.title]})]}),T.jsx(Wt,{"data-a":"intr",onClick:t,children:T.jsx(Gt,{name:"icon-cross"})})]})]})})},exports.I=function(e){var t=_(A.useState(!1),2),s=t[0],r=t[1],n=_(A.useState(!1),2),i=n[0],a=n[1],l=A.useRef(null),o=A.useCallback(function(){a(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(function(){a(!1)},1e3)},[]),c=A.useCallback(function(){var e=v(m().m(function e(t){var s;return m().w(function(e){for(;;)switch(e.n){case 0:return r(!0),s=t.map(function(e){return new Promise(function(t,s){var r=new Image;r.onload=function(){return t(e)},r.onerror=function(){return s()},r.src=e})}),e.n=1,Promise.allSettled(s);case 1:r(!1);case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),[]);return A.useEffect(function(){e&&(o(),c(e))},[e,o,c]),{loading:s,throttled:i}},exports.M=Pe,exports.T=function(e){var t=e.children,s=e.container,r=e.useContainer,n=e.staticStyles,i=_(A.useState(function(){return me(s)}),1)[0],a=_(A.useState(!1),2),l=a[0],o=a[1];return A.useEffect(function(){if(!s.current||!i)return o(!0),function(){};var e=window.scrollY;return o(!0),function(){me(s)&&window.scrollTo({top:e,behavior:"instant"})}},[]),A.useEffect(function(){if(l&&s.current&&i){var e=he();window.scrollTo({top:s.current.offsetTop-e,behavior:"instant"})}},[l]),s.current&&l?r?V.createPortal(T.jsxs(fe,{className:"StaticContainer",children:[t,T.jsx("style",{children:q.u}),T.jsx("style",{children:"\n .sl-pill-button {\n display: none !important;\n }\n"})]}),s.current,"modal-node"):V.createPortal(T.jsxs(T.Fragment,{children:[t,T.jsx("style",{children:n})]}),s.current,"modal-node"):null},exports.T$1=_e,exports.createSingleStore=function(e){return I.atom(e)},exports.f=function(e){var t=e.title,s=e.onClick,r=e.className,n=e.style;return T.jsx(Ss,{"data-a":"intr",onClick:s,className:r,style:n,children:T.jsxs(Es,{"data-a":"intr",children:[T.jsx(E.B1,{"data-a":"intr",name:"iconUp"}),t&&T.jsx(Rs,{"data-a":"intr",children:t})]})})},exports.k=function(e){var t=e.questions,s=e.openQuestion,r=e.controlVideo;return t?T.jsx(Ue,{"data-a":"intr",onClick:function(e){var t=e.target.getAttribute("data-name");t&&(S.wt(),s(t,{openedFrom:"list"}))},children:null==t?void 0:t.map(function(e){var t,s,n;if("question"===e.type&&"question"===(null==(t=e.attributes)?void 0:t.attributes.case)){var i=e.attributes.attributes.value;return T.jsx(z.R,a({},i),i.questionId)}if("insight"===e.type&&"insight"===(null==(s=e.attributes)?void 0:s.attributes.case)){var l=e.attributes.attributes.value;return T.jsx(Ze,a({controlVideo:r},l),l.questionId)}if("tweet"===e.type&&"tweet"===(null==(n=e.attributes)?void 0:n.attributes.case)){var o=e.attributes.attributes.value,c=e.attributes.id;return T.jsx(Qe,a(a({controlVideo:r},o),{},{tweetId:c}),c)}return null})}):T.jsx(Ue,{children:Array.from({length:5}).map(function(e,t){return T.jsx(z.D,{},t)})})},exports.p=function(e){var t=L.useStore(e.getActiveFeature()),s=L.useStore(e.streamStore()),r=_(A.useState(null),2),n=r[0],i=r[1];return A.useEffect(function(){var s=e.getFeatures();if(t){var r,n=j(s);try{for(n.s();!(r=n.n()).done;){var a=_(r.value,2),l=a[0],o=a[1];l===t?(o.status.get()===w.FeatureStatus.Suspended&&o.enable(),i(o)):o.status.get()===w.FeatureStatus.Ready&&o.disable()}}catch(c){n.e(c)}finally{n.f()}}else i(null);return function(){var e,t=j(s);try{for(t.s();!(e=t.n()).done;){var r=_(e.value,2)[1];r.status.get()===w.FeatureStatus.Ready&&r.disable()}}catch(c){t.e(c)}finally{t.f()}}},[t,e,s]),[t,n]},exports.tn=function(e){var t=e.gamification,s=e.steps,r=e.rules,n=e.rulesBtnLabel,i=e.rulesTitle,l=e.termsTitle,o=e.termsText,c=e.primaryColor,d=e.inviteLink,u=e.inviteCardTitle,p=e.inviteCardSubtext,f=e.inviteCardBtnLabel,h=e.loading,C=e.inviterName,y=e.sdk,j=e.onClose,g=_(A.useState(0),2),x=g[0],b=g[1],w=_(A.useState(!1),2),I=w[0],L=w[1],k=_(A.useState(Os),2),V=k[0],q=k[1];A.useEffect(function(){null!=s&&s.length?q(a(a({},Os),{},{steps:!0})):null!=r&&r.length?q(a(a({},Os),{},{rules:!0})):q(a(a({},Os),{},{inviteCard:!0}))},[]);var z=A.useMemo(function(){return V.steps&&0===x?"Continue":V.rules?I||!n?"Got it":n:V.inviteCard?f||"Play Now":"Next"},[V,x,I,n,f]),O=A.useCallback(function(){null!=s&&s.length&&x<s.length-1?b(function(e){return++e}):null!=r&&r.length&&V.steps?q(a(a({},Os),{},{rules:!0})):V.rules&&q(a(a({},Os),{},{inviteCard:!0}))},[x,null==s?void 0:s.length,null==r?void 0:r.length,V,b,q]),S=function(){var e=v(m().m(function e(){return m().w(function(e){for(;;)switch(e.n){case 0:if(!V.inviteCard){e.n=2;break}return e.n=1,t.onboardingStatus.submitInplay();case 1:e.n=3;break;case 2:V.rules&&I?L(!1):O();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return A.useEffect(function(){!h&&C&&y.inviteDisplayed()},[h,C,y]),T.jsx(Te,{children:function(e){var t=e.width,n=e.height;return T.jsxs(Ls,{style:{width:t,height:n,maxHeight:n},children:[T.jsx(Hs,{children:T.jsx(ks,{"data-a":"intr",onClick:j,children:T.jsx(Vs,{name:"icon-close-btn-gray"})})}),T.jsxs(Ts,{children:[V.steps&&(null==s?void 0:s.length)&&T.jsx(cs,{loading:h,steps:s,currentStep:x,inviterName:C}),V.rules&&!I&&T.jsx(vs,{rules:r,rulesTitle:i,termsText:o,primaryColor:c,openTerms:function(){return L(!0)}}),V.rules&&I&&T.jsx(bs,{termsTitle:l,termsText:o}),V.inviteCard&&T.jsx(Pe,{inviteLink:d,inviteCardTitle:u,inviteCardSubtext:p,primaryColor:c})]}),T.jsx(qs,{children:T.jsx(H.i,{loading:h,style:{width:"100%"},children:T.jsx(zs,{"data-a":"intr",onClick:S,children:z})})})]})}})},exports.w=function(e){var t=e.close,s=e.action,r=e.controlVideo,n=e.data,i=n.questionType,l=n.question,o=n.insight,c=n.tweet,d=k.e[i];return d?T.jsxs(rt,{onClick:s,style:i===I.QuestionType.TWEET?{paddingTop:"12px"}:{},children:[T.jsx(nt,{"data-a":"intr",onClick:function(e){e.stopPropagation(),t&&t(e)},children:T.jsx(it,{name:"icon-cross"})}),i!==I.QuestionType.TWEET&&T.jsxs(at,{children:[T.jsx(lt,{"data-type-trivia":i===I.QuestionType.TRIVIA,"data-type-poll":i===I.QuestionType.POLL,name:d.iconName}),T.jsx(ot,{children:d.label})]}),i===I.QuestionType.FACTOID&&o&&T.jsx(st,a(a({},o),{},{action:s,controlVideo:r})),i===I.QuestionType.TWEET&&c&&T.jsx(mt,a(a({},c),{},{action:s,controlVideo:r})),i!==I.QuestionType.FACTOID&&i!==I.QuestionType.TWEET&&T.jsxs(T.Fragment,{children:[T.jsx(ct,{children:null==l?void 0:l.title}),T.jsx(dt,{children:"Answer"})]})]}):null},exports.z=function(e){var t=e.loading,s=e.hideFriendsRank,r=e.avatar,n=e.name,i=e.points,a=e.friendsRank,l=e.rank,o=e.streak,c=e.correct,d=e.incorrect,u=e.inTop,p=e.successRate;return T.jsxs(U,{"data-loading":t,children:[T.jsx(Y,{children:T.jsx(H.i,{loading:t,children:T.jsxs(J,{children:[T.jsxs(pe,{children:[r&&T.jsx(K,{alt:"avatar",src:r}),!r&&T.jsx(ue,{children:k.I(n||"")})]}),T.jsxs(X,{children:[T.jsx(ee,{children:n}),T.jsxs(te,{children:[T.jsxs(re,{children:[T.jsxs(ie,{children:[T.jsx(se,{alt:"rank-icon",src:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e"}),T.jsxs(ae,{children:[k.s(i),T.jsx(le,{children:"PTS"})]})]}),s&&T.jsxs(ae,{children:[T.jsx(ne,{}),l||0,T.jsx(le,{children:"global rank"})]})]}),!s&&T.jsxs(T.Fragment,{children:[T.jsx(oe,{}),T.jsxs("div",{children:["TOP ",u||0,"%"]})]})]})]})]})})}),T.jsxs($,{children:[!s&&T.jsxs(ce,{children:[T.jsx(H.i,{loading:t,style:{width:"100%"},children:T.jsx(Z,{indicator:a||0,title:"Friends rank"})}),T.jsx(H.i,{loading:t,style:{width:"100%"},children:T.jsx(Z,{indicator:l||0,title:"Global rank"})})]}),T.jsx(H.i,{loading:t,children:T.jsxs(de,{children:[T.jsx(Q,{indicator:o||0,title:"Win streak"}),T.jsx(Q,{indicator:c||0,title:"Correct"}),T.jsx(Q,{indicator:d||0,title:"Incorrect"}),T.jsx(Q,{indicator:"".concat(p||0,"%"),title:"Succ. rate"})]})})]})]})};
package/lib/cjs/index2.js CHANGED
@@ -1 +1 @@
1
- "use strict";var de=Object.defineProperty;var ce=(e,t,s)=>t in e?de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var I=(e,t,s)=>ce(e,typeof t!="symbol"?t+"":t,s);const m=require("react"),w=require("./hooks-WfHlJH12.js"),n=require("react/jsx-runtime"),g=require("./useStreamLayerApp2.js"),ue=require("./index8.js"),a=require("./sl-types.js"),k=require("./index11.js"),S=require("./index16.js"),q=require("lodash.throttle"),$=require("./analytics.js"),L=require("./theme.js"),_=require("./feature.js");require("nanostores");const R=require("./Question.js"),pe=require("./index10.js"),A=require("./index6.js"),me=require("react-infinite-scroller"),B=require("./index12.js");require("uuid");require("@nanostores/query");require("./storage.js");require("./index7.js");const fe=require("react-dom"),he=require("./index3.js");require("./notification.js");const P=Object.keys(a.A),V=()=>{const e=window.innerWidth;let t="sm";for(let s=P.length-1;s>0;s--){const r=P[s];if(!(e<a.A[r])&&e>=a.A[r]){t=r;break}}return{name:t,size:a.A[t]}},Q=e=>{var t;return(((t=e.current)==null?void 0:t.getBoundingClientRect().y)||0)<-68},O=()=>window.matchMedia("(orientation: landscape)").matches,ve=e=>{const[t]=m.useState(()=>$.f({screen:V(),sdkInView:Q(e),sdkInDesktopView:O()}));return m.useEffect(()=>{const s=q(()=>{t.setKey("sdkInView",Q(e))},200),r=q(()=>{const o=V();t.setKey("screen",o),t.setKey("sdkInDesktopView",O())},200);return window.addEventListener("scroll",s),window.addEventListener("resize",r),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",r)}},[t,e]),[t]},U=(e,t,s)=>{const r=t>=a.A.lg&&t<a.A.xl?75:52;e.current&&window.scrollTo({top:e.current.offsetTop-r,...s})},ge=15,xe=(e,t)=>{const s=m.useRef(null),r=m.useRef(0),[o]=m.useState($.f({scrollPosition:0,tabsShown:!0,scrollDirection:"forward"})),l=a.useStore(t);return m.useEffect(()=>{const d=O()?s.current:window;if(!d)return()=>{};const c=q(i=>{var u;const f=i.target;if(!f)return;let p=0;O()?p=f.scrollTop:p=((u=e.current)==null?void 0:u.getBoundingClientRect().y)||0;const h=r.current-p;if(ge>Math.abs(h))return;const v=r.current<p?"forward":"backward";r.current=p,o.set({scrollPosition:Math.round(p),scrollDirection:v,tabsShown:o.get().tabsShown})},200);return d.addEventListener("scroll",c),()=>{d.removeEventListener("scroll",c)}},[o,e,l.screen]),[s,o]},M=a.styled_default("div")({name:"LoadingContainer",class:"lclc0ej",propsAsIs:!1}),ye=({feature:e,sdk:t,children:s,className:r,noWait:o})=>{const l=a.useStore(e.status),d=a.useStore(t.sdkStore.slStreamId);if(!o){if(d!=null&&d.loading&&!d.data)return n.jsx(M,{className:r,children:"Event is loading..."});if(!(d!=null&&d.data))return n.jsx(M,{className:r,children:"Event is forbidden..."});if(l!==_.FeatureStatus.Ready)return n.jsx(M,{className:r,children:"Wait feature..."})}return s},Ie=a.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),Se=a.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),ke=a.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),be=a.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var E=(e=>(e.HOME="home",e.LEADERBOARD="leaderboard",e))(E||{});const K=({title:e,active:t,onClick:s})=>n.jsx(ke,{"data-a":"intr",onClick:s,"data-selected":t,children:n.jsx(be,{"data-a":"intr",children:e})}),je=({activePage:e="home",toggleActivePage:t})=>n.jsx(Ie,{children:n.jsxs(Se,{"data-position":e==="home"?"left":"right",children:[n.jsx(K,{title:"Home",active:e==="home",onClick:()=>t("home")}),n.jsx(K,{title:"Friends",active:e==="leaderboard",onClick:()=>t("leaderboard")})]})}),Ne=a.styled_default("div")({name:"Container",class:"c1ux29ft",propsAsIs:!1}),Ae=()=>A.B1,we=a.styled_default(Ae())({name:"FriendsIcon",class:"f10ncfg2",propsAsIs:!0}),_e=a.styled_default("div")({name:"Content",class:"c1yc07bd",propsAsIs:!1}),Ce=a.styled_default("div")({name:"Title",class:"tj6cq7w",propsAsIs:!1}),Ee=a.styled_default("div")({name:"Description",class:"d1ag78xo",propsAsIs:!1}),$e=()=>A.B1,Re=a.styled_default($e())({name:"ArrowInviteIcon",class:"awohrz6",propsAsIs:!0}),Te=({title:e,description:t,onClick:s,className:r})=>{const[o]=$.f$1({type:"invitation",action:"sent",payload:{from:g.InvitationFrom.TITLE_CARD}});return n.jsxs(Ne,{"data-a":"intr",onClick:o(s),className:r,children:[n.jsx(we,{name:"icon-friends"}),n.jsxs(_e,{children:[n.jsx(Ce,{children:e}),n.jsx(Ee,{children:t})]}),n.jsx(Re,{name:"icon-copy"})]})};function Le(e){var t=e.lastRenderedStartIndex,s=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>s||o<t)}function De(e){for(var t=e.isItemLoaded,s=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,l=e.stopIndex,d=[],c=null,i=null,u=o;u<=l;u++){var f=t(u);f?i!==null&&(d.push(c,i),c=i=null):(i=u,c===null&&(c=u))}if(i!==null){for(var p=Math.min(Math.max(i,c+r-1),s-1),h=i+1;h<=p&&!t(h);h++)i=h;d.push(c,i)}if(d.length)for(;d[1]-d[0]+1<r&&d[0]>0;){var v=d[0]-1;if(!t(v))d[0]=v;else break}return d}var Oe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Me=function(){function e(t,s){for(var r=0;r<s.length;r++){var o=s[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,s,r){return s&&e(t.prototype,s),r&&e(t,r),t}}(),qe=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},W=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e};(function(e){qe(t,e);function t(){var s,r,o,l;Oe(this,t);for(var d=arguments.length,c=Array(d),i=0;i<d;i++)c[i]=arguments[i];return l=(r=(o=W(this,(s=t.__proto__||Object.getPrototypeOf(t)).call.apply(s,[this].concat(c))),o),o._lastRenderedStartIndex=-1,o._lastRenderedStopIndex=-1,o._memoizedUnloadedRanges=[],o._onItemsRendered=function(u){var f=u.visibleStartIndex,p=u.visibleStopIndex;o._lastRenderedStartIndex=f,o._lastRenderedStopIndex=p,o._ensureRowsLoaded(f,p)},o._setRef=function(u){o._listRef=u},r),W(o,l)}return Me(t,[{key:"resetloadMoreItemsCache",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],r&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var r=this.props.children;return r({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(r,o){var l=this.props,d=l.isItemLoaded,c=l.itemCount,i=l.minimumBatchSize,u=i===void 0?10:i,f=l.threshold,p=f===void 0?15:f,h=De({isItemLoaded:d,itemCount:c,minimumBatchSize:u,startIndex:Math.max(0,r-p),stopIndex:Math.min(c-1,o+p)});(this._memoizedUnloadedRanges.length!==h.length||this._memoizedUnloadedRanges.some(function(v,y){return h[y]!==v}))&&(this._memoizedUnloadedRanges=h,this._loadUnloadedRanges(h))}},{key:"_loadUnloadedRanges",value:function(r){for(var o=this,l=this.props.loadMoreItems||this.props.loadMoreRows,d=function(u){var f=r[u],p=r[u+1],h=l(f,p);h!=null&&h.then(function(){if(Le({lastRenderedStartIndex:o._lastRenderedStartIndex,lastRenderedStopIndex:o._lastRenderedStopIndex,startIndex:f,stopIndex:p})){if(o._listRef==null)return;typeof o._listRef.resetAfterIndex=="function"?o._listRef.resetAfterIndex(f,!0):(typeof o._listRef._getItemStyleCache=="function"&&o._listRef._getItemStyleCache(-1),o._listRef.forceUpdate())}})},c=0;c<r.length;c+=2)d(c)}}]),t})(m.PureComponent);const Be=a.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),Fe=a.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),Ue=a.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),ze=a.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),Pe=a.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),Ve=a.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),Qe=a.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),Ke=()=>A.B1,We=a.styled_default(Ke())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),Ge=({friendsRank:e,avatar:t,name:s,userId:r,points:o,isCurrentUser:l,style:d})=>n.jsxs(Be,{"data-name":r,style:d,children:[n.jsx(Fe,{children:e||0}),n.jsxs(Pe,{children:[t?n.jsx(Ue,{alt:"leaderboard-item-avatar",src:t}):n.jsx(ze,{children:B.I(s||"")}),n.jsxs(Ve,{children:[n.jsx(Qe,{children:s||""}),l&&n.jsx(We,{name:"icon-star"})]})]}),n.jsx("div",{children:B.s(o)})]}),He=a.styled_default("div")({name:"Container",class:"c16btbfp",propsAsIs:!1}),Je=({items:e,currentUserId:t,openItemDetail:s,fetchMore:r,scrollNode:o,hasMore:l})=>{const d=m.useCallback(c=>{const i=c.target.getAttribute("data-name");i&&s(i)},[s]);return n.jsx(me,{loadMore:r,initialLoad:!1,hasMore:l,useWindow:!1,getScrollParent:()=>o.current,children:n.jsx(He,{"data-a":"intr",onClick:d,children:e.map(c=>n.jsx(Ge,{...c,isCurrentUser:!!t&&t===c.userId},c.userId))})})},Ye=a.styled_default("div")({name:"InviteFriendsContainer",class:"i1c9dygq",propsAsIs:!1}),Ze=({deepLink:e})=>n.jsx(Ye,{children:n.jsx(S.M,{inviteLink:e,inviteCardTitle:"It’s More Fun With Friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})}),Xe=a.styled_default("div")({name:"InviteLinkContainer",class:"i1odbhm4",propsAsIs:!1}),et=({gamification:e,scrollNode:t,scrollStore:s,leaderboardList:r})=>{const o=m.useRef(null),{data:l,hasMore:d,loading:c,key:i}=a.useStore(r.$store),{data:u}=a.useStore(e.deepLink.$store),[f,p]=S.T$1(o);return!l.length&&!c?n.jsx(Ze,{deepLink:u}):n.jsxs(n.Fragment,{children:[n.jsx(Je,{items:l,scrollNode:t,scrollStore:s,fetchMore:r.fetchMore,hasMore:d,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()},i),u&&n.jsx(Xe,{ref:o,children:n.jsx(Te,{"data-a":"intr",onClick:()=>f(u),title:"Invite Friends",description:"Challenge them now!"})}),p]})},tt=({gamification:e,scrollNode:t,scrollStore:s})=>e.leaderboardList?n.jsx(et,{leaderboardList:e.leaderboardList,gamification:e,scrollNode:t,scrollStore:s}):null,st=({store:e,openQuestion:t})=>{const{sdk:s}=R.p(),r=a.useStore(e);return n.jsx(S.k,{openQuestion:t,questions:r.data,controlVideo:s==null?void 0:s.controlVideoPlayer})},nt=({userSummary:e})=>{var t;const[s,r]=m.useState(void 0);return m.useEffect(()=>{const o=e.$store.subscribe(l=>{l&&r(l)});return()=>{o()}},[e]),n.jsx(S.z,{loading:!(s!=null&&s.summary),...s==null?void 0:s.summary,successRate:(t=s==null?void 0:s.percentage)==null?void 0:t.correct})},ot=({gamification:e,className:t,scrollStore:s,scrollNode:r,appNode:o,style:l,responsiveStore:d})=>{const{tabsShown:c}=a.useStore(s,{keys:["tabsShown"]}),i=a.useStore(e.friendsTabEnabled),[u,f]=m.useState(E.HOME),[,p]=a.useTransition(),{sdkInDesktopView:h,screen:v}=a.useStore(d,{keys:["sdkInDesktopView"]}),y=x=>{p(()=>{var T;f(x),h===!1&&(((T=o.current)==null?void 0:T.getBoundingClientRect().y)||0)<0&&U(o,v.size,{behavior:"instant"})})};m.useEffect(()=>s.subscribe(x=>{if(x.scrollPosition===0){s.setKey("tabsShown",!0);return}d.get().sdkInDesktopView?s.setKey("tabsShown",x.scrollDirection==="backward"):s.setKey("tabsShown",x.scrollDirection==="forward")}),[s,d]),m.useEffect(()=>{i||f(E.HOME)},[i]);let b="0px";return h?b=c?"0px":"calc(0px - var(--header-height))":b=c?"var(--header-height)":"0px",n.jsxs(k.l,{className:a.cx_default(t,"SL-Tabs","sl-hide-on-modal"),style:l,children:[i&&n.jsx(k.S$1,{style:{top:b},children:n.jsx(je,{activePage:u,toggleActivePage:y})}),u===E.HOME&&n.jsxs(n.Fragment,{children:[n.jsx(k.m,{children:n.jsx(k.d,{children:n.jsx(nt,{userSummary:e.userSummary})})}),n.jsx(k.n,{style:{flex:1},children:n.jsx(st,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),u===E.LEADERBOARD&&n.jsx(k.C,{children:n.jsx(tt,{scrollStore:s,scrollNode:r,gamification:e})})]})},rt=()=>k.f,G=a.styled_default(rt())({name:"OpenedContainer",class:"ouvguos",propsAsIs:!0}),H="t1eu4lbg",at=a.styled_default("div")({name:"UserContainer",class:"uuv2xqo",propsAsIs:!1}),it=({correct:e,incorrect:t})=>{const s=e+t;return s===0?0:Math.round(e/s*100)},lt=({gamification:e,scrollStore:t,className:s,appNode:r,scrollNode:o,responsiveStore:l})=>n.jsx(ot,{appNode:r,scrollStore:t,scrollNode:o,className:s,gamification:e,responsiveStore:l}),dt=({gamification:e,muted:t,sdk:s,className:r,appNode:o,responsiveStore:l})=>{const{topNavigation:d}=R.p(),c=a.useStore(e.openedQuestionId),i=a.useStore(e.openedQuestion.$store),u=a.useStore(e.openedUser||S.createSingleStore(void 0)),{sdkInDesktopView:f}=a.useStore(l,{keys:["sdkInDesktopView"]}),{hiding:p,onAnimationEnd:h}=k.S();if(!c&&!u)return null;const v=i?n.jsx(G,{className:a.cx_default(r,!d&&H),hiding:p,onAnimationEnd:h,children:n.jsx(R.ht,{muted:t,sdk:s,gamification:e})}):u?n.jsx(G,{className:a.cx_default(r,!d&&H),hiding:p,onAnimationEnd:h,children:n.jsxs(at,{children:[n.jsx(pe.y,{label:"Friend's Rank",close:e.closeUser}),n.jsx(k.a,{children:n.jsx(S.z,{...u,successRate:it(u)})})]})}):null;return n.jsx(S.T,{container:o,useContainer:!f,children:v})},ct=m.lazy(()=>Promise.resolve().then(()=>require("./gamification-feature.js"))),ut=({sdk:e,feature:t,className:s,scrollStore:r,appNode:o,scrollNode:l,responsiveStore:d})=>{const c=m.useMemo(()=>t&&t.featureConfig.get().type===g.SdkOverlayType.GAMES?n.jsx(ye,{className:s,sdk:e,feature:t,children:n.jsx(ct,{appNode:o,scrollStore:r,scrollNode:l,className:s,responsiveStore:d,gamification:t})}):null,[e,t,s,d,r,l,o]);return n.jsx(m.Suspense,{fallback:n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:c})},pt=({feature:e,sdk:t,muted:s,className:r,appNode:o,responsiveStore:l})=>e&&e.featureConfig.get().type===g.SdkOverlayType.GAMES?n.jsx(dt,{className:r,appNode:o,muted:s,sdk:t,responsiveStore:l,gamification:e}):null;window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));function mt(e){return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")}class ft{constructor(t="main",s=window.localStorage){I(this,"delimiter",":");I(this,"prefix");I(this,"storage");I(this,"clear",()=>{for(const t in window.localStorage)t.startsWith(this.prefix)&&this.storage.removeItem(t)});I(this,"generateKey",t=>`${this.prefix}${this.delimiter}${t.join(this.delimiter)}`);I(this,"write",(...t)=>{const s=t.pop()||"",r=this.generateKey(t);try{this.storage.setItem(r,s)}catch(o){mt(o)&&this.storage===window.sessionStorage&&(window.sessionStorage.removeItem("slstreamlogs"),this.storage.setItem(r,s))}});I(this,"read",(...t)=>{const s=this.storage.getItem(this.generateKey(t));return s===null?void 0:s});I(this,"remove",(...t)=>{this.storage.removeItem(this.generateKey(t))});this.prefix=`sl-sdk${this.delimiter}${t}`,this.storage=s}}var J;(function(e){e.Init="init",e.Ready="ready",e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected",e.Failed="failed",e.Reconnect="reconnect",e.Reconnecting="reconnecting"})(J||(J={}));_.createLogger("grpc:stream");g.Code.Unknown,g.Code.Internal,g.Code.DeadlineExceeded,g.Code.ResourceExhausted,g.Code.FailedPrecondition,g.Code.Unavailable,g.Code.DataLoss;_.createLogger("grpc:retry");g.createContextKey(10,{description:"Number of attempts to retry"}),g.createContextKey(3e4,{description:"Max delay between retries in milliseconds"});var j;(function(e){e.SCHEMA="schema",e.EXTERNAL_TOKEN="eToken",e.TOKEN="token"})(j||(j={}));class ht extends ft{constructor(){super("user");I(this,"setSchema",s=>{this.write(j.SCHEMA,s)});I(this,"getSchema",()=>this.read(j.SCHEMA));I(this,"setToken",s=>{this.write(j.TOKEN,s)});I(this,"getToken",()=>this.read(j.TOKEN));I(this,"setExternalToken",s=>{this.write(j.EXTERNAL_TOKEN,s)});I(this,"getExternalToken",()=>this.read(j.EXTERNAL_TOKEN));I(this,"removeToken",()=>{this.remove(j.TOKEN)})}}var Y;(function(e){e.DISABLED="disabled",e.INITIALIZATION="initialization",e.READY="ready",e.FAILED="failed",e.SUSPENDED="suspended"})(Y||(Y={}));var Z;(function(e){e.SHOWED="showed",e.EVENT="ev"})(Z||(Z={}));var X;(function(e){e.ONBOARDING="onboarding",e.ONBOARDING_IO="onboarding_io",e.QUESTION_RECEIVED="q-received",e.QUESTION_OPENED="q-opened"})(X||(X={}));var ee;(function(e){e.ALLOWED="allowed",e.DISALLOWED="disallowed"})(ee||(ee={}));var te;(function(e){e.UNKNOWN="unknown",e.ALREADY_VOTED="already_voted"})(te||(te={}));_.createLogger("deep_link");_.createLogger("bypass");new ht;_.createLogger("video_player");var se;(function(e){e.Unset="unset",e.Required="required",e.Optional="optional",e.Completed="completed",e.Disabled="disabled",e.Unavailable="unavailable"})(se||(se={}));g.QuestionType.POLL,g.QuestionType.PREDICTION,g.QuestionType.TRIVIA;const vt={[g.SdkOverlayType.GAMES]:!0},gt=a.styled_default("div")({name:"Buttons",class:"b5o8qbl",propsAsIs:!1}),xt=({children:e,className:t})=>n.jsx(gt,{className:t,children:e}),ae=a.styled_default("div")({name:"Navigation",class:"n6tbwuy",propsAsIs:!1}),yt=()=>xt,ne=a.styled_default(yt())({name:"NavigationItems",class:"n1up4z7v",propsAsIs:!0}),It=a.styled_default("button")({name:"SButton",class:"sxxa0c",propsAsIs:!1}),St=a.styled_default("span")({name:"ButtonIcon",class:"b193dcyu",propsAsIs:!1}),kt=a.styled_default("span")({name:"ButtonLabel",class:"b40tuix",propsAsIs:!1}),bt="s14xk0af",jt="ha3mg7c",Nt="h103yr45",D=({disabled:e,active:t,onClick:s,label:r,icon:o,id:l})=>n.jsx(It,{onClick:s,"data-a":"intr",disabled:e,className:a.cx_default(t&&bt,!t&&(l==="channels"||l==="featuredGroups")&&jt,!t&&l==="leaderboard"&&Nt),children:n.jsxs(n.Fragment,{children:[o&&n.jsx(St,{children:o}),n.jsx(kt,{children:r})]})}),At=()=>A.B1,wt=a.styled_default(At())({name:"ButtonIcon",class:"b11wpe79",propsAsIs:!0}),_t=a.styled_default("div")({name:"Container",class:"calnblm",propsAsIs:!1}),Ct=a.styled_default("div")({name:"Title",class:"t1438p52",propsAsIs:!1}),Et=a.styled_default("div")({name:"CloseIconWrap",class:"c17srj38",propsAsIs:!1}),$t=()=>A.B1,Rt=a.styled_default($t())({name:"CloseIcon",class:"clqia8k",propsAsIs:!0}),Tt=()=>A.B1,Lt=a.styled_default(Tt())({name:"DashboardIcon",class:"df5w958",propsAsIs:!0}),Dt="h12x6aiv",Ot=m.forwardRef(({sdk:e,className:t},s)=>{const r=()=>{e.closeFeature()};return n.jsxs(ae,{className:a.cx_default(t,Dt),children:[n.jsxs(_t,{children:[n.jsxs(Ct,{children:[n.jsx(Lt,{name:"dashboard"}),"Dashboard"]}),n.jsx(Et,{"data-a":"intr",onClick:r,children:n.jsx(Rt,{name:"icon-cross"})})]}),n.jsx("div",{ref:s})]})}),Mt=m.forwardRef(({sdk:e,className:t},s)=>{const r=a.useStore(e.sdkStore.organizationSettings),o=a.useStore(e.sdkStore.streamSettings),l=a.useStore(e.getActiveFeature()),d=m.useMemo(()=>{const i=(o==null?void 0:o.data)||(r==null?void 0:r.data);return i!=null&&i.overlays?i.overlays:[]},[r,o]),c=m.useMemo(()=>[...d.filter(({enableSdkButton:i,type:u})=>u===g.SdkOverlayType.GAMES||i).map(i=>({id:i.type,onClick:()=>e.openFeature(i.type),disabled:!(i.type in vt),label:i.name,icon:n.jsx("img",{src:i.icon,alt:""}),position:i.position*10}))].sort((i,u)=>i.position-u.position),[d,e]);return n.jsxs(ae,{className:t,children:[c.length!==0&&n.jsx(ne,{children:[n.jsx(D,{id:"Channels",onClick:()=>e.closeFeature(),label:"Channels",active:l===0},"Channels"),...c.map(i=>i.id===g.SdkOverlayType.GAMES?n.jsx(D,{...i,active:i.id===l,label:"StreamLayer +",id:"featuredGroups",icon:n.jsx(wt,{name:"icon-btn-feature-groups","data-selected":i.id===l})},i.id):n.jsx(D,{...i,icon:void 0,active:i.id===l},i.id))]}),!c.length&&n.jsx(ne,{children:[n.jsx(D,{id:"empty",label:"No Features...",active:!1,disabled:!0},"empty")]}),n.jsx("div",{ref:s})]})}),qt=a.styled_default("div")({name:"Container",class:"c1qjj4d4",propsAsIs:!1}),Bt=a.styled_default("div")({name:"CloseIconWrap",class:"c1lg6b8a",propsAsIs:!1}),Ft=()=>A.B1,Ut=a.styled_default(Ft())({name:"CloseIcon",class:"c159el66",propsAsIs:!0}),zt=a.styled_default("div")({name:"Title",class:"t16xmufv",propsAsIs:!1}),Pt=a.styled_default("img")({name:"SponsorLogo",class:"s83lc21",propsAsIs:!1}),Vt=a.styled_default("div")({name:"PresentsTitle",class:"p1p7igia",propsAsIs:!1}),Qt=a.styled_default("div")({name:"Subtitle",class:"s1eftsbu",propsAsIs:!1}),Kt=a.styled_default("div")({name:"Description",class:"d8uezec",propsAsIs:!1}),Wt=a.styled_default("button")({name:"ActionButton",class:"a1h1bk90",propsAsIs:!1}),oe=({close:e,action:t,onboarding:s})=>{var r,o,l,d,c,i,u,f;return n.jsxs(qt,{children:[n.jsx(Bt,{"data-a":"intr",onClick:e,children:n.jsx(Ut,{name:"icon-cross"})}),((o=(r=s==null?void 0:s.titleCard)==null?void 0:r.media)==null?void 0:o.sponsorLogo)&&n.jsxs(zt,{children:[n.jsx(Pt,{alt:"sponsor-logo",src:(d=(l=s==null?void 0:s.titleCard)==null?void 0:l.media)==null?void 0:d.sponsorLogo}),n.jsx(Vt,{children:"PRESENTS"})]}),((c=s==null?void 0:s.titleCard)==null?void 0:c.title)&&n.jsx(Qt,{children:(i=s==null?void 0:s.titleCard)==null?void 0:i.title}),((u=s==null?void 0:s.titleCard)==null?void 0:u.subtitle)&&n.jsx(Kt,{children:(f=s==null?void 0:s.titleCard)==null?void 0:f.subtitle}),n.jsx(Wt,{"data-a":"intr",onClick:t,children:"Play Now"})]})},F=[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",tagline:"",headline:n.jsxs(n.Fragment,{children:["Welcome to ",n.jsx("br",{})," Live Challenge"]})},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",headline:"Live insights, polls, trivia and predictions."},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",headline:"Win points and play against friends."}],Gt=a.styled_default("div")({name:"OnboardingContainer",class:"o1xni1kr",propsAsIs:!1}),Ht=()=>k.f,Jt=a.styled_default(Ht())({name:"OnboardingNotificationContainer",class:"o1vnouv7",propsAsIs:!0}),re=a.styled_default("div")({name:"InnerContainer",class:"i59uefw",propsAsIs:!1}),Yt=a.styled_default("div")({name:"OnboardingOverlap",class:"ovnr8ov",propsAsIs:!1}),Zt=({deepLink:e,onboardingOpts:t,notification:s,gamification:r,loading:o,sdk:l,throttled:d})=>{var c,i,u,f,p,h,v;const y=a.useStore(r.friends?r.friends.getStore():S.createSingleStore({data:[]})),[b,x]=m.useState(void 0),T=m.useMemo(()=>{var N,C;const z=l.getInviter();return z?(C=(N=y.data)==null?void 0:N.find(({slId:le})=>le===z))==null?void 0:C.name:""},[y.data,l]);return m.useEffect(()=>{const N=e.$store.subscribe(C=>{C&&x(C.data)});return()=>{N()}},[e.$store]),n.jsxs(Gt,{children:[n.jsx(S.tn,{loading:o,rules:[{label:"Answer as many questions as you like.",icon:"icon-btn-feature-groups"},{label:"Win points for each correct trivia or prediction answer.",icon:"icon-thumb-up"},{label:"Top the leader board and best your friends.",icon:"icon-trophy"}],rulesBtnLabel:(c=t.rules)==null?void 0:c.buttonLabel,rulesTitle:(i=t.rules)==null?void 0:i.heading,termsTitle:"Terms and Conditions",termsText:(u=t.rules)==null?void 0:u.terms,steps:F,primaryColor:(f=t.inviteCard)==null?void 0:f.iconColor,inviteLink:b,inviteCardTitle:(p=t.inviteCard)==null?void 0:p.heading,inviteCardSubtext:(h=t.inviteCard)==null?void 0:h.subtext,inviteCardBtnLabel:(v=t.inviteCard)==null?void 0:v.buttonLabel,onClose:()=>{var N;(N=s.close)==null||N.call(s)},gamification:r,sdk:l,inviterName:T}),d&&n.jsx(Yt,{})]})},Xt=({sdk:e,notification:t,saveHeight:s,style:r,appNode:o,sdkInDesktopView:l,responsiveStore:d})=>{const c=m.useRef(null),i=t.data.onboarding,[u,f]=m.useState(i==null?void 0:i.instantOpen),p=e.getFeature(g.SdkOverlayType.GAMES),h=m.useMemo(()=>F==null?void 0:F.map(({graphicSrc:x})=>x),[]),{screen:v}=a.useStore(d,{keys:["screen"]});m.useLayoutEffect(()=>{var x;s(((x=c.current)==null?void 0:x.getBoundingClientRect().height)||0)},[s]);const{loading:y,throttled:b}=S.I(h);return u&&p&&i&&o.current?n.jsx(S.T,{container:o,useContainer:!l,children:n.jsx(Zt,{throttled:b,notification:t,setOpened:f,gamification:p,onboardingOpts:i,deepLink:p.deepLink,loading:y,renderToNode:o,sdk:e})}):n.jsxs(n.Fragment,{children:[n.jsx(re,{ref:c,style:{position:"absolute",visibility:"hidden"},children:n.jsx(oe,{close:()=>{},action:()=>{},onboarding:i})}),n.jsx(Jt,{style:r,hiding:t.hiding,children:n.jsx(re,{children:n.jsx(oe,{close:t.close,action:()=>{var x;f(!0),(((x=o.current)==null?void 0:x.getBoundingClientRect().y)||0)<0&&U(o,v.size,{behavior:"smooth"})},onboarding:i})})})]})},es=()=>k.f,ts=a.styled_default(es())({name:"Container",class:"c8ol1ve",propsAsIs:!0}),ie=a.styled_default("div")({name:"InnerContainer",class:"iqfywam",propsAsIs:!1}),ss=()=>ie,ns=a.styled_default(ss())({name:"HiddenContainer",class:"hokmtod",propsAsIs:!0}),os=a.styled_default("div")({name:"NotificationRefreshing",class:"n192d1q8",propsAsIs:!1}),rs=()=>S.f,as=a.styled_default(rs())({name:"Pill",class:"p1lha68t",propsAsIs:!0}),is=e=>{const[t,s]=m.useState(0),r=m.useRef(null),o=m.useMemo(()=>new ResizeObserver(c=>{window.requestAnimationFrame(()=>{var i;if(Array.isArray(c)){for(const u of c)if(u.contentBoxSize){const f=(i=r.current)==null?void 0:i.getBoundingClientRect();f&&s(f.height)}}})}),[]),l=m.useCallback(c=>{r.current=c},[]),d=m.useCallback(c=>{s(c)},[]);return m.useEffect(()=>{const c=r.current;return c?(o.observe(c),()=>{o.unobserve(c)}):()=>{}},[e]),m.useEffect(()=>()=>{o.disconnect()}),[l,t,d]},ls=({sdk:e,notification:t,appNode:s,responsiveStore:r,hasActiveFeature:o})=>{var l,d;const{sdkInDesktopView:c}=a.useStore(r,{keys:["sdkInDesktopView"]}),{sdk:i}=R.p(),[u,f,p]=is(t.id);let h=f;return o||(h="auto"),t.type===a.NotificationType.QUESTION?n.jsxs(n.Fragment,{children:[n.jsx(ns,{ref:u,children:n.jsx(S.w,{...t})}),n.jsxs(ts,{style:{height:t.hiding?0:h},hiding:t.hiding,children:[n.jsx(ie,{style:{height:"100%"},children:n.jsx(S.w,{...t,controlVideo:i==null?void 0:i.controlVideoPlayer})}),n.jsx(os,{},t.id)]})]}):t.type===a.NotificationType.QUESTION_RESOLVED&&(d=(l=t.data)==null?void 0:l.question)!=null&&d.predictionResult?n.jsx(S.D,{style:{height:t.hiding?0:f},saveHeight:p,close:t.close,hiding:t.hiding,...t.data.question}):t.type===a.NotificationType.ONBOARDING?n.jsx(Xt,{style:{height:t.hiding?0:h},saveHeight:p,sdk:e,notification:t,sdkInDesktopView:c,appNode:s,responsiveStore:r}):null},ds="p7vfi6t",cs=({pill:e,setPill:t,appNode:s,headerNode:r,scrollNode:o,responsiveStore:l,scrollStore:d})=>{var c,i;const{screen:u}=a.useStore(l,{keys:["screen"]}),{tabsShown:f,scrollPosition:p}=a.useStore(d,{keys:["tabsShown","scrollPosition"]});m.useEffect(()=>{l.get().sdkInDesktopView?p<50&&t(null):p>-50&&t(null)},[p,l,t]);const h=l.get().sdkInDesktopView?s:r;return!e||!h.current?null:fe.createPortal(n.jsx(as,{title:e.type===a.NotificationType.QUESTION_RESOLVED?"Prediction result":`New ${((i=B.e[(c=e.data)==null?void 0:c.questionType])==null?void 0:i.label)||"notification"}`,"data-a":"intr",onClick:()=>{var v;l.get().sdkInDesktopView?(v=o.current)==null||v.scrollTo({top:0,behavior:"smooth"}):U(s,u.size,{behavior:"smooth"}),t(null)},className:a.cx_default(f&&ds,"sl-pill-button")}),h.current)},us=({sdk:e,headerNode:t,scrollNode:s,responsiveStore:r,appNode:o,scrollStore:l,hasActiveFeature:d})=>{const[c]=m.useState(e.getNotificationsStore()),i=a.useStore(c),[u,f]=m.useState(null),p=m.useMemo(()=>e.getActiveNotification(),[e,i]);return m.useEffect(()=>{p&&he.eventBus.emit("notification",{action:"rendered",payload:{questionId:p.data.questionId,questionType:p.data.questionType}})},[p]),m.useEffect(()=>{const{sdkInDesktopView:h,sdkInView:v}=r.get();p&&(h||v)&&(!h&&v&&f(p),h&&window.requestAnimationFrame(()=>{l.get().scrollPosition!==0&&f(p)}))},[p]),m.useEffect(()=>{p||f(null)},[p]),n.jsxs(n.Fragment,{children:[!u&&p&&n.jsx(ls,{appNode:o,sdk:e,hasActiveFeature:d,notification:p,responsiveStore:r}),u&&n.jsx(cs,{pill:u,setPill:f,appNode:o,notification:p,headerNode:t,scrollNode:s,scrollStore:l,responsiveStore:r})]})},ps=e=>{const t=a.useStore(e.status),s=a.useStore(e.sdkStore.slStreamId),r=a.useStore(e.userId()),o=a.useStore(e.getActiveFeature()),l=t==="ready"&&!!s.data;return m.useEffect(()=>{const d=e.getFeature(g.SdkOverlayType.GAMES);d&&o!==g.SdkOverlayType.GAMES&&(d.closeQuestion(),d.closeUser()),d==null||d.openedQuestionId.subscribe(c=>{c&&o!==g.SdkOverlayType.GAMES&&e.openFeature(g.SdkOverlayType.GAMES)})},[o,e]),{sdkReady:l,activeFeature:o,isLogged:!!r}},ms=({sdk:e,className:t,scrollStore:s,appNode:r,scrollNode:o,responsiveStore:l})=>{const[,d]=S.p(e);return n.jsx(ut,{className:t,scrollNode:o,appNode:r,scrollStore:s,feature:d,responsiveStore:l,sdk:e})},fs=({sdk:e,muted:t,className:s,appNode:r,responsiveStore:o})=>{const l=a.useStore(e.featuresList.getStore());return l?Array.from(l,d=>{const c=e.getFeature(d);return c?n.jsx(pt,{className:s,muted:t,appNode:r,feature:c,responsiveStore:o,sdk:e},d):null}):null},hs=({sdk:e,muted:t,topNavigation:s})=>{const[r,o]=m.useState(!0),l=m.useRef(null),d=a.useStore(e.uiState),c=m.useRef(null),[i]=ve(l),[u,f]=xe(l,i),{sdkReady:p,activeFeature:h,isLogged:v}=ps(e),y=!!p;$.b(l,{enabled:y,event:"click",listener:$.A});const b=m.useMemo(()=>({sdk:e,topNavigation:s}),[e,s]);return m.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature.js"))},[]),n.jsx(R.e.Provider,{value:b,children:n.jsxs(k.p,{ref:x=>{l.current=x,o(!!x)},className:s?"":"c10llmat",children:[y&&s&&d.app&&n.jsx(Mt,{className:a.cx_default(L.m,"sl-hide-on-modal"),sdk:e,ref:c}),y&&!s&&!!h&&d.app&&n.jsx(Ot,{className:a.cx_default(L.m,"sl-hide-on-modal"),sdk:e,ref:c}),n.jsxs(k.c,{className:"sl-hide-on-modal",ref:u,"data-nav":(!!h&&y).toString(),children:[y&&d.app&&n.jsx(us,{sdk:e,scrollNode:u,headerNode:c,appNode:l,scrollStore:f,responsiveStore:i,hasActiveFeature:!!h}),y&&d.app&&n.jsx(ms,{scrollStore:f,responsiveStore:i,scrollNode:u,appNode:l,className:L.m,sdk:e}),y&&r&&n.jsx(fs,{muted:t,responsiveStore:i,appNode:l,className:L.m,sdk:e})]}),y&&!v&&r&&d.app&&n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})})},vs=({event:e,topNavigation:t,theme:s,muted:r,withSidebarNotification:o=!0})=>{const{sdk:l,status:d}=m.useContext(w.i),c=w.F(),i=w.z(),{event:u}=m.useContext(w.i);if(d===w.Y.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return d===w.Y.CONNECTED?n.jsx("div",{className:"StreamLayerSDK",children:"wait"}):l===null?n.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):!c.app&&!c.appNotification&&!c.appSidebar||!c.app&&!c.appSidebar&&c.appNotification&&!o?null:n.jsx("div",{className:"StreamLayerSDK",children:n.jsx(ue.h,{customTheme:s??i.theme,themeMode:i.themeMode,children:n.jsx(hs,{sdk:l,muted:r,event:(u==null?void 0:u.current)||e,topNavigation:t})})})};exports.B=lt;exports.b=vs;
1
+ "use strict";require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.symbol.to-primitive.js"),require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.array.filter.js"),require("core-js/modules/es.array.find.js"),require("core-js/modules/es.array.from.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.array.map.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.array.sort.js"),require("core-js/modules/es.date.to-primitive.js"),require("core-js/modules/es.number.constructor.js"),require("core-js/modules/es.object.define-properties.js"),require("core-js/modules/es.object.define-property.js"),require("core-js/modules/es.object.get-own-property-descriptor.js"),require("core-js/modules/es.object.get-own-property-descriptors.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/es.reflect.construct.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.set.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/es.string.starts-with.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/web.dom-collections.iterator.js");function e(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t,s){return t=r(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,n()?Reflect.construct(t,s||[],r(e).constructor):t.apply(e,s))}function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(n=function(){return!!e})()}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,s,o,i,a=[],l=!0,d=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){d=!0,s=c}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(d)throw s}}return a}}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return v(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var h=require("./index16.js"),y=require("react"),g=require("./hooks-WfHlJH12.js"),j=require("react/jsx-runtime"),b=require("./useStreamLayerApp2.js"),x=require("./index8.js"),S=require("./sl-types.js"),I=require("./index11.js"),k=require("lodash.throttle"),w=require("./analytics.js"),N=require("./theme.js"),A=require("./feature.js"),_=require("./Question.js"),E=require("./index10.js"),C=require("./index6.js"),O=require("react-infinite-scroller"),R=require("./index12.js");require("./storage.js"),require("./index7.js");var T=require("react-dom"),q=require("./index3.js");require("./notification.js");var L=Object.keys(S.A),D=function(){for(var e=window.innerWidth,t="sm",n=L.length-1;n>0;n--){var r=L[n];if(!(e<S.A[r])&&e>=S.A[r]){t=r;break}}return{name:t,size:S.A[t]}},P=function(e){var t;return((null==(t=e.current)?void 0:t.getBoundingClientRect().y)||0)<-68},M=function(){return window.matchMedia("(orientation: landscape)").matches},B=function(e,t,n){var r=t>=S.A.lg&&t<S.A.xl?75:52;e.current&&window.scrollTo(c({top:e.current.offsetTop-r},n))},F=S.styled_default("div")({name:"LoadingContainer",class:"lclc0ej",propsAsIs:!1}),U=function(e){var t=e.feature,n=e.sdk,r=e.children,s=e.className,o=e.noWait,i=S.useStore(t.status),a=S.useStore(n.sdkStore.slStreamId);if(!o){if(null!=a&&a.loading&&!a.data)return j.jsx(F,{className:s,children:"Event is loading..."});if(null==a||!a.data)return j.jsx(F,{className:s,children:"Event is forbidden..."});if(i!==A.FeatureStatus.Ready)return j.jsx(F,{className:s,children:"Wait feature..."})}return r},z=S.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),V=S.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),K=S.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),Q=S.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1}),W=function(e){return e.HOME="home",e.LEADERBOARD="leaderboard",e}(W||{}),H=function(e){var t=e.title,n=e.active,r=e.onClick;return j.jsx(K,{"data-a":"intr",onClick:r,"data-selected":n,children:j.jsx(Q,{"data-a":"intr",children:t})})},G=function(e){var t=e.activePage,n=void 0===t?"home":t,r=e.toggleActivePage;return j.jsx(z,{children:j.jsxs(V,{"data-position":"home"===n?"left":"right",children:[j.jsx(H,{title:"Home",active:"home"===n,onClick:function(){return r("home")}}),j.jsx(H,{title:"Friends",active:"leaderboard"===n,onClick:function(){return r("leaderboard")}})]})})},$=S.styled_default("div")({name:"Container",class:"c1ux29ft",propsAsIs:!1}),Y=S.styled_default(C.B1)({name:"FriendsIcon",class:"f10ncfg2",propsAsIs:!0}),X=S.styled_default("div")({name:"Content",class:"c1yc07bd",propsAsIs:!1}),J=S.styled_default("div")({name:"Title",class:"tj6cq7w",propsAsIs:!1}),Z=S.styled_default("div")({name:"Description",class:"d1ag78xo",propsAsIs:!1}),ee=S.styled_default(C.B1)({name:"ArrowInviteIcon",class:"awohrz6",propsAsIs:!0}),te=function(e){var t=e.title,n=e.description,r=e.onClick,s=e.className,o=p(w.f$1({type:"invitation",action:"sent",payload:{from:b.InvitationFrom.TITLE_CARD}}),1)[0];return j.jsxs($,{"data-a":"intr",onClick:o(r),className:s,children:[j.jsx(Y,{name:"icon-friends"}),j.jsxs(X,{children:[j.jsx(J,{children:t}),j.jsx(Z,{children:n})]}),j.jsx(ee,{name:"icon-copy"})]})};var ne=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),re=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==l(t)&&"function"!=typeof t?e:t};!function(){function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var s=arguments.length,o=Array(s),i=0;i<s;i++)o[i]=arguments[i];return n=r=re(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(e){var t=e.visibleStartIndex,n=e.visibleStopIndex;r._lastRenderedStartIndex=t,r._lastRenderedStopIndex=n,r._ensureRowsLoaded(t,n)},r._setRef=function(e){r._listRef=e},re(r,n)}(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+l(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)})(e,y.PureComponent),ne(e,[{key:"resetloadMoreItemsCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,s=n.itemCount,o=n.minimumBatchSize,i=void 0===o?10:o,a=n.threshold,l=void 0===a?15:a,d=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,s=e.startIndex,o=e.stopIndex,i=[],a=null,l=null,d=s;d<=o;d++)t(d)?null!==l&&(i.push(a,l),a=l=null):(l=d,null===a&&(a=d));if(null!==l){for(var c=Math.min(Math.max(l,a+r-1),n-1),u=l+1;u<=c&&!t(u);u++)l=u;i.push(a,l)}if(i.length)for(;i[1]-i[0]+1<r&&i[0]>0;){var f=i[0]-1;if(t(f))break;i[0]=f}return i}({isItemLoaded:r,itemCount:s,minimumBatchSize:i,startIndex:Math.max(0,e-l),stopIndex:Math.min(s-1,t+l)});(this._memoizedUnloadedRanges.length!==d.length||this._memoizedUnloadedRanges.some(function(e,t){return d[t]!==e}))&&(this._memoizedUnloadedRanges=d,this._loadUnloadedRanges(d))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var s=e[r],o=e[r+1],i=n(s,o);null!=i&&i.then(function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,s=e.stopIndex;return!(r>n||s<t)}({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:s,stopIndex:o})){if(null==t._listRef)return;"function"==typeof t._listRef.resetAfterIndex?t._listRef.resetAfterIndex(s,!0):("function"==typeof t._listRef._getItemStyleCache&&t._listRef._getItemStyleCache(-1),t._listRef.forceUpdate())}})},s=0;s<e.length;s+=2)r(s)}}])}();var se=S.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),oe=S.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),ie=S.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),ae=S.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),le=S.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),de=S.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),ce=S.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),ue=S.styled_default(C.B1)({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),fe=function(e){var t=e.friendsRank,n=e.avatar,r=e.name,s=e.userId,o=e.points,i=e.isCurrentUser,a=e.style;return j.jsxs(se,{"data-name":s,style:a,children:[j.jsx(oe,{children:t||0}),j.jsxs(le,{children:[n?j.jsx(ie,{alt:"leaderboard-item-avatar",src:n}):j.jsx(ae,{children:R.I(r||"")}),j.jsxs(de,{children:[j.jsx(ce,{children:r||""}),i&&j.jsx(ue,{name:"icon-star"})]})]}),j.jsx("div",{children:R.s(o)})]})},pe=S.styled_default("div")({name:"Container",class:"c16btbfp",propsAsIs:!1}),me=function(e){var t=e.items,n=e.currentUserId,r=e.openItemDetail,s=e.fetchMore,o=e.scrollNode,i=e.hasMore,a=y.useCallback(function(e){var t=e.target.getAttribute("data-name");t&&r(t)},[r]);return j.jsx(O,{loadMore:s,initialLoad:!1,hasMore:i,useWindow:!1,getScrollParent:function(){return o.current},children:j.jsx(pe,{"data-a":"intr",onClick:a,children:t.map(function(e){return j.jsx(fe,c(c({},e),{},{isCurrentUser:!!n&&n===e.userId}),e.userId)})})})},ve=S.styled_default("div")({name:"InviteFriendsContainer",class:"i1c9dygq",propsAsIs:!1}),he=function(e){var t=e.deepLink;return j.jsx(ve,{children:j.jsx(h.M,{inviteLink:t,inviteCardTitle:"It’s More Fun With Friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})})},ye=S.styled_default("div")({name:"InviteLinkContainer",class:"i1odbhm4",propsAsIs:!1}),ge=function(e){var t=e.gamification,n=e.scrollNode,r=e.scrollStore,s=e.leaderboardList,o=y.useRef(null),i=S.useStore(s.$store),a=i.data,l=i.hasMore,d=i.loading,c=i.key,u=S.useStore(t.deepLink.$store).data,f=p(h.T$1(o),2),m=f[0],v=f[1];return a.length||d?j.jsxs(j.Fragment,{children:[j.jsx(me,{items:a,scrollNode:n,scrollStore:r,fetchMore:s.fetchMore,hasMore:l,openItemDetail:t.openUser,currentUserId:t.currentUserId.get()},c),u&&j.jsx(ye,{ref:o,children:j.jsx(te,{"data-a":"intr",onClick:function(){return m(u)},title:"Invite Friends",description:"Challenge them now!"})}),v]}):j.jsx(he,{deepLink:u})},je=function(e){var t=e.gamification,n=e.scrollNode,r=e.scrollStore;return t.leaderboardList?j.jsx(ge,{leaderboardList:t.leaderboardList,gamification:t,scrollNode:n,scrollStore:r}):null},be=function(e){var t=e.store,n=e.openQuestion,r=_.p().sdk,s=S.useStore(t);return j.jsx(h.k,{openQuestion:n,questions:s.data,controlVideo:null==r?void 0:r.controlVideoPlayer})},xe=function(e){var t,n=e.userSummary,r=p(y.useState(void 0),2),s=r[0],o=r[1];return y.useEffect(function(){var e=n.$store.subscribe(function(e){e&&o(e)});return function(){e()}},[n]),j.jsx(h.z,c(c({loading:!(null!=s&&s.summary)},null==s?void 0:s.summary),{},{successRate:null==(t=null==s?void 0:s.percentage)?void 0:t.correct}))},Se=function(e){var t=e.gamification,n=e.className,r=e.scrollStore,s=e.scrollNode,o=e.appNode,i=e.style,a=e.responsiveStore,l=S.useStore(r,{keys:["tabsShown"]}).tabsShown,d=S.useStore(t.friendsTabEnabled),c=p(y.useState(W.HOME),2),u=c[0],f=c[1],m=p(S.useTransition(),2)[1],v=S.useStore(a,{keys:["sdkInDesktopView"]}),h=v.sdkInDesktopView,g=v.screen;y.useEffect(function(){return r.subscribe(function(e){0!==e.scrollPosition?a.get().sdkInDesktopView?r.setKey("tabsShown","backward"===e.scrollDirection):r.setKey("tabsShown","forward"===e.scrollDirection):r.setKey("tabsShown",!0)})},[r,a]),y.useEffect(function(){d||f(W.HOME)},[d]);var b="0px";return b=h?l?"0px":"calc(0px - var(--header-height))":l?"var(--header-height)":"0px",j.jsxs(I.l,{className:S.cx_default(n,"SL-Tabs","sl-hide-on-modal"),style:i,children:[d&&j.jsx(I.S$1,{style:{top:b},children:j.jsx(G,{activePage:u,toggleActivePage:function(e){m(function(){var t;f(e),!1===h&&((null==(t=o.current)?void 0:t.getBoundingClientRect().y)||0)<0&&B(o,g.size,{behavior:"instant"})})}})}),u===W.HOME&&j.jsxs(j.Fragment,{children:[j.jsx(I.m,{children:j.jsx(I.d,{children:j.jsx(xe,{userSummary:t.userSummary})})}),j.jsx(I.n,{style:{flex:1},children:j.jsx(be,{openQuestion:t.openQuestion,store:t.feedList.getStore()})})]}),u===W.LEADERBOARD&&j.jsx(I.C,{children:j.jsx(je,{scrollStore:r,scrollNode:s,gamification:t})})]})},Ie=S.styled_default(I.f)({name:"OpenedContainer",class:"ouvguos",propsAsIs:!0}),ke="t1eu4lbg",we=S.styled_default("div")({name:"UserContainer",class:"uuv2xqo",propsAsIs:!1}),Ne=function(e){var t=e.correct,n=t+e.incorrect;return 0===n?0:Math.round(t/n*100)},Ae=function(e){var t=e.gamification,n=e.muted,r=e.sdk,s=e.className,o=e.appNode,i=e.responsiveStore,a=_.p().topNavigation,l=S.useStore(t.openedQuestionId),d=S.useStore(t.openedQuestion.$store),u=S.useStore(t.openedUser||h.createSingleStore(void 0)),f=S.useStore(i,{keys:["sdkInDesktopView"]}).sdkInDesktopView,p=I.S(),m=p.hiding,v=p.onAnimationEnd;if(!l&&!u)return null;var y=d?j.jsx(Ie,{className:S.cx_default(s,!a&&ke),hiding:m,onAnimationEnd:v,children:j.jsx(_.ht,{muted:n,sdk:r,gamification:t})}):u?j.jsx(Ie,{className:S.cx_default(s,!a&&ke),hiding:m,onAnimationEnd:v,children:j.jsxs(we,{children:[j.jsx(E.y,{label:"Friend's Rank",close:t.closeUser}),j.jsx(I.a,{children:j.jsx(h.z,c(c({},u),{},{successRate:Ne(u)}))})]})}):null;return j.jsx(h.T,{container:o,useContainer:!f,children:y})},_e=y.lazy(function(){return Promise.resolve().then(function(){return require("./gamification-feature.js")})}),Ee=function(e){var t=e.sdk,n=e.feature,r=e.className,s=e.scrollStore,o=e.appNode,i=e.scrollNode,a=e.responsiveStore,l=y.useMemo(function(){return n&&n.featureConfig.get().type===b.SdkOverlayType.GAMES?j.jsx(U,{className:r,sdk:t,feature:n,children:j.jsx(_e,{appNode:o,scrollStore:s,scrollNode:i,className:r,responsiveStore:a,gamification:n})}):null},[t,n,r,a,s,i,o]);return j.jsx(y.Suspense,{fallback:j.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:l})},Ce=function(e){var t=e.feature,n=e.sdk,r=e.muted,s=e.className,o=e.appNode,i=e.responsiveStore;return t&&t.featureConfig.get().type===b.SdkOverlayType.GAMES?j.jsx(Ae,{className:s,appNode:o,muted:r,sdk:n,responsiveStore:i,gamification:t}):null};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));var Oe,Re,Te,qe,Le=i(function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.localStorage;a(this,e),u(this,"delimiter",":"),u(this,"prefix",void 0),u(this,"storage",void 0),u(this,"clear",function(){for(var e in window.localStorage)e.startsWith(t.prefix)&&t.storage.removeItem(e)}),u(this,"generateKey",function(e){return"".concat(t.prefix).concat(t.delimiter).concat(e.join(t.delimiter))}),u(this,"write",function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var s=n.pop()||"",o=t.generateKey(n);try{t.storage.setItem(o,s)}catch(i){(function(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)})(i)&&t.storage===window.sessionStorage&&(window.sessionStorage.removeItem("slstreamlogs"),t.storage.setItem(o,s))}}),u(this,"read",function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var s=t.storage.getItem(t.generateKey(n));return null===s?void 0:s}),u(this,"remove",function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.storage.removeItem(t.generateKey(n))}),this.prefix="sl-sdk".concat(this.delimiter).concat(n),this.storage=r});(Re=Oe||(Oe={})).Init="init",Re.Ready="ready",Re.Connecting="connecting",Re.Connected="connected",Re.Disconnected="disconnected",Re.Failed="failed",Re.Reconnect="reconnect",Re.Reconnecting="reconnecting",A.createLogger("grpc:stream"),b.Code.Unknown,b.Code.Internal,b.Code.DeadlineExceeded,b.Code.ResourceExhausted,b.Code.FailedPrecondition,b.Code.Unavailable,b.Code.DataLoss,A.createLogger("grpc:retry"),b.createContextKey(10,{description:"Number of attempts to retry"}),b.createContextKey(3e4,{description:"Max delay between retries in milliseconds"}),(qe=Te||(Te={})).SCHEMA="schema",qe.EXTERNAL_TOKEN="eToken",qe.TOKEN="token";var De,Pe,Me,Be,Fe,Ue,ze,Ve,Ke,Qe,We=function(){function e(){var n;return a(this,e),u(n=t(this,e,["user"]),"setSchema",function(e){n.write(Te.SCHEMA,e)}),u(n,"getSchema",function(){return n.read(Te.SCHEMA)}),u(n,"setToken",function(e){n.write(Te.TOKEN,e)}),u(n,"getToken",function(){return n.read(Te.TOKEN)}),u(n,"setExternalToken",function(e){n.write(Te.EXTERNAL_TOKEN,e)}),u(n,"getExternalToken",function(){return n.read(Te.EXTERNAL_TOKEN)}),u(n,"removeToken",function(){n.remove(Te.TOKEN)}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(e,Le),i(e)}();(Pe=De||(De={})).DISABLED="disabled",Pe.INITIALIZATION="initialization",Pe.READY="ready",Pe.FAILED="failed",Pe.SUSPENDED="suspended",function(e){e.SHOWED="showed",e.EVENT="ev"}(Me||(Me={})),function(e){e.ONBOARDING="onboarding",e.ONBOARDING_IO="onboarding_io",e.QUESTION_RECEIVED="q-received",e.QUESTION_OPENED="q-opened"}(Be||(Be={})),(Ue=Fe||(Fe={})).ALLOWED="allowed",Ue.DISALLOWED="disallowed",(Ve=ze||(ze={})).UNKNOWN="unknown",Ve.ALREADY_VOTED="already_voted",A.createLogger("deep_link"),A.createLogger("bypass"),new We,A.createLogger("video_player"),(Qe=Ke||(Ke={})).Unset="unset",Qe.Required="required",Qe.Optional="optional",Qe.Completed="completed",Qe.Disabled="disabled",Qe.Unavailable="unavailable",b.QuestionType.POLL,b.QuestionType.PREDICTION,b.QuestionType.TRIVIA;var He=u({},b.SdkOverlayType.GAMES,!0),Ge=S.styled_default("div")({name:"Buttons",class:"b5o8qbl",propsAsIs:!1}),$e=function(e){var t=e.children,n=e.className;return j.jsx(Ge,{className:n,children:t})},Ye=S.styled_default("div")({name:"Navigation",class:"n6tbwuy",propsAsIs:!1}),Xe=S.styled_default($e)({name:"NavigationItems",class:"n1up4z7v",propsAsIs:!0}),Je=S.styled_default("button")({name:"SButton",class:"sxxa0c",propsAsIs:!1}),Ze=S.styled_default("span")({name:"ButtonIcon",class:"b193dcyu",propsAsIs:!1}),et=S.styled_default("span")({name:"ButtonLabel",class:"b40tuix",propsAsIs:!1}),tt=function(e){var t=e.disabled,n=e.active,r=e.onClick,s=e.label,o=e.icon,i=e.id;return j.jsx(Je,{onClick:r,"data-a":"intr",disabled:t,className:S.cx_default(n&&"s14xk0af",!n&&("channels"===i||"featuredGroups"===i)&&"ha3mg7c",!n&&"leaderboard"===i&&"h103yr45"),children:j.jsxs(j.Fragment,{children:[o&&j.jsx(Ze,{children:o}),j.jsx(et,{children:s})]})})},nt=S.styled_default(C.B1)({name:"ButtonIcon",class:"b11wpe79",propsAsIs:!0}),rt=S.styled_default("div")({name:"Container",class:"calnblm",propsAsIs:!1}),st=S.styled_default("div")({name:"Title",class:"t1438p52",propsAsIs:!1}),ot=S.styled_default("div")({name:"CloseIconWrap",class:"c17srj38",propsAsIs:!1}),it=S.styled_default(C.B1)({name:"CloseIcon",class:"clqia8k",propsAsIs:!0}),at=S.styled_default(C.B1)({name:"DashboardIcon",class:"df5w958",propsAsIs:!0}),lt=y.forwardRef(function(e,t){var n=e.sdk,r=e.className;return j.jsxs(Ye,{className:S.cx_default(r,"h12x6aiv"),children:[j.jsxs(rt,{children:[j.jsxs(st,{children:[j.jsx(at,{name:"dashboard"}),"Dashboard"]}),j.jsx(ot,{"data-a":"intr",onClick:function(){n.closeFeature()},children:j.jsx(it,{name:"icon-cross"})})]}),j.jsx("div",{ref:t})]})}),dt=y.forwardRef(function(t,n){var r=t.sdk,s=t.className,o=S.useStore(r.sdkStore.organizationSettings),i=S.useStore(r.sdkStore.streamSettings),a=S.useStore(r.getActiveFeature()),l=y.useMemo(function(){var e=(null==i?void 0:i.data)||(null==o?void 0:o.data);return null!=e&&e.overlays?e.overlays:[]},[o,i]),d=y.useMemo(function(){return e(l.filter(function(e){var t=e.enableSdkButton;return e.type===b.SdkOverlayType.GAMES||t}).map(function(e){return{id:e.type,onClick:function(){return r.openFeature(e.type)},disabled:!(e.type in He),label:e.name,icon:j.jsx("img",{src:e.icon,alt:""}),position:10*e.position}})).sort(function(e,t){return e.position-t.position})},[l,r]);return j.jsxs(Ye,{className:s,children:[0!==d.length&&j.jsx(Xe,{children:[j.jsx(tt,{id:"Channels",onClick:function(){return r.closeFeature()},label:"Channels",active:0===a},"Channels")].concat(e(d.map(function(e){return e.id===b.SdkOverlayType.GAMES?j.jsx(tt,c(c({},e),{},{active:e.id===a,label:"StreamLayer +",id:"featuredGroups",icon:j.jsx(nt,{name:"icon-btn-feature-groups","data-selected":e.id===a})}),e.id):j.jsx(tt,c(c({},e),{},{icon:void 0,active:e.id===a}),e.id)})))}),!d.length&&j.jsx(Xe,{children:[j.jsx(tt,{id:"empty",label:"No Features...",active:!1,disabled:!0},"empty")]}),j.jsx("div",{ref:n})]})}),ct=S.styled_default("div")({name:"Container",class:"c1qjj4d4",propsAsIs:!1}),ut=S.styled_default("div")({name:"CloseIconWrap",class:"c1lg6b8a",propsAsIs:!1}),ft=S.styled_default(C.B1)({name:"CloseIcon",class:"c159el66",propsAsIs:!0}),pt=S.styled_default("div")({name:"Title",class:"t16xmufv",propsAsIs:!1}),mt=S.styled_default("img")({name:"SponsorLogo",class:"s83lc21",propsAsIs:!1}),vt=S.styled_default("div")({name:"PresentsTitle",class:"p1p7igia",propsAsIs:!1}),ht=S.styled_default("div")({name:"Subtitle",class:"s1eftsbu",propsAsIs:!1}),yt=S.styled_default("div")({name:"Description",class:"d8uezec",propsAsIs:!1}),gt=S.styled_default("button")({name:"ActionButton",class:"a1h1bk90",propsAsIs:!1}),jt=function(e){var t,n,r,s,o,i,a,l,d=e.close,c=e.action,u=e.onboarding;return j.jsxs(ct,{children:[j.jsx(ut,{"data-a":"intr",onClick:d,children:j.jsx(ft,{name:"icon-cross"})}),(null==(n=null==(t=null==u?void 0:u.titleCard)?void 0:t.media)?void 0:n.sponsorLogo)&&j.jsxs(pt,{children:[j.jsx(mt,{alt:"sponsor-logo",src:null==(s=null==(r=null==u?void 0:u.titleCard)?void 0:r.media)?void 0:s.sponsorLogo}),j.jsx(vt,{children:"PRESENTS"})]}),(null==(o=null==u?void 0:u.titleCard)?void 0:o.title)&&j.jsx(ht,{children:null==(i=null==u?void 0:u.titleCard)?void 0:i.title}),(null==(a=null==u?void 0:u.titleCard)?void 0:a.subtitle)&&j.jsx(yt,{children:null==(l=null==u?void 0:u.titleCard)?void 0:l.subtitle}),j.jsx(gt,{"data-a":"intr",onClick:c,children:"Play Now"})]})},bt=[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",tagline:"",headline:j.jsxs(j.Fragment,{children:["Welcome to ",j.jsx("br",{})," Live Challenge"]})},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",headline:"Live insights, polls, trivia and predictions."},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",headline:"Win points and play against friends."}],xt=S.styled_default("div")({name:"OnboardingContainer",class:"o1xni1kr",propsAsIs:!1}),St=S.styled_default(I.f)({name:"OnboardingNotificationContainer",class:"o1vnouv7",propsAsIs:!0}),It=S.styled_default("div")({name:"InnerContainer",class:"i59uefw",propsAsIs:!1}),kt=S.styled_default("div")({name:"OnboardingOverlap",class:"ovnr8ov",propsAsIs:!1}),wt=function(e){var t,n,r,s,o,i,a,l=e.deepLink,d=e.onboardingOpts,c=e.notification,u=e.gamification,f=e.loading,m=e.sdk,v=e.throttled,g=S.useStore(u.friends?u.friends.getStore():h.createSingleStore({data:[]})),b=p(y.useState(void 0),2),x=b[0],I=b[1],k=y.useMemo(function(){var e,t,n=m.getInviter();return n?null==(t=null==(e=g.data)?void 0:e.find(function(e){return e.slId===n}))?void 0:t.name:""},[g.data,m]);return y.useEffect(function(){var e=l.$store.subscribe(function(e){e&&I(e.data)});return function(){e()}},[l.$store]),j.jsxs(xt,{children:[j.jsx(h.tn,{loading:f,rules:[{label:"Answer as many questions as you like.",icon:"icon-btn-feature-groups"},{label:"Win points for each correct trivia or prediction answer.",icon:"icon-thumb-up"},{label:"Top the leader board and best your friends.",icon:"icon-trophy"}],rulesBtnLabel:null==(t=d.rules)?void 0:t.buttonLabel,rulesTitle:null==(n=d.rules)?void 0:n.heading,termsTitle:"Terms and Conditions",termsText:null==(r=d.rules)?void 0:r.terms,steps:bt,primaryColor:null==(s=d.inviteCard)?void 0:s.iconColor,inviteLink:x,inviteCardTitle:null==(o=d.inviteCard)?void 0:o.heading,inviteCardSubtext:null==(i=d.inviteCard)?void 0:i.subtext,inviteCardBtnLabel:null==(a=d.inviteCard)?void 0:a.buttonLabel,onClose:function(){var e;null==(e=c.close)||e.call(c)},gamification:u,sdk:m,inviterName:k}),v&&j.jsx(kt,{})]})},Nt=function(e){var t=e.sdk,n=e.notification,r=e.saveHeight,s=e.style,o=e.appNode,i=e.sdkInDesktopView,a=e.responsiveStore,l=y.useRef(null),d=n.data.onboarding,c=p(y.useState(null==d?void 0:d.instantOpen),2),u=c[0],f=c[1],m=t.getFeature(b.SdkOverlayType.GAMES),v=y.useMemo(function(){return null==bt?void 0:bt.map(function(e){return e.graphicSrc})},[]),g=S.useStore(a,{keys:["screen"]}).screen;y.useLayoutEffect(function(){var e;r((null==(e=l.current)?void 0:e.getBoundingClientRect().height)||0)},[r]);var x=h.I(v),I=x.loading,k=x.throttled;return u&&m&&d&&o.current?j.jsx(h.T,{container:o,useContainer:!i,children:j.jsx(wt,{throttled:k,notification:n,setOpened:f,gamification:m,onboardingOpts:d,deepLink:m.deepLink,loading:I,renderToNode:o,sdk:t})}):j.jsxs(j.Fragment,{children:[j.jsx(It,{ref:l,style:{position:"absolute",visibility:"hidden"},children:j.jsx(jt,{close:function(){},action:function(){},onboarding:d})}),j.jsx(St,{style:s,hiding:n.hiding,children:j.jsx(It,{children:j.jsx(jt,{close:n.close,action:function(){var e;f(!0),((null==(e=o.current)?void 0:e.getBoundingClientRect().y)||0)<0&&B(o,g.size,{behavior:"smooth"})},onboarding:d})})})]})},At=S.styled_default(I.f)({name:"Container",class:"c8ol1ve",propsAsIs:!0}),_t=S.styled_default("div")({name:"InnerContainer",class:"iqfywam",propsAsIs:!1}),Et=S.styled_default(_t)({name:"HiddenContainer",class:"hokmtod",propsAsIs:!0}),Ct=S.styled_default("div")({name:"NotificationRefreshing",class:"n192d1q8",propsAsIs:!1}),Ot=S.styled_default(h.f)({name:"Pill",class:"p1lha68t",propsAsIs:!0}),Rt=function(e){var t=p(y.useState(0),2),n=t[0],r=t[1],s=y.useRef(null),o=y.useMemo(function(){return new ResizeObserver(function(e){window.requestAnimationFrame(function(){var t;if(Array.isArray(e)){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=m(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,s=function(){};return{s:s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}(e);try{for(o.s();!(n=o.n()).done;){if(n.value.contentBoxSize){var i=null==(t=s.current)?void 0:t.getBoundingClientRect();i&&r(i.height)}}}catch(a){o.e(a)}finally{o.f()}}})})},[]),i=y.useCallback(function(e){s.current=e},[]),a=y.useCallback(function(e){r(e)},[]);return y.useEffect(function(){var e=s.current;return e?(o.observe(e),function(){o.unobserve(e)}):function(){}},[e]),y.useEffect(function(){return function(){o.disconnect()}}),[i,n,a]},Tt=function(e){var t,n,r=e.sdk,s=e.notification,o=e.appNode,i=e.responsiveStore,a=e.hasActiveFeature,l=S.useStore(i,{keys:["sdkInDesktopView"]}).sdkInDesktopView,d=_.p().sdk,u=p(Rt(s.id),3),f=u[0],m=u[1],v=u[2],y=m;return a||(y="auto"),s.type===S.NotificationType.QUESTION?j.jsxs(j.Fragment,{children:[j.jsx(Et,{ref:f,children:j.jsx(h.w,c({},s))}),j.jsxs(At,{style:{height:s.hiding?0:y},hiding:s.hiding,children:[j.jsx(_t,{style:{height:"100%"},children:j.jsx(h.w,c(c({},s),{},{controlVideo:null==d?void 0:d.controlVideoPlayer}))}),j.jsx(Ct,{},s.id)]})]}):s.type===S.NotificationType.QUESTION_RESOLVED&&null!=(n=null==(t=s.data)?void 0:t.question)&&n.predictionResult?j.jsx(h.D,c({style:{height:s.hiding?0:m},saveHeight:v,close:s.close,hiding:s.hiding},s.data.question)):s.type===S.NotificationType.ONBOARDING?j.jsx(Nt,{style:{height:s.hiding?0:y},saveHeight:v,sdk:r,notification:s,sdkInDesktopView:l,appNode:o,responsiveStore:i}):null},qt=function(e){var t,n,r=e.pill,s=e.setPill,o=e.appNode,i=e.headerNode,a=e.scrollNode,l=e.responsiveStore,d=e.scrollStore,c=S.useStore(l,{keys:["screen"]}).screen,u=S.useStore(d,{keys:["tabsShown","scrollPosition"]}),f=u.tabsShown,p=u.scrollPosition;y.useEffect(function(){l.get().sdkInDesktopView?p<50&&s(null):p>-50&&s(null)},[p,l,s]);var m=l.get().sdkInDesktopView?o:i;return r&&m.current?T.createPortal(j.jsx(Ot,{title:r.type===S.NotificationType.QUESTION_RESOLVED?"Prediction result":"New ".concat((null==(n=R.e[null==(t=r.data)?void 0:t.questionType])?void 0:n.label)||"notification"),"data-a":"intr",onClick:function(){var e;l.get().sdkInDesktopView?null==(e=a.current)||e.scrollTo({top:0,behavior:"smooth"}):B(o,c.size,{behavior:"smooth"}),s(null)},className:S.cx_default(f&&"p7vfi6t","sl-pill-button")}),m.current):null},Lt=function(e){var t=e.sdk,n=e.headerNode,r=e.scrollNode,s=e.responsiveStore,o=e.appNode,i=e.scrollStore,a=e.hasActiveFeature,l=p(y.useState(t.getNotificationsStore()),1)[0],d=S.useStore(l),c=p(y.useState(null),2),u=c[0],f=c[1],m=y.useMemo(function(){return t.getActiveNotification()},[t,d]);return y.useEffect(function(){m&&q.eventBus.emit("notification",{action:"rendered",payload:{questionId:m.data.questionId,questionType:m.data.questionType}})},[m]),y.useEffect(function(){var e=s.get(),t=e.sdkInDesktopView,n=e.sdkInView;m&&(t||n)&&(!t&&n&&f(m),t&&window.requestAnimationFrame(function(){0!==i.get().scrollPosition&&f(m)}))},[m]),y.useEffect(function(){m||f(null)},[m]),j.jsxs(j.Fragment,{children:[!u&&m&&j.jsx(Tt,{appNode:o,sdk:t,hasActiveFeature:a,notification:m,responsiveStore:s}),u&&j.jsx(qt,{pill:u,setPill:f,appNode:o,notification:m,headerNode:n,scrollNode:r,scrollStore:i,responsiveStore:s})]})},Dt=function(e){var t=e.sdk,n=e.className,r=e.scrollStore,s=e.appNode,o=e.scrollNode,i=e.responsiveStore,a=p(h.p(t),2)[1];return j.jsx(Ee,{className:n,scrollNode:o,appNode:s,scrollStore:r,feature:a,responsiveStore:i,sdk:t})},Pt=function(e){var t=e.sdk,n=e.muted,r=e.className,s=e.appNode,o=e.responsiveStore,i=S.useStore(t.featuresList.getStore());return i?Array.from(i,function(e){var i=t.getFeature(e);return i?j.jsx(Ce,{className:r,muted:n,appNode:s,feature:i,responsiveStore:o,sdk:t},e):null}):null},Mt=function(e){var t=e.sdk,n=e.muted,r=e.topNavigation,s=p(y.useState(!0),2),o=s[0],i=s[1],a=y.useRef(null),l=S.useStore(t.uiState),d=y.useRef(null),c=function(e){var t=p(y.useState(function(){return w.f({screen:D(),sdkInView:P(e),sdkInDesktopView:M()})}),1)[0];return y.useEffect(function(){var n=k(function(){t.setKey("sdkInView",P(e))},200),r=k(function(){var e=D();t.setKey("screen",e),t.setKey("sdkInDesktopView",M())},200);return window.addEventListener("scroll",n),window.addEventListener("resize",r),function(){window.removeEventListener("scroll",n),window.removeEventListener("resize",r)}},[t,e]),[t]}(a),u=p(c,1)[0],f=function(e,t){var n=y.useRef(null),r=y.useRef(0),s=p(y.useState(w.f({scrollPosition:0,tabsShown:!0,scrollDirection:"forward"})),1)[0],o=S.useStore(t);return y.useEffect(function(){var t=M()?n.current:window;if(!t)return function(){};var o=k(function(t){var n,o=t.target;if(o){var i=0;i=M()?o.scrollTop:(null==(n=e.current)?void 0:n.getBoundingClientRect().y)||0;var a=r.current-i;if(!(15>Math.abs(a))){var l=r.current<i?"forward":"backward";r.current=i,s.set({scrollPosition:Math.round(i),scrollDirection:l,tabsShown:s.get().tabsShown})}}},200);return t.addEventListener("scroll",o),function(){t.removeEventListener("scroll",o)}},[s,e,o.screen]),[n,s]}(a,u),m=p(f,2),v=m[0],h=m[1],g=function(e){var t=S.useStore(e.status),n=S.useStore(e.sdkStore.slStreamId),r=S.useStore(e.userId()),s=S.useStore(e.getActiveFeature()),o="ready"===t&&!!n.data;return y.useEffect(function(){var t=e.getFeature(b.SdkOverlayType.GAMES);t&&s!==b.SdkOverlayType.GAMES&&(t.closeQuestion(),t.closeUser()),null==t||t.openedQuestionId.subscribe(function(t){t&&s!==b.SdkOverlayType.GAMES&&e.openFeature(b.SdkOverlayType.GAMES)})},[s,e]),{sdkReady:o,activeFeature:s,isLogged:!!r}}(t),x=g.sdkReady,A=g.activeFeature,E=g.isLogged,C=!!x;w.b(a,{enabled:C,event:"click",listener:w.A});var O=y.useMemo(function(){return{sdk:t,topNavigation:r}},[t,r]);return y.useEffect(function(){Promise.resolve().then(function(){return require("./gamification-feature.js")})},[]),j.jsx(_.e.Provider,{value:O,children:j.jsxs(I.p,{ref:function(e){a.current=e,i(!!e)},className:r?"":"c10llmat",children:[C&&r&&l.app&&j.jsx(dt,{className:S.cx_default(N.m,"sl-hide-on-modal"),sdk:t,ref:d}),C&&!r&&!!A&&l.app&&j.jsx(lt,{className:S.cx_default(N.m,"sl-hide-on-modal"),sdk:t,ref:d}),j.jsxs(I.c,{className:"sl-hide-on-modal",ref:v,"data-nav":(!!A&&C).toString(),children:[C&&l.app&&j.jsx(Lt,{sdk:t,scrollNode:v,headerNode:d,appNode:a,scrollStore:h,responsiveStore:u,hasActiveFeature:!!A}),C&&l.app&&j.jsx(Dt,{scrollStore:h,responsiveStore:u,scrollNode:v,appNode:a,className:N.m,sdk:t}),C&&o&&j.jsx(Pt,{muted:n,responsiveStore:u,appNode:a,className:N.m,sdk:t})]}),C&&!E&&o&&l.app&&j.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})})};exports.B=function(e){var t=e.gamification,n=e.scrollStore,r=e.className,s=e.appNode,o=e.scrollNode,i=e.responsiveStore;return j.jsx(Se,{appNode:s,scrollStore:n,scrollNode:o,className:r,gamification:t,responsiveStore:i})},exports.b=function(e){var t=e.event,n=e.topNavigation,r=e.theme,s=e.muted,o=e.withSidebarNotification,i=void 0===o||o,a=y.useContext(g.i),l=a.sdk,d=a.status,c=g.F(),u=g.z(),f=y.useContext(g.i).event;if(d===g.Y.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return d===g.Y.CONNECTED?j.jsx("div",{className:"StreamLayerSDK",children:"wait"}):null===l?j.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):(c.app||c.appNotification||c.appSidebar)&&(c.app||c.appSidebar||!c.appNotification||i)?j.jsx("div",{className:"StreamLayerSDK",children:j.jsx(x.h,{customTheme:null!=r?r:u.theme,themeMode:u.themeMode,children:j.jsx(Mt,{sdk:l,muted:s,event:(null==f?void 0:f.current)||t,topNavigation:n})})}):null};
package/lib/cjs/index3.js CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./feature.js");require("nanostores");const t=new e.EventBus;exports.eventBus=t;
1
+ "use strict";var e=new(require("./feature.js").EventBus);exports.eventBus=e;