"use strict";(self.webpackChunkbongacams=self.webpackChunkbongacams||[]).push([[77],{16164:function(e,t,n){var a=n(15215),o=n(62614),r=n(50172),i=n(26616),s=n(11402),l=n(9853),u=n(12957),c=n(22706),d=n(46017),h=n(73424),p=n(8546),f=function(e){function t(t){var n=e.call(this,t)||this;return n.caretStart=null,n.caretEnd=null,n.inFocus=!1,n.forceBlurUpdate=!1,n.handleInput=function(e){var t=n.props,a=t.value,o=t.onInput,r=e.target,i=r.value;null==a&&""===i||a===i||o(e),n.isIE&&n.inFocus&&r.value&&"number"==typeof r.selectionStart&&(n.caretStart=r.selectionStart,n.caretEnd=r.selectionEnd)},n.handleChange=function(e){(0,n.props.onChange)(e)},n.handleFocus=function(e){var t=n.props.onFocus;if(n.inFocus=!0,n.setState({inFocus:!0}),n.isIE){var a=e.target;n.caretStart=a.selectionStart,n.caretEnd=a.selectionEnd}window.requestAnimationFrame((function(){n.props.selectOnClick&&e.target.select()})),t(e)},n.handleBlur=function(e){n.inFocus=!1,n.setState({inFocus:!1}),n.isIE&&(n.forceBlurUpdate=!0,n.caretStart=null,n.caretEnd=null),(0,n.props.onBlur)(e)},n.isTextarea=function(){return[d.A.TEXTAREA,d.A.TEXT_AREA].includes(n.props.type)},n.textareaRef=function(e){return n.textareaEL=e},n.inputRef=function(e){return n.inputEL=e},n.inputWrapRef=function(e){return n.inputWrapEl=e},n.getRemindCount=function(){var e=n.props,t=e.maxLength,a=e.value,o=t-String(a).length;return o>=0?"".concat(o," ").concat(__("characters left")):"".concat(-o," ").concat(__("characters exceeded"))},n.renderLabel=function(){var e=n.props,t=e.label,a=e.labelRequired,r="string"==typeof t?t:o.w.renderToString(t);return a&&(r='*'.concat(r)),r},n.fieldId=t.id||"".concat((0,s.q2)(t.name),"_").concat(l.o8.rangeInt()),n.isIE=Boolean(c.BrowserDetect.detectIE()),n.state={inFocus:!1},n}return(0,a.C6)(t,e),t.prototype.componentDidMount=function(){var e=this.props.isFocusOnMount,t=this.inputEL;e&&t&&(t.focus(),this.setState({inFocus:!0}))},t.prototype.componentDidUpdate=function(e,t){this.isIE&&this.textareaEL&&null!==this.caretStart&&null!==this.caretEnd&&this.textareaEL.setSelectionRange(this.caretStart,this.caretEnd),this.ieSetPlaceholder()},t.prototype.shouldComponentUpdate=function(e,t){return this.isIE?this.forceBlurUpdate?(this.forceBlurUpdate=!1,!0):this.props.value!==e.value||this.props.error!==e.error||this.props.type!==e.type:!((0,h.b)(e,this.props)&&(0,h.b)(t,this.state))},Object.defineProperty(t.prototype,"element",{get:function(){return this.inputEL||this.textareaEL},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataAttrs",{get:function(){var e={};return(0,u.loopv)(this.props.data,(function(t,n){return e["data-".concat(n)]=t})),e},enumerable:!1,configurable:!0}),t.prototype.ieSetPlaceholder=function(){var e=this,t=this.props,n=t.placeholder,a=t.value;this.isIE&&setTimeout((function(){e.textareaEL&&n&&!a&&(e.textareaEL.textContent=n,e.textareaEL.value="")}),0)},t.prototype.render=function(){var e,t,n,o,i,s,l,u,c,h=this.props,f=h.type,m=h.name,b=h.rows,v=h.cols,_=h.label,E=h.children,C=h.placeholder,T=h.autoComplete,w=h.required,g=h.disabled,y=h.iconLeft,I=h.readonly,A=h.isFocusOnMount,B=h.onKeyDown,F=h.onKeyPress,R=h.onKeyUp,S=this.props,x=S.value,L=S.error,N=S.success,M=S.className,D=S.maxLength,O=S.labelWrapClassName,k=S.labelClassName,K=S.inputClassName,P=S.inputInnerClassName,U=S.inputWrapClassName,q=S.textAreaClassName,H=S.textAreaInnerClassName,W=S.errorClassName,X=this.props,j=X.isShowLimit,G=X.isShowLimitFocus,V=X.isShowLimitOnFocus,z=X.onClick,J=X.onChange,Q=this.state.inFocus;if(!d.A.isInputType(f))return null;var Y=E&&E.length>0,Z=this.isTextarea();return(0,r.h)("div",{className:(0,p.n)((e={bcf_row:!0,__focused:Q},e[M]=Boolean(M),e)),onClick:z,"data-anchor":m},Boolean(_)&&(0,r.h)("div",{className:(0,p.n)((t={bcf_label_wrp:!0},t[O]=Boolean(O),t))},(0,r.h)("label",{className:(0,p.n)((n={bcf_label:!0,__required:w},n[k]=Boolean(k),n)),htmlFor:this.fieldId,dangerouslySetInnerHTML:{__html:this.renderLabel()}})),(0,r.h)("div",{ref:this.inputWrapRef,className:(0,p.n)((o={bcf_input_wrp:!0,__error:L,__success:!L&&N,__icon_left:Y&&y,__textarea:Z,__focused:Q,__disabled:g,bcf_icon_input:Y},o[U]=Boolean(U),o))},(0,r.h)("div",{className:(0,p.n)((i={bcf_input_block:!0,__focused:Q},i[K]=Boolean(K),i))},!Z&&(0,r.h)("input",(0,a.Cl)({ref:this.inputRef,className:(0,p.n)((s={bcf_control:!0,__error:L},s[P]=Boolean(P),s)),key:this.fieldId,value:x,type:f||d.A.TEXT,id:this.fieldId,name:m,placeholder:C,autoComplete:T,maxLength:D,noValidate:!0,disabled:g,readOnly:I,required:w,autoFocus:A,onChange:J,onInput:this.handleInput,onKeyDown:B,onKeyPress:F,onKeyUp:R,onFocus:this.handleFocus,onBlur:this.handleBlur},this.dataAttrs)),Z&&(0,r.h)("div",{className:(0,p.n)((l={bcf_textarea_wrp:!0},l[q]=Boolean(q),l))},(0,r.h)("textarea",(0,a.Cl)({className:(0,p.n)((u={"bcf_control __textarea":!0,__error:L},u[H]=Boolean(H),u)),key:this.fieldId,ref:this.textareaRef,value:x,rows:b,cols:v,id:this.fieldId,name:m,placeholder:C,disabled:g,readOnly:I,required:w,autoFocus:A,onChange:this.handleChange,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:B,onKeyPress:F,onKeyUp:R},this.dataAttrs))),E),(j||G||V&&Q)&&(0,r.h)("div",{className:(0,p.n)({notifier:!0,too_long:String(x).length>D,__hidden:G&&!Q})},this.getRemindCount()),L&&(0,r.h)("div",{className:(0,p.n)((c={form_errors_in_row:!0},c[W]=Boolean(W),c))},(0,r.h)("div",{className:"form_error"},L))))},t.defaultProps={name:"",type:d.A.TEXT,className:"",autoComplete:"off",iconLeft:!1,autoHeight:!1,selectOnClick:!1,isShowLimit:!1,labelRequired:!1,isShowLimitFocus:!1,isFocusOnMount:!1,isShowLimitOnFocus:!1,onClick:i.noop,onChange:i.noop,onInput:i.noop,onKeyDown:i.noop,onKeyPress:i.noop,onKeyUp:i.noop,onBlur:i.noop,onFocus:i.noop},t}(r.uA);t.A=f},12341:function(e,t,n){var a;n.d(t,{B:function(){return a},U:function(){return o}}),function(e){e.MINI_PROFILE="miniProfile",e.PROFILE="profile",e.STREAM="stream"}(a||(a={}));var o=function(){function e(){this.broadcastChannelIsAvailable="BroadcastChannel"in window,this.broadcastChannelIsAvailable&&(this.channel=new BroadcastChannel("socialProfilesChannel"),this.channel.addEventListener("message",this.broadcastChannelEventHandler.bind(this))),this.handlers={}}return Object.defineProperty(e,"instance",{get:function(){return this._instance||(this._instance=new this),this._instance},enumerable:!1,configurable:!0}),e.prototype.setHandler=function(e,t){var n;this.handlers[e]=null!==(n=this.handlers[e])&&void 0!==n?n:[],this.handlers[e].push(t)},e.prototype.removeHandler=function(e,t){this.handlers[e]=this.handlers[e].filter((function(e){return e!==t}))},e.prototype.sendMessage=function(e){this.broadcastChannelIsAvailable&&this.channel.postMessage(e)},e.prototype.broadcastChannelEventHandler=function(e){this.handlers[e.data.target]&&this.handlers[e.data.target].forEach((function(t){return t(e.data)}))},e}()},2241:function(e,t,n){n.d(t,{iC:function(){return s},KI:function(){return i},WD:function(){return l}});var a=n(67356),o=n(80554),r=n(17402),i=function(e){var t=e.boostTimeLeft,n=e.timeToEnableFreeRaise,i=e.isFreeRiseAvailable,s=e.onRaiseModelSocketMessage,l=e.onBoostTimeEnd,u=e.onFreeRiseAvailable,c=(0,r.useRef)({fanBoostEndDate:null,fanBoostTimeout:null,nextAvailableRaiseModelDate:null,nextAvailableRaiseModelTimeout:null}),d=(0,r.useCallback)((function(e){var t=Date.now(),n=0,a=c.current,o=a.fanBoostTimeout,r=a.fanBoostEndDate;e&&!r?(n=e,c.current.fanBoostEndDate=t+n):r&&(n=r-t),o&&window.clearTimeout(o),c.current.fanBoostTimeout=window.setTimeout((function(){if(c.current.fanBoostTimeout=null,c.current.fanBoostEndDate=null,l){l({boostTimeLeft:0})}}),Math.max(n,0))}),[l]),h=(0,r.useCallback)((function(e){var t=Date.now(),n=0,a=c.current,o=a.nextAvailableRaiseModelDate,r=a.nextAvailableRaiseModelTimeout;e&&!o?(n=1e3*e,c.current.nextAvailableRaiseModelDate=t+n):o&&(n=o-t),r&&window.clearTimeout(r),c.current.nextAvailableRaiseModelTimeout=window.setTimeout((function(){if(c.current.nextAvailableRaiseModelDate=null,c.current.nextAvailableRaiseModelTimeout=null,u){u({isFreeRiseAvailable:!0,nextAvailableBoostTimestamp:0,timeToEnable:0})}}),Math.max(n,0))}),[u]),p=(0,r.useCallback)((function(e){var t=e.detail;if("rm"===t.type){var n=1e3*a.r,o={boostTimeLeft:n,isFreeRiseAvailable:!1,nextAvailableBoostTimestamp:Date.now()+1e3*t.timeout,timeToEnable:t.timeout};s&&s(t,o),d(n),h(t.timeout)}}),[d,h,s]);(0,r.useEffect)((function(){return document.addEventListener(o.R.SOCKET_NOTIFICATION_MESSAGE,p),function(){document.removeEventListener(o.R.SOCKET_NOTIFICATION_MESSAGE,p)}}),[p]),(0,r.useEffect)((function(){t&&d(t)}),[t,d]),(0,r.useEffect)((function(){!i&&n&&h(n)}),[n,h,i])},s=1e3,l=function(e){var t=e.boostTimeout,n=(0,r.useState)(function(e){if(!e)return 0;var t=(new Date).getTime()-e.serverTime*s;return e.timeToEnable*s-t}(t)),a=n[0],o=n[1],i=(0,r.useRef)(0);return(0,r.useEffect)((function(){a>0&&!i.current&&(i.current=window.setInterval((function(){o((function(e){var t=e-s;return t<=0?0:t}))}),s)),0===a&&i.current&&(window.clearInterval(i.current),i.current=0)}),[a]),{states:{freeRiseTimeoutState:a}}}}}]);