1"use strict"; 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]="94972d1d-e24f-537a-a2d5-b99b6f61d340")}catch(e){}}(); 3(self.webpackChunkclient=self.webpackChunkclient||[]).push([["6126"],{39151(e,t,a){a.d(t,{i:()=>q});var r=a(42062);let i="chat-menu-panel-slim__flexibleItem";var o=a(98153),n=a(53037),s=a(81924),c=a(31085);let l=(0,r.memo)(e=>{var{active:t,variant:a,onClick:r}=e,i=t?"secondary":"action-gray";return(0,c.jsx)(n.D,{icon:"chat",iconColor:"var(--sdv-"+i+"-color)",variant:a,active:t,onClick:r,dataTestId:"chat-menu-panel-item-chat",children:(0,c.jsx)(s.LocalizedText,{href:"/dialogs/messages#chat",variant:"footnote-1",color:t?"secondary":"action-gray"})})});var d=(0,r.memo)(e=>{var{variant:t,attendeeId:a,activeTab:i}=e,n=(0,r.useCallback)(()=>{a&&o.A.emit("event.communication.chat.selected",a,{source:"chat-menu",cta:"chat-menu"})},[a]);return(0,c.jsx)(l,{active:"chat"===i,variant:t,onClick:n})});let m=(0,r.memo)(e=>{var{active:t,variant:a,onClick:r}=e,i=t?"secondary":"action-gray";return(0,c.jsx)(n.D,{icon:"mail",iconColor:"var(--sdv-"+i+"-color)",variant:a,active:t,onClick:r,dataTestId:"chat-menu-panel-item-letter",children:(0,c.jsx)(s.LocalizedText,{href:"/dialogs/messages#email",variant:"footnote-1",color:t?"secondary":"action-gray"})})});var u=a(92362),h=a(91994),p=["onClick"],v=e=>{var{onClick:t}=e,a=function(e,t){if(null==e)return{};var a={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.includes(r))continue;a[r]=e[r]}return a}(e,p),i=(0,h.w)(),o=(0,r.useCallback)(()=>{i&&u.a.shared(i).logChatClick("Inbox"),t()},[t,i]);return(0,c.jsx)(m,Object.assign({},a,{onClick:o}))},g=(0,r.memo)(e=>{var{variant:t,attendeeId:a,activeTab:i,type:n}=e,s="letter"===i,l=(0,r.useCallback)(()=>{a&&("default"===n&&o.A.emit("event.communication.letter.selected",a,{source:"chat-menu"}),"recommendation"!==n||s||o.A.emit("overlay","letter",a,{source:"recommendation"}))},[a,n,s]);return(0,c.jsx)(v,{active:s,variant:t,onClick:l})}),x=a(52212),b=a(58137);let f=(0,r.memo)(e=>{var{active:t,variant:a,onClick:r}=e,i=t?"secondary":"action-gray";return(0,c.jsx)(n.D,{icon:"present",iconColor:"var(--sdv-"+i+"-color)",titleClassNames:"chat-menu-panel-item-cheer__title",variant:a,active:t,onClick:r,dataTestId:"chat-menu-panel-item-cheer",children:(0,c.jsx)(s.LocalizedText,{href:"/dialogs/messages#gifts",variant:"footnote-1",color:t?"secondary":"action-gray"})})});var j=a(66691),C=a(51718),_=(0,r.memo)(e=>{var t=(0,j.J2)(()=>C.b.shared().visible,[],!1),a=(0,r.useCallback)(()=>{t?o.A.emit("command.chat.cheers.list.close"):o.A.emit("command.chat.cheers.list.open","cheers-chat")},[t]);return(0,c.jsx)(f,{active:t,variant:e.variant,onClick:a})}),y="slim",T=(0,r.memo)(e=>{var{attendeeId:t,activeTab:a,letterItemVisible:r,giftItemVisible:o,chatItemVisible:n,attachmentItemVisible:s,attachmentItemDisabled:l,smilesItemVisible:m,type:u,cta:h}=e;return(0,c.jsxs)("div",{className:"chat-menu-panel-slim__root",children:[n&&(0,c.jsx)("div",{className:i,children:(0,c.jsx)(d,{variant:y,attendeeId:t,activeTab:a})}),r&&(0,c.jsx)("div",{className:i,children:(0,c.jsx)(g,{variant:y,attendeeId:t,activeTab:a,type:u})}),o&&(0,c.jsx)("div",{className:i,children:(0,c.jsx)(_,{variant:y})}),s&&(0,c.jsx)("div",{className:i,children:(0,c.jsx)(x.K,{variant:y,cta:h,activeTab:a,disabled:l})}),m&&(0,c.jsx)("div",{className:i,children:(0,c.jsx)(b.m,{attendeeId:t,variant:y,cta:h,activeTab:a})})]})});let I="chat-menu-panel-regular__group",k="chat-menu-panel-regular__flexibleItem";var N=a(47562),S=a(20859);let V=(0,r.memo)(e=>{var{variant:t,onClick:a,active:r}=e;return(0,c.jsxs)(n.D,{icon:"text-to-speech",iconColor:r?"var(--sdv-secondary-color)":"var(--sdv-action-gray-color)",variant:t,active:r,onClick:a,dataTestId:"chat-menu-panel-item-text-to-speech",children:[(0,c.jsx)(N.l,{}),(0,c.jsx)(S.n,{}),(0,c.jsx)(s.LocalizedText,{href:"/text-to-speech#text-to-speech",variant:"footnote-1",color:r?"secondary":"action-gray"})]})});var w=a(46475),A=a(31249),z=(0,r.memo)(e=>{var{variant:t}=e,a=(0,j.uN)(()=>(0,w.V)(),[]),r=(0,j.J2)(()=>A.j.shared().visible,[],!1);return(0,c.jsx)(V,{variant:t,onClick:a,active:r})}),L="regular",E=(0,r.memo)(e=>{var{attendeeId:t,activeTab:a,letterItemVisible:r,giftItemVisible:i,chatItemVisible:o,attachmentItemVisible:n,attachmentItemDisabled:s,textToSpeechVisible:l,smilesItemVisible:m,type:u,cta:h}=e;return(0,c.jsxs)("div",{className:"chat-menu-panel-regular__root",children:[(0,c.jsxs)("div",{className:I,children:[o&&(0,c.jsx)("div",{className:k,children:(0,c.jsx)(d,{variant:L,attendeeId:t,activeTab:a})}),r&&(0,c.jsx)("div",{className:k,children:(0,c.jsx)(g,{variant:L,attendeeId:t,activeTab:a,type:u})}),i&&(0,c.jsx)("div",{className:k,children:(0,c.jsx)(_,{variant:L})}),l&&(0,c.jsx)("div",{className:k,children:(0,c.jsx)(z,{variant:L})})]}),(0,c.jsxs)("div",{className:I,children:[n&&(0,c.jsx)("div",{className:k,children:(0,c.jsx)(x.K,{variant:L,cta:h,activeTab:a,attendeeId:t,disabled:s})}),m&&(0,c.jsx)("div",{className:k,children:(0,c.jsx)(b.m,{attendeeId:t,variant:L,cta:h,activeTab:a})})]})]})}
3),J=a(99870),P=a.n(J);let D=(0,r.memo)(e=>{var{attendeeId:t,activeTab:a,letterItemVisible:i,giftItemVisible:o,chatItemVisible:n,attachmentItemVisible:s,attachmentItemDisabled:l,textToSpeechVisible:d,smilesItemVisible:m,type:u,cta:h}=e,p=(0,r.useMemo)(()=>P()("chat-menu-panel__root",{"chat-menu-panel__chat":"chat"===a,"chat-menu-panel__letter":"letter"===a}),[a]);return(0,c.jsxs)("div",{className:p,children:[(0,c.jsx)("div",{className:"chat-menu-panel__slim",children:(0,c.jsx)(T,{attendeeId:t,activeTab:a,letterItemVisible:i,giftItemVisible:o,chatItemVisible:n,attachmentItemVisible:s,attachmentItemDisabled:l,smilesItemVisible:m,type:u,cta:h})}),(0,c.jsx)("div",{className:"chat-menu-panel__regular",children:(0,c.jsx)(E,{attendeeId:t,activeTab:a,letterItemVisible:i,giftItemVisible:o,chatItemVisible:n,attachmentItemVisible:s,attachmentItemDisabled:l,textToSpeechVisible:d,smilesItemVisible:m,type:u,cta:h})})]})});var M=a(66382),O=a(90133),R=a(28138),F=a(75841),B=a(17524),Q=a(14321),W=a(85712),U=a(68989),G=a(78515),Z=a(14815),K=a(13462),q=(0,r.memo)(e=>{var{userId:t,attendeeId:a,cta:r,type:i="default",activeTab:o}=e,n=(0,j.J2)(()=>o?(0,F.of)(o):M.j.shared().tab,[o]),s=(0,j.J2)(()=>W.y.shared().data.pipe((0,R.T)(e=>(null==e?void 0:e.source)!=="overlay-reading-letter")),[],!1),l=(0,j.J2)(()=>K.T.shared().smilesSendingEnabled,[],!1),d=(0,j.J2)(()=>Z.W.shared(t).available,[t],!1),m=(0,j.J2)(()=>a?O.A.shared(t).available(a).pipe((0,R.T)(e=>!(!e.available&&e.reasons.includes("new-customer-letter-sending"))&&("recommendation"===i||!!s&&e.available))):(0,F.of)(!0),[t,a,s,i],!0),u=(0,j.J2)(()=>(0,B.z)([Q.f.shared(t).userIsFeaturedMember,Q.f.shared(a).userIsReviewer]).pipe((0,R.T)(e=>{var[t,a]=e;return t&&a})),[t,a],!1),h=(0,U.a)({placement:n}),p="chat"===n&&h,v="chat"!==n||"recommendation"!==i,g=(0,j.J2)(()=>a?G.s.shared().available(a):(0,F.of)(!1),[a],!1),x="chat"===n&&g,b=l&&!(d&&"chat"===n);return(0,c.jsx)(D,{attendeeId:a,activeTab:n,letterItemVisible:m,giftItemVisible:p,chatItemVisible:s,attachmentItemVisible:v,attachmentItemDisabled:u,textToSpeechVisible:x,smilesItemVisible:b,type:i,cta:r})})},52212(e,t,a){a.d(t,{K:()=>I});var r=a(42062),i=a(66691),o=a(98153),n=a(53037),s=a(81924),c=a(97314),l=a(99870),d=a.n(l),m=a(31085),u=["fr-FR","it-IT","de-DE"];let h=(0,r.memo)(e=>{var{active:t,context:a,variant:i,voiceMessagesAvailable:o,language:l,onClick:h,textToSpeechEnabled:p,disabled:v,unifiedAttachmentNameEnabled:g}=e,x=u.includes(l),b=t?"secondary":"action-gray",f=t?"secondary":"action-gray",j="regular"===i&&"chat"===a,C="regular"===i&&"letter"===a,_=j&&o||g?"attach":"photo",y=(0,r.useMemo)(()=>d()({"chat-menu-panel-item-attachment__regularChat":j&&!x,"chat-menu-panel-item-attachment__regularWideChat":j&&x&&!o,"chat-menu-panel-item-attachment__regularWideVoiceChat":j&&x&&o,"chat-menu-panel-item-attachment__textToSpeech":j&&p,"chat-menu-panel-item-attachment__regularLetter":C&&!x,"chat-menu-panel-item-attachment__regularWideLetter":C&&x,"chat-menu-panel-item-attachment__introductory":"introductory"===a}),[a,x,j,C,o,p]);return(0,m.jsx)(n.D,{titleClassNames:y,icon:_,iconColor:"var(--sdv-"+b+"-color)",variant:i,active:t,onClick:h,dataTestId:"chat-menu-panel-item-attachment",disabled:v,children:g?(0,m.jsx)(s.LocalizedText,{href:"/commons#media",variant:"footnote-1",color:f}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(s.LocalizedText,{href:"/commons#photo",variant:"footnote-1",color:f}),(0,m.jsx)(c.E,{content:"/",variant:"footnote-1",color:f}),(0,m.jsx)(s.LocalizedText,{href:"/commons#video",variant:"footnote-1",color:f}),o&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(c.E,{content:"/",variant:"footnote-1",color:f}),(0,m.jsx)(s.LocalizedText,{href:"/commons#audio",variant:"footnote-1",color:f})]})]})})});var p=a(70109),v=a(13462),g=a(26551),x=a(39971),b=a(43694),f=a(78515),j=a(75841),C=a(92362),_=a(91994),y=["onClick","context"],T=e=>{var{onClick:t,context:a}=e,i=function(e,t){if(null==e)return{};var a={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.includes(r))continue;a[r]=e[r]}return a}(e,y),o=(0,_.w)(),n=(0,r.useCallback)(()=>{o&&"chat"===a&&C.a.shared(o).logChatClick("Photo/Video"),t()},[t,o,a]);return(0,m.jsx)(h,Object.assign({},i,{context:a,onClick:n}))},I=(0,r.memo)(e=>{var t,{activeTab:a,variant:n,introductory:s=!1,cta:c,attendeeId:l,disabled:d=!1}=e,u=function(e,t){var[a,i]=(0,r.useState)(!1),[n,s]=(0,r.useState)(!1),[c,l]=(0,r.useState)(!1);return((0,r.useEffect)(()=>(o.A.sync("popup.state.changed.attachment",i),o.A.sync("popup.state.changed.attachment-letter",s),o.A.sync("popup.state.changed.attachment-introductory",l),()=>{o.A.removeListener("popup.state.changed.attachment",i),o.A.removeListener("popup.state.changed.attachment-letter",s),o.A.removeListener("popup.state.changed.attachment-introductory",l)}),[]),t)?c:"chat"===e?a:n}(a,s),h=(0,i.J2)(()=>g._.shared().language,[],"en-US"),C=null==(t=(0,p.G)())||t,_=(0,i.J2)(()=>v.T.shared().voiceMessagesEnabled,[],!1),y=(0,i.J2)(()=>v.T.shared().extendedPriceShowEnabled,[],!1),I=(0,i.J2)(()=>l?f.s.shared().available(l):(0,j.of)(!1),[l],!1),k="chat"===a&&I,N="chat"===a&&_&&C,S=(0,i.uN)(()=>{var e;return e=(s?"introductory":a)||"chat",x.v.defer(()=>{var t=b.p.shared().getWindowSize().width<=480;return"introductory"===e?o.A.emit(t?"introductory.popup.trigger.attachment.mobile":"introductory.popup.trigger.attachment.default"):"chat"===e?o.A.emit(t?"chat.popup.trigger.attachment.mobile":"chat.popup.trigger.attachment.default"):"letter"===e&&o.A.emit(t?c+".email.popup.trigger.attachment.mobile":c+".email.popup.trigger.attachment.default"),x.v.just(void 0)})},[a,s,c]),V=s?"introductory":a;return(0,m.jsx)(T,{active:u,context:V,variant:n,voiceMessagesAvailable:N,textToSpeechEnabled:k,onClick:S,language:h,disabled:d,unifiedAttachmentNameEnabled:y})})},53037(e,t,a){a.d(t,{D:()=>c});var r=a(99870),i=a.n(r),o=a(78903),n=a(42062),s=a(31085),c=(0,n.memo)((0,n.forwardRef)(function(e,t){var{active:a,icon:r,variant:c,children:l,onClick:d,dataTestId:m,disabled:u=!1}=e,h="regular"===c,p=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),d()},[d]),v=(0,n.useMemo)(()=>i()({"chat-menu-panel-item__slim":"slim"===c,"chat-menu-panel-item__regular":"regular"===c,"chat-menu-panel-item__active":a,"chat-menu-panel-item__disabled":u}),[c,a,u]),g=(0,n.useMemo)(()=>i()("chat-menu-panel-item__title",e.titleClassNames),[e.titleClassNames]),x=(0,n.useMemo)(()=>i()("chat-menu-panel-item__icon",e.iconClassNames),[e.iconClassNames]),b=e.iconColor?e.
3iconColor:"currentColor";return(0,s.jsxs)("button",{ref:t,className:v,onClick:p,"data-test-id":m,disabled:u,children:[(0,s.jsx)("div",{className:x,children:(0,s.jsx)(o.Icon,{name:r,size:"normal",color:b})}),h?(0,s.jsx)("div",{className:g,children:l}):void 0]})}))},58137(e,t,a){a.d(t,{m:()=>j});var r=a(36713),i=a(91994),o=a(42062),n=a(98153),s=a(75841),c=a(28138),l=a(53037),d=a(81924),m=a(99870),u=a.n(m),h=a(31085);let p=(0,o.memo)(e=>{var{active:t,variant:a,context:r,onClick:i,dotStatusVisible:n,newNameEnabled:s,emotionsNameEnabled:c}=e,m=t?"secondary":"action-gray",p="regular"===a&&"letter"===r,v=(0,o.useMemo)(()=>u()({"chat-menu-panel-item-smiles__regularLetter":p,"chat-menu-panel-item-smiles__introductory":"introductory"===r}),[p,r]),g=(0,o.useMemo)(()=>u()({"chat-menu-panel-item-smiles__dotStatus":n}),[n]),x="chat"===r,b=c&&(x||"letter"===r),f=s&&x&&!b?"stickers":"smile",j=b?"/dialogs/messages#emotions":s&&x?"/dialogs/messages#stickers":"/dialogs/messages#smiles";return(0,h.jsx)(l.D,{titleClassNames:v,iconClassNames:g,icon:f,iconColor:"var(--sdv-"+m+"-color)",variant:a,active:t,onClick:i,dataTestId:"chat-menu-panel-item-smiles",children:(0,h.jsx)(d.LocalizedText,{href:j,variant:"footnote-1",color:t?"secondary":"action-gray"})})});var v=a(92362),g=["onClick","context"],x=a(66691),b=a(13462),f=e=>{var{onClick:t,context:a}=e,r=function(e,t){if(null==e)return{};var a={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.includes(r))continue;a[r]=e[r]}return a}(e,g),n=(0,i.w)(),s=(0,o.useCallback)(()=>{n&&"chat"===a&&v.a.shared(n).logChatClick("Smiles"),t()},[t,n,a]);return(0,h.jsx)(p,Object.assign({},r,{context:a,onClick:s}))},j=(0,o.memo)(e=>{var{activeTab:t,variant:a,introductory:l=!1,cta:d,attendeeId:m}=e,u=function(e){var[t,a]=(0,o.useState)(null);return(0,o.useEffect)(()=>{function e(e){a(e?"chat":null)}function t(e){a(e?"letter":null)}function r(e){a(e?"introductory":null)}return n.A.sync("popup.state.changed.smiles-chat",e),n.A.sync("popup.state.changed.smiles-letter",t),n.A.sync("popup.state.changed.smiles-introductory",r),()=>{n.A.removeListener("popup.state.changed.smiles-chat",e),n.A.removeListener("popup.state.changed.smiles-letter",t),n.A.removeListener("popup.state.changed.smiles-introductory",r)}},[]),e===t}(l?"introductory":t||"chat"),p=(0,x.J2)(()=>b.T.shared().stickersPanelNewNameEnabled,[],!1),v=(0,x.J2)(()=>b.T.shared().extendedPriceShowEnabled,[],!1),g=(0,i.w)(),j=(0,x.J2)(()=>g&&"chat"===t?r.n.shared(g).stickerPacks(m||void 0).pipe((0,c.T)(e=>e.some(e=>"unseen"===e.visibilityStatus))):(0,s.of)(!1),[t,m,g],!1),C=(0,o.useCallback)(()=>l?n.A.emit("introductory.popup.trigger.smiles"):"chat"===t?n.A.emit("chat.popup.trigger.smiles"):"letter"===t?n.A.emit(d+".email.popup.trigger.smiles"):void 0,[t,l,d]),_=l?"introductory":t;return(0,h.jsx)(f,{active:u,variant:a,context:_,onClick:C,dotStatusVisible:j,newNameEnabled:p,emotionsNameEnabled:v})})},20859(e,t,a){a.d(t,{n:()=>p});var r=a(42062),i=a(64147),o=a(64651),n=a(27680),s=a(91994),c=a(14394),l=a(81924),d=a(99870),m=a.n(d),u=a(31085);let h=(0,r.memo)(e=>{var{onCloseButtonClick:t,arrowPlacement:a}=e,i=(0,u.jsx)("div",{className:"chat-text-to-speech-button-onboarding-tooltip-farewell-tooltip__content",children:(0,u.jsx)(l.L
3ocalizedText,{href:"/text-to-speech#text-to-speech-farewell-tooltip-description",variant:"footnote-2",color:"light"})}),o=(0,r.useCallback)(e=>{e.stopPropagation()},[]),n=m()("chat-text-to-speech-button-onboarding-tooltip-farewell-tooltip__container",{"chat-text-to-speech-button-onboarding-tooltip-farewell-tooltip__top":"top"===a,"chat-text-to-speech-button-onboarding-tooltip-farewell-tooltip__topRight":"topRight"===a});return(0,u.jsx)("div",{className:n,onClick:o,children:(0,u.jsx)(c.Z,{title:i,variant:"second-accent",arrowPlacement:a,onCloseButtonClick:t})})});var p=(0,r.memo)(e=>{var{arrowPlacement:t="top"}=e,a=(0,s.w)(),{offer:c,acceptOffer:l,rejectOffer:d}=(0,i.g)(a?n.XN.shared(a):void 0),m=(0,r.useCallback)(()=>{null==l||l()},[l]);return(0,o.Fd)(()=>{null==d||d()},[d]),c?(0,u.jsx)(h,{onCloseButtonClick:m,arrowPlacement:t}):null})},47562(e,t,a){a.d(t,{l:()=>p});var r=a(42062),i=a(64147),o=a(64651),n=a(27616),s=a(91994),c=a(14394),l=a(81924),d=a(99870),m=a.n(d),u=a(31085);let h=(0,r.memo)(e=>{var{onCloseButtonClick:t,arrowPlacement:a}=e,i=(0,u.jsxs)("div",{className:"chat-text-to-speech-button-onboarding-tooltip__content",children:[(0,u.jsx)("div",{children:(0,u.jsx)(l.L
3ocalizedText,{href:"/text-to-speech#text-to-speech-tooltip-title",variant:"footnote-1",color:"light"})}),(0,u.jsx)("div",{children:(0,u.jsx)(l.LocalizedText,{href:"/text-to-speech#text-to-speech-tooltip-description",variant:"footnote-2",color:"light"})})]}),o=(0,r.useCallback)(e=>{e.stopPropagation()},[]),n=m()("chat-text-to-speech-button-onboarding-tooltip__container",{"chat-text-to-speech-button-onboarding-tooltip__top":"top"===a,"chat-text-to-speech-button-onboarding-tooltip__topRight":"topRight"===a});return(0,u.jsx)("div",{className:n,onClick:o,children:(0,u.jsx)(c.Z,{title:i,variant:"second-accent",arrowPlacement:a,onCloseButtonClick:t})})});var p=(0,r.memo)(e=>{var{arrowPlacement:t="top"}=e,a=(0,s.w)(),{offer:c,acceptOffer:l,rejectOffer:d}=(0,i.g)(a?n.zr.shared(a):void 0),m=(0,r.useCallback)(()=>{null==l||l()},[l]);return(0,o.Fd)(()=>{null==d||d()},[d]),c?(0,u.jsx)(h,{onCloseButtonClick:m,arrowPlacement:t}):null})},22783(e,t,a){a.d(t,{J:()=>h});var r=a(42062),i=a(17524),o=a(28138),n=a(66691),s=a(13462),c=a(99870),l=a.n(c),d=a(15782),m=a(31085);let u=(0,r.memo)(e=>{var{price:t,className:a}=e,i=(0,d.A)("call","call-price-badge",{count:t}),o=(0,r.useMemo)(()=>l()("call-price-badge__badge",a),[a]);return(0,m.jsx)("span",{className:o,children:i})});var h=(0,r.memo)(e=>{var{type:t,className:a}=e,r=(0,n.J2)(()=>{var e=s.T.shared(),a="audio"===t?e.mcs.audioCallMinuteCost:e.videoChatPrices.pipe((0,o.T)(e=>e.twoWay));return(0,i.z)([e.callPriceEnabled,a]).pipe((0,o.T)(e=>{var[t,a]=e;return t&&a>0?a:0}))},[t],0);return r?(0,m.jsx)(u,{price:r,className:a}):null})},34679(e,t,a){a.d(t,{V:()=>n,j:()=>s});var r=a(98153),i=a(56823),o=a(79942),n=()=>(0,i.O)(0).toSingle().pipe((0,o.ex)(()=>{r.A.emit("chat.popup.trigger.voice-panel-container")}),(0,o.AB)(void 0)),s=()=>{r.A.emit("popup.close.voice-panel-container")}},78515(e,t,a){a.d(t,{s:()=>d});var r=a(15526),i=a(17524),o=a(75841),n=a(13462),s=a(84190),c=a(28138),l=a(14540);class d{available(e){return(0,i.z)([n.T.shared().textToSpeechCopilotEnabled,n.T.shared().textToSpeechEnabled]).pipe((0,s.n)(t=>{var[a,r]=t;return a&&r?l.r.shared(e).tags.pipe((0,c.T)(e=>e.includes("experiments.dialogs.copilot.voice.generation.user"))):(0,o.of)(!1)}))}}d.shared=(0,r.G)(()=>new d)},63165(e,t,a){a.d(t,{q:()=>o});var r=a(15526),i=a(12640);class o{constructor(e){this.userId=e}logVoiceMessageSent(e){var{attendeeId:t,voiceMessageText:a,messageId:r,attachmentId:o}=e;i._.shared(this.userId).logEvent("dialog-context-ai-voice-sent..theone",{"user-id":this.userId,"attendee-id":t,"voice-message-text":a,"message-id":r,"attachment-id":o}).safeSubscribe()}logOpenTextToSpeechButtonClicked(e){var{attendeeId:t,sampleUploaded:a}=e;i._.shared(this.userId).logEvent("dialog-context-speech-to-text-button-clicked..theone",{"user-id":this.userId,"attendee-id":t,"sample-uploaded":a}).safeSubscribe()}logVoiceSampleUploaded(e){var{sampleType:t}=e;i._.shared(this.userId).logEvent("dialog-context-voice-sample-uploaded..theone",{"user-id":this.userId,"sample-type":t}).safeSubscribe()}}o.shared=(0,r.G)(e=>new o(e))},46475(e,t,a){a.d(t,{V:()=>v});var r,i=a(34679),o=a(63165),n=a(45482),s=a(5801),c=a(84190),l=a(92453),d=a(97983),m=a(28939),u=a(79942),h=a(17524),p=a(66382),v=(r=()=>(0,i.V)(),()=>r().pipe((0,u.Fg)(()=>(0,h.z)([n.Session.shared().userId.pipe((0,s.o)()),p.j.shared().chatAttendee.pipe((0,s.o)())]).pipe((0,c.n)(e=>{var[t,a]=e;return m.c.shared(t).userVoice.pipe((0,l.M)(e=>{o.q.shared(t).logOpenTextToSpeechButtonClicked({attendeeId:a,sampleUploaded:!!(null!=e&&e.voiceId)})}))}),(0,d.u)(void 0)).toSingle())))},28939(e,t,a){a.d(t,{c:()=>v});var r=a(15526),i=a(97156),o=a(17524),n=a(84190),s=a(28138),c=a(39971),l=a(13462),d=a(79942),m=a(30131),u=a(48830),h=a(91885),p=a(98086);class v{constructor(e){this.userId=e,this.recordedVoice=new i.t(void 0),this.userVoice=(0,o.z)([p.d.shared(this.userId).api.pipe((0,n.n)(t=>t.getUserVoice({userId:e}))),this.recordedVoice.asObservable()]).pipe((0,s.T)(e=>{var t,a,[r,i]=e;return{voiceId:null!=(t=null==(a=r[0])?void 0:a.voice_id)?t:void 0,recordedVoice:i}}))}setRecordedVoiceSample(e,t){return(0,o.z)([l.T.shared().textToSpeechVoiceSettings.minDurationSec,l.T.shared().textToSpeechVoiceSettings.maxSizeMb]).toSingle().pipe((0,d.Fg)(a=>{var[r,i]=a;return(0,m.H)(e.arrayBuffer()).pipe((0,n.n)(e=>{var t=new AudioContext;return new u.c(a=>{t.decodeAudioData(e,e=>{a.next(e),a.complete()},e=>a.error(e))})}),(0,s.T)(t=>({duration:t.duration,length:t.length,numberOfChannels:t.numberOfChannels,sampleRate:t.sampleRate,size:e.size}
3))).toSingle().pipe((0,d.vV)(a=>{var{duration:o,size:n}=a;return n/1024/1024>i?h.Q.failure({type:"sample-is-too-large",payload:{maxSizeMb:i}}):o<r?h.Q.failure({type:"sample-is-too-short",payload:{minDurationSec:r}}):(this.recordedVoice.next({file:e,meta:a,type:t}),h.Q.success({}))}),(0,d.ZC)(()=>c.v.just(h.Q.failure({type:"audio-decode-error"}))))}))}confirmRecordedVoiceSample(){return this.recordedVoice.toSingle().pipe((0,d.Fg)(e=>null!=e&&e.file?p.d.shared(this.userId).api.pipe((0,n.n)(t=>t.setUserVoice({userId:this.userId,audioData:e.file}))).toSingle().pipe((0,d.vV)(()=>h.Q.success({})),(0,d.ZC)(()=>c.v.just(h.Q.failure("error-when-setting-voice")))):c.v.just(h.Q.failure("no-recorded-voice"))))}}v.shared=(0,r.G)(e=>new v(e))}}]); 4//# sourceMappingURL=sourcemaps/6126.3327d3362b61a517.js.map 5//# debugId=94972d1d-e24f-537a-a2d5-b99b6f61d340
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.