isometrik-chat 3.9.8 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -203,4 +203,4 @@ t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,f=c>>1,u=-7,l=n?i-1:0,d=
|
|
|
203
203
|
animation-iteration-count: infinite;
|
|
204
204
|
animation-delay: 200ms;
|
|
205
205
|
}
|
|
206
|
-
`),ig.rippleVisible,lg,550,({theme:e})=>e.transitions.easing.easeInOut,ig.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,ig.child,ig.childLeaving,dg,550,({theme:e})=>e.transitions.easing.easeInOut,ig.childPulsate,hg,({theme:e})=>e.transitions.easing.easeInOut);var bg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=n,s=Object(ue.a)(n,og),[c,u]=r.useState([]),l=r.useRef(0),d=r.useRef(null);r.useEffect(()=>{d.current&&(d.current(),d.current=null)},[c]);const h=r.useRef(!1),p=r.useRef(0),v=r.useRef(null),b=r.useRef(null);r.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const m=r.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;u(e=>[...e,Object(f.jsx)(vg,{classes:{ripple:Object(le.a)(o.ripple,ig.ripple),rippleVisible:Object(le.a)(o.rippleVisible,ig.rippleVisible),ripplePulsate:Object(le.a)(o.ripplePulsate,ig.ripplePulsate),child:Object(le.a)(o.child,ig.child),childLeaving:Object(le.a)(o.childLeaving,ig.childLeaving),childPulsate:Object(le.a)(o.childPulsate,ig.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},l.current)]),l.current+=1,d.current=a},[o]),g=r.useCallback((e={},t={},n=(()=>{}))=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&h.current)return void(h.current=!1);"touchstart"===(null==e?void 0:e.type)&&(h.current=!0);const s=a?null:b.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let f,u,l;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)f=Math.round(c.width/2),u=Math.round(c.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;f=Math.round(t-c.left),u=Math.round(n-c.top)}if(o)l=Math.sqrt((2*c.width**2+c.height**2)/3),l%2==0&&(l+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-f),f)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;l=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===v.current&&(v.current=()=>{m({pulsate:r,rippleX:f,rippleY:u,rippleSize:l,cb:n})},p.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},80)):m({pulsate:r,rippleX:f,rippleY:u,rippleSize:l,cb:n})},[i,m]),y=r.useCallback(()=>{g({},{pulsate:!0})},[g]),w=r.useCallback((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&v.current)return v.current(),v.current=null,void(p.current=setTimeout(()=>{w(e,t)}));v.current=null,u(e=>e.length>0?e.slice(1):e),d.current=t},[]);return r.useImperativeHandle(t,()=>({pulsate:y,start:g,stop:w}),[y,g,w]),Object(f.jsx)(pg,Object(fe.a)({className:Object(le.a)(ig.root,o.root,a),ref:b},s,{children:Object(f.jsx)(tg,{component:null,exit:!0,children:c})}))}));function mg(e){return Object(ke.a)("MuiButtonBase",e)}var gg=Object(je.a)("MuiButtonBase",["root","disabled","focusVisible"]);const yg=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],wg=Object(we.a)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&."+gg.disabled]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});var _g=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:c="button",disabled:u=!1,disableRipple:l=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:p="a",onBlur:v,onClick:b,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:w,onKeyDown:_,onKeyUp:x,onMouseDown:j,onMouseLeave:k,onMouseUp:O,onTouchEnd:S,onTouchMove:E,onTouchStart:C,tabIndex:A=0,TouchRippleProps:P,touchRippleRef:M,type:I}=n,R=Object(ue.a)(n,yg),T=r.useRef(null),L=r.useRef(null),D=Object(Me.a)(L,M),{isFocusVisibleRef:B,onFocus:N,onBlur:F,ref:U}=Object(Km.a)(),[z,W]=r.useState(!1);u&&z&&W(!1),r.useImperativeHandle(i,()=>({focusVisible:()=>{W(!0),T.current.focus()}}),[]);const[V,H]=r.useState(!1);r.useEffect(()=>{H(!0)},[]);const Y=V&&!l&&!u;function G(e,t,n=d){return Object(Xm.a)(r=>{t&&t(r);return!n&&L.current&&L.current[e](r),!0})}r.useEffect(()=>{z&&h&&!l&&V&&L.current.pulsate()},[l,h,z,V]);const q=G("start",j),X=G("stop",m),K=G("stop",g),Z=G("stop",O),$=G("stop",e=>{z&&e.preventDefault(),k&&k(e)}),Q=G("start",C),J=G("stop",S),ee=G("stop",E),te=G("stop",e=>{F(e),!1===B.current&&W(!1),v&&v(e)},!1),ne=Object(Xm.a)(e=>{T.current||(T.current=e.currentTarget),N(e),!0===B.current&&(W(!0),w&&w(e)),y&&y(e)}),re=()=>{const e=T.current;return c&&"button"!==c&&!("A"===e.tagName&&e.href)},ie=r.useRef(!1),oe=Object(Xm.a)(e=>{h&&!ie.current&&z&&L.current&&" "===e.key&&(ie.current=!0,L.current.stop(e,()=>{L.current.start(e)})),e.target===e.currentTarget&&re()&&" "===e.key&&e.preventDefault(),_&&_(e),e.target===e.currentTarget&&re()&&"Enter"===e.key&&!u&&(e.preventDefault(),b&&b(e))}),ae=Object(Xm.a)(e=>{h&&" "===e.key&&L.current&&z&&!e.defaultPrevented&&(ie.current=!1,L.current.stop(e,()=>{L.current.pulsate(e)})),x&&x(e),b&&e.target===e.currentTarget&&re()&&" "===e.key&&!e.defaultPrevented&&b(e)});let se=c;"button"===se&&(R.href||R.to)&&(se=p);const ce={};"button"===se?(ce.type=void 0===I?"button":I,ce.disabled=u):(R.href||R.to||(ce.role="button"),u&&(ce["aria-disabled"]=u));const he=Object(Me.a)(t,U,T);const pe=Object(fe.a)({},n,{centerRipple:o,component:c,disabled:u,disableRipple:l,disableTouchRipple:d,focusRipple:h,tabIndex:A,focusVisible:z}),ve=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=Object(de.a)(o,mg,i);return n&&r&&(a.root+=" "+r),a})(pe);return Object(f.jsxs)(wg,Object(fe.a)({as:se,className:Object(le.a)(ve.root,s),ownerState:pe,onBlur:te,onClick:b,onContextMenu:X,onFocus:ne,onKeyDown:oe,onKeyUp:ae,onMouseDown:q,onMouseLeave:$,onMouseUp:Z,onDragLeave:K,onTouchEnd:J,onTouchMove:ee,onTouchStart:Q,ref:he,tabIndex:u?-1:A,type:I},ce,R,{children:[a,Y?Object(f.jsx)(bg,Object(fe.a)({ref:D,center:o},P)):null]}))}));n(105);var xg=Object(je.a)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var jg=Object(je.a)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function kg(e){return Object(ke.a)("MuiListItemSecondaryAction",e)}Object(je.a)("MuiListItemSecondaryAction",["root","disableGutters"]);const Og=["className"],Sg=Object(we.a)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>Object(fe.a)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),Eg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=n,o=Object(ue.a)(n,Og),a=r.useContext(xe),s=Object(fe.a)({},n,{disableGutters:a.disableGutters}),c=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return Object(de.a)(r,kg,n)})(s);return Object(f.jsx)(Sg,Object(fe.a)({className:Object(le.a)(c.root,i),ownerState:s,ref:t},o))}));Eg.muiName="ListItemSecondaryAction";Object(we.a)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>Object(fe.a)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&Object(fe.a)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{["& > ."+jg.root]:{paddingRight:48}},{["&."+xg.focusVisible]:{backgroundColor:(e.vars||e).palette.action.focus},["&."+xg.selected]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&."+xg.focusVisible]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},["&."+xg.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:"1px solid "+(e.vars||e).palette.divider,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Object(we.a)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"});Object(we.a)(_g,{shouldForwardProp:e=>Object(we.b)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>Object(fe.a)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&."+jg.selected]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&."+jg.focusVisible]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${jg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}},["&."+jg.focusVisible]:{backgroundColor:(e.vars||e).palette.action.focus},["&."+jg.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:"1px solid "+(e.vars||e).palette.divider,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}));Object(je.a)("MuiListItemIcon",["root","alignItemsFlexStart"]);Object(we.a)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>Object(fe.a)({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}));var Cg=n(33);function Ag(e){return Object(ke.a)("MuiTypography",e)}Object(je.a)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Pg=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Mg=Object(we.a)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align"+Object(Cg.a)(n.align)],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>Object(fe.a)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),Ig={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Rg={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var Tg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTypography"}),r=(e=>Rg[e]||e)(n.color),i=Bm(Object(fe.a)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:c=!1,noWrap:u=!1,paragraph:l=!1,variant:d="body1",variantMapping:h=Ig}=i,p=Object(ue.a)(i,Pg),v=Object(fe.a)({},i,{align:o,color:r,className:a,component:s,gutterBottom:c,noWrap:u,paragraph:l,variant:d,variantMapping:h}),b=s||(l?"p":h[d]||Ig[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e,s={root:["root",o,"inherit"!==e.align&&"align"+Object(Cg.a)(t),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Object(de.a)(s,Ag,a)})(v);return Object(f.jsx)(Mg,Object(fe.a)({as:b,ref:t,ownerState:v,className:Object(le.a)(m.root,a)},p))}));var Lg=Object(je.a)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);Object(we.a)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& ."+Lg.primary]:t.primary},{["& ."+Lg.secondary]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>Object(fe.a)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}));n(148),n(149);let Dg;function Bg(){if(Dg)return Dg;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Dg="reverse",e.scrollLeft>0?Dg="default":(e.scrollLeft=1,0===e.scrollLeft&&(Dg="negative")),document.body.removeChild(e),Dg}function Ng(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(Bg()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function Fg(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const Ug=["onChange"],zg={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var Wg=Object(km.a)(Object(f.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Vg=Object(km.a)(Object(f.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Hg(e){return Object(ke.a)("MuiTabScrollButton",e)}var Yg=Object(je.a)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);const Gg=["className","slots","slotProps","direction","orientation","disabled"],qg=Object(we.a)(_g,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>Object(fe.a)({width:40,flexShrink:0,opacity:.8,["&."+Yg.disabled]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}));var Xg=r.forwardRef((function(e,t){var n,r;const i=Object(_e.a)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:s={},direction:c}=i,u=Object(ue.a)(i,Gg),l="rtl"===Je().direction,d=Object(fe.a)({isRtl:l},i),h=(e=>{const{classes:t,orientation:n,disabled:r}=e,i={root:["root",n,r&&"disabled"]};return Object(de.a)(i,Hg,t)})(d),p=null!=(n=a.StartScrollButtonIcon)?n:Wg,v=null!=(r=a.EndScrollButtonIcon)?r:Vg,b=ge({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=ge({elementType:v,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return Object(f.jsx)(qg,Object(fe.a)({component:"div",className:Object(le.a)(h.root,o),ref:t,role:null,ownerState:d,tabIndex:null},u,{children:"left"===c?Object(f.jsx)(p,Object(fe.a)({},b)):Object(f.jsx)(v,Object(fe.a)({},m))}))}));function Kg(e){return Object(ke.a)("MuiTabs",e)}var Zg=Object(je.a)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);const $g=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Qg=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Jg=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,ey=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},ty=Object(we.a)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& ."+Zg.scrollButtons]:t.scrollButtons},{["& ."+Zg.scrollButtons]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>Object(fe.a)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{["& ."+Zg.scrollButtons]:{[t.breakpoints.down("sm")]:{display:"none"}}})),ny=Object(we.a)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>Object(fe.a)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),ry=Object(we.a)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>Object(fe.a)({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),iy=Object(we.a)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>Object(fe.a)({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),oy=Object(we.a)((function(e){const{onChange:t}=e,n=Object(ue.a)(e,Ug),i=r.useRef(),o=r.useRef(null),a=()=>{i.current=o.current.offsetHeight-o.current.clientHeight};return Object(Ie.a)(()=>{const e=Object(Fe.a)(()=>{const e=i.current;a(),e!==i.current&&t(i.current)}),n=Object(Ue.a)(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),r.useEffect(()=>{a(),t(i.current)},[t]),Object(f.jsx)("div",Object(fe.a)({style:zg,ref:o},n))}),{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ay={};var sy=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTabs"}),i=Je(),o="rtl"===i.direction,{"aria-label":a,"aria-labelledby":s,action:c,centered:u=!1,children:l,className:d,component:h="div",allowScrollButtonsMobile:p=!1,indicatorColor:v="primary",onChange:b,orientation:m="horizontal",ScrollButtonComponent:g=Xg,scrollButtons:y="auto",selectionFollowsFocus:w,slots:_={},slotProps:x={},TabIndicatorProps:j={},TabScrollButtonProps:k={},textColor:O="primary",value:S,variant:E="standard",visibleScrollbar:C=!1}=n,A=Object(ue.a)(n,$g),P="scrollable"===E,M="vertical"===m,I=M?"scrollTop":"scrollLeft",R=M?"top":"left",T=M?"bottom":"right",L=M?"clientHeight":"clientWidth",D=M?"height":"width",B=Object(fe.a)({},n,{component:h,allowScrollButtonsMobile:p,indicatorColor:v,orientation:m,vertical:M,scrollButtons:y,textColor:O,variant:E,visibleScrollbar:C,fixed:!P,hideScrollbar:P&&!C,scrollableX:P&&!M,scrollableY:P&&M,centered:u&&!P,scrollButtonsHideMobile:!p}),N=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:c}=e,f={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return Object(de.a)(f,Kg,c)})(B),F=ge({elementType:_.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:B}),U=ge({elementType:_.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:B});const[z,W]=r.useState(!1),[V,H]=r.useState(ay),[Y,G]=r.useState(!1),[q,X]=r.useState(!1),[K,Z]=r.useState(!1),[$,Q]=r.useState({overflow:"hidden",scrollbarWidth:0}),J=new Map,ee=r.useRef(null),te=r.useRef(null),ne=()=>{const e=ee.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Ng(e,i.direction),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==S){const e=te.current.children;if(e.length>0){const t=e[J.get(S)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},re=Object(Xm.a)(()=>{const{tabsMeta:e,tabMeta:t}=ne();let n,r=0;if(M)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[D]:t?t[D]:0};if(isNaN(V[n])||isNaN(V[D]))H(i);else{const e=Math.abs(V[n]-i[n]),t=Math.abs(V[D]-i[D]);(e>=1||t>=1)&&H(i)}}),ie=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},i=(()=>{})){const{ease:o=Fg,duration:a=300}=r;let s=null;const c=t[e];let f=!1;const u=()=>{f=!0},l=r=>{if(f)return void i(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/a);t[e]=o(u)*(n-c)+c,u>=1?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(l)};c===n?i(new Error("Element already at target position")):requestAnimationFrame(l)}(I,ee.current,e,{duration:i.transitions.duration.standard}):ee.current[I]=e},oe=e=>{let t=ee.current[I];M?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===Bg()?-1:1),ie(t)},ae=()=>{const e=ee.current[L];let t=0;const n=Array.from(te.current.children);for(let r=0;r<n.length;r+=1){const i=n[r];if(t+i[L]>e){0===r&&(t=e);break}t+=i[L]}return t},se=()=>{oe(-1*ae())},ce=()=>{oe(ae())},he=r.useCallback(e=>{Q({overflow:null,scrollbarWidth:e})},[]),pe=Object(Xm.a)(e=>{const{tabsMeta:t,tabMeta:n}=ne();if(n&&t)if(n[R]<t[R]){const r=t[I]+(n[R]-t[R]);ie(r,{animation:e})}else if(n[T]>t[T]){const r=t[I]+(n[T]-t[T]);ie(r,{animation:e})}}),ve=Object(Xm.a)(()=>{P&&!1!==y&&Z(!K)});r.useEffect(()=>{const e=Object(Fe.a)(()=>{ee.current&&re()}),t=Object(Ue.a)(ee.current);let n;return t.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(e),Array.from(te.current.children).forEach(e=>{n.observe(e)})),()=>{e.clear(),t.removeEventListener("resize",e),n&&n.disconnect()}},[re]),r.useEffect(()=>{const e=Array.from(te.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&P&&!1!==y){const n=e[0],r=e[t-1],i={root:ee.current,threshold:.99},o=new IntersectionObserver(e=>{G(!e[0].isIntersecting)},i);o.observe(n);const a=new IntersectionObserver(e=>{X(!e[0].isIntersecting)},i);return a.observe(r),()=>{o.disconnect(),a.disconnect()}}},[P,y,K,null==l?void 0:l.length]),r.useEffect(()=>{W(!0)},[]),r.useEffect(()=>{re()}),r.useEffect(()=>{pe(ay!==V)},[pe,V]),r.useImperativeHandle(c,()=>({updateIndicator:re,updateScrollButtons:ve}),[re,ve]);const be=Object(f.jsx)(iy,Object(fe.a)({},j,{className:Object(le.a)(N.indicator,j.className),ownerState:B,style:Object(fe.a)({},V,j.style)}));let me=0;const we=r.Children.map(l,e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?me:e.props.value;J.set(t,me);const n=t===S;return me+=1,r.cloneElement(e,Object(fe.a)({fullWidth:"fullWidth"===E,indicator:n&&!z&&be,selected:n,selectionFollowsFocus:w,onChange:b,textColor:O,value:t},1!==me||!1!==S||e.props.tabIndex?{}:{tabIndex:0}))}),xe=(()=>{const e={};e.scrollbarSizeListener=P?Object(f.jsx)(oy,{onChange:he,className:Object(le.a)(N.scrollableX,N.hideScrollbar)}):null;const t=P&&("auto"===y&&(Y||q)||!0===y);return e.scrollButtonStart=t?Object(f.jsx)(g,Object(fe.a)({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:F},orientation:m,direction:o?"right":"left",onClick:se,disabled:!Y},k,{className:Object(le.a)(N.scrollButtons,k.className)})):null,e.scrollButtonEnd=t?Object(f.jsx)(g,Object(fe.a)({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:U},orientation:m,direction:o?"left":"right",onClick:ce,disabled:!q},k,{className:Object(le.a)(N.scrollButtons,k.className)})):null,e})();return Object(f.jsxs)(ty,Object(fe.a)({className:Object(le.a)(N.root,d),ownerState:B,ref:t,as:h},A,{children:[xe.scrollButtonStart,xe.scrollbarSizeListener,Object(f.jsxs)(ny,{className:N.scroller,ownerState:B,style:{overflow:$.overflow,[M?"margin"+(o?"Left":"Right"):"marginBottom"]:C?void 0:-$.scrollbarWidth},ref:ee,children:[Object(f.jsx)(ry,{"aria-label":a,"aria-labelledby":s,"aria-orientation":"vertical"===m?"vertical":null,className:N.flexContainer,ownerState:B,onKeyDown:e=>{const t=te.current,n=Object(ye.a)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),ey(t,n,Jg);break;case i:e.preventDefault(),ey(t,n,Qg);break;case"Home":e.preventDefault(),ey(t,null,Qg);break;case"End":e.preventDefault(),ey(t,null,Jg)}},ref:te,role:"tablist",children:we}),z&&be]}),xe.scrollButtonEnd]}))}));function cy(e){return Object(ke.a)("MuiTab",e)}var fy=Object(je.a)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);const uy=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ly=Object(we.a)(_g,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor"+Object(Cg.a)(n.textColor)],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>Object(fe.a)({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > ."+fy.iconWrapper]:Object(fe.a)({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,["&."+fy.selected]:{opacity:1},["&."+fy.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,["&."+fy.selected]:{color:(e.vars||e).palette.primary.main},["&."+fy.disabled]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,["&."+fy.selected]:{color:(e.vars||e).palette.secondary.main},["&."+fy.disabled]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}));var dy,hy,py,vy,by=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:a=!1,fullWidth:s,icon:c,iconPosition:u="top",indicator:l,label:d,onChange:h,onClick:p,onFocus:v,selected:b,selectionFollowsFocus:m,textColor:g="inherit",value:y,wrapped:w=!1}=n,_=Object(ue.a)(n,uy),x=Object(fe.a)({},n,{disabled:o,disableFocusRipple:a,selected:b,icon:!!c,iconPosition:u,label:!!d,fullWidth:s,textColor:g,wrapped:w}),j=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:c}=e,f={root:["root",o&&a&&"labelIcon","textColor"+Object(Cg.a)(n),r&&"fullWidth",i&&"wrapped",s&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Object(de.a)(f,cy,t)})(x),k=c&&d&&r.isValidElement(c)?r.cloneElement(c,{className:Object(le.a)(j.iconWrapper,c.props.className)}):c;return Object(f.jsxs)(ly,Object(fe.a)({focusRipple:!a,className:Object(le.a)(j.root,i),ref:t,role:"tab","aria-selected":b,disabled:o,onClick:e=>{!b&&h&&h(e,y),p&&p(e)},onFocus:e=>{m&&!b&&h&&h(e,y),v&&v(e)},ownerState:x,tabIndex:b?0:-1},_,{children:["top"===u||"start"===u?Object(f.jsxs)(r.Fragment,{children:[k,d]}):Object(f.jsxs)(r.Fragment,{children:[d,k]}),l]}))}));function my(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var gy=Q.b.div(dy||(dy=my(["\n display: flex;\n padding: 0px 30px;\n overflow: scroll;\n ::-webkit-scrollbar {\n display: none;\n } \n -ms-overflow-style: none;\n scrollbar-width: none; \n"]))),yy=Q.b.div(hy||(hy=my(["\n height: 100px;\n width: 100px;\n margin: 4px;\n"]))),wy=Q.b.div(py||(py=my(["\n display: flex;\n background-color: var(--chat-info-drawer-media-background);\n border-radius: 10px;\n background-image: linear-gradient(\n rgba(0, 0, 0, 0) 70%,\n rgba(0, 0, 0, 0.6) 100%\n );\n\n .media-images {\n height: 100px;\n width: 100px;\n padding: 5px;\n backgroundrepeat: no-repeat;\n backgroundsize: cover;\n object-fit: cover;\n }\n"]))),_y=Q.b.div(vy||(vy=my(["\n height: 100px;\n width: 100px;\n background-image: linear-gradient( rgba(0,0,0,0) 70%, rgba(0,0,0,0.6) 100% );\n border-radius: 10px;\n padding: 5px;\n > div{\n height: 100%;\n width: 100%;\n }\n .plyr--full-ui{\n height: 100%;\n min-width: 90px; !important;\n border-radius: 10px;\n }\n .video_player{\n width: 90px;\n height: 100%;\n z-index: -1;\n }\n \n .play_icon{\n left: 40%;\n top: 40%;\n width: 10px;\n height: 10px;\n }\n\n .play_icon_wrapper{\n width: 30px !important;\n height: 30px !important;\n }\n \n"])));var xy,jy,ky,Oy,Sy,Ey,Cy=function(e){var t,n=e.conversationId,r=e.message,i=e.setTotalMediaFiles,o=(e.totalMediaFiles,null==r||null===(t=r.messages[n])||void 0===t?void 0:t.filter((function(e){var t;return(null==e?void 0:e.attachments)&&(null==e||null===(t=e.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.mediaUrl.length)>0}))),s=null==o?void 0:o.filter((function(e){var t,n;return Object(a.z)(null===(t=e.attachments[0])||void 0===t?void 0:t.extension)||Object(a.A)(null===(n=e.attachments[0])||void 0===n?void 0:n.extension)}));return i(s.length),Object(f.jsx)(gy,{children:null==s?void 0:s.map((function(e){var t,n,r,i,o=null==e||null===(t=e.attachments[0])||void 0===t?void 0:t.extension;return Object(a.z)(o)?Object(f.jsx)(yy,{children:Object(f.jsx)(wy,{children:Object(f.jsx)($,{className:"media-images",src:null===(n=e.attachments[0])||void 0===n?void 0:n.mediaUrl})})},null==e?void 0:e.id):Object(a.A)(o)?Object(f.jsx)(yy,{children:Object(f.jsx)(wy,{children:Object(f.jsx)(_y,{children:Object(f.jsx)(Eh,{className:"custom_video_player",videoLink:null===(r=e.attachments[0])||void 0===r?void 0:r.mediaUrl,thumbUrl:null===(i=e.attachments[0])||void 0===i?void 0:i.thumbnailUrl})})})},null==e?void 0:e.id):void 0}))})},Ay="https://chatstorage.isometrik.ai/chat-assets\\images\\watsappbg.png",Py="https://chatstorage.isometrik.ai/chat-assets\\images\\drkbg.jpg",My="https://chatstorage.isometrik.ai/chat-assets\\icons\\right-arrow.svg";function Iy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ry(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ry(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ty(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ly=Q.b.div(xy||(xy=Ty(["\n display: flex;\n box-sizing: border-box;\n flex-wrap: wrap;\n justify-content: flex-start;\n cursor: pointer;\n margin-right: 1rem;\n"]))),Dy=Q.b.div(jy||(jy=Ty(["\n height: 112px;\n width: 112px;\n margin: 4px 4px 10px;\n display: flex;\n"]))),By=Q.b.div(ky||(ky=Ty(["\n display: flex;\n background-color: var(--chat-info-drawer-media-background);\n border-radius: 10px;\n background-image: linear-gradient(\n rgba(0, 0, 0, 0) 70%,\n rgba(0, 0, 0, 0.6) 100%\n );\n\n .media-images {\n height: 112px;\n width: 112px;\n padding: 10px;\n background-repeat: no-repeat;\n object-fit: cover;\n }\n"]))),Ny=Q.b.div(Oy||(Oy=Ty(["\n display: flex;\n overflow: scroll;\n flex-wrap: wrap;\n padding-top: 1rem;\n"]))),Fy=Q.b.div(Sy||(Sy=Ty(["\n display: flex;\n width: 100%;\n height: 80vh;\n\n .no_media{\n margin: auto;\n }\n"]))),Uy=Q.b.div(Ey||(Ey=Ty(["\n height: 110px;\n width: 110px;\n border-radius: 10px;\n padding: 8px;\n > div{\n height: 100%;\n width: 100%;\n }\n .plyr--full-ui{\n height: 100%;\n min-width: 95px !important;\n }\n .play_icon{\n left: 40%;\n top: 40%;\n }\n .video_player{\n width: 95px;\n height: 100%;\n z-index: -1;\n }\n\n .play_icon{\n left: 40%;\n top: 40%;\n width: 10px;\n height: 10px;\n }\n\n .play_icon_wrapper{\n width: 30px !important;\n height: 30px !important;\n }\n"])));var zy,Wy,Vy,Hy,Yy=function(e){var t=e.handleImgVidClick,n=e.filteredData;return Object(f.jsx)(f.Fragment,{children:(null==n?void 0:n.length)>0?Object.entries(function(e){var t={};return null==e||e.forEach((function(e){var n,r,i,o=Object(a.v)(e.sentAt);t.hasOwnProperty(o)||(t[o]=[]),"document"!==(null==e?void 0:e.customType)&&t[o].push({timeStamp:null==e?void 0:e.sentAt,mediaUrl:null==e||null===(n=e.attachments[0])||void 0===n?void 0:n.mediaUrl,extension:null==e||null===(r=e.attachments[0])||void 0===r?void 0:r.extension,mediaId:null==e||null===(i=e.attachments[0])||void 0===i?void 0:i.mediaId})})),t}(n)).map((function(e){var n=Iy(e,2),r=n[0],i=n[1];return Object(f.jsxs)(f.Fragment,{children:[(null==i?void 0:i.length)>0&&Object(f.jsx)("span",{className:"letter",id:"".concat(r.toUpperCase()),children:r}),Object(f.jsx)(Ny,{children:(null==i?void 0:i.length)>0?i.map((function(e){var n=e.extension;return Object(a.z)(n)?Object(f.jsx)(Ly,{onClick:function(){return t(e.mediaId)},children:Object(f.jsx)(Dy,{children:Object(f.jsx)(By,{children:Object(f.jsx)($,{className:"media-images",src:null==e?void 0:e.mediaUrl})})})}):Object(a.A)(n)?Object(f.jsx)(Ly,{onClick:function(){return t(e.mediaId)},children:Object(f.jsx)(Dy,{children:Object(f.jsx)(By,{children:Object(f.jsx)(Uy,{children:Object(f.jsx)(Eh,{className:"custom_video_player",videoLink:e.mediaUrl,thumbUrl:e.thumbnailUrl})})})})}):Object(f.jsx)("p",{children:"Unsupported media format"})})):Object(f.jsx)(Fy,{children:Object(f.jsx)("p",{className:"no_media",children:"No media"})})})]})})):Object(f.jsx)(Fy,{children:Object(f.jsx)("p",{children:"No media"})})})};function Gy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xy(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ky=Q.b.div(zy||(zy=Xy(["\n position: relative;\n flex-wrap: wrap;\n"]))),Zy=Q.b.p(Wy||(Wy=Xy(["\n color: var(--black);\n"]))),$y=Q.b.div(Vy||(Vy=Xy([" \n margin: 0.25rem 0;\n padding: 0.5rem;\n width: fit-content;\n border-bottom-right-radius: 7.5px;\n border-bottom-left-radius: 7.5px;\n --tw-bg-opacity: 1;\n background-color: ",";\n position: relative;\n"])),(function(e){return e.selfChat?"var(--sender_chatbg)":"var(--toast-background)"})),Qy=Q.b.div(Hy||(Hy=Xy(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 80vh; \n"]))),Jy=function(e){var t,n=e.mediaDocs,i=Object(o.b)("isometrikUserId"),a=Gy(Object(r.useState)(),2),s=a[0],c=a[1];return Object(f.jsx)(Ky,{children:(null==n||null===(t=n.filter((function(e){return"document"===(null==e?void 0:e.customType)})))||void 0===t?void 0:t.length)>0?n.filter((function(e){return"document"===(null==e?void 0:e.customType)})).map((function(e){var t;return Object(f.jsx)($y,{selfChat:i===(null==e||null===(t=e.senderInfo)||void 0===t?void 0:t.userId)||i===(null==e?void 0:e.senderId),children:Object(f.jsx)(ch,{isNotShowDropDown:!0,chat:e,messageLength:s,setmessageLength:c})})})):Object(f.jsx)(Qy,{children:Object(f.jsx)(Zy,{children:"No Docs"})})})};function ew(e){return(ew="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tw,nw,rw,iw,ow,aw,sw,cw,fw,uw,lw,dw=["children","value","index"];function hw(e){return function(e){if(Array.isArray(e))return bw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||vw(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||vw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vw(e,t){if(e){if("string"==typeof e)return bw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bw(e,t):void 0}}function bw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mw(Object(n),!0).forEach((function(t){yw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==ew(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ew(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ew(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ww(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _w(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var xw=Q.b.div(tw||(tw=_w(["\n margin: 20px;\n max-width: auto%;\n border-radius: 7.5px;\n --wt-bg-opacity: 1;\n padding: 0.2rem 0.4rem;\n background-color: var(--sender_chatbg);\n // word-break: break-word;\n text-align: end;\n width: fit-content;\n"]))),jw=Q.b.div(nw||(nw=_w(["\n max-height: 10rem;\n overflow: scroll;\n color: var(--black);\n"]))),kw=Q.b.div(rw||(rw=_w(["\n padding: 20px 40px;\n border-bottom: 1px solid var(--border_color);\n display: flex;\n flex-direction: column;\n color: var(--black);\n"]))),Ow=Q.b.div(iw||(iw=_w(["\n border-bottom: 1px solid var(--border_color);\n display: flex;\n flex-direction: column;\n padding: 20px 40px;\n color: var(--black);\n"]))),Sw=Q.b.div(ow||(ow=_w(["\n background-color: var(--primary-white);\n"]))),Ew=Q.b.div(aw||(aw=_w(["\n position: relative;\n padding: 0 1rem;\n"]))),Cw=Q.b.p(sw||(sw=_w(["\n font-size: 16px;\n font-weight: 500;\n color: var(--profile-color);\n margin-bottom: 0;\n cursor: pointer;\n"]))),Aw=Q.b.h5(cw||(cw=_w(["\n color: var(--chat-msg-text);\n font-size: 14px;\n margin-top: 1rem;\n margin-bottom: 0;\n text-align: ",";\n padding: ",";\n"])),(function(e){return e.textCenter?"center":"left"}),(function(e){return e.customPadding?"2rem 0":""})),Pw=Q.b.div(fw||(fw=_w(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n"])));Q.b.div(uw||(uw=_w(["\n width:30vw;\n","\n"])),_n(Object(Q.a)(lw||(lw=_w(["\n width:100vw;\n"])))));function Mw(e){var t=e.children,n=e.value,r=e.index,i=ww(e,dw);return Object(f.jsx)("div",gw(gw({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},i),{},{children:n===r&&Object(f.jsx)(Wm,{sx:{p:3},children:Object(f.jsx)(Tg,{children:t})})}))}function Iw(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}Mw.propTypes={children:D.a.node,index:D.a.number.isRequired,value:D.a.number.isRequired};var Rw=function(e){var t,n,s,c,u,l,d,h,p,v,b,m,g,y,w,_,x,j,k=e.sidebarChatItem,E=e.setShowProfilePicture,C=e.setSearchedMessageArray,A=e.setDeleteChatModal,P=e.setUserBlockModal,M=e.userConversationDetail,I=e.theme,R=e.Messages,T=e.messageInfo,L=e.conversationId,D=e.messageChat,B=(e.mediaDocs,e.debounceSearchMessages),F=e.searchedMessageArray,U=e.searchMessageLoaderStatus,z=e.handleClosee,W=e.handler,V=(e.setMed,e.handleImgVidClick),H=e.enteredSearchQuery,Y=e.getPaginationMessagesData,G=e.setSearchShow,q=e.currSearchPage,X=e.searchLimit,K=e.resetSearchMessages,Z=O(),Q=Z.baseImageUrl,J=Z.manageProfile,ee=Z.onViewProfilleClick,te=Z.dateFormat,ne=Z.renderChatMediaContainer,re=Z.mediaSidebarOutSideClick,ie=Z.state,oe=Z.isSearchLoading,ae=Z.setIsSearchLoading,se=Z.s3ImageLinkGen,fe=pw(i.a.useState({top:!1,left:!1,bottom:!1,right:!1}),2),ue=fe[0],le=fe[1],de=pw(i.a.useState(0),2),he=de[0],pe=de[1],ve=pw(Object(r.useState)(),2),be=ve[0],me=ve[1],ge=pw(Object(r.useState)(),2),ye=ge[0],we=ge[1],_e=pw(Object(r.useState)(),2),xe=_e[0],je=_e[1],ke=Object(o.b)("isometrikUserId"),Oe=Object(r.useRef)(null),Se=Object(r.useRef)(null),Ee=pw(Object(r.useState)(""),2),Ce=Ee[0],Ae=Ee[1];Object(r.useEffect)((function(){e.searchShow&&document.getElementById("searchBar").focus(),K()}),[null==e?void 0:e.searchShow]),Object(r.useEffect)((function(){if(D){var e={conversationId:L,messageId:null==D?void 0:D.messageId,limit:20,skip:0};Object(S.default)().message.getStatusDelivery(e).then((function(e){var t,n,r=Object(a.w)(new Date((null==e?void 0:e.users)&&(null==e||null===(t=e.users[0])||void 0===t?void 0:t.timestamp)));je(r),je((null==e?void 0:e.users)&&(null==e||null===(n=e.users[0])||void 0===n?void 0:n.timestamp))})).catch((function(e){console.log("error message ",e)})),Object(S.default)().message.getStatusRead(e).then((function(e){var t,n,r=Object(a.w)(new Date((null==e?void 0:e.users)&&(null==e||null===(t=e.users[0])||void 0===t?void 0:t.timestamp)));we(r),je((null==e?void 0:e.users)&&(null==e||null===(n=e.users[0])||void 0===n?void 0:n.timestamp))})).catch((function(e){console.log("error while fetching message status",e)}))}}),[D]);var Pe=function(e,t){return function(n){("keydown"!==n.type||"Tab"!==n.key&&"Shift"!==n.key)&&le(gw(gw({},ue),{},yw({},e,t)))}},Me=function(){z(),W()},Ie=null==R||null===(t=R.messages[L])||void 0===t?void 0:t.filter((function(e){var t;return(null==e?void 0:e.attachments)&&(null==e||null===(t=e.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.mediaUrl.length)>0})),Re=null==Ie?void 0:Ie.filter((function(e){var t,n;return Object(a.z)(null===(t=e.attachments[0])||void 0===t?void 0:t.extension)||Object(a.A)(null===(n=e.attachments[0])||void 0===n?void 0:n.extension)})),Te=function(e,t,n){G(!1);var r=document.getElementById("message_".concat(e)),i=e;if(Oe.current=e,r){ae(!1),Oe.current=null,document.getElementById("allMessages").scroll(0,r.offsetTop-120);var o=document.querySelector(".isoChat .activeMsg");o&&o.classList.remove("activeMsg"),setTimeout((function(){r.classList.add("activeMsg")}),100)}else(function(e,t){return-1!==(t?hw(t):null!=ie&&ie.messages[L]?hw(null==ie?void 0:ie.messages[L]):[]).findIndex((function(t){return t.messageId===e}))})(i,n)||(ae(!0),Y((function(e,t){null==e||e.length}),t))};return Object(r.useEffect)((function(){oe&&Oe.current&&requestAnimationFrame((function(){Te(Oe.current)}))}),[oe,ie]),Object(f.jsxs)(f.Fragment,{children:[null!=e&&e.slideShow||null!=e&&e.searchShow||T?Object(f.jsx)(N,{onClose:re?function(e){return re(e,Me)}:Me,children:ue.right||!J&&null!=e&&e.slideShow?Object(f.jsxs)("div",{className:"media_header mediaFiles",children:[Object(f.jsxs)("div",{className:"topHeader",children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow||null!=e&&e.searchShow||T?"contact_header header d-flex p-3":"contact_header d-flex p-3",children:[Object(f.jsx)($,{onClick:function(e){J?(Pe("right",!1)(e),e.stopPropagation()):Me()},src:Zr,className:"closeIcon ".concat(null!=e&&e.theme?"darkicons":"lighticons")}),Object(f.jsx)("p",{className:"contactTitle ml-3",children:"".concat(null!=e&&e.slideShow?"Contact info":""," ").concat(null!=e&&e.searchShow?"Search Messages":""," ").concat(T?"Message Info":"")})]}),Object(f.jsxs)("div",{className:"d-flex justify-content-between align-items-center p-2 topProfile",onClick:function(e){return ee?ee(null==k?void 0:k.opponentDetails,M):function(){return!0}},style:{cursor:"pointer"},children:[Object(f.jsx)("div",{className:"d-flex justify-content-between align-items-center",children:Object(f.jsxs)("div",{className:"d-flex justify-content-between align-items-center ml-2",children:[Object(f.jsx)("div",{style:{cursor:"pointer"},children:Object(f.jsx)(Mm,{className:"profile_img mr-2",src:Q?se(Q,null==k||null===(n=k.opponentDetails)||void 0===n||null===(n=n.metaData)||void 0===n?void 0:n.profilePic,80,320,320):null==k||null===(s=k.opponentDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.profilePic})}),Object(f.jsxs)("div",{children:[null!=k&&null!==(c=k.opponentDetails)&&void 0!==c&&null!==(c=c.metaData)&&void 0!==c&&c.firstName?Object(f.jsx)("p",{className:"fullname m-0",children:(null==k||null===(u=k.opponentDetails)||void 0===u?void 0:u.metaData.firstName)+" "+(null==k||null===(l=k.opponentDetails)||void 0===l?void 0:l.metaData.lastName)}):"",Object(f.jsxs)("p",{className:"username m-0",style:{cursor:"pointer"},children:["@",null==k||null===(d=k.opponentDetails)||void 0===d?void 0:d.userName]})]})]})}),Object(f.jsx)("div",{className:"viewProfile",children:Object(f.jsx)($,{style:{filter:"brightness(0.5)"},src:My,className:null!=e&&e.theme?"dark_footer_icon":"light_footer_icon"})})]})]}),ne?ne({conversation:M,messages:R}):Object(f.jsx)("div",{className:"bg-white ss",children:Object(f.jsxs)(Wm,{sx:{width:"100%",marginTop:"20px"},children:[Object(f.jsx)(Wm,{sx:{borderBottom:1,borderColor:"divider"},children:Object(f.jsxs)(sy,{value:he,onChange:function(e,t){pe(t)},"aria-label":"basic tabs example",sx:{width:"100%"},children:[Object(f.jsx)(by,gw({label:"Media"},Iw(0))),Object(f.jsx)(by,gw({label:"Docs"},Iw(1)))]})}),Object(f.jsx)(Mw,{value:he,index:0,children:Object(f.jsx)(Yy,{handleImgVidClick:V,filteredData:Re})}),Object(f.jsx)(Mw,{value:he,index:1,children:Object(f.jsx)(Jy,{mediaDocs:Re})}),Object(f.jsx)(Mw,{value:he,index:2,children:"No Link Items"})]})})]}):Object(f.jsxs)("div",{className:"contact_container d-flex flex-column",style:{overflow:"hidden"},children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow||null!=e&&e.searchShow||T?"contact_header header":"contact_header",children:[Object(f.jsx)($,{onClick:Me,src:Zr,className:null!=e&&e.theme?"darkicons":"lighticons"}),Object(f.jsx)("p",{children:"".concat(null!=e&&e.slideShow?"Contact info":""," ").concat(null!=e&&e.searchShow?"Search Messages":""," ").concat(T?"Message Info":"")})]}),null!=e&&e.slideShow?Object(f.jsxs)("div",{children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"showMe":"",children:[Object(f.jsx)("div",{className:"contact_profile",children:Object(f.jsx)(Mm,{className:"profile_image",src:Q?se(Q,null==k||null===(h=k.opponentDetails)||void 0===h||null===(h=h.metaData)||void 0===h?void 0:h.profilePic,80,320,320):null==k||null===(p=k.opponentDetails)||void 0===p||null===(p=p.metaData)||void 0===p?void 0:p.profilePic,onClick:function(){return function(t){var n,r,i;E({showProfile:!0,userName:null==t||null===(n=t.opponentDetails)||void 0===n?void 0:n.userName,userImageSrc:Q?se(Q,null==t||null===(r=t.opponentDetails)||void 0===r||null===(r=r.metaData)||void 0===r?void 0:r.profilePic,80,480,480):null==t||null===(i=t.opponentDetails)||void 0===i||null===(i=i.metaData)||void 0===i?void 0:i.profilePic,theme:null==e?void 0:e.theme})}(k)}})}),Object(f.jsx)("div",{className:"contact_name",children:Object(f.jsxs)("div",{children:[null!=k&&null!==(v=k.opponentDetails)&&void 0!==v&&null!==(v=v.metaData)&&void 0!==v&&v.firstName?Object(f.jsx)("p",{className:"fullname",children:(null==k||null===(b=k.opponentDetails)||void 0===b?void 0:b.metaData.firstName)+" "+(null==k||null===(m=k.opponentDetails)||void 0===m?void 0:m.metaData.lastName)}):"",Object(f.jsxs)("p",{className:"text_Color d-flex justify-content-center username",children:["@",null==k||null===(g=k.opponentDetails)||void 0===g?void 0:g.userName]})]})}),Object(f.jsx)("div",{className:"viewProfile text-center",onClick:function(){return ee?ee(null==k?void 0:k.opponentDetails,M):function(){return!0}},children:"View Profile"})]}),Object(f.jsxs)("div",{children:[["right"].map((function(t){return Object(f.jsxs)(i.a.Fragment,{children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"contactsocialInfo showMe msgFont text_Color pointer":"contactsocialInfo pointer",onClick:Pe(t,!0),children:[Object(f.jsx)("span",{children:"Media And docs - "}),Object(f.jsx)("div",{children:Object(f.jsxs)("span",{"data-testid":"chevron-right-alt","data-icon":"chevron-right-alt",class:"aft2yglh pointer",children:[Object(f.jsx)("span",{style:{marginRight:"10px"},children:null==Re?void 0:Re.length}),Object(f.jsx)($,{style:{filter:"brightness(0.5)"},src:My,className:null!=e&&e.theme?"dark_footer_icon":"light_footer_icon"})]})})]}),Object(f.jsx)("div",{children:Object(f.jsx)(Cy,{message:R,conversationId:L,setTotalMediaFiles:me,totalMediaFiles:be})})]},t)})),J?Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"text textt showMe":"text textt",children:[Object(f.jsxs)("p",{className:"pointer",onClick:function(){return P(!0)},children:[Object(f.jsx)($,{src:"https://chatstorage.isometrik.ai/chat-assets\\icons\\block.svg",className:"icons svgg ".concat(null!=M&&M.messagingDisabled?"user_unblock":"")}),Object(f.jsxs)("span",{className:"".concat(null!=M&&M.messagingDisabled?"user_unblock":""," pointer btnn"),children:[null!=M&&M.messagingDisabled?"Unblock":"Block"," ",null==M||null===(y=M.opponentDetails)||void 0===y?void 0:y.userName]})]}),Object(f.jsxs)("p",{onClick:function(){return A(!0)},className:"pointer pb-4",children:[Object(f.jsx)($,{src:Qp,className:"icons"}),Object(f.jsx)("span",{className:"pointer btnn",children:"Delete Chat "})]})]}):""]})]}):"",null!=e&&e.searchShow?Object(f.jsxs)("div",{className:"contact_container",ref:Se,style:{height:"100%"},children:[Object(f.jsx)(ce,{elementRef:Se,pageEventHandler:function(){console.log("scroll happens"),U||B(Ce,(q-1)*X,X)}}),Object(f.jsxs)("div",{children:[Object(f.jsx)("div",{className:"contact_profile",children:Object(f.jsx)(ai,{setSearchedMessageArray:C,userSearchEnteredData:function(e){var t;null!=e&&null!==(t=e.trim)&&void 0!==t&&null!==(t=t.call(e))&&void 0!==t&&t.length||K(),Ae(e),B(e)},searchShow:null==e?void 0:e.searchShow,theme:I})}),Object(f.jsxs)(Ew,{children:[(null==F?void 0:F.length)>0?F.map((function(e){var t,n,r,i,o,s,c,u;return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(Aw,{children:Object(a.u)(null==e?void 0:e.sentAt,te)}),Object(f.jsxs)(Pw,{children:[((null===(t=e.senderInfo)||void 0===t?void 0:t.userId)||(null==e?void 0:e.senderId))===ke&&Object(f.jsx)(Zl,{color:"var(--black)",style:{marginLeft:"2px"},id:null!=e&&e.readBy&&(null==e||null===(n=e.readBy)||void 0===n?void 0:n.find((function(e){var t;return e.userId===(null==k||null===(t=k.opponentDetails)||void 0===t?void 0:t.userId)})))?"doubleTickDark":null!=e&&e.deliveredTo&&(null==e||null===(r=e.deliveredTo)||void 0===r?void 0:r.find((function(e){var t;return e.userId===(null==k||null===(t=k.opponentDetails)||void 0===t?void 0:t.userId)})))?"doubleTick":"singleTick"}),Object(f.jsx)(Cw,{onClick:function(){Te(e.messageId)},dangerouslySetInnerHTML:{__html:null===(i=Object(a.h)(null==e||null===(o=e.body)||void 0===o||null===(s=o.replace)||void 0===s||null===(s=s.call(o,/(<([^>]+)>)/gi," "))||void 0===s||null===(c=s.trim)||void 0===c?void 0:c.call(s),null==e||null===(u=e.metaData)||void 0===u?void 0:u.isPlainText))||void 0===i?void 0:i.replace(/<br \/>/g," ")}},e.messageId)]})]})})):(null==H?void 0:H.length)>0?Object(f.jsx)(Aw,{textCenter:!0,customPadding:!0,children:"No messages found"}):Object(f.jsx)("div",{className:"bg-white",children:Object(f.jsxs)("p",{className:"text_Color text-align-center searchmsg text-center",children:["Search for message with ",null==k||null===(w=k.opponentDetails)||void 0===w?void 0:w.userName," "]})}),U?Object(f.jsx)(Aw,{textCenter:!0,customPadding:!0,children:"Looking for messages....."}):""]})]})]}):"",T?Object(f.jsxs)("div",{className:"contact_container",style:{marginTop:"66px",backgroundColor:"var(--gray_color)"},children:[Object(f.jsx)(jw,{style:{background:"url(".concat(null!=e&&e.theme?Py:Ay,")"),backgroundRepeat:"no-repeat",backgroundSize:"cover"},className:"messageInfoBody",children:Object(f.jsx)(xw,{children:null!=D&&D.attachments&&0===(null==D||null===(_=D.attachments)||void 0===_||null===(_=_[0])||void 0===_?void 0:_.attachmentType)&&(null==D||null===(x=D.attachments)||void 0===x||null===(x=x[0])||void 0===x?void 0:x.mediaUrl.length)>0?Object(f.jsx)($,{style:{width:"21rem",height:"11rem"},src:null==D||null===(j=D.attachments[0])||void 0===j?void 0:j.mediaUrl}):Object(a.h)(null==D?void 0:D.body).replace(/<br \/>/g," ")})}),Object(f.jsxs)(Sw,{children:[Object(f.jsxs)(kw,{children:[Object(f.jsx)("span",{children:"Read"}),Object(f.jsx)("span",{children:ye||"-"})]}),Object(f.jsxs)(Ow,{children:[Object(f.jsx)("span",{children:"Delivered "}),Object(f.jsx)("span",{children:xe?ye:"-"})]})," "]})]}):""]})}):"",Object(f.jsx)("style",{jsx:!0,children:"\n @media (max-width: 48rem) {\n .contact_container {\n max-width: 100vw;\n z-index: 3\n }\n }\n @media screen and (min-width: 1024px) and (max-width: 1300px){\n .media_Container{\n width: 70vw;\n }\n }\n \n "})]})};function Tw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Lw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dw,Bw,Nw,Fw,Uw,zw,Ww,Vw,Hw,Yw,Gw,qw,Xw,Kw=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Object(r.useState)(!0),o=Tw(i,2),a=o[0],s=o[1],c=Object(r.useRef)();Object(r.useEffect)((function(){c.current=e}),[e]);var f=Object(r.useCallback)((function(){a&&(s(!1),c.current.apply(c,arguments),n?s(!0):setTimeout((function(){return s(!0)}),t))}),[t,n,a,c]);return f};function Zw(e){return(Zw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $w(e){return function(e){if(Array.isArray(e))return a_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qw(Object(n),!0).forEach((function(t){e_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function e_(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Zw(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Zw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Zw(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t_(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t_=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="executing",p="completed",v={};function b(){}function m(){}function g(){}var y={};f(y,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,a)&&(y=_);var x=g.prototype=b.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var c=l(e[i],e,o);if("throw"!==c.type){var f=c.arg,u=f.value;return u&&"object"==Zw(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=d;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var f=l(t,n,r);if("normal"===f.type){if(i=r.done?p:"suspendedYield",f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(i=p,r.method="throw",r.arg=f.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=l(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Zw(t)+" is not iterable")}return m.prototype=g,i(x,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:m,configurable:!0}),m.displayName=f(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(k.prototype),f(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(x),f(x,c,"Generator"),f(x,a,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function n_(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function r_(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){n_(o,r,i,a,s,"next",e)}function s(e){n_(o,r,i,a,s,"throw",e)}a(void 0)}))}}function i_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||o_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o_(e,t){if(e){if("string"==typeof e)return a_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a_(e,t):void 0}}function a_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var c_=Q.b.div(Dw||(Dw=s_(["\n padding: 28px;\n background-color: var(--intro-background);\n position: absolute;\n box-sizing: border-box;\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n width: 70vw;\n height: 100%;\n flex-direction: column;\n ","\n"])),_n(Object(Q.a)(Bw||(Bw=s_(["\n display: none;\n "]))))),f_=Q.b.div(Nw||(Nw=s_(["\n position: absolute;\n background: var(--modal_color);\n color: var(--black);\n top: 45px;\n right: 20px;\n z-index: 999;\n padding: 1rem 0;\n display: flex;\n justify-content: center;\n align-items: center;\n visibility: hidden;\n transform: translateY(-10px);\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n transform-origin: right top;\n width: 230px;\n ","\n"])),(function(e){return e.isActive&&Object(Q.a)(Fw||(Fw=s_(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))})),u_=(Q.b.div(Uw||(Uw=s_(["\n background-color: var(--modal_color);\n position: absolute;\n top: 45px;\n right: 20px;\n z-index: 999;\n width: 230px;\n color: var(--black);\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n visibility: hidden;\n transform: translateY(-10px);\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n transform-origin: right top;\n padding: 1rem 0;\n\n ","\n\n ","\n"])),(function(e){return e.isMenu&&Object(Q.a)(zw||(zw=s_(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))}),_n(Object(Q.a)(Ww||(Ww=s_(["\n top: 50px;\n left: 150px;\n "]))))),Q.b.ul(Vw||(Vw=s_(["\n background: var(--modal_color);\n color: var(--black);\n box-shadow: -3px 0px 4px rgba(194, 194, 194, 0.25);\n border-radius: 4px;\n padding: 1rem 0;\n position: absolute;\n top: 8px;\n right: 0px;\n width: 180px;\n opacity: 0;\n cursor: pointer;\n visibility: hidden;\n transform: translateY(-10px);\n transform-origin: left top;\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n z-index: 999;\n ","\n"])),(function(e){return e.isActive&&Object(Q.a)(Hw||(Hw=s_(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))})),Q.b.li(Yw||(Yw=s_(["\n padding: 0 2rem;\n margin: 0;\n line-height: 2.5rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 14.5px;\n color: var(--primary);\n padding-right: 58px !important;\n"]))),function(e,t){var n=[{id:1,header:"Contact info"},{id:6,header:"Clear chat"},{id:7,header:"Delete chat"},{id:9,header:e?"Unblock":"Block"}];if(!t&&e){var r=n.findIndex((function(e){return 9===e.id}));-1!==r&&n.splice(r,1)}return n}),l_=Q.b.div(Gw||(Gw=s_(["\n","\n","\n"])),(function(e){var t=e.headerHeight;e.maxHeight;return"height:calc(100vh - ".concat(t,"px);\nposition: relative;\n")}),_n(Object(Q.a)(qw||(qw=s_(["\nheight: ",";"])),(function(e){var t=e.maxHeight;return"calc(100vh - ".concat(t,"px)")})))),d_=Q.b.div(Xw||(Xw=s_(["\n color: var(--black);\n visibility: visible;\n user-select: text;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-grow: 1;\n align-items: flex-start;\n font-size: 0.8125rem;\n line-height: 1.5385;\n min-height: 20px;\n"])));var h_,p_,v_,b_,m_,g_,y_,w_,__,x_=function(e){var t,n,s,c,u,l,d,h,p=e.sidebarChatItem,v=(e.setSidebarChatItem,e.showSearchIcon),b=e.state,m=e.setState,g=e.setIsSidebarShow,y=e.preventMessageRef,w=e.getPaginationMessagesData,_=e.isSidebarShow,x=e.setShowProfilePicture,j=e.findUserId,k=e.setUserBlockModal,E=e.setClearChatModal,C=e.setDeleteChatModal,A=e.setslideShow,P=e.slideShow,M=e.setSearchShow,I=e.searchShow,R=e.setUserConversationDetail,L=e.userConversationDetail,D=e.setMessageInfo,B=e.messageInfo,F=e.debounceSearchMessages,U=e.enteredSearchQuery,z=e.searchedMessageArray,W=e.setSearchedMessageArray,V=e.searchMessageLoaderStatus,H=e.setMediaDocs,G=e.mediaDocs,q=e.sidebarData,X=e.userDetails,K=e.isPreviousMessageLoad,Z=e.onChatChange,Q=e.placeHolder,J=e.chatHeaderRightSlot,ee=e.chatHeaderMoreMenu,te=e.customSend,ne=e.handleCustomSend,re=void 0===ne?function(){}:ne,ie=e.extraAttachmentOptions,oe=e.attachMentPosition,ae=e.ChatFooterRightSlot,se=e.customSendOptions,ce=e.RenderCustomSendOptions,fe=e.renderSelfMoremenu,ue=e.allowProfileClick,le=e.renderProfileBadge,de=e.hasMessages,he=e.setHasMessages,pe=e.currSearchPage,ve=e.searchLimit,be=e.resetSearchMessages,me=Object(r.useRef)(),ge=i_(Object(r.useState)(!1),2),ye=(ge[0],ge[1]),we=i_(i.a.useState(null),2),_e=we[0],xe=(we[1],i_(Object(r.useState)(!1),2)),je=(xe[0],xe[1],i_(Object(r.useState)(!1),2)),ke=je[0],Oe=je[1],Se=i_(Object(r.useState)(!1),2),Ee=Se[0],Ce=Se[1],Ae=i_(Object(r.useState)(""),2),Pe=Ae[0],Me=Ae[1],Ie=i_(Object(r.useState)(""),2),Re=Ie[0],Te=Ie[1],Le=i_(Object(r.useState)(""),2),De=Le[0],Be=Le[1],Ne=i_(Object(r.useState)([]),2),Fe=Ne[0],Ue=Ne[1],ze=i_(Object(r.useState)([]),2),We=ze[0],Ve=ze[1],He=i_(Object(r.useState)(0),2),Ye=He[0],Ge=He[1],qe=Object(r.useRef)(0),Xe=Object(r.useRef)(null),Ke=i_(Object(r.useState)(),2),Ze=Ke[0],$e=Ke[1],Qe=i_(Object(r.useState)({open:!1,message:"",variant:""}),2),Je=Qe[0],et=Qe[1],tt=(Boolean(_e),i_(Object(r.useState)(!1),2)),nt=tt[0],rt=tt[1],it=i_(Object(r.useState)(void 0),2),ot=it[0],at=it[1],st=O(),ct=st.theme,ft=(st.manageProfile,st.baseImageUrl),ut=st.showStatusMessages,lt=st.renderCustomChatMessageHeader,dt=st.isGroup,ht=st.s3ImageLinkGen,pt=st.renderUserStatus,vt=function(){var e=r_(t_().mark((function e(){var t,n,r,i,a,s,c;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("loading"!==ot){e.next=2;break}return e.abrupt("return");case 2:if(e.prev=2,"userBlockConversation"!==(null==L||null===(t=L.lastMessageDetails)||void 0===t?void 0:t.action)||(null==L||null===(n=L.lastMessageDetails)||void 0===n?void 0:n.initiatorId)!==Object(o.b)("isometrikUserId")){e.next=9;break}return console.log("userConversationDetail",null==L||null===(i=L.lastMessageDetails)||void 0===i?void 0:i.initiatorId,null==L?void 0:L.messagingDisabled),at(!0),e.abrupt("return");case 9:at("loading");case 10:return e.next=12,Object(S.default)().user.getUserBlock({searchTag:null==L||null===(r=L.opponentDetails)||void 0===r?void 0:r.userName});case 12:a=e.sent,s=(null==a?void 0:a.users)||[],c=s.find((function(e){var t;return e.userId===(null==L||null===(t=L.opponentDetails)||void 0===t?void 0:t.userId)})),at(!!c),e.next=22;break;case 18:return e.prev=18,e.t0=e.catch(2),at(!1),e.abrupt("return");case 22:case"end":return e.stop()}}),e,null,[[2,18]])})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){(null!=L&&L.updateBlockStatus||null!=L&&L.messagingDisabled)&&void 0===ot&&vt()}),[L,ot]);var bt=function(){Et(),A(!0),M(!1),D(!1),ye(!0)},mt=function(){A(!1),M(!0),D(!1)},gt=Kw(r_(t_().mark((function e(){var t;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={conversationId:null==p?void 0:p.conversationId},e.prev=1,!De){e.next=5;break}return e.next=5,Object(S.default)().message.postIndicateTyping(t).then((function(e){}));case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[1,7]])}))),3e3,!1),yt=function(){var e=r_(t_().mark((function e(t){var n,r;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={conversationId:t},ut||(n.includeConversationStatusMessagesInUnreadMessagesCount=!1),e.prev=2,!((null==Object||null===(r=Object.keys(t))||void 0===r?void 0:r.length)>0)){e.next=6;break}return e.next=6,Object(S.default)().Conversation.getConversationDetails(n,t).then((function(e){var t,n,r,i;-1===(null==e||null===(t=e.conversationDetails)||void 0===t||null===(t=t.opponentDetails)||void 0===t?void 0:t.lastSeen)?Ce(!0):(Ce(!1),console.log("last Seen from API - ",null==e||null===(n=e.conversationDetails)||void 0===n||null===(n=n.opponentDetails)||void 0===n?void 0:n.lastSeen,new Date(null==e||null===(r=e.conversationDetails)||void 0===r||null===(r=r.opponentDetails)||void 0===r?void 0:r.lastSeen)),Me(null==e||null===(i=e.conversationDetails)||void 0===i||null===(i=i.opponentDetails)||void 0===i?void 0:i.lastSeen))}));case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){var e,t;if(p)return M(!1),console.log("last seen from convo",null==p||null===(e=p.opponentDetails)||void 0===e?void 0:e.lastSeen),Me(null==p||null===(t=p.opponentDetails)||void 0===t?void 0:t.lastSeen),null!=p&&p.conversationId?me.current=setInterval((function(){yt(null==p?void 0:p.conversationId)}),3e4):clearInterval(me.current),function(){return clearInterval(me.current)};Me("")}),[p,ut]),Object(r.useEffect)((function(){!function(e){if(console.log("last seen time",e),!e)return Te(!1),!1;try{var t=new Date(e),n=new Date;if(t.getTime()>n.getTime())console.log("Invalid input");else{var r=Math.round((n.getTime()-t.getTime())/xn.t),i=Math.round((n.getTime()-t.getTime())/xn.o),o=Math.round((n.getTime()-t.getTime())/xn.b),s=Math.round((n.getTime()-t.getTime())/xn.e),c=Math.round((n.getTime()-t.getTime())/xn.m),f=Math.round((n.getTime()-t.getTime())/xn.p);Te(f<60?"last seen just now":c<60?"Last seen ".concat(1===c?"a minute":c+" min"," ago"):s<24?1===s?"Last seen at ".concat(Object(a.w)(t)):"Last seen ".concat(t.getDate()===n.getDate()?"at ".concat(Object(a.w)(t)):"yesterday"):"Last seen ".concat(o<30?1===o?"a day":o+" days":i<12?1===i?"a month":i+" months":1===r?"an year":r+" years"," ago"))}}catch(e){console.error("Error calculating lastSeen from getLastSeen()")}}(Pe)}),[Pe]),Object(r.useEffect)((function(){var e;-1===(null==p||null===(e=p.opponentDetails)||void 0===e?void 0:e.lastSeen)?Ce(!0):Ce(!1),gt()}),[j,De,null==p?void 0:p.conversationId]);var wt=Object(o.b)("isometrikUserId");Object(r.useEffect)((function(){if("typingEvent"===(null==j?void 0:j.action)&&j.conversationId===(null==p?void 0:p.conversationId)&&j.userId!==wt&&Oe(!0),j){var e=setTimeout((function(){return Oe(!1)}),3e3);return function(){return clearTimeout(e)}}return Oe(!0)}),[j]),Object(r.useEffect)((function(){null!=p&&p.conversationId?(at(void 0),Z(!0,p),function(){var e=r_(t_().mark((function e(){var t;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(a.x)({id:null==p?void 0:p.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:ut});case 2:t=e.sent,R(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()):(R({}),at(void 0),Z(!1))}),[p]),Object(r.useEffect)((function(){var e;he(!1);var t={conversationId:null==p?void 0:p.conversationId};ut||(t.conversationStatusMessage=!1),m((function(e){return Jw(Jw({},e),{},{messagesLoading:!0})})),p&&(null===(e=Object(S.default)())||void 0===e||null===(e=e.message)||void 0===e||e.getMessages(t).then((function(e){var t=e.messages.filter((function(e){var t;return(null==e||null===(t=e.body)||void 0===t?void 0:t.length)>0})).reverse();null!=t&&t.length&&he(!0),m((function(e){return Jw(Jw({},e),{},{messagesLoading:!1,messages:Jw(Jw({},null==e?void 0:e.messages),{},e_({},null==p?void 0:p.conversationId,t))})})),requestAnimationFrame((function(){b.messages&&document.getElementById("allMessages")&&document.getElementById("allMessages").scrollTo({top:document.getElementById("allMessages").scrollHeight})}))})).catch((function(e){m((function(e){return Jw(Jw({},e),{},{messagesLoading:!1})})),console.log(e,"errrrrrrrrrrrrrrrrrrr")})))}),[p]),Object(r.useRef)(null);var _t=i_(Object(r.useState)(!1),2),xt=_t[0],jt=_t[1],kt=function(){g(!1),Object(o.d)("isShow",!1),m(Jw(Jw({},b),{},{selectedConvId:""})),q(null)},Ot=function(){var e=-1;switch(ke&&(null==j?void 0:j.conversationId)===(null==p?void 0:p.conversationId)?e=0:!ke&&Ee?e=1:ke||Ee||(e=2),e){case 0:return"typing...";case 1:return"Online";case 2:default:return Re}},St=function(){var e,t;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)("div",{className:"d-flex align-items-center",children:[null!=p&&null!==(e=p.opponentDetails)&&void 0!==e&&e.online?Object(f.jsx)("div",{className:"mr-2",children:Object(f.jsx)(ir,{status:(null==p||null===(t=p.opponentDetails)||void 0===t||null===(t=t.metaData)||void 0===t?void 0:t.customUserStatus)||"ACTIVE",noEdit:!0})}):"",Object(f.jsx)(d_,{children:Ot()})]})})},Et=function(){var e=r_(t_().mark((function e(){var t,n,r,i;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=null==p?void 0:p.conversationId,n={limit:20,skip:0,isGroup:dt,conversationId:t,attachmentTypes:0},e.prev=2,e.next=5,Object(S.default)().message.getMessages(n);case 5:return r=e.sent,Ve($w(null==r?void 0:r.messages)),H($w(null==r?void 0:r.messages)),i=[],null==r||r.messages.forEach((function(e){return e.attachments.forEach((function(e){return i.push(e)}))})),Ue([].concat(i)),e.abrupt("return",r);case 14:e.prev=14,e.t0=e.catch(2),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(){return e.apply(this,arguments)}}(),Ct=function(){var e=r_(t_().mark((function e(t){var n,r,i,o,a;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==(n=Fe.findIndex((function(e){return e.mediaId===t})))){e.next=15;break}return e.prev=2,e.next=5,Et();case 5:(r=e.sent)&&(o=r.messages.findIndex((function(e){var n;return(null==e||null===(n=e.attachments[0])||void 0===n?void 0:n.mediaId)===t})),qe.current=o,Ge(o),null===(i=Xe.current)||void 0===i||i.showModal()),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.error("error",e.t0),et({open:!0,variant:"error",message:e.t0.messages});case 13:e.next=18;break;case 15:qe.current=n,Ge(n),null===(a=Xe.current)||void 0===a||a.showModal();case 18:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(f.jsxs)(f.Fragment,{children:[null!=e&&e.sidebarChatItem?Object(f.jsxs)("div",{className:"mainChat",children:[lt?lt({arrowClick:kt,handleClickSlideShow:bt,baseImageUrl:ft,s3ImageLinkGen:ht,sidebarChatItem:p,isActive:xt,setIsActive:jt,getSelfMenuBar:u_,userConversationDetail:L,setClearChatModal:E,setDeleteChatModal:C,setUserBlockModal:k,searchShowHandler:mt}):Object(f.jsxs)("div",{className:"chat_header",children:[Object(f.jsx)("span",{className:"arrow_icon",children:Object(f.jsx)($,{src:Kr,className:null!=e&&e.theme?"darkicons":"lighticons",style:{marginRight:"10px"},onClick:kt})}),null!=p&&null!==(t=p.opponentDetails)&&void 0!==t&&null!==(t=t.metaData)&&void 0!==t&&t.profilePic?Object(f.jsx)("img",{onClick:ue?bt:function(){},src:ft?ht(ft,null==p||null===(n=p.opponentDetails)||void 0===n||null===(n=n.metaData)||void 0===n?void 0:n.profilePic,70,120,120):null==p||null===(s=p.opponentDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.profilePic,className:"user_image pointer",alt:"opponent_profile_picture"}):Object(f.jsx)("div",{onClick:ue?bt:function(){},class:"userContact_image d-flex align-items-center justify-content-center",style:{textAlign:"center",margin:0,height:"41px",width:"41px"},children:null!=p&&null!==(c=p.opponentDetails)&&void 0!==c&&c.userName?null==p||null===(u=p.opponentDetails)||void 0===u?void 0:u.userName.charAt(0).toUpperCase():""}),Object(f.jsxs)("div",{className:"chat_headerInfo",children:[Object(f.jsxs)("div",{className:"d-flex userNameWrap align-items-center",children:[Object(f.jsx)("p",{style:{fontSize:null==T?void 0:T.name},onClick:ue?bt:function(){},className:"pointer",children:null==p||null===(l=p.opponentDetails)||void 0===l?void 0:l.userName}),le?le(p,!1):""]}),pt?pt({component:St(),getUserStatus:Ot,sidebarChatItem:p}):St()]}),Object(f.jsxs)("div",{className:"chat_header_right",children:[J?Object(f.jsx)(f.Fragment,{children:J}):Object(f.jsx)(f.Fragment,{}),v?Object(f.jsx)("span",{className:"mx-2 icons pointer search_icon",children:Object(f.jsx)($,{onClick:mt,src:$r,className:ct?"darkicons":"lighticons"})}):"",Object(f.jsxs)(N,{onClose:function(){return jt(!1)},children:[Object(f.jsx)("span",{className:"icons pointer menu_icon",children:Object(f.jsx)($,{isActive:xt,onClick:function(){return jt(!xt)},src:dl,className:ct?"darkicons":"lighticons"})}),Object(f.jsx)(f_,{isActive:xt,className:"selfMenuWrap",children:Object(f.jsx)(Y,{renderSelfMoremenu:fe,menuData:u_(null==L?void 0:L.messagingDisabled,ot),isMenu:xt,setIsMenu:jt,setClearChatModal:E,setDeleteChatModal:C,setUserBlockModal:k,handleClickSlideShow:bt,searchShowHandler:mt,userConversationDetail:L})})]})]}),ee?Object(f.jsx)(f.Fragment,{children:ee}):Object(f.jsx)(f.Fragment,{})]}),Object(f.jsx)(l_,{className:"chatBox d-flex flex-column",style:{background:"url(".concat(!0===(null==e?void 0:e.theme)?Py:Ay,")")},maxHeight:null===(d=document.querySelector(".isoChat .chat_footer"))||void 0===d?void 0:d.offsetHeight,headerHeight:null===(h=document.querySelector(".isoChat .chat_header"))||void 0===h?void 0:h.offsetHeight,children:Object(f.jsx)(jm,{extraAttachmentOptions:ie,customSend:te,handleCustomSend:re,sidebarChatItem:p,messages:null==b?void 0:b.messages,theme:ct,getPaginationMessagesData:w,preventMessageRef:y,findUserId:j,state:b,setState:m,setGetMessageTextLength:Be,userConversationDetail:L,setslideShow:A,setMessageInfo:D,messageInfo:B,setMessageChat:$e,slideShow:P,setSearchShow:M,setMediaDocs:H,userDetails:X,handleImgVidClick:Ct,setIsOpen:rt,isOpen:nt,getMediaDocs:Et,setToastStatus:et,isPreviousMessageLoad:K,attachMentPosition:oe,ChatFooterRightSlot:ae,customSendOptions:se,RenderCustomSendOptions:ce,isBlocked:ot,hasMessages:de,setHasMessages:he})})]}):Object(f.jsx)(f.Fragment,{children:Q?Object(f.jsx)(f.Fragment,{children:Q}):Object(f.jsx)("div",{className:"chatbox_Bg",children:Object(f.jsx)(c_,{className:"bg",children:Object(f.jsxs)("div",{children:[Object(f.jsx)("div",{children:Object(f.jsx)($,{src:"https://chatstorage.isometrik.ai/chat-assets\\icons\\placeholder.svg"})}),Object(f.jsx)("div",{children:Object(f.jsx)("h1",{children:"Isometrik Chat"})}),Object(f.jsx)("div",{className:"text_Color text",children:"Isometrik web chat is fully sync with mobile isomterik chat , all charts are synced when connected to the network"})]})})})}),Object(f.jsx)("div",{className:"".concat(P||I||B?"contactInfo":"contact"," ").concat("sideBarFix"),children:p?Object(f.jsx)(Rw,{handleClosee:function(){A(!1),M(!1),D(!1)},searchShow:I,sidebarChatItem:null==e?void 0:e.sidebarChatItem,handler:function(){ye(!1)},slideShow:P,mediaContact:function(){A(!0)},theme:ct,setShowProfilePicture:x,setDeleteChatModal:C,userConversationDetail:L,setUserBlockModal:k,Messages:b,setMessageInfo:D,messageInfo:B,conversationId:null==p?void 0:p.conversationId,setMessageChat:$e,messageChat:Ze,mediaDocs:G,debounceSearchMessages:F,enteredSearchQuery:U,searchedMessageArray:z,setSearchedMessageArray:W,searchMessageLoaderStatus:V,handleImgVidClick:Ct,getPaginationMessagesData:w,setSearchShow:M,currSearchPage:pe,searchLimit:ve,resetSearchMessages:be}):""}),!nt&&Object(f.jsx)(Fh,{dialogueBoxRef:Xe,style:{maxHeight:"100%"},children:Object(f.jsxs)("div",{className:"d-flex justify-content-center",style:{flexDirection:"column"},children:[Object(f.jsx)(zh,{chatMedia:We,selectedMediaIndex:Ye,scrolledPositionRef:qe}),Object(f.jsx)(Ph,{assets:Fe,selectedMediaIndex:Ye,scrolledPositionRef:qe})]})}),Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(gc,{message:Je.message,variant:Je.variant,open:Je.open,onClose:function(){return et({open:!1})},theme:ct})}),Object(f.jsx)("style",{jsx:!0,children:"\n @media (max-width: 48rem) {\n .mainChat {\n width: 100vw;\n display: ".concat(_?"block":"none",";\n }\n .contactInfo {\n width: 100vw;\n position: fixed;\n z-index: 999;\n top: 0;\n right: 0;\n }\n }\n @media (min-width: 48rem) {\n .mainChat .arrow_icon {\n display: none;\n }\n }\n\n @media screen and (min-width: 1024px) and (max-width: 1300px){\n .crausalView{\n height: 70vh;\n }\n }\n ")})]})};function j_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var k_,O_,S_,E_,C_,A_,P_,M_,I_,R_=Q.b.div(h_||(h_=j_(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),_n(Object(Q.a)(p_||(p_=j_(["\n max-width: 320px;\n "]))))),T_=Q.b.h5(v_||(v_=j_(["\n margin-top: 20px;\n ","\n"])),_n(Object(Q.a)(b_||(b_=j_(["\n font-size: 18px;\n"]))))),L_=Q.b.p(m_||(m_=j_(["\n font-size: 18px;\n ","\n"])),_n(Object(Q.a)(g_||(g_=j_(["\n font-size: 14px;\n"]))))),D_=Q.b.div(y_||(y_=j_(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),_n(Object(Q.a)(w_||(w_=j_(["\n margin:1.5rem 0 20px;\n"]))))),B_=Q.b.button(__||(__=j_(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),N_=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick;return Object(f.jsxs)(R_,{className:"isoChat",children:[Object(f.jsx)(T_,{children:"Clear this chat ?"}),Object(f.jsx)(L_,{className:"subTitle1",children:"Performing this action will cause the chat history to be deleted for you. You will be able to continue chatting with this user but will not be able to view the chat history once this action has been performed."}),Object(f.jsx)(L_,{className:"subTitle mt-2",children:"Are you sure you want to Clear this chat?"}),Object(f.jsxs)(D_,{className:"logoutActionbtn",children:[Object(f.jsx)(B_,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(B_,{className:"logoutBtn",onClick:n,children:"Clear chat"})]})]})};function F_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var U_,z_,W_,V_,H_,Y_,G_,q_,X_,K_=Q.b.div(k_||(k_=F_(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),_n(Object(Q.a)(O_||(O_=F_(["\n max-width: 320px;\n "]))))),Z_=Q.b.h5(S_||(S_=F_(["\n margin-top: 20px;\n ","\n"])),_n(Object(Q.a)(E_||(E_=F_(["\n font-size: 18px;\n"]))))),$_=Q.b.p(C_||(C_=F_(["\n font-size: 18px;\n ","\n"])),_n(Object(Q.a)(A_||(A_=F_(["\n font-size: 14px;\n"]))))),Q_=Q.b.div(P_||(P_=F_(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),_n(Object(Q.a)(M_||(M_=F_(["\n margin:1.5rem 0 20px;\n"]))))),J_=Q.b.button(I_||(I_=F_(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),ex=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick;return Object(f.jsxs)(K_,{className:"isoChat sureDelete",children:[Object(f.jsx)(Z_,{children:"Delete this chat?"}),Object(f.jsx)($_,{className:"subTitle1",children:"Performing this action will cause the chat history and the conversation to be deleted from the chat list. You will be able to start a chat with this user again but the chat history will not be visible."}),Object(f.jsx)($_,{className:"subTitle mt-2",children:"Are you sure you want to Delete this Chat?"}),Object(f.jsxs)(Q_,{className:"logoutActionbtn",children:[Object(f.jsx)(J_,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(J_,{className:"logoutBtn",onClick:n,children:"Delete chat"})]})]})};function tx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var nx,rx,ix,ox,ax,sx,cx,fx,ux,lx,dx,hx=Q.b.div(U_||(U_=tx(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),_n(Object(Q.a)(z_||(z_=tx(["\n max-width: 320px;\n "]))))),px=Q.b.h5(W_||(W_=tx(["\n margin-top: 20px;\n ","\n"])),_n(Object(Q.a)(V_||(V_=tx(["\n font-size: 18px;\n"]))))),vx=Q.b.p(H_||(H_=tx(["\n font-size: 18px;\n ","\n"])),_n(Object(Q.a)(Y_||(Y_=tx(["\n font-size: 14px;\n"]))))),bx=Q.b.div(G_||(G_=tx(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),_n(Object(Q.a)(q_||(q_=tx(["\n margin:1.5rem 0 20px;\n"]))))),mx=Q.b.button(X_||(X_=tx(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),gx=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick,r=e.isUserBlocked,i=e.userName;return Object(f.jsxs)(hx,{children:[Object(f.jsx)(px,{children:r?"Unblock ".concat(i," ?"):"Block ".concat(i," ?")}),Object(f.jsx)(vx,{children:"".concat(r?" ":"Are you sure you want to block ".concat(i,", blocked users will no longer be able to message you ?"))}),Object(f.jsxs)(bx,{className:"logoutActionbtn",children:[Object(f.jsx)(mx,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(mx,{className:"logoutBtn",onClick:n,children:r?"Unblock":"Block"})]})]})};function yx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var wx,_x,xx,jx=Q.b.div(nx||(nx=yx(["\n width: 100vw;\n height: 100vh;\n position: absolute;\n top: 0;\n background: var(--primary-white);\n padding: 1rem 3rem;\n display: flex;\n flex-direction: column;\n z-index: 999;\n ","\n .user_profile_picture_major{\n width: 512px;\n height: 512px;\n margin: auto;\n object-fit: cover;\n ","\n }\n"])),_n(Object(Q.a)(rx||(rx=yx(["\n padding: 1rem 0;\n "])))),_n(Object(Q.a)(ix||(ix=yx(["\n width: 100%;\n height: 100%;\n max-height: 400px;\n aspect-ratio: 1/1;\n "]))))),kx=Q.b.div(ox||(ox=yx(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n ","\n\n .cross_icon{\n height: 24px;\n width: 24px;\n cursor: pointer;\n ","\n }\n .dark__theme{\n filter: invert(1);\n }\n"])),_n(Object(Q.a)(ax||(ax=yx(["\n padding-left: 2rem;\n "])))),_n(Object(Q.a)(sx||(sx=yx(["\n display: none;\n "]))))),Ox=Q.b.div(cx||(cx=yx(["\n display: flex;\n align-items: center;\n\n .user_profile_picture{\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n ","\n }\n\n .back_icon{\n display: none;\n ","\n }\n"])),_n(Object(Q.a)(fx||(fx=yx(["\n display: none;\n "])))),_n(Object(Q.a)(ux||(ux=yx(["\n height: 16px;\n width: 20px;\n cursor: pointer;\n display: block;\n margin-right: 1rem;\n "]))))),Sx=Q.b.p(lx||(lx=yx(["\n margin-bottom: 0;\n color: var(--black);\n margin-left: 1rem;\n"]))),Ex=Q.b.div(dx||(dx=yx(["\n max-width: 512px;\n max-height: 512px;\n margin: auto;\n"]))),Cx=function(e){var t=e.userName,n=e.userImageSrc,r=e.closeHandler,i=e.theme;return Object(f.jsxs)(jx,{children:[Object(f.jsxs)(kx,{theme:i,children:[Object(f.jsxs)(Ox,{children:[Object(f.jsx)($,{src:Kr,className:"".concat(i?"dark__theme":""," back_icon"),onClick:r}),Object(f.jsx)($,{className:"user_profile_picture",src:n,alt:"user_profile_picture"}),Object(f.jsx)(Sx,{children:t})]}),Object(f.jsx)($,{onClick:r,src:Zr,className:"".concat(i?"dark__theme":""," cross_icon")})]}),Object(f.jsx)(Ex,{children:Object(f.jsx)(N,{onClose:r,children:Object(f.jsx)($,{className:"user_profile_picture_major",src:n,alt:"user_profile_picture"})})})]})};function Ax(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Px,Mx,Ix,Rx,Tx=Q.b.div(wx||(wx=Ax(["\n max-width: 100%;\n position: relative;\n margin-right: auto;\n margin-left: auto;\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n\n @media only screen and (min-width: 75em) {\n width: 72rem;\n }\n\n ","\n ","\n"])),(Px=Object(Q.a)(_x||(_x=Ax(["\n width: 61rem;\n "]))),Object(Q.a)(ln||(ln=vn(["\n @media (max-width: 64rem) {\n ",";\n }\n"])),Px)),_n(Object(Q.a)(xx||(xx=Ax(["\n width: 70rem;\n padding: 0.6rem;\n "])))));function Lx(e){return(Lx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dx(Object(n),!0).forEach((function(t){Nx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nx(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Lx(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Lx(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Lx(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ux,zx,Wx=Q.b.input(Mx||(Mx=Fx(['\n background: #f3f3f9;\n border-radius: 8px;\n font-family: "Inter";\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 22px;\n display: flex;\n align-items: center;\n letter-spacing: 0.39996px;\n color: #1d1c21;\n border: ',";\n height: 3em;\n width: 100%;\n margin: ",";\n padding: 0 9px;\n\n ",'\n\n &:focus {\n outline: none;\n }\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-transition: "color 9999s ease-out, background-color 9999s ease-out";\n -webkit-transition-delay: 9999s;\n color: #8b8b8b;\n }\n'])),(function(e){return e.error?"1px solid #B00020":" 1px solid #b1b1b1"}),(function(e){return e.error?"8px auto":"8px auto 1rem auto"}),function(e){return Object(Q.a)(hn||(hn=vn(["\n @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) {\n ",";\n }\n"])),e)}(Object(Q.a)(Ix||(Ix=Fx(["\n margin: 6px auto;\n "]))))),Vx=Q.b.div(Rx||(Rx=Fx(["\n color: #b00020;\n padding: 2px 0;\n"]))),Hx=function(e){var t=e.type,n=void 0===t?"text":t,r=e.error;return Object(f.jsxs)("div",{children:[Object(f.jsx)(Wx,Bx(Bx({type:n},e),{},{error:e.error})),r&&""!==r&&Object(f.jsx)(Vx,{errorMessage:r,children:r})]})},Yx=i.a.forwardRef(Hx);function Gx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var qx,Xx,Kx,Zx=Q.b.div(Ux||(Ux=Gx(["\n margin: 10px 0;\n"]))),$x=Q.b.a(zx||(zx=Gx(["\n background: #F53872;\n color: #fff;\n border-radius: 10px;\n font-size: 16px;\n line-height: 22.4px;\n padding: 10px 32px;\n white-space: nowrap;\n font-weight: 500;\n text-decoration: none;\n display: inline-block;\n border: none;\n transition: 0.125s;\n text-align: center;\n width: 100%;\n cursor: pointer;\n\n &:not(.disable):hover {\n color: #fff;\n }\n"]))),Qx=function(e){return Object(f.jsx)(Zx,{children:Object(f.jsx)($x,{href:e.url,children:e.title})})},Jx=i.a.forwardRef(Qx),ej="https://chatstorage.isometrik.ai/chat-assets\\icons\\ic_uil_eye-slash.svg",tj="https://chatstorage.isometrik.ai/chat-assets\\icons\\login_background.png",nj="https://chatstorage.isometrik.ai/chat-assets\\icons\\ic_uil_eye.svg",rj=/(?=.*?[A-Z])/,ij=/(?=.*?[0-9])/,oj=/(?=.*?[#?!@$%^&*-])/,aj=/.{8,}/;function sj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var cj,fj,uj,lj,dj,hj,pj,vj,bj,mj,gj,yj,wj;Q.b.div(qx||(qx=sj(["\n top: 20px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n position: absolute;\n border: 1px solid lightpink;\n background: antiquewhite;\n border-radius: 5px;\n padding: 0px 20px;\n display: flex;\n transition: all 1s ease-in-out !important;\n\n ","\n"])),_n(Object(Q.a)(Xx||(Xx=sj(["\n width: 70%;\n right: 20px;\n "]))))),Q.b.div(Kx||(Kx=sj(["\n padding: 15px;\n color: brown;\n"])));function _j(e){return(_j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xj(Object(n),!0).forEach((function(t){kj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==_j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==_j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_j(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Sj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ej(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Cj,Aj,Pj,Mj,Ij,Rj,Tj,Lj,Dj,Bj,Nj,Fj,Uj,zj=Q.b.section(cj||(cj=Ej(["\n height: 100vh;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background:url(",");\n object-fit: contain;\n background-size: cover !important;\n ","\n"])),tj,_n(Object(Q.a)(fj||(fj=Ej(["\n padding: 1rem;\n"]))))),Wj=Q.b.div(uj||(uj=Ej(["\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n box-shadow: 0px 3px 6px #161148;\n background:#fff;\n border-radius: 20px;\n max-width: 28rem;\n margin: auto;\n\n ","\n"])),_n(Object(Q.a)(lj||(lj=Ej(["\n border-radius: 10px;\n "]))))),Vj=Q.b.div(dj||(dj=Ej(["\n padding: 2rem;\n flex: 1 1 auto;\n\n ","\n"])),_n(Object(Q.a)(hj||(hj=Ej(["\n padding: 1rem;\n "]))))),Hj=Q.b.div(pj||(pj=Ej(["\n text-align: center;\n font-size: 24px;\n letter-spacing: 0px;\n color: var(--black);\n text-transform: capitalize;\n opacity: 1;\n"]))),Yj=(Q.b.div(vj||(vj=Ej(["\n text-align: center;\n font-size: 26px;\n letter-spacing: 0px;\n color: red;\n text-transform: capitalize;\n opacity: 1;\n"]))),Q.b.div(bj||(bj=Ej(["\n position: relative;\n"])))),Gj=Q.b.span(mj||(mj=Ej(["\n position: absolute;\n top: 10px;\n right: 16px;\n color: #8b8b8b;\n cursor: pointer;\n"]))),qj=Q.b.div(gj||(gj=Ej(["\n text-align: center;\n letter-spacing: -0.22px;\n color: #F53872;\n padding: 10px 0 0 0;\n cursor: pointer;\n"]))),Xj=Q.b.p(yj||(yj=Ej(["\n text-align: center;\n color: var(--danger);\n "]))),Kj=Q.b.div(wj||(wj=Ej(["\ntext-align: center;\n"]))),Zj=function(e){var t=e.setLoginPage,n=e.theme,i=Oj(Object(r.useState)(!1),2),a=i[0],c=i[1],u=Oj(Object(r.useState)(),2),l=u[0],d=u[1],h=Oj(Object(r.useState)({email:"",password:""}),2),p=h[0],v=h[1],b=Oj(Object(r.useState)({open:!1,message:"",variant:""}),2),m=b[0],g=b[1],y=Oj(Object(r.useState)({email:"",password:""}),2),w=y[0],_=y[1],x=function(e,t){switch(e){case"email":return t?t.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)?"":"Enter a valid email address":"email is required";case"password":return t?rj.test(t)?ij.test(t)?oj.test(t)?aj.test(t)?"":"Password length should be more than 8 characters":"Password should contain one special character":"Password should contain atleast one digit":"Password should contain atleast one uppercase":"Please enter your password";default:return""}},j=function(e){v(jj(jj({},p),{},kj({},e.target.name,e.target.value))),_(jj(jj({},w),{},kj({},e.target.name,x(e.target.name,e.target.value)))),d()};return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(zj,{children:Object(f.jsx)(Tx,{children:Object(f.jsx)(Wj,{children:Object(f.jsxs)(Vj,{children:[Object(f.jsx)(Kj,{children:Object(f.jsx)($,{src:s})}),Object(f.jsx)(Hj,{children:"ISOMETRIK CHAT"}),Object(f.jsx)(Xj,{children:l}),Object(f.jsx)(Yx,{name:"email",type:"email",placeholder:"Enter your email",value:p.email,error:null==w?void 0:w.email,onChange:j}),Object(f.jsxs)(Yj,{children:[Object(f.jsx)(Yx,{name:"password",type:a?"text":"password",placeholder:"Enter your password",value:null==p?void 0:p.password,error:null==w?void 0:w.password,onChange:j}),Object(f.jsx)("div",{onClick:function(){return c(!a)},children:Object(f.jsx)(Gj,{children:Object(f.jsx)($,{src:a?nj:ej,height:"22px",width:"22px"})})})]}),Object(f.jsx)("div",{onClick:function(e){e.preventDefault();var t={};if(Object.keys(p).forEach((function(e){var n=x(e,p[e]);n&&n.length>0&&(t[e]=n)})),Object.keys(t).length>0)_(t);else{var n={userIdentifier:null==p?void 0:p.email,password:null==p?void 0:p.password};Object(S.default)().user.postUserAuthenticate(n).then((function(e){g({open:!0,variant:"success",message:e.msg}),Object(o.d)("isometrikToken",null==e?void 0:e.userToken),Object(o.d)("isometrikUserId",null==e?void 0:e.userId),window.location.href="/"})).catch((function(e){var t,n;console.log({error:e}),g({open:!0,variant:"error",message:null==e?void 0:e.message}),d((null===(t={error:e})||void 0===t||null===(t=t.error)||void 0===t?void 0:t.errorMsg)||(null===(n={error:e})||void 0===n||null===(n=n.error)||void 0===n?void 0:n.message))}))}},children:Object(f.jsx)(Jx,{title:"Log In"})}),Object(f.jsx)(qj,{onClick:function(){return t(!1)},children:"Sign Up"})]})})})}),Object(f.jsx)(gc,{message:m.message,variant:m.variant,open:m.open,onClose:function(){return g({open:!1})},theme:n})]})};function $j(e){return($j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qj(Object(n),!0).forEach((function(t){ek(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ek(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==$j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==$j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===$j(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rk(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ik=Q.b.form(Cj||(Cj=rk(["\n height: 100vh;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background:url(",");\n object-fit: contain;\n background-size: cover !important;\n ","\n"])),tj,_n(Object(Q.a)(Aj||(Aj=rk(["\n padding:1rem;\n"]))))),ok=Q.b.div(Pj||(Pj=rk(["\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n background:#fff;\n word-wrap: break-word;\n box-shadow: 0px 3px 6px #161148;\n border-radius: 20px;\n max-width: 28rem;\n margin: auto;\n\n ","\n"])),_n(Object(Q.a)(Mj||(Mj=rk(["\n border-radius: 20px;\n "]))))),ak=Q.b.div(Ij||(Ij=rk(["\n padding: 2rem;\n flex: 1 1 auto;\n\n ","\n"])),_n(Object(Q.a)(Rj||(Rj=rk(["\n padding: 1rem;\n "]))))),sk=Q.b.div(Tj||(Tj=rk(["\n text-align: center;\n font-size: 24px;\n letter-spacing: 0px;\n color:var(--black);\n font-family: LogoText;\n text-transform: capitalize;\n opacity: 1;\n"]))),ck=Q.b.div(Lj||(Lj=rk(["\n position: relative;\n"]))),fk=Q.b.span(Dj||(Dj=rk(["\n position: absolute;\n top: 10px;\n right: 16px;\n color: #8b8b8b;\n cursor: pointer;\n"]))),uk=Q.b.div(Bj||(Bj=rk(["\n text-align: center;\n letter-spacing: -0.22px;\n color: #F53872;\n padding: 10px 0 0 0;\n cursor: pointer;\n"]))),lk=(Q.b.div(Nj||(Nj=rk(["\n text-align: center;\n letter-spacing: -0.22px;\n color:red;\n padding: 10px 0 0 0;\n"]))),Q.b.p(Fj||(Fj=rk(["\n text-align: center;\n color: var(--danger);\n"])))),dk=Q.b.div(Uj||(Uj=rk(["\ntext-align: center;\n"]))),hk=function(e){var t=e.setLoginPage,n=e.theme,c=tk(Object(r.useState)(!1),2),u=c[0],l=c[1],d=tk(Object(r.useState)(!1),2),h=d[0],p=d[1],v=tk(Object(r.useState)(),2),b=v[0],m=v[1],g=tk(Object(r.useState)({fname:"",email:"",password:"",confirmPassword:""}),2),y=g[0],w=g[1],_=tk(Object(r.useState)({open:!1,message:"",variant:""}),2),x=_[0],j=_[1],k=tk(Object(r.useState)({fname:"",email:"",password:"",confirmPassword:""}),2),O=k[0],E=k[1],C=function(e,t){switch(e){case"fname":return t&&""!==t.trim()?t.match(/^[A-Z ]{3,50}$/i)?Object(a.c)(t)?"":"First letter should be capital in name":"User name should not contain any special characters":"User name is required";case"email":return t?t.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)?"":"Enter a valid email address":"Email is required";case"Password":return t?rj.test(t)?ij.test(t)?oj.test(t)?aj.test(t)?"":"Password length should be more than 8 characters":"Password should contain one special character":"Password should contain atleast one digit":"Password should contain atleast one uppercase":"Please enter your password";case"confirmPassword":return t?t!==y.password?"Confirm password did not match":"":"Confirm password is required";default:return""}},A=function(e){w(Jj(Jj({},y),{},ek({},e.target.name,e.target.value))),m(),E(Jj(Jj({},O),{},ek({},e.target.name,C(e.target.name,e.target.value))))};return Object(f.jsxs)(i.a.Fragment,{children:[Object(f.jsx)(ik,{children:Object(f.jsx)(Tx,{children:Object(f.jsx)(ok,{children:Object(f.jsxs)(ak,{children:[Object(f.jsx)(dk,{children:Object(f.jsx)($,{src:s})}),Object(f.jsx)(sk,{children:"ISOMETRIK CHAT"}),Object(f.jsx)(lk,{children:b}),Object(f.jsx)(Yx,{name:"fname",type:"text",placeholder:"Enter your name",value:null==y?void 0:y.fname,onChange:A,error:null==O?void 0:O.fname}),Object(f.jsx)(Yx,{name:"email",type:"email",placeholder:"Enter your email",value:null==y?void 0:y.email,error:null==O?void 0:O.email,onChange:A}),Object(f.jsxs)(ck,{children:[Object(f.jsx)(Yx,{name:"password",type:u?"text":"password",placeholder:"Enter your password",value:null==y?void 0:y.password,error:null==O?void 0:O.password,onChange:A}),Object(f.jsx)("div",{onClick:function(){return l(!u)},children:Object(f.jsx)(fk,{children:Object(f.jsx)($,{src:u?nj:ej,height:"22px",width:"22px"})})})]}),Object(f.jsxs)(ck,{children:[Object(f.jsx)(Yx,{name:"confirmPassword",type:h?"text":"password",placeholder:"Enter your confirm password",value:null==y?void 0:y.confirmPassword,error:null==O?void 0:O.confirmPassword,onChange:A}),Object(f.jsx)("div",{onClick:function(){return p(!h)},children:Object(f.jsx)(fk,{children:Object(f.jsx)($,{src:h?nj:ej,height:"22px",width:"22px"})})})]}),Object(f.jsx)("div",{onClick:function(e){e.preventDefault();var t={};if(Object.keys(y).forEach((function(e){var n=C(e,y[e]);n&&n.length>0&&(t[e]=n)})),Object.keys(t).length>0)E(t);else{var n={userProfileImageUrl:a.F,userName:y.fname,userIdentifier:y.email,password:y.password,confirmPassword:y.confirmPassword,metaData:{country:"IN"}};Object(S.default)().user.postUser(n).then((function(e){Object(o.d)("isometrikToken",null==e?void 0:e.userToken),Object(o.d)("isometrikUserId",null==e?void 0:e.userId),e&&(j({open:!0,variant:"success",message:e.msg}),window.location.href="/")})).catch((function(e){var t=JSON.stringify(e.errorProperties.password);if(t){var n=JSON.parse(t);j({open:!0,variant:"error",message:"Please enter a valid password!"}),m("".concat(n[0]))}}))}},children:Object(f.jsx)(Jx,{title:"Sign Up"})}),Object(f.jsx)(uk,{onClick:function(){return t(!0)},children:"Log In"})]})})})}),Object(f.jsx)(gc,{message:x.message,variant:x.variant,open:x.open,onClose:function(){return j({open:!1})},theme:n})]})};function pk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bk,mk,gk,yk,wk,_k,xk,jk,kk,Ok,Sk,Ek,Ck=function(e){var t=e.theme,n=pk(Object(r.useState)(!0),2),i=n[0],o=n[1];return Object(f.jsxs)("div",{children:[i&&Object(f.jsx)(Zj,{setLoginPage:o,theme:t}),!i&&Object(f.jsx)(hk,{setLoginPage:o,theme:t})]})};function Ak(e){return(Ak="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pk(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Pk=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="executing",p="completed",v={};function b(){}function m(){}function g(){}var y={};f(y,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,a)&&(y=_);var x=g.prototype=b.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var c=l(e[i],e,o);if("throw"!==c.type){var f=c.arg,u=f.value;return u&&"object"==Ak(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=d;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var f=l(t,n,r);if("normal"===f.type){if(i=r.done?p:"suspendedYield",f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(i=p,r.method="throw",r.arg=f.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=l(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ak(t)+" is not iterable")}return m.prototype=g,i(x,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:m,configurable:!0}),m.displayName=f(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(k.prototype),f(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(x),f(x,c,"Generator"),f(x,a,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Mk(e){return function(e){if(Array.isArray(e))return Fk(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Nk(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ik(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Rk(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ik(o,r,i,a,s,"next",e)}function s(e){Ik(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tk(Object(n),!0).forEach((function(t){Dk(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dk(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ak(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ak(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ak(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||Nk(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nk(e,t){if(e){if("string"==typeof e)return Fk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fk(e,t):void 0}}function Fk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uk(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var zk=Q.b.section(bk||(bk=Uk(["\n height: 100%;\n background-color: #dadbd3;\n // display: grid;\n"]))),Wk=Q.b.div(mk||(mk=Uk(["\n background: var(--gray_color);\n max-width: 70%;\n flex: 1 1 70%;\n position: relative;\n ","\n"])),_n(Object(Q.a)(gk||(gk=Uk(["\n max-width: 100%;\n flex: 1 1 100%;\n"]))))),Vk=Q.b.div(yk||(yk=Uk(["\n display: none;\n background-color: var(--modal_color);\n position: absolute;\n bottom: 0px;\n padding: 20px 75px 20px 20px;\n width: 100%;\n align-items: center;\n\n .userImg {\n height: 65px;\n width: 65px;\n border-radius: 60px;\n background-size: cover;\n background-repeat: no-repeat;\n }\n\n ","\n\n ","\n"])),function(e){return Object(Q.a)(dn||(dn=vn(["\n @media (min-width: 48rem) and (max-width: 64rem) {\n ",";\n }\n"])),e)}(Object(Q.a)(wk||(wk=Uk(["\n display: none;\n "])))),_n(Object(Q.a)(_k||(_k=Uk(["\n display: flex;\n "]))))),Hk=Q.b.div(xk||(xk=Uk(["\n display: flex;\n justify-content: flex-end;\n margin-bottom: 20px;\n color: white;\n\n .cancleBtn {\n background: var(--iso_white);\n color: var(--button-primary-background);\n border: 1px solid var(--border_color);\n }\n\n .logoutBtn {\n background-color: var(--button-primary-background);\n color: var(--iso_white);\n }\n"]))),Yk=Q.b.div(jk||(jk=Uk(["\ndisplay:flex;\n"]))),Gk=Q.b.div(kk||(kk=Uk(["\ncolor:var(--black);\nwidth:72%;\n\n.signOutBtn{\n padding:7px 15px;\n border:none;\n border-radius:20px;\n background:var(--button-primary-background);\n color:white;\n margin-left:0px;\n}\n\n.cancelBtn{\n padding:7px 15px;\n border:none;\n border-radius:20px;\n background:var(--button-primary-background);\n color:white;\n margin-left:10px;\n}\n"]))),qk=Q.b.button(Ok||(Ok=Uk(["\n margin-left: 15px;\n border-radius: 20px;\n border: none;\n padding: 5px 20px 5px 20px;\n"]))),Xk=Q.b.div(Sk||(Sk=Uk(["\nwidth:100%;\nheight:100%;\ntop:0;\nbackground-color:var(--modal-backDrop);\nposition:absolute;\nborder:none;\n.logoutModal{\n background-color: var(--modal_color);\n color:var(--black);\n position: absolute; \n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n width:32rem;\n top:50%;\n left:50%;\n z-index:999;\n transform: translate(-50%,-50%);\n padding:20px 24px 6px 22px;\n line-height: 1.7;\n max-height:14rem\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n\n ","\n }"])),_n(Object(Q.a)(Ek||(Ek=Uk(["\n display: none;\n "])))));var Kk=function(e){var t,n,s,c,u=O(),l=u.fetchUserToken,d=u.sortByCustomType,h=u.showLoader,p=u.setShowLoader,v=u.theme,b=u.userDetails,m=u.setUserDetails,g=u.findUserId,y=u.setFindUserId,w=u.state,_=u.setState,x=u.userloggedIn,j=u.loading,k=u.sidebarChatItem,E=u.setSidebarChatItem,C=u.showStatusMessages,A=u.hideHiddenConversations,P=u.isGroup,M=u.currFilter,I=u.setCurrFilter,R=u.currChat,T=u.setCurrChat,L=u.searchConvoText,D=u.setSearchConvoText,B=u.setConversationsFetched,N=u.convolistPayload,F=(u.isSearchLoading,u.setIsSearchLoading,e.showSideChatHeader),U=e.sideBarHeaderSlot,z=e.customSend,W=e.handleCustomSend,V=void 0===W?function(){}:W,H=e.onChatChange,Y=void 0===H?function(){}:H,G=e.sideBarPlaceHolder,q=e.chatHeaderRightSlot,X=e.chatHeaderMoreMenu,K=e.renderProfileBadge,Z=e.placeHolder,Q=e.extraAttachmentOptions,J=e.attachMentPosition,ee=e.ChatFooterRightSlot,te=e.customSendOptions,ne=e.RenderCustomSendOptions,re=e.renderSelfMoremenu,ie=e.showSearchIcon,oe=e.sortConversationList,ae=e.allowProfileClick,se=e.showSideBarSearch,ce=e.onNewConversation,fe=e.onConversationsFetch,ue=Bk(Object(r.useState)(!1),2),le=ue[0],de=ue[1],he=Object(r.useRef)(!1),pe=Bk(Object(r.useState)(!1),2),ve=pe[0],be=pe[1],me=Bk(Object(r.useState)(!1),2),ge=me[0],ye=me[1],we=Bk(Object(r.useState)(!1),2),_e=we[0],xe=we[1],je=Object(r.useRef)(!1),ke=Bk(Object(r.useState)(!1),2),Oe=ke[0],Se=ke[1],Ee=Bk(Object(r.useState)(!1),2),Ce=Ee[0],Ae=Ee[1],Pe=Bk(Object(r.useState)(!1),2),Me=Pe[0],Ie=Pe[1],Re=Bk(Object(r.useState)({}),2),Te=Re[0],Le=Re[1],De=Bk(Object(r.useState)(!1),2),Be=De[0],Ne=De[1],Fe=Bk(Object(r.useState)(!1),2),Ue=Fe[0],ze=Fe[1],We=Bk(Object(r.useState)(!1),2),Ve=We[0],He=We[1],Ye=Bk(Object(r.useState)({open:!1,message:"",variant:""}),2),Ge=Ye[0],qe=Ye[1],Xe=Bk(Object(r.useState)([]),2),Ke=Xe[0],Ze=Xe[1],$e=Bk(Object(r.useState)(!1),2),Qe=$e[0],Je=$e[1],et=Bk(Object(r.useState)(!1),2),tt=et[0],nt=et[1],rt=Bk(Object(r.useState)(),2),it=rt[0],ot=rt[1],at=Bk(Object(r.useState)(""),2),st=at[0],ct=at[1],ft=Bk(Object(r.useState)({showProfile:!1,userName:"",userImageSrc:"",theme:v}),2),ut=ft[0],lt=ft[1],dt=Bk(Object(r.useState)(!1),2),ht=dt[0],pt=dt[1],vt=Bk(Object(r.useState)(1),2),bt=vt[0],mt=vt[1],gt=Bk(Object(r.useState)(!0),2),yt=gt[0],wt=gt[1],_t=Bk(Object(r.useState)(0),2),xt=(_t[0],_t[1],i.a.useRef(!1)),jt=Object(a.y)()?new URLSearchParams(window.location.search):{},kt=i.a.useRef(Object(a.y)()&&jt.get("p")?Lk({},JSON.parse(Object(a.h)(jt.get("p")))):{}),Ot=new URLSearchParams(window.location.search).get("c"),St=function(e){var t=new URLSearchParams("");t.set("c",(null==e?void 0:e.conversationId)||"");var n="".concat(window.location.pathname,"?").concat(t.toString());window.history.pushState({path:n},"",n),E(e)},Et=function(){var e=Rk(Pk().mark((function e(t){var n,r,i,o,s=arguments;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:[],_((function(e){return Lk(Lk({},e),{},{selectedConvId:t})})),p(!0),e.prev=3,r=Mk(n),null==(i=r.find((function(e){return e.conversationId===t})))||!i.conversationId){e.next=11;break}Le(i),E(i),e.next=16;break;case 11:return e.next=13,Object(a.x)({id:t,includeConversationStatusMessagesInUnreadMessagesCount:C});case 13:o=e.sent,E(o),Le(o);case 16:be(!0),p(!1),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),p(!1);case 23:case"end":return e.stop()}}),e,null,[[3,20]])})));return function(t){return e.apply(this,arguments)}}(),Ct={limit:20,skip:0,isGroup:P};Object(r.useEffect)((function(){var e=function(){var e,t,n=new URLSearchParams(window.location.search),r=n.get("c");r?(null==w||null===(t=w.conversations)||void 0===t?void 0:t.length)>0&&Et(r,null==w?void 0:w.conversations):(be(!1),E(),_((function(e){return Lk(Lk({},e),{},{selectedConvId:""})})));var i,o=n.get("unread");try{i=JSON.parse(Object(a.h)(n.get("p")))}catch(e){console.log(e)}var s=n.get("tabType");(!s||s&&!i)&&(localStorage.setItem("isoChatTab",1),kt.current={}),i&&(kt.current=i),o||null!==(e=w.conversations)&&void 0!==e&&e.length?s&&i&&Pt(s,i):(s&&i&&T(s),Mt(Lk(Lk({},Ct),{},{sort:M}),!1,R||"ALL"))};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}}),[M,R,null==w?void 0:w.conversations]),Object(r.useEffect)((function(){var e;null!==(e=Object.keys(N))&&void 0!==e&&e.length&&!Object(a.i)(N,kt.current)&&Mt(Lk(Lk({},Ct),{},{sort:M},N),!1,(null==N?void 0:N.currChat)||"ALL"),kt.current=N}),[N,M]);var At={limit:20,skip:0,isGroup:P,conversationId:null==k?void 0:k.conversationId},Pt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};kt.current=Lk({},t),T(e),Mt(Lk(Lk({},Ct),{},{sort:M}),!1,e)};Object(r.useEffect)((function(){return y({}),function(){T(""),I(),be(!1),E(),y({}),_((function(e){return Lk(Lk({},e),{},{selectedConvId:""})})),D("")}}),[]);var Mt=function(){var e=Rk(Pk().mark((function e(t,n){var r,i,o,a,s,c,f,u,l,h=arguments;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h.length>2&&void 0!==h[2]?h[2]:"ALL",i=Lk(Lk({},t),kt.current),t.sort?i.sort=t.sort:delete i.sort,d&&!t.sort&&(i.sortByCustomType=!0),C||(i.includeConversationStatusMessagesInUnreadMessagesCount=!1),A&&(i.hidden=!1),L?i.searchTag=L:delete i.searchTag,e.prev=7,n?xe(!0):p(!0),he.current=!0,"UNREAD"!==r){e.next=16;break}return e.next=13,null===(c=Object(S.default)())||void 0===c||null===(c=c.Conversation)||void 0===c?void 0:c.getUnreadConversations(i);case 13:s=e.sent,e.next=19;break;case 16:return e.next=18,null===(f=Object(S.default)())||void 0===f||null===(f=f.Conversation)||void 0===f?void 0:f.getConversations(i);case 18:s=e.sent;case 19:B(!0),u=n?[].concat(Mk(w.conversations),Mk(null===(o=s)||void 0===o?void 0:o.conversations)):(null===(a=s)||void 0===a?void 0:a.conversations)||[],_((function(e){return Lk(Lk({},e),{},{conversations:Mk(u)})})),!n&&fe&&fe((null===(l=s)||void 0===l?void 0:l.conversations)||[],Ot),Ot&&!n?Et(Ot,u):p(!1),xe(!1),e.next=35;break;case 27:e.prev=27,e.t0=e.catch(7),B(!0),1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&0===(null==i?void 0:i.skip)?_((function(e){return Lk(Lk({},e),{},{conversations:[]})})):_((function(e){return Lk(Lk({},e),{},{conversations:Mk(e.conversations)})})),nt(1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)),p(!1),xe(!1),console.log(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode,null===e.t0||void 0===e.t0?void 0:e.t0.message,"err");case 35:return e.prev=35,xe(!1),he.current=!1,e.finish(35);case 39:case"end":return e.stop()}}),e,null,[[7,27,35,39]])})));return function(t,n){return e.apply(this,arguments)}}(),It=function(){var e=Rk(Pk().mark((function e(t){var n,r,i,o,a,s,c,f,u=arguments;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:0,r=u.length>2&&void 0!==u[2]?u[2]:20,i=u.length>3&&void 0!==u[3]?u[3]:function(){},console.log("search message call",t,n,r),ct(t),1!==bt){e.next=9;break}wt(!0),e.next=11;break;case 9:if(yt){e.next=11;break}return e.abrupt("return");case 11:if(o={conversationId:null==k?void 0:k.conversationId,searchTag:t,skip:n,limit:r},e.prev=12,null==t||!t.length){e.next=25;break}return Je(!0),e.next=17,null===(a=Object(S.default)())||void 0===a||null===(a=a.message)||void 0===a?void 0:a.getMessages(o);case 17:(null==(f=e.sent)||null===(s=f.messages)||void 0===s?void 0:s.length)<20&&wt(!1),Ze((function(e){return 1===bt?Mk(null==f?void 0:f.messages):[].concat(Mk(e),Mk(null==f?void 0:f.messages))})),Je(!1),(null==f||null===(c=f.messages)||void 0===c?void 0:c.length)>0&&mt((function(e){return 0===n?2:e+1})),i(Mk(null==f?void 0:f.messages)),e.next=27;break;case 25:Ze([]),i([]);case 27:e.next=35;break;case 29:e.prev=29,e.t0=e.catch(12),console.error("error",e.t0),1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&wt(!1),Je(!1),i([]);case 35:case"end":return e.stop()}}),e,null,[[12,29]])})));return function(t){return e.apply(this,arguments)}}(),Rt=Object(a.g)(It,500),Tt=function(){var e=Rk(Pk().mark((function e(t){var n,r,i,o,a,s,c,f=arguments;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=f.length>1&&void 0!==f[1]?f[1]:function(){return!0},e.prev=1,!je.current&&!xt.current){e.next=4;break}return e.abrupt("return");case 4:return i=document.getElementById("allMessages"),o=i.scrollHeight-i.scrollTop,null!=t&&t.skip&&(je.current=!0),xt.current=!0,e.next=10,null===(r=Object(S.default)())||void 0===r||null===(r=r.message)||void 0===r?void 0:r.getMessages(t);case 10:a=e.sent,xt.current=!1,s=a.messages.filter((function(e){var t;return(null==e||null===(t=e.body)||void 0===t?void 0:t.length)>0})).reverse(),_((function(e){return je.current=!1,n([].concat(Mk(s),Mk(e.messages[null==k?void 0:k.conversationId])),t.limit),Lk(Lk({},e),{},{messages:Lk(Lk({},e.messages),{},Dk({},null==k?void 0:k.conversationId,[].concat(Mk(s),Mk(e.messages[null==k?void 0:k.conversationId]))))})})),requestAnimationFrame((function(){var e=i.scrollHeight;i.scrollTop=e-o-60})),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(1),xt.current=!1,1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&null!=w&&null!==(c=w.messages)&&void 0!==c&&null!==(c=c[null==k?void 0:k.conversationId])&&void 0!==c&&c.length||qe({open:!0,variant:"error",message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||"No messages"});case 21:return e.prev=21,xt.current=!1,je.current=!1,e.finish(21);case 25:case"end":return e.stop()}}),e,null,[[1,17,21,25]])})));return function(t){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){var e=new URLSearchParams(window.location.search),t=e.get("unread");if("true"===t)be(!1),E(),_((function(e){return Lk(Lk({},e),{},{selectedConvId:"",conversations:[]})})),Pt("UNREAD"),localStorage.setItem("isoChatTab",2);else if("false"===t||!t){var n;be(!1),E(),_((function(e){return Lk(Lk({},e),{},{selectedConvId:"",conversations:[]})}));try{n=JSON.parse(Object(a.h)(jt.get("p")))}catch(e){console.log(e)}var r=e.get("tabType");!r||r&&!n?(localStorage.setItem("isoChatTab",1),kt.current={},Pt("ALL")):r&&n&&(console.log("convolistPayloadRef.current",kt.current),Pt(r,n))}}),[]),Object(r.useEffect)((function(){b||j||!Object(o.b)("isometrikToken")||l()}),[b,j]);var Lt=function(){ye(!1),setTimeout((function(){p(!0),Object(o.a)()}),100),p(!1)},Dt=function(){Ne(!1),ze(!1)},Bt=function(){var e=Rk(Pk().mark((function e(){var t;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Se(!1),e.next=4,Object(a.d)(null==k?void 0:k.conversationId);case 4:t=e.sent,qe({open:!0,variant:"success",message:t.msg}),_((function(e){return Lk(Lk({},e),{},{messages:Dk({},null==k?void 0:k.conversationId,[])})})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),Se(!1),qe({open:!0,variant:"error",message:e.t0.messages});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),Nt=function(){var e=Rk(Pk().mark((function e(){var t,n,r;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ie(!1),e.next=4,Object(a.C)(null==k||null===(t=k.opponentDetails)||void 0===t?void 0:t.userId);case 4:return n=e.sent,e.next=7,Object(a.x)({id:null==k?void 0:k.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:C});case 7:r=e.sent,Le(r),qe({open:!0,variant:"success",message:n.msg}),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(0),Ie(!1),qe({open:!0,variant:"error",message:e.t0.messages}),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}(),Ft=function(){var e=Rk(Pk().mark((function e(){var t,n,r;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ie(!1),e.next=4,Object(a.D)(null==k||null===(t=k.opponentDetails)||void 0===t?void 0:t.userId);case 4:return n=e.sent,qe({open:!0,variant:"success",message:n.msg}),e.next=8,Object(a.x)({id:null==k?void 0:k.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:C});case 8:r=e.sent,Le(r),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(0),Ie(!1),qe({open:!0,variant:"error",message:e.t0.messages}),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){if(null!=w&&w.conversations&&(null==w?void 0:w.conversations.length)>0&&null!=Te&&Te.conversationId){var e=null==w?void 0:w.conversations.find((function(e){return e.conversationId===Te.conversationId}));e&&Le((function(t){return Lk({},e)}))}}),[null==w?void 0:w.conversations]);var Ut=function(){var e=Rk(Pk().mark((function e(){var t;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ae(!1),e.next=4,Object(a.j)(null==k?void 0:k.conversationId);case 4:t=e.sent,qe({open:!0,variant:"success",message:t.msg}),Dt(),be(!1),_((function(e){return Lk(Lk({},e),{},{selectedConvId:""})})),e.next=17;break;case 11:e.prev=11,e.t0=e.catch(0),console.error("error",e.t0),qe({open:!0,variant:"error",message:e.t0.messages}),Ae(!1),Dt();case 17:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)("div",{className:"true"===v||v?"dark-theme":"light-theme",children:[Object(f.jsxs)(zk,{className:"overflow-hidden",children:[x&&!j?Object(f.jsxs)("div",{className:"d-flex",onClick:function(){return de(!le)},children:[Object(f.jsx)(Tl,{sideBarPlaceHolder:G,sideBarHeaderSlot:U,state:w,setState:_,sideData:null==w?void 0:w.conversations,sidebarData:St,disabledKey:le,userDetails:b,getPaginationHomePageData:function(){var e,t,n;he.current||(null==w||null===(e=w.conversations)||void 0===e?void 0:e.length)<Ct.limit||(null==w||null===(t=w.conversations)||void 0===t?void 0:t.length)%Ct.limit!=0||(Ct.skip=(null==w||null===(n=w.conversations)||void 0===n?void 0:n.length)/Ct.limit*Ct.limit,!tt&&Mt(Lk(Lk({},Ct),{},{sort:M}),!0,R||"ALL"))},preventConversationRef:he,setIsSidebarShow:be,isSidebarShow:ve,isLogOut:ge,setIsLogOut:ye,findUserId:g,sidebarChatItem:k,getHomePageConversationData:Mt,setUserDetails:m,setShowLoader:p,setShowProfilePicture:lt,showConversationPagingLoader:_e,setToastStatus:qe,setUserConversationDetail:Le,profileClose:Dt,setMediaDocs:ot,showSideChatHeader:F,renderProfileBadge:K,sortConversationList:oe,showSideBarSearch:se,handleFilterSelect:function(e){"0"===e?I():I(e),Mt(Lk(Lk({},Ct),{},{sort:"0"===e?"":e}),!1,R||"ALL")},handleActiveChatTab:Pt,onNewConversation:ce,setSidebarChatItem:E}),Object(f.jsx)(Wk,{className:"d-flex",children:h?"":Object(f.jsx)(x_,{customSend:z,extraAttachmentOptions:Q,handleCustomSend:V,placeHolder:Z,onChatChange:Y,theme:v,setClearChatModal:Se,setDeleteChatModal:Ae,setUserBlockModal:Ie,state:w,setState:_,sidebarChatItem:k,setSidebarChatItem:E,setIsSidebarShow:be,isSidebarShow:ve,getPaginationMessagesData:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments.length>1?arguments[1]:void 0;null!=w&&w.messages&&(je.current||0===Object.keys(null==w?void 0:w.messages).length||(null==w||null===(e=w.messages[null==k?void 0:k.conversationId])||void 0===e?void 0:e.length)<At.limit||(null==w||null===(t=w.messages[null==k?void 0:k.conversationId])||void 0===t?void 0:t.length)%At.limit!=0||(At.skip=i||(null==w||null===(n=w.messages[null==k?void 0:k.conversationId])||void 0===n?void 0:n.length)/At.limit*At.limit,C||(At.conversationStatusMessage=!1),Tt(At,r)))},preventMessageRef:je,setShowProfilePicture:lt,findUserId:g,sidebarData:St,setToastStatus:qe,setslideShow:Ne,slideShow:Be,setSearchShow:ze,searchShow:Ue,setUserConversationDetail:Le,userConversationDetail:Te,setMessageInfo:He,messageInfo:Ve,debounceSearchMessages:Rt,searchedMessageArray:Ke,setSearchedMessageArray:Ze,searchMessageLoaderStatus:Qe,handleClosee:Dt,setMediaDocs:ot,mediaDocs:it,userDetails:b,enteredSearchQuery:st,isPreviousMessageLoad:je.current,chatHeaderRightSlot:q,chatHeaderMoreMenu:X,attachMentPosition:J,ChatFooterRightSlot:ee,customSendOptions:te,RenderCustomSendOptions:ne,renderSelfMoremenu:re,showSearchIcon:ie,allowProfileClick:ae,renderProfileBadge:K,hasMessages:ht,setHasMessages:pt,currSearchPage:bt,searchLimit:20,resetSearchMessages:function(){wt(!0),Ze([]),mt(1)}})})]}):"",ge?Object(f.jsx)(Xk,{children:Object(f.jsxs)("div",{className:"logoutModal",children:[Object(f.jsx)("h5",{children:"Log out? "}),Object(f.jsx)("p",{children:"Are you sure you want to logout"}),Object(f.jsx)("div",{children:Object(f.jsxs)(Hk,{className:"logoutActionbtn",children:[Object(f.jsx)(qk,{className:"cancleBtn",onClick:function(){return ye(!1)},children:"Cancel"}),Object(f.jsx)(qk,{className:"logoutBtn",onClick:Lt,children:"Log out"})]})})]})}):"",ge&&Object(f.jsxs)(Vk,{className:"signOut",children:[Object(f.jsx)("div",{style:{width:"28%"},children:Object(f.jsx)($,{className:"userImg",src:null==e||null===(t=e.userDetails)||void 0===t?void 0:t.userProfileImageUrl})}),Object(f.jsxs)(Gk,{className:"actionBtn",children:[Object(f.jsx)("h5",{children:null==e||null===(n=e.userDetails)||void 0===n?void 0:n.userName}),Object(f.jsx)("p",{children:null==e||null===(s=e.userDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.description}),Object(f.jsxs)(Yk,{children:[Object(f.jsx)(qk,{className:"signOutBtn",onClick:Lt,children:"Sign Out"}),Object(f.jsx)(qk,{className:"cancelBtn",onClick:function(){return ye(!1)},children:"Cancel"})]})]})]}),Oe&&Object(f.jsx)(Gs,{open:Oe,backDropClick:!0,onClose:function(){return Se(!1)},children:Object(f.jsx)(N_,{cancelButtonClick:function(){return Se(!1)},confirmButtonClick:Bt})}),Ce&&Object(f.jsx)(Gs,{open:Ce,backDropClick:!0,onClose:function(){return Ae(!1)},children:Object(f.jsx)(ex,{cancelButtonClick:function(){return Ae(!1)},confirmButtonClick:Ut})}),Me&&Object(f.jsx)(Gs,{open:Me,backDropClick:!0,onClose:function(){return Ie(!1)},children:Object(f.jsx)(gx,{isUserBlocked:null==Te?void 0:Te.messagingDisabled,userName:null==k||null===(c=k.opponentDetails)||void 0===c?void 0:c.userName,cancelButtonClick:function(){return Ie(!1)},confirmButtonClick:null!=Te&&Te.messagingDisabled?Ft:Nt})}),Object(f.jsx)(gc,{message:Ge.message,variant:Ge.variant,open:Ge.open,onClose:function(){return qe({open:!1})}}),ut.showProfile&&Object(f.jsx)(Cx,{userName:ut.userName,userImageSrc:ut.userImageSrc,theme:ut.theme,closeHandler:function(){return lt({showProfile:!1})}}),j||h?Object(f.jsx)(Ys,{className:"mainLoader",height:"100vh",width:"100%",theme:v,position:"absolute"}):Object(f.jsx)(f.Fragment,{}),!x&&!j&&!h&&Object(f.jsx)(Ck,{theme:v})]}),Object(f.jsx)("style",{jsx:!0,children:"\n .mainLoader {\n top: 0;\n left: 0;\n }\n .logoutModal * {\n margin-top: 20px;\n }\n\n @media (max-width: 48rem) {\n .sidebar_header {\n width: 100vw;\n }\n }\n @media (max-width: 48rem) {\n .sidebar .sidebar_header .sliderr {\n width: 100vw;\n }\n .sidebar {\n display: ".concat(ve||null!=w&&w.selectedConvId?"none":"block",";\n }\n }\n ")})]})})};t.default=function(e){var t=e.showSideBarSearch,n=void 0===t||t,r=e.attachMentPosition,i=void 0===r?"right":r,o=e.sortConversationList,a=e.renderSelfMoremenu,s=e.showSearchIcon,c=void 0===s||s,u=e.ChatFooterRightSlot,l=void 0===u?function(){return Object(f.jsx)(f.Fragment,{})}:u,d=e.customSendOptions,h=void 0!==d&&d,p=e.RenderCustomSendOptions,v=void 0===p?function(){return Object(f.jsx)(f.Fragment,{})}:p,b=e.showSideChatHeader,m=e.extraAttachmentOptions,g=void 0===m?[]:m,y=e.renderProfileBadge,w=void 0===y?function(e){return Object(f.jsx)(f.Fragment,{})}:y,_=e.customSend,x=void 0!==_&&_,j=e.handleCustomSend,k=void 0===j?function(){return!1}:j,O=e.sideBarHeaderSlot,S=e.chatHeaderRightSlot,E=e.chatHeaderMoreMenu,C=e.onChatChange,A=e.placeHolder,P=e.sideBarPlaceHolder,M=e.allowProfileClick,I=void 0===M||M,R=e.onNewConversation,T=e.onConversationsFetch;return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)("div",{className:"isoChat",children:Object(f.jsx)(Kk,{onConversationsFetch:T,onNewConversation:R,showSideBarSearch:n,allowProfileClick:I,sortConversationList:o,renderSelfMoremenu:a,showSearchIcon:c,attachMentPosition:i,ChatFooterRightSlot:l,customSendOptions:h,RenderCustomSendOptions:v,extraAttachmentOptions:g,customSend:x,renderProfileBadge:w,handleCustomSend:k,sideBarHeaderSlot:O,chatHeaderRightSlot:S,chatHeaderMoreMenu:E,sideBarPlaceHolder:P,showSideChatHeader:b,onChatChange:C,placeHolder:A})})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(512);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function o(e,t,n="Mui"){const o=i[t];return o?`${n}-${o}`:`${r.a.generate(e)}-${t}`}},function(e,t,n){"use strict";const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})();t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1),i=n(227);function o(...e){return r.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{Object(i.a)(e,t)})},e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(236);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";var r=n(1),i=n(237);t.a=function(e){const t=r.useRef(e);return Object(i.a)(()=>{t.current=e}),r.useCallback((...e)=>(0,t.current)(...e),[])}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,t,n){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(511);function i(e,t,n="Mui"){const i={};return t.forEach(t=>{i[t]=Object(r.a)(e,t,n)}),i}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return l}));var r=n(113);function i(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(Object(r.a)(9,e));let i,a=e.substring(t+1,e.length-1);if("color"===n){if(a=a.split(" "),i=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error(Object(r.a)(10,i))}else a=a.split(",");return a=a.map(e=>parseFloat(e)),{type:n,values:a,colorSpace:i}}function a(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=r[1]+"%",r[2]=r[2]+"%"),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:""+r.join(", "),`${t}(${r})`}function s(e){let t="hsl"===(e=o(e)).type||"hsla"===e.type?o(function(e){e=o(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),c=(e,t=(e+n/30)%12)=>i-s*Math.max(Math.min(t-3,9-t,1),-1);let f="rgb";const u=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===e.type&&(f+="a",u.push(t[3])),a({type:f,values:u})}(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){const n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function f(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/"+t:e.values[3]=t,a(e)}function u(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function l(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return a(e)}},function(e,t,n){"use strict";function r(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(3),i=n(5),o=n(235);const a=["values","unit","step"];function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,s=Object(i.a)(e,a),c=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>Object(r.a)({},e,{[t.key]:t.val}),{})})(t),f=Object.keys(c);function u(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${n})`}function d(e,r){const i=f.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[f[i]]?t[f[i]]:r)-o/100}${n})`}return Object(r.a)({keys:f,values:c,up:u,down:l,between:d,only:function(e){return f.indexOf(e)+1<f.length?d(e,f[f.indexOf(e)+1]):u(e)},not:function(e){const t=f.indexOf(e);return 0===t?u(f[1]):t===f.length-1?l(f[t]):d(e,f[f.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},s)}var c={borderRadius:4},f=n(11);var u=n(226),l=n(66);const d=["breakpoints","palette","spacing","shape"];t.a=function(e={},...t){const{breakpoints:n={},palette:a={},spacing:h,shape:p={}}=e,v=Object(i.a)(e,d),b=s(n),m=function(e=8){if(e.mui)return e;const t=Object(f.a)({spacing:e}),n=(...e)=>{return(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?n+"px":n}).join(" ")};return n.mui=!0,n}(h);let g=Object(o.a)({breakpoints:b,direction:"ltr",components:{},palette:Object(r.a)({mode:"light"},a),spacing:m,shape:Object(r.a)({},c,p)},v);return g=t.reduce((e,t)=>Object(o.a)(e,t),g),g.unstable_sxConfig=Object(r.a)({},l.a,null==v?void 0:v.unstable_sxConfig),g.unstable_sx=function(e){return Object(u.a)({sx:e,theme:this})},g}}])}));
|
|
206
|
+
`),ig.rippleVisible,lg,550,({theme:e})=>e.transitions.easing.easeInOut,ig.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,ig.child,ig.childLeaving,dg,550,({theme:e})=>e.transitions.easing.easeInOut,ig.childPulsate,hg,({theme:e})=>e.transitions.easing.easeInOut);var bg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=n,s=Object(ue.a)(n,og),[c,u]=r.useState([]),l=r.useRef(0),d=r.useRef(null);r.useEffect(()=>{d.current&&(d.current(),d.current=null)},[c]);const h=r.useRef(!1),p=r.useRef(0),v=r.useRef(null),b=r.useRef(null);r.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const m=r.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;u(e=>[...e,Object(f.jsx)(vg,{classes:{ripple:Object(le.a)(o.ripple,ig.ripple),rippleVisible:Object(le.a)(o.rippleVisible,ig.rippleVisible),ripplePulsate:Object(le.a)(o.ripplePulsate,ig.ripplePulsate),child:Object(le.a)(o.child,ig.child),childLeaving:Object(le.a)(o.childLeaving,ig.childLeaving),childPulsate:Object(le.a)(o.childPulsate,ig.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},l.current)]),l.current+=1,d.current=a},[o]),g=r.useCallback((e={},t={},n=(()=>{}))=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&h.current)return void(h.current=!1);"touchstart"===(null==e?void 0:e.type)&&(h.current=!0);const s=a?null:b.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let f,u,l;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)f=Math.round(c.width/2),u=Math.round(c.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;f=Math.round(t-c.left),u=Math.round(n-c.top)}if(o)l=Math.sqrt((2*c.width**2+c.height**2)/3),l%2==0&&(l+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-f),f)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;l=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===v.current&&(v.current=()=>{m({pulsate:r,rippleX:f,rippleY:u,rippleSize:l,cb:n})},p.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},80)):m({pulsate:r,rippleX:f,rippleY:u,rippleSize:l,cb:n})},[i,m]),y=r.useCallback(()=>{g({},{pulsate:!0})},[g]),w=r.useCallback((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&v.current)return v.current(),v.current=null,void(p.current=setTimeout(()=>{w(e,t)}));v.current=null,u(e=>e.length>0?e.slice(1):e),d.current=t},[]);return r.useImperativeHandle(t,()=>({pulsate:y,start:g,stop:w}),[y,g,w]),Object(f.jsx)(pg,Object(fe.a)({className:Object(le.a)(ig.root,o.root,a),ref:b},s,{children:Object(f.jsx)(tg,{component:null,exit:!0,children:c})}))}));function mg(e){return Object(ke.a)("MuiButtonBase",e)}var gg=Object(je.a)("MuiButtonBase",["root","disabled","focusVisible"]);const yg=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],wg=Object(we.a)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&."+gg.disabled]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});var _g=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:c="button",disabled:u=!1,disableRipple:l=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:p="a",onBlur:v,onClick:b,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:w,onKeyDown:_,onKeyUp:x,onMouseDown:j,onMouseLeave:k,onMouseUp:O,onTouchEnd:S,onTouchMove:E,onTouchStart:C,tabIndex:A=0,TouchRippleProps:P,touchRippleRef:M,type:I}=n,R=Object(ue.a)(n,yg),T=r.useRef(null),L=r.useRef(null),D=Object(Me.a)(L,M),{isFocusVisibleRef:B,onFocus:N,onBlur:F,ref:U}=Object(Km.a)(),[z,W]=r.useState(!1);u&&z&&W(!1),r.useImperativeHandle(i,()=>({focusVisible:()=>{W(!0),T.current.focus()}}),[]);const[V,H]=r.useState(!1);r.useEffect(()=>{H(!0)},[]);const Y=V&&!l&&!u;function G(e,t,n=d){return Object(Xm.a)(r=>{t&&t(r);return!n&&L.current&&L.current[e](r),!0})}r.useEffect(()=>{z&&h&&!l&&V&&L.current.pulsate()},[l,h,z,V]);const q=G("start",j),X=G("stop",m),K=G("stop",g),Z=G("stop",O),$=G("stop",e=>{z&&e.preventDefault(),k&&k(e)}),Q=G("start",C),J=G("stop",S),ee=G("stop",E),te=G("stop",e=>{F(e),!1===B.current&&W(!1),v&&v(e)},!1),ne=Object(Xm.a)(e=>{T.current||(T.current=e.currentTarget),N(e),!0===B.current&&(W(!0),w&&w(e)),y&&y(e)}),re=()=>{const e=T.current;return c&&"button"!==c&&!("A"===e.tagName&&e.href)},ie=r.useRef(!1),oe=Object(Xm.a)(e=>{h&&!ie.current&&z&&L.current&&" "===e.key&&(ie.current=!0,L.current.stop(e,()=>{L.current.start(e)})),e.target===e.currentTarget&&re()&&" "===e.key&&e.preventDefault(),_&&_(e),e.target===e.currentTarget&&re()&&"Enter"===e.key&&!u&&(e.preventDefault(),b&&b(e))}),ae=Object(Xm.a)(e=>{h&&" "===e.key&&L.current&&z&&!e.defaultPrevented&&(ie.current=!1,L.current.stop(e,()=>{L.current.pulsate(e)})),x&&x(e),b&&e.target===e.currentTarget&&re()&&" "===e.key&&!e.defaultPrevented&&b(e)});let se=c;"button"===se&&(R.href||R.to)&&(se=p);const ce={};"button"===se?(ce.type=void 0===I?"button":I,ce.disabled=u):(R.href||R.to||(ce.role="button"),u&&(ce["aria-disabled"]=u));const he=Object(Me.a)(t,U,T);const pe=Object(fe.a)({},n,{centerRipple:o,component:c,disabled:u,disableRipple:l,disableTouchRipple:d,focusRipple:h,tabIndex:A,focusVisible:z}),ve=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=Object(de.a)(o,mg,i);return n&&r&&(a.root+=" "+r),a})(pe);return Object(f.jsxs)(wg,Object(fe.a)({as:se,className:Object(le.a)(ve.root,s),ownerState:pe,onBlur:te,onClick:b,onContextMenu:X,onFocus:ne,onKeyDown:oe,onKeyUp:ae,onMouseDown:q,onMouseLeave:$,onMouseUp:Z,onDragLeave:K,onTouchEnd:J,onTouchMove:ee,onTouchStart:Q,ref:he,tabIndex:u?-1:A,type:I},ce,R,{children:[a,Y?Object(f.jsx)(bg,Object(fe.a)({ref:D,center:o},P)):null]}))}));n(105);var xg=Object(je.a)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var jg=Object(je.a)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function kg(e){return Object(ke.a)("MuiListItemSecondaryAction",e)}Object(je.a)("MuiListItemSecondaryAction",["root","disableGutters"]);const Og=["className"],Sg=Object(we.a)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>Object(fe.a)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),Eg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=n,o=Object(ue.a)(n,Og),a=r.useContext(xe),s=Object(fe.a)({},n,{disableGutters:a.disableGutters}),c=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return Object(de.a)(r,kg,n)})(s);return Object(f.jsx)(Sg,Object(fe.a)({className:Object(le.a)(c.root,i),ownerState:s,ref:t},o))}));Eg.muiName="ListItemSecondaryAction";Object(we.a)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>Object(fe.a)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&Object(fe.a)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{["& > ."+jg.root]:{paddingRight:48}},{["&."+xg.focusVisible]:{backgroundColor:(e.vars||e).palette.action.focus},["&."+xg.selected]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&."+xg.focusVisible]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},["&."+xg.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:"1px solid "+(e.vars||e).palette.divider,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Object(we.a)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"});Object(we.a)(_g,{shouldForwardProp:e=>Object(we.b)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>Object(fe.a)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&."+jg.selected]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&."+jg.focusVisible]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${jg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}},["&."+jg.focusVisible]:{backgroundColor:(e.vars||e).palette.action.focus},["&."+jg.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:"1px solid "+(e.vars||e).palette.divider,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}));Object(je.a)("MuiListItemIcon",["root","alignItemsFlexStart"]);Object(we.a)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>Object(fe.a)({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}));var Cg=n(33);function Ag(e){return Object(ke.a)("MuiTypography",e)}Object(je.a)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Pg=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Mg=Object(we.a)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align"+Object(Cg.a)(n.align)],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>Object(fe.a)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),Ig={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Rg={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var Tg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTypography"}),r=(e=>Rg[e]||e)(n.color),i=Bm(Object(fe.a)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:c=!1,noWrap:u=!1,paragraph:l=!1,variant:d="body1",variantMapping:h=Ig}=i,p=Object(ue.a)(i,Pg),v=Object(fe.a)({},i,{align:o,color:r,className:a,component:s,gutterBottom:c,noWrap:u,paragraph:l,variant:d,variantMapping:h}),b=s||(l?"p":h[d]||Ig[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e,s={root:["root",o,"inherit"!==e.align&&"align"+Object(Cg.a)(t),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Object(de.a)(s,Ag,a)})(v);return Object(f.jsx)(Mg,Object(fe.a)({as:b,ref:t,ownerState:v,className:Object(le.a)(m.root,a)},p))}));var Lg=Object(je.a)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);Object(we.a)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& ."+Lg.primary]:t.primary},{["& ."+Lg.secondary]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>Object(fe.a)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}));n(148),n(149);let Dg;function Bg(){if(Dg)return Dg;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Dg="reverse",e.scrollLeft>0?Dg="default":(e.scrollLeft=1,0===e.scrollLeft&&(Dg="negative")),document.body.removeChild(e),Dg}function Ng(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(Bg()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function Fg(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const Ug=["onChange"],zg={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var Wg=Object(km.a)(Object(f.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Vg=Object(km.a)(Object(f.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Hg(e){return Object(ke.a)("MuiTabScrollButton",e)}var Yg=Object(je.a)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);const Gg=["className","slots","slotProps","direction","orientation","disabled"],qg=Object(we.a)(_g,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>Object(fe.a)({width:40,flexShrink:0,opacity:.8,["&."+Yg.disabled]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}));var Xg=r.forwardRef((function(e,t){var n,r;const i=Object(_e.a)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:s={},direction:c}=i,u=Object(ue.a)(i,Gg),l="rtl"===Je().direction,d=Object(fe.a)({isRtl:l},i),h=(e=>{const{classes:t,orientation:n,disabled:r}=e,i={root:["root",n,r&&"disabled"]};return Object(de.a)(i,Hg,t)})(d),p=null!=(n=a.StartScrollButtonIcon)?n:Wg,v=null!=(r=a.EndScrollButtonIcon)?r:Vg,b=ge({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=ge({elementType:v,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return Object(f.jsx)(qg,Object(fe.a)({component:"div",className:Object(le.a)(h.root,o),ref:t,role:null,ownerState:d,tabIndex:null},u,{children:"left"===c?Object(f.jsx)(p,Object(fe.a)({},b)):Object(f.jsx)(v,Object(fe.a)({},m))}))}));function Kg(e){return Object(ke.a)("MuiTabs",e)}var Zg=Object(je.a)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);const $g=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Qg=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Jg=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,ey=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},ty=Object(we.a)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& ."+Zg.scrollButtons]:t.scrollButtons},{["& ."+Zg.scrollButtons]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>Object(fe.a)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{["& ."+Zg.scrollButtons]:{[t.breakpoints.down("sm")]:{display:"none"}}})),ny=Object(we.a)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>Object(fe.a)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),ry=Object(we.a)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>Object(fe.a)({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),iy=Object(we.a)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>Object(fe.a)({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),oy=Object(we.a)((function(e){const{onChange:t}=e,n=Object(ue.a)(e,Ug),i=r.useRef(),o=r.useRef(null),a=()=>{i.current=o.current.offsetHeight-o.current.clientHeight};return Object(Ie.a)(()=>{const e=Object(Fe.a)(()=>{const e=i.current;a(),e!==i.current&&t(i.current)}),n=Object(Ue.a)(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),r.useEffect(()=>{a(),t(i.current)},[t]),Object(f.jsx)("div",Object(fe.a)({style:zg,ref:o},n))}),{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ay={};var sy=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTabs"}),i=Je(),o="rtl"===i.direction,{"aria-label":a,"aria-labelledby":s,action:c,centered:u=!1,children:l,className:d,component:h="div",allowScrollButtonsMobile:p=!1,indicatorColor:v="primary",onChange:b,orientation:m="horizontal",ScrollButtonComponent:g=Xg,scrollButtons:y="auto",selectionFollowsFocus:w,slots:_={},slotProps:x={},TabIndicatorProps:j={},TabScrollButtonProps:k={},textColor:O="primary",value:S,variant:E="standard",visibleScrollbar:C=!1}=n,A=Object(ue.a)(n,$g),P="scrollable"===E,M="vertical"===m,I=M?"scrollTop":"scrollLeft",R=M?"top":"left",T=M?"bottom":"right",L=M?"clientHeight":"clientWidth",D=M?"height":"width",B=Object(fe.a)({},n,{component:h,allowScrollButtonsMobile:p,indicatorColor:v,orientation:m,vertical:M,scrollButtons:y,textColor:O,variant:E,visibleScrollbar:C,fixed:!P,hideScrollbar:P&&!C,scrollableX:P&&!M,scrollableY:P&&M,centered:u&&!P,scrollButtonsHideMobile:!p}),N=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:c}=e,f={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return Object(de.a)(f,Kg,c)})(B),F=ge({elementType:_.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:B}),U=ge({elementType:_.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:B});const[z,W]=r.useState(!1),[V,H]=r.useState(ay),[Y,G]=r.useState(!1),[q,X]=r.useState(!1),[K,Z]=r.useState(!1),[$,Q]=r.useState({overflow:"hidden",scrollbarWidth:0}),J=new Map,ee=r.useRef(null),te=r.useRef(null),ne=()=>{const e=ee.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Ng(e,i.direction),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==S){const e=te.current.children;if(e.length>0){const t=e[J.get(S)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},re=Object(Xm.a)(()=>{const{tabsMeta:e,tabMeta:t}=ne();let n,r=0;if(M)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[D]:t?t[D]:0};if(isNaN(V[n])||isNaN(V[D]))H(i);else{const e=Math.abs(V[n]-i[n]),t=Math.abs(V[D]-i[D]);(e>=1||t>=1)&&H(i)}}),ie=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},i=(()=>{})){const{ease:o=Fg,duration:a=300}=r;let s=null;const c=t[e];let f=!1;const u=()=>{f=!0},l=r=>{if(f)return void i(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/a);t[e]=o(u)*(n-c)+c,u>=1?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(l)};c===n?i(new Error("Element already at target position")):requestAnimationFrame(l)}(I,ee.current,e,{duration:i.transitions.duration.standard}):ee.current[I]=e},oe=e=>{let t=ee.current[I];M?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===Bg()?-1:1),ie(t)},ae=()=>{const e=ee.current[L];let t=0;const n=Array.from(te.current.children);for(let r=0;r<n.length;r+=1){const i=n[r];if(t+i[L]>e){0===r&&(t=e);break}t+=i[L]}return t},se=()=>{oe(-1*ae())},ce=()=>{oe(ae())},he=r.useCallback(e=>{Q({overflow:null,scrollbarWidth:e})},[]),pe=Object(Xm.a)(e=>{const{tabsMeta:t,tabMeta:n}=ne();if(n&&t)if(n[R]<t[R]){const r=t[I]+(n[R]-t[R]);ie(r,{animation:e})}else if(n[T]>t[T]){const r=t[I]+(n[T]-t[T]);ie(r,{animation:e})}}),ve=Object(Xm.a)(()=>{P&&!1!==y&&Z(!K)});r.useEffect(()=>{const e=Object(Fe.a)(()=>{ee.current&&re()}),t=Object(Ue.a)(ee.current);let n;return t.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(e),Array.from(te.current.children).forEach(e=>{n.observe(e)})),()=>{e.clear(),t.removeEventListener("resize",e),n&&n.disconnect()}},[re]),r.useEffect(()=>{const e=Array.from(te.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&P&&!1!==y){const n=e[0],r=e[t-1],i={root:ee.current,threshold:.99},o=new IntersectionObserver(e=>{G(!e[0].isIntersecting)},i);o.observe(n);const a=new IntersectionObserver(e=>{X(!e[0].isIntersecting)},i);return a.observe(r),()=>{o.disconnect(),a.disconnect()}}},[P,y,K,null==l?void 0:l.length]),r.useEffect(()=>{W(!0)},[]),r.useEffect(()=>{re()}),r.useEffect(()=>{pe(ay!==V)},[pe,V]),r.useImperativeHandle(c,()=>({updateIndicator:re,updateScrollButtons:ve}),[re,ve]);const be=Object(f.jsx)(iy,Object(fe.a)({},j,{className:Object(le.a)(N.indicator,j.className),ownerState:B,style:Object(fe.a)({},V,j.style)}));let me=0;const we=r.Children.map(l,e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?me:e.props.value;J.set(t,me);const n=t===S;return me+=1,r.cloneElement(e,Object(fe.a)({fullWidth:"fullWidth"===E,indicator:n&&!z&&be,selected:n,selectionFollowsFocus:w,onChange:b,textColor:O,value:t},1!==me||!1!==S||e.props.tabIndex?{}:{tabIndex:0}))}),xe=(()=>{const e={};e.scrollbarSizeListener=P?Object(f.jsx)(oy,{onChange:he,className:Object(le.a)(N.scrollableX,N.hideScrollbar)}):null;const t=P&&("auto"===y&&(Y||q)||!0===y);return e.scrollButtonStart=t?Object(f.jsx)(g,Object(fe.a)({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:F},orientation:m,direction:o?"right":"left",onClick:se,disabled:!Y},k,{className:Object(le.a)(N.scrollButtons,k.className)})):null,e.scrollButtonEnd=t?Object(f.jsx)(g,Object(fe.a)({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:U},orientation:m,direction:o?"left":"right",onClick:ce,disabled:!q},k,{className:Object(le.a)(N.scrollButtons,k.className)})):null,e})();return Object(f.jsxs)(ty,Object(fe.a)({className:Object(le.a)(N.root,d),ownerState:B,ref:t,as:h},A,{children:[xe.scrollButtonStart,xe.scrollbarSizeListener,Object(f.jsxs)(ny,{className:N.scroller,ownerState:B,style:{overflow:$.overflow,[M?"margin"+(o?"Left":"Right"):"marginBottom"]:C?void 0:-$.scrollbarWidth},ref:ee,children:[Object(f.jsx)(ry,{"aria-label":a,"aria-labelledby":s,"aria-orientation":"vertical"===m?"vertical":null,className:N.flexContainer,ownerState:B,onKeyDown:e=>{const t=te.current,n=Object(ye.a)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),ey(t,n,Jg);break;case i:e.preventDefault(),ey(t,n,Qg);break;case"Home":e.preventDefault(),ey(t,null,Qg);break;case"End":e.preventDefault(),ey(t,null,Jg)}},ref:te,role:"tablist",children:we}),z&&be]}),xe.scrollButtonEnd]}))}));function cy(e){return Object(ke.a)("MuiTab",e)}var fy=Object(je.a)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);const uy=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ly=Object(we.a)(_g,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor"+Object(Cg.a)(n.textColor)],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>Object(fe.a)({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > ."+fy.iconWrapper]:Object(fe.a)({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,["&."+fy.selected]:{opacity:1},["&."+fy.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,["&."+fy.selected]:{color:(e.vars||e).palette.primary.main},["&."+fy.disabled]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,["&."+fy.selected]:{color:(e.vars||e).palette.secondary.main},["&."+fy.disabled]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}));var dy,hy,py,vy,by=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:a=!1,fullWidth:s,icon:c,iconPosition:u="top",indicator:l,label:d,onChange:h,onClick:p,onFocus:v,selected:b,selectionFollowsFocus:m,textColor:g="inherit",value:y,wrapped:w=!1}=n,_=Object(ue.a)(n,uy),x=Object(fe.a)({},n,{disabled:o,disableFocusRipple:a,selected:b,icon:!!c,iconPosition:u,label:!!d,fullWidth:s,textColor:g,wrapped:w}),j=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:c}=e,f={root:["root",o&&a&&"labelIcon","textColor"+Object(Cg.a)(n),r&&"fullWidth",i&&"wrapped",s&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Object(de.a)(f,cy,t)})(x),k=c&&d&&r.isValidElement(c)?r.cloneElement(c,{className:Object(le.a)(j.iconWrapper,c.props.className)}):c;return Object(f.jsxs)(ly,Object(fe.a)({focusRipple:!a,className:Object(le.a)(j.root,i),ref:t,role:"tab","aria-selected":b,disabled:o,onClick:e=>{!b&&h&&h(e,y),p&&p(e)},onFocus:e=>{m&&!b&&h&&h(e,y),v&&v(e)},ownerState:x,tabIndex:b?0:-1},_,{children:["top"===u||"start"===u?Object(f.jsxs)(r.Fragment,{children:[k,d]}):Object(f.jsxs)(r.Fragment,{children:[d,k]}),l]}))}));function my(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var gy=Q.b.div(dy||(dy=my(["\n display: flex;\n padding: 0px 30px;\n overflow: scroll;\n ::-webkit-scrollbar {\n display: none;\n } \n -ms-overflow-style: none;\n scrollbar-width: none; \n"]))),yy=Q.b.div(hy||(hy=my(["\n height: 100px;\n width: 100px;\n margin: 4px;\n"]))),wy=Q.b.div(py||(py=my(["\n display: flex;\n background-color: var(--chat-info-drawer-media-background);\n border-radius: 10px;\n background-image: linear-gradient(\n rgba(0, 0, 0, 0) 70%,\n rgba(0, 0, 0, 0.6) 100%\n );\n\n .media-images {\n height: 100px;\n width: 100px;\n padding: 5px;\n backgroundrepeat: no-repeat;\n backgroundsize: cover;\n object-fit: cover;\n }\n"]))),_y=Q.b.div(vy||(vy=my(["\n height: 100px;\n width: 100px;\n background-image: linear-gradient( rgba(0,0,0,0) 70%, rgba(0,0,0,0.6) 100% );\n border-radius: 10px;\n padding: 5px;\n > div{\n height: 100%;\n width: 100%;\n }\n .plyr--full-ui{\n height: 100%;\n min-width: 90px; !important;\n border-radius: 10px;\n }\n .video_player{\n width: 90px;\n height: 100%;\n z-index: -1;\n }\n \n .play_icon{\n left: 40%;\n top: 40%;\n width: 10px;\n height: 10px;\n }\n\n .play_icon_wrapper{\n width: 30px !important;\n height: 30px !important;\n }\n \n"])));var xy,jy,ky,Oy,Sy,Ey,Cy=function(e){var t,n=e.conversationId,r=e.message,i=e.setTotalMediaFiles,o=(e.totalMediaFiles,null==r||null===(t=r.messages[n])||void 0===t?void 0:t.filter((function(e){var t;return(null==e?void 0:e.attachments)&&(null==e||null===(t=e.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.mediaUrl.length)>0}))),s=null==o?void 0:o.filter((function(e){var t,n;return Object(a.z)(null===(t=e.attachments[0])||void 0===t?void 0:t.extension)||Object(a.A)(null===(n=e.attachments[0])||void 0===n?void 0:n.extension)}));return i(s.length),Object(f.jsx)(gy,{children:null==s?void 0:s.map((function(e){var t,n,r,i,o=null==e||null===(t=e.attachments[0])||void 0===t?void 0:t.extension;return Object(a.z)(o)?Object(f.jsx)(yy,{children:Object(f.jsx)(wy,{children:Object(f.jsx)($,{className:"media-images",src:null===(n=e.attachments[0])||void 0===n?void 0:n.mediaUrl})})},null==e?void 0:e.id):Object(a.A)(o)?Object(f.jsx)(yy,{children:Object(f.jsx)(wy,{children:Object(f.jsx)(_y,{children:Object(f.jsx)(Eh,{className:"custom_video_player",videoLink:null===(r=e.attachments[0])||void 0===r?void 0:r.mediaUrl,thumbUrl:null===(i=e.attachments[0])||void 0===i?void 0:i.thumbnailUrl})})})},null==e?void 0:e.id):void 0}))})},Ay="https://chatstorage.isometrik.ai/chat-assets\\images\\watsappbg.png",Py="https://chatstorage.isometrik.ai/chat-assets\\images\\drkbg.jpg",My="https://chatstorage.isometrik.ai/chat-assets\\icons\\right-arrow.svg";function Iy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ry(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ry(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ty(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ly=Q.b.div(xy||(xy=Ty(["\n display: flex;\n box-sizing: border-box;\n flex-wrap: wrap;\n justify-content: flex-start;\n cursor: pointer;\n margin-right: 1rem;\n"]))),Dy=Q.b.div(jy||(jy=Ty(["\n height: 112px;\n width: 112px;\n margin: 4px 4px 10px;\n display: flex;\n"]))),By=Q.b.div(ky||(ky=Ty(["\n display: flex;\n background-color: var(--chat-info-drawer-media-background);\n border-radius: 10px;\n background-image: linear-gradient(\n rgba(0, 0, 0, 0) 70%,\n rgba(0, 0, 0, 0.6) 100%\n );\n\n .media-images {\n height: 112px;\n width: 112px;\n padding: 10px;\n background-repeat: no-repeat;\n object-fit: cover;\n }\n"]))),Ny=Q.b.div(Oy||(Oy=Ty(["\n display: flex;\n overflow: scroll;\n flex-wrap: wrap;\n padding-top: 1rem;\n"]))),Fy=Q.b.div(Sy||(Sy=Ty(["\n display: flex;\n width: 100%;\n height: 80vh;\n\n .no_media{\n margin: auto;\n }\n"]))),Uy=Q.b.div(Ey||(Ey=Ty(["\n height: 110px;\n width: 110px;\n border-radius: 10px;\n padding: 8px;\n > div{\n height: 100%;\n width: 100%;\n }\n .plyr--full-ui{\n height: 100%;\n min-width: 95px !important;\n }\n .play_icon{\n left: 40%;\n top: 40%;\n }\n .video_player{\n width: 95px;\n height: 100%;\n z-index: -1;\n }\n\n .play_icon{\n left: 40%;\n top: 40%;\n width: 10px;\n height: 10px;\n }\n\n .play_icon_wrapper{\n width: 30px !important;\n height: 30px !important;\n }\n"])));var zy,Wy,Vy,Hy,Yy=function(e){var t=e.handleImgVidClick,n=e.filteredData;return Object(f.jsx)(f.Fragment,{children:(null==n?void 0:n.length)>0?Object.entries(function(e){var t={};return null==e||e.forEach((function(e){var n,r,i,o=Object(a.v)(e.sentAt);t.hasOwnProperty(o)||(t[o]=[]),"document"!==(null==e?void 0:e.customType)&&t[o].push({timeStamp:null==e?void 0:e.sentAt,mediaUrl:null==e||null===(n=e.attachments[0])||void 0===n?void 0:n.mediaUrl,extension:null==e||null===(r=e.attachments[0])||void 0===r?void 0:r.extension,mediaId:null==e||null===(i=e.attachments[0])||void 0===i?void 0:i.mediaId})})),t}(n)).map((function(e){var n=Iy(e,2),r=n[0],i=n[1];return Object(f.jsxs)(f.Fragment,{children:[(null==i?void 0:i.length)>0&&Object(f.jsx)("span",{className:"letter",id:"".concat(r.toUpperCase()),children:r}),Object(f.jsx)(Ny,{children:(null==i?void 0:i.length)>0?i.map((function(e){var n=e.extension;return Object(a.z)(n)?Object(f.jsx)(Ly,{onClick:function(){return t(e.mediaId)},children:Object(f.jsx)(Dy,{children:Object(f.jsx)(By,{children:Object(f.jsx)($,{className:"media-images",src:null==e?void 0:e.mediaUrl})})})}):Object(a.A)(n)?Object(f.jsx)(Ly,{onClick:function(){return t(e.mediaId)},children:Object(f.jsx)(Dy,{children:Object(f.jsx)(By,{children:Object(f.jsx)(Uy,{children:Object(f.jsx)(Eh,{className:"custom_video_player",videoLink:e.mediaUrl,thumbUrl:e.thumbnailUrl})})})})}):Object(f.jsx)("p",{children:"Unsupported media format"})})):Object(f.jsx)(Fy,{children:Object(f.jsx)("p",{className:"no_media",children:"No media"})})})]})})):Object(f.jsx)(Fy,{children:Object(f.jsx)("p",{children:"No media"})})})};function Gy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xy(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ky=Q.b.div(zy||(zy=Xy(["\n position: relative;\n flex-wrap: wrap;\n"]))),Zy=Q.b.p(Wy||(Wy=Xy(["\n color: var(--black);\n"]))),$y=Q.b.div(Vy||(Vy=Xy([" \n margin: 0.25rem 0;\n padding: 0.5rem;\n width: fit-content;\n border-bottom-right-radius: 7.5px;\n border-bottom-left-radius: 7.5px;\n --tw-bg-opacity: 1;\n background-color: ",";\n position: relative;\n"])),(function(e){return e.selfChat?"var(--sender_chatbg)":"var(--toast-background)"})),Qy=Q.b.div(Hy||(Hy=Xy(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 80vh; \n"]))),Jy=function(e){var t,n=e.mediaDocs,i=Object(o.b)("isometrikUserId"),a=Gy(Object(r.useState)(),2),s=a[0],c=a[1];return Object(f.jsx)(Ky,{children:(null==n||null===(t=n.filter((function(e){return"document"===(null==e?void 0:e.customType)})))||void 0===t?void 0:t.length)>0?n.filter((function(e){return"document"===(null==e?void 0:e.customType)})).map((function(e){var t;return Object(f.jsx)($y,{selfChat:i===(null==e||null===(t=e.senderInfo)||void 0===t?void 0:t.userId)||i===(null==e?void 0:e.senderId),children:Object(f.jsx)(ch,{isNotShowDropDown:!0,chat:e,messageLength:s,setmessageLength:c})})})):Object(f.jsx)(Qy,{children:Object(f.jsx)(Zy,{children:"No Docs"})})})};function ew(e){return(ew="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tw,nw,rw,iw,ow,aw,sw,cw,fw,uw,lw,dw=["children","value","index"];function hw(e){return function(e){if(Array.isArray(e))return bw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||vw(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||vw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vw(e,t){if(e){if("string"==typeof e)return bw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bw(e,t):void 0}}function bw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mw(Object(n),!0).forEach((function(t){yw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==ew(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ew(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ew(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ww(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _w(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var xw=Q.b.div(tw||(tw=_w(["\n margin: 20px;\n max-width: auto%;\n border-radius: 7.5px;\n --wt-bg-opacity: 1;\n padding: 0.2rem 0.4rem;\n background-color: var(--sender_chatbg);\n // word-break: break-word;\n text-align: end;\n width: fit-content;\n"]))),jw=Q.b.div(nw||(nw=_w(["\n max-height: 10rem;\n overflow: scroll;\n color: var(--black);\n"]))),kw=Q.b.div(rw||(rw=_w(["\n padding: 20px 40px;\n border-bottom: 1px solid var(--border_color);\n display: flex;\n flex-direction: column;\n color: var(--black);\n"]))),Ow=Q.b.div(iw||(iw=_w(["\n border-bottom: 1px solid var(--border_color);\n display: flex;\n flex-direction: column;\n padding: 20px 40px;\n color: var(--black);\n"]))),Sw=Q.b.div(ow||(ow=_w(["\n background-color: var(--primary-white);\n"]))),Ew=Q.b.div(aw||(aw=_w(["\n position: relative;\n padding: 0 1rem;\n"]))),Cw=Q.b.p(sw||(sw=_w(["\n font-size: 16px;\n font-weight: 500;\n color: var(--profile-color);\n margin-bottom: 0;\n cursor: pointer;\n"]))),Aw=Q.b.h5(cw||(cw=_w(["\n color: var(--chat-msg-text);\n font-size: 14px;\n margin-top: 1rem;\n margin-bottom: 0;\n text-align: ",";\n padding: ",";\n"])),(function(e){return e.textCenter?"center":"left"}),(function(e){return e.customPadding?"2rem 0":""})),Pw=Q.b.div(fw||(fw=_w(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n"])));Q.b.div(uw||(uw=_w(["\n width:30vw;\n","\n"])),_n(Object(Q.a)(lw||(lw=_w(["\n width:100vw;\n"])))));function Mw(e){var t=e.children,n=e.value,r=e.index,i=ww(e,dw);return Object(f.jsx)("div",gw(gw({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},i),{},{children:n===r&&Object(f.jsx)(Wm,{sx:{p:3},children:Object(f.jsx)(Tg,{children:t})})}))}function Iw(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}Mw.propTypes={children:D.a.node,index:D.a.number.isRequired,value:D.a.number.isRequired};var Rw=function(e){var t,n,s,c,u,l,d,h,p,v,b,m,g,y,w,_,x,j,k=e.sidebarChatItem,E=e.setShowProfilePicture,C=e.setSearchedMessageArray,A=e.setDeleteChatModal,P=e.setUserBlockModal,M=e.userConversationDetail,I=e.theme,R=e.Messages,T=e.messageInfo,L=e.conversationId,D=e.messageChat,B=(e.mediaDocs,e.debounceSearchMessages),F=e.searchedMessageArray,U=e.searchMessageLoaderStatus,z=e.handleClosee,W=e.handler,V=(e.setMed,e.handleImgVidClick),H=e.enteredSearchQuery,Y=e.getPaginationMessagesData,G=e.setSearchShow,q=e.currSearchPage,X=e.searchLimit,K=e.resetSearchMessages,Z=O(),Q=Z.baseImageUrl,J=Z.manageProfile,ee=Z.onViewProfilleClick,te=Z.dateFormat,ne=Z.renderChatMediaContainer,re=Z.mediaSidebarOutSideClick,ie=Z.state,oe=Z.isSearchLoading,ae=Z.setIsSearchLoading,se=Z.s3ImageLinkGen,fe=pw(i.a.useState({top:!1,left:!1,bottom:!1,right:!1}),2),ue=fe[0],le=fe[1],de=pw(i.a.useState(0),2),he=de[0],pe=de[1],ve=pw(Object(r.useState)(),2),be=ve[0],me=ve[1],ge=pw(Object(r.useState)(),2),ye=ge[0],we=ge[1],_e=pw(Object(r.useState)(),2),xe=_e[0],je=_e[1],ke=Object(o.b)("isometrikUserId"),Oe=Object(r.useRef)(null),Se=Object(r.useRef)(null),Ee=pw(Object(r.useState)(""),2),Ce=Ee[0],Ae=Ee[1];Object(r.useEffect)((function(){e.searchShow&&document.getElementById("searchBar").focus(),K()}),[null==e?void 0:e.searchShow]),Object(r.useEffect)((function(){if(D){var e={conversationId:L,messageId:null==D?void 0:D.messageId,limit:20,skip:0};Object(S.default)().message.getStatusDelivery(e).then((function(e){var t,n,r=Object(a.w)(new Date((null==e?void 0:e.users)&&(null==e||null===(t=e.users[0])||void 0===t?void 0:t.timestamp)));je(r),je((null==e?void 0:e.users)&&(null==e||null===(n=e.users[0])||void 0===n?void 0:n.timestamp))})).catch((function(e){console.log("error message ",e)})),Object(S.default)().message.getStatusRead(e).then((function(e){var t,n,r=Object(a.w)(new Date((null==e?void 0:e.users)&&(null==e||null===(t=e.users[0])||void 0===t?void 0:t.timestamp)));we(r),je((null==e?void 0:e.users)&&(null==e||null===(n=e.users[0])||void 0===n?void 0:n.timestamp))})).catch((function(e){console.log("error while fetching message status",e)}))}}),[D]);var Pe=function(e,t){return function(n){("keydown"!==n.type||"Tab"!==n.key&&"Shift"!==n.key)&&le(gw(gw({},ue),{},yw({},e,t)))}},Me=function(){z(),W()},Ie=null==R||null===(t=R.messages[L])||void 0===t?void 0:t.filter((function(e){var t;return(null==e?void 0:e.attachments)&&(null==e||null===(t=e.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.mediaUrl.length)>0})),Re=null==Ie?void 0:Ie.filter((function(e){var t,n;return Object(a.z)(null===(t=e.attachments[0])||void 0===t?void 0:t.extension)||Object(a.A)(null===(n=e.attachments[0])||void 0===n?void 0:n.extension)})),Te=function(e,t,n){G(!1);var r=document.getElementById("message_".concat(e)),i=e;if(Oe.current=e,r){ae(!1),Oe.current=null,document.getElementById("allMessages").scroll(0,r.offsetTop-120);var o=document.querySelector(".isoChat .activeMsg");o&&o.classList.remove("activeMsg"),setTimeout((function(){r.classList.add("activeMsg")}),100)}else(function(e,t){return-1!==(t?hw(t):null!=ie&&ie.messages[L]?hw(null==ie?void 0:ie.messages[L]):[]).findIndex((function(t){return t.messageId===e}))})(i,n)||(ae(!0),Y((function(e,t){null==e||e.length}),t))};return Object(r.useEffect)((function(){oe&&Oe.current&&requestAnimationFrame((function(){Te(Oe.current)}))}),[oe,ie]),Object(f.jsxs)(f.Fragment,{children:[null!=e&&e.slideShow||null!=e&&e.searchShow||T?Object(f.jsx)(N,{onClose:re?function(e){return re(e,Me)}:Me,children:ue.right||!J&&null!=e&&e.slideShow?Object(f.jsxs)("div",{className:"media_header mediaFiles",children:[Object(f.jsxs)("div",{className:"topHeader",children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow||null!=e&&e.searchShow||T?"contact_header header d-flex p-3":"contact_header d-flex p-3",children:[Object(f.jsx)($,{onClick:function(e){J?(Pe("right",!1)(e),e.stopPropagation()):Me()},src:Zr,className:"closeIcon ".concat(null!=e&&e.theme?"darkicons":"lighticons")}),Object(f.jsx)("p",{className:"contactTitle ml-3",children:"".concat(null!=e&&e.slideShow?"Contact info":""," ").concat(null!=e&&e.searchShow?"Search Messages":""," ").concat(T?"Message Info":"")})]}),Object(f.jsxs)("div",{className:"d-flex justify-content-between align-items-center p-2 topProfile",onClick:function(e){return ee?ee(null==k?void 0:k.opponentDetails,M):function(){return!0}},style:{cursor:"pointer"},children:[Object(f.jsx)("div",{className:"d-flex justify-content-between align-items-center",children:Object(f.jsxs)("div",{className:"d-flex justify-content-between align-items-center ml-2",children:[Object(f.jsx)("div",{style:{cursor:"pointer"},children:Object(f.jsx)(Mm,{className:"profile_img mr-2",src:Q?se(Q,null==k||null===(n=k.opponentDetails)||void 0===n||null===(n=n.metaData)||void 0===n?void 0:n.profilePic,80,320,320):null==k||null===(s=k.opponentDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.profilePic})}),Object(f.jsxs)("div",{children:[null!=k&&null!==(c=k.opponentDetails)&&void 0!==c&&null!==(c=c.metaData)&&void 0!==c&&c.firstName?Object(f.jsx)("p",{className:"fullname m-0",children:(null==k||null===(u=k.opponentDetails)||void 0===u?void 0:u.metaData.firstName)+" "+(null==k||null===(l=k.opponentDetails)||void 0===l?void 0:l.metaData.lastName)}):"",Object(f.jsxs)("p",{className:"username m-0",style:{cursor:"pointer"},children:["@",null==k||null===(d=k.opponentDetails)||void 0===d?void 0:d.userName]})]})]})}),Object(f.jsx)("div",{className:"viewProfile",children:Object(f.jsx)($,{style:{filter:"brightness(0.5)"},src:My,className:null!=e&&e.theme?"dark_footer_icon":"light_footer_icon"})})]})]}),ne?ne({conversation:M,messages:R}):Object(f.jsx)("div",{className:"bg-white ss",children:Object(f.jsxs)(Wm,{sx:{width:"100%",marginTop:"20px"},children:[Object(f.jsx)(Wm,{sx:{borderBottom:1,borderColor:"divider"},children:Object(f.jsxs)(sy,{value:he,onChange:function(e,t){pe(t)},"aria-label":"basic tabs example",sx:{width:"100%"},children:[Object(f.jsx)(by,gw({label:"Media"},Iw(0))),Object(f.jsx)(by,gw({label:"Docs"},Iw(1)))]})}),Object(f.jsx)(Mw,{value:he,index:0,children:Object(f.jsx)(Yy,{handleImgVidClick:V,filteredData:Re})}),Object(f.jsx)(Mw,{value:he,index:1,children:Object(f.jsx)(Jy,{mediaDocs:Re})}),Object(f.jsx)(Mw,{value:he,index:2,children:"No Link Items"})]})})]}):Object(f.jsxs)("div",{className:"contact_container d-flex flex-column",style:{overflow:"hidden"},children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow||null!=e&&e.searchShow||T?"contact_header header":"contact_header",children:[Object(f.jsx)($,{onClick:Me,src:Zr,className:null!=e&&e.theme?"darkicons":"lighticons"}),Object(f.jsx)("p",{children:"".concat(null!=e&&e.slideShow?"Contact info":""," ").concat(null!=e&&e.searchShow?"Search Messages":""," ").concat(T?"Message Info":"")})]}),null!=e&&e.slideShow?Object(f.jsxs)("div",{children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"showMe":"",children:[Object(f.jsx)("div",{className:"contact_profile",children:Object(f.jsx)(Mm,{className:"profile_image",src:Q?se(Q,null==k||null===(h=k.opponentDetails)||void 0===h||null===(h=h.metaData)||void 0===h?void 0:h.profilePic,80,320,320):null==k||null===(p=k.opponentDetails)||void 0===p||null===(p=p.metaData)||void 0===p?void 0:p.profilePic,onClick:function(){return function(t){var n,r,i;E({showProfile:!0,userName:null==t||null===(n=t.opponentDetails)||void 0===n?void 0:n.userName,userImageSrc:Q?se(Q,null==t||null===(r=t.opponentDetails)||void 0===r||null===(r=r.metaData)||void 0===r?void 0:r.profilePic,80,480,480):null==t||null===(i=t.opponentDetails)||void 0===i||null===(i=i.metaData)||void 0===i?void 0:i.profilePic,theme:null==e?void 0:e.theme})}(k)}})}),Object(f.jsx)("div",{className:"contact_name",children:Object(f.jsxs)("div",{children:[null!=k&&null!==(v=k.opponentDetails)&&void 0!==v&&null!==(v=v.metaData)&&void 0!==v&&v.firstName?Object(f.jsx)("p",{className:"fullname",children:(null==k||null===(b=k.opponentDetails)||void 0===b?void 0:b.metaData.firstName)+" "+(null==k||null===(m=k.opponentDetails)||void 0===m?void 0:m.metaData.lastName)}):"",Object(f.jsxs)("p",{className:"text_Color d-flex justify-content-center username",children:["@",null==k||null===(g=k.opponentDetails)||void 0===g?void 0:g.userName]})]})}),Object(f.jsx)("div",{className:"viewProfile text-center",onClick:function(){return ee?ee(null==k?void 0:k.opponentDetails,M):function(){return!0}},children:"View Profile"})]}),Object(f.jsxs)("div",{children:[["right"].map((function(t){return Object(f.jsxs)(i.a.Fragment,{children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"contactsocialInfo showMe msgFont text_Color pointer":"contactsocialInfo pointer",onClick:Pe(t,!0),children:[Object(f.jsx)("span",{children:"Media And docs - "}),Object(f.jsx)("div",{children:Object(f.jsxs)("span",{"data-testid":"chevron-right-alt","data-icon":"chevron-right-alt",class:"aft2yglh pointer",children:[Object(f.jsx)("span",{style:{marginRight:"10px"},children:null==Re?void 0:Re.length}),Object(f.jsx)($,{style:{filter:"brightness(0.5)"},src:My,className:null!=e&&e.theme?"dark_footer_icon":"light_footer_icon"})]})})]}),Object(f.jsx)("div",{children:Object(f.jsx)(Cy,{message:R,conversationId:L,setTotalMediaFiles:me,totalMediaFiles:be})})]},t)})),J?Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"text textt showMe":"text textt",children:[Object(f.jsxs)("p",{className:"pointer",onClick:function(){return P(!0)},children:[Object(f.jsx)($,{src:"https://chatstorage.isometrik.ai/chat-assets\\icons\\block.svg",className:"icons svgg ".concat(null!=M&&M.messagingDisabled?"user_unblock":"")}),Object(f.jsxs)("span",{className:"".concat(null!=M&&M.messagingDisabled?"user_unblock":""," pointer btnn"),children:[null!=M&&M.messagingDisabled?"Unblock":"Block"," ",null==M||null===(y=M.opponentDetails)||void 0===y?void 0:y.userName]})]}),Object(f.jsxs)("p",{onClick:function(){return A(!0)},className:"pointer pb-4",children:[Object(f.jsx)($,{src:Qp,className:"icons"}),Object(f.jsx)("span",{className:"pointer btnn",children:"Delete Chat "})]})]}):""]})]}):"",null!=e&&e.searchShow?Object(f.jsxs)("div",{className:"contact_container",ref:Se,style:{height:"100%"},children:[Object(f.jsx)(ce,{elementRef:Se,pageEventHandler:function(){console.log("scroll happens"),U||B(Ce,(q-1)*X,X)}}),Object(f.jsxs)("div",{children:[Object(f.jsx)("div",{className:"contact_profile",children:Object(f.jsx)(ai,{setSearchedMessageArray:C,userSearchEnteredData:function(e){var t;null!=e&&null!==(t=e.trim)&&void 0!==t&&null!==(t=t.call(e))&&void 0!==t&&t.length||K(),Ae(e),B(e)},searchShow:null==e?void 0:e.searchShow,theme:I})}),Object(f.jsxs)(Ew,{children:[(null==F?void 0:F.length)>0?F.map((function(e){var t,n,r,i,o,s,c,u;return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(Aw,{children:Object(a.u)(null==e?void 0:e.sentAt,te)}),Object(f.jsxs)(Pw,{children:[((null===(t=e.senderInfo)||void 0===t?void 0:t.userId)||(null==e?void 0:e.senderId))===ke&&Object(f.jsx)(Zl,{color:"var(--black)",style:{marginLeft:"2px"},id:null!=e&&e.readBy&&(null==e||null===(n=e.readBy)||void 0===n?void 0:n.find((function(e){var t;return e.userId===(null==k||null===(t=k.opponentDetails)||void 0===t?void 0:t.userId)})))?"doubleTickDark":null!=e&&e.deliveredTo&&(null==e||null===(r=e.deliveredTo)||void 0===r?void 0:r.find((function(e){var t;return e.userId===(null==k||null===(t=k.opponentDetails)||void 0===t?void 0:t.userId)})))?"doubleTick":"singleTick"}),Object(f.jsx)(Cw,{onClick:function(){Te(e.messageId)},dangerouslySetInnerHTML:{__html:null===(i=Object(a.h)(null==e||null===(o=e.body)||void 0===o||null===(s=o.replace)||void 0===s||null===(s=s.call(o,/(<([^>]+)>)/gi," "))||void 0===s||null===(c=s.trim)||void 0===c?void 0:c.call(s),null==e||null===(u=e.metaData)||void 0===u?void 0:u.isPlainText))||void 0===i?void 0:i.replace(/<br \/>/g," ")}},e.messageId)]})]})})):(null==H?void 0:H.length)>0?Object(f.jsx)(Aw,{textCenter:!0,customPadding:!0,children:"No messages found"}):Object(f.jsx)("div",{className:"bg-white",children:Object(f.jsxs)("p",{className:"text_Color text-align-center searchmsg text-center",children:["Search for message with ",null==k||null===(w=k.opponentDetails)||void 0===w?void 0:w.userName," "]})}),U?Object(f.jsx)(Aw,{textCenter:!0,customPadding:!0,children:"Looking for messages....."}):""]})]})]}):"",T?Object(f.jsxs)("div",{className:"contact_container",style:{marginTop:"66px",backgroundColor:"var(--gray_color)"},children:[Object(f.jsx)(jw,{style:{background:"url(".concat(null!=e&&e.theme?Py:Ay,")"),backgroundRepeat:"no-repeat",backgroundSize:"cover"},className:"messageInfoBody",children:Object(f.jsx)(xw,{children:null!=D&&D.attachments&&0===(null==D||null===(_=D.attachments)||void 0===_||null===(_=_[0])||void 0===_?void 0:_.attachmentType)&&(null==D||null===(x=D.attachments)||void 0===x||null===(x=x[0])||void 0===x?void 0:x.mediaUrl.length)>0?Object(f.jsx)($,{style:{width:"21rem",height:"11rem"},src:null==D||null===(j=D.attachments[0])||void 0===j?void 0:j.mediaUrl}):Object(a.h)(null==D?void 0:D.body).replace(/<br \/>/g," ")})}),Object(f.jsxs)(Sw,{children:[Object(f.jsxs)(kw,{children:[Object(f.jsx)("span",{children:"Read"}),Object(f.jsx)("span",{children:ye||"-"})]}),Object(f.jsxs)(Ow,{children:[Object(f.jsx)("span",{children:"Delivered "}),Object(f.jsx)("span",{children:xe?ye:"-"})]})," "]})]}):""]})}):"",Object(f.jsx)("style",{jsx:!0,children:"\n @media (max-width: 48rem) {\n .contact_container {\n max-width: 100vw;\n z-index: 3\n }\n }\n @media screen and (min-width: 1024px) and (max-width: 1300px){\n .media_Container{\n width: 70vw;\n }\n }\n \n "})]})};function Tw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Lw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dw,Bw,Nw,Fw,Uw,zw,Ww,Vw,Hw,Yw,Gw,qw,Xw,Kw=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Object(r.useState)(!0),o=Tw(i,2),a=o[0],s=o[1],c=Object(r.useRef)();Object(r.useEffect)((function(){c.current=e}),[e]);var f=Object(r.useCallback)((function(){a&&(s(!1),c.current.apply(c,arguments),n?s(!0):setTimeout((function(){return s(!0)}),t))}),[t,n,a,c]);return f};function Zw(e){return(Zw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $w(e){return function(e){if(Array.isArray(e))return a_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qw(Object(n),!0).forEach((function(t){e_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function e_(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Zw(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Zw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Zw(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t_(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t_=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="executing",p="completed",v={};function b(){}function m(){}function g(){}var y={};f(y,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,a)&&(y=_);var x=g.prototype=b.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var c=l(e[i],e,o);if("throw"!==c.type){var f=c.arg,u=f.value;return u&&"object"==Zw(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=d;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var f=l(t,n,r);if("normal"===f.type){if(i=r.done?p:"suspendedYield",f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(i=p,r.method="throw",r.arg=f.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=l(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Zw(t)+" is not iterable")}return m.prototype=g,i(x,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:m,configurable:!0}),m.displayName=f(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(k.prototype),f(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(x),f(x,c,"Generator"),f(x,a,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function n_(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function r_(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){n_(o,r,i,a,s,"next",e)}function s(e){n_(o,r,i,a,s,"throw",e)}a(void 0)}))}}function i_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||o_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o_(e,t){if(e){if("string"==typeof e)return a_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a_(e,t):void 0}}function a_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var c_=Q.b.div(Dw||(Dw=s_(["\n padding: 28px;\n background-color: var(--intro-background);\n position: absolute;\n box-sizing: border-box;\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n width: 70vw;\n height: 100%;\n flex-direction: column;\n ","\n"])),_n(Object(Q.a)(Bw||(Bw=s_(["\n display: none;\n "]))))),f_=Q.b.div(Nw||(Nw=s_(["\n position: absolute;\n background: var(--modal_color);\n color: var(--black);\n top: 45px;\n right: 20px;\n z-index: 999;\n padding: 1rem 0;\n display: flex;\n justify-content: center;\n align-items: center;\n visibility: hidden;\n transform: translateY(-10px);\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n transform-origin: right top;\n width: 230px;\n ","\n"])),(function(e){return e.isActive&&Object(Q.a)(Fw||(Fw=s_(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))})),u_=(Q.b.div(Uw||(Uw=s_(["\n background-color: var(--modal_color);\n position: absolute;\n top: 45px;\n right: 20px;\n z-index: 999;\n width: 230px;\n color: var(--black);\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n visibility: hidden;\n transform: translateY(-10px);\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n transform-origin: right top;\n padding: 1rem 0;\n\n ","\n\n ","\n"])),(function(e){return e.isMenu&&Object(Q.a)(zw||(zw=s_(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))}),_n(Object(Q.a)(Ww||(Ww=s_(["\n top: 50px;\n left: 150px;\n "]))))),Q.b.ul(Vw||(Vw=s_(["\n background: var(--modal_color);\n color: var(--black);\n box-shadow: -3px 0px 4px rgba(194, 194, 194, 0.25);\n border-radius: 4px;\n padding: 1rem 0;\n position: absolute;\n top: 8px;\n right: 0px;\n width: 180px;\n opacity: 0;\n cursor: pointer;\n visibility: hidden;\n transform: translateY(-10px);\n transform-origin: left top;\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n z-index: 999;\n ","\n"])),(function(e){return e.isActive&&Object(Q.a)(Hw||(Hw=s_(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))})),Q.b.li(Yw||(Yw=s_(["\n padding: 0 2rem;\n margin: 0;\n line-height: 2.5rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 14.5px;\n color: var(--primary);\n padding-right: 58px !important;\n"]))),function(e,t){var n=[{id:1,header:"Contact info"},{id:6,header:"Clear chat"},{id:7,header:"Delete chat"},{id:9,header:e?"Unblock":"Block"}];if(!t&&e){var r=n.findIndex((function(e){return 9===e.id}));-1!==r&&n.splice(r,1)}return n}),l_=Q.b.div(Gw||(Gw=s_(["\n","\n","\n"])),(function(e){var t=e.headerHeight;e.maxHeight;return"height:calc(100vh - ".concat(t,"px);\nposition: relative;\n")}),_n(Object(Q.a)(qw||(qw=s_(["\nheight: ",";"])),(function(e){var t=e.maxHeight;return"calc(100vh - ".concat(t,"px)")})))),d_=Q.b.div(Xw||(Xw=s_(["\n color: var(--black);\n visibility: visible;\n user-select: text;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-grow: 1;\n align-items: flex-start;\n font-size: 0.8125rem;\n line-height: 1.5385;\n min-height: 20px;\n"])));var h_,p_,v_,b_,m_,g_,y_,w_,__,x_=function(e){var t,n,s,c,u,l,d,h,p=e.sidebarChatItem,v=(e.setSidebarChatItem,e.showSearchIcon),b=e.state,m=e.setState,g=e.setIsSidebarShow,y=e.preventMessageRef,w=e.getPaginationMessagesData,_=e.isSidebarShow,x=e.setShowProfilePicture,j=e.findUserId,k=e.setUserBlockModal,E=e.setClearChatModal,C=e.setDeleteChatModal,A=e.setslideShow,P=e.slideShow,M=e.setSearchShow,I=e.searchShow,R=e.setUserConversationDetail,L=e.userConversationDetail,D=e.setMessageInfo,B=e.messageInfo,F=e.debounceSearchMessages,U=e.enteredSearchQuery,z=e.searchedMessageArray,W=e.setSearchedMessageArray,V=e.searchMessageLoaderStatus,H=e.setMediaDocs,G=e.mediaDocs,q=e.sidebarData,X=e.userDetails,K=e.isPreviousMessageLoad,Z=e.onChatChange,Q=e.placeHolder,J=e.chatHeaderRightSlot,ee=e.chatHeaderMoreMenu,te=e.customSend,ne=e.handleCustomSend,re=void 0===ne?function(){}:ne,ie=e.extraAttachmentOptions,oe=e.attachMentPosition,ae=e.ChatFooterRightSlot,se=e.customSendOptions,ce=e.RenderCustomSendOptions,fe=e.renderSelfMoremenu,ue=e.allowProfileClick,le=e.renderProfileBadge,de=e.hasMessages,he=e.setHasMessages,pe=e.currSearchPage,ve=e.searchLimit,be=e.resetSearchMessages,me=Object(r.useRef)(),ge=i_(Object(r.useState)(!1),2),ye=(ge[0],ge[1]),we=i_(i.a.useState(null),2),_e=we[0],xe=(we[1],i_(Object(r.useState)(!1),2)),je=(xe[0],xe[1],i_(Object(r.useState)(!1),2)),ke=je[0],Oe=je[1],Se=i_(Object(r.useState)(!1),2),Ee=Se[0],Ce=Se[1],Ae=i_(Object(r.useState)(""),2),Pe=Ae[0],Me=Ae[1],Ie=i_(Object(r.useState)(""),2),Re=Ie[0],Te=Ie[1],Le=i_(Object(r.useState)(""),2),De=Le[0],Be=Le[1],Ne=i_(Object(r.useState)([]),2),Fe=Ne[0],Ue=Ne[1],ze=i_(Object(r.useState)([]),2),We=ze[0],Ve=ze[1],He=i_(Object(r.useState)(0),2),Ye=He[0],Ge=He[1],qe=Object(r.useRef)(0),Xe=Object(r.useRef)(null),Ke=i_(Object(r.useState)(),2),Ze=Ke[0],$e=Ke[1],Qe=i_(Object(r.useState)({open:!1,message:"",variant:""}),2),Je=Qe[0],et=Qe[1],tt=(Boolean(_e),i_(Object(r.useState)(!1),2)),nt=tt[0],rt=tt[1],it=i_(Object(r.useState)(void 0),2),ot=it[0],at=it[1],st=O(),ct=st.theme,ft=(st.manageProfile,st.baseImageUrl),ut=st.showStatusMessages,lt=st.renderCustomChatMessageHeader,dt=st.isGroup,ht=st.s3ImageLinkGen,pt=st.renderUserStatus,vt=function(){var e=r_(t_().mark((function e(){var t,n,r,i,a,s,c;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("loading"!==ot){e.next=2;break}return e.abrupt("return");case 2:if(e.prev=2,"userBlockConversation"!==(null==L||null===(t=L.lastMessageDetails)||void 0===t?void 0:t.action)||(null==L||null===(n=L.lastMessageDetails)||void 0===n?void 0:n.initiatorId)!==Object(o.b)("isometrikUserId")){e.next=9;break}return console.log("userConversationDetail",null==L||null===(i=L.lastMessageDetails)||void 0===i?void 0:i.initiatorId,null==L?void 0:L.messagingDisabled),at(!0),e.abrupt("return");case 9:at("loading");case 10:return e.next=12,Object(S.default)().user.getUserBlock({searchTag:null==L||null===(r=L.opponentDetails)||void 0===r?void 0:r.userName});case 12:a=e.sent,s=(null==a?void 0:a.users)||[],c=s.find((function(e){var t;return e.userId===(null==L||null===(t=L.opponentDetails)||void 0===t?void 0:t.userId)})),at(!!c),e.next=22;break;case 18:return e.prev=18,e.t0=e.catch(2),at(!1),e.abrupt("return");case 22:case"end":return e.stop()}}),e,null,[[2,18]])})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){(null!=L&&L.updateBlockStatus||null!=L&&L.messagingDisabled)&&void 0===ot&&vt()}),[L,ot]);var bt=function(){Et(),A(!0),M(!1),D(!1),ye(!0)},mt=function(){A(!1),M(!0),D(!1)},gt=Kw(r_(t_().mark((function e(){var t;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={conversationId:null==p?void 0:p.conversationId},e.prev=1,!De){e.next=5;break}return e.next=5,Object(S.default)().message.postIndicateTyping(t).then((function(e){}));case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[1,7]])}))),3e3,!1),yt=function(){var e=r_(t_().mark((function e(t){var n,r;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={conversationId:t},ut||(n.includeConversationStatusMessagesInUnreadMessagesCount=!1),e.prev=2,!((null==Object||null===(r=Object.keys(t))||void 0===r?void 0:r.length)>0)){e.next=6;break}return e.next=6,Object(S.default)().Conversation.getConversationDetails(n,t).then((function(e){var t,n,r,i;-1===(null==e||null===(t=e.conversationDetails)||void 0===t||null===(t=t.opponentDetails)||void 0===t?void 0:t.lastSeen)?Ce(!0):(Ce(!1),console.log("last Seen from API - ",null==e||null===(n=e.conversationDetails)||void 0===n||null===(n=n.opponentDetails)||void 0===n?void 0:n.lastSeen,new Date(null==e||null===(r=e.conversationDetails)||void 0===r||null===(r=r.opponentDetails)||void 0===r?void 0:r.lastSeen)),Me(null==e||null===(i=e.conversationDetails)||void 0===i||null===(i=i.opponentDetails)||void 0===i?void 0:i.lastSeen))}));case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){var e,t;if(p)return M(!1),console.log("last seen from convo",null==p||null===(e=p.opponentDetails)||void 0===e?void 0:e.lastSeen),Me(null==p||null===(t=p.opponentDetails)||void 0===t?void 0:t.lastSeen),null!=p&&p.conversationId?me.current=setInterval((function(){yt(null==p?void 0:p.conversationId)}),3e4):clearInterval(me.current),function(){return clearInterval(me.current)};Me("")}),[p,ut]),Object(r.useEffect)((function(){!function(e){if(console.log("last seen time",e),!e)return Te(!1),!1;try{var t=new Date(e),n=new Date;if(t.getTime()>n.getTime())console.log("Invalid input");else{var r=Math.round((n.getTime()-t.getTime())/xn.t),i=Math.round((n.getTime()-t.getTime())/xn.o),o=Math.round((n.getTime()-t.getTime())/xn.b),s=Math.round((n.getTime()-t.getTime())/xn.e),c=Math.round((n.getTime()-t.getTime())/xn.m),f=Math.round((n.getTime()-t.getTime())/xn.p);Te(f<60?"last seen just now":c<60?"Last seen ".concat(1===c?"a minute":c+" min"," ago"):s<24?1===s?"Last seen at ".concat(Object(a.w)(t)):"Last seen ".concat(t.getDate()===n.getDate()?"at ".concat(Object(a.w)(t)):"yesterday"):"Last seen ".concat(o<30?1===o?"a day":o+" days":i<12?1===i?"a month":i+" months":1===r?"an year":r+" years"," ago"))}}catch(e){console.error("Error calculating lastSeen from getLastSeen()")}}(Pe)}),[Pe]),Object(r.useEffect)((function(){var e;-1===(null==p||null===(e=p.opponentDetails)||void 0===e?void 0:e.lastSeen)?Ce(!0):Ce(!1),gt()}),[j,De,null==p?void 0:p.conversationId]);var wt=Object(o.b)("isometrikUserId");Object(r.useEffect)((function(){if("typingEvent"===(null==j?void 0:j.action)&&j.conversationId===(null==p?void 0:p.conversationId)&&j.userId!==wt&&Oe(!0),j){var e=setTimeout((function(){return Oe(!1)}),3e3);return function(){return clearTimeout(e)}}return Oe(!0)}),[j]),Object(r.useEffect)((function(){null!=p&&p.conversationId?(at(void 0),Z(!0,p),function(){var e=r_(t_().mark((function e(){var t;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(a.x)({id:null==p?void 0:p.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:ut});case 2:t=e.sent,R(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()):(R({}),at(void 0),Z(!1))}),[p]),Object(r.useEffect)((function(){var e;he(!1);var t={conversationId:null==p?void 0:p.conversationId};ut||(t.conversationStatusMessage=!1),m((function(e){return Jw(Jw({},e),{},{messagesLoading:!0})})),p&&(null===(e=Object(S.default)())||void 0===e||null===(e=e.message)||void 0===e||e.getMessages(t).then((function(e){var t=e.messages.filter((function(e){var t;return(null==e||null===(t=e.body)||void 0===t?void 0:t.length)>0})).reverse();null!=t&&t.length&&he(!0),m((function(e){return Jw(Jw({},e),{},{messagesLoading:!1,messages:Jw(Jw({},null==e?void 0:e.messages),{},e_({},null==p?void 0:p.conversationId,t))})})),requestAnimationFrame((function(){b.messages&&document.getElementById("allMessages")&&document.getElementById("allMessages").scrollTo({top:document.getElementById("allMessages").scrollHeight})}))})).catch((function(e){m((function(e){return Jw(Jw({},e),{},{messagesLoading:!1})})),console.log(e,"errrrrrrrrrrrrrrrrrrr")})))}),[p]),Object(r.useRef)(null);var _t=i_(Object(r.useState)(!1),2),xt=_t[0],jt=_t[1],kt=function(){g(!1),Object(o.d)("isShow",!1),m(Jw(Jw({},b),{},{selectedConvId:""})),q(null)},Ot=function(){var e=-1;switch(ke&&(null==j?void 0:j.conversationId)===(null==p?void 0:p.conversationId)?e=0:!ke&&Ee?e=1:ke||Ee||(e=2),e){case 0:return"typing...";case 1:return"Online";case 2:default:return Re}},St=function(){var e,t;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)("div",{className:"d-flex align-items-center",children:[null!=p&&null!==(e=p.opponentDetails)&&void 0!==e&&e.online?Object(f.jsx)("div",{className:"mr-2",children:Object(f.jsx)(ir,{status:(null==p||null===(t=p.opponentDetails)||void 0===t||null===(t=t.metaData)||void 0===t?void 0:t.customUserStatus)||"ACTIVE",noEdit:!0})}):"",Object(f.jsx)(d_,{children:Ot()})]})})},Et=function(){var e=r_(t_().mark((function e(){var t,n,r,i;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=null==p?void 0:p.conversationId,n={limit:20,skip:0,isGroup:dt,conversationId:t,attachmentTypes:0},e.prev=2,e.next=5,Object(S.default)().message.getMessages(n);case 5:return r=e.sent,Ve($w(null==r?void 0:r.messages)),H($w(null==r?void 0:r.messages)),i=[],null==r||r.messages.forEach((function(e){return e.attachments.forEach((function(e){return i.push(e)}))})),Ue([].concat(i)),e.abrupt("return",r);case 14:e.prev=14,e.t0=e.catch(2),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(){return e.apply(this,arguments)}}(),Ct=function(){var e=r_(t_().mark((function e(t){var n,r,i,o,a;return t_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==(n=Fe.findIndex((function(e){return e.mediaId===t})))){e.next=15;break}return e.prev=2,e.next=5,Et();case 5:(r=e.sent)&&(o=r.messages.findIndex((function(e){var n;return(null==e||null===(n=e.attachments[0])||void 0===n?void 0:n.mediaId)===t})),qe.current=o,Ge(o),null===(i=Xe.current)||void 0===i||i.showModal()),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.error("error",e.t0),et({open:!0,variant:"error",message:e.t0.messages});case 13:e.next=18;break;case 15:qe.current=n,Ge(n),null===(a=Xe.current)||void 0===a||a.showModal();case 18:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(f.jsxs)(f.Fragment,{children:[null!=e&&e.sidebarChatItem?Object(f.jsxs)("div",{className:"mainChat",children:[lt?lt({arrowClick:kt,handleClickSlideShow:bt,baseImageUrl:ft,s3ImageLinkGen:ht,sidebarChatItem:p,isActive:xt,setIsActive:jt,getSelfMenuBar:u_,userConversationDetail:L,setClearChatModal:E,setDeleteChatModal:C,setUserBlockModal:k,searchShowHandler:mt}):Object(f.jsxs)("div",{className:"chat_header",children:[Object(f.jsx)("span",{className:"arrow_icon",children:Object(f.jsx)($,{src:Kr,className:null!=e&&e.theme?"darkicons":"lighticons",style:{marginRight:"10px"},onClick:kt})}),null!=p&&null!==(t=p.opponentDetails)&&void 0!==t&&null!==(t=t.metaData)&&void 0!==t&&t.profilePic?Object(f.jsx)("img",{onClick:ue?bt:function(){},src:ft?ht(ft,null==p||null===(n=p.opponentDetails)||void 0===n||null===(n=n.metaData)||void 0===n?void 0:n.profilePic,70,120,120):null==p||null===(s=p.opponentDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.profilePic,className:"user_image pointer",alt:"opponent_profile_picture"}):Object(f.jsx)("div",{onClick:ue?bt:function(){},class:"userContact_image d-flex align-items-center justify-content-center",style:{textAlign:"center",margin:0,height:"41px",width:"41px"},children:null!=p&&null!==(c=p.opponentDetails)&&void 0!==c&&c.userName?null==p||null===(u=p.opponentDetails)||void 0===u?void 0:u.userName.charAt(0).toUpperCase():""}),Object(f.jsxs)("div",{className:"chat_headerInfo",children:[Object(f.jsxs)("div",{className:"d-flex userNameWrap align-items-center",children:[Object(f.jsx)("p",{style:{fontSize:null==T?void 0:T.name},onClick:ue?bt:function(){},className:"pointer",children:null==p||null===(l=p.opponentDetails)||void 0===l?void 0:l.userName}),le?le(p,!1):""]}),pt?pt({component:St(),getUserStatus:Ot,sidebarChatItem:p}):St()]}),Object(f.jsxs)("div",{className:"chat_header_right",children:[J?Object(f.jsx)(f.Fragment,{children:J}):Object(f.jsx)(f.Fragment,{}),v?Object(f.jsx)("span",{className:"mx-2 icons pointer search_icon",children:Object(f.jsx)($,{onClick:mt,src:$r,className:ct?"darkicons":"lighticons"})}):"",Object(f.jsxs)(N,{onClose:function(){return jt(!1)},children:[Object(f.jsx)("span",{className:"icons pointer menu_icon",children:Object(f.jsx)($,{isActive:xt,onClick:function(){return jt(!xt)},src:dl,className:ct?"darkicons":"lighticons"})}),Object(f.jsx)(f_,{isActive:xt,className:"selfMenuWrap",children:Object(f.jsx)(Y,{renderSelfMoremenu:fe,menuData:u_(null==L?void 0:L.messagingDisabled,ot),isMenu:xt,setIsMenu:jt,setClearChatModal:E,setDeleteChatModal:C,setUserBlockModal:k,handleClickSlideShow:bt,searchShowHandler:mt,userConversationDetail:L})})]})]}),ee?Object(f.jsx)(f.Fragment,{children:ee}):Object(f.jsx)(f.Fragment,{})]}),Object(f.jsx)(l_,{className:"chatBox d-flex flex-column",style:{background:"url(".concat(!0===(null==e?void 0:e.theme)?Py:Ay,")")},maxHeight:null===(d=document.querySelector(".isoChat .chat_footer"))||void 0===d?void 0:d.offsetHeight,headerHeight:null===(h=document.querySelector(".isoChat .chat_header"))||void 0===h?void 0:h.offsetHeight,children:Object(f.jsx)(jm,{extraAttachmentOptions:ie,customSend:te,handleCustomSend:re,sidebarChatItem:p,messages:null==b?void 0:b.messages,theme:ct,getPaginationMessagesData:w,preventMessageRef:y,findUserId:j,state:b,setState:m,setGetMessageTextLength:Be,userConversationDetail:L,setslideShow:A,setMessageInfo:D,messageInfo:B,setMessageChat:$e,slideShow:P,setSearchShow:M,setMediaDocs:H,userDetails:X,handleImgVidClick:Ct,setIsOpen:rt,isOpen:nt,getMediaDocs:Et,setToastStatus:et,isPreviousMessageLoad:K,attachMentPosition:oe,ChatFooterRightSlot:ae,customSendOptions:se,RenderCustomSendOptions:ce,isBlocked:ot,hasMessages:de,setHasMessages:he})})]}):Object(f.jsx)(f.Fragment,{children:Q?Object(f.jsx)(f.Fragment,{children:Q}):Object(f.jsx)("div",{className:"chatbox_Bg",children:Object(f.jsx)(c_,{className:"bg",children:Object(f.jsxs)("div",{children:[Object(f.jsx)("div",{children:Object(f.jsx)($,{src:"https://chatstorage.isometrik.ai/chat-assets\\icons\\placeholder.svg"})}),Object(f.jsx)("div",{children:Object(f.jsx)("h1",{children:"Isometrik Chat"})}),Object(f.jsx)("div",{className:"text_Color text",children:"Isometrik web chat is fully sync with mobile isomterik chat , all charts are synced when connected to the network"})]})})})}),Object(f.jsx)("div",{className:"".concat(P||I||B?"contactInfo":"contact"," ").concat("sideBarFix"),children:p?Object(f.jsx)(Rw,{handleClosee:function(){A(!1),M(!1),D(!1)},searchShow:I,sidebarChatItem:null==e?void 0:e.sidebarChatItem,handler:function(){ye(!1)},slideShow:P,mediaContact:function(){A(!0)},theme:ct,setShowProfilePicture:x,setDeleteChatModal:C,userConversationDetail:L,setUserBlockModal:k,Messages:b,setMessageInfo:D,messageInfo:B,conversationId:null==p?void 0:p.conversationId,setMessageChat:$e,messageChat:Ze,mediaDocs:G,debounceSearchMessages:F,enteredSearchQuery:U,searchedMessageArray:z,setSearchedMessageArray:W,searchMessageLoaderStatus:V,handleImgVidClick:Ct,getPaginationMessagesData:w,setSearchShow:M,currSearchPage:pe,searchLimit:ve,resetSearchMessages:be}):""}),!nt&&Object(f.jsx)(Fh,{dialogueBoxRef:Xe,style:{maxHeight:"100%"},children:Object(f.jsxs)("div",{className:"d-flex justify-content-center",style:{flexDirection:"column"},children:[Object(f.jsx)(zh,{chatMedia:We,selectedMediaIndex:Ye,scrolledPositionRef:qe}),Object(f.jsx)(Ph,{assets:Fe,selectedMediaIndex:Ye,scrolledPositionRef:qe})]})}),Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(gc,{message:Je.message,variant:Je.variant,open:Je.open,onClose:function(){return et({open:!1})},theme:ct})}),Object(f.jsx)("style",{jsx:!0,children:"\n @media (max-width: 48rem) {\n .mainChat {\n width: 100vw;\n display: ".concat(_?"block":"none",";\n }\n .contactInfo {\n width: 100vw;\n position: fixed;\n z-index: 999;\n top: 0;\n right: 0;\n }\n }\n @media (min-width: 48rem) {\n .mainChat .arrow_icon {\n display: none;\n }\n }\n\n @media screen and (min-width: 1024px) and (max-width: 1300px){\n .crausalView{\n height: 70vh;\n }\n }\n ")})]})};function j_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var k_,O_,S_,E_,C_,A_,P_,M_,I_,R_=Q.b.div(h_||(h_=j_(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),_n(Object(Q.a)(p_||(p_=j_(["\n max-width: 320px;\n "]))))),T_=Q.b.h5(v_||(v_=j_(["\n margin-top: 20px;\n ","\n"])),_n(Object(Q.a)(b_||(b_=j_(["\n font-size: 18px;\n"]))))),L_=Q.b.p(m_||(m_=j_(["\n font-size: 18px;\n ","\n"])),_n(Object(Q.a)(g_||(g_=j_(["\n font-size: 14px;\n"]))))),D_=Q.b.div(y_||(y_=j_(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),_n(Object(Q.a)(w_||(w_=j_(["\n margin:1.5rem 0 20px;\n"]))))),B_=Q.b.button(__||(__=j_(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),N_=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick;return Object(f.jsxs)(R_,{className:"isoChat",children:[Object(f.jsx)(T_,{children:"Clear this chat ?"}),Object(f.jsx)(L_,{className:"subTitle1",children:"Performing this action will cause the chat history to be deleted for you. You will be able to continue chatting with this user but will not be able to view the chat history once this action has been performed."}),Object(f.jsx)(L_,{className:"subTitle mt-2",children:"Are you sure you want to Clear this chat?"}),Object(f.jsxs)(D_,{className:"logoutActionbtn",children:[Object(f.jsx)(B_,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(B_,{className:"logoutBtn",onClick:n,children:"Clear chat"})]})]})};function F_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var U_,z_,W_,V_,H_,Y_,G_,q_,X_,K_=Q.b.div(k_||(k_=F_(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),_n(Object(Q.a)(O_||(O_=F_(["\n max-width: 320px;\n "]))))),Z_=Q.b.h5(S_||(S_=F_(["\n margin-top: 20px;\n ","\n"])),_n(Object(Q.a)(E_||(E_=F_(["\n font-size: 18px;\n"]))))),$_=Q.b.p(C_||(C_=F_(["\n font-size: 18px;\n ","\n"])),_n(Object(Q.a)(A_||(A_=F_(["\n font-size: 14px;\n"]))))),Q_=Q.b.div(P_||(P_=F_(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),_n(Object(Q.a)(M_||(M_=F_(["\n margin:1.5rem 0 20px;\n"]))))),J_=Q.b.button(I_||(I_=F_(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),ex=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick;return Object(f.jsxs)(K_,{className:"isoChat sureDelete",children:[Object(f.jsx)(Z_,{children:"Delete this chat?"}),Object(f.jsx)($_,{className:"subTitle1",children:"Performing this action will cause the chat history and the conversation to be deleted from the chat list. You will be able to start a chat with this user again but the chat history will not be visible."}),Object(f.jsx)($_,{className:"subTitle mt-2",children:"Are you sure you want to Delete this Chat?"}),Object(f.jsxs)(Q_,{className:"logoutActionbtn",children:[Object(f.jsx)(J_,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(J_,{className:"logoutBtn",onClick:n,children:"Delete chat"})]})]})};function tx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var nx,rx,ix,ox,ax,sx,cx,fx,ux,lx,dx,hx=Q.b.div(U_||(U_=tx(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),_n(Object(Q.a)(z_||(z_=tx(["\n max-width: 320px;\n "]))))),px=Q.b.h5(W_||(W_=tx(["\n margin-top: 20px;\n ","\n"])),_n(Object(Q.a)(V_||(V_=tx(["\n font-size: 18px;\n"]))))),vx=Q.b.p(H_||(H_=tx(["\n font-size: 18px;\n ","\n"])),_n(Object(Q.a)(Y_||(Y_=tx(["\n font-size: 14px;\n"]))))),bx=Q.b.div(G_||(G_=tx(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),_n(Object(Q.a)(q_||(q_=tx(["\n margin:1.5rem 0 20px;\n"]))))),mx=Q.b.button(X_||(X_=tx(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),gx=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick,r=e.isUserBlocked,i=e.userName;return Object(f.jsxs)(hx,{children:[Object(f.jsx)(px,{children:r?"Unblock ".concat(i," ?"):"Block ".concat(i," ?")}),Object(f.jsx)(vx,{children:"".concat(r?" ":"Are you sure you want to block ".concat(i,", blocked users will no longer be able to message you ?"))}),Object(f.jsxs)(bx,{className:"logoutActionbtn",children:[Object(f.jsx)(mx,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(mx,{className:"logoutBtn",onClick:n,children:r?"Unblock":"Block"})]})]})};function yx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var wx,_x,xx,jx=Q.b.div(nx||(nx=yx(["\n width: 100vw;\n height: 100vh;\n position: absolute;\n top: 0;\n background: var(--primary-white);\n padding: 1rem 3rem;\n display: flex;\n flex-direction: column;\n z-index: 999;\n ","\n .user_profile_picture_major{\n width: 512px;\n height: 512px;\n margin: auto;\n object-fit: cover;\n ","\n }\n"])),_n(Object(Q.a)(rx||(rx=yx(["\n padding: 1rem 0;\n "])))),_n(Object(Q.a)(ix||(ix=yx(["\n width: 100%;\n height: 100%;\n max-height: 400px;\n aspect-ratio: 1/1;\n "]))))),kx=Q.b.div(ox||(ox=yx(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n ","\n\n .cross_icon{\n height: 24px;\n width: 24px;\n cursor: pointer;\n ","\n }\n .dark__theme{\n filter: invert(1);\n }\n"])),_n(Object(Q.a)(ax||(ax=yx(["\n padding-left: 2rem;\n "])))),_n(Object(Q.a)(sx||(sx=yx(["\n display: none;\n "]))))),Ox=Q.b.div(cx||(cx=yx(["\n display: flex;\n align-items: center;\n\n .user_profile_picture{\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n ","\n }\n\n .back_icon{\n display: none;\n ","\n }\n"])),_n(Object(Q.a)(fx||(fx=yx(["\n display: none;\n "])))),_n(Object(Q.a)(ux||(ux=yx(["\n height: 16px;\n width: 20px;\n cursor: pointer;\n display: block;\n margin-right: 1rem;\n "]))))),Sx=Q.b.p(lx||(lx=yx(["\n margin-bottom: 0;\n color: var(--black);\n margin-left: 1rem;\n"]))),Ex=Q.b.div(dx||(dx=yx(["\n max-width: 512px;\n max-height: 512px;\n margin: auto;\n"]))),Cx=function(e){var t=e.userName,n=e.userImageSrc,r=e.closeHandler,i=e.theme;return Object(f.jsxs)(jx,{children:[Object(f.jsxs)(kx,{theme:i,children:[Object(f.jsxs)(Ox,{children:[Object(f.jsx)($,{src:Kr,className:"".concat(i?"dark__theme":""," back_icon"),onClick:r}),Object(f.jsx)($,{className:"user_profile_picture",src:n,alt:"user_profile_picture"}),Object(f.jsx)(Sx,{children:t})]}),Object(f.jsx)($,{onClick:r,src:Zr,className:"".concat(i?"dark__theme":""," cross_icon")})]}),Object(f.jsx)(Ex,{children:Object(f.jsx)(N,{onClose:r,children:Object(f.jsx)($,{className:"user_profile_picture_major",src:n,alt:"user_profile_picture"})})})]})};function Ax(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Px,Mx,Ix,Rx,Tx=Q.b.div(wx||(wx=Ax(["\n max-width: 100%;\n position: relative;\n margin-right: auto;\n margin-left: auto;\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n\n @media only screen and (min-width: 75em) {\n width: 72rem;\n }\n\n ","\n ","\n"])),(Px=Object(Q.a)(_x||(_x=Ax(["\n width: 61rem;\n "]))),Object(Q.a)(ln||(ln=vn(["\n @media (max-width: 64rem) {\n ",";\n }\n"])),Px)),_n(Object(Q.a)(xx||(xx=Ax(["\n width: 70rem;\n padding: 0.6rem;\n "])))));function Lx(e){return(Lx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dx(Object(n),!0).forEach((function(t){Nx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nx(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Lx(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Lx(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Lx(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ux,zx,Wx=Q.b.input(Mx||(Mx=Fx(['\n background: #f3f3f9;\n border-radius: 8px;\n font-family: "Inter";\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 22px;\n display: flex;\n align-items: center;\n letter-spacing: 0.39996px;\n color: #1d1c21;\n border: ',";\n height: 3em;\n width: 100%;\n margin: ",";\n padding: 0 9px;\n\n ",'\n\n &:focus {\n outline: none;\n }\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-transition: "color 9999s ease-out, background-color 9999s ease-out";\n -webkit-transition-delay: 9999s;\n color: #8b8b8b;\n }\n'])),(function(e){return e.error?"1px solid #B00020":" 1px solid #b1b1b1"}),(function(e){return e.error?"8px auto":"8px auto 1rem auto"}),function(e){return Object(Q.a)(hn||(hn=vn(["\n @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) {\n ",";\n }\n"])),e)}(Object(Q.a)(Ix||(Ix=Fx(["\n margin: 6px auto;\n "]))))),Vx=Q.b.div(Rx||(Rx=Fx(["\n color: #b00020;\n padding: 2px 0;\n"]))),Hx=function(e){var t=e.type,n=void 0===t?"text":t,r=e.error;return Object(f.jsxs)("div",{children:[Object(f.jsx)(Wx,Bx(Bx({type:n},e),{},{error:e.error})),r&&""!==r&&Object(f.jsx)(Vx,{errorMessage:r,children:r})]})},Yx=i.a.forwardRef(Hx);function Gx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var qx,Xx,Kx,Zx=Q.b.div(Ux||(Ux=Gx(["\n margin: 10px 0;\n"]))),$x=Q.b.a(zx||(zx=Gx(["\n background: #F53872;\n color: #fff;\n border-radius: 10px;\n font-size: 16px;\n line-height: 22.4px;\n padding: 10px 32px;\n white-space: nowrap;\n font-weight: 500;\n text-decoration: none;\n display: inline-block;\n border: none;\n transition: 0.125s;\n text-align: center;\n width: 100%;\n cursor: pointer;\n\n &:not(.disable):hover {\n color: #fff;\n }\n"]))),Qx=function(e){return Object(f.jsx)(Zx,{children:Object(f.jsx)($x,{href:e.url,children:e.title})})},Jx=i.a.forwardRef(Qx),ej="https://chatstorage.isometrik.ai/chat-assets\\icons\\ic_uil_eye-slash.svg",tj="https://chatstorage.isometrik.ai/chat-assets\\icons\\login_background.png",nj="https://chatstorage.isometrik.ai/chat-assets\\icons\\ic_uil_eye.svg",rj=/(?=.*?[A-Z])/,ij=/(?=.*?[0-9])/,oj=/(?=.*?[#?!@$%^&*-])/,aj=/.{8,}/;function sj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var cj,fj,uj,lj,dj,hj,pj,vj,bj,mj,gj,yj,wj;Q.b.div(qx||(qx=sj(["\n top: 20px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n position: absolute;\n border: 1px solid lightpink;\n background: antiquewhite;\n border-radius: 5px;\n padding: 0px 20px;\n display: flex;\n transition: all 1s ease-in-out !important;\n\n ","\n"])),_n(Object(Q.a)(Xx||(Xx=sj(["\n width: 70%;\n right: 20px;\n "]))))),Q.b.div(Kx||(Kx=sj(["\n padding: 15px;\n color: brown;\n"])));function _j(e){return(_j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xj(Object(n),!0).forEach((function(t){kj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==_j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==_j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_j(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Sj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ej(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Cj,Aj,Pj,Mj,Ij,Rj,Tj,Lj,Dj,Bj,Nj,Fj,Uj,zj=Q.b.section(cj||(cj=Ej(["\n height: 100vh;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background:url(",");\n object-fit: contain;\n background-size: cover !important;\n ","\n"])),tj,_n(Object(Q.a)(fj||(fj=Ej(["\n padding: 1rem;\n"]))))),Wj=Q.b.div(uj||(uj=Ej(["\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n box-shadow: 0px 3px 6px #161148;\n background:#fff;\n border-radius: 20px;\n max-width: 28rem;\n margin: auto;\n\n ","\n"])),_n(Object(Q.a)(lj||(lj=Ej(["\n border-radius: 10px;\n "]))))),Vj=Q.b.div(dj||(dj=Ej(["\n padding: 2rem;\n flex: 1 1 auto;\n\n ","\n"])),_n(Object(Q.a)(hj||(hj=Ej(["\n padding: 1rem;\n "]))))),Hj=Q.b.div(pj||(pj=Ej(["\n text-align: center;\n font-size: 24px;\n letter-spacing: 0px;\n color: var(--black);\n text-transform: capitalize;\n opacity: 1;\n"]))),Yj=(Q.b.div(vj||(vj=Ej(["\n text-align: center;\n font-size: 26px;\n letter-spacing: 0px;\n color: red;\n text-transform: capitalize;\n opacity: 1;\n"]))),Q.b.div(bj||(bj=Ej(["\n position: relative;\n"])))),Gj=Q.b.span(mj||(mj=Ej(["\n position: absolute;\n top: 10px;\n right: 16px;\n color: #8b8b8b;\n cursor: pointer;\n"]))),qj=Q.b.div(gj||(gj=Ej(["\n text-align: center;\n letter-spacing: -0.22px;\n color: #F53872;\n padding: 10px 0 0 0;\n cursor: pointer;\n"]))),Xj=Q.b.p(yj||(yj=Ej(["\n text-align: center;\n color: var(--danger);\n "]))),Kj=Q.b.div(wj||(wj=Ej(["\ntext-align: center;\n"]))),Zj=function(e){var t=e.setLoginPage,n=e.theme,i=Oj(Object(r.useState)(!1),2),a=i[0],c=i[1],u=Oj(Object(r.useState)(),2),l=u[0],d=u[1],h=Oj(Object(r.useState)({email:"",password:""}),2),p=h[0],v=h[1],b=Oj(Object(r.useState)({open:!1,message:"",variant:""}),2),m=b[0],g=b[1],y=Oj(Object(r.useState)({email:"",password:""}),2),w=y[0],_=y[1],x=function(e,t){switch(e){case"email":return t?t.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)?"":"Enter a valid email address":"email is required";case"password":return t?rj.test(t)?ij.test(t)?oj.test(t)?aj.test(t)?"":"Password length should be more than 8 characters":"Password should contain one special character":"Password should contain atleast one digit":"Password should contain atleast one uppercase":"Please enter your password";default:return""}},j=function(e){v(jj(jj({},p),{},kj({},e.target.name,e.target.value))),_(jj(jj({},w),{},kj({},e.target.name,x(e.target.name,e.target.value)))),d()};return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(zj,{children:Object(f.jsx)(Tx,{children:Object(f.jsx)(Wj,{children:Object(f.jsxs)(Vj,{children:[Object(f.jsx)(Kj,{children:Object(f.jsx)($,{src:s})}),Object(f.jsx)(Hj,{children:"ISOMETRIK CHAT"}),Object(f.jsx)(Xj,{children:l}),Object(f.jsx)(Yx,{name:"email",type:"email",placeholder:"Enter your email",value:p.email,error:null==w?void 0:w.email,onChange:j}),Object(f.jsxs)(Yj,{children:[Object(f.jsx)(Yx,{name:"password",type:a?"text":"password",placeholder:"Enter your password",value:null==p?void 0:p.password,error:null==w?void 0:w.password,onChange:j}),Object(f.jsx)("div",{onClick:function(){return c(!a)},children:Object(f.jsx)(Gj,{children:Object(f.jsx)($,{src:a?nj:ej,height:"22px",width:"22px"})})})]}),Object(f.jsx)("div",{onClick:function(e){e.preventDefault();var t={};if(Object.keys(p).forEach((function(e){var n=x(e,p[e]);n&&n.length>0&&(t[e]=n)})),Object.keys(t).length>0)_(t);else{var n={userIdentifier:null==p?void 0:p.email,password:null==p?void 0:p.password};Object(S.default)().user.postUserAuthenticate(n).then((function(e){g({open:!0,variant:"success",message:e.msg}),Object(o.d)("isometrikToken",null==e?void 0:e.userToken),Object(o.d)("isometrikUserId",null==e?void 0:e.userId),window.location.href="/"})).catch((function(e){var t,n;console.log({error:e}),g({open:!0,variant:"error",message:null==e?void 0:e.message}),d((null===(t={error:e})||void 0===t||null===(t=t.error)||void 0===t?void 0:t.errorMsg)||(null===(n={error:e})||void 0===n||null===(n=n.error)||void 0===n?void 0:n.message))}))}},children:Object(f.jsx)(Jx,{title:"Log In"})}),Object(f.jsx)(qj,{onClick:function(){return t(!1)},children:"Sign Up"})]})})})}),Object(f.jsx)(gc,{message:m.message,variant:m.variant,open:m.open,onClose:function(){return g({open:!1})},theme:n})]})};function $j(e){return($j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qj(Object(n),!0).forEach((function(t){ek(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ek(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==$j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==$j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===$j(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rk(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ik=Q.b.form(Cj||(Cj=rk(["\n height: 100vh;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background:url(",");\n object-fit: contain;\n background-size: cover !important;\n ","\n"])),tj,_n(Object(Q.a)(Aj||(Aj=rk(["\n padding:1rem;\n"]))))),ok=Q.b.div(Pj||(Pj=rk(["\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n background:#fff;\n word-wrap: break-word;\n box-shadow: 0px 3px 6px #161148;\n border-radius: 20px;\n max-width: 28rem;\n margin: auto;\n\n ","\n"])),_n(Object(Q.a)(Mj||(Mj=rk(["\n border-radius: 20px;\n "]))))),ak=Q.b.div(Ij||(Ij=rk(["\n padding: 2rem;\n flex: 1 1 auto;\n\n ","\n"])),_n(Object(Q.a)(Rj||(Rj=rk(["\n padding: 1rem;\n "]))))),sk=Q.b.div(Tj||(Tj=rk(["\n text-align: center;\n font-size: 24px;\n letter-spacing: 0px;\n color:var(--black);\n font-family: LogoText;\n text-transform: capitalize;\n opacity: 1;\n"]))),ck=Q.b.div(Lj||(Lj=rk(["\n position: relative;\n"]))),fk=Q.b.span(Dj||(Dj=rk(["\n position: absolute;\n top: 10px;\n right: 16px;\n color: #8b8b8b;\n cursor: pointer;\n"]))),uk=Q.b.div(Bj||(Bj=rk(["\n text-align: center;\n letter-spacing: -0.22px;\n color: #F53872;\n padding: 10px 0 0 0;\n cursor: pointer;\n"]))),lk=(Q.b.div(Nj||(Nj=rk(["\n text-align: center;\n letter-spacing: -0.22px;\n color:red;\n padding: 10px 0 0 0;\n"]))),Q.b.p(Fj||(Fj=rk(["\n text-align: center;\n color: var(--danger);\n"])))),dk=Q.b.div(Uj||(Uj=rk(["\ntext-align: center;\n"]))),hk=function(e){var t=e.setLoginPage,n=e.theme,c=tk(Object(r.useState)(!1),2),u=c[0],l=c[1],d=tk(Object(r.useState)(!1),2),h=d[0],p=d[1],v=tk(Object(r.useState)(),2),b=v[0],m=v[1],g=tk(Object(r.useState)({fname:"",email:"",password:"",confirmPassword:""}),2),y=g[0],w=g[1],_=tk(Object(r.useState)({open:!1,message:"",variant:""}),2),x=_[0],j=_[1],k=tk(Object(r.useState)({fname:"",email:"",password:"",confirmPassword:""}),2),O=k[0],E=k[1],C=function(e,t){switch(e){case"fname":return t&&""!==t.trim()?t.match(/^[A-Z ]{3,50}$/i)?Object(a.c)(t)?"":"First letter should be capital in name":"User name should not contain any special characters":"User name is required";case"email":return t?t.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)?"":"Enter a valid email address":"Email is required";case"Password":return t?rj.test(t)?ij.test(t)?oj.test(t)?aj.test(t)?"":"Password length should be more than 8 characters":"Password should contain one special character":"Password should contain atleast one digit":"Password should contain atleast one uppercase":"Please enter your password";case"confirmPassword":return t?t!==y.password?"Confirm password did not match":"":"Confirm password is required";default:return""}},A=function(e){w(Jj(Jj({},y),{},ek({},e.target.name,e.target.value))),m(),E(Jj(Jj({},O),{},ek({},e.target.name,C(e.target.name,e.target.value))))};return Object(f.jsxs)(i.a.Fragment,{children:[Object(f.jsx)(ik,{children:Object(f.jsx)(Tx,{children:Object(f.jsx)(ok,{children:Object(f.jsxs)(ak,{children:[Object(f.jsx)(dk,{children:Object(f.jsx)($,{src:s})}),Object(f.jsx)(sk,{children:"ISOMETRIK CHAT"}),Object(f.jsx)(lk,{children:b}),Object(f.jsx)(Yx,{name:"fname",type:"text",placeholder:"Enter your name",value:null==y?void 0:y.fname,onChange:A,error:null==O?void 0:O.fname}),Object(f.jsx)(Yx,{name:"email",type:"email",placeholder:"Enter your email",value:null==y?void 0:y.email,error:null==O?void 0:O.email,onChange:A}),Object(f.jsxs)(ck,{children:[Object(f.jsx)(Yx,{name:"password",type:u?"text":"password",placeholder:"Enter your password",value:null==y?void 0:y.password,error:null==O?void 0:O.password,onChange:A}),Object(f.jsx)("div",{onClick:function(){return l(!u)},children:Object(f.jsx)(fk,{children:Object(f.jsx)($,{src:u?nj:ej,height:"22px",width:"22px"})})})]}),Object(f.jsxs)(ck,{children:[Object(f.jsx)(Yx,{name:"confirmPassword",type:h?"text":"password",placeholder:"Enter your confirm password",value:null==y?void 0:y.confirmPassword,error:null==O?void 0:O.confirmPassword,onChange:A}),Object(f.jsx)("div",{onClick:function(){return p(!h)},children:Object(f.jsx)(fk,{children:Object(f.jsx)($,{src:h?nj:ej,height:"22px",width:"22px"})})})]}),Object(f.jsx)("div",{onClick:function(e){e.preventDefault();var t={};if(Object.keys(y).forEach((function(e){var n=C(e,y[e]);n&&n.length>0&&(t[e]=n)})),Object.keys(t).length>0)E(t);else{var n={userProfileImageUrl:a.F,userName:y.fname,userIdentifier:y.email,password:y.password,confirmPassword:y.confirmPassword,metaData:{country:"IN"}};Object(S.default)().user.postUser(n).then((function(e){Object(o.d)("isometrikToken",null==e?void 0:e.userToken),Object(o.d)("isometrikUserId",null==e?void 0:e.userId),e&&(j({open:!0,variant:"success",message:e.msg}),window.location.href="/")})).catch((function(e){var t=JSON.stringify(e.errorProperties.password);if(t){var n=JSON.parse(t);j({open:!0,variant:"error",message:"Please enter a valid password!"}),m("".concat(n[0]))}}))}},children:Object(f.jsx)(Jx,{title:"Sign Up"})}),Object(f.jsx)(uk,{onClick:function(){return t(!0)},children:"Log In"})]})})})}),Object(f.jsx)(gc,{message:x.message,variant:x.variant,open:x.open,onClose:function(){return j({open:!1})},theme:n})]})};function pk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bk,mk,gk,yk,wk,_k,xk,jk,kk,Ok,Sk,Ek,Ck=function(e){var t=e.theme,n=pk(Object(r.useState)(!0),2),i=n[0],o=n[1];return Object(f.jsxs)("div",{children:[i&&Object(f.jsx)(Zj,{setLoginPage:o,theme:t}),!i&&Object(f.jsx)(hk,{setLoginPage:o,theme:t})]})};function Ak(e){return(Ak="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pk(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Pk=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="executing",p="completed",v={};function b(){}function m(){}function g(){}var y={};f(y,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,a)&&(y=_);var x=g.prototype=b.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var c=l(e[i],e,o);if("throw"!==c.type){var f=c.arg,u=f.value;return u&&"object"==Ak(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=d;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var f=l(t,n,r);if("normal"===f.type){if(i=r.done?p:"suspendedYield",f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(i=p,r.method="throw",r.arg=f.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=l(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ak(t)+" is not iterable")}return m.prototype=g,i(x,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:m,configurable:!0}),m.displayName=f(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(k.prototype),f(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(x),f(x,c,"Generator"),f(x,a,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Mk(e){return function(e){if(Array.isArray(e))return Fk(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Nk(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ik(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Rk(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ik(o,r,i,a,s,"next",e)}function s(e){Ik(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tk(Object(n),!0).forEach((function(t){Dk(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dk(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ak(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ak(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ak(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||Nk(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nk(e,t){if(e){if("string"==typeof e)return Fk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fk(e,t):void 0}}function Fk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uk(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var zk=Q.b.section(bk||(bk=Uk(["\n height: 100%;\n background-color: #dadbd3;\n // display: grid;\n"]))),Wk=Q.b.div(mk||(mk=Uk(["\n background: var(--gray_color);\n max-width: 70%;\n flex: 1 1 70%;\n position: relative;\n ","\n"])),_n(Object(Q.a)(gk||(gk=Uk(["\n max-width: 100%;\n flex: 1 1 100%;\n"]))))),Vk=Q.b.div(yk||(yk=Uk(["\n display: none;\n background-color: var(--modal_color);\n position: absolute;\n bottom: 0px;\n padding: 20px 75px 20px 20px;\n width: 100%;\n align-items: center;\n\n .userImg {\n height: 65px;\n width: 65px;\n border-radius: 60px;\n background-size: cover;\n background-repeat: no-repeat;\n }\n\n ","\n\n ","\n"])),function(e){return Object(Q.a)(dn||(dn=vn(["\n @media (min-width: 48rem) and (max-width: 64rem) {\n ",";\n }\n"])),e)}(Object(Q.a)(wk||(wk=Uk(["\n display: none;\n "])))),_n(Object(Q.a)(_k||(_k=Uk(["\n display: flex;\n "]))))),Hk=Q.b.div(xk||(xk=Uk(["\n display: flex;\n justify-content: flex-end;\n margin-bottom: 20px;\n color: white;\n\n .cancleBtn {\n background: var(--iso_white);\n color: var(--button-primary-background);\n border: 1px solid var(--border_color);\n }\n\n .logoutBtn {\n background-color: var(--button-primary-background);\n color: var(--iso_white);\n }\n"]))),Yk=Q.b.div(jk||(jk=Uk(["\ndisplay:flex;\n"]))),Gk=Q.b.div(kk||(kk=Uk(["\ncolor:var(--black);\nwidth:72%;\n\n.signOutBtn{\n padding:7px 15px;\n border:none;\n border-radius:20px;\n background:var(--button-primary-background);\n color:white;\n margin-left:0px;\n}\n\n.cancelBtn{\n padding:7px 15px;\n border:none;\n border-radius:20px;\n background:var(--button-primary-background);\n color:white;\n margin-left:10px;\n}\n"]))),qk=Q.b.button(Ok||(Ok=Uk(["\n margin-left: 15px;\n border-radius: 20px;\n border: none;\n padding: 5px 20px 5px 20px;\n"]))),Xk=Q.b.div(Sk||(Sk=Uk(["\nwidth:100%;\nheight:100%;\ntop:0;\nbackground-color:var(--modal-backDrop);\nposition:absolute;\nborder:none;\n.logoutModal{\n background-color: var(--modal_color);\n color:var(--black);\n position: absolute; \n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n width:32rem;\n top:50%;\n left:50%;\n z-index:999;\n transform: translate(-50%,-50%);\n padding:20px 24px 6px 22px;\n line-height: 1.7;\n max-height:14rem\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n\n ","\n }"])),_n(Object(Q.a)(Ek||(Ek=Uk(["\n display: none;\n "])))));var Kk=function(e){var t,n,s,c,u=O(),l=u.fetchUserToken,d=u.sortByCustomType,h=u.showLoader,p=u.setShowLoader,v=u.theme,b=u.userDetails,m=u.setUserDetails,g=u.findUserId,y=u.setFindUserId,w=u.state,_=u.setState,x=u.userloggedIn,j=u.loading,k=u.sidebarChatItem,E=u.setSidebarChatItem,C=u.showStatusMessages,A=u.hideHiddenConversations,P=u.isGroup,M=u.currFilter,I=u.setCurrFilter,R=u.currChat,T=u.setCurrChat,L=u.searchConvoText,D=u.setSearchConvoText,B=u.setConversationsFetched,N=u.convolistPayload,F=(u.isSearchLoading,u.setIsSearchLoading,e.showSideChatHeader),U=e.sideBarHeaderSlot,z=e.customSend,W=e.handleCustomSend,V=void 0===W?function(){}:W,H=e.onChatChange,Y=void 0===H?function(){}:H,G=e.sideBarPlaceHolder,q=e.chatHeaderRightSlot,X=e.chatHeaderMoreMenu,K=e.renderProfileBadge,Z=e.placeHolder,Q=e.extraAttachmentOptions,J=e.attachMentPosition,ee=e.ChatFooterRightSlot,te=e.customSendOptions,ne=e.RenderCustomSendOptions,re=e.renderSelfMoremenu,ie=e.showSearchIcon,oe=e.sortConversationList,ae=e.allowProfileClick,se=e.showSideBarSearch,ce=e.onNewConversation,fe=e.onConversationsFetch,ue=Bk(Object(r.useState)(!1),2),le=ue[0],de=ue[1],he=Object(r.useRef)(!1),pe=Bk(Object(r.useState)(!1),2),ve=pe[0],be=pe[1],me=Bk(Object(r.useState)(!1),2),ge=me[0],ye=me[1],we=Bk(Object(r.useState)(!1),2),_e=we[0],xe=we[1],je=Object(r.useRef)(!1),ke=Bk(Object(r.useState)(!1),2),Oe=ke[0],Se=ke[1],Ee=Bk(Object(r.useState)(!1),2),Ce=Ee[0],Ae=Ee[1],Pe=Bk(Object(r.useState)(!1),2),Me=Pe[0],Ie=Pe[1],Re=Bk(Object(r.useState)({}),2),Te=Re[0],Le=Re[1],De=Bk(Object(r.useState)(!1),2),Be=De[0],Ne=De[1],Fe=Bk(Object(r.useState)(!1),2),Ue=Fe[0],ze=Fe[1],We=Bk(Object(r.useState)(!1),2),Ve=We[0],He=We[1],Ye=Bk(Object(r.useState)({open:!1,message:"",variant:""}),2),Ge=Ye[0],qe=Ye[1],Xe=Bk(Object(r.useState)([]),2),Ke=Xe[0],Ze=Xe[1],$e=Bk(Object(r.useState)(!1),2),Qe=$e[0],Je=$e[1],et=Bk(Object(r.useState)(!1),2),tt=et[0],nt=et[1],rt=Bk(Object(r.useState)(),2),it=rt[0],ot=rt[1],at=Bk(Object(r.useState)(""),2),st=at[0],ct=at[1],ft=Bk(Object(r.useState)({showProfile:!1,userName:"",userImageSrc:"",theme:v}),2),ut=ft[0],lt=ft[1],dt=Bk(Object(r.useState)(!1),2),ht=dt[0],pt=dt[1],vt=Bk(Object(r.useState)(1),2),bt=vt[0],mt=vt[1],gt=Bk(Object(r.useState)(!0),2),yt=gt[0],wt=gt[1],_t=Bk(Object(r.useState)(0),2),xt=(_t[0],_t[1],i.a.useRef(!1)),jt=Object(a.y)()?new URLSearchParams(window.location.search):{},kt=i.a.useRef(Object(a.y)()&&jt.get("p")?Lk({},JSON.parse(Object(a.h)(jt.get("p")))):{}),Ot=new URLSearchParams(window.location.search).get("c"),St=function(e){var t=new URLSearchParams("");t.set("c",(null==e?void 0:e.conversationId)||"");var n="".concat(window.location.pathname,"?").concat(t.toString());window.history.pushState({path:n},"",n),E(e)},Et=function(){var e=Rk(Pk().mark((function e(t){var n,r,i,o,s=arguments;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:[],_((function(e){return Lk(Lk({},e),{},{selectedConvId:t})})),p(!0),e.prev=3,r=Mk(n),null==(i=r.find((function(e){return e.conversationId===t})))||!i.conversationId){e.next=11;break}Le(i),E(i),e.next=16;break;case 11:return e.next=13,Object(a.x)({id:t,includeConversationStatusMessagesInUnreadMessagesCount:C});case 13:o=e.sent,E(o),Le(o);case 16:be(!0),p(!1),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),p(!1);case 23:case"end":return e.stop()}}),e,null,[[3,20]])})));return function(t){return e.apply(this,arguments)}}(),Ct={limit:20,skip:0,isGroup:P};Object(r.useEffect)((function(){var e=function(){var e,t,n=new URLSearchParams(window.location.search),r=n.get("c");r?(null==w||null===(t=w.conversations)||void 0===t?void 0:t.length)>0&&Et(r,null==w?void 0:w.conversations):(be(!1),E(),_((function(e){return Lk(Lk({},e),{},{selectedConvId:""})})));var i,o=n.get("unread");try{i=JSON.parse(Object(a.h)(n.get("p")))}catch(e){console.log(e)}var s=n.get("tabType");(!s||s&&!i)&&(kt.current={}),i&&(kt.current=i),s&&i?Pt(s,i):o||null!==(e=w.conversations)&&void 0!==e&&e.length&&1==localStorage.getItem("isoChatTab")||Mt(Lk(Lk({},Ct),{},{sort:M}),!1,R||"ALL"),(!s||s&&!i)&&localStorage.setItem("isoChatTab",1)};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}}),[M,R,null==w?void 0:w.conversations]),Object(r.useEffect)((function(){var e;null!==(e=Object.keys(N))&&void 0!==e&&e.length&&!Object(a.i)(N,kt.current)&&Mt(Lk(Lk({},Ct),{},{sort:M},N),!1,(null==N?void 0:N.currChat)||"ALL"),kt.current=N}),[N,M]);var At={limit:20,skip:0,isGroup:P,conversationId:null==k?void 0:k.conversationId},Pt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};kt.current=Lk({},t),T(e),Mt(Lk(Lk({},Ct),{},{sort:M}),!1,e)};Object(r.useEffect)((function(){return y({}),function(){T(""),I(),be(!1),E(),y({}),_((function(e){return Lk(Lk({},e),{},{selectedConvId:""})})),D("")}}),[]);var Mt=function(){var e=Rk(Pk().mark((function e(t,n){var r,i,o,a,s,c,f,u,l,h=arguments;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h.length>2&&void 0!==h[2]?h[2]:"ALL",i=Lk(Lk({},t),kt.current),t.sort?i.sort=t.sort:delete i.sort,d&&!t.sort&&(i.sortByCustomType=!0),C||(i.includeConversationStatusMessagesInUnreadMessagesCount=!1),A&&(i.hidden=!1),L?i.searchTag=L:delete i.searchTag,e.prev=7,n?xe(!0):p(!0),he.current=!0,"UNREAD"!==r){e.next=16;break}return e.next=13,null===(c=Object(S.default)())||void 0===c||null===(c=c.Conversation)||void 0===c?void 0:c.getUnreadConversations(i);case 13:s=e.sent,e.next=19;break;case 16:return e.next=18,null===(f=Object(S.default)())||void 0===f||null===(f=f.Conversation)||void 0===f?void 0:f.getConversations(i);case 18:s=e.sent;case 19:B(!0),u=n?[].concat(Mk(w.conversations),Mk(null===(o=s)||void 0===o?void 0:o.conversations)):(null===(a=s)||void 0===a?void 0:a.conversations)||[],_((function(e){return Lk(Lk({},e),{},{conversations:Mk(u)})})),!n&&fe&&fe((null===(l=s)||void 0===l?void 0:l.conversations)||[],Ot),Ot&&!n?Et(Ot,u):p(!1),xe(!1),e.next=35;break;case 27:e.prev=27,e.t0=e.catch(7),B(!0),1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&0===(null==i?void 0:i.skip)?_((function(e){return Lk(Lk({},e),{},{conversations:[]})})):_((function(e){return Lk(Lk({},e),{},{conversations:Mk(e.conversations)})})),nt(1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)),p(!1),xe(!1),console.log(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode,null===e.t0||void 0===e.t0?void 0:e.t0.message,"err");case 35:return e.prev=35,xe(!1),he.current=!1,e.finish(35);case 39:case"end":return e.stop()}}),e,null,[[7,27,35,39]])})));return function(t,n){return e.apply(this,arguments)}}(),It=function(){var e=Rk(Pk().mark((function e(t){var n,r,i,o,a,s,c,f,u=arguments;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:0,r=u.length>2&&void 0!==u[2]?u[2]:20,i=u.length>3&&void 0!==u[3]?u[3]:function(){},console.log("search message call",t,n,r),ct(t),1!==bt){e.next=9;break}wt(!0),e.next=11;break;case 9:if(yt){e.next=11;break}return e.abrupt("return");case 11:if(o={conversationId:null==k?void 0:k.conversationId,searchTag:t,skip:n,limit:r},e.prev=12,null==t||!t.length){e.next=25;break}return Je(!0),e.next=17,null===(a=Object(S.default)())||void 0===a||null===(a=a.message)||void 0===a?void 0:a.getMessages(o);case 17:(null==(f=e.sent)||null===(s=f.messages)||void 0===s?void 0:s.length)<20&&wt(!1),Ze((function(e){return 1===bt?Mk(null==f?void 0:f.messages):[].concat(Mk(e),Mk(null==f?void 0:f.messages))})),Je(!1),(null==f||null===(c=f.messages)||void 0===c?void 0:c.length)>0&&mt((function(e){return 0===n?2:e+1})),i(Mk(null==f?void 0:f.messages)),e.next=27;break;case 25:Ze([]),i([]);case 27:e.next=35;break;case 29:e.prev=29,e.t0=e.catch(12),console.error("error",e.t0),1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&wt(!1),Je(!1),i([]);case 35:case"end":return e.stop()}}),e,null,[[12,29]])})));return function(t){return e.apply(this,arguments)}}(),Rt=Object(a.g)(It,500),Tt=function(){var e=Rk(Pk().mark((function e(t){var n,r,i,o,a,s,c,f=arguments;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=f.length>1&&void 0!==f[1]?f[1]:function(){return!0},e.prev=1,!je.current&&!xt.current){e.next=4;break}return e.abrupt("return");case 4:return i=document.getElementById("allMessages"),o=i.scrollHeight-i.scrollTop,null!=t&&t.skip&&(je.current=!0),xt.current=!0,e.next=10,null===(r=Object(S.default)())||void 0===r||null===(r=r.message)||void 0===r?void 0:r.getMessages(t);case 10:a=e.sent,xt.current=!1,s=a.messages.filter((function(e){var t;return(null==e||null===(t=e.body)||void 0===t?void 0:t.length)>0})).reverse(),_((function(e){return je.current=!1,n([].concat(Mk(s),Mk(e.messages[null==k?void 0:k.conversationId])),t.limit),Lk(Lk({},e),{},{messages:Lk(Lk({},e.messages),{},Dk({},null==k?void 0:k.conversationId,[].concat(Mk(s),Mk(e.messages[null==k?void 0:k.conversationId]))))})})),requestAnimationFrame((function(){var e=i.scrollHeight;i.scrollTop=e-o-60})),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(1),xt.current=!1,1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&null!=w&&null!==(c=w.messages)&&void 0!==c&&null!==(c=c[null==k?void 0:k.conversationId])&&void 0!==c&&c.length||qe({open:!0,variant:"error",message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||"No messages"});case 21:return e.prev=21,xt.current=!1,je.current=!1,e.finish(21);case 25:case"end":return e.stop()}}),e,null,[[1,17,21,25]])})));return function(t){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){var e=new URLSearchParams(window.location.search),t=e.get("unread");if("true"===t)be(!1),E(),_((function(e){return Lk(Lk({},e),{},{selectedConvId:"",conversations:[]})})),Pt("UNREAD"),localStorage.setItem("isoChatTab",2);else if("false"===t||!t){var n;be(!1),E(),_((function(e){return Lk(Lk({},e),{},{selectedConvId:"",conversations:[]})}));try{n=JSON.parse(Object(a.h)(jt.get("p")))}catch(e){console.log(e)}var r=e.get("tabType");!r||r&&!n?(localStorage.setItem("isoChatTab",1),kt.current={},Pt("ALL")):r&&n&&(console.log("convolistPayloadRef.current",kt.current),Pt(r,n))}}),[]),Object(r.useEffect)((function(){b||j||!Object(o.b)("isometrikToken")||l()}),[b,j]);var Lt=function(){ye(!1),setTimeout((function(){p(!0),Object(o.a)()}),100),p(!1)},Dt=function(){Ne(!1),ze(!1)},Bt=function(){var e=Rk(Pk().mark((function e(){var t;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Se(!1),e.next=4,Object(a.d)(null==k?void 0:k.conversationId);case 4:t=e.sent,qe({open:!0,variant:"success",message:t.msg}),_((function(e){return Lk(Lk({},e),{},{messages:Dk({},null==k?void 0:k.conversationId,[])})})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),Se(!1),qe({open:!0,variant:"error",message:e.t0.messages});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),Nt=function(){var e=Rk(Pk().mark((function e(){var t,n,r;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ie(!1),e.next=4,Object(a.C)(null==k||null===(t=k.opponentDetails)||void 0===t?void 0:t.userId);case 4:return n=e.sent,e.next=7,Object(a.x)({id:null==k?void 0:k.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:C});case 7:r=e.sent,Le(r),qe({open:!0,variant:"success",message:n.msg}),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(0),Ie(!1),qe({open:!0,variant:"error",message:e.t0.messages}),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}(),Ft=function(){var e=Rk(Pk().mark((function e(){var t,n,r;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ie(!1),e.next=4,Object(a.D)(null==k||null===(t=k.opponentDetails)||void 0===t?void 0:t.userId);case 4:return n=e.sent,qe({open:!0,variant:"success",message:n.msg}),e.next=8,Object(a.x)({id:null==k?void 0:k.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:C});case 8:r=e.sent,Le(r),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(0),Ie(!1),qe({open:!0,variant:"error",message:e.t0.messages}),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){if(null!=w&&w.conversations&&(null==w?void 0:w.conversations.length)>0&&null!=Te&&Te.conversationId){var e=null==w?void 0:w.conversations.find((function(e){return e.conversationId===Te.conversationId}));e&&Le((function(t){return Lk({},e)}))}}),[null==w?void 0:w.conversations]);var Ut=function(){var e=Rk(Pk().mark((function e(){var t;return Pk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ae(!1),e.next=4,Object(a.j)(null==k?void 0:k.conversationId);case 4:t=e.sent,qe({open:!0,variant:"success",message:t.msg}),Dt(),be(!1),_((function(e){return Lk(Lk({},e),{},{selectedConvId:""})})),e.next=17;break;case 11:e.prev=11,e.t0=e.catch(0),console.error("error",e.t0),qe({open:!0,variant:"error",message:e.t0.messages}),Ae(!1),Dt();case 17:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)("div",{className:"true"===v||v?"dark-theme":"light-theme",children:[Object(f.jsxs)(zk,{className:"overflow-hidden",children:[x&&!j?Object(f.jsxs)("div",{className:"d-flex",onClick:function(){return de(!le)},children:[Object(f.jsx)(Tl,{sideBarPlaceHolder:G,sideBarHeaderSlot:U,state:w,setState:_,sideData:null==w?void 0:w.conversations,sidebarData:St,disabledKey:le,userDetails:b,getPaginationHomePageData:function(){var e,t,n;he.current||(null==w||null===(e=w.conversations)||void 0===e?void 0:e.length)<Ct.limit||(null==w||null===(t=w.conversations)||void 0===t?void 0:t.length)%Ct.limit!=0||(Ct.skip=(null==w||null===(n=w.conversations)||void 0===n?void 0:n.length)/Ct.limit*Ct.limit,!tt&&Mt(Lk(Lk({},Ct),{},{sort:M}),!0,R||"ALL"))},preventConversationRef:he,setIsSidebarShow:be,isSidebarShow:ve,isLogOut:ge,setIsLogOut:ye,findUserId:g,sidebarChatItem:k,getHomePageConversationData:Mt,setUserDetails:m,setShowLoader:p,setShowProfilePicture:lt,showConversationPagingLoader:_e,setToastStatus:qe,setUserConversationDetail:Le,profileClose:Dt,setMediaDocs:ot,showSideChatHeader:F,renderProfileBadge:K,sortConversationList:oe,showSideBarSearch:se,handleFilterSelect:function(e){"0"===e?I():I(e),Mt(Lk(Lk({},Ct),{},{sort:"0"===e?"":e}),!1,R||"ALL")},handleActiveChatTab:Pt,onNewConversation:ce,setSidebarChatItem:E}),Object(f.jsx)(Wk,{className:"d-flex",children:h?"":Object(f.jsx)(x_,{customSend:z,extraAttachmentOptions:Q,handleCustomSend:V,placeHolder:Z,onChatChange:Y,theme:v,setClearChatModal:Se,setDeleteChatModal:Ae,setUserBlockModal:Ie,state:w,setState:_,sidebarChatItem:k,setSidebarChatItem:E,setIsSidebarShow:be,isSidebarShow:ve,getPaginationMessagesData:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments.length>1?arguments[1]:void 0;null!=w&&w.messages&&(je.current||0===Object.keys(null==w?void 0:w.messages).length||(null==w||null===(e=w.messages[null==k?void 0:k.conversationId])||void 0===e?void 0:e.length)<At.limit||(null==w||null===(t=w.messages[null==k?void 0:k.conversationId])||void 0===t?void 0:t.length)%At.limit!=0||(At.skip=i||(null==w||null===(n=w.messages[null==k?void 0:k.conversationId])||void 0===n?void 0:n.length)/At.limit*At.limit,C||(At.conversationStatusMessage=!1),Tt(At,r)))},preventMessageRef:je,setShowProfilePicture:lt,findUserId:g,sidebarData:St,setToastStatus:qe,setslideShow:Ne,slideShow:Be,setSearchShow:ze,searchShow:Ue,setUserConversationDetail:Le,userConversationDetail:Te,setMessageInfo:He,messageInfo:Ve,debounceSearchMessages:Rt,searchedMessageArray:Ke,setSearchedMessageArray:Ze,searchMessageLoaderStatus:Qe,handleClosee:Dt,setMediaDocs:ot,mediaDocs:it,userDetails:b,enteredSearchQuery:st,isPreviousMessageLoad:je.current,chatHeaderRightSlot:q,chatHeaderMoreMenu:X,attachMentPosition:J,ChatFooterRightSlot:ee,customSendOptions:te,RenderCustomSendOptions:ne,renderSelfMoremenu:re,showSearchIcon:ie,allowProfileClick:ae,renderProfileBadge:K,hasMessages:ht,setHasMessages:pt,currSearchPage:bt,searchLimit:20,resetSearchMessages:function(){wt(!0),Ze([]),mt(1)}})})]}):"",ge?Object(f.jsx)(Xk,{children:Object(f.jsxs)("div",{className:"logoutModal",children:[Object(f.jsx)("h5",{children:"Log out? "}),Object(f.jsx)("p",{children:"Are you sure you want to logout"}),Object(f.jsx)("div",{children:Object(f.jsxs)(Hk,{className:"logoutActionbtn",children:[Object(f.jsx)(qk,{className:"cancleBtn",onClick:function(){return ye(!1)},children:"Cancel"}),Object(f.jsx)(qk,{className:"logoutBtn",onClick:Lt,children:"Log out"})]})})]})}):"",ge&&Object(f.jsxs)(Vk,{className:"signOut",children:[Object(f.jsx)("div",{style:{width:"28%"},children:Object(f.jsx)($,{className:"userImg",src:null==e||null===(t=e.userDetails)||void 0===t?void 0:t.userProfileImageUrl})}),Object(f.jsxs)(Gk,{className:"actionBtn",children:[Object(f.jsx)("h5",{children:null==e||null===(n=e.userDetails)||void 0===n?void 0:n.userName}),Object(f.jsx)("p",{children:null==e||null===(s=e.userDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.description}),Object(f.jsxs)(Yk,{children:[Object(f.jsx)(qk,{className:"signOutBtn",onClick:Lt,children:"Sign Out"}),Object(f.jsx)(qk,{className:"cancelBtn",onClick:function(){return ye(!1)},children:"Cancel"})]})]})]}),Oe&&Object(f.jsx)(Gs,{open:Oe,backDropClick:!0,onClose:function(){return Se(!1)},children:Object(f.jsx)(N_,{cancelButtonClick:function(){return Se(!1)},confirmButtonClick:Bt})}),Ce&&Object(f.jsx)(Gs,{open:Ce,backDropClick:!0,onClose:function(){return Ae(!1)},children:Object(f.jsx)(ex,{cancelButtonClick:function(){return Ae(!1)},confirmButtonClick:Ut})}),Me&&Object(f.jsx)(Gs,{open:Me,backDropClick:!0,onClose:function(){return Ie(!1)},children:Object(f.jsx)(gx,{isUserBlocked:null==Te?void 0:Te.messagingDisabled,userName:null==k||null===(c=k.opponentDetails)||void 0===c?void 0:c.userName,cancelButtonClick:function(){return Ie(!1)},confirmButtonClick:null!=Te&&Te.messagingDisabled?Ft:Nt})}),Object(f.jsx)(gc,{message:Ge.message,variant:Ge.variant,open:Ge.open,onClose:function(){return qe({open:!1})}}),ut.showProfile&&Object(f.jsx)(Cx,{userName:ut.userName,userImageSrc:ut.userImageSrc,theme:ut.theme,closeHandler:function(){return lt({showProfile:!1})}}),j||h?Object(f.jsx)(Ys,{className:"mainLoader",height:"100vh",width:"100%",theme:v,position:"absolute"}):Object(f.jsx)(f.Fragment,{}),!x&&!j&&!h&&Object(f.jsx)(Ck,{theme:v})]}),Object(f.jsx)("style",{jsx:!0,children:"\n .mainLoader {\n top: 0;\n left: 0;\n }\n .logoutModal * {\n margin-top: 20px;\n }\n\n @media (max-width: 48rem) {\n .sidebar_header {\n width: 100vw;\n }\n }\n @media (max-width: 48rem) {\n .sidebar .sidebar_header .sliderr {\n width: 100vw;\n }\n .sidebar {\n display: ".concat(ve||null!=w&&w.selectedConvId?"none":"block",";\n }\n }\n ")})]})})};t.default=function(e){var t=e.showSideBarSearch,n=void 0===t||t,r=e.attachMentPosition,i=void 0===r?"right":r,o=e.sortConversationList,a=e.renderSelfMoremenu,s=e.showSearchIcon,c=void 0===s||s,u=e.ChatFooterRightSlot,l=void 0===u?function(){return Object(f.jsx)(f.Fragment,{})}:u,d=e.customSendOptions,h=void 0!==d&&d,p=e.RenderCustomSendOptions,v=void 0===p?function(){return Object(f.jsx)(f.Fragment,{})}:p,b=e.showSideChatHeader,m=e.extraAttachmentOptions,g=void 0===m?[]:m,y=e.renderProfileBadge,w=void 0===y?function(e){return Object(f.jsx)(f.Fragment,{})}:y,_=e.customSend,x=void 0!==_&&_,j=e.handleCustomSend,k=void 0===j?function(){return!1}:j,O=e.sideBarHeaderSlot,S=e.chatHeaderRightSlot,E=e.chatHeaderMoreMenu,C=e.onChatChange,A=e.placeHolder,P=e.sideBarPlaceHolder,M=e.allowProfileClick,I=void 0===M||M,R=e.onNewConversation,T=e.onConversationsFetch;return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)("div",{className:"isoChat",children:Object(f.jsx)(Kk,{onConversationsFetch:T,onNewConversation:R,showSideBarSearch:n,allowProfileClick:I,sortConversationList:o,renderSelfMoremenu:a,showSearchIcon:c,attachMentPosition:i,ChatFooterRightSlot:l,customSendOptions:h,RenderCustomSendOptions:v,extraAttachmentOptions:g,customSend:x,renderProfileBadge:w,handleCustomSend:k,sideBarHeaderSlot:O,chatHeaderRightSlot:S,chatHeaderMoreMenu:E,sideBarPlaceHolder:P,showSideChatHeader:b,onChatChange:C,placeHolder:A})})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(512);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function o(e,t,n="Mui"){const o=i[t];return o?`${n}-${o}`:`${r.a.generate(e)}-${t}`}},function(e,t,n){"use strict";const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})();t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1),i=n(227);function o(...e){return r.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{Object(i.a)(e,t)})},e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(236);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";var r=n(1),i=n(237);t.a=function(e){const t=r.useRef(e);return Object(i.a)(()=>{t.current=e}),r.useCallback((...e)=>(0,t.current)(...e),[])}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,t,n){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(511);function i(e,t,n="Mui"){const i={};return t.forEach(t=>{i[t]=Object(r.a)(e,t,n)}),i}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return l}));var r=n(113);function i(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(Object(r.a)(9,e));let i,a=e.substring(t+1,e.length-1);if("color"===n){if(a=a.split(" "),i=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error(Object(r.a)(10,i))}else a=a.split(",");return a=a.map(e=>parseFloat(e)),{type:n,values:a,colorSpace:i}}function a(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=r[1]+"%",r[2]=r[2]+"%"),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:""+r.join(", "),`${t}(${r})`}function s(e){let t="hsl"===(e=o(e)).type||"hsla"===e.type?o(function(e){e=o(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),c=(e,t=(e+n/30)%12)=>i-s*Math.max(Math.min(t-3,9-t,1),-1);let f="rgb";const u=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===e.type&&(f+="a",u.push(t[3])),a({type:f,values:u})}(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){const n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function f(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/"+t:e.values[3]=t,a(e)}function u(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function l(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return a(e)}},function(e,t,n){"use strict";function r(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(3),i=n(5),o=n(235);const a=["values","unit","step"];function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,s=Object(i.a)(e,a),c=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>Object(r.a)({},e,{[t.key]:t.val}),{})})(t),f=Object.keys(c);function u(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${n})`}function d(e,r){const i=f.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[f[i]]?t[f[i]]:r)-o/100}${n})`}return Object(r.a)({keys:f,values:c,up:u,down:l,between:d,only:function(e){return f.indexOf(e)+1<f.length?d(e,f[f.indexOf(e)+1]):u(e)},not:function(e){const t=f.indexOf(e);return 0===t?u(f[1]):t===f.length-1?l(f[t]):d(e,f[f.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},s)}var c={borderRadius:4},f=n(11);var u=n(226),l=n(66);const d=["breakpoints","palette","spacing","shape"];t.a=function(e={},...t){const{breakpoints:n={},palette:a={},spacing:h,shape:p={}}=e,v=Object(i.a)(e,d),b=s(n),m=function(e=8){if(e.mui)return e;const t=Object(f.a)({spacing:e}),n=(...e)=>{return(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?n+"px":n}).join(" ")};return n.mui=!0,n}(h);let g=Object(o.a)({breakpoints:b,direction:"ltr",components:{},palette:Object(r.a)({mode:"light"},a),spacing:m,shape:Object(r.a)({},c,p)},v);return g=t.reduce((e,t)=>Object(o.a)(e,t),g),g.unstable_sxConfig=Object(r.a)({},l.a,null==v?void 0:v.unstable_sxConfig),g.unstable_sx=function(e){return Object(u.a)({sx:e,theme:this})},g}}])}));
|