"use strict";var e=require("./emojiMap.js");exports.decodeText=function(t){const s=[];let i=t.text,a=-1,n=-1;for(;""!==i;)switch(a=i.indexOf("["),n=i.indexOf("]"),a){case 0:if(-1===n)s.push({name:"text",text:i}),i="";else{const t=i.slice(0,n+1);e.emojiMap[t]?(s.push({name:"img",src:e.emojiUrl+e.emojiMap[t]}),i=i.substring(n+1)):(s.push({name:"text",text:"["}),i=i.slice(1))}break;case-1:s.push({name:"text",text:i}),i="";break;default:s.push({name:"text",text:i.slice(0,a)}),i=i.substring(a)}return s};
