@streamlayer/react 1.21.4 → 1.22.1

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 (168) hide show
  1. package/lib/app/masters.d.ts +2 -5
  2. package/lib/app/pause-ad.d.ts +1 -10
  3. package/lib/app/useStreamLayerApp.d.ts +1 -23
  4. package/lib/cjs/Question.js +1 -0
  5. package/lib/cjs/advertisement.js +40 -40
  6. package/lib/cjs/analytics.js +1 -0
  7. package/lib/cjs/auth.js +1 -1
  8. package/lib/cjs/bet-pack.js +1 -1
  9. package/lib/cjs/gamification-feature.js +1 -1
  10. package/lib/cjs/hooks-B0Qttldg.js +1 -0
  11. package/lib/cjs/index-DSi8Qgfs.js +1 -0
  12. package/lib/cjs/index.js +1 -1
  13. package/lib/cjs/index10.js +1 -0
  14. package/lib/cjs/index11.js +4 -0
  15. package/lib/cjs/index12.js +1 -0
  16. package/lib/cjs/index13.js +1 -0
  17. package/lib/cjs/index14.js +1 -0
  18. package/lib/cjs/index15.js +1 -0
  19. package/lib/cjs/index16.js +5 -0
  20. package/lib/cjs/index2.js +1 -5
  21. package/lib/cjs/index3.js +1 -0
  22. package/lib/cjs/index4.js +5 -0
  23. package/lib/cjs/index5.js +1 -0
  24. package/lib/cjs/index6.js +1 -0
  25. package/lib/cjs/index7.js +5 -0
  26. package/lib/cjs/index8.js +1 -0
  27. package/lib/cjs/index9.js +1 -0
  28. package/lib/cjs/insight.js +1 -1
  29. package/lib/cjs/masters.js +1 -1
  30. package/lib/cjs/masters2.js +6 -6
  31. package/lib/cjs/notification.js +1 -1
  32. package/lib/cjs/pause-ad.js +1 -1
  33. package/lib/cjs/points.js +1 -1
  34. package/lib/cjs/sl-types.js +15 -0
  35. package/lib/cjs/storage.js +1 -0
  36. package/lib/cjs/theme.js +17 -0
  37. package/lib/cjs/useStreamLayerApp.js +1 -1
  38. package/lib/cjs/useStreamLayerApp2.js +9 -9
  39. package/lib/cjs/utils.js +47 -0
  40. package/lib/cjs/vast-client.min.js +1 -0
  41. package/lib/classic/app/masters.d.ts +2 -5
  42. package/lib/classic/app/pause-ad.d.ts +1 -10
  43. package/lib/classic/app/useStreamLayerApp.d.ts +1 -23
  44. package/lib/classic/cjs/Question.js +1 -0
  45. package/lib/classic/cjs/advertisement.js +40 -40
  46. package/lib/classic/cjs/analytics.js +1 -0
  47. package/lib/classic/cjs/auth.js +1 -1
  48. package/lib/classic/cjs/bet-pack.js +4 -4
  49. package/lib/classic/cjs/gamification-feature.js +1 -1
  50. package/lib/classic/cjs/hooks-B0Qttldg.js +1 -0
  51. package/lib/classic/cjs/index-DSi8Qgfs.js +1 -0
  52. package/lib/classic/cjs/index.js +1 -1
  53. package/lib/classic/cjs/index10.js +1 -0
  54. package/lib/classic/cjs/index11.js +1 -0
  55. package/lib/classic/cjs/index12.js +1 -0
  56. package/lib/classic/cjs/index13.js +4 -0
  57. package/lib/classic/cjs/index2.js +5 -0
  58. package/lib/classic/cjs/index3.js +1 -0
  59. package/lib/classic/cjs/index4.js +1 -0
  60. package/lib/classic/cjs/index5.js +1 -0
  61. package/lib/classic/cjs/index6.js +5 -0
  62. package/lib/classic/cjs/index7.js +1 -0
  63. package/lib/classic/cjs/index8.js +1 -0
  64. package/lib/classic/cjs/index9.js +1 -0
  65. package/lib/classic/cjs/insight.js +1 -1
  66. package/lib/classic/cjs/notification.js +1 -1
  67. package/lib/classic/cjs/notification2.js +1 -0
  68. package/lib/classic/cjs/pause-ad.js +1 -1
  69. package/lib/classic/cjs/points.js +1 -1
  70. package/lib/classic/cjs/sl-types.js +15 -0
  71. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  72. package/lib/classic/cjs/useStreamLayerApp2.js +9 -9
  73. package/lib/classic/cjs/utils.js +47 -0
  74. package/lib/classic/cjs/vast-client.min.js +1 -0
  75. package/lib/classic/es/Question.js +392 -0
  76. package/lib/classic/es/advertisement.js +10375 -10374
  77. package/lib/classic/es/analytics.js +28 -0
  78. package/lib/classic/es/auth.js +4 -4
  79. package/lib/classic/es/bet-pack.js +56 -51
  80. package/lib/classic/es/gamification-feature.js +1 -1
  81. package/lib/classic/es/hooks-B0Qttldg.js +98 -0
  82. package/lib/classic/es/index-DSi8Qgfs.js +65 -0
  83. package/lib/classic/es/index.js +14 -15
  84. package/lib/classic/es/index10.js +87 -0
  85. package/lib/classic/es/index11.js +2355 -0
  86. package/lib/classic/es/index12.js +183 -0
  87. package/lib/classic/es/index13.js +835 -0
  88. package/lib/classic/es/index2.js +2621 -0
  89. package/lib/classic/es/index3.js +64 -0
  90. package/lib/classic/es/index4.js +19 -0
  91. package/lib/classic/es/index5.js +285 -0
  92. package/lib/classic/es/{index-l-eyvmpL.js → index6.js} +937 -937
  93. package/lib/classic/es/index7.js +7 -0
  94. package/lib/classic/es/index8.js +11 -0
  95. package/lib/classic/es/index9.js +319 -0
  96. package/lib/classic/es/insight.js +31 -32
  97. package/lib/classic/es/notification.js +7 -1006
  98. package/lib/classic/es/notification2.js +1117 -0
  99. package/lib/classic/es/pause-ad.js +139 -138
  100. package/lib/classic/es/points.js +39 -38
  101. package/lib/classic/es/sl-types.js +258 -0
  102. package/lib/classic/es/useStreamLayerApp.js +1 -2
  103. package/lib/classic/es/useStreamLayerApp2.js +2400 -2283
  104. package/lib/classic/es/utils.js +76 -0
  105. package/lib/{es/vast-client.min-B0NUra1B.js → classic/es/vast-client.min.js} +338 -338
  106. package/lib/classic/index.d.ts +5 -13
  107. package/lib/classic/masters.d.ts +1 -1
  108. package/lib/dist/cjs/index.js +1 -1
  109. package/lib/dist/cjs/masters.js +30 -30
  110. package/lib/dist/es/index.js +2 -2
  111. package/lib/dist/es/masters.js +5813 -6063
  112. package/lib/dist/index.d.ts +1332 -0
  113. package/lib/dist/style.css +1 -1
  114. package/lib/es/Question.js +136 -0
  115. package/lib/es/advertisement.js +10375 -10374
  116. package/lib/es/analytics.js +28 -0
  117. package/lib/es/auth.js +4 -4
  118. package/lib/es/bet-pack.js +7 -6
  119. package/lib/es/gamification-feature.js +1 -1
  120. package/lib/es/hooks-B0Qttldg.js +98 -0
  121. package/lib/es/index-DSi8Qgfs.js +65 -0
  122. package/lib/es/index.js +13 -14
  123. package/lib/es/index10.js +267 -0
  124. package/lib/es/index11.js +835 -0
  125. package/lib/es/index12.js +183 -0
  126. package/lib/es/index13.js +319 -0
  127. package/lib/es/index14.js +87 -0
  128. package/lib/es/index15.js +2355 -0
  129. package/lib/es/index16.js +1254 -0
  130. package/lib/es/index2.js +1349 -3363
  131. package/lib/es/index3.js +64 -0
  132. package/lib/es/index4.js +3418 -0
  133. package/lib/es/index5.js +19 -0
  134. package/lib/es/index6.js +285 -0
  135. package/lib/es/{index-l-eyvmpL.js → index7.js} +937 -937
  136. package/lib/es/index8.js +7 -0
  137. package/lib/es/index9.js +11 -0
  138. package/lib/es/insight.js +31 -32
  139. package/lib/es/masters.js +6 -5
  140. package/lib/es/masters2.js +189 -176
  141. package/lib/es/notification.js +124 -119
  142. package/lib/es/pause-ad.js +140 -139
  143. package/lib/es/points.js +40 -38
  144. package/lib/es/sl-types.js +277 -0
  145. package/lib/es/storage.js +113 -0
  146. package/lib/es/theme.js +47 -0
  147. package/lib/es/useStreamLayerApp.js +1 -2
  148. package/lib/es/useStreamLayerApp2.js +2399 -2282
  149. package/lib/es/utils.js +76 -0
  150. package/lib/{classic/es/vast-client.min-B0NUra1B.js → es/vast-client.min.js} +338 -338
  151. package/lib/index.d.ts +5 -13
  152. package/lib/masters.d.ts +1 -1
  153. package/lib/style.css +1 -1
  154. package/package.json +13 -48
  155. package/lib/app/event.d.ts +0 -6
  156. package/lib/app/provider.d.ts +0 -49
  157. package/lib/cjs/index-l-eyvmpL.js +0 -5
  158. package/lib/cjs/provider.js +0 -84
  159. package/lib/cjs/vast-client.min-B0NUra1B.js +0 -1
  160. package/lib/classic/app/event.d.ts +0 -6
  161. package/lib/classic/app/provider.d.ts +0 -49
  162. package/lib/classic/cjs/index-l-eyvmpL.js +0 -5
  163. package/lib/classic/cjs/provider.js +0 -68
  164. package/lib/classic/cjs/vast-client.min-B0NUra1B.js +0 -1
  165. package/lib/classic/es/provider.js +0 -7617
  166. package/lib/dist/cjs/gamification-feature2.js +0 -1
  167. package/lib/dist/es/gamification-feature2.js +0 -285
  168. package/lib/es/provider.js +0 -7693
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),y=require("react"),e=require("./provider.js");require("nanostores");require("lodash.throttle");require("react-dom");require("react-countup");const r=require("./useStreamLayerApp2.js"),I=e.styled_default("div")({name:"Media",class:"m1bcvojl",propsAsIs:!1}),os=()=>I,is=e.styled_default(os())({name:"MediaImgBottom",class:"m58gin0",propsAsIs:!0}),ls=()=>I,w=e.styled_default(ls())({name:"MediaImgSolid",class:"m1atm8do",propsAsIs:!0}),as=()=>I,ds=e.styled_default(as())({name:"MediaImgRounded",class:"myx3xoi",propsAsIs:!0}),rs=()=>I,cs=e.styled_default(rs())({name:"MediaImgCentered",class:"m1bwv0gx",propsAsIs:!0}),us=()=>I,ps=e.styled_default(us())({name:"MediaImgInsight",class:"mntjanp",propsAsIs:!0}),ms=e.styled_default("div")({name:"VideoIcon",class:"v1kofb47",propsAsIs:!1}),ys={[r.QuestionImages.UNSET]:w,[r.QuestionImages.NONE]:w,[r.QuestionImages.ROUNDED]:ds,[r.QuestionImages.CENTERED]:cs,[r.QuestionImages.TRANSPARENT]:is,[r.QuestionImages.SOLID]:w},N=({src:t,imageMode:o=r.QuestionImages.UNSET,withVideo:i,fromInsight:n})=>{if(o===r.QuestionImages.NONE)return null;const l=n?ps:ys[o];return s.jsxs(l,{children:[s.jsx("img",{src:t,alt:""}),i&&s.jsx(ms,{children:s.jsx(e.B1,{name:"icon-play"})})]})},xs=e.styled_default("div")({name:"NotificationContent",class:"nuraq9m",propsAsIs:!1}),vs=e.styled_default("div")({name:"NotificationContainer",class:"ns1nzpg",propsAsIs:!1}),R=e.styled_default("div")({name:"Body",class:"b1j59nzs",propsAsIs:!1}),fs=e.styled_default("div")({name:"Title",class:"t9vmnpp",propsAsIs:!1}),js=e.styled_default("button")({name:"Button",class:"b14ivj5k",propsAsIs:!1}),Is=()=>e.B1,As=e.styled_default(Is())({name:"StyledChevronRight",class:"s1atci8n",propsAsIs:!0}),hs=e.styled_default("div")({name:"QuoteWrap",class:"q4w8jgs",propsAsIs:!1}),$s=e.styled_default("blockquote")({name:"Quote",class:"qaa0kez",propsAsIs:!1}),gs=e.styled_default("div")({name:"Body",class:"b1wvd52w",propsAsIs:!1}),_s=e.styled_default("div")({name:"Container",class:"ccvukea",propsAsIs:!1}),ws=({image:t,tweet:o,account:i,accountVerified:n,body:l,title:u})=>{var c;return s.jsxs(_s,{children:[u&&s.jsx(hs,{children:s.jsx($s,{children:u})}),s.jsx(e.D,{image:t,name:(c=o==null?void 0:o.meta)==null?void 0:c.accountName,userName:i,verified:n,createdTweet:o==null?void 0:o.date}),s.jsx(gs,{children:e.D$1(l)})]})},Ts=({title:t,questionType:o,questionTypeData:i})=>s.jsxs(R,{children:[s.jsx(e.x,{questionTypeData:i,questionType:o,questionStatus:r.QuestionStatus.UNSET}),t&&s.jsx(fs,{children:t})]}),bs=({tweet:t})=>t?s.jsx(R,{children:s.jsx(ws,{...t,controlVideo:()=>{}})}):null,Cs=({action:t,questionType:o,inApp:i,insight:n,tweet:l})=>{var u;const c=e.e[o],a=e.o[o];if(!c||!i||!i.notification)return null;const{title:p,image:m,imageMode:v}=i.notification;let x=m;o===r.QuestionType.TWEET&&l!=null&&l.tweetMedia&&(x=l.tweetMedia.image),v===r.QuestionImages.NONE&&(x="");const f=i.useMediaFromContent&&(n==null?void 0:n.image),d=o===r.QuestionType.TWEET&&((u=l==null?void 0:l.tweetMedia)==null?void 0:u.video)||o===r.QuestionType.FACTOID&&(n==null?void 0:n.video);return s.jsx(vs,{"data-a":"intr",className:"SL_InApp",onClick:t,children:s.jsxs(xs,{style:x?{}:{paddingLeft:"1.5rem"},children:[x&&!f&&s.jsx(N,{src:x,imageMode:v,withVideo:!!d}),f&&s.jsx(N,{src:f,fromInsight:!0,withVideo:!!d}),o===r.QuestionType.TWEET?s.jsx(bs,{tweet:l}):s.jsx(Ts,{questionTypeData:c,questionType:o,title:p}),s.jsx(js,{name:"inapp-button",children:a||"Open"}),s.jsx(As,{name:"chevronRight"})]})})},Ns=()=>({color:t})=>t,k=e.styled_default("div")({name:"MediaComponentWrap",class:"mek728j",propsAsIs:!1,vars:{"mek728j-0":[Ns()]}}),j=e.styled_default("div")({name:"Media",class:"m461t56",propsAsIs:!1}),ks=()=>j,qs=e.styled_default(ks())({name:"MediaImgBottom",class:"m22bh04",propsAsIs:!0}),Ss=()=>j,Es=e.styled_default(Ss())({name:"MediaVideo",class:"m17u1e34",propsAsIs:!0}),Ls=()=>j,Ms=e.styled_default(Ls())({name:"MediaImgContentMedia",class:"m4j3eds",propsAsIs:!0}),Ds=()=>j,Bs=e.styled_default(Ds())({name:"MediaImgSolid",class:"m1lp3swr",propsAsIs:!0}),Qs=()=>j,Rs=e.styled_default(Qs())({name:"MediaImgRounded",class:"mc7lij",propsAsIs:!0}),Os=()=>j,Us=e.styled_default(Os())({name:"MediaImgCentered",class:"mwwaw7o",propsAsIs:!0}),Ps=()=>j,T=e.styled_default(Ps())({name:"MediaNone",class:"mqfzyyr",propsAsIs:!0}),zs="v170mtgf",Vs={[r.QuestionImages.UNSET]:T,[r.QuestionImages.NONE]:T,[r.QuestionImages.ROUNDED]:Rs,[r.QuestionImages.CENTERED]:Us,[r.QuestionImages.TRANSPARENT]:qs,[r.QuestionImages.SOLID]:Bs},q=({src:t,imageMode:o=r.QuestionImages.UNSET,withVideo:i,color:n,useContentMedia:l,thumbnailUrl:u})=>{if(!t)return s.jsx(k,{color:n,children:s.jsx(T,{})});const c=l===r.NotificationUseContentMedia.ENABLED?Ms:Vs[o];return s.jsx(k,{color:n,children:i?s.jsx(Es,{children:s.jsx(e.Et,{className:zs,source:t,poster:u||""})}):s.jsx(c,{children:s.jsx("img",{src:t,alt:""})})})},Fs=()=>({withoutPadding:t})=>t?"0px":"1rem",O=e.styled_default("div")({name:"NotificationContent",class:"n1p3bk1c",propsAsIs:!1,vars:{"n1p3bk1c-0":[Fs()]}}),Ws=e.styled_default("div")({name:"MainContent",class:"m1g211mu",propsAsIs:!1}),Ys=()=>e.B1,Ks=e.styled_default(Ys())({name:"StyledChevronRight",class:"sx1hq4c",propsAsIs:!0}),U=e.styled_default("div")({name:"NotificationContainer",class:"n1fcriet",propsAsIs:!1}),Gs=()=>({questionType:t})=>t===r.QuestionType.FACTOID?"7.3rem":"4.5rem",Hs=()=>({webos:t})=>t?"11px 0px 8px 0px":"11px 0px",Js=()=>({imageMode:t,webos:o})=>o?"330px":t===r.QuestionImages.SOLID?"310px":t===r.QuestionImages.CENTERED||t===r.QuestionImages.ROUNDED||t===r.QuestionImages.TRANSPARENT?"370px":"430px",Xs=e.styled_default("div")({name:"Body",class:"b1byyovs",propsAsIs:!1,vars:{"b1byyovs-0":[Gs()],"b1byyovs-1":[Hs()],"b1byyovs-2":[Js()]}}),Zs=()=>({webos:t})=>t?"0.85rem":"1.033rem",se=()=>({webos:t})=>t?"0.95rem":"1.25rem",ee=()=>({webos:t})=>t?"4.7rem":"2.25rem",te=()=>({webos:t})=>t?"pre-wrap":"nowrap",ne=e.styled_default("div")({name:"Title",class:"t1y5k5id",propsAsIs:!1,vars:{"t1y5k5id-0":[Zs()],"t1y5k5id-1":[se()],"t1y5k5id-2":[ee()],"t1y5k5id-3":[te()]}}),oe=e.styled_default("div")({name:"Description",class:"dw9eb7l",propsAsIs:!1}),ie=e.styled_default("div")({name:"LogoImgContainer",class:"ldu8wgy",propsAsIs:!1}),P=e.styled_default("img")({name:"LogoImg",class:"ln4a3eh",propsAsIs:!1}),le=()=>U,ae=e.styled_default(le())({name:"NotificationInterstitialContainer",class:"no2k63v",propsAsIs:!0}),de=e.styled_default("div")({name:"TVButtons",class:"th9nn6a",propsAsIs:!1}),z=e.styled_default("button")({name:"TVButton",class:"t1eee77p",propsAsIs:!1}),re=()=>z,ce=e.styled_default(re())({name:"DismissButton",class:"ds000hw",propsAsIs:!0}),ue=()=>z,pe=e.styled_default(ue())({name:"AnswerButton",class:"a1nz9hoe",propsAsIs:!0}),me=({title:t,questionType:o,questionTypeData:i,description:n,imageMode:l,webos:u})=>s.jsxs(Xs,{imageMode:l,questionType:o,webos:u,children:[s.jsx(e.x,{questionTypeData:i,questionType:o,questionStatus:r.QuestionStatus.UNSET}),t&&s.jsx(ne,{webos:u,children:t}),n&&s.jsx(oe,{children:n})]}),ye=e.O(ae),xe=e.O(ce),ve=e.O(pe),fe=({sponsorLogo:t,onClick:o,webos:i})=>s.jsx(ye,{autoFocus:!0,webos:i,onClick:o,"data-webos":i,children:s.jsx(O,{withoutPadding:!0,children:s.jsx(P,{src:t})})}),je=({action:t,close:o,questionType:i,inApp:n,insight:l,color:u,webos:c})=>{var a,p,m;const[v,x]=y.useState(!1),f=y.useRef();y.useEffect(()=>(n!=null&&n.sponsorLogo&&(x(!0),f.current=setTimeout(()=>{x(!1)},5e3)),()=>clearTimeout(f.current)),[n==null?void 0:n.sponsorLogo]);const d=e.e[i];if(!d||!n||!n.notification)return null;const{title:Z,image:ss,imageMode:h,useContentMedia:$}=n.notification,es=i===r.QuestionType.FACTOID?l==null?void 0:l.heading:Z,ts=i===r.QuestionType.FACTOID?l==null?void 0:l.body:"",ns=ss,g=i===r.QuestionType.FACTOID&&((a=l==null?void 0:l.video)==null?void 0:a.url)&&(n==null?void 0:n.isVideo)&&$===r.NotificationUseContentMedia.ENABLED,_=$===r.NotificationUseContentMedia.ENABLED?g?(p=l==null?void 0:l.video)==null?void 0:p.url:l==null?void 0:l.image:"";return n!=null&&n.sponsorLogo&&v?s.jsx(fe,{sponsorLogo:n==null?void 0:n.sponsorLogo,webos:c,onClick:()=>x(!1)}):s.jsxs(U,{"data-a":"intr",className:"SL_InApp",onClick:A=>{c||t==null||t(A)},"data-is-insight":i===r.QuestionType.FACTOID,"data-webos":c,children:[(n==null?void 0:n.sponsorLogo)&&s.jsx(ie,{children:s.jsx(P,{src:n==null?void 0:n.sponsorLogo})}),s.jsxs(O,{children:[s.jsxs(Ws,{children:[!_&&s.jsx(q,{src:ns,imageMode:h,withVideo:!!g,color:u}),_&&s.jsx(q,{src:_,imageMode:h,withVideo:!!g,color:u,useContentMedia:$,thumbnailUrl:(m=l==null?void 0:l.video)==null?void 0:m.thumbnailUrl}),s.jsx(me,{questionTypeData:d,questionType:i,title:es,description:ts,imageMode:h,webos:c})]}),!c&&s.jsx(Ks,{name:"chevronRight"}),c&&s.jsxs(de,{children:[s.jsx(xe,{webos:!0,"data-close-btn":"true",onClick:A=>{A.stopPropagation(),o==null||o(A)},children:"Dismiss"}),s.jsx(ve,{webos:!0,autoFocus:!0,onClick:t,children:"Answer"})]})]})]})},Ie=e.styled_default("div")({name:"NotificationContainer",class:"n11jcrxe",propsAsIs:!1}),S=e.styled_default("img")({name:"Icon",class:"i1vmpt6u",propsAsIs:!1}),Ae=e.styled_default("div")({name:"IconContainer",class:"i180665s",propsAsIs:!1}),he=()=>e.B1,$e=e.styled_default(he())({name:"TitleIcon",class:"t16zzzei",propsAsIs:!0}),ge=()=>e.y,_e=e.styled_default(ge())({name:"Close",class:"c1sur0q2",propsAsIs:!0}),we=e.styled_default("div")({name:"Body",class:"bai9j52",propsAsIs:!1}),Te=e.styled_default("div")({name:"Title",class:"t1bnt25p",propsAsIs:!1}),be=e.styled_default("div")({name:"Description",class:"dmixjec",propsAsIs:!1}),Ce=e.styled_default("button")({name:"Button",class:"b1ubkw1q",propsAsIs:!1}),Ne=({open:t,close:o,...i})=>{var n,l;return s.jsxs(Ie,{"data-a":"intr",onClick:()=>{t==null||t(),i&&i.markIstantOpen()},children:[s.jsxs(Ae,{children:[s.jsx(S,{className:"on-light",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png"}),s.jsx(S,{className:"on-dark",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"})]}),s.jsxs(we,{children:[s.jsxs(Te,{children:[s.jsx($e,{name:"icon-trophy-solid"}),(n=i==null?void 0:i.titleCard)==null?void 0:n.title]}),s.jsxs(be,{children:[s.jsx("span",{children:(l=i==null?void 0:i.titleCard)==null?void 0:l.subtitle}),s.jsx(Ce,{name:"inapp-button",children:"Play Now"})]})]}),s.jsx(_e,{close:u=>{u==null||u.stopPropagation(),o==null||o()}})]})},ke=e.styled_default("div")({name:"Container",class:"cef8huz",propsAsIs:!1}),qe=()=>e.B1,Se=e.styled_default(qe())({name:"CheckIcon",class:"c1mo15kk",propsAsIs:!0}),Ee=()=>e.B1,Le=e.styled_default(Ee())({name:"PredictionIcon",class:"p16zkqnm",propsAsIs:!0}),Me=e.styled_default("div")({name:"PredictionIconContainer",class:"pjszi7a",propsAsIs:!1}),De=e.styled_default("div")({name:"BodyContainer",class:"bftbmo3",propsAsIs:!1}),Be=e.styled_default("div")({name:"Body",class:"barrbyu",propsAsIs:!1}),Qe=e.styled_default("div")({name:"Subtitle",class:"sz7237i",propsAsIs:!1}),Re=({step:t,children:o,answer:i,state:n="pending"})=>{const[l,u]=y.useState(0),[c]=y.useState(()=>new ResizeObserver(p=>{window.requestAnimationFrame(()=>{var m,v;u(((v=(m=p==null?void 0:p[0])==null?void 0:m.contentRect)==null?void 0:v.width)??0)})})),a=y.useCallback(p=>{p?c.observe(p):c.disconnect()},[c]);return y.useEffect(()=>()=>{c.disconnect()},[c]),s.jsxs(ke,{children:[s.jsx(Me,{children:s.jsx(Le,{name:"icon-prediction"})}),s.jsx(De,{style:{minWidth:`${l}px`},children:s.jsx(Be,{children:o},t)}),s.jsx(Qe,{ref:a,className:n,children:s.jsxs("div",{children:[s.jsx(Se,{name:"icon-check"}),"Your Pick: ",i]})})]})},Oe=e.styled_default("div")({name:"Container",class:"ckyzolp",propsAsIs:!1}),b=e.styled_default("div")({name:"Line",class:"l16t1zr7",propsAsIs:!1}),Ue=()=>b,Pe=e.styled_default(Ue())({name:"Line1",class:"le78kvg",propsAsIs:!0}),ze=()=>b,Ve=e.styled_default(ze())({name:"Line2",class:"l1o7966d",propsAsIs:!0}),Fe=()=>b,We=e.styled_default(Fe())({name:"Line3",class:"lu9lyxq",propsAsIs:!0}),Ye=()=>s.jsxs(Oe,{children:[s.jsx(Pe,{children:s.jsx("div",{})}),s.jsx(Ve,{children:s.jsx("div",{})}),s.jsx(We,{children:s.jsx("div",{})})]}),Ke=e.styled_default("div")({name:"Container",class:"c10jy6zf",propsAsIs:!1}),Ge=()=>e.B1,He=e.styled_default(Ge())({name:"CheckIcon",class:"c1c7scay",propsAsIs:!0}),Je=()=>s.jsxs(Ke,{children:[s.jsx(He,{name:"icon-check"})," Prediction results are in!"]}),Xe=e.styled_default("div")({name:"Container",class:"cf6k2yy",propsAsIs:!1}),Ze=e.styled_default("div")({name:"Caption",class:"c1c8xjus",propsAsIs:!1}),st=e.styled_default("div")({name:"Title",class:"t1d1uekn",propsAsIs:!1}),et=({title:t})=>s.jsxs(Xe,{children:[s.jsx(Ze,{children:"Results for"}),s.jsx(st,{children:t})]}),V=e.styled_default("div")({name:"Container",class:"c181a1as",propsAsIs:!1}),F=e.styled_default("div")({name:"Title",class:"t1cduox6",propsAsIs:!1}),tt=()=>e.B1,W=e.styled_default(tt())({name:"CorrectIcon",class:"c1onrv6j",propsAsIs:!0}),nt=()=>W,ot=e.styled_default(nt())({name:"InCorrectIcon",class:"i17n9o7e",propsAsIs:!0}),it=()=>s.jsxs(V,{children:[s.jsxs(F,{children:["Congratulations!",s.jsx("br",{}),"You answered correctly."]}),s.jsx(W,{name:"icon-check"})]}),lt=({title:t})=>s.jsxs(V,{children:[s.jsxs(F,{children:["Better luck next time!",s.jsx("br",{}),"Correct: ",t]}),s.jsx(ot,{name:"icon-cross"})]}),at=e.styled_default("div")({name:"Container",class:"cnxgcs2",propsAsIs:!1}),dt=e.styled_default("div")({name:"Title",class:"t903f8n",propsAsIs:!1}),rt=()=>e.B1,ct=e.styled_default(rt())({name:"CheckIcon",class:"ceyu3qj",propsAsIs:!0}),ut=({points:t})=>s.jsxs(at,{children:[s.jsxs(dt,{children:["You won ",s.jsx(e.d,{delay:.5,prefix:"+",suffix:" points",value:t})]}),s.jsx(ct,{name:"icon-trophy-solid"})]}),E=e.styled_default("div")({name:"Container",class:"cq3agu2",propsAsIs:!1}),L=e.styled_default("div")({name:"Body",class:"b16qj0do",propsAsIs:!1}),M={1:3e3,2:4e3,3:4e3,4:4e3},pt=({close:t,action:o,setStep:i,votedAnswer:n,correct:l,correctAnswerTitle:u,questionTitle:c,step:a})=>{if(y.useEffect(()=>{if(i){const m=setTimeout(()=>{M[a+1]&&(l||a<3)?i(a+1):t==null||t()},M[a]);return()=>{m&&clearTimeout(m)}}return()=>{}},[i,a,t,l]),a===1)return s.jsx(E,{children:s.jsx(L,{children:s.jsx(Je,{})})});let p="pending";return(a===3||a===4)&&(p=l?"correct":"incorrect"),s.jsx(E,{"data-a":"intr",onClick:()=>o==null?void 0:o(),children:s.jsxs(L,{children:[a!==1&&s.jsx(Ye,{},a),s.jsxs(Re,{state:p,step:a,answer:(n==null?void 0:n.title)||"unknown",children:[a===2&&s.jsx(et,{title:c||"unknown"}),a===3&&l&&s.jsx(it,{}),a===3&&!l&&s.jsx(lt,{title:u||"unknown"}),a===4&&s.jsx(ut,{points:(n==null?void 0:n.points)||0})]})]})})},mt=({close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:l,questionTitle:u})=>{const[c,a]=y.useState(1);return s.jsx(pt,{close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:l,questionTitle:u,setStep:a,step:c,title:""})},yt=e.styled_default("div")({name:"NotificationContainer",class:"n1i4h28u",propsAsIs:!1}),xt=t=>s.jsx(yt,{children:s.jsx(mt,{...t})}),vt=e.styled_default("div")({name:"Container",class:"cwa9tgs",propsAsIs:!1}),ft=e.styled_default("div")({name:"BodyContainer",class:"b1xx7swj",propsAsIs:!1}),jt=e.styled_default("div")({name:"Body",class:"b1a21en",propsAsIs:!1}),It=({step:t,children:o,state:i="pending"})=>{const[n,l]=y.useState(0);return y.useEffect(()=>{const u=new ResizeObserver(c=>{window.requestAnimationFrame(()=>{var a,p;const m=((p=(a=c==null?void 0:c[0])==null?void 0:a.contentRect)==null?void 0:p.width)??0;l(m)})});return()=>{u.disconnect()}},[]),s.jsx(vt,{style:{padding:`${t===3&&i==="incorrect"||t===1?"5px 100px":"5px 40px"}`},children:s.jsx(ft,{style:{minWidth:`${n}px`},children:s.jsx(jt,{children:o},t)})})},At=e.styled_default("div")({name:"Container",class:"c1nd5cu8",propsAsIs:!1}),C=e.styled_default("div")({name:"Line",class:"lgbipw0",propsAsIs:!1}),ht=()=>C,$t=e.styled_default(ht())({name:"Line1",class:"l1anth16",propsAsIs:!0}),gt=()=>C,_t=e.styled_default(gt())({name:"Line2",class:"l193yd7v",propsAsIs:!0}),wt=()=>C,Tt=e.styled_default(wt())({name:"Line3",class:"lhbflsp",propsAsIs:!0}),bt=()=>s.jsxs(At,{children:[s.jsx($t,{children:s.jsx("div",{})}),s.jsx(_t,{children:s.jsx("div",{})}),s.jsx(Tt,{children:s.jsx("div",{})})]}),Ct=e.styled_default("div")({name:"Container",class:"c1lvd429",propsAsIs:!1}),Nt=()=>e.B1,kt=e.styled_default(Nt())({name:"PredictionIcon",class:"p1n4m87t",propsAsIs:!0}),qt=()=>s.jsxs(Ct,{children:[s.jsx(kt,{name:"icon-prediction"})," Prediction results are in!"]}),St=()=>e.B1,Et=e.styled_default(St())({name:"CheckIcon",class:"c126r8f9",propsAsIs:!0}),Lt=e.styled_default("div")({name:"Answer",class:"a1o2rpgl",propsAsIs:!1}),Mt=e.styled_default("div")({name:"Container",class:"cej6ci1",propsAsIs:!1}),Dt=e.styled_default("div")({name:"Title",class:"tob24mr",propsAsIs:!1}),Bt=({title:t,answer:o})=>s.jsxs(Mt,{children:[s.jsx(Dt,{children:t}),s.jsxs(Lt,{children:[s.jsx(Et,{name:"icon-prediction"}),"Your Pick: ",o]})]}),Y=e.styled_default("div")({name:"Container",class:"c1lesal4",propsAsIs:!1}),K=e.styled_default("div")({name:"Title",class:"tv66n4w",propsAsIs:!1}),Qt=()=>e.B1,Rt=e.styled_default(Qt())({name:"CorrectIcon",class:"cx0vlv2",propsAsIs:!0}),G=e.styled_default("div")({name:"Answer",class:"akfh4v5",propsAsIs:!1}),Ot=({answer:t})=>s.jsxs(Y,{children:[s.jsx(K,{children:"Congratulations! You answered correctly."}),s.jsxs(G,{children:[s.jsx(Rt,{name:"icon-correct"}),"Your Pick: ",t]})]}),Ut=({title:t,answer:o})=>s.jsxs(Y,{children:[s.jsxs(K,{children:["Better luck next time!",s.jsx("br",{}),"Correct: ",t]}),s.jsxs(G,{children:["Your Pick: ",o]})]}),D=e.styled_default("div")({name:"Container",class:"cmox3ot",propsAsIs:!1}),B=e.styled_default("div")({name:"Body",class:"bqq1ix4",propsAsIs:!1}),Q={1:3e3,2:4e3,3:4e3},Pt=({close:t,action:o,setStep:i,votedAnswer:n,correct:l,correctAnswerTitle:u,questionTitle:c,step:a})=>{if(y.useEffect(()=>{if(i){const m=setTimeout(()=>{Q[a+1]&&(l||a<3)?i(a+1):t==null||t()},Q[a]);return()=>{m&&clearTimeout(m)}}return()=>{}},[i,a,t,l]),a===1)return s.jsx(D,{children:s.jsx(B,{children:s.jsx(qt,{})})});let p="pending";return a===3&&(p=l?"correct":"incorrect"),s.jsx(D,{"data-a":"intr",onClick:()=>o==null?void 0:o(),children:s.jsxs(B,{children:[a!==1&&s.jsx(bt,{},a),s.jsxs(It,{state:p,step:a,children:[a===2&&s.jsx(Bt,{title:c||"unknown",answer:(n==null?void 0:n.title)||"unknown"}),a===3&&l&&s.jsx(Ot,{answer:(n==null?void 0:n.title)||"unknown"}),a===3&&!l&&s.jsx(Ut,{title:u||"unknown",answer:(n==null?void 0:n.title)||"unknown"})]})]})})},zt=({close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:l,questionTitle:u})=>{const[c,a]=y.useState(1);return s.jsx(Pt,{close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:l,questionTitle:u,setStep:a,step:c,title:""})},H=e.styled_default("div")({name:"NotificationContainer",class:"nn0nqh6",propsAsIs:!1}),Vt=()=>({withoutPadding:t})=>t?"0px":"1rem",Ft=e.styled_default("div")({name:"NotificationContent",class:"n1bcdf3j",propsAsIs:!1,vars:{"n1bcdf3j-0":[Vt()]}}),J=e.styled_default("img")({name:"LogoImg",class:"l8jorbq",propsAsIs:!1}),Wt=()=>H,Yt=e.styled_default(Wt())({name:"NotificationInterstitialContainer",class:"nf920y3",propsAsIs:!0}),Kt=e.styled_default("div")({name:"LogoImgContainer",class:"lzsmehn",propsAsIs:!1}),Gt=({sponsorLogo:t,onClick:o})=>s.jsx(Yt,{onClick:o,children:s.jsx(Ft,{withoutPadding:!0,children:s.jsx(J,{src:t})})}),Ht=t=>{var o,i,n,l,u;const[c,a]=y.useState(!1),p=y.useRef();return y.useEffect(()=>{var m;return(m=t==null?void 0:t.inApp)!=null&&m.sponsorLogo&&(a(!0),p.current=setTimeout(()=>{a(!1)},5e3)),()=>clearTimeout(p.current)},[(o=t==null?void 0:t.inApp)==null?void 0:o.sponsorLogo]),(i=t==null?void 0:t.inApp)!=null&&i.sponsorLogo&&c?s.jsx(Gt,{sponsorLogo:(n=t.inApp)==null?void 0:n.sponsorLogo,onClick:()=>a(!1)}):s.jsx(H,{children:s.jsxs("div",{children:[((l=t==null?void 0:t.inApp)==null?void 0:l.sponsorLogo)&&s.jsx(Kt,{children:s.jsx(J,{src:(u=t==null?void 0:t.inApp)==null?void 0:u.sponsorLogo})}),s.jsx(zt,{...t})]})})},X=({sdk:t,webos:o})=>{var i,n,l,u,c,a,p,m;const[v]=y.useState(t.getNotificationsStore()),x=e.useStore(v),f=t.getFeature(r.SdkOverlayType.GAMES),d=y.useMemo(()=>t.getActiveNotification(),[t,x]);return y.useEffect(()=>{d&&e.eventBus.emit("notification",{action:"rendered",payload:{questionId:d.data.questionId,questionType:d.data.questionType}})},[d]),d&&d.type===e.NotificationType.QUESTION_RESOLVED?d.data.question&&d.data.questionType===r.QuestionType.PREDICTION?d&&((i=d.data.inApp)==null?void 0:i.adUnit)===r.AdUnit.STANDART?s.jsx(Ht,{action:d.action,close:d.close,...d.data.question,inApp:d.data.inApp}):s.jsx(xt,{action:d.action,close:d.close,...d.data.question}):null:d&&d.type===e.NotificationType.ONBOARDING?d.data.onboarding?s.jsx(Ne,{open:f==null?void 0:f.openOnboarding,close:d.close,...d.data.onboarding}):null:d&&((n=d.data.inApp)==null?void 0:n.adUnit)===r.AdUnit.STANDART?s.jsx(je,{...d.data,action:d.action,close:d.close,color:((c=(u=(l=d==null?void 0:d.data)==null?void 0:l.inApp)==null?void 0:u.notification)==null?void 0:c.indicatorColor)||((m=(p=(a=d==null?void 0:d.data)==null?void 0:a.inApp)==null?void 0:p.appearance)==null?void 0:m.primaryColor),webos:o}):d&&s.jsx(Cs,{...d.data,action:d.action})},Jt=({theme:t})=>{const o=e.useStreamLayer(),i=e.useStreamLayerTheme(),n=e.useStreamLayerUI();return o&&(n.appNotification||n.onboardingNotification)?n.app&&!n.onboardingNotification?null:s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(e.h,{customTheme:t??i.theme,themeMode:i.themeMode,children:s.jsx(X,{sdk:o})})}):null};exports.StreamLayerSDKNotification=Jt;exports.StreamLayerSDKNotificationUI=X;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("./index7.js");const e=require("./notification2.js");require("react");require("./hooks-B0Qttldg.js");exports.StreamLayerSDKNotification=e.StreamLayerSDKNotification;exports.StreamLayerSDKNotificationUI=e.K;
@@ -0,0 +1 @@
1
+ "use strict";const s=require("react/jsx-runtime"),xs=require("./index7.js"),y=require("react"),e=require("./sl-types.js"),Is=require("./index3.js"),A=require("./index12.js"),k=require("./index8.js"),x=require("./index5.js"),d=require("./useStreamLayerApp2.js"),S=require("./index10.js"),Y=require("./index9.js"),fs=require("./index4.js"),C=require("./hooks-B0Qttldg.js"),K=e.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),js=e.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),vs=e.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),As=e.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),hs=()=>x.B1,g=e.styled_default(hs())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),$s=()=>g,gs=e.styled_default($s())({name:"QuestionCheckIcon",class:"qxlt78s",propsAsIs:!0}),_s=()=>x.B1,Ts=e.styled_default(_s())({name:"QuestionTypeIcon",class:"qmg0vkx",propsAsIs:!0}),ws=e.styled_default("div")({name:"QuestionTypeLabel",class:"q1uz5j1g",propsAsIs:!1}),bs=e.styled_default("div")({name:"QuestionContent",class:"qc3icwa",propsAsIs:!1}),H=e.styled_default("button")({name:"PlayButton",class:"p169lohr",propsAsIs:!1}),Cs=e.styled_default("div")({name:"SkeletonContainer",class:"s1f43z3r",propsAsIs:!1}),qs=()=>k.e,ks=e.styled_default(qs())({name:"SkeletonButton",class:"s16k8geu",propsAsIs:!0}),Ns={[d.PickHistoryStatus.LOST]:s.jsx(g,{name:"incorrectVoted"}),[d.PickHistoryStatus.WON]:s.jsx(gs,{name:"icon-check"}),[d.PickHistoryStatus.UNSET]:s.jsx(g,{name:"icon-arrow"}),[d.PickHistoryStatus.DNP]:s.jsx(g,{name:"icon-arrow"})},Ss=()=>s.jsxs(Cs,{children:[s.jsx(k.i,{loading:!0,style:{width:"35%"}}),s.jsx(k.i,{loading:!0,style:{width:"70%"}}),s.jsx(ks,{})]}),E=({questionTypeData:t,questionType:o,questionStatus:i})=>s.jsxs(js,{className:"SL_QuestionCaption",children:[s.jsx(Ts,{className:"SL_QuestionTypeIcon","data-testid":"question-type-icon","data-type-trivia":o===d.QuestionType.TRIVIA,"data-type-poll":o===d.QuestionType.POLL,name:t.iconName}),s.jsxs(ws,{className:"SL_QuestionTypeLabel",children:[t.label,o===d.QuestionType.TRIVIA&&i===d.QuestionStatus.RESOLVED&&" • Expired"]})]}),Es=({questionId:t,questionType:o,questionStatus:i,subject:n,openForVoting:a,status:u})=>{const c=A.e[o],l=Ns[u];return c?s.jsxs(K,{"data-a":"intr","data-name":t,children:[s.jsxs(bs,{children:[s.jsx(E,{questionTypeData:c,questionType:o,questionStatus:i}),s.jsx(vs,{children:n||""})]}),s.jsx(As,{children:a?s.jsx(H,{"data-a":"intr","data-name":t,children:"Play"}):l})]}):null};var D;(function(t){t.OPENED="opened"})(D||(D={}));const h=e.styled_default("div")({name:"Media",class:"m1bcvojl",propsAsIs:!1}),Ls=()=>h,Qs=e.styled_default(Ls())({name:"MediaImgBottom",class:"m58gin0",propsAsIs:!0}),Ds=()=>h,q=e.styled_default(Ds())({name:"MediaImgSolid",class:"m1atm8do",propsAsIs:!0}),Bs=()=>h,Ms=e.styled_default(Bs())({name:"MediaImgRounded",class:"myx3xoi",propsAsIs:!0}),Rs=()=>h,Os=e.styled_default(Rs())({name:"MediaImgCentered",class:"m1bwv0gx",propsAsIs:!0}),Ps=()=>h,zs=e.styled_default(Ps())({name:"MediaImgInsight",class:"mntjanp",propsAsIs:!0}),Us=e.styled_default("div")({name:"VideoIcon",class:"v1kofb47",propsAsIs:!1}),Vs={[d.QuestionImages.UNSET]:q,[d.QuestionImages.NONE]:q,[d.QuestionImages.ROUNDED]:Ms,[d.QuestionImages.CENTERED]:Os,[d.QuestionImages.TRANSPARENT]:Qs,[d.QuestionImages.SOLID]:q},B=({src:t,imageMode:o=d.QuestionImages.UNSET,withVideo:i,fromInsight:n})=>{if(o===d.QuestionImages.NONE)return null;const a=n?zs:Vs[o];return s.jsxs(a,{children:[s.jsx("img",{src:t,alt:""}),i&&s.jsx(Us,{children:s.jsx(x.B1,{name:"icon-play"})})]})},Fs=e.styled_default("div")({name:"NotificationContent",class:"nuraq9m",propsAsIs:!1}),Ws=e.styled_default("div")({name:"NotificationContainer",class:"ns1nzpg",propsAsIs:!1}),G=e.styled_default("div")({name:"Body",class:"b1j59nzs",propsAsIs:!1}),Ys=e.styled_default("div")({name:"Title",class:"t9vmnpp",propsAsIs:!1}),Ks=e.styled_default("button")({name:"Button",class:"b14ivj5k",propsAsIs:!1}),Hs=()=>x.B1,Gs=e.styled_default(Hs())({name:"StyledChevronRight",class:"s1atci8n",propsAsIs:!0}),Xs=e.styled_default("div")({name:"QuoteWrap",class:"q4w8jgs",propsAsIs:!1}),Js=e.styled_default("blockquote")({name:"Quote",class:"qaa0kez",propsAsIs:!1}),Zs=e.styled_default("div")({name:"Body",class:"b1wvd52w",propsAsIs:!1}),se=e.styled_default("div")({name:"Container",class:"ccvukea",propsAsIs:!1}),ee=({image:t,tweet:o,account:i,accountVerified:n,body:a,title:u})=>{var c;return s.jsxs(se,{children:[u&&s.jsx(Xs,{children:s.jsx(Js,{children:u})}),s.jsx(A.D,{image:t,name:(c=o==null?void 0:o.meta)==null?void 0:c.accountName,userName:i,verified:n,createdTweet:o==null?void 0:o.date}),s.jsx(Zs,{children:A.D$1(a)})]})},te=({title:t,questionType:o,questionTypeData:i})=>s.jsxs(G,{children:[s.jsx(E,{questionTypeData:i,questionType:o,questionStatus:d.QuestionStatus.UNSET}),t&&s.jsx(Ys,{children:t})]}),ne=({tweet:t})=>t?s.jsx(G,{children:s.jsx(ee,{...t,controlVideo:()=>{}})}):null,oe=({action:t,questionType:o,inApp:i,insight:n,tweet:a})=>{var u;const c=A.e[o],l=A.o[o];if(!c||!i||!i.notification)return null;const{title:p,image:m,imageMode:f}=i.notification;let I=m;o===d.QuestionType.TWEET&&a!=null&&a.tweetMedia&&(I=a.tweetMedia.image),f===d.QuestionImages.NONE&&(I="");const j=i.useMediaFromContent&&(n==null?void 0:n.image),r=o===d.QuestionType.TWEET&&((u=a==null?void 0:a.tweetMedia)==null?void 0:u.video)||o===d.QuestionType.FACTOID&&(n==null?void 0:n.video);return s.jsx(Ws,{"data-a":"intr",className:"SL_InApp",onClick:t,children:s.jsxs(Fs,{style:I?{}:{paddingLeft:"1.5rem"},children:[I&&!j&&s.jsx(B,{src:I,imageMode:f,withVideo:!!r}),j&&s.jsx(B,{src:j,fromInsight:!0,withVideo:!!r}),o===d.QuestionType.TWEET?s.jsx(ne,{tweet:a}):s.jsx(te,{questionTypeData:c,questionType:o,title:p}),s.jsx(Ks,{name:"inapp-button",children:l||"Open"}),s.jsx(Gs,{name:"chevronRight"})]})})},ie=()=>({color:t})=>t||"transparent",M=e.styled_default("div")({name:"MediaComponentWrap",class:"mek728j",propsAsIs:!1,vars:{"mek728j-0":[ie()]}}),v=e.styled_default("div")({name:"Media",class:"m461t56",propsAsIs:!1}),ae=()=>v,le=e.styled_default(ae())({name:"MediaImgBottom",class:"m22bh04",propsAsIs:!0}),de=()=>v,re=e.styled_default(de())({name:"MediaVideo",class:"m17u1e34",propsAsIs:!0}),ce=()=>v,ue=e.styled_default(ce())({name:"MediaImgContentMedia",class:"m4j3eds",propsAsIs:!0}),pe=()=>v,me=e.styled_default(pe())({name:"MediaImgSolid",class:"m1lp3swr",propsAsIs:!0}),ye=()=>v,xe=e.styled_default(ye())({name:"MediaImgRounded",class:"mc7lij",propsAsIs:!0}),Ie=()=>v,fe=e.styled_default(Ie())({name:"MediaImgCentered",class:"mwwaw7o",propsAsIs:!0}),je=()=>v,N=e.styled_default(je())({name:"MediaNone",class:"mqfzyyr",propsAsIs:!0}),ve="v170mtgf",Ae={[d.QuestionImages.UNSET]:N,[d.QuestionImages.NONE]:N,[d.QuestionImages.ROUNDED]:xe,[d.QuestionImages.CENTERED]:fe,[d.QuestionImages.TRANSPARENT]:le,[d.QuestionImages.SOLID]:me},R=({src:t,imageMode:o=d.QuestionImages.UNSET,withVideo:i,color:n,useContentMedia:a,thumbnailUrl:u})=>{if(!t)return s.jsx(M,{color:n,children:s.jsx(N,{})});const c=a===d.NotificationUseContentMedia.ENABLED?ue:Ae[o];return s.jsx(M,{color:n,children:i?s.jsx(re,{children:s.jsx(Y.Et,{className:ve,source:t,poster:u||""})}):s.jsx(c,{children:s.jsx("img",{src:t,alt:""})})})},he=()=>({withoutPadding:t})=>t?"0px":"1rem",X=e.styled_default("div")({name:"NotificationContent",class:"n1p3bk1c",propsAsIs:!1,vars:{"n1p3bk1c-0":[he()]}}),$e=e.styled_default("div")({name:"MainContent",class:"m1g211mu",propsAsIs:!1}),ge=()=>x.B1,_e=e.styled_default(ge())({name:"StyledChevronRight",class:"sx1hq4c",propsAsIs:!0}),J=e.styled_default("div")({name:"NotificationContainer",class:"n1fcriet",propsAsIs:!1}),Te=()=>({questionType:t})=>t===d.QuestionType.FACTOID?"7.3rem":"4.5rem",we=()=>({webos:t})=>t?"11px 0px 8px 0px":"11px 0px",be=()=>({imageMode:t,webos:o})=>o?"330px":t===d.QuestionImages.SOLID?"310px":t===d.QuestionImages.CENTERED||t===d.QuestionImages.ROUNDED||t===d.QuestionImages.TRANSPARENT?"370px":"430px",Ce=e.styled_default("div")({name:"Body",class:"b1byyovs",propsAsIs:!1,vars:{"b1byyovs-0":[Te()],"b1byyovs-1":[we()],"b1byyovs-2":[be()]}}),qe=()=>({webos:t})=>t?"0.85rem":"1.033rem",ke=()=>({webos:t})=>t?"0.95rem":"1.25rem",Ne=()=>({webos:t})=>t?"4.7rem":"2.25rem",Se=()=>({webos:t})=>t?"pre-wrap":"nowrap",Ee=e.styled_default("div")({name:"Title",class:"t1y5k5id",propsAsIs:!1,vars:{"t1y5k5id-0":[qe()],"t1y5k5id-1":[ke()],"t1y5k5id-2":[Ne()],"t1y5k5id-3":[Se()]}}),Le=e.styled_default("div")({name:"Description",class:"dw9eb7l",propsAsIs:!1}),Qe=e.styled_default("div")({name:"LogoImgContainer",class:"ldu8wgy",propsAsIs:!1}),Z=e.styled_default("img")({name:"LogoImg",class:"ln4a3eh",propsAsIs:!1}),De=()=>J,Be=e.styled_default(De())({name:"NotificationInterstitialContainer",class:"no2k63v",propsAsIs:!0}),Me=e.styled_default("div")({name:"TVButtons",class:"th9nn6a",propsAsIs:!1}),ss=e.styled_default("button")({name:"TVButton",class:"t1eee77p",propsAsIs:!1}),Re=()=>ss,Oe=e.styled_default(Re())({name:"DismissButton",class:"ds000hw",propsAsIs:!0}),Pe=()=>ss,ze=e.styled_default(Pe())({name:"AnswerButton",class:"a1nz9hoe",propsAsIs:!0}),Ue=({title:t,questionType:o,questionTypeData:i,description:n,imageMode:a,webos:u})=>s.jsxs(Ce,{imageMode:a,questionType:o,webos:u,children:[s.jsx(E,{questionTypeData:i,questionType:o,questionStatus:d.QuestionStatus.UNSET}),t&&s.jsx(Ee,{webos:u,children:t}),n&&s.jsx(Le,{children:n})]}),Ve=S.O(Be),Fe=S.O(Oe),We=S.O(ze),Ye=({sponsorLogo:t,onClick:o,webos:i})=>s.jsx(Ve,{autoFocus:!0,webos:i,onClick:o,"data-webos":i,children:s.jsx(X,{withoutPadding:!0,children:s.jsx(Z,{src:t})})}),Ke=({action:t,close:o,questionType:i,inApp:n,insight:a,color:u,webos:c})=>{var l,p,m;const[f,I]=y.useState(!1),j=y.useRef();y.useEffect(()=>(n!=null&&n.sponsorLogo&&(I(!0),j.current=setTimeout(()=>{I(!1)},5e3)),()=>clearTimeout(j.current)),[n==null?void 0:n.sponsorLogo]);const r=A.e[i];if(!r||!n||!n.notification)return null;const{title:cs,image:us,imageMode:_,useContentMedia:T}=n.notification,ps=i===d.QuestionType.FACTOID?a==null?void 0:a.heading:cs,ms=i===d.QuestionType.FACTOID?a==null?void 0:a.body:"",ys=us,w=i===d.QuestionType.FACTOID&&((l=a==null?void 0:a.video)==null?void 0:l.url)&&(n==null?void 0:n.isVideo)&&T===d.NotificationUseContentMedia.ENABLED,b=T===d.NotificationUseContentMedia.ENABLED?w?(p=a==null?void 0:a.video)==null?void 0:p.url:a==null?void 0:a.image:"";return n!=null&&n.sponsorLogo&&f?s.jsx(Ye,{sponsorLogo:n==null?void 0:n.sponsorLogo,webos:c,onClick:()=>I(!1)}):s.jsxs(J,{"data-a":"intr",className:"SL_InApp",onClick:$=>{c||t==null||t($)},"data-is-insight":i===d.QuestionType.FACTOID,"data-webos":c,children:[(n==null?void 0:n.sponsorLogo)&&s.jsx(Qe,{children:s.jsx(Z,{src:n==null?void 0:n.sponsorLogo})}),s.jsxs(X,{children:[s.jsxs($e,{children:[!b&&s.jsx(R,{src:ys,imageMode:_,withVideo:!!w,color:u}),b&&s.jsx(R,{src:b,imageMode:_,withVideo:!!w,color:u,useContentMedia:T,thumbnailUrl:(m=a==null?void 0:a.video)==null?void 0:m.thumbnailUrl}),s.jsx(Ue,{questionTypeData:r,questionType:i,title:ps,description:ms,imageMode:_,webos:c})]}),!c&&s.jsx(_e,{name:"chevronRight"}),c&&s.jsxs(Me,{children:[s.jsx(Fe,{webos:!0,"data-close-btn":"true",onClick:$=>{$.stopPropagation(),o==null||o($)},children:"Dismiss"}),s.jsx(We,{webos:!0,autoFocus:!0,onClick:t,children:"Answer"})]})]})]})},He=e.styled_default("div")({name:"NotificationContainer",class:"n11jcrxe",propsAsIs:!1}),O=e.styled_default("img")({name:"Icon",class:"i1vmpt6u",propsAsIs:!1}),Ge=e.styled_default("div")({name:"IconContainer",class:"i180665s",propsAsIs:!1}),Xe=()=>x.B1,Je=e.styled_default(Xe())({name:"TitleIcon",class:"t16zzzei",propsAsIs:!0}),Ze=()=>Y.y,st=e.styled_default(Ze())({name:"Close",class:"c1sur0q2",propsAsIs:!0}),et=e.styled_default("div")({name:"Body",class:"bai9j52",propsAsIs:!1}),tt=e.styled_default("div")({name:"Title",class:"t1bnt25p",propsAsIs:!1}),nt=e.styled_default("div")({name:"Description",class:"dmixjec",propsAsIs:!1}),ot=e.styled_default("button")({name:"Button",class:"b1ubkw1q",propsAsIs:!1}),it=({open:t,close:o,...i})=>{var n,a;return s.jsxs(He,{"data-a":"intr",onClick:()=>{t==null||t(),i&&i.markIstantOpen()},children:[s.jsxs(Ge,{children:[s.jsx(O,{className:"on-light",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png"}),s.jsx(O,{className:"on-dark",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"})]}),s.jsxs(et,{children:[s.jsxs(tt,{children:[s.jsx(Je,{name:"icon-trophy-solid"}),(n=i==null?void 0:i.titleCard)==null?void 0:n.title]}),s.jsxs(nt,{children:[s.jsx("span",{children:(a=i==null?void 0:i.titleCard)==null?void 0:a.subtitle}),s.jsx(ot,{name:"inapp-button",children:"Play Now"})]})]}),s.jsx(st,{close:u=>{u==null||u.stopPropagation(),o==null||o()}})]})},at=e.styled_default("div")({name:"Container",class:"cef8huz",propsAsIs:!1}),lt=()=>x.B1,dt=e.styled_default(lt())({name:"CheckIcon",class:"c1mo15kk",propsAsIs:!0}),rt=()=>x.B1,ct=e.styled_default(rt())({name:"PredictionIcon",class:"p16zkqnm",propsAsIs:!0}),ut=e.styled_default("div")({name:"PredictionIconContainer",class:"pjszi7a",propsAsIs:!1}),pt=e.styled_default("div")({name:"BodyContainer",class:"bftbmo3",propsAsIs:!1}),mt=e.styled_default("div")({name:"Body",class:"barrbyu",propsAsIs:!1}),yt=e.styled_default("div")({name:"Subtitle",class:"sz7237i",propsAsIs:!1}),xt=({step:t,children:o,answer:i,state:n="pending"})=>{const[a,u]=y.useState(0),[c]=y.useState(()=>new ResizeObserver(p=>{window.requestAnimationFrame(()=>{var m,f;u(((f=(m=p==null?void 0:p[0])==null?void 0:m.contentRect)==null?void 0:f.width)??0)})})),l=y.useCallback(p=>{p?c.observe(p):c.disconnect()},[c]);return y.useEffect(()=>()=>{c.disconnect()},[c]),s.jsxs(at,{children:[s.jsx(ut,{children:s.jsx(ct,{name:"icon-prediction"})}),s.jsx(pt,{style:{minWidth:`${a}px`},children:s.jsx(mt,{children:o},t)}),s.jsx(yt,{ref:l,className:n,children:s.jsxs("div",{children:[s.jsx(dt,{name:"icon-check"}),"Your Pick: ",i]})})]})},It=e.styled_default("div")({name:"Container",class:"ckyzolp",propsAsIs:!1}),L=e.styled_default("div")({name:"Line",class:"l16t1zr7",propsAsIs:!1}),ft=()=>L,jt=e.styled_default(ft())({name:"Line1",class:"le78kvg",propsAsIs:!0}),vt=()=>L,At=e.styled_default(vt())({name:"Line2",class:"l1o7966d",propsAsIs:!0}),ht=()=>L,$t=e.styled_default(ht())({name:"Line3",class:"lu9lyxq",propsAsIs:!0}),gt=()=>s.jsxs(It,{children:[s.jsx(jt,{children:s.jsx("div",{})}),s.jsx(At,{children:s.jsx("div",{})}),s.jsx($t,{children:s.jsx("div",{})})]}),_t=e.styled_default("div")({name:"Container",class:"c10jy6zf",propsAsIs:!1}),Tt=()=>x.B1,wt=e.styled_default(Tt())({name:"CheckIcon",class:"c1c7scay",propsAsIs:!0}),bt=()=>s.jsxs(_t,{children:[s.jsx(wt,{name:"icon-check"})," Prediction results are in!"]}),Ct=e.styled_default("div")({name:"Container",class:"cf6k2yy",propsAsIs:!1}),qt=e.styled_default("div")({name:"Caption",class:"c1c8xjus",propsAsIs:!1}),kt=e.styled_default("div")({name:"Title",class:"t1d1uekn",propsAsIs:!1}),Nt=({title:t})=>s.jsxs(Ct,{children:[s.jsx(qt,{children:"Results for"}),s.jsx(kt,{children:t})]}),es=e.styled_default("div")({name:"Container",class:"c181a1as",propsAsIs:!1}),ts=e.styled_default("div")({name:"Title",class:"t1cduox6",propsAsIs:!1}),St=()=>x.B1,ns=e.styled_default(St())({name:"CorrectIcon",class:"c1onrv6j",propsAsIs:!0}),Et=()=>ns,Lt=e.styled_default(Et())({name:"InCorrectIcon",class:"i17n9o7e",propsAsIs:!0}),Qt=()=>s.jsxs(es,{children:[s.jsxs(ts,{children:["Congratulations!",s.jsx("br",{}),"You answered correctly."]}),s.jsx(ns,{name:"icon-check"})]}),Dt=({title:t})=>s.jsxs(es,{children:[s.jsxs(ts,{children:["Better luck next time!",s.jsx("br",{}),"Correct: ",t]}),s.jsx(Lt,{name:"icon-cross"})]}),Bt=e.styled_default("div")({name:"Container",class:"cnxgcs2",propsAsIs:!1}),Mt=e.styled_default("div")({name:"Title",class:"t903f8n",propsAsIs:!1}),Rt=()=>x.B1,Ot=e.styled_default(Rt())({name:"CheckIcon",class:"ceyu3qj",propsAsIs:!0}),Pt=({points:t})=>s.jsxs(Bt,{children:[s.jsxs(Mt,{children:["You won ",s.jsx(fs.d,{delay:.5,prefix:"+",suffix:" points",value:t})]}),s.jsx(Ot,{name:"icon-trophy-solid"})]}),P=e.styled_default("div")({name:"Container",class:"cq3agu2",propsAsIs:!1}),z=e.styled_default("div")({name:"Body",class:"b16qj0do",propsAsIs:!1}),U={1:3e3,2:4e3,3:4e3,4:4e3},zt=({close:t,action:o,setStep:i,votedAnswer:n,correct:a,correctAnswerTitle:u,questionTitle:c,step:l})=>{if(y.useEffect(()=>{if(i){const m=setTimeout(()=>{U[l+1]&&(a||l<3)?i(l+1):t==null||t()},U[l]);return()=>{m&&clearTimeout(m)}}return()=>{}},[i,l,t,a]),l===1)return s.jsx(P,{children:s.jsx(z,{children:s.jsx(bt,{})})});let p="pending";return(l===3||l===4)&&(p=a?"correct":"incorrect"),s.jsx(P,{"data-a":"intr",onClick:()=>o==null?void 0:o(),children:s.jsxs(z,{children:[l!==1&&s.jsx(gt,{},l),s.jsxs(xt,{state:p,step:l,answer:(n==null?void 0:n.title)||"unknown",children:[l===2&&s.jsx(Nt,{title:c||"unknown"}),l===3&&a&&s.jsx(Qt,{}),l===3&&!a&&s.jsx(Dt,{title:u||"unknown"}),l===4&&s.jsx(Pt,{points:(n==null?void 0:n.points)||0})]})]})})},Ut=({close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:a,questionTitle:u})=>{const[c,l]=y.useState(1);return s.jsx(zt,{close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:a,questionTitle:u,setStep:l,step:c,title:""})},Vt=e.styled_default("div")({name:"NotificationContainer",class:"n1i4h28u",propsAsIs:!1}),Ft=t=>s.jsx(Vt,{children:s.jsx(Ut,{...t})}),Wt=e.styled_default("div")({name:"Container",class:"cwa9tgs",propsAsIs:!1}),Yt=e.styled_default("div")({name:"BodyContainer",class:"b1xx7swj",propsAsIs:!1}),Kt=e.styled_default("div")({name:"Body",class:"b1a21en",propsAsIs:!1}),Ht=({step:t,children:o,state:i="pending"})=>{const[n,a]=y.useState(0);return y.useEffect(()=>{const u=new ResizeObserver(c=>{window.requestAnimationFrame(()=>{var l,p;const m=((p=(l=c==null?void 0:c[0])==null?void 0:l.contentRect)==null?void 0:p.width)??0;a(m)})});return()=>{u.disconnect()}},[]),s.jsx(Wt,{style:{padding:`${t===3&&i==="incorrect"||t===1?"5px 100px":"5px 40px"}`},children:s.jsx(Yt,{style:{minWidth:`${n}px`},children:s.jsx(Kt,{children:o},t)})})},Gt=e.styled_default("div")({name:"Container",class:"c1nd5cu8",propsAsIs:!1}),Q=e.styled_default("div")({name:"Line",class:"lgbipw0",propsAsIs:!1}),Xt=()=>Q,Jt=e.styled_default(Xt())({name:"Line1",class:"l1anth16",propsAsIs:!0}),Zt=()=>Q,sn=e.styled_default(Zt())({name:"Line2",class:"l193yd7v",propsAsIs:!0}),en=()=>Q,tn=e.styled_default(en())({name:"Line3",class:"lhbflsp",propsAsIs:!0}),nn=()=>s.jsxs(Gt,{children:[s.jsx(Jt,{children:s.jsx("div",{})}),s.jsx(sn,{children:s.jsx("div",{})}),s.jsx(tn,{children:s.jsx("div",{})})]}),on=e.styled_default("div")({name:"Container",class:"c1lvd429",propsAsIs:!1}),an=()=>x.B1,ln=e.styled_default(an())({name:"PredictionIcon",class:"p1n4m87t",propsAsIs:!0}),dn=()=>s.jsxs(on,{children:[s.jsx(ln,{name:"icon-prediction"})," Prediction results are in!"]}),rn=()=>x.B1,cn=e.styled_default(rn())({name:"CheckIcon",class:"c126r8f9",propsAsIs:!0}),un=e.styled_default("div")({name:"Answer",class:"a1o2rpgl",propsAsIs:!1}),pn=e.styled_default("div")({name:"Container",class:"cej6ci1",propsAsIs:!1}),mn=e.styled_default("div")({name:"Title",class:"tob24mr",propsAsIs:!1}),yn=({title:t,answer:o})=>s.jsxs(pn,{children:[s.jsx(mn,{children:t}),s.jsxs(un,{children:[s.jsx(cn,{name:"icon-prediction"}),"Your Pick: ",o]})]}),os=e.styled_default("div")({name:"Container",class:"c1lesal4",propsAsIs:!1}),is=e.styled_default("div")({name:"Title",class:"tv66n4w",propsAsIs:!1}),xn=()=>x.B1,In=e.styled_default(xn())({name:"CorrectIcon",class:"cx0vlv2",propsAsIs:!0}),as=e.styled_default("div")({name:"Answer",class:"akfh4v5",propsAsIs:!1}),fn=({answer:t})=>s.jsxs(os,{children:[s.jsx(is,{children:"Congratulations! You answered correctly."}),s.jsxs(as,{children:[s.jsx(In,{name:"icon-correct"}),"Your Pick: ",t]})]}),jn=({title:t,answer:o})=>s.jsxs(os,{children:[s.jsxs(is,{children:["Better luck next time!",s.jsx("br",{}),"Correct: ",t]}),s.jsxs(as,{children:["Your Pick: ",o]})]}),V=e.styled_default("div")({name:"Container",class:"cmox3ot",propsAsIs:!1}),F=e.styled_default("div")({name:"Body",class:"bqq1ix4",propsAsIs:!1}),W={1:3e3,2:4e3,3:4e3},vn=({close:t,action:o,setStep:i,votedAnswer:n,correct:a,correctAnswerTitle:u,questionTitle:c,step:l})=>{if(y.useEffect(()=>{if(i){const m=setTimeout(()=>{W[l+1]&&(a||l<3)?i(l+1):t==null||t()},W[l]);return()=>{m&&clearTimeout(m)}}return()=>{}},[i,l,t,a]),l===1)return s.jsx(V,{children:s.jsx(F,{children:s.jsx(dn,{})})});let p="pending";return l===3&&(p=a?"correct":"incorrect"),s.jsx(V,{"data-a":"intr",onClick:()=>o==null?void 0:o(),children:s.jsxs(F,{children:[l!==1&&s.jsx(nn,{},l),s.jsxs(Ht,{state:p,step:l,children:[l===2&&s.jsx(yn,{title:c||"unknown",answer:(n==null?void 0:n.title)||"unknown"}),l===3&&a&&s.jsx(fn,{answer:(n==null?void 0:n.title)||"unknown"}),l===3&&!a&&s.jsx(jn,{title:u||"unknown",answer:(n==null?void 0:n.title)||"unknown"})]})]})})},An=({close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:a,questionTitle:u})=>{const[c,l]=y.useState(1);return s.jsx(vn,{close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:a,questionTitle:u,setStep:l,step:c,title:""})},ls=e.styled_default("div")({name:"NotificationContainer",class:"nn0nqh6",propsAsIs:!1}),hn=()=>({withoutPadding:t})=>t?"0px":"1rem",$n=e.styled_default("div")({name:"NotificationContent",class:"n1bcdf3j",propsAsIs:!1,vars:{"n1bcdf3j-0":[hn()]}}),ds=e.styled_default("img")({name:"LogoImg",class:"l8jorbq",propsAsIs:!1}),gn=()=>ls,_n=e.styled_default(gn())({name:"NotificationInterstitialContainer",class:"nf920y3",propsAsIs:!0}),Tn=e.styled_default("div")({name:"LogoImgContainer",class:"lzsmehn",propsAsIs:!1}),wn=({sponsorLogo:t,onClick:o})=>s.jsx(_n,{onClick:o,children:s.jsx($n,{withoutPadding:!0,children:s.jsx(ds,{src:t})})}),bn=t=>{var o,i,n,a,u;const[c,l]=y.useState(!1),p=y.useRef();return y.useEffect(()=>{var m;return(m=t==null?void 0:t.inApp)!=null&&m.sponsorLogo&&(l(!0),p.current=setTimeout(()=>{l(!1)},5e3)),()=>clearTimeout(p.current)},[(o=t==null?void 0:t.inApp)==null?void 0:o.sponsorLogo]),(i=t==null?void 0:t.inApp)!=null&&i.sponsorLogo&&c?s.jsx(wn,{sponsorLogo:(n=t.inApp)==null?void 0:n.sponsorLogo,onClick:()=>l(!1)}):s.jsx(ls,{children:s.jsxs("div",{children:[((a=t==null?void 0:t.inApp)==null?void 0:a.sponsorLogo)&&s.jsx(Tn,{children:s.jsx(ds,{src:(u=t==null?void 0:t.inApp)==null?void 0:u.sponsorLogo})}),s.jsx(An,{...t})]})})},rs=({sdk:t,webos:o})=>{var i,n,a,u,c,l,p,m;const[f]=y.useState(t.getNotificationsStore()),I=e.useStore(f),j=t.getFeature(d.SdkOverlayType.GAMES),r=y.useMemo(()=>t.getActiveNotification(),[t,I]);return y.useEffect(()=>{r&&Is.eventBus.emit("notification",{action:"rendered",payload:{questionId:r.data.questionId,questionType:r.data.questionType}})},[r]),r&&r.type===e.NotificationType.QUESTION_RESOLVED?r.data.question&&r.data.questionType===d.QuestionType.PREDICTION?r&&((i=r.data.inApp)==null?void 0:i.adUnit)===d.AdUnit.STANDART?s.jsx(bn,{action:r.action,close:r.close,...r.data.question,inApp:r.data.inApp}):s.jsx(Ft,{action:r.action,close:r.close,...r.data.question}):null:r&&r.type===e.NotificationType.ONBOARDING?r.data.onboarding?s.jsx(it,{open:j==null?void 0:j.openOnboarding,close:r.close,...r.data.onboarding}):null:r&&((n=r.data.inApp)==null?void 0:n.adUnit)===d.AdUnit.STANDART?s.jsx(Ke,{...r.data,action:r.action,close:r.close,color:((c=(u=(a=r==null?void 0:r.data)==null?void 0:a.inApp)==null?void 0:u.notification)==null?void 0:c.indicatorColor)||((m=(p=(l=r==null?void 0:r.data)==null?void 0:l.inApp)==null?void 0:p.appearance)==null?void 0:m.primaryColor),webos:o}):r&&s.jsx(oe,{...r.data,action:r.action})},Cn=({theme:t})=>{const o=C.B(),i=C.z(),n=C.F();return o&&(n.appNotification||n.onboardingNotification)?n.app&&!n.onboardingNotification?null:s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(xs.h,{customTheme:t??i.theme,themeMode:i.themeMode,children:s.jsx(rs,{sdk:o})})}):null};exports.D=Ss;exports.K=rs;exports.R=Es;exports.S=H;exports.StreamLayerSDKNotification=Cn;exports.r=K;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),e=require("./provider.js");require("nanostores");const i=require("react");require("lodash.throttle");require("react-dom");require("react-countup");const R=require("./vast-client.min-B0NUra1B.js"),_={},B=new R.ce,k=e.i(_),j=e.createLogger("ui:gam-static"),C=s=>new Promise((t,n)=>{const l=new Image;l.onload=()=>t(s),l.onerror=()=>n(),l.src=s}),L=()=>{const s=i.useRef(0);return[i.useCallback(async t=>{var n,l,r,p,c,u,y,d,h,x,A;if((n=k.get()[t])!=null&&n.imageSrc)return{success:!0};const f=Date.now();s.current=f,k.setKey(t,{id:"",url:t});try{e.eventBus.emit("exposedPauseAd",{action:"load",payload:{}});const m=await B.get(t);if(j.debug(m,"parsedVAST"),s.current===f&&k.get()[t].url){const o=m.ads.find(v=>v.creatives.length>0);if(o){j.debug(o,"validAd");const v=o.creatives.find(g=>g.type==="nonlinear");if(v){j.debug(v,"nonlinear");const g=(r=(l=v.variations)==null?void 0:l[0])==null?void 0:r.staticResource,E=(c=(p=v.variations)==null?void 0:p[0])==null?void 0:c.nonlinearClickThroughURLTemplate;if(g)return await C(g),k.setKey(t,{id:o.id||"",url:t,imageSrc:g,adUrl:E}),e.eventBus.emit("exposedPauseAd",{action:"loaded",payload:{id:o.id||""}}),{success:!0}}const P=o.creatives.find(g=>g.type==="companion");j.debug(P,"companion");const b=(h=(d=(y=(u=P==null?void 0:P.variations)==null?void 0:u[0])==null?void 0:y.staticResources)==null?void 0:d[0])==null?void 0:h.url,S=(A=(x=P==null?void 0:P.variations)==null?void 0:x[0])==null?void 0:A.companionClickThroughURLTemplate;if(b)return await C(b),k.setKey(t,{id:o.id||"",url:t,imageSrc:b,adUrl:S}),e.eventBus.emit("exposedPauseAd",{action:"loaded",payload:{id:o.id||""}}),{success:!0}}}}catch(m){console.error("Error parsing VAST",m)}return{success:!1}},[]),k]},D=e.styled_default("div")({name:"PauseAdOverlay",class:"pw9gih8",propsAsIs:!1}),I=e.styled_default("div")({name:"PauseAdContent",class:"p8lpomy",propsAsIs:!1}),U=e.styled_default("div")({name:"PauseAdTopLeft",class:"pv7u167",propsAsIs:!1}),q=e.styled_default("h2")({name:"PauseAdTitle",class:"p1kh2yb0",propsAsIs:!1}),M=e.styled_default("p")({name:"PauseAdCaption",class:"pl8f94x",propsAsIs:!1}),V=e.styled_default("div")({name:"PauseAdBottomLeft",class:"p1m6zmrt",propsAsIs:!1}),K=e.styled_default("button")({name:"PauseAdPlayButton",class:"pm3vwfa",propsAsIs:!1}),N=e.styled_default("div")({name:"PauseAdSidebarGradient",class:"p1tibuhw",propsAsIs:!1}),F=e.styled_default("div")({name:"PauseAdSidebar",class:"ptqqrqd",propsAsIs:!1}),$=e.styled_default("span")({name:"PauseAdTitleDescription",class:"p14estxv",propsAsIs:!1}),w=e.styled_default("img")({name:"ExternalAdContainer",class:"e1dpvfl1",propsAsIs:!1}),O=({vastUrl:s,isDesktop:t})=>{var n;const[,l]=L(),r=e.useStore(l,{keys:[s]});return i.useEffect(()=>{r&&r[s]&&r[s].imageSrc&&r[s].id&&e.eventBus.emit("exposedPauseAd",{action:"rendered",payload:{id:r[s].id}})},[r,s]),(n=r==null?void 0:r[s])!=null&&n.imageSrc?!r[s].adUrl||!t?a.jsx(w,{src:r[s].imageSrc}):a.jsx("a",{onClick:()=>{e.eventBus.emit("exposedPauseAd",{action:"navigated",payload:{id:r[s].id}})},href:r[s].adUrl,target:"_blank",rel:"noopener noreferrer",children:a.jsx(w,{src:r[s].imageSrc})}):null},z=({isClosing:s,title:t,caption:n,onPlay:l,onClose:r,vastUrl:p,options:c,isDesktop:u})=>{const y=(c==null?void 0:c.showPauseButton)??!0,{ref:d,focusSelf:h}=e.distExports.useFocusable({focusKey:"sl-pause-ad-play",onEnterRelease:l,isFocusBoundary:!0,forceFocus:!0});return i.useEffect(()=>{d.current&&h()},[d,h]),i.useEffect(()=>{if(!r)return()=>{};const x=A=>{const f=A.keyCode;if(f===461||f===10009||f===27||f===8){A.preventDefault(),A.stopPropagation(),A.stopImmediatePropagation(),r();return}};return window.addEventListener("keydown",x,{capture:!0}),()=>window.removeEventListener("keydown",x,{capture:!0})},[r]),a.jsx(D,{className:e.cx_default("SL_PauseAdOverlay",s&&"pause-ad-closing"),children:a.jsxs(I,{children:[a.jsxs(U,{children:[a.jsx(q,{children:t}),a.jsx(M,{children:n})]}),y&&a.jsx(V,{children:a.jsx(K,{ref:d,onClick:l,onMouseEnter:()=>d.current.focus(),"aria-label":"Resume playback"})}),a.jsx(N,{className:"SL_PauseAdSidebar",children:a.jsxs(F,{children:[p&&a.jsx(O,{isDesktop:u,vastUrl:p}),a.jsx($,{children:"ADVERTISEMENT"})]})})]})})},G=({showPauseAd:s,vastUrls:t,title:n,caption:l,sdk:r,onClose:p,onRender:c,options:u,isDesktop:y})=>{const d=(u==null?void 0:u.pauseAdDelay)??5e3,[h,x]=i.useState(!1),[A,f]=i.useState(!1),m=i.useRef(),o=t==null?void 0:t[0].url,v=i.useRef(o);v.current=o;const[P,b]=L(),S=i.useCallback(()=>{p&&(e.eventBus.emit("exposedPauseAd",{action:"closed",payload:{}}),p())},[p]),g=i.useCallback(()=>{r.controlVideoPlayer({play:!0})},[r]);return i.useEffect(()=>{if(s&&o){e.eventBus.emit("exposedPauseAd",{action:"enabled",payload:{}}),P(o).then(T=>{v.current===o&&(T==null?void 0:T.success)!==!0&&(clearTimeout(m.current),S==null||S())}).catch(()=>{v.current===o&&(clearTimeout(m.current),S==null||S())});const E=()=>{const T=b.get()[v.current];T!=null&&T.imageSrc?(clearTimeout(m.current),f(!1),x(!0)):m.current=setTimeout(()=>{E()},200)};m.current=setTimeout(()=>{E()},d)}else e.eventBus.emit("exposedPauseAd",{action:"disabled",payload:{}}),f(!0),m.current=setTimeout(()=>{x(!1)},400);return()=>{m.current&&clearTimeout(m.current)}},[b,P,S,d,s,o]),i.useEffect(()=>{c==null||c({rendered:h})},[h,c]),i.useEffect(()=>()=>{c==null||c({rendered:!1})},[c]),h?a.jsx(z,{onClose:S,isClosing:A,title:n,caption:l,onPlay:g,vastUrl:o,options:u,isDesktop:y}):null},J=({showPauseAd:s,pauseAdVastUrl:t,videoPlayerController:n,onRenderPauseAd:l,onClosePauseAd:r,children:p,options:c})=>{const u=e.useStreamLayer(),y=e.useStreamLayerTheme(),d=i.useRef();return i.useEffect(()=>u?(n&&(d.current=n,u.addVideoPlayerController(d.current)),()=>{d.current&&u.removeVideoPlayerController(d.current)}):()=>{},[u,n]),u?a.jsx("div",{className:"StreamLayerSDK",children:a.jsxs(e.h,{style:p?{position:"relative"}:{},customTheme:y.theme,themeMode:y.themeMode,children:[p,t&&a.jsx(G,{sdk:u,showPauseAd:s,vastUrls:t,onClose:r,onRender:l,options:c,isDesktop:!0})]})}):p};class Q extends i.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){console.error(t,n.componentStack)}render(){return this.state.hasError?this.props.children:a.jsx(J,{...this.props})}}exports.StreamLayerPauseAd=Q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),L=require("./index7.js"),v=require("./sl-types.js"),I=require("./index11.js"),n=require("react"),P=require("./index3.js"),q=require("./vast-client.min.js"),U=require("./index-DSi8Qgfs.js"),R=require("./hooks-B0Qttldg.js"),K={},F=new q._,T=U.i(K),C=P.createLogger("ui:gam-static"),_=e=>new Promise((s,a)=>{const i=new Image;i.onload=()=>s(e),i.onerror=()=>a(),i.src=e}),D=()=>{const e=n.useRef(0);return[n.useCallback(async s=>{var a,i,t,p,d,l,h,u,A,S,g;if((a=T.get()[s])!=null&&a.imageSrc)return{success:!0};const y=Date.now();e.current=y,T.setKey(s,{id:"",url:s});try{P.eventBus.emit("exposedPauseAd",{action:"load",payload:{}});const m=await F.get(s);if(C.debug(m,"parsedVAST"),e.current===y&&T.get()[s].url){const o=m.ads.find(f=>f.creatives.length>0);if(o){C.debug(o,"validAd");const f=o.creatives.find(c=>c.type==="nonlinear");if(f){C.debug(f,"nonlinear");const c=(t=(i=f.variations)==null?void 0:i[0])==null?void 0:t.staticResource,E=(d=(p=f.variations)==null?void 0:p[0])==null?void 0:d.nonlinearClickThroughURLTemplate;if(c)return await _(c),T.setKey(s,{id:o.id||"",url:s,imageSrc:c,adUrl:E}),P.eventBus.emit("exposedPauseAd",{action:"loaded",payload:{id:o.id||""}}),{success:!0}}const x=o.creatives.find(c=>c.type==="companion");C.debug(x,"companion");const k=(A=(u=(h=(l=x==null?void 0:x.variations)==null?void 0:l[0])==null?void 0:h.staticResources)==null?void 0:u[0])==null?void 0:A.url,j=(g=(S=x==null?void 0:x.variations)==null?void 0:S[0])==null?void 0:g.companionClickThroughURLTemplate;if(k)return await _(k),T.setKey(s,{id:o.id||"",url:s,imageSrc:k,adUrl:j}),P.eventBus.emit("exposedPauseAd",{action:"loaded",payload:{id:o.id||""}}),{success:!0}}}}catch(m){console.error("Error parsing VAST",m)}return{success:!1}},[]),T]},M=v.styled_default("div")({name:"PauseAdOverlay",class:"pw9gih8",propsAsIs:!1}),V=v.styled_default("div")({name:"PauseAdContent",class:"p8lpomy",propsAsIs:!1}),N=v.styled_default("div")({name:"PauseAdTopLeft",class:"pv7u167",propsAsIs:!1}),O=v.styled_default("h2")({name:"PauseAdTitle",class:"p1kh2yb0",propsAsIs:!1}),Q=v.styled_default("p")({name:"PauseAdCaption",class:"pl8f94x",propsAsIs:!1}),$=v.styled_default("div")({name:"PauseAdBottomLeft",class:"p1m6zmrt",propsAsIs:!1}),z=v.styled_default("button")({name:"PauseAdPlayButton",class:"pm3vwfa",propsAsIs:!1}),G=v.styled_default("div")({name:"PauseAdSidebarGradient",class:"p1tibuhw",propsAsIs:!1}),W=v.styled_default("div")({name:"PauseAdSidebar",class:"ptqqrqd",propsAsIs:!1}),H=v.styled_default("span")({name:"PauseAdTitleDescription",class:"p14estxv",propsAsIs:!1}),B=v.styled_default("img")({name:"ExternalAdContainer",class:"e1dpvfl1",propsAsIs:!1}),J=({vastUrl:e,isDesktop:s})=>{var a;const[,i]=D(),t=v.useStore(i,{keys:[e]});return n.useEffect(()=>{t&&t[e]&&t[e].imageSrc&&t[e].id&&P.eventBus.emit("exposedPauseAd",{action:"rendered",payload:{id:t[e].id}})},[t,e]),(a=t==null?void 0:t[e])!=null&&a.imageSrc?!t[e].adUrl||!s?r.jsx(B,{src:t[e].imageSrc}):r.jsx("a",{onClick:()=>{P.eventBus.emit("exposedPauseAd",{action:"navigated",payload:{id:t[e].id}})},href:t[e].adUrl,target:"_blank",rel:"noopener noreferrer",children:r.jsx(B,{src:t[e].imageSrc})}):null},X=({isClosing:e,title:s,caption:a,onPlay:i,onClose:t,vastUrl:p,options:d,isDesktop:l})=>{const h=(d==null?void 0:d.showPauseButton)??!0,{ref:u,focusSelf:A}=I.distExports.useFocusable({focusKey:"sl-pause-ad-play",onEnterRelease:i,isFocusBoundary:!0,forceFocus:!0});return n.useEffect(()=>{u.current&&A()},[u,A]),n.useEffect(()=>{if(!t)return()=>{};const S=g=>{const y=g.keyCode;if(y===461||y===10009||y===27||y===8){g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation(),t();return}};return window.addEventListener("keydown",S,{capture:!0}),()=>window.removeEventListener("keydown",S,{capture:!0})},[t]),r.jsx(M,{className:v.cx_default("SL_PauseAdOverlay",e&&"pause-ad-closing"),children:r.jsxs(V,{children:[r.jsxs(N,{children:[r.jsx(O,{children:s}),r.jsx(Q,{children:a})]}),h&&r.jsx($,{children:r.jsx(z,{ref:u,onClick:i,onMouseEnter:()=>u.current.focus(),"aria-label":"Resume playback"})}),r.jsx(G,{className:"SL_PauseAdSidebar",children:r.jsxs(W,{children:[p&&r.jsx(J,{isDesktop:l,vastUrl:p}),r.jsx(H,{children:"ADVERTISEMENT"})]})})]})})},Y=({showPauseAd:e,vastUrls:s,title:a,caption:i,sdk:t,onClose:p,onRender:d,options:l,isDesktop:h})=>{const u=(l==null?void 0:l.pauseAdDelay)??5e3,[A,S]=n.useState(!1),[g,y]=n.useState(!1),m=n.useRef(),o=s==null?void 0:s[0].url,f=n.useRef(o),x=n.useRef("");f.current=o;const[k,j]=D(),c=n.useCallback(()=>{p&&(x.current=f.current,P.eventBus.emit("exposedPauseAd",{action:"closed",payload:{}}),p())},[p]),E=n.useCallback(()=>{t.controlVideoPlayer({play:!0})},[t]);return n.useEffect(()=>{if(e&&o){P.eventBus.emit("exposedPauseAd",{action:"enabled",payload:{}}),k(o).then(b=>{f.current===o&&(b==null?void 0:b.success)!==!0&&(clearTimeout(m.current),c==null||c())}).catch(()=>{f.current===o&&(clearTimeout(m.current),c==null||c())});const w=()=>{const b=j.get()[f.current];b!=null&&b.imageSrc?(clearTimeout(m.current),y(!1),S(!0)):m.current=setTimeout(()=>{w()},200)};m.current=setTimeout(()=>{w()},u)}else x.current!==f.current&&(x.current="",P.eventBus.emit("exposedPauseAd",{action:"disabled",payload:{}})),y(!0),m.current=setTimeout(()=>{S(!1)},400);return()=>{m.current&&clearTimeout(m.current)}},[j,k,c,u,e,o]),n.useEffect(()=>{d==null||d({rendered:A})},[A,d]),n.useEffect(()=>()=>{d==null||d({rendered:!1})},[d]),A?r.jsx(X,{onClose:c,isClosing:g,title:a,caption:i,onPlay:E,vastUrl:o,options:l,isDesktop:h}):null},Z=({showPauseAd:e,pauseAdVastUrl:s,videoPlayerController:a,onRenderPauseAd:i,onClosePauseAd:t,children:p,options:d})=>{const l=R.B(),h=R.z(),u=n.useRef();return n.useEffect(()=>l?(a&&(u.current=a,l.addVideoPlayerController(u.current)),()=>{u.current&&l.removeVideoPlayerController(u.current)}):()=>{},[l,a]),l?r.jsx("div",{className:"StreamLayerSDK",children:r.jsxs(L.h,{style:p?{position:"relative"}:{},customTheme:h.theme,themeMode:h.themeMode,children:[p,s&&r.jsx(Y,{sdk:l,showPauseAd:e,vastUrls:s,onClose:t,onRender:i,options:d,isDesktop:!0})]})}):p};class ee extends n.Component{constructor(s){super(s),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(s,a){console.error(s,a.componentStack)}render(){return this.state.hasError?this.props.children:r.jsx(Z,{...this.props})}}exports.StreamLayerPauseAd=ee;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),u=require("react"),e=require("./provider.js");require("nanostores");require("lodash.throttle");require("react-dom");require("react-countup");const c=require("./useStreamLayerApp2.js"),d=e.styled_default("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),p=e.styled_default("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),m=()=>e.B1,y=e.styled_default(m())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),S=e.styled_default("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),v=e.styled_default("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),h=e.styled_default("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),f=({points:t,onClick:r})=>s.jsxs(d,{className:e.m,onClick:r,children:[s.jsx(p,{children:s.jsx(y,{name:"icon-trophy-solid"})}),s.jsxs(S,{children:[s.jsx(v,{children:"Total points"}),s.jsx(h,{children:s.jsx(e.d,{value:t})})]})]}),j=({gamification:t})=>{const r=t.userSummary.$store,[a,l]=u.useState(0);return u.useEffect(()=>{const n=r.subscribe(i=>{var o;(o=i==null?void 0:i.summary)!=null&&o.points&&l(i.summary.points)});return()=>{n()}},[r]),s.jsx(f,{points:a,onClick:()=>{const n=t.status.get();n===e.FeatureStatus.Suspended?(t.openFeature(),e.eventBus.emit("app",{action:"open",payload:{}}),e.eventBus.emit("interactions",{action:"tap",payload:{}})):n===e.FeatureStatus.Ready&&(t.closeFeature(!1),e.eventBus.emit("app",{action:"close",payload:{}}),e.eventBus.emit("interactions",{action:"tap",payload:{}}))}})},x=({sdk:t})=>{if(!e.useStore(t.featuresList.getStore()))return null;const r=t.getFeature(c.SdkOverlayType.GAMES);return r?s.jsx(j,{gamification:r}):null},g=({theme:t})=>{const r=e.useStreamLayer(),a=e.useStreamLayerTheme();return r?s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(e.h,{customTheme:t??a.theme,themeMode:a.themeMode,children:s.jsx(x,{sdk:r})})}):null};exports.StreamLayerSDKPoints=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("./index7.js"),u=require("react"),n=require("./sl-types.js"),r=require("./index3.js"),m=require("./index4.js"),y=require("./index5.js"),S=require("./useStreamLayerApp2.js"),c=require("./hooks-B0Qttldg.js"),x=n.styled_default("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),h=n.styled_default("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),v=()=>y.B1,f=n.styled_default(v())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),j=n.styled_default("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),g=n.styled_default("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),q=n.styled_default("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),P=({points:s,onClick:t})=>e.jsxs(x,{className:d.m,onClick:t,children:[e.jsx(h,{children:e.jsx(f,{name:"icon-trophy-solid"})}),e.jsxs(j,{children:[e.jsx(g,{children:"Total points"}),e.jsx(q,{children:e.jsx(m.d,{value:s})})]})]}),b=({gamification:s})=>{const t=s.userSummary.$store,[a,p]=u.useState(0);return u.useEffect(()=>{const o=t.subscribe(i=>{var l;(l=i==null?void 0:i.summary)!=null&&l.points&&p(i.summary.points)});return()=>{o()}},[t]),e.jsx(P,{points:a,onClick:()=>{const o=s.status.get();o===r.FeatureStatus.Suspended?(s.openFeature(),r.eventBus.emit("app",{action:"open",payload:{}}),r.eventBus.emit("interactions",{action:"tap",payload:{}})):o===r.FeatureStatus.Ready&&(s.closeFeature(!1),r.eventBus.emit("app",{action:"close",payload:{}}),r.eventBus.emit("interactions",{action:"tap",payload:{}}))}})},k=({sdk:s})=>{if(!n.useStore(s.featuresList.getStore()))return null;const t=s.getFeature(S.SdkOverlayType.GAMES);return t?e.jsx(b,{gamification:t}):null},A=({theme:s})=>{const t=c.B(),a=c.z();return t?e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(d.h,{customTheme:s??a.theme,themeMode:a.themeMode,children:e.jsx(k,{sdk:t})})}):null};exports.StreamLayerSDKPoints=A;
@@ -0,0 +1,15 @@
1
+ "use strict";const s=require("react"),g=require("nanostores");var y=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),r={},a=[];t.forEach(n=>{(n?n.split(" "):[]).forEach(o=>{if(o.startsWith("atm_")){const[,f]=o.split("_");r[f]=o}else a.push(o)})});const i=[];for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&i.push(r[n]);return i.push(...a),i.join(" ")},m=y;const v={BLUE_QUESTION_ACTION_BTN:"#1589ee",WHITE:"#FFFFFF",BLUE:"#2d6ffd",GREY_PRIMARY:"#909395",GREY_PRIMARY_ONBOARDING_INAPP:"#B5B7B8",PRIMARY_1:"#1D7BFF",PRIMARY_2:"#095CD1",PRIMARY_TEXT:"#090E13",SECONDARY_TEXT:"rgba(10, 14, 19, 0.70)",QUESTION_TYPE_ICON:"#1D7BFF",QUESTION_BODY_TEXT:"#090E13",PRESENTED_BY_TEXT:"#090E13",SUCCESS:"#107D57",UNSUCCESS:"#DF2F3B",SECONDARY_RED1:"#DF2F3B",NEUTRALS_WHITE:"#FFFFFF",NEUTRALS_WHITE1:"#FFFFFF",NEUTRALS_GRAY1:"#F7F7F7",NEUTRALS_GRAY2:"#F2F2F1",NEUTRALS_GRAY3:"#E8E8E8",NEUTRALS_GRAY4:"#D9D9D6",NEUTRALS_GRAY5:"#B1B3B3",NEUTRALS_GRAY6:"#888B8D",NEUTRALS_GRAY7:"#6B6F73",NEUTRALS_GRAY9:"#25282A",SDK_CONTAINER_BG:"#F7F7F7",SDK_WHITE_CONTAINER_BG:"#fff",SDK_DARK_CONTAINER_BG:"#fff",SDK_PREDICTION_RESULT_SUCCESS_BG:"#fff",SDK_PREDICTION_RESULT_INCORRECT_BG:"#fff",SDK_PREDICTION_RESULT_SUCCESS_TEXT:"#107D57",SDK_PREDICTION_RESULT_ERROR_TITLE:"#090E13",SDK_PREDICTION_RESULT_ERROR_SUBTITLE:"#DF2F3B",SDK_PREDICTION_RESULT_CLOSE_ICON:"#6B6F73",SDK_PREDICTION_FEEDBACK_SUCCESS_ICON:"#107D57",SDK_PREDICTION_FEEDBACK_INCORRECT_RECT1:"#CD2525",SDK_PREDICTION_FEEDBACK_INCORRECT_RECT2:"#fff",PREDICTION_BG_LINES_CORRECT:"#01AB58",PREDICTION_BG_LINES_INCORRECT:"#888B8D",SKELETON_COLOR_1:"#f1efef",SKELETON_COLOR_2:"#f9f8f8",TABS_CONTAINER_BG:"#F2F2F1",TABS_ACTIVE_BG:"#FFFFFF",TABS_COLOR:"#6B6F73",TABS_ACTIVE_COLOR:"#1D7BFF",CARD_BG:"#FFFFFF",CARD_BORDER:"#fff",BORDER:"#E8E8E8",VOTE_BTN_BG:"#F7F7F7",VOTE_BTN_BORDER:"rgb(232, 232, 232)",VOTE_BTN_DISABLED_BORDER:"#B1B3B3",VOTE_BTN_SELECTED_BORDER:"#25282A",VOTE_BTN_NOT_SELECTED_BORDER:"#E8E8E8",VOTE_BTN_SELECTED_BG:"#FFFFFF",VOTE_BTN_SELECTED_BG_AD_UNIT:"#FFFFFF",VOTE_BTN_NOT_SELECTED_BG:"#FFFFFF",VOTE_BTN_NOT_SELECTED_BG_UNSET:"rgb(196, 196, 196)",VOTED_ANSWER_BG:"#FFFFFF",VOTED_BTN_RCT_BG:"#2d5694",IN_APP_BG:"rgba(255, 255, 255, 0.90)",IN_APP_QUESTION_TYPE_ICON:"#1D7BFF",IN_APP_QUESTION_TYPE_LABEL:"#82899E",IN_APP_QUESTION_QUOTE:"rgba(10, 14, 19, 0.70)",IN_APP_QUESTION_RESULT_SUBTITLE_BG:"#1D7BFF",IN_APP_QUESTION_RESULT_LINE:"#babfc5",QUOTE_BORDER:"#E8E8E8",QUOTE_TEXT:"rgba(10, 14, 19, 0.70)"},P={BG_PRIMARY:"#13212b",BG_SECONDARY:"#152430",BG_SECONDARY1:"#435059",BORDER_PRIMARY:"rgba(255, 255, 255, 0.1)",TEXT_PRIMARY:"#f9f9f9",TEXT_PRIMARY1:"#f9f9f9",TEXT_SECONDARY:"rgba(255, 255, 255, 0.8)",TEXT_SECONDARY1:"#878787",WHITE:"#fff"},L=["#107D57","#DF2F3B","#DF2F3B","#E8E8E8"],x="#cee5de",U="#f9d6d8",b="#E8E8E8",k={xs:324,sm:576,md:768,lg:992,xl:1200,xxl:1440};Object.entries(v).reduce((e,[t,r])=>`
2
+ ${e}
3
+ --color-${t.toLowerCase().replaceAll("_","-")}: ${r};
4
+ `,"");Object.entries(P).reduce((e,[t,r])=>`
5
+ ${e}
6
+ --color-adv-${t.toLowerCase().replaceAll("_","-")}: ${r};
7
+ `,"");function w(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var G=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,R=w(function(e){return G.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Y=e=>e.toUpperCase()===e,V=e=>t=>e.indexOf(t)===-1,A=(e,t)=>{const r={};return Object.keys(e).filter(V(t)).forEach(a=>{r[a]=e[a]}),r};function M(e,t,r){const a=A(t,r);if(!e){const i=typeof R=="function"?{default:R}:R;Object.keys(a).forEach(n=>{i.default(n)||delete a[n]})}return a}var K=(e,t)=>{};function H(e){let t="";return r=>{const a=(n,c)=>{const{as:o=e,class:f=t}=n,D=r.propsAsIs===void 0?!(typeof o=="string"&&o.indexOf("-")===-1&&!Y(o[0])):r.propsAsIs,l=M(D,n,["as","class"]);l.ref=c,l.className=r.atomic?m(r.class,l.className||f):m(l.className||f,r.class);const{vars:d}=r;if(d){const _={};for(const u in d){const N=d[u],T=N[0],B=N[1]||"",h=typeof T=="function"?T(n):T;K(h,r.name),_[`--${u}`]=`${h}${B}`}const O=l.style||{},F=Object.keys(O);F.length>0&&F.forEach(u=>{_[u]=O[u]}),l.style=_}return e.__wyw_meta&&e!==o?(l.as=o,s.createElement(e,l)):s.createElement(o,l)},i=s.forwardRef?s.forwardRef(a):n=>{const c=A(n,["innerRef"]);return a(c,n.innerRef)};return i.displayName=r.name,i.__wyw_meta={className:r.class||t,extends:e},i}}var X=H,C={exports:{}},I={};/**
8
+ * @license React
9
+ * use-sync-external-store-shim.production.js
10
+ *
11
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */var E=s;function Q(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $=typeof Object.is=="function"?Object.is:Q,j=E.useState,W=E.useEffect,z=E.useLayoutEffect,q=E.useDebugValue;function Z(e,t){var r=t(),a=j({inst:{value:r,getSnapshot:t}}),i=a[0].inst,n=a[1];return z(function(){i.value=r,i.getSnapshot=t,S(i)&&n({inst:i})},[e,r,t]),W(function(){return S(i)&&n({inst:i}),e(function(){S(i)&&n({inst:i})})},[e]),q(r),r}function S(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!$(e,r)}catch{return!0}}function J(e,t){return t()}var ee=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?J:Z;I.useSyncExternalStore=E.useSyncExternalStore!==void 0?E.useSyncExternalStore:ee;C.exports=I;var te=C.exports;const p=(e,t)=>r=>{e.current!==r&&(e.current=r,t())};function re(e,{keys:t,deps:r=[e,t]}={}){const a=s.useRef();a.current=e.get();const i=s.useCallback(c=>(p(a,c)(e.value),(t==null?void 0:t.length)>0?g.listenKeys(e,t,p(a,c)):e.listen(p(a,c))),r),n=()=>a.current;return s.useSyncExternalStore?s.useSyncExternalStore(i,n,n):te.useSyncExternalStore(i,n,n)}const ne=re,ae=()=>[!1,e=>{window.requestAnimationFrame(()=>e())}],ie=s.useTransition||ae;exports.NotificationType=void 0;(function(e){e[e.ONBOARDING=1]="ONBOARDING",e[e.QUESTION=2]="QUESTION",e[e.QUESTION_RESOLVED=3]="QUESTION_RESOLVED"})(exports.NotificationType||(exports.NotificationType={}));exports.A=k;exports.I=L;exports.N=U;exports.O=x;exports.S=b;exports.cx_default=m;exports.styled_default=X;exports.useStore=ne;exports.useTransition=ie;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useStreamLayerApp2.js");require("react");exports.useStreamLayerApp=e.useStreamLayerApp;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useStreamLayerApp2.js");exports.useStreamLayerApp=e.$;