PageSourceSearch

https://www.joinfleek.com/_next/static/chunks/9953.5cc577fcc1932da1.js

js joinfleek.com collected 2026-10-01 15:27:07 UTC 775,863 bytes, 13 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9953],{45843:function(e,n,t){"use strict";t.d(n,{Z:function(){return S}});var r=t(1048),i=t(32793),a=t(67294),o=t(86010),l=t(94780),s=t(41796),u=t(98216),c=t(21964),d=t(71657),h=t(90948),f=t(1588),m=t(34867);function v(e){return(0,m.Z)("MuiSwitch",e)}let p=(0,f.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var g=t(85893);let _=["className","color","edge","size","sx"],E=e=>{let{classes:n,edge:t,size:r,color:a,checked:o,disabled:s}=e,c={root:["root",t&&`edge${(0,u.Z)(t)}`,`size${(0,u.Z)(r)}`],switchBase:["switchBase",`color${(0,u.Z)(a)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=(0,l.Z)(c,v,n);return(0,i.Z)({},n,d)},b=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,n)=>{let{ownerState:t}=e;return[n.root,t.edge&&n[`edge${(0,u.Z)(t.edge)}`],n[`size${(0,u.Z)(t.size)}`]]}})(({ownerState:e})=>(0,i.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===e.edge&&{marginLeft:-8},"end"===e.edge&&{marginRight:-8},"small"===e.size&&{width:40,height:24,padding:7,[`& .${p.thumb}`]:{width:16,height:16},[`& .${p.switchBase}`]:{padding:4,[`&.${p.checked}`]:{transform:"translateX(16px)"}}})),C=(0,h.ZP)(c.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,n)=>{let{ownerState:t}=e;return[n.switchBase,{[`& .${p.input}`]:n.input},"default"!==t.color&&n[`color${(0,u.Z)(t.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${p.checked}`]:{transform:"translateX(20px)"},[`&.${p.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${p.checked} + .${p.track}`]:{opacity:.5},[`&.${p.disabled} + .${p.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${"light"===e.palette.mode?.12:.2}`},[`& .${p.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:n})=>(0,i.Z)({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{[`&.${p.checked}`]:{color:(e.vars||e).palette[n.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[n.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette[n.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${p.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${n.color}DisabledColor`]:`${"light"===e.palette.mode?(0,s.$n)(e.palette[n.color].main,.62):(0,s._j)(e.palette[n.color].main,.55)}`}},[`&.${p.checked} + .${p.track}`]:{backgroundColor:(e.vars||e).palette[n.color].main}})),y=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,n)=>n.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${"light"===e.palette.mode?.38:.3}`})),N=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,n)=>n.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),T=a.forwardRef(function(e,n){let t=(0,d.Z)({props:e,name:"MuiSwitch"}),{className:a,color:l="primary",edge:s=!1,size:u="medium",sx:c}=t,h=(0,r.Z)(t,_),f=(0,i.Z)({},t,{color:l,edge:s,size:u}),m=E(f),v=(0,g.jsx)(N,{className:m.thumb,ownerState:f});return(0,g.jsxs)(b,{className:(0,o.Z)(m.root,a),sx:c,ownerState:f,children:[(0,g.jsx)(C,(0,i.Z)({type:"checkbox",icon:v,checkedIcon:v,ref:n,ownerState:f},h,{classes:(0,i.Z)({},m,{root:m.switchBase})})),(0,g.jsx)(y,{className:m.track,ownerState:f})]})});var S=T},81743:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(19013),i=t(13882);function a(e){(0,i.Z)(1,arguments);var n=(0,r.Z)(e);return n.setHours(0,0,0,0),n}function o(e,n){(0,i.Z)(2,arguments);var t=a(e),r=a(n);return t.getTime()===r.getTime()}},51085:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var r=t(81743),i=t(13882);function a(e){return(0,i.Z)(1,arguments),(0,r.Z)(e,Date.now())}},32968:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(81743),i=t(83946),a=t(19013),o=t(13882);function l(e){return(0,o.Z)(1,arguments),(0,r.Z)(e,function(e,n){return(0,o.Z)(2,arguments),function(e,n){(0,o.Z)(2,arguments);var t=(0,a.Z)(e),r=(0,i.Z)(n);return isNaN(r)?new Date(NaN):(r&&t.setDate(t.getDate()+r),t)}(e,-(0,i.Z)(1))}(Date.now(),1))}},27856:function(e){e.exports=function(){"use strict";let{entries:e,setPrototypeOf:n,isFrozen:t,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object,{freeze:a,seal:o,create:l}=Object,{apply:s,construct:u}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),o||(o=function(e){return e}),s||(s=function(e,n,t){return e.apply(n,t)}),u||(u=function(e,n){return new e(...n)});let c=y(Array.prototype.forEach),d=y(Array.prototype.pop),h=y(Array.prototype.push),f=y(String.prototype.toLowerCase),m=y(String.prototype.toString),v=y(String.prototype.match),p=y(String.prototype.replace),g=y(String.prototype.indexOf),_=y(String.prototype.trim),E=y(Object.prototype.hasOwnProperty),b=y(RegExp.prototype.test),C=(Z=TypeError,function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];return u(Z,n)});function y(e){return function(n){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return s(e,n,r)}}function N(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;n&&n(e,null);let a=r.length;for(;a--;){let n=r[a];if("string"==typeof n){let e=i(n);e!==n&&(t(r)||(r[a]=e),n=e)}e[n]=!0}return e}function T(n){let t=l(null);for(let[r,i]of e(n)){let e=E(n,r);e&&(Array.isArray(i)?t[r]=function(e){for(let n=0;n<e.length;n++){let t=E(e,n);t||(e[n]=null)}return e}(i):i&&"object"==typeof i&&i.constructor===Object?t[r]=T(i):t[r]=i)}return t}function S(e,n){for(;null!==e;){let t=i(e,n);if(t){if(t.get)return y(t.get);if("function"==typeof t.value)return y(t.value)}e=r(e)}return function(){return null}}let A=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),I=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),w=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=a(["#text"]),L=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
1spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=a(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),U=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),x=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),k=o(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=o(/<%[\w\W]*|[\w\W]*%>/gm),G=o(/\${[\w\W]*}/gm),B=o(/^data-[\-\w.\u00B7-\uFFFF]/),H=o(/^aria-[\-\w]+$/),V=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=o(/^(?:\w+script|data):/i),z=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=o(/^html$/i),Y=o(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z,Q=Object.freeze({__proto__:null,MUSTACHE_EXPR:k,ERB_EXPR:F,TMPLIT_EXPR:G,DATA_ATTR:B,ARIA_ATTR:H,IS_ALLOWED_URI:V,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:z,DOCTYPE_NAME:K,CUSTOM_ELEMENT:Y});let W={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},q=function(e,n){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let t=null,r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(t=n.getAttribute(r));let i="dompurify"+(t?"#"+t:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};return function n(){let t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,i=e=>n(e);if(i.version="3.1.7",i.removed=[],!r||!r.document||r.document.nodeType!==W.document)return i.isSupported=!1,i;let{document:o}=r,s=o,u=s.currentScript,{DocumentFragment:y,HTMLTemplateElement:k,Node:F,Element:G,NodeFilter:B,NamedNodeMap:H=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:j,DOMParser:z,trustedTypes:Y}=r,Z=G.prototype,X=S(Z,"cloneNode"),$=S(Z,"remove"),J=S(Z,"nextSibling"),ee=S(Z,"childNodes"),en=S(Z,"parentNode");if("function"==typeof k){let e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let et="",{implementation:er,createNodeIterator:ei,createDocumentFragment:ea,getElementsByTagName:eo}=o,{importNode:el}=s,es={};i.isSupported="function"==typeof e&&"function"==typeof en&&er&&void 0!==er.createHTMLDocument;let{MUSTACHE_EXPR:eu,ERB_EXPR:ec,TMPLIT_EXPR:ed,DATA_ATTR:eh,ARIA_ATTR:ef,IS_SCRIPT_OR_DATA:em,ATTR_WHITESPACE:ev,CUSTOM_ELEMENT:ep}=Q,{IS_ALLOWED_URI:eg}=Q,e_=null,eE=N({},[...A,...I,...M,...R,...D]),eb=null,eC=N({}
1,[...L,...P,...U,...x]),ey=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),eN=null,eT=null,eS=!0,eA=!0,eI=!1,eM=!0,eO=!1,eR=!0,ew=!1,eD=!1,eL=!1,eP=!1,eU=!1,ex=!1,ek=!0,eF=!1,eG=!0,eB=!1,eH={},eV=null,ej=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ez=null,eK=N({},["audio","video","img","source","image","track"]),eY=null,eZ=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eQ="http://www.w3.org/1998/Math/MathML",eW="http://www.w3.org/2000/svg",eq="http://www.w3.org/1999/xhtml",eX=eq,e$=!1,eJ=null,e0=N({},[eQ,eW,eq],m),e1=null,e2=["application/xhtml+xml","text/html"],e3=null,e6=null,e4=o.createElement("form"),e7=function(e){return e instanceof RegExp||e instanceof Function},e5=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e6||e6!==e){if(e&&"object"==typeof e||(e={}),e=T(e),e3="application/xhtml+xml"===(e1=-1===e2.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?m:f,e_=E(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,e3):eE,eb=E(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,e3):eC,eJ=E(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,m):e0,eY=E(e,"ADD_URI_SAFE_ATTR")?N(T(eZ),e.ADD_URI_SAFE_ATTR,e3):eZ,ez=E(e,"ADD_DATA_URI_TAGS")?N(T(eK),e.ADD_DATA_URI_TAGS,e3):eK,eV=E(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,e3):ej,eN=E(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,e3):{},eT=E(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,e3):{},eH=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,eS=!1!==e.ALLOW_ARIA_ATTR,eA=!1!==e.ALLOW_DATA_ATTR,eI=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eM=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eO=e.SAFE_FOR_TEMPLATES||!1,eR=!1!==e.SAFE_FOR_XML,ew=e.WHOLE_DOCUMENT||!1,eP=e.RETURN_DOM||!1,eU=e.RETURN_DOM_FRAGMENT||!1,ex=e.RETURN_TRUSTED_TYPE||!1,eL=e.FORCE_BODY||!1,ek=!1!==e.SANITIZE_DOM,eF=e.SANITIZE_NAMED_PROPS||!1,eG=!1!==e.KEEP_CONTENT,eB=e.IN_PLACE||!1,eg=e.ALLOWED_URI_REGEXP||V,eX=e.NAMESPACE||eq,ey=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&e7(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ey.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&e7(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ey.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ey.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),eO&&(eA=!1),eU&&(eP=!0),eH&&(e_=N({},D),eb=[],!0===eH.html&&(N(e_,A),N(eb,L)),!0===eH.svg&&(N(e_,I),N(eb,P),N(eb,x)),!0===eH.svgFilters&&(N(e_,M),N(eb,P),N(eb,x)),!0===eH.mathMl&&(N(e_,R),N(eb,U),N(eb,x))),e.ADD_TAGS&&(e_===eE&&(e_=T(e_)),N(e_,e.ADD_TAGS,e3)),e.ADD_ATTR&&(eb===eC&&(eb=T(eb)),N(eb,e.ADD_ATTR,e3)),e.ADD_URI_SAFE_ATTR&&N(eY,e.ADD_URI_SAFE_ATTR,e3),e.FORBID_CONTENTS&&(eV===ej&&(eV=T(eV)),N(eV,e.FORBID_CONTENTS,e3)),eG&&(e_["#text"]=!0),ew&&N(e_,["html","head","body"]),e_.table&&(N(e_,["tbody"]),delete eN.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');et=(t=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===t&&(t=q(Y,u)),null!==t&&"string"==typeof et&&(et=t.createHTML(""));a&&a(e),e6=e}},e8=N({},["mi","mo","mn","ms","mtext"]),e9=N({},["annotation-xml"]),ne=N({},["title","style","font","a","script"]),nn=N({},[...I,...M,...O]),nt=N({},[...R,...w]),nr=function(e){let n=en(e);n&&n.tagName||(n={namespaceURI:eX,tagName:"template"});let t=f(e.tagName),r=f(n.tagName);return!!eJ[e.namespaceURI]&&(e.namespaceURI===eW?n.namespaceURI===eq?"svg"===t:n.namespaceURI===eQ?"svg"===t&&("annotation-xml"===r||e8[r]):!!nn[t]:e.namespaceURI===eQ?n.namespaceURI===eq?"math"===t:n.namespaceURI===eW?"math"===t&&e9[r]:!!nt[t]:e.namespaceURI===eq?(n.namespaceURI!==eW||!!e9[r])&&(n.namespaceURI!==eQ||!!e8[r])&&!nt[t]&&(ne[t]||!nn[t]):"application/xhtml+xml"===e1&&!!eJ[e.namespaceURI])},ni=function(e){h(i.removed,{element:e});try{en(e).removeChild(e)}catch(n){$(e)}},na=function(e,n){try{h(i.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){h(i.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!eb[e]){if(eP||eU)try{ni(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}}},no=function(e){let n=null,r=null;if(eL)e="<remove></remove>"+e;else{let n=v(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===e1&&eX===eq&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let i=t?t.createHTML(e):e;if(eX===eq)try{n=new z().parseFromString(i,e1)}catch(e){}if(!n||!n.documentElement){n=er.createDocument(eX,"template",null);try{n.documentElement.innerHTML=e$?et:i}catch(e){}}let a=n.body||n.documentElement;return(e&&r&&a.insertBefore(o.createTextNode(r),a.childNodes[0]||null),eX===eq)?eo.call(n,ew?"html":"body")[0]:ew?n.documentElement:a},nl=function(e){return ei.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},ns=function(e){return e instanceof j&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof H)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},nu=function(e){return"function"==typeof F&&e instanceof F},nc=function(e,n,t){es[e]&&c(es[e],e=>{e.call(i,n,t,e6)})},nd=function(e){let n=null;if(nc("beforeSanitizeElements",e,null),ns(e))return ni(e),!0;let t=e3(e.nodeName);if(nc("uponSanitizeElement",e,{tagName:t,allowedTags:e_}),e.hasChildNodes()&&!nu(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent)||e.nodeType===W.progressingInstruction||eR&&e.nodeType===W.comment&&b(/<[/\w]/g,e.data))return ni(e),!0;if(!e_[t]||eN[t]){if(!eN[t]&&nf(t)&&(ey.tagNameCheck instanceof RegExp&&b(ey.tagNameCheck,t)||ey.tagNameCheck instanceof Function&&ey.tagNameCheck(t)))return!1;if(eG&&!eV[t]){let n=en(e)||e.parentNode,t=ee(e)||e.childNodes;if(t&&n){let r=t.length;for(let i=r-1;i>=0;--i){let r=X(t[i],!0);r.__removalCount=(e.__removalCount||0)+1,n.insertBefore(r,J(e))}}}return ni(e),!0}return e instanceof G&&!nr(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&b(/<\/no(script|embed|frames)/i,e.innerHTML)?(ni(e),!0):(eO&&e.nodeType===W.text&&(n=e.textContent,c([eu,ec,ed],e=>{n=p(n,e," ")}),e.textContent!==n&&(h(i.removed,{element:e.cloneNode()}),e.textContent=n)),nc("afterSanitizeElements",e,null),!1)},nh=function(e,n,t){if(ek&&("id"===n||"name"===n)&&(t in o||t in e4))return!1;if(eA&&!eT[n]&&b(eh,n));else if(eS&&b(ef,n));else if(!eb[n]||eT[n]){if(!(nf(e)&&(ey.tagNameCheck instanceof RegExp&&b(ey.tagNameCheck,e)||ey.tagNameCheck instanceof Function&&ey.tagNameCheck(e))&&(ey.attributeNameCheck instanceof RegExp&&b(ey.attributeNameCheck,n)||ey.attributeNameCheck instanceof Function&&ey.attributeNameCheck(n))||"is"===n&&ey.allowCustomizedBuiltInElements&&(ey.tagNameCheck instanceof RegExp&&b(ey.tagNameCheck,t)||ey.tagNameCheck instanceof Function&&ey.tagNameCheck(t))))return!1}else if(eY[n]);else if(b(eg,p(t,ev,"")));else if(("src"===n||"xlink:href"===n||"href"===n)&&"script"!==e&&0===g(t,"data:")&&ez[e]);else if(eI&&!b(em,p(t,ev,"")));else if(t)return!1;return!0},nf=function(e){return"annotation-xml"!==e&&v(e,ep)},nm=function(e){nc("beforeSanitizeAttributes",e,null);let{attributes:n}=e;if(!n)return;let r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eb},a=n.length;for(;a--;){let o=n[a],{name:l,namespaceURI:s,value:u}=o,h=e3(l),f="value"===l?u:_(u);if(r.attrName=h,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,nc("uponSanitizeAttribute",e,r),f=r.attrValue,r.forceKeepAttr||(na(l,e),!r.keepAttr))continue;if(!eM&&b(/\/>/i,f)){na(l,e);continue}eO&&c([eu,ec,ed],e=>{f=p(f,e," ")});let m=e3(e.nodeName);if(nh(m,h,f)){if(eF&&("id"===h||"name"===h)&&(na(l,e),f="user-content-"+f),eR&&b(/((--!?|])>)|<\/(style|title)/i,f)){na(l,e);continue}if(t&&"object"==typeof Y&&"function"==typeof Y.getAttributeType){if(s);else switch(Y.getAttributeType(m,h)){case"TrustedHTML":f=t.createHTML(f);break;case"TrustedScriptURL":f=t.createScriptURL(f)}}try{s?e.setAttributeNS(s,l,f):e.setAttribute(l,f),ns(e)?ni(e):d(i.removed)}catch(e){}}}nc("afterSanitizeAttributes",e,null)},nv=function e(n){let t=null,r=nl(n);for(nc("beforeSanitizeShadowDOM",n,null);t=r.nextNode();)nc("uponSanitizeShadowNode",t,null),nd(t)||(t.content instanceof y&&e(t.content),nm(t));nc("afterSanitizeShadowDOM",n,null)};return i.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,o=null,l=null;if((e$=!e)&&(e="<!-->"),"string"!=typeof e&&!nu(e)){if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw C("dirty is not a string, aborting")}else throw C("toString is not a function")}if(!i.isSupported)return e;if(eD||e5(n),i.removed=[],"string"==typeof e&&(eB=!1),eB){if(e.nodeName){let n=e3(e.nodeName);if(!e_[n]||eN[n])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof F)(a=(r=no("<!---->")).ownerDocument.importNode(e,!0)).nodeType===W.element&&"BODY"===a.nodeName?r=a:"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!eP&&!eO&&!ew&&-1===e.indexOf("<"))return t&&ex?t.createHTML(e):e;if(!(r=no(e)))return eP?null:ex?et:""}r&&eL&&ni(r.firstChild);let u=nl(eB?e:r);for(;o=u.nextNode();)nd(o)||(o.content instanceof y&&nv(o.content),nm(o));if(eB)return e;if(eP){if(eU)for(l=ea.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(eb.shadowroot||eb.shadowrootmode)&&(l=el.call(s,l,!0)),l}let d=ew?r.outerHTML:r.innerHTML;return ew&&e_["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&b(K,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),eO&&c([eu,ec,ed],e=>{d=p(d,e," ")}),t&&ex?t.createHTML(d):d},i.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e5(e),eD=!0},i.clearConfig=function(){e6=null,eD=!1},i.isValidAttribute=function(e,n,t){e6||e5({});let r=e3(e),i=e3(n);return nh(r,i,t)},i.addHook=function(e,n){"function"==typeof n&&(es[e]=es[e]||[],h(es[e],n))},i.removeHook=function(e){if(es[e])return d(es[e])},i.removeHooks=function(e){es[e]&&(es[e]=[])},i.removeAllHooks=function(){es={}}
1,i}()}()},92217:function(){},42391:function(e,n,t){"use strict";t.d(n,{pe:function(){return C},rY:function(){return S}});var r,i,a=t(36614),o=t(18490),l=t(4500),s=t(77522),u=t(73235),c={},d=function(){function e(e){var n,t=e._iid,r=e.limit,i=this;this.ref=0,this._iid=t,this._limit=void 0===r?100:r;var l,u=a.V.of(this._iid),c=u.sdkState,d=u.dispatcher,h=u.logger,f=u.cacheContext,m=u.statManager;this._metadataKey=(l=c.userId,"sendbird:".concat(l,"@groupchannel/sync.meta"));var v=(n=c.userId,"sendbird:".concat(n,"@groupchannel/sync"));this._sync=new o.S(v,function(){return(0,a._)(i,void 0,void 0,function(){var e,n,t,r,i,l,u,d,v,p,g,_,E,b,C,y;return(0,a.b)(this,function(N){switch(N.label){case 0:return e={hasNext:!0,nextToken:""},[4,this.loadMetadata()];case 1:if(N.sent(),h.debug("channel background sync from",null===(v=this._metadata)||void 0===v?void 0:v.token),null===(p=this._metadata)||void 0===p?void 0:p.completed)return[3,14];n={includeEmpty:!0,includeMetaData:!0,order:s.G.CHRONOLOGICAL},N.label=2;case 2:if(N.trys.push([2,9,12,13]),n.order!==s.G.LATEST_LAST_MESSAGE)return[3,6];N.label=3;case 3:return N.trys.push([3,5,,6]),[4,f.preference.get((0,a.K)(c.appId))];case 4:return t=N.sent(),n.includeChatNotification=!!t,[3,6];case 5:return N.sent(),n.includeChatNotification=!1,[3,6];case 6:return[4,o.G.of(this._iid).getMyGroupChannels(null!==(_=null===(g=this._metadata)||void 0===g?void 0:g.token)&&void 0!==_?_:"",n,this._limit,a.a2.SYNC_CHANNEL_BACKGROUND)];case 7:return i=(r=N.sent()).channels,l=r.token,e.hasNext=i.length>=this._limit&&!!l,e.nextToken=l,this._metadata&&(this._metadata.token=l,(d=this._metadata.range).extends.apply(d,(0,a.p)([],(0,a.q)(i.map(function(e){return e.createdAt})),!1)),this._metadata.completed=!e.hasNext),h.debug("channel background sync progress",e),[4,this.saveMetadata()];case 8:return N.sent(),[3,13];case 9:return u=N.sent(),h.debug("channel background sync error",u),u instanceof a.s&&u.isInvalidTokenError?[4,this.clearMetaData()]:[3,11];case 10:N.sent(),N.label=11;case 11:throw u;case 12:return m.put(new a.b9({type:a.ba.FEATURE_LOCALCACHE_EVENT,ts:Date.now(),data:{channel_url:"",measured_on:"channel_back_sync",event:"cache_fetch",max_db_size:null!==(b=null===(E=f.localCacheConfig)||void 0===E?void 0:E.maxSize)&&void 0!==b?b:0,use_local_cache:f.localCacheEnabled,starting_point:0,message_init_policy:null!==(y=null===(C=n.order)||void 0===C?void 0:C.toString())&&void 0!==y?y:"",collection_id:c.userId}})),[7];case 13:return[3,15];case 14:e.hasNext=!1,e.nextToken="",N.label=15;case 15:return[2,e]}})})}),this._connectionEventContext=d.on(function(e){e instanceof a.D&&(e.stateType===a.F.CONNECTED?i.resume():i.pause())})}return e.of=function(n){return c[n]||(c[n]=new e({_iid:n})),c[n].ref++,c[n]},e.clear=function(e){c[e]&&(c[e].close(),delete c[e])},Object.defineProperty(e.prototype,"range",{get:function(){var e,n;return null!==(n=null===(e=this._metadata)||void 0===e?void 0:e.range)&&void 0!==n?n:new o.T({})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"completed",{get:function(){var e;return!!(null===(e=this._metadata)||void 0===e?void 0:e.completed)},enumerable:!1,configurable:!0}),e.prototype.loadMetadata=function(){return(0,a._)(this,void 0,void 0,function(){var e;return(0,a.b)(this,function(n){switch(n.label){case 0:return this._metadata?[3,2]:[4,a.V.of(this._iid).cacheContext.preference.get(this._metadataKey)];case 1:e=n.sent(),this._metadata={token:e?e.token:"",range:new o.T(e?e.range:{top:Number.MAX_SAFE_INTEGER,bottom:0}),completed:!!e&&e.completed},n.label=2;case 2:return[2,this._metadata]}})})},e.prototype.saveMetadata=function(){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){switch(e.label){case 0:return this._metadata?[4,a.V.of(this._iid).cacheContext.preference.set(this._metadataKey,this._metadata)]:[3,2];case 1:return e.sent(),[2,!0];case 2:return[2,!1]}})})},e.prototype.clearMetaData=function(){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){switch(e.label){case 0:return[4,a.V.of(this._iid).cacheContext.preference.remove(this._metadataKey)];case 1:return e.sent(),this._metadata=void 0,[2]}})})},e.prototype.resume=function(){var e,n,t=a.V.of(this._iid),r=t.logger;t.sessionManager.session.hasSession&&(r.debug("channel background sync resume()"),this._sync.start(null!==(n=null===(e=this._metadata)||void 0===e?void 0:e.token)&&void 0!==n?n:""))},e.prototype.pause=function(){a.V.of(this._iid).logger.debug("channel background sync stop()"),this._sync.stop()},e.prototype.close=function(){this.ref--,this.ref<=0&&(this.ref=0,this.pause(),this._connectionEventContext.close(),delete c[this._iid])},e}(),h={},f=function(){function e(e){var n,t=e._iid,r=this;this.ref=0,this._iid=t;var i,l=a.V.of(this._iid),s=l.logger,u=l.sdkState,c=l.dispatcher,d=l.cacheContext,h=l.statManager;this._metadataKey=(i=u.userId,"sendbird:".concat(i,"@groupchannel/changelogs.meta")),this._subscribers=new a.E;var f=(n=u.userId,"sendbird:".concat(n,"@groupchannel/changelogs"));this._sync=new o.S(f,function(){return(0,a._)(r,void 0,void 0,function(){var e,n,t,r,i,l,c,f,m,v,p,g;return(0,a.b)(this,function(_){switch(_.label){case 0:return e={hasNext:!0,nextToken:0},[4,this.loadMetadata()];case 1:_.sent(),s.debug("channel changelog sync from",null===(v=this._metadata)||void 0===v?void 0:v.token),_.label=2;case 2:_.trys.push([2,9,,12]),n={includeEmpty:!0,includeMetaData:!0},_.label=3;case 3:return _.trys.push([3,5,,6]),[4,d.preference.get((0,a.K)(u.appId))];case 4:return t=_.sent(),n.includeChatNotification=!!t,[3,6];case 5:return _.sent(),n.includeChatNotification=!1,[3,6];case 6:return[4,o.G.of(this._iid).getMyGroupChannelChangeLogs(null!==(g=null===(p=this._metadata)||void 0===p?void 0:p.token)&&void 0!==g?g:"",n,a.a2.SYNC_CHANNEL_CHANGELOGS)];case 7:return i=(r=_.sent()).updatedChannels,l=r.deletedChannelUrls,c=r.hasMore,f
1=r.token,this._subscribers.dispatch("progress",{updatedChannels:i,deletedChannelUrls:l,hasMore:c,token:f}),e.hasNext=c,e.nextToken=f,this._metadata&&(this._metadata.token=f),s.debug("channel changelog sync progress",e),[4,this.saveMetadata()];case 8:return _.sent(),d.localCacheEnabled&&h.put(new a.b9({type:a.ba.FEATURE_LOCALCACHE_EVENT,ts:Date.now(),data:{channel_url:"",measured_on:"channel_change_log_sync",event:i.length>0||l.length>0?"cache_miss":"cache_hit",max_db_size:i.length,use_local_cache:d.localCacheEnabled,starting_point:0,message_init_policy:l.length.toString(),collection_id:u.userId}})),[3,12];case 9:return m=_.sent(),s.debug("channel changelog sync error",m),m instanceof a.s&&m.isInvalidTokenError?[4,this.clearMetadata()]:[3,11];case 10:_.sent(),_.label=11;case 11:throw m;case 12:return[2,e]}})})}),this._sync.on("stop",function(){r._subscribers.dispatch("pause")}),this._connectionEventContext=c.on(function(e){e instanceof a.D&&(e.stateType===a.F.CONNECTED?r.resume():r.pause())})}return e.of=function(n){return h[n]||(h[n]=new e({_iid:n})),h[n].ref++,h[n]},e.clear=function(e){h[e]&&(h[e].close(),delete h[e])},Object.defineProperty(e.prototype,"isRunning",{get:function(){return this._sync.isRunning},enumerable:!1,configurable:!0}),e.prototype.loadMetadata=function(){return(0,a._)(this,void 0,void 0,function(){var e,n,t,r;return(0,a.b)(this,function(i){switch(i.label){case 0:return this._metadata?[3,2]:(n=(e=a.V.of(this._iid)).cacheContext,t=e.firstConnectedAt,[4,n.preference.get(this._metadataKey)]);case 1:r=i.sent(),this._metadata={token:r?r.token:t},i.label=2;case 2:return[2,this._metadata]}})})},e.prototype.saveMetadata=function(){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){switch(e.label){case 0:return this._metadata?[4,a.V.of(this._iid).cacheContext.preference.set(this._metadataKey,this._metadata)]:[3,2];case 1:return e.sent(),[2,!0];case 2:return[2,!1]}})})},e.prototype.clearMetadata=function(){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){switch(e.label){case 0:return[4,a.V.of(this._iid).cacheContext.preference.remove(this._metadataKey)];case 1:return e.sent(),this._metadata=void 0,[2]}})})},e.prototype.on=function(e,n){return this._subscribers.on(e,n)},e.prototype.resume=function(){a.V.of(this._iid).sessionManager.session.hasSession&&this._sync.start(0)},e.prototype.pause=function(){this._sync.stop()},e.prototype.close=function(){this.ref--,this.ref<=0&&(this.ref=0,this.pause(),this._connectionEventContext.close(),delete h[this._iid])},e}(),m=function(e,n){return e.findIndex(function(e){return e.isIdentical(n)})},v=function(e,n,t){if(e.length>0){for(var r=m(e,n),i=0,a=e.length-1,o=Math.floor((i+a)/2);i<a;){var l=p(e[o],n,t);if(l>0)o=Math.floor((i+(a=o))/2);else{if(!(l<0))return{place:o,oldPosition:r};o=Math.floor(((i=o+1)+a)/2)}}return{place:p(e[o],n,t)>=0?o:o+1,oldPosition:r}}return{place:e.length,oldPosition:-1}},p=function(e,n,t){switch(t){case s.G.LATEST_LAST_MESSAGE:return e.lastMessage&&n.lastMessage?0==(r=n.lastMessage.createdAt-e.lastMessage.createdAt)?n.createdAt-e.createdAt:r:e.lastMessage?-1:n.lastMessage?1:n.createdAt-e.createdAt;case s.G.CHRONOLOGICAL:return n.createdAt-e.createdAt;case s.G.CHANNEL_NAME_ALPHABETICAL:var r;return 0===(r=e.name.localeCompare(n.name))?e.createdAt-n.createdAt:r;default:return 0}},g=function(){function e(e,n){var t=n.filter,r=void 0===t?new o.a:t,i=n.order,u=void 0===i?s.G.LATEST_LAST_MESSAGE:i,c=n.limit,h=void 0===c?l.Q:c,m=n.includeChangesOnInitialLoad,v=this;this.channels=[],this._isInitialized=!1,this._iid=e,this._key="gcc-".concat((0,a.n)()),this._isDisposed=!1,this._isGetRemoteChannelsSucceeded=!0,this._includeChangesOnInitialLoad=void 0!==m&&m,this.filter=r,this.order=u,this._hasMore=!0,this._token="",this._limit=h;var p=a.V.of(this._iid),g=p.sdkState,_=p.cacheContext,E=p.dispatcher;_.localCacheEnabled&&(this._backgroundSync=d.of(e),this._backgroundSync.resume()),this._changelogSync=f.of(e),this._changelogSync.resume(),o.G.of(this._iid).subscribeChannelEvent(this._key,{onUpdate:function(e,n){var t=n.source;if((0,o.s)(t)){var r=e.filter(function(e){return v.filter.match(e,g.userId)}),i=e.filter(function(e){return!v.filter.match(e,g.userId)}).map(function(e){return e.url});r.length>0&&v._addChannelsToView(r,n),i.length>0&&v._removeChannelsFromView(i,n)}},onRemove:function(e,n){v._removeChannelsFromView(e,n)}}),E.on(function(e){e instanceof a.D&&(e.stateType===a.F.CONNECTED?v._isGetRemoteChannelsSucceeded||(0,a._)(v,void 0,void 0,function(){return(0,a.b)(this,function(e){switch(e.label){case 0:return[4,this._revokeLoadMore()];case 1:return e.sent(),[2]}})}):e.stateType===a.F.LOGOUT&&v.dispose())})}return Object.defineProperty(e.prototype,"hasMore",{get:function(){return!this._isDisposed&&this._hasMore}
1,enumerable:!1,configurable:!0}),e.prototype.setGroupChannelCollectionHandler=function(e){this._handler=e},e.prototype._addChannelsToView=function(e,n,t){var r,i,l,u,c=this;void 0===t&&(t=!1);var d=[],h=[],f=[];try{for(var p=(0,a.t)(e),g=p.next();!g.done;g=p.next()){var _=g.value,E=m(this.channels,_);E>=0&&this.channels.splice(E,1);var b=v(this.channels,_,this.order).place;if(E<0)b===this.channels.length?!t&&this._hasMore||(d.push(_),this.channels.push(_)):(d.push(_),this.channels.splice(b,0,_));else switch(n.source){case a.a2.EVENT_CHANNEL_UPDATED:case a.a2.EVENT_MESSAGE_RECEIVED:case a.a2.SYNC_CHANNEL_CHANGELOGS:case a.a2.EVENT_MESSAGE_SENT:this.order===s.G.CHANNEL_NAME_ALPHABETICAL&&this._hasMore&&b===this.channels.length?f.push(_):(this.channels.splice(b,0,_),h.push(_));break;default:this.channels.splice(b,0,_),h.push(_)}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}if(f.length>0)try{for(var C=(0,a.t)(f),y=C.next();!y.done;y=C.next()){_=y.value;var N=m(this.channels,_);-1!==N&&this.channels.splice(N,1)}}catch(e){l={error:e}}finally{try{y&&!y.done&&(u=C.return)&&u.call(C)}finally{if(l)throw l.error}}(0,o.s)(n.source)&&(0,a.G)(function(){return(0,a._)(c,void 0,void 0,function(){var e,t,r;return(0,a.b)(this,function(i){return d.length>0&&(null===(e=this._handler)||void 0===e?void 0:e.onChannelsAdded)&&this._handler.onChannelsAdded(n,d),h.length>0&&(null===(t=this._handler)||void 0===t?void 0:t.onChannelsUpdated)&&this._handler.onChannelsUpdated(n,h),f.length>0&&(null===(r=this._handler)||void 0===r?void 0:r.onChannelsDeleted)&&this._handler.onChannelsDeleted(n,f.map(function(e){return e.url})),[2]})})})},e.prototype._removeChannelsFromView=function(e,n){var t,r,i=this,l=[],s=function(e){var n=u.channels.findIndex(function(n){return n.url===e});n>=0&&(l.push(u.channels[n].url),u.channels.splice(n,1))},u=this;try{for(var c=(0,a.t)(e),d=c.next();!d.done;d=c.next())s(d.value)}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return(0,o.s)(n.source)&&l.length>0&&(0,a.G)(function(){return(0,a._)(i,void 0,void 0,function(){var e;return(0,a.b)(this,function(t){return(null===(e=this._handler)||void 0===e?void 0:e.onChannelsDeleted)&&this._handler.onChannelsDeleted(n,l),[2]})})}),l},e.prototype._getLocalChannels=function(){return(0,a._)(this,void 0,void 0,function(){var e,n;return(0,a.b)(this,function(t){switch(t.label){case 0:return e=o.G.of(this._iid),n=this.channels.length>0?function(e,n){var t,r,i,a;switch(n){case s.G.LATEST_LAST_MESSAGE:return null!==(r=null===(t=e.lastMessage)||void 0===t?void 0:t.createdAt)&&void 0!==r?r:e.createdAt;case s.G.CHRONOLOGICAL:return e.createdAt;case s.G.CHANNEL_NAME_ALPHABETICAL:return e.name;default:return null!==(a=null===(i=e.lastMessage)||void 0===i?void 0:i.createdAt)&&void 0!==a?a:e.createdAt}}(this.channels[this.channels.length-1],this.order):null,[4,e.getChannelsFromCache(n,this.filter,this.order,this._limit,n?this.channels[this.channels.length-1].url:void 0)];case 1:return[2,t.sent()]}})})},e.prototype._getRemoteChannels=function(){return(0,a._)(this,void 0,void 0,function(){var e,n,t;return(0,a.b)(this,function(r){switch(r.label){case 0:return[4,o.G.of(this._iid).getMyGroupChannels(this._token,(0,a.u)((0,a.g)((0,a.g)({},this.filter),{userIdsFilter:this.filter.userIdsFilter,searchFilter:this.filter.searchFilter,order:this.order})),this._limit)];case 1:return n=(e=r.sent()).channels,t=e.token,this._token=t,this._hasMore=!!t,[2,n]}})})},e.prototype._revokeLoadMore=function(){return(0,a._)(this,void 0,void 0,function(){var e;return(0,a.b)(this,function(n){switch(n.label){case 0:if(this._isDisposed)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._getRemoteChannels()];case 2:return e=n.sent(),this._isGetRemoteChannelsSucceeded=!0,this._addChannelsToView(e,{source:a.a2.REQUEST_CHANNEL},!0),[3,4];case 3:return n.sent(),this._isGetRemoteChannelsSucceeded=!1,[3,4];case 4:return[2]}})})},e.prototype.loadMore=function(){var e;return(0,a._)(this,void 0,void 0,function(){var n,t,r,i,o,l,s,u,c,d,h,f,p,g,_,E,b,C,y,N=this;return(0,a.b)(this,function(T){switch(T.label){case 0:if(this._isDisposed)throw new a.s({code:a.a8.COLLECTION_DISPOSED,message:"Collection has been disposed."});return n=null,this._includeChangesOnInitialLoad&&0===this.channels.length&&this._changelogSync.isRunning?[4,new Promise(function(e){N._changelogSyncSubscriberContext=N._changelogSync.on("progress",function(n){return e(n)}).on("pause",function(){return e(null)})})]:[3,2];case 1:n=T.sent(),null===(e=this._changelogSyncSubscriberContext)||void 0===e||e.close(),T.label=2;case 2:return r=(t=a.V.of(this._iid)).cacheContext,i=t.connectionManager,o=t.statManager,this._isInitialized?[3,5]:(this._isInitialized=!0,r.localCacheEnabled?[4,this._backgroundSync.loadMetadata()]:[3,4]);case 3:T.sent(),T.label=4;case 4:o.put(new a.bb({type:a.ba.FEATURE_LOCALCACHE,data:{use_local_cache:r.localCacheEnabled,collection_interface:{group_channel:!0}}})),T.label=5;case 5:return l=[],this._hasMore?r.localCacheEnabled&&(!i.isConnected||this._backgroundSync.completed)?[4,(0,a.B)(function(){return(0,a._)(N,void 0,void 0,function(){return(0,a.b)(this,function(e){switch(e.label){case 0:return[4,this._getLocalChannels()];case 1:return l=e.sent(),[2]}})})})]:[3,7]:[3,11];
1case 6:return T.sent(),this._hasMore=l.length>=this._limit,[3,10];case 7:return T.trys.push([7,9,,10]),[4,this._getRemoteChannels()];case 8:return l=T.sent(),this._isGetRemoteChannelsSucceeded=!0,[3,10];case 9:return T.sent(),this._isGetRemoteChannelsSucceeded=!1,[3,10];case 10:this._addChannelsToView(l,{source:a.a2.REQUEST_CHANNEL},!0),T.label=11;case 11:if(n){try{for(u=(s=(0,a.t)(n.updatedChannels)).next();!u.done;u=s.next())c=u.value,(_=m(l,c))>=0?l[_]=c:(d=v(l,c,this.order).place,l.splice(d,0,c))}catch(e){E={error:e}}finally{try{u&&!u.done&&(b=s.return)&&b.call(s)}finally{if(E)throw E.error}}h=l.map(function(e){return e.url});try{for(p=(f=(0,a.t)(n.deletedChannelUrls)).next();!p.done;p=f.next())g=p.value,(_=h.indexOf(g))>=0&&(l.splice(_,1),h.splice(_,1))}catch(e){C={error:e}}finally{try{p&&!p.done&&(y=f.return)&&y.call(f)}finally{if(C)throw C.error}}}return[2,l]}})})},e.prototype.dispose=function(){var e,n,t;this._isDisposed||(this._isDisposed=!0,this.channels.length>0&&this.channels.splice(0,this.channels.length),null===(e=this._backgroundSync)||void 0===e||e.close(),null===(n=this._changelogSync)||void 0===n||n.close(),null===(t=this._changelogSyncSubscriberContext)||void 0===t||t.close(),o.G.of(this._iid).unsubscribeChannelEvent(this._key))},e}(),_=function(e){function n(n){var t=this,r=n.token,i=n.limit,l=n.order,s=n.includeEmpty,u=n.membershipFilter,c=n.channelNameContainsFilter,d=n.channelUrlsFilter,h=n.customTypesFilter,f=n.customTypeStartsWithFilter,m=n.superChannelFilter,v=n.metadataOrderKeyFilter,p=n.metadataKey,g=n.metadataValues,_=n.metadataValueStartsWith,E=n.includeFrozen,b=n.includeMetaData;return(t=e.call(this)||this).method=a.A.GET,t.path=a.az,t.params=(0,a.e)((0,a.u)({token:r,limit:i,order:l,show_member:!0,show_read_receipt:!0,show_delivery_receipt:!0,show_empty:s,public_mode:o.P.PUBLIC,public_membership_mode:u,name_contains:c,channel_urls:d,custom_types:h,custom_type_startswith:f,super_mode:m,metadata_order_key:v,metadata_key:p,metadata_values:g,metadata_value_startswith:_,show_frozen:E,show_metadata:b})),t}return(0,a.c)(n,e),n}(a.f),E=function(e){function n(n,t){var r=e.call(this,n,t)||this;r.channels=[];var i=t.next,a=t.channels,l=t.ts;return r.token=i,a&&a.length>0&&(r.channels=a.map(function(e){return e.ts=l,new o.b(n,e)})),r.ts="number"==typeof l?l:0,r}return(0,a.c)(n,e),n}(a.h);(r=i||(i={})).ALL="all",r.JOINED="joined";var b=function(e){function n(n,t){var r,a,l,u,c,d,h,f,m,v,p,g,_,E,b=this;return(b=e.call(this,n,t)||this).includeEmpty=!1,b.includeFrozen=!0,b.includeMetaData=!0,b.channelUrlsFilter=null,b.customTypesFilter=null,b.customTypeStartsWithFilter=null,b.channelNameContainsFilter=null,b.membershipFilter=i.ALL,b.superChannelFilter=o.c.ALL,b.metadataKey=null,b.metadataValues=null,b.metadataOrderKeyFilter=null,b.metadataValueStartsWith=null,b.order=s.P.CHRONOLOGICAL,b.includeEmpty=null!==(r=t.includeEmpty)&&void 0!==r&&r,b.includeFrozen=null===(a=t.includeFrozen)||void 0===a||a,b.includeMetaData=null===(l=t.includeMetaData)||void 0===l||l,b.channelUrlsFilter=null!==(u=t.channelUrlsFilter)&&void 0!==u?u:null,b.customTypesFilter=null!==(c=t.customTypesFilter)&&void 0!==c?c:null,b.customTypeStartsWithFilter=null!==(d=t.customTypeStartsWithFilter)&&void 0!==d?d:null,b.channelNameContainsFilter=null!==(h=t.channelNameContainsFilter)&&void 0!==h?h:null,b.membershipFilter=null!==(f=t.membershipFilter)&&void 0!==f?f:i.ALL,b.superChannelFilter=null!==(m=t.superChannelFilter)&&void 0!==m?m:o.c.ALL,b.metadataKey=null!==(v=t.metadataKey)&&void 0!==v?v:null,b.metadataValues=null!==(p=t.metadataValues)&&void 0!==p?p:null,b.metadataOrderKeyFilter=null!==(g=t.metadataOrderKeyFilter)&&void 0!==g?g:null,b.metadataValueStartsWith=null!==(_=t.metadataValueStartsWith)&&void 0!==_?_:null,b.order=null!==(E=t.order)&&void 0!==E?E:s.P.CHRONOLOGICAL,b}return(0,a.c)(n,e),n.prototype._validate=function(){return e.prototype._validate.call(this)&&(0,a.a)("boolean",this.includeEmpty)&&(0,a.a)("boolean",this.includeFrozen)&&(0,a.a)("boolean",this.includeMetaData)&&(0,a.a)("string",this.channelNameContainsFilter,!0)&&(0,a.Q)("string",this.channelUrlsFilter,!0)&&(0,a.Q)("string",this.customTypesFilter,!0)&&(0,a.a)("string",this.customTypeStartsWithFilter,!0)&&(0,a.X)(i,this.membershipFilter)&&(0,a.X)(o.c,this.superChannelFilter)&&(0,a.X)(s.P,this.order)&&(0,a.a)("string",this.metadataOrderKeyFilter,!0)&&(0,a.a)("string",this.metadataKey,!0)&&(0,a.Q)("string",this.metadataValues,!0)&&(0,a.a)("string",this.metadataValueStartsWith,!0)},n.prototype.next=function(){return(0,a._)(this,void 0,void 0,function(){var e,n,t,r,i,o;return(0,a.b)(this,function(l){switch(l.label){case 0:return this._val
1idate()?this._isLoading?[3,3]:(e=[],this._hasNext?(this._isLoading=!0,n=a.V.of(this._iid).requestQueue,t=new _((0,a.u)((0,a.g)((0,a.g)({},this),{token:this._token}))),[4,n.send(t)]):[3,2]):[3,5];case 1:return i=(r=l.sent().as(E)).channels,o=r.token,this._token=o,this._hasNext=!!o,this._isLoading=!1,[2,i];case 2:return[2,e];case 3:throw a.s.queryInProgress;case 4:return[3,6];case 5:throw a.s.invalidParameters;case 6:return[2]}})})},n}(a.aO),C=function(e){function n(n){void 0===n&&(n={});var t=e.call(this)||this;return Object.keys(n).forEach(function(e){t.hasOwnProperty(e)&&(t[e]=n[e])}),t}return(0,a.c)(n,e),n}(function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.onUserJoined=a.aA,n.onUserLeft=a.aA,n.onUserReceivedInvitation=a.aA,n.onUserDeclinedInvitation=a.aA,n.onChannelHidden=a.aA,n.onUnreadMemberStatusUpdated=a.aA,n.onUndeliveredMemberStatusUpdated=a.aA,n.onTypingStatusUpdated=a.aA,n.onPollUpdated=a.aA,n.onPollVoted=a.aA,n.onPollDeleted=a.aA,n.onPinnedMessageUpdated=a.aA,n}return(0,a.c)(n,e),n}(u.B)),y=function(e){function n(n){var t=this,r=n.token,i=n.limit,o=n.order,l=n.reverse,s=n.channelUrl,u=n.messageTypeFilter,c=n.scheduledStatus;return(t=e.call(this)||this).method=a.A.GET,t.path="".concat(a.bc),t.params=(0,a.e)((0,a.u)({token:r,limit:i,reverse:l,channel_url:s,order:o,message_type:u,status:c})),t}return(0,a.c)(n,e),n}(a.f),N=function(e){function n(n,t){var r=e.call(this,n,t)||this;r.scheduledMessages=[];var i=t.next,a=t.scheduled_messages;return r.token=i,r.scheduledMessages=a.map(function(e){return(0,l.T)(n,e)}),r}return(0,a.c)(n,e),n}(a.h),T=function(e){function n(n,t){var r,i,o,l,s,u=this;return(u=e.call(this,n,t)||this).channelUrl=null,u.order=null,u.reverse=!1,u.scheduledStatus=null,u.messageTypeFilter=a.aq.ALL,u.channelUrl=null!==(r=t.channelUrl)&&void 0!==r?r:null,u.order=null!==(i=t.order)&&void 0!==i?i:null,u.reverse=null!==(o=t.reverse)&&void 0!==o&&o,u.scheduledStatus=null!==(l=t.scheduledStatus)&&void 0!==l?l:null,u.messageTypeFilter=null!==(s=t.messageTypeFilter)&&void 0!==s?s:a.aq.ALL,u}return(0,a.c)(n,e),n.prototype._validate=function(){return e.prototype._validate.call(this)&&(0,a.a)("string",this.channelUrl,!0)&&((0,a.X)(s.S,this.order)||null===this.order)&&(0,a.a)("boolean",this.reverse)&&((0,a.Q)(l.V,this.scheduledStatus)||null===this.scheduledStatus)&&(0,a.X)(a.aq,this.messageTypeFilter)},n.prototype.next=function(){return(0,a._)(this,void 0,void 0,function(){var e,n,t,r,i;return(0,a.b)(this,function(o){switch(o.label){case 0:return this._validate()?this._isLoading?[3,3]:this._hasNext?(this._isLoading=!0,e=a.V.of(this._iid).requestQueue,n=new y((0,a.u)((0,a.g)((0,a.g)({},this),{token:this._token}))),[4,e.send(n)]):[3,2]:[3,5];case 1:return r=(t=o.sent().as(N)).scheduledMessages,i=t.token,this._token=i,this._hasNext=!!i,this._isLoading=!1,[2,r];case 2:return[2,[]];case 3:throw a.s.queryInProgress;case 4:return[3,6];case 5:throw a.s.invalidParameters;case 6:return[2]}})})},n}(a.aO),S=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.name="groupChannel",n}return(0,a.c)(n,e),n.prototype.init=function(n,t){var r=t.sdkState,i=t.dispatcher,a=t.sessionManager,l=t.requestQueue,s=t.logger,u=t.onlineDetector,c=t.cacheContext;e.prototype.init.call(this,n,{sdkState:r,dispatcher:i,sessionManager:a,requestQueue:l,logger:s,onlineDetector:u,cacheContext:c}),this._manager=new o.G(n,{sdkState:r,cacheContext:c,dispatcher:i,sessionManager:a,requestQueue:l,logger:s})},n.prototype.createGroupChannelCollection=function(e){return void 0===e&&(e={}),new g(this._iid,e)},n.prototype.createMyGroupChannelListQuery=function(e){return void 0===e&&(e={}),new o.d(this._iid,e)},n.prototype.createPublicGroupChannelListQuery=function(e){return void 0===e&&(e={}),new b(this._iid,e)},n.prototype.createScheduledMessageListQuery=function(e){return void 0===e&&(e={}),new T(this._iid,e)},n.prototype.addGroupChannelHandler=function(e,n){(0,a.w)((0,a.a)("string",e)&&n instanceof C).throw(a.s.invalidParameters),this._manager.addHandler(e,n)},n.prototype.removeGroupChannelHandler=function(e){(0,a.w)((0,a.a)("string",e)).throw(a.s.invalidParameters),this._manager.removeHandler(e)},n.prototype.removeAllGroupChannelHandlers=function(){this._manager.clearHandler()},n.prototype.buildGroupChannelFromSerializedData=function(e){return this._manager.buildGroupChannelFromSerializedData(e)},n.prototype.buildGroupChannelListQueryFromSerializedData=function(e){return this._manager.buildGroupChannelListQueryFromSerializedData(e)},n.prototype.buildMemberFromSerializedData=function(e){return this._manager.buildMemberFromSerializedData(e)},n.prototype.getChannel=function(e){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(n){return(0,a.w)((0,a.a)("string",e)).throw(a.s.invalidParameters),[2,this._manager.getChannel(e)]})})}
1,n.prototype.getChannelWithoutCache=function(e){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(n){return(0,a.w)((0,a.a)("string",e)).throw(a.s.invalidParameters),[2,this._manager.getChannelWithoutCache(e)]})})},n.prototype.getMyGroupChannelChangeLogsByToken=function(e,n){return void 0===n&&(n={}),(0,a._)(this,void 0,void 0,function(){var t;return(0,a.b)(this,function(r){switch(r.label){case 0:return t=(0,a.g)((0,a.g)({},o.e),n),(0,a.w)((0,a.a)("string",e)&&(0,o.v)(t)).throw(a.s.invalidParameters),[4,this._manager.getMyGroupChannelChangeLogs(e,t)];case 1:return[2,r.sent()]}})})},n.prototype.getMyGroupChannelChangeLogsByTimestamp=function(e,n){return void 0===n&&(n={}),(0,a._)(this,void 0,void 0,function(){var t;return(0,a.b)(this,function(r){switch(r.label){case 0:return t=(0,a.g)((0,a.g)({},o.e),n),(0,a.w)((0,a.a)("number",e)&&(0,o.v)(t)).throw(a.s.invalidParameters),[4,this._manager.getMyGroupChannelChangeLogs(e,t)];case 1:return[2,r.sent()]}})})},n.prototype.getGroupChannelCount=function(e){return(0,a._)(this,void 0,void 0,function(){var n;return(0,a.b)(this,function(t){return n=(0,a.g)((0,a.g)({},o.f),e),(0,a.w)((0,o.g)(n)).throw(a.s.invalidParameters),[2,this._manager.getGroupChannelCount(n)]})})},n.prototype.getUnreadItemCount=function(e){return void 0===e&&(e={}),(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(n){switch(n.label){case 0:return[4,this._manager.getUnreadItemCount(e)];case 1:return[2,n.sent()]}})})},n.prototype.getTotalUnreadChannelCount=function(){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){switch(e.label){case 0:return[4,this._manager.getTotalUnreadChannelCount()];case 1:return[2,e.sent()]}})})},n.prototype.getTotalUnreadMessageCount=function(e){return void 0===e&&(e={}),(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(n){switch(n.label){case 0:return[4,this._manager.getTotalUnreadMessageCount(e)];case 1:return[2,n.sent()]}})})},n.prototype.getTotalScheduledMessageCount=function(e){return void 0===e&&(e={}),(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(n){switch(n.label){case 0:return[4,this._manager.getTotalScheduledMessageCount(e)];case 1:return[2,n.sent()]}})})},n.prototype.getSubscribedTotalUnreadMessageCount=function(){return this._manager.getSubscribedTotalUnreadMessageCount()}
1,n.prototype.getSubscribedCustomTypeTotalUnreadMessageCount=function(){return this._manager.getSubscribedCustomTypeTotalUnreadMessageCount()},n.prototype.getSubscribedCustomTypeUnreadMessageCount=function(e){return this._manager.getSubscribedCustomTypeUnreadMessageCount(e)},n.prototype.createChannel=function(e){return void 0===e&&(e={}),(0,a._)(this,void 0,void 0,function(){var n;return(0,a.b)(this,function(t){return n=(0,a.g)((0,a.g)({},o.h),e),(0,a.w)((0,o.i)(n)).throw(a.s.invalidParameters),[2,this._manager.createChannel(n)]})})},n.prototype.createDistinctChannelIfNotExist=function(e){return void 0===e&&(e={}),(0,a._)(this,void 0,void 0,function(){var n;return(0,a.b)(this,function(t){return n=(0,a.g)((0,a.g)({},o.h),e),(0,a.w)((0,o.i)(n)).throw(a.s.invalidParameters),n&&(n.isDistinct=!0),[2,this.createChannel(n)]})})},n.prototype.createChannelWithUserIds=function(e,n,t,r,i,l){return void 0===n&&(n=!1),void 0===i&&(i=""),void 0===l&&(l=""),(0,a._)(this,void 0,void 0,function(){var s;return(0,a.b)(this,function(u){return s=(0,a.g)((0,a.g)({},o.h),{invitedUserIds:e,isDistinct:n,name:t,data:i,customType:l}),"string"==typeof r?s.coverUrl=r:s.coverImage=r,[2,this.createChannel(s)]})})},n.prototype.markAsReadAll=function(){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){return this._manager.markAsReadAll(),[2]})})},n.prototype.markAsReadWithChannelUrls=function(e){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(n){return(0,a.w)((0,a.Q)("string",e)).throw(a.s.invalidParameters),this._manager.markAsReadWithChannelUrls(e),[2]})})},n.prototype.markAsDelivered=function(e){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(n){switch(n.label){case 0:return(0,a.w)((0,a.a)("string",e)).throw(a.s.invalidParameters),[4,this.getChannel(e)];case 1:return[4,n.sent().markAsDelivered()];case 2:return n.sent(),[2]}})})},n}(a.a_)},51947:function(e,n,t){"use strict";t.d(n,{W8:function(){return c},ZP:function(){return eM}});var r=t(36614),i=t(4500),a=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.name="poll",n}return(0,r.c)(n,e),n.prototype.init=function(n,t){var i=t.sdkState,a=t.dispatcher,o=t.sessionManager,l=t.requestQueue,s=t.logger,u=t.onlineDetector,c=t.cacheContext;e.prototype.init.call(this,n,{sdkState:i,dispatcher:a,sessionManager:o,requestQueue:l,logger:s,onlineDetector:u,cacheContext:c}),this._manager=new r.aN(n,{sdkState:i,dispatcher:a,sessionManager:o,requestQueue:l,logger:s,onlineDetector:u,cacheContext:c})},n.prototype.create=function(e){return(0,r._)(this,void 0,void 0,function(){var n;return(0,r.b)(this,function(t){return n=(0,r.g)((0,r.g)({},r.b0),e),(0,r.w)((0,r.b1)(n)).throw(r.s.invalidParameters),[2,this._manager.create(n)]})})},n.prototype.get=function(e){return(0,r._)(this,void 0,void 0,function(){var n;return(0,r.b)(this,function(t){return n=(0,r.g)((0,r.g)({},r.b2),e),(0,r.w)((0,r.b3)(n)).throw(r.s.invalidParameters),[2,this._manager.get(n)]})})},n.prototype.getOption=function(e){return(0,r._)(this,void 0,void 0,function(){var n;return(0,r.b)(this,function(t){return n=(0,r.g)((0,r.g)({},r.b4),e),(0,r.w)((0,r.b5)(n)).throw(r.s.invalidParameters),[2,this._manager.getOption(n)]})})},n.prototype.buildPollFromSerializedData=function(e){return this._manager.buildPollFromSerializedData(e)},n}(r.a_),o=t(77522),l=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,r.c)(n,e),n}(r.b8),s=function(e){this.key=e.key,this.url=e.url},u=function(e){this.id=e.id,this.name=e.name,this.url=e.url,this.emojis=e.emojis?e.emojis.map(function(e){return new s(e)}):[]},c=function(e){this.emojiHash=e.emoji_hash||"",this.emojiCategories=e.emoji_categories?e.emoji_categories.map(function(e){return new u(e)}):[]},d={profileImage:void 0,profileUrl:void 0,nickname:void 0},h=function(e){return function(n,t){return(0,r._)(void 0,void 0,void 0,function(){var a,l,s,u;return(0,r.b)(this,function(c){switch(c.label){case 0:switch(n){case 1:case 2:case 3:case 4:return[3,1];case 5:return[3,2];case 6:return[3,4]}return[3,11];case 1:case 10:return t(),[3,12];case 2:return[4,e.reset()];case 3:return c.sent(),t(),[3,12];case 4:return c.trys.push([4,9,,10]),l=(a={v2:function(){return(0,r._)(void 0,void 0,void 0,function(){return(0,r.b)(this,function(n){switch(n.label){case 0:return[4,e.commitSchema([{collectionName:i.a,keyName:i.b,index:[(0,o.g)(o.G.LATEST_LAST_MESSAGE),(0,o.g)(o.G.CHRONOLOGICAL),(0,o.g)(o.G.CHANNEL_NAME_ALPHABETICAL)]},{collectionName:i.N,keyName:i.c,index:[(0,i.g)(i.M.CHANNEL_LATEST),(0,i.g)(i.M.NEWEST_CHILD_MESSAGE)]},{collectionName:i.d,keyName:i.e,index:[(0,i.g)(i.M.CHANNEL_LATEST),(0,i.g)(i.M.NEWEST_CHILD_MESSAGE)]},{collectionName:i.f,keyName:i.h}])];case 1:return[2,n.sent()]}})})},v3:function(){return(0,r._)(void 0,void 0,void 0,function(){return(0,r.b)(this,function(n){switch(n.label){case 0:return[4,e.commitSchema([{collectionName:i.i,keyName:i.j,index:[["-lastMessageUpdatedAt","-createdAt","syncIndex"]]}])];case 1:return[2,n.sent()]}})})},v4:function(){return(0,r._)(void 0,void 0,void 0,function(){return(0,r.b)(this,function(n){switch(n.label){case 0:return[4,e.commitSchema([{collectionName:i.k,keyName:i.l,index:[(0,i.m)()]}])];case 1:return[2,n.sent()]}})})}}).v2,s=a.v3,u=a.v4,[4,l()];case 5:return c.sent(),[4,s()];case 6:return c.sent(),[4,u()];case 7:return c.sent(),[4,e.collection(i.N).removeIf({where:{channelType:r.C.OPEN}})];case 8:case 9:return c.sent(),[3,10];case 11:t(),c.label=12;case 12:return[2]}})})}},f=function(){return"undefined"!=typeof document?document.visibilityState:"visible"},m=function(e){function n(n){var t=n.getVisibilityState,r=n.initialState,i=n.isEnabled,a=n.pauseCheckDelay,o=e.call(this)||this;return o._pauseCheckDelay=3e4,o._currentState="visible",o._getVisibilityState=void 0===t?f:t,o._pauseCheckDelay=void 0===a?3e4:a,o._currentState=void 0===r?"visible":r,o._isEnabled=void 0===i||i,o._boundToggleState=o._toggleState.bind(o),o}return(0,r.c)(n,e),Object.defineProperty(n.prototype,"currentState",{get:function(){return this._currentState}
1,enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isAvailable",{get:function(){return"undefined"!=typeof window&&!!window.addEventListener&&!!window.removeEventListener},enumerable:!1,configurable:!0}),n.prototype._toggleState=function(){var e=this,n=this._getVisibilityState();"hidden"!==n?"hidden"===this._currentState&&(this._pauseDelayTimer&&(clearTimeout(this._pauseDelayTimer),this._pauseDelayTimer=void 0),this.dispatch("resume")):"hidden"!==this._currentState&&(this._pauseDelayTimer=setTimeout(function(){e._pauseDelayTimer=void 0,e.dispatch("pause")},this._pauseCheckDelay)),this._currentState=n},n.prototype.start=function(){this._isEnabled&&this.isAvailable&&(this._boundToggleState=this._toggleState.bind(this),window.addEventListener("visibilitychange",this._boundToggleState,{capture:!0}))},n.prototype.stop=function(){this._isEnabled&&this.isAvailable&&this._boundToggleState&&window.removeEventListener("visibilitychange",this._boundToggleState,{capture:!0})},n}(r.E),v=function(){function e(e){var n=e.logger,t=e.connectionDelegate,r=void 0===t?null:t,i=this;this._onlineWorker=function(){var e;return null===(e=i.connectionDelegate)||void 0===e?void 0:e.reconnect()},this._offlineWorker=function(){var e;return null===(e=i.connectionDelegate)||void 0===e?void 0:e.disconnect()},this.unsubscribes=[],this._onlineListener=function(e){if(i.isAvailableOnWeb)return window.addEventListener("online",e),function(){return window.removeEventListener("online",e,!1)}},this._offlineListener=function(e){if(i.isAvailableOnWeb)return window.addEventListener("offline",e),function(){return window.removeEventListener("offline",e,!1)}},this.logger=n,r&&(this.connectionDelegate=r)}return Object.defineProperty(e.prototype,"isAvailableOnWeb",{get:function(){return"undefined"!=typeof window&&!!window.addEventListener&&"ononline"in window&&"onoffline"in window&&"undefined"!=typeof navigator&&void 0!==navigator.onLine},enumerable:!1,configurable:!0}),e.prototype.setOnlineListener=function(e){e&&"function"==typeof e&&(this._onlineListener=e)},e.prototype.setOfflineListener=function(e){e&&"function"==typeof e&&(this._offlineListener=e)},e.prototype.start=function(){this.unsubscribes=[this._onlineListener(this._onlineWorker),this._offlineListener(this._offlineWorker)]},e.prototype.stop=function(){var e=this;this.unsubscribes.forEach(function(n){try{null==n||n()}catch(n){e.logger.warn(n.message)}}),this.unsubscribes=[]},e.prototype.isOnline=function(){return(0,r._)(this,void 0,void 0,function(){return(0,r.b)(this,function(e){return this.isAvailableOnWeb?[2,navigator.onLine]:[2,new Promise(function(e){fetch("https://www.google.com",{method:r.A.GET,mode:"no-cors"}).then(function(){return e(!0)}).catch(function(){return e(!1)})})]})})},e}(),p=function(e){function n(n){var t=n.userId,i=n.nickname,a=n.profileUrl,o=n.profileImage,l=n.preferredLanguages,s=e.call(this)||this;return s.method=r.A.PUT,s.path="".concat(r.d,"/").concat(encodeURIComponent(t)),s.params=(0,r.e)((0,r.u)({nickname:i,profile_url:a,profile_file:o,preferred_languages:l})),s}return(0,r.c)(n,e),n}(r.f),g=function(e){function n(n,t){var i=e.call(this,n,t)||this;return i.user=new r.U(n,(0,r.g)({},t)),i}return(0,r.c)(n,e),n}(r.h),_=function(e){function n(n){var t=n.userId,i=n.token,a=n.deviceOS,o=n.deviceManufacturer,l=n.systemPushEnabled,s=e.call(this)||this;return s.method=r.A.POST,s.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push/apns"),s.params=(0,r.e)({apns_device_token:i,always_push:!0,device_os:a,device_manufacturer:o,system_push_enabled:l}),s}return(0,r.c)(n,e),n}(r.f);ea=r.h,(0,r.c)(function(e,n){var t=ea.call(this,e,n)||this;return t.token=n.token,t.type=n.type?r.P[n.type.toLowerCase()]:r.P.UNKNOWN,t.user=new r.U(e,n.user),t},ea);var E=function(e){function n(n){var t=n.userId,i=n.token,a=n.deviceOS,o=n.deviceManufacturer,l=n.systemPushEnabled,s=e.call(this)||this;return s.method=r.A.POST,s.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push/gcm"),s.params=(0,r.e)({gcm_reg_token:i,always_push:!0,device_os:a,device_manufacturer:o,system_push_enabled:l}),s}return(0,r.c)(n,e),n}(r.f);eo=r.h,(0,r.c)(function(e,n){var t=eo.call(this,e,n)||this;return t.token=n.token,t.type=n.type?r.P[n.type.toLowerCase()]:r.P.UNKNOWN,t.user=new r.U(e,n.user),t},eo);var b=function(e){function n(n){var t=n.userId,i=n.token,a=e.call(this)||this;return a.method=r.A.DELETE,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push/apns/").concat(encodeURIComponent(i)),a}return(0,r.c)(n,e),n}(r.f);el=r.h,(0,r.c)(function(e,n){var t=el.call(this,e,n)||this;return t.token=n.token,t.user=new r.U(e,n.user),t.lastDeletedAt=n.device_token_last_deleted_at,t},el);var C=function(e){function n(n){var t=n.userId,i=n.token,a=e.call(this)||this;return a.method=r.A.DELETE,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push/gcm/").concat(encodeURIComponent(i)),a}return(0,r.c)(n,e),n}(r.f);es=r.h,(0,r.c)(function(e,n){var t=es.call(this,e,n)||this;return t.token=n.token,t.user=new r.U(e,n.user),t.lastDeletedAt=n.device_token_last_deleted_at,t},es);var y=function(e){function n(n){var t=n.userId,i=e.call(this)||this;return i.method=r.A.DELETE,i.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push/apns"),i}return(0,r.c)(n,e),n}(r.f);eu=r.h,(0,r.c)(function(e,n){var t=eu.call(this,e,n)||this;return t.type=n.type?r.P[n.type.toLowerCase()]:r.P.UNKNOWN,t.user=new r.U(e,n.user),t.lastDeletedAt=n.device_token_last_deleted_at,t},eu);var N=function(e){function n(n){var t=n.userId,i=e.call(this)||this;return i.method=r.A.DELETE,i.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push/gcm"),i}return(0,r.c)(n,e),n}(r.f);ec=r.h,(0,r.c)(function(e,n){var t=ec.call(this,e,n)||this;return t.type=n.type?r.P[n.type.toLowerCase()]:r.P.UNKNOWN,t.user=new r.U(e,n.user),t.lastDeletedAt=n.device_token_last_deleted_at,t},ec);var T=function(e){function n(n){var t=n.userId,i=n.type,a=n.token,o=n.ts,l=e.call(this)||this;return l.method=r.A.GET,l.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push/").concat(encodeURIComponent(i),"/device_tokens"),l.params={created_ts:o,token:a},l}return(0,r.c)(n,e),n}(r.f),S=function(e){function n(n,t){var i=e.call(this,n,t)||this;return i.pushTokens={type:t.type?r.P[t.type.toLowerCase()]:r.P.UNKNOWN,deviceTokens:t.device_tokens,hasMore:t.has_more,token:t.token},i}return(0,r.c)(n,e),n}(r.h),A=function(e){function n(n){var t=n.userId,i=e.call(this)||this;return i.method=r.A.GET,i.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/channel_invitation_preference"),i}return(0,r.c)(n,e),n}(r.f),I=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.autoAccept=t.auto_accept,r}return(0,r.c)(n,e),n}(r.h),M=function(e){function n(n){var t=n.userId,i=n.willAutoAccept,a=e.call(this)||this;return a.method=r.A.PUT,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/channel_invitation_preference"),a.params={auto_accept:i},a}return(0,r.c)(n,e),n}(r.f),O=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.autoAccept=t.auto_accept,r}return(0,r.c)(n,e),n}(r.h),R=function(e){function n(n){var t=n.userId,i=e.call(this)||this;return i.method=r.A.GET,i.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push_preference"),i}return(0,r.c)(n,e),n}(r.f),w=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.preference={doNotDisturbOn:t.do_not_disturb,startHour:t.start_hour,startMin:t.start_min,endHour:t.end_hour,endMin:t.end_min,timezone:t.timezone},r}return(0,r.c)(n,e),n}(r.h),D=function(e){function n(n){var t=n.userId,i=n.doNotDisturbOn,a=n.startHour,o=n.startMin,l=n.endHour,s=n.endMin,u=n.timezone,c=e.call(this)||this;return c.method=r.A.PUT,c.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push_preference"),c.params={do_n
1ot_disturb:i,start_hour:a,start_min:o,end_hour:l,end_min:s,timezone:u},c}return(0,r.c)(n,e),n}(r.f),L=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.preference={doNotDisturbOn:t.do_not_disturb,startHour:t.start_hour,startMin:t.start_min,endHour:t.end_hour,endMin:t.end_min,timezone:t.timezone},r}return(0,r.c)(n,e),n}(r.h),P=function(e){function n(n){var t=n.userId,i=e.call(this)||this;return i.method=r.A.GET,i.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push_preference"),i}return(0,r.c)(n,e),n}(r.f),U=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.snoozePeriod={isSnoozeOn:t.snooze_enabled},"number"==typeof t.snooze_start_ts&&(r.snoozePeriod.startTs=t.snooze_start_ts),"number"==typeof t.snooze_end_ts&&(r.snoozePeriod.endTs=t.snooze_end_ts),r}return(0,r.c)(n,e),n}(r.h),x=function(e){function n(n){var t=n.userId,i=n.snoozeOn,a=n.startTs,o=n.endTs,l=e.call(this)||this;return l.method=r.A.PUT,l.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push_preference"),l.params={snooze_enabled:i,snooze_start_ts:a,snooze_end_ts:o},l}return(0,r.c)(n,e),n}(r.f),k=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.snoozePeriod={isSnoozeOn:t.snooze_enabled},"number"==typeof t.snooze_start_ts&&(r.snoozePeriod.startTs=t.snooze_start_ts),"number"==typeof t.snooze_end_ts&&(r.snoozePeriod.endTs=t.snooze_end_ts),r}return(0,r.c)(n,e),n}(r.h),F=function(e){function n(n){var t=n.userId,i=n.blockedUserId,a=e.call(this)||this;return a.method=r.A.POST,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/block"),a.params={target_id:i},a}return(0,r.c)(n,e),n}(r.f);ed=r.h,(0,r.c)(function(e,n){var t=ed.call(this,e,n)||this;return t.user=new r.U(e,n),t},ed);var G=function(e){function n(n){var t=n.userId,i=n.unblockedUserId,a=e.call(this)||this;return a.method=r.A.DELETE,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/block/").concat(encodeURIComponent(i)),a}return(0,r.c)(n,e),n}(r.f);eh=r.h,(0,r.c)(function(){return null!==eh&&eh.apply(this,arguments)||this},eh);var B=function(e){function n(n){var t=n.userId,i=e.call(this)||this;return i.method=r.A.GET,i.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push_preference"),i}return(0,r.c)(n,e),n}(r.f),H=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.pushTriggerOption=t.push_trigger_option,r}return(0,r.c)(n,e),n}(r.h),V=function(e){function n(n){var t=n.userId,i=n.pushTriggerOption,a=e.call(this)||this;return a.method=r.A.PUT,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push_preference"),a.params={push_trigger_option:i},a}return(0,r.c)(n,e),n}(r.f),j=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.pushTriggerOption=t.push_trigger_option,r}return(0,r.c)(n,e),n}(r.h),z=function(e){function n(n){var t=n.userId,i=e.call(this)||this;return i.method=r.A.GET,i.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push/template"),i}return(0,r.c)(n,e),n}(r.f),K=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.name=t.name,r}return(0,r.c)(n,e),n}(r.h),Y=function(e){function n(n){var t=n.userId,i=n.templateName,a=e.call(this)||this;return a.method=r.A.PUT,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/push/template"),a.params={name:i},a}return(0,r.c)(n,e),n}(r.f),Z=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.name=t.name,r}return(0,r.c)(n,e),n}(r.h),Q=function(e){function n(n){var t=n.userId,i=n.token,a=e.call(this)||this;return a.method=r.A.GET,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/friends/changelogs"),a.params={token:i},a}return(0,r.c)(n,e),n}(r.f),W=function(e){function n(n,t){var i=e.call(this,n,t)||this;return i.changelogs={addedUsers:t.added.map(function(e){return new r.U(n,e)}),updatedUsers:t.updated.map(function(e){return new r.U(n,e)}),deletedUserIds:t.deleted,hasMore:t.has_more,token:t.next},i}return(0,r.c)(n,e),n}(r.h),q=function(e){function n(n){var t=n.userId,i=n.discoveries,a=e.call(this)||this;return a.method=r.A.PUT,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/friend_discoveries"),a.params={friend_discoveries:i.map(function(e){return{friend_discovery_key:e.friendDiscoveryKey,friend_name:e.friendName}})},a}return(0,r.c)(n,e),n}(r.f),X=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.friendDiscoveryRequestId=t.friend_discovery_request_id,r}return(0,r.c)(n,e),n}(r.h),$=function(e){function n(n){var t=n.userId,i=n.discoveryKeys,a=e.call(this)||this;return a.method=r.A.DELETE,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/friend_discoveries"),a.params={friend_discovery_keys:i},a}return(0,r.c)(n,e),n}(r.f);ef=r.h,(0,r.c)(function(){return null!==ef&&ef.apply(this,arguments)||this},ef);var J=function(e){function n(n){var t=n.userId,i=n.userIds,a=e.call(this)||this;return a.method=r.A.POST,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/friends"),a.params={user_ids:i},a}return(0,r.c)(n,e),n}(r.f),ee=function(e){function n(n,t){var i=e.call(this,n,t)||this;return i.users=t.users.map(function(e){return new r.U(n,e)}),i}return(0,r.c)(n,e),n}(r.h),en=function(e){function n(n){var t=n.userId,i=n.userIds,a=e.call(this)||this;return a.method=r.A.DELETE,a.path="".concat(r.d,"/").concat(encodeURIComponent(t),"/friends"),a.params={user_ids:i},a}return(0,r.c)(n,e),n}(r.f);em=r.h,(0,r.c)(function(){return null!==em&&em.apply(this,arguments)||this},em);var et=function(e){function n(n){var t=n.userId,i=e.call(this)||this;return i.method=r.A.GET,i.path="".concat(r.d,"/").concat(t,"/allow_friend_discovery"),i.params={},i}return(0,r.c)(n,e),n}(r.f),er=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.allowFriendDiscovery=t.allow_friend_discovery,r}return(0,r.c)(n,e),n}(r.h),ei=function(e){function n(n){var t=n.userId,i=n.allowFriendDiscovery,a=e.call(this)||this;return a.method=r.A.PUT,a.path="".concat(r.d,"/").concat(t,"/allow_friend_discovery"),a.params={allow_friend_discovery:i},a}return(0,r.c)(n,e),n}(r.f);ev=r.h,(0,r.c)(function(){return null!==ev&&ev.apply(this,arguments)||this},ev);var ea,eo,el,es,eu,ec,ed,eh,ef,em,ev,ep,eg=function(e){function n(){var n=e.call(this)||this;return n.method=r.A.GET,n.path=r.j,n}return(0,r.c)(n,e),n}(r.f),e_=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.emojiContainer=new c(t),r}return(0,r.c)(n,e),n}(r.h),eE=function(e){function n(n){var t=n.categoryId,i=e.call(this)||this;return i.method=r.A.GET,i.path="".concat(r.j,"/").concat(t),i}return(0,r.c)(n,e),n}(r.f),eb=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.emojiCategory=new u(t),r}return(0,r.c)(n,e),n}(r.h),eC=function(e){function n(n){var t=n.key,i=e.call(this)||this;return i.method=r.A.GET,i.path="".concat(r.k,"/").concat(t),i}return(0,r.c)(n,e),n}(r.f),ey=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.emoji=new s(t),r}return(0,r.c)(n,e),n}(r.h),eN=function(e){function n(){var n=e.call(this)||this;return n.method=r.A.GET,n.path="".concat(r.l),n}return(0,r.c)(n,e),n}(r.f),eT=function(e){function n(n,t){var r,i=this,a=null!=t?t:{};return(i=e.call(this,n,t)||this).uikitConfiguration={string:JSON.stringify(a),json:a},i.updatedAt=null!==(r=null==t?void 0:t.updated_at)&&void 0!==r?r:0,i}return(0,r.c)(n,e),n}(r.h);(eS=ep||(ep={})).DELIVERED="DELIVERED",eS.CLICKED="CLICKED";var eS,eA,eI=function(e){function n(n){var t=n.deviceToken,i=n.pushTrackingId,a=n.messageId,o=n.allowedPushNotification,l=n.channelKe
1y,s=n.templateKey,u=n.eventType,c=n.notificationEventDeadline,d=e.call(this)||this;return d.method=r.A.POST,d.path=r.m,d.params=(0,r.e)({device_token:t,push_tracking_id:i,message_id:a,allowed_push_notification:o,channel_key:l,template_key:s,event_type:u,notification_event_deadline:c}),d}return(0,r.c)(n,e),n}(r.f),eM=function(){function e(e,n,t){var i=this;this._storeInitialized=!1,this._iid=e,this.options=n;var a=r.V.of(e),s=a.sdkState,u=a.cacheContext,c=a.dispatcher,d=a.sessionManager,h=a.requestQueue,f=a.logger,p=a.userEventHandlers,g=a.appStateToggleEnabled;this._onlineDetector=new v({logger:f,connectionDelegate:{reconnect:function(){return(0,r._)(i,void 0,void 0,function(){var n,t,i,a,o,s;return(0,r.b)(this,function(u){switch(u.label){case 0:if(t=(n=r.V.of(e)).sdkState,i=n.connectionManager,(a=n.sessionManager).session.hasSession)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,i.connect(a.session.authToken)];case 2:return u.sent(),[3,4];case 3:if(o=u.sent(),(0,r.O)(o))throw o;return f.debug("connect failed by reconnect event = ",o),[3,4];case 4:return[3,9];case 5:if("foreground"!==t.appState)return[3,9];u.label=6;case 6:return u.trys.push([6,8,,9]),[4,i.resetAndReconnect()];case 7:return u.sent(),[3,9];case 8:if(s=u.sent(),(0,r.O)(s))throw s;return f.debug("resetAndReconnect failed by reconnect event = ",s),[3,9];case 9:return c.dispatch(new l),[2]}})})},disconnect:function(){(0,r.B)(function(){return(0,r._)(i,void 0,void 0,function(){return(0,r.b)(this,function(n){switch(n.label){case 0:return[4,r.V.of(e).connectionManager.disconnect()];case 1:return n.sent(),[2]}})})})}}});var _=new o.A(e,{localCacheEnabled:u.localCacheEnabled,enableAutoResend:u.localCacheConfig.enableAutoResend,dispatcher:c,sdkState:s,logger:f});t.forEach(function(n){n.init(e,{sdkState:s,cacheContext:u,dispatcher:c,sessionManager:d,requestQueue:h,logger:f,onlineDetector:i._onlineDetector}),i[n.name]=n}),this._appStateChangeDetector=new m({isEnabled:g}),this._appStateChangeDetector.on("resume",function(){f.debug("the page resumes from freeze"),i.setForegroundState()}).on("pause",function(){f.debug("the page freezes"),i.setBackgroundState()}),c.on(function(n){var t;if(n instanceof r.D)n.stateType===r.F.CONNECTED&&_.processNonAutoResendRegisteredPendingMessages();else if(n instanceof r.W){if("USEV"===n.code){var a=n.as(o.U).event;if(a.category===o.a.FRIEND_DISCOVERED){var l=o.b.getDataAsFriendDiscoveredEvent(e,a).friendDiscoveries;(0,r.G)(function(){return(0,r._)(i,void 0,void 0,function(){return(0,r.b)(this,function(e){return[2,p.forEach(function(e){e.onFriendsDiscovered&&e.onFriendsDiscovered(l)})]})})})}}}else if(n instanceof r.H){var c=r.V.of(i._iid).subscribedUnreadMessageCount,d=!1,h=n.ts;"number"==typeof h&&h>c.ts&&(c.all!==n.all&&(d=!0),c.all=n.all>=0?n.all:0,n.customTypes&&Object.keys(n.customTypes).forEach(function(e){c.customTypes[e]!==n.customTypes[e]&&(d=!0),c.customTypes[e]=n.customTypes[e]}),d=d&&c.ts>0,c.ts=h),d&&(0,r.G)(function(){return(0,r._)(i,void 0,void 0,function(){return(0,r.b)(this,function(e){return[2,p.forEach(function(e){e.onTotalUnreadMessageCountChanged&&e.onTotalUnreadMessageCountChanged({groupChannelCount:c.all,feedChannelCount:c.feed,customTypeUnreadCount:c.customTypes}),e.onTotalUnreadMessageCountUpdated&&e.onTotalUnreadMessageCountUpdated(c.all,c.customTypes)})]})})})}else n instanceof r.I?(u.preference.set(i._getUserProfileCacheKey(s.userId),r.J.payloadify(n.userProfile)),(null===(t=n.userProfile.appInfo.notificationInfo)||void 0===t?void 0:t.isEnabled)&&u.preference.set((0,r.K)(i.appId),{value:!0})):n instanceof r.M&&n.error&&n.error.isSessionInvalidatedError&&(f.debug("session revoked."),i._internalDisconnect(n.error))})}return e.init=function(n){var t=n.appId,o=n.appVersion,l=n.modules,s=n.options,u=void 0===s?new r.S:s,c=n.debugMode,d=void 0!==c&&c,h=n.customApiHost,f=n.customWebSocketHost,m=n.newInstance,v=n.logLevel,p=n.localCacheEnabled,g=n.localCacheConfig,_=void 0===g?new r.L:g,E=n.localCacheEncryption,b=n.useAsyncStorageStore,C=void 0===b?null:b,y=n.useMMKVStorageStore,N=void 0===y?null:y,T=n.appStateToggleEnabled;if(!eA||void 0!==m&&m){var S="su-".concat((0,r.n)()),A=null!=E?E:{encrypt:function(e){return e},decrypt:function(e){return e}},I=new i.L;I.level=null!=v?v:i.n.WARN;var M=new i.o({encryption:A});d||((0,r.o)()?N?M=new i.p({MMKV:N,encryption:A}):C&&(M=new i.A({AsyncStorage:C,encryption:A}),I.warn("AsyncStorage store is deprecated due to the small size limit. Please use MMKVStorage store instead.")):M=new i.I({encryption:A}
1)),new r.V(S,{appId:t,appVersion:o,options:u,apiHost:null!=h?h:"https://api-".concat(t,".sendbird.com"),websocketHost:null!=f?f:"wss://ws-".concat(t,".sendbird.com"),store:M,encryption:A,logger:I,localCacheEnabled:void 0!==p&&p,localCacheConfig:_,debugMode:d,appStateToggleEnabled:void 0===T||T});var O=[new i.q,new a],R=new e(S,u,(0,r.p)((0,r.p)([],(0,r.q)(void 0===l?[]:l),!1),(0,r.q)(O),!1));return eA||(eA=R),R}return eA},Object.defineProperty(e,"instance",{get:function(){return eA},enumerable:!1,configurable:!0}),Object.defineProperty(e,"version",{get:function(){return r.v},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"appId",{get:function(){return r.V.of(this._iid).sdkState.appId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"appInfo",{get:function(){var e=r.V.of(this._iid).appInfo;return null!=e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"appVersion",{get:function(){var e;return null!==(e=r.V.of(this._iid).sdkState.appVersion)&&void 0!==e?e:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"debugMode",{get:function(){return!!r.V.of(this._iid).debugMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logLevel",{get:function(){return r.V.of(this._iid).logger.level},set:function(e){r.V.of(this._iid).logger.level=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCacheEnabled",{get:function(){return r.V.of(this._iid).cacheContext.localCacheEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localCacheConfig",{get:function(){var e=r.V.of(this._iid).cacheContext;return e.localCacheEnabled?e.localCacheConfig:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ekey",{get:function(){return r.V.of(this._iid).sessionManager.ekey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentUser",{get:function(){var e;return null!==(e=r.V.of(this._iid).sessionManager.currentUser)&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"connectionState",{get:function(){var e=r.V.of(this._iid).connectionManager;return e.isConnected?r.r.OPEN:e.isConnecting?r.r.CONNECTING:r.r.CLOSED},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastConnectedAt",{get:function(){var e=r.V.of(this._iid),n=e.connectedAt;return e.connectionManager.isConnected?n:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fcmPushToken",{get:function(){var e;return null!==(e=this._fcmPushToken)&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apnsPushToken",{get:function(){var e;return null!==(e=this._apnsPushToken)&&void 0!==e?e:null},enumerable:!1,configurable:!0}),e.prototype._getNestDBVersion=function(){return 7},e.prototype._getPreferenceCacheKey=function(e){return"sendbird@".concat(this.appId,"/").concat(e,".pref")},e.prototype._getUserProfileCacheKey=function(e){return"sendbird@".concat(this.appId,"/").concat(e,".profile")},e.prototype._internalDisconnect=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return t=(n=r.V.of(this._iid)).connectionManager,i=n.sdkState,a=n.requestQueue,this._appStateChangeDetector.stop(),this._onlineDetector.stop(),a.cancelAll(),[4,t.logout(e)];case 1:return o.sent(),[4,this.clearCachedData()];case 2:return o.sent(),i.appState="foreground",[2]}})})},e.prototype.getMemoryStoreForDebugging=function(){var e=r.V.of(this._iid),n=e.debugMode,t=e.cac
1heContext;if(n)return t.store instanceof i.o?t.store:null;throw r.s.debugModeRequired},e.prototype.addExtension=function(e,n){var t=r.V.of(this._iid).sdkState;["sb_uikit","sb_syncmanager","device-os-platform"].indexOf(e)>-1&&t.extensions&&(t.extensions[e]=n)},e.prototype.addSendbirdExtensions=function(e,n,t){var i,a,o=r.V.of(this._iid),l=o.logger,s=o.sdkState,u=new RegExp(r.N);if(0===e.length)return l.debug("sb.addSendbirdExtensions() has failed because the given sendbirdExtensions is empty."),!1;if(e.find(function(e){return!u.test(e.version)}))return l.debug("sb.addSendbirdExtensions() has failed because the given version did not satisfy the SemVer specification."),!1;if(t)try{for(var c=(0,r.t)(Object.entries(t)),d=c.next();!d.done;d=c.next()){var h=(0,r.q)(d.value,2),f=h[0],m=h[1];if(/&|=/.test(f)||/&|=/.test(m))return l.debug("sb.addSendbirdExtensions() has failed because the given customData includes at least one invalid character: = or &."),!1}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}return s.sendbirdRuntimeEnvironment={sendbirdExtensions:e,deviceOS:n,customData:t},!0},e.prototype.setOnlineListener=function(e){this._onlineDetector.setOnlineListener(e)},e.prototype.setOfflineListener=function(e){this._onlineDetector.setOfflineListener(e)},e.prototype._safeInitializeStore=function(e){return(0,r._)(this,void 0,void 0,function(){var n;return(0,r.b)(this,function(t){switch(t.label){case 0:n=r.V.of(this._iid).cacheContext,t.label=1;case 1:return t.trys.push([1,3,,5]),[4,n.store.init(e)];case 2:return t.sent(),this._storeInitialized=!0,[3,5];case 3:return t.sent(),n.replaceStore(new i.o),[4,this._safeInitializeStore(e)];case 4:return t.sent(),[3,5];case 5:return[2]}})})},e.prototype.setLocaleForChatbot=function(e){var n=r.V.of(this._iid).sdkState,t=e.trim().replace(/[^a-zA-Z-_.]/g,"");t&&(n.localeForChatbot=t)},e.prototype.initializeCache=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,a,l,s,u,c,d,f;return(0,r.b)(this,function(m){switch(m.label){case 0:if(t=(n=r.V.of(this._iid)).sdkState,a=n.cacheContext,l=n.dispatcher,s=n.logger,t.userId&&t.userId===e)return[3,13];u="sendbird@".concat(t.appId,"/").concat(e,".db"),m.label=1;case 1:return m.trys.push([1,9,11,13]),a.localCacheEnabled?a.nestdb&&a.nestdb.state!==i.v.CLOSED&&a.nestdb.name===u?[3,3]:(c="sendbird@".concat(t.appId,"/").concat(e,".db"),(d=a.nestdb=new i.w({name:c,version:this._getNestDBVersion(),store:a.store,config:new i.x({dbname:c,itemSizeLimit:61440})})).on("upgrade",h(d)),d.on("storeReplaced",function(e){a.replaceStore(e),a.localCacheEnabled=!1,d.on("upgrade",h(d))}),[4,d.open()]):[3,6];case 2:return m.sent(),this._storeInitialized=!0,l.dispatch(new o.D(this._iid,{userId:e})),[3,5];case 3:return[4,this._safeInitializeStore(u)];case 4:m.sent(),m.label=5;case 5:return t.userId=e,[3,8];case 6:return[4,this._safeInitializeStore(u)];case 7:m.sent(),t.userId=e,m.label=8;case 8:return[3,13];case 9:return f=m.sent(),s.warn("Nest DB Open Failed. ",f),a.store instanceof i.o||(a.replaceStore(new i.o),a.localCacheEnabled=!1),[4,this._safeInitializeStore(u)];case 10:throw m.sent(),t.userId=e,r.s.databaseError;case 11:return[4,this._setupPreference(e)];case 12:return m.sent(),[7];case 13:return[2]}})})},e.prototype.getCacheDataSize=function(){return(0,r._)(this,void 0,void 0,function(){var e;return(0,r.b)(this,function(n){switch(n.label){case 0:return(e=r.V.of(this._iid).cacheContext).localCacheEnabled&&e.nestdb?[4,e.nestdb.estimateUsage()]:[3,2];case 1:return[2,n.sent()];case 2:return[2,0]}})})},e.prototype.clearCachedData=function(){return(0,r._)(this,void 0,void 0,function(){var e;return(0,r.b)(this,function(n){switch(n.label){case 0:return(e=r.V.of(this._iid).cacheContext).localCacheEnabled&&e.nestdb?[4,e.nestdb.clear()]:[3,2];case 1:n.sent(),n.label=2;case 2:return this._storeInitialized?[4,e.preference.clear()]:[3,4];case 3:n.sent(),n.label=4;case 4:return[2]}})})},e.prototype.clearCachedMessages=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,a=this;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)((0,r.Q)("string",e)).throw(r.s.invalidParameters),n=i.t.of(this._iid),t=i.u.of(this._iid),n&&t?[4,Promise.all(e.map(function(e){return(0,r._)(a,void 0,void 0,function(){return(0,r.b)(this,function(r){switch(r.label){case 0:return[4,n.removeMessagesOfChannel(e)];case 1:return r.sent(),[4,t.removeMessagesOfChannel(e)];case 2:return r.sent(),[2]}})})}))]:[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},e.prototype._setupPreference=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a,o;return(0,r.b)(this,function(l){switch(l.label){case 0:return t=(n=r.V.of(this._iid)).sdkState,i=n.
1cacheContext,a=n.statManager,[4,i.preference.init(this._getPreferenceCacheKey(e),this._getNestDBVersion())];case 1:return l.sent(),[4,i.preference.get(this._getUserProfileCacheKey(e))];case 2:return(o=l.sent())&&new r.J(this._iid,o).apply(),[4,a.init("sendbird@".concat(t.appId,"/").concat(e,".statlog"))];case 3:return l.sent(),[2]}})})},e.prototype._ready=function(e,n,t){return void 0===t&&(t={}),(0,r._)(this,void 0,void 0,function(){var i,a,l,s,u,c;return(0,r.b)(this,function(d){switch(d.label){case 0:return(0,r.w)((0,r.a)("string",e)&&(0,r.a)("string",n,!0)).throw(r.s.invalidParameters),a=(i=r.V.of(this._iid)).sdkState,l=i.cacheContext,s=i.connectionManager,u=t.errorForOtherUser,a.userId&&a.userId!==e?u?[3,2]:[4,s.logout()]:[3,3];case 1:return d.sent(),[3,3];case 2:throw u;case 3:return d.trys.push([3,5,,6]),[4,this.initializeCache(e)];case 4:return d.sent(),r.V.of(this._iid).dispatcher.dispatch(new o.R),[3,6];case 5:return d.sent(),c=r.V.of(this._iid).logger,l.localCacheEnabled=!1,c.warn("Cache initialization failed - cache is not available."),[3,6];case 6:return[2]}})})},e.prototype.authenticateFeed=function(e,n){return(0,r._)(this,void 0,void 0,function(){return(0,r.b)(this,function(t){switch(t.label){case 0:return[4,this.authenticate(e,n)];case 1:return[2,t.sent()]}})})},e.prototype.authenticate=function(e,n){var t;return(0,r._)(this,void 0,void 0,function(){var a,o,l,s;return(0,r.b)(this,function(u){switch(u.label){case 0:return o=(a=r.V.of(this._iid)).sessionManager,l=a.connectionManager,[4,this._ready(e,n,{errorForOtherUser:l.isConnected?r.s.alreadyConnectedAsAnotherUser:void 0})];case 1:return u.sent(),(null===(t=o.session.services)||void 0===t?void 0:t.includes(r.R.CHAT))?[3,3]:(n||o.handler||(s=new i.S,this.setSessionHandler(s)),[4,o.authenticate(e,n)]);case 2:u.sent(),u.label=3;case 3:return[2,this.currentUser]}})})},e.prototype.connect=function(e,n){return(0,r._)(this,void 0,void 0,function(){return(0,r.b)(this,function(t){switch(t.label){case 0:return[4,this._ready(e,n)];case 1:t.sent(),t.label=2;case 2:return t.trys.push([2,,4,5]),[4,r.V.of(this._iid).connectionManager.connect(n)];case 3:return t.sent(),[3,5];case 4:return this._onlineDetector.start(),this._appStateChangeDetector.start(),[7];case 5:return[2,this.currentUser]}})})},e.prototype.reconnect=function(){var e=r.V.of(this._iid),n=e.connectionManager,t=e.sdkState,i=e.sessionManager.session.hasSession;return i&&(this._appStateChangeDetector.start(),this._onlineDetector.start(),n.resetAndReconnect().then(function(){t.appState="foreground"}).catch(function(){})),i},e.prototype.disconnect=function(){return(0,r._)(this,void 0,void 0,function(){return(0,r.b)(this,function(e){switch(e.label){case 0:return[4,this._internalDisconnect()];case 1:return e.sent(),[2]}})})},e.prototype.disconnectWebSocket=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t;return(0,r.b)(this,function(i){switch(i.label){case 0:return n=(e=r.V.of(this._iid)).connectionManager,t=e.requestQueue,this._appStateChangeDetector.stop(),this._onlineDetector.stop(),t.cancelAll(),[4,n.disconnectWebSocket(!0)];case 1:return i.sent(),[2]}})})},e.prototype.setBackgroundState=function(){var e=r.V.of(this._iid),n=e.connectionManager,t=e.sdkState,i=e.logger;"foreground"===t.appState&&(t.appState="background",i.debug("going background state"),n.background().catch(function(e){i.debug("setBackgroundState error = ",e)}))},e.prototype.setForegroundState=function(){var e=r.V.of(this._iid),n=e.connectionManager,t=e.sdkState,i=e.dispatcher,a=e.logger;"background"===t.appState&&(t.appState="foreground",a.debug("going foreground state"),n.resetAndReconnect().catch(function(e){a.debug("setForgroundState error = ",e)}),i.dispatch(new l))},e.prototype.setSessionHandler=function(e){(0,r.w)(e instanceof i.S).throw(r.s.invalidParameters),r.V.of(this._iid).sessionManager.handler=e},e.prototype.addUserEventHandler=function(e,n){(0,r.w)((0,r.a)("string",e)&&n instanceof i.U).throw(r.s.invalidParameters),r.V.of(this._iid).userEventHandlers.set(e,n)},e.prototype.removeUserEventHandler=function(e){r.V.of(this._iid).userEventHandlers.delete(e)},e.prototype.removeAllUserEventHandler=function(){r.V.of(this._iid).userEventHandlers.clear()}
1,e.prototype.addConnectionHandler=function(e,n){(0,r.w)((0,r.a)("string",e)&&n instanceof i.C).throw(r.s.invalidParameters),r.V.of(this._iid).connectionHandlers.set(e,n)},e.prototype.removeConnectionHandler=function(e){r.V.of(this._iid).connectionHandlers.delete(e)},e.prototype.removeAllConnectionHandler=function(){r.V.of(this._iid).connectionHandlers.clear()},e.prototype.createApplicationUserListQuery=function(e){return void 0===e&&(e={}),new i.r(this._iid,e)},e.prototype.createBlockedUserListQuery=function(e){return void 0===e&&(e={}),new i.B(this._iid,e)},e.prototype.createFriendListQuery=function(e){return void 0===e&&(e={}),new i.F(this._iid,e)},e.prototype.createMessageSearchQuery=function(e){return new i.s(this._iid,e)},e.prototype.createPollListQuery=function(e){return new r.x(this._iid,(0,r.g)({},e))},e.prototype.createPollVoterListQuery=function(e){return new r.y(this._iid,(0,r.g)({},e))},e.prototype.buildUserFromSerializedData=function(e){var n=(0,r.z)(e);return new r.U(this._iid,r.U.payloadify(n))},e.prototype.updateCurrentUserInfo=function(e){return void 0===e&&(e={}),(0,r._)(this,void 0,void 0,function(){var n,t,i,a,o,l;return(0,r.b)(this,function(s){switch(s.label){case 0:var u;return n=(0,r.g)((0,r.g)({},d),e),(0,r.w)((u=n,(0,r.i)(u.profileImage,!0)&&(0,r.a)("string",u.profileUrl,!0)&&(0,r.a)("string",u.nickname,!0))).throw(r.s.invalidParameters),this.currentUser?(i=(t=r.V.of(this._iid)).sdkState,a=t.requestQueue,o=new p((0,r.g)({userId:i.userId},n)),[4,a.send(o)]):[3,2];case 1:return l=s.sent().as(g).user,this.currentUser&&(n.nickname&&(this.currentUser.nickname=l.nickname),(n.profileUrl||n.profileImage)&&(this.currentUser.plainProfileUrl=l.profileUrl)),[2,l];case 2:throw r.s.connectionRequired}})})},e.prototype.updateCurrentUserInfoWithPreferredLanguages=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a,o;return(0,r.b)(this,function(l){switch(l.label){case 0:return(0,r.w)((0,r.Q)("string",e)).throw(r.s.invalidParameters),this.currentUser?(t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new p({userId:t.userId,preferredLanguages:e}),[4,i.send(a)]):[3,2];case 1:return o=l.sent().as(g).user,this.currentUser&&(this.currentUser.preferredLanguages=o.preferredLanguages),[2,o];case 2:throw r.s.connectionRequired}})})},e.prototype.registerFCMPushTokenForCurrentUser=function(e,n){var t,i;return(0,r._)(this,void 0,void 0,function(){var a,o,l,s,u,c,d=this;return(0,r.b)(this,function(h){switch(h.label){case 0:if((0,r.w)((0,r.a)("string",e)&&(0,r.a)("string",null==n?void 0:n.deviceManufacturer,!0)).throw(r.s.invalidParameters),(null==n?void 0:n.deviceOS)&&(0,r.w)((0,r.X)(r.Y,n.deviceOS.platform,!0)&&(0,r.a)("string",n.deviceOS.version,!0)).throw(r.s.invalidParameters),!this.currentUser)return[3,6];a={deviceOS:"".concat((null===(t=null==n?void 0:n.deviceOS)||void 0===t?void 0:t.platform)||r.Y.ANDROID,"-").concat((null===(i=null==n?void 0:n.deviceOS)||void 0===i?void 0:i.version)||"unknown"),deviceManufacturer:null==n?void 0:n.deviceManufacturer,systemPushEnabled:null==n?void 0:n.systemPushEnabled},h.label=1;case 1:return h.trys.push([1,4,,5]),l=(o=r.V.of(this._iid)).sessionManager,s=o.sdkState,u=o.requestQueue,l.hasDeviceToken(r.P.FCM,e)?[2,r.T.SUCCESS]:(c=new E({userId:s.userId,token:e,deviceOS:a.deviceOS,deviceManufacturer:a.deviceManufacturer,systemPushEnabled:a.systemPushEnabled}),[4,u.send(c)]);case 2:return h.sent(),[4,(0,r.B)(function(){return(0,r._)(d,void 0,void 0,function(){return(0,r.b)(this,function(n){switch(n.label){case 0:return l.setDeviceToken(r.P.FCM,e,a),[4,l.saveDeviceToken()];case 1:return n.sent(),[2]}})})})];case 3:return h.sent(),this._fcmPushToken="",[2,r.T.SUCCESS];case 4:return h.sent(),[2,r.T.ERROR];case 5:return[3,7];case 6:return this._fcmPushToken=e,[2,r.T.PENDING];case 7:return[2]}})})},e.prototype.unregisterFCMPushTokenForCurrentUser=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a,o,l,s=this;return(0,r.b)(this,function(u){switch(u.label){case 0:if((0,r.w)((0,r.a)("string",e)).throw(r.s.invalidParameters),!this.currentUser)return[3,6];u.label=1;case 1:return u.trys.push([1,4,,5]),t=(n=r.V.of(this._iid)).sessionManager,i=n.sdkState,a=n.requestQueue,o=new C({userId:i.userId,token:e}),[4,a.send(o)];case 2:return l=u.sent().lastDeletedAt,[4,(0,r.B)(function(){return(0,r._)(s,void 0,void 0,function(){return(0,r.b)(this,function(n){switch(n.label){case 0:return t.unsetDeviceToken(r.P.FCM,e),t.setDeviceTokenDeletedAt(l),[4,t.saveDeviceToken()];case 1:return n.sent(),[2]}})})})];case 3:return u.sent(),this._fcmPushToken="",[2,r.T.SUCCESS];case 4:return u.sent(),[2,r.T.ERROR];case 5:return[3,7];case 6:return this._fcmPushToken=e,[2,r.T.PENDING];case 7:return[2]}})})},e.prototype.unregisterFCMPushTokenAllForCurrentUser=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t,i,a,o,l=this;return(0,r.b)(this,function(s){switch(s.label){case 0:return this.currentUser?(n=(e=r.V.of(this._iid)).sessionManager,t=e.sdkState,i=e.requestQueue,a=new N({userId:t.userId}),[4,i.send(a)]):[3,3];case 1:return o=s.sent().lastDeletedAt,[4,(0,r.B)(function(){return(0,r._)(l,void 0,void 0,function(){return(0,r.b)(this,function(e){switch(e.label){case 0:return n.unsetDeviceTokens(r.P.FCM),n.setDeviceTokenDeletedAt(o),[4,n.saveDeviceToken()];case 1:return e.sent(),[2]}})})})];case 2:s.sent(),s.label=3;case 3:return[2]}})})},e.prototype.registerAPNSPushTokenForCurrentUser=function(e,n){var t,i;return(0,r._)(this,void 0,void 0,function(){var a,o,l,s,u,c,d=this;return(0,r.b)(this,function(h){switch(h.label){case 0:if((0,r.w)((0,r.a)("string",e)&&(0,r.a)("string",null==n?void 0:n.deviceManufacturer,!0)).throw(r.s.invalidParameters),(null==n?void 0:n.deviceOS)&&(0,r.w)((0,r.X)(r.Y,n.deviceOS.platform,!0)&&(0,r.a)("string",n.deviceOS.version,!0)).throw(r.s.invalidParameters),!this.currentUser)return[3,6];a={deviceOS:"".concat((null===(t=null==n?void 0:n.deviceOS)||void 0===t?void 0:t.platform)||r.Y.IOS,"-").concat((null===(i=null==n?void 0:n.deviceOS)||void 0===i?void 0:i.version)||"unknown"),deviceManufacturer:null==n?void 0:n.deviceManufacturer,systemPushEnabled:null==n?void 0:n.systemPushEnabled},h.label=1;case 1:return h.trys.push([1,4,,5]),l=(o=r.V.of(this._iid)).sessionManager,s=o.sdkState,u=o.requestQueue,l.hasDeviceToken(r.P.APNS,e)?[2,r.T.SUCCESS]:(c=new _({userId:s.userId,token:e,deviceOS:a.deviceOS,deviceManufacturer:a.deviceManufacturer,systemPushEnabled:a.systemPushEnabled}),[4,u.send(c)]);case 2:return h.sent(),[4,(0,r.B)(function(){return(0,r._)(d,void 0,void 0,function(){return(0,r.b)(this,function(n){switch(n.label){case 0:return l.setDeviceToken(r.P.APNS,e,a),[4,l.saveDeviceToken()];case 1:return n.sent(),[2]}})})})];case 3:return h.sent(),this._apnsPushToken="",[2,r.T.SUCCESS];case 4:return h.sent(),[2,r.T.ERROR];case 5:return[3,7];case 6:return this._apnsPushToken=e,[2,r.T.PENDING];case 7:return[2]}})})},e.prototype.unregisterAPNSPushTokenForCurrentUser=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a,o,l,s=this;return(0,r.b)(this,function(u){switch(u.label){case 0:if((0,r.w)((0,r.a)("string",e)).throw(r.s.invalidParameters),!this.currentUser)return[3,6];u.label=1;case 1:return u.trys.push([1,4,,5]),t=(n=r.V.of(this._iid)).sessionManager,i=n.sdkState,a=n.requestQueue,o=new b({userId:i.userId,token:e}),[4,a.send(o)];case 2:return l=u.sent().lastDeletedAt,[4,(0,r.B)(function(){return(0,r._)(s,void 0,void 0,function(){return(0,r.b)(this,function(n){switch(n.label){case 0:return t.unsetDeviceToken(r.P.APNS,e),t.setDeviceTokenDeletedAt(l),[4,t.saveDeviceToken()];case 1:return n.sent(),[2]}})})})];case 3:return u.sent(),this._apnsPushToken="",[2,r.T.SUCCESS];case 4:return u.sent(),[2,r.T.ERROR];case 5:return[3,7];case 6:return this._apnsPushToken=e,[2,r.T.PENDING];case 7:return[2]}})})},e.prototype.unregisterAPNSPushTokenAllForCurrentUser=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t,i,a,o,l=this;return(0,r.b)(this,function(s){switch(s.label){case 0:return this.currentUser?(n=(e=r.V.of(this._iid)).sessionManager,t=e.sdkState,i=e.requestQueue,a=new y({userId:t.userId}),[4,i.send(a)]):[3,3];case 1:return o=s.sent().lastDeletedAt,[4,(0,r.B)(function(){return(0,r._)(l,void 0,void 0,function(){return(0,r.b)(this,function(e){switch(e.label){case 0:return n.unsetDeviceTokens(r.P.APNS),n.setDeviceTokenDeletedAt(o),[4,n.saveDeviceToken()];case 1:return e.sent(),[2]}})})})];case 2:s.sent(),s.label=3;case 3:return[2]}})})},e.prototype.markPushNotificationAsDelivered=function(e,n){var t;return void 0===n&&(n=!0),(0,r._)(this,void 0,void 0,function(){var i,a,o,l,s,u,c,d,h,f,m,v,p,g,_,E,b,C,y;return(0,r.b)(this,function(N){switch(N.label){case 0:if(a=(i=r.V.of(this._iid)).logger,o=i.sessionManager,l=i.requestQueue,s=i.pushNotificationAckManager,a.debug("markPushNotificationAsDelivered:",e),u=ep.DELIVERED,d=(c=s.parseData(e)).pushTrackingId,h=c.sessionTopics,f=c.sessionKey,m=c.messageId,v=c.channelKe
1y,p=c.templateKey,g=c.notificationEventDeadline,!f||!h.includes(r.Z.PUSH_ACKNOWLEDGEMENT))throw a.info("Can't use markPushNotificationAsDelivered() feature."),r.s.malformedDataError;if(s.isAcked(d,u))return a.info("already delivered push notification:",d),[2];_=!!v,E=n&&_,b=null===(t=o.deviceTokens[0])||void 0===t?void 0:t.token,C=new eI({deviceToken:null!=b?b:"",pushTrackingId:d,eventType:u,messageId:m,channelKey:v,templateKey:p,notificationEventDeadline:g,allowedPushNotification:E}),f&&(C.headers["Session-Key"]=f),N.label=1;case 1:return N.trys.push([1,3,,4]),[4,l.send(C)];case 2:return N.sent(),s.markAsAcked(d,u),[3,4];case 3:throw y=N.sent(),a.debug("failed to mark push notification as delivered. push tracking id: ".concat(d,". error: ").concat(y)),y;case 4:return[2]}})})},e.prototype.markPushNotificationAsClicked=function(e){var n;return(0,r._)(this,void 0,void 0,function(){var t,i,a,o,l,s,u,c,d,h,f,m,v,p,g,_,E;return(0,r.b)(this,function(b){switch(b.label){case 0:if(i=(t=r.V.of(this._iid)).logger,a=t.sessionManager,o=t.requestQueue,l=t.pushNotificationAckManager,i.debug("markPushNotificationAsClicked:",e),s=ep.CLICKED,c=(u=l.parseData(e)).pushTrackingId,d=u.sessionTopics,h=u.sessionKey,f=u.messageId,m=u.channelKey,v=u.templateKey,p=u.notificationEventDeadline,!h||!d.includes(r.Z.PUSH_ACKNOWLEDGEMENT))throw i.info("Can't use markPushNotificationAsDelivered() feature."),r.s.malformedDataError;if(l.isAcked(c,s))return i.info("already clicked push notification:",c),[2];g=null===(n=a.deviceTokens[0])||void 0===n?void 0:n.token,_=new eI({deviceToken:null!=g?g:"",pushTrackingId:c,eventType:s,messageId:f,channelKey:m,templateKey:v,notificationEventDeadline:p}),h&&(_.headers["Session-Key"]=h),b.label=1;case 1:return b.trys.push([1,3,,4]),[4,o.send(_)];case 2:return b.sent(),l.markAsAcked(c,s),[3,4];case 3:throw E=b.sent(),i.debug("failed to mark push notification as clicked. push tracking id: ".concat(c,". error: ").concat(E)),E;case 4:return[2]}})})},e.prototype.getChannelInvitationPreference=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t,i;return(0,r.b)(this,function(a){switch(a.label){case 0:return n=(e=r.V.of(this._iid)).sdkState,t=e.requestQueue,i=new A({userId:n.userId}),[4,t.send(i)];case 1:return[2,{autoAccept:a.sent().as(I).autoAccept}]}})})},e.prototype.setChannelInvitationPreference=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)((0,r.a)("boolean",e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new M({userId:t.userId,willAutoAccept:e}),[4,i.send(a)];case 1:return[2,{autoAccept:o.sent().as(O).autoAccept}]}})})},e.prototype.getDoNotDisturb=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t,i;return(0,r.b)(this,function(a){switch(a.label){case 0:return n=(e=r.V.of(this._iid)).sdkState,t=e.requestQueue,i=new R({userId:n.userId}),[4,t.send(i)];case 1:return[2,a.sent().as(w).preference]}})})},e.prototype.setDoNotDisturb=function(e,n,t,i,a,o){return void 0===n&&(n=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===a&&(a=0),void 0===o&&(o=""),(0,r._)(this,void 0,void 0,function(){var l,s,u,c;return(0,r.b)(this,function(d){switch(d.label){case 0:return(0,r.w)((0,r.a)("boolean",e)&&(0,r.a)("number",n)&&(0,r.a)("number",t)&&(0,r.a)("number",i)&&(0,r.a)("number",a)&&(0,r.a)("string",o)).throw(r.s.invalidParameters),s=(l=r.V.of(this._iid)).sdkState,u=l.requestQueue,c=new D({userId:s.userId,doNotDisturbOn:e,startHour:n,startMin:t,endHour:i,endMin:a,timezone:o}),[4,u.send(c)];case 1:return[2,d.sent().as(L).preference]}})})},e.prototype.getSnoozePeriod=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t,i;return(0,r.b)(this,function(a){switch(a.label){case 0:return n=(e=r.V.of(this._iid)).sdkState,t=e.requestQueue,i=new P({userId:n.userId}),[4,t.send(i)];case 1:return[2,a.sent().as(U).snoozePeriod]}})})},e.prototype.setSnoozePeriod=function(e,n,t){return void 0===n&&(n=0),void 0===t&&(t=0),(0,r._)(this,void 0,void 0,function(){var i,a,o,l;return(0,r.b)(this,function(s){switch(s.label){case 0:return(0,r.w)((0,r.a)("boolean",e)&&(0,r.a)("number",n)&&(0,r.a)("number",t)).throw(r.s.invalidParameters),a=(i=r.V.of(this._iid)).sdkState,o=i.requestQueue,l=new x({userId:a.userId,snoozeOn:e,startTs:n,endTs:t}),[4,o.send(l)];case 1:return[2,s.sent().as(k).snoozePeriod]}})})},e.prototype.getMyPushTokensByToken=function(e,n){return(0,r._)(this,void 0,void 0,function(){var t,i,a,o,l,s,u,c,d,h,f;return(0,r.b)(this,function(m){switch(m.label){case 0:return(0,r.w)((0,r.a)("string",e)&&(0,r.X)(r.P,n)).throw(r.s.invalidParameters),i=(t=r.V.of(this._iid)).sdkState,a=t.requestQueue,o=t.sessionManager,l=new T({userId:i.userId,type:n,token:e}),[4,a.send(l)];case 1:s=m.sent().as(S).pushTokens;try{for(c=(u=(0,r.t)(s.deviceTokens)).next();!c.done;c=u.next())d=c.value,o.setDeviceToken(s.type,d)}catch(e){h={error:e}}finally{try{c&&!c.done&&(f=u.return)&&f.call(u)}finally{if(h)throw h.error}}return[4,o.saveDeviceToken()];case 2:return m.sent(),[2,s]}})})},e.prototype.getPushTriggerOption=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t,i;return(0,r.b)(this,function(a){switch(a.label){case 0:return n=(e=r.V.of(this._iid)).sdkState,t=e.requestQueue,i=new B({userId:n.userId}),[4,t.send(i)];case 1:return[2,a.sent().as(H).pushTriggerOption]}})})},e.prototype.setPushTriggerOption=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)((0,r.X)(r.$,e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new V({userId:t.userId,pushTriggerOption:e}),[4,i.send(a)];case 1:return[2,o.sent().as(j).pushTriggerOption]}})})},e.prototype.getPushTemplate=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t,i;return(0,r.b)(this,function(a){switch(a.label){case 0:return n=(e=r.V.of(this._iid)).sdkState,t=e.requestQueue,i=new z({userId:n.userId}),[4,t.send(i)];case 1:return[2,a.sent().as(K).name]}})})},e.prototype.setPushTemplate=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)((0,r.X)(r.a0,e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new Y({userId:t.userId,templateName:e}),[4,i.send(a)];case 1:return[2,o.sent().as(Z).name]}})})},e.prototype.blockUser=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)(e instanceof r.U||(0,r.a)("string",e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new F({userId:t.userId,blockedUserId:e instanceof r.U?e.userId:e}),[4,i.send(a)];case 1:return o.sent(),[2]}})})},e.prototype.blockUserWithUserId=function(e){return(0,r._)(this,void 0,void 0,function(){return(0,r.b)(this,function(n){return[2,this.blockUser(e)]})})},e.prototype.unblockUser=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)(e instanceof r.U||(0,r.a)("string",e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new G({userId:t.userId,unblockedUserId:e instanceof r.U?e.userId:e}),[4,i.send(a)];case 1:return o.sent(),[2]}})})},e.prototype.unblockUserWithUserId=function(e){return(0,r._)(this,void 0,void 0,function(){return(0,r.b)(this,function(n){return[2,this.unblockUser(e)]})})},e.prototype.getFriendChangeLogsByToken=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)((0,r.a)("string",e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new Q({userId:t.userId,token:e}),[4,i.send(a)];case 1:return[2,o.sent().as(W).changelogs]}})})},e.prototype.getAllowFriendDiscovery=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t,i;return(0,r.b)(this,function(a){switch(a.label){case 0:return n=(e=r.V.of(this._iid)).sdkState,t=e.requestQueue,i=new et({userId:n.userId}),[4,t.send(i)];case 1:return[2,a.sent().as(er).allowFriendDiscovery]}})})},e.prototype.setAllowFriendDiscovery=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)((0,r.a)("boolean",e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new ei({userId:t.userId,allowFriendDiscovery:e}),[4,i.send(a)];case 1:return o.sent(),[2,e]}})})},e.prototype.uploadFriendDiscoveries=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new q({userId:t.userId,discoveries:e}),[4,i.send(a)];case 1:return[2,o.sent().as(X).friendDiscoveryRequestId]}})})},e.prototype.deleteFriendDiscovery=function(e){return(0,r._)(this,void 0,void 0,function(){return(0,r.b)(this,function(n){return[2,this.deleteFriendDiscoveries([e])]})})},e.prototype.deleteFriendDiscoveries=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)((0,r.Q)("string",e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new $({userId:t.userId,discoveryKeys:e}),[4,i.send(a)];case 1:return o.sent(),[2]}})})},e.prototype.addFriends=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)((0,r.Q)("string",e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new J({userId:t.userId,userIds:e}),[4,i.send(a)];case 1:return[2,o.sent().as(ee).users]}})})},e.prototype.deleteFriend=function(e){return(0,r._)(this,void 0,void 0,function(){return(0,r.b)(this,function(n){return[2,this.deleteFriends([e])]})})},e.prototype.deleteFriends=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t,i,a;return(0,r.b)(this,function(o){switch(o.label){case 0:return(0,r.w)((0,r.Q)("string",e)).throw(r.s.invalidParameters),t=(n=r.V.of(this._iid)).sdkState,i=n.requestQueue,a=new en({userId:t.userId,userIds:e}),[4,i.send(a)];case 1:return o.sent(),[2]}})})},e.prototype.getAllEmoji=function(){return(0,r._)(this,void 0,void 0,function(){var e,n;return(0,r.b)(this,function(t){switch(t.label){case 0:return e=r.V.of(this._iid).requestQueue,n=new eg,[4,e.send(n)];case 1:return[2,t.sent().as(e_).emojiContainer]}})})},e.prototype.getEmojiCategory=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t;return(0,r.b)(this,function(i){switch(i.label){case 0:return n=r.V.of(this._iid).requestQueue,t=new eE({categoryId:e}),[4,n.send(t)];case 1:return[2,i.sent().as(eb).emojiCategory]}})})},e.prototype.getEmoji=function(e){return(0,r._)(this,void 0,void 0,function(){var n,t;return(0,r.b)(this,function(i){switch(i.label){case 0:return n=r.V.of(this._iid).requestQueue,t=new eC({key:e}),[4,n.send(t)];case 1:return[2,i.sent().as(ey).emoji]}})})},e.prototype.getUIKitConfiguration=function(){return(0,r._)(this,void 0,void 0,function(){var e,n,t;return(0,r.b)(this,function(i){switch(i.label){case 0:return e=r.V.of(this._iid),(0,r.w)(e.hasExtension("sb_uikit")).throw(r.s.notSupportedError),n=e.requestQueue,t=new eN,[4,n.send(t)];case 1:return[2,i.sent().as(eT).uikitConfiguration]}})})},e}()},73235:function(e,n,t){"use strict";t.d(n,{B:function(){return i}});var r=t(36614),i=function(){this.onUserMuted=r.aA,this.onUserUnmuted=r.aA,this.onUserBanned=r.aA,this.onUserUnbanned=r.aA,this.onChannelChanged=r.aA,this.onChannelDeleted=r.aA,this.onChannelFrozen=r.aA,this.onChannelUnfrozen=r.aA,this.onOperatorUpdated=r.aA,this.onChannelMemberCountChanged=r.aA,this.onMetaDataCreated=r.aA,this.onMetaDataUpdated=r.aA,this.onMetaDataDeleted=r.aA,this.onMetaCounterCreated=r.aA,this.onMetaCounterUpdated=r.aA,this.onMetaCounterDeleted=r.aA,this.onMessageReceived=r.aA,this.onMessageUpdated=r.aA,this.onMessageDeleted=r.aA,this.onMentionReceived=r.aA,this.onReactionUpdated=r.aA,this.onThreadInfoUpdated=r.aA}},77522:function(e,n,t){"use strict";t.d(n,{A:function(){return p},D:function(){return _},G:function(){return u},P:function(){return c},R:function(){return E},S:function(){return d},U:function(){return b},a:function(){return h},b:function(){return g},c:function(){return m},g:function(){return f}});var r,i=t(36614),a=t(4500);(o=u||(u={})).LATEST_LAST_MESSAGE="latest_last_message",o.CHRONOLOGICAL="chronological",o.CHANNEL_NAME_ALPHABETICAL="channel_name_alphabetical",o.METADATA_VALUE_ALPHABETICAL="metadata_value_alph
1abetical",(l=c||(c={})).CHRONOLOGICAL="chronological",l.CHANNEL_NAME_ALPHABETICAL="channel_name_alphabetical",l.METADATA_VALUE_ALPHABETICAL="metadata_value_alphabetical",(s=d||(d={})).CREATED_AT="created_at",s.SCHEDULED_AT="scheduled_at";var o,l,s,u,c,d,h,f=function(e){switch(e){case u.LATEST_LAST_MESSAGE:return["-lastMessageUpdatedAt","-createdAt","syncIndex"];case u.CHRONOLOGICAL:return["-createdAt","syncIndex"];case u.CHANNEL_NAME_ALPHABETICAL:return["name"];default:return["-lastMessageUpdatedAt","-createdAt","syncIndex"]}},m=function(e){function n(n){var t=n.message,r=e.call(this)||this;return r.message=t,r}return(0,i.c)(n,e),n}(i.b8),v={},p=function(){function e(e,n){var t=n.localCacheEnabled,r=n.enableAutoResend,a=n.dispatcher,o=n.sdkState,l=n.logger,s=this;this._iid=e,v[e]=this,this._localCacheEnabled=t,this._enableAutoResend=r,this._isProcessingAutoResend=!1,this._autoResendQueue=[],this._dispatcher=a,this._logger=l,this._sdkState=o,this._localCacheEnabled&&a.on(function(e){if(e instanceof i.D)switch(e.stateType){case i.F.CONNECTED:s._isProcessingAutoResend||s.processAutoResendRegisteredPendingMessages().then(function(){return s._processNextAutoResend()});break;case i.F.INTERNAL_DISCONNECTED:case i.F.EXTERNAL_DISCONNECTED:s._isProcessingAutoResend=!1}})}return e.of=function(e){return v[e]},e.prototype.processNonAutoResendRegisteredPendingMessages=function(){return(0,i._)(this,void 0,void 0,function(){var e,n,t,r,a,o;return(0,i.b)(this,function(l){switch(l.label){case 0:return this._enableAutoResend?[4,this._fetchAllCachedPendingMessages()]:[2];case 1:e=l.sent();try{for(t=(n=(0,i.t)(e)).next();!t.done;t=n.next())0===(r=t.value).errorCode&&(this._logger.debug("cached pending message is not auto-resend registered. changing its sending status to failed: ",r.reqId),r.sendingStatus=i.ao.FAILED,r.errorCode=i.a8.ACK_TIMEOUT,this._dispatcher.dispatch(new i.an({messages:[r],source:i.a2.LOCAL_MESSAGE_FAILED})))}catch(e){a={error:e}}finally{try{t&&!t.done&&(o=n.return)&&o.call(n)}finally{if(a)throw a.error}}return[2]}})})},e.prototype.processAutoResendRegisteredPendingMessages=function(){return(0,i._)(this,void 0,void 0,function(){var e,n,t,r,a,o,l,s;return(0,i.b)(this,function(u){switch(u.label){case 0:return[4,this._fetchAllCachedPendingMessages()];case 1:e=u.sent();try{for(t=(n=(0,i.t)(e)).next();!t.done;t=n.next())r=t.value,this._enableAutoResend&&r.errorCode&&(0,i.aK)(r.errorCode)&&(a=(new Date).getTime(),o=r.createdAt+2592e5,this._enableAutoResend&&a<=o?0>this._autoResendQueue.map(function(e){return e.reqId}).indexOf(r.reqId)&&this._autoResendQueue.push(r):(this._logger.debug("auto-resend registered pending messaged expired. expiration date: ",new Date(o).toLocaleString()),r.sendingStatus=i.ao.FAILED,this._dispatcher.dispatch(new i.an({messages:[r],source:i.a2.LOCAL_MESSAGE_FAILED}))))}catch(e){l={error:e}}finally{try{t&&!t.done&&(s=n.return)&&s.call(n)}finally{if(l)throw l.error}}return[2]}})})},e.prototype.completeCurrentAndProcessNextAutoResend=function(e){if(this._localCacheEnabled&&this._enableAutoResend&&
1(e.sendingStatus===i.ao.SUCCEEDED||e.sendingStatus===i.ao.FAILED&&!(0,i.aK)(e.errorCode))){var n=this.indexOf(e);n>=0&&this._autoResendQueue.splice(n,1),0===n&&this._processNextAutoResend()}},e.prototype._fetchAllCachedPendingMessages=function(){return(0,i._)(this,void 0,void 0,function(){var e,n;return(0,i.b)(this,function(t){switch(t.label){case 0:return e=a.u.of(this._iid),(n=new a.K).replyType=i.ay.ALL,[4,e.fetch({sendingStatus:i.ao.PENDING,backward:!0,filter:n})];case 1:return[2,t.sent()]}})})},e.prototype.indexOf=function(e){return this._autoResendQueue.length>0?this._autoResendQueue.map(function(e){return e.reqId}).indexOf(e.reqId):-1},e.prototype._isNotInQueue=function(e){return -1===this._autoResendQueue.map(function(e){return e.reqId}).indexOf(e.reqId)},e.prototype._processNextAutoResend=function(){return(0,i._)(this,void 0,void 0,function(){var e;return(0,i.b)(this,function(n){if(this._localCacheEnabled&&this._enableAutoResend&&"foreground"===this._sdkState.appState)try{this._autoResendQueue.length>0?(this._isProcessingAutoResend||(this._logger.debug("auto-resend queue started."),this._isProcessingAutoResend=!0),e=this._autoResendQueue[0],this._dispatcher.dispatch(new m({message:e})),this._logger.debug("processing auto-resend for message request id: ",e.reqId)):(this._logger.debug("auto-resend queue finished."),this._isProcessingAutoResend=!1)}catch(e){this._logger.warn("process auto-resend error: ",e),this._isProcessingAutoResend=!1}return[2]})})},e}();(r=h||(h={}))[r.USER_BLOCK=20001]="USER_BLOCK",r[r.USER_UNBLOCK=2e4]="USER_UNBLOCK",r[r.FRIEND_DISCOVERED=20900]="FRIEND_DISCOVERED";var g=function(){function e(e){this.category=e.cat,this.data=e.data}return e.getDataAsUserBlockEvent=function(e,n){var t=n.data,r=t.blocker,a=t.blockee;return{blocker:new i.U(e,r),blockee:new i.U(e,a)}},e.getDataAsFriendDiscoveredEvent=function(e,n){var t=n.data.friend_discoveries;return{friendDiscoveries:Array.isArray(t)?t.map(function(n){return new i.U(e,n)}):[]}},e}(),_=function(e){function n(n,t){var r=t.userId,i=e.call(this)||this;return i._iid=n,i.userId=r,i}return(0,i.c)(n,e),n}(i.b8),E=function(e){function n(){return e.call(this)||this}return(0,i.c)(n,e),n}(i.b8),b=function(e){function n(n,t,r){var i=e.call(this,n,"USEV",r)||this;return i.event=new g(r),i}return(0,i.c)(n,e),n}(i.W)},53742:function(e,n,t){"use strict";t.d(n,{A:function(){return f},B:function(){return h},C:function(){return u},M:function(){return g},O:function(){return c},P:function(){return _},R:function(){return v},T:function(){return p},U:function(){return d},a:function(){return i},b:function(){return m}});var r,i,a=t(36614),o=t(4500),l=function(e,n){this.pollId=0,this.messageId=0,this.pollId=n.poll.id,this.messageId=n.poll.message_id,this._iid=e,this._payload=n};(r=i||(i={}))[r.NONE=0]="NONE",r[r.CHANNEL_ENTER=10102]="CHANNEL_ENTER",r[r.CHANNEL_EXIT=10103]="CHANNEL_EXIT",r[r.USER_CHANNEL_MUTE=10201]="USER_CHANNEL_MUTE",r[r.USER_CHANNEL_UNMUTE=10200]="USER_CHANNEL_UNMUTE",r[r.USER_CHANNEL_BAN=10601]="USER_CHANNEL_BAN",r[r.USER_CHANNEL_UNBAN=10600]="USER_CHANNEL_UNBAN",r[r.CHANNEL_FREEZE=10701]="CHANNEL_FREEZE",r[r.CHANNEL_UNFREEZE=10700]="CHANNEL_UNFREEZE",r[r.TYPING_START=10900]="TYPING_START",r[r.TYPING_END=10901]="TYPING_END",r[r.CHANNEL_JOIN=1e4]="CHANNEL_JOIN",r[r.CHANNEL_LEAVE=10001]="CHANNEL_LEAVE",r[r.CHANNEL_OPERATOR_UPDATE=10002]="CHANNEL_OPERATOR_UPDATE",r[r.CHANNEL_INVITE=10020]="CHANNEL_INVITE",r[r.CHANNEL_ACCEPT_INVITE=10021]="CHANNEL_ACCEPT_INVITE",r[r.CHANNEL_DECLINE_INVITE=10022]="CHANNEL_DECLINE_INVITE",r[r.CHANNEL_PROP_CHANGED=11e3]="CHANNEL_PROP_CHANGED",r[r.CHANNEL_DELETED=12e3]="CHANNEL_DELETED",r[r.CHANNEL_META_DATA_CHANGED=11100]="CHANNEL_META_DATA_CHANGED",r[r.CHANNEL_META_COUNTERS_CHANGED=11200]="CHANNEL_META_COUNTERS_CHANGED",r[r.CHANNEL_HIDE=13e3]="CHANNEL_HIDE",r[r.CHANNEL_UNHIDE=13001]="CHANNEL_UNHIDE",r[r.PINNED_MESSAGE_CHANGED=11300]="PINNED_MESSAGE_CHANGED";var s=function(){function e(e){var n;this.channelUrl=e.channel_url,this.channelType=e.channel_type,this.category=e.cat,this.data=null!==(n=e.data)&&void 0!==n?n:{},this.ts=e.ts}return Object.defineProperty(e.prototype,"isGroupChannelEvent",{get:function(){return this.channelType===a.
1C.GROUP},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpenChannelEvent",{get:function(){return this.channelType===a.C.OPEN},enumerable:!1,configurable:!0}),e}(),u=function(e){function n(n,t,r){var i=e.call(this,n,"SYEV",r)||this;return i.event=new s(r),i}return(0,a.c)(n,e),n}(a.W),c=function(e){function n(n,t,r){var i=e.call(this,n,t,r)||this,o=r.data.operators;return i.operators=(void 0===o?[]:o).map(function(e){return new a.U(i._iid,e)}),i}return(0,a.c)(n,e),n}(u),d=function(e){function n(n,t,r){var i,l=this;return(l=e.call(this,n,"SYEV",r)||this).pinnedMessageIds=[],l.latestPinnedMessage=null,l.ts=0,r.data&&(l.pinnedMessageIds=null!==(i=r.data.pinned_message_ids)&&void 0!==i?i:[],l.latestPinnedMessage=r.data.latest_pinned_message?(0,o.T)(n,(0,a.g)({},r.data.latest_pinned_message)):null),l.ts=r.ts,l}return(0,a.c)(n,e),n}(a.W),h=function(e){function n(n,t){var r=e.call(this,n)||this;return r._logger=t.logger,r._sdkState=t.sdkState,r._sessionManager=t.sessionManager,r._requestQueue=t.requestQueue,r._dispatcher=t.dispatcher,r._cacheContext=t.cacheContext,r._channelType=t.channelType,r}return(0,a.c)(n,e),Object.defineProperty(n.prototype,"_messageBroadcast",{get:function(){return o.aL.of(this._iid)},enumerable:!1,configurable:!0}),n.prototype.subscribeMessageEvent=function(e,n){this._messageBroadcast.subscribe(e,n)},n.prototype.unsubscribeMessageEvent=function(e){this._messageBroadcast.unsubscribe(e)},n.prototype.getMessageFromCache=function(e){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){return[2,null]})})},n.prototype.getExactlyMatchingMessagesForTokenFromCache=function(e,n,t){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){return[2,[]]})})},n.prototype.getMessagesFromCache=function(e,n,t,r,i,o){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){return[2,[]]})})},n.prototype.getPollMessagesFromCache=function(e,n,t,r){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){return[2,[]]})})},n.prototype.getCachedMessageCountBetween=function(e,n,t,r){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){return[2,0]})})},n.prototype.getUnsentMessagesFromCache=function(e,n){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){return[2,[]]})})},n.prototype.removeFailedMessageFromCache=function(e){return(0,a._)(this,void 0,void 0,function(){return(0,a.b)(this,function(e){return[2]})})},n}(a.af),f=function(e){function n(n,t,r){var i,l,s,u,c=this;(c=e.call(this,n,"ADMM",r)||this).message=new o.aM(n,r);var d=a.V.of(n).sdkState;return c.isMentioned=(0,a.au)(c.message.mentionType,null!==(s=null!==(i=c.message.mentionedUserIds)&&void 0!==i?i:null===(l=c.message.mentionedUsers)||void 0===l?void 0:l.map(function(e){return e.userId}))&&void 0!==s?s:[],d.userId),c.forceUpdateLastMessage=null!==(u=r.force_update_last_message)&&void 0!==u&&u,c}return(0,a.c)(n,e),n}(a.W),m=function(e){function n(n,t,r){var i,l,s,u,c,d=this;(d=e.call(this,n,"AEDI",r)||this).message=new o.aM(n,r);var h=a.V.of(n).sdkState;return d.mentionCountChange=(0,a.aE)({mentionType:null===(i=r.old_values)||void 0===i?void 0:i.mention_type,mentionedUserIds:null!==(s=null===(l=r.old_values)||void 0===l?void 0:l.mentioned_user_ids)&&void 0!==s?s:[]},(0,a.u)({mentionType:d.message.mentionType,mentionedUserIds:null!==(u=d.message.mentionedUserIds)&&void 0!==u?u:null===(c=d.message.mentionedUsers)||void 0===c?void 0:c.map(function(e){return e.userId})}),h.userId),d}return(0,a.c)(n,e),n}(a.W),v=function(e){function n(n,t,r){var i=e.call(this,n,"MRCT",r)||this;return i.channelUrl=r.channel_url,i.channelType=r.channel_type,i.event=new o.aN(r),i}return(0,a.c)(n,e),n}(a.W),p=function(e){function n(n,t,r){var i=e.call(this,n,"MTHD",r)||this;return i.event=new o.a1(n,r),i}return(0,a.c)(n,e),n}(a.W),g=function(e){function n(n,t,r){var i=e.call(this,n,"MCNT",r)||this;return i.groupChannelMemberCounts=r.group_channels.map(function(e){return{channelUrl:e.channel_url,memberCount:e.member_count,joinedMemberCount:e.joined_member_count,updatedAt:e.ts}}),i.openChannelMemberCounts=r.open_channels.map(function(e){return{channelUrl:e.channel_url,participantCount:e.participant_count,updatedAt:e.ts}}),i}return(0,a.c)(n,e),n}(a.W),_=function(e){function n(n,t,r){var i=e.call(this,n,"PEDI",r)||this;return i.event=new l(n,r),i.status=(0,a.bm)(r.poll.status)||r.poll.status,i.channelUrl=r.channel_url,i.channelType=r.channel_type,i}return(0,a.c)(n,e),n}(a.W)},76873:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});
1var r=t(12394),i=t(67294),a=t(99486),o=t(27050);t(26748),t(34420),t(71091),t(69392),t(49805),t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(93122),t(41238),t(69561),t(78614),t(17061),t(92593),t(11228),t(80725),t(12382),t(90047),t(5701),t(14779),t(19332),t(80128),t(27394),t(42443),t(21415),t(55922),t(10364),t(72661),t(29229),t(411),t(9399),t(70179),t(4399),t(54627),t(56210),t(21790),t(74865),t(77958),t(9059),t(30402),t(16267),t(66421),t(8743),t(65134),t(58184),t(76599),t(27856),t(2041),t(3533),t(2121),t(91199),t(73862),t(69139),t(60090),t(67315),t(27835),t(30156),t(18087),t(56842),t(67412),t(10856),t(13462),t(22284),t(76886),t(32080),t(23012),t(1167),t(26862),t(37111),t(56342),t(68873),t(9434),t(34835),t(7593),t(81823),t(40286),t(50206),t(12210),t(64228),t(6989),t(95988),t(71612),t(68962),t(32177),t(28464),t(48845),t(33709),t(49754),t(47057),t(34498),t(64437),t(21402),t(15345),t(45143),t(74062),t(80385),t(76917),t(52597),t(79226),t(9343),t(87056),t(79555),t(26701),t(1758),t(11621),t(88137),t(94244),t(34919),t(10765),t(15956),t(3196),t(60196),t(57320),t(26001),t(85562),t(67840),t(19515),t(74535),t(97047);var l=function(e){return i.createElement(a.ms,(0,r._)({},e),i.createElement(o.Z,(0,r._)({},e)))}},29229:function(e,n,t){"use strict";t.d(n,{g:function(){return l}});var r=t(12394),i=t(67294),a=t(411),o=t(99486);t(43822),t(9399),t(70179),t(4399),t(54627),t(1608),t(64393),t(43847),t(41238),t(71091),t(7585),t(56210),t(21790),t(74865),t(29515),t(26748),t(34420),t(69392),t(49805),t(8978),t(73935),t(88569),t(93122),t(69561),t(78614),t(17061),t(92593),t(11228),t(80725),t(12382),t(90047),t(5701),t(14779),t(19332),t(80128);var l=function(e){var n=e.className,t=(0,o.vp)();return i.createElement(a.G,(0,r._)({},t,{className:n,currentChannel:t.currentGroupChannel}))}},27050:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var r=t(12394),i=t(67294),a=t(99486),o=t(27394),l=t(29229),s=t(77958),u=t
1(57320),c=t(88006);t(26748),t(34420),t(71091),t(69392),t(49805),t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(93122),t(41238),t(69561),t(78614),t(17061),t(92593),t(11228),t(80725),t(12382),t(90047),t(5701),t(14779),t(19332),t(80128),t(42443),t(21415),t(55922),t(10364),t(72661),t(411),t(9399),t(70179),t(4399),t(54627),t(56210),t(21790),t(74865),t(9059),t(30402),t(16267),t(66421),t(8743),t(65134),t(58184),t(76599),t(27856),t(2041),t(3533),t(2121),t(91199),t(73862),t(69139),t(60090),t(67315),t(27835),t(30156),t(18087),t(56842),t(67412),t(10856),t(13462),t(22284),t(76886),t(32080),t(23012),t(1167),t(26862),t(37111),t(56342),t(68873),t(9434),t(34835),t(7593),t(81823),t(40286),t(50206),t(12210),t(64228),t(6989),t(95988),t(71612),t(68962),t(32177),t(28464),t(48845),t(33709),t(49754),t(47057),t(34498),t(64437),t(21402),t(15345),t(45143),t(74062),t(80385),t(76917),t(52597),t(79226),t(9343),t(87056),t(79555),t(26701),t(1758),t(11621),t(88137),t(94244),t(34919),t(10765),t(15956),t(3196),t(60196),t(26001),t(85562),t(67840),t(19515),t(74535),t(97047);var d=function(e){var n=(0,a.vp)(),t=n.channelUrl,d=n.isInvalid,h=(0,c.d)(e),f=h.renderChannelHeader,m=h.renderMessageList,v=h.renderMessageInput;return i.createElement(o.G,(0,r._)({},e,n,{isLoading:null==e?void 0:e.isLoading,isInvalid:d,channelUrl:t,renderChannelHeader:void 0===f?function(e){return i.createElement(l.g,(0,r._)({},e))}:f,renderMessageList:void 0===m?function(e){return i.createElement(s.r,(0,r._)({},e,{className:"sendbird-conversation__message-list"}))}:m,renderMessageInput:void 0===v?function(){return i.createElement(u.j,(0,r._)({},e))}:v}))}},9343:function(e,n,t){"use strict";t.d(n,{$:function(){return l}});var r=t(12394),i=t(67294),a=t(87056),o=t(99486);t(73935),t(70179),t(4399),t(43822),t(1608),t(64393),t(49805),t(8978),t(69392),t(7585),t(43847),t(29515),t(88569),t(34420),t(71091),t(93122),t(41238),t(69561),t(78614),t(26748),t(17061),t(92593),t(11228),t(80725),t(12382),t(90047),t(5701),t(14779),t(19332),t(80128);var l=function(e){var n=(0,o.vp)().deleteMessage;return i.createElement(a.F,(0,r._)({},e,{deleteMessage:n}))}},9059:function(e,n,t){"use strict";t.d(n,{Z:function(){return h}});var r=t(12394),i=t(67294),a=t(41238),o=t(99486),l=t(49805),s=t(92593),u=t(30402),c=t(9343),d=t(79555);t(71091),t(26748),t(34420),t(69392),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(93122),t(69561),t(78614),t(17061),t(11228),t(80725),t(12382),t(90047),t(5701),t(14779),t(19332),t(8978),t(80128),t(16267),t(66421),t(8743),t(74865),t(65134),t(58184),t(76599),t(27856),t(2041),t(3533),t(2121),t(72661),t(91199),t(73862),t(69139),t(4399),t(60090),t(67315),t(27835),t(30156),t(18087),t(56842),t(70179),t(67412),t(10856),t(13462),t(22284),t(76886),t(32080),t(23012),t(1167),t(26862),t(37111),t(56342),t(68873),t(9434),t(34835),t(7593),t(81823),t(40286),t(50206),t(12210),t(21790),t(64228),t(6989),t(95988),t(71612),t(68962),t(32177),t(28464),t(48845),t(33709),t(49754),t(47057),t(34498),t(64437),t(21402),t(15345),t(45143),t(74062),t(80385),t(76917),t(52597),t(79226),t(87056),t(26701),t(1758);var h=function(e){var n,t,h,f=(0,a.A)().config,m=(0,o.vp)(),v=m.initialized,p=m.currentGroupChannel,g=m.animatedMessageId,_=m.setAnimatedMessageId,E=m.updateMessage,b=m.scrollToMessage,C=m.replyType,y=m.threadReplySelectType,N=m.isReactionEnabled,T=m.toggleReaction,S=m.emojiContainer,A=m.nicknamesMap,I=m.setQuoteMessage,M=m.resendMessage,O=m.deleteMessage,R=m.renderUserMentionItem,w=m.onReplyInThread,D=m.onQuoteMessageClick,L=m.onMessageAnimated,P=m.sendMessage,U=m.localMessages,x=e.message;return p?i.createElement(u.M,(0,r._)({},e,{channel:p,emojiContainer:S,editInputDisabled:!v||(0,s.b)(p)||(0,s.c)(p)||!f.isOnline,shouldRenderSuggestedReplies:(null===(n=null==f?void 0:f.groupChannel)||void 0===n?void 0:n.enableSuggestedReplies)&&((null===(t=null==f?void 0:f.groupChannel)||void 0===t?void 0:t.showSuggestedRepliesFor)==="all_messages"||x.messageId===(null===(h=null==p?void 0:p.lastMessage)||void 0===h?void 0:h.messageId))&&(null==U?void 0:U.length)===0&&(0,l.g)(x).length>0,isReactionEnabled:N,replyType:C,threadReplySelectType:y,nicknamesMap:A,renderUserMentionItem:R,scrollToMessage:b,toggleReaction:T,setQuoteMessage:I,onQuoteMessageClick:D,onReplyInThreadClick:w,sendUserMessage:function(e){P({message:e.message,mentionedUsers:e.mentionedUsers,mentionTemplate:e.mentionedMessageTemplate})},updateUserMessage:function(e,n){var t;E({messageId:e,message:null!==(t=n.message)&&void 0!==t?t:"",mentionedUsers:n.mentionedUsers,mentionTemplate:n.mentionedMessageTemplate})},resendMessage:M,deleteMessage:O,animatedMessageId:g,setAnimatedMessageId:_,onMessageAnimated:L,renderFileViewer:function(e){return i.createElement(c.$,(0,r._)({},e))},renderRemoveMessageModal:function(e){return i.createElement(d.Z,(0,r._)({},e))}})):null}},57320:function(e,n,t){"use strict";t.d(n,{j:function(){return l}});var r=t(12394),i=t(67294),a=t(26001),o=t(99486);t(16267),t(17061),t(41238),t(71091),t(7585),t(64393),t(85562),t(79226),t(1608),t(43822),t(70179),t(4399),t(58184),t(66421),t(67840),t(49805),t(8978),t(37111),t(32177),t(93122),t(69392),t(73935),t(43847),t(29515),t(88569),t(34420),t(69561),t(78614),t(19515),t(74535),t(28464),t(68962),t(21790),t(74865),t(65134),t(76599),t(27856),t(2041),t(97047),t(26748),t(92593),t(11228),t(80725),t(12382),t(90047),t(5701),t(14779),t(19332),t(80128);var l=function(e){var n=(0,o.vp)(),t=n.quoteMessage,l=n.currentGroupChannel,s=n.sendMessage,u=n.sendFileMessage,c=n.sendVoiceMessage,d=n.sendMultipleFilesMessage;return i.createElement(a.M,(0,r._)({},e,n,{currentChannel:l,messages:n.allMessages,sendUserMessage:function(e){return s({message:e.message,mentionTemplate:e.mentionedMessageTemplate,mentionedUsers:e.mentionedUsers,quoteMessage:null!=t?t:void 0})},sendFileMessage:function(e){return u(e.file,null!=t?t:void 0)},sendVoiceMessage:function(e,n){return c(e.file,n,null!=t?t:void 0)},sendMultipleFilesMessage:function(e){return d(e.fileInfoList.map(function(e){return e.file}),null!=t?t:void 0)}}))}},77958:function(e,n,t){"use strict";t.d(n,{r:function(){return C}});var r=t(67294),i=t(99486),a=t(10364),o=t(43822),l=t(9059),s=t(21415),u=t(92593),c=t(11621),d=t(88137),h=t(58972),f=t(41238),m=t(23012),v=t(94244),p=t(34919),g=t(10765),_=t(15956),E=t(3196),b=t(88006);t(12394),t(26748),t(34420),t(71091),t(69392),t(49805),t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(93122),t(69561),t(78614),t(17061),t(11228),t(80725),t(12382),t(90047),t(5701),t(14779),t(19332),t(80128),t(72661),t(30402),t(16267),t(66421),t(8743),t(74865),t(65134),t(58184),t(76599),t(27856),t(2041),t(3533),t(2121),t(91199),t(73862),t(69139),t(4399),t(60090),t(67315),t(27835),t(30156),t(18087),t(56842),t(70179),t(67412),t(10856),t(13462),t(22284),t(76886),t(32080),t(1167),t(26862),t(37111),t(56342),t(68873),t(9434),t(34835),t(7593),t(81823),t(40286),t(50206),t(12210),t(21790),t(64228),t(6989),t(95988),t(71612),t(68962),t(32177),t(28464),t(48845),t(33709),t(49754),t(47057),t(34498),t(64437),t(21402),t(15345),t(45143),t(74062),t(80385),t(76917),t(52597),t(79226),t(9343),t(87056),t(79555),t(26701),t(1758),t(60196);var C=function(e){var n,t,C,y,N,T,S,A,I,M,O,R,w=e.className,D=(0,b.d)(e),L=D.renderMessage,P=D.renderMessageContent,U=D.renderSuggestedReplies,x=D.renderCustomSeparator,k=D.renderPlaceholderLoader,F=D.renderPlaceholderEmpty,G=D.renderFrozenNotification,B=(0,i.vp)(),H=B.allMessages,V=B.localMessages,j=B.hasMorePrev,z=B.hasMoreNext,K=B.setInitialTimeStamp,Y=B.setAnimatedMessageId,Z=B.setHighLightedMessageId,Q=B.isMessageGroupingEnabled,W=B.scrollRef,q=B.onScrollCallback,X=B.onScrollDownCallback,$=B.messagesDispat
1cher,J=B.messageActionTypes,ee=B.currentGroupChannel,en=B.disableMarkAsRead,et=B.filterMessageList,er=B.replyType,ei=B.loading,ea=B.isScrolled,eo=B.unreadSince,el=B.unreadSinceDate,es=B.typingMembers,eu=(0,f.A)(),ec="function"==typeof et?H.filter(et):H,ed=eu.config.markAsReadScheduler,eh=(0,r.useState)(!1),ef=eh[0],em=eh[1];t=(n=(0,i.vp)()).scrollRef,y=void 0===(C=n.scrollBehavior)?"auto":C,(0,r.useEffect)(function(){t.current&&(t.current.style.scrollBehavior=y)},[t.current]);var ev=function(){var e,n;null==K||K(null),null==Y||Y(null),null==Z||Z(null),W.current&&W.current.scrollTop>-1&&(W.current.scrollTop=(null!==(e=W.current.scrollHeight)&&void 0!==e?e:0)-(null!==(n=W.current.offsetHeight)&&void 0!==n?n:0))},ep=function(e){void 0===e&&(e=!1);var n=null==W?void 0:W.current;if(n){var t=n.scrollHeight-n.scrollTop-n.offsetHeight;eC<t&&(!e||eC<h.S)&&(n.scrollTop+=t-eC)}},eg=(0,v.u)({hasMore:j,hasNext:z,onScroll:function(e){var n=null==W?void 0:W.current;if(null!=n){var t=n.scrollTop,r=n.clientHeight,i=n.scrollHeight;j&&(0,u.a)(t,0,h.S)&&q(e),z&&(0,u.a)(r+t,i,h.S)&&X(e),!en&&(0,u.a)(r+t,i,h.S)&&ee&&($({type:J.MARK_AS_READ,payload:{channel:ee}}),ed.push(ee))}},scrollRef:W}),e_=(0,_.u)({onReachedBottom:function(){z||en||!ee||($({type:J.MARK_AS_READ,payload:{channel:ee}}),ed.push(ee)),em(!0)},onReachedTop:function(){em(!1)},onInBetween:function(){em(!1)}}),eE=(T=(N=(0,r.useState)(0))[0],S=N[1],(0,r.useEffect)(function(){ei&&S(0)},[ei]),{scrollBottom:T,scrollToBottomHandler:(0,p.u)(function(e){var n=e.target;try{S(n.scrollHeight-n.scrollTop-n.offsetHeight)}catch(e){}},100,{trailing:!0})}),eb=eE.scrollToBottomHandler,eC=eE.scrollBottom;return ei?(void 0===k?function(){return r.createElement(a.Z,{type:a.v.LOADING})}:k)():ec.length<1?(void 0===F?function(){return r.createElement(a.Z,{className:"sendbird-conversation__no-messages",type:a.v.NO_MESSAGES})}:F)():r.createElement(r.Fragment,null,!ea&&r.createElement(a.Z,{type:a.v.LOADING}),r.createElement("div",{className:"sendbird-conversation__messages ".concat(void 0===w?"":w)},r.createElement("div",{className:"sendbird-conversation__scroll-container"},r.createElement("div",{className:"sendbird-conversation__padding"}),r.createElement("div",{className:"sendbird-conversation__messages-padding","data-testid":"sendbird-message-list-container",ref:W,onScroll:function(e){eg(),eb(e),e_(e)}},ec.map(function(e,n){var t,i,a=(0,E.v)({allMessages:ec,replyType:er,isMessageGroupingEnabled:Q,currentIndex:n,currentMessage:e,currentChannel:ee}),o=a.chainTop,s=a.chainBottom,u=a.hasSeparator,c=(null===(t=null==e?void 0:e.sender)||void 0===t?void 0:t.userId)===(null===(i=null==eu?void 0:eu.config)||void 0===i?void 0:i.userId);return r.createElement(m.x,{message:e,key:null==e?void 0:e.messageId,isByMe:c},r.createElement(l.Z,{handleScroll:ep,message:e,hasSeparator:u,chainTop:o,chainBottom:s,renderMessageContent:P,renderSuggestedReplies:U,renderCustomSeparator:x,renderMessage:L}))}),V.map(function(e,n){var t,i,a=(0,E.v)({allMessages:ec,replyType:er,isMessageGroupingEnabled:Q,currentIndex:n,currentMessage:e,currentChannel:ee}),o=a.chainTop,s=a.chainBottom,u=(null===(t=null==e?void 0:e.sender)||void 0===t?void 0:t.userId)===(null===(i=null==eu?void 0:eu.config)||void 0===i?void 0:i.userId);return r.createElement(m.x,{message:e,key:null==e?void 0:e.messageId,isByMe:u},r.createElement(l.Z,{handleScroll:ep,message:e,chainTop:o,chainBottom:s,renderMessageContent:P,renderSuggestedReplies:U,renderCustomSeparator:x,renderMessage:L}))}),!z&&(null===(I=null===(A=null==eu?void 0:eu.config)||void 0===A?void 0:A.groupChannel)||void 0===I?void 0:I.enableTypingIndicator)&&(null===(R=null===(O=null===(M=null==eu?void 0:eu.config)||void 0===M?void 0:M.groupChannel)||void 0===O?void 0:O.typingIndicatorTypes)||void 0===R?void 0:R.has(s.T.Bubble))&&r.createElement(g.Z,{typingMembers:es,handleScroll:ep}))),(null==ee?void 0:ee.isFrozen)&&(void 0===G?function(){return r.createElement(d.O,{className:"sendbird-conversation__messages__notification"})}:G)(),(!ef||z)&&(eo||el)&&r.createElement(c.b,{className:"sendbird-conversation__messages__notification",count:null==ee?void 0:ee.unreadMessageCount,time:eo,lastReadAt:el,onClick:function(){(null==W?void 0:W.current)&&(W.current.scrollTop=W.current.scrollHeight),!en&&ee&&(ed.push(ee),$({type:J.MARK_AS_READ,payload:{channel:ee}})),K(null),Y(null),Z(null)}}),eC>50&&r.createElement("div",{className:"sendbird-conversation__scroll-bottom-button",onClick:ev,onKeyDown:ev,tabIndex:0,role:"button"},r.createElement(o.ZP,{width:"24px",height:"24px",type:o.Qy.CHEVRON_DOWN,fillColor:o.zo.PRIMARY}))))}},79555:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(12394),i=t(67294),a=t(26701),o=t(99486);t(69392),t(49805),t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(34420),t(71091),t(93122),t(41238),t(69561),t(78614),t(1758),t(26748),t(17061),t(92593),t(11228),t(80725),t(12382),t(90047),t(5701),t(14779),t(19332),t(80128);var l=function(e){var n=(0,o.vp)().deleteMessage;return i.createElement(a.R,(0,r._)({},e,{deleteMessage:n}))}},99486:function(e,n,t){"use strict";t.d(n,{ms:function(){return x},vp:function(){return k}});var r=t(12394),i=t(67294),a=t(26748),o=t(41238),l=t(17061),s=t(92593),u=t(14761),c=t(11228),d=t(36614),h=t(4500),f=t(49805),m=t(80725),v=function(e){return null==e};function p(e,n){return!(v(e)||v(n))&&e.toString()===n.toString()}var g=t(12382),_=t(7585),E=t(42391),b=t(56299),C=t(90047),y=t(58972),N=t(5701),T=t(14779),S=t(15071),A=t(19332),I=t(80128);t(34420),t(71091),t(69392),t(73935),t(43847),t(29515),t(88569),t(1608),t(64393),t(43822),t(93122),t(69561),t(78614),t(8978);var M={initialized:!1,loading:!0,allMessages:[],localMessages:[],currentGroupChannel:null,hasMorePrev:!1,oldestMessageTimeStamp:0,hasMoreNext:!1,latestMessageTimeStamp:0,emojiContainer:{emojiCategories:[],emojiHash:""},unreadSince:null,unreadSinceDate:null,isInvalid:!1,readStatus:null,messageListParams:null,typingMembers:[]},O=function(e){void 0===e&&(e=[]);var n=e[0];return n&&n.createdAt||null},R=function(e){void 0===e&&(e=[]);var n=e[e.length-1];return n&&n.createdAt||null};function w(e){return"reqId"in e}function D(e,n){var t=(0,_.u)().stringSet;return(0,f.K)(n).with({type:m.R},function(){return(0,r._)((0,r._)({},e),{hasMorePrev:!1,hasMoreNext:!1,allMessages:[],localMessages:[]})}).with({type:m.F},function(){return(0,r._)((0,r._)({},e),{loading:!0,allMessages:e.allMessages.filter(function(e){return!(0,f.k)(e)||e.sendingStatus!==d.ao.SUCCEEDED}),localMessages:[]})}).with({type:m.a},function(n){var t,i=n.payload,a=i.currentGroupChannel,o=i.messages;if((null==a?void 0:a.url)!==(null===(t=e.currentGroupChannel)||void 0===t?void 0:t.url))return e;var l=O(o),s=R(o);return(0,r._)((0,r._)({},e),{loading:!1,initialized:!0,hasMorePrev:!0,hasMoreNext:!0,oldestMessageTimeStamp:l,latestMessageTimeStamp:s,allMessages:(0,r.c)([],o,!0)})}).with({type:m.c},function(n){var t,i,a,o,l=n.payload,s=l.currentGroupChannel,u=l.messages;if((null==s?void 0:s.url)!==(null===(t=e.currentGroupChannel)||void 0===t?void 0:t.url))return e;var c=(null!==(i=null==u?void 0:u.length)&&void 0!==i?i:0)>=(null!==(o=null===(a=null==e?void 0:e.messageListParams)||void 0===a?void 0:a.prevResultSize)&&void 0!==o?o:g.P)+1,d=O(u),h=[],f=e.allMessages.map(function(e){var n=u.find(function(n){return p(n.messageId,e.messageId)});return n?(h.push(n.messageId),n.updatedAt>e.updatedAt?n:e):e}),m=h.length>0?u.filter(function(e){return!h.find(function(n){return p(n,e.messageId)})}):u;return(0,r._)((0,r._)({},e),{hasMorePrev:c,oldestMessageTimeStamp:d,allMessages:(0,r.c)((0,r.c)([],m,!0),f,!0)})}).with({type:m.d},function(n){var t,i,a,o,l=n.payload,u=l.currentGroupChannel,c=l.messages;if((null==u?void 0:u.url)!==(null===(t=e.currentGroupChannel)||void 0===t?void 0:t.url))return e;var d=(null!==(i=null==c?void 0:c.length)&&void 0!==i?i:0)===(null!==(o=null===(a=null==e?void 0:e.messageListParams)||void 0===a?void 0:a.nextResultSize)&&void 0!==o?o:g.N)+1,h=R(c),f=(0,s.m)(e.allMessages,c);return(0,r._)((0,r._)({},e),{hasMoreNext:d,latestMessageTimeStamp:h,allMessages:f})}).with({type:f.a0.union(m.b,m.e,m.f)},function(n){var t,i=n.payload.currentGroupChannel;if((null==i?void 0:i.url)!==(null===(t=null==e?void 0:e.currentGroupChannel)||void 0===t?void 0:t.url))return e;
1var a=[m.b].includes(n.type);return(0,r._)((0,r._)({},e),{loading:!1,isInvalid:a,initialized:!1,allMessages:[],hasMorePrev:!1,hasMoreNext:!1,oldestMessageTimeStamp:null,latestMessageTimeStamp:null})}).with({type:m.S},function(n){return(0,r._)((0,r._)({},e),{localMessages:(0,r.c)((0,r.c)([],e.localMessages,!0),[n.payload],!1)})}).with({type:m.g},function(n){var t=n.payload,i=e.allMessages.filter(function(e){return!w(e)||(null==e?void 0:e.reqId)!==(null==t?void 0:t.reqId)});return(0,r._)((0,r._)({},e),{allMessages:(0,r.c)((0,r.c)([],i,!0),[t],!1),localMessages:e.localMessages.filter(function(e){return w(e)&&(null==e?void 0:e.reqId)!==(null==t?void 0:t.reqId)})})}).with({type:m.h},function(n){return n.payload.failed=!0,(0,r._)((0,r._)({},e),{localMessages:e.localMessages.map(function(e){return p(w(e)&&e.reqId,n.payload.reqId)?n.payload:e})})}).with({type:m.i},function(n){return(0,r._)((0,r._)({},e),{currentGroupChannel:n.payload,isInvalid:!1})}).with({type:m.j},function(){return(0,r._)((0,r._)({},e),{currentGroupChannel:null,allMessages:[],localMessages:[],isInvalid:!0})}).with({type:m.O},function(n){var i,a,o=n.payload,l=o.channel,u=o.message,d=l.members,h=u.sender,m=e.currentGroupChannel,v=null==m?void 0:m.url;if(!p(null==l?void 0:l.url,v)||e.allMessages.some(function(e){return e.messageId===u.messageId})||e.messageListParams&&!(0,f.a2)(e.messageListParams,u))return e;if(u.isAdminMessage&&u.isAdminMessage())return(0,r._)((0,r._)({},e),{allMessages:(0,s.p)(e.allMessages,u)});var g=null==d?void 0:d.find(function(e){return(null==e?void 0:e.userId)===(null==h?void 0:h.userId)});return((null==g?void 0:g.profileUrl)!==(null==h?void 0:h.profileUrl)||(null==g?void 0:g.friendName)!==(null==h?void 0:h.friendName)||(null==g?void 0:g.nickname)!==(null==h?void 0:h.nickname))&&(l.members=d.map(function(e){return e.userId===h.userId?h:e})),(0,r._)((0,r._)({},e),{currentGroupChannel:l,unreadSince:null!==(i=e.unreadSince)&&void 0!==i?i:(0,c.f)(new Date,t.DATE_FORMAT__UNREAD_SINCE),unreadSinceDate:null!==(a=e.unreadSinceDate)&&void 0!==a?a:new Date,allMessages:(0,s.p)(e.allMessages,u)})}).with({type:m.k},function(n){var t,i=n.payload,a=i.channel,o=i.message,l=(null===(t=null==e?void 0:e.currentGroupChannel)||void 0===t?void 0:t.url)||"";return p(null==a?void 0:a.url,l)?e.messageListParams&&!(0,f.a2)(e.messageListParams,o)?(0,r._)((0,r._)({},e),{allMessages:e.allMessages.filter(function(e){return!p(e.messageId,null==o?void 0:o.messageId)})}):(0,r._)((0,r._)({},e),{allMessages:e.allMessages.map(function(e){return p(e.messageId,o.messageId)?o:(p(e.parentMessageId,o.messageId)&&(e.parentMessage=o),e)})}):e}).with({type:m.l},function(n){var t,i=n.payload,a=i.channel,o=i.event,l=o.channelUrl,s=o.threadInfo,u=o.targetMessageId,c=(null===(t=null==e?void 0:e.currentGroupChannel)||void 0===t?void 0:t.url)||"";return p(null==a?void 0:a.url,c)&&p(null==a?void 0:a.url,l)?(0,r._)((0,r._)({},e),{allMessages:e.allMessages.map(function(e){return p(e.messageId,u)&&(e.threadInfo=s),e})}):e}).with({type:m.m},function(n){return(0,r._)((0,r._)({},e),{localMessages:e.localMessages.map(function(e){return p(w(e)&&e.reqId,n.payload.reqId)?n.payload:e})})}).with({type:m.n},function(n){var t,i,a;return(null===(t=e.currentGroupChannel)||void 0===t?void 0:t.url)!==(null===(a=null===(i=n.payload)||void 0===i?void 0:i.channel)||void 0===a?void 0:a.url)?e:(0,r._)((0,r._)({},e),{unreadSince:null,unreadSinceDate:null})}).with({type:m.o},function(n){return(0,r._)((0,r._)({},e),{allMessages:e.allMessages.filter(function(e){return!p(e.messageId,n.payload)})})}).with({type:m.p},function(n){return(0,r._)((0,r._)({},e),{localMessages:e.localMessages.filter(function(e){return!p(w(e)&&e.reqId,n.payload)})})}).with({type:m.q},function(n){return(0,r._)((0,r._)({},e),{emojiContainer:n.payload})}).with({type:m.r},function(n){return(0,r._)((0,r._)({},e),{allMessages:e.allMessages.map(function(e){return p(e.messageId,n.payload.messageId)&&e.applyReactionEvent&&"function"==typeof e.applyReactionEvent&&e.applyReactionEvent(n.payload),e})})}).with({type:m.M},function(n){return(0,r._)((0,r._)({},e),{messageListParams:n.payload})}).with({type:m.s},function(n){var t,i,a=n.payload,o=a.channelUrl,l=a.requestId,s=a.index,u=a.uploadableFileInfo,c=a.error;
1if(!p(o,null===(t=null==e?void 0:e.currentGroupChannel)||void 0===t?void 0:t.url)||c)return e;var d=e.localMessages,h=null===(i=d.find(function(e){return p(w(e)&&e.reqId,l)}).messageParams)||void 0===i?void 0:i.fileInfoList;return Array.isArray(h)&&(h[s]=u),(0,r._)((0,r._)({},e),{localMessages:d})}).with({type:m.t},function(n){var t,i=n.payload,a=i.channel,o=i.typingMembers;return p(a.url,null===(t=null==e?void 0:e.currentGroupChannel)||void 0===t?void 0:t.url)?(0,r._)((0,r._)({},e),{typingMembers:o}):e}).otherwise(function(){return e})}var L=function(e,n){var t=e.currentGroupChannel,r=e.onBeforeSendVoiceMessage,a=n.logger,o=n.pubSub,l=n.scrollRef,u=n.messagesDispatcher;return[(0,i.useCallback)(function(e,n,i){return new Promise(function(c,d){if(t){var f=r&&"function"==typeof r?r(e,i):{file:e,fileName:y.f,mimeType:y.b,metaArrays:[new h.aq({key:y.M,value:["".concat(n)]}),new h.aq({key:y.g,value:[y.h]})]};i&&(f.isReplyToChannel=!0,f.parentMessageId=i.messageId),a.info("Channel: Start sending voice message",f),t.sendFileMessage(f).onPending(function(e){o.publish(N.p.SEND_MESSAGE_START,{message:e,channel:t,publishingModules:[N.P.CHANNEL]}),setTimeout(function(){return(0,s.s)(0,l)},y.e)}).onFailed(function(e,n){a.error("Channel: Sending voice message failed!",{failedMessage:n,err:e}),u({type:m.h,payload:n}),d(e)}).onSucceeded(function(e){a.info("Channel: Sending voice message success!",e),u({type:m.g,payload:e}),c(e)})}})},[t,r])]},P=function(e){var n=e.channelUrl,t=e.sdkInit,r=e.pubSub,a=e.dispatcher,o=e.scrollRef;(0,i.useEffect)(function(){var e=new Map;return(null==r?void 0:r.subscribe)&&(e.set(N.b.SEND_USER_MESSAGE,r.subscribe(N.b.SEND_USER_MESSAGE,function(e){var t=e.channel,r=e.message;n===(null==t?void 0:t.url)&&(a({type:m.g,payload:r}),setTimeout(function(){return(0,s.s)(0,o)},y.e))})),e.set(N.b.SEND_MESSAGE_START,r.subscribe(N.b.SEND_MESSAGE_START,function(e){var t=e.channel,r=e.message,i=e.publishingModules;n===(null==t?void 0:t.url)&&(0,N.s)(i)&&a({type:m.S,payload:r})})),e.set(N.b.ON_FILE_INFO_UPLOADED,r.subscribe(N.b.ON_FILE_INFO_UPLOADED,function(e){var t=e.response,r=e.publishingModules;n===t.channelUrl&&(0,N.s)(r)&&a({type:m.s,payload:t})})),e.set(N.b.SEND_MESSAGE_FAILED,r.subscribe(N.b.SEND_MESSAGE_FAILED,function(e){var t=e.channel,r=e.message,i=e.publishingModules;n===(null==t?void 0:t.url)&&(0,N.s)(i)&&a({type:m.h,payload:r})})),e.set(N.b.SEND_FILE_MESSAGE,r.subscribe(N.b.SEND_FILE_MESSAGE,function(e){var t=e.channel,r=e.message;n===(null==t?void 0:t.url)&&(a({type:m.g,payload:r}),setTimeout(function(){return(0,s.s)(0,o)},y.e))})),e.set(N.b.UPDATE_USER_MESSAGE,r.subscribe(N.b.UPDATE_USER_MESSAGE,function(e){var t=e.channel,r=e.message;e.fromSelector&&n===(null==t?void 0:t.url)&&t.isGroupChannel()&&a({type:m.k,payload:{channel:t,message:r}})})),e.set(N.b.DELETE_MESSAGE,r.subscribe(N.b.DELETE_MESSAGE,function(e){var t=e.channel,r=e.messageId;n===(null==t?void 0:t.url)&&a({type:m.o,payload:r})}))),function(){e.forEach(function(e){try{e.remove()}catch(e){}})}},[n,t])},U=i.createContext(null),x=function(e){var n,t,c,h,v,_,O,R,w,x,k,F,G,B,H,V,j,z,K,Y,Z,Q,W,q,X,$,J,ee,en,et,er,ei,ea,eo,el,es,eu,ec,ed,eh,ef,em,ev,ep,eg,e_,eE,eb,eC,ey,eN,eT,eS,eA,eI,eM,eO,eR,ew,eD,eL,eP,eU,ex,ek,eF,eG,eB,eH,eV,ej,ez,eK,eY,eZ,eQ,eW,eq,eX,e$,eJ,e0,e1,e2,e3,e6,e4,e7,e5,e8,e9,ne,nn,nt,nr,ni,na,no,nl,ns,nu,nc,nd,nh,nf,nm,nv,np,ng=e.channelUrl,n_=e.children,nE=e.isReactionEnabled,nb=e.isMessageGroupingEnabled,nC=e.isMultipleFilesMessageEnabled,ny=e.showSearchIcon,nN=e.animatedMessage,nT=e.highlightedMessage,nS=e.startingPoint,nA=e.onBeforeSendUserMessage,nI=e.onBeforeSendFileMessage,nM=e.onBeforeUpdateUserMessage,nO=e.onBeforeSendVoiceMessage,nR=e.onBeforeSendMultipleFilesMessage,nw=e.onChatHeaderActionClick,nD=e.onSearchClick,nL=e.onBackClick,nP=e.threadReplySelectType,nU=e.queries,nx=e.filterMessageList,nk=e.disableMarkAsRead,nF=void 0!==nk&&nk,nG=e.onReplyInThread,nB=e.onQuoteMessageClick,nH=e.onMessageAnimated,nV=e.onMessageHighlighted,nj=e.scrollBehavior,nz=e.reconnectOnIdle,nK=(0,o.A)(),nY=nK.config,nZ=null!==(nd=e.replyType)&&void 0!==nd?nd:(0,S.g)(nY.groupChannel.replyType).upperCase,nQ=nY.pubSub,nW=nY.logger,nq=nY.userId,nX=nY.isOnline,n$=nY.imageCompression,nJ=nY.markAsReadScheduler,n0=nY.groupChannel,n1=nY.htmlTextDirection,n2=nY.forceLeftToRightMessageLayout,n3=null===(nf=null===(nh=null==nK?void 0:nK.stores)||void 0===nh?void 0:nh.sdkStore)||void 0===nf?void 0:nf.sdk,n6=null===(nv=null===(nm=null==nK?void 0:nK.stores)||void 0===nm?void 0:nm.sdkStore)||void 0===nv?void 0:nv.initialized,n4=null==nK?void 0:nK.config,n7=(0,i.useState)(nS),n5=n7[0],n8=n7[1];(0,i.useEffect)(function(){n8(nS)},[nS,ng]);var n9=(0,i.useState)(null),te=n9[0],tn=n9[1],tt=(0,i.useState)(nT),tr=tt[0],ti=tt[1];(0,i.useEffect)(function(){ti(nT)},[nT]);var ta=null==nU?void 0:nU.messageListParams,to=(0,i.useState)(null),tl=to[0],ts=to[1],tu=(0,i.useState)(!1),tc=tu[0],td=tu[1],th=(0,i.useReducer)(D,M),tf=th[0],tm=th[1],tv=(0,i.useRef)(null),tp=n0.enableMention,tg=tf.allMessages,t_=tf.localMe
1ssages,tE=tf.loading,tb=tf.initialized,tC=tf.unreadSince,ty=tf.unreadSinceDate,tN=tf.isInvalid,tT=tf.currentGroupChannel,tS=tf.hasMorePrev,tA=tf.oldestMessageTimeStamp,tI=tf.hasMoreNext,tM=tf.latestMessageTimeStamp,tO=tf.emojiContainer,tR=tf.readStatus,tw=tf.typingMembers,tD=(0,u.g)({channel:tT,config:nY,moduleLevel:nE}),tL=(0,i.useMemo)(function(){return tD?(0,s.g)(tO):new Map},[tO]),tP=(0,i.useMemo)(function(){return tD&&tT?(0,s.e)(null==tT?void 0:tT.members):new Map},[null==tT?void 0:tT.members]);(0,i.useEffect)(function(){nN&&tn(nN)},[nN]);var tU=(n={currentGroupChannel:tT,oldestMessageTimeStamp:tA,userFilledMessageListQuery:ta,replyType:nZ},t={hasMorePrev:tS,logger:nW,messagesDispatcher:tm,sdk:n3},c=n.currentGroupChannel,h=n.oldestMessageTimeStamp,v=n.userFilledMessageListQuery,_=n.replyType,O=t.hasMorePrev,R=t.logger,w=t.messagesDispatcher,x=t.sdk,(0,i.useCallback)(function(e){if(O){var n,t,r={prevResultSize:g.P,isInclusive:!0,includeMetaArray:!0,includeReactions:null!==(t=null===(n=null==x?void 0:x.appInfo)||void 0===n?void 0:n.useReaction)&&void 0!==t&&t};("QUOTE_REPLY"===_||"THREAD"===_)&&(r.includeThreadInfo=!0,r.includeParentMessageInfo=!0,r.replyType=d.ay.ONLY_REPLY_TO_CHANNEL),v&&Object.keys(v).forEach(function(e){r[e]=v[e]}),R.info("Channel: Fetching messages",{currentGroupChannel:c,userFilledMessageListQuery:v}),null==c||c.getMessagesByTimestamp(h||new Date().getTime(),r).then(function(n){w({type:m.c,payload:{currentGroupChannel:c,messages:n}}),e&&setTimeout(function(){return e()})}).catch(function(){w({type:m.e,payload:{currentGroupChannel:c}})})}},[c,h,_])),tx=(F=(k={setInitialTimeStamp:n8,setAnimatedMessageId:tn,allMessages:tg,scrollRef:tv}).setInitialTimeStamp,G=k.setAnimatedMessageId,B=k.allMessages,H=k.scrollRef,(0,i.useCallback)(function(e,n){var t=B.find(function(e){return e.messageId===n});G(null),setTimeout(function(){var r,i,a,o;try{nW.info("Channel: scroll to message - disabling mouse events"),i=null==(r=H.current)?void 0:r.parentNode,r&&i&&(r.style.pointerEvents="none",i.style.cursor="wait"),t?(nW.info("Channel: scroll to message - message is present"),G(n),(0,s.d)(H,e)):(nW.info("Channel: scroll to message - fetching older messages"),F(null),F(e),G(n))}finally{nW.info("Channel: scroll to message - enabled mouse events"),o=null==(a=H.current)?void 0:a.parentNode,a&&o&&(a.style.pointerEvents="auto",o.style.cursor="auto")}})},[F,G,B])),tk=(V={currentGroupChannel:tT,latestMessageTimeStamp:tM,userFilledMessageListQuery:ta,hasMoreNext:tI,replyType:nZ},j={logger:nW,messagesDispatcher:tm,sdk:n3},z=V.currentGroupChannel,K=V.latestMessageTimeStamp,Y=V.userFilledMessageListQuery,Z=V.hasMoreNext,Q=V.replyType,W=j.logger,q=j.messagesDispatcher,X=j.sdk,(0,i.useCallback)(function(e){if(Z){var n,t,r=null!==(t=null===(n=null==X?void 0:X.appInfo)||void 0===n?void 0:n.useReaction)&&void 0!==t&&t,i={nextResultSize:g.N,isInclusive:!0,includeReactions:r,includeMetaArray:!0};Q&&("QUOTE_REPLY"===Q||"THREAD"===Q)&&(i.includeThreadInfo=!0,i.includeParentMessageInfo=!0,i.replyType=d.ay.ONLY_REPLY_TO_CHANNEL),Y&&Object.keys(Y).forEach(function(e){i[e]=Y[e]}),W.info("Channel: Fetching later messages",{currentGroupChannel:z,userFilledMessageListQuery:Y}),null==z||z.getMessagesByTimestamp(K||new Date().getTime(),i).then(function(n){q({type:m.d,payload:{currentGroupChannel:z,messages:n}}),setTimeout(function(){return e([n,null])})}).catch(function(n){W.error("Channel: Fetching later messages failed",n),q({type:m.f,payload:{currentGroupChannel:z}}),setTimeout(function(){return e([null,n])})})}},[z,K,Z,Q])),tF=(0,T.u)(tT,nW);$={channelUrl:ng,sdkInit:n6,disableMarkAsRead:nF},J={messagesDispatcher:tm,sdk:n3,logger:nW,markAsReadScheduler:nJ},ee=$.channelUrl,en=$.sdkInit,et=$.disableMarkAsRead,er=J.messagesDispatcher,ei=J.sdk,ea=J.logger,eo=J.markAsReadScheduler,(0,i.useEffect)(function(){ee&&en&&ei&&ei.groupChannel&&(ea.info("Channel | useSetChannel fetching channel",ee),ei.groupChannel.getChannel(ee).then(function(e){ea.info("Channel | useSetChannel fetched channel",e),er({type:m.i,payload:e}),ea.info("Channel: Mark as read",e),et||eo.push(e)}).catch(function(e){ea.warning("Channel | useSetChannel fetch channel failed",{channelUrl:ee,e:e}),er({type:m.j})}),ei.getAllEmoji().then(function(e){ea.info("Channel: Getting emojis success",e),er({type:m.q,payload:e})}).catch(function(e){ea.error("Channel: Getting emojis failed",e)}))},[ee,en]),(0,i.useEffect)(function(){ts(null)},[ng]),el={currentGroupChannel:tT,sdkInit:n6,currentUserId:nq,disableMarkAsRead:nF}
1,es={messagesDispatcher:tm,sdk:n3,logger:nW,scrollRef:tv,setQuoteMessage:ts},eh=el.sdkInit,ef=el.currentGroupChannel,em=el.disableMarkAsRead,ev=es.sdk,ep=es.logger,eg=es.scrollRef,e_=es.setQuoteMessage,eE=es.messagesDispatcher,ey=(eC=(eb=(0,o.A)()).config).markAsReadScheduler,eN=eC.markAsDeliveredScheduler,eT=eC.disableMarkAsDelivered,eS=null===(ed=null===(ec=null===(eu=eb.stores.sdkStore.sdk)||void 0===eu?void 0:eu.appInfo)||void 0===ec?void 0:ec.premiumFeatureList)||void 0===ed?void 0:ed.find(function(e){return"delivery_receipt"===e}),(0,i.useEffect)(function(){var e,n=null==ef?void 0:ef.url,t=(0,b.u)();if(n&&eh){var r={onMessageReceived:function(e,t){var r,i;if(e.isGroupChannel()&&p(null==e?void 0:e.url,n)){var a=!1;try{var o=eg.current;o&&(a=o.offsetHeight+o.scrollTop>=o.scrollHeight-10)}catch(e){}if(ep.info("Channel | useHandleChannelEvents: onMessageReceived",t),eE({type:m.O,payload:{channel:e,message:t}}),a&&(null===(r=document.getElementById("sendbird-dropdown-portal"))||void 0===r?void 0:r.childElementCount)===0&&(null===(i=document.getElementById("sendbird-emoji-list-portal"))||void 0===i?void 0:i.childElementCount)===0)try{setTimeout(function(){return(0,s.s)(0,eg)}),em||ey.push(ef),eS&&!eT&&eN.push(ef)}catch(e){ep.warning("Channel | onMessageReceived | scroll to end failed")}}},onUnreadMemberStatusUpdated:function(e){ep.info("Channel | useHandleChannelEvents: onUnreadMemberStatusUpdated",e),p(null==e?void 0:e.url,n)&&eE({type:m.i,payload:e})},onUndeliveredMemberStatusUpdated:function(e){p(null==e?void 0:e.url,n)&&(ep.info("Channel | useHandleChannelEvents: onDeliveryReceiptUpdated",e),eE({type:m.i,payload:e}))},onMessageUpdated:function(e,t){e.isGroupChannel()&&p(null==e?void 0:e.url,n)&&(ep.info("Channel | useHandleChannelEvents: onMessageUpdated",t),eE({type:m.k,payload:{channel:e,message:t}}))},onThreadInfoUpdated:function(e,t){e.isGroupChannel()&&p(null==e?void 0:e.url,n)&&(ep.info("Channel | useHandleChannelEvents: onThreadInfoUpdated",{channel:e,threadInfoUpdateEvent:t}),eE({type:m.l,payload:{channel:e,event:t}}))},onMessageDeleted:function(e,n){ep.info("Channel | useHandleChannelEvents: onMessageDeleted",{channel:e,messageId:n}),e_(null),eE({type:m.o,payload:n})},onReactionUpdated:function(e,n){ep.info("Channel | useHandleChannelEvents: onReactionUpdated",{channel:e,reactionEvent:n}),eE({type:m.r,payload:n})},onChannelChanged:function(e){e.isGroupChannel()&&p(null==e?void 0:e.url,n)&&(ep.info("Channel | useHandleChannelEvents: onChannelChanged",e),eE({type:m.i,payload:e}))},onChannelFrozen:function(e){e.isGroupChannel()&&p(null==e?void 0:e.url,n)&&(ep.info("Channel | useHandleChannelEvents: onChannelFrozen",e),eE({type:m.i,payload:e}))},onChannelUnfrozen:function(e){e.isGroupChannel()&&p(null==e?void 0:e.url,n)&&(ep.info("Channel | useHandleChannelEvents: onChannelUnFrozen",e),eE({type:m.i,payload:e}))},onUserMuted:function(e,t){e.isGroupChannel()&&p(null==e?void 0:e.url,n)&&(ep.info("Channel | useHandleChannelEvents: onUserMuted",{channel:e,user:t}),eE({type:m.i,payload:e}))},onUserUnmuted:function(e,t){e.isGroupChannel()&&p(null==e?void 0:e.url,n)&&(ep.info("Channel | useHandleChannelEvents: onUserUnmuted",{channel:e,user:t}),eE({type:m.i,payload:e}))},onUserBanned:function(e,t){var r;if(p(null==e?void 0:e.url,n)&&e.isGroupChannel()){ep.info("Channel | useHandleChannelEvents: onUserBanned",{channel:e,user:t});var i=(null==t?void 0:t.userId)===(null===(r=null==ev?void 0:ev.currentUser)||void 0===r?void 0:r.userId);eE({type:m.i,payload:i?null:e})}},onOperatorUpdated:function(e,t){e.isGroupChannel()&&p(null==e?void 0:e.url,n)&&(ep.info("Channel | useHandleChannelEvents: onOperatorUpdated",{channel:e,users:t}),eE({type:m.i,payload:e}))},onUserLeft:function(e,t){var r;if(p(null==e?void 0:e.url,n)){ep.info("Channel | useHandleChannelEvents: onUserLeft",{channel:e,user:t});var i=(null==t?void 0:t.userId)===(null===(r=null==ev?void 0:ev.currentUser)||void 0===r?void 0:r.userId);eE({type:m.i,payload:i?null:e})}},onTypingStatusUpdated:function(e){if(p(null==e?void 0:e.url,n)){ep.info("Channel | onTypingStatusUpdated",{channel:e});var t=e.getTypingUsers();eE({type:m.t,payload:{channel:e,typingMembers:t}})}}};ep.info("Channel | useHandleChannelEvents: Setup event handler",{channelHandlerId:t,channelHandler:r}),null===(e=ev.groupChannel)||void 0===e||e.addGroupChannelHandler(t,new E.pe(r))}return function(){var e;(null===(e=null==ev?void 0:ev.groupChannel)||void 0===e?void 0:e.removeGroupChannelHandler)?(ep.info("Channel | useHandleChannelEvents: Removing message reciver handler",t),ev.groupChannel.removeGroupChannelHandler(t)):(null==ev?void 0:ev.groupChannel)&&ep.error("Channel | useHandleChannelEvents: Not found the removeGroupChannelHandler")}},[null==ef?void 0:ef.url,eh]),(0,g.u)({currentGroupChannel:tT,userFilledMessageListQuery:ta,initialTimeStamp:n5,replyType:nZ,setIsScrolled:td}
1,{logger:nW,scrollRef:tv,messagesDispatcher:tm}),P({channelUrl:ng,sdkInit:n6,pubSub:nQ,dispatcher:tm,scrollRef:tv}),eA={isOnline:nX,replyType:nZ,disableMarkAsRead:nF,reconnectOnIdle:void 0===nz||nz},eI={logger:nW,sdk:n3,scrollRef:tv,currentGroupChannel:tT,messagesDispatcher:tm,userFilledMessageListQuery:ta,markAsReadScheduler:nJ},eM=eA.isOnline,eO=eA.replyType,eR=eA.disableMarkAsRead,ew=eA.reconnectOnIdle,eD=eI.logger,eL=eI.sdk,eP=eI.scrollRef,eU=eI.currentGroupChannel,ex=eI.messagesDispatcher,ek=eI.markAsReadScheduler,eF=eI.userFilledMessageListQuery,eG=(0,C.u)(eM,eU,ew).shouldReconnect,(0,i.useEffect)(function(){return function(){var e,n,t;if(eG){eD.info("Refreshing conversation state");var r=(null===(e=null==eL?void 0:eL.appInfo)||void 0===e?void 0:e.useReaction)||!1,i={prevResultSize:g.P,isInclusive:!0,includeReactions:r,includeMetaArray:!0,nextResultSize:g.N};eO&&"QUOTE_REPLY"===eO&&(i.includeThreadInfo=!0,i.includeParentMessageInfo=!0,i.replyType=d.ay.ONLY_REPLY_TO_CHANNEL),eF&&Object.keys(eF).forEach(function(e){i[e]=eF[e]}),eD.info("Channel: Fetching messages",{currentGroupChannel:eU,userFilledMessageListQuery:eF}),ex({type:m.F,payload:null}),null===(n=null==eL?void 0:eL.groupChannel)||void 0===n||n.getChannel(null!==(t=null==eU?void 0:eU.url)&&void 0!==t?t:"").then(function(e){var n=new Date().getTime();e.getMessagesByTimestamp(n,i).then(function(n){ex({type:m.a,payload:{currentGroupChannel:e,messages:n}}),setTimeout(function(){return(0,s.s)(0,eP)},y.d)}).catch(function(n){eD.error("Channel: Fetching messages failed",n),ex({type:m.b,payload:{currentGroupChannel:e}})}),eR||ek.push(e)})}}},[eG,eO]),(0,I.u)(n1,n2,tE);var tG=(eH=(eB={currentGroupChannel:tT,messagesDispatcher:tm}).currentGroupChannel,eV=eB.messagesDispatcher,(0,i.useCallback)(function(e){nW.info("Channel | useDeleteMessageCallback: Deleting message",e);var n=(0,f.k)(e)?e.sendingStatus:void 0;return new Promise(function(t,r){nW.info("Channel | useDeleteMessageCallback: Deleting message requestState:",n),(n===d.ao.FAILED||n===d.ao.PENDING)&&"reqId"in e?(nW.info("Channel | useDeleteMessageCallback: Deleted message from local:",e),eV({type:m.p,payload:e.reqId}),t()):(nW.info("Channel | useDeleteMessageCallback: Deleting message from remote:",n),null==eH||eH.deleteMessage(e).then(function(){nW.info("Channel | useDeleteMessageCallback: Deleting message success!",e),eV({type:m.o,payload:e.messageId}),t()}).catch(function(e){nW.warning("Channel | useDeleteMessageCallback: Deleting message failed!",e),r(e)}))})},[eH,eV])),tB=(ej={currentGroupChannel:tT,messagesDispatcher:tm,onBeforeUpdateUserMessage:nM,isMentionEnabled:tp},ez={logger:nW,pubSub:nQ},eK=ej.currentGroupChannel,eY=ej.messagesDispatcher,eZ=ej.onBeforeUpdateUserMessage,eQ=ej.isMentionEnabled,eW=ez.logger,eq=ez.pubSub,(0,i.useCallback)(function(e,n){var t,r=e.messageId,i=e.message,a=e.mentionedUsers,o=e.mentionTemplate,l=eZ&&"function"==typeof eZ;l&&eW.info("Channel: creating params using onBeforeUpdateUserMessage",eZ);var s=l?eZ(i):(t={message:i},eQ&&a&&a.length>0&&(t.mentionedUsers=a),eQ&&o?t.mentionedMessageTemplate=o:t.mentionedMessageTemplate=i,t);eW.info("Channel: Updating message!",s),null==eK||eK.updateUserMessage(r,s).then(function(e){n&&n(null,e),eW.info("Channel: Updating message success!",e),eY({type:m.k,payload:{channel:eK,message:e}}),eq.publish(N.p.UPDATE_USER_MESSAGE,{message:e,channel:eK,publishingModules:[N.P.CHANNEL]})}).catch(function(e){n&&n(e,null)})},[null==eK?void 0:eK.url,eY,eZ])),tH=(eX={currentGroupChannel:tT,messagesDispatcher:tm},e$={logger:nW,pubSub:nQ},eJ=eX.currentGroupChannel,e0=eX.messagesDispatcher,e1=e$.logger,e2=e$.pubSub,(0,i.useCallback)(function(e){e1.info("Channel: Resending message has started",e),(null==e?void 0:e.isResendable)?e.isUserMessage()?null==eJ||eJ.resendMessage(e).onPending(function(e){e1.info("Channel: Resending message start!",e),e0({type:m.m,payload:e})}).onSucceeded(function(e){e1.info("Channel: Resending message success!",e),e0({type:m.g,payload:e})}).onFailed(function(e,n){e1.warning("Channel: Resending message failed!",e),e0({type:m.h,payload:n})}):e.isFileMessage()?null==eJ||eJ.resendMessage(e).onPending(function(e){e1.info("Channel: Resending file message start!",e),e0({type:m.m,payload:e})}).onSucceeded(function(e){e1.info("Channel: Resending file message success!",e),e0({type:m.g,payload:e})}).onFailed(function(e,n){e1.warning("Channel: Resending file message failed!",e),e0({type:m.h,payload:n})}):e.isMultipleFilesMessage()&&(null==eJ||eJ.resendMessage(e).onPending(function(e){e1.info("Channel: Resending multiple files message start!",e),e0({type:m.m,payload:e})}).onFileUploaded(function(e,n,t,r){var i;e1.info("Channel: Resending multiple files message file uploaded!",{requestId:e,index:n,error:r,uploadableFileInfo:t}),e2.publish(N.p.ON_FILE_INFO_UPLOADED,{response:{channelUrl:null!==(i=null==eJ?void 0:eJ.url)&&void 0!==i?i:"",requestId:e,index:n,uploadableFileInfo:t,error:r},publishingModules:[N.P.CHANNEL]})}).onSucceeded(function(e){e1.info("Channel: Resending multiple files message success!",e),e0({type:m.g,payload:e})}).onFailed(function(e,n){e1.warning("Channel: Resending multiple files message failed!",e),e0({type:m.h,payload:n})})):e1.error("Message is not resendable",e)},[eJ,e0])),tV=(e3={currentGroupChannel:tT,isMentionEnabled:tp,onBeforeSendUserMessage:nA}
1,e6={logger:nW,pubSub:nQ,scrollRef:tv,messagesDispatcher:tm},e4=e3.isMentionEnabled,e7=e3.currentGroupChannel,e5=e3.onBeforeSendUserMessage,e8=e6.logger,e9=e6.pubSub,ne=e6.scrollRef,nn=e6.messagesDispatcher,[(0,i.useRef)(null),(0,i.useCallback)(function(e){var n,t=e.quoteMessage,r=e.message,i=e.mentionTemplate,a=e.mentionedUsers,o=e5&&"function"==typeof e5;o&&e8.info("Channel: creating params using onBeforeSendUserMessage",e5);var l=o?e5(r,t):(n={message:r},e4&&a&&a.length>0&&(n.mentionedUsers=a),e4&&i&&a&&a.length>0&&(n.mentionedMessageTemplate=i),t&&(n.isReplyToChannel=!0,n.parentMessageId=t.messageId),n);e8.info("Channel: Sending message has started",l),null==e7||e7.sendUserMessage(l).onPending(function(e){e9.publish(N.p.SEND_MESSAGE_START,{message:e,channel:e7,publishingModules:[N.P.CHANNEL]}),setTimeout(function(){return(0,s.s)(0,ne)},y.e)}).onFailed(function(e,n){e8.warning("Channel: Sending message failed!",{message:n,error:e}),nn({type:m.h,payload:n})}).onSucceeded(function(e){e8.info("Channel: Sending message success!",e),nn({type:m.g,payload:e})})},[e7,e5])]),tj=tV[0],tz=tV[1],tK=(nt={currentGroupChannel:tT,imageCompression:n$,onBeforeSendFileMessage:nI},nr={logger:nW,pubSub:nQ,scrollRef:tv,messagesDispatcher:tm},ni=nt.currentGroupChannel,na=nt.onBeforeSendFileMessage,no=nt.imageCompression,nl=nr.logger,ns=nr.pubSub,nu=nr.scrollRef,nc=nr.messagesDispatcher,[(0,i.useCallback)(function(e,n){return new Promise(function(t,i){var a=null==na?void 0:na(e,n);!a&&(a={file:e},n&&(a.isReplyToChannel=!0,a.parentMessageId=n.messageId)),nl.info("Channel: Uploading file message start!",a),null==ni||ni.sendFileMessage(a).onPending(function(n){ns.publish(N.p.SEND_MESSAGE_START,{message:(0,r._)((0,r._)({},n),{url:URL.createObjectURL(e),requestState:"pending",isUserMessage:n.isUserMessage,isFileMessage:n.isFileMessage,isAdminMessage:n.isAdminMessage,isMultipleFilesMessage:n.isMultipleFilesMessage}),channel:ni,publishingModules:[N.P.CHANNEL]}),setTimeout(function(){return(0,s.s)(0,nu)},y.e)}).onFailed(function(n,t){nl.error("Channel: Sending file message failed!",{failedMessage:t,err:n}),t.localUrl=URL.createObjectURL(e),t.file=e,nc({type:m.h,payload:t}),i(n)}).onSucceeded(function(e){nl.info("Channel: Sending file message success!",e),nc({type:m.g,payload:e}),t(e)})})},[ni,na,no])])[0],tY=L({currentGroupChannel:tT,onBeforeSendVoiceMessage:nO},{logger:nW,pubSub:nQ,scrollRef:tv,messagesDispatcher:tm})[0],tZ=(0,A.u)({currentChannel:tT,onBeforeSendMultipleFilesMessage:nR,publishingModules:[N.P.CHANNEL]},{logger:nW,pubSub:nQ,scrollRef:tv})[0];return i.createElement(U.Provider,{value:{channelUrl:ng,isReactionEnabled:tD,isMessageGroupingEnabled:void 0===nb||nb,isMultipleFilesMessageEnabled:nC,showSearchIcon:null!=ny?ny:n4.groupChannelSettings.enableMessageSearch,highlightedMessage:nT,startingPoint:nS,onBeforeSendUserMessage:nA,onBeforeSendFileMessage:nI,onBeforeUpdateUserMessage:nM,onChatHeaderActionClick:nw,onSearchClick:nD,onBackClick:nL,replyType:nZ,threadReplySelectType:null!==(np=null!=nP?nP:(0,S.a)(n0.threadReplySelectType).upperCase)&&void 0!==np?np:l.T.THREAD,queries:nU,filterMessageList:nx,disableMarkAsRead:nF,onReplyInThread:nG,onQuoteMessageClick:nB,onMessageAnimated:nH,onMessageHighlighted:nV,allMessages:tg,localMe
1ssages:t_,loading:tE,initialized:tb,unreadSince:tC,unreadSinceDate:ty,isInvalid:tN,currentGroupChannel:tT,hasMorePrev:tS,hasMoreNext:tI,oldestMessageTimeStamp:tA,latestMessageTimeStamp:tM,emojiContainer:tO,readStatus:tR,typingMembers:tw,scrollToMessage:tx,quoteMessage:tl,setQuoteMessage:ts,deleteMessage:tG,updateMessage:tB,resendMessage:tH,messageInputRef:tj,sendMessage:tz,sendFileMessage:tK,sendVoiceMessage:tY,sendMultipleFilesMessage:tZ,initialTimeStamp:n5,messageActionTypes:m.u,messagesDispatcher:tm,setInitialTimeStamp:n8,setAnimatedMessageId:tn,setHighLightedMessageId:ti,animatedMessageId:te,highLightedMessageId:tr,nicknamesMap:tP,emojiAllMap:tL,onScrollCallback:tU,onScrollDownCallback:tk,scrollRef:tv,scrollBehavior:void 0===nj?"auto":nj,toggleReaction:tF,isScrolled:tc,setIsScrolled:td}},i.createElement(a.U,(0,r._)({},e),n_))},k=function(){var e=i.useContext(U);if(!e)throw Error("ChannelContext not found. Use within the Channel module.");return e}},60196:function(e,n,t){"use strict";t.d(n,{kt:function(){return o}});var r=t(11228),i=t(49805),a=t(7585);t(12394),t(8978),t(67294),t(64393);var o=function(e,n,t,r,i){if(!r||"group"!==r.channelType)return[s(e,n),s(n,t)];if("THREAD"===i&&(null==n?void 0:n.threadInfo))return[!1,!1];var a=(null==n?void 0:n.sendingStatus)||"",o="pending"!==a&&"failed"!==a;return[s(e,n,r)&&o,s(n,t,r)&&o]},l=function(e){var n=(0,a.u)().stringSet;return(0,r.f)(e.createdAt,n.DATE_FORMAT__MESSAGE_CREATED_AT)},s=function(e,n,t){var r,a;return!!e&&!!n&&!!e.messageType&&"admin"!==e.messageType&&!!n.messageType&&(null==n?void 0:n.messageType)!=="admin"&&"sender"in e&&"sender"in n&&!!e.createdAt&&!!n.createdAt&&!!e.sender.userId&&!!n.sender.userId&&(null==e?void 0:e.sendingStatus)===(null==n?void 0:n.sendingStatus)&&(null===(r=null==e?void 0:e.sender)||void 0===r?void 0:r.userId)===(null===(a=null==n?void 0:n.sender)||void 0===a?void 0:a.userId)&&l(e)===l(n)&&(!t||(0,i.a)(t,e)===(0,i.a)(t,n))}},3196:function(e,n,t){"use strict";t.d(n,{v:function(){return a}});var r=t(90903),i=t(60196);t(11228),t(7585),t(12394),t(67294),t(64393),t(49805),t(8978);var a=function(e){var n=e.allMessages,t=void 0===n?[]:n,a=e.isMessageGroupingEnabled,o=e.currentIndex,l=void 0===o?0:o,s=e.currentMessage,u=e.currentChannel,c=e.replyType,d=t[l-1],h=t[l+1],f=void 0===a||a?(0,i.kt)(d,s,h,void 0===u?null:u,void 0===c?"":c):[!1,!1],m=f[0],v=f[1],p=null==d?void 0:d.createdAt,g=s.createdAt;return{chainTop:m,chainBottom:v,hasSeparator:!("sendingStatus"in s&&"succeeded"!==s.sendingStatus)&&!(p&&(0,r.i)(g,p))}}},61795:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(12394),i=t(67294),a=t(61416),o=t(56152);t(5701),t(26748),t(34420),t(71091),t(69392),t(49805),t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(93122),t(41238),t(69561),t(78614),t(90047),t(81573),t(2121),t(11228),t(72661),t(91199),t(47843),t(67315),t(42443),t(32145),t(9399),t(70179),t(4399),t(77839),t(21790),t(74865),t(2041),t(84675),t(30094),t(25494),t(56210),t(34600),t(58632),t(15343),t(70599),t(80385),t(10364),t(15956),t(92593),t(34919),t(10214),t(59069),t(7217),t(61284),t(46345),t(22284),t(55064),t(56842),t(67412),t(10856),t(13462),t(45701);var l=function(e){return i.createElement(a.C,(0,r._)({},e),i.createElement(o.Z,(0,r._)({},e)))}},10214:function(e,n,t){"use strict";t.d(n,{_:function(){return o}});var r=t(67294),i=t(61416),a=t(59069);t(12394),t(5701),t(26748),t(34420),t(71091),t(69392),t(49805),t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(93122),t(41238),t(69561),t(78614),t(90047),t(7217),t(61284),t(46345),t(22284),t(55064),t(56842),t(70179),t(4399),t(67412),t(10856),t(13462),t(45701);var o=function(){var e=(0,r.useState)(!1),n=e[0],t=e[1],o=(0,i.u)(),l=o.overrideInviteUser,s=o.onBeforeCreateChannel,u=o.onChannelSelect;return r.createElement(a.A,{createChannelVisible:n,onChangeCreateChannelVisible:t,onCreateChannelClick:l,onBeforeCreateChannel:s,onChannelCreated:function(e){return null==u?void 0:u(e)}})}},56152:function(e,n,t){"use strict";t.d(n,{Z:function(){return h}});var r=t(12394),i=t(67294),a=t(81573),o=t(84675),l=t(61416),s=t(41238),u=t(30094),c=t(10214),d=t(88006);t(7585),t(64393),t(2121),t(11228),t(43822),t(1608),t(72661),t(49805),t(8978),t(91199),t(47843),t(67315),t(43847),t(42443),t(32145),t(9399),t(70179),t(4399),t(77839),t(69392),t(73935),t(29515),t(88569),t(34420),t(71091),t(93122),t(69561),t(78614),t(21790),t(74865),t(2041),t(5701),t(26748),t(90047),t(25494),t(56210),t(34600),t(58632),t(15343),t(70599),t(80385),t(10364),t(15956),t(92593),t(34919),t(59069),t(7217),t(61284),t(46345),t(22284),t(55064),t(56842),t(67412),t(10856),t(13462),t(45701);var h=function(e){var n=e.renderHeader,t=e.renderChannelPreview,h=e.renderPlaceHolderError,f=e.renderPlaceHolderLoading,m=e.renderPlaceHolderEmptyList,v=(0,l.u)(),p=v.onThemeChange,g=v.allowProfileEdit,_=v.allChannels,E=v.currentChannel,b=v.channelListDispatcher,C=v.typingChannels,y=v.initialized,N=v.fetchChannelList,T=v.onProfileEditSuccess,S=(0,s.A)(),A=S.stores,I=S.config,M=I.logger,O=I.isOnline,R=void 0!==O&&O,w=A.sdkStore.sdk;return i.createElement(u.G,{renderHeader:n,renderChannel:function(e){var n=e.item,s={channel:n,tabIndex:e.index,isSelected:(null==n?void 0:n.url)===(null==E?void 0:E.url),isTyping:null==C?void 0:C.some(function(e){return e.url===(null==n?void 0:n.url)}),renderChannelAction:function(e){return i.createElement(o.R,(0,r._)({},e))},onClick:function(){if(!R&&!(null==w?void 0:w.isCacheEnabled)){M.warning("ChannelList: Inactivated clicking channel item during offline.");return}M.info("ChannelList: Clicked on channel:",n),b({type:l.S,payload:n})},onLeaveChannel:function(e,n){return(0,r.a)(this,void 0,void 0,function(){var t,i;return(0,r.b)(this,function(r){switch(r.label){case 0:if(M.info("ChannelList: Leaving channel",e),!e)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.leave()];case 2:return t=r.sent(),M.info("ChannelList: Leaving channel success",t),n&&"function"==typeof n&&n(e,null),b({type:l.L,payload:e.url}),[3,4];case 3:return i=r.sent(),M.error("ChannelList: Leaving channel failed",i),n&&"function"==typeof n&&n(e,i),[3,4];case 4:return[2]}})})}};return t?i.createElement("div",{key:null==n?void 0:n.url,onClick:s.onClick},t(s)):i.createElement(a.Z,(0,r._)({key:null==n?void 0:n.url},s))},renderPlaceHolderError:h,renderPlaceHolderLoading:f,renderPlaceHolderEmptyList:m,onChangeTheme:null!=p?p:d.n,allowProfileEdit:g,onUserProfileUpdated:null!=T?T:d.n,channels:_,onLoadMore:N,initialized:y,renderAddChannel:function(){return i.createElement(c._,
1null)}})}},81573:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(67294),i=t(41238),a=t(7585),o=t(61416),l=t(2121),s=t(47843);t(71091),t(12394),t(64393),t(5701),t(26748),t(34420),t(69392),t(49805),t(8978),t(73935),t(43847),t(29515),t(88569),t(1608),t(43822),t(93122),t(69561),t(78614),t(90047),t(11228),t(72661),t(91199),t(67315),t(42443),t(32145),t(9399),t(70179),t(4399),t(77839),t(21790),t(74865),t(2041);var u=function(e){var n,t,u,c,d=e.channel,h=e.isActive,f=e.isSelected,m=void 0!==f&&f,v=e.isTyping,p=e.renderChannelAction,g=e.onLeaveChannel,_=e.onClick,E=e.tabIndex,b=(0,i.A)().config,C=(0,a.u)().stringSet,y=(0,o.u)(),N=y.isTypingIndicatorEnabled,T=y.isMessageReceiptStatusEnabled,S=b.userId,A=void 0!==T&&T&&((null===(n=null==d?void 0:d.lastMessage)||void 0===n?void 0:n.messageType)==="user"||(null===(t=null==d?void 0:d.lastMessage)||void 0===t?void 0:t.messageType)==="file")&&(null===(c=null===(u=null==d?void 0:d.lastMessage)||void 0===u?void 0:u.sender)||void 0===c?void 0:c.userId)===S;return r.createElement(s.G,{channel:d,tabIndex:E,isTyping:void 0!==N&&N&&void 0!==v&&v,isSelected:null!=m?m:void 0!==h&&h,channelName:(0,l.g)(d,S,C),isMessageStatusEnabled:A,onClick:_,onLeaveChannel:g,renderChannelAction:p})}},7217:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(12394),i=t(67294),a=t(61284),o=t(46345);t(55064),t(7585),t(64393),t(41238),t(71091),t(43847),t(69392),t(49805),t(8978),t(73935),t(29515),t(88569),t(1608),t(43822),t(34420),t(93122),t(69561),t(78614),t(56842),t(26748),t(70179),t(4399),t(67412),t(10856),t(13462),t(22284),t(5701),t(45701);var l=function(e){return i.createElement(o.C,(0,r._)({},e),i.createElement(a.Z,(0,r._)({},e)))}},61284:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(67294),i=t(46345),a=t(55064),o=t(45701);t(22284),t(5701),t(41238),t(71091),t(12394),t(7585),t(64393),t(43847),t(69392),t(49805),t(8978),t(73935),t(29515),t(88569),t(1608),t(43822),t(34420),t(93122),t(69561),t(78614),t(56842),t(26748),t(70179),t(4399),t(67412),t(10856),t(13462);var l=function(e){var n=e.onCancel,t=e.renderStepOne,l=(0,i.u)(),s=l.step,u=l.setStep,c=l.userListQuery;return r.createElement(r.Fragment,null,0===s&&((null==t?void 0:t())||r.createElement(o.Z,{onCancel:n})),1===s&&r.createElement(a.Z,{userListQuery:c,onCancel:function(){u(0),null==n||n()}}))}},55064:function(e,n,t){"use strict";t.d(n,{Z:function(){return p}});var r=t(12394),i=t(67294),a=t(7585),o=t(46345),l=t(41238),s=t(43847),u=t(69392),c=t(1608),d=t(88569),h=t(56842),f=t(88006);t(64393),t(22284),t(5701),t(71091),t(49805),t(8978),t(73935),t(29515),t(43822),t(34420),t(93122),t(69561),t(78614),t(26748),t(70179),t(4399),t(67412),t(10856),t(13462);var m=function(e,n){return"broadcast"===n&&(e.isBroadcast=!0),"supergroup"===n&&(e.isSuper=!0),e},v=function(e){var n=e.sdk,t=e.userFilledApplicationUserListQuery,r=n.createApplicationUserListQuery();return t&&Object.keys(t).forEach(function(e){r[e]=t[e]}),r},p=function(e){var n,t,p,g=e.onCancel,_=e.userListQuery,E=(0,o.u)(),b=E.onCreateChannelClick,C=E.onBeforeCreateChannel,y=E.onChannelCreated,N=E.createChannel,T=E.onCreateChannel,S=E.overrideInviteUser,A=E.type,I=(0,l.A)(),M=null===(n=null==I?void 0:I.config)||void 0===n?void 0:n.userId,O=null===(p=null===(t=null==I?void 0:I.stores)||void 0===t?void 0:t.sdkStore)||void 0===p?void 0:p.sdk,R=[M],w=(0,i.useState)([]),D=w[0],L=w[1],P=(0,i.useState)({}),U=P[0],x=P[1],k=(0,i.useContext)(a.L).stringSet,F=(0,i.useState)(null),G=F[0],B=F[1],H=Object.keys(U).length,V=k.MODAL__CREATE_CHANNEL__TITLE,j=k.BUTTON__CREATE,z=(0,s.u)().isMobile,K=(0,i.useState)(window.innerHeight),Y=K[0],Z=K[1];return(0,i.useEffect)(function(){var e=_?_():v({sdk:O});B(e),(null==e?void 0:e.isLoading)||e.next().then(function(e){L(e)})},[]),(0,i.useEffect)(function(){var e=function(){Z(window.innerHeight)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[]),i.createElement(u.M,{isFullScreenOnMobile:!0,titleText:V,submitText:j,type:d.qh.PRIMARY,disabled:D.length>1&&0===Object.keys(U).length,onCancel:g,onSubmit:function(){var e=Object.keys(U).length>0?Object.keys(U):[M],n=null!=y?y:T,t=null!=b?b:S;if("function"==typeof t){t({users:e,onClose:null!=g?g:f.n,channelType:A});return}if(C){var r=C(e);m(r,A),N(r).then(function(e){return null==n?void 0:n(e)})}else{var r={};r.invitedUserIds=e,r.isDistinct=!1,M&&(r.operatorUserIds=[M]),m(r,A),N(r).then(function(e){return null==n?void 0:n(e)})}null==g||g()}},i.createElement("div",null,i.createElement(c.L,{color:H>0?c.b.PRIMARY:c.b.ONBACKGROUND_3,type:c.a.CAPTION_1},"".concat(H," ").concat(k.MODAL__INVITE_MEMBER__SELECTED)),i.createElement("div",{className:"sendbird-create-channel--scroll",style:z?{height:"calc(".concat(Y,"px - 200px)")}:{},onScroll:function(e){if(G){var n=e.target,t=G.hasNext,i=G.isLoading,a=n.clientHeight+n.scrollTop+50>n.scrollHeight;t&&a&&!i&&G.next().then(function(e){L((0,r.c)((0,r.c)([],D,!0),e,!0))})}}},D.map(function(e){var n;return n=e.userId,(null==R||!R.includes(n))&&i.createElement(h.Q,{key:e.userId,user:e,checkBox:!0,checked:U[e.userId],onChange:function(e){var n,t=(0,r._)((0,r._)({},U),((n={})[e.target.id]=e.target.checked,n));e.target.checked||delete t[e.target.id],x(t)}})}))))}},45701:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var r=t(67294),i=t(22284),a=t(41238),o=t(46345),l=t(7585),s=t(1608),u=t
1(43822),c=t(69392);t(5701),t(71091),t(12394),t(64393),t(49805),t(8978),t(73935),t(43847),t(29515),t(88569),t(34420),t(93122),t(69561),t(78614);var d=function(e){var n,t=null===(n=null==e?void 0:e.appInfo)||void 0===n?void 0:n.applicationAttributes;return!!Array.isArray(t)&&t.includes("allow_broadcast_channel")},h=function(e){var n,t=null===(n=null==e?void 0:e.appInfo)||void 0===n?void 0:n.applicationAttributes;return!!Array.isArray(t)&&t.includes("allow_super_group_channel")},f=function(e){var n=e.onCancel,t=(0,a.A)(),f=(0,i.mK)(t),m=(0,o.u)(),v=m.setStep,p=m.setType,g=(0,r.useContext)(l.L).stringSet,_=d(f),E=h(f);return r.createElement(c.M,{titleText:null==g?void 0:g.MODAL__CREATE_CHANNEL__TITLE,hideFooter:!0,onCancel:function(){null==n||n()},className:"sendbird-add-channel__modal"},r.createElement("div",{className:"sendbird-add-channel__rectangle-wrap"},r.createElement("div",{className:"sendbird-add-channel__rectangle",onClick:function(){p(o.a.GROUP),v(1)},role:"button",tabIndex:0,onKeyDown:function(){p(o.a.GROUP),v(1)}},r.createElement(u.ZP,{className:"sendbird-add-channel__rectangle__chat-icon",type:u.Qy.CHAT,fillColor:u.zo.PRIMARY,width:"28px",height:"28px"}),r.createElement(s.L,{type:s.a.SUBTITLE_1,color:s.b.ONBACKGROUND_1},g.MODAL__CREATE_CHANNEL__GROUP)),E&&r.createElement("div",{className:"sendbird-add-channel__rectangle",onClick:function(){p(o.a.SUPERGROUP),v(1)},role:"button",tabIndex:0,onKeyDown:function(){p(o.a.SUPERGROUP),v(1)}},r.createElement(u.ZP,{className:"sendbird-add-channel__rectangle__supergroup-icon",type:u.Qy.SUPERGROUP,fillColor:u.zo.PRIMARY,width:"28px",height:"28px"}),r.createElement(s.L,{type:s.a.SUBTITLE_1,color:s.b.ONBACKGROUND_1},g.MODAL__CREATE_CHANNEL__SUPER)),_&&r.createElement("div",{className:"sendbird-add-channel__rectangle",onClick:function(){p(o.a.BROADCAST),v(1)},role:"button",tabIndex:0,onKeyDown:function(){p(o.a.BROADCAST),v(1)}},r.createElement(u.ZP,{className:"sendbird-add-channel__rectangle__broadcast-icon",type:u.Qy.BROADCAST,fillColor:u.zo.PRIMARY,width:"28px",height:"28px"}),r.createElement(s.L,{type:s.a.SUBTITLE_1,color:s.b.ONBACKGROUND_1},g.MODAL__CREATE_CHANNEL__BROADCAST))))}},34600:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(67294),i=t(58632),a=t(15343);t(12394),t(41238),t(71091),t(7585),t(64393),t(70599),t(69392),t(49805),t(8978),t(73935),t(43847),t(29515),t(88569),t(1608),t(43822),t(34420),t(93122),t(69561),t(78614),t(80385),t(70179),t(4399),t(21790),t(74865);var o=function(e){var n=e.onEditProfile,t=e.onCancel,o=e.onThemeChange;return r.createElement(i.r,{onEditProfile:n,onCancel:t,onThemeChange:o},r.createElement(a.yJ,null))}},15343:function(e,n,t){"use strict";t.d(n,{yJ:function(){return _}});var r=t(67294),i=t(41238),a=t(58632),o=t(7585),l=t(70599),s=t(69392);t(12394);var u=t(1608),c=t(88569),d=t(80385),h=t(70179),f=t(21790),m=t(43822);t(71091),t(64393),t(49805),t(8978),t(73935),t(43847),t(29515),t(34420),t(93122),t(69561),t(78614),t(4399),t(74865);var v=function(e){var n,t=e.formRef,a=e.inputRef,l=e.onThemeChange,s=e.setProfileImage,c=(0,i.A)(),v=c.stores,p=c.config,g=p.theme,_=p.setCurrentTheme,E=null===(n=v.userStore)||void 0===n?void 0:n.user,b=(0,o.u)().stringSet,C=(0,r.useState)(null),y=C[0],N=C[1],T=(0,r.useRef)(null);return r.createElement("form",{className:"sendbird-edit-user-profile",ref:t,onSubmit:function(e){e.preventDefault()}},r.createElement("section",{className:"sendbird-edit-user-profile__img"},r.createElement(d.A,null,b.EDIT_PROFILE__IMAGE_LABEL),r.createElement("div",{className:"sendbird-edit-user-profile__img__avatar"},r.createElement(h.A,{width:"80px",height:"80px",src:y||(null==E?void 0:E.profileUrl)})),r.createElement("input",{ref:T,type:"file",accept:"image/gif, image/jpeg, image/png",style:{display:"none"},onChange:function(e){e.target.files&&(N(URL.createObjectURL(e.target.files[0])),s(e.target.files[0])),T.current&&(T.current.value="")}}),r.createElement(f.Z,{className:"sendbird-edit-user-profile__img__avatar-button",disableUnderline:!0,onClick:function(){var e;return null===(e=T.current)||void 0===e?void 0:e.click()}},r.createElement(u.L,{type:u.a.BUTTON_1,color:u.b.PRIMARY},b.EDIT_PROFILE__IMAGE_UPLOAD))),r.createElement("section",{className:"sendbird-edit-user-profile__name"},r.createElement(d.A,null,b.EDIT_PROFILE__NICKNAME_LABEL),r.createElement(d.Z,{required:(null==E?void 0:E.nickname)!=="",name:"sendbird-edit-user-profile__name__input",ref:
1a,value:null==E?void 0:E.nickname,placeHolder:b.EDIT_PROFILE__NICKNAME_PLACEHOLDER})),r.createElement("section",{className:"sendbird-edit-user-profile__userid"},r.createElement(d.A,null,b.EDIT_PROFILE__USERID_LABEL),r.createElement(d.Z,{disabled:!0,name:"sendbird-edit-user-profile__userid__input",value:null==E?void 0:E.userId})),r.createElement("section",{className:"sendbird-edit-user-profile__theme"},r.createElement(d.A,null,b.EDIT_PROFILE__THEME_LABEL),r.createElement("div",{className:"sendbird-edit-user-profile__theme__theme-icon"},"dark"===g?r.createElement(m.ZP,{onClick:function(){_("light"),null==l||l("light")},type:m.Qy.TOGGLE_ON,width:44,height:24}):r.createElement(m.ZP,{onClick:function(){_("dark"),null==l||l("dark")},type:m.Qy.TOGGLE_OFF,width:44,height:24}))))},p=function(e){var n,t,r,i=e.globalContext,a=e.formRef,o=e.inputRef,s=e.profileImage,u=e.onEditProfile,c=i.stores,d=i.dispatchers,h=c.sdkStore.sdk,f=c.userStore.user,m=d.userDispatcher;if((null==f?void 0:f.nickname)!==""&&!o.current.value){null===(t=(n=a.current).reportValidity)||void 0===t||t.call(n);return}null==h||h.updateCurrentUserInfo({nickname:null===(r=null==o?void 0:o.current)||void 0===r?void 0:r.value,profileImage:null!=s?s:void 0}).then(function(e){m({type:l.U.UPDATE_USER_INFO,payload:e}),null==u||u(e)})},g=function(e){var n=e.onEditProfile,t=(0,i.A)(),a=(0,r.useRef)(null),o=(0,r.useRef)(null),l=(0,r.useState)(null),s=l[0];return{formRef:o,inputRef:a,updateUserInfo:function(){p({globalContext:t,formRef:o,inputRef:a,profileImage:s,onEditProfile:n})},profileImage:s,setProfileImage:l[1]}},_=function(){var e=(0,a.B)(),n=e.onEditProfile,t=e.onCancel,i=e.onThemeChange,l=(0,r.useContext)(o.L).stringSet,u=g({onEditProfile:n}),d=u.formRef,h=u.inputRef,f=u.updateUserInfo,m=u.setProfileImage;return r.createElement(s.M,{titleText:l.EDIT_PROFILE__TITLE,submitText:l.BUTTON__SAVE,type:c.qh.PRIMARY,onCancel:t,isFullScreenOnMobile:!0,onSubmit:f},r.createElement(v,{formRef:d,inputRef:h,setProfileImage:m,onThemeChange:i}))}},58632:function(e,n,t){"use strict";t.d(n,{B:function(){return l},r:function(){return o}});var r=t(12394),i=t(67294),a=i.createContext(null),o=function(e){var n=e.children,t=(0,r.d)(e,["children"]);return i.createElement(a.Provider,{value:t},n)},l=function(){var e=i.useContext(a);if(!e)throw Error("EditUserProfileContext not found. Use within the EditUserProfile module.");return e}},88137:function(e,n,t){"use strict";t.d(n,{O:function(){return l}});var r=t(67294),i=t(7585),a=t(1608),o=t(88006);t(12394),t(64393);var l=function(e){var n=e.className,t=(0,r.useContext)(i.L).stringSet;return r.createElement("div",{className:(0,o.c)("sendbird-notification","sendbird-notification--frozen",void 0===n?"":n),"data-testid":"sendbird-notification"},r.createElement(a.L,{className:"sendbird-notification__text",testID:"sendbird-notification__text",type:a.a.CAPTION_2},t.CHANNEL_FROZEN))}},85562:function(e,n,t){"use strict";t.d(n,{u:function(){return o}});var r=t(12394),i=t(67294),a=t(79226);t(1608),t(64393),t(43822),t(70179),t(4399),t(7585),t(41238),t(71091),t(17061),t(58184);var o=function(e){return i.createElement(a.S,(0,r._)({},e))}},52597:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var r=t(67294),i=function(e){var n=e.value,t=e.onClickReply,i=e.type;return r.createElement("div",{className:"sendbird-suggested-replies__option ".concat(void 0===i?"vertical":i),id:n,onClick:function(e){return t(e,n)}},n)},a=function(e){var n=e.replyOptions,t=e.onSendMessage,a=e.type,o=void 0===a?"vertical":a,l=(0,r.useState)(!1),s=l[0],u=l[1],c=function(e,n){e.preventDefault(),t({message:n}),u(!0)};if(s)return null;var d=n.map(function(e,n){return r.createElement(i,{key:n,value:e,onClickReply:c,type:o})});return r.createElement("div",{className:"sendbird-suggested-replies ".concat(o)},d)}},42443:function(e,n,t){"use strict";t.d(n,{Jo:function(){return u},c2:function(){return c}});var r=t(67294),i=t(42391),a=t(1608),o=t(7585),l=t(41238),s=t(56299);t(12394),t(64393),t(71091);var u=function(e){var n,t=e.members;return r.createElement(r.Fragment,null,(n=(0,r.useContext)(o.L).stringSet,t&&0!==t.length?t&&1===t.length?"".concat(t[0].nickname," ").concat(n.TYPING_INDICATOR__IS_TYPING):t&&2===t.length?"".concat(t[0].nickname," ").concat(n.TYPING_INDICATOR__AND," ").concat(t[1].nickname," ").concat(n.TYPING_INDICATOR__ARE_TYPING):n.TYPING_INDICATOR__MULTIPLE_TYPING:""))},c=function(e){var n,t,o,c=e.channelUrl,d=(0,l.A)(),h=null===(t=null===(n=null==d?void 0:d.stores)||void 0===n?void 0:n.sdkStore)||void 0===t?void 0:t.sdk,f=null===(o=null==d?void 0:d.config)||void 0===o?void 0:o.logger,m=(0,r.useState)((0,s.u)()),v=m[0],p=m[1],g=(0,r.useState)([]),_=g[0],E=g[1];return(0,r.useEffect)(function(){var e;if(null===(e=null==h?void 0:h.groupChannel)||void 0===e?void 0:e.addGroupChannelHandler){h.groupChannel.removeGroupChannelHandler(v);var n=(0,s.u)(),t=new i.pe({onTypingStatusUpdated:function(e){f.info("Channel > Typing Indicator: onTypingStatusUpdated",e),e.url===c&&E(e.getTypingUsers())}});h.groupChannel.addGroupChannelHandler(n,t),p(n)}return function(){var e;E([]),(null===(e=null==h?void 0:h.groupChannel)||void 0===e?void 0:e.removeGroupChannelHandler)&&h.groupChannel.removeGroupChannelHandler(v)}},[c]),r.createElement(a.L,{className:"sendbird-conversation__footer__typing-indicator__text",type:a.a.CAPTION_2,color:a.b.ONBACKGROUND_2},r.createElement(u,{members:_}))}},11621:function(e,n,t){"use strict";t.d(n,{b:function(){return u}});var r=t(67294),i=t(7585),a=t(1608),o=t(43822),l=t(11228),s=t(88006);t(12394),t(64393);var u=function(e){var n=e.className,t=e.count,u=void 0===t?0:t,c=e.time,d=void 0===c?"":c,h=e.onClick,f=e.lastReadAt,m=(0,r.useContext)(i.L),v=m.stringSet,p=m.dateLocale,g=(0,r.useMemo)(function(){var e,n;if("on"!==v.CHANNEL__MESSAGE_LIST__NOTIFICATION__ON){var t=(null===(n=null===(e=null==d?void 0:d.toString)||void 0===e?void 0:e.call(d))||void 0===n?void 0:n.split(" "))||[];return null==t||t.splice(-2,0,v.CHANNEL__MESSAGE_LIST__NOTIFICATION__ON),t.join(" ")}if(f)return(0,l.f)(f,v.DATE_FORMAT__MESSAGE_LIST__NOTIFICATION__UNREAD_SINCE,{locale:p})},[d,f]);return r.createElement("div",{className:(0,s.c)(u<1?"sendbird-notification--hide":"sendbird-notification",void 0===n?"":n),"data-testid":"sendbird-notification",onClick:h},r.createElement(a.L,{className:"sendbird-notification__text",testID:"sendbird-notification__text",color:a.b.ONCONTENT_1,type:a.a.CAPTION_2},"".concat(u," "),v.CHANNEL__MESSAGE_LIST__NOTIFICATION__NEW_MESSAGE," ".concat(g)),r.createElement(o.ZP,{width:"24px",height:"24px",type:o.Qy.CHEVRON_DOWN,fillColor:o.zo.CONTENT}))}},25494:function(e,n,t){"use strict";t.d(n,{o:function(){return c}});var r=t(67294),i=t(41238),a=t(7585),o=t(70179),l=t(1608),s=t(56210),u=t(88006);t(71091),t(12394),t(64393),t(4399),t(43822),t(43847),t(21790),t(74865),t(29515);var c=function(e){var n=e.renderTitle,t=e.renderIconButton,c=e.onEdit,d=e.allowProfileEdit,h=e.renderLeft,f=e.renderMiddle,m=e.renderRight,v=(0,i.A)().stores.userStore.user,p=(0,a.u)().stringSet,g=null!=f?f:n;return r.createElement(s.ZP,{className:(0,u.c)("sendbird-channel-header",d&&"sendbird-channel-header--allow-edit"),renderLeft:h,renderMiddle:function(){var e;return null!==(e=null==g?void 0:g())&&void 0!==e?e:r.createElement("div",{className:"sendbird-channel-header__title",role:"button",onClick:function(){null==c||c()},onKeyDown:function(){null==c||c()},tabIndex:0},r.createElement("div",{className:"sendbird-channel-header__title__left"},r.createElement(o.A,{width:"32px",height:"32px",src:v.profileUrl,alt:v.nickname})),r.createElement("div",{className:"sendbird-channel-header__title__right"},r.createElement(l.L,{className:"sendbird-channel-header__title__right__name",type:l.a.SUBTITLE_2,color:l.b.ONBACKGROUND_1},v.nickname||p.NO_NAME),r.createElement(l.L,{className:"sendbird-channel-header__title__right__user-id",type:l.a.BODY_2,color:l.b.ONBACKGROUND_2}
1,v.userId)))},renderRight:null!=m?m:t})}},84675:function(e,n,t){"use strict";t.d(n,{R:function(){return d}});var r=t(67294),i=t(7585),a=t(69561),o=t(29515),l=t(43822),s=t(69392),u=t(41238);t(12394),t(64393),t(73935),t(78614),t(71091),t(49805),t(8978),t(1608),t(43847),t(88569),t(34420),t(93122);var c=function(e){var n=e.channel,t=e.onSubmit,a=e.onCancel,o=(0,u.A)().config,l=o.logger,c=o.isOnline,d=(0,i.u)().stringSet;if(n)return r.createElement(s.M,{disabled:!c,onCancel:a,onSubmit:function(){l.info("LeaveGroupChannel: Leaving channel",n),n.leave().then(function(){l.info("LeaveGroupChannel: Leaving channel successful!",n),null==t||t()})},submitText:d.MODAL__LEAVE_CHANNEL__FOOTER,titleText:d.MODAL__LEAVE_CHANNEL__TITLE})};function d(e){var n=e.channel,t=e.disabled,s=void 0!==t&&t,u=e.onLeaveChannel,d=(0,r.useRef)(null),h=(0,r.useRef)(null),f=(0,r.useState)(!1),m=f[0],v=f[1],p=(0,r.useContext)(i.L).stringSet;return r.createElement("div",{ref:h,tabIndex:0,role:"button",style:{display:"inline-block"},onKeyDown:function(e){return e.stopPropagation()},onClick:function(e){return e.stopPropagation()}},r.createElement(a.C,{menuTrigger:function(e){return r.createElement(o.Z,{ref:d,onClick:e,height:"32px",width:"32px"},r.createElement(l.ZP,{type:l.Qy.MORE,fillColor:l.zo.PRIMARY,width:"24px",height:"24px"}))},menuItems:function(e){return r.createElement(a.b,{parentRef:d,parentContainRef:h,closeDropdown:e},r.createElement(a.c,{onClick:function(){s||(v(!0),e())},testID:"channel_list_item_context_menu_leave_channel"},p.CHANNEL_SETTING__LEAVE_CHANNEL__TITLE))}}),m&&r.createElement(c,{channel:n,onSubmit:function(){v(!1),null==u||u()},onCancel:function(){return v(!1)}}))}},23012:function(e,n,t){"use strict";t.d(n,{f:function(){return o},x:function(){return a}});var r=t(67294),i=r.createContext({message:{},isByMe:!1}),a=function(e){var n=e.children,t=e.message,a=e.isByMe;return r.createElement(i.Provider,{value:{message:t,isByMe:void 0!==a&&a}},n)},o=function(){var e=r.useContext(i);if(void 0===e)throw Error("useMessageContext must be used within a MessageProvider");return e}},66421:function(e,n,t){"use strict";t.d(n,{X:function(){return a}});var r=t(67294);function i(e){return e?Array.from(e.querySelectorAll("[data-sb-mention='true']")):[]}function a(e,n){var t=e.ref,a=n.logger,o=t.current,l=(0,r.useState)([]),s=l[0],u=l[1];return(0,r.useLayoutEffect)(function(){o&&u(i(o))},[o]),(0,r.useEffect)(function(){var e=new MutationObserver(function(e){e.length>0&&u(i(o))});return o&&e.observe(o,{childList:!0,subtree:!0}),function(){try{e.disconnect()}catch(n){a.error("useDirtyGetMentions: observer disconnect failed",{observer:e})}}},[o]),s}},4233:function(e,n,t){"use strict";t.d(n,{ZP:function(){return e4},AS:function(){return eS.A}});var r,i,a,o=t(12394),l=t(67294),s=t(34420),u=t(71091),c=t(69392);/*!
2 * css-vars-ponyfill
3 * v2.4.9
4 * https://jhildenbiddle.github.io/css-vars-ponyfill/
5 * (c) 2018-2024 John Hildenbiddle <http://hildenbiddle.com>
6 * MIT license
7 */function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}/*!
8 * get-css-data
9 * v2.1.0
10 * https://github.com/jhildenbiddle/get-css-data
11 * (c) 2018-2022 John Hildenbiddle <http://hildenbiddle.com>
12 * MIT license
13 */function h(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={mimeType:n.mimeType||null,onBeforeSend:n.onBeforeSend||Function.prototype,onSuccess:n.onSuccess||Function.prototype,onError:n.onError||Function.prototype,onComplete:n.onComplete||Function.prototype},r=Array.isArray(e)?e:[e],i=Array.apply(null,Array(r.length)).map(function(e){return null});function a(e){var n="string"==typeof e,t=n&&"<"===e.trim().charAt(0);return n&&!t}function o(e,n){t.onError(e,r[n],n)}function l(e,n){var a=t.onSuccess(e,r[n],n);e=!1===a?"":a||e,i[n]=e,-1===i.indexOf(null)&&t.onComplete(i)}var s=document.createElement("a");r.forEach(function(e,n){if(s.setAttribute("href",e),s.href=String(s.href),document.all&&!window.atob&&s.host.split(":")[0]!==location.host.split(":")[0]){if(s.protocol===location.protocol){var r=new XDomainRequest;r.open("GET",e),r.timeout=0,r.onprogress=Function.prototype,r.ontimeout=Function.prototype,r.onload=function(){var e=r.responseText;a(e)?l(e,n):o(r,n)},r.onerror=function(e){o(r,n)},setTimeout(function(){r.send()},0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(e,")")),o(null,n)}else{var i=new XMLHttpRequest;i.open("GET",e),t.mimeType&&i.overrideMimeType&&i.overrideMimeType(t.mimeType),t.onBeforeSend(i,e,n),i.onreadystatechange=function(){if(4===i.readyState){var e=i.responseText;i.status<400&&a(e)?l(e,n):0===i.status&&a(e)?l(e,n):o(i,n)}},i.send()}})}function f(e){var n={cssComments:/\/\*[\s\S]+?\*\//g,cssImports:/(?:@import\s*)(?
13:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g},t={rootElement:e.rootElement||document,include:e.include||'style,link[rel="stylesheet"]',exclude:e.exclude||null,filter:e.filter||null,skipDisabled:!1!==e.skipDisabled,useCSSOM:e.useCSSOM||!1,onBeforeSend:e.onBeforeSend||Function.prototype,onSuccess:e.onSuccess||Function.prototype,onError:e.onError||Function.prototype,onComplete:e.onComplete||Function.prototype},r=Array.apply(null,t.rootElement.querySelectorAll(t.include)).filter(function(e){var n;return n=t.exclude,!(e.matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector).call(e,n)}),i=Array.apply(null,Array(r.length)).map(function(e){return null});function a(){if(-1===i.indexOf(null)){i.reduce(function(e,n,t){return""===n&&e.push(t),e},[]).reverse().forEach(function(e){return[r,i].forEach(function(n){return n.splice(e,1)})});var e=i.join("");t.onComplete(e,i,r)}}function o(e,n,r,o){var s=t.onSuccess(e,r,o);!function e(n,r,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],u=l(n,i,s);u.rules.length?h(u.absoluteUrls,{onBeforeSend:function(e,n,i){t.onBeforeSend(e,r,n)},onSuccess:function(e,n,i){var a=t.onSuccess(e,r,n),o=l(e=!1===a?"":a||e,n,s);
13return o.rules.forEach(function(n,t){e=e.replace(n,o.absoluteRules[t])}),e},onError:function(t,l,c){o.push({xhr:t,url:l}),s.push(u.rules[c]),e(n,r,i,a,o,s)},onComplete:function(t){t.forEach(function(e,t){n=n.replace(u.rules[t],e)}),e(n,r,i,a,o,s)}}):a(n,o)}(e=void 0!==s&&!1==!!s?"":s||e,r,o,function(e,o){null===i[n]&&(o.forEach(function(e){return t.onError(e.xhr,r,e.url)}),!t.filter||t.filter.test(e)?i[n]=e:i[n]="",a())})}function l(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i={};return i.rules=(e.replace(n.cssComments,"").match(n.cssImports)||[]).filter(function(e){return -1===r.indexOf(e)}),i.urls=i.rules.map(function(e){return e.replace(n.cssImports,"$1")}),i.absoluteUrls=i.urls.map(function(e){return m(e,t)}),i.absoluteRules=i.rules.map(function(e,n){var r=i.urls[n],a=m(i.absoluteUrls[n],t);return e.replace(r,a)}),i}r.length?r.forEach(function(e,n){var r=e.getAttribute("href"),l=e.getAttribute("rel"),s="link"===e.nodeName.toLowerCase()&&r&&l&&-1!==l.toLowerCase().indexOf("stylesheet"),u=!1!==t.skipDisabled&&e.disabled,c="style"===e.nodeName.toLowerCase();if(s&&!u){if(-1!==r.indexOf("data:text/css")){var d=decodeURIComponent(r.substring(r.indexOf(",")+1));t.useCSSOM&&(d=Array.apply(null,e.sheet.cssRules).map(function(e){return e.cssText}).join("")),o(d,n,e,location.href)}else h(r,{mimeType:"text/css",onBeforeSend:function(n,r,i){t.onBeforeSend(n,e,r)},onSuccess:function(t,i,a){o(t,n,e,m(r))},onError:function(r,o,l){i[n]="",t.onError(r,e,o),a()}})}else if(c&&!u){var f=e.textContent;t.useCSSOM&&(f=Array.apply(null,e.sheet.cssRules).map(function(e){return e.cssText}).join("")),o(f,n,e,location.href)}else i[n]="",a()}):t.onComplete("",[])}function m(e,n){var t=document.implementation.createHTMLDocument(""),r=t.createElement("base"),i=t.createElement("a");return t.head.appendChild(r),t.body.appendChild(i),r.href=n||document.baseURI||(document.querySelector("base")||{}).href||location.href,i.href=e,i.href}var v=p;function p(e,n,t){e instanceof RegExp&&(e=g(e,t)),n instanceof RegExp&&(n=g(n,t));var r=_(e,n,t);return r&&{start:r[0],end:r[1],pre:t.slice(0,r[0]),body:t.slice(r[0]+e.length,r[1]),post:t.slice(r[1]+n.length)}}function g(e,n){var t=n.match(e);return t?t[0]:null}function _(e,n,t){var r,i,a,o,l,s=t.indexOf(e),u=t.indexOf(n,s+1),c=s;if(s>=0&&u>0){if(e===n)return[s,u];for(r=[],a=t.length;c>=0&&!l;)c==s?(r.push(c),s=t.indexOf(e,c+1)):1==r.length?l=[r.pop(),u]:((i=r.pop())<a&&(a=i,o=u),u=t.indexOf(n,c+1)),c=s<u&&s>=0?s:u;r.length&&(l=[a,o])}return l}function E(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=d({},{preserveStatic:!0,removeComments:!1},n);function r(e){throw Error("CSS parse error: ".concat(e))}function i(n){var t=n.exec(e);if(t)return e=e.slice(t[0].length),t}function a(){return i(/^{\s*/)}function o(){i(/^\s*/)}function l(){for(var n,i=[];n=function(){if(o(),"/"===e[0]&&"*"===e[1]){for(var n=2;e[n]&&("*"!==e[n]||"/"!==e[n+1]);)n++;if(!e[n])return r("end of comment is missing");var t=e.slice(2,n);return e=e.slice(n+2),{type:"comment",comment:t}}}();)i.push(n);return t.removeComments?[]:i}function s(){for(o();"}"===e[0];)r("extra closing bracket");var n=i(/^(("(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^{])+)/);if(n){var t,a=n[0].trim();/\/\*/.test(a)&&(a=a.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,""));var l=/["']\w*,\w*["']/.test(a);return l&&(a=a.replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")})),t=/,/.test(a)?a.split(/\s*(?![^(]*\)),\s*/):[a],l&&(t=t.map(function(e){return e.replace(/\u200C/g,",")})),t}}function u(){if(!a())return r("missing '{'");for(var n,t=l();n=function(){if("@"===e[0])return c();i(/^([;\s]*)+/);var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=i(/^(\*?[-#/*\\\w.]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=t[0].trim(),!i(/^:\s*/))return r("property missing ':'");var a=i(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/),o={type:"declaration",property:t.replace(n,""),value:a?a[0].replace(n,"").trim():""};return i(/^[;\s]*/),o}}();)t.push(n),t=t.concat(l());return i(/^}/)?t:r("missing '}'")}function c(){if(o(),"@"===e[0]){var n=function(){var e=i(/^@(import|charset|namespace)\s*([^;]+);/);if(e)return{type:e[1],name:e[2].trim()}}()||function(){if(i(/^@font-face\s*/))return{type:"font-face",declarations:u()}}()||function(){var e=i(/^@media([^{]+)*/);if(e)return{type:"media",media:(e[1]||"").trim(),rules:h()}}
13()||function(){var e,n=i(/^@([-\w]+)?keyframes\s*/);if(n){var t=n[1];if(!(n=i(/^([-\w]+)\s*/)))return r("@keyframes missing name");var s=n[1];if(!a())return r("@keyframes missing '{'");for(var c=l();e=function(){o();for(var e,n=[];e=i(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)n.push(e[1]),i(/^,\s*/);if(n.length)return{type:"keyframe",values:n,declarations:u()}}();)c.push(e),c=c.concat(l());return i(/^}/)?{type:"keyframes",name:s,vendor:t,keyframes:c}:r("@keyframes missing '}'")}}()||function(){var e=i(/^@supports *([^{]+)/);if(e)return{type:"supports",supports:e[1].trim(),rules:h()}}()||function(){var e=i(/^@([-\w]+)?document *([^{]+)/);if(e)return{type:"document",document:e[2].trim(),vendor:e[1]?e[1].trim():null,rules:h()}}()||function(){var e=i(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return{type:"custom-media",name:e[1].trim(),media:e[2].trim()}}()||function(){if(i(/^@host\s*/))return{type:"host",rules:h()}}()||function(){if(i(/^@page */))return{type:"page",selectors:s()||[],declarations:u()}}()||function(){var e=i(/@(top|bottom|left|right)-(left|center|right|top|middle|bottom)-?(corner)?\s*/);if(e)return{type:"page-margin-box",name:"".concat(e[1],"-").concat(e[2])+(e[3]?"-".concat(e[3]):""),declarations:u()}}();return n&&!t.preserveStatic?(n.declarations?n.declarations.some(function(e){return/var\(/.test(e.value)}):(n.keyframes||n.rules||[]).some(function(e){return(e.declarations||[]).some(function(e){return/var\(/.test(e.value)})}))?n:{}:n}}function h(n){if(!n&&!a())return r("missing '{'");for(var o,d=l();e.length&&(n||"}"!==e[0])&&(o=c()||function(){if(!t.preserveStatic){var n=v("{","}",e);if(n){var i=/:(?:root|host)(?![.:#(])/.test(n.pre)&&/--\S*\s*:/.test(n.body),a=/var\(/.test(n.body);if(!i&&!a)return e=e.slice(n.end+1),{}}}var o=s()||[],l=t.preserveStatic?u():u().filter(function(e){var n=o.some(function(e){return/:(?:root|host)(?![.:#(])/.test(e)})&&/^--\S/.test(e.property),t=/var\(/.test(e.value);return n||t});return o.length||r("selector missing"),{type:"rule",selectors:o,declarations:l}}());)o.type&&d.push(o),d=d.concat(l());return n||i(/^}/)?d:r("missing '}'")}return{type:"stylesheet",stylesheet:{rules:h(!0),errors:[]}}}function b(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=d({},{parseHost:!1,store:{},onWarning:function(){}},n),r=new RegExp(":".concat(t.parseHost?"host":"root","$"));
vendor: 3,165 bytes, line 13
13return"string"==typeof e&&(e=E(e,t)),e.stylesheet.rules.forEach(function(e){"rule"===e.type&&e.selectors.some(function(e){return r.test(e)})&&e.declarations.forEach(function(e,n){var r=e.property,i=e.value;r&&0===r.indexOf("--")&&(t.store[r]=i)})}),t.store}function C(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2?arguments[2]:void 0,r={charset:function(e){return"@charset "+e.name+";"},comment:function(e){return 0===e.comment.indexOf("__CSSVARSPONYFILL")?"/*"+e.comment+"*/":""},"custom-media":function(e){return"@custom-media "+e.name+" "+e.media+";"},declaration:function(e){return e.property+":"+e.value+";"},document:function(e){return"@"+(e.vendor||"")+"document "+e.document+"{"+i(e.rules)+"}"},"font-face":function(e){return"@font-face{"+i(e.declarations)+"}"},host:function(e){return"@host{"+i(e.rules)+"}"},import:function(e){return"@import "+e.name+";"},keyframe:function(e){return e.values.join(",")+"{"+i(e.declarations)+"}"},keyframes:function(e){return"@"+(e.vendor||"")+"keyframes "+e.name+"{"+i(e.keyframes)+"}"},media:function(e){return"@media "+e.media+"{"+i(e.rules)+"}"},namespace:function(e){return"@namespace "+e.name+";"},page:function(e){return"@page "+(e.selectors.length?e.selectors.join(", "):"")+"{"+i(e.declarations)+"}"},"page-margin-box":function(e){return"@"+e.name+"{"+i(e.declarations)+"}"},rule:function(e){var n=e.declarations;if(n.length)return e.selectors.join(",")+"{"+i(n)+"}"},supports:function(e){return"@supports "+e.supports+"{"+i(e.rules)+"}"}};function i(e){for(var i="",a=0;a<e.length;a++){var o=e[a];t&&t(o);var l=r[o.type](o);l&&(i+=l,l.length&&o.selectors&&(i+=n))}return i}return i(e.stylesheet.rules)}p.range=_;var y="undefined"!=typeof window,N=y&&window.CSS&&window.CSS.supports&&window.CSS.supports("(--a: 0)"),T={group:0,job:0},S={rootElement:y?document:null,shadowDOM:!1,include:"style,link[rel=stylesheet]",exclude:"",variables:{},onlyLegacy:!0,preserveStatic:!0,preserveVars:!1,silent:!1,updateDOM:!0,updateURLs:!0,watch:null,onBeforeSend:function(){},onError:function(){},onWarning:function(){},onSuccess:function(){},onComplete:function(){},onFinally:function(){}},A={cssComments:/\/\*[\s\S]+?\*\//g,cssKeyframes:/@(?:-\w*-)?keyframes/,cssMediaQueries:/@media[^{]+\{([\s\S]+?})\s*}/g,cssUrls:/url\((?!['"]?(?:data|http|\/\/):)['"]?([^'")]*)['"]?\)/g,cssVarDeclRules:/(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^}]*})/g,cssVarDecls:/(?:[\s;]*)(-{2}\w[\w-]*)(?:\s*:\s*)([^;]*);/g,cssVarFunc:/var\(\s*--[\w-]/,cssVars:/(?:(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^;]*;*\s*)|(?:var\(\s*))(--[^:)]+)(?:\s*[:)])/},I={dom:{},job:{},user:{}},M=!1,O=null,R=0,w=null,D=!1;function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n="cssVars(): ",t=d({},S,e);function r(e,r,i,a){!t.silent&&window.console&&console.error("".concat(n).concat(e,"\n"),r),t.onError(e,r,i,a)}function i(e){!t.silent&&window.console&&console.warn("".concat(n).concat(e)),t.onWarning(e)}function a(e){t.onFinally(!!e,N,U()-t.__benchmark)}if(y){if(t.watch){t.watch=S.watch,function(e){function n(e){var n=t(e)&&e.hasAttribute("disabled"),r=(e.sheet||{}).disabled;return n||r}
13function t(e){return"link"===e.nodeName.toLowerCase()&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")}function r(e){return"style"===e.nodeName.toLowerCase()}window.MutationObserver&&(O&&(O.disconnect(),O=null),(O=new MutationObserver(function(i){i.some(function(i){var a,o;return function(r){var i=!1;if("attributes"===r.type&&t(r.target)&&!n(r.target)){var a="disabled"===r.attributeName,o="href"===r.attributeName,l="skip"===r.target.getAttribute("data-cssvars"),s="src"===r.target.getAttribute("data-cssvars");a?i=!l&&!s:o&&(l?r.target.setAttribute("data-cssvars",""):s&&x(e.rootElement,!0),i=!0)}return i}(i)||function(e){var n=!1;if("childList"===e.type){var t=r(e.target),i="out"===e.target.getAttribute("data-cssvars");n=t&&!i}return n}(i)||(a=!1,"childList"===i.type&&(a=[].slice.call(i.addedNodes).some(function(e){var i=1===e.nodeType&&e.hasAttribute("data-cssvars"),a=r(e)&&A.cssVars.test(e.textContent);return!i&&(t(e)||a)&&!n(e)})),a)||(o=!1,"childList"===i.type&&(o=[].slice.call(i.removedNodes).some(function(n){var t=1===n.nodeType,r=t&&"out"===n.getAttribute("data-cssvars"),i=t&&"src"===n.getAttribute("data-cssvars");if(i||r){var a=n.getAttribute("data-cssvars-group"),o=e.rootElement.querySelector('[data-cssvars-group="'.concat(a,'"]'));i&&x(e.rootElement,!0),o&&o.parentNode.removeChild(o)}return i})),o)})&&L(e)})).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0}))}(t),L(t);return}if(!1===t.watch&&O&&(O.disconnect(),O=null),!t.__benchmark){if(M===t.rootElement){!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;clearTimeout(w),w=setTimeout(function(){e.__benchmark=null,L(e)},n)}(e);return}var o=[].slice.call(t.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])'));t.__benchmark=U(),t.exclude=[O?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',"link[disabled]:not([data-cssvars])",t.exclude].filter(function(e){return e}).join(","),t.variables=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=/^-{2}/;return Object.keys(e).reduce(function(t,r){return t[n.test(r)?r:"--".concat(r.replace(/^-+/,""))]=e[r],t},{})}(t.variables),o.forEach(function(e){var n="style"===e.nodeName.toLowerCase()&&e.__cssVars.text,t=n&&e.textContent!==e.__cssVars.text;n&&t&&(e.sheet&&(e.sheet.disabled=!1),e.setAttribute("data-cssvars",""))}),!O&&([].slice.call(t.rootElement.querySelectorAll('[data-cssvars="out"]')).forEach(function(e){var n=e.getAttribute("data-cssvars-group");(n?t.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(n,'"]')):null)||e.parentNode.removeChild(e)}),R&&o.length<R&&(R=o.length,I.dom={}))}if("loading"!==document.readyState){if(N&&t.onlyLegacy){var l=!1;if(t.updateDOM){var s=t.rootElement.host||(t.rootElement===document?document.documentElement:t.rootElement);Object.keys(t.variables).forEach(function(e){var n=t.variables[e];l=l||n!==getComputedStyle(s).getPropertyValue(e),s.style.setProperty(e,n)})}a(l)}else!D&&(t.shadowDOM||t.rootElement.shadowRoot||t.rootElement.host)?f({rootElement:S.rootElement,include:S.include,exclude:t.exclude,skipDisabled:!1,onSuccess:function(e,n,t){return(!(n.sheet||{}).disabled||!!n.__cssVars)&&((e=((e=e.replace(A.cssComments,"").replace(A.cssMediaQueries,"")).match(A.cssVarDeclRules)||[]).join(""))||!1)},onComplete:function(e,n,r){b(e,{store:I.dom,onWarning:i}),D=!0,L(t)}}):(M=t.rootElement,f({rootElement:t.rootElement,include:t.include,exclude:t.exclude,skipDisabled:!1,onBeforeSend:t.onBeforeSend,onError:function(e,n,t){var i=e.responseURL||P(t,location.href),a=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");r("CSS XHR Error: ".concat(i," ").concat(e.status," ").concat(a),n,e,i)},onSuccess:function(e,n,r){if((n.sheet||{}).disabled&&!n.__cssVars)return!1;var i,a="link"===n.nodeName.toLowerCase(),o="style"===n.nodeName.toLowerCase()&&e!==n.textContent,l=t.onSuccess(e,n,r);return e=void 0!==l&&!1==!!l?"":l||e,t.updateURLs&&(a||o)&&(((i=e).replace(A.cssComments,"").match(A.cssUrls)||[]).forEac
13h(function(e){var n=e.replace(A.cssUrls,"$1"),t=P(n,r);i=i.replace(e,e.replace(n,t))}),e=i),e},onComplete:function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],l=d({},I.dom,I.user);if(I.job={},o.forEach(function(e,a){var o=n[a];if(e.__cssVars=e.__cssVars||{},e.__cssVars.text=o,A.cssVars.test(o))try{var l=E(o,{preserveStatic:t.preserveStatic,removeComments:!0});b(l,{parseHost:!!t.rootElement.host,store:I.dom,onWarning:i}),e.__cssVars.tree=l}catch(n){r(n.message,e)}}),d(I.job,I.dom),t.updateDOM?(d(I.user,t.variables),d(I.job,I.user)):(d(I.job,I.user,t.variables),d(l,t.variables)),T.job>0&&(Object.keys(I.job).length>Object.keys(l).length||Object.keys(l).length&&Object.keys(I.job).some(function(e){return I.job[e]!==l[e]})))x(t.rootElement),L(t);else{var s=[],u=[],c=!1;if(t.updateDOM&&T.job++,o.forEach(function(e,a){var o=!e.__cssVars.tree;if(e.__cssVars.tree)try{!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=d({},{preserveStatic:!0,preserveVars:!1,variables:{},onWarning:function(){}},n);
13"string"==typeof e&&(e=E(e,t)),function e(n,t){n.rules.forEach(function(r){if(r.rules){e(r,t);return}if(r.keyframes){r.keyframes.forEach(function(e){"keyframe"===e.type&&t(e.declarations,r)});return}r.declarations&&t(r.declarations,n)})}(e.stylesheet,function(e,n){for(var r=0;r<e.length;r++){var i=e[r],a=i.type,o=i.property,l=i.value;if("declaration"===a){if(!t.preserveVars&&o&&0===o.indexOf("--")){e.splice(r,1),r--;continue}if(-1!==l.indexOf("var(")){var s=function e(n){var t,r,i,a,o,l,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2?arguments[2]:void 0;if(-1===n.indexOf("var("))return n;var c=v("(",")",n);return c?"var"!==c.pre.slice(-3)?c.pre+"(".concat(e(c.body,s),")")+e(c.post,s):0===c.body.trim().length?(s.onWarning("var() must contain a non-whitespace string"),n):c.pre.slice(0,-3)+(r=(t=c.body).split(",")[0].replace(/[\s\n\t]/g,""),i=(t.match(/(?:\s*,\s*){1}(.*)?/)||[])[1],o=(a=Object.prototype.hasOwnProperty.call(s.variables,r)?String(s.variables[r]):void 0)||(i?String(i):void 0),l=u||t,(a||s.onWarning('variable "'.concat(r,'" is undefined')),o&&"undefined"!==o&&o.length>0)?e(o,s,l):"var(".concat(l,")"))+e(c.post,s):(-1!==n.indexOf("var(")&&s.onWarning('missing closing ")" in the value "'.concat(n,'"')),n)}(l,t);s!==i.value&&(s=function(e){return(e.match(/calc\(([^)]+)\)/g)||[]).forEach(function(n){var t="calc".concat(n.split("calc").join(""));e=e.replace(n,t)}),e}(s),t.preserveVars?(e.splice(r,0,{type:a,property:o,value:s}),r++):i.value=s)}}}}),C(e)}(e.__cssVars.tree,d({},t,{variables:I.job,onWarning:i}));var l=C(e.__cssVars.tree);if(t.updateDOM){var h=n[a],f=A.cssVarFunc.test(h);if(e.getAttribute("data-cssvars")||e.setAttribute("data-cssvars","src"),l.length&&f){var m=e.getAttribute("data-cssvars-group")||++T.group,p=l.replace(/\s/g,""),g=t.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(m,'"]'))||document.createElement("style");c=c||A.cssKeyframes.test(l),t.preserveStatic&&e.sheet&&(e.sheet.disabled=!0),g.hasAttribute("data-cssvars")||g.setAttribute("data-cssvars","out"),p===e.textContent.replace(/\s/g,"")?(o=!0,g&&g.parentNode&&(e.removeAttribute("data-cssvars-group"),g.parentNode.removeChild(g))):p===g.textContent.replace(/\s/g,"")||([e,g].forEach(function(e){e.setAttribute("data-cssvars-job",T.job),e.setAttribute("data-cssvars-group",m)}),g.textContent=l,s.push(l),u.push(g),g.parentNode||e.parentNode.insertBefore(g,e.nextSibling))}}else e.textContent.replace(/\s/g,"")!==l&&s.push(l)}catch(n){r(n.message,e)}o&&e.setAttribute("data-cssvars","skip"),e.hasAttribute("data-cssvars-job")||e.setAttribute("data-cssvars-job",T.job)}),R=t.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,t.shadowDOM)for(var h,f=[].concat(t.rootElement).concat([].slice.call(t.rootElement.querySelectorAll("*"))),m=0;h=f[m];++m)h.shadowRoot&&h.shadowRoot.querySelector("style")&&L(d({},t,{rootElement:h.shadowRoot}));t.updateDOM&&c&&function(e){var n=["animation-name","-moz-animation-name","-webkit-animation-name"].filter(function(e){return getComputedStyle(document.body)[e]})[0];if(n){for(var t=[].slice.call(e.querySelectorAll("*")),r=[],i="__CSSVARSPONYFILL-KEYFRAMES__",a=0,o=t.length;a<o;a++){var l=t[a];"none"!==getComputedStyle(l)[n]&&(l.style[n]+=i,r.push(l))}document.body.offsetHeight;for(var s=0,u=r.length;s<u;s++){var c=r[s].style;c[n]=c[n].replace(i,"")}}}(t.rootElement),M=!1,t.onComplete(s.join(""),u,JSON.parse(JSON.stringify(I.job)),U()-t.__benchmark),a(u.length)}}}))}else document.addEventListener("DOMContentLoaded",function n(t){L(e),document.removeEventListener("DOMContentLoaded",n)})}}function P(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,t=document.implementation.createHTMLDocument(""),r=t.createElement("base"),i=t.createElement("a");return t.head.appendChild(r),t.body.appendChild(i),r.href=n,i.href=e,i.href}function U(){return y&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}function x(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];[].slice.call(e.querySelectorAll('[data-cssvars="skip"],[data-cssvars="src"]')).forEac
13h(function(e){return e.setAttribute("data-cssvars","")}),n&&(I.dom={})}L.reset=function(){for(var e in T.job=0,T.group=0,M=!1,O&&(O.disconnect(),O=null),R=0,w=null,D=!1,I)I[e]={}};var k=t(49805),F=t(70599),G=t(19940),B=t(36614),H=t(51947),V=t(4500),j=t(53742),z=t(73235),K=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n._channels=new Map,n._enteredChannelUrls=[],n}return(0,B.c)(n,e),Object.defineProperty(n.prototype,"enteredChannels",{get:function(){var e=this;return this._enteredChannelUrls.map(function(n){return e._channels.get(n)}).filter(function(e){return!!e})},enumerable:!1,configurable:!0}),n.prototype.isEnteredChannel=function(e){return this._enteredChannelUrls.includes(e)},n.prototype.enter=function(e){0>this._enteredChannelUrls.indexOf(e)&&this._enteredChannelUrls.push(e)},n.prototype.exit=function(e){var n=this._enteredChannelUrls.indexOf(e);n>=0&&this._enteredChannelUrls.splice(n,1)},n.prototype.exitAll=function(){this._enteredChannelUrls=[]},n.prototype.get=function(e){return(0,B._)(this,void 0,void 0,function(){return(0,B.b)(this,function(n){return[2,this._channels.get(e)]})})},n.prototype.upsert=function(e){return(0,B._)(this,void 0,void 0,function(){var n,t=this;return(0,B.b)(this,function(r){return n=[],e.forEach(function(e){if(t._channels.has(e.url)){var r=t._channels.get(e.url);Object.assign(r,e),n.push(r)}else t._channels.set(e.url,e),n.push(e)}),[2,n]})})},n.prototype.remove=function(e){return(0,B._)(this,void 0,void 0,function(){return(0,B.b)(this,function(n){return this._channels.delete(e),this.exit(e),[2]})})},n.prototype.clear=function(){return(0,B._)(this,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._channels.clear(),this._enteredChannelUrls=[],[2]})})},n}(B.af),Y={channelUrl:void 0,name:void 0,coverUrlOrImage:void 0,data:void 0,customType:void 0,operatorUserIds:void 0,isEphemeral:void 0},Z=function(e){function n(n){var t=n.channelUrl,r=n.isInternalCall,i=e.call(this)||this;return i.method=B.A.GET,i.path="".concat(r?B.bn:B.bo,"/").concat(encodeURIComponent(t)),i.params={show_pinned_messages:!0},i}return(0,B.c)(n,e),n}(B.f),Q=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.channel=new eu(n,t),r}return(0,B.c)(n,e),n}(B.h),W=function(e){function n(n){var t=this,r=n.channelUrl,i=n.coverUrlOrImage,a=n.name,o=n.data,l=n.customType,s=n.operatorUserIds,u=n.isEphemeral;return(t=e.call(this)||this).method=B.A.POST,t.path=B.bo,t.params=(0,B.e)((0,B.u)({channel_url:r,cover_url:(0,B.a)("string",i)?i:null,cover_file:(0,B.i)(i)?i:null,name:a,data:o,custom_type:l,operators:s,is_ephemeral:u})),t}return(0,B.c)(n,e),n}(B.f);i=B.h,(0,B.c)(function(e,n){var t=i.call(this,e,n)||this;return t.channel=new eu(e,n),t},i);var q=function(e){function n(n){var t=n.channelUrl;return e.call(this,{code:"ENTR",payload:{channel_url:t},ackRequired:!0})||this}return(0,B.c)(n,e),n}(B.ak),X=function(e){function n(n,t,r){var i,a,o=this;return o=e.call(this,n,"SYEV",r)||this,r.data&&(o.participantCount=null!==(i=r.data.participant_count)&&void 0!==i?i:0,o.user=new B.U(n,r.data),o.ts=null!==(a=r.data.edge_ts)&&void 0!==a?a:0),o}return(0,B.c)(n,e),n}(j.C),$=function(e){function n(n){var t=n.channelUrl;return e.call(this,{code:"EXIT",payload:{channel_url:t},ackRequired:!0})||this}return(0,B.c)(n,e),n}(B.ak),J=function(e){function n(n,t,r){var i,a,o=this;return o=e.call(this,n,"EXIT",r)||this,r.data&&(o.participantCount=null!==(i=r.data.participant_count)&&void 0!==i?i:0,o.user=new B.U(n,r.data),o.ts=null!==(a=r.data.edge_ts)&&void 0!==a?a:0),o}return(0,B.c)(n,e),n}(j.C),ee={},en=function(e){function n(n,t){var r=e.call(this,n,(0,B.g)((0,B.g)({},t),{channelType:B.C.OPEN}))||this;return r.subscribeChannelEvent=B.aA,r.unsubscribeChannelEvent=B.aA,r.refreshChannel=function(){return(0,B._)(r,void 0,void 0,function(){return(0,B.b)(this,function(e){return[2,(0,B.aA)()]})})},r._openChannelCache=new K(n),r._openChannelHandlers=new Map,r._dispatcher.on(function(e){var n,t;if(e instanceof B.W)r._handleEvent(e).catch(function(e){if((0,B.O)(e)&&"foreground"===r._sdkState.appState)throw e});else if(e instanceof B.D&&e.stateType===B.F.CONNECTED){var i=r._openChannelCache.enteredChannels;try{for(var a=(0,B.t)(i),o=a.next();!o.done;o=a.next())o.value.enter()}catch(e){n={error:e}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}}}),ee[n]||(ee[n]=r),r}return(0,B.c)(n,e),n.of=function(e){return ee[e]},n.prototype.buildOpenChannelFromSerializedData=function(e){var n=(0,B.z)(e);return new eu(this._iid,eu.payloadify(n))},n.prototype.getChannelFromCache=function(e){var n;return(0,B._)(this,void 0,void 0,function(){return(0,B.b)(this,function(t){switch(t.label){case 0:return[4,this._openChannelCache.get(e)];case 1:return[2,null!==(n=t.sent())&&void 0!==n?n:null]}})})},n.prototype.upsertChannelsToCache=function(e){return(0,B._)(this,void 0,void 0,function(){return(0,B.b)(this,function(n){switch(n.label){case 0:return[4,this._openChannelCache.upsert(e)];case 1:return[2,n.sent()]}})})},n.prototype.removeChannelsFromCache=function(e){return(0,B._)(this,void 0,void 0,function(){var n,t,r,i,a;return(0,B.b)(this,function(o){switch(o.label){case 0:o.trys.push([0,5,6,7]),t=(n=(0,B.t)(e)).next(),o.label=1;case 1:return t.done?[3,4]:(r=t.value,[4,this._openChannelCache.remove(r)]);case 2:o.sent(),o.label=3;case 3:return t=n.next(),[3,1];case 4:return[3,7];case 5:return i={error:o.sent()},[3,7];case 6:try{t&&!t.done&&(a=n.return)&&a.call(n)}finally{if(i)throw i.error}
13return[7];case 7:return[2]}})})},n.prototype.setEnteredToCache=function(e){this._openChannelCache.enter(e.url)},n.prototype.setExitedToCache=function(e){this._openChannelCache.exit(e.url)},Object.defineProperty(n.prototype,"handlers",{get:function(){return(0,B.p)([],(0,B.q)(this._openChannelHandlers.values()),!1)},enumerable:!1,configurable:!0}),n.prototype._handleEvent=function(e){return(0,B._)(this,void 0,void 0,function(){var n,t,r,i,a,o,l,s,u,c,d,h,f,m,v,p,g,_,E,b,C,y,N,T,S,A,I,M,O,R,w,D,L,P,U,x,k,F,G,H,z,K,Y,Z,Q,W,q,$,ee,en,et,er,ei,ea,eo,el,es,eu,ec,ed,eh,ef,em,ev,ep,eg,e_,eE,eb,eC,ey,eN,eT,eS=this;return(0,B.b)(this,function(eA){switch(eA.label){case 0:switch(eA.trys.push([0,59,,60]),e.code){case"MESG":case"FILE":case"ADMM":case"BRDM":return[3,1];case"MEDI":case"FEDI":case"AEDI":return[3,4];case"DELM":return[3,7];case"MRCT":return[3,10];case"MTHD":return[3,13];case"MCNT":return[3,16];case"PEDI":return[3,27];case"VOTE":return[3,30];case"SYEV":return[3,33]}return[3,58];case 1:return i=null,"MESG"===e.code?i=e.as(V.ag):"FILE"===e.code?i=e.as(V.ah):"ADMM"!==e.code&&"BRDM"!=e.code||(i=e.as(j.A)),i?(n=i.message,t=i.isMentioned,n.channelType!==B.C.OPEN?[3,3]:[4,this.getChannel(n.channelUrl,!0)]):[3,3];case 2:r=eA.sent(),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){var e,i,a,o,l;return(0,B.b)(this,function(s){try{for(i=(e=(0,B.t)(this._openChannelHandlers.values())).next();!i.done;i=e.next())a=i.value,this._openChannelCache.isEnteredChannel(r.url)&&(a.onMessageReceived&&a.onMessageReceived(r,n),t&&a.onMentionReceived&&a.onMentionReceived(r,n))}catch(e){o={error:e}}finally{try{i&&!i.done&&(l=e.return)&&l.call(e)}finally{if(o)throw o.error}}return[2]})})}),eA.label=3;case 3:return[3,58];case 4:return i=null,"MEDI"===e.code?i=e.as(V.ae):"FEDI"===e.code?i=e.as(V.af):"AEDI"===e.code&&(i=e.as(j.b)),i?(a=i.message,o=i.mentionCountChange,a.channelType!==B.C.OPEN?[3,6]:[4,this.getChannel(a.channelUrl,!0)]):[3,6];case 5:l=eA.sent(),s=!1,l.lastPinnedMessage&&l.lastPinnedMessage.messageId===a.messageId&&l.lastPinnedMessage.updatedAt<a.updatedAt&&(l.lastPinnedMessage=a,s=!0),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){var e,n,t,r,i,u,c;return(0,B.b)(this,function(d){try{for(n=(e=(0,B.t)(this._openChannelHandlers.values())).next();!n.done;n=e.next())t=n.value,this._openChannelCache.isEnteredChannel(l.url)&&(s&&(null===(u=t.onPinnedMessageUpdated)||void 0===u||u.call(t,l),null===(c=t.onChannelChanged)||void 0===c||c.call(t,l)),t.onMessageUpdated&&t.onMessageUpdated(l,a),o>0&&t.onMentionReceived&&t.onMentionReceived(l,a))}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}),eA.label=6;case 6:return[3,58];case 7:return w=(u=e.as(B.bi)).channelUrl,D=u.channelType,c=u.messageId,D!==B.C.OPEN?[3,9]:[4,this.getChannel(w,!0)];case 8:d=eA.sent(),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){try{for(n=(e=(0,B.t)(this._openChannelHandlers.values())).next();!n.done;n=e.next())t=n.value,this._openChannelCache.isEnteredChannel(d.url)&&t.onMessageDeleted&&t.onMessageDeleted(d,c)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}),eA.label=9;case 9:return[3,58];case 10:return w=(h=e.as(j.R)).channelUrl,D=h.channelType,f=h.event,D!==B.C.OPEN?[3,12]:[4,this.getChannel(w,!0)];case 11:m=eA.sent(),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){try{for(n=(e=(0,B.t)(this._openChannelHandlers.values())).next();!n.done;n=e.next())t=n.value,this._openChannelCache.isEnteredChannel(m.url)&&t.onReactionUpdated&&t.onReactionUpdated(m,f)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}),eA.label=12;case 12:return[3,58];case 13:return(v=e.as(j.T).event).channelType!==B.C.OPEN?[3,15]:[4,this.getChannel(v.channelUrl,!0)];case 14:p=eA.sent(),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){try{for(n=(e=(0,B.t)(this._openChannelHandlers.values())
13).next();!n.done;n=e.next())t=n.value,this._openChannelCache.isEnteredChannel(p.url)&&t.onThreadInfoUpdated&&t.onThreadInfoUpdated(p,v)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}),eA.label=15;case 15:return[3,58];case 16:g=e.as(j.M).openChannelMemberCounts,_=[],eA.label=17;case 17:eA.trys.push([17,22,23,24]),b=(E=(0,B.t)(g)).next(),eA.label=18;case 18:return b.done?[3,21]:(w=(C=b.value).channelUrl,z=C.participantCount,y=C.updatedAt,[4,this.getChannelFromCache(w)]);case 19:(N=eA.sent())&&N._updateParticipantCount(z,y)&&_.push(N),eA.label=20;case 20:return b=E.next(),[3,18];case 21:return[3,24];case 22:return eN={error:eA.sent()},[3,24];case 23:try{b&&!b.done&&(eT=E.return)&&eT.call(E)}finally{if(eN)throw eN.error}return[7];case 24:return _.length>0?[4,this.upsertChannelsToCache(_)]:[3,26];case 25:T=eA.sent(),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){try{for(n=(e=(0,B.t)(this._openChannelHandlers.values())).next();!n.done;n=e.next())(t=n.value).onChannelMemberCountChanged&&t.onChannelMemberCountChanged(T)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}),eA.label=26;case 26:return[3,58];case 27:return A=(S=e.as(j.P)).event,I=S.status,w=S.channelUrl,D=S.channelType,w&&D===B.C.OPEN?[4,this.getChannel(w,!0)]:[3,29];case 28:M=eA.sent(),this._dispatcher.dispatch(new B.aT({event:A,source:B.a2.EVENT_POLL_UPDATED})),(0,B.G)(I===B.bj?function(){return(0,B._)(eS,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){try{for(n=(e=(0,B.t)(this._openChannelHandlers.values())).next();!n.done;n=e.next())(t=n.value).onPollDeleted&&t.onPollDeleted(M,A.pollId)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}:function(){return(0,B._)(eS,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){try{for(n=(e=(0,B.t)(this._openChannelHandlers.values())).next();!n.done;n=e.next())(t=n.value).onPollUpdated&&t.onPollUpdated(M,A)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}),eA.label=29;case 29:return[3,58];case 30:return R=(O=e.as(V.aa)).event,w=O.channelUrl,D=O.channelType,w&&D===B.C.OPEN?[4,this.getChannel(w,!0)]:[3,32];case 31:L=eA.sent(),this._dispatcher.dispatch(new B.aM({event:R,source:B.a2.EVENT_POLL_VOTED})),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){try{for(n=(e=(0,B.t)(this._openChannelHandlers.values())).next();!n.done;n=e.next())(t=n.value).onPollVoted&&t.onPollVoted(L,R)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}),eA.label=32;case 32:case 57:return[3,58];case 33:if(!(P=e.as(j.C).event).isOpenChannelEvent)return[3,57];switch(P.category){case j.a.CHANNEL_ENTER:return[3,34];case j.a.CHANNEL_EXIT:return[3,36];case j.a.CHANNEL_OPERATOR_UPDATE:return[3,38];case j.a.USER_CHANNEL_MUTE:case j.a.USER_CHANNEL_UNMUTE:return[3,40];case j.a.USER_CHANNEL_BAN:case j.a.USER_CHANNEL_UNBAN:return[3,42];case j.a.CHANNEL_FREEZE:case j.a.CHANNEL_UNFREEZE:return[3,44];case j.a.CHANNEL_DELETED:return[3,46];case j.a.CHANNEL_PROP_CHANGED:return[3,49];case j.a.CHANNEL_META_DATA_CHANGED:return[3,51];case j.a.CHANNEL_META_COUNTERS_CHANGED:return[3,53];case j.a.PINNED_MESSAGE_CHANGED:return[3,55]}return[3,57];case 34:case 36:case 38:case 40:case 42:case 44:case 46:case 51:case 53:case 55:return[4,this.getChannel(P.channelUrl,!0)];case 35:return U=eA.sent(),z=(x=e.as(X)).participantCount,k=x.user,F=U._updateParticipantCount(z,P.ts),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){e.onUserEntered&&e.onUserEntered(U,k),F&&e.onChannelParticipantCountChanged&&e.onChannelParticipantCountChanged(U)}),[2]})})}),[3,57];case 37:return G=eA.sent(),z=(H=e.as(J)).participantCount,K=H.user,Y=G._updateParticipantCount(z,P.ts),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEac
13h(function(e){e.onUserExited&&e.onUserExited(G,K),Y&&e.onChannelParticipantCountChanged&&e.onChannelParticipantCountChanged(G)}),[2]})})}),[3,57];case 39:return Z=eA.sent(),Q=e.as(j.O).operators,Z.operators=Q,this.upsertChannelsToCache([Z]),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){e.onOperatorUpdated&&e.onOperatorUpdated(Z,Q)}),[2]})})}),[3,57];case 41:return W=eA.sent(),q=P.category===j.a.USER_CHANNEL_MUTE,$=e.as(q?V.a8:V.a9).user,(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){q?e.onUserMuted&&e.onUserMuted(W,$):e.onUserUnmuted&&e.onUserUnmuted(W,$)}),[2]})})}),[3,57];case 43:return ee=eA.sent(),en=P.category===j.a.USER_CHANNEL_BAN,et=e.as(en?V.a7:V.a6).user,(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){en?e.onUserBanned&&e.onUserBanned(ee,et):e.onUserUnbanned&&e.onUserUnbanned(ee,et)}),[2]})})}),[3,57];case 45:return er=eA.sent(),ei=e.as(V.a5).freeze,er.isFrozen=ei,this.upsertChannelsToCache([er]),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){ei?e.onChannelFrozen&&e.onChannelFrozen(er):e.onChannelUnfrozen&&e.onChannelUnfrozen(er)}),[2]})})}),[3,57];case 47:return ea=eA.sent(),[4,this.removeChannelsFromCache([ea.url])];case 48:return eA.sent(),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){e.onChannelDeleted&&e.onChannelDeleted(ea.url,ea.channelType)}),[2]})})}),[3,57];case 49:return[4,this.getChannelWithoutCache(P.channelUrl,!0)];case 50:return eo=eA.sent(),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){e.onChannelChanged&&e.onChannelChanged(eo)}),[2]})})}),[3,57];case 52:return el=eA.sent(),eu=(es=e.as(V.a4)).created,ec=es.updated,ed=es.deleted,eu&&el._upsertCachedMetaData(eu,P.ts),ec&&el._upsertCachedMetaData(ec,P.ts),ed&&el._removeFromCachedMetaData(ed,P.ts),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){eu&&e.onMetaDataCreated&&e.onMetaDataCreated(el,eu),ec&&e.onMetaDataUpdated&&e.onMetaDataUpdated(el,ec),ed&&e.onMetaDataDeleted&&e.onMetaDataDeleted(el,ed)}),[2]})})}),[3,57];case 54:return eh=eA.sent(),em=(ef=e.as(V.a3)).created,ev=ef.updated,ep=ef.deleted,(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){em&&e.onMetaCounterCreated&&e.onMetaCounterCreated(eh,em),ev&&e.onMetaCounterUpdated&&e.onMetaCounterUpdated(eh,ev),ep&&e.onMetaCounterDeleted&&e.onMetaCounterDeleted(eh,ep)}),[2]})})}),[3,57];case 56:return eg=eA.sent(),eE=(e_=e.as(j.U)).pinnedMessageIds,eb=e_.latestPinnedMessage,(eC=e_.ts)>eg._pinnedMessagesUpdatedAt&&(eg.pinnedMessageIds=eE,eg.lastPinnedMessage=eb,eg._pinnedMessagesUpdatedAt=eC,this.upsertChannelsToCache([eg]),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){try{for(n=(e=(0,B.t)(this._openChannelHandlers.values())).next();!n.done;n=e.next())(t=n.value).onChannelChanged&&t.onChannelChanged(eg)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}),(0,B.G)(function(){return(0,B._)(eS,void 0,void 0,function(){return(0,B.b)(this,function(e){return this._openChannelHandlers.forEach(function(e){e.onPinnedMessageUpdated&&e.onPinnedMessageUpdated(eg)}),[2]})})})),[3,57];case 58:return[3,60];case 59:if(ey=eA.sent(),(0,B.O)(ey))throw ey;return[3,60];case 60:return[2]}})})},n.prototype.addHandler=function(e,n){this._openChannelHandlers.set(e,n)},n.prototype.removeHandler=function(e){this._openChannelHandlers.delete(e)},n.prototype.clearHandler=function(){this._openChannelHandlers.clear()},n.prototype.getChannel=function(e,n){return void 0===n&&(n=!1),(0,B._)(this,void 0,void 0,function(){var t;return(0,B.b)(this,function(r){switch(r.label){case 0:(0,B.w)((0,B.a)("string",e)).throw(B.s.invalidParameters),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.getChannelFromCache(e)];case 2:return(t=r.sent())?[2,t]:[3,4];case 3:return r.sent(),[3,4];
13case 4:return[4,this.getChannelWithoutCache(e,n)];case 5:return[2,r.sent()]}})})},n.prototype.getChannelWithoutCache=function(e,n){return void 0===n&&(n=!1),(0,B._)(this,void 0,void 0,function(){var t,r;return(0,B.b)(this,function(i){switch(i.label){case 0:return(0,B.w)((0,B.a)("string",e)).throw(B.s.invalidParameters),t=new Z({channelUrl:e,isInternalCall:n}),[4,this._requestQueue.send(t)];case 1:return r=i.sent().as(Q).channel,[4,this.upsertChannelsToCache([r])];case 2:return[2,i.sent()[0]]}})})},n.prototype.createChannel=function(e){return(0,B._)(this,void 0,void 0,function(){var n,t,r;return(0,B.b)(this,function(i){switch(i.label){case 0:return n=(0,B.g)((0,B.g)({},Y),e),(0,B.w)((0,B.Q)("string",n.operatorUserIds,!0)&&((0,B.a)("string",n.coverUrlOrImage,!0)||(0,B.i)(n.coverUrlOrImage,!0))&&(0,B.a)("string",n.name,!0)&&(0,B.a)("string",n.data,!0)&&(0,B.a)("string",n.customType,!0)&&((0,B.a)("string",n.channelUrl)&&/^\w+$/.test(n.channelUrl)||null===n.channelUrl||void 0===n.channelUrl)&&(0,B.a)("boolean",n.isEphemeral,!0)).throw(B.s.invalidParameters),t=new W(n),[4,this._requestQueue.send(t)];case 1:return r=i.sent().as(Q).channel,this.upsertChannelsToCache([r]),[2,r]}})})},n}(j.B),et={name:void 0,coverUrlOrImage:void 0,data:void 0,customType:void 0,operatorUserIds:void 0},er=function(e){function n(n){var t=this,r=n.channelUrl,i=n.token,a=n.limit;return(t=e.call(this)||this).method=B.A.GET,t.path="".concat(B.bo,"/").concat(encodeURIComponent(r),"/participants"),t.params={token:i,limit:a},t}return(0,B.c)(n,e),n}(B.f),ei=function(e){function n(n,t){var r=e.call(this,n,t)||this;r.participants=[];var i=t.next,a=t.participants;return r.token=i,r.participants=a.map(function(e){return new V.P(n,e)}),r}return(0,B.c)(n,e),n}(B.h),ea=function(e){function n(n,t,r){return e.call(this,n,t,B.C.OPEN,r)||this}return(0,B.c)(n,e),n.prototype._validate=function(){return e.prototype._validate.call(this)},n.prototype.next=function(){return(0,B._)(this,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){switch(a.label){case 0:return this._validate()?this._isLoading?[3,3]:this._hasNext?(this._isLoading=!0,e=B.V.of(this._iid).requestQueue,n=new er((0,B.g)((0,B.g)({},this),{token:this._token})),[4,e.send(n)]):[3,2]:[3,5];case 1:return r=(t=a.sent().as(ei)).participants,i=t.token,this._token=i,this._hasNext=!!i,this._isLoading=!1,[2,r];case 2:return[2,[]];case 3:throw B.s.queryInProgress;case 4:return[3,6];case 5:throw B.s.invalidParameters;case 6:return[2]}})})},n}(B.aB),eo=function(e){function n(n){var t=this,r=n.channelUrl,i=n.coverUrlOrImage,a=n.name,o=n.data,l=n.customType,s=n.operatorUserIds;return(t=e.call(this)||this).method=B.A.PUT,t.path="".concat(B.bo,"/").concat(encodeURIComponent(r)),t.params=(0,B.e)((0,B.u)({cover_url:(0,B.a)("string",i)?i:null,cover_file:(0,B.i)(i)?i:null,name:a,data:o,custom_type:l,operators:s})),t}return(0,B.c)(n,e),n}(B.f),el=function(e){function n(n,t){var r=e.call(this,n,t)||this;return r.channel=new eu(n,t),r}return(0,B.c)(n,e),n}(B.h),es=function(e){function n(n){var t=this,r=n.channelUrl;return(t=e.call(this)||this).method=B.A.DELETE,t.path="".concat(B.bo,"/").concat(encodeURIComponent(r)),t}return(0,B.c)(n,e),n}(B.f);a=B.h,(0,B.c)(function(e,n){return a.call(this,e,n)||this},a);var eu=function(e){function n(n,t){var r,i=this;return(i=e.call(this,n,t)||this)._lastParticipantCountUpdated=0,i.participantCount=0,i.operators=[],i.lastPinnedMessage=null,i._pinnedMessagesUpdatedAt=0,i.channelType=B.C.OPEN,i.participantCount=null!==(r=t.participant_count)&&void 0!==r?r:0,i.operators=Array.isArray(t.operators)?t.operators.map(function(e){return new B.U(n,e)}):[],i.lastPinnedMessage=t.latest_pinned_message?(0,V.T)(i._iid,(0,B.g)({channel_type:i.channelType},t.latest_pinned_message)):null,i}return(0,B.c)(n,e),n.payloadify=function(e){return(0,B.e)((0,B.u)((0,B.g)((0,B.g)({},V.z.payloadify(e)),{participant_count:e.participantCount,operators:e.operators.map(function(e){return B.U.payloadify(e)}),latest_pinned_message:e.lastPinnedMessage?(0,V.as)(e.lastPinnedMessage):null})))},n.prototype.serialize=function(){return(0,B.ai)(this)},n.prototype.isOperator=function(e){return e instanceof B.U?this.isOperator(e.userId):this.operators.some(function(n){return n.userId===e})},n.prototype._updateParticipantCount=function(e,n){return n>this._lastParticipantCountUpdated&&(this.participantCount=e,this._lastParticipantCountUpdated=n,
13!0)},n.prototype.createParticipantListQuery=function(e){return new ea(this._iid,this.url,e)},n.prototype.refresh=function(){return(0,B._)(this,void 0,void 0,function(){return(0,B.b)(this,function(e){switch(e.label){case 0:return[4,en.of(this._iid).getChannelWithoutCache(this.url)];case 1:return[2,e.sent()]}})})},n.prototype.enter=function(){return(0,B._)(this,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){switch(a.label){case 0:return e=B.V.of(this._iid).requestQueue,n=new q({channelUrl:this.url}),[4,e.send(n)];case 1:return r=(t=a.sent().as(X)).participantCount,i=t.ts,this._updateParticipantCount(r,i),en.of(this._iid).setEnteredToCache(this),[2]}})})},n.prototype.exit=function(){return(0,B._)(this,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){switch(a.label){case 0:return e=B.V.of(this._iid).requestQueue,n=new $({channelUrl:this.url}),[4,e.send(n)];case 1:return r=(t=a.sent().as(J)).participantCount,i=t.ts,this._updateParticipantCount(r,i),en.of(this._iid).setExitedToCache(this),V.ak.of(this._iid).fileMessageQueue.cancel(this),[2]}})})},n.prototype.updateChannel=function(e){return(0,B._)(this,void 0,void 0,function(){var n,t,r,i;return(0,B.b)(this,function(a){switch(a.label){case 0:return n=(0,B.g)((0,B.g)({},et),e),(0,B.w)((0,B.Q)("string",n.operatorUserIds,!0)&&((0,B.a)("string",n.coverUrlOrImage,!0)||(0,B.i)(n.coverUrlOrImage,!0))&&(0,B.a)("string",n.name,!0)&&(0,B.a)("string",n.data,!0)&&(0,B.a)("string",n.customType,!0)).throw(B.s.invalidParameters),t=B.V.of(this._iid).requestQueue,r=new eo((0,B.g)({channelUrl:this.url},n)),[4,t.send(r)];case 1:return i=a.sent().as(el).channel,this._update(i),[4,en.of(this._iid).upsertChannelsToCache([i])];case 2:return a.sent(),[2,this]}})})},n.prototype.updateChannelWithOperatorUserIds=function(e,n,t,r,i){return(0,B._)(this,void 0,void 0,function(){var a;return(0,B.b)(this,function(o){return a=(0,B.g)((0,B.g)({},et),{name:e,coverUrlOrImage:n,data:t,operatorUserIds:r,customType:i}),[2,this.updateChannel(a)]})})},n.prototype.delete=function(){return(0,B._)(this,void 0,void 0,function(){var e,n;return(0,B.b)(this,function(t){switch(t.label){case 0:return e=B.V.of(this._iid).requestQueue,n=new es({channelUrl:this.url}),[4,e.send(n)];case 1:return t.sent(),[4,en.of(this._iid).removeChannelsFromCache([this.url])];case 2:return t.sent(),[2]}})})},n.prototype.updateUserMessage=function(n,t){return(0,B._)(this,void 0,void 0,function(){var r,i,a,o=this;return(0,B.b)(this,function(l){switch(l.label){case 0:return[4,e.prototype.updateUserMessage.call(this,n,t)];case 1:return r=l.sent(),i=!1,a=!1,this.lastPinnedMessage&&this.lastPinnedMessage.messageId===r.messageId&&(this.lastPinnedMessage=r,i=!0,a=!0),i&&en.of(this._iid).handlers.map(function(e){e.onChannelChanged&&e.onChannelChanged(o)}),a&&en.of(this._iid).handlers.map(function(e){e.onPinnedMessageUpdated&&e.onPinnedMessageUpdated(o)}),[2,r]}})})},n.prototype.updateFileMessage=function(n,t){return(0,B._)(this,void 0,void 0,function(){var r,i,a,o=this;return(0,B.b)(this,function(l){switch(l.label){case 0:return[4,e.prototype.updateFileMessage.call(this,n,t)];case 1:return r=l.sent(),i=!1,a=!1,this.lastPinnedMessage&&this.lastPinnedMessage.messageId===r.messageId&&(this.lastPinnedMessage=r,i=!0,a=!0),i&&en.of(this._iid).handlers.map(function(e){e.onChannelChanged&&e.onChannelChanged(o)}),a&&en.of(this._iid).handlers.map(function(e){e.onPinnedMessageUpdated&&e.onPinnedMessageUpdated(o)}),[2,r]}})})},n}(V.z),ec=(r=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.onUserEntered=B.aA,n.onUserExited=B.aA,n.onChannelParticipantCountChanged=B.aA,n.onPollUpdated=B.aA,n.onPollVoted=B.aA,n.onPollDeleted=B.aA,n.onPinnedMessageUpdated=B.aA,n}return(0,B.c)(n,e),n}(z.B),(0,B.c)(function(e){void 0===e&&(e={});var n=r.call(this)||this;return Object.keys(e).forEach(function(t){n.hasOwnProperty(t)&&(n[t]=e[t])}),n},r),function(e){function n(n){var t=this,r=n.token,i=n.limit,a=n.nameKeyword,o=n.urlKeyword,l=n.customTypes,s=n.includeFrozen,u=n.includeMetaData;return(t=e.call(this)||this).method=B.A.GET,t.path=B.bo,t.params=(0,B.e)({token:r,limit:i,name_contains:a,url_contains:o,custom_types:l,show_frozen:s,show_metadata:u,show_pinned_messages:!0}),t}return(0,B.c)(n,e),n}(B.f)),ed=function(e){function n(n,t){var r=e.call(this,n,t)||this;r.channels=[];var i=t.next,a=t.channels,o=t.ts;return r.token=i,a&&a.length>0&&(r.channels=a.map(function(e){return new eu(n,e)})),r.ts="number"==typeof o?o:null,r}return(0,B.c)(n,e),n}(B.h),eh=function(e){function n(n,t){var r,i,a,o,l,s=this;return(s=e.call(this,n,t)||this).includeFrozen=!0,s.includeMetaData=!0,s.nameKeyword=null,s.urlKeyword=null,s.customTypes=null,
13s.includeFrozen=null===(r=t.includeFrozen)||void 0===r||r,s.includeMetaData=null===(i=t.includeMetaData)||void 0===i||i,s.nameKeyword=null!==(a=t.nameKeyword)&&void 0!==a?a:null,s.urlKeyword=null!==(o=t.urlKeyword)&&void 0!==o?o:null,s.customTypes=null!==(l=t.customTypes)&&void 0!==l?l:null,s}return(0,B.c)(n,e),n.prototype._validate=function(){return e.prototype._validate.call(this)&&(0,B.a)("boolean",this.includeFrozen)&&(0,B.a)("boolean",this.includeMetaData)&&(0,B.a)("string",this.nameKeyword,!0)&&(0,B.a)("string",this.urlKeyword,!0)&&(0,B.Q)("string",this.customTypes,!0)},n.prototype.next=function(){return(0,B._)(this,void 0,void 0,function(){var e,n,t,r,i;return(0,B.b)(this,function(a){switch(a.label){case 0:return this._validate()?this._isLoading?[3,4]:this._hasNext?(this._isLoading=!0,e=B.V.of(this._iid).requestQueue,n=new ec((0,B.u)((0,B.g)((0,B.g)({},this),{token:this._token}))),[4,e.send(n)]):[3,3]:[3,6];case 1:return r=(t=a.sent().as(ed)).channels,i=t.token,this._token=i,this._hasNext=!!i,[4,en.of(this._iid).upsertChannelsToCache(r)];case 2:return a.sent(),this._isLoading=!1,[2,r];case 3:return[2,[]];case 4:throw B.s.queryInProgress;case 5:return[3,7];case 6:throw B.s.invalidParameters;case 7:return[2]}})})},n}(B.aO),ef=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.name="openChannel",n}return(0,B.c)(n,e),n.prototype.init=function(n,t){var r=t.sdkState,i=t.dispatcher,a=t.sessionManager,o=t.requestQueue,l=t.logger,s=t.onlineDetector,u=t.cacheContext;e.prototype.init.call(this,n,{sdkState:r,dispatcher:i,sessionManager:a,requestQueue:o,logger:l,onlineDetector:s,cacheContext:u}),this._manager=new en(n,{sdkState:r,dispatcher:i,requestQueue:o,logger:l,cacheContext:u,sessionManager:a})},n.prototype.createOpenChannelListQuery=function(e){return void 0===e&&(e={}),new eh(this._iid,e)},n.prototype.addOpenChannelHandler=function(e,n){this._manager.addHandler(e,n)},n.prototype.removeOpenChannelHandler=function(e){this._manager.removeHandler(e)},n.prototype.removeAllOpenChannelHandlers=function(){this._manager.clearHandler()},n.prototype.buildOpenChannelFromSerializedData=function(e){return this._manager.buildOpenChannelFromSerializedData(e)},n.prototype.getChannel=function(e){return(0,B._)(this,void 0,void 0,function(){return(0,B.b)(this,function(n){return[2,this._manager.getChannel(e)]})})},n.prototype.getChannelWithoutCache=function(e){return(0,B._)(this,void 0,void 0,function(){return(0,B.b)(this,function(n){return[2,this._manager.getChannelWithoutCache(e)]})})},n.prototype.createChannel=function(e){return void 0===e&&(e={}),(0,B._)(this,void 0,void 0,function(){return(0,B.b)(this,function(n){return[2,this._manager.createChannel(e)]})})},n.prototype.createChannelWithOperatorUserIds=function(e,n,t,r,i){return(0,B._)(this,void 0,void 0,function(){var a;return(0,B.b)(this,function(o){return(a=(0,B.g)({},Y)).name=e,a.coverUrlOrImage=n,a.data=t,a.operatorUserIds=r,a.customType=i,[2,this._manager.createChannel(a)]})})},n}(B.a_),em=t(42391),ev=t(88006),ep=function(e){var n={};return{__getTopics:function(){return n},subscribe:function(e,t){var r;return null!==(r=n[e])&&void 0!==r||(n[e]=new Set),n[e].add(t),{remove:function(){n[e].delete(t)}}},publish:function(t,r){n[t]&&n[t].forEach(function(n){(null==e?void 0:e.publishSynchronous)?n(void 0!==r?r:{}):setTimeout(function(){return n(void 0!==r?r:{})},0)})}}},eg=t(93122),e_=t(7585),eE=t(43847),eb=t(64393),eC=t(58972),ey=t(15071),eN=t(69561),eT=t(80128),eS=t(41238);t(73935),t(29515),t(88569),t(1608),t(43822),t(8978),t(78614);var eA={"--sendbird-dark-primary-500":"#4d2aa6","--sendbird-dark-primary-400":"#6440C4","--sendbird-dark-primary-300":"#7B53EF","--sendbird-dark-primary-200":"#9E8CF5","--sendbird-dark-primary-100":"#E2DFFF","--sendbird-dark-secondary-500":"#007A7A","--sendbird-dark-secondary-400":"#189A8D","--sendbird-dark-secondary-300":"#2EBA9F","--sendbird-dark-secondary-200":"#6FD6BE","--sendbird-dark-secondary-100":"#AEF2DC","--sendbird-dark-information-100":"#b2d9ff","--sendbird-dark-error-500":"#A30E2D","--sendbird-dark-error-400":"#C11F41","--sendbird-dark-error-300":"#E53157","--sendbird-dark-error-200":"#FF6183","--sendbird-dark-error-100":"#FFABBD","--sendbird-dark-background-700":"#000000","--sendbird-dark-background-600":"#161616","--sendbird-dark-background-500":"#2C2C2C","--sendbird-dark-background-400":"#393939","--sendbird-dark-background-300":"#A8A8A8","--sendbird-dark-background-200":"#D9D9D9","--sendbird-dark-background-100":"#F0F0F0","--sendbird-dark-background-50":"#FFFFFF","--sendbird-dark-overlay":"rgba(0, 0, 0, 0.32)","--sendbird-dark-onlight-01":"rgba(0, 0, 0, 0.88)","--sendbird-dark-onlight-02":"rgba(0, 0, 0, 0.50)","--sendbird-dark-onlight-03":"rgba(0, 0, 0, 0.38)","--sendbird-dark-onlight-04":"rgba(0, 0, 0, 0.12)","--sendbird-dark-ondark-01":"rgba(255, 255, 255, 0.88)","--sendbird-dark-ondark-02":"rgba(255, 255, 255, 0.50)","--sendbird-dark-ondark-03":"rgba(255, 255, 255, 0.38)","--sendbird-dark-ondark-04":"rgba(255, 255, 255, 0.12)","--sendbird-dark-shadow-01":"0 1px 5px 0 rgba(33, 34, 66, 0.04), 0 0 3px 0 rgba(0, 0, 0, 0.08), 0 2px 1px 0 rgba(0, 0, 0, 0.12)","--sendbird-dark-shadow-02":"0 3px 5px -3px rgba(33, 34, 66, 0.04), 0 3px 14px 2px rgba(0, 0, 0, 0.08), 0 8px 10px 1px rgba(0, 0, 0, 0.12)","--sendbird-dark-shadow-03":"0 6px 10px -5px rgba(0, 0, 0, 0.04), 0 6px 30px 5px rgba(0, 0, 0, 0.08), 0 16px 24px 2px rgba(0, 0, 0, 0.12)","--sendbird-dark-shadow-04":"0 9px 15px -7px rgba(0, 0, 0, 0.04), 0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12)","--sendbird-dark-shadow-message-input"
13:"0 1px 5px 0 rgba(33, 34, 66, 0.12), 0 0 1px 0 rgba(33, 34, 66, 0.16), 0 2px 1px 0 rgba(33, 34, 66, 0.08), 0 1px 5px 0 rgba(0, 0, 0, 0.12)","--sendbird-light-primary-500":"#4d2aa6","--sendbird-light-primary-400":"#6440C4","--sendbird-light-primary-300":"#7B53EF","--sendbird-light-primary-200":"#9E8CF5","--sendbird-light-primary-100":"#E2DFFF","--sendbird-light-secondary-500":"#007A7A","--sendbird-light-secondary-400":"#189A8D","--sendbird-light-secondary-300":"#2EBA9F","--sendbird-light-secondary-200":"#6FD6BE","--sendbird-light-secondary-100":"#AEF2DC","--sendbird-light-information-100":"#b2d9ff","--sendbird-light-error-500":"#A30E2D","--sendbird-light-error-400":"#C11F41","--sendbird-light-error-300":"#E53157","--sendbird-light-error-200":"#FF6183","--sendbird-light-error-100":"#FFABBD","--sendbird-light-background-700":"#000000","--sendbird-light-background-600":"#161616","--sendbird-light-background-500":"#2C2C2C","--sendbird-light-background-400":"#393939","--sendbird-light-background-300":"#A8A8A8","--sendbird-light-background-200":"#D9D9D9","--sendbird-light-background-100":"#F0F0F0","--sendbird-light-background-50":" #FFFFFF","--sendbird-light-overlay":"rgba(0, 0, 0, 0.32)","--sendbird-light-onlight-01":"rgba(0, 0, 0, 0.88)","--sendbird-light-onlight-02":"rgba(0, 0, 0, 0.50)","--sendbird-light-onlight-03":"rgba(0, 0, 0, 0.38)","--sendbird-light-onlight-04":"rgba(0, 0, 0, 0.12)","--sendbird-light-ondark-01":"rgba(255, 255, 255, 0.88)","--sendbird-light-ondark-02":"rgba(255, 255, 255, 0.50)","--sendbird-light-ondark-03":"rgba(255, 255, 255, 0.38)","--sendbird-light-ondark-04":"rgba(255, 255, 255, 0.12)","--sendbird-light-shadow-01":"0 1px 5px 0 rgba(33, 34, 66, 0.04), 0 0 3px 0 rgba(0, 0, 0, 0.08), 0 2px 1px 0 rgba(0, 0, 0, 0.12)","--sendbird-light-shadow-02":"0 3px 5px -3px rgba(33, 34, 66, 0.04), 0 3px 14px 2px rgba(0, 0, 0, 0.08), 0 8px 10px 1px rgba(0, 0, 0, 0.12)","--sendbird-light-shadow-03":"0 6px 10px -5px rgba(0, 0, 0, 0.04), 0 6px 30px 5px rgba(0, 0, 0, 0.08), 0 16px 24px 2px rgba(0, 0, 0, 0.12)","--sendbird-light-shadow-04":"0 9px 15px -7px rgba(0, 0, 0, 0.04), 0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12)","--sendbird-light-shadow-message-input":"0 1px 5px 0 rgba(33, 34, 66, 0.12), 0 0 1px 0 rgba(33, 34, 66, 0.16), 0 2px 1px 0 rgba(33, 34, 66, 0.08), 0 1px 5px 0 rgba(0, 0, 0, 0.12)"},eI=function(e){if(null==e)return!0;for(var n in e)if(e.hasOwnProperty(n))return!1;return JSON.stringify(e)===JSON.stringify({})},eM=function(e){(0,l.useLayoutEffect)(function(){eI(e)||L({variables:(0,o._)((0,o._)({},eA),(0,c.m)(e))})},[e])},eO={INIT_SDK:"INIT_SDK",SET_SDK_LOADING:"SET_SDK_LOADING",RESET_SDK:"RESET_SDK",SDK_ERROR:"SDK_ERROR"},eR={initialized:!1,loading:!1,sdk:{},error:!1};function ew(e,n){return(0,k.K)(n).with({type:eO.SET_SDK_LOADING},function(n){var t=n.payload;return(0,o._)((0,o._)({},e),{initialized:!1,loading:t})}).with({type:eO.SDK_ERROR},function(){return(0,o._)((0,o._)({},e),{initialized:!1,loading:!1,error:!0})}).with({type:eO.INIT_SDK},function(e){return{sdk:e.payload,initialized:!0,loading:!1,error:!1}}).with({type:eO.RESET_SDK},function(){return eR}).otherwise(function(){return e})}var eD={initialized:!1,loading:!1,user:{}};function eL(e,n){return(0,k.K)(n).with({type:F.U.INIT_USER},function(e){return{initialized:!0,loading:!1,user:e.payload}}).with({type:F.U.RESET_USER},function(){return eD}).with({type:F.U.UPDATE_USER_INFO},function(n){var t=n.payload;return(0,o._)((0,o._)({},e),{user:t})}).otherwise(function(){return e})}var eP={INITIALIZE_MESSAGE_TEMPLATES_INFO:"INITIALIZE_MESSAGE_TEMPLATES_INFO",UPSERT_MESSAGE_TEMPLATES:"UPSERT_MESSAGE_TEMPLATES",UPSERT_WAITING_TEMPLATE_KEYS:"UPSERT_WAITING_TEMPLATE_KEYS",MARK_ERROR_WAITING_TEMPLATE_KEYS:"MARK_ERROR_WAITING_TEMPLATE_KEYS"};function eU(e,n){return(0,k.K)(n).with({type:eP.INITIALIZE_MESSAGE_TEMPLATES_INFO},function(e){return{messageTemplatesInfo:e.payload,waitingTemplateKeysMap:{}}}).with({type:eP.UPSERT_MESSAGE_TEMPLATES},function(n){var t=n.payload,r=e.messageTemplatesInfo;if(!r)return e;var i=(0,o._)({},e.waitingTemplateKeysMap);return t.forEach(function(e){var n=e.key,t=e.template;r.templatesMap[n]=t,delete i[n]}),(0,o._)((0,o._)({},e),{waitingTemplateKeysMap:i,messageTemplatesInfo:r})}).with({type:eP.UPSERT_WAITING_TEMPLATE_KEYS},function(n){var t=n.payload,r=t.keys,i=t.requestedAt,a=(0,o._)({},e.waitingTemplateKeysMap);return r.forEach(function(e){var n,t;a[e]={erroredMessageIds:null!==(t=null===(n=a[e])||void 0===n?void 0:n.erroredMessageIds)&&void 0!==t?t:[],requestedAt:i}}),(0,o._)((0,o._)({},e),{waitingTemplateKeysMap:a})}).with({type:eP.MARK_ERROR_WAITING_TEMPLATE_KEYS},function(n){var t=n.payload,r=t.keys,i=t.messageId,a=(0,o._)({},e.waitingTemplateKeysMap);return r.forEach(function(e){var n=a[e];n&&-1===n.erroredMessageIds.indexOf(i)&&n.erroredMessageIds.push(i)}),(0,o._)((0,o._)({},e),{waitingTemplateKeysMap:a})}).otherwise(function(){return e})}var ex={waitingTemplateKeysMap:{}};function ek(e){return(0,o.a)(this,arguments,void 0,function(e){var n=e.sdkDispatcher,t=e.userDispatcher,r=e.sdk;return(0,o.b)(this,function(e){return[2,new Promise(function(e){n({type:eO.SET_SDK_LOADING,payload:!0}),(null==r?void 0:r.disconnectWebSocket)?r.disconnectWebSocket().then(function(){n({type:eO.RESET_SDK}),t({type:F.U.RESET_USER})}).finally(function(){e(!0)}):e(!0)})]})})}var eF="3.15.6",eG=eO.INIT_SDK,eB=eO.SET_SDK_LOADING,eH=eO.RESET_SDK,eV=eO.SDK_ERROR,ej=F.U.INIT_USER,ez=F.U.UPDATE_USER_INFO,eK=F.U.RESET_USER;function eY(e){return(0,o.a)(this,arguments,void 0,function(e){var n=e.logger,t=e.sdkDispatcher,r=e.userDispatcher,i=e.appInfoDispatcher,a=e.initDashboardConfigs,l=e.userId,s=e.appId,u=e.isNewApp,c=void 0!==u&&u,d=e.customApiHost,h=e.customWebSocketHost,f=e.configureSession,m=e.nickname,v=e.profileUrl,p=e.accessToken,g=e.sdk,_=e.sdkInitParams,E=e.customExtensionParams,b=e.isMobile,C=e.eventHandlers,y=e.isUserIdUsedForNickname,N=e.initializeMessageTemplatesInfo;return(0,o.b)(this,function(e){switch(e.label){case 0:return[4,ek({logger:n,sdkDispatcher:t,userDispatcher:r,sdk:g})];case 1:return e.sent(),[4,function(e){return(0,o.a)(this,arguments,void 0,function(e){var n,t,r,i=this,a=e.logger,l=e.sdkDispatcher,s=e.userDispatcher,u=e.initDashboardConfigs,c=e.userId,d=e.appId,h=e.isNewApp,f=e.customApiHost,m=e.customWebSocketHost,v=e.configureSession,p=e.nickname,g=e.profileUrl,_=e.accessToken,E=e.isUserIdUsedForNickname,b=e.sdkInitParams,C=e.customExtensionParams,y=e.isMobile,N=void 0!==y&&y,T=e.eventHandlers,S=e.initializeMessageTemplatesInfo;return(0,o.b)(this,function(e){if(null===(t=a.info)||void 0===t||t.call(a,"SendbirdProvider | useConnect/setupConnection/init",{userId:c,appId:d}),l({type:eB,payload:!0}),!c||!d){var y,A,I;return A=(y={userId:c,appId:d}).userId,I=y.appId,n="SendbirdProvider | useConnect/setupConnection/Connection failed UserId: ".concat(A," or appId: ").concat(I," missing"),null===(r=a.error)||void 0===r||r.call(a,n),l({type:eV}),[2,Promise.reject(n)]}
13return[2,new Promise(function(e,n){null===(F=a.info)||void 0===F||F.call(a,"SendbirdProvider | useConnect/setupConnection/connect connecting using ".concat(null!=_?_:c));var t,r,y,A,I,M,O,R,w,D,L,P,U,x,F,G=(w=(R={appId:d,customApiHost:f,customWebSocketHost:m,isNewApp:h,sdkInitParams:b}).appId,D=R.isNewApp,L=R.customApiHost,P=R.customWebSocketHost,x=Object.assign(void 0===(U=R.sdkInitParams)?{}:U,{appId:w,modules:[new em.rY,new ef],newInstance:void 0!==D&&D,localCacheEnabled:!0}),L&&(x.customApiHost=L),P&&(x.customWebSocketHost=P),H.ZP.init(x)),V="function"==typeof v?v(G):void 0;A=(t={logger:a,sessionHandler:V,customExtensionParams:C,isMobile:N}).logger,I=t.sessionHandler,M=t.isMobile,O=t.customExtensionParams,null===(r=A.info)||void 0===r||r.call(A,"SendbirdProvider | useConnect/setupConnection/setVersion",{version:eF}),G.addExtension("sb_uikit",eF),G.addSendbirdExtensions([{product:B.ac.UIKIT_CHAT,version:eF,platform:null===B.ad||void 0===B.ad?void 0:B.ad.JS}],{platform:M?B.Y.MOBILE_WEB:B.Y.WEB},O),I&&(null===(y=A.info)||void 0===y||y.call(A,"SendbirdProvider | useConnect/setupConnection/configureSession",I),G.setSessionHandler(I)),G.connect(c,_).then(function(e){return j(e)}).catch(function(e){return(0,o.a)(i,void 0,void 0,function(){var n,t,r;return(0,o.b)(this,function(i){switch(i.label){case 0:if(!(e instanceof B.s&&[B.a8.SESSION_TOKEN_EXPIRED,B.a8.INVA
13LID_TOKEN].includes(e.code)&&V))return[3,6];i.label=1;case 1:return i.trys.push([1,5,,6]),[4,new Promise(V.onSessionTokenRequired)];case 2:if(!(n=i.sent()))return[3,4];return null===(r=a.info)||void 0===r||r.call(a,"SendbirdProvider | useConnect/setupConnection/connect retry connect with valid session token: ".concat(n.slice(0,10)+"...")),[4,G.connect(c,n)];case 3:return[2,j(i.sent())];case 4:return[3,6];case 5:if((t=i.sent())instanceof B.s)return[2,z(t)];return[3,6];case 6:return[2,z(e)]}})})});var j=function(n){return(0,o.a)(i,void 0,void 0,function(){var t,r,i,c,d,h,f,m,v,_,b,C;return(0,o.b)(this,function(o){switch(o.label){case 0:null===(d=a.info)||void 0===d||d.call(a,"SendbirdProvider | useConnect/setupConnection/onConnected",n),l({type:eG,payload:G}),s({type:ej,payload:n}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,S(G)];case 2:return o.sent(),[3,4];case 3:return t=o.sent(),null===(h=a.error)||void 0===h||h.call(a,"SendbirdProvider | useConnect/setupConnection/upsertMessageTemplateListInLocalStorage failed",{error:t}),[3,4];case 4:return o.trys.push([4,6,,7]),[4,u(G)];case 5:return o.sent(),null===(f=a.info)||void 0===f||f.call(a,"SendbirdProvider | useConnect/setupConnection/getUIKitConfiguration success"),[3,7];case 6:return r=o.sent(),null===(m=a.error)||void 0===m||m.call(a,"SendbirdProvider | useConnect/setupConnection/getUIKitConfiguration failed",{error:r}),[3,7];case 7:if(o.trys.push([7,10,,11]),!((p!==n.nickname||g!==n.profileUrl)&&!((0,k.a3)(p)&&(0,k.a3)(g))))return[3,9];return null===(v=a.info)||void 0===v||v.call(a,"SendbirdProvider | useConnect/setupConnection/updateCurrentUserInfo",{nickname:p,profileUrl:g}),i={nickname:p||n.nickname||(E?n.userId:""),profileUrl:g||n.profileUrl},[4,G.updateCurrentUserInfo(i)];case 8:c=o.sent(),null===(_=a.info)||void 0===_||_.call(a,"SendbirdProvider | useConnect/setupConnection/updateCurrentUserInfo success",i),s({type:ez,payload:c}),o.label=9;case 9:return[3,11];case 10:return o.sent(),[3,11];case 11:return e(),null===(C=null===(b=null==T?void 0:T.connection)||void 0===b?void 0:b.onConnected)||void 0===C||C.call(b,n),[2]}})})},z=function(e){return(0,o.a)(i,void 0,void 0,function(){var t,r,i,u,h;return(0,o.b)(this,function(o){switch(o.label){case 0:var f;if(!(G.isCacheEnabled&&(f=e)instanceof B.s&&[B.a8.USER_AUTH_DEACTIVATED,B.a8.USER_AUTH_DELETED_OR_NOT_FOUND,B.a8.SESSION_TOKEN_EXPIRED,B.a8.SESSION_REVOKED].includes(f.code)))return[3,2];return null===(r=a.error)||void 0===r||r.call(a,"SendbirdProvider | useConnect/setupConnection/connect clear cache [".concat(e.code,"/").concat(e.message,"]")),[4,G.clearCachedData()];case 1:o.sent(),o.label=2;case 2:return t="SendbirdProvider | useConnect/setupConnection/Connection failed. ".concat((null==e?void 0:e.code)||""," ").concat((null==e?void 0:e.message)||""),null===(i=a.error)||void 0===i||i.call(a,t,{e:e,appId:d,userId:c}),s({type:eK}),l({type:eH}),l({type:eV}),n(t),null===(h=null===(u=null==T?void 0:T.connection)||void 0===u?void 0:u.onFailed)||void 0===h||h.call(u,e),[2]}})})}})]})})}({logger:n,sdkDispatcher:t,userDispatcher:r,appInfoDispatcher:i,initDashboardConfigs:a,userId:l,appId:s,isNewApp:c,customApiHost:d,customWebSocketHost:h,configureSession:f,nickname:m,profileUrl:v,accessToken:p,sdkInitParams:_,customExtensionParams:E,isMobile:b,eventHandlers:C,isUserIdUsedForNickname:y,initializeMessageTemplatesInfo:N})];case 2:return e.sent(),[2]}})})}var eZ={DEBUG:"debug",WARNING:"warning",ERROR:"error",INFO:"info",ALL:"all"},eQ=function(e){switch(e){case eZ.WARNING:return"color: Orange";case eZ.ERROR:return"color: Red";default:return"color: Gray"}},eW=function(e){var n=e.level,t=e.title,r=e.description,i=void 0===r?"":r,a=e.payload;console.log.apply(console,(0,o.c)(["%c SendbirdUIKit | ".concat(n," | ").concat(new Date().toISOString()," | ").concat(t," ").concat(i&&"|"),eQ(n),i],void 0===a?[]:a,!1))},eq=function(e,n){var t=Array.isArray(e)?e:[e],r=function(e){return function(n,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return eW({level:e,title:n,description:t,payload:r})}};return t.reduce(function(e,n){return n===eZ.DEBUG||n===eZ.ALL?(0,o._)((0,o._)({},e),{info:r(eZ.INFO),error:r(eZ.ERROR),warning:r(eZ.WARNING)}):n===eZ.INFO?(0,o._)((0,o._)({},e),{info:r(eZ.INFO)}):n===eZ.ERROR?(0,o._)((0,o._)({},e),{error:r(eZ.ERROR)}):n===eZ.WARNING?(0,o._)((0,o._)({},e),{warning:r(eZ.WARNING)}):(0,o._)({},e)},{info:ev.n,error:ev.n,warning:ev.n})},eX=function(e){var n=e.children;return l.createElement(eg.b,null,l.createElement(c.V,null,n))},e$={getItem:function(e){return(0,o.a)(this,void 0,void 0,function(){var n;return(0,o.b)(this,function(t){return[2,null!==(n=localStorage.getItem(e))&&void 0!==n?n:null]})})},setItem:function(e,n){return(0,o.a)(this,void 0,void 0,function(){return(0,o.b)(this,function(t){return[2,localStorage.setItem(e,n)]})})}},eJ=function(e){return{version:Number(e.ui_template.version),uiTemplate:JSON.stringify(e.ui_template.body.items),colorVariables:e.color_variables}},e0=function(e){var n={};return e.forEach(function(e){n[e.key]=eJ(e)}),n},e1=eP.INITIALIZE_MESSAGE_TEMPLATES_INFO,e2=eP.UPSERT_MESSAGE_TEMPLATES,e3=eP.UPSERT_WAITING_TEMPLATE_KEYS,e6=eP.MARK_ERROR_WAITING_TEMPLATE_KEYS;function e4(e){var n,t,r,i,a,u,c,d,h,f,m,v,p,g,_,E,b,C,y,N,T,S,A,I,M,O,R,w,D,L,P,U,x,k,F,G,B,H,V,j,z,K,Y,Z,Q=(k=(n={legacyConfig:{replyType:e.replyType,isMentionEnabled:e.isMentionEnabled,isReactionEnabled:e.isReactionEnabled,disableUserProfile:e.disableUserProfile,isVoiceMessageEnabled:e.isVoiceMessageEnabled,isTypingIndicatorEnabledOnChannelList:e.isTypingIndicatorEnabledOnChannelList,isMessageReceiptStatusEnabledOnChannelList:e.isMessageReceiptStatusEnabledOnChannelList,showSearchIcon:e.showSearchIcon},uikitOptions:e.uikitOptions}).legacyConfig,G=void 0===(F=n.uikitOptions)?{}:F,B=k.replyType,H=k.isMentionEnabled,V=k.isReactionEnabled,j=k.disableUserProfile,z=k.isVoiceMessageEnabled,K=k.isTypingIndicatorEnabledOnChannelList,Y=k.isMessageReceiptStatusEnabledOnChannelList,Z=k.showSearchIcon,{common:{enableUsingDefaultUserProfile:null!==(r=null===(t=G.common)||void 0===t?void 0:t.enableUsingDefaultUserProfile)&&void 0!==r?r:"boolean"==typeof j?!j:void 0},groupChannel:{enableOgtag:null===(i=G.groupChannel)||void 0===i?void 0:i.enableOgtag,enableMention:null!==(u=null===(a=G.groupChannel)||void 0===a?void 0:a.enableMention)&&void 0!==u?u:H,enableReactions:null!==(d=null===(c=G.groupChannel)||void 0===c?void 0:c.enableReactions)&&void 0!==d?d:V,enableReactionsSupergroup:null===(h=G.groupChannel)||void 0===h?void 0:h.enableReactionsSupergroup,enableTypingIndicator:null===(f=G.groupChannel)||void 0===f?void 0:f.enableTypingIndicator,enableVoiceMessage:null!==(v=null===(m=G.groupChannel)||void 0===m?void 0:m.enableVoiceMessage)&&void 0!==v?v:z,replyType:null!==(g=null===(p=G.groupChannel)||void 0===p?void 0:p.replyType)&&void 0!==g?g:null!=B?(0,ey.g)(B).lowerCase:void 0,threadReplySelectType:null===(_=G.groupChannel)||void 0===_?void 0:_.threadReplySelectType,input:{enableDocument:null===(b=null===(E=G.groupChannel)||void 0===E?void 0:E.input)||void 0===b?void 0:b.enableDocument},typingIndicatorTypes:null===(C=G.groupChannel)||void 0===C?void 0:C.typingIndicatorTypes,enableFeedback:null===(y=G.groupChannel)||void 0===y?void 0:y.enableFeedback,enableSuggestedReplies:null===(N=G.groupChannel)||void 0===N?void 0:N.enableSuggestedReplies,showSuggestedRepliesFor:null===(T=G.groupChannel)||void 0===T?void 0:T.showSuggestedRepliesFor,suggestedRepliesDirection:null===(S=G.groupChannel)||void 0===S?void 0:S.suggestedRepliesDirection,enableMarkdownForUserMessage:null===(A=G.groupChannel)||void 0===A?void 0:A.enableMarkdownForUserMessage,enableFormTypeMessage:null===(I=G.groupChannel)||void 0===I?void 0:I.enableFormTypeMessage},groupChannelList:{enableTypingIndicator:null!==(O=null===(M=G.groupChannelList)||void 0===M?void 0:M.enableTypingIndicator)&&void 0!==O?O:K,enableMessageReceiptStatus:null!==(w=null===(R=G.groupChannelList)||void 0===R?void 0:R.enableMessageReceiptStatus)&&void 0!==w?w:Y},groupChannelSettings:{enableMessageSearch:null!==(L=null===(D=G.groupChannelSettings)||void 0===D?void 0:D.enableMessageSearch)&&void 0!==L?L:Z},openChannel:{enableOgtag:null===(P=G.openChannel)||void 0===P?void 0:P.enableOgtag,input:{enableDocument:null===(x=null===(U=G.openChannel)||void 0===U?void 0:U.input)||void 0===x?void 0:x.enableDocument}}});return l.createElement(s.wD,{storage:e$,localConfigs:{common:null==Q?void 0:Q.common,groupChannel:{channel:null==Q?void 0:Q.groupChannel,channelList:null==Q?void 0:Q.groupChannelList,setting:null==Q?void 0:Q.groupChannelSettings},openChannel:{channel:null==Q?void 0:Q.openChannel}}},l.createElement(e7,(0,o._)({},e)))}var e7=function(e){var n,t,r,i,a=e.appId,d=e.userId,h=e.children,f=e.accessToken,m=e.customApiHost,v=e.customWebSocketHost,p=e.configureSession,g=e.theme,_=void 0===g?"light":g,E=e.config,b=void 0===E?{}:E,C=e.nickname,y=e.colorSet,N=e.stringSet,T=e.dateLocale,S=e.profileUrl,A=e.voiceRecord,I=e.userListQuery,M=e.imageCompression,O=e.allowProfileEdit,R=e.disableMarkAsDelivered,w=e.renderUserProfile,D=e.onUserProfileMessage,L=e.onStartDirectMessage,P=e.breakpoint,U=e.isUserIdUsedForNickname,x=e.sdkInitParams,k=e.customExtensionParams,F=e.isMultipleFilesMessageEnabled,B=e.eventHandlers,H=e.htmlTextDirection,V=void 0===H?"ltr":H,j=e.forceLeftToRightMessageLayout,z=null!=L?L:D,K=b.logLevel,Y=void 0===K?"":K,Z=b.userMention,Q=void 0===Z?{}:Z,W=b.isREMUnitEnabled,q=void 0!==W&&W,X=b.pubSub,$=(0,eE.u)().isMobile,J=(0,l.useState)(eq(Y)),ee=J[0],en=J[1],et=(0,l.useState)(function(){return null!=X?X:ep()})[0],er=(0,l.useReducer)(ew,eR),ei=er[0],ea=er[1],eo=(0,l.useReducer)(eL,eD),el=eo[0],es=eo[1],eu=(0,l.useReducer)(eU,ex),ec=eu[0],ed=eu[1],eh=(0,s.Jf)(),ef=eh.configs,em=eh.configsWithAppAttr,ev=eh.initDashboardConfigs,eg=ei.initialized,eS=null==ei?void 0:ei.sdk,eA=null!==(t=null==eS?void 0:eS.appInfo)&&void 0!==t?t:{},eI=eA.uploadSizeLimit,eO=eA.multipleFilesMessageFileCountLimit;eM(y);var eP=function(e){var n=this,t=e.sdk,r=e.logger,i=e.appInfoStore,a=e.appInfoDispatcher,l=null==i?void 0:i.messageTemplatesInfo;return{getCachedTemplate:function(e){if(!l)return null;var n,t,r=null,i=null!==(n=null==l?void 0:l.templatesMap)&&void 0!==n?n:null;return i&&(r=null!==(t=i[e])&&void 0!==t?t:null),r},updateMessageTemplatesInfo:function(e,i,l){return(0,o.a)(n,void 0,void 0,function(){var n,s,u,c,d,h,f,m,v;return(0,o.b)(this,function(o){switch(o.label){case 0:if(!a)return[3,7];a({type:e3,payload:{keys:e,requestedAt:l}}),n=[],o.label=1;case 1:o.trys.push([1,5,,6]),s=!0,u=null,o.label=2;case 2:if(!s)return[3,4];
13return[4,t.message.getMessageTemplatesByToken(u,{keys:e})];case 3:return(c=o.sent()).templates.forEach(function(e){n.push(JSON.parse(e.template))}),s=c.hasMore,u=c.token,[3,2];case 4:return[3,6];case 5:return d=o.sent(),null===(v=null==r?void 0:r.error)||void 0===v||v.call(r,"Sendbird | fetchProcessedMessageTemplates failed",d,e),[3,6];case 6:n.length>0?((h=localStorage.getItem(eC.p))?(m=(f=JSON.parse(h)).map(function(e){return e.key}),n.forEach(function(e){m.includes(e.key)||f.push(e)}),localStorage.setItem(eC.p,JSON.stringify(f))):localStorage.setItem(eC.p,JSON.stringify([n])),a({type:e2,payload:n.map(function(e){return{key:e.key,template:eJ(e)}})})):a({type:e6,payload:{keys:e,messageId:i}}),o.label=7;case 7:return[2]}})})},initializeMessageTemplatesInfo:function(e){return(0,o.a)(n,void 0,void 0,function(){var t,r,i,l,s;return(0,o.b)(this,function(u){switch(u.label){case 0:if(!(t=null===(s=e.appInfo)||void 0===s?void 0:s.messageTemplateInfo.token))return localStorage.removeItem(eC.C),localStorage.removeItem(eC.p),[2];if(r=localStorage.getItem(eC.C),i=localStorage.getItem(eC.p),!(!r||r!==t))return[3,2];return[4,(0,o.a)(n,void 0,void 0,function(){var n,t,r,i;return(0,o.b)(this,function(a){switch(a.label){case 0:n=!0,t=null,r=[],a.label=1;case 1:if(!n)return[3,3];return[4,e.message.getMessageTemplatesByToken(t,{limit:20})];case 2:return n=(i=a.sent()).hasMore,t=i.token,i.templates.forEac
13h(function(e){r.push(JSON.parse(e.template))}),[3,1];case 3:return[2,r]}})})];case 1:return a({type:e1,payload:{token:t,templatesMap:e0(l=u.sent())}}),localStorage.setItem(eC.C,t),localStorage.setItem(eC.p,JSON.stringify(l)),[3,3];case 2:r&&r===t&&i&&a({type:e1,payload:{token:t,templatesMap:e0(l=JSON.parse(i))}}),u.label=3;case 3:return[2]}})})}}}({sdk:eS,logger:ee,appInfoStore:ec,appInfoDispatcher:ed}),eF=eP.getCachedTemplate,eG=eP.updateMessageTemplatesInfo,eB=eP.initializeMessageTemplatesInfo,eH=function(e,n){var t=this,r=e.userId,i=e.appId,a=e.accessToken,s=e.isMobile,u=e.isUserIdUsedForNickname,c=n.logger,d=n.nickname,h=n.profileUrl,f=n.configureSession,m=n.customApiHost,v=n.customWebSocketHost,p=n.sdk,g=n.sdkDispatcher,_=n.userDispatcher,E=n.appInfoDispatcher,b=n.initDashboardConfigs,C=n.sdkInitParams,y=n.customExtensionParams,N=n.eventHandlers,T=n.initializeMessageTemplatesInfo,S=(0,l.useRef)({appId:"",userId:""});return(0,l.useEffect)(function(){null===(e=null==c?void 0:c.info)||void 0===e||e.call(c,"SendbirdProvider | useConnect/useEffect",{userId:r,appId:i,accessToken:a});var e,n=S.current.appId!==i;(S.current.appId!==i||S.current.userId!==r)&&(S.current={appId:i,userId:r},eY({userId:r,appId:i,isNewApp:n,accessToken:a,logger:c,nickname:d,profileUrl:h,configureSession:f,customApiHost:m,customWebSocketHost:v,sdk:p,sdkDispatcher:g,userDispatcher:_,appInfoDispatcher:E,initDashboardConfigs:b,isUserIdUsedForNickname:u,sdkInitParams:C,customExtensionParams:y,isMobile:s,eventHandlers:N,initializeMessageTemplatesInfo:T}).catch(function(e){var n;null===(n=null==c?void 0:c.error)||void 0===n||n.call(c,"SendbirdProvider | useConnect/useEffect",e)}))},[r,i]),(0,l.useCallback)(function(){return(0,o.a)(t,void 0,void 0,function(){var e,n,t;return(0,o.b)(this,function(o){switch(o.label){case 0:null===(n=null==c?void 0:c.info)||void 0===n||n.call(c,"SendbirdProvider | useConnect/reconnect/useCallback",{sdk:p}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,eY({userId:r,appId:i,accessToken:a,logger:c,nickname:d,profileUrl:h,configureSession:f,customApiHost:m,customWebSocketHost:v,sdk:p,sdkDispatcher:g,userDispatcher:_,appInfoDispatcher:E,initDashboardConfigs:b,isUserIdUsedForNickname:u,sdkInitParams:C,customExtensionParams:y,isMobile:s,eventHandlers:N,initializeMessageTemplatesInfo:T})];case 2:return o.sent(),[3,4];case 3:return e=o.sent(),null===(t=null==c?void 0:c.error)||void 0===t||t.call(c,"SendbirdProvider | useConnect/reconnect/useCallback",e),[3,4];case 4:return[2]}})})},[p])}({appId:a,userId:d,accessToken:f,isUserIdUsedForNickname:void 0===U||U,isMobile:$},{logger:ee,nickname:void 0===C?"":C,profileUrl:void 0===S?"":S,configureSession:p,customApiHost:m,customWebSocketHost:v,sdkInitParams:x,customExtensionParams:k,sdk:eS,sdkDispatcher:ea,userDispatcher:es,appInfoDispatcher:ed,initDashboardConfigs:ev,eventHandlers:B,initializeMessageTemplatesInfo:eB});(0,G.b)(function(){"function"==typeof eS.disconnect&&ek({logger:ee,sdkDispatcher:ea,userDispatcher:es,sdk:eS})},[eS.disconnectWebSocket]),(0,l.useEffect)(function(){en(eq(Y))},[Y]);var eV=(0,l.useState)(_),ej=eV[0],ez=eV[1];(0,l.useEffect)(function(){ez(_)},[_]),(0,l.useEffect)(function(){var e=document.querySelector("body");null==e||e.classList.remove("sendbird-experimental__rem__units"),q&&(null==e||e.classList.add("sendbird-experimental__rem__units"))},[q]),(0,l.useEffect)(function(){ee.info("Setup theme","Theme: ".concat(ej));try{var e=document.querySelector("body");null==e||e.classList.remove("sendbird-theme--light"),null==e||e.classList.remove("sendbird-theme--dark"),null==e||e.classList.add("sendbird-theme--".concat(ej||"light")),ee.info("Finish setup theme")}catch(e){ee.warning("Setup theme failed","".concat(e))}return function(){try{var e=document.querySelector("body");null==e||e.classList.remove("sendbird-theme--light"),null==e||e.classList.remove("sendbird-theme--dark")}catch(e){}}},[ej]),(0,eT.a)(V);var eK=(0,G.u)(ei.sdk,ee),eZ=(n=(0,l.useMemo)(function(){return(0,G.s)({logger:ee,cb:function(e){try{e.markAsRead()}catch(n){ee.warning("Channel: Mark as delivered failed",{channel:e,error:n})}}})},[]),(0,l.useEffect)(function(){eK||n.clear()},[eK]),(0,G.b)(function(){n.clear()}),n),eQ=(0,G.a)({isConnected:eK},{logger:ee}),eW=l.useMemo(function(){return(0,o._)((0,o._)({},(0,eb.g)("en")),N)},[N]),e$=(0,l.useMemo)(function(){return Math.min(eC.q,null!=eO?eO:Number.MAX_SAFE_INTEGER)},[eO]),e4=(0,l.useMemo)(function(){return new c.E({sdk:eS,logger:ee})}
13,[ei.initialized]);return l.createElement(u.N.Provider,{value:{stores:{sdkStore:ei,userStore:el,appInfoStore:ec},dispatchers:{sdkDispatcher:ea,userDispatcher:es,appInfoDispatcher:ed,reconnect:eH},config:{disableMarkAsDelivered:void 0!==R&&R,renderUserProfile:w,onStartDirectMessage:z,onUserProfileMessage:z,allowProfileEdit:void 0!==O&&O,isOnline:eK,userId:d,appId:a,accessToken:f,theme:ej,setCurrentTheme:ez,setCurrenttheme:ez,isMultipleFilesMessageEnabled:void 0!==F&&F,uikitUploadSizeLimit:null!=eI?eI:eC.r,uikitMultipleFilesMessageLimit:e$,userListQuery:I,logger:ee,pubSub:et,imageCompression:(0,o._)({compressionRate:.7,outputFormat:"preserve"},void 0===M?{}:M),voiceRecord:{maxRecordingTime:null!==(r=null==A?void 0:A.maxRecordingTime)&&void 0!==r?r:eC.s,minRecordingTime:null!==(i=null==A?void 0:A.minRecordingTime)&&void 0!==i?i:eC.k},userMention:{maxMentionCount:(null==Q?void 0:Q.maxMentionCount)||10,maxSuggestionCount:(null==Q?void 0:Q.maxSuggestionCount)||15},markAsReadScheduler:eZ,markAsDeliveredScheduler:eQ,common:ef.common,groupChannel:{enableOgtag:eg&&em(eS).groupChannel.channel.enableOgtag,enableTypingIndicator:ef.groupChannel.channel.enableTypingIndicator,enableReactions:eg&&em(eS).groupChannel.channel.enableReactions,enableMention:ef.groupChannel.channel.enableMention,replyType:ef.groupChannel.channel.replyType,threadReplySelectType:ef.groupChannel.channel.threadReplySelectType,enableVoiceMessage:ef.groupChannel.channel.enableVoiceMessage,enableDocument:ef.groupChannel.channel.input.enableDocument,typingIndicatorTypes:ef.groupChannel.channel.typingIndicatorTypes,enableFeedback:ef.groupChannel.channel.enableFeedback,enableSuggestedReplies:ef.groupChannel.channel.enableSuggestedReplies,showSuggestedRepliesFor:ef.groupChannel.channel.showSuggestedRepliesFor,suggestedRepliesDirection:ef.groupChannel.channel.suggestedRepliesDirection,enableMarkdownForUserMessage:ef.groupChannel.channel.enableMarkdownForUserMessage,enableFormTypeMessage:ef.groupChannel.channel.enableFormTypeMessage,enableReactionsSupergroup:eg&&em(eS).groupChannel.channel.enableReactionsSupergroup},groupChannelList:{enableTypingIndicator:ef.groupChannel.channelList.enableTypingIndicator,enableMessageReceiptStatus:ef.groupChannel.channelList.enableMessageReceiptStatus},groupChannelSettings:{enableMessageSearch:eg&&em(eS).groupChannel.setting.enableMessageSearch},openChannel:{enableOgtag:eg&&em(eS).openChannel.channel.enableOgtag,enableDocument:ef.openChannel.channel.input.enableDocument},disableUserProfile:!ef.common.enableUsingDefaultUserProfile,isReactionEnabled:eg&&em(eS).groupChannel.channel.enableReactions,isMentionEnabled:ef.groupChannel.channel.enableMention,isVoiceMessageEnabled:ef.groupChannel.channel.enableVoiceMessage,replyType:(0,ey.g)(ef.groupChannel.channel.replyType).upperCase,isTypingIndicatorEnabledOnChannelList:ef.groupChannel.channelList.enableTypingIndicator,isMessageReceiptStatusEnabledOnChannelList:ef.groupChannel.channelList.enableMessageReceiptStatus,showSearchIcon:eg&&em(eS).groupChannel.setting.enableMessageSearch,htmlTextDirection:V,forceLeftToRightMessageLayout:void 0!==j&&j},eventHandlers:B,emojiManager:e4,utils:{updateMessageTemplatesInfo:eG,getCachedTemplate:eF}}},l.createElement(eE.M,{logger:ee,breakpoint:void 0!==P&&P},l.createElement(e_.a,{stringSet:eW,dateLocale:T},l.createElement(eX,null,l.createElement(c.G,null,h)))),l.createElement(eN.i,null),l.createElement(c.d,null),l.createElement(eN.j,null))}},32177:function(e,n,t){"use strict";t.d(n,{O:function(){return l}});var r=t(67294),i=t(93122),a=t(58972),o=t(69392);t(12394),t(41238),t(71091),t(49805),t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(34420),t(69561),t(78614);var l=function(e){var n,t=e.key,l=e.channelUrl,s=e.audioFile,u=e.audioFileUrl,c=void 0===u?"":u,d=e.audioFileMimeType,h=void 0===d?a.b:d,f=(0,i.g)(void 0===l?"":l,void 0===t?"":t),m=(0,i.u)(),v=m.play,p=m.pause,g=m.stop,_=m.voicePlayerStore,E=(0,o.u)().isRecordable,b=(null===(n=null==_?void 0:_.audioStorage)||void 0===n?void 0:n[f])||(0,i.A)();return(0,r.useEffect)(function(){return function(){var e;if(s||c){var n=document.getElementById(a.a);null===(e=null==n?void 0:n.pause)||void 0===e||e.call(n)}}},[]),{play:function(){E||null==v||v({groupKey:f,audioFile:s,audioFileUrl:c,audioFileMimeType:h})},pause:function(){null==p||p(f)},stop:function(e){void 0===e&&(e=""),null==g||g(e)},playbackTime:1e3*((null==b?void 0:b.playbackTime)||0),duration:1e3*((null==b?void 0:b.duration)||0),playingStatus:b.playingStatus}}},19515:function(e,n,t){"use strict";t.d(n,{f:function(){return s},s:function(){return l}});var r=t(67294),i=t(69392),a=t(41238),o=t(88006);t(12394),t(49805),t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(34420),t(71091),t(93122),t(69561),t(78614);var l={PREPARING:"PREPARING",READY_TO_RECORD:"READY_TO_RECORD",RECORDING:"RECORDING",COMPLETED:"COMPLETED"},s=function(e){var n=e.onRecordingStarted,t=void 0===n?o.n:n,s=e.onRecordingEnded,u=void 0===s?o.n:s,c=(0,a.A)().c
13onfig.voiceRecord.maxRecordingTime,d=(0,i.u)(),h=d.isRecordable,f=(0,r.useState)(null),m=f[0],v=f[1],p=(0,r.useState)(l.PREPARING),g=p[0],_=p[1];(0,r.useEffect)(function(){h&&g===l.PREPARING&&_(l.READY_TO_RECORD)},[h]);var E=(0,r.useCallback)(function(){null==d||d.start({onRecordingStarted:function(){_(l.RECORDING),t(),A(),T(0),S.current=setInterval(function(){T(function(e){var n=e+100;return n>c&&A(),n})},100)},onRecordingEnded:function(e){_(l.COMPLETED),u(e),v(e),A()}})},[t,u]),b=(0,r.useCallback)(function(){null==d||d.stop(),A()},[d]),C=(0,r.useCallback)(function(){b(),v(null)},[d]),y=(0,r.useState)(0),N=y[0],T=y[1],S=(0,r.useRef)(null);function A(){S.current&&(clearInterval(S.current),S.current=null)}return(0,r.useEffect)(function(){N>c&&b()},[N,c,b]),{start:E,stop:b,cancel:C,recordingStatus:g,recordingTime:N,recordedFile:m,recordingLimit:c}}},27394:function(e,n,t){"use strict";t.d(n,{G:function(){return c}});var r=t(67294),i=t(41238),a=t(42443),o=t(21415),l=t(55922),s=t(10364),u=t(88006),c=function(e){var n,t,c,d,h=e.isLoading,f=e.isInvalid,m=e.channelUrl,v=(0,u.d)(e),p=v.renderChannelHeader,g=v.renderMessageList,_=v.renderMessageInput,E=v.renderTypingIndicator,b=v.renderPlaceholderLoader,C=v.renderPlaceholderInvalid,y=(0,i.A)(),N=y.stores,T=y.config,S=null===(n=null==N?void 0:N.sdkStore)||void 0===n?void 0:n.error,A=T.logger,I=T.isOnline;return h?r.createElement("div",{className:"sendbird-conversation"},(null==b?void 0:b())||r.createElement(s.Z,{type:s.v.LOADING})):m?f?r.createElement("div",{className:"sendbird-conversation"},(null==C?void 0:C())||r.createElement(s.Z,{type:s.v.WRONG})):S?r.createElement("div",{className:"sendbird-conversation"},(null==C?void 0:C())||r.createElement(s.Z,{type:s.v.WRONG,retryToConnect:function(){A.info("Channel: reconnecting")}})):r.createElement("div",{className:"sendbird-conversation"},null==p?void 0:p({className:"sendbird-conversation__channel-header"}),null==g?void 0:g(e),r.createElement("div",{className:"sendbird-conversation__footer"},null==_?void 0:_(),r.createElement("div",{className:"sendbird-conversation__footer__typing-indicator"},(null==E?void 0:E())||(null===(t=null==T?void 0:T.groupChannel)||void 0===t?void 0:t.enableTypingIndicator)&&(null===(d=null===(c=null==T?void 0:T.groupChannel)||void 0===c?void 0:c.typingIndicatorTypes)||void 0===d?void 0:d.has(o.T.Text))&&r.createElement(a.c2,{channelUrl:m}),!I&&r.createElement(l.Z,null)))):r.createElement("div",{className:"sendbird-conversation"},(null==C?void 0:C())||r.createElement(s.Z,{type:s.v.NO_CHANNELS}))}},92593:function(e,n,t){"use strict";t.d(n,{a:function(){return m},b:function(){return l},c:function(){return s},d:function(){return a},e:function(){return c},g:function(){return u},m:function(){return h},p:function(){return f},s:function(){return o}});var r=t(12394),i=t(36614);t(7585);var a=function(e,n,t){var r;try{var i=e.current,a=null===(r=null==i?void 0:i.querySelectorAll('[data-sb-created-at="'.concat(n,'"]')))||void 0===r?void 0:r[0];i&&a instanceof HTMLElement&&(i.scrollTop=a.offsetTop)}catch(e){}finally{null==t||t(!0)}},o=function(e,n,t){void 0===e&&(e=0);var r=e;if(r>10){null==t||t(!0);return}try{var i=(null==n?void 0:n.current)||document.querySelector(".sendbird-conversation__messages-padding");i&&(i.scrollTop=i.scrollHeight),null==t||t(!0)}catch(e){setTimeout(function(){o(r+1,n,t)},500*r)}},l=function(e){return(null==e?void 0:e.isFrozen)&&"operator"!==(null==e?void 0:e.myRole)},s=function(e){return"muted"===(null==e?void 0:e.myMutedState)},u=function(e){for(var n=e.emojiCategories,t=void 0===n?[]:n,r=new Map,i=0;i<t.length;i+=1)for(var a=t[i].emojis,o=0;o<a.length;o+=1){var l=a[o],s=l.key,u=l.url;r.set(s,u)}return r},c=function(e){void 0===e&&(e=[]);for(var n=new Map,t=0;t<e.length;t+=1){var r=e[t],i=r.userId,a=r.nickname;n.set(i,a)}return n},d=function(e,n){var t=e.map(function(e){return[e[n],e]});return Array.from(new Map(t).values())},h=function(e,n){var t=e[e.length-1],i=n[0];return(null==t?void 0:t.createdAt)<(null==i?void 0:i.createdAt)?(0,r.c)((0,r.c)([],e,!0),n,!0):d((0,r.c)((0,r.c)([],e,!0),n,!0),"messageId").sort(function(e,n){return e.createdAt-n.createdAt})}
13,f=function(e,n){if("sendingStatus"in n&&(n.sendingStatus===i.ao.SUCCEEDED||n.sendingStatus===i.ao.PENDING)){var t=e.map(function(e){return"sendingStatus"in e&&e.sendingStatus?e.sendingStatus:e.isAdminMessage()?i.ao.SUCCEEDED:null}).lastIndexOf(i.ao.SUCCEEDED);if(t+1<e.length){var a=(0,r.c)([],e,!0);return a.splice(t+1,0,n),a}}return(0,r.c)((0,r.c)([],e,!0),[n],!1)},m=function(e,n,t){return Math.abs(e-n)<=t}},7593:function(e,n,t){"use strict";t.d(n,{T:function(){return c}});var r=t(67294),i=t(49805),a=t(2041),o=t(23012),l=t(81823),s=t(40286),u=t(1608);function c(e){var n=e.tokens,t=(0,o.f)(),d=null==t?void 0:t.message,h=null==t?void 0:t.isByMe,f=d.updatedAt,m=d.createdAt;return r.createElement(r.Fragment,null,null==n?void 0:n.map(function(e,n){var t="sb-msg_".concat(m,"_").concat(f,"_").concat(n);return(0,i.K)(e.type).with(a.T.markdown,function(){var n=e.groups;return r.createElement("span",{className:"sendbird-word",key:t,"data-testid":"sendbird-ui-word"},(0,i.K)(e.markdownType).with("bold",function(){return r.createElement("span",{style:{fontWeight:"bold"}},r.createElement(c,{tokens:(0,a.a)({messageText:n[1]})}))}).with("url",function(){return r.createElement("a",{className:h?"sendbird-label--color-oncontent-1":"sendbird-label--color-onbackground-1",href:function(e){var n=decodeURIComponent(e);try{var t=new URL(n).protocol;if(!["https:","http:"].some(function(e){return e===t.toLowerCase()}))return"#"}catch(e){n.startsWith("http://")||n.startsWith("https://")||(n="https://"+n)}return n}(n[2])},r.createElement(c,{tokens:(0,a.a)({messageText:n[1]})}))}).otherwise(function(){return r.createElement(r.Fragment,null)}))}).with(a.T.mention,function(){return r.createElement("span",{className:"sendbird-word",key:t,"data-testid":"sendbird-ui-word"},r.createElement(l.Z,{mentionTemplate:a.U,mentionedUserId:e.userId,mentionedUserNickname:e.value,isByMe:h}))}).with(a.T.url,function(){return r.createElement("span",{className:"sendbird-word",key:t,"data-testid":"sendbird-ui-word"},r.createElement(s.ZP,{src:e.value,type:u.a.BODY_1,color:h?u.b.ONCONTENT_1:u.b.ONBACKGROUND_1},e.value))}).otherwise(function(){return r.createElement(r.Fragment,{key:t},(0,a.b)(e.value))})}))}},2041:function(e,n,t){"use strict";t.d(n,{T:function(){return a},U:function(){return i},a:function(){return d},b:function(){return h},g:function(){return c},t:function(){return u}});var r=t(12394),i="@",a={string:"string",mention:"mention",url:"url",undetermined:"undetermined",markdown:"markdown"},o=/\[(.*?)\]\((.*?)\)|\*\*(.*?)\*\*/g;function l(e){var n=[];return e.forEach(function(e){if(e.type===a.mention||e.type===a.markdown){n.push(e);return}var t=e.value,r=Array.from(t.matchAll(o)).map(function(e){var n,t=e[0],r=null!==(n=e.index)&&void 0!==n?n:0,i=r+t.length;return{text:t,start:r,end:i,groups:e.filter(function(e){return"string"==typeof e})}}),i=t,l=0;if(r.forEach(function(e){var r,o=e.text,s=e.start,u=e.end,c=e.groups,d={type:a.undetermined,value:i.slice(0,s-l)};n.push(d),o.startsWith("[")?r="url":o.startsWith("**")&&(r="bold");var h={type:a.markdown,markdownType:r,value:o,groups:c};n.push(h),i=t.slice(u),l=u}),i){var s={type:a.undetermined,value:i};n.push(s)}}),n}function s(e){return e.reduce(function(e,n){var t=e[e.length-1];return(null==t?void 0:t.type)===a.string&&n.type===a.string?(t.value="".concat(t.value).concat(n.value),e):(0,r.c)((0,r.c)([],e,!0),[n],!1)},[])}function u(e){var n,t,r=e.messageText,o=e.mentionedUsers,u=e.templatePrefix,c=e.includeMarkdown,d=function(e){var n,t=e.tokens,r=e.mentionedUsers,o=void 0===r?[]:r,l=e.templatePrefix;if(!(null==o?void 0:o.length))return t;var s=(n=(void 0===l?i:l)||i,RegExp("(".concat(o.map(function(e){var t=e.userId.replace(/([.*+?^${}()|[\]\\])/g,"\\$1");return"".concat(n,"\\{").concat(t,"\\}")}).join("|"),")"),"g"));return t.map(function(e){return e.type!==a.undetermined?e:e.value.split(s).map(function(e){if(!e.match(s))return{value:e,type:a.undetermined};var n=o.find(function(n){return"@{".concat(null==n?void 0:n.userId,"}")===e});return{value:(null==n?void 0:n.nickname)||"(No name)",type:a.mention,userId:null==n?void 0:n.userId}})}).flat()}({tokens:[{type:a.undetermined,value:r}],mentionedUsers:void 0===o?[]:o,templatePrefix:void 0===u?i:u});
13return s((n=void 0!==c&&c?l(d):d,t=/(?:https?:\/\/|www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.(xn--)?[a-z]{2,20}\b([-a-zA-Z0-9@:%_+[\],.~#?&/=]*[-a-zA-Z0-9@:%_+~#?&/=])*/g,n.map(function(e){if(e.type!==a.undetermined)return e;var n=e.value,r=void 0===n?"":n,i=Array.from(r.matchAll(t)).map(function(e){var n,t=e[0],r=null!==(n=e.index)&&void 0!==n?n:0,i=r+t.length;return{text:t,start:r,end:i}}),o=[{value:r,type:a.string}],l=0;return i.forEach(function(e){var n=e.text,t=e.start,r=e.end,i=o.pop().value,s=i.slice(0,t-l),u=i.slice(r-l);s.length>0&&o.push({value:s,type:a.string}),o.push({value:n,type:a.url}),u.length>0&&o.push({value:u,type:a.string}),l=r}),o}).flat()))}function c(e){return function e(n){return n.map(function(n){return n.type===a.markdown?e(d({messageText:n.groups[1]})):n.value}).join("")}(l([{type:a.undetermined,value:e}]))}function d(e){var n=e.messageText;return s(l([{type:a.undetermined,value:n}]))}function h(e){return e.split("\n").map(function(e){var n,t,r=(null===(n=e.match(/^\s*/))||void 0===n?void 0:n[0])||"",i=(null===(t=e.match(/\s*$/))||void 0===t?void 0:t[0])||"",a=r.replace(/ /g,"\xa0"),o=i.replace(/ /g,"\xa0");return a+e.trim()+o}).join("\n")}},74865:function(e,n,t){"use strict";t.d(n,{C:function(){return i},c:function(){return a}}),(r=i||(i={})).ONBACKGROUND_1="ONBACKGROUND_1",r.ONBACKGROUND_2="ONBACKGROUND_2",r.ONBACKGROUND_3="ONBACKGROUND_3",r.ONBACKGROUND_4="ONBACKGROUND_4",r.ONCONTENT_1="ONCONTENT_1",r.ONCONTENT_2="ONCONTENT_2",r.PRIMARY="PRIMARY",r.ERROR="ERROR";var r,i,a=function(e){switch(e){case i.ONBACKGROUND_1:return"sendbird-color--onbackground-1";case i.ONBACKGROUND_2:return"sendbird-color--onbackground-2";case i.ONBACKGROUND_3:return"sendbird-color--onbackground-3";case i.ONBACKGROUND_4:return"sendbird-color--onbackground-4";case i.ONCONTENT_1:return"sendbird-color--oncontent-1";case i.PRIMARY:return"sendbird-color--primary";case i.ERROR:return"sendbird-color--error";default:return""}}},97047:function(e,n,t){"use strict";t.d(n,{c:function(){return o}});var r=t(12394),i=t(39894),a=function(e){var n=e.imageFile,t=e.compressionRate,r=e.resizingWidth,i=e.resizingHeight,a=e.outputFormat,o=document.createElement("img");return new Promise(function(e,l){o.src=URL.createObjectURL(n),o.onerror=l,o.onload=function(){URL.revokeObjectURL(o.src);var s=document.createElement("canvas"),u=o.width,c=o.height,d=!r||r>u?u:r,h=!i||i>c?c:i,f=u/d,m=c/h;f>m?h=c/(r?f:1):m>f&&(d=u/(i?m:1)),s.width=d,s.height=h;var v=s.getContext("2d");if(!v){l(Error("Failed to get canvas 2d context"));return}v.drawImage(o,0,0,d,h);var p="preserve"===a?n.type:"image/".concat(a),g=p.split("/").pop(),_=n.name.lastIndexOf("."),E="".concat(-1===_?n.name:n.name.substring(0,_),".").concat(g);v.canvas.toBlob(function(n){n?e(new File([n],E,{type:p})):l(Error("Failed to compress image"))},p,t)}})},o=function(e){return(0,r.a)(void 0,[e],void 0,function(e){var n,t,o,l,s,u,c=e.files,d=e.logger,h=e.imageCompression;return(0,r.b)(this,function(e){switch(e.label){case 0:if(n=h.compressionRate,o=void 0===(t=h.outputFormat)?"preserve":t,l=h.resizingWidth?(0,i.p)(h.resizingWidth):void 0,s=h.resizingHeight?(0,i.p)(h.resizingHeight):void 0,u={failedIndexes:[],compressedFiles:[]},!(Array.isArray(c)&&c.length>0))return null==d||d.warning("utils - compressImages: There are no files.",c),[2,u];if(!n||n<0||1<n)return null==d||d.warning("utils - compressImages: The compressionRate is not acceptable.",n),[2,u];return[4,Promise.all(c.map(function(e,t){return(0,r.a)(void 0,void 0,void 0,function(){var i,c;return(0,r.b)(this,function(r){switch(r.label){case 0:if(!("image/jpg"===e.type||"image/png"===e.type||"image/jpeg"===e.type))return null==d||d.warning("utils - compressImages: The fileType is not compressible.",{file:e,index:t}),u.failedIndexes.push(t),u.compressedFiles.push(e),[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,a({imageFile:e,compressionRate:n,resizingWidth:l,resizingHeight:s,outputFormat:o})];case 2:return i=r.sent(),u.compressedFiles.push(i),[3,4];case 3:return c=r.sent(),u.compressedFiles.push(e),u.failedIndexes.push(t),null==d||d.warning("utils - compressImages: Failed to compress image file",{file:e,err:c}),[3,4];case 4:return[2]}})})}))];case 1:return e.sent(),null==d||d.info("utils - compressImages: Finished compressing images",u),[2,u]}})})}},87607:function(e,n,t){"use strict";t.d(n,{M:function(){return r}});var r="sendbird-mention-user-label"},49805:function(e,n,t){"use strict";t.d(n,{$:function(){return eB},A:function(){return eO},C:function(){return eo},D:function(){return Y},E:function(){return e_},F:function(){return J},G:function(){return eH},H:function(){return F},I:function(){return ef},J:function(){return eg},K:function(){return P},L:function(){return ep},M:function(){return ec},N:function(){return eu},O:function(){return ea},P:function(){return ee},Q:function(){return el},R:function(){return ei},T:function(){return eR},U:function(){return G},V:function(){return eL},W:function(){return eS},X:function(){return eA},Y:function(){return ew},Z:function(){return ed},_:function(){return eF},a:function(){return q},a0:function(){return L},a1:function(){return ej},a2:function(){return ek},a3:function(){return H},b:function(){return et},c:function(){return er},d:function(){return eb},e:function(){return eP},f:function(){return K},g:function(){return eI},h:function(){return j},i:function(){return eE},j:function(){return V},k:function(){return eV},l:function(){return en},m:function(){return ey},n:function(){return eC},o:function(){return Q},p:function(){return eh},q:function(){return W},r:function(){return em},s:function(){return ev},t:function(){return eM},u:function(){return eD},v:function(){return $},w:function(){return X},x:function(){return eT},y:function(){return Z},z:function(){return z}});var r,i,a,o=t(12394),l=t(77522),s=t(8978),u=t(36786),c=t(72127),d=t(58972),h=Symbol("@ts-pattern/matcher"),f="@ts-pattern/anonymous-select-key",m=function(e){return!!(e&&"object"==typeof e)},v=function(e){return e&&!!e[h]},p=function e(n,t,r){if(m(n)){if(v(n)){var i=n[h]().match(t),a=i.matched,o=i.selections;
13return a&&o&&Object.keys(o).forEach(function(e){return r(e,o[e])}),a}if(!m(t))return!1;if(Array.isArray(n))return!!Array.isArray(t)&&n.length===t.length&&n.every(function(n,i){return e(n,t[i],r)});if(n instanceof Map)return t instanceof Map&&Array.from(n.keys()).every(function(i){return e(n.get(i),t.get(i),r)});if(n instanceof Set){if(!(t instanceof Set))return!1;if(0===n.size)return 0===t.size;if(1===n.size){var l=Array.from(n.values())[0];return v(l)?Array.from(t.values()).every(function(n){return e(l,n,r)}):t.has(l)}return Array.from(n.values()).every(function(e){return t.has(e)})}return Object.keys(n).every(function(i){var a=n[i];return(i in t||v(a)&&"optional"===a[h]().matcherType)&&e(a,t[i],r)})}return Object.is(t,n)},g=function e(n){var t,r,i;return m(n)?v(n)?null!=(t=null==(r=(i=n[h]()).getSelectionKeys)?void 0:r.call(i))?t:[]:Array.isArray(n)?_(n,e):_(Object.values(n),e):[]},_=function(e,n){return e.reduce(function(e,t){return e.concat(n(t))},[])};function E(e){var n;return(n={})[h]=function(){return{match:function(n){var t={},r=function(e,n){t[e]=n};return void 0===n?(g(e).forEach(function(e){return r(e,void 0)}),{matched:!0,selections:t}):{matched:p(e,n,r),selections:t}},getSelectionKeys:function(){return g(e)},matcherType:"optional"}},n}function b(e){var n;return(n={})[h]=function(){return{match:function(n){if(!Array.isArray(n))return{matched:!1};var t={};if(0===n.length)return g(e).forEach(function(e){t[e]=[]}),{matched:!0,selections:t};var r=function(e,n){t[e]=(t[e]||[]).concat([n])};return{matched:n.every(function(n){return p(e,n,r)}),selections:t}},getSelectionKeys:function(){return g(e)}}},n}function C(){var e,n=[].slice.call(arguments);return(e={})[h]=function(){return{match:function(e){var t={},r=function(e,n){t[e]=n};return{matched:n.every(function(n){return p(n,e,r)}),selections:t}},getSelectionKeys:function(){return _(n,g)},matcherType:"and"}},e}function y(){var e,n=[].slice.call(arguments);return(e={})[h]=function(){return{match:function(e){var t={},r=function(e,n){t[e]=n};return _(n,g).forEach(function(e){return r(e,void 0)}),{matched:n.some(function(n){return p(n,e,r)}),selections:t}},getSelectionKeys:function(){return _(n,g)},matcherType:"or"}},e}function N(e){var n;return(n={})[h]=function(){return{match:function(n){return{matched:!p(e,n,function(){})}},getSelectionKeys:function(){return[]},matcherType:"not"}},n}function T(e){var n;return(n={})[h]=function(){return{match:function(n){return{matched:!!e(n)}}}},n}function S(){var e,n=[].slice.call(arguments),t="string"==typeof n[0]?n[0]:void 0,r=2===n.length?n[1]:"string"==typeof n[0]?void 0:n[0];return(e={})[h]=function(){return{match:function(e){var n,i=((n={})[null!=t?t:f]=e,n);return{matched:void 0===r||p(r,e,function(e,n){i[e]=n}),selections:i}},getSelectionKeys:function(){return[null!=t?t:f].concat(void 0===r?[]:g(r))}}},e}var A=T(function(e){return!0}),I=T(function(e){return"string"==typeof e}),M=T(function(e){return"number"==typeof e}),O=T(function(e){return"boolean"==typeof e}),R=T(function(e){return"bigint"==typeof e}),w=T(function(e){return"symbol"==typeof e}),D=T(function(e){return null==e}),L={__proto__:null,optional:E,array:b,intersection:C,union:y,not:N,when:T,select:S,any:A,_:A,string:I,number:M,boolean:O,bigint:R,symbol:w,nullish:D,instanceOf:function(e){return T(function(n){return n instanceof e})},typed:function(){return{array:b,optional:E,intersection:C,union:y,not:N,select:S,when:T}}};function P(e){return new U(e,[])}var U=function(){function e(e,n){this.value=void 0,this.cases=void 0,this.value=e,this.cases=n}var n=e.prototype;return n.with=function(){var n=[].slice.call(arguments),t=n[n.length-1],r=[n[0]],i=[];return 3===n.length&&"function"==typeof n[1]?(r.push(n[0]),i.push(n[1])):n.length>2&&r.push.apply(r,n.slice(1,n.length-1)),new e(this.value,this.cases.concat([{match:function(e){var n={},t=!!(r.some(function(t){return p(t,e,function(e,t){n[e]=t})})&&i.every(function(n){return n(e)}));return{matched:t,value:t&&Object.keys(n).length?f in n?n[f]:n:e}},handler:t}]))},n.when=function(n,t){return new e(this.value,this.cases.concat([{match:function(e){return{matched:!!n(e),value:e}},handler:t}]))},n.otherwise=function(n){return new e(this.value,this.cases.concat([{match:function(e){return{matched:!0,value:e}},handler:n}])).run()},n.exhaustive=function(){return this.run()},n.run=function(){for(var e,n=this.value,t=void 0,r=0;r<this.cases.length;r++){var i=this.cases[r],a=i.match(this.value);if(a.matched){n=a.value,t=i.handler;break}}if(!t){try{e=JSON.stringify(this.value)}catch(n){e=this.value}throw Error("Pattern matching error: no pattern matches value "+e)}return t(n,this.value)},e}();function x(e){(0,c.r)(1,arguments);var n=(0,c.t)(e);return n.setMilliseconds(0),n}var k={IMAGE:["image/jpeg","image/jpg","image/png","image/gif","
13image/svg+xml","image/webp"],VIDEO:["video/mpeg","video/ogg","video/webm","video/mp4"],AUDIO:["audio/aac","audio/midi","audio/x-midi","audio/mpeg","audio/ogg","audio/opus","audio/wav","audio/webm","audio/3gpp","audio/3gpp2","audio/mp3"],DOCUMENT:["text/plain","text/css","text/csv","text/html","text/calendar","text/javascript","text/xml","video/quicktime"],APPLICATION:["application/x-abiword","application/x-freearc","application/vnd.amazon.ebook","application/octet-stream","application/x-bzip","application/x-bzip2","application/x-cdf","application/x-csh","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-fontobject","application/epub+zip","application/gzip","application/java-archive","application/json","application/ld+json","application/vnd.apple.installer+xml","application/vnd.oasis.opendocument.presentation","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.text","application/ogg","application/pdf","application/x-httpd-php","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.rar","application/rtf","application/x-sh","application/x-tar","application/vnd.visio","application/xhtml+xml","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xml","application/vnd.mozilla.xul+xml","application/zip","application/x-7z-compressed"]},F=function(e){return Array.isArray(e)&&e.length>0?e.reduce(function(e,n){switch(n){case"image":e.push.apply(e,k.IMAGE);break;case"video":e.push.apply(e,k.VIDEO);break;case"audio":e.push.apply(e,k.AUDIO);break;default:e.push(n)}return e},[]).join():Object.values(k).reduce(function(e,n){return e.concat(n)},[]).join()},G={ADMIN:"ADMIN",TEXT:"TEXT",FILE:"FILE",MULTIPLE_FILES:"MULTIPLE_FILES",THUMBNAIL:"THUMBNAIL",OG:"OG",UNKNOWN:"UNKNOWN"},B={IMAGE:"IMAGE",AUDIO:"AUDIO",VIDEO:"VIDEO",GIF:"GIF",VOICE:"VOICE",OTHERS:"OTHERS"},H=function(e){return""===e||null===e},V=function(e){return k.IMAGE.indexOf(e)>=0},j=function(e){return k.VIDEO.indexOf(e)>=0||(0,u.a)(navigator.userAgent)&&"video/quicktime"===e},z=function(e){return"image/gif"===e},K=function(e){return V(e)||j(e)},Y=function(e){return k.AUDIO.indexOf(e)>=0},Z=function(){return(0,o._)({},B)},Q=function(e){return z(e)?B.GIF:V(e)?B.IMAGE:j(e)?B.VIDEO:Y(e)?B.AUDIO:B.OTHERS},W=function(e){return"succeeded"===e.sendingStatus},q=function(e,n){return(0,s.$)(e,n)===s.o.READ},X=function(e){return(null==e?void 0:e.sendingStatus)==="failed"},$=function(e){return(null==e?void 0:e.sendingStatus)==="pending"},J=function(e){return e===s.o.SENT||e===s.o.DELIVERED||e===s.o.READ},ee=function(e){return e&&(e.isAdminMessage&&"function"==typeof e.isAdminMessage?e.isAdminMessage():(null==e?void 0:e.messageType)==="admin")},en=function(e){return e&&(e.isUserMessage&&"function"==typeof e.isUserMessage?e.isUserMessage():(null==e?void 0:e.messageType)==="user")},et=function(e){return!!e&&(e.isFileMessage&&"function"==typeof e.isFileMessage?e.isFileMessage():(null==e?void 0:e.messageType)==="file")},er=function(e){return e&&(e.isMultipleFilesMessage&&"function"==typeof e.isMultipleFilesMessage?e.isMultipleFilesMessage():"file"===e.messageType&&Object.prototype.hasOwnProperty.call(e,"fileInfoList"))},ei=function(e){return!!e.parentMessageId&&!!e.parentMessage},ea=function(e){return!!e.messageForm},eo=function(e){var n;return!!(e&&(null===(n=e.extendedMessagePayload)||void 0===n?void 0:n[d.i]))},el=function(e){var n=e.type;return!(n&&!es[n])},es={default:"default"},eu=((i={})[es.default]="ui_container_type__default",i),ec=function(e){return!!(e&&en(e))&&!!e.ogMetaData&&!!(e.ogMetaData.url||e.ogMetaData.title||e.ogMetaData.description||e.ogMetaData.defaultImage)},ed=function(e){return en(e)},eh=function(e){return!!(e&&et(e))&&K(e.type)},ef=function(e){return!!(e&&et(e))&&eh(e)&&V(e.type)},em=function(e){return!!(e&&et(e))&&eh(e)&&j(e.type)},ev=function(e){return!!(e&&et(e))&&eh(e)&&z(e.type)},ep=function(e){return!!(e&&et(e))&&Y(e.type)},eg=function(e){return!!e&&!!e.mimeType&&(V(e.mimeType)||z(e.mimeType))},e_=function(e){return/^voice\//.test(e)},eE=function(e){if(!e||!et(e)||!e.type)return!1;var n,t,r,i,a=e.type.split(";"),o=a[0],l=a[1];if(!/^audio\//.test(o))return!1;if(l){var s=l.split("="),u=s[0],c=s[1];return"sbu_type"===u&&"voice"===c}return e_(null!==(i=null===(r=null===(t=null===(n=null==e?void 0:e.metaArrays)||void 0===n?void 0:n.find(function(e){return"KEY_INTERNAL_MESSAGE_TYPE"===e.key}))||void 0===t?void 0:t.value)||void 0===r?void 0:r[0])&&void 0!==i?i:"")},eb=function(e){return en(e)&&(null==e?void 0:e.updatedAt)>0},eC=function(){return(0,o._)({},G)},ey=function(e){return ee(e)?G.ADMIN:en(e)?ec(e)?G.OG:G.TEXT:er(e)?G.MULTIPLE_FILES:et(e)?eh(e)?G.THUMBNAIL:eE(e)?B.VOICE:G.FILE:G.UNKNOWN},eN=function(e,n){return Array.isArray(n)?(0,o.c)((0,o.c)([],e,!0),n,!0):(e.push(n),e)},eT=function(e){return Array.isArray(e)?e.reduce(eN,[]).join(" "):e},eS=function(e,n){return n.userIds.some(function(n){return n===e})},eA=function(e,n,t,r){var i="";return eS(n,e)&&(i=1===e.userIds.length?r.TOOLTIP__YOU:r.TOOLTIP__AND_YOU),"".concat(e.userIds.filter(function(e){return e!==n}).map(function(e){return t.get(e)||r.TOOLTIP__UNKNOWN_USER}).join(", ")).concat(i)};function eI(e){var n;return(null==e?void 0:e.extendedMessagePayload)&&Array.isArray(null===(n=null==e?void 0:e.extendedMessagePayload)||void 0===n?void 0:n.suggested_replies)?e.extendedMessagePayload.suggested_replies:[]}var eM=function(e,n){if(n||(n=40),null==e)return"";if(e.length<=n)return e;var t=n-3;return e.substr(0,Math.ceil(t/2))+"..."+e.substr(e.length-Math.floor(t/2))},eO=function(e){if(window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",e);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var n=document.createElement("textarea");n.textContent=e,n.style.position="fixed",document.body.appendChild(n),n.select();try{return document.execCommand("copy")}catch(e){}finally{document.body.removeChild(n)}}return!1},eR=function(e){var n;return null===(n=null==e?void 0:e.emojiCategories)||void 0===n?void 0:n.map(function(e){return e.emojis}).reduce(function(e,n){return e.concat(n)},[])},ew=function(e){var n,t=new Map;return null===(n=null==e?void 0:e.emojiCategories)||void 0===n||n.forEac
13h(function(e){var n;null===(n=null==e?void 0:e.emojis)||void 0===n||n.forEach(function(e){e&&e.key&&t.set(e.key,e)})}),t},eD=function(e,n){var t;return n?(null===(t=null==e?void 0:e.emojiCategories)||void 0===t?void 0:t.filter(function(e){return n.includes(e.id)}).flatMap(function(e){return e.emojis}))||[]:eR(e)},eL=function(e,n){var t,r,i,a=(t=null!=n?n:"",function(e){return e.key===t});return(null===(i=null===(r=null==e?void 0:e.emojiCategories.find(function(e){return e.emojis.some(a)}))||void 0===r?void 0:r.emojis.find(a))||void 0===i?void 0:i.url)||""},eP=function(e){var n;return(null==e?void 0:e.sender)&&((null==(n=null==e?void 0:e.sender)?void 0:n.friendName)||(null==n?void 0:n.nickname)||(null==n?void 0:n.userId))},eU=function(e,n){if(e===n)return!0;if(null==e||null==n||e.length!==n.length)return!1;for(var t=(0,o.c)([],e,!0).sort(),r=(0,o.c)([],n,!0).sort(),i=0;i<t.length;++i)if(t[i]!==r[i])return!1;return!0},ex=function(e){return!!e&&!!(e.friendDiscoveryKey||e.friendName)},ek=function(e,n){var t,r,i,a,o=e.customTypesFilter,l=void 0===o?[]:o;if((null==e?void 0:e.messageTypeFilter)&&e.messageTypeFilter!==n.messageType)return!1;if((null==l?void 0:l.length)>0){var s=l.filter(function(e){return"*"!==e});if(s.length>0&&!s.includes(n.customType))return!1}if((null==e?void 0:e.senderUserIdsFilter)&&(null===(t=null==e?void 0:e.senderUserIdsFilter)||void 0===t?void 0:t.length)>0){if(!((null===(r=null==n?void 0:n.isUserMessage)||void 0===r?void 0:r.call(n))||(null===(i=null==n?void 0:n.isFileMessage)||void 0===i?void 0:i.call(n))))return!1;var u=n.sender||n._sender;if(!(null===(a=null==e?void 0:e.senderUserIdsFilter)||void 0===a?void 0:a.includes(null==u?void 0:u.userId)))return!1}return!!(null==e?void 0:e.includeParentMessageInfo)||(null==n||!n.parentMessageId)&&(null==n||!n.parentMessage)},eF=function(e,n,t){var r,i,a,o,l,s,u,c=e.includeEmpty,d=e.includeFrozen,h=e.searchFilter,f=e.userIdsFilter,m=e.customTypesFilter,v=e.channelUrlsFilter,p=e.customTypeStartsWithFilter,g=e.channelNameContainsFilter,_=e.nicknameContainsFilter,E=e.myMemberStateFilter,b=e.hiddenChannelFilter,C=e.unreadChannelFilter,y=e.publicChannelFilter,N=e.superChannelFilter,T=e.metadataKey,S=void 0===T?"":T,A=e.metadataValues,I=void 0===A?["a","b"]:A,M=e.metadataValueStartsWith;if(!c&&(null==n?void 0:n.lastMessage)===null)return!1;if((null==h?void 0:h.query)&&(null!==(i=null===(r=null==h?void 0:h.fields)||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0){var O=h.query,R=h.fields;if(O&&R&&R.length>0&&!R.some(function(e){var t,r;switch(e){case"channel_name":return null===(t=null==n?void 0:n.name)||void 0===t?void 0:t.toLowerCase().includes(O.toLowerCase());case"member_nickname":return null===(r=null==n?void 0:n.members)||void 0===r?void 0:r.some(function(e){return e.nickname.toLowerCase().includes(O.toLowerCase())});default:return!0}}))return!1}if((null===(a=null==f?void 0:f.userIds)||void 0===a?void 0:a.length)>0){var w=f.includeMode,D=f.queryType,L=f.userIds,P=null===(o=null==n?void 0:n.members)||void 0===o?void 0:o.map(function(e){return e.userId});if(w){if(L.length>0)switch(D){case"AND":if(L.some(function(e){return!P.includes(e)}))return!1;break;case"OR":if(L.every(function(e){return!P.includes(e)}))return!1}}else if(L.includes(t)||L.push(t),(null===(l=null==n?void 0:n.members)||void 0===l?void 0:l.length)>L.length||!eU(L,P))return!1}if(!1===c&&(null==n?void 0:n.lastMessage)===null||!1===d&&(null==n?void 0:n.isFrozen)===!0||m&&!m.includes(null==n?void 0:n.customType)||p&&!new RegExp("^".concat(p)).test(null==n?void 0:n.customType)||g&&!(null===(s=null==n?void 0:n.name)||void 0===s?void 0:s.toLowerCase().includes(g.toLowerCase())))return!1;if(_){var U=_.toLowerCase();if(null===(u=null==n?void 0:n.members)||void 0===u?void 0:u.every(function(e){return!e.nickname.toLowerCase().includes(U)}))return!1}if(v&&!v.includes(null==n?void 0:n.url))return!1;if(E)switch(E){case"joined_only":if((null==n?void 0:n.myMemberState)!=="joined")return!1;break;case"invited_only":if((null==n?void 0:n.myMemberState)!=="invited")return!1;break;case"invited_by_friend":if((null==n?void 0:n.myMemberState)!=="invited"||!ex(null==n?void 0:n.inv
13iter))return!1;break;case"invited_by_non_friend":if((null==n?void 0:n.myMemberState)!=="invited"||ex(null==n?void 0:n.inviter))return!1}if(b)switch(b){case"unhidden_only":if((null==n?void 0:n.isHidden)||(null==n?void 0:n.hiddenState)!=="unhidden")return!1;break;case"hidden_only":if(!(null==n?void 0:n.isHidden))return!1;break;case"hidden_allow_auto_unhide":if(!(null==n?void 0:n.isHidden)||(null==n?void 0:n.hiddenState)!=="hidden_allow_auto_unhide")return!1;break;case"hidden_prevent_auto_unhide":if(!(null==n?void 0:n.isHidden)||(null==n?void 0:n.hiddenState)!=="hidden_prevent_auto_unhide")return!1}if(C&&"unread_message"===C&&(null==n?void 0:n.unreadMessageCount)===0)return!1;if(y)switch(y){case"public":if(!(null==n?void 0:n.isPublic))return!1;break;case"private":if(null==n?void 0:n.isPublic)return!1}if(N)switch(N){case"super":if(!(null==n?void 0:n.isSuper))return!1;break;case"nonsuper":if(null==n?void 0:n.isSuper)return!1}var x=n.cachedMetaData;if(S&&(I||M)){var k=(void 0===x?{}:x)[S];if(!k||I&&!I.every(function(e){return k.includes(e)})||M&&!k.startsWith(M))return!1}return!0},eG=function(e,n){var t=P(n).with(l.G.CHANNEL_NAME_ALPHABETICAL,function(){return function(e,n){return e.name.localeCompare(n.name)}}).with(l.G.CHRONOLOGICAL,function(){return function(e,n){return n.createdAt-e.createdAt}}).otherwise(function(){return function(e,n){var t,r,i,a;return(null!==(r=null===(t=n.lastMessage)||void 0===t?void 0:t.createdAt)&&void 0!==r?r:Number.MIN_SAFE_INTEGER)-(null!==(a=null===(i=e.lastMessage)||void 0===i?void 0:i.createdAt)&&void 0!==a?a:Number.MIN_SAFE_INTEGER)}});return e.sort(t)},eB=function(e,n,t){var r=(0,o.c)([],e,!0),i=r.findIndex(function(e){return e.url===n.url});return -1!==i?r[i]=n:r.push(n),eG(r,null!=t?t:l.G.LATEST_LAST_MESSAGE)};(r=a||(a={})).normal="normal",r.mention="mention",r.url="url";var eH=function(e,n){if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}return!1},eV=function(e){return!!e&&"sender"in e},ej=function(e){return function(e,n){(0,c.r)(2,arguments);var t=x(e),r=x(n);return t.getTime()===r.getTime()}(e.createdAt,e.invitedAt)&&!e.lastMessage}},76917:function(e,n,t){"use strict";t.d(n,{u:function(){return i}});var r=t(67294);function i(e,n){var t=(0,r.useState)(!1),i=t[0],a=t[1];return(0,r.useEffect)(function(){var t,r,i=Array.isArray(n)?n:[n];a(null!==(t=null==(r=null==i?void 0:i.map(function(n){return null==n?void 0:n.querySelector(e)}))?void 0:r.some(function(e){return!!e}))&&void 0!==t&&t);var o=new MutationObserver(function(n){n.forEach(function(n){(n.addedNodes.length||n.removedNodes.length)&&(Array.from(n.addedNodes).forEach(function(n){n.nodeType===Node.ELEMENT_NODE&&n.matches(e)&&a(!0)}),Array.from(n.removedNodes).forEach(function(n){n.nodeType===Node.ELEMENT_NODE&&n.matches(e)&&a(!1)}))})}),l={childList:!0,subtree:!0};return null==i||i.forEach(function(e){e&&o.observe(e,l)}),function(){o.disconnect()}},[e,n]),i}},80128:function(e,n,t){"use strict";t.d(n,{a:function(){return a},u:function(){return o}});var r=t(67294),i=t(58972),a=function(e){(0,r.useEffect)(function(){document.getElementById(i.V).parentElement.dir=e},[e])},o=function(e,n,t){(0,r.useEffect)(function(){if(!t){var r=document.getElementsByClassName("sendbird-conversation__messages");r.length>0&&Array.from(r).forEach(function(t){t.dir=n?"ltr":e})}},[e,n,t])}},15071:function(e,n,t){"use strict";function r(e){return{lowerCase:e.toLowerCase(),upperCase:e.toUpperCase()}}function i(e){return{lowerCase:e.toLowerCase(),upperCase:e.toUpperCase()}}t.d(n,{a:function(){return i},g:function(){return r}})},47057:function(e,n,t){"use strict";t.d(n,{M:function(){return e_},a:function(){return eL}});var r,i,a,o,l,s,u,c,d,h,f,m,v,p,g=t(67294);(r=c||(c={})).Box="box",r.Text="text",r.Image="image",r.TextButton="textButton",r.ImageButton="imageButton",r.Carousel="carouselView";let _=(e,n)=>{var t;return"string"!=typeof n[e]?{}:{[e]:(t=n[e]).startsWith("#")?9===t.length?`#${t.slice(3)}${t[1]}${t[2]}`:5===t.length?`#${t.slice(2)}${t[1]}`:t:t}},E=e=>e?{viewStyle:Object.assign(Object.assign(Object.assign({},e),_("backgroundColor",e)),_("borderColor",e))}:{},b=e=>e?{textStyle:Object.assign(Object.assign({},e),_("color",e))}:{},C=e=>e?{imageStyle:Object.assign(Object.assign({},e),_("tintColor",e))}:{},y={run:e=>e.type===c.Text||e.type===c.TextButton?Object.assign(Object.assign(Object.assign({},e),E(e.viewStyle)),b(e.textStyle)):e.type===c.ImageButton||e.type===c.Image?Object.assign(Object.assign(Object.assign({},e),E(e.viewStyle)),C(e.imageStyle)):Object.assign(Object.assign({},e),E(e.viewStyle))},N=e=>"string"==typeof e?!Number.isNaN(Number(e)):"number"==typeof e&&!Number.isNaN(e),T=(e,n)=>void 0===n[e]||null===n[e]?{}:N(n[e])?{[e]:Number(n[e])}:{},S=(e,n)=>n?{[e]:{left:N(n.left)?Number(n.left):n.left,right:N(n.right)?Number(n.right):n.right,top:N(n.top)?Number(n.top):n.top,bottom:N(n.bottom)?Number(n.bottom):n.bottom}}:{},A=(e,n)=>n?{[e]:{type:n.type,value:N(n.value)?Number(n.value):n.value}}:{},I=e=>e?{metaData:{pixelWidth:N(e.pixelWidth)?Number(e.pixelWidth):e.pixelWidth,pixelHeight:N(e.pixelHeight)?Number(e.pixelHeight):e.pixelHeight}}:{},M=e=>e?{viewStyle:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),T("borderWidth",e)),T("radius",e)),S("margin",e.margin)),S("padding",e.padding))}:{},O=e=>e?{textStyle:Object.assign(Object.assign(Object.assign({},e),T("size",e)),T("weight",e))}:{},R=e=>e?{carouselStyle:Object.assign(Object.assign({},e),T("spacing",e))}:{},w=e=>Object.assign(Object.assign(Object.assign({},A("width",e.width)),A("height",e.height)),M(e.viewStyle)),D=e=>Object.assign(Object.assign(Object.assign({},w(e)),O(e.textStyle)),T("maxTextLines",e)),L=e=>Object.assign(Object.assign({},w(e)),I(e.metaData)),P=e=>Object.assign(Object.assign(Object.assign({},w(e)),R(e.carouselStyle)),{items:e.items.map(e=>Object.assign(Object.assign({},e),{body:Object.assign(Object.assign({},e.body),{items:e.body.items.map(e=>U.run(e))})}))}),U={run:e=>e.type===c.Text||e.type===c.TextButton?Object.assign(Object.assign({},e),D(e)):e.type===c.ImageButton||e.type===c.Image?Object.assign(Object.assign({},e),L(e)):e.type===c.Carousel?Object.assign(Object.assign({},e),P(e)):Object.assign(Object.assign({},e),w(e))},x=()=>void 0,k=e=>{var n;let t=(null==e?void 0:e.defaultMapper)||x,r={defaultMapper:t,mapBoxProps:(null==e?void 0:e.mapBoxProps)||t,mapTextProps:(null==e?void 0:e.mapTextProps)||t,mapImageProps:(null==e?void 0:e.mapImageProps)||t,mapTextButtonProps:(null==e?void 0:e.mapTextButtonProps)||t,mapImageButtonProps:(null==e?void 0:e.mapImageButtonProps)||t,mapCarou
13selProps:(null==e?void 0:e.mapCarouselProps)||t},i=[y,U,...null!==(n=null==e?void 0:e.transforms)&&void 0!==n?n:[]],a=new Set;return{setTransforms(e){i.length=0,i.push(...e),a.clear()},addTransforms(e){i.push(...e)},parse(e,n){let t=i.reduce((e,n)=>n.run(e),e);switch(t.type){case c.Box:return{transformed:t,properties:r.mapBoxProps(t,n)};case c.Text:return{transformed:t,properties:r.mapTextProps(t,n)};case c.Image:return{transformed:t,properties:r.mapImageProps(t,n)};case c.TextButton:return{transformed:t,properties:r.mapTextButtonProps(t,n)};case c.ImageButton:return{transformed:t,properties:r.mapImageButtonProps(t,n)};case c.Carousel:return{transformed:t,properties:r.mapCarouselProps(t,n)};default:return{transformed:t,properties:void 0}}}}},F=({children:e})=>g.createElement(g.Fragment,null,e);function G(e){var n,t,r,i,a,o;return{box:(null===(n=null==e?void 0:e.views)||void 0===n?void 0:n.box)||F,text:(null===(t=null==e?void 0:e.views)||void 0===t?void 0:t.text)||F,image:(null===(r=null==e?void 0:e.views)||void 0===r?void 0:r.image)||F,imageButton:(null===(i=null==e?void 0:e.views)||void 0===i?void 0:i.imageButton)||F,textButton:(null===(a=null==e?void 0:e.views)||void 0===a?void 0:a.textButton)||F,carouselView:(null===(o=null==e?void 0:e.views)||void 0===o?void 0:o.carouselView)||F}}var B=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>n.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t};let H=(0,g.createContext)({sizes:{},updateSize:()=>{}}),V=({children:e})=>{let[n,t]=(0,g.useState)({}),r=(0,g.useCallback)(e=>{var{id:n}=e,r=B(e,["id"]);n&&t(e=>Object.assign(Object.assign({},e),{[n]:r}))},[]);return g.createElement(H.Provider,{value:{sizes:n,updateSize:r}},e)},j=()=>(0,g.useContext)(H);(i=d||(d={})).Row="row",i.Column="column",(a=h||(h={})).Center="center",a.Left="left",a.Right="right",a.Top="top",a.Bottom="bottom",(o=f||(f={}))[o.FillParent=0]="FillParent",o[o.WrapContent=1]="WrapContent",(l=m||(m={})).Normal="normal",l.Bold="bold",(s=v||(v={})).AspectFit="aspectFit",s.AspectFill="aspectFill",s.ScalesToFill="scalesToFill";let z=[1,2],K=e=>{switch(e){case h.Right:case h.Bottom:return"flex-end";case h.Center:return"center";case h.Left:case h.Top:default:return"flex-start"}},Y=e=>!e||z.includes(Number(e)),Z=(e=>{let n=new Map,t=function(t){return n.has(t)?n.get(t):n.set(t,e.call(this,t))&&n.get(t)};return t.cache=n,t})(e=>{let n=(e,t)=>{"items"in e&&(null==e?void 0:e.items)!=null&&e.items.forEach((e,r)=>{let i=`${t}-${r}`;e.id=i,n(e,i)})};return e.forEach((e,t)=>{let r=`${t}`;e.id=r,n(e,r)}),e}),Q={rootLayout:d.Column,view:{size:{width:{type:"flex",value:f.FillParent},height:{type:"flex",value:f.WrapContent}}},box:{layout:d.Row,align:{vertical:h.Top,horizontal:h.Left}},textButton:{maxTextLines:1},carousel:{style:{spacing:10,maxChildWidth:240}}},W=e=>{let n=e.Container||g.Fragment,t=e.UnknownMessage||(()=>null),r=e.parser||k(),i=e.renderer||G(),a=({templateItems:e,templateVersion:n,parentLayout:o=Q.box.layout,depth:l=0})=>{if(!Y(n))throw Error(`Cannot parse template item due to unsupported template version: ${n}, ${z}`);return g.createElement(g.Fragment,null,e.map((e,s,u)=>{let d=r.parse(e,{parentLayout:o,depth:l,elemIdx:s,siblings:u}),h=d.transformed,f={key:s,siblings:u,parentLayout:o,parsedProperties:d.properties};switch(h.type){case c.Carousel:if(!Array.isArray(h.items)||0===h.items.length)throw Error("Cannot parse template item as Carousel if carousel has no items.");return g.createElement(i.carouselView,Object.assign({},h,f),h.items.map((e,n)=>g.createElement(a,{key:n,templateItems:e.body.items||[],depth:l+1,templateVersion:e.version})));case c.Box:return g.createElement(i.box,Object.assign({},h,f),g.createElement(a,{templateItems:h.items||[],parentLayout:h.layout,depth:l+1,templateVersion:n}));case c.Text:return g.createElement(i.text,Object.assign({},h,f));case c.Image:return g.createElement(i.image,Object.assign({},h,f));case c.TextButton:return g.createElement(i.textButton,Object.assign({},h,f));case c.ImageButton:return g.createElement(i.imageButton,Object.assign({},h,f));default:return g.createElement(t,{item:h})}}))};return{MessageTemplate:({templateVersion:e,templateItems:t,parentLayout:r=Q.rootLayout})=>{let i=Z(t);return g.createElement(V,null,g.createElement(n,null,g.createElement(a,{isRoot:!0,parentLayout:r,templateItems:i,templateVersion:e})))},MessageTemplateBase:a}};(u=p||(p={})).Web="web",u.Custom="custom",u.UIKit="uikit",c.Image,p.Web,v.AspectFill,c.Box,d.Column,f.FillParent,c.Box,f.FillParent,f.FillParent,c.Box,d.Column,f.FillParent,f.WrapContent,c.Text,h.Center,h.Center,f.FillParent,c.Image,p.Web,f.FillParent,v.AspectFill,c.Box,f.FillParent,c.Box,f.FillParent,f.FillParent,c.Box,d.Column,c.Box,h.Left,h.Center,d.Row,f.FillParent,c.Text,f.FillParent,h.Center,h.Left,m.Bold,c.ImageButton,p.UIKit,v.AspectFit,c.Text,c.TextButton,p.Web,m.Bold,c.Image,p.Web,v.AspectFill,c.Box,d.Column,f.FillParent,c.Box,f.FillParent,d.Row,c.TextButton,p.Web,m.Bold,c.TextButton,p.Web,f.FillParent,m.Bold,c.Box,f.FillParent,d.Row,c.Text,f.FillParent,m.Bold,c.ImageButton,p.UIKit,v.AspectFit,c.Text,c.Box,d.Column,c.Image,v.AspectFill,c.Box,d.Column,c.Text,m.Bold,c.Text,c.Box,h.Left,h.Center,d.Row,c.Image,v.AspectFill,c.Box,h.Left,h.Center,d.Column,c.Text,m.Bold,c.Text,m.Bold,c.Box,h.Left,h.Center,d.Row,c.Image,v.AspectFill,c.Box,h.Left,h.Center,d.Column,c.Text,m.Bold,c.Text,m.Bold,c.Box,h.Left,h.Center,d.Row,c.Image,v.AspectFill,c.Box,h.Left,h.Center,d.Column,c.Text,m.Bold,c.Text,m.Bold,c.Box,h.Left,h.Center,d.Row,c.TextButton,p.Web,m.Bold,c.TextButton,p.Web,m.Bold,c.Box,d.Column,c.Image,c.Box,d.Column,c.Box,d.Row,c.Box,d.Column,c.Text,m.Bold,c.Text,c.ImageButton,p.UIKit,c.Box,d.Column,c.Box,h.Left,h.Center,d.Row,c.Image,v.AspectFill,c.Box,d.Column,c.Text,m.Bold,c.Text,c.Box,h.Left,h.Center,d.Row,c.Image,v.AspectFill,c.Box,d.Column,c.Text,m.Bold,c.Text,f.FillParent,f.FillParent,f.FillParent,f.FillParent,f.FillParent,f.FillParent,f.FillParent,f.WrapContent,f.FillParent,f.FillParent;var q=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>n.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t};let X=({children:e,style:n,spacing:t=Q.carousel.style.spacing,maxChildWidth:r=Q.carousel.style.maxChildWidth})=>{let i=null!=n?n:{},{paddingInlineStart:a=0,paddingInlineEnd:o=0}=i,l=q(i,["paddingInlineStart","paddingInlineEnd"]),{carouselRef:s,childrenRefs:u,handlers:c}=function({spacing:e,childrenLength:n,paddingInlineStart:t,paddingInlineEnd:r}){let i=(0,g.useRef)(null),a=(0,g.useRef)(Array.from({length:n},()=>g.createRef())),o=(0,g.useRef)(!1),l=(0,g.useRef)(!1),s=(0,g.useRef)(null),u=(0,g.useRef)({sx:null,
13sy:null,offset:0,translateX:0,currentIndex:0}),[c,d]=(0,g.useState)(()=>a.current.map(()=>0)),h=(0,g.useMemo)(()=>{let n=t;return c.map((t,r)=>{let i=n-(r>0?e:0),a=i-t;return n=a,{start:i,end:a}})},[c,e,t]),f=(0,g.useMemo)(()=>{let t=c.reduce((e,n)=>e+n,0);return t+e*(n-1)},[c,e,n]);(0,g.useLayoutEffect)(()=>{d(a.current.map(e=>{var n,t;return null!==(t=null===(n=e.current)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:0}))},[n]),(0,g.useLayoutEffect)(()=>{h.length>0&&(u.current.translateX=h[0].start,b())},[h]);let m=()=>{i.current&&(o.current=!0,i.current.style.cursor="grabbing",i.current.style.transition="none",s.current=requestAnimationFrame(b))},v=()=>{i.current&&(o.current=!1,i.current.style.cursor="grab",i.current.style.transition="transform 0.5s ease",s.current&&(cancelAnimationFrame(s.current),s.current=null))},p=()=>{let{offset:e,currentIndex:a}=u.current,o=Math.abs(e)>=24,l=a;o&&e<0&&a<n-1?l=a+1:o&&e>0&&a>0&&(l=a-1),u.current.currentIndex=l,u.current.translateX=function(e){var n,a;let o=null!==(a=null===(n=i.current)||void 0===n?void 0:n.clientWidth)&&void 0!==a?a:0;return Math.min(t,Math.max(Math.min(0,o-f)-r,e))}(h[l].start),u.current.offset=0},_=()=>{l.current=!0},E=()=>{l.current=!1},b=()=>{i.current&&(i.current.style.transform=`translateX(${u.current.translateX+u.current.offset}px)`),s.current&&(s.current=requestAnimationFrame(b))},C=()=>{i.current&&(i.current.style.touchAction="pan-x")},y=()=>{i.current&&(i.current.style.touchAction="pan-y")},N=e=>{m(),E(),u.current.sx=e.clientX,u.current.sy=e.clientY,u.current.offset=0,s.current=requestAnimationFrame(b)},T=e=>{o.current&&null!==u.current.sx&&(u.current.offset=e.clientX-u.current.sx)},S=()=>{o.current&&(E(),p(),v())},A=()=>{o.current&&(E(),p(),v())},I=e=>{E(),v();let n=e.touches[0];u.current.sx=n.clientX,u.current.sy=n.clientY,u.current.offset=0,s.current=requestAnimationFrame(b)},M=e=>{if(null===u.current.sx||null===u.current.sy||l.current)return;let{clientX:n,clientY:t}=e.touches[0],{sx:r,sy:i}=u.current;if(o.current){u.current.offset=n-r;return}Math.abs(t-i)>Math.abs(n-r)?_():(u.current.offset=n-r,C(),m())},O=()=>{y(),E(),p(),v()};return{carouselRef:i,childrenRefs:a,handlers:{onMouseDown:N,onMouseMove:T,onMouseUp:S,onMouseLeave:A,onTouchStart:I,onTouchMove:M,onTouchEnd:O}}}({spacing:t,childrenLength:e.length,paddingInlineStart:Number(a),paddingInlineEnd:Number(o)});return g.createElement("div",Object.assign({},c,{ref:s,className:"sb-message-template__carousel",style:Object.assign(Object.assign({},l),{gap:t,width:"100%",overflow:"visible"})}),e.map((e,n)=>g.createElement($,{ref:u.current[n],key:n,maxChildWidth:r},e)))},$=g.forwardRef(function({maxChildWidth:e,children:n},t){let r=n.props.templateItems.find(n=>{var t,r,i,a;let o=(null===(t=n.width)||void 0===t?void 0:t.type)==="flex"&&(null===(r=n.width)||void 0===r?void 0:r.value)===f.FillParent,l=(null===(i=n.width)||void 0===i?void 0:i.type)==="fixed"&&(null===(a=n.width)||void 0===a?void 0:a.value)>=e;return o||l})?e:"fit-content";return g.createElement("div",{ref:t,style:{maxWidth:r,width:"100%",flexShrink:0,overflow:"hidden",userSelect:"none"}},n)});function J(e){var n;return e.type===c.Text&&(null===(n=e.width)||void 0===n?void 0:n.value)==f.WrapContent}let ee=({size:e,option:n})=>"wrap"===n?"flex"===e.type&&e.value==f.WrapContent:"fill"===n?"flex"===e.type&&e.value==f.FillParent:"fixed"===e.type,en=e=>{var n;if("string"!=typeof e)return!1;let t=null===(n=e.split(".").pop())||void 0===n?void 0:n.toLowerCase();return"gif"===t};var et=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>n.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t};let er=e=>{let{imageSize:n,canvasRef:t,canvasProps:r}=ei(e);return g.createElement("canvas",Object.assign({},r,{ref:t,width:null==n?void 0:n.width,height:null==n?void 0:n.height,onError:e.onError}))},ei=e=>{var{metaData:n,tintColor:t}=e,r=et(e,["metaData","tintColor"]);let i=(0,g.useRef)(null),[a,o]=(0,g.useState)(),l=(0,g.useMemo)(()=>(null==n?void 0:n.pixelHeight)&&(null==n?void 0:n.pixelWidth)?{width:n.pixelWidth,height:n.pixelHeight}:a,[a,null==n?void 0:n.pixelHeight,null==n?void 0:n.pixelWidth]);return(0,g.useEffect)(()=>
13{if(null==l&&(console.log("Canvas_ReactMessageTemplateImage: no metaData, render fit to container"),i.current)){i.current.style.width="100%",i.current.style.height="100%";let e=i.current.getBoundingClientRect();o(e)}},[l]),(0,g.useEffect)(()=>{if(r.src){let e=new Image,n=()=>{if(i.current&&t&&l){let n=i.current.getContext("2d");if(n){let{width:r,height:i}=l;n.clearRect(0,0,r,i),n.beginPath(),n.globalCompositeOperation="source-over",n.fillStyle="#000",n.drawImage(e,0,0,r,i),n.globalCompositeOperation="source-atop",n.fillStyle=t,n.fillRect(0,0,r,i)}}},a=e=>{var n;null===(n=r.onError)||void 0===n||n.call(r,e)};return e.addEventListener("load",n),e.addEventListener("error",a),e.src=r.src,()=>{e.removeEventListener("load",n),e.removeEventListener("error",a)}}},[r.src,l,t]),{canvasRef:i,canvasProps:r,imageSize:l}},ea=e=>g.createElement("img",Object.assign({},e,{onError:e.onError,referrerPolicy:"no-referrer"})),eo=e=>g.createElement("div",{style:Object.assign(Object.assign({},e.style),{backgroundColor:"transparent"})});var el=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>n.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t};let es=e=>{var{tintColor:n,metaData:t}=e,r=el(e,["tintColor","metaData"]);let{hasError:i,onError:a}=eu(r.src);return(r.onError&&console.warn("`onError` is intercepted and not executed in the ReactMessageTemplateImage."),i)?g.createElement(eo,Object.assign({},r)):n&&!en(r.src)?g.createElement(er,Object.assign({},r,{onError:a,tintColor:n,metaData:t})):g.createElement(ea,Object.assign({},r,{onError:a}))},eu=e=>{let[n,t]=(0,g.useState)(!1);return(0,g.useEffect)(()=>t(!1),[e]),{hasError:n,onError:(0,g.useCallback)(()=>t(!0),[])}};function ec(e){return Object.assign({display:"flex",overflow:"hidden",boxSizing:"border-box"},e)}function ed(e,n,t){(function(e,n,t){var r,i;let{width:a,height:o}=Q.view.size,{parentLayout:l}=t,s=function(e,n,t){let r={};return"flex"===e.type&&e.value==f.FillParent?(r.width="100%",t===d.Row&&(r.flex=1)):"fixed"===e.type&&e.value>=0&&(r.width=e.value),"flex"===n.type&&n.value==f.FillParent?(r.height="100%",t===d.Column&&(r.flex=1)):"fixed"===n.type&&n.value>=0&&(r.height=n.value),r}(null!==(r=n.width)&&void 0!==r?r:a,null!==(i=n.height)&&void 0!==i?i:o,l);Object.assign(e,s)})(e,n,t),function(e,n){var t,r,i,a,o,l,s,u,c,d,h,f;let{viewStyle:m}=n;e.marginBlockStart=null===(t=null==m?void 0:m.margin)||void 0===t?void 0:t.top,e.marginBlockEnd=null===(r=null==m?void 0:m.margin)||void 0===r?void 0:r.bottom,e.marginInlineStart=null===(i=null==m?void 0:m.margin)||void 0===i?void 0:i.left,e.marginInlineEnd=null===(a=null==m?void 0:m.margin)||void 0===a?void 0:a.right;let v=(null!==(l=null===(o=null==m?void 0:m.margin)||void 0===o?void 0:o.left)&&void 0!==l?l:0)+(null!==(u=null===(s=null==m?void 0:m.margin)||void 0===s?void 0:s.right)&&void 0!==u?u:0);v>0&&"100%"===e.width&&(e.width=`calc(100% - ${v}px)`),(null==m?void 0:m.backgroundColor)&&(e.backgroundColor=m.backgroundColor),(null==m?void 0:m.backgroundImageUrl)&&(e.backgroundImage=`url(${JSON.stringify(m.backgroundImageUrl)})`,e.backgroundSize="100% 100%",e.backgroundPosition="center"),c=e,d=null==m?void 0:m.borderWidth,h=null==m?void 0:m.borderColor,f=null==m?void 0:m.radius,d&&(c["--border-width"]=`${d}px`,c["--border-color"]=h||"transparent"),f&&(c.borderRadius=f,c["--border-radius"]=`${f}px`)}(e,n)}function eh(e,n=Q.box.layout,t=Q.box.align){n===d.Row&&(e.flexDirection="row",e.alignItems=K(t.vertical),e.justifyContent=K(t.horizontal)),n===d.Column&&(e.flexDirection="column",e.alignItems=K(t.horizontal),e.justifyContent=K(t.vertical))}function ef(e,n){let{contentMode:t=v.AspectFit}=n||{};if(t)switch(t){case v.AspectFill:e.objectFit="cover";break;case v.AspectFit:e.objectFit="contain";break;case v.ScalesToFill:e.objectFit="fill"}}function em(e,n){var t,r,i,a;let o=null==n?void 0:n.metaData;(null==o?void 0:o.pixelHeight)&&(null==o?void 0:o.pixelWidth)&&(null===(t=null==n?void 0:n.width)||void 0===t?void 0:t.type)!=="fixed"&&(null===(r=null==n?void 0:n.height)||void 0===r?void 0:r.type)!=="fixed"&&(e.aspectRatio=`${null===(i=null==n?void 0:n.metaData)||void 0===i?void 0:i.pixelWidth} / ${null===(a=null==n?void 0:n.metaData)||void 0===a?void 0:a.pixelHeight}`)}function ev(e){return{WebkitLineClamp:e,WebkitBoxOrient:"vertical",display:"-webkit-box",overflow:"hidden",overflowWrap:"anywhere",flex:1}}function ep(e,n,t){let{textStyle:r,width:i}
13=n,{size:a,color:o,weight:l}=r||{};if(a&&(e.fontSize=a),o&&(e.color=o),l&&(e.fontWeight=l),(null==i?void 0:i.type)==="flex"&&(null==i?void 0:i.value)==f.WrapContent&&(e.width="fit-content",e.maxWidth="100%"),n.type===c.Text){let{siblings:n,elemIdx:r}=t;null!=n&&n.length>=2&&n.every(J)&&(e.flexShrink=n.length-1===r?1:0)}}let eg=g.createContext(null),e_=e=>{let{message:n,handleWebAction:t,handleCustomAction:r,handlePredefinedAction:i,children:a}=e,o=g.useMemo(()=>({message:n,handleWebAction:t,handleCustomAction:r,handlePredefinedAction:i}),[null==n?void 0:n.updatedAt]);return g.createElement(eg.Provider,{value:o},a)},eE=()=>{let e=g.useContext(eg);if(!e)throw Error("useMessageContext must be used within a MessageProvider");return e};function eb(e){let n=(0,g.useRef)(e);return(0,g.useEffect)(()=>{n.current=e},[e]),(0,g.useCallback)((...e)=>n.current(...e),[n])}function eC(){}var ey=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>n.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t};function eN({width:e=Q.view.size.width,height:n=Q.view.size.height,parentLayout:t=Q.box.layout,option:r}){return t===d.Row?ee({size:e,option:r}):ee({size:n,option:r})}var eT=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>n.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t};let eS=(e="")=>["http://","https://","ftp://"].some(n=>e.startsWith(n)),eA=(e="")=>eS(e)?e:`https://${e}`,eI=({children:e,props:n,className:t,style:r})=>{var i,a,o,l,s,u,h,f,m;let{recalculatedStyle:v,elemRef:p}=function(e){let{style:n,props:t}=e,r=function(){let[e,n]=(0,g.useState)(-1),[t,r]=(0,g.useState)(-1),[i,a]=(0,g.useState)(-1),[o,l]=(0,g.useState)(-1),[s,u]=(0,g.useState)(-1),[c,d]=(0,g.useState)(-1),h=function(e){let n=eb(e),t=function(e,n){let t=eb(e),r=(0,g.useRef)(eC),i=(0,g.useCallback)(n=>{if(r.current(),r.current=eC,null!=n){let t=e(n);"function"==typeof t&&(r.current=t)}},[t,...n]);return i}(e=>{let t=new ResizeObserver(e=>{null!=e[0]&&n(e[0])});return t.observe(e),()=>{t.unobserve(e)}},[n]);return t}(e=>{let{width:t,height:i}=e.contentRect,o=e.target,{width:s,height:c}=o.getBoundingClientRect();n(s),r(c),a(t),l(i),u(s-t),d(c-i)});return{ref:h,width:e,height:t,contentWidth:i,contentHeight:o,paddingWidth:s,paddingHeight:c}}(),{ref:i}=r,a=ey(r,["ref"]),{updateSize:o,sizes:l}=j(),{id:s,siblings:u,parentLayout:c}=t,{width:h,height:f,paddingWidth:m,paddingHeight:v,contentWidth:p,contentHeight:_}=a;(0,g.useEffect)(()=>{o({id:t.id,width:h,height:f,paddingWidth:m,paddingHeight:v,contentWidth:p,contentHeight:_})},[t.id,h,f,m,v,p,_,o]);let E=(0,g.useMemo)(()=>{let e=(e=0,n)=>{var t,r,i,a;return c===d.Row?e+(null!==(r=null===(t=l[n.id])||void 0===t?void 0:t.contentWidth)&&void 0!==r?r:0):e+(null!==(a=null===(i=l[n.id])||void 0===i?void 0:i.contentHeight)&&void 0!==a?a:0)},r=eN({width:t.width,height:t.height,parentLayout:c,option:"fill"});if(r){let t=u.filter(({width:e,height:n})=>!eN({width:e,height:n,parentLayout:c,option:"fill"})).reduce(e,0),r=u.filter(({width:e,height:n})=>eN({width:e,height:n,parentLayout:c,option:"fill"})).length,i=c===d.Row?{maxWidth:`calc((100% - ${t}px) / ${r})`}:{maxHeight:`calc((100% - ${t}px) / ${r})`};return Object.assign(Object.assign(Object.assign({},n),i),0==h&&{height:0})}{let t=u.findIndex(e=>e.id===s),r=u.slice(0,t).filter(({width:e,height:n})=>eN({width:e,height:n,parentLayout:c,option:"wrap"})).reduce(e,0);return Object.assign(Object.assign(Object.assign({},n),0===h&&{height:0}),c===d.Row?{maxWidth:`calc(100% - ${r}px)`}:{maxHeight:`calc(100% - ${r}px)`})}},[t.width,t.height,c,l,u,n,h,s]);return{recalculatedStyle:E,elemRef:i}}({style:r,props:n}),{message:_,handleWebAction:E,handleCustomAction:b,handlePredefinedAction:C}
13=eE(),y=(null===(i=n.viewStyle)||void 0===i?void 0:i.borderWidth)?"sb-message-template__border":"",N={paddingBlockStart:null===(o=null===(a=n.viewStyle)||void 0===a?void 0:a.padding)||void 0===o?void 0:o.top,paddingBlockEnd:null===(s=null===(l=n.viewStyle)||void 0===l?void 0:l.padding)||void 0===s?void 0:s.bottom,paddingInlineStart:null===(h=null===(u=n.viewStyle)||void 0===u?void 0:u.padding)||void 0===h?void 0:h.left,paddingInlineEnd:null===(m=null===(f=n.viewStyle)||void 0===f?void 0:f.padding)||void 0===m?void 0:m.right},T=e=>{var t,r,i,a,o,l,s;(null===(t=n.action)||void 0===t?void 0:t.type)==="web"?E?E(e,n.action,_):null===(i=null==window?void 0:window.open(eA(null===(r=null==n?void 0:n.action)||void 0===r?void 0:r.data),"_blank","noopener noreferrer"))||void 0===i||i.focus():(null===(a=n.action)||void 0===a?void 0:a.type)==="custom"?b?b(e,n.action,_):null===(l=null==window?void 0:window.open(eA(null===(o=null==n?void 0:n.action)||void 0===o?void 0:o.data),"_blank","noopener noreferrer"))||void 0===l||l.focus():(null===(s=n.action)||void 0===s?void 0:s.type)==="uikit"&&(null==C||C(e,n.action,_))};if(n.type===c.TextButton)return g.createElement("button",{className:eM(t,y),"data-sb-template-id":n.elementId,style:Object.assign(Object.assign({},r),N),onClick:T},e);let{display:S,flexDirection:A,justifyContent:I,alignItems:M,objectFit:O}=v,R=eT(v,["display","flexDirection","justifyContent","alignItems","objectFit"]);return g.createElement("div",{ref:p,className:eM(t,y,n.action&&"sb-message-template__action"),"data-sb-template-id":n.elementId,style:R,onClick:T},g.createElement("div",{style:Object.assign({display:S,flexDirection:A,justifyContent:I,alignItems:M,objectFit:O,width:"100%",height:"100%"},N)},e))};function eM(...e){return e.filter(e=>!!e).join(" ")}function eO(e){let{text:n,maxTextLines:t}=e,r=function(e){var n,t,r,i;let a=null===(n=null==e?void 0:e.height)||void 0===n?void 0:n.type,o=null===(t=null==e?void 0:e.width)||void 0===t?void 0:t.type,l="flex"===a&&(null===(r=null==e?void 0:e.height)||void 0===r?void 0:r.value)===f.FillParent||"flex"===o&&(null===(i=null==e?void 0:e.width)||void 0===i?void 0:i.value)===f.FillParent;return"fixed"===a||"fixed"===o||l}(e),i="number"==typeof t&&t>0,a=n.split("\n").map((e,n)=>g.createElement(g.Fragment,{key:n},e,g.createElement("br",null)));if(i||r){let e=Object.assign(Object.assign({},(i||r)&&{maxWidth:"100%"}),r&&{maxHeight:"100%",overflow:"hidden"});return g.createElement("div",{style:e},i?g.createElement("div",{style:ev(t)},a):a)}return i?g.createElement("div",{style:ev(t)},a):a}let eR=G({views:{box:e=>g.createElement(eI,{className:"sb-message-template__box",elementId:e.elementId,style:e.parsedProperties,props:e},e.children),text:e=>g.createElement(eI,{className:"sb-message-template__text",elementId:e.elementId,style:e.parsedProperties,props:e},eO(e)),image(e){var n;return g.createElement(eI,{className:"sb-message-template__image-container",elementId:e.elementId,style:e.parsedProperties,props:e},g.createElement(es,{className:"sb-message-template__image",alt:"image",src:e.imageUrl,style:{width:"100%",height:"100%",aspectRatio:"inherit",objectFit:"inherit"},tintColor:null===(n=e.imageStyle)||void 0===n?void 0:n.tintColor,metaData:e.metaData}))},textButton:e=>g.createElement(eI,{className:"sb-message-template__text-button",elementId:e.elementId,style:e.parsedProperties,props:e},eO(Object.assign({maxTextLines:Q.textButton.maxTextLines},e))),imageButton(e){var n;return g.createElement(eI,{className:"sb-message-template__image-container sb-message-template__image-button",elementId:e.elementId,style:e.parsedProperties,props:e},g.createElement(es,{className:"sb-message-template__image",alt:"image-button",src:e.imageUrl,style:{width:"100%",height:"100%",aspectRatio:"inherit",objectFit:"inherit"},tintColor:null===(n=e.imageStyle)||void 0===n?void 0:n.tintColor,metaData:e.metaData}))},carouselView(e){var n,t;return g.createElement(X,{maxChildWidth:null===(n=e.carouselStyle)||void 0===n?void 0:n.maxChildWidth,spacing:null===(t=e.carouselStyle)||void 0===t?void 0:t.spacing,style:e.parsedProperties},e.children)}}}),ew=k({mapBoxProps(e,n){let t=ec();return ed(t,e,n),eh(t,e.layout,e.align),t},mapTextProps(e,n){var t;let r=ec({whiteSpace:"pre-line",wordBreak:"break-word"});return ed(r,e,n),ep(r,e,n),eh(r,d.Row,e.align),!function(e,n=Q.box.align.horizontal){e.textAlign=n}(r,null===(t=e.align)||void 0===t?void 0:t.horizontal),r},mapImageProps(e,n){let t=ec();return ed(t,e,n),ef(t,e.imageStyle),em(t,e),t},mapTextButtonProps(e,n){let t=ec({whiteSpace:"pre-line",alignItems:"center",justifyContent:"center"});return ed(t,e,n),ep(t,e,n),t},mapImageButtonProps(e,n){let t=ec();return ed(t,e,n),ef(t,e.imageStyle),em(t,e),t}
13,mapCarouselProps(e,n){var t,r,i,a,o,l,s,u;let c=ec();return ed(c,e,n),c.paddingBlockStart=null===(r=null===(t=e.viewStyle)||void 0===t?void 0:t.padding)||void 0===r?void 0:r.top,c.paddingBlockEnd=null===(a=null===(i=e.viewStyle)||void 0===i?void 0:i.padding)||void 0===a?void 0:a.bottom,c.paddingInlineStart=null===(l=null===(o=e.viewStyle)||void 0===o?void 0:o.padding)||void 0===l?void 0:l.left,c.paddingInlineEnd=null===(u=null===(s=e.viewStyle)||void 0===s?void 0:s.padding)||void 0===u?void 0:u.right,c}});W({renderer:eR,parser:ew,Container:({children:e,className:n})=>g.createElement("div",{className:`sb-message-template__parent ${n}`,style:{display:"flex",flexDirection:"column",maxWidth:400,marginBlockEnd:24}},e)});var eD=W({parser:ew,renderer:eR,Container:function(e){var n=e.children,t=e.className;return g.createElement("div",{className:["sb-message-template__parent ".concat(t),"sendbird-message-template__root"].join(" ")},n)}}).MessageTemplate;function eL(e){var n=e.templateItems,t=e.templateVersion;return g.createElement(eD,{templateItems:n,templateVersion:t})}},47843:function(e,n,t){"use strict";t.d(n,{G:function(){return C}});var r=t(12394),i=t(67294),a=t(41238),o=t(67315),l=t(7585),s=t(43847),u=t(88006),c=t(49805),d=t(2121),h=t(42443),f=t(32145),m=t(9399),v=t(43822),p=t(1608),g=t(77839),_=t(69392),E=t(21790),b=t(2041),C=function(e){var n=e.channel,t=e.tabIndex,C=e.isTyping,y=e.isSelected,N=e.channelName,T=e.isMessageStatusEnabled,S=void 0===T||T,A=e.onClick,I=void 0===A?u.n:A,M=e.onLeaveChannel,O=void 0===M?function(){return Promise.resolve()}
13:M,R=e.renderChannelAction,w=(0,a.A)().config,D=w.theme,L=w.userId,P=(0,l.u)(),U=P.dateLocale,x=P.stringSet,k=(0,s.u)().isMobile,F=w.groupChannel.enableMention,G=(0,d.a)(n,x),B=w.groupChannel.enableMarkdownForUserMessage?(0,b.g)(G):G,H=(0,i.useState)(!1),V=H[0],j=H[1],z=(0,o.u)({onLongPress:function(){k&&j(!0)},onClick:I},{delay:1e3});return i.createElement(i.Fragment,null,i.createElement("div",(0,r._)({className:["sendbird-channel-preview",y?"sendbird-channel-preview--active":""].join(" "),role:"link",tabIndex:t},k?(0,r._)({},z):{onClick:I}),i.createElement("div",{className:"sendbird-channel-preview__avatar"},i.createElement(m.Z,{channel:n,userId:L,theme:D})),i.createElement("div",{className:"sendbird-channel-preview__content"},i.createElement("div",{className:"sendbird-channel-preview__content__upper"},i.createElement("div",{className:"sendbird-channel-preview__content__upper__header"},(n.isBroadcast||!1)&&i.createElement("div",{className:"sendbird-channel-preview__content__upper__header__broadcast-icon"},i.createElement(v.ZP,{type:v.Qy.BROADCAST,fillColor:v.zo.SECONDARY,height:"16px",width:"16px"})),i.createElement(p.L,{className:"sendbird-channel-preview__content__upper__header__channel-name",testID:"sendbird-channel-preview__content__upper__header__channel-name",type:p.a.SUBTITLE_2,color:p.b.ONBACKGROUND_1},N),i.createElement(p.L,{className:"sendbird-channel-preview__content__upper__header__total-members",type:p.a.CAPTION_2,color:p.b.ONBACKGROUND_2},(0,d.b)(n)),n.isFrozen&&i.createElement("div",{title:"Frozen",className:"sendbird-channel-preview__content__upper__header__frozen-icon"},i.createElement(v.ZP,{type:v.Qy.FREEZE,fillColor:v.zo.PRIMARY,height:12,width:12}))),!n.isEphemeral&&S&&i.createElement(d.M,{className:"sendbird-channel-preview__content__upper__last-message-at",channel:n,message:n.lastMessage,isDateSeparatorConsidered:!1}),!n.isEphemeral&&!S&&i.createElement(p.L,{className:"sendbird-channel-preview__content__upper__last-message-at",type:p.a.CAPTION_3,color:p.b.ONBACKGROUND_2},(0,d.c)({channel:n,locale:U,stringSet:x}))),i.createElement("div",{className:"sendbird-channel-preview__content__lower"},i.createElement(p.L,{className:"sendbird-channel-preview__content__lower__last-message",type:p.a.BODY_2,color:p.b.ONBACKGROUND_3},C&&i.createElement(h.Jo,{members:n.getTypingUsers()}),!C&&!(0,c.i)(n.lastMessage)&&B,!C&&(0,c.i)(n.lastMessage)&&x.VOICE_MESSAGE),!y&&!n.isEphemeral&&i.createElement("div",{className:"sendbird-channel-preview__content__lower__unread-message-count"},F&&n.unreadMentionCount>0?i.createElement(g.Z,{className:"sendbird-channel-preview__content__lower__unread-message-count__mention",color:"purple"},"@"):null,(0,d.d)(n)?i.createElement(f.Z,{count:(0,d.d)(n)}):null))),!k&&i.createElement("div",{className:"sendbird-channel-preview__action"},R({channel:n}))),V&&k&&i.createElement(_.M,{className:"sendbird-channel-preview__leave--mobile",titleText:N,hideFooter:!0,isCloseOnClickOutside:!0,onCancel:function(){return j(!1)}},i.createElement(E.Z,{onClick:function(){O(),j(!1)},className:"sendbird-channel-preview__leave-label--mobile"},i.createElement(p.L,{type:p.a.SUBTITLE_1,color:p.b.ONBACKGROUND_1},x.CHANNEL_PREVIEW_MOBILE_LEAVE))))}},34919:function(e,n,t){"use strict";t.d(n,{u:function(){return a}});var r=t(67294),i=t(34420);function a(e,n,t){void 0===t&&(t={leading:!0,trailing:!1});var a=(0,r.useRef)(null),o=(0,r.useRef)(null);return(0,r.useEffect)(function(){return function(){a.current&&clearTimeout(a.current)}},[]),(0,i.zS)(function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(a.current){o.current=r;return}t.leading?e.apply(void 0,r):o.current=r;var l=function(){t.trailing&&o.current?(e.apply(void 0,o.current),o.current=null,a.current=setTimeout(l,n)):a.current=null};a.current=setTimeout(l,n)})}},14779:function(e,n,t){"use strict";t.d(n,{u:function(){return a}});var r=t(67294),i="useToggleReactionCallback:";function a(e,n){return(0,r.useCallback)(function(t,r,a){if(!e){null==n||n.warning("".concat(i," currentChannel doesn't exist"),e);return}a?e.deleteReaction(t,r).then(function(e){null==n||n.info("".concat(i," Delete reaction success"),e)}
13).catch(function(e){null==n||n.warning("".concat(i," Delete reaction failed"),e)}):e.addReaction(t,r).then(function(e){null==n||n.info("".concat(i," Add reaction success"),e)}).catch(function(e){null==n||n.warning("".concat(i," Add reaction failed"),e)})},[e])}},56465:function(e,n,t){"use strict";t.d(n,{O:function(){return r}});var r="sendbird-og-message-item-body__text-bubble"},69561:function(e,n,t){"use strict";t.d(n,{B:function(){return p},C:function(){return A},E:function(){return T},M:function(){return f},a:function(){return v},b:function(){return E},c:function(){return C},d:function(){return y},e:function(){return g},f:function(){return b},g:function(){return _},i:function(){return S},j:function(){return N},u:function(){return m}});var r=t(12394),i=t(67294),a=t(73935),o=t(88006),l=t(78614);t(71091),t(29515),t(49805),t(7585);var s=t(1608),u="sendbird-app__layout",c=function(e){function n(n){var t=e.call(this,n)||this;return t.menuRef=i.createRef(),t.setupEvents=function(){var e=t.props.closeDropdown,n=t.menuRef,r=function(t){var r,i;(null==n?void 0:n.current)&&!(null===(i=null===(r=null==n?void 0:n.current)||void 0===r?void 0:r.contains)||void 0===i?void 0:i.call(r,t.target))&&(null==e||e())};t.setState({handleClickOutside:r}),document.addEventListener("mousedown",r)},t.cleanUpEvents=function(){var e=t.state.handleClickOutside;document.removeEventListener("mousedown",e)},t.getMenuPosition=function(){var e,n,r,i=t.props,a=i.parentRef,o=i.openLeft,l=document.getElementById(u),s=(null===(e=null==l?void 0:l.getBoundingClientRect)||void 0===e?void 0:e.call(l))||{top:0,left:0,width:window.innerWidth,height:window.innerHeight},c=null===(r=null===(n=null==a?void 0:a.current)||void 0===n?void 0:n.getBoundingClientRect)||void 0===r?void 0:r.call(n),d=((null==c?void 0:c.x)||(null==c?void 0:c.left)||0)-s.left,h=((null==c?void 0:c.y)||(null==c?void 0:c.top)||0)-s.top,f={top:h,left:d};if(!t.menuRef.current)return f;var m=t.menuRef.current.getBoundingClientRect();if(h+m.height+60>s.height&&(f.top-=m.height),d+m.width>s.width&&!o&&(f.left-=m.width),f.top<0&&(f.top=m.height<s.height?(s.height-m.height)/2:0),f.top+=32,o){var v=Number.isNaN(m.width-30)?108:m.width-30;f.left-=v}return f.left<0&&(f.left=m.width<s.width?(s.width-m.width)/2:0),t.setState({menuStyle:f}),f},t.state={menuStyle:{top:0,left:0},handleClickOutside:function(){}},t}return(0,r.e)(n,e),n.prototype.componentDidMount=function(){this.setupEvents(),this.getMenuPosition()},n.prototype.componentWillUnmount=function(){this.cleanUpEvents()},n.prototype.render=function(){var e=document.getElementById(y);if(!e)return i.createElement(i.Fragment,null);var n=this.state.menuStyle,t=this.props,l=t.children,s=t.style,u=t.className,c=void 0===u?"":u,d=t.testID,h=t.id;return(0,a.createPortal)(i.createElement("div",{className:(0,o.c)(g,c),"data-testid":d,id:h},i.createElement("div",{className:"sendbird-dropdown__menu-backdrop"}),i.createElement("ul",{className:"".concat(c," sendbird-dropdown__menu"),ref:this.menuRef,style:(0,r._)({display:"inline-block",position:"fixed",left:"".concat(Math.round(n.left),"px"),top:"".concat(Math.round(n.top),"px")},s),"data-testid":"sendbird-dropdown-menu"},l)),e)},n}(i.Component),d={x:0,y:0,left:0,top:0,height:0},h=(0,i.createContext)(void 0),f=function(e){var n=e.children,t=e.value;return i.createElement(h.Provider,{value:t},n)},m=function(){var e=(0,i.useContext)(h);if(!e)throw Error("useMessageMenuContext must be used within a MessageMenuProvider.");return e},v=function(e){var n=e.className,t=e.disabled,r=e.tabIndex,a=e.testID,l=e.onClick,u=e.children,c=function(e){!t&&l&&l(e)};return i.createElement("li",{className:(0,o.c)("sendbird-menu-item",n),role:"menuitem","aria-disabled":t,"data-testid":a,tabIndex:void 0===r?0:r,onClick:c,onKeyDown:function(e){"Enter"===e.code&&c(e)}},i.createElement(s.L,{className:"sendbird-menu-item__text",type:s.a.SUBTITLE_2,color:t?s.b.ONBACKGROUND_4:s.b.ONBACKGROUND_1},u))},p=function(e){var n=e.className,t=e.disabled,r=e.tabIndex,a=e.testID,l=e.onClick,s=e.children;return i.createElement("div",{className:(0,o.c)("sendbird-message__bottomsheet--action",n),role:"menuitem",tabIndex:void 0===r?0:r,"aria-disabled":void 0!==t&&t,onClick:l,"data-testid":a},s)},g="sendbird-observing-message-menu",_=function(e){return"m_".concat(e)},E=c,b=function(e){var n=e.id,t=e.children,r=e.parentRef,o=e.parentContainRef,s=e.spaceFromTrigger,c=void 0===s?{x:0,y:0}:s,h=e.closeDropdown,f=(0,i.useState)({left:0,top:0}),m=f[0],v=f[1],p=(0,i.useRef)(null);(0,i.useEffect)(function(){return o&&(null==o?void 0:o.current)&&o.current.classList.add("sendbird-reactions--pressed"),function(){o&&(null==o?void 0:o.current)&&o.current.classList.remove("sendbird-reactions--pressed")}},[]),(0,i.useEffect)(function(){var e=function(e){var n,t;(null==p?void 0:p.current)&&!(null===(t=null===(n=null==p?void 0:p.current)||void 0===n?void 0:n.contains)||void 0===t?void 0:t.call(n,e.target))&&h()};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[]),(0,i.useEffect)(function(){var e,n,t,i,a=(null==c?void 0:c.x)||0,o=(null==c?void 0:c.y)||0,l=document.getElementById(u),s=(null===(e=null==l?void 0:l.getBoundingClientRect)||void 0===e?void 0:e.call(l))||{top:0,left:0,width:window.innerWidth,height:window.innerHeight},h=null!==(t=null===(n=null==r?void 0:r.current)||void 0===n?void 0:n.getBoundingClientRect())&&void 0!==t?t:d,f=((null==h?void 0:h.x)||(null==h?void 0:h.left)||0)-s.left,m={top:((null==h?void 0:h.y)||(null==h?void 0:h.top)||0)-s.top,left
13:f};if(null==p?void 0:p.current){var g=null===(i=null==p?void 0:p.current)||void 0===i?void 0:i.getBoundingClientRect();m.top<g.height?(m.top+=h.height,m.top+=o):(m.top-=g.height,m.top-=o),m.left-=g.width/2,m.left+=h.height/2-2,m.left+=a;var _=s.width-g.width;_<m.left&&(m.left=_),m.left<0&&(m.left=0),v(m)}else v(m)},[]);var _=document.getElementById(T);return _?(0,a.createPortal)(i.createElement("div",{className:g,id:n},i.createElement("div",{className:"sendbird-dropdown__menu-backdrop"}),i.createElement("ul",{className:"sendbird-dropdown__reaction-bar","data-testid":"sendbird-dropdown__reaction-bar",ref:p,style:{display:"inline-block",position:"fixed",left:"".concat(Math.round(m.left),"px"),top:"".concat(Math.round(m.top),"px")}},i.createElement(l.Z,{className:"sendbird-dropdown__reaction-bar__row",maxItemCount:8,itemWidth:44,itemHeight:40},t))),_):null},C=function(e){var n=e.className,t=void 0===n?"":n,a=e.children,l=e.onClick,s=e.disable,u=void 0!==s&&s,c=e.dataSbId,d=e.testID;return i.createElement(v,{className:o.c.apply(void 0,(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!1),["sendbird-dropdown__menu-item",u?"disable":""],!1)),disabled:u,testID:null!=d?d:void 0===c?"":c,onClick:l},a)},y="sendbird-dropdown-portal",N=function(){return i.createElement("div",{id:y,className:y})},T="sendbird-emoji-list-portal",S=function(){return i.createElement("div",{id:T})};function A(e){var n=e.menuTrigger,t=e.menuItems,r=e.isOpen,a=e.onClick,o=(0,i.useState)(!1),l=o[0],s=o[1];return i.createElement("div",{className:"sendbird-context-menu",onClick:a},null==n?void 0:n(function(){return s(!l)}),(l||r)&&t(function(){return s(!1)}))}},72127:function(e,n,t){"use strict";function r(e){return(r="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 i(e,n){if(n.length<e)throw TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+n.length+" present")}function a(e){i(1,arguments);var n=Object.prototype.toString.call(e);return e instanceof Date||"object"===r(e)&&"[object Date]"===n?new Date(e.getTime()):"number"==typeof e||"[object Number]"===n?new Date(e):(("string"==typeof e||"[object String]"===n)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}t.d(n,{_:function(){return r},r:function(){return i},t:function(){return a}})},54627:function(e,n,t){"use strict";t.d(n,{g:function(){return i}});var r=t(1608),i=function(e,n,t){var i,a=t||r.c;return(null==e?void 0:e.name)||(null==e?void 0:e.members)?(null==e?void 0:e.name)&&"Group Channel"!==e.name?e.name:(null===(i=null==e?void 0:e.members)||void 0===i?void 0:i.length)===1?a.NO_MEMBERS:null==e?void 0:e.members.filter(function(e){return e.userId!==n}).map(function(e){return e.nickname||a.NO_NAME}).join(", "):a.NO_TITLE}},59069:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});var r=t(67294),i=t(29515),a=t(43822),o=t(7217),l=t(41238),s=function(e){var n=e.createChannelVisible,t=e.onChangeCreateChannelVisible,s=e.onBeforeCreateChannel,u=e.onCreateChannelClick,c=e.onChannelCreated,d=(0,l.A)().config;return r.createElement(r.Fragment,null,r.createElement(i.Z,{height:"32px",width:"32px",disabled:!d.isOnline,onClick:function(){return t(!0)}},r.createElement(a.ZP,{type:a.Qy.CREATE,fillColor:a.zo.PRIMARY,width:"24px",height:"24px"})),n&&r.createElement(o.Z,{onCancel:function(){return t(!1)},onChannelCreated:function(e){null==c||c(e),t(!1)},onBeforeCreateChannel:s,onCreateChannelClick:u}))}},80725:function(e,n,t){"use strict";t.d(n,{F:function(){return i},M:function(){return S},O:function(){return v},R:function(){return r},S:function(){return d},a:function(){return a},b:function(){return o},c:function(){return l},d:function(){return u},e:function(){return s},f:function(){return c},g:function(){return h},h:function(){return f},i:function(){return b},j:function(){return C},k:function(){return p},l:function(){return g},m:function(){return m},n:function(){return y},o:function(){return _},p:function(){return E},q:function(){return T},r:function(){return N},s:function(){return A},t:function(){return I},u:function(){return M}});var r="RESET_MESSAGES",i="FETCH_INITIAL_MESSAGES_START",a="FETCH_INITIAL_MESSAGES_SUCCESS",o="FETCH_INITIAL_MESSAGES_FAILURE",l="FETCH_PREV_MESSAGES_SUCCESS",s="FETCH_PREV_MESSAGES_FAILURE",u="FETCH_NEXT_MESSAGES_SUCCESS",c="FETCH_NEXT_MESSAGES_FAILURE",d="SEND_MESSAGE_START",h="SEND_MESSAGE_SUCCESS",f="SEND_MESSAGE_FAILURE",m="RESEND_MESSAGE_START",v="ON_MESSAGE_RECEIVED",p="ON_MESSAGE_UPDATED",g="ON_MESSAGE_THREAD_INFO_UPDATED",_="ON_MESSAGE_DELETED",E="ON_MESSAGE_DELETED_BY_REQ_ID",b="SET_CURRENT_CHANNEL",C="SET_CHANNEL_INVALID",y="MARK_AS_READ",N="ON_REACTION_UPDATED",T="SET_EMOJI_CONTAINER",S="MESSAGE_LIST_PARAMS_CHANGED",A="ON_FILE_INFO_UPLOADED",I="ON_TYPING_STATUS_UPDATED",M=Object.freeze({__proto__:null,FETCH_INITIAL_MESSAGES_FAILURE:o,FETCH_INITIAL_MESSAGES_START:i,FETCH_INITIAL_MESSAGES_SUCCESS:a,FETCH_NEXT_MESSAGES_FAILURE:c,FETCH_NEXT_MESSAGES_SUCCESS:u,FETCH_PREV_MESSAGES_FAILURE:s,FETCH_PREV_MESSAGES_SUCCESS:l,MARK_AS_READ:y,MESSAGE_LIST_PARAMS_CHANGED:S,ON_FILE_INFO_UPLOADED:A,ON_MESSAGE_DELETED:_,ON_MESSAGE_DELETED_BY_REQ_ID:E,ON_MESSAGE_RECEIVED:v,ON_MESSAGE_THREAD_INFO_UPDATED:g,ON_MESSAGE_UPDATED:p,ON_REACTION_UPDATED:N,ON_TYPING_STATUS_UPDATED:I,RESEND_MESSAGE_START:m,RESET_MESSAGES:r,SEND_MESSAGE_FAILURE:f,SEND_MESSAGE_START:d,SEND_MESSAGE_SUCCESS:h,SET_CHANNEL_INVALID:C,SET_CURRENT_CHANNEL:b,SET_EMOJI_CONTAINER:T})},95988:function(e,n,t){"use strict";t.d(n,{u:function(){return a}});var r=t(67294),i=t(34420);function a(e,n){return(0,r.useLayoutEffect)(function(){var n;null===(n=e.current)||void 0===n||n.focus()},[e.current]),(0,i.zS)(function(e){var t=n[e.key];null==t||t(e),e.stopPropagation()})}},26001:function(e,n,t){"use strict";t.d(n,{M:function(){return S},V:function(){return N}});var r=t(12394),i=t(67294),a=t(16267),o=t(41238),l=t(7585),s=t(85562),u=t(66421),c=t(67840),d=t(32177),h=t(19515),f=t(74535),m=t(69392),v=t(88569),p=t(93122),g=t(56299),_=t(65134),E=t(43847),b=t(58184),C=t(49805);t(1608);var y=t(97047),N=function(e){var n=e.channel,t=e.onCancelClick,r=e.onSubmitClick,s=(0,i.useRef)((0,g.u)()).current,u=(0,i.useState)(null),c=u[0],_=u[1],E=(0,i.useState)(f.V.READY_TO_RECORD),b=E[0],C=E[1],y=(0,i.useState)(!1),N=y[0],T=y[1],S=(0,i.useState)(!1),A=S[0],I=S[1],M=(0,i.useState)(!1),O
13=M[0],R=M[1],w=(0,l.u)().stringSet,D=(0,o.A)().config,L=(0,h.f)({onRecordingStarted:function(){C(f.V.RECORDING)},onRecordingEnded:function(e){_(e)}}),P=L.start,U=L.stop,x=L.cancel,k=L.recordingTime,F=L.recordingStatus,G=L.recordingLimit,B=(0,d.O)({channelUrl:null==n?void 0:n.url,key:s,audioFile:null!=c?c:void 0}),H=B.play,V=B.pause,j=B.playbackTime,z=B.playingStatus,K=B.stop;return(0,i.useEffect)(function(){(0,a.i)(n)||(0,a.a)(n)?I(!0):I(!1)},[null==n?void 0:n.myRole,null==n?void 0:n.isFrozen,null==n?void 0:n.myMutedState]),(0,i.useEffect)(function(){N&&c&&(null==r||r(c,k),T(!1),_(null))},[N,c,k]),(0,i.useEffect)(function(){c&&(k<D.voiceRecord.minRecordingTime?(C(f.V.READY_TO_RECORD),_(null)):z===p.V.PLAYING?C(f.V.PLAYING):C(f.V.READY_TO_PLAY))},[c,k,z]),i.createElement("div",{className:"sendbird-voice-message-input-wrapper"},i.createElement(f.a,{currentValue:F===h.s.COMPLETED?j:k,maximumValue:F===h.s.COMPLETED?k:G,currentType:b,onCancelClick:function(){null==t||t(),x(),K()},onSubmitClick:function(){A?(R(!0),C(f.V.READY_TO_RECORD)):(U(),V(),T(!0))},onControlClick:function(e){switch(e){case f.V.READY_TO_RECORD:K(),P();break;case f.V.RECORDING:k>=D.voiceRecord.minRecordingTime&&!A?U():A?(x(),R(!0),C(f.V.READY_TO_RECORD)):(x(),C(f.V.READY_TO_RECORD));break;case f.V.READY_TO_PLAY:H();break;case f.V.PLAYING:V()}}}),O&&i.createElement(m.M,{className:"sendbird-voice-message-input-wrapper-alert",titleText:(0,a.a)(n)?w.MODAL__VOICE_MESSAGE_INPUT_DISABLED__TITLE_MUTED:w.MODAL__VOICE_MESSAGE_INPUT_DISABLED__TITLE_FROZEN,hideFooter:!0,isCloseOnClickOutside:!0,onClose:function(){R(!1),null==t||t()}},i.createElement("div",{className:"sendbird-voice-message-input-wrapper-alert__body"},i.createElement(v.ZP,{className:"sendbird-voice-message-input-wrapper-alert__body__ok-button",type:v.qh.PRIMARY,size:v.Ph.BIG,onClick:function(){R(!1),null==t||t()}},w.BUTTON__OK))))},T=function(e,n){var t=e.sendFileMessage,a=e.sendMultipleFilesMessage,s=e.quoteMessage,u=n.logger,c=(0,l.u)().stringSet,d=(0,o.A)().config,h=d.imageCompression,f=null==d?void 0:d.uikitUploadSizeLimit,p=null==d?void 0:d.uikitMultipleFilesMessageLimit,g=(0,m.b)().openModal;return(0,i.useCallback)(function(e){return(0,r.a)(void 0,void 0,void 0,function(){var n,o,l;return(0,r.b)(this,function(r){switch(r.label){case 0:if(0===e.length)return u.warning("Channel|useHandleUploadFiles: given file list is empty.",{files:e}),[2];if(e.length>p)return u.info("Channel|useHandleUploadFiles: Cannot upload files more than ".concat(p)),g({modalProps:{titleText:c.FILE_UPLOAD_NOTIFICATION__COUNT_LIMIT.replace("%d","".concat(f)),hideFooter:!0},childElement:function(e){var n=e.closeModal;return i.createElement(m.c,{type:v.qh.PRIMARY,submitText:c.BUTTON__OK,hideCancelButton:!0,onCancel:n,onSubmit:n})}}),[2];if(e.some(function(e){return e.size>f}))return u.info("Channel|useHandleUploadFiles: Cannot upload file size exceeding ".concat(f)),g({modalProps:{titleText:c.FILE_UPLOAD_NOTIFICATION__SIZE_LIMIT.replace("%d","".concat(Math.floor(f/1048576))),hideFooter:!0},childElement:function(e){var n=e.closeModal;return i.createElement(m.c,{type:v.qh.PRIMARY,submitText:c.BUTTON__OK,hideCancelButton:!0,onCancel:n,onSubmit:n})}}),[2];return[4,(0,y.c)({files:e,imageCompression:h,logger:u})];case 1:if(1===(n=r.sent().compressedFiles).length)return u.info("Channel|useHandleUploadFiles: sending one file."),[2,t({file:n[0],parentMessageId:null==s?void 0:s.messageId})];if(n.length>1)return u.info("Channel|useHandleUploadFiles: sending multiple files."),o=[],l=[],n.forEach(function(e){(0,C.j)(e.type)?o.push(e):l.push(e)}),[2,l.reduce(function(e,n){return e.then(function(){return t({file:n,parentMessageId:null==s?void 0:s.messageId})})},0===o.length?Promise.resolve():1===o.length?t({file:o[0]}):a({fileInfoList:o.map(function(e){return{file:e,fileName:e.name,fileSize:e.size,mimeType:e.type}}),parentMessageId:null==s?void 0:s.messageId}))];return[2]}})})},[t,a,s])},S=i.forwardRef(function(e,n){var t,d=e.currentChannel,h=e.messages,f=e.loading,m=e.quoteMessage,v=e.setQuoteMessage,p=e.messageInputRef,g=e.sendUserMessage,C=e.sendFileMessage,y=e.sendVoiceMessage,S=e.sendMultipleFilesMessage,A=e.renderUserMentionItem,I=e.renderFileUploadIcon,M=e.renderVoiceMessageIcon,O=e.renderSendMessageIcon,R=e.acceptableMimeTypes,w=e.disabled,D=(0,l.u)().stringSet,L=(0,E.u)().isMobile,P=(0,o.A)(),U=P.stores,x=P.config,k=x.isOnline,F=x.userMention,G=x.logger,B=x.groupChannel,H=U.sdkStore.sdk,V=F.maxMentionCount,j=F.maxSuggestionCount,z=null==d?void 0:d.isBroadcast,K=(null==d?void 0:d.myRole)==="operator",Y=null!==(t=e.isMultipleFilesMessageEnabled)&&void 0!==t?t:x.isMultipleFilesMessageEnabled,Z=B.enableMention,Q=B.enableVoiceMessage,W=(0,i.useState)(""),q=W[0],X=W[1],$=(0,i.useState)([]),J=$[0],ee=$[1],en=(0,i.useState)([]),et=en[0],er=en[1],ei=(0,i.useState)(null),ea=ei[0],eo=ei[1],el=(0,i.useState)([]),es=el[0],eu=el[1],ec=(0,i.useState)(null),ed=ec[0],eh=ec[1],ef=(0,i.useState)(!1),em=ef[0],ev=ef[1],ep=f||!d||!H||!H.isCacheEnabled&&!k||(0,a.i)(d)||(0,a.a)(d)||(0,a.b)(d,x.groupChannel.enableSuggestedReplies)||(0,a.c)(h,x.groupChannel.enableFormTypeMessage)||w,eg=!ep&&Z&&q.length>0&&!z,e_=(0,u.X)({ref:n||p},{logger:G}),eE=(null==e_?void 0:e_.length)<V;(0,i.useEffect)(function(){X(""),ee([]),er([]),eo(null),eu([]),eh(null),ev(!1)},[null==d?void 0:d.url]),(0,i.useEffect)(function(){ee(J.filter(function(e){var n=e.userId,t=et.indexOf(n);return!(t<0)&&(et.splice(t,1),!0)}))},[et]);var eb=T({sendFileMessage:C,sendMultipleFilesMessage:S,quoteMessage:null!=m?m:void 0},{logger:G});return z&&!K?null:i.createElement("div",{className:em?"sendbird-message-input-wrapper--voice-message":"sendbird-message-input-wrapper"},eg&&i.createElement(s.u,{currentChannel:d,targetNickname:q,inputEvent:null!=ed?ed:void 0,renderUserMentionItem:A,onUserItemClick:function(e){e&&ee((0,r.c)((0,r.c)([],J,!0),[e],!1)),X(""),eo(e),eh(null)},onFocusItemChange:function(){eh(null)},onFetchUsers:function(e){eu(e)},ableAddMention:eE,maxMentionCount:V,maxSuggestionCount:j}),m&&i.createElement("div",{className:"sendbird-message-input-wrapper__quote-message-input"},i.createElement(c.Z,{replyingMessage:m,onClose:function(){return v(null)}})),em?i.createElement(N,{channel:null!=d?d:void 0,onSubmitClick:function(e,n){y({file:e,parentMessageId:null==m?void 0:m.messageId},n),v(null),ev(!1)},onCancelClick:function(){ev(!1)}}):i.createElement(_.Z,{className:"sendbird-message-input-wrapper__message-input",channel:d,channelUrl:null==d?void 0:d.url,isMobile:L,acceptableMimeTypes:R,mentionSelectedUser:ea,isMentionEnabled:Z,isVoiceMessageEnabled:Q,isSelectingMultipleFilesEnabled:Y,onVoiceMessageIconClick:function(){ev(!0)},setMentionedUsers:ee,placeholder:m&&D.MESSAGE_INPUT__QUOTE_REPLY__PLACE_HOLDER||(0,a.i)(d)&&D.MESSAGE_INPUT__PLACE_HOLDER__FROZEN||(0,a.a)(d)&&(L?D.MESSAGE_INPUT__PLACE_HOLDER__MUTED_SHORT:D.MESSAGE_INPUT__PLACE_HOLDER__MUTED)||(0,a.b)(d,x.groupChannel.enableSuggestedReplies)&&D.MESSAGE_INPUT__PLACE_HOLDER__SUGGESTED_REPLIES||(0,a.c)(h,x.groupChannel.enableFormTypeMessage)&&D.MESSAGE_INPUT__PLACE_HOLDER__MESSAGE_FORM||w&&D.MESSAGE_INPUT__PLACE_HOLDER__DISABLED||void 0,ref:n||p,disabled:ep,renderFileUploadIcon:I,renderSendMessageIcon:O,renderVoiceMessageIcon:M,onStartTyping:function(){null==d||d.startTyping()},onSendMessage:function(e){var n;g({message:e.message,mentionedUsers:J,mentionedMessageTemplate:e.mentionTemplate,parentMessageId:null==m?void 0:m.messageId}),X(""),ee([]),v(null),null===(n=null==d?void 0:d.endTyping)||void 0===n||n.call(d)},onFileUpload:function(e){eb(e),v(null)},onUserMentioned:function(e){(null==ea?void 0:ea.userId)===(null==e?void 0:e.userId)&&(eo(null),X(""))},onMentionStringChange:function(e){X(e)},onMentionedUserIdsUpdated:function(e){er(e)},onKeyDown:function(e){return!!eg&&(null==es?void 0:es.length)>0&&(e.key===b.M.Enter&&!!eE||e.key===b.M.ArrowUp||e.key===b.M.ArrowDown)&&(eh(e),!0)}}))})},37111:function(e,n,t){"use strict";t.d(n,{a:function(){return i},b:function(){return o},c:function(){return s},g:function(){return l}});var r=t(49805);function i(e){return(0,r.K)(e).when(r.b,function(){var n;return null!==(n=null==e?void 0:e.type)&&void 0!==n?n:""}).when(r.c,function(){var n,t;return null!==(t=null===(n=a(e))||void 0===n?void 0:n.mimeType)&&void 0!==t?t:""}).otherwise(function(){return""})}function a(e){var n=e.fileInfoList;return n.length>0?n[0]:null}function o(e){return(0,r.K)(e).when(r.b,function(){var n;return null!==(n=null==e?void 0:e.name)&&void 0!==n?n:""}).when(r.c,function(){var n,t;return null!==(t=null===(n=a(e))||void 0===n?void 0:n.fileName)&&void 0!==t?t:""}).otherwise(function(){return""})}function l(e){return(0,r.K)(e).when(r.b,function(){var n;return null!==(n=null==e?void 0:e.url)&&void 0!==n?n:""}).when(r.c,function(){var n,t;return null!==(t=null===(n=a(e))||void 0===n?void 0:n.url)&&void 0!==t?t:""}).otherwise(function(){return""})}function s(e){var n=(0,r.K)(e).when(r.b,function(){return e.thumbnails}).when(r.c,function(){var n,t;return null!==(t=null===(n=a(e))||void 0===n?void 0:n.thumbnails)&&void 0!==t?t:[]}).otherwise(function(){return[]});return n&&n.length>0?n[0].url:""}},46345:function(e,n,t){"use strict";t.d(n,{C:function(){return u},a:function(){return i},u:function(){return c}});var r,i,a=t(67294),o=t(22284),l=t(41238);(r=i||(i={})).GROUP="group",r.SUPERGROUP="supergroup",r.BROADCAST="broadcast";var s=a.createContext(null),u=function(e){var n,t=e.children,r=e.onCreateChannelClick,u=e.onBeforeCreateChannel,c=e.onCh
13annelCreated,d=e.userListQuery,h=e.onCreateChannel,f=e.overrideInviteUser,m=(0,l.A)(),v=null!=d?d:null===(n=null==m?void 0:m.config)||void 0===n?void 0:n.userListQuery,p=(0,a.useState)(0),g=p[0],_=p[1],E=(0,a.useState)(i.GROUP),b=E[0],C=E[1];return a.createElement(s.Provider,{value:{sdk:m.stores.sdkStore.sdk,createChannel:(0,o.Lo)(m),onCreateChannelClick:r,onBeforeCreateChannel:u,onChannelCreated:c,userListQuery:v,step:g,setStep:_,type:b,setType:C,onCreateChannel:h,overrideInviteUser:f}},t)},c=function(){var e=a.useContext(s);if(!e)throw Error("CreateChannelContext not found. Use within the CreateChannel module.");return e}},39894:function(e,n,t){"use strict";t.d(n,{p:function(){return r}});var r=function(e){if("number"==typeof e)return e;if("string"==typeof e){var n=Number.parseFloat(e);if(!Number.isNaN(n))return n}return NaN}},19332:function(e,n,t){"use strict";t.d(n,{u:function(){return s}});var r=t(67294),i=t(5701),a=t(92593);t(8978),t(7585);var o=t(58972),l=function(e){void 0===e&&(e=0);var n=e;if(!(n>10))try{var t=document.querySelector(".sendbird-thread-ui--scroll");t&&(t.scrollTop=t.scrollHeight)}catch(e){setTimeout(function(){l(n+1)},500*n)}},s=function(e,n){var t=e.currentChannel,s=e.onBeforeSendMultipleFilesMessage,u=e.publishingModules,c=n.logger,d=n.pubSub,h=n.scrollRef;return[(0,r.useCallback)(function(e,n){return new Promise(function(r,f){t||(c.warning("Channel: Sending MFm failed, because currentChannel is null.",{currentChannel:t}),f()),e.length<=1&&(c.warning("Channel: Sending MFM failed, because there are no multiple files.",{files:e}),f());var m={fileInfoList:e.map(function(e){return{file:e,fileName:e.name,fileSize:e.size,mimeType:e.type}})};n&&(m.isReplyToChannel=!0,m.parentMessageId=n.messageId),"function"==typeof s&&(m=s(e,n)),c.info("Channel: Start sending MFM",{messageParams:m});try{null==t||t.sendMultipleFilesMessage(m).onFileUploaded(function(e,n,r,a){c.info("Channel: onFileUploaded during sending MFM",{requestId:e,index:n,error:a,uploadableFileInfo:r}),d.publish(i.p.ON_FILE_INFO_UPLOADED,{response:{channelUrl:t.url,requestId:e,index:n,uploadableFileInfo:r,error:a},publishingModules:u})}).onPending(function(e){c.info("Channel: in progress of sending MFM",{pendingMessage:e,fileInfoList:m.fileInfoList}),d.publish(i.p.SEND_MESSAGE_START,{message:e,channel:t,publishingModules:u}),setTimeout(function(){h&&(0,i.s)(u)&&(0,a.s)(0,h),(0,i.a)(u)&&l(0)},o.e)}).onFailed(function(e,n){c.error("Channel: Sending MFM failed.",{error:e,failedMessage:n}),d.publish(i.p.SEND_MESSAGE_FAILED,{channel:t,message:n,publishingModules:u}),f(e)}).onSucceeded(function(e){c.info("Channel: Sending voice message success!",{succeededMessage:e}),d.publish(i.p.SEND_FILE_MESSAGE,{channel:t,message:e,publishingModules:u}),r(e)})}catch(e){c.error("Channel: Sending MFM failed.",{error:e}),f(e)}})},[t,s,u])]}},87056:function(e,n,t){"use strict";t.d(n,{F:function(){return d}});var r=t(67294),i=t(73935),a=t(70179),o=t(43822),l=t(1608),s=t(49805),u=t(69392),c=t(41238),d=function(e){var n=e.message,t=e.onCancel,a=e.deleteMessage,o=e.onDownloadClick,l=n.sender,s=n.type,d=n.url,f=n.name,m=n.threadInfo,v=l.profileUrl,p=l.nickname,g=l.userId,_=(0,c.A)().config;return(0,i.createPortal)(r.createElement(h,{profileUrl:v,nickname:p,type:s,url:d,name:void 0===f?"":f,onCancel:t,onDelete:function(){return a(n).then(function(){return t()})},isByMe:_.userId===g,disableDelete:null!=m&&!!m.replyCount&&m.replyCount>0,onDownloadClick:o}),document.getElementById(u.a))},h=function(e){var n=e.profileUrl,t=e.nickname,i=e.name,c=e.type,d=e.url,h=e.isByMe,f=e.onCancel,m=e.onDelete,v=e.disableDelete,p=e.onDownloadClick;return r.createElement(u.M,{onClose:f},r.createElement("div",{className:"sendbird-fileviewer","data-testid":"sendbird-fileviewer"},r.createElement("div",{className:"sendbird-fileviewer__header"},r.createElement("div",{className:"sendbird-fileviewer__header__left"},r.createElement("div",{className:"sendbird-fileviewer__header__left__avatar"},r.createElement(a.A,{height:"32px",width:"32px",src:n})),r.createElement("div",{className:"sendbird-fileviewer__header__left__text-container"},r.createElement(l.L,{className:"sendbird-fileviewer__header__left__filename",type:l.a.H_2,color:l.b.ONBACKGROUND_1},i),r.createElement(l.L,{className:"sendbird-fileviewer__header__left__sender-name",type:l.a.BODY_1,color:l.b.ONBACKGROUND_2},t))),r.createElement("div",{className:"sendbird-fileviewer__header__right"},(0,s.f)(c)&&r.createElement("div",{className:"sendbird-fileviewer__header__right__actions"},r.createElement("a",{className:"sendbird-fileviewer__header__right__actions__download",rel:"noopener noreferrer",href:d,target:"_blank",onClick:p},r.createElement(o.ZP,{type:o.Qy.DOWNLOAD,fillColor:o.zo.ON_BACKGROUND_1,height:"24px",width:"24px"})),m&&h&&r.createElement("div",{className:"sendbird-fileviewer__header__right__actions__delete"},r.createElement(o.ZP,{className:v?"disabled":"",type:o.Qy.DELETE,fillColor:v?o.zo.GRAY:o.zo.ON_BACKGROUND_1,height:"24px",width:"24px",onClick:function(){v||m()}}))),r.createElement("div",{className:"sendbird-fileviewer__header__right__actions__close"},r.createElement(o.ZP,{type:o.Qy.CLOSE,fillColor:o.zo.ON_BACKGROUND_1,height:"24px",width:"24px",onClick:f})))),r.createElement("div",{className:"sendbird-fileviewer__content"},(0,s.h)(c)&&r.createElement("video",{controls:!0,className:"sendbird-fileviewer__content__video"},r.createElement("source",{src:d,type:c})),(0,s.j)(c)&&r.createElement("img",{src:d,alt:i,className:"sendbird-fileviewer__content__img"}),!(0,s.f)(c)&&r.createElement("div",{className:"sendbird-fileviewer__content__unsupported"},r.createElement(l.L,{type:l.a.H_1,color:l.b.ONBACKGROUND_1},l.c.UI__FILE_VIEWER__UNSUPPORT)))))}},411:function(e,n,t){"use strict";t.d(n,{G:function(){return f}});var r=t(12394),i=t(67294),a=t(43822),o=t(9399),l=t(54627),s=t(43847),u=t(41238),c=t(7585),d=t(56210),h=t(88006),f=function(e){var n=e.className,t=e.currentChannel,f=e.showSearchIcon,m=e.onBackClick,v=e.onSearchClick,p=e.onChatHeaderActionClick,g=e.renderLeft,_=e.renderMiddle,E=e.renderRight,b=(0,u.A)().config,C=b.userId,y=b.theme,N=(0,s.u)().isMobile,T=(0,c.u)().stringSet,S=(null==t?void 0:t.myMutedState)==="muted",A=(0,l.g)(t,C,T);return i.createElement(d.ZP,{className:(0,h.c)("sendbird-chat-header",n),renderLeft:null!=g?g:function(){return i.createElement(i.Fragment,null,N&&i.createElement(d.ZP.Icon,{className:"sendbird-chat-header__icon_back",onClick:m,type:a.Qy.ARROW_LEFT,color:a.zo.PRIMARY,width:"24px",height:"24px"}),i.createElement(o.Z,{theme:y,channel:t,userId:C,height:32,width:32}))},renderMiddle:null!=_?_:function(){return i.createElement(d.ZP.Title,{title:A})},renderRight:null!=E?E:function(){return i.createElement(i.Fragment,null,S&&i.createElement(d.ZP.Icon,{className:"sendbird-chat-header__right__mute",type:a.Qy.NOTIFICATIONS_OFF_FILLED,color:a.zo.ON_BACKGROUND_2,width:"24px",height:"24px"}),f&&!(null==t?void 0:t.isEphemeral)&&i.createElement(d.ZP.IconButton,{className:"sendbird-chat-header__right__search",onClick:v,type:a.Qy.SEARCH,color:a.zo.PRIMARY,renderIcon:function(e){return i.createElement(d.ZP.Icon,(0,r._)({},e,{width:"24px",height:"24px"}))}}),i.createElement(d.ZP.IconButton,{className:"sendbird-chat-header__right__info",onClick:p,type:a.Qy.INFO,color:a.zo.PRIMARY,renderIcon:function(e){return i.createElement(d.ZP.Icon,(0,r._)({},e,{width:"24px",height:"24px"}))}}))}})}},11228:function(e,n,t){"use strict";t.d(n,{f:function(){return O},t:function(){return a}});var r=t(72127),i=t(7585);function a(e){if(null===e||!0===e||!1===e)return NaN;var n=Number(e);return isNaN(n)?n:n<0?Math.ceil(n):Math.floor(n)}function o(e){(0,r.r)(1,arguments);var n=(0,r.t)(e),t=n.getUTCDay();return n.setUTCDate(n.getUTCDate()-((t<1?7:0)+t-1)),n.setUTCHours(0,0,0,0),n}function l(e){(0,r.r)(1,arguments);var n=(0,r.t)(e),t=n.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(t+1,0,4),i.setUTCHours(0,0,0,0);var a=o(i),l=new Date(0);l.setUTCFullYear(t,0,4),l.setUTCHours(0,0,0,0);var s=o(l);return n.getTime()>=a.getTime()?t+1:n.getTime()>=s.getTime()?t:t-1}var s={};function u(e,n){(0,r.r)(1,arguments);var t,i,o,l,u,c,d,h,f=a(null!==(t=null!==(i=null!==(o=null!==(l=null==n?void 0:n.weekStartsOn)&&void 0!==l?l:null==n?void 0:null===(u=n.locale)||void 0===u?void 0:null===(c=u.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:s.weekStartsOn)&&void 0!==i?i:null===(d=s.locale)||void 0===d?void 0:null===(h=d.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==t?t:0);if(!(f>=0&&f<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,r.t)(e),v=m.getUTCDay();return m.setUTCDate(m.getUTCDate()-((v<f?7:0)+v-f)),m.setUTCHours(0,0,0,0),m}function c(e,n){(0,r.r)(1,arguments);var t,i,o,l,c,d,h,f,m=(0,r.t)(e),v=m.getUTCFullYear(),p=a(null!==(t=null!==(i=null!==(o=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n?void 0:null===(c=n.locale)||void 0===c?void 0:null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==o?o:s.firstWeekContainsDate)&&void 0!==i?i:null===(h=s.locale)||void 0===h?void 0:null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==t?t:1);if(!(p>=1&&p<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(v+1,0,p),g.setUTCHours(0,0,0,0);var _=u(g,n),E=new Date(0);E.setUTCFullYear(v,0,p),E.setUTCHours(0,0,0,0);var b=u(E,n);return m.getTime()>=_.getTime()?v+1:m.getTime()>=b.getTime()?v:v-1}function d(e,n){for(var t=Math.abs(e).toString();t.length<n;)t="0"+t;return(e<0?"-":"")+t}var h={y:function(e,n){var t=e.getUTCFullYear(),r=t>0?t:1-t;return d("yy"===n?r%100:r,n.length)},M:function(e,n){var t=e.getUTCMonth();return"M"===n?String(t+1):d(t+1,2)},d:function(e,n){return d(e.getUTCDate(),n.length)},a:function(e,n){var t=e.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];
13default:return"am"===t?"a.m.":"p.m."}},h:function(e,n){return d(e.getUTCHours()%12||12,n.length)},H:function(e,n){return d(e.getUTCHours(),n.length)},m:function(e,n){return d(e.getUTCMinutes(),n.length)},s:function(e,n){return d(e.getUTCSeconds(),n.length)},S:function(e,n){var t=n.length;return d(Math.floor(e.getUTCMilliseconds()*Math.pow(10,t-3)),n.length)}},f={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},m={G:function(e,n,t){var r=e.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});default:return t.era(r,{width:"wide"})}},y:function(e,n,t){if("yo"===n){var r=e.getUTCFullYear();return t.ordinalNumber(r>0?r:1-r,{unit:"year"})}return h.y(e,n)},Y:function(e,n,t,r){var i=c(e,r),a=i>0?i:1-i;return"YY"===n?d(a%100,2):"Yo"===n?t.ordinalNumber(a,{unit:"year"}):d(a,n.length)},R:function(e,n){return d(l(e),n.length)},u:function(e,n){return d(e.getUTCFullYear(),n.length)},Q:function(e,n,t){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,n,t){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return d(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,n,t){var r=e.getUTCMonth();switch(n){case"M":case"MM":return h.M(e,n);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(e,n,t){var r=e.getUTCMonth();switch(n){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(e,n,t,i){var o=function(e,n){(0,r.r)(1,arguments);var t=(0,r.t)(e);return Math.round((u(t,n).getTime()-(function(e,n){(0,r.r)(1,arguments);var t,i,o,l,d,h,f,m,v=a(null!==(t=null!==(i=null!==(o=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n?void 0:null===(d=n.locale)||void 0===d?void 0:null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==o?o:s.firstWeekContainsDate)&&void 0!==i?i:null===(f=s.locale)||void 0===f?void 0:null===(m=f.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==t?t:1),p=c(e,n),g=new Date(0);return g.setUTCFullYear(p,0,v),g.setUTCHours(0,0,0,0),u(g,n)})(t,n).getTime())/6048e5)+1}(e,i);return"wo"===n?t.ordinalNumber(o,{unit:"week"}):d(o,n.length)},I:function(e,n,t){var i=function(e){(0,r.r)(1,arguments);var n=(0,r.t)(e);return Math.round((o(n).getTime()-(function(e){(0,r.r)(1,arguments);var n=l(e),t=new Date(0);return t.setUTCFullYear(n,0,4),t.setUTCHours(0,0,0,0),o(t)})(n).getTime())/6048e5)+1}(e);return"Io"===n?t.ordinalNumber(i,{unit:"week"}):d(i,n.length)},d:function(e,n,t){return"do"===n?t.ordinalNumber(e.getUTCDate(),{unit:"date"}):h.d(e,n)},D:function(e,n,t){var i=function(e){(0,r.r)(1,arguments);var n=(0,r.t)(e),t=n.getTime();return n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0),Math.floor((t-n.getTime())/864e5)+1}(e);return"Do"===n?t.ordinalNumber(i,{unit:"dayOfYear"}):d(i,n.length)},E:function(e,n,t){var r=e.getUTCDay();switch(n){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(e,n,t,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(a);case"ee":return d(a,2);case"eo":return t.ordinalNumber(a,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(e,n,t,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(a);case"cc":return d(a,n.length);case"co":return t.ordinalNumber(a,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(e,n,t){var r=e.getUTCDay(),i=0===r?7:r;switch(n){case"i":return String(i);case"ii":return d(i,n.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(e,n,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,n,t){var r,i=e.getUTCHours();switch(r=12===i?f.noon:0===i?f.midnight:i/12>
13=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,n,t){var r,i=e.getUTCHours();switch(r=i>=17?f.evening:i>=12?f.afternoon:i>=4?f.morning:f.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,n,t){if("ho"===n){var r=e.getUTCHours()%12;return 0===r&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return h.h(e,n)},H:function(e,n,t){return"Ho"===n?t.ordinalNumber(e.getUTCHours(),{unit:"hour"}):h.H(e,n)},K:function(e,n,t){var r=e.getUTCHours()%12;return"Ko"===n?t.ordinalNumber(r,{unit:"hour"}):d(r,n.length)},k:function(e,n,t){var r=e.getUTCHours();return(0===r&&(r=24),"ko"===n)?t.ordinalNumber(r,{unit:"hour"}):d(r,n.length)},m:function(e,n,t){return"mo"===n?t.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):h.m(e,n)},s:function(e,n,t){return"so"===n?t.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):h.s(e,n)},S:function(e,n){return h.S(e,n)},X:function(e,n,t,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(n){case"X":return p(i);case"XXXX":case"XX":return g(i);default:return g(i,":")}},x:function(e,n,t,r){var i=(r._originalDate||e).getTimezoneOffset();switch(n){case"x":return p(i);case"xxxx":case"xx":return g(i);default:return g(i,":")}},O:function(e,n,t,r){var i=(r._originalDate||e).getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+v(i,":");default:return"GMT"+g(i,":")}},z:function(e,n,t,r){var i=(r._originalDate||e).getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+v(i,":");default:return"GMT"+g(i,":")}},t:function(e,n,t,r){return d(Math.floor((r._originalDate||e).getTime()/1e3),n.length)},T:function(e,n,t,r){return d((r._originalDate||e).getTime(),n.length)}};function v(e,n){var t=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),a=r%60;return 0===a?t+String(i):t+String(i)+n+d(a,2)}function p(e,n){return e%60==0?(e>0?"-":"+")+d(Math.abs(e)/60,2):g(e,n)}function g(e,n){var t=Math.abs(e);return(e>0?"-":"+")+d(Math.floor(t/60),2)+(n||"")+d(t%60,2)}var _=function(e,n){switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},E=function(e,n){switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},b={p:E,P:function(e,n){var t,r=e.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return _(e,n);switch(i){case"P":t=n.dateTime({width:"short"});break;case"PP":t=n.dateTime({width:"medium"});break;case"PPP":t=n.dateTime({width:"long"});break;default:t=n.dateTime({width:"full"})}return t.replace("{{date}}",_(i,n)).replace("{{time}}",E(a,n))}},C=["D","DD"],y=["YY","YYYY"];function N(e,n,t){if("YYYY"===e)throw RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").
13concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw RangeError("Use `yy` instead of `YY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw RangeError("Use `d` instead of `D` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw RangeError("Use `dd` instead of `DD` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var T=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,S=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,A=/^'([^]*?)'?$/,I=/''/g,M=/[a-zA-Z]/;function O(e,n,t){(0,r.r)(2,arguments);var o,l,u,c,d,h,f,v,p,g,_,E,O,R,w,D,L,P,U,x=String(n),k=null!==(l=null!==(u=null==t?void 0:t.locale)&&void 0!==u?u:s.locale)&&void 0!==l?l:i.l,F=a(null!==(c=null!==(d=null!==(h=null!==(f=null==t?void 0:t.firstWeekContainsDate)&&void 0!==f?f:null==t?void 0:null===(v=t.locale)||void 0===v?void 0:null===(p=v.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==h?h:s.firstWeekContainsDate)&&void 0!==d?d:null===(g=s.locale)||void 0===g?void 0:null===(_=g.options)||void 0===_?void 0:_.firstWeekContainsDate)&&void 0!==c?c:1);if(!(F>=1&&F<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var G=a(null!==(E=null!==(O=null!==(R=null!==(w=null==t?void 0:t.weekStartsOn)&&void 0!==w?w:null==t?void 0:null===(D=t.locale)||void 0===D?void 0:null===(L=D.options)||void 0===L?void 0:L.weekStartsOn)&&void 0!==R?R:s.weekStartsOn)&&void 0!==O?O:null===(P=s.locale)||void 0===P?void 0:null===(U=P.options)||void 0===U?void 0:U.weekStartsOn)&&void 0!==E?E:0);if(!(G>=0&&G<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw RangeError("locale must contain localize property");if(!k.formatLong)throw RangeError("locale must contain formatLong property");var B=(0,r.t)(e);if(!function(e){return(0,r.r)(1,arguments),(!!function(e){return(0,r.r)(1,arguments),e instanceof Date||"object"===(0,r._)(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)||"number"==typeof e)&&!isNaN(Number((0,r.t)(e)))}(B))throw RangeError("Invalid time value");var H=((o=new Date(Date.UTC(B.getFullYear(),B.getMonth(),B.getDate(),B.getHours(),B.getMinutes(),B.getSeconds(),B.getMilliseconds()))).setUTCFullYear(B.getFullYear()),B.getTime()-o.getTime()),V=function(e,n){return(0,r.r)(2,arguments),function(e,n){(0,r.r)(2,arguments);var t=(0,r.t)(e).getTime(),i=a(n);return new Date(t+i)}(e,-a(n))}(B,H),j={firstWeekContainsDate:F,weekStartsOn:G,locale:k,_originalDate:B};return x.match(S).map(function(e){var n=e[0];return"p"===n||"P"===n?(0,b[n])(e,k.formatLong):e}).join("").match(T).map(function(r){if("''"===r)return"'";var i,a=r[0];if("'"===a)return(i=r.match(A))?i[1].replace(I,"'"):r;var o=m[a];if(o)return null!=t&&t.useAdditionalWeekYearTokens||-1===y.indexOf(r)||N(r,n,String(e)),null!=t&&t.useAdditionalDayOfYearTokens||-1===C.indexOf(r)||N(r,n,String(e)),o(V,r,k.localize,j);if(a.match(M))throw RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return r}).join("")}},43847:function(e,n,t){"use strict";t.d(n,{M:function(){return s},u:function(){return u}});var r=t(67294),i="sendbird--mobile-mode",a=r.createContext({breakpoint:!1,isMobile:!1}),o=function(){try{var e=document.querySelector("body");null==e||e.classList.add(i)}catch(e){}},l=function(){try{var e=document.querySelector("body");null==e||e.classList.remove(i)}catch(e){}},s=function(e){var n=e.children,t=e.logger,i=(null==e?void 0:e.breakpoint)||!1,s=(0,r.useState)(!1),u=s[0],c=s[1];return(0,r.useEffect)(function(){var e,n=function(){var e;if("boolean"==typeof i)c(i),i?o():l();else{var n=window.matchMedia("(max-width: ".concat(i,")"));null===(e=null==t?void 0:t.info)||void 0===e||e.call(t,"MediaQueryProvider: Screensize updated to ".concat(i)),n.matches?(c(!0),o()):(c(!1),l())}};return n(),window.addEventListener("resize",n),null===(e=null==t?void 0:t.info)||void 0===e||e.call(t,"MediaQueryProvider: addEventListener",{updateSize:n}),function(){var e;window.removeEventListener("resize",n),null===(e=null==t?void 0:t.info)||void 0===e||e.call(t,"MediaQueryProvider: removeEventListener",{updateSize:n})}},[i]),r.createElement(a.Provider,{value:{breakpoint:i,isMobile:u}},n)},u=function(){return r.useContext(a)}},88477:function(e,n,t){"use strict";t.d(n,{T:function(){return r}});var r="sendbird-text-message-item-body"},1608:function(e,n,t){"use strict";t.d(n,{L:function(){return u},a:function(){return c},b:function(){return d},c:function(){return h},d:function(){return s}});var r=t(12394),i=t(67294),a=t(64393),o={H_1:"H_1",H_2:"H_2",SUBTITLE_1:"SUBTITLE_1",SUBTITLE_2:"SUBTITLE_2",BODY_1:"BODY_1",BODY_2:"BODY_2",BUTTON_1:"BUTTON_1",BUTTON_2:"BUTTON_2",BUTTON_3:"BUTTON_3",CAPTION_1:"
13CAPTION_1",CAPTION_2:"CAPTION_2",CAPTION_3:"CAPTION_3"},l={ONBACKGROUND_1:"ONBACKGROUND_1",ONBACKGROUND_2:"ONBACKGROUND_2",ONBACKGROUND_3:"ONBACKGROUND_3",ONBACKGROUND_4:"ONBACKGROUND_4",ONCONTENT_1:"ONCONTENT_1",ONCONTENT_2:"ONCONTENT_2",ONCONTENT_3:"ONCONTENT_3",ONCONTENT_INVERSE_1:"ONCONTENT_INVERSE_1",ONCONTENT_INVERSE_3:"ONCONTENT_INVERSE_3",PRIMARY:"PRIMARY",ERROR:"ERROR",SECONDARY_3:"SECONDARY_3"};function s(e){switch(e){case l.ONBACKGROUND_1:return"sendbird-label--color-onbackground-1";case l.ONBACKGROUND_2:return"sendbird-label--color-onbackground-2";case l.ONBACKGROUND_3:return"sendbird-label--color-onbackground-3";case l.ONBACKGROUND_4:return"sendbird-label--color-onbackground-4";case l.ONCONTENT_1:return"sendbird-label--color-oncontent-1";case l.ONCONTENT_2:return"sendbird-label--color-oncontent-2";case l.ONCONTENT_3:return"sendbird-label--color-oncontent-3";case l.ONCONTENT_INVERSE_1:return"sendbird-label--color-oncontent-inverse-1";case l.ONCONTENT_INVERSE_3:return"sendbird-label--color-oncontent-inverse-3";case l.PRIMARY:return"sendbird-label--color-primary";case l.ERROR:return"sendbird-label--color-error";case l.SECONDARY_3:return"sendbird-label--color-secondary-3";default:return""}}var u=(0,i.forwardRef)(function(e,n){var t=e.className,a=void 0===t?[]:t,l=e.type,u=e.color,c=e.children,d=e.testID;return i.createElement("span",{className:(0,r.c)((0,r.c)([],Array.isArray(a)?a:[a],!0),["sendbird-label",function(e){switch(e){case o.H_1:return"sendbird-label--h-1";case o.H_2:return"sendbird-label--h-2";case o.SUBTITLE_1:return"sendbird-label--subtitle-1";case o.SUBTITLE_2:return"sendbird-label--subtitle-2";case o.BODY_1:return"sendbird-label--body-1";case o.BODY_2:return"sendbird-label--body-2";case o.BUTTON_1:return"sendbird-label--button-1";case o.BUTTON_2:return"sendbird-label--button-2";case o.BUTTON_3:return"sendbird-label--button-3";case o.CAPTION_1:return"sendbird-label--caption-1";case o.CAPTION_2:return"sendbird-label--caption-2";case o.CAPTION_3:return"sendbird-label--caption-3";default:return""}}(l),s(u)],!1).join(" "),ref:n,"data-testid":d},void 0===c?null:c)}),c=o,d=l,h=(0,a.g)("en")},17061:function(e,n,t){"use strict";t.d(n,{M:function(){return a},T:function(){return i},U:function(){return s},a:function(){return l},b:function(){return o}});var r,i,a=10,o=15,l="@",s=1;(r=i||(i={})).PARENT="PARENT",r.THREAD="THREAD"},12394:function(e,n,t){"use strict";t.d(n,{_:function(){return a},a:function(){return l},b:function(){return s},c:function(){return u},d:function(){return o},e:function(){return i}});var r=function(e,n){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)};function i(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var a=function(){return(a=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)};function o(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>n.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t}function l(e,n,t,r){return new(t||(t=Promise))(function(i,a){function o(e){try{s(r.next(e))}catch(e){a(e)}}function l(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var n;e.done?i(e.value):((n=e.value)instanceof t?n:new t(function(e){e(n)})).then(o,l)}s((r=r.apply(e,n||[])).next())})}function s(e,n){var t,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){return function(l){if(t)throw TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(t=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(6===l[0]&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=n.call(e,a)}catch(e){l=[6,e],r=0}finally{t=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}function u(e,n,t){if(t||2==arguments.length)for(var r,i=0,a=n.length;i<a;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError},15956:function(e,n,t){"use strict";t.d(n,{u:function(){return l}});var r=t(58972),i=t(92593),a=t(34420),o=t(34919);function l(e){var n=e.onReachedTop,t=e.onReachedBottom,l=e.onInBetween,s=(0,a.zS)(function(e){if(null==e?void 0:e.target){var a=e.target,o=a.scrollTop,s=a.scrollHeight,u=a.clientHeight,c={distanceFromBottom:s-o-u};n&&(0,i.a)(o,0,r.S)?n(c):t&&(0,i.a)(s,u+o,r.S)?t(c):l&&l(c)}});return(0,o.u)(s,100,{trailing:!0})}},58184:function(e,n,t){"use strict";t.d(n,{M:function(){return r},N:function(){return i},a:function(){return a}});var r={Enter:"Enter",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Backspace:"Backspace"},i={ElementNode:1,TextNode:3},a={Span:"SPAN",Br:"BR",Div:"DIV"}},90047:function(e,n,t){"use strict";t.d(n,{u:function(){return i}});var r=t(67294);function i(e,n,t){void 0===t&&(t=!0);var i=(0,r.useState)(!1),a=i[0],o=i[1];return(0,r.useEffect)(function(){var e=function(){t&&o(document.hidden)};return document.addEventListener("visibilitychange",e),function(){document.removeEventListener("visibilitychange",e)}},[t,document.hidden]),{shouldReconnect:!e&&!!n&&!a}}},70599:function(e,n,t){"use strict";t.d(n,{U:function(){return r}});var r={INIT_USER:"INIT_USER",RESET_USER:"RESET_USER",UPDATE_USER_INFO:"UPDATE_USER_INFO"}},73862:function(e,n,t){"use strict";t.d(n,{M:function(){return O}});var r=t(67294),i=t(88006),a=t(41238),o=t(69561),l=t(12394),s=t(29515),u=t(43822),c=t(49805),d=t(7585),h=t(36614),f=function(e){var n=e.ref,t=e.onClick,a=void 0===t?i.n:t,o=e.onBlur,c=void 0===o?i.n:o,d=e.renderIcon;return r.createElement(s.Z,{ref:n,width:"32px",height:"32px",onClick:a,onBlur:c},(void 0===d?function(e){return r.createElement(u.ZP,(0,l._)({},e))}:d)({type:u.Qy.MORE,fillColor:u.zo.CONTENT_INVERSE,width:"24px",height:"24px"}))},m=function(e){var n,t=(0,d.u)().stringSet,i=(0,o.u)(),a=i.message,s=i.hideMenu;return r.createElement(o.a,(0,l._)({},e,{onClick:function(n){var t;(0,c.l)(a)&&(0,c.A)(a.message),s(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:t.MESSAGE_MENU__COPY)},v=function(e){var n,t=(0,d.u)().stringSet,i=(0,o.u)(),a=i.message,s=i.hideMenu,u=i.setQuoteMessage;return r.createElement(o.a,(0,l._)({},e,{disabled:a.parentMessageId>0,onClick:function(n){var t;u(a),s(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:t.MESSAGE_MENU__REPLY)},p=function(e){var n,t=(0,d.u)().stringSet,i=(0,o.u)(),a=i.message,s=i.hideMenu,u=i.onReplyInThread;return r.createElement(o.a,(0,l._)({},e,{onClick:function(n){var t;u({message:a}),s(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:t.MESSAGE_MENU__THREAD)},g=function(e){var n,t=(0,d.u)().stringSet,i=(0,o.u)(),a=i.hideMenu,s=i.onMoveToParentMessage;return r.createElement(o.a,(0,l._)({},e,{onClick:function(n){var t;s(),a(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:t.MESSAGE_MENU__OPEN_IN_CHANNEL)},_=function(e){var n,t=(0,d.u)().stringSet,i=(0,o.u)(),a=i.hideMenu,s=i.showEdit,u=i.isOnline;return r.createElement(o.a,(0,l._)({},e,{onClick:function(n){var t;u&&(s(!0),a(),null===(t=e.onClick)||void 0===t||t.call(e,n))}}),null!==(n=e.children)&&void 0!==n?n:t.MESSAGE_MENU__EDIT)},E=function(e){var n,t=(0,d.u)().stringSet,i=(0,o.u)(),a=i.message,s=i.hideMenu,u=i.resendMessage,c=i.isOnline;return r.createElement(o.a,(0,l._)({},e,{onClick:function(n){var t;c&&(u(a),s(),null===(t=e.onClick)||void 0===t||t.call(e,n))}}),null!==(n=e.children)&&void 0!==n?n:t.MESSAGE_MENU__RESEND)},b=function(e){var n,t,i,a=(0,d.u)().stringSet,s=(0,o.u)(),u=s.message,h=s.hideMenu,f=s.deleteMessage,m=s.showRemove,v=s.isOnline,p=s.disableDeleteMessage;return r.createElement(o.a,(0,l._)({},e,{disabled:"boolean"==typeof p?p:(null!==(t=null===(n=u.threadInfo)||void 0===n?void 0:n.replyCount)&&void 0!==t?t:0)>0,onClick:function(n){var t;(0,c.w)(u)?f(u):v&&(m(!0),h(),null===(t=e.onClick)||void 0===t||t.call(e,n))}}),null!==(i=e.children)&&void 0!==i?i:a.MESSAGE_MENU__DELETE)},C=function(e){var n,t=e.channel,r=e.message;if((0,c.w)(r)||(0,c.v)(r)||!(null===(n=null==t?void 0:t.isGroupChannel)||void 0===n?void 0:n.call(t))||(null==t?void 0:t.isEphemeral))return!1;var i=null==t?void 0:t.isBroadcast,a=(null==t?void 0:t.myRole)===h.a7.OPERATOR;return!i||a},y=function(e){var n=e.message;return(0,c.l)(n)},N=function(e){var n=e.message,t=e.channel,r=e.isByMe;return!(null==t?void 0:t.isEphemeral)&&(0,c.l)(n)&&(0,c.q)(n)&&r},T=function(e){var n=e.message,t=e.isByMe;return(0,c.w)(n)&&(null==n?void 0:n.isResendable)&&t},S=function(e){var n=e.message,t=e.channel,r=e.isByMe;return!(null==t?void 0:t.isEphemeral)&&!(0,c.v)(n)&&r},A=function(e){var n=e.onMoveToParentMessage;return!!(void 0===n?void 0:n)},I=function(e){var n=e.channel,t=e.message,r=e.replyType;return C({channel:n,message:t})&&"QUOTE_REPLY"===r},M=function(e){var n=e.channel,t=e.message,r=e.replyType,i=e.onReplyInThread;return C({channel:n,message:t})&&"THREAD"===r&&!(null==t?void 0:t.parentMessageId)&&"function"==typeof i},O=function(e){var n,t=e.className,l=e.message,s=e.channel,u=e.isByMe,c=e.replyType,d=e.renderTrigger,h=e.renderMenuItems,C=e.disableDeleteMessage,O=e.showEdit,R=void 0===O?i.n:O,w=e.showRemove,D=void 0===w?i.n:w,L=e.deleteMessage,P=e.resendMessage,U=e.setQuoteMessage,x=e.onReplyInThread,k=e.onMoveToParentMessage,F=(0,a.A)().c
13onfig.isOnline,G=(0,r.useRef)(null),B=(0,r.useRef)(null),H=(0,r.useState)(!1),V=H[0],j=H[1],z=function(){return j(!1)},K=function(){return j(function(e){return!e})},Y={message:l,channel:s,isByMe:u,replyType:c,onReplyInThread:x,onMoveToParentMessage:k};return r.createElement("div",{className:(0,i.c)("sendbird-message-menu",t),ref:B},r.createElement(o.M,{value:{message:l,hideMenu:z,showMenu:function(){return j(!0)},toggleMenu:K,setQuoteMessage:U,onReplyInThread:x,onMoveToParentMessage:k,showEdit:R,showRemove:D,deleteMessage:L,resendMessage:P,isOnline:F,disableDeleteMessage:void 0===C?null:C,triggerRef:G,containerRef:B}},(void 0===d?f:d)({ref:G,onClick:K}),V&&r.createElement(o.b,{id:(0,o.g)(l.messageId),parentRef:G,parentContainRef:B,closeDropdown:z,openLeft:u},null!==(n=null==h?void 0:h({items:{CopyMenuItem:m,ReplyMenuItem:v,ThreadMenuItem:p,OpenInChannelMenuItem:g,EditMenuItem:_,ResendMenuItem:E,DeleteMenuItem:b}}))&&void 0!==n?n:r.createElement(r.Fragment,null,y(Y)&&r.createElement(m,null),I(Y)&&r.createElement(v,null),M(Y)&&r.createElement(p,null),A(Y)&&r.createElement(g,null),N(Y)&&r.createElement(_,null),T(Y)&&r.createElement(E,null),S(Y)&&r.createElement(b,null)))))}},19940:function(e,n,t){"use strict";t.d(n,{a:function(){return c},b:function(){return u},s:function(){return s},u:function(){return l}});var r=t(4500),i=t(67294),a=t(56299),o=t(12394);function l(e,n){var t,o,l=(0,i.useState)("undefined"==typeof window||null===(o=null===(t=null==window?void 0:window.navigator)||void 0===t?void 0:t.onLine)||void 0===o||o),s=l[0],u=l[1];return(0,i.useEffect)(function(){var t=(0,a.u)();try{n.warning("sdk changed",t);var i=new r.C({onDisconnected:function(){u(!1),n.warning("onDisconnected",{isOnline:s})},onReconnectStarted:function(){u(!1),n.warning("onReconnectStarted",{isOnline:s})},onReconnectSucceeded:function(){u(!0),n.warning("onReconnectSucceeded",{isOnline:s})},onReconnectFailed:function(){e.reconnect(),n.warning("onReconnectFailed")}});(null==e?void 0:e.addConnectionHandler)&&(e.addConnectionHandler(t,i),n.info("Added ConnectionHandler",t))}catch(e){}return function(){try{e.removeConnectionHandler(t),n.info("Removed ConnectionHandler",t)}catch(e){}}},[e]),(0,i.useEffect)(function(){var t=function(){try{n.warning("Try reconnecting SDK"),"OPEN"!==e.connectionState&&e.reconnect()}catch(e){}};return window.addEventListener("online",t),function(){window.removeEventListener("online",t)}},[e]),(0,i.useEffect)(function(){var t=document.querySelector("body");if(s||(null==e?void 0:e.isCacheEnabled))try{null==t||t.classList.remove("sendbird__offline"),n.info("Removed class sendbird__offline from body")}catch(e){}else try{null==t||t.classList.add("sendbird__offline"),n.info("Added class sendbird__offline to body")}catch(e){}},[s,null==e?void 0:e.isCacheEnabled]),s}function s(e){var n=e.logger,t=e.timeout,r=e.cb,i=[],a=null;return{push:function(e){if(i.find(function(n){return n.url===e.url})?n.info("Channel: Mark as read already in queue",{channel:e}):i.push(e),!a){var o=i.shift();o&&r(o),a=setInterval(function(){if(0===i.length&&a){clearInterval(a),a=null;return}var e=i.shift();e&&r(e)},t||2e3)}},clear:function(){i=[],a&&(clearInterval(a),a=null)},getQueue:function(){return i}}}function u(e,n){void 0===n&&(n=[]),(0,i.useLayoutEffect)(function(){return function(){e()}},n)}function c(e,n){var t=this,r=e.isConnected,a=n.logger,l=(0,i.useMemo)(function(){return s({logger:a,cb:function(e){return(0,o.a)(t,void 0,void 0,function(){var n;return(0,o.b)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e.markAsDelivered()];case 1:return t.sent(),[3,3];case 2:return n=t.sent(),a.warning("Channel: Mark as delivered failed",{channel:e,error:n}),[3,3];case 3:return[2]}})})}})},[]);return(0,i.useEffect)(function(){r||l.clear()},[r]),u(function(){l.clear()}),l}},56299:function(e,n,t){"use strict";t.d(n,{u:function(){return r}});var r=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})}},70179:function(e,n,t){"use strict";t.d(n,{A:function(){return h},a:function(){return u}});var r=t(12394),i=t(67294),a=t(4399),o=t(39894),l=t(43822),s=t(88006),u=function(e){var n=e.width,t=e.height,r=e.text,a=(0,o.p)(n),u=(0,o.p)(t);
13return"number"!=typeof a||Number.isNaN(a)||(a*=.575),"number"!=typeof u||Number.isNaN(u)||(u*=.575),i.createElement("div",{className:(0,s.c)("sendbird-avatar-img--default",r&&"text"),style:{width:n,height:t}},r?i.createElement("div",{className:"sendbird-avatar-text"},r):i.createElement(l.ZP,{type:l.Qy.USER,fillColor:l.zo.CONTENT,width:a,height:u}))},c="sendbird-avatar-img",d=function(e){var n=e.src,t=void 0===n?"":n,r=e.alt,o=void 0===r?"":r,l=e.height,s=e.width,d=e.customDefaultComponent,h=function(){return d?d({width:s,height:l}):i.createElement(u,{width:s,height:l})};return"string"==typeof t?i.createElement(a.ZP,{className:c,url:t,height:l,width:s,alt:o,defaultComponent:h}):t&&t.length?1===t.length?i.createElement(a.ZP,{className:c,url:t[0],height:l,width:s,alt:o,defaultComponent:h}):2===t.length?i.createElement("div",{className:"sendbird-avatar--inner__two-child"},i.createElement(a.ZP,{className:c,url:t[0],height:l,width:s,alt:o,defaultComponent:h}),i.createElement(a.ZP,{className:c,url:t[1],height:l,width:s,alt:o,defaultComponent:h})):3===t.length?i.createElement(i.Fragment,null,i.createElement("div",{className:"sendbird-avatar--inner__three-child--upper"},i.createElement(a.ZP,{className:c,url:t[0],height:l,width:s,alt:o,defaultComponent:h})),i.createElement("div",{className:"sendbird-avatar--inner__three-child--lower"},i.createElement(a.ZP,{className:c,url:t[1],height:l,width:s,alt:o,defaultComponent:h}),i.createElement(a.ZP,{className:c,url:t[2],height:l,width:s,alt:o,defaultComponent:h}))):i.createElement("div",{className:"sendbird-avatar--inner__four-child"},t.slice(0,4).map(function(e,n){return i.createElement(a.ZP,{className:c,url:e,height:l,width:s,alt:o,key:"".concat(e,"-").concat(n),defaultComponent:h})})):i.createElement(a.ZP,{className:c,url:"",height:l,width:s,alt:o,defaultComponent:h})},h=i.forwardRef(function(e,n){var t=e.className,a=void 0===t?"":t,o=e.src,l=e.alt,s=e.width,u=void 0===s?"56px":s,c=e.height,h=void 0===c?"56px":c,f=e.zIndex,m=e.left,v=e.bottom,p=e.onClick,g=e.customDefaultComponent;return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(a)?a:[a],!0),["sendbird-avatar"],!1).join(" "),role:"button",ref:n,style:{height:h,width:u,zIndex:void 0===f?0:f,left:void 0===m?"":m,bottom:void 0===v?"":v},onClick:p,onKeyDown:p,tabIndex:0},i.createElement(d,{src:void 0===o?"":o,width:u,height:h,alt:void 0===l?"":l,customDefaultComponent:g}))})},58972:function(e,n,t){"use strict";t.d(n,{B:function(){return h},C:function(){return A},D:function(){return y},M:function(){return E},O:function(){return r},S:function(){return i},V:function(){return f},a:function(){return m},b:function(){return g},c:function(){return d},d:function(){return o},e:function(){return a},f:function(){return v},g:function(){return b},h:function(){return C},i:function(){return M},j:function(){return l},k:function(){return s},l:function(){return p},m:function(){return _},n:function(){return N},o:function(){return c},p:function(){return I},q:function(){return T},r:function(){return S},s:function(){return u}});var r=1048576,i=10,a=100,o=100,l=250,s=1e3,u=6e5,c=12e3,d=11025,h=["audio/webm","audio/mp4","audio/mpeg","audio/ogg"],f="sendbird-voice-player-provider-root",m="sendbird-global-audio-player-id",v="Voice_message.mp3",p="Voice_message.m4a",g="audio/mp3;sbu_type=voice",_="audio/x-m4a;sbu_type=voice",E="KEY_VOICE_MESSAGE_DURATION",b="KEY_INTERNAL_MESSAGE_TYPE",C="voice/mp3",y="delivery_receipt",N="32px",T=10,S=26214400,A="sendbird_message_templates_token_key",I="sendbird_message_templates_key",M="message_template"},69392:function(e,n,t){"use strict";t.d(n,{E:function(){return L},G:function(){return w},M:function(){return A},V:function(){return M},a:function(){return C},b:function(){return D},c:function(){return S},d:function(){return y},m:function(){return b},u:function(){return O}});var r=t(12394),i=t(67294),a=t(49805),o=t(88006),l=t(73935),s=t(7585),u=t(43847),c=t(29515),d=t(88569),h=t(43822),f=t(1608);t(34420),t(71091);var m=t(56299);t(93122);var v=t(58972),p=t(41238);t(69561);var g={100:"extra-light",200:"light",300:"main",400:"dark",500:"extra-dark","overlay-01":"overlay-dark","overlay-02":"overlay-light","onlight-01":"onlight-text-high-emphasis","onlight-02":"onlight-text-mid-emphasis","onlight-03":"onlight-text-low-emphasis","onlight-04":"onlight-text-disabled","ondark-01":"ondark-text-high-emphasis","ondark-02":"ondark-text-mid-emphasis","ondark-03":"ondark-text-low-emphasis","ondark-04":"ondark-text-disabled"},_=Object.values(g).sort(function(e,n){return n.length-e.length}),E=new Map(Object.entries(g).map(function(e){var n=e[0];return[e[1],n]})),b=function(e){var n={};return Object.entries(e).forEach(function(e){for(var t=e[0],r=e[1],i=t,a=0;a<_.length;a++){var o=_[a],l=new RegExp("-".concat(o,"$"));if(l.test(t)){var s=E.get(o);if(s){i=t.replace(l,"-".concat(s));break}}}n[i]=r}),n},C="sendbird-modal-root",y=function(){return i.createElement("div",{id:C,className:C})},N=function(e){var n=e.titleText,t=e.onCloseClick;return i.createElement("div",{className:"sendbird-modal__header"},i.createElement(f.L,{type:f.a.H_1,color:f.b.ONBACKGROUND_1},n),i.createElement("div",{className:"sendbird-modal__close"},i.createElement(c.Z,{width:"32px",height:"32px",onClick:t},i.createElement(h.ZP,{type:h.Qy.CLOSE,fillColor:h.zo.DEFAULT,width:"24px",height:"24px"}))))},T=function(e){var n=e.children;return i.createElement("div",{className:"sendbird-modal__body"},i.createElement(f.L,{type:f.a.SUBTITLE_1,color:f.b.ONBACKGROUND_2},n))},S=function(e){var n=e.submitText,t=e.disabled,r=e.hideCancelButton,a=e.type,o=void 0===a?d.qh.DANGER:a,l=e.onSubmit,u=e.onCancel,c=(0,i.useContext)(s.L).stringSet;return i.createElement("div",{className:"sendbird-modal__footer"},!(void 0!==r&&r)&&i.createElement(d.ZP,{type:d.qh.SECONDARY,onClick:u},i.createElement(f.L,{type:f.a.BUTTON_1,color:f.b.ONBACKGROUND_1},c.BUTTON__CANCEL)),i.createElement(d.ZP,{type:o,disabled:void 0!==t&&t,onClick:l},n))};function A(e){var n,t=e.children,a=e.className,s=e.contentClassName,c=void 0===s?"":s,h=e.isCloseOnClickOutside,f=void 0!==h&&h,v=e.isFullScreenOnMobile,g=e.titleText,_=e.submitText,E=e.disabled,b=e.hideFooter,y=e.type,A=void 0===y?d.qh.DANGER:y,I=e.renderHeader,M=e.onSubmit,O=void 0===M?o.n:M,R=e.onClose,w=e.onCancel,D=e.customFooter,L=null!==(n=null!=R?R:w)&&void 0!==n?n:o.n,P=(0,p.A)().eventHandlers,U=(0,i.useState)(function(){return"sbu-modal-".concat((0,m.u)())})[0];(0,i.useEffect)(function(){var e,n;return null===(n=null===(e=null==P?void 0:P.modal)||void 0===e?void 0:e.onMounted)||void 0===n?void 0:n.call(e,{close:L,id:U})},[]);var x=(0,u.u)().isMobile;return(0,l.createPortal)(i.createElement("div",{className:(0,o.c)("sendbird-modal",void 0===a?"":a,void 0!==v&&v&&x&&"sendbird-modal--full-mobile")},i.createElement("div",{className:o.c.apply(void 0,(0,r.c)(["sendbird-modal__content"],Array.isArray(c)?c:[c],!1))},(null==I?void 0:I())||i.createElement(N,{titleText:null!=g?g:"",onCloseClick:L}),i.createElement(T,null,void 0===t?null:t),!(void 0!==b&&b)&&(null!=D?D:i.createElement(S,{disabled:void 0!==E&&E,onCancel:L,onSubmit:O,submitText:null!=_?_:"",type:A}))),i.createElement("div",{className:(0,o.c)("sendbird-modal__backdrop",f&&"sendbird-modal__backdrop--clickoutside"),onClick:function(e){null==e||e.stopPropagation(),f&&L()}})),document.getElementById(C))}var I=(0,i.createContext)({start:o.n,stop:o.n,isRecordable:!1}
13),M=function(e){var n,r=e.children,a=(0,p.A)().config,l=a.logger,u=a.groupChannel,c=(0,i.useState)(null),d=c[0],h=c[1],f=(0,i.useState)(!1),m=f[0],g=f[1],_=(0,i.useState)(!1),E=_[0],b=_[1],C=(0,s.u)().stringSet,y=u.enableVoiceMessage,N=(0,i.useState)(null),T=N[0],S=N[1],M=null!==(n=v.B.find(function(e){return MediaRecorder.isTypeSupported(e)}))&&void 0!==n?n:"";y&&!M&&l.error("VoiceRecorder: Browser does not support mimeType",{mimmeTypes:v.B}),(0,i.useEffect)(function(){y&&!T&&Promise.all([t.e(6717),t.e(8840)]).then(t.bind(t,28840)).then(function(e){return S(e)})},[y,T]);var O=(0,i.useCallback)(function(e){var n,t;if(y&&!T){l.error("VoiceRecorder: Recording audio processor is being loaded.");return}l.info("VoiceRecorder: Start recording."),d&&(R(),l.info("VoiceRecorder: Previous mediaRecorder is stopped.")),function(){try{navigator.permissions.query({name:"microphone"}).then(function(e){"denied"===e.state&&(l.warning("VoiceRecorder: Permission denied."),b(!0))})}catch(e){l.warning("VoiceRecorder: Failed to check permission.",e)}}(),null===(t=null===(n=null==navigator?void 0:navigator.mediaDevices)||void 0===n?void 0:n.getUserMedia)||void 0===t||t.call(n,{audio:!0}).then(function(n){l.info("VoiceRecorder: Succeeded getting media stream.",n),g(!0);var t,r=new MediaRecorder(n,{mimeType:M,audioBitsPerSecond:v.o});r.ondataavailable=function(t){l.info("VoiceRecorder: Succeeded getting an available data.",t.data);var r=new File([t.data],v.f,{lastModified:new Date().getTime(),type:v.b});null==T||T.downsampleToWav(r,function(n){var t,r=null==T?void 0:T.encodeMp3(n),i=new Blob(r,{type:v.b}),a=new File([i],v.f,{lastModified:new Date().getTime(),type:v.b});null===(t=null==e?void 0:e.onRecordingEnded)||void 0===t||t.call(e,a),l.info("VoiceRecorder: Succeeded converting audio file.",a)}),n.getAudioTracks().forEach(function(e){return e.stop()}),g(!1)},r.onstart=null!==(t=null==e?void 0:e.onRecordingStarted)&&void 0!==t?t:o.n,null==r||r.start(),h(r)}).catch(function(e){l.error("VoiceRecorder: Failed getting media stream.",e),h(null)})},[d,T]),R=(0,i.useCallback)(function(){null==d||d.stop(),h(null),g(!1),l.info("VoiceRecorder: Stop recording.")},[d]);return i.createElement(I.Provider,{value:{start:O,stop:R,isRecordable:m}},r,E&&i.createElement(A,{hideFooter:!0,onClose:function(){return b(!1)}},i.createElement(i.Fragment,null,C.VOICE_RECORDING_PERMISSION_DENIED)))},O=function(){return(0,i.useContext)(I)},R=(0,i.createContext)({openModal:o.n}),w=function(e){var n=e.children,t=(0,i.useState)([]),l=t[0],s=t[1],u=(0,i.useCallback)(function(e){s(function(n){return(0,r.c)((0,r.c)([],n,!0),[e],!1)})},[]),c=(0,i.useCallback)(function(){s(function(e){return e.slice(1)})},[]),d=(0,i.useMemo)(function(){return function(){return(0,a.K)(l).when(function(e){return 0===e.length},function(){return i.createElement(i.Fragment,null)}).otherwise(function(){var e=l[0],n=e.modalProps,t=e.childElement;return i.createElement(A,(0,r._)({},n,{className:(0,o.c)("sendbird-global-modal",null==n?void 0:n.className),onClose:function(){var e;null===(e=null==n?void 0:n.onClose)||void 0===e||e.call(n),c()}}),t({closeModal:c}))})}},[l]);return i.createElement(R.Provider,{value:{openModal:u}},i.createElement(d,null),n)},D=function(){return(0,i.useContext)(R)},L=function(){function e(e){var n,t=this,r=e.sdk,i=e.logger;null===(n=null==r?void 0:r.getAllEmoji)||void 0===n||n.call(r).then(function(e){t._emojiContainer=e,null==i||i.info("EmojiManager | Succeeded getting all emojis. ",e)}).catch(function(){null==i||i.warning("EmojiManager | Failed getting all emojis.")})}return Object.defineProperty(e.prototype,"AllEmojisAsArray",{get:function(){return this._emojiContainer.emojiCategories.flatMap(function(e){return e.emojis})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"AllEmojisAsMap",{get:function(){return this._emojiContainer.emojiCategories.flatMap(function(e){return e.emojis}).reduce(function(e,n){return e.set(n.key,n.url),e},new Map)},enumerable:!1,configurable:!0}),e.prototype.getAllEmojis=function(e){var n=this;return(0,a.K)(e).when(function(e){return["array","arr"].includes(e)},function(){return n.AllEmojisAsArray}).when(function(e){return["map"].includes(e)},function(){return n.AllEmojisAsMap}).otherwise(function(){return n.AllEmojisAsArray})},e.prototype.getEmojiUrl=function(e){var n,t;return null!==(t=null===(n=this.AllEmojisAsArray.find(function(n){return n.key===e}))||void 0===n?void 0:n.url)&&void 0!==t?t:""},Object.defineProperty(e.prototype,"emojiContainer",{get:function(){return this._emojiContainer}
13,enumerable:!1,configurable:!0}),e}()},64393:function(e,n,t){"use strict";t.d(n,{g:function(){return i}});var r={en:{MESSAGE_STATUS__YESTERDAY:"Yesterday",CHANNEL__MESSAGE_LIST__NOTIFICATION__NEW_MESSAGE:"new message(s) since",CHANNEL__MESSAGE_LIST__NOTIFICATION__ON:"on",CHANNEL_PREVIEW_MOBILE_LEAVE:"Leave channel",CHANNEL_SETTING__HEADER__TITLE:"Channel information",CHANNEL_SETTING__PROFILE__EDIT:"Edit",CHANNEL_SETTING__MEMBERS__TITLE:"Members",CHANNEL_SETTING__MEMBERS__SEE_ALL_MEMBERS:"All members",CHANNEL_SETTING__MEMBERS__INVITE_MEMBER:"Invite users",CHANNEL_SETTING__MEMBERS__YOU:" (You)",CHANNEL_SETTING__MEMBERS__SELECT_TITLE:"Select members",CHANNEL_SETTING__MEMBERS__OPERATOR:"Operator",CHANNEL_SETTING__LEAVE_CHANNEL__TITLE:"Leave channel",CHANNEL_SETTING__OPERATORS__TITLE:"Operators",CHANNEL_SETTING__OPERATORS__TITLE_ALL:"All operators",CHANNEL_SETTING__OPERATORS__TITLE_ADD:"Add operator",CHANNEL_SETTING__OPERATORS__ADD_BUTTON:"Add",CHANNEL_SETTING__MUTED_MEMBERS__TITLE:"Muted members",CHANNEL_SETTING__MUTED_MEMBERS__TITLE_ALL:"All muted members",CHANNEL_SETTING__NO_UNMUTED:"No muted members yet",CHANNEL_SETTING__BANNED_MEMBERS__TITLE:"Banned users",CHANNEL_SETTING__FREEZE_CHANNEL:"Freeze Channel",CHANNEL_SETTING__MODERATION__REGISTER_AS_OPERATOR:"Register as operator",CHANNEL_SETTING__MODERATION__UNREGISTER_OPERATOR:"Unregister operator",CHANNEL_SETTING__MODERATION__MUTE:"Mute",CHANNEL_SETTING__MODERATION__UNMUTE:"Unmute",CHANNEL_SETTING__MODERATION__BAN:"Ban",CHANNEL_SETTING__MODERATION__UNBAN:"Unban",CHANNEL_SETTING__MODERATION__EMPTY_BAN:"No banned members yet",CHANNEL_SETTING__MODERATION__ALL_BAN:"All banned members",OPEN_CHANNEL_CONVERSATION__TITLE_PARTICIPANTS:"participants",OPEN_CHANNEL_CONVERSATION__SELECT_PARTICIPANTS:"Select participants",OPEN_CHANNEL_LIST__TITLE:"Channels",CREATE_OPEN_CHANNEL_LIST__TITLE:"New channel profile",CREATE_OPEN_CHANNEL_LIST__SUBTITLE__IMG_SECTION:"Channel image",CREATE_OPEN_CHANNEL_LIST__SUBTITLE__IMG_UPLOAD:"Upload",CREATE_OPEN_CHANNEL_LIST__SUBTITLE__TEXT_SECTION:"Channel name",CREATE_OPEN_CHANNEL_LIST__SUBTITLE__TEXT_PLACE_HOLDER:"Enter channel name",CREATE_OPEN_CHANNEL_LIST__SUBMIT:"Create",OPEN_CHANNEL_SETTINGS__OPERATOR_TITLE:"Channel Information",OPEN_CHANNEL_SETTINGS__OPERATOR_URL:"URL",OPEN_CHANNEL_SETTINGS__PARTICIPANTS_ACCORDION_TITLE:"Participants",OPEN_CHANNEL_SETTINGS__DELETE_CHANNEL_PANEL:"Delete channel",OPEN_CHANNEL_SETTINGS__DELETE_CHANNEL_TITLE:"Delete channel?",OPEN_CHANNEL_SETTINGS__DELETE_CHANNEL_CONTEXT:"Once deleted, this channel can't be restored.",OPEN_CHANNEL_SETTINGS__DELETE_CHANNEL_SUBMIT:"Delete",OPEN_CHANNEL_SETTINGS__OPERATORS_TITLE:"Operators",OPEN_CHANNEL_SETTINGS__OPERATORS__TITLE_ADD:"Add operator",OPEN_CHANNEL_SETTINGS__OPERATORS__TITLE_ALL:"All operators",OPEN_CHANNEL_SETTINGS__MUTED_MEMBERS__TITLE:"Muted participants",OPEN_CHANNEL_SETTINGS__MUTED_MEMBERS__TITLE_ALL:"All muted participants",OPEN_CHANNEL_SETTINGS__MUTED_MEMBERS__NO_ONE:"No muted participants yet",OPEN_CHANNEL_SETTINGS__BANNED_MEMBERS__TITLE:"Banned users",OPEN_CHANNEL_SETTINGS__BANNED_MEMBERS__TITLE_ALL:"All banned users",OPEN_CHANNEL_SETTINGS__BANNED_MEMBERS__NO_ONE:"No banned users yet",OPEN_CHANNEL_SETTINGS__MEMBERS__YOU:" (You)",OPEN_CHANNEL_SETTINGS__MEMBERS__OPERATOR:"Operator",OPEN_CHANNEL_SETTINGS__PARTICIPANTS_TITLE:"Participants",OPEN_CHANNEL_SETTINGS__EMPTY_LIST:"No participants yet",OPEN_CHANNEL_SETTINGS__SEE_ALL:"See all participants",OPEN_CHANNEL_SETTINGS__ALL_PARTICIPANTS_TITLE:"All participants",OPEN_CHANNEL_SETTINGS__NO_TITLE:"(No title)",OPEN_CHANNEL_SETTING__MODERATION__REGISTER_AS_OPERATOR:"Register as operator",OPEN_CHANNEL_SETTING__MODERATION__UNREGISTER_OPERATOR:"Unregister operator",OPEN_CHANNEL_SETTING__MODERATION__MUTE:"Mute",OPEN_CHANNEL_SETTING__MODERATION__UNMUTE:"Unmute",OPEN_CHANNEL_SETTING__MODERATION__BAN:"Ban",OPEN_CHANNEL_SETTING__MODERATION__UNBAN:"Unban",TRYING_TO_CONNECT:"Trying to connect…",TYPING_INDICATOR__IS_TYPING:"is typing...",TYPING_INDICATOR__AND:"and",TYPING_INDICATOR__ARE_TYPING:"are typing...",TYPING_INDICATOR__MULTIPLE_TYPING:"Several people are typing...",CHANNEL_FROZEN:"Channel frozen",PLACE_HOLDER__NO_CHANNEL:"No channels",PLACE_HOLDER__WRONG:"Something went wrong",PLACE_HOLDER__RETRY_TO_CONNECT:"Retry",PLACE_HOLDER__NO_MESSAGES:"No messages",TOOLTIP__AND_YOU:", and you",TOOLTIP__YOU:"you",TOOLTIP__UNKNOWN_USER:"(no name)",UNKNOWN__UNKNOWN_MESSAGE_TYPE:"(Unknown message type)",UNKNOWN__CANNOT_READ_MESSAGE:"Cannot read this message.",UNKNOWN__TEMPLATE_ERROR:"(Template error)",FORM_VERSION_ERROR:"Form type messages are not available in this version.",UNKNOWN__CANNOT_READ_TEMPLATE:"Cannot read this template.",MESSAGE_EDITED:"(edited)",MODAL__DELETE_MESSAGE__TITLE:"Delete this message?",MODAL__CHANNEL_INFORMATION__TITLE:"Edit channel information",MODAL__CHANNEL_INFORMATION__CHANNEL_IMAGE:"Channel image",MODAL__CHANNEL_INFORMATION__UPLOAD:"Upload",MODAL__CHANNEL_INFORMATION__CHANNEL_NAME:"Channel name",MODAL__CHANNEL_INFORMATION__INPUT__PLACE_HOLDER:"Enter name",MODAL__INVITE_MEMBER__TITLE:"Invite member",MODAL__INVITE_MEMBER__SELECTED:"selected",MODAL__CHOOSE_CHANNEL_TYPE__TITLE:"New channel",MODAL__CHOOSE_CHANNEL_TYPE__GROUP:"Group",MODAL__CHOOSE_CHANNEL_TYPE__SUPER_GROUP:"Super group",MODAL__CHOOSE_CHANNEL_TYPE__BROADCAST:"Broadcast",MODAL__CREATE_CHANNEL__TITLE:"New channel",MODAL__CREATE_CHANNEL__GROUP:"Group",MODAL__CREATE_CHANNEL__SUPER:"Super group",MODAL__CREATE_CHANNEL__BROADCAST:"Broadcast",MODAL__CREATE_CHANNEL__SELECTED:"selected",MODAL__LEAVE_CHANNEL__TITLE:"Leave this channel?",MODAL__LEAVE_CHANNEL__FOOTER:"Leave",MODAL__VOICE_MESSAGE_INPUT_DISABLED__TITLE_MUTED:"You're muted by the operator.",MODAL__VOICE_MESSAGE_INPUT_DISABLED__TITLE_FROZEN:"Channel is frozen.",USER_PROFILE__MESSAGE:"Message",USER_PROFILE__USER_ID:"User ID",EDIT_PROFILE__TITLE:"My profile",EDIT_PROFILE__IMAGE_LABEL:"Profile image",EDIT_PROFILE__IMAGE_UPLOAD:"Upload",EDIT_PROFILE__NICKNAME_LABEL:"Nickname",EDIT_PROFILE__NICKNAME_PLACEHOLDER:"Enter your nickname",EDIT_PROFILE__USERID_LABEL:"User ID",EDIT_PROFILE__THEME_LABEL:"Dark theme",MESSAGE_INPUT__PLACE_HOLDER:"Enter message",MESSAGE_INPUT__PLACE_HOLDER__DISABLED:"Chat is unavailable in this channel",MESSAGE_INPUT__PLACE_HOLDER__SUGGESTED_REPLIES:"Please choose one from above",MESSAGE_INPUT__PLACE_HOLDER__MESSAGE_FORM:"Please fill out the message form.",MESSAGE_INPUT__PLACE_HOLDER__FROZEN:"Chat is unavailable in this channel",MESSAGE_INPUT__PLACE_HOLDER__MUTED:"Chat is unavailable because you're muted",MESSAGE_INPUT__PLACE_HOLDER__MUTED_SHORT:"You're muted",MESSAGE_INPUT__QUOTE_REPLY__PLACE_HOLDER:"Reply to message",BUTTON__SUBMIT:"Submit",BUTTON__CANCEL:"Cancel",BUTTON__DELETE:"Delete",BUTTON__SAVE:"Save",BUTTON__CREATE:"Create",BUTTON__INVITE:"Invite",BUTTON__OK:"OK",BADGE__OVER:"+",NO_TITLE:"No title",NO_NAME:"(No name)",NO_MEMBERS:"(No members)",LABEL__OPERATOR:"Operator",MESSAGE_MENU__COPY:"Copy",MESSAGE_MENU__REPLY:"Reply",MESSAGE_MENU__THREAD:"Reply in thread",MESSAGE_MENU__OPEN_IN_CHANNEL:"Open in channel",MESSAGE_MENU__EDIT:"Edit",MESSAGE_MENU__RESEND:"Resend",MESSAGE_MENU__DELETE:"Delete",MESSAGE_MENU__SAVE:"Save",CONTEXT_MENU_DROPDOWN__COPY:"Copy",CONTEXT_MENU_DROPDOWN__EDIT:"Edit",CONTEXT_MENU_DROPDOWN__RESEND:"Resend",CONTEXT_MENU_DROPDOWN__DELETE:"Delete",CONTEXT_MENU_DROPDOWN__SAVE:"Save",SEARCH:"Search",SEARCH_IN_CHANNEL:"Search in channel",SEARCH_IN:"Search in",SEARCHING:"Searching for messages...",NO_SEARCHED_MESSAGE:"No results found.",QUOTE_MESSAGE_INPUT__REPLY_TO:"Reply to",QUOTE_MESSAGE_INPUT__FILE_TYPE_IMAGE:"Photo",QUOTE_MESSAGE_INPUT__FILE_TYPE_GIF:"GIF",QUOTE_MESSAGE_INPUT__FILE_TYPE__VIDEO:"Video",QUOTED_MESSAGE__REPLIED_TO:"replied to",QUOTED_MESSAGE__CURRENT_USER:"You",QUOTED_MESSAGE__UNAVAILABLE:"Message unavailable",THREAD__HEADER_TIT
13LE:"Thread",CHANNEL__THREAD_REPLY:"reply",CHANNEL__THREAD_REPLIES:"replies",CHANNEL__THREAD_OVER_MAX:"99+",THREAD__THREAD_REPLY:"reply",THREAD__THREAD_REPLIES:"replies",THREAD__INPUT__REPLY_TO_THREAD:"Reply to thread",THREAD__INPUT__REPLY_IN_THREAD:"Reply in thread",MENTION_NAME__NO_NAME:"(No name)",MENTION_COUNT__OVER_LIMIT:"You can mention up to %d times at a time.",UI__FILE_VIEWER__UNSUPPORT:"Unsupported message",VOICE_RECORDING_PERMISSION_DENIED:"You cannot record the voice since\n        voice recording is not permitted in your device system setting",VOICE_MESSAGE:"Voice Message",CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_GIF:"GIF",CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_PHOTO:"Photo",CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_VIDEO:"Video",CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_AUDIO:"Audio",CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_VOICE_MESSAGE:"Voice message",CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_GENERAL:"File",CHANNEL_PREVIEW_LAST_MESSAGE_TEMPLATE_MESSAGE:"Message",DATE_FORMAT__MESSAGE_LIST__NOTIFICATION__UNREAD_SINCE:"p 'on' MMM dd",DATE_FORMAT__MESSAGE_LIST__DATE_SEPARATOR:"MMMM dd, yyyy",DATE_FORMAT__THREAD_LIST__DATE_SEPARATOR:"MMM dd, yyyy",DATE_FORMAT__MESSAGE_CREATED_AT:"p",DATE_FORMAT__UNREAD_SINCE:"p MMM dd",DATE_FORMAT__LAST_MESSAGE_CREATED_AT__TODAY:"p",DATE_FORMAT__LAST_MESSAGE_CREATED_AT__THIS_YEAR:"MMM d",DATE_FORMAT__LAST_MESSAGE_CREATED_AT__PREVIOUS_YEAR:"yyyy/M/d",FILE_UPLOAD_NOTIFICATION__COUNT_LIMIT:"Up to %d files can be attached.",FILE_UPLOAD_NOTIFICATION__SIZE_LIMIT:"The maximum size per file is %d MB.",FEEDBACK_LIKE:"Like",FEEDBACK_DISLIKE:"Dislike",EDIT_COMMENT:"Edit comment",REMOVE_FEEDBACK:"Remove Feedback",FEEDBACK_MODAL_TITLE:"Provide additional feedback (optional)",FEEDBACK_CONTENT_PLACEHOLDER:"Leave a comment",BUTTON__REMOVE_FEEDBACK:"Remove feedback",FEEDBACK_FAILED_SUBMIT:"Couldn’t submit. Try again.",FEEDBACK_FAILED_SAVE:"Couldn’t save. Try again.",FEEDBACK_FAILED_DELETE:"Couldn’t delete. Try again.",FORM_ITEM_REQUIRED:"This field is required",FORM_ITEM_INVALID:"Please check the value",FORM_ITEM_OPTIONAL_EMPTY:"No Response"}},i=function(e){return void 0===e&&(e="en"),r[e]}},21415:function(e,n,t){"use strict";var r,i;t.d(n,{T:function(){return r}}),(i=r||(r={})).Text="text",i.Bubble="bubble"},26748:function(e,n,t){"use strict";t.d(n,{U:function(){return l},u:function(){return o}});var r=t(67294);t(12394),t(34420),t(71091),t(69392),t(49805),t(93122),t(7585),t(43847),t(69561),t(73935);var i=t(41238);t(29515),t(1608);var a=r.createContext({disableUserProfile:!0,isOpenChannel:!1}),o=function(){return(0,r.useContext)(a)},l=function(e){var n,t=e.isOpenChannel,o=e.disableUserProfile,l=void 0!==o&&o,s=e.renderUserProfile,u=e.onUserProfileMessage,c=e.onStartDirectMessage,d=e.children,h=(0,i.A)().config,f=null!==(n=null!=c?c:u)&&void 0!==n?n:h.onStartDirectMessage;return r.createElement(a.Provider,{value:{isOpenChannel:void 0!==t&&t,disableUserProfile:null!=l?l:!h.common.enableUsingDefaultUserProfile,renderUserProfile:null!=s?s:h.renderUserProfile,onStartDirectMessage:f,onUserProfileMessage:f}},d)}},61416:function(e,n,t){"use strict";t.d(n,{C:function(){return z},L:function(){return g},S:function(){return _},u:function(){return K}});var r=t(12394),i=t(67294),a=t(42391),o=t(77522),l=t(5701),s=t(56299),u=t(88006),c=t(58972),d=t(26748),h=t(41238),f=t(49805),m=t(90047),v="RESET_CHANNEL_LIST",p="CREATE_CHANNEL",g="LEAVE_CHANNEL_SUCCESS",_="SET_CURRENT_CHANNEL",E="FETCH_CHANNELS_SUCCESS",b="INIT_CHANNELS_START",C="INIT_CHANNELS_SUCCESS",y="REFRESH_CHANNELS_SUCCESS",N="INIT_CHANNELS_FAILURE",T="ON_USER_JOINED",S="ON_CHANNEL_DELETED",A="ON_LAST_MESSAGE_UPDATED",I="ON_USER_LEFT",M="ON_CHANNEL_CHANGED",O="ON_CHANNEL_ARCHIVED",R="ON_CHANNEL_FROZEN",w="ON_CHANNEL_UNFROZEN",D="ON_READ_RECEIPT_UPDATED",L="ON_DELIVERY_RECEIPT_UPDATED",P="CHANNEL_LIST_PARAMS_UPDATED",U=function(e){var n=e.sdk,t=e.sdkChannelHandlerId,r=e.channelListDispatcher,i=e.logger,o=new a.pe({onChannelChanged:function(e){e.isGroupChannel()&&(i.info("ChannelList: onChannelChanged",e),r({type:M,payload:e}))},onChannelDeleted:function(e){i.info("ChannelList: onChannelDeleted",e),r({type:S,payload:e})},onUserJoined:function(e){i.info("ChannelList: onUserJoined",e),r({type:T,payload:e})},onUserBanned:function(e,t){var a;
13e.isGroupChannel()&&(i.info("Channel: onUserBanned",e),r({type:I,payload:{channel:e,isMe:t.userId===(null===(a=null==n?void 0:n.currentUser)||void 0===a?void 0:a.userId)}}))},onUserLeft:function(e,t){var a;i.info("ChannelList: onUserLeft",e),r({type:I,payload:{channel:e,isMe:t.userId===(null===(a=null==n?void 0:n.currentUser)||void 0===a?void 0:a.userId)}})},onUnreadMemberStatusUpdated:function(e){i.info("ChannelList: onUnreadMemberStatusUpdated",e),r({type:D,payload:e})},onUndeliveredMemberStatusUpdated:function(e){i.info("ChannelList: onUndeliveredMemberStatusUpdated",e),e.lastMessage&&r({type:L,payload:e})},onMessageUpdated:function(e,n){var t;e.isGroupChannel()&&(null===(t=e.lastMessage)||void 0===t?void 0:t.isEqual(n))&&(i.info("ChannelList: onMessageUpdated",e),r({type:A,payload:e}))},onChannelHidden:function(e){i.info("ChannelList: onChannelHidden",e),r({type:O,payload:e})},onChannelFrozen:function(e){e.isGroupChannel()&&(i.info("ChannelList: onChannelFrozen",e),r({type:R,payload:e}))},onChannelUnfrozen:function(e){e.isGroupChannel()&&(i.info("ChannelList: onChannelUnfrozen",e),r({type:w,payload:e}))}});i.info("ChannelList: Added channelHandler"),n.groupChannel.addGroupChannelHandler(t,o)},x=function(e){var n=e.sdk,t=e.userFilledChannelListQuery,r=void 0===t?{}:t,i={includeEmpty:!1,limit:20,order:o.G.LATEST_LAST_MESSAGE};return r&&Object.keys(r).forEach(function(e){i[e]=r[e]}),n.groupChannel.createMyGroupChannelListQuery(i)},k=function(e){e.forEach(function(e){try{e.remove()}catch(e){}})},F=function(e,n){var t=new Map;return e&&(t.set(l.p.CREATE_CHANNEL,e.subscribe(l.p.CREATE_CHANNEL,function(e){n({type:p,payload:e.channel})})),t.set(l.p.UPDATE_USER_MESSAGE,e.subscribe(l.p.UPDATE_USER_MESSAGE,function(e){var t,r=e.channel,i=e.message;r.isGroupChannel()&&(null===(t=null==r?void 0:r.lastMessage)||void 0===t?void 0:t.messageId)===i.messageId&&(r.lastMessage=i,n({type:A,payload:r}))})),t.set(l.p.LEAVE_CHANNEL,e.subscribe(l.p.LEAVE_CHANNEL,function(e){var t=e.channel;n({type:g,payload:null==t?void 0:t.url})}))),t},G=function(e){var n=e.channel,t=e.currentChannel,r=e.allChannels,i=e.disableAutoSelect,a=null;if((null==t?void 0:t.url)===n.url){if(!i&&r.length>0){var o=r[0],l=r[1];a=o.url===n.url?void 0===l?null:l:o}}else a=t;return a},B={initialized:!1,loading:!0,allChannels:[],currentChannel:null,channelListQuery:null,currentUserId:"",disableAutoSelect:!1};function H(e,n){return(0,f.K)(n).with({type:b},function(n){var t=n.payload;return(0,r._)((0,r._)({},e),{loading:!0,currentUserId:t.currentUserId})}).with({type:v},function(){return B}).with({type:C},function(n){var t=n.payload,i=t.channelList,a=t.disableAutoSelect;return(0,r._)((0,r._)({},e),{initialized:!0,loading:!1,allChannels:i,disableAutoSelect:a,currentChannel:!a&&i&&i.length&&i.length>0?i[0]:e.currentChannel})}).with({type:y},function(n){var t=n.payload,i=t.channelList,a=t.currentChannel;return(0,r._)((0,r._)({},e),{loading:!1,allChannels:i,currentChannel:a})}).with({type:E},function(n){var t=e.allChannels.map(function(e){return e.url}),i=n.payload.filter(function(e){var n=e.url;return!t.find(function(e){return e===n})});return(0,r._)((0,r._)({},e),{allChannels:(0,r.c)((0,r.c)([],e.allChannels,!0),i,!0)})}).with({type:p},function(n){var t,i=n.payload,a=e.allChannels,o=e.currentUserId,l=e.channelListQuery;return l?(0,f._)(l,i,o)?(0,r._)((0,r._)({},e),{currentChannel:i,allChannels:(0,f.$)(a,i,null===(t=e.channelListQuery)||void 0===t?void 0:t.order)}):(0,r._)((0,r._)({},e),{currentChannel:i}):(0,r._)((0,r._)({},e),{currentChannel:i,allChannels:(0,r.c)([i],a.filter(function(e){return e.url!==(null==i?void 0:i.url)}),!0)})}).with({type:O},function(n){var t,i=n.payload,a=e.allChannels,o=e.currentUserId,l=e.currentChannel,s=e.channelListQuery,u=e.disableAutoSelect;if(s&&(0,f._)(s,i,o))return(0,r._)((0,r._)({},e),{allChannels:(0,f.$)(a,i,null===(t=e.channelListQuery)||void 0===t?void 0:t.order)});var c=G({channel:i,currentChannel:l,allChannels:a,disableAutoSelect:u});return(0,r._)((0,r._)({},e),{currentChannel:c,allChannels:a.filter(function(e){return e.url!==(null==i?void 0:i.url)})})}).with({type:f.a0.union(g,S)},function(n){var t,i=n.payload,a=e.allChannels.filter(function(e){return e.url!==i});return(0,r._)((0,r._)({},e),{currentChannel:i===(null===(t=e.currentChannel)||void 0===t?void 0:t.url)?a[0]:e.currentChannel,allChannels:a})}).with({type:I},function(n){var t,i=n.payload,a=i.channel,o=i.isMe,l=e.allChannels,s=e.currentUserId,u=e.currentChannel,c=e.channelListQuery,d=e.disableAutoSelect,h=(0,r.c)([],l,!0),m=a;if(o||c&&!(0,f._)(c,a,s)){var v=l.findIndex(function(e){return e.url===a.url});v>-1&&(h.splice(v,1),m=G({channel:a,currentChannel:u,allChannels:l,disableAutoSelect:d}))}else h=(0,f.$)(l,a,null===(t=e.channelListQuery)||void 0===t?void 0:t.order),(null==u?void 0:u.url)===a.url&&(m=a);return(0,r._)((0,r._)({},e),{currentChannel:m,allChannels:h})}).with({type:f.a0.union(T,M,D,L)},function(n){var t,i,a,o=n.payload,l=e.allChannels,s=void 0===l?[]:l,u=e.currentUserId,c=e.currentChannel,d=e.channelListQuery,h=e.disableAutoSelect,m=o.unreadMessageCount;if(d){if((0,f._)(d,o,u))return(0,r._)((0,r._)({},e),{allChannels:(0,f.$)(s,o,null===(t=e.channelListQuery)||void 0===t?void 0:t.order)});if((0,f.a1)(o))return e;var v=G({channel:o,currentChannel:c,allChannels:s,disableAutoSelect:h});return(0,r._)((0,r._)({},e),{currentChannel:v,allChannels:s.filter(function(e){return e.url!==(null==o?void 0:o.url)})})}return 0===m&&(null===(a=null===(i=null==o?void 0:o.lastMessage)||void 0===i?void 0:i.sender)||void 0===a?void 0:a.userId)!==u?(0,r._)((0,r._)({},e),{allChannels:s.map(function(e){return e.url===(null==o?void 0:o.url)?o:e})}):(0,r._)((0,r._)({},e),{allChannels:(0,r.c)([o],s.filter(function(e){return e.url!==o.url}),!0)})}).with({type:_},function(n){return(0,r._)((0,r._)({},e),{currentChannel:n.payload})}).with({type:A},function(n){return(0,r._)((0,r._)({},e),{allChannels:e.allChannels.map(function(e){return(null==e?void 0:e.url)===n.payload.url?n.payload:e})})}).with({type:R},function(n){var t,i=n.payload,a=e.allChannels,o=e.currentUserId,l=e.currentChannel,s=e.channelListQuery,u=e.disableAutoSelect;if(s){if((0,f._)(s,i,o))return(0,r._)((0,r._)({},e),{allChannels:(0,f.$)(a,i,null===(t=e.channelListQuery)||void 0===t?void 0:t.order)});
13var c=G({channel:i,currentChannel:l,allChannels:a,disableAutoSelect:u});return(0,r._)((0,r._)({},e),{currentChannel:c,allChannels:a.filter(function(e){return e.url!==(null==i?void 0:i.url)})})}return(0,r._)((0,r._)({},e),{allChannels:a.map(function(e){return e.url===(null==i?void 0:i.url)&&(e.isFrozen=!0),e})})}).with({type:w},function(n){var t,i=n.payload,a=e.allChannels,o=e.currentUserId,l=e.currentChannel,s=e.channelListQuery,u=e.disableAutoSelect;if(s){if((0,f._)(s,i,o))return(0,r._)((0,r._)({},e),{allChannels:(0,f.$)(a,i,null===(t=e.channelListQuery)||void 0===t?void 0:t.order)});var c=G({channel:i,currentChannel:l,allChannels:a,disableAutoSelect:u});return(0,r._)((0,r._)({},e),{currentChannel:c,allChannels:a.filter(function(e){return e.url!==(null==i?void 0:i.url)})})}return(0,r._)((0,r._)({},e),{allChannels:a.map(function(e){return e.url===(null==i?void 0:i.url)&&(e.isFrozen=!1),e})})}).with({type:P},function(n){return(0,r._)((0,r._)({},e),{channelListQuery:n.payload.channelListQuery,currentUserId:n.payload.currentUserId})}).otherwise(function(){return e})}var V=function(e,n){var t=e.channelSource,a=e.disableMarkAsDelivered,o=n.channelListDispatcher,l=n.logger,s=n.markAsDeliveredScheduler;return(0,i.useCallback)(function(){return(0,r.a)(void 0,void 0,void 0,function(){var e,n;return(0,r.b)(this,function(r){switch(r.label){case 0:if(!(null==t?void 0:t.hasNext))return l.info("ChannelList: not able to fetch"),[2];l.info("ChannelList: starting fetch"),o({type:"FETCH_CHANNELS_START",payload:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,t.next()];case 2:return e=r.sent(),l.info("ChannelList: succeeded fetch",{channelList:e}),o({type:E,payload:e}),a||(l.info("ChannelList: mark as delivered to fetched channels"),null==e||e.forEach(function(e){(null==e?void 0:e.unreadMessageCount)>0&&s.push(e)})),[3,4];case 3:return n=r.sent(),l.error("ChannelList: failed fetch",{error:n}),o({type:"FETCH_CHANNELS_FAILURE",payload:n}),[3,4];case 4:return[2]}})})},[t,a])},j=i.createContext(null),z=function(e){var n,t,o,l,f,p,g,T,S,I,M,O,R,w,D,L,G,z,K,Y,Z,Q,W,q=e.children,X=e.className,$=e.disableUserProfile,J=e.allowProfileEdit,ee=e.queries,en=e.onProfileEditSuccess,et=e.onThemeChange,er=e.onBeforeCreateChannel,ei=e.sortChannelList,ea=e.overrideInviteUser,eo=e.activeChannelUrl,el=e.isTypingIndicatorEnabled,es=void 0===el?null:el,eu=e.isMessageReceiptStatusEnabled,ec=void 0===eu?null:eu,ed=e.reconnectOnIdle,eh=(null==e?void 0:e.disableAutoSelect)||!!eo,ef=(null==e?void 0:e.onChannelSelect)||u.n,em=(0,h.A)(),ev=em.config,ep=em.stores.sdkStore,eg=ev.pubSub,e_=ev.logger,eE=ev.markAsDeliveredScheduler,eb=ev.disableMarkAsDelivered,eC=void 0!==eb&&eb,ey=ev.isOnline,eN=null==ep?void 0:ep.sdk,eT=(null!==(Q=null==eN?void 0:eN.appInfo)&&void 0!==Q?Q:{}).premiumFeatureList,eS=J||ev.allowProfileEdit,eA=null==ee?void 0:ee.channelListQuery,eI=null==ee?void 0:ee.applicationUserListQuery,eM=null==ep?void 0:ep.initialized,eO=(0,i.useReducer)(H,B),eR=eO[0],ew=eO[1],eD=eR.currentChannel,eL=(0,i.useState)(null),eP=eL[0],eU=eL[1],ex=(0,i.useState)([]),ek=ex[0],eF=ex[1];(0,i.useEffect)(function(){var e=F(eg,ew);return function(){k(e)}},[eM]),(0,i.useEffect)(function(){var e,n,t,i,a,o,l,u,c,d,h,f,m,p,g,_,E,y,T=(0,s.u)();return eM?(e_.info("ChannelList: Setup channelHandlers"),o=(e={sdk:eN,sdkChannelHandlerId:T,channelListDispatcher:ew,setChannelSource:eU,onChannelSelect:ef,userFilledChannelListQuery:(0,r._)({},eA),logger:e_,sortChannelList:ei,disableAutoSelect:eh,markAsDeliveredScheduler:eE,disableMarkAsDelivered:eC}).sdk,l=e.sdkChannelHandlerId,u=e.channelListDispatcher,c=e.setChannelSource,d=e.onChannelSelect,h=e.userFilledChannelListQuery,f=e.logger,m=e.sortChannelList,p=e.disableAutoSelect,g=e.markAsDeliveredScheduler,_=e.disableMarkAsDelivered,(null==o?void 0:o.groupChannel)?U({sdk:o,channelListDispatcher:u,sdkChannelHandlerId:l,logger:f}):f.warning("ChannelList - createEventHandler: sdk or sdk.ChannelHandler does not exist",o),f.info("ChannelList - creating query",{userFilledChannelListQuery:h}),E=x({sdk:o,userFilledChannelListQuery:h}),f.info("ChannelList - created query",E),c(E),u({type:b,payload:{currentUserId:null!==(t=null===(n=null==o?void 0:o.currentUser)||void 0===n?void 0:n.userId)&&void 0!==t?t:""}}),h&&(f.info("ChannelList - setting up channelListQuery",E),u({type:P,payload:{channelListQuery:E,currentUserId:null!==(a=null===(i=null==o?void 0:o.currentUser)||void 0===i?void 0:i.userId)&&void 0!==a?a:""}})),f.info("ChannelList - fetching channels"),E.hasNext?E.next().then(function(e){f.info("ChannelList - fetched channels",e),f.info("ChannelList - highlight channel",e[0]);var n,t,r=e;m&&"function"==typeof m&&(r=m(e),f.info("ChannelList - channel list sorted",r)),p||null==d||d(r[0]),u({type:C,payload:{channelList:r,disableAutoSelect:p}}),(null===(t=null===(n=null==o?void 0:o.appInfo)||void 0===n?void 0:n.premiumFeatureList)||void 0===t?void 0:t.find(function(e){return"delivery_receipt"===e}))&&!_&&r.forEach(function(e){g.push(e)})}).catch(function(e){e&&(f.error("ChannelList - couldnt fetch channels",e),u({type:N}))}):f.info("ChannelList - there are no more channels")):(e_.info("ChannelList: Removing channelHandlers"),(null===(y=null==eN?void 0:eN.groupChannel)||void 0===y?void 0:y.removeGroupChannelHandler)&&eN.groupChannel.removeGroupChannelHandler(T),eU(null),ew({type:v,payload:null})),function(){var e,n;e_.info("ChannelList: Removing channelHandlers"),(null===(e=null==eN?void 0:eN.groupChannel)||void 0===e?void 0:e.removeGroupChannelHandler)&&(null===(n=null==eN?void 0:eN.groupChannel)||void 0===n||n.removeGroupChannelHandler(T))}},[eM,ei,Object.entries(null!=eA?eA:{}).map(function(e){return e[0]+e[1]}).join()]),(0,i.useEffect)(function(){var e,n,t="";if(null===(e=null==eN?void 0:eN.groupChannel)||void 0===e?void 0:e.addGroupChannelHandler){t=(0,s.u)();var i=new a.pe({onTypingStatusUpdated:function(e){var n,t=null===(n=null==e?void 0:e.getTypingUsers())||void 0===n?void 0:n.length,i=ek.filter(function(n){return n.url!==e.url});t>0?eF((0,r.c)((0,r.c)([],i,!0),[e],!1)):eF(i)},onUnreadMemberStatusUpdated:function(e){ew({type:A,payload:e})},onUndeliveredMemberStatusUpdated:function(e){ew({type:A,payload:e})}
13,onMessageUpdated:function(e){e.isGroupChannel()&&(ew({type:A,payload:e}),eN.groupChannel.getChannelWithoutCache(e.url).then(function(e){ew({type:A,payload:e})}))},onMentionReceived:function(e){e.isGroupChannel()&&(ew({type:A,payload:e}),eN.groupChannel.getChannelWithoutCache(e.url).then(function(e){ew({type:A,payload:e})}))}});null===(n=null==eN?void 0:eN.groupChannel)||void 0===n||n.addGroupChannelHandler(t,i)}return function(){var e;(null===(e=null==eN?void 0:eN.groupChannel)||void 0===e?void 0:e.removeGroupChannelHandler)&&""!==t&&eN.groupChannel.removeGroupChannelHandler(t)}},[null===(W=null==eN?void 0:eN.currentUser)||void 0===W?void 0:W.userId]);var eG=(0,i.useMemo)(function(){return{applicationUserListQuery:eI,channelListQuery:eA}},[eI,eA]),eB=eR.allChannels,eH=ei&&"function"==typeof ei?ei(eB):eB;if(eH.length!==eB.length){var eV="ChannelList: You have removed/added extra channels on sortChannelList\n      this could cause unexpected problems";console.warn(eV,{before:eB,after:eH}),e_.warning(eV,{before:eB,after:eH})}(0,i.useEffect)(function(){if(eN&&eN.groupChannel){if(!(null==eD?void 0:eD.url)){ef(null);return}eN.groupChannel.getChannel(eD.url).then(function(e){e?ef(e):ef(null)})}},[null==eD?void 0:eD.url]),n={activeChannelUrl:eo,channels:eH,sdk:eN},t={logger:e_,channelListDispatcher:ew},o=n.activeChannelUrl,l=n.channels,f=n.sdk,p=t.logger,g=t.channelListDispatcher,(0,i.useEffect)(function(){var e;if(o){p.info("ChannelListProvider: looking for active channel",{activeChannelUrl:o});var n=null==l?void 0:l.find(function(e){return e.url===o});n?g({type:_,payload:n}):(p.info("ChannelListProvider: searching backend for active channel",{activeChannelUrl:o}),null===(e=null==f?void 0:f.groupChannel)||void 0===e||e.getChannel(o).then(function(e){g({type:E,payload:[e]}),g({type:_,payload:e})}).catch(function(){p.warning("ChannelListProvider: Active channel not found")}))}},[o]),S=(T={isOnline:ey,reconnectOnIdle:ed,logger:e_,sdk:eN,currentGroupChannel:eD,channelListDispatcher:ew,setChannelSource:eU,userFilledChannelListQuery:eA,sortChannelList:ei,disableAutoSelect:eh,markAsDeliveredScheduler:eE,disableMarkAsDelivered:eC}).isOnline,I=T.reconnectOnIdle,M=T.logger,O=T.sdk,R=T.currentGroupChannel,w=T.channelListDispatcher,D=T.setChannelSource,L=T.userFilledChannelListQuery,G=T.sortChannelList,z=T.disableAutoSelect,K=T.markAsDeliveredScheduler,Y=T.disableMarkAsDelivered,Z=(0,m.u)(S,R,I).shouldReconnect,(0,i.useEffect)(function(){return function(){var e,n,t,r;if(Z){M.info("ChannelList refresh - creating query",{userFilledChannelListQuery:L});var i=x({sdk:O,userFilledChannelListQuery:L});M.info("ChannelList refresh - created query",i),D(i),w({type:b,payload:{currentUserId:null!==(n=null===(e=null==O?void 0:O.currentUser)||void 0===e?void 0:e.userId)&&void 0!==n?n:""}}),L&&(M.info("ChannelList refresh - setting up channelListQuery",i),w({type:P,payload:{channelListQuery:i,currentUserId:null!==(r=null===(t=null==O?void 0:O.currentUser)||void 0===t?void 0:t.userId)&&void 0!==r?r:""}})),M.info("ChannelList refresh - fetching channels"),i.hasNext?i.next().then(function(e){M.info("ChannelList refresh - fetched channels",e);var n,t,r=e;G&&"function"==typeof G&&(r=G(e),M.info("ChannelList refresh - channel list sorted",r));var i=z?null:r[0];if(null==R?void 0:R.url){var a=r.find(function(e){return e.url===R.url});a&&(i=a)}M.info("ChannelList refresh - highlight channel",i),w({type:y,payload:{channelList:r,currentChannel:i}}),(null===(t=null===(n=null==O?void 0:O.appInfo)||void 0===n?void 0:n.premiumFeatureList)||void 0===t?void 0:t.find(function(e){return e===c.D}))&&!Y&&r.forEach(function(e){K.push(e)})}).catch(function(e){e&&(M.error("ChannelList refresh - could not fetch channels",e),w({type:N}))}):M.info("ChannelList refresh - there are no more channels")}}},[Z]);var ej=V({channelSource:eP,disableMarkAsDelivered:eC||!(void 0===eT?[]:eT).some(function(e){return e===c.D})},{channelListDispatcher:ew,logger:e_,markAsDeliveredScheduler:eE});return i.createElement(j.Provider,{value:(0,r._)((0,r._)({className:X,disableUserProfile:$,queries:eG,onProfileEditSuccess:en,onThemeChange:et,onBeforeCreateChannel:er,overrideInviteUser:ea,onChannelSelect:ef,sortChannelList:ei,allowProfileEdit:eS,channelListDispatcher:ew,channelSource:eP},eR),{allChannels:eH,typingChannels:ek,isTypingIndicatorEnabled:null!=es?es:ev.groupChannelList.enableTypingIndicator,isMessageReceiptStatusEnabled:null!=ec?ec:ev.groupChannelList.enableMessageReceiptStatus,fetchChannelList:ej})},i.createElement(d.U,(0,r._)({},e),i.createElement("div",{className:"sendbird-channel-list ".concat(X)},q)))};function K(){var e=(0,i.useContext)(j);if(!e)throw Error("ChannelListContext not found. Use within the ChannelList module.");return e}},1758:function(e,n,t){"use strict";t.d(n,{g:function(){return i}});var r=t(49805);function i(e,n){return(0,r.K)(n).when(r.c,function(){var e=n.fileInfoList.length;return"Do you want to delete all ".concat(e," photos?")}).otherwise(function(){return e.MODAL__DELETE_MESSAGE__TITLE})}},93122:function(e,n,t){"use strict";t.d(n,{A:function(){return v},V:function(){return m},b:function(){return y},g:function(){return _},u:function(){return N}});var r=t(67294),i=t(12394),a=t(58972),o=t(41238),l=t(36786),s="INITIALIZE_AUDIO_UNIT",u="RESET_AUDIO_UNIT",c="SET_CURRENT_PLAYER",d="ON_VOICE_PLAYER_PLAY",h="ON_VOICE_PLAYER_PAUSE",f="ON_CURRENT_TIME_UPDATE",m={IDLE:"IDLE",PREPARING:"PREPARING",PLAYING:"PLAYING",PAUSED:"PAUSED",COMPLETED:"COMPLETED"},v=function(){return{audioFile:null,playbackTime:0,duration:1e3,playingStatus:m.IDLE}},p={currentPlayer:null,currentGroupKey:"",audioStorage:{}};function g(e,n){switch(n.type){case s:var t,r,a,o,l,p,g,_,E,b=n.payload.groupKey,C=(null===(p=e.audioStorage)||void 0===p?void 0:p[b])?e.audioStorage[b]:v();return C.playingStatus=m.PREPARING,(0,i._)((0,i._)({},e),{audioStorage:(0,i._)((0,i._)({},e.audioStorage),((t={})[b]=C,t))});case u:var b=n.payload.groupKey;return(0,i._)((0,i._)({},e),{audioStorage:(0,i._)((0,i._)({},e.audioStorage),((r={})[b]=v(),r))});case c:var y=n.payload,N=y.audioPlayer,b=y.groupKey;return(0,i._)((0,i._)({},e),{currentPlayer:N,currentGroupKey:b});case d:var T=n.payload,b=T.groupKey,S=T.audioFile,C=(null===(g=e.audioStorage)||void 0===g?void 0:g[b])?e.audioStorage[b]:v();return C.audioFile=S,C.playingStatus=m.PLAYING,(0,i._)((0,i._)({},e),{audioStorage:(0,i._)((0,i._)({},e.audioStorage),((a={})[b]=C,a))});case h:var A=n.payload,b=A.groupKey,I=A.duration,M=A.currentTime,C=(null===(_=e.audioStorage)||void 0===_?void 0:_[b])?e.audioStorage[b]:v();return C.playingStatus=m.PAUSED,I===M&&(C.playbackTime=0),(0,i._)((0,i._)({},e),{audioStorage:(0,i._)((0,i._)({},e.audioStorage),((o={})[b]=C,o))});case f:var b=n.payload.groupKey,O=e.currentPlayer,M=O.currentTime,I=O.duration,C=(null===(E=e.audioStorage)||void 0===E?void 0:E[b])?e.audioStorage[b]:v();return C.playbackTime===C.duration&&C.playingStatus===m.PAUSED?C.playbackTime=0:M>0&&I>0&&(C.playbackTime=M,C.duration=I),(0,i._)((0,i._)({},e),{audioStorage:(0,i._)((0,i._)({},e.audioStorage),((l={})[b]=C,l))});default:return e}}var _=function(e,n){return void 0===e&&(e=""),void 0===n&&(n=""),"".concat(e,"-").concat(n)},E=function(e){return(0,l.a)(navigator.userAgent)&&e.includes("m4a")?{name:a.l,mimeType:a.m}:{name:a.f,mimeType:a.b}},b=function(){},C=(0,r.createContext)({play:b,pause:b,stop:b,voicePlayerStore:{currentGroupKey:"",currentPlayer:null,audioStorage:{}}}),y=function(e){var n=e.children,t=(0,r.useReducer)(g,p),i=t[0],l=t[1],m=i.currentGroupKey,_=i.currentPlayer,b=i.audioStorage,y=(0,o.A)().c
13onfig.logger,N=function(e){_?e===m?(y.info("VoicePlayer: Pause playing(by group key)."),_.pause()):"ALL"===e&&(y.info("VoicePlayer: Pause playing(all)."),_.pause()):y.warning("VoicePlayer: No currentPlayer to pause.")};return r.createElement(C.Provider,{value:{play:function(e){var n=e.groupKey,t=e.audioFile,r=e.audioFileUrl,i=void 0===r?"":r,o=e.audioFileMimeType,p=void 0===o?a.b:o;n!==m&&N(m);var g=document.getElementById(a.V),_=document.getElementById(a.a);g&&_&&g.removeChild(_),y.info("VoicePlayer: Start getting audio file."),new Promise(function(e,r){if(l({type:s,payload:{groupKey:n}}),t){y.info("VoicePlayer: Use the audioFile instance."),e(t);return}var a,o=null===(a=null==b?void 0:b[n])||void 0===a?void 0:a.audioFile;if(o){y.info("VoicePlayer: Get from the audioStorage."),e(o);return}fetch(i).then(function(e){return e.blob()}).then(function(n){e(new File([n],E(p).name,{lastModified:new Date().getTime(),type:E(p).mimeType})),y.info("VoicePlayer: Get the audioFile from URL.")}).catch(r)}).then(function(e){var t,r=document.getElementById(a.V);y.info("VoicePlayer: Succeeded getting audio file.",{audioFile:e});var i=b[n]||v(),o=new Audio(null===(t=null==URL?void 0:URL.createObjectURL)||void 0===t?void 0:t.call(URL,e));o.id=a.a,o.currentTime=i.playbackTime,o.volume=1,o.loop=!1,o.onplaying=function(){y.info("VoicePlayer: OnPlaying event is called from audioPlayer",{groupKey:n,audioPlayer:o}),l({type:d,payload:{groupKey:n,audioFile:e}})},o.onpause=function(){y.info("VoicePlayer: OnPause event is called from audioPlayer",{groupKey:n,audioPlayer:o}),l({type:h,payload:{groupKey:n,duration:o.duration,currentTime:o.currentTime}})},o.ontimeupdate=function(){l({type:f,payload:{groupKey:n}})},o.onerror=function(e){y.error("VoicePlayer: Failed to load the audioFile on the audio player.",e),l({type:u,payload:{groupKey:n}})},o.dataset.sbGroupId=n;try{null==r||r.childNodes.forEach(function(e){var t,i;(null===(t=e.dataset)||void 0===t?void 0:t.sbGroupKey)!==n&&(null===(i=null==e?void 0:e.pause)||void 0===i||i.call(e),r.removeChild(e),y.info("VoicePlayer: Removed other player.",{element:e}))})}finally{null==o||o.play(),null==r||r.appendChild(o),l({type:c,payload:{groupKey:n,audioPlayer:o}}),y.info("VoicePlayer: Succeeded playing audio player.",{groupKey:n,audioPlayer:o})}}).catch(function(e){y.warning("VoicePlayer: Failed loading audio file with URL.",e),l({type:u,payload:{groupKey:n}})})},pause:N,stop:function(e){void 0===e&&(e=""),m.includes(e)&&(y.info("VoicePlayer: Pause playing(by text)."),N(m))},voicePlayerStore:i}},r.createElement("div",{id:a.V,style:{display:"none"}}),n)},N=function(){return(0,r.useContext)(C)}},26701:function(e,n,t){"use strict";t.d(n,{R:function(){return s}});var r=t(67294),i=t(69392);t(12394),t(1608);var a=t(88569),o=t(7585),l=t(1758),s=function(e){var n,t=e.onSubmit,s=void 0===t?function(){}:t,u=e.onCancel,c=e.message,d=e.deleteMessage,h=(0,r.useContext)(o.L).stringSet;return r.createElement(i.M,{type:a.qh.DANGER,disabled:(null===(n=null==c?void 0:c.threadInfo)||void 0===n?void 0:n.replyCount)?c.threadInfo.replyCount>0:void 0,onCancel:u,onSubmit:function(){(c.isUserMessage()||c.isFileMessage()||c.isMultipleFilesMessage())&&d(c).then(function(){s(),u()})},submitText:h.MESSAGE_MENU__DELETE,titleText:(0,l.g)(h,c)})}},79226:function(e,n,t){"use strict";t.d(n,{S:function(){return g}});var r=t(67294),i=t(1608),a=t(43822),o=t(70179),l=t(7585),s=t(56299),u=t(88006),c=t(41238),d=t(17061),h=t(58184),f=t(12394);function m(e){var n=e.member,t=e.isFocused,a=void 0!==t&&t,c=e.parentScrollRef,d=e.onClick,h=e.onMouseOver,f=e.onMouseMove,m=e.renderUserMentionItem,v=(0,r.useRef)(null),p=(0,r.useContext)(l.L).stringSet;return(0,r.useEffect)(function(){a&&(null==c?void 0:c.current)!=null&&(null==v?void 0:v.current)!=null&&(c.current.scrollTop>=v.current.offsetTop||c.current.scrollTop+c.current.clientHeight<=v.current.offsetTop)&&v.current.scrollIntoView({block:"nearest",inline:"nearest"})},[a]),(0,r.useMemo)(function(){if(m)return r.createElement("div",{className:"sendbird-mention-suggest-list__user-item",onClick:function(e){return null==d?void 0:d({event:e,member:n,itemRef:v})},onMouseOver:function(e){return null==h?void 0:h({event:e,member:n,itemRef:v})},onMouseMove:function(e){return null==f?void 0:f({event:e,member:n,itemRef:v})},key:(null==n?void 0:n.userId)||(0,s.u)(),ref:v},m({user:n}))},[m])||r.createElement("div",{className:(0,u.c)("sendbird-mention-suggest-list__user-item",a&&"focu
13sed"),onClick:function(e){return null==d?void 0:d({event:e,member:n,itemRef:v})},onMouseOver:function(e){return null==h?void 0:h({event:e,member:n,itemRef:v})},onMouseMove:function(e){return null==f?void 0:f({event:e,member:n,itemRef:v})},key:(null==n?void 0:n.userId)||(0,s.u)(),ref:v},r.createElement(o.A,{className:"sendbird-mention-suggest-list__user-item__avatar",src:null==n?void 0:n.profileUrl,alt:"user-profile",width:"24px",height:"24px"}),r.createElement(i.L,{className:"sendbird-mention-suggest-list__user-item__nickname",testID:"sendbird-mention-suggest-list__user-item__nickname",type:i.a.SUBTITLE_2,color:(null==n?void 0:n.nickname)?i.b.ONBACKGROUND_1:i.b.ONBACKGROUND_3},(null==n?void 0:n.nickname)||(null==p?void 0:p.MENTION_NAME__NO_NAME)),r.createElement(i.L,{className:"sendbird-mention-suggest-list__user-item__user-id",testID:"sendbird-mention-suggest-list__user-item__user-id",type:i.a.SUBTITLE_2,color:i.b.ONBACKGROUND_2},null==n?void 0:n.userId))}function v(e,n,t,r){return(0,f.a)(this,void 0,void 0,function(){return(0,f.b)(this,function(i){return[2,n.members.sort(function(e,n){var t;return null===(t=e.nickname)||void 0===t?void 0:t.localeCompare(n.nickname)}).filter(function(n){var t;return(null===(t=n.nickname)||void 0===t?void 0:t.toLowerCase().startsWith(r.toLowerCase()))&&n.userId!==e&&n.isActive}).slice(0,t)]})})}function p(e,n,t,r){return(0,f.a)(this,void 0,void 0,function(){return(0,f.b)(this,function(i){return[2,n.createMemberListQuery({limit:t+1,nicknameStartsWithFilter:r}).next().then(function(n){return n.filter(function(n){return e!==(null==n?void 0:n.userId)}).slice(0,t)})]})})}var g=function(e){var n,t,o,f=e.className,g=e.currentChannel,_=e.targetNickname,E=void 0===_?"":_,b=e.onUserItemClick,C=e.onFocusItemChange,y=e.onFetchUsers,N=e.renderUserMentionItem,T=e.inputEvent,S=e.ableAddMention,A=void 0===S||S,I=e.maxMentionCount,M=void 0===I?d.M:I,O=e.maxSuggestionCount,R=void 0===O?d.b:O,w=(0,c.A)(),D=w.config,L=w.stores,P=D.logger,U=(null===(o=null===(t=null===(n=null==L?void 0:L.sdkStore)||void 0===n?void 0:n.sdk)||void 0===t?void 0:t.currentUser)||void 0===o?void 0:o.userId)||"",x=(0,r.useRef)(null),k=(0,l.u)().stringSet,F=(0,r.useState)(null),G=F[0],B=F[1],H=(0,r.useState)(""),V=H[0],j=H[1],z=(0,r.useState)(""),K=z[0],Y=z[1],Z=(0,r.useState)(null),Q=Z[0],W=Z[1],q=(0,r.useState)([]),X=q[0],$=q[1];return((0,r.useEffect)(function(){clearTimeout(null!=G?G:void 0),B(setTimeout(function(){j(E)},300))},[E]),(0,r.useEffect)(function(){if((null==T?void 0:T.key)===h.M.Enter&&Q&&X.length>0&&(null==b||b(Q)),(null==T?void 0:T.key)===h.M.ArrowUp){var e=X.findIndex(function(e){return(null==e?void 0:e.userId)===(null==Q?void 0:Q.userId)});0<e&&(W(X[e-1]),null==C||C(X[e-1]))}if((null==T?void 0:T.key)===h.M.ArrowDown){var e=X.findIndex(function(e){return(null==e?void 0:e.userId)===(null==Q?void 0:Q.userId)});e<X.length-1&&(W(X[e+1]),null==C||C(X[e+1]))}},[T]),(0,r.useEffect)(function(){if(!K||0!==V.indexOf(K)||0!==X.length){if((null==g?void 0:g.isSuper)&&!(null==g?void 0:g.createMemberListQuery)){P.warning("SuggestedMentionList: Creating member list query failed");return}((null==g?void 0:g.isSuper)?p:v)(U,g,R,V.slice(d.a.length)).then(function(e){e.length<1?P.info("SuggestedMentionList: Fetched member list is empty"):(P.info("SuggestedMentionList: Fetching member list succeeded",{memberList:e}),W(e[0])),Y(V),null==y||y(e),$(e)}).catch(function(e){e&&P.error("SuggestedMentionList: Fetching member list failed",e)})}},[null==g?void 0:g.url,null==g?void 0:g.members.map(function(e){return e.nickname}).join(),null==g?void 0:g.members.map(function(e){return e.isActive}).join(),V,R,U,X.length,K]),A||0!==X.length)?r.createElement("div",{className:(0,u.c)("sendbird-mention-suggest-list",f),"data-testid":"sendbird-mention-suggest-list",key:"sendbird-mention-suggest-list",ref:x},A&&(null==X?void 0:X.map(function(e){return r.createElement(m,{key:(null==e?void 0:e.userId)||(0,s.u)(),member:e,isFocused:(null==e?void 0:e.userId)===(null==Q?void 0:Q.userId),parentScrollRef:x,onClick:function(e){var n=e.member;null==b||b(n)},onMouseOver:function(e){W(e.member)},renderUserMentionItem:N})})),!A&&r.createElement("div",{className:"sendbird-mention-suggest-list__notice-item"},r.createElement(a.ZP,{className:"sendbird-mention-suggest-list__notice-item__icon",type:a.Qy.INFO,fillColor:a.zo.ON_BACKGROUND_2,width:"20px",height:"20px"}),r.createElement(i.L,{className:"sendbird-mention-suggest-list__notice-item__text",type:i.a.SUBTITLE_2,color:i.b.ONBACKGROUND_2},k.MENTION_COUNT__OVER_LIMIT.replace("%d",String(M))))):null}},36786:function(e,n,t){"use strict";t.d(n,{a:function(){return r},i:function(){return i}});var r=function(e){return!/Chrome/i.test(e)&&/Safari/i.test(e)},i=function(e){return/iPhone|iPad|iPod/i.test(e)&&(/WebKit/i.test(e)||r(e))}},74535:function(e,n,t){"use strict";t.d(n,{V:function(){return h},a:function(){return m}});var r=t(67294),i=t(28464),a=t(68962),o=t(21790),l=t(43822),s=t(1608),u=t
13(7585),c=t(58972),d=t(88006),h={READY_TO_RECORD:"READY_TO_RECORD",RECORDING:"RECORDING",READY_TO_PLAY:"READY_TO_PLAY",PLAYING:"PLAYING"},f=function(e){switch(e.inputState){case h.READY_TO_RECORD:return r.createElement("div",{className:"sendbird-controler-icon record-icon"});case h.RECORDING:return r.createElement("div",{className:"sendbird-controler-icon stop-icon"});case h.READY_TO_PLAY:return r.createElement(l.ZP,{className:"sendbird-controler-icon play-icon",width:"20px",height:"20px",type:l.Qy.PLAY,fillColor:l.zo.ON_BACKGROUND_1});case h.PLAYING:return r.createElement("div",{className:"sendbird-controler-icon pause-icon"},r.createElement("div",{className:"sendbird-controler-icon pause-icon-inner"}),r.createElement("div",{className:"sendbird-controler-icon pause-icon-inner"}));default:return r.createElement(r.Fragment,null)}},m=function(e){var n=e.minRecordTime,t=void 0===n?c.k:n,m=e.maximumValue,v=e.currentValue,p=void 0===v?0:v,g=e.currentType,_=e.onCancelClick,E=e.onControlClick,b=e.onSubmitClick,C=e.renderCancelButton,y=e.renderControlButton,N=e.renderSubmitButton,T=(0,r.useState)(0),S=T[0],A=T[1],I=(0,r.useMemo)(function(){return g===h.READY_TO_RECORD},[g]),M=(0,r.useMemo)(function(){return g===h.RECORDING},[g]),O=(0,r.useMemo)(function(){return(g===h.READY_TO_RECORD||g===h.RECORDING)&&t>p},[g,t,p]),R=(0,r.useMemo)(function(){return g===h.READY_TO_PLAY||g===h.PLAYING},[g]),w=(0,u.u)().stringSet,D=(0,r.useCallback)(function(){var e=Date.now();e-S>c.j&&(null==E||E(g),A(e))},[g]);return r.createElement("div",{className:"sendbird-voice-message-input"},r.createElement("div",{className:"sendbird-voice-message-input__indicator"},r.createElement("div",{className:"sendbird-voice-message-input__indicator__progress-bar"},r.createElement(a.ko,{className:"sendbird-voice-message-input__indicator__progress-bar__bar",disabled:I,maxSize:m,currentSize:p})),M?r.createElement("div",{className:"sendbird-voice-message-input__indicator__on-rec"}):null,r.createElement(i.S,{className:"sendbird-voice-message-input__indicator__playback-time",time:R?m-p:p,labelColor:I?s.b.ONBACKGROUND_4:s.b.ONCONTENT_1})),r.createElement("div",{className:"sendbird-voice-message-input__controler"},(null==C?void 0:C())||r.createElement(o.Z,{className:"sendbird-voice-message-input__controler__cancel",onClick:function(){var e=Date.now();e-S>c.j&&(null==_||_(),A(e))},disableUnderline:!0},r.createElement(s.L,{type:s.a.BUTTON_1,color:s.b.PRIMARY},w.BUTTON__CANCEL)),(null==y?void 0:y(g))||r.createElement("div",{className:"sendbird-voice-message-input__controler__main",onClick:D},r.createElement(f,{inputState:g})),(null==N?void 0:N())||r.createElement("div",{className:(0,d.c)("sendbird-voice-message-input__controler__submit",O&&"voice-message--disabled"),onClick:function(){var e=Date.now();e-S>c.j&&(O||null==b||b(),A(e))}},r.createElement(l.ZP,{width:"19px",height:"19px",type:l.Qy.SEND,fillColor:O?l.zo.ON_BACKGROUND_4:l.zo.CONTENT}))))}},90903:function(e,n,t){"use strict";t.d(n,{i:function(){return a}});var r=t(72127);function i(e){(0,r.r)(1,arguments);var n=(0,r.t)(e);return n.setHours(0,0,0,0),n}function a(e,n){(0,r.r)(2,arguments);var t=i(e),a=i(n);return t.getTime()===a.getTime()}},76599:function(e,n,t){"use strict";t.d(n,{e:function(){return p},i:function(){return m},n:function(){return f},r:function(){return d},s:function(){return h},u:function(){return N}});var r=t(67294),i=t(27856),a=t(58184),o=t(17061),l=t(12394),s=t(87607),u=t(88477),c=t(56465);function d(e){var n=e.userId,t=e.nickname,r='<span data-userid="'.concat(n,'" data-sb-mention="true" class="').concat(s.M,'">').concat(t,"</span>"),a=i(window).sanitize(r).split(" "),o=a[0],u=a.slice(1);return(0,l.c)([o,'contenteditable="false"'],u,!0).join(" ")}var h=function(e){return null==e?void 0:e.replace(/[\u00A0-\u9999<>]/gim,function(e){return"".concat("&#",String(e.charCodeAt(0)),";")})},f=function(e){return e?Array.from(e):[]};function m(e){var n;return e&&(null===(n=e.isGroupChannel)||void 0===n?void 0:n.call(e))&&!e.isBroadcast&&!e.isSuper}function v(e){return e.nodeType===a.N.ElementNode}function p(e){var n="",t="";return e.forEach(function(e){if(v(e)&&e.nodeName===a.a.Span){var r=e.innerText,i=e.dataset,l=(void 0===i?{}:i).userid;n+=r,t+="".concat(o.a,"{").concat(void 0===l?"":l,"}")}else if(v(e)&&e.nodeName===a.a.Br)n+="\n",t+="\n";else if(v(e)&&e.nodeName===a.a.Div){var s=e.textContent,u=void 0===s?"":s;
13n+="\n".concat(u),t+="\n".concat(u)}else{var c=e.textContent,u=void 0===c?"":c;n+=u,t+=u}}),{messageText:n,mentionTemplate:t}}var g="sendbird-uikit__paste-node",_="sendbird-word__mention",E="sendbird-mention-user-label",b=".".concat(_,", .").concat(E);function C(e,n){return(0,l.c)([e],Array.from(e.querySelectorAll(n)),!0).find(function(e){return e.matches(n)})}var y=function(e){var n="";return e.forEach(function(e){var t=e.querySelectorAll(".".concat("sendbird-word"));t.length>0&&(n+=y(Array.from(t))+" "),n+=e.innerText+" "}),n};function N(e){var n=e.ref,t=e.setIsInput,a=e.channel,o=e.setMentionedUsers;return(0,r.useCallback)(function(e){e.preventDefault();var n=e.clipboardData.getData("text/html");if(!n){var r,s=e.clipboardData.getData("text")||(0===(r=e.clipboardData.getData("text/uri-list")).length?"":r.split("\n").reduce(function(e,n){var t=n.trim();return""===t||t.startsWith("#")||(e+=t+"\n"),e},""));document.execCommand("insertText",!1,h(s)),t(!0);return}var m=i(window).sanitize(n),v=((p=document.body.querySelector("#".concat(g)))&&(null==p||p.remove()),(N=document.createElement("div")).id=g,N.style.display="none",N);if(v){if(v.innerHTML=m,!(null!=v&&v.querySelector(b))){var p,N,T,S,A,I,s=y(Array.from(v.children));document.execCommand("insertText",!1,h(s)),v.remove(),t(!0);return}var M=null==(T=function(e){var n=C(e,".".concat(c.O));if(n)return f(n.childNodes);var t=C(e,".".concat(u.T));return t?f(t.childNodes):f(e.childNodes)}(v))?void 0:T.reduce(function(e,n){var t,r,i,a=null==n?void 0:n.innerText;if(n instanceof Text&&(i=!1,a=null!==(t=n.textContent)&&void 0!==t?t:""),n instanceof HTMLElement&&(i=n.classList.contains(_)||n.classList.contains(E)?n:n.querySelector(b)),i){var o=null==n?void 0:n.innerText,s=null===(r=i.dataset)||void 0===r?void 0:r.userid;return(0,l.c)((0,l.c)([],e,!0),[{text:o,userId:s}],!1)}return(0,l.c)((0,l.c)([],e,!0),[{text:a}],!1)},[]);o(a.isGroupChannel()?(S={},A=a.members,M.forEach(function(e){if(e.userId){var n=A.find(function(n){return n.userId===e.userId});n&&(S[e.userId]=n)}}),Object.values(S)):[]),I=M.map(function(e){var n=e.text,t=e.userId;return t?d({userId:t,nickname:n}):h(n)}).join(" ").concat(" "),document.execCommand("insertHTML",!1,I),v.remove()}t(!0)},[n,t,a,o])}},9434:function(e,n,t){"use strict";t.d(n,{M:function(){return M},a:function(){return L},b:function(){return P}});var r=t(67294),i=t(49805),a=t(69561),o=t(70179),l=t(13462),s=t(26748),u=t(88006),c=t(12394),d=t(34835),h=t(50206),f=t(12210),m=t(64228),v=t(71612),p=t(48845),g=t(33709),_=t(49754),E=t(88569),b=t(1608),C=t(21402),y=t(7585),N=t(43822),T=t(41238),S=t(88477),A=t(16267),I=t(58972);function M(e){var n=e.className,t=void 0===n?"":n,c=e.isByMe,d=e.displayThreadReplies,h=e.bottom,f=e.message,m=e.channel,v=e.userId,p=e.chainBottom,g=(0,r.useRef)(null),_=(0,s.u)(),E=_.disableUserProfile,b=_.renderUserProfile;return c||void 0!==p&&p||!(0,i.k)(f)?null:r.createElement(a.C,{menuTrigger:function(e){var n,i;return r.createElement(o.A,{className:(0,u.c)(t,d&&"use-thread-replies"),src:(null===(i=null===(n=null==m?void 0:m.members)||void 0===n?void 0:n.find(function(e){return(null==e?void 0:e.userId)===f.sender.userId}))||void 0===i?void 0:i.profileUrl)||f.sender.profileUrl||"",ref:g,width:"28px",height:"28px",bottom:h,onClick:function(){E||e()}})},menuItems:function(e){return b?b({user:f.sender,close:e,currentUserId:v,avatarRef:g}):r.createElement(a.b,{parentRef:g,parentContainRef:g,closeDropdown:e,style:{paddingTop:"0px",paddingBottom:"0px"}},r.createElement(l.Z,{user:f.sender,onSuccess:e}))}})}var O=function(e){var n=e.children;return r.createElement(b.L,{className:"sendbird-form-message__input__label",type:b.a.CAPTION_2,color:b.b.ONBACKGROUND_2},n)},R=function(e){var n=e.name,t=e.required,i=e.errorMessage,a=e.isValid,o=e.values,l=e.isInvalidated,s=e.isSubmitTried,c=e.style,d=e.onFocused,h=e.onChange,f=e.placeHolder,m=e.isSubmitted,v=c.layout,p=c.options,g=void 0===p?[]:p,_=c.resultCount,E=null!=_?_:{},C=E.min,T=void 0===C?1:C,S=E.max,A=void 0===S?1:S,I=m?g.map(function(e){return{state:o.includes(e)?"submittedSelected":"submittedDefault",option:e}}):g.map(function(e){return{state:o.includes(e)?"selected":"default",option:e}}),M=(0,r.useContext)(y.L).stringSet,R=function(){null==d||d(!0)},w=function(){null==d||d(!1)},D=function(e){m||h(1===T&&1===A?"selected"===I[e].state?[]:[I[e].option]:I.reduce(function(n,t,r){return r===e?"default"===t.state&&o.length<A&&n.push(t.option):"selected"===t.state&&n.push(t.option),n},[]))};return r.createElement("div",{className:"sendbird-form-message__input__root"},r.createElement(O,null,r.createElement("div",{className:"sendbird-form-message__input__title-container"},n," ",!t&&r.createElement("span",{className:"sendbird-form-message__input__title-optional"},"(optional)"))),r.createElement("div",{className:"sendbird-input_for_form"},function(){switch(v){case"chip":return r.createElement("div",{className:"sendbird-form-message__input__chip-container"},I.map(function(e,n){return r.createElement("div",{className:"sendbird-form-message__input__chip ".concat(e.state),key:n,onClick:function(){return D(n)}},r.createElement("div",{className:"sendbird-form-message__input__chip-text"},e.option),m&&"submittedSelected"===e.state&&r.createElement(N.ZP,{className:"sendbird-form-message__submitted-check-icon-chip",type:N.Qy.DONE,fillColor:N.zo.SECONDARY_2,width:"20px",height:"20px"}))}));case"textarea":var e=o.length>0?o[0]:"";return r.createElement("div",{className:"sendbird-form-message__input__c
13ontainer"},m?r.createElement("div",{className:"sendbird-form-message__submitted-input-box textarea"},r.createElement("div",{className:"sendbird-form-message__submitted-input-box-text"},e),a&&r.createElement("div",{className:"sendbird-form-message__submitted-check-icon-container"},r.createElement(N.ZP,{type:N.Qy.DONE,fillColor:N.zo.SECONDARY_2,width:"20px",height:"20px"})),!e&&r.createElement(b.L,{className:"sendbird-input__placeholder",type:b.a.BODY_1,color:b.b.ONBACKGROUND_3},M.FORM_ITEM_OPTIONAL_EMPTY)):r.createElement(r.Fragment,null,r.createElement("textarea",{className:(0,u.c)("sendbird-input__input",!!i&&"error","sendbird-form-message__input__textarea"),required:t,disabled:m,value:e,onFocus:R,onBlur:w,onChange:function(e){var n=e.target.value;h(n?[n]:[])}}),f&&!e&&r.createElement(b.L,{className:"sendbird-input__placeholder textarea",type:b.a.BODY_1,color:b.b.ONBACKGROUND_3},f)));case"text":case"number":case"phone":case"email":var e=o.length>0?o[0]:"";return r.createElement("div",{className:"sendbird-form-message__input__container"},m?r.createElement("div",{className:"sendbird-form-message__submitted-input-box"},r.createElement("div",{className:"sendbird-form-message__submitted-input-box-text"},e),a&&r.createElement("div",{className:"sendbird-form-message__submitted-check-icon-container"},r.createElement(N.ZP,{type:N.Qy.DONE,fillColor:N.zo.SECONDARY_2,width:"20px",height:"20px"})),!e&&r.createElement(b.L,{className:"sendbird-input__placeholder",type:b.a.BODY_1,color:b.b.ONBACKGROUND_3},M.FORM_ITEM_OPTIONAL_EMPTY)):r.createElement(r.Fragment,null,r.createElement("input",{type:"number"===v?"text":v,inputMode:"number"===v?"numeric":"text",className:"sendbird-input__input ".concat(i?"error":""),name:n,required:t,disabled:m,value:e,onFocus:R,onBlur:w,onChange:function(e){var n=e.target.value;h(n?[n]:[])}}),f&&!e&&r.createElement(b.L,{className:"sendbird-input__placeholder",type:b.a.BODY_1,color:b.b.ONBACKGROUND_3},f)));default:return r.createElement(r.Fragment,null)}}(),i&&(s||l)&&r.createElement(b.L,{className:"sendbird-form-message__error-label",type:b.a.CAPTION_3},i)))},w=function(e){var n=e.isByMe,t=e.text;return r.createElement("div",{className:(0,i.x)(["sendbird-unknown-message-item-body",n?"outgoing":"incoming"])},r.createElement(b.L,{className:"sendbird-unknown-message-item-body__description",type:b.a.BODY_1,color:n?b.b.ONCONTENT_3:b.b.ONBACKGROUND_3},t))};function D(e){var n=this,t=e.message,a=e.form,o=e.isByMe,l=a.items,s=a.id,u=(0,r.useContext)(y.L).stringSet,d=(0,T.A)().config.logger,h=(0,r.useState)(!1),f=h[0],m=h[1],v=(0,r.useState)(!1),p=v[0],g=v[1],_=(0,r.useState)(function(){var e=[];return l.forEach(function(n){var t=n.required,r=n.style,i=r.layout,a=r.defaultOptions;e.push({draftValues:"chip"===i?void 0===a?[]:a:[],required:t,errorMessage:null,isInvalidated:!1})}),e}),N=_[0],I=_[1],M=a.isSubmitted,O=N.some(function(e){return!!e.errorMessage}),D=N.some(function(e){return e.isInvalidated}),L=(0,r.useCallback)(function(){return(0,c.a)(n,void 0,void 0,function(){var e;return(0,c.b)(this,function(n){switch(n.label){case 0:g(!0),n.label=1;case 1:if(n.trys.push([1,3,,4]),N.some(function(e){return e.errorMessage}))return[2];if(N.some(function(e){return e.required&&(!e.draftValues||0===e.draftValues.length)}))return I(function(e){return e.map(function(e){return e.required&&0===e.draftValues.length?(0,c._)((0,c._)({},e),{errorMessage:u.FORM_ITEM_REQUIRED}):e})}),[2];return N.forEach(function(e,n){l[n].draftValues=e.draftValues}),[4,t.submitMessageForm()];case 2:return n.sent(),[3,4];case 3:return e=n.sent(),m(!0),null==d||d.error(e),[3,4];case 4:return[2]}})})},[N,t.messageId,t.submitMessageForm,s]);return(0,A.f)(a.version)?r.createElement("div",{className:(0,i.x)(["".concat(S.T," disable-hover"),"sendbird-form-message__root","incoming"])},l.map(function(e,n){var t,i=e.name,a=e.placeholder,o=e.id,l=e.required,s=e.style,d=N[n],h=d.draftValues,f=d.errorMessage;return r.createElement(R,{key:o,style:s,placeHolder:a,values:null!==(t=e.submittedValues)&&void 0!==t?t:void 0===h?[]:h,isInvalidated:N[n].isInvalidated,isSubmitTried:p,errorMessage:f,isValid:M,isSubmitted:M,name:i,required:l,onFocused:function(e){!f||e||N[n].isInvalidated?f||I(function(e){var t=e.slice(0);return t[n]=(0,c._)((0,c._)({},t[n]),{isInvalidated:!1}),t}):I(function(e){var t=e.slice(0);return t[n]=(0,c._)((0,c._)({},t[n]),{isInvalidated:!0}),t})},onChange:function(t){I(function(r){var i=r.slice(0);return i[n]=(0,c._)((0,c._)({},i[n]),{draftValues:t,errorMessage:e.isValid(t)?l&&0===t.length?u.FORM_ITEM_REQUIRED:null:u.FORM_ITEM_INVALID}),i})}})}),r.createElement(E.ZP,{className:"sendbird-form-message__submit-button",onClick:L,disabled:O&&(p||D)||M,labelType:b.a.BUTTON_2,labelColor:b.b.ONCONTENT_1},M?"Submitted successfully":"Submit"),f&&r.createElement(C.Z,{text:"Submit failed.",onCancel:function(){m(!1)}}
13)):r.createElement(w,{isByMe:o,text:u.FORM_VERSION_ERROR})}var L=function(e){var n,t=e.className,a=void 0===t?"sendbird-message-content__middle__message-item-body":t,o=e.message,l=e.channel,s=e.showFileViewer,u=e.onMessageHeightChange,E=e.onBeforeDownloadFileMessage,b=e.mouseHover,C=e.isMobile,y=e.config,N=e.isReactionEnabledInChannel,T=e.isByMe,S=null!==(n=e.customSubcomponentsProps)&&void 0!==n?n:{},A=(0,m.u)({isMobile:C}),M=(0,m.a)(o),O=(0,i.n)(),R=(null==l?void 0:l.isGroupChannel())&&y.groupChannel.enableOgtag,w=(null==l?void 0:l.isGroupChannel())&&y.groupChannel.enableFormTypeMessage,L=function(){return r.createElement(g.Z,{className:a,message:o,isByMe:T,mouseHover:b,isReactionEnabled:N})};return(0,i.K)(o).when(function(e){return w&&(0,i.O)(e)},function(){return r.createElement(D,{isByMe:T,message:o,form:o.messageForm})}).when(i.C,function(){var e,n,t=o.extendedMessagePayload[I.i];return(0,i.Q)(t)?r.createElement(_.EC,{className:a,message:o,isByMe:T,theme:null==y?void 0:y.theme}):(null===(n=null===(e=y.logger)||void 0===e?void 0:e.error)||void 0===n||n.call(e,"TemplateMessageItemBody: invalid type value in message.extendedMessagePayload.message_template.",t),L())}).when(function(e){return R&&(0,i.k)(e)&&(0,i.M)(e)},function(){var e;return r.createElement(d.Z,{className:a,message:o,isByMe:T,mouseHover:b,isMentionEnabled:null!==(e=y.groupChannel.enableMention)&&void 0!==e&&e,isReactionEnabled:N,onMessageHeightChange:u,isMarkdownEnabled:y.groupChannel.enableMarkdownForUserMessage})}).when(i.Z,function(){var e;return r.createElement(h.Z,{className:a,message:o,isByMe:T,mouseHover:b,isMentionEnabled:null!==(e=y.groupChannel.enableMention)&&void 0!==e&&e,isReactionEnabled:N,isMarkdownEnabled:y.groupChannel.enableMarkdownForUserMessage})}).when(function(e){return(0,i.m)(e)===O.FILE},function(){return r.createElement(f.Z,{className:a,message:o,isByMe:T,mouseHover:b,isReactionEnabled:N,onBeforeDownloadFileMessage:E})}).when(i.c,function(){var e;return r.createElement(m.M,(0,c._)({className:a,message:o,isByMe:T,mouseHover:b,isReactionEnabled:N,threadMessageKindKey:A,statefulFileInfoList:M,onBeforeDownloadFileMessage:E},null!==(e=S.MultipleFilesMessageItemBody)&&void 0!==e?e:{}))}).when(i.i,function(){var e;return r.createElement(v.C,{className:a,message:o,channelUrl:null!==(e=null==l?void 0:l.url)&&void 0!==e?e:"",isByMe:T,isReactionEnabled:N})}).when(i.p,function(){var e;return r.createElement(p.Z,(0,c._)({className:a,message:o,isByMe:T,mouseHover:b,isReactionEnabled:N,showFileViewer:s,style:C?{width:"100%"}:{}},null!==(e=S.ThumbnailMessageItemBody)&&void 0!==e?e:{}))}).otherwise(function(){return L()})},P=function(e){var n,t,a=e.channel,o=e.message;return r.createElement(b.L,{className:"sendbird-message-content__middle__sender-name",type:b.a.CAPTION_2,color:b.b.ONBACKGROUND_2},(null===(t=null===(n=null==a?void 0:a.members)||void 0===n?void 0:n.find(function(e){var n;return(null==e?void 0:e.userId)===(null===(n=null==o?void 0:o.sender)||void 0===n?void 0:n.userId)}))||void 0===t?void 0:t.nickname)||(0,i.e)(o))}},30094:function(e,n,t){"use strict";t.d(n,{G:function(){return u}});var r=t(67294),i=t(25494),a=t(41238),o=t(34600),l=t(10364),s=t(15956),u=function(e){var n=e.renderHeader,t=e.renderPlaceHolderError,s=e.renderPlaceHolderLoading,u=e.renderPlaceHolderEmptyList,d=e.onChangeTheme,h=e.onUserProfileUpdated,f=e.allowProfileEdit,m=e.channels,v=e.onLoadMore,p=e.initialized,g=e.renderChannel,_=e.renderAddChannel,E=(0,r.useState)(!1),b=E[0],C=E[1],y=(0,a.A)().stores,N={addChannel:_,channel:g,placeholder:{loading:function(){return p?null:s?s():r.createElement(l.Z,{type:l.v.LOADING})},empty:function(){return p?u?u():r.createElement(l.Z,{type:l.v.NO_CHANNELS}):null},error:function(){return p&&y.sdkStore.error?t?t():r.createElement(l.Z,{type:l.v.WRONG}):null}}};return r.createElement(r.Fragment,null,r.createElement("div",{className:"sendbird-channel-list__header"},(null==n?void 0:n())||r.createElement(i.o,{onEdit:function(){return f&&C(!0)},allowProfileEdit:f,renderIconButton:function(){return N.addChannel()}})),b&&r.createElement(o.Z,{onThemeChange:d,onCancel:function(){return C(!1)},onEditProfile:function(e){C(!1),h(e)}}),r.createElement(c,{data:m,renderItem:N.channel,onLoadMore:v,placeholderLoading:N.placeholder.loading(),placeholderEmpty:N.placeholder.empty(),placeholderError:N.placeholder.error()}))},c=function(e){var n=e.data,t=e.renderItem,i=e.onLoadMore,a=e.placeholderLoading,o=e.placeholderError,l=e.placeholderEmpty,u=(0,s.u)({onReachedBottom:function(){return null==i?void 0:i()}});return r.createElement("div",{className:"sendbird-channel-list__body",onScroll:u},o,r.createElement("div",null,n.map(function(e,n){return t({item:e,index:n})})),a,0===n.length&&l)}},14761:function(e,n,t){"use strict";function r(e){var n=e.channel,t=e.config,r=e.moduleLevel;return!!n&&!n.isBroadcast&&!n.isEphemeral&&(n.isSuper?null!=r?r:t.groupChannel.enableReactionsSupergroup:null!=r?r:t.groupChannel.enableReactions)}t.d(n,{g:function(){return r}})},67315:function(e,n,t){"use strict";t.d(n,{u:function(){return l}});var r=t(12394),i=t(67294),a=t(43847);function o(e){e&&"touches"in e&&e.touches.length<2&&e.preventDefault&&e.preventDefault()}function l(e,n){var t=e.onLongPress,l=e.onClick,s=void 0===n?{}:n,u=s.delay,c=void 0===u?300:u,d=s.shouldPreventDefault,h=void 0===d||d,f=s.shouldStopPropagation,m=void 0!==f&&f,v=(0,a.u)().isMobile,p=(0,i.useState)(!1),g=p[0],_=p[1],E=(0,i.useState)(!1),b=E[0],C=E[1],y=(0,i.useRef)(),N=(0,i.useRef)(),T=(0,i.useCallback)(function(e){e.persist();var n=(0,r._)({},e);C(!1),m&&e.stopPropagation(),h&&e.target&&(e.target.addEventListener("touchend",o,{passive:!1}),N.current=e.target),y.current=setTimeout(function(){t(n),_(!0)},c)},[t,c,h,m,v]),S=(0,i.useCallback)(function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t=!1),t?C(!0):C(!1),(null==y?void 0:y.current)&&clearTimeout(y.current),!n||g||b||null==l||l(e),_(!1),h&&N.current&&N.current.removeEventListener("touchend",o)},[h,l,g,b]);return{onMouseDown:function(e){return T(e)},onMouseUp:function(e){return S(e)},onMouseLeave:function(e){return S(e,!1)},onTouchStart:function(e){return T(e)},onTouchMove:function(e){return S(e,!1,!0)},onTouchEnd:function(e){return S(e)}}}},30402:function(e,n,t){"use strict";t.d(n,{M:function(){return C}});var r=t(12394),i=t(67294),a=t(11228),o=t(7585),l=t(41238),s=t(17061),u=t(16267),c=t(66421),d=t(49805),h=t(8743),f=t(1608),m=t(65134),v=t(58184),p=t(3533),g=t(52597),_=t(79226),E=t(88006),b=function(e,n){var t=(0,i.useState)(!1),r=t[0],a=t[1];(0,i.useEffect)(function(){r?e():a(!0)},n)},C=function(e){var n,t,C=e.message,y=e.children,N=e.hasSeparator,T=e.chainTop,S=e.chainBottom,A=e.handleScroll,I=e.channel,M=e.emojiContainer,O=e.editInputDisabled,R=e.shouldRenderSuggestedReplies,w=e.isReactionEnabled,D=e.replyType,L=e.threadReplySelectType,P=e.nicknamesMap,U=e.scrollToMessage,x=e.toggleReaction,k=e.setQuoteMessage,F=e.onQuoteMessageClick,G=e.onReplyInThreadClick,B=e.onBeforeDownloadFileMessage,H=e.sendUserMessage,V=e.updateUserMessage,j=e.resendMessage,z=e.deleteMessage,K=e.setAnimatedMessageId,Y=e.animatedMessageId,Z=e.onMessageAnimated,Q=e.usedInLegacy,W=void 0===Q||Q,q=(0,E.d)(e),X=q.renderUserMentionItem,$=q.renderMessage,J=q.renderMessageContent,ee=q.renderSuggestedReplies,en=q.renderCustomSeparator,et=q.renderEditInput,er=q.renderFileViewer,ei=q.renderRemoveMessageModal,ea=q.filterEmojiCategoryIds,eo=(0,o.u)(),el=eo.dateLocale,es=eo.stringSet,eu=(0,l.A)().config,ec=eu.userId,ed=eu.isOnline,eh=eu.userMention,ef=eu.logger,em=eu.groupChannel,ev=(null==eh?void 0:eh.maxMentionCount)||s.M,ep=(null==eh?void 0:eh.maxSuggestionCount)||s.b,eg=(0,i.useState)(!1),e_=eg[0],eE=eg[1],eb=(0,i.useState)(!1),eC=eb[0],ey=eb[1],eN=(0,i.useState)(!1),eT=eN[0],eS=eN[1],eA=(0,i.useState)(!1),eI=eA[0],eM=eA[1],eO=(0,i.useState)(""),eR=eO[0],ew=eO[1],eD=(0,i.useState)([]),eL=eD[0],eP=eD[1],eU=(0,i.useState)([]),ex=eU[0],ek=eU[1],eF=(0,i.useState)(null),eG=eF[0],eB=eF[1],eH=(0,i.useState)(null),eV=eH[0],ej=eH[1],ez=(0,i.useState)([]),eK=ez[0],eY=ez[1],eZ=(0,i.useRef)(null),eQ=(0,i.useRef)(null),eW=ed&&em.enableMention&&eR.length>0&&!(0,u.i)(I)&&!(0,u.a)(I),eq=(0,c.X)({ref:eZ},{logger:ef}),eX=(null==eq?void 0:eq.length)<ev;(0,i.useEffect)(function(){eP(eL.filter(function(e){var n=e.userId,t=ex.indexOf(n);return!(t<0)&&(ex.splice(t,1),!0)}))},[ex]),b(function(){null==A||A()},[e_,null===(n=null==C?void 0:C.reactions)||void 0===n?void 0:n.length]),b(function(){null==A||A(!0)},[null==C?void 0:C.updatedAt,null==C?void 0:C.message]);var e$=(0,i.useRef)(R);(0,i.useEffect)(function(){e$.current!==R?null==A||A():e$.current=R},[R]),(0,i.useLayoutEffect)(function(){W&&(null==A||A(!0))},[]),(0,i.useLayoutEffect)(function(){var e=[];return Y===C.messageId&&(null==eQ?void 0:eQ.current)?(e.push(setTimeout(function(){eM(!0)},500)),e.push(setTimeout(function(){K(null),null==Z||Z()},1600))):eM(!1),function(){e.forEach(function(e){return clearTimeout(e)})}},[Y,eQ.current,C.messageId]);var eJ=(0,i.useMemo)(function(){var e;return null!==(e=null==en?void 0:en({message:C}))&&void 0!==e?e:null},[C,en]);return e_&&(null===(t=null==C?void 0:C.isUserMessage)||void 0===t?void 0:t.call(C))?(null==et?void 0:et())||i.createElement(i.Fragment,null,eW&&i.createElement(_.S,{currentChannel:I,targetNickname:eR,inputEvent:null!=eG?eG:void 0,renderUserMentionItem:X,onUserItemClick:function(e){e&&eP((0,r.c)((0,r.c)([],eL,!0),[e],!1)),ew(""),ej(e),eB(null)},onFocusItemChange:function(){eB(null)},onFetchUsers:function(e){eY(e)},ableAddMention:eX,maxMentionCount:ev,maxSuggestionCount:ep}),i.createElement(m.Z,{isEdit:!0,channel:I,disabled:O,ref:eZ,mentionSelectedUser:eV,isMentionEnabled:em.enableMention,message:C,onStartTyping:function(){var e;null===(e=null==I?void 0:I.startTyping)||void 0===e||e.call(I)},onUpdateMessage:function(e){var n;V(e.messageId,{message:e.message,mentionedUsers:eL,mentionedMessageTemplate:e.mentionTemplate}),eE(!1),null===(n=null==I?void 0:I.endTyping)||void 0===n||n.call(I)},onCancelEdit:function(){var e;ew(""),eP([]),ek([]),eY([]),eE(!1),null===(e=null==I?void 0:I.endTyping)||void 0===e||e.call(I)},onUserMentioned:function(e){(null==eV?void 0:eV.userId)===(null==e?void 0:e.userId)&&(ej(null),ew(""))},onMentionStringChange:function(e){ew(e)},onMentionedUserIdsUpdated:function(e){ek(e)},onKeyDown:function(e){return!!eW&&(null==eK?void 0:eK.length)>0&&(e.key===v.M.Enter&&!!eX||e.key===v.M.ArrowUp||e.key===v.M.ArrowDown)&&(eB(e),!0)}})):i.createElement("div",{className:(0,E.c)("sendbird-msg-hoc sendbird-msg--scroll-ref",eI&&"sendbird-msg-hoc__animated"),"data-testid":"sendbird-message-view",style:y||$?void 0:{marginBottom:"2px"},"data-sb-message-id":C.messageId,"data-sb-created-at":C.createdAt,ref:eQ},N&&(eJ||i.createElement(h.Z,null,i.createElement(f.L,{type:f.a.CAPTION_2,color:f.b.ONBACKGROUND_2},(0,a.f)(C.createdAt,es.DATE_FORMAT__MESSAGE_LIST__DATE_SEPARATOR,{locale:el})))),y||($?$((0,r._)((0,r._)({},e),{renderMessage:void 0})):i.createElement(i.Fragment,null,(void 0===J?function(e){return i.createElement(p.En,(0,r._)({},e))}:J)({className:"sendbird-message-hoc__message-content",userId:ec,scrollToMessage:U,channel:I,message:C,disabled:!ed,chainTop:T,chainBottom:S,isReactionEnabled:w,replyType:D,threadReplySelectType:L,nicknamesMap:P,emojiContainer:M,showEdit:eE,showRemove:ey,showFileViewer:eS,resendMessage:j,deleteMessage:z,toggleReaction:x,setQuoteMessage:k,onReplyInThread:G,onQuoteMessageClick:F,onMessageHeightChange:A,onBeforeDownloadFileMessage:B,filterEmojiCategoryIds:ea}),R&&(void 0===ee?function(e){return i.createElement(g.Z,(0,r._)({},e))}:ee)({replyOptions:(0,d.g)(C),onSendMessage:H,type:null==em?void 0:em.suggestedRepliesDirection}
13),eC&&(null==ei?void 0:ei({message:C,onCancel:function(){return ey(!1)}})),eT&&er({message:C,onCancel:function(){return eS(!1)}}))))}},64228:function(e,n,t){"use strict";t.d(n,{M:function(){return p},a:function(){return E},u:function(){return _}});var r=t(67294),i=t(12394),a=t(36614),o=t(41238),l=t(43822),s=t(4399),u=t(49805),c=t(6989);function d(e){var n,t=e.children,i=e.className,a=e.message,o=e.isReactionEnabled;return r.createElement("div",{className:"sendbird-image-grid-wrap"},r.createElement("div",{className:(0,u.x)([null!=i?i:"","sendbird-image-grid",o&&(null===(n=null==a?void 0:a.reactions)||void 0===n?void 0:n.length)>0?"reactions":""])},t))}var h={CHAT_WEB:"calc(".concat(200,"px - ").concat(6,"px)"),CHAT_MOBILE:"calc(50vw - ".concat(77,"px)"),THREAD_PARENT_WEB:"calc(".concat(118,"px)"),THREAD_PARENT_MOBILE:"calc(50vw - ".concat(42,"px)"),THREAD_CHILD_WEB:"calc(".concat(94,"px)"),THREAD_CHILD_MOBILE:"calc(50vw - ".concat(72,"px)")},f={CHAT_WEB:"6px",CHAT_MOBILE:"6px",THREAD_PARENT_WEB:"6px",THREAD_PARENT_MOBILE:"6px",THREAD_CHILD_WEB:"6px",THREAD_CHILD_MOBILE:"6px"},m="34px",v={PARENT:"parent",CHILD:"child"};function p(e){var n,t,l=this,m=e.className,v=e.message,p=e.isReactionEnabled,_=e.threadMessageKindKey,E=e.statefulFileInfoList,b=void 0===E?[]:E,C=e.onBeforeDownloadFileMessage,y=void 0===C?null:C,N=null===(t=null===(n=null===o.A||void 0===o.A?void 0:(0,o.A)())||void 0===n?void 0:n.config)||void 0===t?void 0:t.logger,T=(0,r.useState)(-1),S=T[0],A=T[1];return _?r.createElement(r.Fragment,null,S>-1&&r.createElement(c.Z,{message:v,statefulFileInfoList:b,currentIndex:S,onClickLeft:function(){A(0===S?b.length-1:S-1)},onClickRight:function(){A(S===b.length-1?0:S+1)},onClose:function(){A(-1)},onDownloadClick:function(e){return(0,i.a)(l,void 0,void 0,function(){var n,t,r;return(0,i.b)(this,function(i){switch(i.label){case 0:if(!y)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,y({message:v,index:S})];case 2:return i.sent()||(e.preventDefault(),null===(t=null==N?void 0:N.info)||void 0===t||t.call(N,"MultipleFilesMessageItemBody: Not allowed to download.")),[3,4];case 3:return n=i.sent(),null===(r=null==N?void 0:N.error)||void 0===r||r.call(N,"MultipleFilesMessageItemBody: Error occurred while determining download continuation:",n),[3,4];case 4:return[2]}})})}}),r.createElement(d,{className:m,message:v,isReactionEnabled:void 0!==p&&p},b.map(function(e,n){var t,i,o,l;return r.createElement("div",{className:"sendbird-multiple-files-image-renderer-wrapper",onClick:v.sendingStatus===a.ao.SUCCEEDED?function(){return A(n)}:void 0,key:"sendbird-multiple-files-image-renderer-".concat(n,"-").concat(e.url)},r.createElement(s.ZP,{url:null!==(l=null!==(o=null===(i=null===(t=e.thumbnails)||void 0===t?void 0:t[0])||void 0===i?void 0:i.url)&&void 0!==o?o:e.url)&&void 0!==l?l:"",fixedSize:!1,width:h[_],maxSideLength:h.CHAT_WEB,height:h[_],borderRadius:(0,s.Mh)(f[_],n,b.length),shadeOnHover:!0,isUploaded:!!e.isUploaded,placeHolder:function(n){var t=n.style;return e.mimeType&&(0,u.z)(e.mimeType)?r.createElement(g.GIF,{style:t}):r.createElement(g.Default,{style:t})},defaultComponent:r.createElement(g.LoadError,null)}))}))):r.createElement(r.Fragment,null)}var g={Default:function(e){var n=e.style;return r.createElement("div",{className:"sendbird-multiple-files-image-renderer__thumbnail__placeholder",style:n},r.createElement(l.ZP,{type:l.Qy.PHOTO,fillColor:l.zo.ON_BACKGROUND_2,width:m,height:m}))},GIF:function(e){var n=e.style;return r.createElement("div",{className:"sendbird-multiple-files-image-renderer__thumbnail__placeholder",style:n},r.createElement("div",{className:"sendbird-multiple-files-image-renderer__thumbnail__placeholder__icon"},r.createElement(l.ZP,{type:l.Qy.GIF,fillColor:l.zo.THUMBNAIL_ICON,width:m,height:m})))},LoadError:function(){return r.createElement("div",{className:"sendbird-multiple-files-image-renderer__thumbnail__placeholder"},r.createElement(l.ZP,{type:l.Qy.THUMBNAIL_NONE,fillColor:l.zo.ON_BACKGROUND_2,width:m,height:m}))}};function _(e){var n=e.threadMessageKind,t=e.isMobile;return(0,r.useMemo)(function(){return(0,u.K)(n).with(v.PARENT,function(){return t?"THREAD_PARENT_MOBILE":"THREAD_PARENT_WEB"}).with(v.CHILD,function(){return t?"THREAD_CHILD_MOBILE":"THREAD_CHILD_WEB"}).otherwise(function(){return t?"CHAT_MOBILE":"CHAT_WEB"})},[t,n])}var E=function(e){var n,t,o=(0,r.useRef)(new Map),l=function(e,n){return!o.current.has(e)&&n&&o.current.set(e,U
13RL.createObjectURL(n)),o.current.get(e)},s=function(){o.current.size>0&&(o.current.forEach(function(e){return URL.revokeObjectURL(e)}),o.current.clear())};return((0,r.useEffect)(function(){return function(){return s()}},[]),e&&e.isMultipleFilesMessage&&e.isMultipleFilesMessage())?e.sendingStatus===a.ao.SUCCEEDED?(s(),e.fileInfoList.map(function(e){var n,t;return(0,i._)((0,i._)({},e),{url:e.url,isUploaded:!0,mimeType:null!==(n=e.mimeType)&&void 0!==n?n:void 0,fileName:null!==(t=e.fileName)&&void 0!==t?t:void 0})})):null!==(t=null===(n=null==e?void 0:e.messageParams)||void 0===n?void 0:n.fileInfoList.map(function(e,n){var t,r;return(0,i._)((0,i._)({},e),{url:null!==(r=null!==(t=l(n))&&void 0!==t?t:e.fileUrl)&&void 0!==r?r:e.file instanceof Blob?l(n,e.file):void 0,isUploaded:!e.file&&"string"==typeof e.fileUrl&&e.fileUrl.length>0})}))&&void 0!==t?t:[]:[]}},7585:function(e,n,t){"use strict";t.d(n,{L:function(){return v},a:function(){return p},l:function(){return f},u:function(){return g}});var r,i=t(12394),a=t(67294),o=t(64393),l={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function s(e){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}var u={date:s({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:s({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:s({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},c={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function d(e){return function(n,t){var r;if("formatting"===(null!=t&&t.context?String(t.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=null!=t&&t.width?String(t.width):i;r=e.formattingValues[a]||e.formattingValues[i]}else{var o=e.defaultWidth,l=null!=t&&t.width?String(t.width):e.defaultWidth;r=e.values[l]||e.values[o]}return r[e.argumentCallback?e.argumentCallback(n):n]}}function h(e){return function(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=n.match(a);if(!o)return null;var l=o[0],s=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t}(s,function(e){return e.test(l)}):function(e,n){for(var t in e)if(e.hasOwnProperty(t)&&n(e[t]))return t}(s,function(e){return e.test(l)});return t=e.valueCallback?e.valueCallback(u):u,{value:t=r.valueCallback?r.valueCallback(t):t,rest:n.slice(l.length)}}}var f={code:"en-US",formatDistance:function(e,n,t){var r,i=l[e];return(r="string"==typeof i?i:1===n?i.one:i.other.replace("{{count}}",n.toString()),null!=t&&t.addSuffix)?t.comparison&&t.comparison>0?"in "+r:r+" ago":r},formatLong:u,formatRelative:function(e,n,t,r){return c[e]},localize:{ordinalNumber:function(e,n){var t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:d({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:d({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:d({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:d({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
13ay","Saturday"]},defaultWidth:"wide"}),dayPeriod:d({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(r={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.match(r.matchPattern);if(!t)return null;var i=t[0],a=e.match(r.parsePattern);if(!a)return null;var o=r.valueCallback?r.valueCallback(a[0]):a[0];return{value:o=n.valueCallback?n.valueCallback(o):o,rest:e.slice(i.length)}}),era:h({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:h({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:h({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:h({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:h({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},m={stringSet:(0,o.g)("en"),dateLocale:f},v=a.createContext(m),p=function(e){var n=e.children;return a.createElement(v.Provider,{value:(0,i._)((0,i._)({},m),e)},n)},g=function(){var e=a.useContext(v);if(!e)throw Error("`useLocalization` hook must be used within `SendbirdProvider` that includes `LocalizationProvider`.");return e}},94244:function(e,n,t){"use strict";t.d(n,{u:function(){return l}});var r=t(58972),i=t(34919),a=t(92593),o=t(34420);function l(e){var n=e.hasMore,t=e.hasNext,l=e.onScroll,s=e.scrollRef,u=e.setShowScrollDownButton,c=(0,o.zS)(function(){var e=null==s?void 0:s.current;if(null!=e){var i=e.scrollTop,o=e.scrollHeight,c=e.clientHeight,d=o-i;"function"==typeof u&&u(o>i+c+1),n&&(0,a.a)(i,0,r.S)&&l(function(){e.scrollHeight>o&&(e.scrollTop=e.scrollHeight-d)}),t&&(0,a.a)(c+i,o,r.S)&&l(function(){e.scrollHeight>o&&(e.scrollTop=i)})}});return(0,i.u)(c,100,{trailing:!0})}},91199:function(e,n,t){"use strict";t.d(n,{a:function(){return s},b:function(){return l},i:function(){return o}});var r=t(90903),i=t(72127),a=t(11228);function o(e){return(0,i.r)(1,arguments),(0,r.i)(e,Date.now())}function l(e){return(0,i.r)(1,arguments),function(e,n){(0,i.r)(2,arguments);var t=(0,i.t)(e),r=(0,i.t)(n);return t.getFullYear()===r.getFullYear()}(e,Date.now())}function s(e){return(0,i.r)(1,arguments),(0,r.i)(e,function(e,n){return(0,i.r)(2,arguments),function(e,n){(0,i.r)(2,arguments);var t=(0,i.t)(e),r=(0,a.t)(n);return isNaN(r)?new Date(NaN):(r&&t.setDate(t.getDate()+r),t)}(e,-(0,a.t)(1))}(Date.now(),1))}},88006:function(e,n,t){"use strict";t.d(n,{c:function(){return o},d:function(){return i},n:function(){return r},o:function(){return a}});var r=function(){},i=function(e){var n={};return Object.entries(e).forEach(function(e){var t=e[0],r=e[1];null!=r&&(n[t]=r)}),n};function a(e){var n=e;n&&(n.startsWith("http://")||n.startsWith("https://")||(n="https://"+n),window.open(n,"_blank","noopener,noreferrer"))}function o(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(Boolean).join(" ")}},5701:function(e,n,t){"use strict";t.d(n,{P:function(){return a},a:function(){return u},b:function(){return o},p:function(){return c},s:function(){return s}}),(i=a||(a={})).CHANNEL="CHANNEL",i.THREAD="THREAD";var r,i,a,o,l=function(e,n){return!n||0===n.length||n.includes(e)};function s(e){return l(a.CHANNEL,e)}function u(e){return l(a.THREAD,e)}(r=o||(o={})).USER_UPDATED="USER_UPDATED",r.SEND_MESSAGE_START="SEND_MESSAGE_START",r.SEND_MESSAGE_FAILED="SEND_MESSAGE_FAILED",r.SEND_USER_MESSAGE="SEND_USER_MESSAGE",r.SEND_FILE_MESSAGE="SEND_FILE_MESSAGE",r.ON_FILE_INFO_UPLOADED="ON_FILE_INFO_UPLOADED",r.UPDATE_USER_MESSAGE="UPDATE_USER_MESSAGE",r.DELETE_MESSAGE="DELETE_MESSAGE",r.LEAVE_CHANNEL="LEAVE_CHANNEL",r.CREATE_CHANNEL="CREATE_CHANNEL",r.UPDATE_OPEN_CHANNEL="UPDATE_OPEN_CHANNEL";var c=o},12382:function(e,n,t){"use strict";t.d(n,{N:function(){return u},P:function(){return s},u:function(){return c}});var r=t(67294),i=t(36614),a=t(92593),o=t(80725);t(17061);
13var l=t(58972),s=30,u=15;function c(e,n){var t=e.currentGroupChannel,c=e.initialTimeStamp,d=e.userFilledMessageListQuery,h=e.replyType,f=e.setIsScrolled,m=n.logger,v=n.scrollRef,p=n.messagesDispatcher,g=null==t?void 0:t.url,_=(0,r.useCallback)(function(){if(m.info("Channel useInitialMessagesFetch: Setup started",t),f(!1),p({type:o.R,payload:null}),t&&(null==t?void 0:t.getMessagesByTimestamp)){var e={prevResultSize:s,isInclusive:!0,includeReactions:!0,includeMetaArray:!0};c&&(e.nextResultSize=u),("QUOTE_REPLY"===h||"THREAD"===h)&&(e.includeThreadInfo=!0,e.includeParentMessageInfo=!0,e.replyType=i.ay.ONLY_REPLY_TO_CHANNEL),d&&Object.keys(d).forEach(function(n){e[n]=d[n]}),(h&&("QUOTE_REPLY"===h||"THREAD"===h)||d)&&(m.info("Channel useInitialMessagesFetch: Setup messageListParams",e),p({type:o.M,payload:e})),m.info("Channel: Fetching messages",{currentGroupChannel:t,userFilledMessageListQuery:d}),p({type:o.F,payload:null}),t.getMessagesByTimestamp(c||new Date().getTime(),e).then(function(e){p({type:o.a,payload:{currentGroupChannel:t,messages:e}})}).catch(function(e){m.error("Channel: Fetching messages failed",e),p({type:o.b,payload:{currentGroupChannel:t}})}).finally(function(){c?setTimeout(function(){(0,a.d)(v,c,f)},500):setTimeout(function(){return(0,a.s)(0,v,f)},l.d)})}},[g,d,c]);return(0,r.useEffect)(function(){_()},[_]),_}},16267:function(e,n,t){"use strict";t.d(n,{a:function(){return a},b:function(){return o},c:function(){return s},f:function(){return l},i:function(){return i}});var r=t(17061),i=function(e){return!!e&&e.isFrozen&&"operator"!==e.myRole},a=function(e){return!!e&&"muted"===e.myMutedState},o=function(e,n){var t,r,i,a;return n&&Array.isArray(null===(r=null===(t=null==e?void 0:e.lastMessage)||void 0===t?void 0:t.extendedMessagePayload)||void 0===r?void 0:r.suggested_replies)&&!!(null===(a=null===(i=null==e?void 0:e.lastMessage)||void 0===i?void 0:i.extendedMessagePayload)||void 0===a?void 0:a.disable_chat_input)},l=function(e){return e<=r.U},s=function(e,n){return n&&e.some(function(e){var n;return!!e.messageForm&&!e.messageForm.isSubmitted&&!!(null===(n=e.extendedMessagePayload)||void 0===n?void 0:n.disable_chat_input)&&l(e.messageForm.version)})}},2121:function(e,n,t){"use strict";t.d(n,{M:function(){return S},a:function(){return C},b:function(){return _},c:function(){return g},d:function(){return y},g:function(){return p}});var r,i,a=t(12394),o=t(67294),l=t(11228),s=t(43822),u=t(1608),c=t(72661),d=t(49805),h=t(8978),f=t(91199),m=t(7585),v=t(88006),p=function(e,n,t){var r;return(void 0===t&&(t=u.c),(null==e?void 0:e.name)||(null==e?void 0:e.members))?(null==e?void 0:e.name)&&"Group Channel"!==e.name?e.name:(null===(r=null==e?void 0:e.members)||void 0===r?void 0:r.length)===1?t.NO_MEMBERS:((null==e?void 0:e.members)||[]).filter(function(e){return e.userId!==n}).map(function(e){return e.nickname||t.NO_NAME}).join(", "):t.NO_TITLE},g=function(e){var n,t=e.channel,r=e.locale,i=e.stringSet,a=void 0===i?u.c:i,o=null===(n=null==t?void 0:t.lastMessage)||void 0===n?void 0:n.createdAt,s=r?{locale:r}:null;return o?(0,f.i)(o)?(0,l.f)(o,a.DATE_FORMAT__LAST_MESSAGE_CREATED_AT__TODAY,s):(0,f.a)(o)?a.MESSAGE_STATUS__YESTERDAY||"Yesterday":(0,f.b)(o)?(0,l.f)(o,a.DATE_FORMAT__LAST_MESSAGE_CREATED_AT__THIS_YEAR,s):(0,l.f)(o,a.DATE_FORMAT__LAST_MESSAGE_CREATED_AT__PREVIOUS_YEAR,s):""},_=function(e){return(null==e?void 0:e.memberCount)?e.memberCount:0},E=function(e,n){var t,r,i,a,o,l;return(void 0===n&&(n=u.c),(0,d.z)(e))?null!==(t=null==n?void 0:n.CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_GIF)&&void 0!==t?t:"":(0,d.j)(e)?null!==(r=null==n?void 0:n.CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_PHOTO)&&void 0!==r?r:"":(0,d.h)(e)?null!==(i=null==n?void 0:n.CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_VIDEO)&&void 0!==i?i:"":(0,d.D)(e)?null!==(a=null==n?void 0:n.CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_AUDIO)&&void 0!==a?a:"":(0,d.E)(e)?null!==(o=null==n?void 0:n.CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_VOICE_MESSAGE)&&void 0!==o?o:"":null!==(l=null==n?void 0:n.CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_GENERAL)&&void 0!==l?l:""},b=function(e,n){var t,r,i,a;if(void 0===e&&(e=null),void 0===n&&(n=u.c),!e)return"";if((0,d.C)(e))return n.CHANNEL_PREVIEW_LAST_MESSAGE_TEMPLATE_MESSAGE;if(e.isFileMessage())return E(e.type,n);if(e.isMultipleFilesMessage()){var o=null===(r=null===(t=e.fileInfoList)||void 0===t?void 0:t[0])||void 0===r?void 0:r.mimeType;return(0,d.j)(o)||(0,d.z)(o)?null!==(i=null==n?void 0:n.CHANNEL_PREVIEW_LAST_MESSAGE_FILE_TYPE_PHOTO)&&void 0!==i?i:"":E(o,n)}return null!==(a=e.message)&&void 0!==a?a:""},C=function(e,n){return void 0===n&&(n=u.c),(null==e?void 0:e.lastMessage)?b(null==e?void 0:e.lastMessage,n):""},y=function(e){return(null==e?void 0:e.unreadMessageCount)?e.unreadMessageCount:0};h.o;var N=((r={})[h.o.SENT]=s.Qy.DONE,r[h.o.DELIVERED]=s.Qy.DONE_ALL,r[h.o.READ]=s.Qy.DONE_ALL,r[h.o.FAILED]=s.Qy.ERROR,r[h.o.PENDING]=void 0,r[h.o.NONE]=void 0,r),T=((i={})[h.o.SENT]=s.zo.SENT,i[h.o.DELIVERED]=s.zo.SENT,i[h.o.READ]=s.zo.READ,i[h.o.FAILED]=s.zo.ERROR,i[h.o.PENDING]=void 0,i[h.o.NONE]=void 0,i);function S(e){var n,t=e.className,r=e.message,i=e.channel,f=e.isDateSeparatorConsidered,p=(0,m.u)(),_=p.stringSet,E=p.dateLocale,b=(0,h.$)(i,r),C=(null===(n=null==i?void 0:i.isGroupChannel)||void 0===n?void 0:n.call(i))&&(i.isSuper||i.isPublic||i.isBroadcast)&&!(b===h.o.PENDING||b===h.o.FAILED);return o.createElement("div",{className:(0,a.c)((0,a.c)([],Array.isArray(t)?t:[t],!0),["sendbird-message-status"],!1).join(" ")},b===h.o.PENDING?o.createElement(c.Z,{className:"sendbird-message-status__icon",testID:"sendbird-message-status-icon",width:"16px",height:"16px"},o.createElement(s.ZP,{type:s.Qy.SPINNER,fillColor:s.zo.PRIMARY,width:"16px",height:"16px"})):o.createElement(s.ZP,{className:(0,v.c)("sendbird-message-status__icon",C&&"hide-icon",b!==h.o.FAILED&&"sendbird-message-status--sent"),testID:"sendbird-message-status-icon",type:N[b]||s.Qy.ERROR,fillColor:T[b],width:"16px",height:"16px"}),(0,d.F)(b)&&o.createElement(u.L,{className:"sendbird-message-status__text",testID:"sendbird-message-status-text",type:u.a.CAPTION_3,color:u.b.ONBACKGROUND_2},void 0===f||f?(0,l.f)((null==r?void 0:r.createdAt)||0,_.DATE_FORMAT__MESSAGE_CREATED_AT,{locale:E}):g({channel:i,locale:E,stringSet:_})))}},96060:function(e,n,t){"use strict";t.d(n,{xw:function(){return r.b}}),t(12394),t(67294),t(49805);var r=t(69392);t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(34420),t(71091),t(93122),t(41238),t(69561),t(78614)},66023:function(e,n,t){"use strict";t.d(n,{AS:function(){return E.A}}),t(4233);var r,i,a,o,l,s,u,c,d,h,f,m,v=t(67294),p=t(43847),g=t(12394);t(34420);var _=t(26748),E=t(41238);t(14779),t(16267),t(5701),t(80128),t(17061),t(71091);var b=t(69392),C=t(49805);t(8978),t(73935);var y=t(7585);t(64393);
13var N=t(29515),T=t(88569),S=t(1608),A=t(43822);t(93122);var I=t(69561);t(78614),v.createContext(null),t(27394),t(411),t(9399);var M=t(70179),O=t(4399);t(54627),t(56210);var R=t(21790);t(74865),t(21415);var w=t(10364);t(30402),t(87056),t(26701);var D=t(1758),L=t(11228),P=t(66421),U=t(8743),x=t(65134),k=t(58184);t(76599),t(27856);var F=t(2041);t(3533),t(2121);var G=t(72661);t(91199),t(73862),t(69139),t(60090);var B=t(67315);t(27835),t(30156),t(18087),t(56842),t(67412),t(10856);var H=t(13462);t(22284),t(76886),t(32080);var V=t(23012);t(1167),t(26862),t(37111),t(56342),t(68873),t(9434),t(34835);var j=t(7593);t(81823);var z=t(40286);t(50206),t(12210),t(64228);var K=t(6989);t(95988),t(71612),t(68962),t(32177),t(28464),t(48845),t(33709),t(49754),t(47057),t(34498),t(64437),t(21402),t(15345),t(45143),t(74062),t(80385),t(76917),t(52597);var Y=t(79226);t(11621),t(88137);var Z=t(58972);t(10765);var Q=t(88006);t(3196);var W=t(92593),q=t(60196);(0,v.forwardRef)(function(e,n){var t=e.messages,r=e.renderMessage,i=e.scrollPositionRef,a=e.scrollDistanceFromBottomRef,o=e.onLoadPrevious,l=e.onLoadNext,s=e.loadThreshold,u=void 0===s?.05:s,c=e.typingIndicator,d=e.onScrollPosition,h=void 0===d?Q.n:d,f=e.initDeps,m=v.useRef(!1),p=v.useRef(),_=(0,v.useRef)(0);return(0,v.useLayoutEffect)(function(){n.current&&(n.current.scrollTop=n.current.scrollHeight)},f),(0,v.useLayoutEffect)(function(){n.current&&("top"===p.current&&(n.current.scrollTop=n.current.scrollHeight-i.current),"bottom"===p.current&&(n.current.scrollTop=_.current),p.current=void 0)},[n.current,t.length]),v.createElement("div",{className:"sendbird-conversation__scroll-container"},v.createElement("div",{className:"sendbird-conversation__padding"}),v.createElement("div",{ref:n,className:"sendbird-conversation__messages-padding","data-testid":"sendbird-message-list-container",onScroll:function(){return(0,g.a)(void 0,void 0,void 0,function(){var e,t;return(0,g.b)(this,function(r){switch(r.label){case 0:var s;if(!n.current||(h((s=e=n.current,(0,W.a)(s.scrollTop,0,Z.S)?"top":(0,W.a)(s.scrollHeight,s.clientHeight+s.scrollTop,Z.S)?"bottom":"middle")),i.current=e.scrollHeight-e.scrollTop,a.current=i.current-e.clientHeight,_.current=e.scrollTop,m.current))return[2];if(t=e.clientHeight*Math.min(Math.max(0,u),1),!(e.scrollTop<=t))return[3,2];return m.current=!0,p.current="top",[4,o()];case 1:case 3:return r.sent(),m.current=!1,[3,5];case 2:if(!(e.scrollHeight-e.scrollTop-e.clientHeight<=t))return[3,4];return m.current=!0,p.current="bottom",[4,l()];case 4:p.current=void 0,r.label=5;case 5:return[2]}})})}},t.map(function(e,n){return r({message:e,index:n})}),c))});var X=t(26001);t(85562),t(67840),t(19515),t(74535);var $=t(97047);t(42443),t(55922),t(19940),v.createContext(null),t(30094),t(84675),t(47843),t(32145),t(77839),t(59069),t(7217),t(61284),t(46345),t(55064),t(45701),t(25494),t(34600),t(58632),t(15343),t(70599),t(15956),t(34919),t(76873),t(61795),v.createContext(null),(0,v.createContext)(void 0);var J=function(){};v.createContext({checked:null,defaultChecked:!1,disabled:!1,onChange:J,onFocus:J,onBlur:J}),A.zo.PRIMARY,S.a.SUBTITLE_1,S.b.ONBACKGROUND_1,(r=u||(u={})).SCORE="score",r.TIMESTAMP="ts",v.createContext(null),t(19332),(i=c||(c={})).NIL="NIL",i.LOADING="LOADING",i.INVALID="INVALID",i.INITIALIZED="INITIALIZED",(a=d||(d={})).NIL="NIL",a.LOADING="LOADING",a.INVALID="INVALID",a.INITIALIZED="INITIALIZED",(o=h||(h={})).NIL="NIL",o.LOADING="LOADING",o.INVALID="INVALID",o.INITIALIZED="INITIALIZED",t(80725),(l=f||(f={})).INIT_USER_ID="INIT_USER_ID",l.GET_CHANNEL_START="GET_CHANNEL_START",l.GET_CHANNEL_SUCCESS="GET_CHANNEL_SUCCESS",l.GET_CHANNEL_FAILURE="GET_CHANNEL_FAILURE",l.SET_EMOJI_CONTAINER="SET_EMOJI_CONTAINER",l.GET_PARENT_MESSAGE_START="GET_PARENT_MESSAGE_START",l.GET_PARENT_MESSAGE_SUCCESS="GET_PARENT_MESSAGE_SUCCESS",l.GET_PARENT_MESSAGE_FAILURE="GET_PARENT_MESSAGE_FAILURE",l.INITIALIZE_THREAD_LIST_START="INITIALIZE_THREAD_LIST_START",l.INITIALIZE_THREAD_LIST_SUCCESS="INITIALIZE_THREAD_LIST_SUCCESS",l.INITIALIZE_THREAD_LIST_FAILURE="INITIALIZE_THREAD_LIST_FAILURE",l.GET_PREV_MESSAGES_START="GET_PREV_MESSAGES_START",l.GET_PREV_MESSAGES_SUCESS="GET_PREV_MESSAGES_SUCESS",l.GET_PREV_MESSAGES_FAILURE="GET_PREV_MESSAGES_FAILURE",l.GET_NEXT_MESSAGES_START="GET_NEXT_MESSAGES_START",l.GET_NEXT_MESSAGES_SUCESS="GET_NEXT_MESSAGES_SUCESS",l.GET_NEXT_MESSAGES_FAILURE="GET_NEXT_MESSAGES_FAILURE",l.SEND_MESSAGE_START="SEND_MESSAGE_START",l.SEND_MESSAGE_SUCESS="SEND_MESSAGE_SUCESS",l.SEND_MESSAGE_FAILURE="SEND_MESSAGE_FAILURE",l.RESEND_MESSAGE_START="RESEND_MESSAGE_START",l.ON_MESSAGE_DELETED_BY_REQ_ID="ON_MESSAGE_DELETED_BY_REQ_ID",l.ON_MESSAGE_RECEIVED="ON_MESSAGE_RECEIVED",l.ON_MESSAGE_UPDATED="ON_MESSAGE_UPDATED",l.ON_MESSAGE_DELETED="ON_MESSAGE_DELETED",l.ON_REACTION_UPDATED="ON_REACTION_UPDATED",l.ON_FILE_INFO_UPLOADED="ON_FILE_INFO_UPLOADED",l.ON_USER_MUTED="ON_USER_MUTED",l.ON_USER_UNMUTED="ON_USER_UNMUTED",l.ON_USER_BANNED="ON_USER_BANNED",l.ON_USER_UNBANNED="ON_USER_UNBANNED",l.ON_USER_LEFT="ON_USER_LEFT",l.ON_CHANNEL_FROZEN="ON_CHANNEL_FROZEN",l.ON_CHANNEL_UNFROZEN="ON_CHANNEL_UNFROZEN",l.ON_OPERATOR_UPDATED="ON_OPERATOR_UPDATED",l.ON_TYPING_STATUS_UPDATED="ON_TYPING_STATUS_UPDATED",c.NIL,d.NIL,h.NIL;var ee=v.createContext(null),en=function(){var e=v.useContext(ee);if(!e)throw Error("ThreadContext not found. Use within the Thread module");return e},et=function(e){var n=en().currentChannel;return v.createElement(Y.S,(0,g._)({},e,{currentChannel:n}))},er={OPERATOR:"operator",NONE:"none"},ei=t(36614),ea=function(e,n){var t=e.sendFileMessage,r=e.sendMultipleFilesMessage,i=e.quoteMessage,a=n.logger,o=(0,y.u)().stringSet,l=(0,E.A)().config,s=l.imageCompression,u=null==l?void 0:l.uikitUploadSizeLimit,c=null==l?void 0:l.uikitMultipleFilesMessageLimit,d=(0,b.b)().openModal;return(0,v.useCallback)(function(e){return(0,g.a)(void 0,void 0,void 0,function(){var n,l,h;return(0,g.b)(this,function(f){switch(f.label){case 0:if(!t||!r)return a.warning("Channel|useHandleUploadFiles: required functions are undefined",{sendFileMessage:t,sendMultipleFilesMessage:r}),[2];if(0===e.length)return a.warning("Channel|useHandleUploadFiles: given file list is empty.",{files:e}),[2];if(e.length>c)return a.info("Channel|useHandleUploadFiles: Cannot upload files more than ".concat(c)),d({modalProps:{titleText:o.FILE_UPLOAD_NOTIFICATION__COUNT_LIMIT.replace("%d","".concat(c)),hideFooter:!0},childElement:function(e){var n=e.closeModal;return v.createElement(b.c,{type:T.qh.PRIMARY,submitText:o.BUTTON__OK,hideCancelButton:!0,onCancel:n,onSubmit:n})}}),[2];if(e.some(function(e){return e.size>u}))return a.info("Channel|useHandleUploadFiles: Cannot upload file size exceeding ".concat(u)),d({modalProps:{titleText:o.FILE_UPLOAD_NOTIFICATION__SIZE_LIMIT.replace("%d","".concat(Math.floor(u/Z.O))),hideFooter:!0},childElement:function(e){var n=e.closeModal;return v.createElement(b.c,{type:T.qh.PRIMARY,submitText:o.BUTTON__OK,hideCancelButton:!0,onCancel:n,onSubmit:n})}}),[2];return[4,(0,$.c)({files:e,imageCompression:s,logger:a})];case 1:if(1===(n=f.sent().compressedFiles).length)a.info("Channel|useHandleUploadFiles: sending one file."),t(n[0],i);else if(n.length>1)return a.info("Channel|useHandleUploadFiles: sending multiple files."),l=[],h=[],n.forEac
13h(function(e){(0,C.j)(e.type)?l.push(e):h.push(e)}),[2,h.reduce(function(e,n){return e.then(function(){return t(n,i)})},0===l.length?Promise.resolve():1===l.length?t(l[0],i):r(l,i))];return[2]}})})},[t,r,i])};v.forwardRef(function(e,n){var t,r=e.className,i=e.renderFileUploadIcon,a=e.renderVoiceMessageIcon,o=e.renderSendMessageIcon,l=e.acceptableMimeTypes,s=(0,E.A)().config,u=(0,p.u)().isMobile,c=(0,y.u)().stringSet,d=s.isOnline,h=s.userMention,f=s.logger,m=s.groupChannel,_=en(),b=_.currentChannel,C=_.parentMessage,N=_.sendMessage,T=_.sendFileMessage,S=_.sendVoiceMessage,A=_.sendMultipleFilesMessage,I=_.isMuted,M=_.isChannelFrozen,O=_.allThreadMessages,R=(0,v.useRef)(),w=m.enableMention,D=m.enableVoiceMessage,L=null!==(t=_.isMultipleFilesMessageEnabled)&&void 0!==t?t:s.isMultipleFilesMessageEnabled,U=e.disabled||!d||I||(null==b?void 0:b.myRole)!==er.OPERATOR&&M||null===C,F=ea({sendFileMessage:T,sendMultipleFilesMessage:A,quoteMessage:C},{logger:f}),G=(0,v.useState)(""),B=G[0],H=G[1],V=(0,v.useState)([]),j=V[0],z=V[1],K=(0,v.useState)([]),Y=K[0],Z=K[1],q=(0,v.useState)(null),$=q[0],J=q[1],ee=(0,v.useState)([]),eo=ee[0],el=ee[1],es=(0,v.useState)(null),eu=es[0],ec=es[1],ed=(0,v.useState)(!1),eh=ed[0],ef=ed[1],em=d&&w&&B.length>0&&!(0,W.b)(b)&&!(0,W.c)(b)&&!(null==b?void 0:b.isBroadcast);(0,v.useEffect)(function(){ef(!1)},[null==b?void 0:b.url]);var ev=(0,P.X)({ref:n||R},{logger:f}),ep=(null==ev?void 0:ev.length)<(null==h?void 0:h.maxMentionCount);return((0,v.useEffect)(function(){z(j.filter(function(e){var n=e.userId,t=Y.indexOf(n);return!(t<0)&&(Y.splice(t,1),!0)}))},[Y]),(null==b?void 0:b.isBroadcast)&&(null==b?void 0:b.myRole)!==er.OPERATOR)?v.createElement(v.Fragment,null):v.createElement("div",{className:(0,Q.c)(eh?"sendbird-thread-message-input--voice-message":"sendbird-thread-message-input",r)},em&&v.createElement(et,{targetNickname:B,inputEvent:null!=eu?eu:void 0,onUserItemClick:function(e){e&&z((0,g.c)((0,g.c)([],j,!0),[e],!1)),H(""),J(e),ec(null)},onFocusItemChange:function(){ec(null)},onFetchUsers:function(e){el(e)},ableAddMention:ep,maxMentionCount:null==h?void 0:h.maxMentionCount,maxSuggestionCount:null==h?void 0:h.maxSuggestionCount}),eh?v.createElement(X.V,{channel:b,onSubmitClick:function(e,n){S(e,n,C),ef(!1)},onCancelClick:function(){ef(!1)}}):v.createElement(x.Z,{className:"sendbird-thread-message-input__message-input",messageFieldId:"sendbird-message-input-text-field--thread",channel:b,channelUrl:null==b?void 0:b.url,isMobile:u,disabled:U,acceptableMimeTypes:l,setMentionedUsers:z,mentionSelectedUser:$,isMentionEnabled:w,isVoiceMessageEnabled:D,isSelectingMultipleFilesEnabled:L,onVoiceMessageIconClick:function(){ef(!0)},renderFileUploadIcon:i,renderVoiceMessageIcon:a,renderSendMessageIcon:o,ref:n||R,placeholder:(null==b?void 0:b.isFrozen)&&(null==b?void 0:b.myRole)!==er.OPERATOR&&c.MESSAGE_INPUT__PLACE_HOLDER__DISABLED||(null==b?void 0:b.myMutedState)===ei.be.MUTED&&c.MESSAGE_INPUT__PLACE_HOLDER__MUTED_SHORT||(O.length>0?c.THREAD__INPUT__REPLY_TO_THREAD:c.THREAD__INPUT__REPLY_IN_THREAD),onStartTyping:function(){var e;null===(e=null==b?void 0:b.startTyping)||void 0===e||e.call(b)},onSendMessage:function(e){var n;N({message:e.message,mentionedUsers:j,mentionTemplate:e.mentionTemplate,quoteMessage:C}),H(""),z([]),null===(n=null==b?void 0:b.endTyping)||void 0===n||n.call(b)},onFileUpload:F,onUserMentioned:function(e){(null==$?void 0:$.userId)===(null==e?void 0:e.userId)&&(J(null),H(""))},onMentionStringChange:function(e){H(e)},onMentionedUserIdsUpdated:function(e){Z(e)},onKeyDown:function(e){return!!em&&(null==eo?void 0:eo.length)>0&&(e.key===k.M.Enter&&!!ep||e.key===k.M.ArrowUp||e.key===k.M.ArrowDown)&&(ec(e),!0)}}))}),t(99486),t(12382),t(90047),t(27050),t(29229),t(77958),t(9059),t(9343),t(79555);var eo=t(94244);t(57320),t(61416),t(56152),t(81573),t(10214),(s=m||(m={})).CHANNEL_LIST="CHANNEL_LIST",s.CHANNEL="CHANNEL",s.CHANNEL_SETTINGS="CHANNEL_SETTINGS",s.MESSAGE_SEARCH="MESSAGE_SEARCH",s.THREAD="THREAD";var el=function(e,n){void 0===e&&(e=0);var t=e;if(!(t>10))try{var r=(null==n?void 0:n.current)||document.querySelector(".sendbird-openchannel-conversation-scroll__container__item-container");r&&(r.scrollTop=r.scrollHeight)}catch(e){setTimeout(function(){el(t+1,n)},500*t)}},es=v.createContext(null),eu=function(){var e=v.useContext(es);if(!e)throw Error("OpenChannelContext not found. Use within the OpenChannel module");return e};v.forwardRef(function(e,n){var t=eu(),r=t.currentOpenChannel,i=t.disabled,a=t.handleSendMessage,o=t.handleFileUpload,l=t.amIMuted,s=(0,v.useContext)(y.L).stringSet,u=e.value;return r?v.createElement("div",{className:"sendbird-openchannel-footer"},v.createElement(x.Z,{channel:r,ref:n,value:u,disabled:i,isVoiceMessageEnabled:!1,onSendMessage:a,onFileUpload:o,placeholder:l?s.MESSAGE_INPUT__PLACE_HOLDER__MUTED:i?s.MESSAGE_INPUT__PLACE_HOLDER__DISABLED:""})):null});var ec=t(90903),ed=function(e){if(window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",e);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var n=document.createElement("textarea");n.textContent=e,n.style.position="fixed",document.body.appendChild(n),n.select();try{return document.execCommand("copy")}catch(e){}finally{document.body.removeChild(n)}}return!1},eh=t(56299),ef={NONE:"none",PENDING:"pending",FAILED:"failed",CANCELED:"canceled",SUCCEEDED:"succeeded"},em=function(e){return e.sender||e._sender},ev=function(e){return e===ef.SUCCEEDED},ep=function(e){return e===ef.PENDING},eg=function(e){return e===ef.FAILED},e_=function(e,n){return em(e).userId===n},eE=function(e){var n,t=e.message;return(null==t?void 0:t.messageType)==="user"&&(null===(n=null==t?void 0:t.message)||void 0===n?void 0:n.length)>0},eb=function(e){var n=e.message,t=e.status;return e_(n,e.userId)&&eg(t)&&(null==n?void 0:n.isResendable)},eC=function(e){var n,t=e.message,r=e.status;return e_(t,e.userId)&&ev(r)&&(null===(n=null==t?void 0:t.isUserMessage)||void 0===n?void 0:n.call(t))},ey=function(e){return e_(e.message,e.userId)},eN=function(e){var n,t=e.message,r=e.status;return!!((null===(n=null==t?void 0:t.isFileMessage)||void 0===n?void 0:n.call(t))&&ev(r))},eT=function(e){var n=e.message,t=e.status,r=e.userId;return"user"===n.messageType?ey({message:n,status:t,userId:r})||eC({message:n,status:t,userId:r})||eE({message:n,status:t,userId:r})||eb({message:n,status:t,userId:r}):ey({message:n,status:t,userId:r})||eb({message:n,status:t,userId:r})},eS=function(e){var n,t,r=e.message,i=e.parentRef,a=e.resendMessage,o=e.showEdit,l=e.showRemove,s=e.copyToClipboard,u=e.hideMenu,c=e.isEphemeral,d=void 0!==c&&c,h=null==r?void 0:r.sendingStatus,f=(0,y.u)().stringSet,m=null===(t=null===(n=(0,E.A)())||void 0===n?void 0:n.config)||void 0===t?void 0:t.userId;return v.createElement(I.C,{isOpen:!0,menuItems:function(){return v.createElement(I.b,{className:"sendbird-openchannel__mobile-menu",parentRef:i,parentContainRef:i,closeDropdown:u},eE({message:r,userId:m,status:h})&&v.createElement(I.c,{className:"sendbird-openchannel-og-message__top__context-menu__copy",onClick:function(){null==s||s()},testID:"open_channel_mobile_context_menu_copy"},v.createElement(v.Fragment,null,f.CONTEXT_MENU_DROPDOWN__COPY)),!d&&eC({message:r,userId:m,status:h})&&v.createElement(I.c,{className:"sendbird-openchannel-og-message__top__context-menu__edit",onClick:function(){null==o||o()},testID:"open_channel_mobile_context_menu_edit"},v.createElement(v.Fragment,null,f.CONTEXT_MENU_DROPDOWN__EDIT)),eb({message:r,userId:m,status:h})&&v.createElement(I.c,{onClick:function(){null==a||a()},testID:"open_channel_mobile_context_menu_resend"},v.createElement(v.Fragment,null,f.CONTEXT_MENU_DROPDOWN__RESEND)),!d&&ey({message:r,userId:m,status:h})&&v.createElement(I.c,{onClick:function(){null==l||l()},testID:"open_channel_mobile_context_menu_delete"},v.createElement(v.Fragment,null,f.CONTEXT_MENU_DROPDOWN__DELETE)),eN({message:r,status:h})&&v.createElement(I.c,{onClick:function(){u()},testID:"open_channel_mobile_context_menu_download_file"},v.createElement("a",{className:"sendbird-openchannel__mobile-menu-hyperlink",rel:"noopener noreferrer",href:null==r?void 0:r.url,target:"_blank"},f.CONTEXT_MENU_DROPDOWN__SAVE)))}})};function eA(e){var n=e.className,t=e.message,r=e.isOperator,i=e.isEphemeral,a=void 0!==i&&i,o=e.userId,l=e.resendMessage,s=e.disabled,u=e.showEdit,c=e.showRemove,d=e.chainTop,h=(0,y.u)(),f=h.stringSet,m=h.dateLocale,E=(0,_.u)(),b=E.disableUserProfile,T=E.renderUserProfile,O=(0,v.useRef)(),R=(0,v.useRef)(),w=(0,v.useRef)(),D=(0,v.useRef)(),P=(0,v.useState)({}),U=P[0],x=P[1],k=(0,v.useState)(!1),F=k[0],V=k[1],j=null==t?void 0:t.sendingStatus,z=ep(j),K=eg(j),Y=em(t);(0,v.useEffect)(function(){var e;(null===(e=null==O?void 0:O.current)||void 0===e?void 0:e.clientHeight)&&O.current.clientHeight>36?x({top:"8px "}):x({top:"2px"})},[window.innerWidth]);var Z=(0,B.u)({onLongPress:function(){V(!0)}}),Q=(0,p.u)().isMobile;return t&&"user"===t.messageType?v.createElement(v.Fragment,null,v.createElement("div",{className:(0,g.c)((0,g.c)([],Array.isArray(n)?n:[n],!0),["sendbird-openchannel-user-message"],!1).join(" "),ref:O},v.createElement("div",{className:"sendbird-openchannel-user-message__left"},!d&&v.createElement(I.C,{menuTrigger:function(e){return v.createElement(M.A,{className:"sendbird-openchannel-user-message__left__avatar",src:Y.profileUrl||"",ref:R,width:"28px",height:"28px",onClick:function(){b||e()}})},menuItems:function(e){return T?T({user:Y,close:e,currentUserId:o,avatarRef:R}):v.createElement(I.b,{parentRef:R,parentContainRef:R,closeDropdown:e,style:{paddingTop:"0px",paddingBottom:"0px"}},v.createElement(H.Z,{user:Y,onSuccess:e,disableMessaging:!0}))}})),v.createElement("div",{className:"sendbird-openchannel-user-message__right"},!d&&v.createElement("div",{className:"sendbird-openchannel-user-message__right__top"},v.createElement(S.L,{className:"sendbird-openchannel-user-message__right__top__sender-name",type:S.a.CAPTION_2,color:r?S.b.SECONDARY_3:S.b.ONBACKGROUND_2}
13,Y&&(Y.friendName||Y.nickname||Y.userId)),v.createElement(S.L,{className:"sendbird-openchannel-user-message__right__top__sent-at",type:S.a.CAPTION_3,color:S.b.ONBACKGROUND_3},(null==t?void 0:t.createdAt)&&(0,L.f)(null==t?void 0:t.createdAt,f.DATE_FORMAT__MESSAGE_CREATED_AT,{locale:m}))),v.createElement("div",(0,g._)({},Q?(0,g._)({},Z):{},{className:"sendbird-openchannel-user-message__right__bottom",ref:D}),v.createElement(S.L,{className:"sendbird-openchannel-user-message__right__bottom__message",type:S.a.BODY_1,color:S.b.ONBACKGROUND_1},null==t?void 0:t.message,(0,C.d)(t)&&v.createElement(S.L,{key:(0,eh.u)(),type:S.a.BODY_1,color:S.b.ONBACKGROUND_2,className:"sendbird-openchannel-user-message-word"}," ".concat(f.MESSAGE_EDITED," ")))),(z||K)&&v.createElement("div",{className:"sendbird-openchannel-user-message__right__tail"},z&&v.createElement(G.Z,{width:"16px",height:"16px"},v.createElement(A.ZP,{className:"sendbird-openchannel-user-message__right__tail__pending",type:A.Qy.SPINNER,fillColor:A.zo.PRIMARY,width:"16px",height:"16px"})),K&&v.createElement(A.ZP,{className:"sendbird-openchannel-user-message__right__tail__failed",type:A.Qy.ERROR,fillColor:A.zo.ERROR,width:"16px",height:"16px"}))),!Q&&v.createElement("div",{className:"sendbird-openchannel-user-message__context-menu",ref:w,style:U},v.createElement(I.C,{menuTrigger:function(e){return eT({message:t,userId:o,status:j})&&v.createElement(N.Z,{className:"sendbird-openchannel-user-message__context-menu--icon",width:"32px",height:"32px",onClick:function(){e()}},v.createElement(A.ZP,{type:A.Qy.MORE,fillColor:A.zo.CONTENT_INVERSE,width:"24px",height:"24px"}))},menuItems:function(e){return v.createElement(I.b,{parentRef:w,parentContainRef:w,closeDropdown:e,openLeft:!0},eE({message:t,userId:o,status:j})&&v.createElement(I.c,{className:"sendbird-openchannel-user-message__context-menu__copy",onClick:function(){ed(t.message),e()},testID:"open_channel_user_message_menu_copy"},f.CONTEXT_MENU_DROPDOWN__COPY),!a&&eC({message:t,userId:o,status:j})&&v.createElement(I.c,{className:"sendbird-openchannel-user-message__context-menu__edit",onClick:function(){s||(u(!0),e())},testID:"open_channel_user_message_menu_edit"},f.CONTEXT_MENU_DROPDOWN__EDIT),eb({message:t,userId:o,status:j})&&v.createElement(I.c,{className:"sendbird-openchannel-user-message__context-menu__resend",onClick:function(){l(t),e()},testID:"open_channel_user_message_menu_resend"},f.CONTEXT_MENU_DROPDOWN__RESEND),!a&&ey({message:t,userId:o,status:j})&&v.createElement(I.c,{className:"sendbird-openchannel-user-message__context-menu__delete",onClick:function(){s||(c(!0),e())},testID:"open_channel_user_message_menu_delete"},f.CONTEXT_MENU_DROPDOWN__DELETE))}}))),F&&v.createElement(eS,{message:t,parentRef:D,hideMenu:function(){V(!1)},showRemove:function(){V(!1),c(!0)},showEdit:function(){V(!1),u(!0)},copyToClipboard:function(){V(!1),ed(null==t?void 0:t.message)},resendMessage:function(){V(!1),l(t)}})):v.createElement(v.Fragment,null)}function eI(e){var n=e.className,t=e.message;return v.createElement("div",{className:(0,g.c)((0,g.c)([],Array.isArray(n)?n:[n],!0),["sendbird-openchannel-admin-message"],!1).join(" ")},v.createElement(S.L,{className:"sendbird-openchannel-admin-message__text",type:S.a.CAPTION_2,color:S.b.ONBACKGROUND_2},t.message||""))}function eM(e){var n,t,r,i=e.message,a=e.isOperator,o=e.isEphemeral,l=void 0!==o&&o,s=e.className,u=e.disabled,c=e.showEdit,d=e.showRemove,h=e.resendMessage,f=e.chainTop,m=e.userId,E=null==i?void 0:i.sendingStatus,b=null!==(n=i.ogMetaData)&&void 0!==n?n:null,C=null==b?void 0:b.defaultImage,T=(0,y.u)(),R=T.stringSet,w=T.dateLocale,D=(0,p.u)().isMobile,P=(0,_.u)(),U=P.disableUserProfile,x=P.renderUserProfile,k=(0,v.useState)({}),V=k[0],K=k[1],Y=(0,v.useState)(!1),Z=Y[0],W=Y[1],q=function(){return(0,Q.o)(null==b?void 0:b.url)},X=(0,B.u)({onLongPress:function(){return W(!0)},onClick:q},{delay:300}),$=(0,v.useRef)(),J=(0,v.useRef)(),ee=(0,v.useRef)(),en=(0,v.useRef)(),et=ep(E),er=eg(E),ei=em(i),ea=(0,v.useMemo)(function(){return(0,F.t)({messageText:i.message})},[null==i?void 0:i.updatedAt,null==i?void 0:i.message]);return((0,v.useEffect)(function(){var e,n;(null===(e=null==$?void 0:$.current)||void 0===e?void 0:e.clientHeight)&&(null===(n=null==$?void 0:$.current)||void 0===n?void 0:n.clientHeight)>36?K({top:"8px "}):K({top:"2px"})},[window.innerWidth]),i&&"user"===i.messageType)?v.createElement(v.Fragment,null,v.createElement("div",(0,g._)({className:(0,g.c)((0,g.c)([],Array.isArray(s)?s:[s],!0),["sendbird-openchannel-og-message"],!1).join(" "),ref:$},D?(0,g._)({},X):{}),v.createElement("div",{className:"sendbird-openchannel-og-message__top"},v.createElement("div",{className:"sendbird-openchannel-og-message__top__left"},!f&&v.createElement(I.C,{menuTrigger:function(e){return v.createElement(M.A,{className:"sendbird-openchannel-og-message__top__left__avatar",src:ei.profileUrl||"",ref:en,width:"28px",height:"28px",onClick:function(){U||e()}})},menuItems:function(e){return x?x({user:ei,close:e,currentUserId:m,avatarRef:en}):v.createElement(I.b,{parentRef:en,parentContainRef:en,closeDropdown:e,style:{paddingTop:"0px",paddingBottom:"0px"}},v.createElement(H.Z,{user:ei,onSuccess:e,disableMessaging:!0}))}})),v.createElement("div",{className:"sendbird-openchannel-og-message__top__right"},!f&&v.createElement("div",{className:"sendbird-openchannel-og-message__top__right__title"},v.createElement(S.L,{className:"sendbird-openchannel-og-message__top__right__title__sender-name",type:S.a.CAPTION_2,color:a?S.b.SECONDARY_3:S.b.ONBACKGROUND_2},ei&&(ei.friendName||ei.nickname||ei.userId)),v.createElement(S.L,{className:"sendbird-openchannel-og-message__top__right__title__sent-at",type:S.a.CAPTION_3,color:S.b.ONBACKGROUND_3},(null==i?void 0:i.createdAt)&&(0,L.f)(null==i?void 0:i.createdAt,R.DATE_FORMAT__MESSAGE_CREATED_AT,{locale:w}))),v.createElement("div",{className:"sendbird-openchannel-og-message__top__right__description"},v.createElement(S.L,{className:"sendbird-openchannel-og-message__top__right__description__message",type:S.a.BODY_1,color:S.b.ONBACKGROUND_1},v.createElement(j.T,{tokens:ea}),(null!==(t=null==i?void 0:i.updatedAt)&&void 0!==t?t:0)>0&&v.createElement(S.L,{key:(0,eh.u)(),className:"sendbird-openchannel-og-message--word",type:S.a.BODY_1,color:S.b.ONBACKGROUND_2},R.MESSAGE_EDITED)))),!D&&v.createElement("div",{className:"sendbird-openchannel-og-message__top__context-menu",ref:J,style:V},v.createElement(I.C,{menuTrigger:function(e){return eT({message:i,userId:m,status:E})&&v.createElement(N.Z,{className:"sendbird-openchannel-og-message__top__context-menu--icon",width:"32px",height:"32px",onClick:function(){e()}},v.createElement(A.ZP,{type:A.Qy.MORE,fillColor:A.zo.CONTENT_INVERSE,width:"24px",height:"24px"}))},menuItems:function(e){return v.createElement(I.b,{parentRef:J,parentContainRef:J,closeDropdown:e,openLeft:!0},eE({message:i,userId:m,status:E})&&v.createElement(I.c,{className:"sendbird-openchannel-og-message__top__context-menu__copy",onClick:function(){ed(i.message),e()},testID:"open_channel_og_message_menu_copy"},R.CONTEXT_MENU_DROPDOWN__COPY),!l&&eC({message:i,userId:m,status:E})&&v.createElement(I.c,{className:"sendbird-openchannel-og-message__top__context-menu__edit",onClick:function(){u||(c(!0),e())},testID:"open_channel_og_message_menu_edit"},R.CONTEXT_MENU_DROPDOWN__EDIT),eb({message:i,userId:m,status:E})&&v.createElement(I.c,{className:"sendbird-openchannel-og-message__top__context-menu__resend",onClick:function(){h(i),e()},testID:"open_channel_og_message_menu_resend"},R.CONTEXT_MENU_DROPDOWN__RESEND),!l&&ey({message:i,userId:m,status:E})&&v.createElement(I.c,{className:"sendbird-openchannel-og-message__top__context-menu__delete",onClick:function(){u||(d(!0),e())},testID:"open_channel_og_message_menu_delete"},R.CONTEXT_MENU_DROPDOWN__DELETE))}}))),v.createElement("div",{className:"sendbird-openchannel-og-message__bottom"},v.createElement("div",{className:"sendbird-openchannel-og-message__bottom__og-tag",ref:ee},(null==b?void 0:b.url)&&v.createElement(S.L,{className:"sendbird-openchannel-og-message__bottom__og-tag__url",type:S.a.CAPTION_3,color:S.b.ONBACKGROUND_2},b.url),(null==b?void 0:b.title)&&v.createElement(z.ZP,{className:"sendbird-openchannel-og-message__bottom__og-tag__title",src:null!==(r=b.url)&&void 0!==r?r:"",type:S.a.SUBTITLE_2,color:S.b.PRIMARY},b.title),(null==b?void 0:b.description)&&v.createElement(S.L,{className:"sendbird-openchannel-og-message__bottom__og-tag__description",type:S.a.BODY_2,color:S.b.ONBACKGROUND_1},b.description),(null==b?void 0:b.url)&&v.createElement("div",{className:"sendbird-openchannel-og-message__bottom__og-tag__thumbnail",role:"button",onClick:q,onKeyDown:q,tabIndex:0},C&&v.createElement(O.ZP,{className:"sendbird-openchannel-og-message__bottom__og-tag__thumbnail__image",url:C.url||"",alt:C.alt||"",width:"334px",height:"189px",defaultComponent:v.createElement("div",{className:"sendbird-openchannel-og-message__bottom__og-tag__thumbnail__image--placeholder"},v.createElement(A.ZP,{type:A.Qy.THUMBNAIL_NONE,width:"56px",height:"56px"}))}))),(et||er)&&v.createElement("div",{className:"sendbird-openchannel-og-message__top__right__tail"},et&&v.createElement(G.Z,{width:"16px",height:"16px"},v.createElement(A.ZP,{className:"sendbird-openchannel-og-message__top__right__tail__pending",type:A.Qy.SPINNER,fillColor:A.zo.PRIMARY,width:"16px",height:"16px"})),er&&v.createElement(A.ZP,{className:"sendbird-openchannel-og-message__top__right__tail__failed",type:A.Qy.ERROR,fillColor:A.zo.ERROR,width:"16px",height:"16px"})))),Z&&v.createElement(eS,{message:i,parentRef:ee,hideMenu:function(){W(!1)},showRemove:function(){W(!1),d(!0)},showEdit:function(){W(!1),c(!0)},copyToClipboard:function(){W(!1),ed(null==i?void 0:i.message)},resendMessage:function(){W(!1),h(i)}})):v.createElement(v.Fragment,null)}var eO={IMAGE:"IMAGE",VIDEO:"VIDEO",UNSUPPORTED:"UNSUPPORTED"}
13,eR={IMAGE:["image/jpeg","image/jpg","image/png","image/gif","image/webp"],VIDEO:["video/mpeg","video/ogg","video/webm","video/mp4"]};function ew(e){var n,t=e.className,r=e.message,i=e.isOperator,a=e.isEphemeral,o=void 0!==a&&a,l=e.disabled,s=e.userId,u=e.chainTop,c=e.onClick,d=e.showRemove,h=e.resendMessage,f=r.type,m=r.url,E=r.thumbnails,b=r.localUrl,C=null==r?void 0:r.sendingStatus,T=E&&E.length>0&&E[0].url||null,R=(0,y.u)(),w=R.stringSet,D=R.dateLocale,P=(0,_.u)(),U=P.disableUserProfile,x=P.renderUserProfile,k=(0,v.useState)(360),F=k[0],V=k[1],j=(0,v.useState)(!1),z=j[0],K=j[1],Y=(0,v.useRef)(null),Z=(0,v.useRef)(null),Q=(0,v.useRef)(null),W=(0,v.useRef)(null),q=(0,B.u)({onLongPress:function(){K(!0)},onClick:function(){c(!0)}}),X=(0,p.u)().isMobile,$=(0,v.useMemo)(function(){return function(e){return function(n){var t=n.style;return v.createElement("div",{style:t},v.createElement(A.ZP,{type:e,fillColor:A.zo.ON_BACKGROUND_2,width:"56px",height:"56px"}))}}},[]),J=ev(C),ee=ep(C),en=eg(C),et=em(r);return(0,v.useEffect)(function(){var e,n,t=(null!==(n=null===(e=null==Y?void 0:Y.current)||void 0===e?void 0:e.clientWidth)&&void 0!==n?n:0)-80;V(t>360?360:t)},[]),v.createElement(v.Fragment,null,v.createElement("div",{className:(0,g.c)((0,g.c)([],Array.isArray(t)?t:[t],!0),["sendbird-openchannel-thumbnail-message"],!1).join(" "),ref:Y},v.createElement("div",{className:"sendbird-openchannel-thumbnail-message__left"},!u&&v.createElement(I.C,{menuTrigger:function(e){return v.createElement(M.A,{className:"sendbird-openchannel-thumbnail-message__left__avatar",src:et.profileUrl||"",ref:W,width:"28px",height:"28px",onClick:function(){U||e()}})},menuItems:function(e){return x?x({user:et,close:e,currentUserId:s,avatarRef:W}):v.createElement(I.b,{parentRef:W,parentContainRef:W,closeDropdown:e,style:{paddingTop:"0px",paddingBottom:"0px"}},v.createElement(H.Z,{user:et,onSuccess:e,disableMessaging:!0}))}})),v.createElement("div",{className:"sendbird-openchannel-thumbnail-message__right"},!u&&v.createElement("div",{className:"sendbird-openchannel-thumbnail-message__right__title"},v.createElement(S.L,{className:"sendbird-openchannel-thumbnail-message__right__title__sender-name",type:S.a.CAPTION_2,color:i?S.b.SECONDARY_3:S.b.ONBACKGROUND_2},et&&(et.friendName||et.nickname||et.userId)),v.createElement(S.L,{className:"sendbird-openchannel-thumbnail-message__right__title__sent-at",type:S.a.CAPTION_3,color:S.b.ONBACKGROUND_3},(null==r?void 0:r.createdAt)&&(0,L.f)(r.createdAt,w.DATE_FORMAT__MESSAGE_CREATED_AT,{locale:D}))),v.createElement("div",{className:"sendbird-openchannel-thumbnail-message__right__body",ref:Z},v.createElement("div",(0,g._)({className:"sendbird-openchannel-thumbnail-message__right__body__wrap",role:"button",onClick:function(){J&&c(!0)},onKeyDown:function(){J&&c(!0)},tabIndex:0},X?(0,g._)({},q):{}),v.createElement("div",{className:"sendbird-openchannel-thumbnail-message__right__body__wrap__overlay"}),((n={})[eO.VIDEO]=m||b?v.createElement("div",{className:"sendbird-openchannel-thumbnail-message__right__body__wrap__video"},T?v.createElement(O.ZP,{className:"sendbird-openchannel-thumbnail-message__right__body__wrap__video",url:T,width:F,height:"270px",alt:"image",placeHolder:$(A.Qy.PLAY)}):v.createElement("video",{className:"sendbird-openchannel-thumbnail-message__right__body__wrap__video__video"},v.createElement("source",{src:m||b,type:f})),v.createElement(A.ZP,{className:"sendbird-openchannel-thumbnail-message__right__body__wrap__video__icon",type:A.Qy.PLAY,fillColor:A.zo.ON_BACKGROUND_2,width:"56px",height:"56px"})):v.createElement(A.ZP,{className:"sendbird-openchannel-thumbnail-message__right__body__wrap__video--icon",type:A.Qy.PHOTO,fillColor:A.zo.ON_BACKGROUND_2,width:"56px",height:"56px"}),n[eO.IMAGE]=m||b?v.createElement(O.ZP,{className:"sendbird-openchannel-thumbnail-message__right__body__wrap__image",url:T||m||b||"",alt:"image",width:F,height:"270px",placeHolder:$(A.Qy.PHOTO)}):v.createElement(A.ZP,{className:"sendbird-openchannel-thumbnail-message__right__body__wrap__image--icon",type:A.Qy.PHOTO,fillColor:A.zo.ON_BACKGROUND_2,width:"56px",height:"56px"}),n[eO.UNSUPPORTED]=v.createElement(A.ZP,{className:"sendbird-openchannel-thumbnail-message__right__body__wrap__unknown",type:A.Qy.PHOTO,fillColor:A.zo.ON_BACKGROUND_2,width:"56px",height:"56px"}),n)[eR.IMAGE.indexOf(f)>=0?eO.IMAGE:eR.VIDEO.indexOf(f)>=0?eO.VIDEO:eO.UNSUPPORTED])),(ee||en)&&v.createElement("div",{className:"sendbird-openchannel-thumbnail-message__right__tail"},ee&&v.createElement(G.Z,{width:"16px",height:"16px"},v.createElement(A.ZP,{className:"sendbird-openchannel-thumbnail-message__right__tail__pending",type:A.Qy.SPINNER,fillColor:A.zo.PRIMARY,width:"16px",height:"16px"})),en&&v.createElement(A.ZP,{className:"sendbird-openchannel-thumbnail-message__right__tail__failed",type:A.Qy.ERROR,fillColor:A.zo.ERROR,width:"16px",height:"16px"}))),!X&&v.createElement("div",{className:"sendbird-openchannel-thumbnail-message__context-menu",ref:Q},(eb({message:r,userId:s,status:C})||!o)&&v.createElement(I.C,{menuTrigger:function(e){return eT({message:r,userId:s,status:C})&&v.createElement(N.Z,{className:"sendbird-openchannel-thumbnail-message__context-menu--icon",width:"32px",height:"32px",onClick:e},v.createElement(A.ZP,{type:A.Qy.MORE,fillColor:A.zo.CONTENT_INVERSE,width:"24px",height:"24px"}))},menuItems:function(e){return v.createElement(I.b,{parentRef:Q,parentContainRef:Q,closeDropdown:e,openLeft:!0},eb({message:r,userId:s,status:C})&&v.createElement(I.c,{onClick:function(){h(r),e()},testID:"open_channel_thumbnail_message_menu_resend"},w.CONTEXT_MENU_DROPDOWN__RESEND),!o&&ey({message:r,userId:s,status:C})&&v.createElement(I.c,{onClick:function(){l||(d(!0),e())},testID:"open_channel_thumbnail_message_menu_delete"},w.CONTEXT_MENU_DROPDOWN__DELETE))}}))),z&&v.createElement(eS,{message:r,parentRef:Z,hideMenu:function(){K(!1)},showRemove:function(){K(!1),d(!0)},resendMessage:function(){K(!1),h(r)}}))}var eD=function(e){return/(\.mp3)$/i.test(e)?A.Qy.FILE_AUDIO:/(\.gif)$/i.test(e)?A.Qy.GIF:A.Qy.FILE_DOCUMENT},eL=function(e,n){if(null==e)return"";if(e.length<=n)return e;var t=n-3;return e.substr(0,Math.ceil(t/2))+"..."+e.substr(e.length-Math.floor(t/2))};function eP(e){var n=e.className,t=e.message,r=e.isOperator,i=e.isEphemeral,a=void 0!==i&&i,o=e.userId,l=e.disabled,s=e.chainTop,u=e.showRemove,c=e.resendMessage,d=null==t?void 0:t.sendingStatus,h=(0,y.u)(),f=h.dateLocale,m=h.stringSet,E=(0,v.useRef)(null),b=(0,v.useRef)(null),C=(0,v.useRef)(null),T=(0,_.u)(),O=T.disableUserProfile,w=T.renderUserProfile,D=(0,p.u)().isMobile,P=function(){return(0,Q.o)(t.url)},U=ep(d),x=eg(d),k=em(t),F=(0,v.useState)(!1),V=F[0],j=F[1],z=(0,B.u)({onLongPress:function(){D&&j(!0)},onClick:P},{delay:300});return v.createElement(v.Fragment,null,v.createElement("div",{className:(0,g.c)((0,g.c)([],Array.isArray(n)?n:[n],!0),["sendbird-openchannel-file-message"],!1).join(" "),ref:b},v.createElement("div",{className:"sendbird-openchannel-file-message__left"},!s&&v.createElement(I.C,{menuTrigger:function(e){return v.createElement(M.A,{className:"sendbird-openchannel-file-message__left__avatar",src:k.profileUrl||"",ref:C,width:"28px",height:"28px",onClick:function(){O||e()}})},menuItems:function(e){return w?w({user:k,close:e,currentUserId:o,avatarRef:C}
13):v.createElement(I.b,{parentRef:C,parentContainRef:C,closeDropdown:e,style:{paddingTop:"0px",paddingBottom:"0px"}},v.createElement(H.Z,{user:k,onSuccess:e,disableMessaging:!0}))}})),v.createElement("div",{className:"sendbird-openchannel-file-message__right"},!s&&v.createElement("div",{className:"sendbird-openchannel-file-message__right__title"},v.createElement(S.L,{className:"sendbird-openchannel-file-message__right__title__sender-name",type:S.a.CAPTION_2,color:r?S.b.SECONDARY_3:S.b.ONBACKGROUND_2},k&&(k.friendName||k.nickname||k.userId)),v.createElement(S.L,{className:"sendbird-openchannel-file-message__right__title__sent-at",type:S.a.CAPTION_3,color:S.b.ONBACKGROUND_3},(null==t?void 0:t.createdAt)&&(0,L.f)(t.createdAt,m.DATE_FORMAT__MESSAGE_CREATED_AT,{locale:f}))),v.createElement("div",(0,g._)({className:"sendbird-openchannel-file-message__right__body"},D?(0,g._)({},z):{}),eD(t.url)&&v.createElement(A.ZP,{className:"sendbird-openchannel-file-message__right__body__icon",type:eD(t.url),fillColor:A.zo.PRIMARY,width:"48px",height:"48px"}),v.createElement(R.Z,{className:"sendbird-openchannel-file-message__right__body__file-name",onClick:P},v.createElement(S.L,{type:S.a.BODY_1,color:S.b.ONBACKGROUND_1},eL(t.name||t.url,40)))),(U||x)&&v.createElement("div",{className:"sendbird-openchannel-file-message__right__tail"},U&&v.createElement(G.Z,{width:"16px",height:"16px"},v.createElement(A.ZP,{className:"sendbird-openchannel-file-message__right__tail__pending",type:A.Qy.SPINNER,fillColor:A.zo.PRIMARY,width:"16px",height:"16px"})),x&&v.createElement(A.ZP,{className:"sendbird-openchannel-file-message__right__tail__failed",type:A.Qy.ERROR,fillColor:A.zo.ERROR,width:"16px",height:"16px"}))),!D&&v.createElement("div",{className:"sendbird-openchannel-file-message__context-menu",ref:E},(eb({message:t,userId:o,status:d})||!a)&&v.createElement(I.C,{menuTrigger:function(e){return eT({message:t,userId:o,status:d})&&v.createElement(N.Z,{className:"sendbird-openchannel-file-message__context-menu__icon",width:"32px",height:"32px",onClick:e},v.createElement(A.ZP,{type:A.Qy.MORE,width:"24px",height:"24px"}))},menuItems:function(e){return v.createElement(I.b,{parentRef:E,parentContainRef:E,closeDropdown:e,openLeft:!0},eb({message:t,userId:o,status:d})&&v.createElement(I.c,{onClick:function(){l||(c(t),e())},testID:"open_channel_file_message_context_menu_resend"},m.CONTEXT_MENU_DROPDOWN__RESEND),!a&&ey({message:t,userId:o,status:d})&&v.createElement(I.c,{onClick:function(){l||(u(!0),e())},testID:"open_channel_file_message_context_menu_delete"},m.CONTEXT_MENU_DROPDOWN__DELETE))}}))),V&&v.createElement(eS,{message:t,hideMenu:function(){j(!1)},parentRef:b,showRemove:function(){j(!1),u(!0)}}))}function eU(e){var n=e.message,t=e.onCloseModal,r=e.onDeleteMessage,i=(0,v.useContext)(y.L).stringSet;return v.createElement(b.M,{onCancel:t,onSubmit:r,submitText:i.MESSAGE_MENU__DELETE,titleText:(0,D.g)(i,n)})}var ex={ADMIN:"ADMIN",USER:"USER",FILE:"FILE",THUMBNAIL:"THUMBNAIL",OG:"OG",UNKNOWN:"UNKNOWN"},ek={NONE:"none",SUCCEEDED:"succeeded",FAILED:"failed",PENDING:"pending"},eF=function(e,n){var t,r,i=null==n?void 0:n.isOgMessageEnabledInOpenChannel;return(null===(t=null==e?void 0:e.isUserMessage)||void 0===t?void 0:t.call(e))||(null==e?void 0:e.messageType)==="user"?(null==e?void 0:e.ogMetaData)&&i?ex.OG:ex.USER:(null===(r=null==e?void 0:e.isAdminMessage)||void 0===r?void 0:r.call(e))?ex.ADMIN:(null==e?void 0:e.messageType)==="file"?(0,C.j)(e.type)||(0,C.h)(e.type)?ex.THUMBNAIL:ex.FILE:ex.UNKNOWN};function eG(e){var n,t,r,i=e.message,a=e.chainTop,o=e.chainBottom,l=e.hasSeparator,s=e.renderMessage,u=eu(),c=u.currentOpenChannel,d=u.deleteMessage,h=u.updateMessage,f=u.resendMessage,m=(0,y.u)(),p=m.dateLocale,g=m.stringSet,_=null==c?void 0:c.isFrozen,b=(0,E.A)(),C=null===(t=null==b?void 0:b.config)||void 0===t?void 0:t.userId,N=b.config.openChannel.enableOgtag;(null==i?void 0:i.messageType)!=="admin"&&(r=null==i?void 0:i.sender);var T=(0,v.useState)(!1),A=T[0],I=T[1],M=(0,v.useState)(!1),O=M[0],R=M[1],w=(0,v.useState)(!1),D=w[0],P=w[1],k=(0,v.useRef)(null),F=!1;return(r&&(null==i?void 0:i.messageType)!=="admin"&&(F=C===r.userId||(null==i?void 0:i.sendingStatus)===ek.PEND
13ING||(null==i?void 0:i.sendingStatus)===ek.FAILED),s)?v.createElement("div",{className:"sendbird-msg-hoc sendbird-msg--scroll-ref","data-testid":"sendbird-message-hoc"},s({message:i,chainTop:a,chainBottom:o})):(null==i?void 0:i.messageType)==="user"&&A?v.createElement(x.Z,{isEdit:!0,channel:c,disabled:_,ref:k,message:i,onUpdateMessage:function(e){h(e.messageId,e.message),I(!1)},onCancelEdit:function(){I(!1)}}):v.createElement("div",{className:"sendbird-msg-hoc sendbird-msg--scroll-ref","data-testid":"sendbird-message-hoc"},v.createElement(v.Fragment,null,l&&(null==i?void 0:i.createdAt)&&v.createElement(U.Z,null,v.createElement(S.L,{type:S.a.CAPTION_2,color:S.b.ONBACKGROUND_2},(0,L.f)(null==i?void 0:i.createdAt,g.DATE_FORMAT__MESSAGE_LIST__DATE_SEPARATOR,{locale:p}))),((n={})[ex.ADMIN]=function(){if((null==i?void 0:i.messageType)==="admin")return v.createElement(eI,{message:i})}(),n[ex.FILE]=function(){var e;if((null==i?void 0:i.messageType)==="file")return v.createElement(eP,{message:i,isOperator:null==c?void 0:c.isOperator(null===(e=null==i?void 0:i.sender)||void 0===e?void 0:e.userId),isEphemeral:null==c?void 0:c.isEphemeral,disabled:_,userId:C,showRemove:R,resendMessage:f,chainTop:a,chainBottom:o})}(),n[ex.OG]=function(){var e;if((null==i?void 0:i.messageType)==="user"&&N)return v.createElement(eM,{message:i,isOperator:null==c?void 0:c.isOperator(null===(e=null==i?void 0:i.sender)||void 0===e?void 0:e.userId),isEphemeral:null==c?void 0:c.isEphemeral,userId:C,showEdit:I,disabled:_,showRemove:R,resendMessage:f,chainTop:a,chainBottom:o})}(),n[ex.THUMBNAIL]=function(){var e;if((null==i?void 0:i.messageType)==="file")return v.createElement(ew,{message:i,isOperator:null==c?void 0:c.isOperator(null===(e=null==i?void 0:i.sender)||void 0===e?void 0:e.userId),isEphemeral:null==c?void 0:c.isEphemeral,disabled:_,userId:C,showRemove:R,resendMessage:f,onClick:P,chainTop:a,chainBottom:o})}(),n[ex.USER]=function(){var e;if((null==i?void 0:i.messageType)==="user")return v.createElement(eA,{message:i,isOperator:null==c?void 0:c.isOperator(null===(e=null==i?void 0:i.sender)||void 0===e?void 0:e.userId),isEphemeral:null==c?void 0:c.isEphemeral,userId:C,disabled:_,showEdit:I,showRemove:R,resendMessage:f,chainTop:a,chainBottom:o})}(),n[ex.UNKNOWN]=void 0,n)[eF(i,{isOgMessageEnabledInOpenChannel:N})],O&&v.createElement(eU,{message:i,onCloseModal:function(){return R(!1)},onDeleteMessage:function(){(null==i?void 0:i.messageType)!=="admin"&&d(i)}}),D&&(null==i?void 0:i.messageType)==="file"&&v.createElement(K.Z,{onClose:function(){return P(!1)},message:i,onDelete:function(){return d(i)},isByMe:F})))}v.forwardRef(function(e,n){var t=eu(),r=t.isMessageGroupingEnabled,i=void 0===r||r,a=t.allMessages,o=t.hasMore,l=t.onScroll,s=(0,E.A)().config.userId,u=(0,v.useRef)(null),c=n||u,d=(0,v.useState)(!1),h=d[0],f=d[1],m=function(){c&&"current"in c&&c.current&&(c.current.scrollTo(0,c.current.scrollHeight),f(!1))},p=(0,eo.u)({setShowScrollDownButton:f,hasMore:o,onScroll:l,scrollRef:c}),g=(0,v.useMemo)(function(){var n;return a.length>0?a.map(function(n,t){var r,o=a[t-1],l=a[t-1],u=o&&o.createdAt,c=null==n?void 0:n.createdAt,d=!(u&&(0,ec.i)(c,u)),h=i?(0,q.kt)(o,n,l):[!1,!1],f=h[0],m=h[1],p=(null===(r=null==n?void 0:n.sender)||void 0===r?void 0:r.userId)===s,g=(null==n?void 0:n.messageId)||(null==n?void 0:n.reqId);return v.createElement(V.x,{message:n,isByMe:p,key:g},v.createElement(eG,{message:n,chainTop:f,chainBottom:m,hasSeparator:d,renderMessage:null==e?void 0:e.renderMessage}))}):(null===(n=null==e?void 0:e.renderPlaceHolderEmptyList)||void 0===n?void 0:n.call(e))||v.createElement(w.Z,{className:"sendbird-openchannel-conversation-scroll__container__place-holder",type:w.v.NO_MESSAGES})},[a]);return v.createElement("div",{className:"sendbird-openchannel-conversation-scroll"},v.createElement("div",{className:"sendbird-openchannel-conversation-scroll__container"},v.createElement("div",{className:"sendbird-openchannel-conversation-scroll__container__padding"}),v.createElement("div",{className:["sendbird-openchannel-conversation-scroll__container__item-container",a.length>0?"":"no-messages"].join(" "),onScroll:p,ref:c},g)),h&&v.createElement("div",{className:"sendbird-openchannel-conversation-scroll__container__scroll-bottom-button",onClick:m,onKeyDown:m,tabIndex:0,role:"button"},v.createElement(A.ZP,{width:"24px",height:"24px",type:A.Qy.CHEVRON_DOWN,fillColor:A.zo.CONTENT})))}),v.createContext(null),(0,v.createContext)({openedListKeys:[],addOpenedListKey:Q.n,removeOpenedListKey:Q.n,clearOpenedListKeys:Q.n,allowMultipleOpen:!1})},22284:function(e,n,t){"use strict";t.d(n,{Lo:function(){return l},bw:function(){return c},hz:function(){return d},mK:function(){return a},vB:function(){return s}});var r=t(5701),i=t(88006),a=function(e){var n=e.stores,t=(void 0===n?{}:n).sdkStore;return(void 0===t?{}:t).sdk},o=function(e){var n=e.config;return(void 0===n?{}:n).pubSub},l=function(e){return function(n){return new Promise(function(t,i){var l=a(e),s=o(e);l||i(Error("Sdk not found")),l.groupChannel||i(Error("Not found GroupChannelModule")),l.groupChannel.createChannel&&"function"==typeof l.groupChannel.createChannel||i(Error('Not found the function "createChannel"')),l.groupChannel.createChannel(n).then(function(e){t(e),s.publish(r.p.CREATE_CHANNEL,{channel:e})}).catch(i)})}},s=function(e){return function(n){return new Promise(function(t,r){var i;(i=n,new Promise(function(n,t){var r=a(e);r||t(Error("Sdk not found")),r.groupChannel||t(Error("Not found GroupChannelModule")),r.groupChannel.getChannel&&"function"==typeof r.groupChannel.getChannel||t(Error('Not found the function "getChannel"')),r.groupChannel.getChannel(i).then(function(e){n(e)}).catch(t)})).then(function(e){e.leave().then(function(){t()}).catch(r)}).catch(r)})}},u=function(){function e(){this._onPending=i.n,this._onFailed=i.n,this._onSucceeded=i.n}return e.prototype.triggerPending=function(e){this._onPending(e)},e.prototype.triggerFailed=function(e,n){this._onFailed(e,(null==n?void 0:n.isResendable)?n:null)},e.prototype.triggerSucceeded=function(e){this._onSucceeded(e)},e.prototype.onPending=function(e){return"function"==typeof e&&(this._onPending=e),this},e.prototype.onFailed=function(e){return"function"==typeof e&&(this._onFailed=e),this},e.prototype.onSucceeded=function(e){return"function"==typeof e&&(this._onSucceeded=e),this},e}(),c=function(e,n){return void 0===n&&(n=[]),function(t,i){var a=new u,l=o(e);return t.sendUserMessage(i).onFailed(function(e,i){l.publish(r.p.SEND_MESSAGE_FAILED,{error:e,message:i,channel:t,publishingModules:n}),a.triggerFailed(e,i)}).onPending(function(e){l.publish(r.p.SEND_MESSAGE_START,{message:e,channel:t,publishingModules:n}),a.triggerPending(e)}
13).onSucceeded(function(e){l.publish(r.p.SEND_USER_MESSAGE,{message:e,channel:t,publishingModules:n}),a.triggerSucceeded(e)}),a}},d=function(e,n){return void 0===n&&(n=[]),function(t,i){var a=new u,l=o(e);return t.sendFileMessage(i).onFailed(function(e,i){l.publish(r.p.SEND_MESSAGE_FAILED,{error:e,message:i,channel:t,publishingModules:n}),a.triggerFailed(e,i)}).onPending(function(e){l.publish(r.p.SEND_MESSAGE_START,{message:e,channel:t,publishingModules:n}),a.triggerPending(e)}).onSucceeded(function(e){l.publish(r.p.SEND_FILE_MESSAGE,{message:e,channel:t,publishingModules:n}),a.triggerSucceeded(e)}),a}}},1167:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12394),i=t(67294),a=t(1608);function o(e){var n,t=e.className,o=void 0===t?"":t,l=e.message;return((null==l?void 0:l.isAdminMessage)||(null==l?void 0:l.messageType))&&(null===(n=null==l?void 0:l.isAdminMessage)||void 0===n?void 0:n.call(l))&&(null==l?void 0:l.messageType)==="admin"?i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(o)?o:[o],!0),["sendbird-admin-message"],!1).join(" ")},i.createElement(a.L,{className:"sendbird-admin-message__text",type:a.a.CAPTION_2,color:a.b.ONBACKGROUND_2},null==l?void 0:l.message)):null}t(64393)},32145:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(12394),i=t(67294),a=t(1608),o=t(7585);function l(e){var n=e.count,t=e.maxLevel,l=void 0===t?2:t,s=e.className,u=void 0===s?"":s,c=(0,i.useContext)(o.L).stringSet,d=parseInt("9".repeat(l>6?6:l),10);return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(u)?u:[u],
13!0),["sendbird-badge"],!1).join(" ")},i.createElement("div",{className:"sendbird-badge__text"},i.createElement(a.L,{type:a.a.CAPTION_2,color:a.b.ONCONTENT_1},"string"==typeof n?n:n>d?"".concat(d).concat(c.BADGE__OVER):n)))}t(64393)},18087:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(67294),i=t(73935),a=t(69392),o=t(41238);t(12394),t(49805),t(8978),t(7585),t(64393),t(43847),t(29515),t(88569),t(1608),t(43822),t(34420),t(71091),t(93122),t(69561),t(78614);var l=function(e){var n,t,l,s=e.className,u=e.children,c=e.onBackdropClick,d=null===(t=null===(n=(0,o.A)())||void 0===n?void 0:n.config)||void 0===t?void 0:t.logger,h=(0,r.useRef)();return h.current=document.getElementById(a.a),h.current||(h.current=document.createElement("div"),h.current.setAttribute("id",a.a),document.body.appendChild(h.current),null===(l=null==d?void 0:d.warning)||void 0===l||l.call(d,"@sendbird/uikit-react/ui/BottomSheet | Should put a ModalRoot to use the BottomSheet.")),(0,i.createPortal)(r.createElement("div",{className:"".concat(void 0===s?"":s," sendbird-bottomsheet")},r.createElement("div",{className:"sendbird-bottomsheet__content",role:"dialog","aria-modal":"true","aria-expanded":"true"},u),r.createElement("div",{className:"sendbird-bottomsheet__backdrop",onClick:function(e){null==e||e.stopPropagation(),null==c||c()}})),h.current)}},88569:function(e,n,t){"use strict";t.d(n,{Ph:function(){return o},ZP:function(){return c},qh:function(){return a}});var r,i,a,o,l=t(12394),s=t(67294),u=t(1608);function c(e){var n=e.className,t=e.type,r=void 0===t?a.PRIMARY:t,i=e.size,c=void 0===i?o.BIG:i,d=e.children,h=e.disabled,f=void 0!==h&&h,m=e.onClick,v=e.labelType,p=void 0===v?u.a.BUTTON_1:v,g=e.labelColor,_=void 0===g?u.b.ONCONTENT_1:g,E=(0,l.c)((0,l.c)([],Array.isArray(n)?n:[n],!0),["sendbird-button",f?"sendbird-button__disabled":"",function(e){switch(e){case a.PRIMARY:return"sendbird-button--primary";case a.SECONDARY:return"sendbird-button--secondary";case a.DANGER:return"sendbird-button--danger";case a.DISABLED:return"sendbird-button--disabled";case a.WARNING:return"sendbird-button--warning";default:return""}}(r),function(e){switch(e){case o.BIG:return"sendbird-button--big";case o.SMALL:return"sendbird-button--small";default:return""}}(c)],!1).join(" ");return s.createElement("button",{className:E,type:"button",onClick:void 0===m?function(){}:m,disabled:f},s.createElement(u.L,{className:"sendbird-button__text",type:p,color:_},void 0===d?"Button":d))}t(64393),(r=a||(a={})).PRIMARY="PRIMARY",r.SECONDARY="SECONDARY",r.DANGER="DANGER",r.DISABLED="DISABLED",r.WARNING="WARNING",(i=o||(o={})).BIG="BIG",i.SMALL="SMALL"},9399:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var r=t(67294),i=t(70179),a=t(43822),o="https://static.sendbird.com/sample/cover/cover_",l=function(e,n){return(null==e?void 0:e.coverUrl)&&!new RegExp("^".concat(o)).test(e.coverUrl)?e.coverUrl:((null==e?void 0:e.members)||[]).filter(function(e){return e.userId!==n}).map(function(e){return e.profileUrl})};function s(e){var n=e.channel,t=e.userId,s=e.theme,u=e.width,c=void 0===u?56:u,d=e.height,h=void 0===d?56:d,f=null==n?void 0:n.isBroadcast,m=(0,r.useMemo)(function(){return f?null==n||!n.coverUrl||new RegExp("^".concat(o)).test(n.coverUrl)?r.createElement("div",{className:"sendbird-chat-header--default-avatar",style:{width:c,height:h,display:"flex",justifyContent:"center",alignItems:"center"}},r.createElement(a.ZP,{type:a.Qy.BROADCAST,fillColor:a.zo.CONTENT,width:.575*c,height:.575*h})):r.createElement(i.A,{className:"sendbird-chat-header--avatar--broadcast-channel",src:l(n,t),width:c,height:h,alt:null==n?void 0:n.name}):r.createElement(i.A,{className:"sendbird-chat-header--avatar--group-channel",src:l(n,t),width:"".concat(c,"px"),height:"".concat(h,"px"),alt:null==n?void 0:n.name})},[l(n,t),s]);return r.createElement(r.Fragment,null,m)}t(12394),t(4399)},10856:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(67294);function i(e){var n=e.id,t=e.checked,i=e.disabled,a=e.onChange,o=(0,r.useState)(void 0!==t&&t),l=o[0],s=o[1];return r.createElement("label",{className:["sendbird-checkbox",i?"disabled":""].join(" "),htmlFor:n},r.createElement("input",{disabled:i,id:n,type:"checkbox",checked:l,onClick:function(){i||s(!l)},onChange:a}),r.createElement("span",{className:["sendbird-checkbox--checkmark",i?"disabled":""].join(" ")}))}},55922:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(67294),i=t(43822),a=t(1608),o=t(7585);function l(){var e=(0,r.useContext)(o.L).stringSet;return r.createElement("div",{className:"sendbird-connection-status"},r.createElement(a.L,{type:a.a.BODY_2,color:a.b.ONBACKGROUND_2},e.TRYING_TO_CONNECT),r.createElement(i.ZP,{type:i.Qy.DISCONNECTED,fillColor:i.zo.SENT,width:"14px",height:"14px"}))}t(12394),t(64393)},8743:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(12394),i=t(67294),a=t(74865),o=t(1608);t(64393);var l=function(e){var n=e.children,t=e.className,l=void 0===t?"":t,s=e.separatorColor,u=void 0===s?a.C.ONBACKGROUND_4:s;return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(l)?l:[l],!0),["sendbird-separator"],!1).join(" ")},i.createElement("div",{className:["sendbird-separator__left","".concat((0,a.c)(u),"--background-color")].join(" ")}),i.createElement("div",{className:"sendbird-separator__text"},(void 0===n?void 0:n)||i.createElement(o.L,{type:o.a.CAPTION_2,color:o.b.ONBACKGROUND_2},"Date Separator")),i.createElement("div",{className:["sendbird-separator__right","".concat((0,a.c)(u),"--background-color")].join(" ")}))}},27835:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(67294),i=t(30156),a=t(60090),o=t(4399),l=t(43822),s=t(69561),u=t(49805),c=t(18087),d=t(1608),h=t(56842),f=t(88006),m=t(12394),v=t(76886),p=t(32080),g=t(43847),_=t(67315),E=t(7585),b=t(41238),C=t(23012),y=t(69392),N=t(88569),T=t(14761);t(64393),t(73935),t(78614),t(71091),t(29515),t(8978),t(34420),t(93122),t(26748),t(70179),t(67412),t(10856),t(13462),t(22284),t(5701);var S=function(e){var n,t,i,a=e.message,s=e.channel,m=e.emojiKey,v=e.hideMenu,p=e.emojiContainer,g=e.onPressUserProfileHandler,_=s.members,E=void 0===_?[]:_,b=(0,r.useState)(void 0===m?"":m),C=b[0],y=b[1];function N(){g&&a&&g(null==a?void 0:a.sender)}return r.createElement(c.Z,{onBackdropClick:v},r.createElement("div",{className:"sendbird-message__bottomsheet"},r.createElement("div",{className:"sendbird-message__bottomsheet__reacted-members"},null===(n=a.reactions)||void 0===n?void 0:n.map(function(e){var n=(0,u.V)(p,e.key);return r.createElement("div",{key:e.key,className:(0,f.c)("sendbird-message__bottomsheet__reacted-members__item",C===e.key&&"sendbird-message__bottomsheet__reacted-members__item__selected"),onClick:function(){y(e.key)}},r.createElement(o.ZP,{url:n,width:"28px",height:"28px",placeHolder:function(e){var n=e.style;return r.createElement("div",{style:n},r.createElement(l.ZP,{type:l.Qy.QUESTION,fillColor:l.zo.ON_BACKGROUND_3,width:"28px",height:"28px"}))}}
13),r.createElement(d.L,{type:d.a.BUTTON_2,color:C===e.key?d.b.PRIMARY:d.b.ONBACKGROUND_3},e.userIds.length))})),r.createElement("div",{className:"sendbird-message__bottomsheet__reactor-list"},(null===(i=null===(t=a.reactions)||void 0===t?void 0:t.find(function(e){return e.key===C}))||void 0===i?void 0:i.userIds.map(function(e){return E.find(function(n){return n.userId===e})}).filter(function(e){return void 0!==e})).map(function(e){return r.createElement(h.Q,{key:e.userId,className:"sendbird-message__bottomsheet__reactor-list__item",user:e,avatarSize:"36px",onUserAvatarClick:N})}))))};function A(e){var n,t=e.reaction,a=e.memberNicknamesMap,s=e.setEmojiKey,c=e.toggleReaction,d=e.emojisMap,h=e.channel,f=e.message,T=e.isFiltered,S=(0,y.b)().openModal,A=(0,b.A)(),I=(0,g.u)().isMobile,M=(0,C.f)(),O=(0,r.useContext)(E.L).stringSet,R=A.config.userId,w=(0,u.W)(R,t),D=t.userIds.length>0&&(null==h?void 0:h.isGroupChannel())&&!h.isSuper,L=function(){if(T&&!w){S({modalProps:{titleText:"Add reaction failed",hideFooter:!0,isCloseOnClickOutside:!0},childElement:function(e){var n=e.closeModal;return r.createElement(y.c,{type:N.qh.PRIMARY,submitText:O.BUTTON__OK,hideCancelButton:!0,onCancel:n,onSubmit:n})}});return}s(""),null==c||c(null!=f?f:null==M?void 0:M.message,t.key,w)},P=(0,_.u)({onLongPress:function(){s(t.key)},onClick:L},{shouldPreventDefault:!0,shouldStopPropagation:!0});return r.createElement(p.Z,{className:"sendbird-emoji-reactions__reaction-badge",hoverTooltip:D?r.createElement(v.Z,null,(0,u.X)(t,R,a,O)):r.createElement(r.Fragment,null)},r.createElement("div",(0,m._)({},I?P:{onClick:L}),r.createElement(i.Z,{count:t.userIds.length,selected:w},r.createElement(o.ZP,{circle:!0,url:(null===(n=d.get(null==t?void 0:t.key))||void 0===n?void 0:n.url)||"",width:"20px",height:"20px",defaultComponent:r.createElement(l.ZP,{width:"20px",height:"20px",type:l.Qy.QUESTION})}))))}var I=function(e){var n=e.onClick,t=(0,_.u)({onLongPress:function(){},onClick:n},{shouldPreventDefault:!0,shouldStopPropagation:!0});return r.createElement("div",(0,m._)({className:"sendbird-emoji-reactions__add-reaction-badge","data-testid":"sendbird-emoji-reactions__add-reaction-badge"},t),r.createElement(i.Z,{isAdd:!0},r.createElement(l.ZP,{type:l.Qy.EMOJI_MORE,fillColor:l.zo.ON_BACKGROUND_3,width:"20px",height:"20px"})))},M=function(e){var n=e.userId,t=e.message,i=e.emojiContainer,s=e.hideMenu,d=e.toggleReaction,h=(0,r.useMemo)(function(){return(0,u.T)(i)},[i]);return r.createElement(c.Z,{onBackdropClick:s},r.createElement("div",{className:"sendbird-message__bottomsheet sendbird-message__emojis-bottomsheet"},h.map(function(e){var i,u,c,h,f=null!==(h=null===(c=null===(u=null===(i=null==t?void 0:t.reactions)||void 0===i?void 0:i.find(function(n){return n.key===e.key}))||void 0===u?void 0:u.userIds)||void 0===c?void 0:c.some(function(e){return e===n}))&&void 0!==h&&h;return r.createElement(a.Z,{key:e.key,width:"44px",height:"44px",selected:f,onClick:function(n){null==n||n.stopPropagation(),null==d||d(t,e.key,f),s()},testID:"ui_mobile_emoji_reactions_menu_".concat(e.key)},r.createElement(o.ZP,{url:e.url,width:"38px",height:"38px",placeHolder:function(e){var n=e.style;return r.createElement("div",{style:n},r.createElement(l.ZP,{type:l.Qy.QUESTION,fillColor:l.zo.ON_BACKGROUND_3,width:"28px",height:"28px"}))}}))})))},O=function(e){var n,t,c,d,h,f=e.className,m=e.userId,v=e.message,p=e.channel,_=e.emojiContainer,E=e.memberNicknamesMap,C=e.spaceFromTrigger,y=void 0===C?{x:0,y:0}:C,N=e.isByMe,O=e.toggleReaction,R=e.onPressUserProfile,w=e.filterEmojiCategoryIds,D=!1;try{var L=(0,b.A)().config;D=!!p&&(0,T.g)({channel:p,config:L})}catch(e){}var P=(0,g.u)().isMobile,U=(0,r.useRef)(null),x=(0,r.useState)(!1),k=x[0],F=x[1],G=(0,r.useState)(""),B=G[0],H=G[1],V=(0,u.Y)(_),j=(0,r.useMemo)(function(){return(0,u.u)(_,null==w?void 0:w(v))},[_,w]),z=(null!==(t=null===(n=v.reactions)||void 0===n?void 0:n.length)&&void 0!==t?t:0)<V.size;return r.createElement("div",{className:(0,u.x)([void 0===f?"":f,"sendbird-emoji-reactions",void 0!==N&&N?"outgoing":"incoming"])},(null!==(d=null===(c=v.reactions)||void 0===c?void 0:c.length)&&void 0!==d?d:0)>0&&(null===(h=v.reactions)||void 0===h?void 0:h.map(function(e){return r.createElement(A,{key:null==e?void 0:e.key,reaction:e,memberNicknamesMap:E,setEmojiKey:H,toggleReaction:O,emojisMap:V,channel:p,message:v,isFiltered:(0,u.u)(_,null==w?void 0:w(v)).every(function(n){return n.key!==(null==e?void 0:e.key)})})})),!P&&z&&r.createElement(s.C,{menuTrigger:function(e){return r.createElement(i.Z,{className:"sendbird-emoji-reactions__add-reaction-badge",testID:"sendbird-emoji-reactions__add-reaction-badge",ref:U,isAdd:!0,onClick:function(n){var t;e(),null===(t=null==n?void 0:n.stopPropagation)||void 0===t||t.call(n)}},r.createElement(l.ZP,{type:l.Qy.EMOJI_MORE,fillColor:l.zo.ON_BACKGROUND_3,width:"20px",height:"20px"}))},menuItems:function(e){return 0===j.length?null:r.createElement(s.f,{parentRef:U,parentContainRef:U,
13closeDropdown:e,spaceFromTrigger:y},(0,u.u)(_,null==w?void 0:w(v)).map(function(n){var t,i,s,u=(null===(s=null===(i=null===(t=null==v?void 0:v.reactions)||void 0===t?void 0:t.find(function(e){return e.key===n.key}))||void 0===i?void 0:i.userIds)||void 0===s?void 0:s.some(function(e){return e===m}))||!1;return r.createElement(a.Z,{key:n.key,width:"36px",height:"36px",selected:u,onClick:function(t){e(),null==O||O(v,n.key,u),null==t||t.stopPropagation()},testID:"ui_emoji_reactions_menu_".concat(n.key)},r.createElement(o.ZP,{url:(null==n?void 0:n.url)||"",width:"28px",height:"28px",placeHolder:function(e){var n=e.style;return r.createElement("div",{style:n},r.createElement(l.ZP,{type:l.Qy.QUESTION,fillColor:l.zo.ON_BACKGROUND_3,width:"28px",height:"28px"}))}}))}))}}),P&&z&&r.createElement(I,{onClick:function(){F(!0)}}),P&&k&&r.createElement(M,{userId:m,message:v,emojiContainer:_,hideMenu:function(){F(!1)},toggleReaction:O}),P&&B&&null!==p&&D&&r.createElement(S,{message:v,channel:p,emojiKey:B,hideMenu:function(){H("")},emojiContainer:_,onPressUserProfileHandler:R}))}},34498:function(e,n,t){"use strict";t.d(n,{x:function(){return l}});var r=t(67294),i=t(7585),a=t(49805),o=t(1608);function l(e){var n=e.className,t=e.message,l=e.isByMe,s=(0,r.useContext)(i.L).stringSet,u=t.message;return r.createElement("div",{className:(0,a.x)([null!=n?n:"",l?"outgoing":"incoming","sendbird-template-message-item-body__fallback_message"])},u?r.createElement(r.Fragment,null,r.createElement(o.L,{type:o.a.BODY_1,color:o.b.ONCONTENT_INVERSE_1},u)):r.createElement(r.Fragment,null,r.createElement(o.L,{className:"sendbird-template-message-item-body__fallback_message__header",type:o.a.BODY_1,color:o.b.ONCONTENT_INVERSE_1},s.UNKNOWN__TEMPLATE_ERROR),r.createElement(o.L,{className:"sendbird-template-message-item-body__fallback_message__description",type:o.a.BODY_1,color:o.b.ONCONTENT_INVERSE_3},s.UNKNOWN__CANNOT_READ_TEMPLATE)))}t(12394),t(64393),t(8978)},15345:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(67294),i=r.forwardRef(function(e,n){var t=e.children,i=e.isSelected,a=e.onClick,o=void 0===a?function(){}:a,l=e.disabled,s=void 0!==l&&l;return r.createElement("button",{className:["sendbird-iconbutton__feedback",i?"sendbird-iconbutton__feedback__pressed":"",s?"sendbird-iconbutton__feedback__disabled":""].join(" "),ref:n,type:"button",onClick:function(e){null==o||o(e)},disabled:s},r.createElement("span",{className:["sendbird-iconbutton__feedback__inner",i?"sendbird-iconbutton__feedback__inner__pressed":"",s?"sendbird-iconbutton__feedback__inner__disabled":""].join(" ")},t))})},12210:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var r=t(12394),i=t(67294),a=t(1608),o=t(43822),l=t(21790),s=t(49805),u=t(74865),c=t(43847),d=t(41238),h=t(88006);function f(e){var n,t,f,m=this,v=e.className,p=e.message,g=e.isByMe,_=void 0!==g&&g,E=e.mouseHover,b=e.isReactionEnabled,C=e.truncateLimit,y=e.onBeforeDownloadFileMessage,N=null;try{N=null===(t=null===(n=(0,d.A)())||void 0===n?void 0:n.config)||void 0===t?void 0:t.logger}catch(e){}var T=(0,c.u)().isMobile,S=function(){return(0,h.o)(null==p?void 0:p.url)},A=y?function(){return(0,r.a)(m,void 0,void 0,function(){var e,n,t;return(0,r.b)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,y({message:p})];case 1:return r.sent()?S():null===(n=null==N?void 0:N.info)||void 0===n||n.call(N,"FileMessageItemBody: Not allowed to download."),[3,3];case 2:return e=r.sent(),null===(t=null==N?void 0:N.error)||void 0===t||t.call(N,"FileMessageItemBody: Error occurred while determining download continuation:",e),[3,3];case 3:return[2]}})})}:S;return i.createElement("div",{className:(0,s.x)([void 0===v?"":v,"sendbird-file-message-item-body",_?"outgoing":"incoming",void 0!==E&&E?"mouse-hover":"",void 0!==b&&b&&(null===(f=null==p?void 0:p.reactions)||void 0===f?void 0:f.length)>0?"reactions":""])},i.createElement("div",{className:"sendbird-file-message-item-body__file-icon"},i.createElement(o.ZP,{className:"sendbird-file-message-item-body__file-icon__icon",type:{IMAGE:o.Qy.PHOTO,VIDEO:o.Qy.PLAY,AUDIO:o.Qy.FILE_AUDIO,GIF:o.Qy.GIF,OTHERS:o.Qy.FILE_DOCUMENT}[(0,s.o)(null==p?void 0:p.type)],fillColor:o.zo.PRIMARY,width:"24px",height:"24px"})),i.createElement(l.Z,{className:"sendbird-file-message-item-body__file-name",onClick:A,color:_?u.C.ONCONTENT_1:u.C.ONBACKGROUND_1},i.createElement(a.L,{className:"sendbird-file-message-item-body__file-name__text",testID:"sendbird-file-message-item-body__file-name__text",type:a.a.BODY_1,color:_?a.b.ONCONTENT_1:a.b.ONBACKGROUND_1},(0,s.t)((null==p?void 0:p.name)||(null==p?void 0:p.url),null!=C?C:T?20:void 0))))}t(64393),t(8978),t(71091)},6989:function(e,n,t){"use strict";t.d(n,{Z:function(){return E}});var r=t(12394),i=t(67294),a=t(73935),o=t(7585),l=t(69392),s=t(49805),u=t(88006),c=t(70179),d=t(1608),h=t(43822),f=t(58972),m=t(95988);t(64393),t(43847),t(29515),t(88569),t(34420),t(71091),t(93122),t(41238),t(69561),t(78614),t(8978),t(4399);var v={SINGLE:"SINGLE",MULTI:"MULTI"};function p(e){if(e.viewerType!==v.MULTI){var n=e.onDelete,t=e.isByMe,r=e.disableDelete,a=e.className;return t?i.createElement("div",{className:"sendbird-fileviewer__header__right__actions__delete ".concat(a)},i.createElement(h.ZP,{className:r?"disabled":"",type:h.Qy.DELETE,fillColor:r?h.zo.GRAY:h.zo.ON_BACKGROUND_1,height:"24px",width:"24px",onClick:function(e){r||null==n||n(e)}})):i.createElement(i.Fragment,null)}return i.createElement(i.Fragment,null)}function g(e){if(e.viewerType===v.MULTI){var n=e.onClickLeft,t=e.onClickRight;return i.createElement("div",{className:"sendbird-file-viewer-slider"},i.createElement("div",{className:"sendbird-file-viewer-arrow--left"},i.createElement(h.ZP,{type:h.Qy.SLIDE_LEFT,fillColor:h.zo.ON_BACKGROUND_1,height:f.n,width:f.n,onClick:function(e){null==n||n(),e.stopPropagation()}})),i.createElement("div",{className:"sendbird-file-viewer-arrow--right"},i.createElement(h.ZP,{type:h.Qy.SLIDE_LEFT,fillColor:h.zo.ON_BACKGROUND_1,height:f.n,width:f.n,onClick:function(e){e.stopPropagation(),null==t||t()}})))}return i.createElement(i.Fragment,null)}var _=function(e){var n=e.profileUrl,t=e.nickname,a=e.onClose,u=e.onDownloadClick,f=e.onClickLeft,_=e.onClickRight,E=(0,i.useRef)(null),b=(0,m.u)(E,{Escape:function(e){return null==a?void 0:a(e)},ArrowLeft:function(){return null==f?void 0:f()},ArrowRight:function(){return null==_?void 0:_()}}),C=e.viewerType===v.MULTI?e.fileInfoList[e.currentIndex]:{name:e.name,type:e.type,url:e.url},y=C.name,N=C.type,T=C.url,S=(0,i.useContext)(o.L).stringSet;return i.createElement(l.M,{onClose:a},i.createElement("div",{className:"sendbird-fileviewer","data-testid":"sendbird-fileviewer",onKeyDown:b,tabIndex:1,ref:E},i.createElement("div",{className:"sendbird-fileviewer__header"},i.createElement("div",{className:"sendbird-fileviewer__header__left"},i.createElement("div",{className:"sendbird-fileviewer__header__left__avatar"},i.createElement(c.A,{height:"32px",width:"32px",src:n})),i.createElement("div",{className:"sendbird-fileviewer__header__left__text-container"},i.createElement(d.L,{className:"sendbird-fileviewer__header__left__filename",type:d.a.H_2,color:d.b.ONBACKGROUND_1},y),i.createElement(d.L,{className:"sendbird-fileviewer__header__left__sender-name",type:d.a.BODY_1,color:d.b.ONBACKGROUND_2},t))),i.createElement("div",{className:"sendbird-fileviewer__header__right"},(0,s.f)(N)&&i.createElement("div",{className:"sendbird-fileviewer__header__right__actions"},i.createElement("a",{className:"sendbird-fileviewer__header__right__actions__download",rel:"noopener noreferrer",href:T,target:"_blank",onClick:u},i.createElement(h.ZP,{type:h.Qy.DOWNLOAD,fillColor:h.zo.ON_BACKGROUND_1,height:"24px",width:"24px"})),i.createElement(p,(0,r._)({className:"sendbird-fileviewer__header__right__actions__delete"},e))),i.createElement("div",{className:"sendbird-fileviewer__header__right__actions__close"},i.createElement(h.ZP,{type:h.Qy.CLOSE,fillColor:h.zo.ON_BACKGROUND_1,height:"24px",width:"24px",onClick:function(e){return null==a?void 0:a(e)}})))),i.createElement("div",{className:"sendbird-fileviewer__content"},(0,s.h)(N)&&i.createElement("video",{controls:!0,className:"sendbird-fileviewer__content__video"},i.createElement("source",{src:T,type:N})),(0,s.j)(N)&&i.createElement("img",{src:T,alt:y,className:e.viewerType===v.MULTI?"sendbird-fileviewer__content__img__multi":"sendbird-fileviewer__content__img"}),!(0,s.f)(N)&&i.createElement("div",{className:"sendbird-fileviewer__content__unsupported"},i.createElement(d.L,{type:d.a.H_1,color:d.b.ONBACKGROUND_1},(null==S?void 0:S.UI__FILE_VIEWER__UNSUPPORT)||"Unsupported message")),i.createElement(g,(0,r._)({},e)))))};function E(e){var n,t,r,o=e.message,c=e.statefulFileInfoList,d=e.onClose,h=e.isByMe,f=e.onDelete,m=e.currentIndex,p=e.onClickLeft,g=e.onClickRight,E=e.onDownloadClick;if((0,s.c)(o)){var b=o;return i.createElement(_,{profileUrl:b.sender.profileUrl,nickname:b.sender.nickname,viewerType:v.MULTI,fileInfoList:(void 0===c?[]:c).filter(function(e){return e.url}).map(function(e){return{name:e.fileName||"",type:e.mimeType||"",url:e.url||""}}),currentIndex:m||0,onClickLeft:p||u.n,onClickRight:g||u.n,onClose:d,onDownloadClick:E})}if((0,s.b)(o)){var b=o;return(0,a.createPortal)(i.createElement(_,{profileUrl:null===(n=b.sender)||void 0===n?void 0:n.profileUrl,nickname:null===(t=b.sender)||void 0===t?void 0:t.nickname,name:b.name,type:b.type,url:null==b?void 0:b.url,isByMe:void 0!==h&&h,disableDelete:((null===(r=b.threadInfo)||void 0===r?void 0:r.replyCount)||0)>0,onClose:d,onDelete:f||u.n,onDownloadClick:E}),document.getElementById(l.a))}return i.createElement(i.Fragment,null)}},56210:function(e,n,t){"use strict";t.d(n,{ZP:function(){return h}});var r=t(12394),i=t(67294),a=t(1608),o=t(43847),l=t(21790),s=t(43822),u=t
13(29515),c=t(88006);t(64393),t(74865);var d=function(e){var n=e.className,t=e.type,r=e.color,a=e.width,o=e.height,l=e.onClick,u=void 0===l?c.n:l;return i.createElement(s.ZP,{className:n,type:t,fillColor:r,width:void 0===a?"22px":a,height:void 0===o?"22px":o,onClick:function(e){return null==u?void 0:u(e)}})},h=Object.assign(function(e){var n,t=e.className,r=e.renderLeft,a=e.renderRight,l=e.renderMiddle,s=!1;try{s=null===(n=null===o.u||void 0===o.u?void 0:(0,o.u)())||void 0===n?void 0:n.isMobile}catch(e){}return i.createElement("div",{className:(0,c.c)("sendbird-ui-header",t),"data-testid":"sendbird-ui-header"},r?i.createElement("div",{className:(0,c.c)("sendbird-ui-header__left",s?"sendbird-ui-header--is-mobile":"sendbird-ui-header--is-desktop")},null==r?void 0:r()):null,i.createElement("div",{className:"sendbird-ui-header__middle"},null==l?void 0:l()),a?i.createElement("div",{className:(0,c.c)("sendbird-ui-header__right",s?"sendbird-ui-header--is-mobile":"sendbird-ui-header--is-desktop")},null==a?void 0:a()):null)},{Title:function(e){var n=e.title,t=e.subtitle,r=e.onClickSubtitle;return i.createElement("div",{className:"sendbird-ui-header__middle"},n&&i.createElement(a.L,{className:"sendbird-ui-header__middle__title",type:a.a.H_2,color:a.b.ONBACKGROUND_1},n),t&&(r?i.createElement(l.Z,{className:"sendbird-ui-header__middle__subtitle__container",onClick:r,disableUnderline:!0},i.createElement(a.L,{className:"sendbird-ui-header__middle__subtitle",type:a.a.CAPTION_3,color:a.b.ONBACKGROUND_2},t)):i.createElement(a.L,{className:"sendbird-ui-header__middle__subtitle",type:a.a.BODY_1,color:a.b.ONBACKGROUND_2},t)))},IconButton:function(e){var n=e.className,t=e.onClick,a=e.type,o=e.color,l=e.width,s=e.height,c=e.renderIcon;return i.createElement(u.Z,{className:n,width:void 0===l?"32px":l,height:void 0===s?"32px":s,onClick:t},(void 0===c?function(e){return i.createElement(d,(0,r._)({},e))}:c)({type:a,color:o}))},Icon:d})},43822:function(e,n,t){"use strict";t.d(n,{Qy:function(){return tu},ZP:function(){return ts},zo:function(){return tc}});var r,i,a,o,l,s,u,c,d,h,f,m,v,p,g,_,E,b,C,y,N,T,S,A,I,M,O,R,w,D,L,P,U,x,k,F,G,B,H,V,j,z,K,Y,Z,Q,W,q,X,$,J,ee,en,et,er,ei,ea,eo,el,es,eu,ec,ed=t(12394),eh=t(67294),ef=t(88006),em={ADD:"ADD",ARROW_LEFT:"ARROW_LEFT",ATTACH:"ATTACH",AUDIO_ON_LINED:"AUDIO_ON_LINED",BAN:"BAN",BROADCAST:"BROADCAST",CAMERA:"CAMERA",CHANNELS:"CHANNELS",CHAT:"CHAT",CHAT_FILLED:"CHAT_FILLED",CHEVRON_DOWN:"CHEVRON_DOWN",CHEVRON_RIGHT:"CHEVRON_RIGHT",CLOSE:"CLOSE",COLLAPSE:"COLLAPSE",COPY:"COPY",CREATE:"CREATE",DELETE:"DELETE",DISCONNECTED:"DISCONNECTED",DOCUMENT:"DOCUMENT",DONE:"DONE",DONE_ALL:"DONE_ALL",DOWNLOAD:"DOWNLOAD",EDIT:"EDIT",EMOJI_MORE:"EMOJI_MORE",ERROR:"ERROR",EXPAND:"EXPAND",FILE_AUDIO:"FILE_AUDIO",FILE_DOCUMENT:"FILE_DOCUMENT",FREEZE:"FREEZE",GIF:"GIF",INFO:"INFO",LEAVE:"LEAVE",MEMBERS:"MEMBERS",MESSAGE:"MESSAGE",MODERATIONS:"MODERATIONS",MORE:"MORE",MUTE:"MUTE",NOTIFICATIONS:"NOTIFICATIONS",NOTIFICATIONS_OFF_FILLED:"NOTIFICATIONS_OFF_FILLED",OPERATOR:"OPERATOR",PHOTO:"PHOTO",PLAY:"PLAY",PLUS:"PLUS",QUESTION:"QUESTION",REFRESH:"REFRESH",REPLY:"REPLY",REMOVE:"REMOVE",SEARCH:"SEARCH",SEND:"SEND",SETTINGS_FILLED:"SETTINGS_FILLED",SLIDE_LEFT:"SLIDE_LEFT",SPINNER:"SPINNER",SUPERGROUP:"SUPERGROUP",THREAD:"THREAD",THUMBNAIL_NONE:"THUMBNAIL_NONE",TOGGLE_OFF:"TOGGLE_OFF",TOGGLE_ON:"TOGGLE_ON",USER:"USER",FEEDBACK_LIKE:"FEEDBACK_LIKE",FEEDBACK_DISLIKE:"FEEDBACK_DISLIKE"},ev={DEFAULT:"DEFAULT",PRIMARY:"PRIMARY",PRIMARY_2:"PRIMARY_2",SECONDARY:"SECONDARY",SECONDARY_2:"SECONDARY_2",CONTENT:"CONTENT",CONTENT_INVERSE:"CONTENT_INVERSE",CONTENT_INVERSE_3:"CONTENT_INVERSE_3",WHITE:"WHITE",GRAY:"GRAY",THUMBNAIL_ICON:"THUMBNAIL_ICON",SENT:"SENT",READ:"READ",ON_BACKGROUND_1:"ON_BACKGROUND_1",ON_BACKGROUND_2:"ON_BACKGROUND_2",ON_BACKGROUND_3:"ON_BACKGROUND_3",ON_BACKGROUND_4:"ON_BACKGROUND_4",BACKGROUND_3:"BACKGROUND_3",ERROR:"ERROR"};function ep(){return(ep=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eg=e=>eh.createElement("svg",ep({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),r||(r=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M50.667 5.333a8 8 0 0 1 8 8v37.334a8 8 0 0 1-8 8H13.333a8 8 0 0 1-8-8V13.333a8 8 0 0 1 8-8zm0 5.334H13.333a2.667 2.667 0 0 0-2.666 2.666v37.334a2.667 2.667 0 0 0 2.666 2.666h37.334a2.667 2.667 0 0 0 2.666-2.666V13.333a2.667 2.667 0 0 0-2.666-2.666m-18.667 8a2.667 2.667 0 0 1 2.649 2.355l.018.311v8h8a2.667 2.667 0 0 1 .311 5.316l-.311.018h-8v8a2.667 2.667 0 0 1-5.316.311l-.018-.311v-8h-8a2.667 2.667 0 0 1-.311-5.316l.311-.018h8v-8A2.667 2.667 0 0 1 32 18.667",className:"icon-add_svg__fill"})));function e_(){return(e_=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eE=e=>eh.createElement("svg",e_({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),i||(i=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M33.886 8.781a2.67 2.67 0 0 1 .221 3.52l-.221.251-16.78 16.781H56a2.667 2.667 0 0 1 .311 5.316l-.311.018-38.895-.001 16.78 16.782a2.666 2.666 0 0 1 .222 3.52l-.221.251a2.67 2.67 0 0 1-3.52.222l-.252-.222L8.781 33.886a2.67 2.67 0 0 1-.222-3.52l.222-.252L30.114 8.781a2.67 2.67 0 0 1 3.772 0",className:"icon-arrow-left_svg__fill"})));function eb(){return(eb=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eC=e=>eh.createElement("svg",eb({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),a||(a=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"m55.334 28.926-24.506 23.34c-5.222 4.973-13.74 4.973-18.962 0-5.149-4.903-5.149-12.797 0-17.7l24.506-23.34c3.138-2.988 8.278-2.988 11.416 0 3.064 2.919 3.064 7.594 0 10.513L23.255 45.077c-1.055 1.005-2.815 1.005-3.87.001-.98-.933-.98-2.39 0-3.325l22.64-21.535a2.667 2.667 0 0 0-3.676-3.864L15.709 37.89a7.58 7.58 0 0 0-.001 11.05c3.113 2.966 8.11 2.966 11.224 0l24.533-23.338c5.272-5.02
131 5.272-13.217 0-18.238-5.197-4.95-13.573-4.95-18.77 0L8.187 30.704c-7.356 7.005-7.356 18.419 0 25.424 7.281 6.935 19.036 6.935 26.318 0l24.506-23.34a2.666 2.666 0 1 0-3.678-3.862z",className:"icon-attach_svg__fill"})));function ey(){return(ey=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eN=e=>eh.createElement("svg",ey({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64"},e),o||(o=eh.createElement("g",{clipPath:"url(#icon-audio-on-lined_svg__a)"},eh.createElement("path",{d:"M32 0C26.11 0 21.333 4.776 21.333 10.667V32c0 5.891 4.776 10.667 10.667 10.667S42.667 37.89 42.667 32V10.667C42.667 4.776 37.89 0 32 0m-5.333 10.667a5.333 5.333 0 0 1 10.666 0V32a5.333 5.333 0 0 1-10.666 0z",className:"icon-audio-on-lined_svg__fill",clipRule:"evenodd"}),eh.createElement("path",{d:"M16 26.667a2.667 2.667 0 1 0-5.333 0V32c0 10.879 8.143 19.856 18.666 21.168v5.499h-8a2.667 2.667 0 0 0 0 5.333h21.334a2.667 2.667 0 1 0 0-5.333h-8v-5.499C45.19 51.856 53.333 42.88 53.333 32v-5.333a2.667 2.667 0 1 0-5.333 0V32c0 8.837-7.163 16-16 16s-16-7.163-16-16z",className:"icon-audio-on-lined_svg__fill"}))),l||(l=eh.createElement("defs",null,eh.createElement("clipPath",{id:"icon-audio-on-lined_svg__a"},eh.createElement("path",{fill:"#fff",d:"M0 0h64v64H0z"})))));function eT(){return(eT=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eS=e=>eh.createElement("svg",eT({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),s||(s=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 2.667C48.2 2.667 61.333 15.8 61.333 32S48.2 61.333 32 61.333 2.667 48.2 2.667 32 15.8 2.667 32 2.667M32 8C18.745 8 8 18.745 8 32s10.745 24 24 24 24-10.745 24-24S45.255 8 32 8m12.333 21.333a1 1 0 0 1 1 1v3.334a1 1 0 0 1-1 1H19.667a1 1 0 0 1-1-1v-3.334a1 1 0 0 1 1-1z",className:"icon-ban_svg__fill"})));function eA(){return(eA=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eI=e=>eh.createElement("svg",eA({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),u||(u=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M58.545 5.498q.121.389.122.796v46.079a2.666 2.666 0 0 1-3.462 2.546l-17.951-5.61c-.645 5.273-5.14 9.358-10.587 9.358C20.776 58.667 16 53.89 16 48v-5.334h-5.333a8 8 0 0 1-7.997-7.75l-.003-.25V24a8 8 0 0 1 8-8H16L55.205 3.749a2.665 2.665 0 0 1 3.34 1.75zM21.333 44.587V48a5.333 5.333 0 0 0 10.652.398L32 47.92zm32-34.667-32 9.997v18.83l32 9.997zM16 21.333h-5.333a2.67 2.67 0 0 0-2.65 2.356L8 24v10.667a2.667 2.667 0 0 0 2.667 2.666H16z",className:"icon-broadcast_svg__fill"})));function eM(){return(eM=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eO=e=>eh.createElement("svg",eM({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),c||(c=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M40 5.333c.892 0 1.724.446 2.219 1.188l4.541 6.812H56a8 8 0 0 1 7.986 7.53l.014.47v29.334a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V21.333a8 8 0 0 1 8-8h9.237l4.544-6.812a2.67 2.67 0 0 1 1.888-1.167l.331-.02zm-1.43 5.334H25.428l-4.542 6.812a2.66 2.66 0 0 1-1.887 1.167l-.331.02H8a2.67 2.67 0 0 0-2.667 2.667v29.334A2.667 2.667 0 0 0 8 53.333h48a2.667 2.667 0 0 0 2.667-2.666V21.333A2.667 2.667 0 0 0 56 18.667H45.333a2.67 2.67 0 0 1-2.218-1.188zM32 21.333c7.364 0 13.333 5.97 13.333 13.334S39.363 48 32 48s-13.333-5.97-13.333-13.333S24.637 21.333 32 21.333m0 5.334a8 8 0 1 0 0 16 8 8 0 0 0 0-16",className:"icon-camera_svg__fill"})));function eR(){return(eR=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let ew=e=>eh.createElement("svg",eR({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"}
13,e),d||(d=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"m42.65 5.333.311.017a2.666 2.666 0 0 1 2.373 2.633l-.017.311-1.45 13.04h9.466a2.667 2.667 0 0 1 .311 5.315l-.31.018H43.271l-1.184 10.666h11.245a2.667 2.667 0 0 1 .312 5.316l-.31.018H41.495l-1.512 13.627a2.667 2.667 0 0 1-5.318-.277l.017-.311 1.448-13.04H25.496l-1.512 13.628a2.667 2.667 0 0 1-5.318-.277l.017-.311 1.448-13.04h-9.464a2.667 2.667 0 0 1-.311-5.315l.31-.018h10.057l1.186-10.667H10.667a2.667 2.667 0 0 1-.311-5.315l.31-.018h11.835l1.515-13.627a2.67 2.67 0 0 1 2.634-2.373l.311.017a2.666 2.666 0 0 1 2.373 2.633l-.017.311-1.45 13.04H38.5l1.515-13.628a2.67 2.67 0 0 1 2.634-2.373zm-5.927 32 1.186-10.667H27.272l-1.184 10.667z",className:"icon-channels_svg__fill"})));function eD(){return(eD=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eL=e=>eh.createElement("svg",eD({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),h||(h=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 2.667C48.2 2.667 61.333 15.8 61.333 32S48.2 61.333 32 61.333c-4.455 0-8.679-.993-12.461-2.77l-1.753.58q-8.947 2.868-12.504 1.981-4.198-1.047-1.657-3.663 1.757-2.094 2.928-5.234.934-2.502-.737-7A29.15 29.15 0 0 1 2.666 32C2.667 15.8 15.8 2.667 32 2.667M32 8C18.745 8 8 18.745 8 32c0 3.5.747 6.88 2.168 9.978l.405.837.137.271.106.285c1.517 4.085 1.89 7.622.734 10.72l-.382.972-.192.433.235-.05a62 62 0 0 0 4.886-1.363l1.721-.568 2.04-.696 1.95.917A23.9 23.9 0 0 0 32 56c13.255 0 24-10.745 24-24S45.255 8 32 8",className:"icon-chat_svg__fill"})));function eP(){return(eP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eU=e=>eh.createElement("svg",eP({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),f||(f=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 2.667C48.2 2.667 61.333 15.8 61.333 32S48.2 61.333 32 61.333c-4.455 0-8.679-.993-12.461-2.77l-1.753.58q-8.947 2.868-12.504 1.981-4.198-1.047-1.657-3.663 1.757-2.094 2.928-5.234.934-2.502-.737-7A29.15 29.15 0 0 1 2.666 32C2.667 15.8 15.8 2.667 32 2.667",className:"icon-chat-filled_svg__fill"})));function ex(){return(ex=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let ek=e=>eh.createElement("svg",ex({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),m||(m=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M16.121 21.879a3 3 0 0 0-4.242 0 3 3 0 0 0 0 4.242l18 18a3 3 0 0 0 4.242 0l18-18a3 3 0 0 0 0-4.242 3 3 0 0 0-4.242 0L32 37.757z",className:"icon-chevron-down_svg__fill"})));function eF(){return(eF=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eG=e=>eh.createElement("svg",eF({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),v||(v=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M22.114 46.114a2.668 2.668 0 0 0 3.772 3.772l16-16a2.67 2.67 0 0 0 0-3.772l-16-16a2.668 2.668 0 0 0-3.772 3.772L36.23 32z",className:"icon-chevron-right_svg__fill"})));function eB(){return(eB=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eH=e=>eh.createElement("svg",eB({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),p||(p=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M52.552 11.448a2.666 2.666 0 0 1 .222 3.52l-.222.251-16.781 16.78 16.781 16.782a2.665 2.665 0 0 1 0 3.771 2.666 2.666 0 0 1-3.52.222l-.251-.222L32 35.771 15.219 52.552a2.665 2.665 0 0 1-3.771 0 2.666 2.666 0 0 1-.222-3.52l.222-.251L28.228 32l-16.78-16.781a2.665 2.665 0 0 1 0-3.771 2.666 2.666 0 0 1 3.52-.222l.251.222 16.78 16.78 16.782-16.78a2.665 2.665 0 0 1 3.771 0",className:"icon-close_svg__fill"})));function eV(){return(eV=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let ej=e=>eh.createElement("svg",eV({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),g||(g=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M16 8a2.667 2.667 0 0 0-2.649 2.356l-.018.31v42.667a2.667 2.667 0 0 0 5.316.311l.018-.31V34.666h25.56l-6.113 6.114a2.67 2.67 0 0 0-.221 3.52l.221.251a2.666 2.666 0 0 0 3.52.222l.252-.222 10.666-10.666a2.666 2.666 0 0 0 .222-3.52l-.222-.252-10.666-10.666a2.666 2.666 0 0 0-3.993 3.52l.221.251 6.113 6.114h-25.56V10.667A2.667 2.667 0 0 0 16 8",className:"icon-collapse_svg__fill"})));function ez(){return(ez=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eK=e=>eh.createElement("svg",ez({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),_||(_=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M53.333 21.333a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8h-24a8 8 0 0 1-8-8v-24a8 8 0 0 1 8-8zm0 5.334h-24a2.667 2.667 0 0 0-2.666 2.666v24A2.667 2.667 0 0 0 29.333 56h24A2.667 2.667 0 0 0 56 53.333v-24a2.667 2.667 0 0 0-2.667-2.666m-18.666-24a8 8 0 0 1 7.986 7.53l.014.47v2.666a2.667 2.667 0 0 1-5.316.311l-.018-.31v-2.667a2.67 2.67 0 0 0-2.355-2.65L34.667 8h-24a2.67 2.67 0 0 0-2.65 2.356l-.017.31v24a2.67 2.67 0 0 0 2.356 2.65l.31.017h2.667a2.667 2.667 0 0 1 .311 5.316l-.31.018h-2.667a8 8 0 0 1-7.987-7.53l-.013-.47v-24c0-4.26 3.33-7.743 7.53-7.987l.47-.013z",className:"icon-copy_svg__fill"})));function eY(){return(eY=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eZ=e=>eh.createElement("svg",eY({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),E||(E=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 2.667C48.2 2.667 61.333 15.8 61.333 32S48.2 61.333 32 61.333c-4.455 0-8.679-.993-12.461-2.77l-1.753.58q-8.947 2.868-12.504 1.981-4.198-1.047-1.
13657-3.663 1.757-2.094 2.928-5.234.934-2.502-.737-7A29.15 29.15 0 0 1 2.666 32C2.667 15.8 15.8 2.667 32 2.667M32 8C18.745 8 8 18.745 8 32c0 3.5.747 6.88 2.168 9.978l.405.837.137.271.106.285c1.517 4.085 1.89 7.622.734 10.72l-.382.972-.192.433.235-.05a62 62 0 0 0 4.886-1.363l1.721-.568 2.04-.696 1.95.917A23.9 23.9 0 0 0 32 56c13.255 0 24-10.745 24-24S45.255 8 32 8m2.667 16v5.333H40c3.556 0 3.556 5.334 0 5.334h-5.333V40c0 3.556-5.334 3.556-5.334 0v-5.333H24c-3.556 0-3.556-5.334 0-5.334h5.333V24c0-3.556 5.334-3.556 5.334 0",className:"icon-create_svg__fill"})));function eQ(){return(eQ=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eW=e=>eh.createElement("svg",eQ({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),b||(b=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M37.333 2.667c4.26 0 7.743 3.33 7.987 7.53l.013.47v2.666H56a2.667 2.667 0 0 1 .311 5.316l-.311.018h-2.668l.001 34.666c0 4.26-3.33 7.743-7.53 7.987l-.47.013H18.667a8 8 0 0 1-7.987-7.53l-.013-.47V18.667H8a2.667 2.667 0 0 1-.311-5.316L8 13.333h10.666v-2.666a8 8 0 0 1 7.53-7.987l.47-.013zm10.666 16H16v34.666a2.67 2.67 0 0 0 2.356 2.65l.31.017h26.667a2.67 2.67 0 0 0 2.65-2.356l.017-.31zm-21.332 8a2.667 2.667 0 0 1 2.648 2.355l.018.311v16a2.667 2.667 0 0 1-5.316.311l-.017-.31v-16a2.667 2.667 0 0 1 2.667-2.667m10.666 0a2.67 2.67 0 0 1 2.65 2.355l.017.311v16a2.667 2.667 0 0 1-5.315.311l-.018-.31v-16a2.667 2.667 0 0 1 2.666-2.667m0-18.667H26.667a2.67 2.67 0 0 0-2.65 2.356l-.017.31v2.667h16v-2.666a2.67 2.67 0 0 0-2.356-2.65L37.334 8z",className:"icon-delete_svg__fill"})));function eq(){return(eq=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eX=e=>eh.createElement("svg",eq({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),C||(C=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"m54.534 6.069-.248.217-9.736 9.735-.04.04-9.573 9.573q-.226.178-.405.404L6.286 54.286a2.423 2.423 0 0 0 3.18 3.645l.248-.217 13.374-13.373a2.42 2.42 0 0 0 1.88-.401 12.12 12.12 0 0 1 14.04 0 2.424 2.424 0 1 0 2.808-3.952 16.95 16.95 0 0 0-11.303-3.072l6.743-6.744a24.1 24.1 0 0 1 10.159 5.021 2.424 2.424 0 0 0 3.11-3.719 29 29 0 0 0-9.34-5.23l5.633-5.634a36.2 36.2 0 0 1 9.225 5.934 2.425 2.425 0 0 0 3.211-3.633 41 41 0 0 0-8.796-5.941l7.256-7.256a2.423 2.423 0 0 0-3.18-3.645m-35.04 21.474a29 29 0 0 0-6.032 3.942 2.424 2.424 0 0 0 3.137 3.697 24 24 0 0 1 5.022-3.282 2.425 2.425 0 0 0-2.127-4.357M4.748 22.909a2.424 2.424 0 0 0 3.207 3.636 36.36 36.36 0 0 1 26.978-8.977 2.424 2.424 0 0 0 .389-4.832A41.2 41.2 0 0 0 4.748 22.909",className:"icon-disconnected_svg__fill"})));function e$(){return(e$=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let eJ=e=>eh.createElement("svg",e$({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),y||(y=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M37.333 2.667a3 3 0 0 1 .274.014l.085.01.058.008q.07.01.141.026l.029.007q.075.016.146.037l.034.01q.357.107.663.303l.034.022q.053.034.104.072l.057.043q.045.033.085.068.091.075.176.16l-.126-.117q.075.065.143.135L55.21 19.438q.07.07.134.143l.035.04q.04.047.076.096l.04.054.07.1.024.038c.16.253.279.535.347.836l.01.048q.014.064.024.13l.006.048.007.051.004.041q.014.135.014.27v32a8 8 0 0 1-8 8H16a8 8 0 0 1-8-8V10.667a8 8 0 0 1 8-8zM34.666 8H16a2.667 2.667 0 0 0-2.667 2.667v42.666A2.667 2.667 0 0 0 16 56h32a2.667 2.667 0 0 0 2.667-2.667L50.666 24H37.333a2.667 2.667 0 0 1-2.648-2.356l-.018-.31zm12.227 10.667-6.894-6.894.001 6.894z",className:"icon-document_svg__fill"})));function e0(){return(e0=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let e1=e=>eh.createElement("svg",e0({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),N||(N=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M12.552 31.448a2.665 2.665 0 1 0-3.771 3.771l13.333 13.333a2.666 2.666 0 0 0 3.772 0L55.219 19.22a2.667 2.667 0 0 0-3.771-3.771L24 42.895z",className:"icon-done_svg__fill"})));function e2(){return(e2=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let e3=e=>eh.createElement("svg",e2({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),T||(T=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M5.886 31.448 19.219 44.78a2.667 2.667 0 0 1-3.771 3.771L2.114 35.22a2.667 2.667 0 0 1 3.772-3.771zm52.228-16a2.666 2.666 0 1 1 3.772 3.771L32.552 48.552a2.665 2.665 0 0 1-3.771 0L15.448 35.22a2.665 2.665 0 0 1 0-3.771 2.665 2.665 0 0 1 3.771 0l11.448 11.447zm-9.562 0a2.665 2.665 0 0 1 0 3.771L32.556 35.215a2.665 2.665 0 0 1-3.771 0 2.664 2.664 0 0 1 0-3.77L44.78 15.447a2.665 2.665 0 0 1 3.771 0z",className:"icon-done-all_svg__fill"})));function e6(){return(e6=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let e4=e=>eh.createElement("svg",e6({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),S||(S=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M56 42.667a2.667 2.667 0 0 1 2.649 2.355l.018.311v8c0 4.26-3.33 7.743-7.53 7.987l-.47.013H13.333a8 8 0 0 1-7.986-7.53l-.014-.47v-8a2.667 2.667 0 0 1 5.316-.311l.018.311v8a2.67 2.67 0 0 0 2.355 2.65l.311.017h37.334a2.667 2.667 0 0 0 2.648-2.356l.018-.31v-8A2.667 2.667 0 0 1 56 42.667m-36.552-8.781a2.666 2.666 0 0 1 3.52-3.993l.251.221 6.114 6.114V5.333a2.667 2.667 0 0 1 5.316-.311l.018.311v30.894l6.114-6.113a2.67 2.67 0 0 1 3.52-.221l.251.221a2.666 2.666 0 0 1 .222 3.52l-.222.252-10.658 10.657a2 2 0 0 1-.135.128l.127-.119a3 3 0 0 1-.195.176l-.056.045-.086.064-.056.04-.086.056-.06.036-.081.046-.079.04a3 3 0 0 1-.14.065l-.09.036q-.034.014-.067.025l-.09.03-.063.019q-.064.018-.13.034l-.013.003-.144.028-.064.01q-.045.008-.092.012l-.084.008-.103.006-.069.002h-.095q-.042 0-.082-.003l.139.003q-.126 0-.249-.011l-.061-.007-.092-.012-.09-.015-.118-.025-.04-.01a3 3 0 0 1-.34-.11l-.015-.006q-.074-.03-.145-.063l-.042
13-.02L30.71 45l-.067-.039q-.045-.026-.087-.054l-.062-.041q-.045-.03-.088-.063l-.04-.03-.008-.007a3 3 0 0 1-.251-.223z",className:"icon-download_svg__fill"})));function e7(){return(e7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let e5=e=>eh.createElement("svg",e7({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 65 65"},e),A||(A=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M56 56a2.667 2.667 0 0 1 .311 5.315l-.311.018H8a2.667 2.667 0 0 1-.311-5.316L8 56zM35.448 3.448a2.665 2.665 0 0 1 3.771 0l10.667 10.666a2.67 2.67 0 0 1 0 3.772L20.552 47.219c-.5.5-1.178.781-1.885.781H8a2.667 2.667 0 0 1-2.667-2.667V34.667c0-.708.281-1.386.781-1.886zm1.885 5.659L10.667 35.77v6.896h6.89L44.227 16z",className:"icon-edit_svg__fill"})));function e8(){return(e8=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let e9=e=>eh.createElement("svg",e8({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),I||(I=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32.097 3.22c2.65 0 5.255.357 7.763 1.054a2.134 2.134 0 0 1-1.144 4.111 24.7 24.7 0 0 0-6.619-.899c-13.603 0-24.63 11.027-24.63 24.63s11.027 24.63 24.63 24.63 24.63-11.027 24.63-24.63c0-2.227-.295-4.413-.87-6.518a2.13 2.13 0 0 1 1.494-2.62 2.13 2.13 0 0 1 2.62 1.494 29 29 0 0 1 1.023 7.644c0 15.96-12.938 28.897-28.897 28.897-15.96 0-28.897-12.937-28.897-28.897S16.138 3.22 32.097 3.22m10.705 34.792a2.133 2.133 0 0 1 2.024 2.808c-1.873 5.623-6.937 9.488-12.729 9.488s-10.856-3.865-12.73-9.488a2.134 2.134 0 0 1 1.875-2.803l.15-.005zm-3.477 4.266H24.867l.294.382c1.539 1.887 3.718 3.113 6.115 3.342l.314.024.507.015c2.617 0 5.037-1.188 6.743-3.151l.193-.23zM21.392 21.954c1.087 0 1.985.814 2.116 1.866l.017.267v5.353a2.133 2.133 0 0 1-4.25.268l-.017-.268v-5.353c0-1.178.955-2.133 2.134-2.133m21.41 0c1.088 0 1.985.814 2.117 1.866l.017.267v5.353a2.133 2.133 0 0 1-4.25.268l-.017-.268v-5.353c0-1.178.955-2.133 2.133-2.133M54.853 0a.8.8 0 0 1 .8.8v7.786h7.76a.8.8 0 0 1 .8.8v2.667a.8.8 0 0 1-.8.8h-7.76v7.758a.8.8 0 0 1-.8.8h-2.666a.8.8 0 0 1-.8-.8v-7.758h-7.785a.8.8 0 0 1-.8-.8V9.387a.8.8 0 0 1 .8-.8l7.784-.001V.8a.8.8 0 0 1 .8-.8z",className:"icon-emoji-more_svg__fill"})));function ne(){return(ne=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nn=e=>eh.createElement("svg",ne({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),M||(M=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 5.06a8 8 0 0 1 6.561 3.424l.287.439 22.608 37.744a8 8 0 0 1 .022 7.962 8 8 0 0 1-6.356 4.014l-.535.024H9.384a8 8 0 0 1-6.862-4.038 8.01 8.01 0 0 1-.226-7.493l.27-.506L25.16 8.91A8 8 0 0 1 32 5.06m0 5.333c-.816 0-1.58.372-2.076.99l-.196.28-22.565 37.67a2.67 2.67 0 0 0 1.909 3.973l.341.027h45.144a2.67 2.67 0 0 0 2.45-3.659l-.148-.304L34.28 11.676A2.67 2.67 0 0 0 32 10.393m0 32.274A2.667 2.667 0 1 1 32 48a2.667 2.667 0 0 1 0-5.333m0-21.334a2.667 2.667 0 0 1 2.649 2.356l.018.311v10.667a2.667 2.667 0 0 1-5.316.311l-.018-.311V24A2.667 2.667 0 0 1 32 21.333",className:"icon-error_svg__fill"})));function nt(){return(nt=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nr=e=>eh.createElement("svg",nt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),O||(O=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M48 8a2.667 2.667 0 0 1 2.649 2.356l.018.31V32l-.001.027v21.306a2.667 2.667 0 0 1-5.315.311l-.018-.31V34.665H19.772l6.114 6.115a2.67 2.67 0 0 1 .221 3.52l-.221.251a2.666 2.666 0 0 1-3.52.222l-.252-.222-10.666-10.666a2.666 2.666 0 0 1-.222-3.52l.222-.252 10.666-10.666a2.666 2.666 0 0 1 3.993 3.52l-.221.251-6.113 6.114h25.56V10.667A2.667 2.667 0 0 1 48 8",className:"icon-expand_svg__fill"})));function ni(){return(ni=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let na=e=>eh.createElement("svg",ni({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),R||(R=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M30.52 12.51c1.685-1.226 4.139-.103 4.139 1.893v35.194c0 1.996-2.454 3.119-4.138 1.893l-12.45-9.909H7.898c-1.416 0-2.564-1.074-2.564-2.399V24.818c0-1.325 1.148-2.4 2.564-2.4h10.175zm20.427.163c10.293 10.667 10.293 27.987 0 38.654a2.137 2.137 0 0 1-3.156-.047c-.86-.942-.84-2.448.044-3.364 8.49-8.799 8.49-23.033 0-31.832-.884-.916-.904-2.422-.044-3.364a2.137 2.137 0 0 1 3.156-.047m-8.492 8.799c5.597 5.8 5.597 15.231 0 21.031a2.136 2.136 0 0 1-3.156-.046c-.86-.942-.84-2.448.044-3.364 3.794-3.932 3.794-10.279 0-14.211-.884-.916-.904-2.422-.044-3.363a2.136 2.136 0 0 1 3.156-.047",className:"icon-file-audio_svg__fill"})));function no(){return(no=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nl=e=>eh.createElement("svg",no({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),w||(w=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M39.414 6.4a2.4 2.4 0 0 1 1.71.701l12.642 12.75c.407.41.634.953.634 1.516v29.765c0 3.542-4.342 6.468-8 6.468H16.16c-3.658 0-6.4-2.926-6.4-6.468L9.6 12.868c0-3.542 2.902-6.468 6.56-6.468zm3.331 35.173-21.49.027-.147.005c-1.066.08-1.908 1.014-1.908 2.155 0 1.193.92 2.16 2.055 2.16l21.49-.027.147-.005c1.066-.08 1.908-1.014 1.908-2.155 0-1.193-.92-2.16-2.055-2.16m0-8.533-21.49.027-.147.005c-1.066.08-1.908 1.014-1.908 2.155 0 1.193.92 2.16 2.055 2.16l21.49-.027.147-.005c1.066-.08 1.908-1.014 1.908-2.155 0-1.193-.92-2.16-2.055-2.16m-11.807-8.507h-9.6l-.153.006a2.15 2.15 0 0 0-1.985 2.154c0 1.193.957 2.16 2.138 2.16h9.6l.152-.005a2.15 2.15 0 0 0 1.985-2.155c0-1.193-.957-2.16-2.137-2.16",className:"icon-file-document_svg__fill"})));function ns(){return(ns=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nu=e=>eh.createElement("svg",ns({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),D||(D=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"m41.636 3.226.251.222a2.67 2.67 0 0 1 .222 3.52l-.222.251-7.219 7.218V27.38l11.209-6.472 2.643-9.86a2.667 2.667 0 0 1 5.218 1.051l-.067.329-2.237 8.35 8.352 2.24a2.67 2.67 0 0 1 1.952 2.938l-.067.328a2.67 2.67 0 0 1-2.937 1.952l-.329-.066-9.861-2.643L37.334 32l11.209 6.47 9.862-2.64.329-.067a2.67 2.67 0 0 1 2.937 1.952l.067.328a2.67 2.67 0 0 1-1.952 2.938l-8.353 2.237 2.238 8.353.067.329a2.666 2.666 0 0 1-5.218 1.052l-2.643-9.861-11.209-6.472v12.944l7.219 7.218a2.667 2.667 0 0 1-3.52 3.993l-.251-.222L32 54.437l-6.114 6.115a2.666 2.666 0 0 1-3.52.222l-.251-.222a2.666 2.666 0 0 1-.222-3.52l.222-.251 7.218-7.22V36.62l-11.209 6.47-2.642 9.863a2.666 2.666 0 0 1-5.218-1.052l.067-.329 2.236-8.351-8.35-2.24a2.665 2.665 0 0 1-1.953-2.937l.067-.328a2.665 2.665 0 0 1 2.937-1.952l.329.066 9.861 2.642L26.667 32l-11.209-6.472-9.86 2.643-.329.066a2.665 2.665 0 0 1-2.937-1.952l-.067-.328a2.67 2.67 0 0 1 1.952-2.938l8.35-2.239-2.235-8.351-.067-.329a2.667 2.667 0 0 1 5.218-1.052l2.642 9.862 11.209 6.47V14.439L22.116 7.22a2.665 2.665 0 0 1 0-3.771 2.666 2.666 0 0 1 3.52-.222l.251.222 6.114 6.112 6.115-6.112a2.666 2.666 0 0 1 3.52-.222z",className:"icon-freeze_svg__fill"})));function nc(){return(nc=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nd=e=>eh.createElement("svg",nc({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),L||(L=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M16.664 45.333q3.233 0 5.89-.953 2.658-.954 4.113-2.683V31.34h-10.29v3.94h4.902v4.474q-1.292 1.284-4.327 1.283-3.017 0-4.58-2.085-1.561-2.085-1.562-6.168v-1.657q.018-4.047 1.455-6.097t4.184-2.05q2.155 0 3.385 1.034t1.59 3.262h5.243q-.486-4.206-3.107-6.408t-7.273-2.201q-3.34 0-5.827 1.506t-3.807 4.35q-1.32 2.843-1.32 6.728v1.765q.036 3.78 1.428 6.578 1.392 2.797 3.95 4.269 2.56 1.47 5.953 1.47m20.67 0V18.667H32v26.666h5.333zm10.396 0V34.436h9.721v-4.432H47.73v-6.887h10.937v-4.45h-16v26.666z",className:"icon-gif_svg__fill"})));function nh(){return(nh=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nf=e=>eh.createElement("svg",nh({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),P||(P=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 2.667C48.2 2.667 61.333 15.8 61.333 32S48.2 61.333 32 61.333 2.667 48.2 2.667 32 15.8 2.667 32 2.667M32 8C18.745 8 8 18.745 8 32s10.745 24 24 24 24-10.745 24-24S45.255 8 32 8m1.667 21.333a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3.334a1 1 0 0 1-1-1v-14a1 1 0 0 1 1-1zm-1.667-8a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334",className:"icon-info_svg__fill"})));function nm(){return(nm=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nv=e=>eh.createElement("svg",nm({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),U||(U=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 5.333a2.667 2.667 0 0 1 .311 5.316l-.311.018H10.667a2.67 2.67 0 0 0-2.65 2.355L8 13.333v37.334a2.667 2.667 0 0 0 2.356 2.648l.31.018H32a2.667 2.667 0 0 1 .311 5.316l-.311.018H10.667a8 8 0 0 1-7.987-7.53l-.013-.47V13.333a8 8 0 0 1 7.53-7.986l.47-.014zm17.634 13.893.252.222 10.666 10.666a2.666 2.666 0 0 1 .222 3.52l-.222.252-10.666 10.666a2.666 2.666 0 0 1-3.993-3.52l.221-.251 4.78-4.782L20 36a2.667 2.667 0 0 1-.311-5.315l.311-.018h33.56l-7.446-7.448a2.67 2.67 0 0 1-.221-3.52l.221-.251a2.666 2.666 0 0 1 3.52-.222",className:"icon-leave_svg__fill"})));function np(){return(np=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let ng=e=>eh.createElement("svg",np({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),x||(x=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M34.667 37.333c7.17 0 13.018 5.66 13.32 12.755l.013.579V56a2.667 2.667 0 0 1-5.315.311L42.667 56v-5.333c0-4.26-3.33-7.743-7.53-7.987l-.47-.013H13.333a8 8 0 0 0-7.986 7.53l-.014.47V56a2.667 2.667 0 0 1-5.316.311L0 56v-5.333c0-7.17 5.66-13.019 12.755-13.321l.578-.013zM54 37.765a13.33 13.33 0 0 1 9.986 12.297l.014.605V56a2.667 2.667 0 0 1-5.315.311L58.667 56v-5.331a8 8 0 0 0-6-7.74A2.667 2.667 0 1 1 54 37.765M24 5.333c7.364 0 13.333 5.97 13.333 13.334S31.363 32 24 32s-13.333-5.97-13.333-13.333S16.637 5.333 24 5.333m19.328.43a13.333 13.333 0 0 1 0 25.834 2.667 2.667 0 1 1-1.323-5.167 8 8 0 0 0 0-15.5 2.667 2.667 0 1 1 1.323-5.167M24 10.667a8 8 0 1 0 0 16 8 8 0 0 0 0-16",className:"icon-members_svg__fill"})));function n_(){return(n_=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nE=e=>eh.createElement("svg",n_({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),k||(k=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 2.667C48.2 2.667 61.333 15.8 61.333 32S48.2 61.333 32 61.333c-4.455 0-8.679-.993-12.461-2.77l-1.753.58q-8.947 2.868-12.504 1.981-4.198-1.047-1.
13657-3.663 1.757-2.094 2.928-5.234.934-2.502-.737-7A29.15 29.15 0 0 1 2.666 32C2.667 15.8 15.8 2.667 32 2.667M32 8C18.745 8 8 18.745 8 32c0 3.5.747 6.88 2.168 9.978l.405.837.137.271.106.285c1.517 4.085 1.89 7.622.734 10.72l-.382.972-.192.433.235-.05a62 62 0 0 0 4.886-1.363l1.721-.568 2.04-.696 1.95.917A23.9 23.9 0 0 0 32 56c13.255 0 24-10.745 24-24S45.255 8 32 8M18.667 29.333a2.667 2.667 0 1 1-.001 5.333 2.667 2.667 0 0 1 .001-5.333m13.333 0a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334m13.333 0a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334",className:"icon-message_svg__fill"})));function nb(){return(nb=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nC=e=>eh.createElement("svg",nb({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),F||(F=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M18.667 34.667a2.667 2.667 0 0 1 .311 5.316l-.311.017h-5.334v16a2.667 2.667 0 0 1-5.316.311L8 56V40H2.667a2.667 2.667 0 0 1-.311-5.315l.31-.018h16zM32 29.333a2.667 2.667 0 0 1 2.649 2.356l.018.311v24a2.667 2.667 0 0 1-5.316.311L29.333 56V32A2.667 2.667 0 0 1 32 29.333M61.333 40a2.667 2.667 0 0 1 .311 5.315l-.31.018h-5.335L56 56a2.667 2.667 0 0 1-5.315.311L50.667 56l-.001-10.668-5.333.001a2.667 2.667 0 0 1-.311-5.316l.311-.017zm-8-34.667a2.67 2.67 0 0 1 2.65 2.356L56 8v24a2.667 2.667 0 0 1-5.315.311L50.667 32V8a2.667 2.667 0 0 1 2.666-2.667m-42.666 0a2.667 2.667 0 0 1 2.648 2.356l.018.311v18.667a2.667 2.667 0 0 1-5.316.311L8 26.667V8a2.667 2.667 0 0 1 2.667-2.667m21.333 0a2.667 2.667 0 0 1 2.649 2.356l.018.311-.001 10.666H40a2.668 2.668 0 0 1 .311 5.317L40 24H24a2.667 2.667 0 0 1-.311-5.315l.311-.018h5.333V8A2.667 2.667 0 0 1 32 5.333",className:"icon-moderations_svg__fill"})));function ny(){return(ny=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nN=e=>eh.createElement("svg",ny({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),G||(G=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 45.333a5.333 5.333 0 1 1 0 10.666 5.333 5.333 0 0 1 0-10.666M32 28a5.333 5.333 0 1 1 0 10.668A5.333 5.333 0 0 1 32 28m0-17.333c2.946 0 5.333 2.387 5.333 5.333S34.946 21.333 32 21.333 26.667 18.946 26.667 16s2.387-5.333 5.333-5.333",className:"icon-more_svg__fill"})));function nT(){return(nT=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nS=e=>eh.createElement("svg",nT({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),B||(B=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"m55.62 19.616.067.123A26.55 26.55 0 0 1 58.667 32c0 4.326-1.03 8.41-2.864 12.025q-1.518 4.089-.67 6.363 
131.066 2.855 2.662 4.758 2.31 2.379-1.506 3.33-3.135.782-10.879-1.646l-.488-.155-1.594-.527A26.6 26.6 0 0 1 32 58.667a26.55 26.55 0 0 1-12.326-3.014l-.059-.03 4-4A21.2 21.2 0 0 0 32 53.333c2.993 0 5.89-.614 8.562-1.786l.498-.226 1.925-.905 3.613 1.196.695.219q1.093.337 2.054.595l.472.125.485.121-.167-.42-.2-.594c-.814-2.685-.484-5.681.713-9.065l.154-.425.106-.284.528-1.084a21.2 21.2 0 0 0 1.895-8.8 21.2 21.2 0 0 0-1.71-8.385zm2.266-13.502a2.67 2.67 0 0 1 .221 3.52l-.221.252-48 48a2.668 2.668 0 0 1-3.993-3.52l.221-.252 5.238-5.237a26.56 26.56 0 0 1-6.015-16.412L5.333 32C5.333 17.272 17.273 5.333 32 5.333a26.55 26.55 0 0 1 16.877 6.02l5.237-5.239a2.67 2.67 0 0 1 3.772 0M32 10.667c-11.782 0-21.333 9.55-21.333 21.333 0 4.836 1.614 9.401 4.48 13.084l29.936-29.938A21.25 21.25 0 0 0 32 10.666z",className:"icon-mute_svg__fill"})));function nA(){return(nA=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nI=e=>eh.createElement("svg",nA({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),H||(H=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M36.613 53.333c2.056 0 3.338 2.227 2.307 4.005a8 8 0 0 1-13.84 0c-.98-1.689.129-3.783 2.004-3.988l.303-.017zM32 2.667c11.56 0 20.972 9.194 21.323 20.669l.01.664v13.333a5.334 5.334 0 0 0 4.936 5.319l.753.033c2.963.318 3.077 4.616.342 5.24l-.342.056-.355.019H5.333l-.355-.019c-3.082-.33-3.082-4.965 0-5.296l.753-.033a5.335 5.335 0 0 0 4.92-4.9l.016-.419V24c0-11.782 9.55-21.333 21.333-21.333M32 8c-8.636 0-15.674 6.842-15.989 15.4L16 24v13.333c0 1.562-.336 3.046-.939 4.383l-.275.564-.218.387h34.861l-.215-.387a10.6 10.6 0 0 1-1.146-3.74l-.055-.674-.013-.533V24c0-8.837-7.163-16-16-16",className:"icon-notifications_svg__fill"})));function nM(){return(nM=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nO=e=>eh.createElement("svg",nM({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),V||(V=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M36.613 53.333c2.056 0 3.338 2.227 2.307 4.005a8 8 0 0 1-13.84 0c-.98-1.689.129-3.783 2.004-3.988l.303-.017zM32 2.667c7.173 0 13.52 3.54 17.387 8.97l5.686-5.687a2.105 2.105 0 0 1 2.85-.117l.127.117a2.105 2.105 0 0 1 0 2.977L8.927 58.05c-.78.781-2.023.82-2.85.117l-.127-.117a2.105 2.105 0 0 1 0-2.977L13.023 48h-7.69l-.355-.019c-3.082-.33-3.082-4.965 0-5.296l.753-.033a5.335 5.335 0 0 0 4.92-4.9l.016-.419V24c0-11.782 9.55-21.333 21.333-21.333m20.85 16.795c.271 1.253.433 2.548.473 3.874l.01.664v13.333a5.334 5.334 0 0 0 4.936 5.319l.753.033c2.963.318 3.077 4.616.342 5.24l-.342.056-.355.019H24.31z",className:"icon-notifications-off-filled_svg__fill"})));function nR(){return(nR=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nw=e=>eh.createElement("svg",nR({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),j||(j=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M29.83 6.45a2.667 2.667 0 0 1 4.34 0l11.697 16.374L57 13.918c1.88-1.504 4.573.054 4.32 2.35l-.047.29-8 37.334A2.666 2.666 0 0 1 50.666 56H13.333a2.666 2.666 0 0 1-2.607-2.108l-8-37.333c-.525-2.452 2.315-4.207 4.273-2.641l11.132 8.906zM32 12.587l-11.163 15.63a2.667 2.667 0 0 1-3.836.532l-7.497-5.997 5.984 27.915h33.021l5.984-27.915L47 28.749a2.667 2.667 0 0 1-3.632-.281l-.204-.251zM32 32a5.333 5.333 0 1 1 0 10.668A5.333 5.333 0 0 1 32 32",className:"icon-operator_svg__fill"})));function nD(){return(nD=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nL=e=>eh.createElement("svg",nD({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),z||(z=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M50.667 5.333a8 8 0 0 1 8 8v37.334a8 8 0 0 1-8 8H13.333a8 8 0 0 1-8-8V13.333a8 8 0 0 1 8-8zm-8 25.107L19.77 53.332l30.896.001a2.667 2.667 0 0 0 2.661-2.498l.005-.168v-9.564L42.666 30.44zm8-19.773H13.333a2.667 2.667 0 0 0-2.666 2.666v37.334c0 1.143.72 2.119 1.731 2.498L40.781 24.78a2.67 2.67 0 0 1 3.52-.222l.251.222 8.78 8.78.001-20.228a2.667 2.667 0 0 0-2.498-2.661zm-28 5.333a6.666 6.666 0 1 1 0 13.333 6.666 6.666 0 0 1 0-13.333m0 5.333a1.334 1.334 0 1 0 0 2.667 1.334 1.334 0 0 0 0-2.667",className:"icon-photo_svg__fill"})));function nP(){return(nP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nU=e=>eh.createElement("svg",nP({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),K||(K=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M51.908 34.75c1.9-1.233 1.896-3.26.013-4.514L19.376 8.577c-1.893-1.26-3.404-.391-3.376 1.968l.522 42.888c.028 2.347 1.596 3.247 3.493 2.016z",className:"icon-play_svg__fill"})));function nx(){return(nx=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nk=e=>eh.createElement("svg",nx({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),Y||(Y=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M34.667 29.333h18.666c3.556 0 3.556 5.334 0 5.334H34.667v18.666c0 3.556-5.334 3.556-5.334 0V34.667H10.667c-3.556 0-3.556-5.334 0-5.334h18.666V10.667c0-3.556 5.334-3.556 5.334 0z",className:"icon-plus_svg__fill"})));function nF(){return(nF=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nG=e=>eh.createElement("svg",nF({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),Z||(Z=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 61.333C15.8 61.333 2.667 48.2 2.667 32S15.8 2.667 32 2.667 61.333 15.8 61.333 32 48.2 61.333 32 61.333M32 56c13.255 0 24-10.745 24-24S45.255 8 32 8 8 18.745 8 32s10.745 24 24 24m2.213-18.63a2.667 2.667 0 1 1-5.333 0v-2.69c0-1.148.734-2.168 1.823-2.53.173-.058.532-.195 1.01-.407.809-.36 1.616-.79 2.354-1.282 1.835-1.223 2.813-2.528 2.813-3.786a5.333 5.333 0 0 0-10.364-1.777 2.667 2.667 0 0 1-5.032-1.77 10.668 10.668 0 0 1 20.729 3.551c0 3.413-2.022 6.109-5.187 8.22a21 21 0 0 1-2.813 1.578zm-5.333 7.523a2.667 2.667 0 1 1 5.333 0v.44a2.667 2.667 0 1 1-5.333 0v-.44",className:"icon-question_svg__fill"})));function nB(){return(nB=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nH=e=>eh.createElement("svg",nB({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),Q||(Q=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"m46.14 14.43.562.537 6.631 6.167v-7.8a2.67 2.67 0 0 1 2.356-2.65l.311-.017a2.667 2.667 0 0 1 2.649 2.355l.018.311v16a2.67 2.67 0 0 1-2.356 2.65L56 32H40a2.667 2.667 0 0 1-.311-5.315l.311-.018h11.452l-8.44-7.85c-5.964-5.893-15.168-7.182-22.563-3.156-7.38 4.018-11.172 12.357-9.314 20.455 1.859 8.107 8.935 14.032 17.362 14.518 8.43.487 16.162-4.585 18.967-12.426a2.667 2.667 0 0 1 5.022 1.797C48.88 50.082 38.973 56.582 28.19 55.959c-10.785-.623-19.862-8.222-22.254-18.65C3.542 26.872 8.426 16.135 17.9 10.977c9.227-5.024 20.65-3.579 28.241 3.453z",className:"icon-refresh_svg__fill"})));function nV(){return(nV=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nj=e=>eh.createElement("svg",nV({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),W||(W=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 2.667C48.2 2.667 61.333 15.8 61.333 32S48.2 61.333 32 61.333 2.667 48.2 2.667 32 15.8 2.667 32 2.667m9.886 19.447a2.67 2.67 0 0 0-3.772 0L32 28.23l-6.114-6.115-.134-.124a2.667 2.667 0 0 0-3.638.124l-.124.134a2.667 2.667 0 0 0 .124 3.638L28.23 32l-6.115 6.114-.124.134a2.667 2.667 0 0 0 .124 3.638l.134.124a2.667 2.667 0 0 0 3.638-.124L32 35.77l6.114 6.115.134.124a2.667 2.667 0 0 0 3.638-.124l.124-.134a2.667 2.667 0 0 0-.124-3.638L35.77 32l6.115-6.114.124-.134a2.667 2.667 0 0 0-.124-3.638z",className:"icon-remove_svg__fill"})));function nz(){return(nz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nK=e=>eh.createElement("svg",nz({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12"},e),q||(q=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M11.774 10.5c.062 0 .12-.025.164-.07a.22.22 0 0 0 .062-.164c-.069-1.447-.495-2.678-1.268-3.66-.618-.785-1.455-1.409-2.49-1.855a9.3 9.3 0 0 0-2.406-.655 10 10 0 0 0-.862-.078V2.225a.23.23 0 0 0-.128-.203.23.23 0 0 0-.24.028L.084 5.692A.22.22 0 0 0 0 5.865c0 .068.03.132.082.175l4.523 3.737c.067.056.16.068.24.03a.22.22 0 0 0 .13-.202v-1.95c1.134-.08 2.178.003 3.107.25a6.4 6.4 0 0 1 2.087.96c1.018.724 1.398 1.5 1.401 1.507a.23.23 0 0 0 .204.128",className:"icon-reply-filled_svg__fill"})));function nY(){return(nY=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nZ=e=>eh.createElement("svg",nY({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),X||(X=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M26.667 48C14.885 48 5.333 38.449 5.333 26.667S14.885 5.333 26.667 5.333 48 14.885 48 26.667c0 4.93-1.672 9.469-4.48 13.081l13.67 13.67a2.668 2.668 0 0 1-3.772 3.772l-13.67-13.67A21.24 21.24 0 0 1 26.667 48m0-5.333c8.836 0 16-7.164 16-16s-7.164-16-16-16-16 7.163-16 16 7.163 16 16 16",className:"icon-search_svg__fill"})));function nQ(){return(nQ=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nW=e=>eh.createElement("svg",nQ({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),$||($=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M59.795 29.43 7.329 2.979C4.691 1.802 1.76 4.153 2.932 6.798l6.925 18.609a2 2 0 0 0 1.544 1.275l32.273 5.394L11.4 37.47a2 2 0 0 0-1.544 1.275L2.932 57.353c-.879 2.645 1.76 4.997 4.397 3.527l52.466-26.453c2.051-.882 2.051-3.82 0-4.996z",className:"icon-send_svg__fill"})));function nq(){return(nq=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nX=e=>eh.createElement("svg",nq({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),J||(J=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 2.667A5.33 5.33 0 0 1 37.333 8v.24A4.4 4.4 0 0 0 40 12.267a4.4 4.4 0 0 0 4.853-.88l.16-.16a5.33 5.33 0 0 1 7.547 0 5.333 5.333 0 0 1 0 7.546l-.16.16a4.4 4.4 0 0 0-.88 4.854V24a4.4 4.4 0 0 0 4.027 2.667H56c2.946 0 5.333 2.387 5.333 5.333S58.946 37.333 56 37.333h-.24A4.4 4.4 0 0 0 51.733 40a4.4 4.4 0 0 0 .88 4.853l.16.16a5.33 5.33 0 0 1 0 7.547 5.333 5.333 0 0 1-7.546 0l-.16-.16a4.4 4.4 0 0 0-4.854-.88 4.4 4.4 0 0 0-2.666 4.027V56a5.333 5.333 0 0 1-10.667 0v-.24A4.4 4.4 0 0 0 24 51.733a4.4 4.4 0 0 0-4.853.88l-.16.16a5.33 5.33 0 0 1-7.547 0 5.333 5.333 0 0 1 0-7.546l.16-.16a4.4 4.4 0 0 0 .88-4.854 4.4 4.4 0 0 0-4.027-2.666H8A5.333 5.333 0 0 1 8 26.88h.24A4.4 4.4 0 0 0 12.267 24a4.4 4.4 0 0 0-.88-4.853l-.16-.16a5.33 5.33 0 0 1 0-7.547 5.333 5.333 0 0 1 7.546 0l.16.16a4.4 4.4 0 0 0 4.854.88H24a4.4 4.4 0 0 0 2.667-4.027V8A5.33 5.33 0 0 1 32 2.667M32 24a8 8 0 1 0 0 16 8 8 0 0 0 0-16",className:"icon-settings-filled_svg__fill"})));function n$(){return(n$=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let nJ=e=>eh.createElement("svg",n$({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32"},e),ee||(ee=eh.createElement("path",{d:"M21.943 24.39a1.333 1.333 0 0 1-1.886 1.886l-9.333-9.333a1.333 1.333 0 0 1 0-1.886l9.333-9.333a1.333 1.333 0 1 1 1.886 1.885L13.553 16z",className:"icon-slide-left_svg__fill",clipRule:"evenodd"})));function n0(){return(n0=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let n1=e=>eh.createElement("svg",n0({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),en||(en=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M32 61.333C48.2 61.333 61.333 48.2 61.333 32S48.2 2.667 32 2.667 2.667 15.8 2.667 32a2.838 2.838 0 1 0 5.678 0C8.344 18.935 18.934 8.344 32 8.344c13.065 0 23.656 10.591 23.656 23.656S45.065 55.656 32 55.656a2.838 2.838 0 1 0 0 5.677",className:"icon-spinner_svg__fill"})));function n2(){return(n2=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let n3=e=>eh.createElement("svg",n2({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),et||(et=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M36.889 43.013c6.608 0 12.121 4.685 12.43 10.734l.014.537V58a2.667 2.667 0 0 1-5.316.311L44 58v-3.716c0-3.07-2.87-5.718-6.636-5.925l-.475-.013H27.11c-3.838 0-6.86 2.525-7.096 5.557l-.015.381V58a2.667 2.667 0 0 1-5.315.311L14.667 58v-3.716c0-6.126 5.324-10.986 11.864-11.26l.58-.011zm18.578-17.291q.401 0 .784.118c4.632 1.426 7.518 4.801 7.736 9.688l.013.594v12.8a2.667 2.667 0 0 1-5.315.311l-.018-.311V36.124c-.002-2.595-1.163-4.171-3.528-5.034l-.104-.037-2.502.002a2.667 2.667 0 0 1-2.648-2.356l-.018-.31a2.67 2.67 0 0 1 2.355-2.65l.311-.017zm-44 0 .31.018a2.666 2.666 0 0 1 2.356 2.648l-.018.311a2.666 2.666 0 0 1-2.648 2.356l-2.51-.002-.119.042c-2.246.85-3.503 2.574-3.505 5.147v12.68l-.018.31A2.666 2.666 0 0 1 0 48.922V36.24l.014-.591c.225-4.874 3.203-8.415 7.712-9.809q.384-.117.788-.118zM32 19.958c5.512 0 10 4.409 10 9.871s-4.488 9.872-10 9.872-10-4.41-10-9.872 4.488-9.871 10-9.871m0 5.333c-2.588 0-4.667 2.043-4.667 4.538s2.08 4.538 4.667 4.538c2.588 0 4.667-2.042 4.667-4.538 0-2.495-2.08-4.538-4.667-4.538M17.333 2.667c5.513 0 10 4.409 10 9.871s-4.487 9.871-10 9.871c-5.512 0-10-4.409-10-9.871s4.488-9.871 10-9.871m29.334 0c5.512 0 10 4.409 10 9.871s-4.488 9.871-10 9.871c-5.513 0-10-4.409-10-9.871s4.487-9.871 10-9.871M17.333 8c-2.587 0-4.666 2.042-4.666 4.538s2.079 4.538 4.666 4.538S22 15.034 22 12.538 19.921 8 17.333 8m29.334 0C44.079 8 42 10.042 42 12.538s2.079 4.538 4.667 4.538 4.666-2.042 4.666-4.538S49.254 8 46.667 8",className:"icon-supergroup_svg__fill"})));function n6(){return(n6=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let n4=e=>eh.createElement("svg",n6({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64"},e),er||(er=eh.createElement("path",{d:"M38.824 25.895a2.95 2.95 0 0 1 4.16-.074L57.1 39.378a2.92 2.92 0 0 1 .002 4.213L42.985 57.177a2.95 2.95 0 0 1-4.158-.07 2.92 2.92 0 0 1 .07-4.14l11.928-11.48-11.926-11.451a2.92 2.92 0 0 1-.075-4.14",className:"icon-thread_svg__fill",clipRule:"evenodd"})),ei||(ei=eh.createElement("path",{d:"M8.866 6c1.583 0 2.866 1.216 2.866 2.716V25.5c0 7.672 6.846 14.068 15.475 14.068h22.927c1.583 0 2.866 1.216 2.866 2.716S51.717 45 50.134 45H27.207C15.604 45 6 36.35 6 25.5V8.716C6 7.216 7.283 6 8.866 6",className:"icon-thread_svg__fill",clipRule:"evenodd"})));function n7(){return(n7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).app
13ly(null,arguments)}let n5=e=>eh.createElement("svg",n7({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),ea||(ea=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M34.667 5.333a2.667 2.667 0 0 1 0 5.334H13.333a2.667 2.667 0 0 0-2.666 2.666v37.334c0 1.143.72 2.118 1.73 2.497l28.384-28.383a2.667 2.667 0 0 1 3.771 0l8.781 8.78v-4.228a2.667 2.667 0 0 1 2.498-2.661l.169-.005a2.667 2.667 0 0 1 2.667 2.666v21.334a8 8 0 0 1-8 8H13.33a8 8 0 0 1-7.998-8V13.333a8 8 0 0 1 8-8zm8 25.105L19.77 53.333h30.897a2.667 2.667 0 0 0 2.661-2.498l.005-.168v-9.563zM22.667 16a6.666 6.666 0 1 1 0 13.333 6.666 6.666 0 0 1 0-13.333m0 5.333a1.334 1.334 0 1 0 0 2.667 1.334 1.334 0 0 0 0-2.667M56.78 3.448a2.665 2.665 0 0 1 3.771 0 2.665 2.665 0 0 1 0 3.771l-4.782 4.78 4.782 4.782c.998.998 1.04 2.59.125 3.638l-.125.133a2.665 2.665 0 0 1-3.771 0l-4.782-4.781-4.78 4.781a2.667 2.667 0 0 1-3.638.125l-.133-.125a2.665 2.665 0 0 1 0-3.771L48.228 12l-4.78-4.781a2.667 2.667 0 0 1-.125-3.638l.125-.133a2.665 2.665 0 0 1 3.771 0l4.78 4.78z",className:"icon-thumbnail-none_svg__fill"})));function n8(){return(n8=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let n9=e=>eh.createElement("svg",n8({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 88 48"},e),eo||(eo=eh.createElement("g",{fill:"none",fillRule:"evenodd"},eh.createElement("rect",{width:80,height:40,x:4,y:4,fill:"#000",className:"icon-toggleoff_svg__fill",rx:20}),eh.createElement("circle",{cx:24,cy:24,r:12,fill:"#FFF"}),eh.createElement("path",{fill:"#FFF",d:"M64 4c11.046 0 20 8.954 20 20s-8.954 20-20 20H24C12.954 44 4 35.046 4 24S12.954 4 24 4zm0 2H24C14.059 6 6 14.059 6 24c0 9.764 7.774 17.712 17.47 17.992L24 42h40c9.941 0 18-8.059 18-18 0-9.764-7.774-17.712-17.47-17.992z"}),eh.createElement("path",{fill:"#000",d:"M64 0H24C10.745 0 0 10.745 0 24s10.745 24 24 24h40c13.255 0 24-10.745 24-24S77.255 0 64 0m0 4c11.046 0 20 8.954 20 20s-8.954 20-20 20H24C12.954 44 4 35.046 4 24S12.954 4 24 4z",className:"icon-toggleoff_svg__fill"}))));function te(){return(te=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let tn=e=>eh.createElement("svg",te({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 88 48"},e),el||(el=eh.createElement("g",{fill:"none",fillRule:"evenodd"},eh.createElement("rect",{width:80,height:40,x:4,y:4,fill:"#000",className:"icon-toggleon_svg__fill",rx:20}),eh.createElement("circle",{cx:64,cy:24,r:12,fill:"#FFF"}),eh.createElement("path",{fill:"#FFF",d:"M64 4c11.046 0 20 8.954 20 20s-8.954 20-20 20H24C12.954 44 4 35.046 4 24S12.954 4 24 4zm0 2H24C14.059 6 6 14.059 6 24c0 9.764 7.774 17.712 17.47 17.992L24 42h40c9.941 0 18-8.059 18-18 0-9.764-7.774-17.712-17.47-17.992z"}),eh.createElement("path",{fill:"#000",d:"M64 0H24C10.745 0 0 10.745 0 24s10.745 24 24 24h40c13.255 0 24-10.745 24-24S77.255 0 64 0m0 4c11.046 0 20 8.954 20 20s-8.954 20-20 20H24C12.954 44 4 35.046 4 24S12.954 4 24 4z",className:"icon-toggleon_svg__fill"}))));function tt(){return(tt=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let tr=e=>eh.createElement("svg",tt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"},e),es||(es=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M42.667 37.333c7.17 0 13.018 5.66 13.32 12.755l.013.579V56a2.667 2.667 0 0 1-5.315.311L50.667 56v-5.333c0-4.26-3.33-7.743-7.53-7.987l-.47-.013H21.333a8 8 0 0 0-7.986 7.53l-.014.47V56a2.667 2.667 0 0 1-5.316.311L8 56v-5.333c0-7.17 5.66-13.019 12.755-13.321l.578-.013zM32 5.333c7.364 0 13.333 5.97 13.333 13.334S39.363 32 32 32s-13.333-5.97-13.333-13.333S24.637 5.333 32 5.333m0 5.334a8 8 0 1 0 0 16 8 8 0 0 0 0-16",className:"icon-user_svg__fill"})));function ti(){return(ti=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let ta=e=>eh.createElement("svg",ti({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),eu||(eu=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M12.346 5.336v-.001c.405-.523 1.182-.524 1.58-.037.162.2.25.443.25.69v3.678c0 .518.42.938.938.938H18.6c.359 0 .7.179.911.488l.001.001.369.548.003.004c.174.256.226.583.134.895l-1.532 5.316c-.131.459-.559.782-1.044.782h-7.075c-.3 0-.593-.127-.8-.345l-1.13-1.222v-6.647zm-4.73 3.078 3.245-4.223.002-.002c1.125-1.456 3.339-1.521 4.517-.075.421.52.671 1.177.671 1.874v2.74h2.55c.99 0 1.908.496 2.462 1.31l.002.004.368.547.002.002a2.93 2.93 0 0 1 .382 2.475v.003l-1.528 5.302a2.96 2.96 0 0 1-2.847 2.142h-7.075a2.99 2.99 0 0 1-2.166-.935l-.007-.007-.066-.072a2.13 2.13 0 0 1-1.821 1.025H4.192a2.13 2.13 0 0 1-2.13-2.13v-8.3a2.13 2.13 0 0 1 2.13-2.13h2.115c.493 0 .948.168 1.31.45m-3.678 1.68c0-.141.114-.255.254-.255h2.115c.14 0 .254.114.254.255v8.3c0 .14-.114.255-.254.255H4.192a.255.255 0 0 1-.255-.255z",clipRule:"evenodd"})));function to(){return(to=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let tl=e=>eh.createElement("svg",to({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),ec||(ec=eh.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M11.654 18.664v.001c-.405.523-1.182.524-1.58.037-.162-.2-.25-.444-.25-.69v-3.678a.94.94 0 0 0-.938-.938H5.4c-.359 0-.7-.179-.911-.488l-.001-.001-.369-.548-.003-.004a1.05 1.05 0 0 1-.134-.895l1.532-5.316c.131-.459.559-.782 1.044-.782h7.075c.3 0 .593.127.8.345l1.13 1.222v6.647zm4.73-3.078-3.245 4.223-.002.002c-1.125 1.456-3.339 1.521-4.517.075a2.98 2.98 0 0 1-.671-1.874v-2.74h-2.55c-.99 0-1.908-.496-2.462-1.31l-.002-.004-.368-.547-.002-.002a2.93 2.93 0 0 1-.382-2.475v-.003L3.711 5.
1363a2.96 2.96 0 0 1 2.847-2.142h7.075c.823 0 1.608.345 2.166.935l.007.007.066.072a2.13 2.13 0 0 1 1.821-1.025h2.115a2.13 2.13 0 0 1 2.13 2.13v8.3a2.13 2.13 0 0 1-2.13 2.13h-2.115a2.12 2.12 0 0 1-1.31-.45m3.678-1.68c0 .141-.114.255-.254.255h-2.115a.255.255 0 0 1-.255-.255v-8.3c0-.14.115-.255.255-.255h2.115c.14 0 .255.114.255.255z",clipRule:"evenodd"})));function ts(e){var n=e.className,t=void 0===n?"":n,r=e.type,i=e.fillColor,a=void 0===i?ev.DEFAULT:i,o=e.width,l=void 0===o?26:o,s=e.height,u=void 0===s?26:s,c=e.onClick,d=void 0===c?ef.n:c,h=e.children,f=e.testID;return eh.createElement("div",{className:(0,ed.c)((0,ed.c)([],Array.isArray(t)?t:[t],!0),["sendbird-icon",function(e){switch(e){case em.ADD:return"sendbird-icon-add";case em.ARROW_LEFT:return"sendbird-icon-arrow-left";case em.ATTACH:return"sendbird-icon-attach";case em.AUDIO_ON_LINED:return"sendbird-icon-audio-on-lined";case em.BAN:return"sendbird-icon-ban";case em.BROADCAST:return"sendbird-icon-broadcast";case em.CAMERA:return"sendbird-icon-camera";case em.CHANNELS:return"sendbird-icon-channels";case em.CHAT:return"sendbird-icon-chat";case em.CHAT_FILLED:return"sendbird-icon-chat-filled";case em.CHEVRON_DOWN:return"sendbird-icon-chevron-down";case em.CHEVRON_RIGHT:return"sendbird-icon-chevron-right";case em.CLOSE:return"sendbird-icon-close";case em.COLLAPSE:return"sendbird-icon-collapse";case em.COPY:return"sendbird-icon-copy";case em.CREATE:return"sendbird-icon-create";case em.DELETE:return"sendbird-icon-delete";case em.DISCONNECTED:return"sendbird-icon-disconnected";case em.DOCUMENT:return"sendbird-icon-document";case em.DONE:return"sendbird-icon-done";case em.DONE_ALL:return"sendbird-icon-done-all";case em.DOWNLOAD:return"sendbird-icon-down-load";case em.EDIT:return"sendbird-icon-edit";case em.EMOJI_MORE:return"sendbird-icon-emoji-more";case em.ERROR:return"sendbird-icon-error";case em.EXPAND:return"sendbird-icon-expand";case em.FILE_AUDIO:return"sendbird-icon-file-audio";case em.FILE_DOCUMENT:return"sendbird-icon-file-document";case em.FREEZE:return"sendbird-icon-freeze";case em.GIF:return"sendbird-icon-gif";case em.INFO:return"sendbird-icon-info";case em.LEAVE:return"sendbird-icon-leave";case em.MEMBERS:return"sendbird-icon-members";case em.MESSAGE:return"sendbird-icon-message";case em.MODERATIONS:return"sendbird-icon-moderations";case em.MORE:return"sendbird-icon-more";case em.MUTE:return"sendbird-icon-mute";case em.NOTIFICATIONS:return"sendbird-icon-notifications";case em.NOTIFICATIONS_OFF_FILLED:return"sendbird-icon-notifications-off-filled";case em.OPERATOR:return"sendbird-icon-operator";case em.PHOTO:return"sendbird-icon-photo";case em.PLAY:return"sendbird-icon-play";case em.PLUS:return"sendbird-iconn-plus";case em.QUESTION:return"sendbird-icon-question";case em.REFRESH:return"sendbird-icon-refresh";case em.REMOVE:return"sendbird-icon-remove";case em.REPLY:return"sendbird-icon-reply";case em.SEARCH:return"sendbird-icon-search";case em.SEND:return"sendbird-icon-send";case em.SETTINGS_FILLED:return"sendbird-icon-settings-filled";case em.SPINNER:return"sendbird-icon-spinner";case em.SUPERGROUP:return"sendbird-icon-supergroup";case em.THREAD:return"sendbird-icon-thread";case em.THUMBNAIL_NONE:return"sendbird-icon-thumbnail-none";case em.TOGGLE_OFF:return"sendbird-icon-toggle-off";case em.TOGGLE_ON:return"sendbird-icon-toggle-on";case em.USER:return"sendbird-icon-user";case em.FEEDBACK_LIKE:return"sendbird-icon-feedback-like";case em.FEEDBACK_DISLIKE:return"sendbird-icon-feedback-dislike";default:return"sendbird-icon-unknown"}}(r),function(e){switch(e){case ev.PRIMARY:return"sendbird-icon-color--primary";case ev.PRIMARY_2:return"sendbird-icon-color--primary-2";case ev.SECONDARY:return"sendbird-icon-color--secondary";case ev.SECONDARY_2:return"sendbird-icon-color--secondary-2";case ev.CONTENT:return"sendbird-icon-color--content";case ev.CONTENT_INVERSE:return"sendbird-icon-color--content-inverse";case ev.CONTENT_INVERSE_3:return"sendbird-icon-color--content-inverse-3";case ev.WHITE:return"sendbird-icon-color--white";case ev.GRAY:return"sendbird-icon-color--gray";
13case ev.THUMBNAIL_ICON:return"sendbird-icon-color--thumbnail-icon";case ev.SENT:return"sendbird-icon-color--sent";case ev.READ:return"sendbird-icon-color--read";case ev.ON_BACKGROUND_1:return"sendbird-icon-color--on-background-1";case ev.ON_BACKGROUND_2:return"sendbird-icon-color--on-background-2";case ev.ON_BACKGROUND_3:return"sendbird-icon-color--on-background-3";case ev.ON_BACKGROUND_4:return"sendbird-icon-color--on-background-4";case ev.BACKGROUND_3:return"sendbird-icon-color--background-3";case ev.ERROR:return"sendbird-icon-color--error";default:return""}}(a)],!1).join(" "),"data-testid":f,role:"button",onClick:d,onKeyDown:d,tabIndex:0,style:{width:"string"==typeof l?l:"".concat(l,"px"),minWidth:"string"==typeof l?l:"".concat(l,"px"),height:"string"==typeof u?u:"".concat(u,"px"),minHeight:"string"==typeof u?u:"".concat(u,"px")}},(void 0===h?null:h)||function(e){switch(e){case em.ADD:return eh.createElement(eg,null);case em.ARROW_LEFT:return eh.createElement(eE,null);case em.ATTACH:return eh.createElement(eC,null);case em.AUDIO_ON_LINED:return eh.createElement(eN,null);case em.BAN:return eh.createElement(eS,null);case em.BROADCAST:return eh.createElement(eI,null);case em.CAMERA:return eh.createElement(eO,null);case em.CHANNELS:return eh.createElement(ew,null);case em.CHAT:return eh.createElement(eL,null);case em.CHAT_FILLED:return eh.createElement(eU,null);case em.CHEVRON_DOWN:return eh.createElement(ek,null);case em.CHEVRON_RIGHT:return eh.createElement(eG,null);case em.CLOSE:return eh.createElement(eH,null);case em.COLLAPSE:return eh.createElement(ej,null);case em.COPY:return eh.createElement(eK,null);case em.CREATE:return eh.createElement(eZ,null);case em.DELETE:return eh.createElement(eW,null);case em.DISCONNECTED:return eh.createElement(eX,null);case em.DOCUMENT:return eh.createElement(eJ,null);case em.DONE:return eh.createElement(e1,null);case em.DONE_ALL:return eh.createElement(e3,null);case em.DOWNLOAD:return eh.createElement(e4,null);case em.EDIT:return eh.createElement(e5,null);case em.EMOJI_MORE:return eh.createElement(e9,null);case em.ERROR:return eh.createElement(nn,null);case em.EXPAND:return eh.createElement(nr,null);case em.FILE_AUDIO:return eh.createElement(na,null);case em.FILE_DOCUMENT:return eh.createElement(nl,null);case em.FREEZE:return eh.createElement(nu,null);case em.GIF:return eh.createElement(nd,null);case em.INFO:return eh.createElement(nf,null);case em.LEAVE:return eh.createElement(nv,null);case em.MEMBERS:return eh.createElement(ng,null);case em.MESSAGE:return eh.createElement(nE,null);case em.MODERATIONS:return eh.createElement(nC,null);case em.MORE:return eh.createElement(nN,null);case em.MUTE:return eh.createElement(nS,null);case em.NOTIFICATIONS:return eh.createElement(nI,null);case em.NOTIFICATIONS_OFF_FILLED:return eh.createElement(nO,null);case em.OPERATOR:return eh.createElement(nw,null);case em.PHOTO:return eh.createElement(nL,null);case em.PLAY:return eh.createElement(nU,null);case em.PLUS:return eh.createElement(nk,null);case em.QUESTION:return eh.createElement(nG,null);case em.REFRESH:return eh.createElement(nH,null);case em.REMOVE:return eh.createElement(nj,null);case em.REPLY:return eh.createElement(nK,null);case em.SEARCH:return eh.createElement(nZ,null);case em.SEND:return eh.createElement(nW,null);case em.SETTINGS_FILLED:return eh.createElement(nX,null);case em.SLIDE_LEFT:return eh.createElement(nJ,null);case em.SPINNER:return eh.createElement(n1,null);case em.SUPERGROUP:return eh.createElement(n3,null);case em.THREAD:return eh.createElement(n4,null);case em.THUMBNAIL_NONE:return eh.createElement(n5,null);case em.TOGGLE_OFF:return eh.createElement(n9,null);case em.TOGGLE_ON:return eh.createElement(tn,null);case em.USER:return eh.createElement(tr,null);case em.FEEDBACK_LIKE:return eh.createElement(ta,null);case em.FEEDBACK_DISLIKE:return eh.createElement(tl,null);default:return"icon"}}(r))}var tu=em,tc=ev},29515:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var r=t(12394),i=t(67294),a=i.forwardRef(function(e,n){var t=e.className,a=void 0===t?"":t,o=e.children,l=e.disabled,s=void 0!==l&&l,u=e.width,c=e.height,d=e.type,h=e.style,f=e.onBlur,m=void 0===f?function(){}:f,v=e.onClick,p=void 0===v?function(){}:v,g=e.testID,_=(0,i.useState)(!1),E=_[0],b=_[1];return i.createElement("button",{"data-testid":g,className:(0,r.c)((0,r.c)([],Array.isArray(a)?a:[a],!0),["sendbird-iconbutton",E?"sendbird-iconbutton--pressed":""],!1).join(" "),disabled:s,ref:n,type:void 0===d?"button":d,style:(0,r._)((0,r._)({},void 0===h?{}:h),{height:void 0===c?"56px":c,width:void 0===u?"56px":u}),onClick:function(e){s||(b(!0),null==p||p(e))},onBlur:function(e){b(!1),null==m||m(e)}},i.createElement("span",{className:"sendbird-iconbutton__inner"},o))})},4399:function(e,n,t){"use strict";t.d(n,{Mh:function(){return d},ZP:function(){return h}});var r=t(12394),i=t(67294),a=t(88006),o=function(e){if(null!==e)return"number"==typeof e?"".concat(e,"px"):e};function l(e,n,t){var r;return"min(".concat(null!=n?n:t,", ").concat(null!==(r=o(e))&&void 0!==r?r:t,")")}var s=function(){var e=(0,i.useState)(!1),n=e[0],t=e[1],r=(0,i.useState)(null),a=r[0],o=r[1],l=(0,i.useCallback)(function(e){null!==e&&o(e)},[]);return(0,i.useEffect)(function(){if(a){var e=new IntersectionObserver(function(e){t(e[0].isIntersecting)});return e.observe(a),function(){e.disconnect()}}},[a]),[l,n]},u=function(){var e=(0,i.useRef)(!1),n=s(),t=n[0];return n[1]&&(e.current=!0),[t,e.current]};function c(e,n){return void 0===e&&(e=!1),void 0===n&&(n=null),e?"50%":o(n)}function d(e,n,t){var r="string"==typeof e?parseInt(e,10):e,i=t-1;return"".concat(0===n?2*r:r,"px ").concat(1===n?2*r:r,"px ").concat(n===i?2*r:r,"px ").concat(n===i-1?2*r:r,"px")}var h=function(e){var n,t,o,s,d,h=e.className,m=void 0===h?"":h,v=e.url,p=e.alt,g=e.width,_=e.maxSideLength,E=e.he
13ight,b=e.circle,C=void 0!==b&&b,y=e.fixedSize,N=void 0!==y&&y,T=e.placeHolder,S=void 0===T?null:T,A=e.defaultComponent,I=void 0===A?null:A,M=e.borderRadius,O=void 0===M?null:M,R=e.onLoad,w=void 0===R?a.n:R,D=e.onError,L=void 0===D?a.n:D,P=e.shadeOnHover,U=e.isUploaded,x=u(),k=x[0],F=x[1]?v:null,G=(0,i.useState)(!1),B=G[0],H=G[1],V=(0,i.useState)(!0),j=V[0],z=V[1],K=(t=(n={width:void 0===g?null:g,height:void 0===E?null:E,maxSideLength:void 0===_?null:_,defaultMinLength:"400px"}).width,o=n.height,s=n.maxSideLength,d=n.defaultMinLength,[(0,i.useMemo)(function(){return l(t,s,d)},[t]),(0,i.useMemo)(function(){return l(o,s,d)},[o])]),Y=K[0],Z=K[1];return Y&&Z&&i.createElement("div",{ref:k,className:(0,r.c)((0,r.c)([],Array.isArray(m)?m:[m],!0),["sendbird-image-renderer"],!1).join(" "),style:{width:"100%",minWidth:Y,maxWidth:N?Y:"400px",height:Z}},j&&("function"==typeof S?S({style:{width:"100%",minWidth:Y,maxWidth:N?Y:"400px",height:Z,position:"absolute",display:"flex",justifyContent:"center",alignItems:"center"}}):S),!F||B?"function"==typeof I?I():I:i.createElement("div",{className:"sendbird-image-renderer__image",style:(0,r._)({width:"100%",minWidth:Y,maxWidth:N?Y:"400px",height:Z,position:"absolute",borderRadius:c(C,O)},F?{backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:"url(".concat(F,")")}:{})}),P&&i.createElement("div",{className:"sendbird-multiple-files-image-renderer__image-cover",style:(0,r._)({borderRadius:c(C,O)},void 0===U||U?{}:{display:"inline-flex"})}),F&&i.createElement(f,{src:F,alt:void 0===p?"":p,onLoadStart:function(){z(!0),H(!1)},onLoad:function(){z(!1),H(!1),w()},onError:function(){z(!1),H(!0),L()}}))},f=function(e){var n=e.src,t=e.alt,r=e.onLoadStart,o=void 0===r?a.n:r,l=e.onLoad,s=void 0===l?a.n:l,u=e.onError,c=void 0===u?a.n:u,d=(0,i.useRef)({currSrc:n,prevSrc:n,loadFailure:!1});return d.current.currSrc!==n&&(d.current.prevSrc=d.current.currSrc,d.current.currSrc=n),(0,i.useLayoutEffect)(function(){if(n){var e=d.current.prevSrc!==d.current.currSrc,t=d.current.loadFailure;(e||t)&&o()}},[n,navigator.onLine]),i.createElement("img",{className:"sendbird-image-renderer__hidden-image-loader",src:n,alt:t,onLoad:function(){d.current.loadFailure=!1,s()},onError:function(){d.current.loadFailure=!0,c()}})}},80385:function(e,n,t){"use strict";t.d(n,{A:function(){return a},Z:function(){return o}});var r=t(67294),i=t(1608);t(12394),t(64393);var a=function(e){var n=e.children;return r.createElement(i.L,{className:"sendbird-input-label",type:i.a.CAPTION_3,color:i.b.ONBACKGROUND_1},n)},o=r.forwardRef(function(e,n){var t=e.name,a=e.required,o=e.disabled,l=e.value,s=e.placeHolder,u=e.autoFocus,c=(0,r.useState)(l),d=c[0],h=c[1];return r.createElement("div",{className:"sendbird-input"},r.createElement("input",{className:"sendbird-input__input",ref:n,name:t,required:a,disabled:o,value:d,onChange:function(e){h(e.target.value)},autoFocus:void 0!==u&&u}),s&&!d&&r.createElement(i.L,{className:"sendbird-input__placeholder",type:i.a.BODY_1,color:i.b.ONBACKGROUND_3},s))})},40286:function(e,n,t){"use strict";t.d(n,{ZP:function(){return s}});var r=t(12394),i=t(67294),a=t(1608),o=t(88006);t(64393);var l=/https?:\/\//;function s(e){var n=e.className,t=void 0===n?"":n,s=e.src,u=e.type,c=e.color,d=e.children,h=l.test(s)?s:"http://".concat(s);return i.createElement("a",{className:(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!0),["sendbird-link-label",(0,a.d)(c)],!1).join(" "),href:h,target:"_blank",rel:"noopener noreferrer",onTouchEnd:function(e){e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),(0,o.o)(h)}},i.createElement(a.L,{className:"sendbird-link-label__label",testID:"sendbird-link-label__label",type:u,color:c},d))}a.a,a.b},72661:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12394),i=t(67294),a=t(43822);function o(e){var n=e.className,t=void 0===n?"":n,o=e.width,l=void 0===o?"26px":o,s=e.height,u=void 0===s?"26px":s,c=e.children,d=e.testID;return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!0),["sendbird-loader"],!1).join(" "),"data-testid":d,style:{width:"str
13ing"==typeof l?l:"".concat(l,"px"),height:"string"==typeof u?u:"".concat(u,"px")}},c||i.createElement(a.ZP,{type:a.Qy.SPINNER,width:"26px",height:"26px"}))}},64437:function(e,n,t){"use strict";t.d(n,{w:function(){return s}});var r=t(67294),i=t(72661),a=t(43822),o=t(88006);t(12394);var l="40px";function s(e){var n=e.className,t=e.isByMe;return r.createElement("div",{className:(0,o.c)(n,t?"outgoing":"incoming","sendbird-template-loading-message-item-body")},r.createElement(i.Z,{className:"sendbird-message-status__icon",testID:"sendbird-message-status-icon",width:l,height:l},r.createElement(a.ZP,{type:a.Qy.SPINNER,fillColor:a.zo.CONTENT_INVERSE_3,width:l,height:l})))}},81823:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(67294),i=t(69561),a=t(1608),o=t(13462),l=t(41238),s=t(88006);function u(e){var n,t,u,c=e.mentionTemplate,d=e.mentionedUserId,h=e.mentionedUserNickname,f=e.isByMe,m=(0,r.useRef)(),v=(0,l.A)(),p=null===(n=null==v?void 0:v.config)||void 0===n?void 0:n.userId,g=null===(u=null===(t=null==v?void 0:v.stores)||void 0===t?void 0:t.sdkStore)||void 0===u?void 0:u.sdk,_=p===d,E=(0,r.useState)(),b=E[0],C=E[1],y=(0,r.useCallback)(function(e){if(b||!(null==g?void 0:g.createApplicationUserListQuery)){e();return}(null==g?void 0:g.createApplicationUserListQuery({userIdsFilter:[d]})).next().then(function(n){(null==n?void 0:n.length)>0&&C(n[0]),e()})},[g,d]);return r.createElement(i.C,{menuTrigger:function(e){return r.createElement("a",{className:(0,s.c)("sendbird-word__mention",_&&"sendbird-word__mention--me"),onClick:function(){return y(e)},ref:m,"data-userid":d,"data-nickname":h,"data-sb-mention":!0},r.createElement(a.L,{type:a.a.CAPTION_1,color:f?a.b.ONCONTENT_1:a.b.ONBACKGROUND_1},"".concat(c).concat(h)))},menuItems:function(e){return r.createElement(i.b,{parentRef:m,parentContainRef:m,closeDropdown:e,style:{paddingTop:"0px",paddingBottom:"0px"}},r.createElement(o.Z,{user:b,onSuccess:e,currentUserId:p}))}})}t(12394),t(73935),t(78614),t(71091),t(29515),t(49805),t(8978),t(7585),t(64393),t(26748),t(34420),t(69392),t(43847),t(88569),t(43822),t(93122),t(22284),t(5701),t(70179),t(4399)},77839:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(67294),i=t(87607),a=t(88006);function o(e){var n=e.className,t=e.children,o=e.isReverse,l=e.color,s=e.userId;return r.createElement("span",{className:(0,a.c)(i.M,void 0===n?"":n,void 0!==o&&o&&"reverse",l),contentEditable:!1,"data-userid":s,"data-sb-mention":!0},t)}},3533:function(e,n,t){"use strict";t.d(n,{En:function(){return x}});var r,i,a=t(12394),o=t(67294),l=t(11228),s=t(2121),u=t(73862),c=t(69561),d=t(88006),h=t(1608),f=t(69139),m=t(27835),v=t(1167),p=t(26862),g=t(49805),_=t(7585),E=t(41238),b=t(51947),C=t(4500),y=t(67315),N=t(56342),T=t(43847),S=t(68873),A=t(17061),I=t(9434),M=t(43822),O=t(15345),R=t(45143),w=t(74062),D=t(21402),L=t(76917),P=t(58972);function U(e){var n,t,r,i=e.channel,s=e.message,u=e.showFileViewer,c=e.onMessageHeightChange,f=e.onBeforeDownloadFileMessage,m=e.renderSenderProfile,v=e.renderMessageHeader,p=e.renderMessageBody,b=e.isByMe,C=e.displayThreadReplies,y=e.mouseHover,N=e.isMobile,T=e.isReactionEnabledInChannel,S=e.hoveredMenuClassName,A=e.templateType,I=e.useReplying,M=(0,E.A)().config,O=(0,_.u)().dateLocale,R=null!==(n=g.N[A])&&void 0!==n?n:"",w=m((0,a._)((0,a._)({},e),{chainBottom:!1,className:"",isByMe:b,displayThreadReplies:C})),D=v(e),L=p({message:s,channel:i,showFileViewer:u,onMessageHeightChange:c,mouseHover:y,isMobile:N,config:M,isReactionEnabledInChannel:T,isByMe:b,onBeforeDownloadFileMessage:f}),U=o.createElement(h.L,{className:(0,d.c)("sendbird-message-content__middle__body-container__created-at","right",S,R),type:h.a.CAPTION_3,color:h.b.ONBACKGROUND_2},(0,l.f)((null==s?void 0:s.createdAt)||0,"p",{locale:O})),x=null===(t=s.extendedMessagePayload)||void 0===t?void 0:t[P.i],k=null!==(r=null==x?void 0:x.container_options)&&void 0!==r?r:{},F=k.profile,G=void 0===F||F,B=k.time,H=k.nickname,V=void 0===H||H;return o.createElement("div",{className:"sendbird-message-content__sendbird-ui-container-type__default__root"},!b&&(G||V)&&!I&&o.createElement("div",{className:"sendbird-message-content__sendbird-ui-container-type__default__header-container"},o.createElement("div",{className:"sendbird-message-content__sendbird-ui-container-type__default__header-container__left__profile"},G&&w),V&&D),L,!b&&(void 0===B||B)&&o.createElement("div",{className:"sendbird-message-content__sendbird-ui-container-type__default__bottom"},U))}function x(e){var n,t,r,x,k,F,G,B,H,V,j,z,K,Y=this,Z=e.className,Q=e.userId,W=e.channel,q=e.message,X=e.disabled,$=e.chainTop,J=void 0!==$&&$,ee=e.chainBottom,en=void 0!==ee&&ee,et=e.isReactionEnabled,er=e.disableQuoteMessage,ei=e.replyType,ea=e.threadReplySelectType,eo=e.nicknamesMap,el=e.emojiContainer,es=e.scrollToMessage,eu=e.showEdit,ec=e.showRemove,ed=e.showFileViewer,eh=e.resendMessage,ef=e.deleteMessage,em=e.toggleReaction,ev=e.setQuoteMessage,ep=e.onReplyInThread,eg=e.onQuoteMessageClick,e_=e.onMessageHeightChange,eE=e.onBeforeDownloadFileMessage,eb=e.filterEmojiCategoryIds,eC=(0,d.d)(e),ey=eC.renderSenderProfile,eN=void 0===ey?function(e){return o.createElement(I.M,(0,a._)({},e))}:ey,eT=eC.renderMessageBody,eS=void 0===eT?function(e){return o.createElement(I.a,(0,a._)({},e))}:eT,eA=eC.renderMessageHeader,eI=void 0===eA?function(e){return o.createElement(I.b,(0,a._)({},e))}:eA,eM=eC.renderMessageMenu,eO=void 0===eM?function(e){return o.createElement(u.M,(0,a._)({},e))}:eM,eR=eC.renderEmojiMenu,ew=void 0===eR?function(e){return o.createElement(f.j,(0,a._)({},e))}:eR,eD=eC.renderEmojiReactions,eL=eC.renderMobileMenuOnLongPress,eP=(0,_.u)(),eU=eP.dateLocale,ex=eP.stringSet,ek=(0,E.A)(),eF=ek.config,eG=ek.eventHandlers,eB=eF.logger,eH=null===(n=null==eG?void 0:eG.reaction)||void 0===n?void 0:n.onPressUserProfile,eV=(0,o.useRef)(),ej=(0,o.useRef)(),ez=(0,o.useRef)(),eK=(0,T.u)().isMobile,eY=(0,o.useState)(!1),eZ=eY[0],eQ=eY[1],eW=(0,o.useState)(!1),eq=eW[0],eX=eW[1],e$=(0,L.u)("#".concat((0,c.g)(q.messageId),".").concat(c.e),[document.getElementById(c.d),document.getElementById(c.E)]),eJ=(0,o.useState)(!1),e0=eJ[0],e1=eJ[1],e2=(0,o.useState)(!1),e3=e2[0],e6=e2[1],e4=(0,o.useState)(""),e7=e4[0],e5=e4[1],e8=Q===(null===(t=null==q?void 0:q.sender)||void 0===t?void 0:t.userId)||(null==q?void 0:q.sendingStatus)==="pending"||(null==q?void 0:q.sendingStatus)==="failed",e9=e8?"outgoing":"incoming",ne=J?"chain-top":"",nn=void 0!==et&&et&&!(null==W?void 0:W.isEphemeral),nt=nn?"use-reactions":"",nr=e$?"sendbird-mouse-hover":"",ni=!!(("QUOTE_REPLY"===ei||"THREAD"===ei)&&(null==q?void 0:q.parentMessageId)&&(null==q?void 0:q.parentMessage)&&!(void 0!==er&&er)),na=ni?"use-quote":"",no=(null===(r=null==q?void 0:q.threadInfo)||void 0===r?void 0:r.replyCount)&&q.threadInfo.replyCount>0&&"THREAD"===ei,nl=!e8&&!!(null==q?void 0:q.myFeedbackStatus)&&q.myFeedbackStatus!==i.NOT_APPLICABLE,ns=!!(null===(x=null==eF?void 0:eF.groupChannel)||void 0===x?void 0:x.enableFeedback)&&nl,nu=null===(k=null==q?void 0:q.myFeedback)||void 0===k?void 0:k.rating,
13nc=!((0,g.C)(q)||(0,g.O)(q)),nd=nc&&eK,nh=function(){var e=2;return ej.current&&(e+=4+ej.current.clientHeight),ez.current&&(e+=4+ez.current.clientHeight),e},nf=(0,o.useMemo)(function(){return nh()},[]),nm=function(){e6(!1)},nv=function(e){void 0===e&&(e=!1),eK&&e?e1(!0):e6(!0)},np=(0,y.u)({onLongPress:function(){nd&&eQ(!0)},onClick:d.n},{delay:300,shouldPreventDefault:!1});if((0,g.P)(q))return o.createElement(v.Z,{message:q});if((0,g.C)(q)){var ng=q.extendedMessagePayload[P.i];if((0,g.Q)(ng))return o.createElement(U,(0,a._)({},e,{renderSenderProfile:eN,renderMessageHeader:eI,renderMessageBody:eS,isByMe:e8,displayThreadReplies:no,mouseHover:eq,isMobile:eK,isReactionEnabledInChannel:nn,hoveredMenuClassName:nr,templateType:ng.type,useReplying:ni}))}return o.createElement("div",{className:(0,g.x)([null!=Z?Z:"","sendbird-message-content",e9]),onMouseOver:function(){return eX(!0)},onMouseLeave:function(){return eX(!1)}},o.createElement("div",{className:(0,d.c)("sendbird-message-content__left",nt,e9,na),"data-testid":"sendbird-message-content__left"},eN((0,a._)((0,a._)({},e),{className:"sendbird-message-content__left__avatar",isByMe:e8,displayThreadReplies:no,bottom:nf>0?nf+"px":""})),nc&&e8&&!eK&&o.createElement("div",{className:(0,d.c)("sendbird-message-content-menu",nt,nr,e9)},eO({channel:W,message:q,isByMe:e8,replyType:ei,showEdit:eu,showRemove:ec,resendMessage:eh,setQuoteMessage:ev,onReplyInThread:function(e){var n,t,r=e.message;ea===A.T.THREAD?null==ep||ep({message:r}):ea===A.T.PARENT&&(null==es||es(null!==(t=null===(n=r.parentMessage)||void 0===n?void 0:n.createdAt)&&void 0!==t?t:0,r.parentMessageId))},deleteMessage:ef}),nn&&ew({message:q,userId:Q,emojiContainer:el,toggleReaction:em,filterEmojiCategoryIds:eb}))),o.createElement("div",(0,a._)({className:(0,d.c)("sendbird-message-content__middle"),"data-testid":"sendbird-message-content__middle"},eK?(0,a._)({},np):{},{ref:eV}),!e8&&!J&&!ni&&eI(e),ni?o.createElement("div",{className:(0,d.c)("sendbird-message-content__middle__quote-message",e8?"outgoing":"incoming",na),"data-testid":"sendbird-message-content__middle__quote-message"},o.createElement(p.Z,{className:"sendbird-message-content__middle__quote-message__quote",message:q,userId:Q,isByMe:e8,isUnavailable:(null!==(F=null==W?void 0:W.messageOffsetTimestamp)&&void 0!==F?F:0)>(null!==(B=null===(G=q.parentMessage)||void 0===G?void 0:G.createdAt)&&void 0!==B?B:0),onClick:function(){var e;"THREAD"===ei&&ea===A.T.THREAD&&(null==eg||eg({message:q})),("QUOTE_REPLY"===ei||"THREAD"===ei&&ea===A.T.PARENT)&&(null===(e=null==q?void 0:q.parentMessage)||void 0===e?void 0:e.createdAt)&&(null==q?void 0:q.parentMessageId)&&(null==es||es(q.parentMessage.createdAt,q.parentMessageId))}})):null,o.createElement("div",{className:(0,d.c)("sendbird-message-content__middle__body-container")},e8&&!en&&o.createElement("div",{className:(0,d.c)("sendbird-message-content__middle__body-container__created-at","left",nr)},o.createElement("div",{className:"sendbird-message-content__middle__body-container__created-at__component-container"},o.createElement(s.M,{message:q,channel:W}))),eS({message:q,channel:W,showFileViewer:ed,onMessageHeightChange:e_,mouseHover:eq,isMobile:eK,config:eF,isReactionEnabledInChannel:nn,isByMe:e8,onBeforeDownloadFileMessage:eE}),nn&&(null===(H=null==q?void 0:q.reactions)||void 0===H?void 0:H.length)>0&&o.createElement("div",{className:(0,d.c)("sendbird-message-content-reactions",(0,g.c)(q)?"image-grid":e8&&!(0,g.p)(q)&&!(0,g.M)(q)&&"primary",eq&&"mouse-hover")},(void 0===eD?function(e){return o.createElement(m.Z,(0,a._)({},e))}:eD)({userId:Q,message:q,channel:W,isByMe:e8,emojiContainer:null!=el?el:new b.W8({}),memberNicknamesMap:null!=eo?eo:new Map,toggleReaction:em,onPressUserProfile:eH,filterEmojiCategoryIds:eb})),!e8&&!en&&o.createElement(h.L,{className:(0,d.c)("sendbird-message-content__middle__body-container__created-at","right",nr),type:h.a.CAPTION_3,color:h.b.ONBACKGROUND_2},(0,l.f)((null==q?void 0:q.createdAt)||0,ex.DATE_FORMAT__MESSAGE_CREATED_AT,{locale:eU}))),nc&&no&&(null==q?void 0:q.threadInfo)&&o.createElement(S.Z,{className:"sendbird-message-content__middle__thread-replies",threadInfo:null==q?void 0:q.threadInfo,onClick:function(){return null==ep?void 0:ep({message:q})},ref:ej}),ns&&o.createElement("div",{className:"sendbird-message-content__middle__body-container__feedback-buttons-container",ref:ez},o.createElement(O.Z,{isSelected:(null===(V=null==q?void 0:q.myFeedback)||void 0===V?void 0:V.rating)===C.b3.GOOD,onClick:function(){return(0,a.a)(Y,void 0,void 0,function(){var e,n,t;return(0,a.b)(this,function(r){switch(r.label){case 0:if(nu)return[3,5];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,q.submitFeedback({rating:C.b3.GOOD})];case 2:return r.sent(),nv(),[3,4];case 3:return e=r.sent(),null===(t=null===(n=null==eF?void 0:eF.logger)||void 0===n?void 0:n.error)||void 0===t||t.call(n,"Channel: Submit feedback failed.",e),e5(ex.FEEDBACK_FAILED_SUBMIT),[3,4];case 4:return[3,6];case 5:nv(!0),r.label=6;case 6:return[2]}})})},disabled:!!(null==q?void 0:q.myFeedback)&&q.myFeedback.rating!==C.b3.GOOD},o.createElement(M.ZP,{type:M.Qy.FEEDBACK_LIKE,width:"24px",height:"24px"})),o.createElement(O.Z,{isSelected:(null===(j=null==q?void 0:q.myFeedback)||void 0===j?void 0:j.rating)===C.b3.BAD,onClick:function(){return(0,a.a)(Y,void 0,void 0,function(){var e,n,t;return(0,a.b)(this,function(r){switch(r.label){case 0:if(nu)return[3,5];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,q.submitFeedback({rating:C.b3.BAD})];case 2:return r.sent(),nv(),[3,4];case 3:return e=r.sent(),null===(t=null===(n=null==eF?void 0:eF.logger)||void 0===n?void 0:n.error)||void 0===t||t.call(n,"Channel: Submit feedback failed.",e),e5(ex.FEEDBACK_FAILED_SUBMIT),[3,4];case 4:return[3,6];case 5:nv(!0),r.label=6;case 6:return[2]}})})},disabled:!!(null==q?void 0:q.myFeedback)&&q.myFeedback.rating!==C.b3.BAD},o.createElement(M.ZP,{type:M.Qy.FEEDBACK_DISLIKE,width:"24px",height:"24px"})))),nc&&!e8&&!eK&&o.createElement("div",{className:(0,d.c)("sendbird-message-content__right",ne,nt,na),"data-testid":"sendbird-message-content__right"},o.createElement("div",{className:(0,d.c)("sendbird-message-content-menu",ne,nr,e9)},nn&&ew({className:"sendbird-message-content-menu__reaction-menu",message:q,userId:Q,emojiContainer:el,toggleReaction:em,filterEmojiCategoryIds:eb}),eO({className:"sendbird-message-content-menu__normal-menu",channel:W,message:q,isByMe:e8,replyType:ei,showRemove:ec,resendMessage:eh,setQuoteMessage:ev,onReplyInThread:function(e){var n,t,r=e.message;ea===A.T.THREAD?null==ep||ep({message:r}):ea===A.T.PARENT&&(null==es||es(null!==(t=null===(n=r.parentMessage)||void 0===n?void 0:n.createdAt)&&void 0!==t?t:0,r.parentMessageId))},deleteMessage:ef}))),eZ&&(0,g.k)(q)&&W&&(void 0===eL?function(e){return o.createElement(N.nn,(0,a._)({},e))}:eL)({parentRef:eV,channel:W,hideMenu:function(){eQ(!1)},message:q,isReactionEnabled:nn,isByMe:e8,userId:Q,replyType:ei,disabled:void 0!==X&&X,showRemove:ec,emojiContainer:el,resendMessage:eh,deleteMessage:ef,setQuoteMessage:ev,toggleReaction:em,showEdit:eu,onReplyInThread:function(e){var n,t=e.message;ea===A.T.THREAD?null==ep||ep({message:t}):ea===A.T.PARENT&&(null==es||es((null===(n=null==t?void 0:t.parentMessage)||void 0===n?void 0:n.createdAt)||0,(null==t?void 0:t.parentMessageId)||0))},onDownloadClick:function(e){return(0,a.a)(Y,void 0,void 0,function(){var n,t,r;return(0,a.b)(this,function(i){switch(i.label){case 0:if(!eE)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,eE({message:q})];case 2:return i.sent()||(e.preventDefault(),null===(t=null==eB?void 0:eB.info)||void 0===t||t.call(eB,"MessageContent: Not allowed to download.")),[3,4];case 3:return n=i.sent(),null===(r=null==eB?void 0:eB.error)||void 0===r||r.call(eB,"MessageContent: Error occurred while determining download continuation:",n),[3,4];case 4:return[2]}})})}}),(null===(z=null==q?void 0:q.myFeedback)||void 0===z?void 0:z.rating)&&e0&&o.createElement(R.Z,{hideMenu:function(){e1(!1)},onEditFeedback:function(){e1(!1),e6(!0)},onRemoveFeedback:function(){return(0,a.a)(Y,void 0,void 0,function(){var e,n,t;return(0,a.b)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,3,,4]),!(null!==q.myFeedback))return[3,2];return[4,q.deleteFeedback(q.myFeedback.id)];case 1:r.sent(),r.label=2;case 2:return[3,4];case 3:return e=r.sent(),null===(t=null===(n=null==eF?void 0:eF.logger)||void 0===n?void 0:n.error)||void 0===t||t.call(n,"Channel: Delete feedback failed.",e),e5(ex.FEEDBACK_FAILED_DELET
13E),[3,4];case 4:return e1(!1),[2]}})})}}),(null===(K=null==q?void 0:q.myFeedback)||void 0===K?void 0:K.rating)&&e3&&o.createElement(w.Z,{selectedFeedback:q.myFeedback.rating,message:q,onUpdate:function(e,n){return(0,a.a)(Y,void 0,void 0,function(){var t,r,i,o;return(0,a.b)(this,function(a){switch(a.label){case 0:if(!(null!==q.myFeedback))return[3,4];t=new C.b2({id:q.myFeedback.id,rating:e,comment:n}),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,q.updateFeedback(t)];case 2:return a.sent(),[3,4];case 3:return r=a.sent(),null===(o=null===(i=null==eF?void 0:eF.logger)||void 0===i?void 0:i.error)||void 0===o||o.call(i,"Channel: Update feedback failed.",r),e5(ex.FEEDBACK_FAILED_SAVE),[3,4];case 4:return nm(),[2]}})})},onClose:nm,onRemove:function(){return(0,a.a)(Y,void 0,void 0,function(){var e,n,t;return(0,a.b)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,3,,4]),!(null!==q.myFeedback))return[3,2];return[4,q.deleteFeedback(q.myFeedback.id)];case 1:r.sent(),r.label=2;case 2:return[3,4];case 3:return e=r.sent(),null===(t=null===(n=null==eF?void 0:eF.logger)||void 0===n?void 0:n.error)||void 0===t||t.call(n,"Channel: Delete feedback failed.",e),e5(ex.FEEDBACK_FAILED_DELETE),[3,4];case 4:return nm(),[2]}})})}}),e7&&o.createElement(D.Z,{text:e7,onCancel:function(){e5("")}}))}t(72661),t(8978),t(91199),t(29515),t(73935),t(78614),t(71091),t(64393),t(4399),t(60090),t(30156),t(18087),t(69392),t(88569),t(34420),t(93122),t(56842),t(26748),t(70179),t(67412),t(10856),t(13462),t(22284),t(5701),t(76886),t(32080),t(23012),t(37111),t(34835),t(7593),t(2041),t(81823),t(40286),t(50206),t(12210),t(21790),t(74865),t(64228),t(6989),t(95988),t(71612),t(68962),t(32177),t(28464),t(48845),t(33709),t(49754),t(47057),t(34498),t(64437),t(16267),t(80385),(r=i||(i={})).NOT_APPLICABLE="NOT_APPLICABLE",r.NO_FEEDBACK="NO_FEEDBACK",r.SUBMITTED="SUBMITTED"},21402:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(67294),i=t(7585),a=t(69392),o=t(88569),l=t(1608),s=t(95988);function u(e){var n=e.text,t=e.onCancel,u=(0,r.useContext)(i.L).stringSet,c=(0,r.useRef)(null),d=(0,s.u)(c,{Enter:function(){return null==t?void 0:t()},Escape:function(){return null==t?void 0:t()}});return r.createElement("div",{onKeyDown:d},r.createElement(a.M,{contentClassName:"sendbird-message-feedback-modal-content__mobile",type:o.qh.PRIMARY,onSubmit:t,onClose:t,submitText:u.BUTTON__OK,renderHeader:function(){return r.createElement("div",{className:"sendbird-modal__header"},r.createElement(l.L,{type:l.a.H_1,color:l.b.ONBACKGROUND_1,className:"sendbird-message-feedback-modal-header"},n))},customFooter:r.createElement("div",{className:"sendbird-message-feedback-modal-footer__root_failed"},r.createElement(o.ZP,{onClick:t},r.createElement(l.L,{type:l.a.BUTTON_3,color:l.b.ONCONTENT_1},u.BUTTON__OK)))}))}t(12394),t(64393),t(49805),t(8978),t(73935),t(43847),t(29515),t(43822),t(34420),t(71091),t(93122),t(41238),t(69561),t(78614)},74062:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var r=t(67294),i=t(7585),a=t(69392),o=t(88569),l=t(80385),s=t(1608),u=t(43847),c=t(95988);function d(e){var n,t,d=e.selectedFeedback,h=e.message,f=e.onClose,m=e.onSubmit,v=e.onUpdate,p=e.onRemove,g=(0,r.useContext)(i.L).stringSet,_=(0,u.u)().isMobile,E=(null==h?void 0:h.myFeedback)&&d===h.myFeedback.rating,b=null===(n=null==h?void 0:h.myFeedback)||void 0===n?void 0:n.comment,C=function(){if(d){var e,n,t,r=null!==(n=null===(e=N.current)||void 0===e?void 0:e.value)&&void 0!==n?n:"";E?r!==(null===(t=h.myFeedback)||void 0===t?void 0:t.comment)?null==v||v(d,r):null==f||f():h.myFeedback||null==m||m(d,r)}},y=(0,r.useRef)(),N=(0,r.useRef)(),T=(0,c.u)(y,{Enter:function(){return C()},Escape:function(){return null==f?void 0:f()}});return r.createElement("div",{onKeyDown:T},r.createElement(a.M,{contentClassName:"sendbird-message-feedback-modal-content__mobile",type:o.qh.PRIMARY,onCancel:f,onSubmit:function(){C()},submitText:g.BUTTON__SUBMIT,renderHeader:function(){return r.createElement("div",{className:"sendbird-modal__header"},r.createElement(s.L,{type:s.a.H_1,color:s.b.ONBACKGROUND_1,className:"sendbird-message-feedback-modal-header"},g.FEEDBACK_MODAL_TITLE))},customFooter:r.createElement("div",{className:"sendbird-message-feedback-modal-footer__root"},!_&&(null==h?void 0:h.myFeedback)&&d===h.myFeedback.rating?r.createElement(o.ZP,{type:o.qh.WARNING,onClick:p,labelType:s.a.BUTTON_3},g.BUTTON__REMOVE_FEEDBACK):r.createElement("div",null),r.createElement("div",{className:"sendbird-message-feedback-modal-footer__right-content"},r.createElement(o.ZP,{type:o.qh.SECONDARY,onClick:f},r.createElement(s.L,{type:s.a.BUTTON_3,color:s.b.ONBACKGROUND_1},g.BUTTON__CANCEL)),r.createElement(o.ZP,{onClick:function(){return C()}},r.createElement(s.L,{type:s.a.BUTTON_3,color:s.b.ONCONTENT_1},b?g.BUTTON__SAVE:g.BUTTON__SUBMIT))))},r.createElement("div",{className:"sendbird-message-feedback-modal-body__root"},r.createElement(l.Z,{name:"sendbird-message-feedback-modal-body__root",ref:N,value:E?null===(t=h.myFeedback)||void 0===t?void 0:t.comment:void 0,placeHolder:g.FEEDBACK_CONTENT_PLACEHOLDER,autoFocus:!0}))))}t(12394),t(64393),t(49805),t(8978),t(73935),t(29515),t(43822),t(34420),t(71091),t(93122),t(41238),t(69561),t(78614)},65134:function(e,n,t){"use strict";t.d(n,{Z:function(){return S}});var r,i,a=t(12394),o=t(67294),l=t(58184),s=t(17061),u=t(29515),c=t(88569),d=t(76599),h=t(43822),f=t(1608),m=t(7585),v=t(41238),p=t(49805),g=t(2041),_=t(88006),E=t(36786);t(27856),t(64393),t(71091),t(8978),(r=i||(i={})).BASE="base",r.GROUP="group",r.OPEN="open";var b=function(e){var n=e.channel,t=e.config;return(0,p.K)(null==n?void 0:n.channelType).with(i.GROUP,function(){var e;return null===(e=null==t?void 0:t.groupChannel)||void 0===e?void 0:e.enableDocument}).with(i.OPEN,function(){var e;return null===(e=null==t?void 0:t.openChannel)||void 0===e?void 0:e.enableDocument}).otherwise(function(){return!0})},C=function(){return null},y=function(){var e,n=window.getSelection();if(n&&n.rangeCount>0){var t=n.getRangeAt(0).endContainer;if(t.nodeType===l.N.TextNode){var r=t.parentElement;null===(e=null==r?void 0:r.scrollIntoView)||void 0===e||e.call(r,{behavior:"smooth",block:"nearest"})}}},N=function(e){e&&e.current&&(e.current.innerHTML="")},T={targetString:"",startNodeIndex:null,startOffsetIndex:null,endNodeIndex:null,endOffsetIndex:null},S=o.forwardRef(function(e,n){var t,r,i,S,A,I=e.channel,M=e.className,O=void 0===M?"":M,R=e.messageFieldId,w=e.isEdit,D=void 0!==w&&w,L=e.isMobile,P=void 0!==L&&L,U=e.isMentionEnabled,x=void 0!==U&&U,k=e.isVoiceMessageEnabled,F=void 0===k||k,G=e.isSelectingMultipleFilesEnabled,B=e.disabled,H=void 0!==B&&B,V=e.message,j=void 0===V?null:V,z=e.placeholder,K=e.maxLength,Y=e.onFileUpload,Z=void 0===Y?C:Y,Q=e.onSendMessage,W=void 0===Q?C:Q,q=e.onUpdateMessage,X=void 0===q?C:q,$=e.onCancelEdit,J=e.onStartTyping,ee=void 0===J?C:J,en=e.channelUrl,et=e.mentionSelectedUser,er=void 0===et?null:et,ei=e.onUserMentioned,ea=void 0===ei?C:ei,eo=e.onMentionStringChange,el=void 0===eo?C:eo,es=e.onMentionedUserIdsUpdated,eu=void 0===es?C:es,ec=e.onVoiceMessageIconClick,ed=e.onKeyUp,eh=void 0===ed?C:ed,ef=e.onKeyDown,em=void 0===ef?C:ef,ev=e.renderFileUploadIcon,ep=void 0===ev?C:ev,eg=e.renderVoiceMessageIcon,e_=void 0===eg?C:eg,eE=e.renderSendMessageIcon,eb=void 0===eE?C:eE,eC=e.setMentionedUsers,ey=e.acceptableMimeTypes,eN=n&&"current"in n?n:(0,o.useRef)(null),eT=(0,o.useRef)(null),eS=(void 0===R?"":R)||"sendbird-message-input-text-field",eA=(0,m.u)().stringSet,eI=(0,v.A)(),eM=eI.config,eO=eI.eventHandlers,eR=b({channel:I,config:eM}),ew=(0,o.useRef)(),eD=(0,o.useState)(!1),eL=eD[0],eP=eD[1],eU=(0,o.useState)([]),ex=eU[0],ek=eU[1],eF=(0,o.useState)((0,a._)({},T)),eG=eF[0],eB=eF[1],eH=null==e?void 0:e.value;(0,o.useEffect)(function(){var e=null==eN?void 0:eN.current;ek([]),eP(null!=e&&!!e.textContent&&e.textContent.trim().length>0)},[eH]),(0,o.useEffect)(function(){D||(eP(!1),N(eN))},[void 0===en?"":en]),(0,o.useEffect)(function(){var e,n;if(D&&(null==j?void 0:j.messageId)){var t=null==eN?void 0:eN.current;if(x&&(null==j?void 0:j.mentionedUsers)&&j.mentionedUsers.length>0&&(null==j?void 0:j.mentionedMessageTemplate)&&j.mentionedMessageTemplate.length>0){var r=j.mentionedUsers,i=void 0===r?[]:r,a=(0,g.t)({messageText:null==j?void 0:j.mentionedMessageTemplate,mentionedUsers:i,includeMarkdown:I.isGroupChannel
13()&&eM.groupChannel.enableMarkdownForUserMessage});t&&(t.innerHTML=a.map(function(e){if(e.type===g.T.mention){var n=i.find(function(n){return n.userId===e.userId}),t="".concat(g.U).concat((null==n?void 0:n.nickname)||e.value||eA.MENTION_NAME__NO_NAME);return(0,d.r)({userId:e.userId,nickname:t})}return(0,d.s)(e.value)}).join(""))}else{try{t&&(t.innerHTML=null!==(e=(0,d.s)(null==j?void 0:j.message))&&void 0!==e?e:"")}catch(e){}ek([])}eP(null!=t&&!!t.textContent&&(null===(n=null==t?void 0:t.textContent)||void 0===n?void 0:n.trim().length)>0)}},[D,j]);var eV=(0,o.useCallback)(function(){var e,n=null==eN?void 0:eN.current;if(x&&n){var t=Array.from(n.getElementsByClassName("sendbird-mention-user-label")).map(function(e){var n;return null===(n=null==e?void 0:e.dataset)||void 0===n?void 0:n.userid});(0,p.G)(ex,t)&&0!==t.length||(eu(t),ek(t))}eP(null!=n&&!!n.textContent&&(null===(e=n.textContent)||void 0===e?void 0:e.trim().length)>0)},[eG,x]);(0,o.useEffect)(function(){var e,n,t,r;if(x&&er){var i=eG.targetString,o=eG.startNodeIndex,l=eG.startOffsetIndex,u=eG.endNodeIndex,c=eG.endOffsetIndex,h=null==eN?void 0:eN.current;if(i&&null!==o&&null!==l&&null!==c&&null!==u&&h){var f=(0,d.n)(null==h?void 0:h.childNodes),m=null!==(n=null===(e=f[o])||void 0===e?void 0:e.textContent)&&void 0!==n?n:"",v=document.createTextNode(m.slice(0,l)),p=null!==(r=null===(t=f[u])||void 0===t?void 0:t.textContent)&&void 0!==r?r:"",g=c&&document.createTextNode("\xa0".concat(p.slice(c))),_=(0,d.r)({userId:null==er?void 0:er.userId,nickname:"".concat(s.a).concat((null==er?void 0:er.nickname)||eA.MENTION_NAME__NO_NAME)}),E=document.createElement("div");E.innerHTML=_;var b=(0,a.c)((0,a.c)((0,a.c)([],f.slice(0,o),!0),[v,E.childNodes[0],g],!1),f.slice(u+1),!0);if(h&&(h.innerHTML="",b.forEach(function(e){e&&h.appendChild(e)})),ea(er),window.getSelection||document.getSelection){var C=window.getSelection()||document.getSelection();null==C||C.removeAllRanges();var y=new Range;y.selectNodeContents(h),y.setStart(h.childNodes[o+2],1),y.setEnd(h.childNodes[o+2],1),y.collapse(!1),null==C||C.addRange(y),h.focus()}eB((0,a._)({},T)),eV()}}},[er,x]);var ej=(0,o.useCallback)(function(){var e,n,t=(null===(e=null==window?void 0:window.getSelection)||void 0===e?void 0:e.call(window))||(null===(n=null==document?void 0:document.getSelection)||void 0===n?void 0:n.call(document)),r=null==eN?void 0:eN.current;if((null==t?void 0:t.anchorNode)===r&&el(""),x&&r&&t&&t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset)for(var i="",a=null,o=null,u=0;u<r.childNodes.length;u+=1){var c=function(e){var n=r.childNodes[e];if(n.nodeType===l.N.TextNode){var u,c=n===t.anchorNode?(null==n?void 0:n.textContent)?null==n?void 0:n.textContent.slice(0,t.anchorOffset):"":null!==(u=null==n?void 0:n.textContent)&&void 0!==u?u:"";if(i.length>0)i+=c;else{for(var d=c.lastIndexOf(s.a),h=d-1;h>-1;h-=1)if(c[h]===s.a)d=h;else break;d>-1&&(i=c,a=e,o=d)}}else i="",a=null,o=null;if(n===t.anchorNode){var f=i&&null!==o?i.slice(o):"";return eB({targetString:f,startNodeIndex:a,startOffsetIndex:o,endNodeIndex:e,endOffsetIndex:t.anchorOffset}),el(f),{value:void 0}}}(u);if("object"==typeof c)return c.value}},[x]),ez=function(){var e,n;try{var t=null==eN?void 0:eN.current;if(!D&&(null==t?void 0:t.textContent)){var r=(0,d.e)(t.childNodes),i=r.messageText,a=r.mentionTemplate;W({message:i,mentionTemplate:a}),N(eN),(0,E.i)(navigator.userAgent)?(eT.current&&eT.current.focus(),requestAnimationFrame(function(){return t.focus()})):t.focus(),eP(!1)}}catch(t){null===(n=null===(e=null==eO?void 0:eO.message)||void 0===e?void 0:e.onSendMessageFailed)||void 0===n||n.call(e,j,t)}},eK=!(null===(r=null===(t=null==eN?void 0:eN.current)||void 0===t?void 0:t.textContent)||void 0===r?void 0:r.trim()),eY=function(){var e,n;try{var t=null==eN?void 0:eN.current,r=null==j?void 0:j.messageId;if(D&&r&&t){var i=(0,d.e)(t.childNodes),a=i.messageText,o=i.mentionTemplate;X({messageId:r,message:a,mentionTemplate:o}),N(eN)}}catch(t){null===(n=null===(e=null==eO?void 0:eO.message)||void 0===e?void 0:e.onUpdateMessageFailed)||void 0===n||n.call(e,j,t)}},eZ=(0,d.u)({ref:eN,setMentionedUsers:void 0===eC?C:eC,channel:I,setIsInput:eP}),eQ=function(e){var n,t,r=e.currentTarget.files;try{r&&Z(Array.from(r))}catch(e){null===(t=null===(n=null==eO?void 0:eO.message)||void 0===n?void 0:n.onFileUploadFailed)||void 0===t||t.call(n,e)}finally{e.target.value=""}},eW=function(e){return y(),function(n){return e(n)}};return o.createElement("form",{className:_.c.apply(void 0,(0,a.c)((0,a.c)([],Array.isArray(O)?O:[O],!1),[D&&"sendbird-message-input__edit",H&&"sendbird-message-input-form__disabled"],!1))},o.createElement("div",{className:(0,_.c)("sendbird-message-input",H&&"sendbird-message-input__disabled"),"data-testid":"sendbird-message-input"},(0,E.i)(navigator.userAgent)&&o.createElement("input",{id:"ghost-input-reset-ime-cjk",ref:eT,style:{opacity:0,padding:0,margin:0,height:0,border:"none",position:"absolute",top:-9999},defaultValue:"_"}),o.createElement("div",{id:"".concat(eS).concat(D?null==j?void 0:j.messageId:""),className:"sendbird-message-input--textarea ".concat(eS),contentEditable:!H,role:"textbox","aria-label":"Text Input",ref:eN,disabled:H,maxLength:void 0===K?5e3:K,onKeyDown:eW(function(e){var n,t,r,i;em(e)?e.preventDefault():(!e.shiftKey&&e.key===l.M.Enter&&!P&&(null===(n=null==eN?void 0:eN.current)||void 0===n?void 0:n.textContent)&&eN.current.textContent.trim().length>0&&(null===(t=null==e?void 0:e.nativeEvent)||void 0===t?void 0:t.isComposing)!==!0&&(e.preventDefault(),ez()),e.key!==l.M.Backspace||(null===(i=null===(r=null==eN?void 0:eN.current)||void 0===r?void 0:r.childNodes)||void 0===i?void 0:i.length)!==2||eN.current.childNodes[0].textContent||eN.current.childNodes[1].nodeType!==l.N.ElementNode||eN.current.removeChild(eN.current.childNodes[1]))}),onKeyUp:eW(function(e){eh(e)?e.preventDefault():ej()}),onClick:eW(function(){ej()}),onInput:eW(function(){var e;ee(),eP(null!==(e=null==eN?void 0:eN.current)&&void 0!==e&&!!e.textContent&&eN.current.textContent.trim().length>0),eV()}),onPaste:eW(eZ)}),(null!==(A=null===(S=null===(i=null==eN?void 0:eN.current)||void 0===i?void 0:i.textContent)||void 0===S?void 0:S.length)&&void 0!==A?A:0)===0&&o.createElement(f.L,{className:"sendbird-message-input--placeholder",type:f.a.BODY_1,color:H?f.b.ONBACKGROUND_4:f.b.ONBACKGROUND_3},(void 0===z?"":z)||eA.MESSAGE_INPUT__PLACE_HOLDER),!D&&eL&&o.createElement(u.Z,{className:"sendbird-message-input--send",height:"32px",width:"32px",onClick:function(){return ez()},testID:"sendbird-message-input-send-button"},(null==eb?void 0:eb())||o.createElement(h.ZP,{type:h.Qy.SEND,fillColor:H?h.zo.ON_BACKGROUND_4:h.zo.PRIMARY,width:"20px",height:"20px"})),!D&&!eL&&((null==ep?void 0:ep())||eR&&o.createElement(u.Z,{className:(0,_.c)("sendbird-message-input--attach",F&&"is-voice-message-enabled"),height:"32px",width:"32px",onClick:function(){var e,n;
13null===(n=null===(e=null==ew?void 0:ew.current)||void 0===e?void 0:e.click)||void 0===n||n.call(e)}},o.createElement(h.ZP,{type:h.Qy.ATTACH,fillColor:H?h.zo.ON_BACKGROUND_4:h.zo.CONTENT_INVERSE,width:"20px",height:"20px"}),o.createElement("input",{className:"sendbird-message-input--attach-input",type:"file",ref:ew,onChange:function(e){return eQ(e)},accept:(0,p.H)(ey),multiple:void 0!==G&&G&&(0,d.i)(I)}))),F&&!D&&!eL&&o.createElement(u.Z,{className:"sendbird-message-input--voice-message",width:"32px",height:"32px",onClick:void 0===ec?C:ec},(null==e_?void 0:e_())||o.createElement(h.ZP,{type:h.Qy.AUDIO_ON_LINED,fillColor:H?h.zo.ON_BACKGROUND_4:h.zo.CONTENT_INVERSE,width:"20px",height:"20px"}))),D&&o.createElement("div",{className:"sendbird-message-input--edit-action","data-testid":"sendbird-message-input--edit-action"},o.createElement(c.ZP,{className:"sendbird-message-input--edit-action__cancel",type:c.qh.SECONDARY,size:c.Ph.SMALL,onClick:void 0===$?C:$},eA.BUTTON__CANCEL),o.createElement(c.ZP,{className:"sendbird-message-input--edit-action__save",type:c.qh.PRIMARY,size:c.Ph.SMALL,disabled:eK,onClick:function(){return eY()}},eA.BUTTON__SAVE)))})},69139:function(e,n,t){"use strict";t.d(n,{j:function(){return c}});var r=t(67294),i=t(69561),a=t(43822),o=t(29515),l=t(4399),s=t(60090),u=t(49805);function c(e){var n=e.className,t=e.message,c=e.userId,d=e.spaceFromTrigger,h=void 0===d?{x:0,y:0}:d,f=e.emojiContainer,m=e.filterEmojiCategoryIds,v=e.toggleReaction,p=(0,r.useRef)(null),g=(0,r.useRef)(null),_=(0,r.useMemo)(function(){return(0,u.u)(f,null==m?void 0:m(t))},[f,m]);return(0,u.v)(t)||(0,u.w)(t)?null:r.createElement("div",{className:(0,u.x)([null!=n?n:"","sendbird-message-item-reaction-menu"]),ref:g},r.createElement(i.C,{menuTrigger:function(e){return r.createElement(o.Z,{className:"sendbird-message-item-reaction-menu__trigger",ref:p,width:"32px",height:"32px",onClick:function(){e()}},r.createElement(a.ZP,{className:"sendbird-message-item-reaction-menu__trigger__icon",testID:"sendbird-message-item-reaction-menu__trigger__icon",type:a.Qy.EMOJI_MORE,fillColor:a.zo.CONTENT_INVERSE,width:"24px",height:"24px"}))},menuItems:function(e){return 0===_.length?null:r.createElement(i.f,{id:(0,i.g)(t.messageId),parentRef:p,parentContainRef:g,closeDropdown:e,spaceFromTrigger:h},_.map(function(n){var i,o,u,d=(null===(u=null===(o=null===(i=null==t?void 0:t.reactions)||void 0===i?void 0:i.find(function(e){return e.key===n.key}))||void 0===o?void 0:o.userIds)||void 0===u?void 0:u.some(function(e){return e===c}))||!1;return r.createElement(s.Z,{key:n.key,width:"36px",height:"36px",selected:d,onClick:function(){e(),null==v||v(t,n.key,d)},testID:"ui_emoji_reactions_menu_".concat(n.key)},r.createElement(l.ZP,{url:n.url,width:"28px",height:"28px",placeHolder:function(e){var n=e.style;return r.createElement("div",{style:n},r.createElement(a.ZP,{type:a.Qy.QUESTION,fillColor:a.zo.ON_BACKGROUND_3,width:"28px",height:"28px"}))}}))}))}}))}t(12394),t(73935),t(78614),t(71091),t(7585),t(64393),t(1608),t(67315),t(43847),t(8978)},45143:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(67294),i=t(18087),a=t(1608),o=t(7585);function l(e){var n=e.hideMenu,t=e.onEditFeedback,l=e.onRemoveFeedback,s=(0,o.u)().stringSet;return r.createElement(i.Z,{onBackdropClick:n},r.createElement("div",{className:"sendbird-message__bottomsheet--feedback-options-menu"},r.createElement("div",{className:"sendbird-message__bottomsheet--feedback-option",onClick:function(){n(),t()}},r.createElement(a.L,{type:a.a.BODY_1,color:a.b.ONBACKGROUND_1},s.EDIT_COMMENT)),r.createElement("div",{className:"sendbird-message__bottomsheet--feedback-option",onClick:function(){n(),l()}},r.createElement(a.L,{type:a.a.BODY_1,color:a.b.ERROR},s.REMOVE_FEEDBACK))))}
13t(73935),t(69392),t(12394),t(49805),t(8978),t(43847),t(29515),t(88569),t(43822),t(34420),t(71091),t(93122),t(41238),t(69561),t(78614),t(64393)},56342:function(e,n,t){"use strict";t.d(n,{nn:function(){return w}});var r=t(12394),i=t(67294),a=t(49805),o=t(88006),l=t(41238),s=t(69561);t(29515);var u=t(7585),c=t(1608),d=t(43822),h=t(18087),f=t(4399),m=t(60090);t(8978),t(71091),t(73935),t(78614),t(64393),t(69392),t(43847),t(88569),t(34420),t(93122),t(67315);var v=function(e){var n,t=(0,u.u)().stringSet,o=(0,s.u)(),l=o.message,h=o.hideMenu;return i.createElement(s.a,(0,r._)({},e,{onClick:function(n){var t;(0,a.l)(l)&&(0,a.A)(l.message),h(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__COPY),i.createElement(d.ZP,{type:d.Qy.COPY,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"})))},p=function(e){var n,t,a,o=(0,u.u)().stringSet,l=(0,s.u)(),h=l.message,f=l.hideMenu,m=l.setQuoteMessage;return i.createElement(s.a,(0,r._)({},e,{disabled:h.parentMessageId>0,onClick:function(n){var t;m(h),f(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(c.L,{type:c.a.SUBTITLE_1,color:(null!==(t=h.parentMessageId)&&void 0!==t?t:0)>0?c.b.ONBACKGROUND_4:c.b.ONBACKGROUND_1},o.MESSAGE_MENU__REPLY),i.createElement(d.ZP,{type:d.Qy.REPLY,fillColor:(null!==(a=h.parentMessageId)&&void 0!==a?a:0)>0?d.zo.ON_BACKGROUND_4:d.zo.PRIMARY,width:"24px",height:"24px"})))},g=function(e){var n,t=(0,u.u)().stringSet,a=(0,s.u)(),o=a.message,l=a.hideMenu,h=a.onReplyInThread;return i.createElement(s.a,(0,r._)({},e,{onClick:function(n){var t;h({message:o}),l(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__THREAD),i.createElement(d.ZP,{type:d.Qy.THREAD,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"})))},_=function(e){var n,t=(0,u.u)().stringSet,a=(0,s.u)(),o=a.hideMenu,l=a.showEdit,h=a.isOnline;return i.createElement(s.a,(0,r._)({},e,{onClick:function(n){var t;h&&(l(!0),o(),null===(t=e.onClick)||void 0===t||t.call(e,n))}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__EDIT),i.createElement(d.ZP,{type:d.Qy.EDIT,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"})))},E=function(e){var n,t=(0,u.u)().stringSet,a=(0,s.u)(),o=a.message,l=a.hideMenu,h=a.resendMessage,f=a.isOnline;return i.createElement(s.a,(0,r._)({},e,{onClick:function(n){var t;f&&(h(o),l(),null===(t=e.onClick)||void 0===t||t.call(e,n))}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__RESEND),i.createElement(d.ZP,{type:d.Qy.REFRESH,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"})))},b=function(e){var n,t,o,l=(0,u.u)().stringSet,h=(0,s.u)(),f=h.message,m=h.hideMenu,v=h.deleteMessage,p=h.showRemove,g=h.isOnline,_=h.disableDeleteMessage;return i.createElement(s.a,(0,r._)({},e,{disabled:"boolean"==typeof _?_:(null!==(t=null===(n=f.threadInfo)||void 0===n?void 0:n.replyCount)&&void 0!==t?t:0)>0,onClick:function(n){var t;(0,a.w)(f)?v(f):g&&(p(!0),m(),null===(t=e.onClick)||void 0===t||t.call(e,n))}}),null!==(o=e.children)&&void 0!==o?o:i.createElement(i.Fragment,null,i.createElement(c.L,{type:c.a.SUBTITLE_1,color:_?c.b.ONBACKGROUND_4:c.b.ONBACKGROUND_1},l.MESSAGE_MENU__DELETE),i.createElement(d.ZP,{type:d.Qy.DELETE,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"})))},C=function(e){var n,t=(0,u.u)().stringSet,a=(0,s.u)(),o=a.hideMenu,l=a.message,h=a.onDownloadClick,f=l.url;return i.createElement(s.a,(0,r._)({},e,{onClick:function(){o()}}),null!==(n=e.children)&&void 0!==n?n:i.createElement("a",{className:"sendbird-message__contextmenu--hyperlink",rel:"noopener noreferrer",href:f,target:"_blank",onClick:h},i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__SAVE),i.createElement(d.ZP,{type:d.Qy.DOWNLOAD,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"})))},y=function(e){var n,t,r,u,c=e.channel,d=e.message,h=e.replyType,f=e.userId,m=e.resendMessage,y=e.showEdit,N=e.showRemove,T=e.deleteMenuState,S=e.deleteMessage,A=e.setQuoteMessage,I=e.parentRef,M=e.onReplyInThread,O
13=e.isOpenedFromThread,R=e.onDownloadClick,w=e.renderMenuItems,D=e.hideMenu,L=(null===(n=null==d?void 0:d.sender)||void 0===n?void 0:n.userId)===f,P=(0,l.A)().config.isOnline,U=(0,a.l)(d),x=(0,a.l)(d)&&(0,a.q)(d)&&L,k=(0,a.w)(d)&&(null==d?void 0:d.isResendable)&&L,F=!(0,a.v)(d)&&L,G=!(0,a.v)(d)&&(0,a.b)(d)&&!((0,a.i)(d)&&(null==c?void 0:c.isSuper)||(null==c?void 0:c.isBroadcast)),B="QUOTE_REPLY"===h&&!(0,a.w)(d)&&!(0,a.v)(d)&&(null==c?void 0:c.isGroupChannel()),H="THREAD"===h&&!(void 0!==O&&O)&&!(0,a.w)(d)&&!(0,a.v)(d)&&!(0,a.R)(d)&&(null==c?void 0:c.isGroupChannel()),V=void 0!==T&&"DISABLE"===T||(null!==(r=null===(t=null==d?void 0:d.threadInfo)||void 0===t?void 0:t.replyCount)&&void 0!==r?r:0)>0,j={message:d,hideMenu:D,setQuoteMessage:A,onReplyInThread:M,onMoveToParentMessage:o.n,showEdit:y,showRemove:N,deleteMessage:S,resendMessage:m,isOnline:P,disableDeleteMessage:V,triggerRef:I,containerRef:I,onDownloadClick:void 0===R?null:R};return i.createElement(s.M,{value:j},i.createElement(s.b,{className:"sendbird-message__mobile-context-menu",parentRef:I,parentContainRef:I,closeDropdown:D},null!==(u=null==w?void 0:w({items:{CopyMenuItem:v,ReplyMenuItem:p,ThreadMenuItem:g,EditMenuItem:_,ResendMenuItem:E,DeleteMenuItem:b}}))&&void 0!==u?u:i.createElement(i.Fragment,null,U&&i.createElement(v,null),B&&i.createElement(p,null),H&&i.createElement(g,null),x&&i.createElement(_,null),k&&i.createElement(E,null),L&&(void 0===T||"HIDE"!==T)&&F&&i.createElement(b,null),G&&i.createElement(C,null))))},N=function(e){var n,t=(0,u.u)().stringSet,o=(0,s.u)(),l=o.message,h=o.hideMenu;return i.createElement(s.B,(0,r._)({},e,{onClick:function(n){var t;(0,a.l)(l)&&(0,a.A)(l.message),h(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(d.ZP,{type:d.Qy.COPY,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"}),i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__COPY)))},T=function(e){var n,t=(0,u.u)().stringSet,a=(0,s.u)(),o=a.hideMenu,l=a.showEdit,h=a.isOnline;return i.createElement(s.B,(0,r._)({},e,{onClick:function(n){var t;h&&(l(!0),o(),null===(t=e.onClick)||void 0===t||t.call(e,n))}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(d.ZP,{type:d.Qy.EDIT,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"}),i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__EDIT)))},S=function(e){var n,t=(0,u.u)().stringSet,a=(0,s.u)(),o=a.message,l=a.hideMenu,h=a.resendMessage,f=a.isOnline;return i.createElement(s.B,(0,r._)({},e,{onClick:function(n){var t;f&&(h(o),l(),null===(t=e.onClick)||void 0===t||t.call(e,n))}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(d.ZP,{type:d.Qy.REFRESH,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"}),i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__RESEND)))},A=function(e){var n,t,a,o=(0,u.u)().stringSet,l=(0,s.u)(),h=l.message,f=l.hideMenu,m=l.setQuoteMessage;return i.createElement(s.B,(0,r._)({},e,{disabled:h.parentMessageId>0,onClick:function(n){var t;m(h),f(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(d.ZP,{type:d.Qy.REPLY,fillColor:(null!==(t=h.parentMessageId)&&void 0!==t?t:0)>0?d.zo.ON_BACKGROUND_3:d.zo.PRIMARY,width:"24px",height:"24px"}),i.createElement(c.L,{type:c.a.SUBTITLE_1,color:(null!==(a=h.parentMessageId)&&void 0!==a?a:0)>0?c.b.ONBACKGROUND_4:c.b.ONBACKGROUND_1},o.MESSAGE_MENU__REPLY)))},I=function(e){var n,t=(0,u.u)().stringSet,a=(0,s.u)(),o=a.message,l=a.hideMenu,h=a.onReplyInThread;return i.createElement(s.B,(0,r._)({},e,{onClick:function(n){var t;h({message:o}),l(),null===(t=e.onClick)||void 0===t||t.call(e,n)}}),null!==(n=e.children)&&void 0!==n?n:i.createElement(i.Fragment,null,i.createElement(d.ZP,{type:d.Qy.THREAD,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"}),i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__THREAD)))},M=function(e){var n,t,o,l=(0,u.u)().stringSet,h=(0,s.u)(),f=h.message,m=h.hideMenu,v=h.deleteMessage,p=h.showRemove,g=h.isOnline,_=h.disableDeleteMessage;return i.createElement(s.B,(0,r._)({},e,{disabled:"boolean"==typeof _?_:(null!==(t=null===(n=f.threadInfo)||void 0===n?void 0:n.replyCount)&&void 0!==t?t:0)>0,onClick:function(n){var t;(0,a.w)(f)?v(f):g&&(p(!0),m(),null===(t=e.onClick)||void 0===t||t.call(e,n))}}),null!==(o=e.children)&&void 0!==o?o:i.createElement(i.Fragment,null,i.createElement(d.ZP,{type:d.Qy.DELETE,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"}),i.createElement(c.L,{type:c.a.SUBTITLE_1,color:_?c.b.ONBACKGROUND_4:c.b.ONBACKGROUND_1},l.MESSAGE_MENU__DELETE)))},O=function(e){var n,t=(0,u.u)().stringSet,r=(0,s.u)(),a=r.hideMenu,o=r.message,l=r.onDownloadClick,h=o.url;return i.createElement(s.B,{onClick:function(){return a()}},null!==(n=e.children)&&void 0!==n?n:i.createElement("a",{className:"sendbird-message__bottomsheet--hyperlink",rel:"noopener noreferrer",href:h,target:"_blank",onClick:l},i.createElement(d.ZP,{type:d.Qy.DOWNLOAD,fillColor:d.zo.PRIMARY,width:"24px",height:"24px"}),i.createElement(c.L,{type:c.a.SUBTITLE_1,color:c.b.ONBACKGROUND_1},t.MESSAGE_MENU__SAVE)))},R=function(e){var n,t,r,u,c=e.hideMenu,v=e.channel,p=e.emojiContainer,g=e.message,_=e.replyType,E=e.userId,b=e.resendMessage,C=e.deleteMessage,y=e.toggleReaction,R=e.isReactionEnabled,w=e.showEdit,D=e.showRemove,L=e.deleteMenuState,P=e.setQuoteMessage,U=e.onReplyInThread,x=e.isOpenedFromThread,k=e.onDownloadClick,F=e.renderMenuItems,G=(null===(n=null==g?void 0:g.sender)||void 0===n?void 0:n.userId)===E,B=(0,l.A)().config.isOnline,H=(0,a.l)(g),V=(0,a.l)(g)&&(0,a.q)(g)&&G,j=B&&(0,a.w)(g)&&(null==g?void 0:g.isResendable)&&G,z=!(0,a.v)(g)&&G,K=void 0!==L&&"DISABLE"===L||(null!==(r=null===(t=null==g?void 0:g.threadInfo)||void 0===t?void 0:t.replyCount)&&void 0!==r?r:0)>0,Y=(0,a.q)(g)&&(0,a.b)(g)&&!(0,a.i)(g),Z=!(0,a.w)(g)&&!(0,a.v)(g)&&void 0!==R&&R,Q="QUOTE_REPLY"===_&&!(0,a.w)(g)&&!(0,a.v)(g)&&(null==v?void 0:v.isGroupChannel
13())&&!(null==v?void 0:v.isBroadcast),W="THREAD"===_&&!(void 0!==x&&x)&&!(0,a.w)(g)&&!(0,a.v)(g)&&!(0,a.R)(g)&&(null==v?void 0:v.isGroupChannel())&&!(null==v?void 0:v.isBroadcast),q=Math.floor(window.innerWidth/38)-1,X=(0,i.useState)(!1),$=X[0],J=X[1],ee=p&&(0,a.T)(p),en=$?ee:null==ee?void 0:ee.slice(0,q),et=ee&&ee.length>q;return i.createElement(s.M,{value:{message:g,hideMenu:c,setQuoteMessage:P,onReplyInThread:U,onMoveToParentMessage:function(){},showEdit:w,showRemove:D,deleteMessage:C,resendMessage:b,isOnline:B,disableDeleteMessage:K,triggerRef:null,containerRef:null,onDownloadClick:k}},i.createElement(h.Z,{onBackdropClick:c},i.createElement("div",{className:"sendbird-message__bottomsheet"},Z&&i.createElement("div",{className:"sendbird-message__bottomsheet-reactions"},i.createElement("ul",{className:"sendbird-message__bottomsheet-reaction-bar"},i.createElement("div",{className:(0,o.c)("sendbird-message__bottomsheet-reaction-bar__row",$&&"sendbird-message__bottomsheet-reaction-bar__all")},en.map(function(e){var n,t,r,a=null===(r=null===(t=null===(n=null==g?void 0:g.reactions)||void 0===n?void 0:n.filter(function(n){return n.key===e.key})[0])||void 0===t?void 0:t.userIds)||void 0===r?void 0:r.some(function(e){return e===E});return i.createElement(m.Z,{key:e.key,width:"".concat(38,"px"),height:"".concat(38,"px"),selected:a,onClick:function(){c(),null==y||y(g,e.key,a)},testID:"ui_mobile_emoji_reactions_menu_".concat(e.key)},i.createElement(f.ZP,{url:(null==e?void 0:e.url)||"",width:"28px",height:"28px",placeHolder:function(e){var n=e.style;return i.createElement("div",{style:n},i.createElement(d.ZP,{type:d.Qy.QUESTION,fillColor:d.zo.ON_BACKGROUND_3,width:"28px",height:"28px"}))}}))}),et&&!$&&i.createElement(m.Z,{key:"emoji_more",width:"38px",height:"38px",onClick:function(){return J(!0)},testID:"ui_mobile_emoji_reactions_menu_emojiadd"},i.createElement(f.ZP,{url:"",width:"28px",height:"28px",placeHolder:function(e){var n=e.style;return i.createElement("div",{style:n},i.createElement(d.ZP,{type:d.Qy.EMOJI_MORE,fillColor:d.zo.ON_BACKGROUND_3,width:"28px",height:"28px"}))}}))))),!$&&i.createElement("div",{className:"sendbird-message__bottomsheet--actions"},null!==(u=null==F?void 0:F({items:{CopyMenuItem:N,EditMenuItem:T,ResendMenuItem:S,ReplyMenuItem:A,ThreadMenuItem:I,DeleteMenuItem:M}}))&&void 0!==u?u:i.createElement(i.Fragment,null,H&&i.createElement(N,null),V&&i.createElement(T,null),j&&i.createElement(S,null),Q&&i.createElement(A,null),W&&i.createElement(I,null),G&&(void 0===L||"HIDE"!==L)&&z&&i.createElement(M,null),Y&&i.createElement(O,null))))))},w=function(e){return i.createElement(i.Fragment,null,(null==e?void 0:e.isReactionEnabled)?i.createElement(R,(0,r._)({},e)):i.createElement(y,(0,r._)({},e)))}},85335:function(e,n,t){"use strict";t.d(n,{ZP:function(){return r.M},mz:function(){return r.c}}),t(12394),t(67294),t(73935);var r=t(69392);t(7585),t(43847),t(29515),t(88569),t(43822),t(1608),t(34420),t(71091),t(49805),t(93122),t(69561),t(41238),t(64393),t(8978),t(78614)},67412:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var r=t(67294),i=t(43822);function a(e){var n=e.height,t=void 0===n?24:n,a=e.width,o=void 0===a?24:a;return r.createElement("div",{className:"sendbird-muted-avatar",style:{height:"".concat(t,"px"),width:"".concat(o,"px")}},r.createElement("div",{className:"sendbird-muted-avatar__icon"},r.createElement("div",{className:"sendbird-muted-avatar__bg",style:{height:"".concat(t,"px"),width:"".concat(o,"px")}}),r.createElement(i.ZP,{type:i.Qy.MUTE,fillColor:i.zo.WHITE,width:"".concat(t-8,"px"),height:"".concat(o-8,"px")})))}t(12394)},34835:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var r=t(67294),i=t(4399),a=t(43822),o=t(1608),l=t(49805),s=t(7585),u=t(7593),c=t(2041),d=t(56465),h=t(43847),f=t(88006);function m(e){var n,t,i,a,h=e.className,m=e.message,g=e.isByMe,_=void 0!==g&&g,E=e.mouseHover,b=e.isMentionEnabled,C=e.isReactionEnabled,y=e.isMarkdownEnabled,N=void 0!==y&&y,T=e.onMessageHeightChange,S=void 0===T?function(){}:T,A=(0,r.useContext)(s.L).stringSet,I=void 0!==b&&b&&(null===(n=null==m?void 0:m.mentionedMessageTemplate)||void 0===n?void 0:n.length)>0&&(null==m?void 0:m.mentionedUsers)&&(null===(t=null==m?void 0:m.mentionedUsers)||void 0===t?void 0:t.length)>0,M=(0,r.useMemo)(function(){var e;return I?(0,c.t)({mentionedUsers:null!==(e=null==m?void 0:m.mentionedUsers)&&void 0!==e?e:void 0,messageText:null==m?void 0:m.mentionedMessageTemplate,includeMarkdown:N}):(0,c.t)({messageText:null==m?void 0:m.message,includeMarkdown:N})},[null==m?void 0:m.updatedAt,null==m?void 0:m.message]),O=function(){var e;return(0,f.o)(null===(e=null==m?void 0:m.ogMetaData)||void 0===e?void 0:e.url)};return r.createElement("div",{className:(0,l.x)([null!=h?h:"","sendbird-og-message-item-body",_?"outgoing":"incoming",void 0!==E&&E?"mouse-hover":"",void 0!==C&&C&&(null===(i=null==m?void 0:m.reactions)||void 0===i?void 0:i.length)>0?"reactions":""])},r.createElement(o.L,{type:o.a.BODY_1,color:_?o.b.ONCONTENT_1:o.b.ONBACKGROUND_1},r.createElement("div",{className:d.O},r.createElement(u.T,{tokens:M}),(0,l.d)(m)&&r.createElement(o.L,{className:"sendbird-og-message-item-body__text-bubble__message",type:o.a.BODY_1,color:_?o.b.ONCONTENT_2:o.b.ONBACKGROUND_2}," ".concat(A.MESSAGE_EDITED," ")))),(null===(a=m.ogMetaData)||void 0===a?void 0:a.defaultImage)&&r.createElement(v,{onClick:O,ogImage:m.ogMetaData.defaultImage,onMessageHeightChange:S}),m.ogMetaData&&r.createElement(p,{onClick:O,ogMetaData:m.ogMetaData,onMessageHeightChange:S}),r.createElement("div",{className:"sendbird-og-message-item-body__cover"}))}t(12394),t(64393),t(8978),t(23012),t(81823),t(69561),t(73935),t(78614),t(71091),t(29515),t(13462),t(26748),t(34420),t(69392),t(88569),t(93122),t(41238),t(22284),t(5701),t(70179),t(40286);var v=function(e){var n=e.onClick,t=e.ogImage,o=e.onMessageHeightChange,l=(0,r.useRef)(null),s=(0,h.u)().isMobile;return r.createElement("div",{ref:l,className:(0,f.c)("sendbird-og-message-item-body__og-thumbnail",!t.url&&"sendbird-og-message-item-body__og-thumbnail__empty"),onClick:function(){return n()}},r.createElement(i.ZP,{className:"sendbird-og-message-item-body__og-thumbnail__image",url:t.url||"",alt:t.alt||"",width:"100%",height:s?"136px":"240px",onLoad:o,onError:function(){var e,n;try{null===(n=null===(e=null==l?void 0:l.current)||void 0===e?void 0:e.classList)||void 0===n||n.add("sendbird-og-message-item-body__og-thumbnail__empty")}catch(e){}},defaultComponent:r.createElement("div",{className:"sendbird-og-message-item-body__og-thumbnail__place-holder"},r.createElement(a.ZP,{className:"sendbird-og-message-item-body__og-thumbnail__place-holder__icon",type:a.Qy.THUMBNAIL_NONE,width:"56px",height:"56px"}))}))},p=function(e){var n=e.onClick,t=e.ogMetaData,i=e.onMessageHeightChange;return(0,r.useEffect)(function(){i()},[t.title,t.description,t.url]),r.createElement("div",{className:"sendbird-og-message-item-body__description",onClick:function(){return n()}},t.title&&r.createElement(o.L,{className:"sendbird-og-message-item-body__description__title",type:o.a.SUBTITLE_2,color:o.b.ONBACKGROUND_1},t.title),t.description&&r.createElement(o.L,{className:"sendbird-og-message-item-body__description__description",type:o.a.BODY_2,color:o.b.ONBACKGROUND_1},t.description),t.url&&r.createElement(o.L,{className:"sendbird-og-message-item-body__description__url",type:o.a.CAPTION_3,color:o.b.ONBACKGROUND_2},t.url))}},10364:function(e,n,t){"use strict";t.d(n,{Z:function(){return c},v:function(){return u}});var r=t(12394),i=t(67294),a=t(7585),o=t(43822),l=t(1608),s=t(72661);t(64393);var u={LOADING:"LOADING",NO_CHANNELS:"NO_CHANNELS",NO_MESSAGES:"NO_MESSAGES",WRONG:"WRONG",SEARCH_IN:"SEARCH_IN",SEARCHING:"SEARCHING",NO_RESULTS:"NO_RESULTS"};function c(e){var n=e.className,t=void 0===n?"":n,c=e.type,d=e.iconSize,h=e.searchInString,f=e.retryToConnect,m=(0,i.useContext)(a.L).stringSet;return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!0),["sendbird-place-holder"],!1).join(" ")},c===u.LOADING&&i.createElement(s.Z,{width:d||"48px",height:d||"48px"},i.createElement(o.ZP,{type:o.Qy.SPINNER,fillColor:o.zo.PRIMARY,width:d||"48px",height:d||"48px"})),(c===u.NO_CHANNELS||c===u.NO_MESSAGES||c===u.WRONG)&&i.createElement("div",{className:"sendbird-place-holder__body"},c===u.NO_CHANNELS&&i.createElement(o.ZP,{className:"sendbird-place-holder__body__icon",type:o.Qy.CHAT,fillColor:o.zo.ON_BACKGROUND_3,width:d||"64px",height:d||"64px"}),c===u.WRONG&&i.createElement(o.ZP,{className:"sendbird-place-holder__body__icon",type:o.Qy.ERROR,fillColor:o.zo.ON_BACKGROUND_3,width:d||"64px",height:d||"64px"}),c===u.NO_MESSAGES&&i.createElement(o.ZP,{className:"sendbird-place-holder__body__icon",type:o.Qy.MESSAGE,fillColor:o.zo.ON_BACKGROUND_3,width:d||"64px",height:d||"64px"}),i.createElement(l.L,{className:"sendbird-place-holder__body__text",type:l.a.BODY_1,color:l.b.ONBACKGROUND_2},c===u.NO_CHANNELS&&m.PLACE_HOLDER__NO_CHANNEL,c===u.WRONG&&m.PLACE_HOLDER__WRONG,c===u.NO_MESSAGES&&m.PLACE_HOLDER__NO_MESSAGES),f&&i.createElement("div",{className:"sendbird-place-holder__body__reconnect",role:"button",onClick:f,onKeyPress:f,tabIndex:0},i.createElement(o.ZP,{className:"sendbird-place-holder__body__reconnect__icon",type:o.Qy.REFRESH,fillColor:o.zo.PRIMARY,width:"20px",height:"20px"}),i.createElement(l.L,{className:"sendbird-place-holder__body__reconnect__text",type:l.a.BUTTON_1,color:l.b.PRIMARY},m.PLACE_HOLDER__RETRY_TO_CONNECT))),(c===u.NO_RESULTS||c===u.SEARCH_IN||c===u.SEARCHING)&&i.createElement("div",{className:"sendbird-place-holder__body--align-top"},c===u.SEARCH_IN&&i.createElement("div",{className:"sendbird-place-holder__body--align-top__text"},i.createElement(l.L,{className:"sendbird-place-holder__body--align-top__text__search-in",type:l.a.BUTTON_2,color:l.b.ONBACKGROUND_2},m.SEARCH_IN),i.createElement(l.L,{className:"sendbird-place-holder__body--align-top__text__channel-name",type:l.a.BUTTON_2,color:l.b.PRIMARY},"'".concat(void 0===h?"":h)),i.createElement(l.L,{className:"sendbird-place-holder__body--align-top__text__quote",type:l.a.BUTTON_2,color:l.b.PRIMARY},"'")),c===u.SEARCHING&&i.createElement(l.L,{className:"sendbird-place-hlder__body--align-top__searching",type:l.a.BODY_1,color:l.b.ONBACKGROUND_2},m.SEARCHING),c===u.NO_RESULTS&&i.createElement(l.L,{className:"sendbird-place-hlder__body--align-top__no-result",type:l.a.BODY_1,color:l.b.ONBACKGROUND_2},m.NO_SEARCHED_MESSAGE)))}},28464:function(e,n,t){"use strict";t.d(n,{S:function(){return a}});var r=t(67294),i=t(1608);t(12394),t(64393);var a=function(e){var n=e.className,t=e.time,a=void 0===t?0:t,o=e.labelType,l=void 0===o?i.a.CAPTION_2:o,s=e.labelColor,u=void 0===s?i.b.ONCONTENT_1:s,c=a<0?0:a,d=Math.floor(c/36e5),h=Math.floor(c%36e5/6e4),f=Math.floor(c%36e5%6e4/1e3);return r.createElement("div",{className:"sendbird-ui-play-time ".concat(n)},r.createElement(i.L,{type:l,color:u},"".concat(d?d+":":"").concat(h<10?"0":"").concat(h||"0",":").concat(f<10?"0":"").concat(f)))}},68962:function(e,n,t){"use strict";t.d(n,{ko:function(){return o},v1:function(){return a}});var r=t(67294),i=t(88006),a={PRIMARY:"progress-bar-color--primary",GRAY:"progress-bar-color--gray"},o=function(e){var n=e.className,t=e.disabled,o=e.maxSize,l=e.currentSize,s=void 0===l?0:l,u=e.colorType,c=void 0===u?a.PRIMARY:u,d=(0,r.useMemo)(function(){return"".concat(s/o*100,"%")},[s,o]);return r.createElement("div",{className:(0,i.c)("sendbird-progress-bar",void 0===n?"":n,c,void 0!==t&&t&&"progress-bar--disabled")},r.createElement("div",{className:"sendbird-progress-bar__fill",style:{width:d}}))}},26862:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var r=t(67294),i=t(43822),a=t(1608),o=t(4399),l=t(7585),s=t(49805),u=t(37111);function c(e){var n,t,c,d,h,f,m,v=e.message,p=e.userId,g=void 0===p?"":p,_=e.isByMe,E=e.className,b=e.isUnavailable,C=void 0!==b&&b,y=e.onClick,N=(0,r.useContext)(l.L).str
13ingSet,T=v.parentMessage,S=null==T?void 0:T.sender,A=g===(null==S?void 0:S.userId)?N.QUOTED_MESSAGE__CURRENT_USER:null==S?void 0:S.nickname,I=(0,u.g)(T),M=(0,u.a)(T),O=g===(null===(t=null==v?void 0:v.sender)||void 0===t?void 0:t.userId)?N.QUOTED_MESSAGE__CURRENT_USER:null===(c=null==v?void 0:v.sender)||void 0===c?void 0:c.nickname,R=(0,r.useState)(!1),w=R[0],D=R[1],L=(0,s.y)(),P=null!==(h=null===(d=(0,u.b)(T))||void 0===d?void 0:d.split("/"))&&void 0!==h?h:I.split("/");return r.createElement("div",{className:(0,s.x)([void 0===E?"":E,"sendbird-quote-message",void 0!==_&&_?"outgoing":"incoming",C?"unavailable":""]),key:null==T?void 0:T.messageId,onClick:function(){!C&&y&&y()},onTouchEnd:function(){!C&&y&&y()}},r.createElement("div",{className:"sendbird-quote-message__replied-to"},r.createElement(i.ZP,{className:"sendbird-quote-message__replied-to__icon",type:i.Qy.REPLY,fillColor:i.zo.ON_BACKGROUND_3,width:"12px",height:"12px"}),r.createElement(a.L,{className:"sendbird-quote-message__replied-to__text",testID:"sendbird-quote-message__replied-to__text",type:a.a.CAPTION_2,color:a.b.ONBACKGROUND_3},r.createElement("span",{className:"sendbird-quote-message__replied-to__text__nickname"},O),r.createElement("span",{className:"sendbird-quote-message__replied-to__text__text"},N.QUOTED_MESSAGE__REPLIED_TO),r.createElement("span",{className:"sendbird-quote-message__replied-to__text__nickname"},A))),r.createElement("div",{className:"sendbird-quote-message__replied-message"},C&&r.createElement("div",{className:"sendbird-quote-message__replied-message__text-message"},r.createElement(a.L,{className:"sendbird-quote-message__replied-message__text-message__word",testID:"sendbird-quote-message__replied-message__text-message__word",type:a.a.BODY_2,color:a.b.ONBACKGROUND_1},N.QUOTED_MESSAGE__UNAVAILABLE)),(0,s.l)(T)&&(null===(f=null==T?void 0:T.message)||void 0===f?void 0:f.length)>0&&!C&&r.createElement("div",{className:"sendbird-quote-message__replied-message__text-message"},r.createElement(a.L,{className:"sendbird-quote-message__replied-message__text-message__word",testID:"sendbird-quote-message__replied-message__text-message__word",type:a.a.BODY_2,color:a.b.ONBACKGROUND_1},null==T?void 0:T.message)),(0,s.i)(T)&&I&&!C&&r.createElement("div",{className:"sendbird-quote-message__replied-message__text-message"},r.createElement(a.L,{className:"sendbird-quote-message__replied-message__text-message__word",testID:"sendbird-quote-message__replied-message__text-message__word",type:a.a.BODY_2,color:a.b.ONBACKGROUND_1},N.VOICE_MESSAGE)),((0,s.p)(T)||(0,s.c)(T))&&I&&!C&&r.createElement("div",{className:"sendbird-quote-message__replied-message__thumbnail-message"},r.createElement(o.ZP,{className:"sendbird-quote-message__replied-message__thumbnail-message__image",url:I,alt:M,width:"144px",height:"108px",onLoad:function(){return D(!0)},defaultComponent:r.createElement("div",{className:"sendbird-quote-message__replied-message__thumbnail-message__placeholder"},r.createElement("div",{className:"sendbird-quote-message__replied-message__thumbnail-message__placeholder__icon"},r.createElement(i.ZP,{type:(0,s.h)(M)?i.Qy.PLAY:i.Qy.PHOTO,fillColor:i.zo.ON_BACKGROUND_2,width:"22px",height:"22px"})))}),(0,s.h)(M)&&!((null===(m=null==T?void 0:T.thumbnails)||void 0===m?void 0:m.length)>0)&&r.createElement(r.Fragment,null,r.createElement("video",{className:"sendbird-quote-message__replied-message__thumbnail-message__video"},r.createElement("source",{src:I,type:M})),r.createElement("div",{className:"sendbird-quote-message__replied-message__thumbnail-message__cover"},r.createElement("div",{className:"sendbird-quote-message__replied-message__thumbnail-message__cover__icon"},r.createElement(i.ZP,{type:i.Qy.PLAY,fillColor:i.zo.ON_BACKGROUND_2,width:"14px",height:"14px"})))),w&&(0,s.z)(M)&&r.createElement("div",{className:"sendbird-quote-message__replied-message__thumbnail-message__cover"},r.createElement("div",{className:"sendbird-quote-message__replied-message__thumbnail-message__cover__icon"},r.createElement(i.ZP,{type:i.Qy.GIF,fillColor:i.zo.THUMBNAIL_ICON,width:"14px",height:"14px"})))),(0,s.m)(T)===s.U.FILE&&I&&!C&&r.createElement("div",{className:"sendbird-quote-message__replied-message__file-message"},r.createElement(i.ZP,{className:"sendbird-quote-message__replied-message__file-message__type-icon",type:((n={})[L.IMAGE]=i.Qy.PHOTO,n[L.VIDEO]=i.Qy.PLAY,n[L.AUDIO]=i.Qy.FILE_AUDIO,n[L.GIF]=i.Qy.GIF,n[L.OTHERS]=i.Qy.FILE_DOCUMENT,n)[(0,s.o)(M)],fillColor:i.zo.ON_BACKGROUND_3,width:"16px",height:"16px"}),r.createElement(a.L,{className:"sendbird-quote-message__replied-message__file-message__file-name",type:a.a.BODY_2,color:a.b.ONBACKGROUND_3},(0,s.t)(P[P.length-1])))))}t(12394),t(64393),t(8978)},67840:function(e,n,t){"use strict";t.d(n,{Z:function(){return h}});var r=t(67294),i=t(49805),a=t(43822),o=t(1608),l=t(7585),s=t(4399),u=t(37111);t(12394),t(8978),t(64393);var c="sendbird-quote_message_input__avatar";function d(e){var n,t=e.message;if(!(0,i.b)(t)&&!(0,i.c)(t)||(0,i.i)(t))return r.createElement(r.Fragment,null);var o=(0,u.c)(t);return(!o&&((0,i.I)(t)||(0,i.r)(t)?o=(0,u.g)(t):(0,i.c)(t)&&(0,i.J)(null===(n=t.fileInfoList)||void 0===n?void 0:n[0])&&(o=t.fileInfoList[0].url)),(0,i.r)(t)&&o)?r.createElement("div",{className:c},r.createElement("video",{style:{width:"44px",height:"44px"},src:o})):((0,i.p)(t)||(0,i.c)(t))&&o?r.createElement(s.ZP,{className:c,url:o,alt:(0,u.a)(t),width:"44px",height:"44px",fixedSize:!0}):(0,i.L)(t)?r.createElement("div",{className:c},r.createElement(a.ZP,{type:a.Qy.FILE_AUDIO,fillColor:a.zo.ON_BACKGROUND_2,width:"24px",height:"24px"})):r.createElement("div",{className:c},r.createElement(a.ZP,{type:a.Qy.FILE_DOCUMENT,fillColor:a.zo.ON_BACKGROUND_2,width:"24px",height:"24px"}))}function h(e){var n=e.className,t=e.replyingMessage,s=e.onClose,c=(0,r.useContext)(l.L).str
13ingSet,h=null==t?void 0:t.sender,f=((0,i.b)(t)||(0,i.c)(t))&&!(0,i.i)(t);return r.createElement("div",{className:(0,i.x)(["sendbird-quote_message_input",null!=n?n:""])},f&&r.createElement(d,{message:t}),r.createElement("div",{className:"sendbird-quote_message_input__body",style:{width:"calc(100% - ".concat(f?"164px":"120px",")"),left:f?"92px":"40px"}},r.createElement(o.L,{className:"sendbird-quote_message_input__body__sender-name",type:o.a.CAPTION_1,color:o.b.ONBACKGROUND_1},"".concat(c.QUOTE_MESSAGE_INPUT__REPLY_TO," ").concat(h&&h.nickname?h.nickname:c.NO_NAME)),r.createElement(o.L,{className:"sendbird-quote_message_input__body__message-content",type:o.a.BODY_2,color:o.b.ONBACKGROUND_3},(0,i.I)(t)&&!(0,i.s)(t)&&c.QUOTE_MESSAGE_INPUT__FILE_TYPE_IMAGE,(0,i.r)(t)&&c.QUOTE_MESSAGE_INPUT__FILE_TYPE__VIDEO,(0,i.s)(t)&&c.QUOTE_MESSAGE_INPUT__FILE_TYPE_GIF,(0,i.l)(t)&&t.message,(0,i.m)(t)===i.U.FILE&&(0,u.b)(t),(0,i.c)(t)&&"".concat(t.fileInfoList.length," Photos"),(0,i.i)(t)&&c.VOICE_MESSAGE)),r.createElement(a.ZP,{className:"sendbird-quote_message_input__close-button",type:a.Qy.CLOSE,fillColor:a.zo.ON_BACKGROUND_2,width:"24px",height:"24px",onClick:function(){return null==s?void 0:s(t)}}))}},30156:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12394),i=t(67294),a=t(1608);t(64393);var o=i.forwardRef(function(e,n){var t=e.className,o=void 0===t?"":t,l=e.testID,s=e.children,u=e.count,c=void 0===u?"":u,d=e.isAdd,h=void 0!==d&&d,f=e.selected,m=e.onClick,v=void 0===m?function(){}:m;return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(o)?o:[o],!0),["sendbird-reaction-badge".concat(void 0!==f&&f&&!h?"--selected":h?"--is-add":"")],!1).join(" "),"data-testid":l,role:"button",ref:n,onClick:v,onKeyDown:v,onTouchEnd:v,tabIndex:0},i.createElement("div",{className:"sendbird-reaction-badge__inner"},i.createElement("div",{className:"sendbird-reaction-badge__inner__icon"},s),i.createElement(a.L,{className:s&&c?"sendbird-reaction-badge__inner__count":"",type:a.a.CAPTION_3,color:a.b.ONBACKGROUND_1},c)))})},60090:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(12394),i=t(67294),a=t(67315),o=t(88006);t(43847);var l=i.forwardRef(function(e,n){var t=e.className,l=e.width,s=e.height,u=e.selected,c=e.dataSbId,d=void 0===c?"":c,h=e.testID,f=e.onClick,m=e.children,v=(0,a.u)({onLongPress:o.n,onClick:f},{shouldPreventDefault:!0,shouldStopPropagation:!0});return i.createElement("div",(0,r._)({className:(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!0),["sendbird-reaction-button".concat(u?"--selected":"")],!1).join(" "),ref:n,role:"button",style:{width:l,height:s}},v,{tabIndex:0,"data-sb-id":null!=h?h:d,"data-testid":null!=h?h:d}),i.createElement("div",{className:"sendbird-reaction-button__inner"},m))})},78614:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(12394),i=t(67294),a=t(56299),o="sendbird-sort-by-row";function l(e){var n=e.className,t=void 0===n?"":n,l=e.maxItemCount,s=e.itemWidth,u=e.itemHeight,c=e.children;if(Array.isArray(c)&&c.length>l){for(var d=[],h=0;h<c.length;h+=l)d.push(i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!0),[o],!1).join(" "),key:(0,a.u)(),style:{width:s*l,height:u}},c.slice(h,h+l)));return i.createElement(i.Fragment,null,d)}return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!0),[o],!1).join(" "),style:{width:s*(Array.isArray(c)?c.length:1),height:u}},c)}},49754:function(e,n,t){"use strict";t.d(n,{EC:function(){return p}});var r=t(12394),i=t(67294),a=t(49805),o=t(47057),l=t(41238),s=t(34498),u=t(64437),c=t(58972);t(8978),t(71091),t(7585),t(64393),t(1608),t(72661),t(43822);var d=function(e){var n=e.message,t=e.templateVersion,r=e.templateItems;return i.createElement(o.M,{message:n},i.createElement(o.a,{templateVersion:t,templateItems:r}))},h=function(e){var n={},t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];if("object"==typeof i&&null!==i){var a=h(i),o=a[0],l=a[1];n[r]=o,t[r]=l}else if("string"==typeof i){var s=i.split(","),u=s[0],c=s[1];n[r]=u,t[r]=c||u}else n[r]=i,t[r]=i}return[n,t]},f=function(e){function n(n){var t=e.call(this,n)||this;return t.state={hasError:!1},t}return(0,r.e)(n,e),n.getDerivedStateFromError=function(){return{hasError:!0}},n.prototype.componentDidCatch=function(e,n){var t;null===(t=this.props.logger)||void 0===t||t.error("Error caught by ErrorBoundary: ",e,n)},n.prototype.render=function(){return this.state.hasError?this.props.fallbackMessage:this.props.children},n}(i.Component),m=function(e,n,t){void 0===t&&(t="");for(var r=0,i=Object.entries(e);r<i.length;r++){var a=i[r],o=a[0],l=a[1],s=t?"".concat(t,".").concat(o):o;l&&"object"==typeof l?m(l,n,s):n[s]=l}},v=function(e){var n,t,i,a,o,l,s,u=e.template,c=e.templateData,d=e.colorVariables,f=e.theme,v={};d&&f&&(t=(n={colorVariables:d,theme:f}).colorVariables,i=n.theme,o=(a=h(t))[0],l=a[1],v="light"===i?o:l);var p=(m((0,r._)((0,r._)({},void 0===c?{}:c),v),s={}),s),g=u;
13return Object.entries(p).forEach(function(e){var n=e[0],t=e[1],r=RegExp("\\{".concat(n,"\\}"),"g");g=g.replace(r,t)}),g};function p(e){var n,t=e.className,r=void 0===t?"":t,o=e.message,h=e.isByMe,m=void 0!==h&&h,p=e.theme,g=void 0===p?"light":p,_=null===(n=o.extendedMessagePayload)||void 0===n?void 0:n[c.i],E=function(){return i.createElement(s.x,{className:r,message:o,isByMe:m})};if(!(null==_?void 0:_.key))return E();var b=_.key,C=(0,l.A)();if(!C)return E();var y=C.config.logger,N=C.utils,T=N.getCachedTemplate,S=N.updateMessageTemplatesInfo,A=C.stores.appInfoStore.waitingTemplateKeysMap,I=Object.entries(A).map(function(e){var n=e[0],t=e[1];return[n,t.requestedAt,t.erroredMessageIds.join(",")].join("-")}).join("_"),M=(0,i.useState)(w()),O=M[0],R=M[1];function w(){var e={filledMessageTemplateItemsList:[],isErrored:!1},n=[],t=T(b);if(t||n.push(b),null==_?void 0:_.view_variables)try{Object.entries(_.view_variables).forEach(function(e){e[0],e[1].forEach(function(e){var t=null==e?void 0:e.key;!t||T(t)||n.includes(t)||n.push(t)})})}catch(n){return y.error("TemplateMessageItemBody | received view_variables is malformed: ",_),e.isErrored=!0,e}try{if(n.length>0)!function(e){if(e.length>0){var n=[];e.forEach(function(e){var t=A[e];n.push([e,t])});var t=Date.now(),r=[];n.forEach(function(e){var n=e[0],i=e[1];if(!i||-1===i.erroredMessageIds.indexOf(o.messageId)&&t>i.requestedAt+500)r.push(n);else if(i.erroredMessageIds.indexOf(o.messageId)>-1)throw Error("TemplateMessageItemBody | fetching template key ".concat(n," for messageId: ").concat(o.messageId," has failed."))}),r.length>0&&S(r,o.messageId,t)}}(n);else if(t){var r=function(e){var n=v({template:e.uiTemplate,templateData:_.variables,colorVariables:e.colorVariables,theme:g});if(_.view_variables){var t={};Object.entries(_.view_variables).forEach(function(e){var n=e[0],r=e[1],i=[];r.forEach(function(e){var r=null==e?void 0:e.key;if(r){var a=T(r);a||y.error("TemplateMessageItemBody | simple template is expected to be cached: ",r);var o=v({template:a.uiTemplate,templateData:e.variables,colorVariables:a.colorVariables,theme:g});i.push({version:a.version,body:{items:JSON.parse(o)}}),t[n]=JSON.stringify(i)}})}),Object.entries(t).forEach(function(e){var t,r,i,a,o=e[0],l=e[1];t=n,r=function(e,n){for(var t=[],r=0;-1!==(r=e.indexOf(n,r));)t.push({start:r,end:r+n.length}),r+=n.length;return t}(t,'"@{'.concat(o,'}"')),i="",a=0,r.forEach(function(e){var n=e.start,r=e.end;i+=t.slice(a,n)+l,a=r}),n=i+=t.slice(a)})}return JSON.parse(n)}(t);e.filledMessageTemplateItemsList.push({version:t.version,items:r})}}catch(n){y.error("TemplateMessageItemBody | fetching non-cached templates by given template keys failed: ",n),e.isErrored=!0}return e}return((0,i.useEffect)(function(){O.isErrored||0!==O.filledMessageTemplateItemsList.length||R(w())},[_.key,I]),O.isErrored)?E():0===O.filledMessageTemplateItemsList.length?i.createElement(u.w,{className:r,isByMe:m}):i.createElement("div",{className:(0,a.x)([r,m?"outgoing":"incoming","sendbird-template-message-item-body"])},i.createElement(f,{fallbackMessage:i.createElement(s.x,{className:r,message:o,isByMe:m}),logger:y},O.filledMessageTemplateItemsList.map(function(e,n){var t;return i.createElement(d,{key:n,message:o,templateVersion:null!==(t=e.version)&&void 0!==t?t:0,templateItems:e.items})})))}},21790:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12394),i=t(67294),a=t(74865),o=function(e){var n=e.className,t=void 0===n?"":n,o=e.color,l=void 0===o?a.C.ONBACKGROUND_1:o,s=e.disabled,u=e.disableUnderline,c=e.onClick,d=void 0===c?function(){}:c,h=e.children;return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!0),[(0,a.c)(l),void 0!==u&&u?"sendbird-textbutton--not-underline":"sendbird-textbutton",void 0!==s&&s?"sendbird-textbutton--disabled":""],!1).join(" "),role:"button",tabIndex:0,onClick:function(e){return d(e)},onKeyPress:function(e){return d(e)}},h)}},50206:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var r=t(67294),i=t(1608),a=t(49805),o=t(7585),l=t(2041),s=t(7593),u=t(88477);function c(e){var n,t=e.className,c=e.message,d=e.isByMe,h=void 0!==d&&d,f=e.mouseHover,m=e.isMentionEnabled,v=e.isReactionEnabled,p=e.isMarkdownEnabled,g=void 0!==p&&p,_=(0,r.useContext)(o.L).stringSet,E=void 0!==m&&m&&(null==c?void 0:c.mentionedMessageTemplate)&&c.mentionedMessageTemplate.length>0&&(null==c?void 0:c.mentionedUsers)&&c.mentionedUsers.length>0,b=(0,r.useMemo)(function(){var e;return E?(0,l.t)({mentionedUsers:null!==(e=null==c?void 0:c.mentionedUsers)&&void 0!==e?e:void 0,messageText:null==c?void 0:c.mentionedMessageTemplate,includeMarkdown:g}):(0,l.t)({messageText:null==c?void 0:c.message,includeMarkdown:g})},[null==c?void 0:c.updatedAt,null==c?void 0:c.message]);return r.createElement(i.L,{type:i.a.BODY_1,color:h?i.b.ONCONTENT_1:i.b.ONBACKGROUND_1},r.createElement("div",{className:(0,a.x)([void 0===t?"":t,u.T,h?"outgoing":"incoming",void 0!==f&&f?"mouse-hover":"",void 0!==v&&v&&(null===(n=null==c?void 0:c.reactions)||void 0===n?void 0:n.length)>0?"reactions":""])},r.createElement(s.T,{tokens:b}),(0,a.d)(c)&&r.createElement(i.L,{className:"sendbird-text-message-item-body__message edited",type:i.a.BODY_1,color:h?i.b.ONCONTENT_2:i.b.ONBACKGROUND_2}," ".concat(_.MESSAGE_EDITED," "))))}t(12394),t(64393),t(8978),t(23012),t(81823),t(69561),t(73935),t(78614),t(71091),t(29515),t(13462),t(26748),t(34420),t(69392),t(43847),t(88569),t(43822),t(93122),t(41238),t(22284),t(5701),t(70179),t(4399),t(40286)},68873:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var r=t(67294),i=t(70179),a=t(43822),o=t(1608),l=t(7585);t(12394),t(4399),t(64393);var s=r.forwardRef(function(e,n){var t,s=e.className,u=e.threadInfo,c=e.onClick,d=u.mostRepliedUsers,h=void 0===d?[]:d,f=u.replyCount,m=(0,l.u)().stringSet;return r.createElement("div",{className:"sendbird-ui-thread-replies ".concat(s),role:"button",onClick:function(e){null==c||c(e),null==e||e.stopPropagation()},onKeyDown:function(e){null==c||c(e),null==e||e.stopPropagation()},ref:n},r.createElement("div",{className:"sendbird-ui-thread-replies__user-profiles"},h.slice(0,4).map(function(e){return r.createElement(i.A,{key:e.userId,className:"sendbird-ui-thread-replies__user-profiles__avatar",src:null==e?void 0:e.profileUrl,alt:"user profile",width:"20px",height:"20px"})}),(null==h?void 0:h.length)>=5&&r.createElement("div",{className:"sendbird-ui-thread-replies__user-profiles__avatar"},r.createElement(i.A,{className:"sendbird-ui-thread-replies__user-profiles__avatar__image",src:null===(t=null==h?void 0:h[4])||void 0===t?void 0:t.profileUrl,alt:"user profile",width:"20px",height:"20px"}),r.createElement("div",{className:"sendbird-ui-thread-replies__user-profiles__avatar__cover"}),r.createElement("div",{className:"sendbird-ui-thread-replies__user-profiles__avatar__plus"},r.createElement(a.ZP,{type:a.Qy.PLUS,fillColor:a.zo.WHITE,width:"16px",height:"16px"})))),r.createElement(o.L,{className:"sendbird-ui-thread-replies__reply-counts",type:o.a.CAPTION_2,color:o.b.PRIMARY},1===f?"".concat(f," ").concat(m.CHANNEL__THREAD_REPLY):"".concat(f>99?m.CHANNEL__THREAD_OVER_MAX:f," ").concat(m.CHANNEL__THREAD_REPL
13IES)),r.createElement(a.ZP,{className:"sendbird-ui-thread-replies__icon",type:a.Qy.CHEVRON_RIGHT,fillColor:a.zo.PRIMARY,width:"16px",height:"16px"}))})},48845:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var r=t(12394),i=t(67294),a=t(43822),o=t(4399),l=t(49805),s=t(88006),u=t(67315),c=t(37111);function d(e){var n,t,d=e.className,h=e.message,f=e.isByMe,m=e.mouseHover,v=e.isReactionEnabled,p=e.showFileViewer,g=void 0===p?s.n:p,_=e.style,E=void 0===_?{}:_,b=(0,c.c)(h),C=(0,i.useState)(!1),y=C[0],N=C[1],T=(0,u.u)({onLongPress:s.n,onClick:function(){(0,l.q)(h)&&(null==g||g(!0))}});return i.createElement("div",(0,r._)({className:(0,l.x)([void 0===d?"":d,"sendbird-thumbnail-message-item-body",void 0!==f&&f?"outgoing":"incoming",void 0!==m&&m?"mouse-hover":"",void 0!==v&&v&&(null!==(t=null===(n=h.reactions)||void 0===n?void 0:n.length)&&void 0!==t?t:0)>0?"reactions":""])},T),i.createElement(o.ZP,{className:"sendbird-thumbnail-message-item-body__thumbnail",url:b||(0,c.g)(h),alt:(0,c.a)(h),width:(null==E?void 0:E.width)||"360px",height:(null==E?void 0:E.height)||"270px",onLoad:function(){N(!0)},placeHolder:function(e){var n=e.style;return i.createElement("div",{className:"sendbird-thumbnail-message-item-body__placeholder",style:n})}}),(0,l.r)(h)&&!b&&!y&&i.createElement("video",{className:"sendbird-thumbnail-message-item-body__video"},i.createElement("source",{src:(0,c.g)(h),type:(0,c.a)(h)})),i.createElement("div",{className:"sendbird-thumbnail-message-item-body__image-cover"}),((0,l.r)(h)||(0,l.s)(h))&&i.createElement("div",{className:"sendbird-thumbnail-message-item-body__icon-wrapper"},i.createElement("div",{className:"sendbird-thumbnail-message-item-body__icon-wrapper__icon"},i.createElement(a.ZP,{type:(0,l.r)(h)?a.Qy.PLAY:a.Qy.GIF,fillColor:a.zo.THUMBNAIL_ICON,width:"34px",height:"34px"}))))}t(8978),t(43847)},76886:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12394),i=t(67294),a=t(1608);function o(e){var n=e.className,t=void 0===n?"":n,o=e.children;return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!0),["sendbird-tooltip"],!1).join(" ")},i.createElement(a.L,{className:"sendbird-tooltip__text",type:a.a.CAPTION_2,color:a.b.ONCONTENT_1},void 0===o?"":o))}t(64393)},32080:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var r=t(12394),i=t(67294);function a(e){var n=e.className,t=void 0===n?"":n,a=e.children,o=e.hoverTooltip,l=(0,i.useState)(!1),s=l[0],u=l[1],c=(0,i.useRef)();return i.createElement("div",{className:(0,r.c)((0,r.c)([],Array.isArray(t)?t:[t],!0),["sendbird-tooltip-wrapper"],!1).join(" "),onMouseOver:function(){u(!0)},onFocus:function(){u(!0)},onMouseOut:function(){u(!1)},onBlur:function(){u(!1)}},i.createElement("div",{className:"sendbird-tooltip-wrapper__children",ref:c},a),s&&i.createElement("div",{className:"sendbird-tooltip-wrapper__hover-tooltip",style:{bottom:"calc(100% + ".concat(8,"px)")}},i.createElement("div",{className:"sendbird-tooltip-wrapper__hover-tooltip__inner"},i.createElement("div",{className:"sendbird-tooltip-wrapper__hover-tooltip__inner__tooltip-container",style:{left:c.current?"calc(".concat(c.current.offsetWidth/2,"px - 50%)"):void 0}},o))))}},10765:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var r=t(67294),i=t(70179);t(12394),t(4399),t(43822);var a=function(){return r.createElement("div",{className:"typing-dots-container"},r.createElement("span",null),r.createElement("span",null),r.createElement("span",null))},o=function(e){var n=e.sources,t=e.max;return r.createElement(r.Fragment,null," ",n.slice(0,t).map(function(e,n){return r.createElement(i.A,{className:"sendbird-message-content__left__avatar multiple",src:e||"",key:"avatar_stack_item_".concat(e),width:"".concat(28,"px"),height:"".concat(28,"px"),zIndex:n,left:"".concat(24*n-2,"px")})})," ")},l=function(e){var n=e.typingMembers,t=n.length,a=Math.min(t,4),l=t-3;return r.createElement("div",{className:"sendbird-message-content__left incoming",style:{minWidth:32*a-(a-1)*8+12}},r.createElement(o,{sources:n.map(function(e){return e.profileUrl}),max:3}),l>0?r.createElement(i.A,{className:"sendbird-message-content__left__avatar multiple",width:"".concat(28,"px"),height:"".concat(28,"px"),zIndex:3,left:"".concat(72,"px"),customDefaultComponent:function(e){var n=e.width,t=e.height;return r.createElement(i.a,{width:n,height:t,text:"+".concat(l)})}}):null)},s=function(e){var n=e.typingMembers,t=e.handleScroll;return 0===n.length?null:((0,r.useLayoutEffect)(function(){null==t||t(!0)},[]),r.createElement("div",{className:"sendbird-message-content incoming",style:{marginBottom:"2px"}},r.createElement(l,{typingMembers:n}),r.createElement("div",{className:"sendbird-message-content__middle"},r.createElement(a,null))))}},33709:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(67294),i=t(1608),a=t(49805),o=t(7585);function l(e){var n,t=e.className,l=e.message,s=e.isByMe,u=void 0!==s&&s,c=e.mouseHover,d=e.isReactionEnabled,h=(0,r.useContext)(o.L).stringSet;return r.createElement("div",{className:(0,a.x)([null!=t?t:"","sendbird-unknown-message-item-body",u?"outgoing":"incoming",void 0!==c&&c?"mouse-hover":"",void 0!==d&&d&&(null===(n=null==l?void 0:l.reactions)||void 0===n?void 0:n.length)>0?"reactions":""])},r.createElement(i.L,{className:"sendbird-unknown-message-item-body__header",type:i.a.BODY_1,color:u?i.b.ONCONTENT_1:i.b.ONBACKGROUND_1},h.UNKNOWN__UNKNOWN_MESSAGE_TYPE),r.createElement(i.L,{className:"sendbird-unknown-message-item-body__description",type:i.a.BODY_1,color:u?i.b.ONCONTENT_2:i.b.ONBACKGROUND_2},h.UNKNOWN__CANNOT_READ_MESSAGE))}t(12394),t(64393),t(8978)},56842:function(e,n,t){"use strict";t.d(n,{Q:function(){return p}});var r=t(12394),i=t(67294);t(34420),t(71091),t(69392),t(49805);var a=t(88006);t(93122);var o=t(7585);t(43847);
13var l=t(69561),s=t(41238),u=t(26748),c=t(70179),d=t(67412),h=t(10856),f=t(13462),m=t(1608),v=t(39894);function p(e){var n=e.user,t=e.channel,p=e.className,g=void 0===p?void 0:p,_=e.checked,E=e.checkBox,b=e.isOperator,C=e.disabled,y=e.disableMessaging,N=e.action,T=e.onChange,S=e.avatarSize,A=void 0===S?"40px":S,I=e.onClick,M=e.onUserAvatarClick,O=e.renderListItemMenu,R=e.size,w=void 0===R?"normal":R,D=null!=b?b:(null==n?void 0:n.role)==="operator",L=n.userId,P=(0,i.useRef)(null),U=(0,i.useRef)(null),x=(0,i.useRef)(null),k=(0,u.u)(),F=k.disableUserProfile,G=k.renderUserProfile,B=(0,o.u)().stringSet,H=(0,s.A)().config.userId,V="small"===w?"sendbird-user-list-item--small__avatar":"sendbird-user-list-item__avatar",j="small"===w?"sendbird-user-list-item--small__action":"sendbird-user-list-item__action";return i.createElement("div",{className:a.c.apply(void 0,(0,r.c)(["small"===w?"sendbird-user-list-item--small":"sendbird-user-list-item"],Array.isArray(g)?g:[g],!1)),ref:U},i.createElement(l.C,{menuTrigger:function(e){return i.createElement(i.Fragment,null,i.createElement(c.A,{className:V,ref:x,src:(null==n?void 0:n.profileUrl)||(null==n?void 0:n.plainProfileUrl)||"",width:A,height:A,onClick:function(){var n;F||(e(),null===(n=null!=M?M:I)||void 0===n||n())}}),(null==n?void 0:n.isMuted)&&i.createElement(d.Z,{height:(0,v.p)(A),width:(0,v.p)(A)}))},menuItems:function(e){return G?G({user:n,currentUserId:null!=H?H:"",close:e,avatarRef:x}):i.createElement(l.b,{openLeft:!0,parentRef:x,parentContainRef:x,closeDropdown:e,style:{paddingTop:"0px",paddingBottom:"0px"}},i.createElement(f.Z,{disableMessaging:y,user:n,currentUserId:H,onSuccess:e}))}}),i.createElement(m.L,{className:"small"===w?"sendbird-user-list-item--small__title":"sendbird-user-list-item__title",type:m.a.SUBTITLE_1,color:m.b.ONBACKGROUND_1},n.nickname||B.NO_NAME,H===n.userId&&B.CHANNEL_SETTING__MEMBERS__YOU),!n.nickname&&i.createElement(m.L,{className:"small"===w?"sendbird-user-list-item--small__subtitle":"sendbird-user-list-item__subtitle",type:m.a.CAPTION_3,color:m.b.ONBACKGROUND_2},n.userId),E&&i.createElement("label",{className:"small"===w?"sendbird-user-list-item--small__checkbox":"sendbird-user-list-item__checkbox",htmlFor:L},i.createElement(h.Z,{id:L,checked:_,disabled:C,onChange:function(e){return null==T?void 0:T(e)}})),D&&i.createElement(m.L,{className:(0,a.c)("small"===w?"sendbird-user-list-item--small__operator":"sendbird-user-list-item__operator",E&&"checkbox"),type:m.a.SUBTITLE_2,color:m.b.ONBACKGROUND_2},B.LABEL__OPERATOR),!E&&!O&&N&&i.createElement("div",{className:j,ref:P},N({actionRef:P,parentRef:U})),!E&&O&&i.createElement("div",{className:j,ref:P},O({channel:t,user:n})))}t(73935),t(29515),t(88569),t(43822),t(8978),t(64393),t(78614),t(4399),t(22284),t(5701)},13462:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var r=t(67294),i=t(7585),a=t(26748),o=t(22284),l=t(70179),s=t(1608),u=t(88569),c=t(41238);function d(e){var n,t,d=e.user,h=e.currentUserId,f=e.disableMessaging,m=e.onSuccess,v=(0,c.A)(),p=(0,o.Lo)(v),g=null===(n=null==v?void 0:v.config)||void 0===n?void 0:n.logger,_=(0,r.useContext)(i.L).stringSet,E=h||(null===(t=null==v?void 0:v.config)||void 0===t?void 0:t.userId),b=(0,a.u)().onStartDirectMessage;return r.createElement("div",{className:"sendbird__user-profile"},r.createElement("section",{className:"sendbird__user-profile-avatar"},r.createElement(l.A,{height:"80px",width:"80px",src:null==d?void 0:d.profileUrl})),r.createElement("section",{className:"sendbird__user-profile-name"},r.createElement(s.L,{type:s.a.H_2,color:s.b.ONBACKGROUND_1},(null==d?void 0:d.nickname)||_.NO_NAME)),(null==d?void 0:d.userId)!==E&&!(void 0!==f&&f)&&r.createElement("section",{className:"sendbird__user-profile-message"},r.createElement(u.ZP,{type:u.qh.SECONDARY,onClick:function(){var e={isDistinct:!1,invitedUserIds:(null==d?void 0:d.userId)?[null==d?void 0:d.userId]:[],operatorUserIds:[E]};null==m||m(),p(e).then(function(e){g.info("UserProfile, channel create",e),null==b||b(e)})}},_.USER_PROFILE__MESSAGE)),r.createElement("div",{className:"sendbird__user-profile-separator"}),r.createElement("section",{className:"sendbird__user-profile-userId"},r.createElement(s.L,{className:"sendbird__user-profile-userId--label",type:s.a.CAPTION_2,color:s.b.ONBACKGROUND_2},_.USER_PROFILE__USER_ID),r.createElement(s.L,{className:"sendbird__user-profile-userId--value",type:s.a.BODY_1,color:s.b.ONBACKGROUND_1},null==d?void 0:d.userId)))}t(12394),t(64393),t(34420),t(71091),t(69392),t(49805),t(8978),t(73935),t(43847),t(29515),t(43822),t(93122),t(69561),t(78614),t(5701),t(4399)},71612:function(e,n,t){"use strict";t.d(n,{C:function(){return h}});var r=t(67294),i=t(68962),a=t(32177),o=t(28464),l=t(72661),s=t(43822),u=t
13(1608),c=t(93122),d=t(88006);t(69392),t(12394),t(49805),t(8978),t(73935),t(7585),t(64393),t(43847),t(29515),t(88569),t(34420),t(71091),t(41238),t(69561),t(78614);var h=function(e){var n,t=e.className,h=e.message,f=e.channelUrl,m=e.isByMe,v=void 0!==m&&m,p=e.isReactionEnabled,g=void 0!==p&&p,_=(0,r.useState)(!1),E=_[0],b=_[1],C=(0,a.O)({channelUrl:f,key:"".concat(null==h?void 0:h.messageId),audioFileUrl:null==h?void 0:h.url,audioFileMimeType:null==h?void 0:h.type}),y=C.play,N=C.pause,T=C.playbackTime,S=void 0===T?0:T,A=C.duration,I=C.playingStatus,M=void 0===I?c.V.IDLE:I;(0,r.useEffect)(function(){var e;g&&(null===(e=null==h?void 0:h.reactions)||void 0===e?void 0:e.length)>0?b(!0):b(!1)},[g,null===(n=null==h?void 0:h.reactions)||void 0===n?void 0:n.length]);var O=(0,r.useMemo)(function(){var e;if(null==h?void 0:h.metaArrays){var n=null===(e=null==h?void 0:h.metaArrays.find(function(e){return"KEY_VOICE_MESSAGE_DURATION"===e.key}))||void 0===e?void 0:e.value[0];return n?parseInt(n):1}return 1},[null==h?void 0:h.metaArrays]);return r.createElement("div",{className:(0,d.c)("sendbird-voice-message-item-body",t,E&&"is-reactions-contained")},r.createElement(i.ko,{className:"sendbird-voice-message-item-body__progress-bar",maxSize:A||O,currentSize:S,colorType:v?i.v1.PRIMARY:i.v1.GRAY}),r.createElement("div",{className:"sendbird-voice-message-item-body__status-button"},(M===c.V.IDLE||M===c.V.PAUSED)&&r.createElement("div",{className:"sendbird-voice-message-item-body__status-button__button",onClick:y},r.createElement(s.ZP,{width:"18px",height:"18px",type:s.Qy.PLAY,fillColor:s.zo.PRIMARY})),M===c.V.PREPARING&&r.createElement(l.Z,{width:"22.2px",height:"22.2px"},r.createElement(s.ZP,{width:"22.2px",height:"22.2px",type:s.Qy.SPINNER,fillColor:s.zo.PRIMARY_2})),M===c.V.PLAYING&&r.createElement("div",{className:"sendbird-voice-message-item-body__status-button__button",onClick:function(){N()}},r.createElement("div",{className:"sendbird-voice-message-item-body__status-button__button__pause"},r.createElement("div",{className:"sendbird-voice-message-item-body__status-button__button__pause__inner"}),r.createElement("div",{className:"sendbird-voice-message-item-body__status-button__button__pause__inner"})))),r.createElement(o.S,{className:"sendbird-voice-message-item-body__playback-time",time:O-S,labelType:u.a.BODY_1,labelColor:v?u.b.ONCONTENT_1:u.b.ONBACKGROUND_1}))}},41238:function(e,n,t){"use strict";t.d(n,{A:function(){return a},Z:function(){return a}});var r=t(67294),i=t(71091);function a(){var e=(0,r.useContext)(i.N);if(!e)throw Error("No sendbird state value available. Make sure you are rendering `<SendbirdProvider>` at the top of your app.");return e}t(12394)},8978:function(e,n,t){"use strict";t.d(n,{$:function(){return a},o:function(){return i}}),(r=i||(i={})).NONE="NONE",r.PENDING="PENDING",r.SENT="SENT",r.FAILED="FAILED",r.DELIVERED="DELIVERED",r.READ="READ";var r,i,a=function(e,n){var t,r,a;if(!n||!("sendingStatus"in n))return i.NONE;if("pending"===n.sendingStatus)return i.PENDING;if("failed"===n.sendingStatus)return i.FAILED;if(null===(t=null==e?void 0:e.isGroupChannel)||void 0===t?void 0:t.call(e)){if((null===(r=e.getUnreadMemberCount)||void 0===r?void 0:r.call(e,n))===0)return i.READ;if((null===(a=e.getUndeliveredMemberCount)||void 0===a?void 0:a.call(e,n))===0)return i.DELIVERED}return"succeeded"===n.sendingStatus?i.SENT:i.NONE}},71091:function(e,n,t){"use strict";t.d(n,{N:function(){return r}}),t(12394);var r=t(67294).createContext(null)},34420:function(e,n,t){"use strict";t.d(n,{wD:function(){return g},zS:function(){return a},Jf:function(){return _}});var r=t(67294);let i={reactions:"reactions",message_search_v3:"message_search_v3",enable_og_tag:"enable_og_tag",enable_message_threading:"enable_message_threading",allow_broadcast_channel:"allow_broadcast_channel",allow_super_group_channel:"allow_super_group_channel"};function a(e){let n=(0,r.useRef)(e);return n.current=e,(0,r.useCallback)((...e)=>n.current(...e),[n])}function o(e){return"boolean"==typeof e}function l(e,n){return n.includes(e)}t(77522).G.LATEST_LAST_MESSAGE;let s=()=>({common:{enableUsingDefaultUserProfile:!1},groupChannel:{channel:{enableMention:!1,enableOgtag:!0,enableReactions:!0,enableReactionsSupergroup:!1,enableTypingIndicator:!0,enableVoiceMessage:!1,input:{camera:{enablePhoto:!0,enableVideo:!0},enableDocument:!0,gallery:{enablePhoto:!0,enableVideo:!0}},replyType:"quote_reply",threadReplySelectType:"thread",typingIndicatorTypes:new Set(["text"]),enableFeedback:!1,enableSuggestedReplies:!1,showSuggestedRepliesFor:"last_message_only",suggestedRepliesDirection:"vertical",enableMarkdownForUserMessage:!1,enableFormTypeMessage:!1},channelList:{enableMessageReceiptStatus:!1,enableTypingIndicator:!1},setting:{enableMessageSearch:!1}},openChannel:{channel:{enableOgtag:!0,input:{camera:{enablePhoto:!0,enableVideo:!0},enableDocument:!0,gallery:{enablePhoto:!0,enableVideo:!0}}}}}),u=()=>{var e;let n=s();return e=n,delete e.groupChannel.channel.typingIndicatorTypes,delete e.groupChannel.channel.enableFeedback,delete e.groupChannel.channel.enableSuggestedReplies,delete e.groupChannel.channel.showSuggestedRepliesFor,delete e.groupChannel.channel.suggestedRepliesDirection,delete e.groupChannel.channel.enableMarkdownForUserMessage,delete e.groupChannel.channel.enableFormTypeMessage,e},c=s(),d=u();var h=function(e,n,t,r){return new(t||(t=Promise))(function(i,a){function o(e){try{s(r.next(e))}catch(e){a(e)}}function l(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var n;e.done?i(e.value):((n=e.value)instanceof t?n:new t(function(e){e(n)})).then(o,l)}s((r=r.apply(e,n||[])).next())})};let f={items:{},getItem(e){var n;return h(this,void 0,void 0,function*(){return null!==(n=f.items[e])&&void 0!==n?n:null})},setItem(e,n){return h(this,void 0,void 0,function*(){f.items[e]=n})}};class m{constructor(e){this.storage=null!=e?e:f}init(e){return this.key=`sbu@${e}.uikitConfiguration`,this.get()}get safeKey(){if(!this.key)throw Error("Please UIKitConfigManager.init() first");return this.key}update(e){return h(this,void 0,void 0,function*(){let n=yield this.get(),t={updatedAt:e.updatedAt,configuration:function e(n,t){let r=Object.assign({},n);return Object.keys(t).forEach(n=>{var i,a;
13Object.prototype.hasOwnProperty.call(r,n)&&(i=r[n],a=t[n],Object.prototype.toString.call(i)===Object.prototype.toString.call(a))&&("object"!=typeof t[n]||Array.isArray(t[n])?r[n]=t[n]:r[n]=e(r[n],t[n]))}),r}(n.configuration,e.configuration)};return yield this.storage.setItem(this.safeKey,JSON.stringify(t)),t})}get(){return h(this,void 0,void 0,function*(){let e={updatedAt:0,configuration:d};try{let n=yield this.storage.getItem(this.safeKey);if(n)return JSON.parse(n);return e}catch(n){return e}})}}function v(e){var n,t;return null!==(t=null===(n=e.appInfo)||void 0===n?void 0:n.applicationAttributes)&&void 0!==t?t:[]}let p=(0,r.createContext)({initDashboardConfigs:()=>Promise.resolve(),configs:c,configsWithAppAttr:()=>c}),g=({storage:e,children:n,localConfigs:t={}})=>{let[c,d]=(0,r.useState)(u),[h]=(0,r.useState)(()=>new m(e)),f=(0,r.useCallback)(e=>{var n,t,r,i;return n=void 0,t=void 0,r=void 0,i=function*(){let n=yield h.init(e.appId);if(e.appInfo&&e.appInfo.uikitConfigInfo.lastUpdatedAt===n.updatedAt)d(n.configuration);else try{var t;let n=yield e.getUIKitConfiguration();if(t=n.json,"object"==typeof t&&"configuration"in t&&"updated_at"in t){let e=function e(n){if("object"!=typeof n||null===n)return n;if(Array.isArray(n))return n.map(n=>e(n));let t={};return Object.keys(n).forEach(r=>{let i=r.replace(/_\w/g,e=>e[1].toUpperCase());t[i]=e(n[r])}),t}(n.json),t=yield h.update(e);d(t.configuration)}}catch(e){d(n.configuration)}},new(r||(r=Promise))(function(e,a){function o(e){try{s(i.next(e))}catch(e){a(e)}}function l(e){try{s(i.throw(e))}catch(e){a(e)}}function s(n){var t;n.done?e(n.value):((t=n.value)instanceof r?t:new r(function(e){e(t)})).then(o,l)}s((i=i.apply(n,t||[])).next())})},[h]),g=function(e,n){var t,r,i,a,u,c,d,h,f,m,v,p,g,_,E,b,C,y,N,T,S,A,I,M,O,R,w,D,L,P,U,x,k,F,G,B,H,V,j,z,K,Y,Z,Q,W,q,X,$,J,ee,en,et,er,ei,ea,eo,el,es,eu,ec,ed,eh,ef,em,ev,ep,eg,e_,eE,eb,eC,ey,eN,eT,eS,eA,eI,eM,eO,eR,ew,eD,eL,eP,eU,ex,ek,eF,eG,eB,eH,eV,ej,ez,eK,eY,eZ,eQ,eW,eq,eX,e$,eJ,e0,e1,e2,e3,e6,e4,e7,e5,e8,e9,ne,nn,nt,nr,ni,na,no,nl,ns,nu,nc,nd,nh,nf,nm,nv,np,ng,n_,nE,nb,nC,ny,nN,nT,nS,nA,nI,nM,nO,nR,nw,nD,nL,nP,nU,nx,nk,nF,nG,nB,nH,nV,nj,nz,nK,nY,nZ,nQ,nW,nq,nX,n$,nJ,n0,n1,n2,n3,n6,n4,n7,n5,n8,n9,te,tn,tt,tr,ti,ta,to,tl,ts,tu,tc,td,th,tf,tm,tv,tp,tg,t_,tE,tb,tC,ty,tN,tT,tS,tA,tI,tM,tO,tR,tw,tD,tL,tP,tU,tx,tk,tF,tG,tB,tH,tV,tj,tz,tK,tY,tZ,tQ,tW,tq,tX,t$,tJ,t0,t1,t2,t3,t6,t4,t7,t5,t8,t9,re,rn,rt,rr,ri,ra,ro,rl,rs,ru,rc,rd,rh,rf,rm,rv,rp,rg,r_,rE,rb,rC,ry,rN,rT,rS,rA,rI,rM,rO,rR,rw,rD,rL,rP,rU,rx,rk,rF,rG,rB,rH,rV,rj,rz,rK,rY,rZ,rQ,rW,rq,rX,r$,rJ,r0,r1,r2,r3,r6,r4,r7,r5,r8,r9,ie,it,ir,ii,ia,io,il,is,iu,ic,id,ih,im,iv,ip,ig,i_,iE,ib,iC,iy,iN,iT,iS,iA,iI,iM,iO,iR,iw,iD,iL,iP,iU,ix,ik,iF,iG,iB,iH,iV,ij,iz,iK,iY,iZ,iQ,iW,iq,iX,i$,iJ,i0,i1,i2,i3,i6,i4,i7;let i5=s();return t=i5.common,n.common&&o(null===(r=n.common)||void 0===r?void 0:r.enableUsingDefaultUserProfile)&&(t.enableUsingDefaultUserProfile=n.common.enableUsingDefaultUserProfile),e.common&&o(null===(i=e.common)||void 0===i?void 0:i.enableUsingDefaultUserProfile)&&(t.enableUsingDefaultUserProfile=e.common.enableUsingDefaultUserProfile),c=a=i5.groupChannel,(null===(d=n.groupChannel)||void 0===d?void 0:d.channel)&&o(null===(f=null===(h=n.groupChannel)||void 0===h?void 0:h.channel)||void 0===f?void 0:f.enableOgtag)&&(c.channel.enableOgtag=n.groupChannel.channel.enableOgtag),(null===(m=e.groupChannel)||void 0===m?void 0:m.channel)&&o(null===(p=null===(v=e.groupChannel)||void 0===v?void 0:v.channel)||void 0===p?void 0:p.enableOgtag)&&(c.channel.enableOgtag=null===(_=null===(g=e.groupChannel)||void 0===g?void 0:g.channel)||void 0===_?void 0:_.enableOgtag),(null===(E=n.groupChannel)||void 0===E?void 0:E.channel)&&o(null===(C=null===(b=n.groupChannel)||void 0===b?void 0:b.channel)||void 0===C?void 0:C.enableTypingIndicator)&&(c.channel.enableTypingIndicator=null===(N=null===(y=n.groupChannel)||void 0===y?void 0:y.channel)||void 0===N?void 0:N.enableTypingIndicator),(null===(T=e.groupChannel)||void 0===T?void 0:T.channel)&&o(null===(A=null===(S=e.groupChannel)||void 0===S?void 0:S.channel)||void 0===A?void 0:A.enableTypingIndicator)&&(c.channel.enableTypingIndicator=null===(M=null===(I=e.groupChannel)||void 0===I?void 0:I.channel)||void 0===M?void 0:M.enableTypingIndicator),(null===(O=n.groupChannel)||void 0===O?void 0:O.channel)&&o(null===(w=null===(R=n.groupChannel)||void 0===R?void 0:R.channel)||void 0===w?void 0:w.enableReactions)&&(c.channel.enableReactions=null===(L=null===(D=n.groupChannel)||void 0===D?void 0:D.channel)||void 0===L?void 0:L.enableReactions),(null===(P=e.groupChannel)||void 0===P?void 0:P.channel)&&o(null===(x=null===(U=e.groupChannel)||void 0===U?void 0:U.channel)||void 0===x?void 0:x.enableReactions)&&(c.channel.enableReactions=null===(F=null===(k=e.groupChannel)||void 0===k?void 0:k.channel)||void 0===F?void 0:F.enableReactions),(null===(G=n.groupChannel)||void 0===G?void 0:G.channel)&&o(null===(H=null===(B=n.groupChannel)||void 0===B?void 0:B.channel)||void 0===H?void 0:H.enableReactionsSupergroup)&&(c.channel.enableReactionsSupergroup=null===(j=null===(V=n.groupChannel)||void 0===V?void 0:V.channel)||void 0===j?void 0:j.enableReactionsSupergroup),(null===(z=e.groupChannel)||void 0===z?void 0:z.channel)&&o(null===(Y=null===(K=e.groupChannel)||void 0===K?void 0:K.channel)||void 0===Y?void 0:Y.enableReactionsSupergroup)&&console.warn("Currently, EnableReactionsSupergroup feature is turned off by default. If you wish to use this feature, contact us: https://dashboard.sendbird.com/settings/contact_us?category=feedback_and_feature_requests&product=UIKit"),(null===(Z=n.groupChannel)||void 0===Z?void 0:Z.channel)&&o(null===(W=null===(Q=n.groupChannel)||void 0===Q?void 0:Q.channel)||void 0===W?void 0:W.enableMention)&&(c.channel.enableMention=null===(X=null===(q=n.groupChannel)||void 0===q?void 0:q.channel)||void 0===X?void 0:X.enableMention),(null===($=e.groupChannel)||void 0===$?void 0:$.channel)&&o(null===(ee=null===(J=e.groupChannel)||void 0===J?void 0:J.channel)||void 0===ee?void 0:ee.enableMention)&&(c.channel.enableMention=null===(et=null===(en=e.groupChannel)||void 0===en?void 0:en.channel)||void 0===et?void 0:et.enableMention),(null===(er=n.groupChannel)||void 0===er?void 0:er.channel)&&l(null===(ea=null===(ei=n.groupChannel)||void 0===ei?void 0:ei.channel)||void 0===ea?void 0:ea.replyType,["none","quote_reply","thread"])&&(c.channel.replyType=null===(el=null===(eo=n.groupChannel)||void 0===eo?void 0:eo.channel)||void 0===el?void 0:el.replyType),(null===(es=e.groupChannel)||void 0===es?void 0:es.channel)&&l(null===(ec=null===(eu=e.groupChannel)||void 0===eu?void 0:eu.channel)||void 0===ec?void 0:ec.replyType,["none","quote_reply","thread"])&&(c.channel.replyType=null===(eh=null===(ed=e.groupChannel)||void 0===ed?void 0:ed.channel)||void 0===eh?void 0:eh.replyType),(null===(ef=n.groupChannel)||void 0===ef?void 0:ef.channel)&&l(null===(ev=null===(em=n.groupChannel)||void 0===em?void 0:em.channel)||void 0===ev?void 0:ev.threadReplySelectType,["thread","parent"])&&(c.channel.threadReplySelectType=null===(eg=null===(ep=n.groupChannel)||void 0===ep?void 0:ep.channel)||void 0===eg?void 0:eg.threadReplySelectType),(null===(e_=e.groupChannel)||void 0===e_?void 0:e_.channel)&&l(null===(eb=null===(eE=e.groupChannel)||void 0===eE?void 0:eE.channel)||void 0===eb?void 0:eb.threadReplySelectType,["thread","parent"])&&(c.channel.threadReplySelectType=null===(ey=null===(eC=e.groupChannel)||void 0===eC?void 0:eC.channel)||void 0===ey?void 0:ey.threadReplySelectType),(null===(eN=n.groupChannel)||void 0===eN?void 0:eN.channel)&&o(null===(eS=null===(eT=n.groupChannel)||void 0===eT?void 0:eT.channel)||void 0===eS?void 0:eS.enableVoiceMessage)&&(c.channel.enableVoiceMessage=null===(eI=null===(eA=n.groupChannel)||void 0===eA?void 0:eA.channel)||void 0===eI?void 0:eI.enableVoiceMessage),(null===(eM=e.groupChannel)||void 0===eM?void 0:eM.channel)&&o(null===(eR=null===(eO=e.groupChannel)||void 0===eO?void 0:eO.channel)||void 0===eR?void 0:eR.enableVoiceMessage)&&(c.channel.enableVoiceMessage=null===(eD=null===(ew=e.groupChannel)||void 0===ew?void 0:e
13w.channel)||void 0===eD?void 0:eD.enableVoiceMessage),(null===(eL=e.groupChannel)||void 0===eL?void 0:eL.channel)&&(null===(eU=null===(eP=e.groupChannel)||void 0===eP?void 0:eP.channel)||void 0===eU?void 0:eU.typingIndicatorTypes)instanceof Set&&(c.channel.typingIndicatorTypes=null===(ek=null===(ex=e.groupChannel)||void 0===ex?void 0:ex.channel)||void 0===ek?void 0:ek.typingIndicatorTypes),(null===(eF=e.groupChannel)||void 0===eF?void 0:eF.channel)&&o(null===(eB=null===(eG=e.groupChannel)||void 0===eG?void 0:eG.channel)||void 0===eB?void 0:eB.enableFeedback)&&(c.channel.enableFeedback=null===(eV=null===(eH=e.groupChannel)||void 0===eH?void 0:eH.channel)||void 0===eV?void 0:eV.enableFeedback),(null===(ej=e.groupChannel)||void 0===ej?void 0:ej.channel)&&o(null===(eK=null===(ez=e.groupChannel)||void 0===ez?void 0:ez.channel)||void 0===eK?void 0:eK.enableSuggestedReplies)&&(c.channel.enableSuggestedReplies=null===(eZ=null===(eY=e.groupChannel)||void 0===eY?void 0:eY.channel)||void 0===eZ?void 0:eZ.enableSuggestedReplies),(null===(eQ=e.groupChannel)||void 0===eQ?void 0:eQ.channel)&&l(null===(eq=null===(eW=e.groupChannel)||void 0===eW?void 0:eW.channel)||void 0===eq?void 0:eq.showSuggestedRepliesFor,["all_messages","last_message_only"])&&(c.channel.showSuggestedRepliesFor=null===(e$=null===(eX=e.groupChannel)||void 0===eX?void 0:eX.channel)||void 0===e$?void 0:e$.showSuggestedRepliesFor),(null===(eJ=e.groupChannel)||void 0===eJ?void 0:eJ.channel)&&l(null===(e1=null===(e0=e.groupChannel)||void 0===e0?void 0:e0.channel)||void 0===e1?void 0:e1.suggestedRepliesDirection,["vertical","horizontal"])&&(c.channel.suggestedRepliesDirection=null===(e3=null===(e2=e.groupChannel)||void 0===e2?void 0:e2.channel)||void 0===e3?void 0:e3.suggestedRepliesDirection),(null===(e6=e.groupChannel)||void 0===e6?void 0:e6.channel)&&o(null===(e7=null===(e4=e.groupChannel)||void 0===e4?void 0:e4.channel)||void 0===e7?void 0:e7.enableMarkdownForUserMessage)&&(c.channel.enableMarkdownForUserMessage=null===(e8=null===(e5=e.groupChannel)||void 0===e5?void 0:e5.channel)||void 0===e8?void 0:e8.enableMarkdownForUserMessage),(null===(e9=e.groupChannel)||void 0===e9?void 0:e9.channel)&&o(null===(nn=null===(ne=e.groupChannel)||void 0===ne?void 0:ne.channel)||void 0===nn?void 0:nn.enableFormTypeMessage)&&(c.channel.enableFormTypeMessage=null===(nr=null===(nt=e.groupChannel)||void 0===nt?void 0:nt.channel)||void 0===nr?void 0:nr.enableFormTypeMessage),ni=a,(null===(no=null===(na=n.groupChannel)||void 0===na?void 0:na.channel)||void 0===no?void 0:no.input)&&o(null===(nu=null===(ns=null===(nl=n.groupChannel)||void 0===nl?void 0:nl.channel)||void 0===ns?void 0:ns.input)||void 0===nu?void 0:nu.enableDocument)&&(ni.channel.input.enableDocument=null===(nh=null===(nd=null===(nc=n.groupChannel)||void 0===nc?void 0:nc.channel)||void 0===nd?void 0:nd.input)||void 0===nh?void 0:nh.enableDocument),(null===(nm=null===(nf=e.groupChannel)||void 0===nf?void 0:nf.channel)||void 0===nm?void 0:nm.input)&&o(null===(ng=null===(np=null===(nv=e.groupChannel)||void 0===nv?void 0:nv.channel)||void 0===np?void 0:np.input)||void 0===ng?void 0:ng.enableDocument)&&(ni.channel.input.enableDocument=null===(nb=null===(nE=null===(n_=e.groupChannel)||void 0===n_?void 0:n_.channel)||void 0===nE?void 0:nE.input)||void 0===nb?void 0:nb.enableDocument),(null===(nN=null===(ny=null===(nC=n.groupChannel)||void 0===nC?void 0:nC.channel)||void 0===ny?void 0:ny.input)||void 0===nN?void 0:nN.camera)&&o(null===(nI=null===(nA=null===(nS=null===(nT=n.groupChannel)||void 0===nT?void 0:nT.channel)||void 0===nS?void 0:nS.input)||void 0===nA?void 0:nA.camera)||void 0===nI?void 0:nI.enablePhoto)&&(ni.channel.input.camera.enablePhoto=null===(nw=null===(nR=null===(nO=null===(nM=n.groupChannel)||void 0===nM?void 0:nM.channel)||void 0===nO?void 0:nO.input)||void 0===nR?void 0:nR.camera)||void 0===nw?void 0:nw.enablePhoto),(null===(nP=null===(nL=null===(nD=e.groupChannel)||void 0===nD?void 0:nD.channel)||void 0===nL?void 0:nL.input)||void 0===nP?void 0:nP.camera)&&o(null===(nF=null===(nk=null===(nx=null===(nU=e.groupChannel)||void 0===nU?void 0:nU.channel)||void 0===nx?void 0:nx.input)||void 0===nk?void 0:nk.camera)||void 0===nF?void 0:nF.enablePhoto)&&(ni.channel.input.camera.enablePhoto=null===(nV=null===(nH=null===(nB=null===(nG=e.groupChannel)||void 0===nG?void 0:nG.channel)||void 0===nB?void 0:nB.input)||void 0===nH?void 0:nH.camera)||void 0===nV?void 0:nV.enablePhoto),(null===(nK=null===(nz=null===(nj=n.groupChannel)||void 0===nj?void 0:nj.channel)||void 0===nz?void 0:nz.
13input)||void 0===nK?void 0:nK.camera)&&o(null===(nW=null===(nQ=null===(nZ=null===(nY=n.groupChannel)||void 0===nY?void 0:nY.channel)||void 0===nZ?void 0:nZ.input)||void 0===nQ?void 0:nQ.camera)||void 0===nW?void 0:nW.enableVideo)&&(ni.channel.input.camera.enableVideo=null===(nJ=null===(n$=null===(nX=null===(nq=n.groupChannel)||void 0===nq?void 0:nq.channel)||void 0===nX?void 0:nX.input)||void 0===n$?void 0:n$.camera)||void 0===nJ?void 0:nJ.enableVideo),(null===(n2=null===(n1=null===(n0=e.groupChannel)||void 0===n0?void 0:n0.channel)||void 0===n1?void 0:n1.input)||void 0===n2?void 0:n2.camera)&&o(null===(n7=null===(n4=null===(n6=null===(n3=e.groupChannel)||void 0===n3?void 0:n3.channel)||void 0===n6?void 0:n6.input)||void 0===n4?void 0:n4.camera)||void 0===n7?void 0:n7.enableVideo)&&(ni.channel.input.camera.enableVideo=null===(te=null===(n9=null===(n8=null===(n5=e.groupChannel)||void 0===n5?void 0:n5.channel)||void 0===n8?void 0:n8.input)||void 0===n9?void 0:n9.camera)||void 0===te?void 0:te.enableVideo),(null===(tr=null===(tt=null===(tn=n.groupChannel)||void 0===tn?void 0:tn.channel)||void 0===tt?void 0:tt.input)||void 0===tr?void 0:tr.gallery)&&o(null===(tl=null===(to=null===(ta=null===(ti=n.groupChannel)||void 0===ti?void 0:ti.channel)||void 0===ta?void 0:ta.input)||void 0===to?void 0:to.gallery)||void 0===tl?void 0:tl.enablePhoto)&&(ni.channel.input.gallery.enablePhoto=null===(td=null===(tc=null===(tu=null===(ts=n.groupChannel)||void 0===ts?void 0:ts.channel)||void 0===tu?void 0:tu.input)||void 0===tc?void 0:tc.gallery)||void 0===td?void 0:td.enablePhoto),(null===(tm=null===(tf=null===(th=e.groupChannel)||void 0===th?void 0:th.channel)||void 0===tf?void 0:tf.input)||void 0===tm?void 0:tm.gallery)&&o(null===(t_=null===(tg=null===(tp=null===(tv=e.groupChannel)||void 0===tv?void 0:tv.channel)||void 0===tp?void 0:tp.input)||void 0===tg?void 0:tg.gallery)||void 0===t_?void 0:t_.enablePhoto)&&(ni.channel.input.gallery.enablePhoto=null===(ty=null===(tC=null===(tb=null===(tE=e.groupChannel)||void 0===tE?void 0:tE.channel)||void 0===tb?void 0:tb.input)||void 0===tC?void 0:tC.gallery)||void 0===ty?void 0:ty.enablePhoto),(null===(tS=null===(tT=null===(tN=n.groupChannel)||void 0===tN?void 0:tN.channel)||void 0===tT?void 0:tT.input)||void 0===tS?void 0:tS.gallery)&&o(null===(tO=null===(tM=null===(tI=null===(tA=n.groupChannel)||void 0===tA?void 0:tA.channel)||void 0===tI?void 0:tI.input)||void 0===tM?void 0:tM.gallery)||void 0===tO?void 0:tO.enableVideo)&&(ni.channel.input.gallery.enableVideo=null===(tL=null===(tD=null===(tw=null===(tR=n.groupChannel)||void 0===tR?void 0:tR.channel)||void 0===tw?void 0:tw.input)||void 0===tD?void 0:tD.gallery)||void 0===tL?void 0:tL.enableVideo),(null===(tx=null===(tU=null===(tP=e.groupChannel)||void 0===tP?void 0:tP.channel)||void 0===tU?void 0:tU.input)||void 0===tx?void 0:tx.gallery)&&o(null===(tB=null===(tG=null===(tF=null===(tk=e.groupChannel)||void 0===tk?void 0:tk.channel)||void 0===tF?void 0:tF.input)||void 0===tG?void 0:tG.gallery)||void 0===tB?void 0:tB.enableVideo)&&(ni.channel.input.gallery.enableVideo=null===(tz=null===(tj=null===(tV=null===(tH=e.groupChannel)||void 0===tH?void 0:tH.channel)||void 0===tV?void 0:tV.input)||void 0===tj?void 0:tj.gallery)||void 0===tz?void 0:tz.enableVideo),tK=a,(null===(tY=n.groupChannel)||void 0===tY?void 0:tY.channelList)&&o(null===(tQ=null===(tZ=n.groupChannel)||void 0===tZ?void 0:tZ.channelList)||void 0===tQ?void 0:tQ.enableTypingIndicator)&&(tK.channelList.enableTypingIndicator=n.groupChannel.channelList.enableTypingIndicator),(null===(tW=e.groupChannel)||void 0===tW?void 0:tW.channelList)&&o(null===(tX=null===(tq=e.groupChannel)||void 0===tq?void 0:tq.channelList)||void 0===tX?void 0:tX.enableTypingIndicator)&&(tK.channelList.enableTypingIndicator=null===(tJ=null===(t$=e.groupChannel)||void 0===t$?void 0:t$.channelList)||void 0===tJ?void 0:tJ.enableTypingIndicator),(null===(t0=n.groupChannel)||void 0===t0?void 0:t0.channelList)&&o(null===(t2=null===(t1=n.groupChannel)||void 0===t1?void 0:t1.channelList)||void 0===t2?void 0:t2.enableMessageReceiptStatus)&&(tK.channelList.enableMessageReceiptStatus=null===(t6=null===(t3=n.groupChannel)||void 0===t3?void 0:t3.channelList)||void 0===t6?void 0:t6.enableMessageReceiptStatus),(null===(t4=e.groupChannel)||void 0===t4?void 0:t4.channelList)&&o(null===(t5=null===(t7=e.groupChannel)||void 0===t7?void 0:t7.channelList)||void 0===t5?void 0:t5.enableMessageReceiptStatus)&&(tK.channelList.enableMessageReceiptStatus=null===(t9=null===(t8=e.groupChannel)||void 0===t8?void 0:t8.channelList)||void 0===t9?void 0:t9.enableMessageReceiptStatus),re=a,(null===(rn=n.groupChannel)||void 0===rn?void 0:rn.setting)&&o(null===(rr=null===(rt=n.groupChannel)||void 0===rt?void 0:rt.setting)||void 0===rr?void 0:rr.enableMessageSearch)&&(re.setting.enableMessageSearch=n.groupChannel.setting.enableMessageSearch),(null===(ri=e.groupChannel)||void 0===ri?void 0:ri.setting)&&o(null===(ro=null===(ra=e.groupChannel)||void 0===ra?void 0:ra.setting)||void 0===ro?void 0:ro.enableMessageSearch)&&(re.setting.enableMessageSearch=null===(rs=null===(rl=e.groupChannel)||void 0===rl?void 0:rl.setting)||void 0===rs?void 0:rs.enableMessageSearch),ru=u=i5.openChannel,(null===(rc=n.openChannel)||void 0===rc?void 0:rc.channel)&&o(null===(rh=null===(rd=n.openChannel)||void 0===rd?void 0:rd.channel)||void 0===rh?void 0:rh.enableOgtag)&&(ru.channel.enableOgtag=n.openChannel.channel.enableOgtag),(null===(rf=e.openChannel)||void 0===rf?void 0:rf.channel)&&o(null===(rv=null===(rm=e.openChannel)||void 0===rm?void 0:rm.channel)||void 0===rv?void 0:rv.enableOgtag)&&(ru.channel.enableOgtag=null===(rg=null===(rp=e.openChannel)||void 0===rp?void 0:rp.channel)||void 0===rg?void 0:rg.enableOgtag),r_=u,(null===(rb=null===(rE=n.openChannel)||void 0===rE?void 0:rE.channel)||void 0===rb?void 0:rb.input)&&o(null===(rN=null===(ry=null===(rC=n.openChannel)||void 0===rC?void 0:rC.channel)||void 0===ry?void 0:ry.input)||void 0===rN?void 0:rN.enableDocument)&&(r_.channel.input.enableDocument=null===(rA=null===(rS=null===(rT=n.openChannel)||void 0===rT?void 0:rT.channel)||void 0===rS?void 0:rS.input)||void 0===rA?void 0:rA.enableDocument),(null===(rM=null===(rI=e.openChannel)||void 0===rI?void 0:rI.channel)||void 0===rM?void 0:rM.input)&&o(null===(rw=null===(rR=null===(rO=e.openChannel)||void 0===rO?void 0:rO.channel)||void 0===rR?void 0:rR.input)||void 0===rw?void 0:rw.enableDocument)&&(r_.channel.input.enableDocument=null===(rP=null===(rL=null===(rD=e.openChannel)||void 0===rD?void 0:rD.channel)||void 0===rL?void 0:rL.input)||void 0===rP?void 0:rP.enableDocument),(null===(rk=null===(rx=null===(rU=n.openChannel)||void 0===rU?void 0:rU.channel)||void 0===rx?void 0:rx.input)||void 0===rk?void 0:rk.camera)&&o(null===(rH=null===(rB=null===(rG=null===(rF=n.openChannel)||void 0===rF?void 0:rF.channel)||void 0===rG?void 0:rG.input)||void 0===rB?void 0:rB.camera)||void 0===rH?void 0:rH.enablePhoto)&&(r_.channel.input.camera.enablePhoto=null===(rK=null===(rz=null===(rj=null===(rV=n.openChannel)||void 0===rV?void 0:rV.channel)||void 0===rj?void 0:rj.input)||void 0===rz?void 0:rz.camera)||void 0===rK?void 0:rK.enablePhoto),(null===(rQ=null===(rZ=null===(rY=e.openChannel)||void 0===rY?void 0:rY.channel)||void 0===rZ?void 0:rZ.input)||void 0===rQ?void 0:rQ.camera)&&o(null===(r$=null===(rX=null===(rq=null===(rW=e.openChannel)||void 0===rW?void 0:rW.channel)||void 0===rq?void 0:rq.input)||void 0===rX?void 0:rX.camera)||void 0===r$?void 0:r$.enablePhoto)&&(r_.channel.input.camera.enablePhoto=null===(r2=null===(r1=null===(r0=null===(rJ=e.openChannel)||void 0===rJ?void 0:rJ.channel)||void 0===r0?void 0:r0.input)||void 0===r1?void 0:r1.camera)||void 0===r2?void 0:r2.enablePhoto),(null===(r4=null===(r6=null===(r3=n.openChannel)||void 0===r3?void 0:r3.channel)||void 0===r6?void 0:r6.input)||void 0===r4?void 0:r4.camera)&&o(null===(r9=null===(r8=null===(r5=null===(r7=n.openChannel)||void 0===r7?void 0:r7.channel)||void 0===r5?void 0:r5.input)||void 0===r8?void 0:r8.camera)||void 0===r9?void 0:r9.enableVideo)&&(r_.channel.input.camera.enableVideo=null===(ii=null===(ir=null===(it=null===(ie=n.openChannel)||void 0===ie?void 0:ie.channel)||void 0===it?void 0:it.input)||void 0===ir?void 0:ir.camera)||void 0===ii?void 0:ii.enableVideo),(null===(il=null===(io=null===(ia=e.openChannel)||void 0===ia?void 0:ia.channel)||void 0===io?void 0:io.input)||void 0===il?void 0:il.camera)&&o(null===(id=null===(ic=null===(iu=null===(is=e.openChannel)||void 0===is?void 0:is.channel)||void 0===iu?void 0:iu.input)||void 0===ic?void 0:ic.camera)||void 0===id?void 0:id.enableVideo)&&(r_.channel.input.camera.enableVideo=null===(ip=null===(iv=null===(im=null===(ih=e.openChannel)||void 0===ih?void 0:ih.channel)||void 0===im?void 0:im.input)||void 0===iv?void 0:iv.camera)||void 0===ip?void 0:ip.enableVideo),(null===(iE=null===(i_=null===(ig=n.openChannel)||void 0===ig?void 0:ig.channel)||void 0===i_?void 0:i_.input)||void 0===iE?void 0:iE.gallery)&&o(null===(iN=null===(iy=null===(iC=null===(ib=n.openChannel)||void 0===ib?void 0:ib.channel)||void 0===iC?void 0:iC.input)||void 0===iy?void 0:iy.gallery)||void 0===iN?void 0:iN.enablePhoto)&&(r_.channel.input.gallery.enablePhoto=null===(iI=null===(iA=null===(iS=null===(iT=n.openChannel)||void 0===iT?void 0:iT.channel)||void 0===iS?void 0:iS.input)||void 0===iA?void 0:iA.gallery)||void 0===iI?void 0:iI.enablePhoto),(null===(iR=null===(iO=null===(iM=e.openChannel)||void 0===iM?void 0:iM.channel)||void 0===iO?void 0:iO.input)||void 0===iR?void 0:iR.gallery)&&o(null===(iP=null===(iL=null===(iD=null===(iw=e.openChannel)||void 0===iw?void 0:iw.channel)||void 0===iD?void 0:iD.input)||void 0===iL?void 0:iL.gallery)||void 0===iP?void 0:iP.enablePhoto)&&(r_.channel.input.gallery.enablePhoto=null===(iF=null===(ik=null===(ix=null===(iU=e.openChannel)||void 0===iU?void 0:iU.channel)||void 0===ix?void 0:ix.input)||void 0===ik?void 0:ik.gallery)||void 0===iF?void 0:iF.enablePhoto),(null===(iH=null===(iB=null===(iG=n.openChannel)||void 0===iG?void 0:iG.channel)||void 0===iB?void 0:iB.input)||void 0===iH?void 0:iH.gallery)&&o(null===(iK=null===(iz=null===(ij=null===(iV=n.openChannel)||void 0===iV?void 0:iV.channel)||void 0===ij?void 0:ij.input)||void 0===iz?void 0:iz.gallery)||void 0===iK?void 0:iK.enableVideo)&&(r_.channel.input.gallery.enableVideo=null===(iW=null===(iQ=null===(iZ=null===(iY=n.openChannel)||void 0===iY?void 0:iY.channel)||void 0===iZ?void 0:iZ.input)||void 0===iQ?void 0:iQ.gallery)||void 0===iW?void 0:iW.enableVideo),(null===(i$=null===(iX=null===(iq=e.openChannel)||void 0===iq?void 0:iq.channel)||void 0===iX?void 0:iX.input)||void 0===i$?void 0:i$.gallery)&&o(null===(i2=null===(i1=null===(i0=null===(iJ=e.openChannel)||void 0===iJ?void 0:iJ.channel)||void 0===i0?void 0:i0.input)||void 0===i1?void 0:i1.gallery)||void 0===i2?void 0:i2.enableVideo)&&(r_.channel.input.gallery.enableVideo=null===(i7=null===(i4=null===(i6=null===(i3=e.openChannel)||void 0===i3?void 0:i3.channel)||void 0===i6?void 0:i6.input)||void 0===i4?void 0:i4.gallery)||void 0===i7?void 0:i7.enableVideo),i5}(t,c),_=a(e=>({groupChannel:{channel:{get enableReactions(){return g.groupChannel.channel.enableReactions&&v(e).includes(i.reactions)},get enableReactionsSupergroup(){return g.groupChannel.channel.enableReactionsSupergroup&&v(e).includes(i.reactions)},get enableOgtag(){return g.groupChannel.channel.enableOgtag&&v(e).includes(i.enable_og_tag)}},setting:{get enableMessageSearch(){return g.groupChannel.setting.enableMessageSearch&&v(e).includes(i.message_search_v3)}}},openChannel:{channel:{get enableOgtag(){return g.openChannel.channel.enableOgtag&&v(e).includes(i.enable_og_tag)}}}}));return r.createElement(p.Provider,{value:{initDashboardConfigs:f,configs:g,configsWithAppAttr:_}},n)},_=()=>(0,r.useContext)(p)}}]);

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