import{c as d}from"./framework.e8f655c8.js";import{n as p}from"./index.8c202964.js";const f={name:"index",props:{value:{required:!0},length:{required:!1,default:80},appendToBody:{default:!0}},setup(r){const e=(a="",s)=>{let o=0,l=a.toString().replace(/<font color='red'>/g,"#").replace(/<\/font>/g,"&");l.indexOf("#")!==-1&&s++,l.indexOf("&")!==-1&&s++;let t=l.split("").reduce((c,u)=>{const i=u.charCodeAt(0);return i>=0&&i<=128?o+=1:o+=2,o<=s?c+u:c},"");return t.indexOf("#")!==-1&&t.indexOf("&")===-1&&(t+="&"),t=t.replace(/#/g,"<font color='red'>").replace(/&/g,"</font>"),t},n=(a="")=>a.toString().replace(/<font color='red'>/g,"").replace(/<\/font>/g,"").split("").reduce((o,l)=>{const t=l.charCodeAt(0);return t>=0&&t<=128?o+1:o+2},0);return{strDom:d(()=>r.value?n(r.value)>r.length:""),getStrDom:()=>`<span style="cursor: pointer" >${e(r.value,r.length)}...</span>`}}};var _=function(){var e=this,n=e._self._c;return e.strDom?n("el-tooltip",{staticClass:"box-item",attrs:{effect:"light",placement:"top",appendToBody:e.appendToBody},scopedSlots:e._u([{key:"content",fn:function(){return[n("span",{staticClass:"content",domProps:{innerHTML:e._s(e.value)}})]},proxy:!0}],null,!1,784051205)},[n("span",{domProps:{innerHTML:e._s(e.getStrDom())}})]):n("span",{domProps:{innerHTML:e._s(e.value)}})},m=[],g=p(f,_,m,!1,null,"6686779a",null,null);const x=g.exports;export{x as T};
