"use strict";(("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__=("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__||[]).push([[19949,67846,82240,59413],{45461:(e,t,i)=>{i.r(t),i.d(t,{Flip:()=>m,default:()=>g});var n=i(51721),a=i(64572),o=i(67294),r=i(45697),d=i.n(r),l=i(71893);const c="undefined"==typeof window,s=e=>o.isValidElement(e)?s(e.props.children):e;let m=function(e){function t(...t){var i;return i=e.call.apply(e,[this].concat(t))||this,(0,a.Z)(i,"state",{characterHeight:0}),(0,a.Z)(i,"element",null),(0,a.Z)(i,"nextTick",null),(0,a.Z)(i,"setRef",(e=>{i.element=e})),(0,a.Z)(i,"renderCharacterRibbon",(({activeCharacter:e,key:t})=>{const{ribbon:n,isDisabled:a}=i.props,{characterHeight:r}=i.state,d=n.indexOf(e);return d>=0?o.createElement(h,{key:t,characterIndex:d,characterHeight:r,isDisabled:a},n.map(((e,i)=>o.createElement(f,{key:`${t}-${i}`,characterHeight:r},e)))):o.createElement(p,{key:t},o.createElement(f,null,e))})),(0,a.Z)(i,"getCharacterHeight",(()=>{if(i.element&&!c){const e=window.getComputedStyle(i.element)["line-height"].replace("px","");i.setState({characterHeight:Number(e)})}})),(0,a.Z)(i,"handleResize",(()=>{i.getCharacterHeight()})),i}(0,n.Z)(t,e);var i=t.prototype;return i.componentDidMount=function(){c||(window.addEventListener("resize",this.handleResize),this.nextTick=setTimeout((()=>{this.getCharacterHeight()})))},i.componentWillUnmount=function(){c||window.removeEventListener("resize",this.handleResize),clearTimeout(this.nextTick)},i.render=function(){const{children:e}=this.props,{characterHeight:t}=this.state,i=o.isValidElement(e),n=i?s(e).split(""):e.split(""),a=o.createElement(u,{ref:this.setRef,characterHeight:t},n.map(((e,t)=>this.renderCharacterRibbon({activeCharacter:e,key:t}))));return i?o.cloneElement(e,{children:a}):a},t}(o.PureComponent);m.propTypes={children:d().node.isRequired,ribbon:d().array,isDisabled:d().bool},m.defaultProps={ribbon:["0","1","2","3","4","5","6","7","8","9"],isDisabled:!1};const u=l.default.div.attrs((({characterHeight:e})=>({style:{height:`${e}px`}}))).withConfig({displayName:"Flip__StyledFlip",componentId:"sc-1yrqnx2-0"})(["overflow-y:hidden;"]),p=l.default.div.withConfig({displayName:"Flip__Separator",componentId:"sc-1yrqnx2-1"})(["display:inline-block;"]),h=l.default.div.attrs((({characterIndex:e=0,characterHeight:t=0,isDisabled:i})=>({style:{transform:`translateY(-${e*t}px)`,transition:i?"initial":"transform 0.7s"}}))).withConfig({displayName:"Flip__Ribbon",componentId:"sc-1yrqnx2-2"})(["display:inline-block;position:relative;vertical-align:top;text-align:center;"]),f=l.default.div.attrs((({characterHeight:e})=>({style:{height:`${e}px`}}))).withConfig({displayName:"Flip__Character",componentId:"sc-1yrqnx2-3"})([""]),g=m},3009:(e,t,i)=>{i.r(t),i.d(t,{LiveStreamEarnings:()=>m,default:()=>p});var n=i(51721),a=i(64572),o=i(67294),r=i(45697),d=i.n(r),l=i(71893),c=i(24725),s=i(88024);let m=function(e){function t(...t){var i;return i=e.call.apply(e,[this].concat(t))||this,(0,a.Z)(i,"openGiftLeaderboard",(()=>{const{openModal:e}=i.props;e({id:"LiveStreamGiftLeaderboard"})})),i}return(0,n.Z)(t,e),t.prototype.render=function(){const{giftDiamondCount:e,viewDiamondCount:t,karaokeDiamondCount:i,showDiamondCount:n}=this.props,a=e+t+i+n;return o.createElement(u,{"data-element_id":s.G1.LiveStream.ButtonGiftLeaderboard,onClick:this.openGiftLeaderboard},o.createElement(c.default,{giftDiamondCount:a}))},t}(o.PureComponent);m.propTypes={giftDiamondCount:d().number,viewDiamondCount:d().number,karaokeDiamondCount:d().number,showDiamondCount:d().number,openModal:d().func},m.defaultProps={giftDiamondCount:0,viewDiamondCount:0,karaokeDiamondCount:0,showDiamondCount:0,openModal:()=>null};const u=l.default.div.withConfig({displayName:"LiveStreamEarnings__StyledLiveStreamEarnings",componentId:"sc-sqr3x2-0"})([""]),p=m},24725:(e,t,i)=>{i.r(t),i.d(t,{LiveStreamGiftDiamond:()=>p,default:()=>I});var n=i(51721),a=i(67294),o=i(45697),r=i.n(o),d=i(71893),l=i(36241),c=i(53826),s=i(54264),m=i(45461),u=i(87759);let p=function(e){function t(){return e.apply(this,arguments)||this}return(0,n.Z)(t,e),t.prototype.render=function(){const{giftDiamondCount:e}=this.props;return a.createElement(h,null,a.createElement(y,null,a.createElement(v,{src:s,alt:"diamond icon"}),null===e&&a.createElement(f,null,a.createElement(D,{src:u})),null!==e&&a.createElement(g,null,a.createElement(m.default,null,(0,c.Z)({number:e})),a.createElement(C,{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIj4KICAgIDxwYXRoIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDBEMkJFIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik05IDExTDQgNiA5IDEiIHRyYW5zZm9ybT0ibWF0cml4KC0xIDAgMCAxIDEzIDApIi8+Cjwvc3ZnPgo=","aria-hidden":!0}))))},t}(a.PureComponent);p.propTypes={giftDiamondCount:r().number},p.defaultProps={giftDiamondCount:0};const h=d.default.div.withConfig({displayName:"LiveStreamGiftDiamond__StyledLiveStreamGiftDiamond",componentId:"sc-1q9nrcx-0"})(["width:auto;padding:0 12px;height:24px;border-radius:12px;display:inline-flex;justify-content:center;flex-direction:column;align-items:start;color:",";font-size:12px;font-weight:500;background-color:rgba(35,35,35,0.4);cursor:pointer;"],l.zP.primary),f=d.default.div.withConfig({displayName:"LiveStreamGiftDiamond__DiamondLoader",componentId:"sc-1q9nrcx-1"})(["position:relative;img{width:16px;height:16px;}"]),g=d.default.div.withConfig({displayName:"LiveStreamGiftDiamond__GiftDiamondWrapper",componentId:"sc-1q9nrcx-2"})(["display:flex;align-items:center;line-height:1;"]),v=d.default.img.withConfig({displayName:"LiveStreamGiftDiamond__DiamondIcon",componentId:"sc-1q9nrcx-3"})(["margin-right:2px;width:auto;height:16px;"]),C=d.default.img.withConfig({displayName:"LiveStreamGiftDiamond__ArrowRightIcon",componentId:"sc-1q9nrcx-4"})(["width:auto;height:8px;margin-left:4px;"]),D=d.default.img.withConfig({displayName:"LiveStreamGiftDiamond__LoadingIcon",componentId:"sc-1q9nrcx-5"})([""]),y=d.default.div.withConfig({displayName:"LiveStreamGiftDiamond__GiftDiamond",componentId:"sc-1q9nrcx-6"})(["display:flex;height:16px;"]),I=p},77462:(e,t,i)=>{i.r(t),i.d(t,{default:()=>d});var n=i(45007),a=i(8852),o=i(5471),r=i(3009);const d=(0,n.$j)((function(e,{streamId:t}){return{giftDiamondCount:(0,o.ZP)(e,[t,"diamondCount"],"gift"),viewDiamondCount:(0,o.ZP)(e,[t,"diamondCount"],"view"),karaokeDiamondCount:(0,o.ZP)(e,[t,"diamondCount"],"karaoke"),showDiamondCount:(0,o.ZP)(e,[t,"diamondCount"],"show")}}),(function(e){return{openModal:({id:t})=>e((0,a.default)({id:t,isHigherThanAll:!0,transitionStatus:"coming"}))}}))(r.default)},53826:(e,t,i)=>{i.d(t,{Z:()=>n});const n=({number:e})=>{if(isNaN(e)||null===e)return null;const t=e.toString();if(t.includes(".")){const[e,i=""]=t.split(".");return[e.replace(/\B(?=(\d{3})+(?!\d))/g,","),i].join(".")}return t.replace(/\B(?=(\d{3})+(?!\d))/g,",")}},95110:(e,t,i)=>{i.d(t,{Z:()=>o});var n=i(15785),a=i(43393);const o=(0,i(78392).Z)(((e,t=[])=>e.getIn(["goals"].concat((0,n.Z)(t)))),((e,t,i)=>i),((e,t="")=>{let i=e;if(t&&(i=null==e?void 0:e.get(t),"currentGoalLevel"===t)){const t=(null==e?void 0:e.get("progress"))||0,n=(null==e?void 0:e.get("levels").toJS())||[];(null==n?void 0:n.length)>0&&(i=n.find((e=>t<(null==e?void 0:e.target)))||void 0)}return i instanceof a.Collection?i.toJS():i}))(((e,t,i)=>`${t.join(":")}:${i}`))},5471:(e,t,i)=>{i.d(t,{NS:()=>m,ZP:()=>h,hK:()=>p,ml:()=>u});var n=i(15785),a=i(43393),o=i(78392),r=i(66813),d=i(95110),l=i(42362);const c=[],s=(0,o.Z)(((e,t=c)=>e.getIn(["liveStream"].concat((0,n.Z)(t)))),((e,t,i)=>i),((e,t="")=>{let i=e;return t&&(i=null==e?void 0:e.get(t)),i instanceof a.Collection?i.toJS():i}))(((e,t=c,i="")=>`${t.join(":")}:${i}`)),m=(0,o.Z)(((e,t)=>s(e,[t,"groupPrivate"],"status")),((e,t)=>(0,r.Z)(e,["liveStream","paid",t],"isPrivateStreamUnlocked")),((e,t)=>{const i=s(e,[t,"groupPrivate"],"lastId");return!!(0,d.Z)(e,[i],"agreed")}),((e,t,i)=>e===l.SA.COOLDOWN&&t&&i))(((e,t)=>t)),u=(0,o.Z)(((e,t)=>s(e,[t,"groupPrivate"],"status")),((e,t)=>(0,r.Z)(e,["liveStream","paid",t],"isPrivateStreamUnlocked")),((e,t)=>e===l.SA.CONSIDERING&&!t))(((e,t)=>t)),p=(0,o.Z)(((e,t)=>s(e,[t,"groupPrivate"],"status")),((e,t)=>(0,r.Z)(e,["liveStream","paid",t],"isPrivateStreamUnlocked")),((e,t)=>e===l.SA.CONSIDERING&&t))(((e,t)=>t)),h=s},87759:(e,t,i)=>{e.exports=i.p+"static/img/img-loading-dark-20.3e983295.svg"},54264:(e,t,i)=>{e.exports=i.p+"static/img/point_2.29bbdc80.svg"}}]);
//# sourceMappingURL=container-LiveStreamEarnings-js.a4829576.js.map