{"version":3,"sources":["webpack:///./node_modules/@chatwoot/utils/dist/utils.esm.js","webpack:///./app/javascript/shared/mixins/messageFormatterMixin.js","webpack:///./node_modules/core-js/internals/string-trim-forced.js","webpack:///./app/javascript/dashboard/components/widgets/Avatar.vue?7ee1","webpack:///./app/javascript/dashboard/components/widgets/Thumbnail.vue?aee8","webpack:///./node_modules/core-js/modules/es.string.trim.js","webpack:///./app/javascript/dashboard/components/widgets/Avatar.vue?da4b","webpack:///./app/javascript/dashboard/components/widgets/Avatar.vue?1562","webpack:///app/javascript/dashboard/components/widgets/Avatar.vue","webpack:///./app/javascript/dashboard/components/widgets/Avatar.vue","webpack:///./app/javascript/widget/components/TeamAvailability.vue?d20b","webpack:///./app/javascript/widget/components/ConversationItem.vue?8d13","webpack:///./app/javascript/widget/views/Home.vue?d22a","webpack:///./app/javascript/widget/views/Home.vue?fdbf","webpack:///./app/javascript/widget/components/GroupedAvatars.vue?4d56","webpack:///app/javascript/widget/components/GroupedAvatars.vue","webpack:///./app/javascript/widget/components/AvailableAgents.vue?df8c","webpack:///app/javascript/widget/components/AvailableAgents.vue","webpack:///./app/javascript/widget/components/GroupedAvatars.vue","webpack:///./app/javascript/widget/components/GroupedAvatars.vue?d22c","webpack:///./app/javascript/widget/components/AvailableAgents.vue","webpack:///./app/javascript/widget/components/AvailableAgents.vue?cfab","webpack:///app/javascript/widget/components/TeamAvailability.vue","webpack:///./app/javascript/widget/components/TeamAvailability.vue?b386","webpack:///./app/javascript/widget/components/TeamAvailability.vue","webpack:///./app/javascript/widget/components/TeamAvailability.vue?28c0","webpack:///./app/javascript/widget/components/ConversationItem.vue?08cd","webpack:///app/javascript/widget/components/ConversationItem.vue","webpack:///app/javascript/widget/views/Home.vue","webpack:///./app/javascript/widget/views/Home.vue?129f","webpack:///./app/javascript/widget/components/ConversationItem.vue","webpack:///./app/javascript/widget/components/ConversationItem.vue?5781","webpack:///./app/javascript/widget/views/Home.vue","webpack:///./app/javascript/shared/helpers/emoji.js","webpack:///./app/javascript/dashboard/components/widgets/Thumbnail.vue?e69e","webpack:///./app/javascript/dashboard/components/widgets/Thumbnail.vue?8701","webpack:///app/javascript/dashboard/components/widgets/Thumbnail.vue","webpack:///./app/javascript/dashboard/components/widgets/Thumbnail.vue","webpack:///./app/javascript/shared/helpers/markdownIt/link.js","webpack:///./app/javascript/shared/helpers/MessageFormatter.js","webpack:///./app/javascript/shared/components/Button.vue?1d10","webpack:///./app/javascript/shared/components/Button.vue?26c2","webpack:///app/javascript/shared/components/Button.vue","webpack:///./app/javascript/shared/components/Button.vue"],"names":["debounce","func","wait","immediate","timeout","context","args","arguments","later","apply","callNow","clearTimeout","window","setTimeout","getContrastingTextColor","bgColor","color","replace","parseInt","slice","formatTime","timeInSeconds","formattedTime","minutes","Math","floor","seconds","hours","_minutes","days","_hours","trimContent","content","maxLength","ellipsis","trimmedContent","length","substring","convertSecondsToTimeUnit","unitNames","time","unit","Number","toFixed","minute","hour","day","parseBoolean","candidate","candidateString","String","toLowerCase","Boolean","JSON","parse","error","sortAsc","arr","sort","a","b","_quantileForSorted","sorted","q","min","max","value","clamped","pos","base","rest","undefined","getQuantileIntervals","data","intervals","map","interval","_extends","Object","assign","target","i","source","key","prototype","hasOwnProperty","call","this","MESSAGE_VARIABLES_REGEX","capitalizeName","name","s","toUpperCase","getFirstName","_ref","user","firstName","split","shift","getLastName","_ref2","lastName","pop","getMessageVariables","_ref3","_assignee$email","conversation","contact","_conversation$meta","meta","assignee","sender","id","_conversation$custom_","custom_attributes","conversationCustomAttributes","contactCustomAttributes","email","phone_number","entries","reduce","acc","_ref5","_ref6","replaceVariablesInMessage","_ref7","message","variables","_","trim","getUndefinedVariablesInMessage","_ref8","matches","match","filter","variable","methods","formatMessage","isATweet","isAPrivateNote","MessageFormatter","formattedMessage","getPlainText","plainText","truncateMessage","description","fails","whitespaces","module","exports","METHOD_NAME","$","$trim","proto","forced","forcedStringTrimMethod","component","_vm","_h","$createElement","_self","_c","staticClass","class","getColorCode","style","attrs","_v","_s","userInitial","_l","index","avatar","users","$dm","availabilityText","isAssistantAttached","$t","replyWaitMessage","availableAgents","_e","staticStyle","widgetColor","textColor","on","startConversation","$event","type","indexOf","_k","keyCode","startConversationText","goToConversation","agentName","agentAvatar","archived","badgeClasses","status","badgeText","unreadCount","agent","directives","rawName","lastMessageContent","expression","allConversations","shouldShowEmptyConversation","display_id","last_message","in_queue","unread_count","is_agent_typing","conversationSize","hasEmojiSupport","offset","devicePixelRatio","node","document","createElement","getContext","fillText","ctx","fillStyle","textBaseline","font","getImageData","removeEmoji","text","thumbnailBoxClass","height","size","width","title","thumbnailClass","getSrc","onImgLoad","onImgError","shouldShowImage","userNameWithoutEmoji","avatarSize","badgeSrc","USER_MENTIONS_REGEX","md","require","html","xhtmlOut","breaks","langPrefix","linkify","typographer","quotes","maxNesting","disable","use","renderer","rules","mention","tokens","idx","inline","ruler","before","state","silent","label","labelEnd","labelStart","res","token","href","posMax","src","charCodeAt","helpers","parseLinkLabel","parseLinkDestination","ok","normalizeLink","str","validateLink","RegExp","push","mila","rel","TWITTER_USERNAME_REGEX","TWITTER_HASH_REGEX","updatedMessage","render","DOMParser","parseFromString","body","textContent","buttonClassName","disabled","onClick","_t"],"mappings":"87BAaA,IAAIA,EAAW,SAAkBC,EAAMC,EAAMC,GAC3C,IAAIC,EACJ,OAAO,WACL,IAAIC,EAAU,KACVC,EAAOC,UAEPC,EAAQ,WACVJ,EAAU,KACLD,GAAWF,EAAKQ,MAAMJ,EAASC,IAGlCI,EAAUP,IAAcC,EAC5BO,aAAaP,GACbA,EAAUQ,OAAOC,WAAWL,EAAON,GAC/BQ,GAAST,EAAKQ,MAAMJ,EAASC,KAWjCQ,EAA0B,SAAiCC,GAC7D,IAAIC,EAAQD,EAAQE,QAAQ,IAAK,IAKjC,MAAW,KAJHC,SAASF,EAAMG,MAAM,EAAG,GAAI,IAIb,KAHfD,SAASF,EAAMG,MAAM,EAAG,GAAI,IAGD,KAF3BD,SAASF,EAAMG,MAAM,E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IAAK,+BACL3M,OAAQ,YAIR4M,EAAyB,2BAEzBC,EAAqB,gBAGrBjJ,E,WACJ,WAAYd,GAAoD,IAA3CY,EAA0C,wDAAxBC,EAAwB,kEAC7DpD,KAAKuC,QAAUA,GAAW,GAC1BvC,KAAKoD,eAAiBA,EACtBpD,KAAKmD,SAAWA,E,oDAGlB,WACE,IAAIoJ,EAAiBvM,KAAKuC,QAW1B,OAVIvC,KAAKmD,WAAanD,KAAKoD,iBAKzBmJ,GAJAA,EAAiBA,EAAe7Q,QAC9B2Q,EAf6B,mCAkBC3Q,QAC9B4Q,EAjByB,4CAqBtB3C,EAAG6C,OAAOD,K,4BAGnB,WACE,OAAOvM,KAAKkD,kB,qBAGd,WAKE,OAJwB,IAAIuJ,WAAYC,gBACtC1M,KAAKsD,iBACL,aAEqBqJ,KAAKC,aAAe,Q,gCAIhCvJ,O,kFC9Df,ICA4M,ECW5M,CACA,OACA,OACA,aACA,YAEA,MACA,YACA,gBAEA,SACA,YACA,YAEA,WACA,YACA,YAEA,UACA,aACA,aAGA,UACA,gBADA,WAEA,MACA,sFAYA,MAVA,sBACA,qDAGA,4DACA,iDAEA,aACA,0BAEA,GAEA,aAjBA,WAkBA,SAOA,OANA,eACA,gCAEA,iBACA,wBAEA,IAGA,SACA,QADA,SACA,GACA,yB,OCzDIgB,EAAY,YACd,GHRW,WAAa,IAAIC,EAAItE,KAASuE,EAAGD,EAAIE,eAAuC,OAAjBF,EAAIG,MAAMC,IAAIH,GAAa,SAAS,CAACK,MAAMN,EAAIuI,gBAAgB/H,MAAOR,EAAgB,aAAES,MAAM,CAAC,SAAWT,EAAIwI,UAAU7G,GAAG,CAAC,MAAQ3B,EAAIyI,UAAU,CAACzI,EAAI0I,GAAG,YAAY,KACxN,IGUpB,EACA,KACA,KACA,MAIa,IAAA3I,E","file":"js/65-1493a1504eb4b3bf5d1e.chunk.js","sourcesContent":["import isToday from 'date-fns/isToday';\nimport isYesterday from 'date-fns/isYesterday'; // Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\n\n/**\r\n * @func Callback function to be called after delay\r\n * @delay Delay for debounce in ms\r\n * @immediate should execute immediately\r\n * @returns debounced callback function\r\n */\n\nvar debounce = function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = null;\n var args = arguments;\n\n var later = function later() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = window.setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n};\n/**\r\n * @name Get contrasting text color\r\n * @description Get contrasting text color from a text color\r\n * @param bgColor Background color of text.\r\n * @returns contrasting text color\r\n */\n\n\nvar getContrastingTextColor = function getContrastingTextColor(bgColor) {\n var color = bgColor.replace('#', '');\n var r = parseInt(color.slice(0, 2), 16);\n var g = parseInt(color.slice(2, 4), 16);\n var b = parseInt(color.slice(4, 6), 16); // http://stackoverflow.com/a/3943023/112731\n\n return r * 0.299 + g * 0.587 + b * 0.114 > 186 ? '#000000' : '#FFFFFF';\n};\n/**\r\n * @name Get formatted date\r\n * @description Get date in today, yesterday or any other date format\r\n * @param date date\r\n * @param todayText Today text\r\n * @param yesterdayText Yesterday text\r\n * @returns formatted date\r\n */\n\n\nvar formatDate = function formatDate(_ref) {\n var date = _ref.date,\n todayText = _ref.todayText,\n yesterdayText = _ref.yesterdayText;\n var dateValue = new Date(date);\n if (isToday(dateValue)) return todayText;\n if (isYesterday(dateValue)) return yesterdayText;\n return date;\n};\n/**\r\n * @name formatTime\r\n * @description Format time to Hour, Minute and Second\r\n * @param timeInSeconds number\r\n * @returns formatted time\r\n */\n\n\nvar formatTime = function formatTime(timeInSeconds) {\n var formattedTime = '';\n\n if (timeInSeconds >= 60 && timeInSeconds < 3600) {\n var minutes = Math.floor(timeInSeconds / 60);\n formattedTime = minutes + \" Min\";\n var seconds = minutes === 60 ? 0 : Math.floor(timeInSeconds % 60);\n return formattedTime + (\"\" + (seconds > 0 ? ' ' + seconds + ' Sec' : ''));\n }\n\n if (timeInSeconds >= 3600 && timeInSeconds < 86400) {\n var hours = Math.floor(timeInSeconds / 3600);\n formattedTime = hours + \" Hr\";\n\n var _minutes = timeInSeconds % 3600 < 60 || hours === 24 ? 0 : Math.floor(timeInSeconds % 3600 / 60);\n\n return formattedTime + (\"\" + (_minutes > 0 ? ' ' + _minutes + ' Min' : ''));\n }\n\n if (timeInSeconds >= 86400) {\n var days = Math.floor(timeInSeconds / 86400);\n formattedTime = days + \" Day\";\n\n var _hours = timeInSeconds % 86400 < 3600 || days >= 364 ? 0 : Math.floor(timeInSeconds % 86400 / 3600);\n\n return formattedTime + (\"\" + (_hours > 0 ? ' ' + _hours + ' Hr' : ''));\n }\n\n return Math.floor(timeInSeconds) + \" Sec\";\n};\n/**\r\n * @name trimContent\r\n * @description Trim a string to max length\r\n * @param content String to trim\r\n * @param maxLength Length of the string to trim, default 1024\r\n * @param ellipsis Boolean to add dots at the end of the string, default false\r\n * @returns trimmed string\r\n */\n\n\nvar trimContent = function trimContent(content, maxLength, ellipsis) {\n if (content === void 0) {\n content = '';\n }\n\n if (maxLength === void 0) {\n maxLength = 1024;\n }\n\n if (ellipsis === void 0) {\n ellipsis = false;\n }\n\n var trimmedContent = content;\n\n if (content.length > maxLength) {\n trimmedContent = content.substring(0, maxLength);\n }\n\n if (ellipsis) {\n trimmedContent = trimmedContent + '...';\n }\n\n return trimmedContent;\n};\n/**\r\n * @name convertSecondsToTimeUnit\r\n * @description Convert seconds to time unit\r\n * @param seconds number\r\n * @param unitNames object\r\n * @returns time and unit\r\n * @example\r\n * convertToUnit(60, { minute: 'm', hour: 'h', day: 'd' }); // { time: 1, unit: 'm' }\r\n * convertToUnit(60, { minute: 'Minutes', hour: 'Hours', day: 'Days' }); // { time: 1, unit: 'Minutes' }\r\n */\n\n\nvar convertSecondsToTimeUnit = function convertSecondsToTimeUnit(seconds, unitNames) {\n if (seconds === null || seconds === 0) return {\n time: '',\n unit: ''\n };\n if (seconds < 3600) return {\n time: Number((seconds / 60).toFixed(1)),\n unit: unitNames.minute\n };\n if (seconds < 86400) return {\n time: Number((seconds / 3600).toFixed(1)),\n unit: unitNames.hour\n };\n return {\n time: Number((seconds / 86400).toFixed(1)),\n unit: unitNames.day\n };\n};\n/**\r\n * Function that parses a string boolean value and returns the corresponding boolean value\r\n * @param {string | number} candidate - The string boolean value to be parsed\r\n * @return {boolean} - The parsed boolean value\r\n */\n\n\nfunction parseBoolean(candidate) {\n try {\n // lowercase the string, so TRUE becomes true\n var candidateString = String(candidate).toLowerCase(); // wrap in boolean to ensure that the return value\n // is a boolean even if values like 0 or 1 are passed\n\n return Boolean(JSON.parse(candidateString));\n } catch (error) {\n return false;\n }\n}\n/**\r\n * Sorts an array of numbers in ascending order.\r\n * @param {number[]} arr - The array of numbers to be sorted.\r\n * @returns {number[]} - The sorted array.\r\n */\n\n\nfunction sortAsc(arr) {\n // .slice() is used to create a copy of the array so that the original array is not mutated\n return arr.slice().sort(function (a, b) {\n return a - b;\n });\n}\n/**\r\n * Calculates the quantile value of an array at a specified percentile.\r\n * @param {number[]} arr - The array of numbers to calculate the quantile value from.\r\n * @param {number} q - The percentile to calculate the quantile value for.\r\n * @returns {number} - The quantile value.\r\n */\n\n\nfunction quantile(arr, q) {\n var sorted = sortAsc(arr); // Sort the array in ascending order\n\n return _quantileForSorted(sorted, q); // Calculate the quantile value\n}\n/**\r\n * Clamps a value between a minimum and maximum range.\r\n * @param {number} min - The minimum range.\r\n * @param {number} max - The maximum range.\r\n * @param {number} value - The value to be clamped.\r\n * @returns {number} - The clamped value.\r\n */\n\n\nfunction clamp(min, max, value) {\n if (value < min) {\n return min;\n }\n\n if (value > max) {\n return max;\n }\n\n return value;\n}\n/**\r\n * This method assumes the the array provided is already sorted in ascending order.\r\n * It's a helper method for the quantile method and should not be exported as is.\r\n *\r\n * @param {number[]} arr - The array of numbers to calculate the quantile value from.\r\n * @param {number} q - The percentile to calculate the quantile value for.\r\n * @returns {number} - The quantile value.\r\n */\n\n\nfunction _quantileForSorted(sorted, q) {\n var clamped = clamp(0, 1, q); // Clamp the percentile between 0 and 1\n\n var pos = (sorted.length - 1) * clamped; // Calculate the index of the element at the specified percentile\n\n var base = Math.floor(pos); // Find the index of the closest element to the specified percentile\n\n var rest = pos - base; // Calculate the decimal value between the closest elements\n // Interpolate the quantile value between the closest elements\n // Most libraries don't to the interpolation, but I'm just having fun here\n // also see https://en.wikipedia.org/wiki/Quantile#Estimating_quantiles_from_a_sample\n\n if (sorted[base + 1] !== undefined) {\n // in case the position was a integer, the rest will be 0 and the interpolation will be skipped\n return sorted[base] + rest * (sorted[base + 1] - sorted[base]);\n } // Return the closest element if there is no interpolation possible\n\n\n return sorted[base];\n}\n/**\r\n * Calculates the quantile values for an array of intervals.\r\n * @param {number[]} data - The array of numbers to calculate the quantile values from.\r\n * @param {number[]} intervals - The array of intervals to calculate the quantile values for.\r\n * @returns {number[]} - The array of quantile values for the intervals.\r\n */\n\n\nvar getQuantileIntervals = function getQuantileIntervals(data, intervals) {\n // Sort the array in ascending order before looping through the intervals.\n // depending on the size of the array and the number of intervals, this can speed up the process by at least twice\n // for a random array of 100 numbers and 5 intervals, the speedup is 3x\n var sorted = sortAsc(data);\n return intervals.map(function (interval) {\n return _quantileForSorted(sorted, interval);\n });\n};\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar MESSAGE_VARIABLES_REGEX = /{{(.*?)}}/g;\n\nvar skipCodeBlocks = function skipCodeBlocks(str) {\n return str.replace(/```(?:.|\\n)+?```/g, '');\n};\n\nvar capitalizeName = function capitalizeName(name) {\n return (name || '').replace(/\\b(\\w)/g, function (s) {\n return s.toUpperCase();\n });\n};\n\nvar getFirstName = function getFirstName(_ref) {\n var user = _ref.user;\n var firstName = user != null && user.name ? user.name.split(' ').shift() : '';\n return capitalizeName(firstName);\n};\n\nvar getLastName = function getLastName(_ref2) {\n var user = _ref2.user;\n\n if (user && user.name) {\n var lastName = user.name.split(' ').length > 1 ? user.name.split(' ').pop() : '';\n return capitalizeName(lastName);\n }\n\n return '';\n};\n\nvar getMessageVariables = function getMessageVariables(_ref3) {\n var _assignee$email;\n\n var conversation = _ref3.conversation,\n contact = _ref3.contact;\n var _conversation$meta = conversation.meta,\n assignee = _conversation$meta.assignee,\n sender = _conversation$meta.sender,\n id = conversation.id,\n _conversation$custom_ = conversation.custom_attributes,\n conversationCustomAttributes = _conversation$custom_ === void 0 ? {} : _conversation$custom_;\n\n var _ref4 = contact || {},\n contactCustomAttributes = _ref4.custom_attributes;\n\n var standardVariables = {\n 'contact.name': capitalizeName((sender == null ? void 0 : sender.name) || ''),\n 'contact.first_name': getFirstName({\n user: sender\n }),\n 'contact.last_name': getLastName({\n user: sender\n }),\n 'contact.email': sender == null ? void 0 : sender.email,\n 'contact.phone': sender == null ? void 0 : sender.phone_number,\n 'contact.id': sender == null ? void 0 : sender.id,\n 'conversation.id': id,\n 'agent.name': capitalizeName((assignee == null ? void 0 : assignee.name) || ''),\n 'agent.first_name': getFirstName({\n user: assignee\n }),\n 'agent.last_name': getLastName({\n user: assignee\n }),\n 'agent.email': (_assignee$email = assignee == null ? void 0 : assignee.email) != null ? _assignee$email : ''\n };\n var conversationCustomAttributeVariables = Object.entries(conversationCustomAttributes != null ? conversationCustomAttributes : {}).reduce(function (acc, _ref5) {\n var key = _ref5[0],\n value = _ref5[1];\n acc[\"conversation.custom_attribute.\" + key] = value;\n return acc;\n }, {});\n var contactCustomAttributeVariables = Object.entries(contactCustomAttributes != null ? contactCustomAttributes : {}).reduce(function (acc, _ref6) {\n var key = _ref6[0],\n value = _ref6[1];\n acc[\"contact.custom_attribute.\" + key] = value;\n return acc;\n }, {});\n\n var variables = _extends({}, standardVariables, conversationCustomAttributeVariables, contactCustomAttributeVariables);\n\n return variables;\n};\n\nvar replaceVariablesInMessage = function replaceVariablesInMessage(_ref7) {\n var message = _ref7.message,\n variables = _ref7.variables; // @ts-ignore\n\n return message == null ? void 0 : message.replace(MESSAGE_VARIABLES_REGEX, function (_, replace) {\n return variables[replace.trim()] ? variables[replace.trim().toLowerCase()] : '';\n });\n};\n\nvar getUndefinedVariablesInMessage = function getUndefinedVariablesInMessage(_ref8) {\n var message = _ref8.message,\n variables = _ref8.variables;\n var messageWithOutCodeBlocks = skipCodeBlocks(message);\n var matches = messageWithOutCodeBlocks.match(MESSAGE_VARIABLES_REGEX);\n if (!matches) return [];\n return matches.map(function (match) {\n return match.replace('{{', '').replace('}}', '').trim();\n }).filter(function (variable) {\n return variables[variable] === undefined;\n });\n};\n/**\r\n * Creates a typing indicator utility.\r\n * @param onStartTyping Callback function to be called when typing starts\r\n * @param onStopTyping Callback function to be called when typing stops after delay\r\n * @param idleTime Delay for idle time in ms before considering typing stopped\r\n * @returns An object with start and stop methods for typing indicator\r\n */\n\n\nvar createTypingIndicator = function createTypingIndicator(onStartTyping, onStopTyping, idleTime) {\n var timer = null;\n\n var start = function start() {\n if (!timer) {\n onStartTyping();\n }\n\n reset();\n };\n\n var stop = function stop() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n onStopTyping();\n }\n };\n\n var reset = function reset() {\n if (timer) {\n clearTimeout(timer);\n }\n\n timer = setTimeout(function () {\n stop();\n }, idleTime);\n };\n\n return {\n start: start,\n stop: stop\n };\n};\n/**\r\n * Calculates the threshold for an SLA based on the current time and the provided threshold.\r\n * @param timeOffset - The time offset in seconds.\r\n * @param threshold - The threshold in seconds or null if not applicable.\r\n * @returns The calculated threshold in seconds or null if the threshold is null.\r\n */\n\n\nvar calculateThreshold = function calculateThreshold(timeOffset, threshold) {\n // Calculate the time left for the SLA to breach or the time since the SLA has missed\n if (threshold === null) return null;\n var currentTime = Math.floor(Date.now() / 1000);\n return timeOffset + threshold - currentTime;\n};\n/**\r\n * Finds the most urgent SLA status based on the threshold.\r\n * @param SLAStatuses - An array of SLAStatus objects.\r\n * @returns The most urgent SLAStatus object.\r\n */\n\n\nvar findMostUrgentSLAStatus = function findMostUrgentSLAStatus(SLAStatuses) {\n // Sort the SLAs based on the threshold and return the most urgent SLA\n SLAStatuses.sort(function (sla1, sla2) {\n return Math.abs(sla1.threshold) - Math.abs(sla2.threshold);\n });\n return SLAStatuses[0];\n};\n/**\r\n * Formats the SLA time in a human-readable format.\r\n * @param seconds - The time in seconds.\r\n * @returns A formatted string representing the time.\r\n */\n\n\nvar formatSLATime = function formatSLATime(seconds) {\n var units = {\n y: 31536000,\n mo: 2592000,\n d: 86400,\n h: 3600,\n m: 60\n };\n\n if (seconds < 60) {\n return '1m';\n } // we will only show two parts, two max granularity's, h-m, y-d, d-h, m, but no seconds\n\n\n var parts = [];\n Object.keys(units).forEach(function (unit) {\n var value = Math.floor(seconds / units[unit]);\n if (seconds < 60 && parts.length > 0) return;\n if (parts.length === 2) return;\n\n if (value > 0) {\n parts.push(value + unit);\n seconds -= value * units[unit];\n }\n });\n return parts.join(' ');\n};\n/**\r\n * Creates an SLA object based on the type, applied SLA, and chat details.\r\n * @param type - The type of SLA (FRT, NRT, RT).\r\n * @param appliedSla - The applied SLA details.\r\n * @param chat - The chat details.\r\n * @returns An object containing the SLA status or null if conditions are not met.\r\n */\n\n\nvar createSLAObject = function createSLAObject(type, appliedSla, chat) {\n var frtThreshold = appliedSla.sla_first_response_time_threshold,\n nrtThreshold = appliedSla.sla_next_response_time_threshold,\n rtThreshold = appliedSla.sla_resolution_time_threshold,\n createdAt = appliedSla.created_at;\n var firstReplyCreatedAt = chat.first_reply_created_at,\n waitingSince = chat.waiting_since,\n status = chat.status;\n var SLATypes = {\n FRT: {\n threshold: calculateThreshold(createdAt, frtThreshold),\n // Check FRT only if threshold is not null and first reply hasn't been made\n condition: frtThreshold !== null && (!firstReplyCreatedAt || firstReplyCreatedAt === 0)\n },\n NRT: {\n threshold: calculateThreshold(waitingSince, nrtThreshold),\n // Check NRT only if threshold is not null, first reply has been made and we are waiting since\n condition: nrtThreshold !== null && !!firstReplyCreatedAt && !!waitingSince\n },\n RT: {\n threshold: calculateThreshold(createdAt, rtThreshold),\n // Check RT only if the conversation is open and threshold is not null\n condition: status === 'open' && rtThreshold !== null\n }\n };\n var SLAStatus = SLATypes[type];\n return SLAStatus ? _extends({}, SLAStatus, {\n type: type\n }) : null;\n};\n/**\r\n * Evaluates SLA conditions and returns an array of SLAStatus objects.\r\n * @param appliedSla - The applied SLA details.\r\n * @param chat - The chat details.\r\n * @returns An array of SLAStatus objects.\r\n */\n\n\nvar evaluateSLAConditions = function evaluateSLAConditions(appliedSla, chat) {\n // Filter out the SLA based on conditions and update the object with the breach status(icon, isSlaMissed)\n var SLATypes = ['FRT', 'NRT', 'RT'];\n return SLATypes.map(function (type) {\n return createSLAObject(type, appliedSla, chat);\n }).filter(function (SLAStatus) {\n return !!SLAStatus && SLAStatus.condition;\n }).map(function (SLAStatus) {\n return _extends({}, SLAStatus, {\n icon: SLAStatus.threshold <= 0 ? 'flame' : 'alarm',\n isSlaMissed: SLAStatus.threshold <= 0\n });\n });\n};\n/**\r\n * Evaluates the SLA status for a given chat and applied SLA.\r\n * @param {Object} params - The parameters object.\r\n * @param params.appliedSla - The applied SLA details.\r\n * @param params.chat - The chat details.\r\n * @returns An object containing the most urgent SLA status.\r\n */\n\n\nvar evaluateSLAStatus = function evaluateSLAStatus(_ref) {\n var appliedSla = _ref.appliedSla,\n chat = _ref.chat;\n if (!appliedSla || !chat) return {\n type: '',\n threshold: '',\n icon: '',\n isSlaMissed: false\n }; // Filter out the SLA and create the object for each breach\n\n var SLAStatuses = evaluateSLAConditions(appliedSla, chat); // Return the most urgent SLA which is latest to breach or has missed\n\n var mostUrgent = findMostUrgentSLAStatus(SLAStatuses);\n return mostUrgent ? {\n type: mostUrgent == null ? void 0 : mostUrgent.type,\n threshold: formatSLATime(mostUrgent.threshold <= 0 ? -mostUrgent.threshold : mostUrgent.threshold),\n icon: mostUrgent.icon,\n isSlaMissed: mostUrgent.isSlaMissed\n } : {\n type: '',\n threshold: '',\n icon: '',\n isSlaMissed: false\n };\n};\n\nexport { clamp, convertSecondsToTimeUnit, createTypingIndicator, debounce, evaluateSLAStatus, formatDate, formatTime, getContrastingTextColor, getMessageVariables, getQuantileIntervals, getUndefinedVariablesInMessage, parseBoolean, quantile, replaceVariablesInMessage, sortAsc, trimContent };","import MessageFormatter from '../helpers/MessageFormatter';\n\nexport default {\n methods: {\n formatMessage(message, isATweet, isAPrivateNote) {\n const messageFormatter = new MessageFormatter(\n message,\n isATweet,\n isAPrivateNote\n );\n return messageFormatter.formattedMessage;\n },\n getPlainText(message, isATweet) {\n const messageFormatter = new MessageFormatter(message, isATweet);\n return messageFormatter.plainText;\n },\n truncateMessage(description = '') {\n if (description.length < 100) {\n return description;\n }\n\n return `${description.slice(0, 97)}...`;\n },\n },\n};\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Avatar.vue?vue&type=style&index=0&id=4ebbf336&lang=scss&scoped=true&\"","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Thumbnail.vue?vue&type=style&index=0&id=3cdcb58c&lang=scss&scoped=true&\"","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"avatar-container\",class:_vm.getColorCode,style:(_vm.style),attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"\\n \"+_vm._s(_vm.userInitial)+\"\\n\")])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Avatar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Avatar.vue?vue&type=script&lang=js&\"","<template>\n <div\n class=\"avatar-container\"\n :class=\"getColorCode\"\n :style=\"style\"\n aria-hidden=\"true\"\n >\n {{ userInitial }}\n </div>\n</template>\n\n<script>\nexport default {\n name: 'Avatar',\n props: {\n username: {\n type: String,\n default: '',\n },\n size: {\n type: Number,\n default: 40,\n },\n },\n computed: {\n style() {\n return {\n fontSize: `${Math.floor(this.size / 2.2)}px`,\n };\n },\n userInitial() {\n const parts = this.username.split(/[ -]/);\n let initials = parts.reduce((acc, curr) => acc + curr.charAt(0), '');\n\n if (initials.length > 2 && initials.search(/[A-Z]/) !== -1) {\n initials = initials.replace(/[a-z]+/g, '');\n }\n initials = initials.substring(0, 2).toUpperCase();\n\n return initials;\n },\n getColorCode() {\n const charCode = this.username.toUpperCase().charCodeAt(0);\n\n if (charCode % 4 === 0) {\n return '_red';\n }\n if (charCode % 4 === 1) {\n return '_blue';\n }\n if (charCode % 4 === 2) {\n return '_green';\n }\n if (charCode % 4 === 3) {\n return '_purple';\n }\n return '_sky';\n },\n },\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.avatar-container {\n display: flex;\n line-height: 100%;\n font-weight: var(--font-weight-black);\n align-items: center;\n justify-content: center;\n text-align: center;\n color: var(--v-50);\n &._red {\n background: var(--r-300);\n }\n &._blue {\n background: var(--w-500);\n }\n &._green {\n background: var(--g-300);\n }\n &._purple {\n background: var(--v-300);\n }\n &._sky {\n background: var(--s-400);\n }\n}\n</style>\n","import { render, staticRenderFns } from \"./Avatar.vue?vue&type=template&id=4ebbf336&scoped=true&\"\nimport script from \"./Avatar.vue?vue&type=script&lang=js&\"\nexport * from \"./Avatar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Avatar.vue?vue&type=style&index=0&id=4ebbf336&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4ebbf336\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TeamAvailability.vue?vue&type=style&index=0&id=315cbc94&lang=scss&scoped=true&\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ConversationItem.vue?vue&type=style&index=0&id=ef6fb990&lang=scss&scoped=true&\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=style&index=0&id=71ce15aa&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"flex flex-1 flex-col justify-end\"},[_c('div',{staticClass:\"flex flex-1 flex-col px-4\"},[(_vm.hasShowConversationHistory)?_c('span',{staticClass:\"font-bold py-4\",class:_vm.$dm('text-black-900', 'dark:text-white')},[_vm._v(\"\\n \"+_vm._s(_vm.$t('CONVERSATIONS'))+\"\\n \"+_vm._s(_vm.allConversations.length > 0 ? (\"(\" + (_vm.allConversations.length) + \")\") : '')+\"\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.hasShowConversationHistory)?_c('div',{staticClass:\"flex overflow-auto flex-col list-wrapper\",class:{ 'justify-center -mt-6': _vm.shouldShowEmptyConversation }},[(_vm.allConversations.length > 0)?_c('div',_vm._l((_vm.allConversations),function(conversation){return _c('conversation-item',{key:conversation.id,attrs:{\"conversation-id\":conversation.id,\"conversation-did\":conversation.display_id,\"conversation-status\":conversation.status,\"agent-name\":conversation.agent.name,\"agent-avatar\":conversation.agent.avatar,\"last-message\":conversation.last_message,\"status\":conversation.status,\"in-queue\":conversation.in_queue,\"archived\":conversation.archived,\"custom-attributes\":conversation.custom_attributes,\"unread-count\":conversation.unread_count,\"is-typing\":conversation.is_agent_typing}})}),1):(_vm.shouldShowEmptyConversation)?_c('div',{staticClass:\"flex flex-col text-center\"},[_c('img',{staticClass:\"mb-3 self-center empty-images\",attrs:{\"alt\":\"No conversation\",\"src\":\"assets/images/widget/empty-conversation.svg\"}}),_vm._v(\" \"),_c('h3',{staticClass:\"text-md font-semibold text-black-700\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('NO_CONVERSATION_TITLE'))+\"\\n \")]),_vm._v(\" \"),_c('p',{staticClass:\"text-xs mt-2 text-black-500\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('NO_CONVERSATION_SUB_TITLE'))+\"\\n \")])]):_vm._e()]):_vm._e()]),_vm._v(\" \"),_c('team-availability',{attrs:{\"available-agents\":_vm.availableAgents,\"has-conversation\":!!_vm.conversationSize},on:{\"start-conversation\":_vm.startConversation}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GroupedAvatars.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GroupedAvatars.vue?vue&type=script&lang=js&\"","<template>\n <div class=\"flex\">\n <span\n v-for=\"(user, index) in users\"\n :key=\"user.id\"\n :class=\"\n `${\n index ? '-ml-4' : ''\n } inline-block rounded-full text-white shadow-solid`\n \"\n >\n <thumbnail\n size=\"40px\"\n :username=\"user.name\"\n :src=\"user.avatar\"\n :alt=\"user.name\"\n has-border\n />\n </span>\n </div>\n</template>\n\n<script>\nimport Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';\n\nexport default {\n name: 'GroupedAvatars',\n components: { Thumbnail },\n props: {\n users: {\n type: Array,\n default: () => [],\n },\n },\n};\n</script>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AvailableAgents.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AvailableAgents.vue?vue&type=script&lang=js&\"","<template>\n <grouped-avatars :users=\"users\" />\n</template>\n\n<script>\nimport GroupedAvatars from 'widget/components/GroupedAvatars.vue';\n\nexport default {\n name: 'AvailableAgents',\n components: { GroupedAvatars },\n props: {\n agents: {\n type: Array,\n default: () => [],\n },\n },\n computed: {\n users() {\n return this.agents.slice(0, 5).map(agent => ({\n id: agent.id,\n avatar: agent.avatar_url,\n name: agent.name,\n }));\n },\n },\n};\n</script>\n","import { render, staticRenderFns } from \"./GroupedAvatars.vue?vue&type=template&id=79a8b507&\"\nimport script from \"./GroupedAvatars.vue?vue&type=script&lang=js&\"\nexport * from \"./GroupedAvatars.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"flex\"},_vm._l((_vm.users),function(user,index){return _c('span',{key:user.id,class:((index ? '-ml-4' : '') + \" inline-block rounded-full text-white shadow-solid\")},[_c('thumbnail',{attrs:{\"size\":\"40px\",\"username\":user.name,\"src\":user.avatar,\"alt\":user.name,\"has-border\":\"\"}})],1)}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./AvailableAgents.vue?vue&type=template&id=9765f988&\"\nimport script from \"./AvailableAgents.vue?vue&type=script&lang=js&\"\nexport * from \"./AvailableAgents.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('grouped-avatars',{attrs:{\"users\":_vm.users}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div\n class=\"px-5 light-box-bg\"\n :class=\"$dm('bg-slate-50', 'dark:bg-slate-900')\"\n >\n <div class=\"flex items-center justify-between mb-3\">\n <div\n class=\"max-w-xs\"\n :class=\"$dm('text-black-900', 'dark:text-slate-25')\"\n >\n <div class=\"text-base leading-5 font-medium mb-1\">\n {{ availabilityText }}\n </div>\n <div\n class=\"text-xs leading-4 mt-1\"\n :class=\"$dm('text-black-700', 'dark:text-slate-50')\"\n >\n {{\n isAssistantAttached\n ? $t('REPLY_TIME.IN_A_FEW_SECONDS')\n : replyWaitMessage\n }}\n </div>\n </div>\n <available-agents v-if=\"isOnline\" :agents=\"availableAgents\" />\n </div>\n <custom-button\n class=\"font-medium\"\n style=\"border-radius: 9px;\"\n block\n :bg-color=\"widgetColor\"\n :text-color=\"textColor\"\n @click=\"startConversation\"\n @keyup.enter=\"startConversation\"\n >\n {{ startConversationText }}\n </custom-button>\n </div>\n</template>\n\n<script>\nimport { mapGetters } from 'vuex';\nimport { getContrastingTextColor } from '@chatwoot/utils';\nimport nextAvailabilityTime from 'widget/mixins/nextAvailabilityTime';\nimport AvailableAgents from 'widget/components/AvailableAgents.vue';\nimport CustomButton from 'shared/components/Button';\nimport configMixin from 'widget/mixins/configMixin';\nimport availabilityMixin from 'widget/mixins/availability';\nimport assistantMixin from 'widget/mixins/assistantMixin';\nimport darkMixin from 'widget/mixins/darkModeMixin.js';\nimport conversationMixin from 'widget/mixins/conversationMixin.js';\nimport { IFrameHelper } from '../helpers/utils';\n\nexport default {\n name: 'TeamAvailability',\n components: {\n AvailableAgents,\n CustomButton,\n },\n mixins: [\n configMixin,\n nextAvailabilityTime,\n availabilityMixin,\n darkMixin,\n assistantMixin,\n conversationMixin,\n ],\n props: {\n availableAgents: {\n type: Array,\n default: () => {},\n },\n hasConversation: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n ...mapGetters({\n widgetColor: 'appConfig/getWidgetColor',\n currentUser: 'contacts/getCurrentUser',\n }),\n textColor() {\n return getContrastingTextColor(this.widgetColor);\n },\n isOnline() {\n const { workingHoursEnabled } = this.channelConfig;\n const anyAgentOnline = this.availableAgents.length > 0;\n\n if (workingHoursEnabled) {\n return this.isInBetweenTheWorkingHours;\n }\n return anyAgentOnline;\n },\n isContinueConversation() {\n return this.hasConversation && !this.hasShowConversationHistory;\n },\n availabilityText() {\n if (this.isOnline || window.hooryWebChannel.assistantType)\n return this.$t('TEAM_AVAILABILITY.ONLINE');\n return this.$t('TEAM_AVAILABILITY.OFFLINE');\n },\n shouldForceLogin() {\n const isUserLoggedIn =\n this.currentUser &&\n (this.currentUser.email || this.currentUser.identifier);\n return !isUserLoggedIn && window.hooryWebChannel.enforceIdentityUrl;\n },\n startConversationText() {\n if (this.shouldForceLogin) return this.$t('LOGIN_TO_START_CONVERSATION');\n\n return this.isContinueConversation\n ? this.$t('CONTINUE_CONVERSATION')\n : this.$t('START_CONVERSATION');\n },\n },\n methods: {\n openLoginUrl() {\n IFrameHelper.sendMessage({\n event: 'openLink',\n data: {\n url: window.hooryWebChannel.enforceIdentityUrl,\n target: '_self',\n },\n });\n },\n startConversation() {\n if (this.shouldForceLogin) {\n this.openLoginUrl();\n return;\n }\n\n this.cleanCurrentConversation();\n\n if (this.isContinueConversation) {\n this.$store.dispatch('conversationAttributes/getAttributes');\n\n this.$store.dispatch('conversation/fetchCurrentConversationMessages', {\n conversation_id: this.conversationParams.id,\n });\n }\n\n this.$emit('start-conversation', this.isContinueConversation);\n },\n },\n};\n</script>\n<style lang=\"scss\" scoped>\n.light-box-bg {\n position: fixed;\n width: 100%;\n bottom: 0;\n padding-bottom: 43px;\n padding-top: 12px;\n}\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TeamAvailability.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TeamAvailability.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TeamAvailability.vue?vue&type=template&id=315cbc94&scoped=true&\"\nimport script from \"./TeamAvailability.vue?vue&type=script&lang=js&\"\nexport * from \"./TeamAvailability.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TeamAvailability.vue?vue&type=style&index=0&id=315cbc94&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"315cbc94\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"px-5 light-box-bg\",class:_vm.$dm('bg-slate-50', 'dark:bg-slate-900')},[_c('div',{staticClass:\"flex items-center justify-between mb-3\"},[_c('div',{staticClass:\"max-w-xs\",class:_vm.$dm('text-black-900', 'dark:text-slate-25')},[_c('div',{staticClass:\"text-base leading-5 font-medium mb-1\"},[_vm._v(\"\\n \"+_vm._s(_vm.availabilityText)+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"text-xs leading-4 mt-1\",class:_vm.$dm('text-black-700', 'dark:text-slate-50')},[_vm._v(\"\\n \"+_vm._s(_vm.isAssistantAttached\n ? _vm.$t('REPLY_TIME.IN_A_FEW_SECONDS')\n : _vm.replyWaitMessage)+\"\\n \")])]),_vm._v(\" \"),(_vm.isOnline)?_c('available-agents',{attrs:{\"agents\":_vm.availableAgents}}):_vm._e()],1),_vm._v(\" \"),_c('custom-button',{staticClass:\"font-medium\",staticStyle:{\"border-radius\":\"9px\"},attrs:{\"block\":\"\",\"bg-color\":_vm.widgetColor,\"text-color\":_vm.textColor},on:{\"click\":_vm.startConversation,\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.startConversation($event)}}},[_vm._v(\"\\n \"+_vm._s(_vm.startConversationText)+\"\\n \")])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ConversationItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ConversationItem.vue?vue&type=script&lang=js&\"","<template>\n <div\n role=\"button\"\n aria-label=\"Go to conversation\"\n tabindex=\"0\"\n class=\"rounded-lg p-3 flex gap-3 mb-1 cursor-pointer relative\"\n :class=\"$dm('bg-white', 'dark:bg-slate-950 dark:text-white')\"\n @click=\"goToConversation\"\n @keyup.enter=\"goToConversation\"\n >\n <div class=\"flex flex-col\">\n <thumbnail size=\"36px\" :username=\"agentName\" :src=\"agentAvatar\" />\n </div>\n <div class=\"custom-width\">\n <div class=\"flex items-center justify-between pb-1\">\n <span class=\"font-bold text-sm\">{{ agentName }}</span>\n <span\n v-if=\"!archived\"\n class=\"py-1 px-3 rounded-2xl text-xs border border-solid text-woot-900 flex relative\"\n :class=\"badgeClasses\"\n >\n <fluent-icon\n v-if=\"status === 'resolved'\"\n icon=\"check-mark-circle\"\n size=\"26\"\n class=\"resolved-icon\"\n />\n {{ badgeText }}\n </span>\n <span\n v-else\n class=\"py-1 px-3 rounded-2xl text-xs border border-solid text-woot-900 flex relative pending-badge\"\n >\n {{ $t('STATUS_BADGES.ARCHIVED') }}\n </span>\n </div>\n\n <span\n v-if=\"unreadCount > 0\"\n class=\"bg-red-50 text-red-900 font-semibold rounded-full ml-1 text-xs inline-flex gap-1 items-center transform scale-90 absolute unread-messages-badge\"\n :class=\"{\n 'mr-6': status === 'resolved',\n 'mr-4': status === 'pending',\n }\"\n >\n <fluent-icon icon=\"unread-message\" size=\"15\" />\n {{ unreadCount }}\n </span>\n\n <div\n v-if=\"isTyping\"\n class=\"italic text-black-700 absolute bg-white typing-badge\"\n :class=\"$dm('', 'dark:bg-slate-950 dark:text-white')\"\n >\n {{ $t('AGENT_IS_TYPING', { agent: agentName }) }}\n </div>\n <div\n v-dompurify-html=\"formatMessage(lastMessageContent)\"\n class=\"text-sm leading-5 text-gray-800 clamp-2\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';\nimport routerMixin from 'widget/mixins/routerMixin';\nimport FluentIcon from 'shared/components/FluentIcon/Index';\nimport darkMixin from 'widget/mixins/darkModeMixin';\nimport messageFormatterMixin from 'shared/mixins/messageFormatterMixin';\n\nexport default {\n name: 'ConversationItem',\n components: { Thumbnail, FluentIcon },\n mixins: [routerMixin, darkMixin, messageFormatterMixin],\n props: {\n conversationId: {\n type: Number,\n default: 0,\n },\n conversationDid: {\n type: Number,\n default: 0,\n },\n conversationStatus: {\n type: String,\n default: '',\n },\n isTyping: {\n type: Boolean,\n default: false,\n },\n agentName: {\n type: String,\n default: '',\n },\n agentAvatar: {\n type: String,\n default: '',\n },\n lastMessage: {\n type: Object,\n default: null,\n },\n unreadCount: {\n type: Number,\n default: 0,\n },\n status: {\n type: String, // open, resolved, pending, snoozed\n default: '',\n },\n customAttributes: {\n type: Object,\n default: () => null,\n },\n inQueue: {\n type: Boolean,\n default: false,\n },\n archived: {\n type: Boolean,\n default: false,\n },\n },\n computed: {\n badgeClasses() {\n const openOrSnoozed = this.status === 'open' || this.status === 'snoozed';\n return {\n 'open-and-snoozed-badge': openOrSnoozed,\n 'resolved-badge': this.status === 'resolved',\n 'pending-badge': this.status === 'pending',\n };\n },\n badgeText() {\n return {\n open: this.$t('STATUS_BADGES.OPEN'),\n resolved: this.$t('STATUS_BADGES.RESOLVED'),\n pending: this.$t('STATUS_BADGES.PENDING'),\n snoozed: this.$t('STATUS_BADGES.SNOOZED'),\n }[this.status];\n },\n lastMessageContent() {\n if (!this.lastMessage) return '';\n if (\n this.lastMessage.content_type === 'form' &&\n this.lastMessage.content === 'bot_form'\n ) {\n return 'Question Form';\n }\n return this.lastMessage.content;\n },\n },\n methods: {\n goToConversation() {\n window.logger.logUserAction(\n 'info',\n 'Conversation item clicked going to conversation',\n {\n data: {\n conversationId: this.conversationId,\n conversationDid: this.conversationDid,\n conversationStatus: this.conversationStatus,\n customAttributes: this.customAttributes,\n in_queue: this.inQueue,\n archived: this.archived,\n },\n }\n );\n\n const hasToLogin =\n window.hooryWebChannel.enforceIdentityUrl &&\n !this.currentUser.identifier;\n\n if (hasToLogin) {\n return;\n }\n\n // eslint-disable-next-line consistent-return\n return this.replaceRoute(\n 'messages',\n {\n conversation: this.conversationId,\n conversationDid: this.conversationDid,\n conversationStatus: this.conversationStatus,\n customAttributes: this.customAttributes,\n in_queue: this.inQueue,\n archived: this.archived,\n },\n true\n );\n },\n },\n};\n</script>\n<style lang=\"scss\" scoped>\n.clamp-2 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n\n.resolved-badge {\n background-color: #d7f1e8;\n border: 1px solid #23bc85;\n padding-left: 24px;\n padding-right: 6px;\n}\n.pending-badge {\n border: 1px solid #c4bfd7;\n background: #f6f6f7;\n}\n.open-and-snoozed-badge {\n border: 1px solid rgb(98 59 234 / 69%);\n background: #dbd5f2;\n color: #2c273a;\n}\n::v-deep .resolved-icon {\n position: absolute;\n left: 2px;\n top: 1px;\n transform: scale(0.92);\n path:first-child {\n fill: #23bc85;\n }\n\n path:last-child {\n fill: #d7f1e8;\n }\n}\n.text-new {\n font-size: 11px;\n}\n\n.unread-messages-badge {\n top: 13px;\n right: 73px;\n padding: 2px 8px;\n}\n.typing-badge {\n height: calc(100% - 50px);\n width: calc(100% - 61px);\n top: 42px;\n left: 59px;\n font-size: 14px;\n}\n.custom-width {\n width: calc(100% - 46px);\n}\n</style>\n","<template>\n <div class=\"flex flex-1 flex-col justify-end\">\n <div class=\"flex flex-1 flex-col px-4\">\n <span\n v-if=\"hasShowConversationHistory\"\n class=\"font-bold py-4\"\n :class=\"$dm('text-black-900', 'dark:text-white')\"\n >\n {{ $t('CONVERSATIONS') }}\n {{ allConversations.length > 0 ? `(${allConversations.length})` : '' }}\n </span>\n <div\n v-if=\"hasShowConversationHistory\"\n class=\"flex overflow-auto flex-col list-wrapper\"\n :class=\"{ 'justify-center -mt-6': shouldShowEmptyConversation }\"\n >\n <div v-if=\"allConversations.length > 0\">\n <conversation-item\n v-for=\"conversation in allConversations\"\n :key=\"conversation.id\"\n :conversation-id=\"conversation.id\"\n :conversation-did=\"conversation.display_id\"\n :conversation-status=\"conversation.status\"\n :agent-name=\"conversation.agent.name\"\n :agent-avatar=\"conversation.agent.avatar\"\n :last-message=\"conversation.last_message\"\n :status=\"conversation.status\"\n :in-queue=\"conversation.in_queue\"\n :archived=\"conversation.archived\"\n :custom-attributes=\"conversation.custom_attributes\"\n :unread-count=\"conversation.unread_count\"\n :is-typing=\"conversation.is_agent_typing\"\n />\n </div>\n <div\n v-else-if=\"shouldShowEmptyConversation\"\n class=\"flex flex-col text-center\"\n >\n <img\n alt=\"No conversation\"\n src=\"assets/images/widget/empty-conversation.svg\"\n class=\"mb-3 self-center empty-images\"\n />\n <h3 class=\"text-md font-semibold text-black-700\">\n {{ $t('NO_CONVERSATION_TITLE') }}\n </h3>\n <p class=\"text-xs mt-2 text-black-500\">\n {{ $t('NO_CONVERSATION_SUB_TITLE') }}\n </p>\n </div>\n </div>\n </div>\n <team-availability\n :available-agents=\"availableAgents\"\n :has-conversation=\"!!conversationSize\"\n @start-conversation=\"startConversation\"\n />\n </div>\n</template>\n\n<script>\nimport configMixin from '../mixins/configMixin';\nimport TeamAvailability from 'widget/components/TeamAvailability';\nimport ConversationItem from 'widget/components/ConversationItem';\nimport { mapGetters } from 'vuex';\nimport routerMixin from 'widget/mixins/routerMixin';\nimport darkMixin from 'widget/mixins/darkModeMixin';\n\nexport default {\n name: 'Home',\n components: {\n TeamAvailability,\n ConversationItem,\n },\n mixins: [configMixin, routerMixin, darkMixin],\n props: {\n hasFetched: {\n type: Boolean,\n default: false,\n },\n isCampaignViewClicked: {\n type: Boolean,\n default: false,\n },\n },\n data() {\n return {};\n },\n computed: {\n ...mapGetters({\n availableAgents: 'agent/availableAgents',\n activeCampaign: 'campaign/getActiveCampaign',\n conversationSize: 'conversation/getConversationSize',\n allConversations: 'conversation/getAllConversations',\n hasLoadedConversations: 'conversation/getHasLoadedConversations',\n isFetchingConversationList: 'conversation/getIsFetchingConversationList',\n currentUser: 'contacts/getCurrentUser',\n }),\n shouldShowEmptyConversation() {\n return (\n this.hasLoadedConversations &&\n !this.isFetchingConversationList &&\n this.allConversations.length === 0\n );\n },\n },\n mounted() {\n window.logger.logUserAction('info', 'Home mounted');\n\n if (this.hasShowConversationHistory) {\n this.$store.dispatch('conversation/getConversationList');\n }\n\n if (!this.currentUser?.id) {\n this.$store.dispatch('contacts/get');\n }\n },\n methods: {\n startConversation(isContinueConversation) {\n window.logger.logUserAction('info', 'Start conversation clicked', {\n data: {\n preChatFormEnabled: this.preChatFormEnabled,\n conversationSize: this.conversationSize,\n isRuleBasedAssistant: this.isRuleBasedAssistant(),\n },\n });\n\n if (\n !isContinueConversation &&\n this.preChatFormEnabled &&\n !this.isRuleBasedAssistant()\n ) {\n return this.replaceRoute('prechat-form');\n }\n\n return this.replaceRoute('messages');\n },\n isRuleBasedAssistant() {\n const { assistantType } = window.hooryWebChannel;\n return assistantType === 'rule-based';\n },\n },\n};\n</script>\n<style lang=\"scss\" scoped>\n.list-wrapper {\n height: calc(100vh - 204px);\n padding-bottom: 0;\n padding-right: 8px;\n margin-right: -8px;\n}\n.empty-images {\n width: 184px;\n max-width: 94%;\n height: auto;\n}\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ConversationItem.vue?vue&type=template&id=ef6fb990&scoped=true&\"\nimport script from \"./ConversationItem.vue?vue&type=script&lang=js&\"\nexport * from \"./ConversationItem.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ConversationItem.vue?vue&type=style&index=0&id=ef6fb990&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"ef6fb990\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"rounded-lg p-3 flex gap-3 mb-1 cursor-pointer relative\",class:_vm.$dm('bg-white', 'dark:bg-slate-950 dark:text-white'),attrs:{\"role\":\"button\",\"aria-label\":\"Go to conversation\",\"tabindex\":\"0\"},on:{\"click\":_vm.goToConversation,\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.goToConversation($event)}}},[_c('div',{staticClass:\"flex flex-col\"},[_c('thumbnail',{attrs:{\"size\":\"36px\",\"username\":_vm.agentName,\"src\":_vm.agentAvatar}})],1),_vm._v(\" \"),_c('div',{staticClass:\"custom-width\"},[_c('div',{staticClass:\"flex items-center justify-between pb-1\"},[_c('span',{staticClass:\"font-bold text-sm\"},[_vm._v(_vm._s(_vm.agentName))]),_vm._v(\" \"),(!_vm.archived)?_c('span',{staticClass:\"py-1 px-3 rounded-2xl text-xs border border-solid text-woot-900 flex relative\",class:_vm.badgeClasses},[(_vm.status === 'resolved')?_c('fluent-icon',{staticClass:\"resolved-icon\",attrs:{\"icon\":\"check-mark-circle\",\"size\":\"26\"}}):_vm._e(),_vm._v(\"\\n \"+_vm._s(_vm.badgeText)+\"\\n \")],1):_c('span',{staticClass:\"py-1 px-3 rounded-2xl text-xs border border-solid text-woot-900 flex relative pending-badge\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('STATUS_BADGES.ARCHIVED'))+\"\\n \")])]),_vm._v(\" \"),(_vm.unreadCount > 0)?_c('span',{staticClass:\"bg-red-50 text-red-900 font-semibold rounded-full ml-1 text-xs inline-flex gap-1 items-center transform scale-90 absolute unread-messages-badge\",class:{\n 'mr-6': _vm.status === 'resolved',\n 'mr-4': _vm.status === 'pending',\n }},[_c('fluent-icon',{attrs:{\"icon\":\"unread-message\",\"size\":\"15\"}}),_vm._v(\"\\n \"+_vm._s(_vm.unreadCount)+\"\\n \")],1):_vm._e(),_vm._v(\" \"),(_vm.isTyping)?_c('div',{staticClass:\"italic text-black-700 absolute bg-white typing-badge\",class:_vm.$dm('', 'dark:bg-slate-950 dark:text-white')},[_vm._v(\"\\n \"+_vm._s(_vm.$t('AGENT_IS_TYPING', { agent: _vm.agentName }))+\"\\n \")]):_vm._e(),_vm._v(\" \"),_c('div',{directives:[{name:\"dompurify-html\",rawName:\"v-dompurify-html\",value:(_vm.formatMessage(_vm.lastMessageContent)),expression:\"formatMessage(lastMessageContent)\"}],staticClass:\"text-sm leading-5 text-gray-800 clamp-2\"})])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./Home.vue?vue&type=template&id=71ce15aa&scoped=true&\"\nimport script from \"./Home.vue?vue&type=script&lang=js&\"\nexport * from \"./Home.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Home.vue?vue&type=style&index=0&id=71ce15aa&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"71ce15aa\",\n null\n \n)\n\nexport default component.exports","/**\n * Detects support for emoji character sets.\n *\n * Based on the Modernizr emoji detection.\n * https://github.com/Modernizr/Modernizr/blob/347ddb078116cee91b25b6e897e211b023f9dcb4/feature-detects/emoji.js\n *\n * @return {Boolean} true or false\n * @example\n *\n * hasEmojiSupport()\n * // => true|false\n */\nexport const hasEmojiSupport = () => {\n const pixelRatio = window.devicePixelRatio || 1;\n const offset = 12 * pixelRatio;\n const node = document.createElement('canvas');\n\n // canvastext support\n if (\n !node.getContext ||\n !node.getContext('2d') ||\n typeof node.getContext('2d').fillText !== 'function'\n ) {\n return false;\n }\n\n const ctx = node.getContext('2d');\n\n ctx.fillStyle = '#f00';\n ctx.textBaseline = 'top';\n ctx.font = '32px Arial';\n ctx.fillText('\\ud83d\\udc28', 0, 0); // U+1F428 KOALA\n return ctx.getImageData(offset, offset, 1, 1).data[0] !== 0;\n};\n\nexport const removeEmoji = text => {\n if (text) {\n return text\n .replace(\n /([\\u2700-\\u27BF]|[\\uE000-\\uF8FF]|\\uD83C[\\uDC00-\\uDFFF]|\\uD83D[\\uDC00-\\uDFFF]|[\\u2011-\\u26FF]|\\uD83E[\\uDD10-\\uDDFF])/g,\n ''\n )\n .replace(/\\s+/g, ' ')\n .trim();\n }\n return '';\n};\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.thumbnailBoxClass,style:({ height: _vm.size, width: _vm.size }),attrs:{\"title\":_vm.title}},[_c('img',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.shouldShowImage),expression:\"shouldShowImage\"}],class:_vm.thumbnailClass,attrs:{\"src\":_vm.getSrc},on:{\"load\":_vm.onImgLoad,\"error\":_vm.onImgError}}),_vm._v(\" \"),_c('Avatar',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.shouldShowImage),expression:\"!shouldShowImage\"}],class:_vm.thumbnailClass,attrs:{\"username\":_vm.userNameWithoutEmoji,\"size\":_vm.avatarSize}}),_vm._v(\" \"),(_vm.badgeSrc)?_c('img',{staticClass:\"source-badge\",style:(_vm.badgeStyle),attrs:{\"src\":(\"/integrations/channels/badges/\" + _vm.badgeSrc + \".png\"),\"alt\":\"Badge\"}}):_vm._e(),_vm._v(\" \"),(_vm.showStatusIndicator)?_c('div',{class:(\"source-badge user-online-status user-online-status--\" + _vm.status),style:(_vm.statusStyle)}):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Thumbnail.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Thumbnail.vue?vue&type=script&lang=js&\"","<template>\n <div\n :class=\"thumbnailBoxClass\"\n :style=\"{ height: size, width: size }\"\n :title=\"title\"\n >\n <!-- Using v-show instead of v-if to avoid flickering as v-if removes dom elements. -->\n <img\n v-show=\"shouldShowImage\"\n :src=\"getSrc\"\n :class=\"thumbnailClass\"\n @load=\"onImgLoad\"\n @error=\"onImgError\"\n />\n <Avatar\n v-show=\"!shouldShowImage\"\n :username=\"userNameWithoutEmoji\"\n :class=\"thumbnailClass\"\n :size=\"avatarSize\"\n />\n <img\n v-if=\"badgeSrc\"\n class=\"source-badge\"\n :style=\"badgeStyle\"\n :src=\"`/integrations/channels/badges/${badgeSrc}.png`\"\n alt=\"Badge\"\n />\n <div\n v-if=\"showStatusIndicator\"\n :class=\"`source-badge user-online-status user-online-status--${status}`\"\n :style=\"statusStyle\"\n />\n </div>\n</template>\n<script>\n/**\n * Thumbnail Component\n * Src - source for round image\n * Size - Size of the thumbnail\n * Badge - Chat source indication { fb / telegram }\n * Username - Username for avatar\n */\nimport Avatar from './Avatar';\nimport { removeEmoji } from 'shared/helpers/emoji';\n\nexport default {\n components: {\n Avatar,\n },\n props: {\n src: {\n type: String,\n default: '',\n },\n size: {\n type: String,\n default: '40px',\n },\n badge: {\n type: String,\n default: '',\n },\n username: {\n type: String,\n default: '',\n },\n status: {\n type: String,\n default: '',\n },\n hasBorder: {\n type: Boolean,\n default: false,\n },\n shouldShowStatusAlways: {\n type: Boolean,\n default: false,\n },\n title: {\n type: String,\n default: '',\n },\n variant: {\n type: String,\n default: 'circle',\n },\n },\n data() {\n return {\n hasImageLoaded: false,\n imgError: false,\n };\n },\n computed: {\n getSrc() {\n return this.username === 'Hoory' ? '/hoory-circle.svg' : this.src;\n },\n userNameWithoutEmoji() {\n return removeEmoji(this.username);\n },\n showStatusIndicator() {\n if (this.shouldShowStatusAlways) return true;\n return this.status === 'online' || this.status === 'busy';\n },\n avatarSize() {\n return Number(this.size.replace(/\\D+/g, ''));\n },\n badgeSrc() {\n return {\n instagram_direct_message: 'instagram-dm',\n facebook: 'messenger',\n 'twitter-tweet': 'twitter-tweet',\n 'twitter-dm': 'twitter-dm',\n whatsapp: 'whatsapp',\n sms: 'sms',\n 'Channel::Line': 'line',\n 'Channel::Telegram': 'telegram',\n 'Channel::WebWidget': '',\n }[this.badge];\n },\n badgeStyle() {\n const size = Math.floor(this.avatarSize / 3);\n const badgeSize = `${size + 2}px`;\n const borderRadius = `${size / 2}px`;\n return { width: badgeSize, height: badgeSize, borderRadius };\n },\n statusStyle() {\n const statusSize = `${this.avatarSize / 4}px`;\n return { width: statusSize, height: statusSize };\n },\n thumbnailClass() {\n const classname = this.hasBorder ? 'border' : '';\n const variant =\n this.variant === 'circle' ? 'thumbnail-rounded' : 'thumbnail-square';\n return `user-thumbnail ${classname} ${variant}`;\n },\n thumbnailBoxClass() {\n const boxClass = this.variant === 'circle' ? 'is-rounded' : '';\n return `user-thumbnail-box ${boxClass}`;\n },\n shouldShowImage() {\n if (this.username === 'Hoory' || this.src) {\n return true;\n }\n\n if (this.hasImageLoaded) {\n return !this.imgError;\n }\n\n return false;\n },\n },\n watch: {\n src(value, oldValue) {\n if (value !== oldValue && this.imgError) {\n this.imgError = false;\n }\n },\n },\n methods: {\n onImgError() {\n this.imgError = true;\n },\n onImgLoad() {\n this.hasImageLoaded = true;\n },\n },\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.user-thumbnail-box {\n flex: 0 0 auto;\n max-width: 100%;\n position: relative;\n\n &.is-rounded {\n border-radius: 50%;\n }\n\n .user-thumbnail {\n border-radius: 50%;\n &.thumbnail-square {\n border-radius: var(--border-radius-large);\n }\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n object-fit: cover;\n vertical-align: initial;\n box-shadow: 0 0 0 1px rgb(0 0 0 / 5%);\n\n &.border {\n border: 1px solid white;\n }\n }\n\n .source-badge {\n background: white;\n border-radius: var(--border-radius-small);\n bottom: var(--space-minus-micro);\n box-shadow: var(--shadow-small);\n height: var(--space-slab);\n padding: var(--space-micro);\n position: absolute;\n right: 0;\n width: var(--space-slab);\n }\n\n .user-online-status {\n border-radius: 50%;\n bottom: var(--space-micro);\n\n &:after {\n content: ' ';\n }\n }\n\n .user-online-status--online {\n background: var(--g-400);\n }\n\n .user-online-status--busy {\n background: var(--y-500);\n }\n\n .user-online-status--offline {\n background: var(--s-500);\n }\n}\n</style>\n","import { render, staticRenderFns } from \"./Thumbnail.vue?vue&type=template&id=3cdcb58c&scoped=true&\"\nimport script from \"./Thumbnail.vue?vue&type=script&lang=js&\"\nexport * from \"./Thumbnail.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Thumbnail.vue?vue&type=style&index=0&id=3cdcb58c&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3cdcb58c\",\n null\n \n)\n\nexport default component.exports","// Process [@mention](mention://user/1/Pranav)\nconst USER_MENTIONS_REGEX = /mention:\\/\\/(user|team)\\/(\\d+)\\/(.+)/gm;\n\nconst buildMentionTokens = () => (state, silent) => {\n var label;\n var labelEnd;\n var labelStart;\n var pos;\n var res;\n var token;\n var href = '';\n var max = state.posMax;\n\n if (state.src.charCodeAt(state.pos) !== 0x5b /* [ */) {\n return false;\n }\n\n labelStart = state.pos + 1;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) {\n return false;\n }\n\n label = state.src.slice(labelStart, labelEnd);\n pos = labelEnd + 1;\n\n if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */) {\n pos += 1;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n }\n pos += 1;\n }\n\n if (!href.match(new RegExp(USER_MENTIONS_REGEX))) {\n return false;\n }\n\n if (!silent) {\n state.pos = labelStart;\n state.posMax = labelEnd;\n\n token = state.push('mention', '');\n token.href = href;\n token.content = label;\n }\n\n state.pos = pos;\n state.posMax = max;\n\n return true;\n};\n\nconst renderMentions = () => (tokens, idx) => {\n return `<span class=\"prosemirror-mention-node\">${tokens[idx].content}</span>`;\n};\n\nexport default function mentionPlugin(md) {\n md.renderer.rules.mention = renderMentions(md);\n md.inline.ruler.before('link', 'mention', buildMentionTokens(md));\n}\n","import mila from 'markdown-it-link-attributes';\nimport mentionPlugin from './markdownIt/link';\nconst md = require('markdown-it')({\n html: false,\n xhtmlOut: true,\n breaks: true,\n langPrefix: 'language-',\n linkify: true,\n typographer: true,\n quotes: '\\u201c\\u201d\\u2018\\u2019',\n maxNesting: 20,\n})\n .disable(['image'])\n .use(mentionPlugin)\n .use(mila, {\n attrs: {\n class: 'link',\n rel: 'noreferrer noopener nofollow',\n target: '_blank',\n },\n });\n\nconst TWITTER_USERNAME_REGEX = /(^|[^@\\w])@(\\w{1,15})\\b/g;\nconst TWITTER_USERNAME_REPLACEMENT = '$1[@$2](http://twitter.com/$2)';\nconst TWITTER_HASH_REGEX = /(^|\\s)#(\\w+)/g;\nconst TWITTER_HASH_REPLACEMENT = '$1[#$2](https://twitter.com/hashtag/$2)';\n\nclass MessageFormatter {\n constructor(message, isATweet = false, isAPrivateNote = false) {\n this.message = message || '';\n this.isAPrivateNote = isAPrivateNote;\n this.isATweet = isATweet;\n }\n\n formatMessage() {\n let updatedMessage = this.message;\n if (this.isATweet && !this.isAPrivateNote) {\n updatedMessage = updatedMessage.replace(\n TWITTER_USERNAME_REGEX,\n TWITTER_USERNAME_REPLACEMENT\n );\n updatedMessage = updatedMessage.replace(\n TWITTER_HASH_REGEX,\n TWITTER_HASH_REPLACEMENT\n );\n }\n return md.render(updatedMessage);\n }\n\n get formattedMessage() {\n return this.formatMessage();\n }\n\n get plainText() {\n const strippedOutHtml = new DOMParser().parseFromString(\n this.formattedMessage,\n 'text/html'\n );\n return strippedOutHtml.body.textContent || '';\n }\n}\n\nexport default MessageFormatter;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{class:_vm.buttonClassName,style:(_vm.buttonStyles),attrs:{\"disabled\":_vm.disabled},on:{\"click\":_vm.onClick}},[_vm._t(\"default\")],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Button.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Button.vue?vue&type=script&lang=js&\"","<template>\n <button\n :class=\"buttonClassName\"\n :style=\"buttonStyles\"\n :disabled=\"disabled\"\n @click=\"onClick\"\n >\n <slot />\n </button>\n</template>\n<script>\nexport default {\n props: {\n block: {\n type: Boolean,\n default: false,\n },\n type: {\n type: String,\n default: 'blue',\n },\n bgColor: {\n type: String,\n default: '',\n },\n textColor: {\n type: String,\n default: '',\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n computed: {\n buttonClassName() {\n let className =\n 'text-white py-3 px-4 rounded shadow-sm leading-4 cursor-pointer disabled:opacity-50';\n\n if (this.type === 'clear') {\n className = 'flex mx-auto my-2 text-xs w-auto text-black-600';\n }\n\n if (this.type === 'blue' && !Object.keys(this.buttonStyles).length) {\n className = `${className} bg-woot-500 hover:bg-woot-700`;\n }\n if (this.block) {\n className = `${className} w-full`;\n }\n return className;\n },\n buttonStyles() {\n const styles = {};\n if (this.bgColor) {\n styles.backgroundColor = this.bgColor;\n }\n if (this.textColor) {\n styles.color = this.textColor;\n }\n return styles;\n },\n },\n methods: {\n onClick(e) {\n this.$emit('click', e);\n },\n },\n};\n</script>\n","import { render, staticRenderFns } from \"./Button.vue?vue&type=template&id=53f43867&\"\nimport script from \"./Button.vue?vue&type=script&lang=js&\"\nexport * from \"./Button.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}