PageSourceSearch

https://www.ourlove.com/app/f595baa3c237b089.js

js ourlove.com collected 2026-10-04 09:11:52 UTC 61,561 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="04ba15c2-012c-55ee-9c2d-454f673449c2")}catch(e){}}();
3(self.webpackChunkclient=self.webpackChunkclient||[]).push([["2352"],{57500(e){"use strict";e.exports=function e(s,t){if(s===t)return!0;if(s&&t&&"object"==typeof s&&"object"==typeof t){if(s.constructor!==t.constructor)return!1;if(Array.isArray(s)){if((a=s.length)!=t.length)return!1;for(n=a;0!=n--;)if(!e(s[n],t[n]))return!1;return!0}if(s.constructor===RegExp)return s.source===t.source&&s.flags===t.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===t.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===t.toString();if((a=(r=Object.keys(s)).length)!==Object.keys(t).length)return!1;for(n=a;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,r[n]))return!1;for(n=a;0!=n--;){var a,n,r,i=r[n];if(!e(s[i],t[i]))return!1}return!0}return s!=s&&t!=t}},47643(e,s,t){"use strict";var a=t(82780);function n(){}function r(){}r.resetWarningCache=n,e.exports=function(){function e(e,s,t,n,r,i){if(i!==a){var o=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function s(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:s,element:e,elementType:e,instanceOf:s,node:e,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:n};return t.PropTypes=t,t}},73799(e,s,t){e.exports=t(47643)()},82780(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},50329(e,s){"use strict";var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment");s.jsx=function(e,s,a){var n=null;if(void 0!==a&&(n=""+a),void 0!==s.key&&(n=""+s.key),"key"in s)for(var r in a={},s)"key"!==r&&(a[r]=s[r]);else a=s;return{$$typeof:t,type:e,key:n,ref:void 0!==(s=a.ref)?s:null,props:a}}},17961(e,s,t){"use strict";e.exports=t(50329)},95259(e,s,t){"use strict";t.d(s,{Sticker:()=>k});var a=t(42062),n=t(6801),r=t(78675),i=t(66691),o=t(91994),d=t(15526),l=t(28138),c=t(15654),p=t(36580),u=t(50846),h=t(30495),m=t(79942),g=t(38020),f=t(64998);class b extends u.Q{constructor(e){super("dialogs.stickers.animations-resources-availability",e,e=>{var s=h.jI.shared().augment("X-Client"),t=h.jI.shared().augment("X-Client-Version"),a=h.jI.shared().augment("X-Client-Instance");return(0,g.ff)({protocol:"https",host:h.jI.shared().getBaseHost().replace("//","")},e,{method:"HEAD",headers:Object.assign({authorization:f.a.shared().getAAF(),"user-agent":h.jI.shared().augment("user-agent"),"x-facility":h.jI.shared().augment("x-facility")},s?{"X-Client":s}:void 0,t?{"X-Client-Version":t}:void 0,a?{"X-Client-Instance":a}:void 0)}).pipe((0,m.vV)(e=>({data:{available:200===e.status},ttl:Number.MAX_SAFE_INTEGER})))})}}b.shared=(0,d.G)(e=>new b(e));var v=t(10621);class y{constructor(e){this.availableCache={},this.userId=e}available(e){return this.availableCache[e]||(this.availableCache[e]=b.shared(this.userId).data(e).pipe((0,l.T)(e=>e.available),(0,c.F)(v.L),(0,p.t)({refCount:!0,bufferSize:1}))),this.availableCache[e].toSingle()}}y.shared=(0,d.G)(e=>new y(e));var x=t(39971),S=t(99027),M=t(60144),j=t(31085);let C=(0,a.memo)(e=>{var{imageSrc:s,animationSrc:t,className:a,onError:n}=e;return t?(0,j.jsxs)("video",{className:a,autoPlay:!0,playsInline:!0,loop:!0,muted:!0,poster:s,onError:n,children:[(0,j.jsx)("source",{src:t+".mp4",type:'video/mp4; codecs="hvc1"'}),(0,j.jsx)("source",{src:t+".webm",type:'video/webm; codecs="vp9"'}),(0,j.jsx)("img",{className:a,src:s})]}):(0,j.jsx)(M.$,{src:s,className:a,onError:n})});var T=t(13866),I=["userId","basename","imageSrc","animationSrc","messageId","messageTimestamp","stickerInMetaIsMissing"],R=(0,a.memo)(e=>{var{userId:s,basename:t,imageSrc:n,animationSrc:r,messageId:i,messageTimestamp:o,stickerInMetaIsMissing:d}=e,l=function(e,s){if(null==e)return{};var t={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(s.includes(a))continue;t[a]=e[a]}return t}(e,I),c=(0,a.useRef)(!1);(0,a.useEffect)(()=>{s&&d&&!c.current&&i&&(T.S.shared(s).logMessageStickerMetaMissing({basename:t,messageId:i,messageTimestamp:o}),c.current=!0)},[s,t,i,o,d]);var p=(0,a.useCallback)(e=>{var a=e.currentTarget;s&&i&&(a instanceof HTMLImageElement&&a.complete&&0===a.naturalWi
3dth||a instanceof HTMLVideoElement&&a.error)&&T.S.shared(s).logMessageStickerLoadFailed({basename:t,src:r||n,messageId:i,messageTimestamp:o})},[s,t,n,r,i,o]);return(0,j.jsx)(C,Object.assign({},l,{imageSrc:n,animationSrc:r,onError:p}))}),k=(0,a.memo)(e=>{var{image:s,className:t,animation:d,basename:l,fallbackSrc:c,messageId:p,messageTimestamp:u}=e,h=(0,o.w)(),g=(0,i.GG)(()=>{if(!h||c)return x.v.just(void 0);if(s||d)return x.v.just({image:s,animation:d});var e=(0,S.bO)(l),t=(0,S.ZC)(l);return y.shared(h).available(t+".mp4").pipe((0,m.vV)(s=>s?{image:e,animation:t}:{image:e,animation:void 0}))},[h,l,s,d,c]),f=(0,a.useMemo)(()=>c||(0,n.o)((null==g?void 0:g.image)||(0,S.bO)(l),r.T.shared().sharding),[g,l,c]),b=(0,a.useMemo)(()=>null!=g&&g.animation?(0,n.o)(g.animation,r.T.shared().sharding):void 0,[g]),v=!s&&!d;return(0,j.jsx)(R,{imageSrc:f,animationSrc:b,className:t,userId:h,basename:l,stickerInMetaIsMissing:v,messageId:p,messageTimestamp:u})})},93515(e,s,t){"use strict";t.d(s,{ChatCheersMenu:()=>I});var a,n=t(30973),r=t(42062),i=t(97156),o=t(75841),d=t(12468),l=t(84190),c=t(97033),p=t(66691),u=t(85186),h=t(96650),m=t(68989),g=t(98153),f=t(31085),b=["userId","attendeeId","onSend","visible","tapeCheers","userIsFeaturedMember","placement"],v=t(14321),y=t(91994),x=t(52118),S=t(39971),M=t(80375),j=t(44150),C=t(64805),T=(a=d.e,(0,r.memo)(e=>{var s=(0,r.useRef)(!1),{userId:t,attendeeId:n,onSend:i,visible:o,tapeCheers:d,userIsFeaturedMember:l,placement:v}=e,y=function(e,s){if(null==e)return{};var t={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(s.includes(a))continue;t[a]=e[a]}return t}(e,b),x=(0,p.J2)(()=>h.j.shared().tab,[]),S=(0,m.a)({placement:v});(0,r.useEffect)(()=>{d&&(d.length>0?g.A.emit("event.chat.cheers.rendered",n):0===d.length&&l&&g.A.emit("event.chat.cheers.freem.limit.rendered",n))},[n,d,l]);var M=(0,r.useCallback)(function(){for(var e=arguments.length,s=Array(e),a=0;a<e;a++)s[a]=arguments[a];i(...s);var[r]=s;if(!r.disabled){var o=Array.isArray(d)&&d.findIndex(e=>e.reference===r.reference)+1||void 0;u._.shared(t).logCheerClicked(r,n,o)}},[n,i,d,t]);return(0,r.useEffect)(()=>{t&&n&&x&&(S&&!s.current?(s.current=!0,c.C.shared(t).logCheersTapeCollapsedToTab(n)):!S&&s.current&&(s.current=!1,c.C.shared(t).logCheersTapeUncollapsedFromTab(n)))},[S,n,t,x]),o?(0,f.jsx)(a,Object.assign({},y,{placement:v,attendeeId:n,onSend:M,tapeCheers:d})):null})),I=(0,r.memo)(e=>{var{id:s,forceOpen:t,open:a,send:d}=e,c=(0,y.w)(),u=(0,r.useMemo)(()=>new i.t(""),[]),h=(0,r.useCallback)(e=>{u.next(e)},[u]),m=(0,p.J2)(()=>j.$.shared(s).cheersSet("common",{promotedCheer:!0}),[s]),b=(0,p.J2)(()=>c?C.n.shared(c).available:(0,o.of)(void 0),[c]),[I,R,k]=(0,n.j)({attendeeId:s}),N=(0,r.useMemo)(()=>I.filter(e=>e.selected).map(e=>e.name),[I]),P=(0,p.J2)(()=>c?j.$.shared(s).cheersSet():(0,o.of)([]),[c,s],[]),w=(0,p.J2)(()=>c?u.asObservable().pipe((0,l.n)(e=>e||N.length?M.V.shared(c).cheersSet({attendeeId:s,searchQuery:e,filters:N}):(0,o.of)(void 0))):(0,o.of)(void 0),[c,u,N,s]),O=null!=w?w:P,E=(0,r.useCallback)(e=>{null==a||a(e),e||k()},[a,k]),L=(0,p.J2)(()=>c?v.f.shared(c).userIsFeaturedMember:(0,o.of)(void 0),[c]),A=(0,p.uN)((e,t)=>d?new S.v(a=>{d(e,s,t),a.success(void 0)}):(0,x.G)(e,s,t),[s,d]),D=void 0!==L&&c&&m&&m.length>0&&P&&P.length>0&&!b;return(0,r.useEffect)(()=>{g.A.emit("event.chat-cheers-menu.visible",D),g.A.emit("chat-cheers-menu.visible",D)},[D]),(0,r.useEffect)(()=>()=>{g.A.emit("event.chat-cheers-menu.visible",!1),g.A.emit("chat-cheers-menu.visible",!0)},[]),c?(0,f.jsx)(T,{userId:c,attendeeId:s,forceOpen:t,onSend:A,toggler:E,tapeCheers:m,listCheers:O,placement:"chat",visible:D,userIsFeaturedMember:L,onSearch:h,searchFilters:I,onSearchFilterChange:R}):null})},77468(e,s,t){"use strict";t.d(s,{PresentsAnimation:()=>u});var a=t(42062),n=t(99870),r=t.n(n),i=t(31085),o=(0,a.memo)(e=>{var{cheerAnimationSrc:s,iframeProps:t,onLoad:n,onFinish:o,onError:d,loopKey:l}=e,[c,p]=(0,a.useState)(!1),u=(0,a.useCallback)(()=>{c||p(!0),n&&n()},[c,n]),h=(0,a.useMemo)(()=>r()(!c&&"presents-animation__hidden"),[c]);(0,a.useLayoutEffect)(()=>{function e(e){o&&((null==e?void 0:e.data)==="animation_ended"||(null==e?void 0:e.data)==="3d_animation_ended")?o():(null==e?void 0:e.data)==="iframe_body_is_shown"&&p(!0)}return addEventListener("message",e),()=>{removeEventListener("message",e)}},[o]);var m=(0,a.useCallback)(()=>{d&&d()},[d]);return(0,i.jsx)("iframe",Object.assign({width:"100%",height:"100%",allow:"autoplay; encrypted-media"},t,{src:s,scrolling:"no",onLoad:u,onError:m,className:h}),l)}),d=t(99027),l=t(44290),c=t(66691),p=t(78675),u=(0,a.memo)(e=>{var{cheerName:s,iframeProps:t,loopAnimation:n,onFinish:r,onLoad:u,onError:h}=e,[m,g]=(0,a.useState)(0),f=p.T.shared().presents.host,b=(0,c.J2)(()=>l.k.shared().has(s),[s]),v=(0,a.useMemo)(()=>""+f+(0,d.H6)(s)+"?v=202403",[s,f]),y=(0,a.useCallback)(()=>{n&&g(Date.now()),null==r||r()},[r,n]);return b?(0,i.jsx)(o,{cheerAnimationSrc:v,loopKey:m,iframeProps:t,onLoad:u,onFinish:y,onError:h}):null})},71251(e,s,t){"use strict";t.d(s,{d:()=>r});var a=t(43751),n=t(79760),r=e=>{a.Y.shared().get(n.A).actions.open("bonus-cheer-sending-failure",[{props:{requiredBonuses:e},spinnerEnabled:!0}])}},96575(e,s,t){"use strict";t.d(s,{Ay:()=>r,OX:()=>a.O});var a=t(98191),n=t(37181).A;let r={store:t(28015).A,actions:n}},28993(e,s,t){"use strict";t.d(s,{n_:()=>a.n});var a=t(57918);t(91402),t(81490)},39011(e,s,t){"use strict";t.d(s,{d:()=>j});var a=t(42062),n=t(73799),r=t.n(n),i=t(98621),o=t.n(i),d=t(15526),l=t
3(48830),c=t(43751),p=t(79760),u=t(91885);class h{constructor(){this.pickMedia=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new l.c(s=>{if("new"!==e.mode)return void s.error("not-implemented");var t=c.Y.shared().get(p.A,null);return t.actions.open("media-picker",[{props:Object.assign({},e,{onComplete:e=>{if(!e){s.next(u.Q.failure("canceled")),s.complete();return}var t=new FileReader;t.onload=t=>{s.next(u.Q.success({uri:t.target.result,mediaType:e.type.startsWith("image")?"photo":"video",type:e.type})),s.complete()},t.readAsDataURL(e)}})}]),()=>{var e=t.store.getState();e&&"media-picker"===e.name&&t.actions.close()}})}}}h.shared=(0,d.G)(()=>new h);var m=t(96575),g=t(4088),f=t(45482),b=t(56177),v=t(4440),y=t(17961);function x(e,s,t,a,n,r,i){try{var o=e[r](i),d=o.value}catch(e){return void t(e)}o.done?s(d):Promise.resolve(d).then(a,n)}function S(e){return function(){var s=this,t=arguments;return new Promise(function(a,n){var r=e.apply(s,t);function i(e){x(r,a,n,i,o,"next",e)}function o(e){x(r,a,n,i,o,"throw",e)}i(void 0)})}}class M extends a.Component{constructor(e){var s;super(e),s=this,this.resendMedia=e=>{var s=this.flux.get(g.Ay,(0,g.OX)(this.props.identity,this.props.attendee)).store.getState().messages.find(s=>s.tag===e);s&&s.meta.localSource&&this.flux.get(m.Ay,(0,m.OX)(this.props.identity,this.props.attendee)).actions.send(s.meta.localSource,e)},this.sendMediaWithMode=function(){var e=S(function*(e,t){if(!(yield f.Session.shared().userIsUsingDemoMode.pipe((0,b.s)(1)).toPromise())||(yield v.V.shared().updateCredentials().toPromise()).isSuccessful)try{var a=yield h.shared().pickMedia({mode:void 0===e?"any":e,mediaType:t||"any",attendeeId:s.props.attendee}).toPromise();if(!a.isSuccessful)return;s.flux.get(m.Ay,(0,m.OX)(s.props.identity,s.props.attendee)).actions.send(a.value)}catch(e){}});return function(s,t){return e.apply(this,arguments)}}(),this.sendVoiceMessage=e=>{var s=e.split("/").pop();c.Y.shared().get(m.Ay,(0,m.OX)(this.props.identity,this.props.attendee)).actions.send({uri:e,name:s,type:"audio/mp4",mimeType:"audio/mp4"})},this.sendNewMedia=function(){var e=S(function*(e){yield s.sendMediaWithMode("new",e)});return function(s){return e.apply(this,arguments)}}(),this.sendMedia=S(function*(){yield s.sendMediaWithMode("any")}),this.sendLibraryMedia=function(){var e=S(function*(e){yield s.sendMediaWithMode("device",e)});return function(s){return e.apply(this,arguments)}}(),this.flux=c.Y.shared(),this.bus=this.props.bus||new(o())}componentDidMount(){this.bus.addListener("command.messages.log.resend-media",this.resendMedia),this.bus.addListener("command.messages.form.send-media",this.sendMediaWithMode),this.bus.addListener("command.messages.form.send-new-media",this.sendNewMedia),this.bus.addListener("command.messages.form.send-library-media",this.sendLibraryMedia)}componentWillUnmount(){this.bus.removeListener("command.messages.log.resend-media",this.resendMedia),this.bus.removeListener("command.messages.form.send-media",this.sendMediaWithMode),this.bus.removeListener("command.messages.form.send-new-media",this.sendNewMedia),this.bus.removeListener("command.messages.form.send-library-media",this.sendLibraryMedia)}render(){var{children:e}=this.props;return a.cloneElement(a.Children.only(e),{bus:this.bus,onSendVoiceMessageButtonPress:this.sendVoiceMessage,onSendNewMediaButtonPress:this.sendNewMedia,onSendMediaButtonPress:this.sendMedia,onSendLibraryMediaButtonPress:this.sendLibraryMedia})}}function j(e){var s=(s,t)=>(0,y.jsx)(M,{bus:s.bus,identity:s.userId,attendee:s.attendeeId,children:(0,y.jsx)(e,Object.assign({},s,{ref:t}))});return"function"==typeof a.forwardRef?a.forwardRef(s):s}M.displayName="dialogs.usermedia.media-sender",M.propTypes={identity:r().string.isRequired,attendee:r().string.isRequired,bus:r().object}},67190(e,s,t){"use strict";t.r(s),t.d(s,{default:()=>S,withMessageSending:()=>M});var a=t(42062),n=t(73799),r=t.n(n),i=t(98621),o=t.n(i),d=t(49844),l=t(34677),c=t(74923),p=t(40961),u=t(27888),h=t(66691),m=t(43751),g=t(91654),f=t(45482),b=t(4440),v=t(75841),y=t(17961);class x extends a.Component{constructor(e){var s;super(e),s=this,this.modelUpdates=e=>{var s=e.messages.length?e.messages[0]:null;s&&s.status===c.n.Unpaid&&(this.bus&&this.bus.emit("command.messages.form.dismiss-keyboard"),this.props.onShouldDismissKeyboard&&this.props.onShouldDismissKeyboard())},this.sendMessage=e=>function(){for(var t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];s.props.userIsUsingDemoMode?b.V.shared().updateCredentials().safeSubscribe(()=>e(...a)):e(...a)},this.sendText=(e,s)=>{"string"==typeof e&&e.length&&this.props.model&&this.props.model.actions.send(l.Go.Text,e,s,this.props.instant,s=>
3{s instanceof d.eR&&s.code===d.pT.PaymentRequired&&this.props.refillBalanceForText&&this.props.refillBalanceForText(()=>{this.sendText(e,s.tag)})})},this.sendSticker=e=>{this.props.model&&this.props.model.actions.sendSticker({tag:e.tag,attendeeId:this.props.attendeeId,stickerName:e.sticker.reference,cta:e.cta})},this.sendCheer=(e,s)=>{this.props.model&&this.props.model.actions.send(l.Go.Cheer,e,s,this.props.instant,s=>{s instanceof d.eR&&s.code===d.pT.PaymentRequired&&g.e.shared(this.props.userId).missingAmount(e.price).safeSubscribe(t=>this.props.refillBalanceForCheer&&this.props.refillBalanceForCheer(t,()=>{this.sendCheer(e,s.tag)}))})},this.sendTextMessage=this.sendMessage(this.sendText),this.sendStickerMessage=this.sendMessage(this.sendSticker),this.sendCheerMessage=this.sendMessage(this.sendCheer),this.bus=this.props.bus||new(o())}componentDidMount(){this.bus.addListener("command.messages.form.send-text",this.sendTextMessage),this.bus.addListener("command.messages.form.send-sticker",this.sendStickerMessage),this.bus.addListener("command.messages.form.send-cheer",this.sendCheerMessage),this.props.model&&this.props.model.store.listen(this.modelUpdates)}componentWillUnmount(){this.bus.removeListener("command.messages.form.send-text",this.sendTextMessage),this.bus.removeListener("command.messages.form.send-sticker",this.sendStickerMessage),this.bus.removeListener("command.messages.form.send-cheer",this.sendCheerMessage),this.props.model&&this.props.model.store.unlisten(this.modelUpdates)}componentDidUpdate(e){(e.model&&e.model.store.displayName)!==(this.props.model&&this.props.model.store.displayName)&&(e.model&&e.model.store.unlisten(this.modelUpdates),this.props.model&&this.props.model.store.listen(this.modelUpdates))}render(){var{children:e}=this.props;return a.cloneElement(a.Children.only(e),{bus:this.bus,onTextSend:this.sendTextMessage,onStickerSend:this.sendStickerMessage,onCheerSend:this.sendCheerMessage})}}x.displayName="messages.form-controller",x.propTypes={userIsUsingDemoMode:r().bool,bus:r().object,model:r().object,refillBalanceForText:r().func,refillBalanceForCheer:r().func,onShouldDismissKeyboard:r().func};let S=x;function M(e){var s=(s,t)=>{var n=(0,a.useMemo)(()=>s.userId&&s.attendeeId?m.Y.shared().get(d.Ay,(0,d.OX)(s.userId,s.attendeeId)):null,[s.userId,s.attendeeId]),r=(0,h.J2)(()=>s.userId?f.Session.shared().demoUser(s.userId):(0,v.of)(!1),[s.userId]),i=(0,a.useCallback)(function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];p.A.refillBalance({name:u.N.SendCheer,requiredAmount:e,attendeeId:s.attendeeId},...a)},[s.attendeeId]),o=(0,a.useCallback)(function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];p.A.refillBalance({name:u.N.SendMessage,attendeeId:s.attendeeId},...t)},[s.attendeeId]),[l,c]=(0,a.useState)(null),g=(0,a.useCallback)(()=>{l&&l.dismissKeyboard&&l.dismissKeyboard()},[l]);(a.useImperativeHandle||(()=>null))(t,()=>l,[l]);var b=a.useImperativeHandle?c:t;return(0,y.jsx)(x,{userIsUsingDemoMode:r,bus:s.bus,model:n,userId:s.userId,attendeeId:s.attendeeId,refillBalanceForCheer:i,refillBalanceForText:o,instant:s.instant,onShouldDismissKeyboard:g,children:(0,y.jsx)(e,Object.assign({},s,{ref:b}))})};return"function"==typeof a.forwardRef?a.forwardRef(s):s}},30110(e,s,t){"use strict";t.d(s,{C:()=>d});var a=t(42062),n=t(73799),r=t.n(n),i=t(85378),o=t(17961);function d(e){return s=>(function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=s.userIdPropName||"id",n=s.resultPropName||"user";class d extends a.Component{constructor(e){super(e),this.loadProfile=()=>{this.unsubscribeFromUserProfile(),this.setState({[n]:{}},()=>{var e=this.props[t];e&&(this.subscriptionToUserProfile=i.F.shared(e).profile.safeSubscribe(e=>{this.setState({[n]:e.value||{}})}))})},this.unsubscribeFromUserProfile=()=>{this.subscriptionToUserProfile&&this.subscriptionToUserProfile.unsubscribe()},this.patch=e=>{var s=Object.keys(e).reduce((s,t)=>(null!==e[t]&&(s[t]=e[t]),s),{}),a=this.props[t];return a?i.F.shared(a).update(s).toPromise():Promise.reject("User id is not defined")},this.addTrip=e=>{var s=this.state[n],t=(s&&s.meta&&s.meta.travels||[]).filter(s=>e.country!==s.country||e.city!==s.city);t.push(e),this.patch({meta:{travels:t}})},this.deleteTrip=e=>{var s=this.state[n],t=(s&&s.meta&&s.meta.travels||[]).filter(s=>e.country!==s.country||e.city!==s.city);this.patch({meta:{travels:t}})},this.state={[n]:{}}}componentDidMount(){this.loadProfile()}componentDidUpdate(e){var s,a;s=e,a=this.props,s[t]!==a[t]&&this.loadProfile()}componentWillUnmount(){this.unsubscribeFromUserProfile()}render(){var s=this.props,t=Object.assign({},(function(e){if(null==e)throw TypeError("Cannot destructure "+e)}(s),s)),{state:a}=this;return(0,o.jsx)(e,Object.assign({},t,a,{updateUser:this.patch,addTrip:this.addTrip,deleteTrip:this.deleteTrip}))}}return d.displayName="user.controller",d.propTypes={[t]:r().string,[n]:r().object},d})(s,Object.assign({userIdPropName:"ownerId"},e))}},22147(e,s,t){"use strict";function a(e){return e.replace(/\s+/g,"")}t.d(s,{e:()=>a})},19197(e,s,t){"use strict";t.d(s,{x:()=>J});var a,n,r=t(42062),i=t(73799),o=t.n(i),d=t(48798),l=t(67190),c=t(61928);function p(e){var s=function(e){var s;if("string"!=typeof e||2!==(s=e.split(":")).length||!s[0]||!s[1])throw Error('MessagesModel should have id in format "{identity}:{attendee}"');return{identity:s[0],attendee:s[1]}}(e);class t{constructor(){this.startTyping=()=>(e,t)=>{t.api.events.post(s.attendee,{payload:{sender:s.identity},label:"event.user.typing.started"},s=>s?e(null,s):e({outgoing:!0}))},this.endTyping=()=>(e,t)=>{t.api.events.post(s.attendee,{payload:{sender:s.identity},label:"event.user.typing.ended"},s=>s?e(null,s):e({outgoing:!1}))}}}return t.displayName=p.getDisplayName(e),t}function u(e){class s{constructor(s){this.update=e=>{e&&this.setState(e)};var t=s.getActions(p,e);this.state={outgoing:!1},this.bindAction(t.startTyping,this.update),this.bindAction(t.endTyping,this.update)}}return s.displayName=u.getDisplayName(e),s}p.getDisplayName=function(e){return"user-events-typing."+e},u.getDisplayName=function(e){return"user-events-typing."+e};let h={actions:p,store:u};var m=t(17961),g=["forwardedRef"],f="generated.dialogs.messages.startTyping",b="generated.dialogs.messages.endTyping",v=t(39011),y=t(96575),x=t(49844),S=t(65429),M=t(11427),j=t(33457),C=t(43751),T=t(56824),I=t(78675),R=t(31085),k=t(78186);function N(e){var s=(0,r.useRef)(null);return(0,r.useEffect)(()=>{var t=s.current;
3return t&&t.addEventListener("drop",e.onDrop),()=>{t&&t.removeEventListener("drop",e.onDrop)}},[e.onDrop]),(0,R.jsx)("div",{ref:s,children:e.children})}var P=t(6870),w=t(99870),O=t.n(w),E=t(39067),L=t.n(E),A=t(97834);class D extends r.PureComponent{constructor(){super(...arguments),this.state={isOpened:!1},this.setupFileInputRef=e=>{this.fileInputRef=e},this.onDocumentClicked=e=>{this.wrapperRef&&!this.wrapperRef.contains(e.target)&&this.close()},this.setWrapperRef=e=>{this.wrapperRef=e},this.togglePopover=()=>{this.setState({isOpened:!this.state.isOpened})},this.close=()=>{this.setState({isOpened:!1})},this.onSendDeviceMediaClicked=()=>{this.close(),this.fileInputRef&&this.fileInputRef.close()},this.onSendNewMediaClicked=()=>{this.close(),this.props.onSendNewMediaClick&&this.props.onSendNewMediaClick()},this.onFileChanged=e=>{this.props.onFileSelect(e.target.files[0]),e.target.value=""}}componentDidUpdate(e,s){!s.isOpened&&this.state.isOpened?document.addEventListener("click",this.onDocumentClicked):s.isOpened&&!this.state.isOpened&&document.removeEventListener("click",this.onDocumentClicked)}componentWillUnmount(){document.removeEventListener("click",this.onDocumentClicked)}render(){var e=O()("send-attachments",{active:this.state.isOpened});return(0,R.jsxs)("div",{className:e,children:[!!this.state.isOpened&&(0,R.jsxs)("div",{className:"popover",ref:this.setWrapperRef,children:[(0,R.jsx)("button",{type:"button",className:"send-device-media",onClick:this.onSendDeviceMediaClicked,disabled:this.props.disabled,children:(0,R.jsx)(k.X,{href:"/dialogs/messages#device-upload"})}),(0,R.jsx)("button",{type:"button",className:"send-new-media",onClick:this.onSendNewMediaClicked,disabled:this.props.disabled,children:(0,R.jsx)(k.X,{href:"/dialogs/messages#webcam-upload"})})]}),(0,R.jsxs)("button",{type:"button",className:"toggle",onClick:!this.props.deviceIsMobile&&this.togglePopover,disabled:this.props.disabled,children:[(0,R.jsx)(A.S,{}),(0,R.jsx)(k.X,{href:"/commons#photo"}),(0,R.jsx)("span",{children:"/"}),(0,R.jsx)(k.X,{href:"/commons#video"}),(0,R.jsx)("input",{className:!this.props.deviceIsMobile&&"hidden",type:"file",name:"file",value:"",size:"1",accept:"image/*, video/*",ref:this.setupFileInputRef,onChange:this.onFileChanged})]})]})}}D.displayName="components.Chat.form.attachments.view",D.propTypes={disabled:L().bool,onFileSelect:L().func,onSendNewMediaClick:L().func,deviceIsMobile:L().bool};var U=((a=class extends r.Component{render(){var e=this.props,s=Object.assign({},(function(e){if(null==e)throw TypeError("Cannot destructure "+e)}(e),e)),t="mobile"===S.A.device();return(0,R.jsx)(D,Object.assign({},s,{deviceIsMobile:t}))}}).propTypes={userId:L().string,attendeeId:L().string},a),B=t(54149),F=t(22147),q=t(15782),G=t(70618),W=t(29395),X=t(93515),_=t(26110),V=t(93143),H=t(6857),$=t(58716),Y=(0,r.lazy)(()=>t.e("9417").then(t.bind(t,12032)).then(e=>({default:e.EmojiPicker}))),z=(0,r.memo)(e=>{var{onSendTextClick:s,deviceIsMobile:t,onStickerSelect:a,onFileSelect:n,onCheerSelect:i,disabled:o,birthdayTheme:d,inputComponent:l,maxLength:c=255,sendButtonComponent:p,onTextChange:u,placement:h}=e,[m,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(!1),[v,y,x]=(0,_.e)(!1),[S,M,j]=(0,_.e)(!1),C=(0,r.useRef)(null),T=(0,q.A)("dialogs/messages","type-message"),I=(0,q.A)("dialogs/messages","birthday-message"),w=f?"":d?I:T,E=(0,r.useCallback)(()=>{C.current&&C.current.focus()},[]),L=(0,r.useCallback)(()=>{(0,F.e)(m)&&(s&&s(m),g(""),t||E())},[m,s,t,E]),A=(0,r.useCallback)(e=>{e.suggestion.message&&g(e.suggestion.message)},[]),D=(0,r.useCallback)(e=>{13===e.keyCode&&(e.preventDefault(),L())},[L]),z=(0,W.C)(e=>{g(e),u(e)}),J=(0,r.useCallback)(()=>{y(),j(!1)},[j,y]),K=(0,r.useCallback)(()=>{x(!1),M()},[x,M]),Q=(0,r.useCallback)(()=>{x(!1),j(!1)},[x,j]),Z=(0,r.useCallback)(e=>{a&&a({sticker:e,cta:"panel"}),Q(),t||E()},[a,Q,t,E]),ee=(0,r.useCallback)(e=>{var s=e.pattern+" ";m.trim()&&!m.endsWith(" ")&&(s=" "+s),g(m+s),Q(),E()},[m,Q,E]),es=(0,r.useCallback)(e=>{if(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files)for(var s=0;s<e.dataTransfer.files.length;s++)n(e.dataTransfer.files[s])},[n]),et=(0,r.useMemo)(()=>O()("chat-form",{disabled:o}),[o]),ea=(0,r.useMemo)(()=>O()("send-emoji",{active:v}),[v]),en=(0,r.useMemo)(()=>O()("send-sticker",{active:S}),[S]),er=(0,r.useMemo)(()=>O()("chat-form-input-wrapper",{"with-input-component":!!l}),[l]),ei=(0,r.useMemo)(()=>{var s={type:"text",name:"text",autoComplete:"off",value:m,onKeyDown:D,onChange:z,disabled:o,autoFocus:!0,ref:C,maxLength:c,placeholder:w},t=l?(0,R.jsx)(l,Object.assign({},s)):(0,R.jsx)("input",Object.assign({},s));return e.canSendMedia?(0,R.jsx)(N,{onDrop:es,children:t}):t}
3,[es,m,D,z,w,o,e.canSendMedia,l,c]),eo=e.canSendSmiles||e.canSendStickers&&!e.useSeparatePickerForSmiles,ed=e.canSendStickers&&!!e.useSeparatePickerForSmiles,el=e.canSendSmiles||e.canSendStickers&&!e.useSeparatePickerForSmiles,ec=e.canSendStickers&&!!e.useSeparatePickerForSmiles,ep=(0,r.useRef)(null),eu=(0,r.useRef)(null),eh=(0,r.useRef)(null),em=(0,r.useRef)(null),eg=(0,r.useMemo)(()=>[...eo?[ep]:[],...ed?[eu]:[],...el?[eh]:[],...ec?[em]:[]],[el,ec,eo,ed]);return(0,G.L)(eg,Q),(0,R.jsxs)("div",{className:et,children:[!!eo&&(0,R.jsx)(r.Suspense,{fallback:null,children:(0,R.jsx)(Y,{rootRef:ep,className:"emoji",smilesEnabled:!0,stickersEnabled:!!e.canSendStickers&&!e.useSeparatePickerForSmiles,isOpened:v,onStickerSelect:Z,onSmileSelect:ee,attendeeId:e.attendeeId,userId:e.userId})}),!!ed&&(0,R.jsx)(r.Suspense,{fallback:null,children:(0,R.jsx)(Y,{rootRef:eu,className:"stickers",smilesEnabled:!1,stickersEnabled:!0,isOpened:S,onStickerSelect:Z,attendeeId:e.attendeeId,userId:e.userId})}),(0,R.jsx)("div",{className:"form-wrapper",children:(0,R.jsxs)("div",{className:"form-panel",children:[!!ec&&(0,R.jsx)("button",{ref:em,className:en,onClick:K,disabled:o,children:(0,R.jsx)(k.X,{href:"/dialogs/messages#stickers"})}),!!e.canSendMedia&&(0,R.jsx)(U,{onFileSelect:e.onFileSelect,onSendNewMediaClick:e.onSendNewMediaClick,disabled:o}),!!e.cheersMenuVisible&&(0,R.jsx)(X.ChatCheersMenu,{send:i,forceOpen:!1,id:e.attendeeId}),!!h&&(0,R.jsx)(V.o,{attendeeId:e.attendeeId,placement:h,onGeneratedMessageClick:A}),(0,R.jsxs)("div",{className:er,children:[(0,R.jsxs)("div",{className:"copilot-input-area",children:[ei,!!f&&(0,R.jsx)(H.fV,{})]}),(0,R.jsx)($.z,{attendeeId:e.attendeeId,onGeneratingChange:b}),!!el&&(0,R.jsx)("button",{ref:eh,className:ea,onClick:J,disabled:o,children:(0,R.jsx)(P.S,{})}),p?(0,R.jsx)(p,{disabled:o,onClick:L}):(0,R.jsx)(B.A,{typeClass:"send-message",size:"medium",onClick:L,disabled:o,children:(0,R.jsx)(k.X,{href:"/commons#send"})})]})]})})]})}),J=(n=(0,j.X)((e,s)=>{var{useDistinct:t,useObservable:a}=s,n=I.T.shared()||{},r=(0,M.A)(["features","offline-chats"],n),i=a(()=>T.HU.shared(e.attendeeId).presence,e.attendeeId)||{},o=t((e,s)=>C.Y.shared().get(y.Ay,(0,y.OX)(e,s)),e.userId,e.attendeeId),d=t(e=>()=>{e.emit("command.messages.form.send-new-media")},e.bus),l=t((e,s,t,a,n)=>s=>{var r=(0,x.w0)(e);t.emit("command.messages.form.send-text",s,r,n),a()},e.userId,e.attendeeId,e.bus,e.onEndTyping,e.placement),c=t((e,s,t)=>(s,a,n)=>{var r=(0,x.w0)(e);t.emit("command.messages.form.send-cheer",s,r,n)},e.userId,e.attendeeId,e.bus),p=t((e,s,t)=>s=>{var a=(0,x.w0)(e);t.emit("command.messages.form.send-sticker",{sticker:s.sticker,tag:a,cta:s.cta})},e.userId,e.attendeeId,e.bus),u=t(()=>e=>{var s=new FileReader;s.onload=s=>{o.actions.send({uri:s.target.result,mediaType:e.type.startsWith("image")?"photo":"video",type:e.type})},s.readAsDataURL(e)}),h="mobile"===S.A.device(),m=!1===r&&!1===i.online;return(0,R.jsx)(z,Object.assign({},e,{disabled:m,onFileSelect:u,onSendNewMediaClick:d,onSendTextClick:l,onCheerSelect:c,onStickerSelect:p,deviceIsMobile:h}))}),(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s=>{var t,a=(0,d.T)(s,(t={onStartTypingPropName:e.onStartTypingPropName,onEndTypingPropName:e.onEndTypingPropName},e=>(function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=s.userPropName||"userId",a=s.attendeePropName||"attendeeId",n=s.onStartTypingPropName||"onStartTyping",i=s.onEndTypingPropName||"onEndTyping";class o extends r.Component{constructor(){var e;super(...arguments),e=this,this.startTyping=e=>{this.props[f]&&this.props[b]&&e&&(this.timer?(clearTimeout(this.timer),this.timer=null):this.props[f](),this.timer=setTimeout(this.endTyping,5e3))},this.endTyping=()=>{this.timer&&(clearTimeout(this.timer),this.timer=null),this.props[b]&&this.props[b]()},this.onStartTyping=function(s){e.startTyping(s);for(var t=arguments.length,a=Array(t>1?t-1:0),r=1;r<t;r++)a[r-1]=arguments[r];e.props[n]&&e.props[n](s,...a)},this.onEndTyping=function(){e.endTyping(),e.props[i]&&e.props[i](...arguments)}}componentWillUnmount(){this.endTyping()}render(){var s=this.props,{forwardedRef:t}=s,a=function(e,s){if(null==e)return{};var t={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(s.includes(a))continue;t[a]=e[a]}return t}(s,g);return delete a[f],delete a[b],(0,m.jsx)(e,Object.assign({},a,{ref:t,[n]:this.onStartTyping,[i]:this.onEndTyping}))}}o.displayName="dialogs-messages-outgoing-typing.controller";var d=(0,c.A)(function(e,s){if(s[t]&&s[a])return{typingModel:e.get(h,s[t]+":"+s[a])};return{}},()=>{},function(e){var s={};return e.typingModel&&(s[f]=e.typingModel.actions.startTyping,s[b]=e.typingModel.actions.endTyping),s},function(e,s){return e[t]!==s[t]||e[a]!==s[a]})(o);return"function"==typeof r.forwardRef?r.forwardRef((e,s)=>r.createElement(d,Object.assign({forwardedRef:s},e))):d})(e,t)),l.withMessageSending,v.d);return a.propTypes={userId:o().string,attendeeId:o().string,instant:o().bool},a}})({onStartTypingPropName:"onTextChange",onEndTypingPropName:"onEndTyping"})(n))},69321(e,s,t){"use strict";t.d(s,{b:()=>K});var a,n=t(42062),r=t(39067),i=t.n(r),o=t(33457),d=t(11427),l=t(73799),c=t.n(l),p=t(48798),u=t(98621),h=t.n(u),m=t(74923),g=t(34677),f=t(49844),b=t(40961),v=t(27888),y=t(22081),x=t(43751),S=t(13462),M=t(75841),j=t(38112),C=t(79942),T=t(44150),I=t(52118),R=t(71251),k=t(17961);function N(e,s,t,a,n,r,i){try{var o=e[r](i),d=o.value}catch(e){return void t(e)}o.done?s(d):Promise.resolve(d).then(a,n)}function P(e){return function(){var s=this,t=arguments;return new Promise(function(a,n){var r=e.apply(s,t);function i(e){N(r,a,n,i,o,"next",e)}function o(e){N(r,a,n,i,o,"throw",e)}i(void 0)})}}class w extends n.Component{constructor(e){super(e),s=this,this.canSubscribe=()=>this.props.subscriptionEnabled&&this.props.canSubscribe,this.stateFromModelState=e=>{var{messages:s,messagesLoaded:t}=e;return{messages:s.filter(e=>{var s,{type:t,content:a,meta:n}=e;return!(t===g.Go.System&&a.type===g.Nd.CallMissed&&!this.props.videoChatEnabled||!this.props.dialogsThemesTrialEnabled&&t===g.Go.DialogsThemesUpdatedMessage&&(null==n||null==(s=n["dialogs-theme"])?void 0:s["update-type"])==="extended")}),messagesLoaded:t}},this.reloadMessages=()=>{this.removeUnpaidMessages(),this.setState({isLoading:!0});var e=this.state.messages.filter(e=>e.status===m.n.Delivered).length;this.model.actions.get(30,e,e=>{e instanceof f.eR&&e.code===f.pT.PartialLoad?this.setState({allMessagesLoaded:!0,isLoading:!1}):this.setState({allMessagesLoaded:!1,isLoading:!1})})},this.showMore=()=>{var e=this.state;if(!e.isLoading&&!e.allMessagesLoaded){this.setState({isLoading:!0});var s=e.messages.filter(e=>e.status===m.n.Delivered).length;this.model.actions.get(30,s,e=>{e instanceof f.eR&&e.code===f.pT.PartialLoad?this.setState({allMessagesLoaded:!0,isLoading:!1}):this.setState({allMessagesLoaded:!1,isLoading:!1})})}},this.updateState=e=>{var s,t=this.stateFromModelState(e),a=null!=(s=this.lastProcessedMessage)?s:this.state.messages.length?this.state.messages[0]:null;this.lastProcessedMessage=t.messages.length?t.messages[0]:null,this.setState(t,()=>{var e=this.state.messages.length?this.state.messages[0]:null;e&&(a&&a.tag===e.tag||(this.bus.emit("command.messages.log.scroll-down"),this.props.unlimitedMessagesWithSubscriptionEnabled&&e.outgoing&&e.status===m.n.Delivered&&e.type!==g.Go.Cheer&&this.removeUnpaidMessages(e=>e.type===g.Go.Cheer),this.props.unlimitedMessagesWithSubscriptionEnabled&&!e.outgoing&&1===this.state.messages.filter(e=>!e.outgoing).length&&this.resendUnpaidMessages()),e.status!==m.n.Unpaid||a&&a.tag===e.tag&&a.status===e.status||this.refillBalanceFor(e))})},this.purchase=P(function*(){!(s.props.cheersManualResendingEnabled&&(yield s.resendUnpaidMessages())
3)&&s.props.refillBalance&&s.props.refillBalance(void 0,()=>{s.resendUnpaidMessages()})}),this.sendText=(e,s)=>{"string"==typeof e&&e.length&&this.props.model&&this.props.model.actions.send(g.Go.Text,e,s,this.props.instant,s=>{s instanceof f.eR&&s.code===f.pT.PaymentRequired&&this.props.refillBalance&&this.props.refillBalance(void 0,()=>{this.sendText(e,s.tag)})})},this.refillBalanceFor=e=>{if(!this.isRefilling){this.isRefilling=!0;var s=this.props.cheersManualResendingEnabled&&e.type===g.Go.Cheer?()=>this.bus.emit("command.messages.log.resend",e):this.resendUnpaidMessages;this.props.refillBalance(e,()=>{this.isRefilling=!1,s()},()=>{this.isRefilling=!1})}},this.removeUnpaidMessages=e=>{this.state.messages.filter(s=>s.status===m.n.Unpaid&&(!e||e(s))).reverse().forEach(e=>{this.model.actions.delete(e.tag)})},this.resend=(e,s)=>{e.type===g.Go.Sticker?this.model.actions.sendSticker({tag:e.tag,attendeeId:this.props.attendeeId,stickerName:e.content.basename,cta:"resend"},s):e.type===g.Go.Cheer?T.$.shared(e.recipient).findByReference(e.content.basename).subscribe(t=>{t&&(0,I.G)(t,e.recipient,"chat-resend",!1,e.tag).safeSubscribe(),s&&s()},()=>{s&&s()}):this.model.actions.send(e.type,e.content,e.tag,this.props.instant,s)},this.resendUnpaidMessages=P(function*(){var e=s.state.messages.filter(e=>e.status===m.n.Unpaid&&(!s.props.cheersManualResendingEnabled||e.type!==g.Go.Cheer)).reverse(),t=function*(e){yield new Promise(t=>{s.resend(e,t)})};for(var a of e)yield*t(a);return e.length}),this.bus=this.props.bus||new(h()),this.model=this.props.model;var s,t=this.model.store.getState(),a=t.messagesLoaded&&t.messages.length>0;this.state=Object.assign({},this.stateFromModelState(t),{messagesLoaded:a,isLoading:!1,allMessagesLoaded:void 0})}componentDidMount(){this.model.store.listen(this.updateState),this.bus.addListener("event.messages.log.end-reached",this.showMore),this.bus.addListener("command.messages.log.purchase",this.purchase),this.bus.addListener("command.messages.log.send-text",this.sendText),this.bus.addListener("command.messages.log.resend",this.resend),this.bus.addListener("command.messages.log.resend-unpaid",this.resendUnpaidMessages);var e=this.model.store.getState();e.messagesLoaded&&e.messages.length>0?this.setState(Object.assign({},this.stateFromModelState(e),{messagesLoaded:!0,isLoading:!1,allMessagesLoaded:!1})):this.reloadMessages()}componentWillUnmount(){this.bus.removeListener("command.messages.log.resend",this.resend),this.bus.removeListener("command.messages.log.send-text",this.sendText),this.bus.removeListener("command.messages.log.purchase",this.purchase),this.bus.removeListener("event.messages.log.end-reached",this.showMore),this.bus.removeListener("command.messages.log.resend-unpaid",this.resendUnpaidMessages),this.model.store.unlisten(this.updateState),this.removeUnpaidMessages()}componentDidUpdate(e){if(this.model.store.displayName!==this.props.model.store.displayName){this.lastProcessedMessage=null,this.model.store.unlisten(this.updateState),this.model=this.props.model,this.model.store.listen(this.updateState),this.setState(Object.assign({},this.stateFromModelState(this.model.store.getState()),{isLoading:!1,allMessagesLoaded:void 0}),()=>{this.reloadMessages()});return}this.props.userIsCustomer!==e.userIsCustomer&&this.setState(this.stateFromModelState(this.model.store.getState()))}render(){var{children:e}=this.props;return n.cloneElement(n.Children.only(e),Object.assign({},this.state,{bus:this.bus}))}}function O(e){return(0,o.X)((s,t)=>{var{useDistinct:a,useObservable:n,useObservableAction:r}=t,i=a((e,s)=>e&&s?x.Y.shared().get(f.Ay,(0,f.OX)(e,s)):null,s.userId,s.attendeeId),o=r(e=>T.$.shared(e.recipient).findByReference(e.content.basename).pipe((0,C.vV)(e=>e&&e.bonuses),(0,C.ex)(e=>{"number"==typeof e&&(0,R.d)(e)})),[]),d=a(()=>(e,t,a)=>{e?e.content&&0===e.content.price?(o(e),a()):e.content&&e.content.price?b.A.refillBalance({name:e.type===g.Go.Cheer?v.N.SendCheer:v.N.SendMessage,requiredAmount:e.content.price,attendeeId:s.attendeeId},t,a):b.A.refillBalance({name:e.type===g.Go.Cheer?v.N.SendCheer:v.N.SendMessage,attendeeId:s.attendeeId},t,a):b.A.refillBalance({name:v.N.Chat,attendeeId:s.attendeeId},t,a)}),l=a((e,s)=>{if(!e)return!1;for(var t of e)if("paid-messages"!==t.name||!s||t.details.unpaidMessages.filter(e=>e.type!==g.Go.Cheer).length)return!0;return!1},n((e,s)=>e&&s?j.V.shared(e).unpaidFeatures(s):(0,M.of)(void 0),s.userId,s.attendeeId),s.cheersManualResendingEnabled),c=n(e=>e?y.A.shared().tagsOf(e):(0,M.of)(void 0),s.userId),p=c&&c.indexOf("membership")>=0,u=c&&c.indexOf("customer")>=0,h=n(()=>S.T.shared().trialMessagesEnabled),m=n(()=>S.T.shared().dialogsThemesTrialEnabled),I=n(()=>S.T.shared().videoCallEnabled,[],!1);return i?(0,k.jsx)(w,Object.assign({model:i,refillBalance:d,canSubscribe:p,userIsCustomer:u,trialMessagesEnabled:h,videoChatEnabled:I,dialogsThemesTrialEnabled:m},s,{children:(0,k.jsx)(e,Object.assign({},s,{paymentRequired:l}))})):null})}w.displayName="messages.log-controller",w.propTypes={bus:c().object,model:c().object,refillBalance:c().func,userLikeAnswers:c().arrayOf(c().string),unlimitedMessagesWithSubscriptionEnabled:c().bool,trialMessagesEnabled:c().bool,subscriptionEnabled:c().bool,userIsCustomer:c().bool,canSubscribe:c().bool,cheersManualResendingEnabled:c().bool,videoChatEnabled:c().bool,dialogsThemesTrialEnabled:c().bool};var E=t(4088),L=t(92362),A=["forwardedRef"],D=t(39011),U=t(30110),B=t(56824),F=t(91654),q=t(54029),G=t(78675),W=t(31085),X=t(8036),_=t(78186),V=t(33215),H=t(99870),$=t.n(H);class Y extends n.Component{constructor(){super(...arguments),this.purchase=()=>{this.props.bus&&this.props.bus.emit("command.messages.log.purchase")},this.prepareData=e=>({"attendee.name":e})}
3render(){if(!this.props.paymentRequired&&!this.props.subscribeRequired)return null;var e=$()("payment-required-popover",{"purchase-credits":this.props.paymentRequired},{subscribe:this.props.subscribeRequired}),s=this.props.paymentRequired?"/notifications#credits-chat":"/notifications#upgrade-account-chat",t=this.props.paymentRequired?"/pages/chat#purchase-credits":"/pages/chat#subscribe";return(0,W.jsxs)("div",{className:e,children:[(0,W.jsx)(V.UserNameBasedText,{userId:this.props.attendeeId,template:s,prepareData:this.prepareData}),(0,W.jsx)("button",{type:"button",onClick:this.purchase,children:(0,W.jsx)(_.X,{href:t})})]})}}Y.displayName="components.Chat.log.payment-required.view",Y.propTypes={attendeeId:i().string,bus:i().object,paymentRequired:i().bool,subscribeRequired:i().bool};var z=t(94449);class J extends n.Component{constructor(){super(...arguments),this.setupMessageLogRef=e=>{this.messageLogRef=e},this.scrollToBottom=()=>{var e,s=this===null||void 0===this||null==(e=this.messageLogRef)?void 0:e.querySelector(".rcs-inner-container");s&&(s.scrollTop=s.scrollHeight)},this.loadMore=()=>{this.props.bus&&this.props.bus.emit("event.messages.log.end-reached")}}componentDidMount(){this.props.bus.on("command.messages.log.scroll-down",this.scrollToBottom),this.scrollToBottom()}componentDidUpdate(e){(this.props.paymentRequired!==e.paymentRequired||this.props.subscribeRequired!==e.subscribeRequired)&&this.scrollToBottom()}componentWillUnmount(){this.props.bus.removeListener("command.messages.log.scroll-down",this.scrollToBottom)}render(){var e=this.props.messages,s=$()("message-log-wrapper",{disabled:this.props.disabled}),t={name:this.props.attendeeProfile.name};return(0,W.jsxs)("div",{className:s,children:[(0,W.jsxs)("div",{className:"message-log",ref:this.setupMessageLogRef,children:[!1===this.props.allMessagesLoaded&&!this.props.isLoading&&(0,W.jsx)("div",{className:"load-more",children:(0,W.jsx)("span",{onClick:this.loadMore,children:(0,W.jsx)(_.X,{href:"/dialogs/messages#view-older-messages"})})}),(0,W.jsx)(z.A,{allowOuterScroll:!0,content:"message-log-scroll",keepAtBottom:!0,children:(0,W.jsx)("div",{className:"message-log-content",children:e.map(e=>(0,W.jsx)(X.Q,{message:e,sender:e.outgoing?this.props.userProfile:this.props.attendeeProfile,onShow:this.props.onMessageShow,bus:this.props.bus,disabled:this.props.disabled,onResendButtonClick:this.props.onResendButtonClick,withBlurTextMessageBackgroun
3d:this.props.withBlurTextMessageBackground,messagesReactionsEnabled:this.props.messagesReactionsEnabled},e.tag))})}),!!this.props.attendeeIsTyping&&(0,W.jsx)("p",{className:"typing",children:(0,W.jsx)(V.UserNameBasedText,{userId:this.props.attendeeId,template:"/dialogs/messages/typing#attendee-typing"})})]}),!!this.props.paymentRequiredFormEnabled&&(0,W.jsx)(Y,{attendeeId:this.props.attendeeId,bus:this.props.bus,paymentRequired:!this.props.disabled&&this.props.paymentRequired,subscribeRequired:!this.props.disabled&&this.props.subscribeRequired}),!!this.props.allMessagesLoaded&&0===e.length&&(0,W.jsx)("div",{className:"placeholder",children:(0,W.jsx)(_.X,{href:"/dialogs/messages#empty-chat-placeholder"})}),!!this.props.birthdayTheme&&(0,W.jsx)("div",{className:"birthday-notification",children:(0,W.jsx)(_.X,{href:"/dialogs/messages#has-birthday",data:t})})]})}}J.displayName="components.Chat.log.view",J.propTypes={userId:i().string,attendeeId:i().string,attendeeIsOffline:i().bool,disabled:i().bool,attendeeIsTyping:i().bool,birthdayTheme:i().bool,bus:i().object,isLoading:i().bool,allMessagesLoaded:i().bool,paymentRequired:i().bool,subscribeRequired:i().bool,onMessageShow:i().func,messages:i().array,userProfile:i().object,attendeeProfile:i().object,onResendButtonClick:i().func,paymentRequiredFormEnabled:i().bool,messagesReactionsEnabled:i().bool};var K=((a=(0,o.X)((e,s)=>{var{useDistinct:t,useObservable:a}=s,n=a(()=>F.e.shared(e.userId).hasActiveSubscription,[e.userId]),r=e.paymentRequired&&n,i=e.paymentRequired&&!n,o=G.T.shared()||{},l=(0,d.A)(["messages","talk"],o),c=(0,d.A)(["features","offline-chats"],o),p=a(()=>B.HU.shared(e.attendeeId).presence,e.attendeeId)||{},u=t((s,t)=>{var a="function"==typeof e.messagesFilter?e.messagesFilter(s):s;return a&&t?a.map((e,s)=>{var n=a[s+1],r=e.timestamp-(n?n.timestamp:0);return e.firstMessageOfTalk=r>t,e}).slice().reverse():a},e.messages,l),h=t(e=>s=>{e.emit("command.messages.log.resend",s)},e.bus),m=a(()=>e.userId&&e.attendeeId?q.S.shared(e.userId).visible(e.attendeeId):(0,M.of)(!1),[e.userId,e.attendeeId])||!1;return(0,W.jsx)(J,Object.assign({},e,{attendeeIsTyping:m,paymentRequired:r,subscribeRequired:i,disabled:!1===c&&!1===p.online,attendeeIsOffline:!1===p.online,messages:u,onResendButtonClick:h}))})).displayName="components.Chat.log.controller",a.propTypes={userId:i().string,attendeeId:i().string,paymentRequired:i().bool},(0,p.T)(a,function(e){var s=(0,p.T)(e,e=>(function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=s.userPropName||"userId",a=s.attendeePropName||"attendeeId";class r extends n.Component{constructor(){super(...arguments),this.onMessageShown=e=>{if(this.props[t]&&this.props[a]&&e.id&&!e.read){x.Y.shared().get(E.Ay,(0,E.OX)(this.props[t],this.props[a])).actions.read(e.id);var s={text:e.placeholder,timestamp:e.timestamp};L.a.shared(e.recipient).logMessageRead(e.sender,s)}this.props.onMessageShow&&this.props.onMessageShow(e)}}render(){var s=this.props,{forwardedRef:t}=s,a=function(e,s){if(null==e)return{};var t={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(s.includes(a))continue;t[a]=e[a]}return t}(s,A);return(0,k.jsx)(e,Object.assign({},a,{ref:t,onMessageShow:this.onMessageShown}))}}return r.displayName="dialogs.messages.reader",r.propTypes={[t]:c().string,[a]:c().string,onMessageShow:c().func},r})(e,void 0),O,D.d);return s.propTypes={userId:c().string,attendeeId:c().string,instant:c().bool,unlimitedMessagesWithSubscriptionEnabled:c().bool,trialMessagesEnabled:c().bool,subscriptionEnabled:c().bool,userLikeAnswers:c().arrayOf(c().string),cheersManualResendingEnabled:c().bool},s},(0,U.C)({userIdPropName:"attendeeId",resultPropName:"attendeeProfile"}),(0,U.C)({userIdPropName:"userId",resultPropName:"userProfile"})))},8036(e,s,t){"use strict";t.d(s,{Q:()=>ec});var a,n=t(42062),r=t(39067),i=t.n(r),o=t(99870),d=t.n(o),l=t(73799),c=t.n(l),p=t(48798),u=t(82018),h=t(51575),m=t(33457),g=t(32307),f=t(17961),b=t(26233),v=t(31085);class y extends n.PureComponent{render(){var e=this.props.message.content,s=d()("text",{"only-smiles":this.props.textContainsOnlySmiles},{blurred:this.props.blurred});return(0,v.jsx)("div",{className:"message-item",children:(0,v.jsx)(b.s,{text:e,className:s})})}}
3y.displayName="components.Chat.message.text.view",y.propTypes={textContainsOnlySmiles:i().bool,blurred:i().bool,message:i().shape({sender:i().string,recipient:i().string,outgoing:i().bool,tag:i().string,content:i().string})};var x=((a=(0,m.X)((e,s)=>{var{useDistinct:t,useObservable:a}=s,n=t(e=>e?RegExp("^("+e+"|\\s)+$"):void 0,a(()=>h.e.shared().pattern)),r=e.id===e.message.recipient?e.message.sender:e.message.recipient,i=!!(a(e=>e.unpaidMessages,t((e,s)=>g.D.shared(e,s),e.id,r))||[]).find(s=>s.tag===e.message.tag),o=t(()=>e.message.content&&n&&n.test(e.message.content),e.message.content,n);return(0,f.jsx)(y,Object.assign({},e,{blurred:i,textContainsOnlySmiles:o}))})).propTypes={message:c().shape({tag:c().string.isRequired}).isRequired},a.displayName="common.messages.message.text.controller",(0,p.T)(a,e=>(0,u.B)(e,"id"))),S=t(74923),M=t(34677),j=t(55976),C=t(99027),T=t(76328),I=t(43751),R=t(79760),k=t(40961),N=t(27888),P=t(57500),w=t.n(P),O=t(60144);let E={id:"sprite-common-6b0cafb9",href:"/app/sprite-common.f91c560d.svg#sprite-common-6b0cafb9",viewBox:"0 0 12 14"};var L=t(27648);class A extends n.Component{constructor(e){super(e)}render(){return(0,v.jsx)(L.A,{typeClass:"play-triangle",icon:E})}}var D=t(81924),U=t(20345),B=t(78903);class F extends n.PureComponent{render(){var e=this.props.type===M.Go.Photo?this.props.localUri:void 0,s=this.props.type===M.Go.Video?"/commons#play-video":"/commons#view-photo",t=d()("media",{blurred:this.props.type===M.Go.Video&&"payment_required"===this.props.status});return(0,v.jsxs)("div",{className:"message-item",children:[!!this.props.canResend&&(0,v.jsx)("button",{type:"button",onClick:this.props.resend,className:"resend",children:"Resend"}),(0,v.jsxs)("div",{className:"message-item-container",children:[(0,v.jsx)(O.$,{path:this.props.path,resourceWidth:215,resourceHeight:180,src:e,authorize:!0,className:t,onClick:this.props.openResource,transformation:"thumbnail"}),"payment_required"===this.props.status&&(0,v.jsxs)("div",{className:"overlay payment-required",children:[(0,v.jsx)(B.Icon,{name:"locker",size:"normal",color:"var(--sdv-light-color)"}),(0,v.jsx)(U.$,{variant:"primary",children:(0,v.jsx)(D.LocalizedText,{href:s,color:"light",variant:"h4"})})]}),"not_found"===this.props.status&&(0,v.jsx)("div",{className:"overlay not-found",children:(0,v.jsxs)("p",{children:[this.props.type===M.Go.Photo?"Photo":"Video"," can't be loaded."]})}),!!this.props.canResend&&(0,v.jsx)("div",{className:"overlay unsent"}),"available"===this.props.status&&this.props.type===M.Go.Video&&(0,v.jsx)("div",{className:"overlay",children:(0,v.jsx)(A,{})}),!!this.props.progress&&(0,v.jsx)("div",{className:"overlay progress",children:(0,v.jsxs)("p",{children:[Math.round(this.props.progress||0),"%"]})})]})]})}}F.displayName="components.Chat.log.message.media.view",F.propTypes={type:i().number,localUri:i().string,path:i().string,status:i().string,canResend:i().bool,progress:i().number,openResource:i().func,resend:i().func,messageDelivered:i().bool};var q=function(e){class s extends n.Component{constructor(e){super(e),this.mounted=!1,this.onResourceAccessStatusChanged=e=>{if(this.state.status!==e.status){var s="available"===e.status,t=this.props.message,a=t.type===M.Go.Photo?(0,C.qW)(t.sender,t.recipient,t.content.basename,!s):(0,C.Bt)(t.sender,t.recipient,t.content.basename,!0);this.setState({status:e.status,path:a})}},this.openResource=()=>{if(("available"===this.state.status||"payment_required"===this.state.status)&&this.state.resourcePath){var e=this.state.type===M.Go.Photo,s=()=>{if(e)(0,T.u)({path:this.state.resourcePath});else{var s;s={path:this.state.resourcePath},I.Y.shared().get(R.A).actions.open("video",[{props:s}])}};"available"===this.state.status?s():j.N.shared(this.state.userId).buy(this.state.resourcePath).safeSubscribe(t=>{if(!t.isSuccessful){if("insufficient-funds"===t.error){var a=e?N.N.WatchPhoto:N.N.WatchVideo;k.A.refillBalance({name:a,attendeeId:this.props.message.outgoing?this.props.message.recipient:this.props.message.sender},this.openResource)}return}s()})}},this.resend=()=>{this.props.bus&&this.props.bus.emit("command.messages.log.resend-media",this.props.message.tag)},this.setRef=e=>{this.component=e},this.flux=I.Y.shared(),this.shouldComponentUpdate(this.props)}shouldComponentUpdate(e,s){if(this.state){if(!w()(this.state,s))return!0;
3if(w()(this.props,e))return!1}var t,a=e.message,n=a.outgoing?a.sender:a.recipient;if(a.content&&a.content.filePath)t={userId:n,type:a.type,localUri:a.content.filePath,resourcePath:null,path:null,status:"available",progress:a.content.progress,canResend:a.status===S.n.Failed,messageDelivered:a.status===S.n.Delivered};else if(a.content&&a.content.basename){var r=a.type===M.Go.Photo?(0,C.qW)(a.sender,a.recipient,a.content.basename):(0,C.Bt)(a.sender,a.recipient,a.content.basename);a.outgoing||this.state&&this.state.resourcePath===r||(this.subscriberToPaidResourcesDataModel&&this.subscriberToPaidResourcesDataModel.unsubscribe(),this.mounted&&(this.subscriberToPaidResourcesDataModel=j.N.shared(n).data(r).safeSubscribe(this.onResourceAccessStatusChanged))),t={userId:n,type:a.type,localUri:null,resourcePath:r,progress:null,canResend:!1,messageDelivered:a.status===S.n.Delivered}}return this.state?this.setState(t):this.state=Object.assign({status:"unknown"},t),!1}componentDidMount(){this.subscriberToPaidResourcesDataModel=j.N.shared(this.state.userId).data(this.state.resourcePath).safeSubscribe(this.onResourceAccessStatusChanged),this.mounted=!0}componentWillUnmount(){this.subscriberToPaidResourcesDataModel&&this.subscriberToPaidResourcesDataModel.unsubscribe(),this.mounted=!1}render(){return(0,f.jsx)(e,Object.assign({},this.state,this.props,{ref:this.setRef,openResource:this.openResource,resend:this.resend}))}}return s.displayName="common.messages.message.media.controller",s.propTypes={bus:c().object,message:c().shape({outgoing:c().bool.isRequired,sender:c().string.isRequired,recipient:c().string.isRequired,type:c().number.isRequired,content:c().oneOfType([c().shape({basename:c().string.isRequired}),c().shape({filePath:c().string.isRequired,progress:c().number.isRequired})]).isRequired})},s}(F),G=t(95259);class W extends n.PureComponent{render(){return(0,v.jsx)("div",{children:(0,v.jsx)("div",{className:"message-item",children:(0,v.jsx)(G.Sticker,{image:this.props.message.content.image,animation:this.props.message.content.animation,basename:this.props.message.content.basename,className:"sticker",messageId:this.props.message.id,messageTimestamp:this.props.message.timestamp})})})}}W.displayName="components.Chat.log.message.sticker.view",W.propTypes={message:i().shape({content:i().shape({image:i().string,animation:i().string,basename:i().string.isRequired}),id:i().string,timestamp:i().string})};var X=t(44290),_=t(11427),V=t(78675),H=t(56177),$=["basename","animateOnLoad"],Y=t(77468),z=t(93555),J=["staticResourcePath","animationResourcePath","resourceWidth","resourceHeight","shouldAnimate"];class K extends n.PureComponent{render(){var e=this.props,{staticResourcePath:s,animationResourcePath:t,resourceWidth:a,resourceHeight:n,shouldAnimate:r}=e,i=function(e,s){if(null==e)return{};var t={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(s.includes(a))continue;t[a]=e[a]}return t}(e,J),o=(0,z.$)(t);return r&&o?(0,v.jsx)("div",Object.assign({},i,{children:(0,v.jsx)(Y.PresentsAnimation,{cheerName:o})})):(0,v.jsx)(O.$,Object.assign({},i,{path:s,resourceWidth:a,resourceHeight:n}))}}K.propTypes={staticResourcePath:i().string,animationResourcePath:i().string,shouldAnimate:i().bool,resourceWidth:i().number,resourceHeight:i().number};var Q=function(e){class s extends n.Component{constructor(){var e;super(...arguments),e=this,this.state={animating:!1},this.onMouseEnter=function(){!e.state.animating&&e.props.animateOnMouseEnter&&(e.animate(),e.props.onMouseEnter&&e.props.onMouseEnter(...arguments))},this.animateOrPlaySound=()=>{this.props.basename?X.k.shared().has(this.props.basename).pipe((0,H.s)(1)).safeSubscribe(e=>{e?this.animate():this.playSound()}):this.playSound()},this.playSound=()=>{var e=V.T.shared(),s=(0,_.A)(["notifications","sounds","cheer"],e);if(s&&s.length){var t=new Audio;t.volume=s[0].volume,t.src=window.location.protocol+"//"+e.host+s[0].src,t.play()}},this.animate=()=>{this.props.basename&&X.k.shared().has(this.props.basename).pipe((0,H.s)(1)).safeSubscribe(e=>{if(e){var s=V.T.shared()["cheers-animation-time"];this.setState({animating:!0},()=>{setTimeout(()=>{this.setState({animating:!1})},s)})}})}}
3componentDidMount(){this.props.animateOnLoad&&this.animateOrPlaySound()}render(){var s=this.props,{basename:t}=s,a=function(e,s){if(null==e)return{};var t={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(s.includes(a))continue;t[a]=e[a]}return t}(s,$);return(0,v.jsx)(e,Object.assign({},a,{staticResourcePath:t,animationResourcePath:t,shouldAnimate:this.state.animating,onMouseEnter:this.onMouseEnter}))}}return s.displayName="components.Chat.cheer.controller",s.propTypes={animateOnLoad:i().bool,basename:i().string,onMouseEnter:i().func,animateOnMouseEnter:i().bool},s}(K),Z=t(78186);class ee extends n.PureComponent{constructor(){super(...arguments),this.setupCheerRef=e=>{this.cheerRef=e},this.resend=()=>{this.props.onResendButtonClick&&this.props.onResendButtonClick(this.props.message)}}componentDidUpdate(e){this.props.message.outgoing&&e.message.status!==S.n.Delivered&&this.props.message.status===S.n.Delivered&&this.cheerRef&&this.cheerRef.animateOrPlaySound()}render(){return(0,v.jsx)("div",{children:(0,v.jsxs)("div",{className:"message-item",children:[(0,v.jsx)(Q,{basename:this.props.message.content.basename,animateOnLoad:!this.props.message.outgoing&&!this.props.message.read,animateOnMouseEnter:!1,resourceWidth:180,resourceHeight:180,className:"cheer",ref:this.setupCheerRef}),this.props.message.status===S.n.Unpaid&&(0,v.jsx)("div",{className:"message-item-container",children:(0,v.jsx)("button",{type:"button",className:"resend-cheer",onClick:this.resend,disabled:this.props.disabled,children:(0,v.jsx)(Z.X,{href:"/dialogs/messages#resend"})})})]})})}}ee.displayName="components.Chat.log.message.cheer",ee.propTypes={message:i().shape({outgoing:i().bool,read:i().bool,status:i().number,content:i().shape({basename:i().string})}),disabled:i().bool,onResendButtonClick:i().func};var es=t(72323);function et(e){var s=(0,n.useMemo)(()=>e.opacity?{opacity:e.opacity}:{},[e.opacity]);return(0,v.jsxs)("div",{className:"letter-cover-container",children:[(0,v.jsx)("div",{className:"letter-cover",style:s,children:(0,v.jsx)(O.$,{path:e.coverPath,resourceWidth:360,resourceHeight:80,className:"letter-cover-img"})}),(0,v.jsx)("div",{className:"letter-content",children:e.children})]})}function ea(e){var{children:s,cover:t,opacity:a}=e,r=(0,n.useMemo)(()=>(0,C.Nj)(t),[t]);return(0,v.jsx)(et,{coverPath:r,opacity:a,children:s})}var en=t(54149);function er(e){return(0,v.jsx)("div",{className:"message-item",children:(0,v.jsx)(ea,{cover:e.cover,opacity:.3,children:(0,v.jsxs)("div",{className:"letter-item",onClick:e.onReadLetterClick,children:[(0,v.jsx)("div",{className:"text-wrapper",children:(0,v.jsx)(b.s,{text:e.text})}),(0,v.jsx)(en.A,{typeClass:"read-letter-btn",size:"medium",children:(0,v.jsx)(Z.X,{href:"/users/email#read-email"})})]})})})}var ei=t(22643);function eo(e){var{letter:s}=e,t=(0,n.useCallback)(()=>{var e={id:s.id,sender:s.sender,recipient:s.recipient};(0,ei.f)(e).safeSubscribe()},[s]);return(0,v.jsx)(er,{text:s.text,cover:s.cover,onReadLetterClick:t})}var ed=t(46774);class el extends n.Component{componentDidMount(){this.props.onShow&&this.props.onShow(this.props.message)}render(){var e=this.props,s=d()({message:!0,outgoing:e.message.outgoing,incoming:!e.message.outgoing,unpaid:e.message.status===S.n.Unpaid,sending:e.message.status===S.n.Sending,withBlurTextMessageBackgroun
3d:e.withBlurTextMessageBackground});return(0,v.jsxs)("div",{className:"message-container",children:[!!this.props.message.firstMessageOfTalk&&(0,v.jsx)("div",{className:"date",children:(0,v.jsx)(es.T,{date:e.message.timestamp})}),(0,v.jsxs)("div",{className:s,"data-tag":e.message.tag,children:[e.message.type===M.Go.Voice&&(0,v.jsx)(ed.Q,{message:e.message,messagesReactionsEnabled:e.messagesReactionsEnabled}),e.message.type===M.Go.Text&&(0,v.jsx)(x,{message:e.message}),e.message.type===M.Go.Sticker&&(0,v.jsx)(W,{message:e.message}),(e.message.type===M.Go.Photo||e.message.type===M.Go.Video)&&(0,v.jsx)(q,{message:e.message,bus:this.props.bus}),e.message.type===M.Go.Cheer&&(0,v.jsx)(ee,{message:e.message,disabled:e.disabled,onResendButtonClick:this.props.onResendButtonClick}),e.message.type===M.Go.Letter&&(0,v.jsx)(eo,{letter:e.message.content})]})]})}}el.displayName="components.Chat.log.message.view",el.propTypes={message:i().shape({outgoing:i().bool,status:i().number,type:i().number,content:i().oneOfType([i().shape({type:i().string}),i().string]),tag:i().string.isRequired,firstMessageOfTalk:i().bool}).isRequired,onShow:i().func,disabled:i().bool,onResendButtonClick:i().func,bus:i().object,withBlurTextMessageBackgroun
3d:i().bool,messagesReactionsEnabled:i().bool};var ec=el},33215(e,s,t){"use strict";t.r(s),t.d(s,{UserNameBasedText:()=>u});var a,n=t(42062),r=t(39067),i=t.n(r),o=t(30110),d=t(33457),l=t(31085),c=t(78186);class p extends n.PureComponent{render(){return(0,l.jsx)(c.X,{href:this.props.template,data:this.props.data})}}p.displayName="components.Chat.user.name-based-text.view",p.propTypes={template:i().string,data:i().object};var u=((a=(0,d.X)((e,s)=>{var{useDistinct:t}=s,a=t((e,s)=>s?s(e):{name:e},e.user&&e.user.name,e.prepareData);return(0,l.jsx)(p,{data:a,template:e.template})})).propTypes={userId:i().string,template:i().string},(0,o.C)({userIdPropName:"userId"})(a))},37181(e,s,t){"use strict";t.d(s,{A:()=>c});var a=t(4088),n=t(84401),r=t(98621),i=t.n(r),o=t(5666),d=new(i());function l(e){var{identity:s,attendee:t}=(0,a.Fg)(e);class r{constructor(){this.send=(r,i)=>(d,l)=>{o.j.shared().currentTime().safeSubscribe(o=>{l.get(a.Ay,e).actions.patch({tag:i||(0,a.w0)(s),sender:s,recipient:t,text:"Sent a media.",timestamp:o,status:n.R.Sending,meta:{localSource:r}}),d(null)})},this.resend=s=>(t,r)=>{var i=r.get(a.Ay,e),d=i.store.getState().messages.find(e=>e.tag===s);d?o.j.shared().currentTime().safeSubscribe(e=>{i.actions.patch(Object.assign({},d,{timestamp:e,status:n.R.Sending})),t(null)}):t(null)},d.emit("created",e)}}return r.displayName=l.getDisplayName(e),r}l.getDisplayName=function(e){return"dialogs-usermedia."+e},l.addListener=function(){d.addListener(...arguments)},l.removeListener=function(){d.removeListener(...arguments)};let c=l},28015(e,s,t){"use strict";function a(e){class s{constructor(){this.state={}}}return s.displayName=a.getDisplayName(e),s}t.d(s,{A:()=>n}),a.getDisplayName=function(e){return"dialogs-usermedia."+e};let n=a},89383(e,s,t){"use strict";t.d(s,{N:()=>n});var a=t(25680);function n(e){let{attendeeId:s,tag:t,messageText:n,placement:r,selectedSuggestion:i}=e;if(!i||!i.requestId)return;let{suggestion:o,requestId:d,lastMessageId:l}=i;a.c.logMessageSent({attendeeId:s,tag:t,messageText:n,suggestion:o,requestId:d,lastMessageId:l,sentFrom:"default",placement:r})}}}]);
4//# sourceMappingURL=sourcemaps/f595baa3c237b089.js.map
5//# debugId=04ba15c2-012c-55ee-9c2d-454f673449c2

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.