/*! messaging-webapp.js | Huro | Css Ninja. 2020-2021 */
"use strict";$((function(){var a=$(".chat-area .simplebar-content-wrapper");a.scrollTop(a.prop("scrollHeight")),$(".conversations-mobile-trigger").on("click",(function(){$(".conversation-area").addClass("is-active")})),$(".conversation-area .conversation").on("click",(function(){var e=$(this),s=e.attr("data-conversation-id"),t=e.find(".avatar").attr("src"),i=e.attr("data-detail-name"),r=e.attr("data-detail-text");if(e.siblings(".conversation").removeClass("active"),e.addClass("active"),$(".conversation-area").removeClass("is-active"),$(".chat-area-content").removeClass("is-active"),$("#webapp-conversation-"+s).addClass("is-active"),$("#user-details-name").html(i),$("#user-details-title").html(r),null==t){var n=e.find(".h-avatar").html();$(".user-pic .avatar:not(.is-fake)").addClass("is-hidden"),$(".user-pic .avatar.is-fake").removeClass("is-hidden"),$(".user-pic .avatar.is-fake").replaceWith(n)}else $(".user-pic .avatar.is-fake").addClass("is-hidden"),$(".user-pic .avatar:not(.is-fake)").attr("src",t).removeClass("is-hidden");a.scrollTop(a.prop("scrollHeight"))}))}));