mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
4 lines
125 KiB
JavaScript
Vendored
4 lines
125 KiB
JavaScript
Vendored
import{n as d,M as gt,e as mt,c as $t,i as Ct,a as k,U as wt}from"./app.a64317f3.js";import{m as $,a as pt}from"./vuex.cc7cb26e.js";import{Q as g}from"./quill-hi.b7430b13.js";import"./quill-mention-hi.0fc702d1.js";import{V as kt}from"./vue.fd9b772e.js";import{i as yt}from"./view-design-hi.5e48072b.js";var bt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[e("svg",{attrs:{viewBox:"0 0 28 28"}},[e("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[e("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),e("g",{attrs:{"fill-rule":"nonzero"}},[e("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),e("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])},Lt=[];const xt={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style(){let{size:t}=this;return this.isNumeric(t)&&(t+="px"),{width:t,height:t}},args(){const{percent:t}=this;let s=Math.min(360,360/100*t);return s==360?s=0:s==0&&(s=360),{x:14,y:14,r:14,start:360,end:s}}},methods:{isNumeric(t){return t!==""&&!isNaN(parseFloat(t))&&isFinite(t)},point(t,s,e,i){return[(t+Math.sin(i)*e).toFixed(2),(s-Math.cos(i)*e).toFixed(2)]},full(t,s,e,i){return i<=0?`M ${t-e} ${s} A ${e} ${e} 0 1 1 ${t+e} ${s} A ${e} ${e} 1 1 1 ${t-e} ${s} Z`:`M ${t-e} ${s} A ${e} ${e} 0 1 1 ${t+e} ${s} A ${e} ${e} 1 1 1 ${t-e} ${s} M ${t-i} ${s} A ${i} ${i} 0 1 1 ${t+i} ${s} A ${i} ${i} 1 1 1 ${t-i} ${s} Z`},part(t,s,e,i,a,o){const[l,n]=[a/360*2*Math.PI,o/360*2*Math.PI],r=[this.point(t,s,i,l),this.point(t,s,e,l),this.point(t,s,e,n),this.point(t,s,i,n)],c=n-l>Math.PI?"1":"0";return`M ${r[0][0]} ${r[0][1]} L ${r[1][0]} ${r[1][1]} A ${e} ${e} 0 ${c} 1 ${r[2][0]} ${r[2][1]} L ${r[3][0]} ${r[3][1]} A ${i} ${i} 0 ${c} 0 ${r[0][0]} ${r[0][1]} Z`},arc(t){const{x:s=0,y:e=0}=t;let{R:i=0,r:a=0,start:o,end:l}=t;return[i,a]=[Math.max(i,a),Math.min(i,a)],i<=0?"":o!==+o||l!==+l?this.full(s,e,i,a):Math.abs(o-l)<1e-6?"":Math.abs(o-l)%360<1e-6?this.full(s,e,i,a):([o,l]=[o%360,l%360],o>l&&(l+=360),this.part(s,e,i,a,o,l))}}},y={};var Dt=d(xt,bt,Lt,!1,St,null,null,null);function St(t){for(let s in y)this[s]=y[s]}var Mt=function(){return Dt.exports}();const b="ontouchend"in document,w={bind:function(t,s){let e=500,i="default",a=!1,o=null,l=s.value;if($A.isJson(s.value)&&(e=s.value.delay||500,l=s.value.callback),typeof l!="function")throw"callback must be a function";t.__longpressContextmenu__=n=>{n.preventDefault(),n.stopPropagation(),i==="default"&&l(n,t)},t.addEventListener("contextmenu",t.__longpressContextmenu__),b&&(t.__longpressStart__=n=>{n.type==="click"&&n.button!==0||(i="touch",a=!1,o===null&&(o=setTimeout(()=>{i==="touch"&&(a=!0,l(n.touches[0],t))},e)))},t.__longpressCancel__=n=>{o!==null&&(clearTimeout(o),o=null),i="default"},t.__longpressClick__=n=>{a&&(n.preventDefault(),n.stopPropagation()),t.__longpressCancel__(n)},t.addEventListener("touchstart",t.__longpressStart__),t.addEventListener("click",t.__longpressClick__),t.addEventListener("touchmove",t.__longpressCancel__),t.addEventListener("touchend",t.__longpressCancel__),t.addEventListener("touchcancel",t.__longpressCancel__))},unbind(t){t.removeEventListener("contextmenu",t.__longpressContextmenu__),delete t.__longpressContextmenu__,b&&(t.removeEventListener("touchstart",t.__longpressStart__),t.removeEventListener("click",t.__longpressClick__),t.removeEventListener("touchmove",t.__longpressCancel__),t.removeEventListener("touchend",t.__longpressCancel__),t.removeEventListener("touchcancel",t.__longpressCancel__),delete t.__longpressStart__,delete t.__longpressClick__,delete t.__longpressCancel__)}};var jt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"markdown-body",domProps:{innerHTML:t._s(t.html)},on:{click:t.onCLick}})},Tt=[];const Et={name:"DialogMarkdown",props:{text:{type:String,default:""}},data(){return{mdi:null}},mounted(){this.copyCodeBlock()},updated(){this.copyCodeBlock()},computed:{html({text:t}){return gt(t)}},methods:{copyCodeBlock(){this.$el.querySelectorAll(".code-block-wrapper").forEach(s=>{const e=s.querySelector(".code-block-header__copy"),i=s.querySelector(".code-block-body");e&&i&&e.getAttribute("data-copy")!=="click"&&(e.setAttribute("data-copy","click"),e.addEventListener("click",()=>{var a,o,l;(a=navigator.clipboard)!=null&&a.writeText?navigator.clipboard.writeText((o=i.textContent)!=null?o:""):this.copyContent({text:(l=i.textContent)!=null?l:"",origin:!0})}))})},copyContent(t){const s={origin:!0,...t};let e;s.origin?e=document.createElement("textarea"):e=document.createElement("input"),e.setAttribute("readonly","readonly"),e.value=s.text,document.body.appendChild(e),e.select(),document.execCommand("copy")&&document.execCommand("copy"),document.body.removeChild(e)},onCLick(t){this.$emit("click",t)}}},L={};var It=d(Et,jt,Tt,!1,At,null,null,null);function At(t){for(let s in L)this[s]=L[s]}var vt=function(){return It.exports}(),Rt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-text no-dark-content"},[t.isOverdueMsg?e("div",{staticClass:"content-overdue"},[t._v(t._s(t.$L("\u6B64\u6D88\u606F\u5DF2\u7ECF\u8FC7\u671F")))]):t.msg.type==="md"?e("DialogMarkdown",{attrs:{text:t.msg.text},on:{click:t.viewText}}):e("pre",{domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msg.text,t.userId))},on:{click:t.viewText}}),t.translation?[e("div",{staticClass:"content-divider"},[e("span"),e("div",{staticClass:"divider-label translation-label",on:{click:t.viewText}},[t._v(t._s(t.translation.label))]),e("span")]),t.msg.type==="md"?e("DialogMarkdown",{staticClass:"content-translation",attrs:{text:t.translation.content}}):e("pre",{domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.translation.content,t.userId))}})]:t._e()],2)},Ft=[];const qt={components:{DialogMarkdown:vt},props:{msgId:Number,msg:Object,createdAt:String},computed:{...$(["cacheTranslations","cacheTranslationLanguage"]),translation({cacheTranslations:t,msgId:s,cacheTranslationLanguage:e}){const i=t.find(a=>a.key===`msg-${s}`&&a.language===e);return i||null},isOverdueMsg({msg:t,createdAt:s}){return t.text==="..."&&$A.dayjs(s).isBefore($A.daytz().subtract(10,"minute"))}},methods:{viewText(t){this.$emit("viewText",t)}}},x={};var Bt=d(qt,Rt,Ft,!1,Ot,null,null,null);function Ot(t){for(let s in x)this[s]=x[s]}var Vt=function(){return Bt.exports}(),Nt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-text no-dark-content"},[t.msg.type==="md"?e("DialogMarkdown",{attrs:{text:t.msg.text},on:{click:t.viewText}}):e("pre",{domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msg.text,t.userId))},on:{click:t.viewText}}),e("div",{staticClass:"content-longtext-footer"},[e("span",{on:{click:t.downFile}},[t._v(t._s(t.$L("\u67E5\u770B\u8BE6\u60C5")))])])],1)},Pt=[];const Ut={components:{DialogMarkdown:vt},props:{msgId:Number,msg:Object},methods:{viewText(t){this.$emit("viewText",t)},downFile(){this.$emit("downFile")}}},D={};var zt=d(Ut,Nt,Pt,!1,Ht,null,null,null);function Ht(t){for(let s in D)this[s]=D[s]}var Qt=function(){return zt.exports}(),Wt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{class:`content-file ${t.msg.type}`},[e("div",{staticClass:"dialog-file"},[t.msg.type==="img"?e("img",{staticClass:"file-img",style:t.imageStyle(t.msg),attrs:{src:t.imageSrc(t.msg)},on:{click:t.viewFile}}):t.isVideoFile(t.msg)?e("div",{staticClass:"file-video",style:t.imageStyle(t.msg),on:{click:t.viewFile}},[t.msg.thumb?e("img",{attrs:{src:t.msg.thumb}}):e("video",{attrs:{width:t.imageStyle(t.msg,"width"),height:t.imageStyle(t.msg,"height")}},[e("source",{attrs:{src:t.msg.path,type:"video/mp4"}})]),t._m(0)]):e("div",{staticClass:"file-box",on:{click:t.downFile}},[e("img",{staticClass:"file-thumb",attrs:{src:t.msg.thumb}}),e("div",{staticClass:"file-info"},[e("div",{staticClass:"file-name"},[t._v(t._s(t.msg.name))]),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msg.size)))])])]),t.msg.percentage?e("div",{staticClass:"file-percentage"},[e("span",{style:t.fileStyle(t.msg.percentage)})]):t._e()])])},Kt=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"file-play"},[e("div",{staticClass:"play-icon"},[e("i",{staticClass:"taskfont"},[t._v("\uE745")])])])}];const Yt={props:{msg:Object},methods:{viewFile(){this.$emit("viewFile")},downFile(){this.$emit("downFile")},fileStyle(t){return t?{width:`${t}%`}:{}},imageStyle({width:t,height:s,thumb:e},i="style"){if(t&&s){const a=$A.imageRatioExceed(t,s,3);$A.imageRatioJudge(e)&&a>0&&(t>s?t=s*a:s=t*a);let o=220,l=220,n=t,r=s;return(t>o||s>l)&&(t>s?(n=o,r=s*(o/t)):(n=t*(l/s),r=l)),i==="width"?n:i==="height"?r:{width:n+"px",height:r+"px"}}return i==="width"||i==="height"?0:{}},imageSrc({width:t,height:s,thumb:e}){const i=$A.imageRatioExceed(t,s,3);return $A.imageRatioJudge(e)&&i>0&&(e=$A.thumbRestore(e)+`/crop/ratio:${i},percentage:320x0`),e},isVideoFile(t){return t.type==="file"&&t.ext==="mp4"&&t.width>0&&t.height>0}}},S={};var Jt=d(Yt,Wt,Kt,!1,Xt,null,null,null);function Xt(t){for(let s in S)this[s]=S[s]}var Gt=function(){return Jt.exports}(),Zt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-record no-dark-content"},[e("div",{staticClass:"dialog-record",class:{playing:t.audioPlaying===t.msg.path},style:t.recordStyle(t.msg),on:{click:t.playRecord}},[e("div",{staticClass:"record-time"},[t._v(t._s(t.recordDuration(t.msg.duration)))]),e("div",{staticClass:"record-icon taskfont"})]),t.msg.text?[t._m(0),e("div",{staticClass:"content-additional"},[t._v(t._s(t.msg.text))])]:t._e(),t.translation?[e("div",{staticClass:"content-divider"},[e("span"),e("div",{staticClass:"divider-label translation-label",on:{click:t.viewText}},[t._v(t._s(t.translation.label))]),e("span")]),e("div",{staticClass:"content-additional"},[t._v(t._s(t.translation.content))])]:t._e()],2)},te=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-divider"},[e("span",{staticClass:"divider-full"})])}];const ee={props:{msgId:Number,msg:Object},computed:{...$(["audioPlaying","cacheTranslations","cacheTranslationLanguage"]),translation({cacheTranslations:t,msgId:s,cacheTranslationLanguage:e}){const i=t.find(a=>a.key===`msg-${s}`&&a.language===e);return i||null}},methods:{playRecord(){this.$emit("playRecord")},recordStyle(t){const{duration:s}=t;return{width:50+Math.min(180,Math.floor(s/200))+"px"}},recordDuration(t){const s=Math.floor(t/6e4),e=Math.floor(t/1e3)%60;return s>0?`${s}:${e}\u2033`:`${Math.max(1,e)}\u2033`},viewText(t){this.$emit("viewText",t)}}},M={};var se=d(ee,Zt,te,!1,ie,null,null,null);function ie(t){for(let s in M)this[s]=M[s]}var ae=function(){return se.exports}(),oe=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-location no-dark-content"},[e("div",{staticClass:"location-title"},[t._v(t._s(t.msg.title))]),t.msg.address?e("div",{staticClass:"location-address"},[t._v(t._s(t.msg.address))]):t._e(),e("div",{staticClass:"location-preview",style:t.imageStyle(t.msg)})])},re=[];const ne={props:{msg:Object},methods:{imageStyle({width:t,height:s,thumb:e}){if(!e)return{};const i={backgroundImage:`url(${e})`};if(t&&s){const a=$A.scaleToScale(t,s,600);i.backgroundSize=`${a.width}px ${a.height}px`}return i}}},j={};var le=d(ne,oe,re,!1,ce,null,null,null);function ce(t){for(let s in j)this[s]=j[s]}var de=function(){return le.exports}(),ue=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-meeting no-dark-content"},[e("ul",{staticClass:"dialog-meeting",class:{"meeting-end":!!t.msg.end_at}},[e("li",[e("em",[t._v(t._s(t.$L("\u4F1A\u8BAE\u4E3B\u9898")))]),t._v(" "+t._s(t.msg.name)+" ")]),e("li",[e("em",[t._v(t._s(t.$L("\u4F1A\u8BAE\u521B\u5EFA\u4EBA")))]),e("UserAvatar",{attrs:{userid:t.msg.userid,"show-icon":!1,"show-name":!0}})],1),e("li",[e("em",[t._v(t._s(t.$L("\u9891\u9053ID")))]),t._v(" "+t._s(t.channelID(t.msg.meetingid))+" ")]),t.msg.end_at?e("li",{staticClass:"meeting-operation"},[t._v(" "+t._s(t.$L("\u4F1A\u8BAE\u5DF2\u7ED3\u675F"))+" ")]):e("li",{staticClass:"meeting-operation",on:{click:t.openMeeting}},[t._v(" "+t._s(t.$L("\u70B9\u51FB\u52A0\u5165\u4F1A\u8BAE"))+" "),e("i",{staticClass:"taskfont"},[t._v("\uE68B")])])])])},he=[];const _e={props:{msg:Object},methods:{openMeeting(){this.$emit("openMeeting")},channelID(t){return t.replace(/^(.{3})(.{3})(.*)$/,"$1 $2 $3")}}},T={};var me=d(_e,ue,he,!1,pe,null,null,null);function pe(t){for(let s in T)this[s]=T[s]}var ve=function(){return me.exports}(),fe=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-text content-word-chain no-dark-content"},[e("pre",{domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msg.text,t.userId))}}),e("ul",{class:{expand:t.unfoldWordChainData.indexOf(t.msgId)!==-1}},[t._l((t.msg.list||[]).filter(function(i){return i.type=="case"}),function(i){return e("li",[t._v(" "+t._s(t.$L("\u4F8B"))+" "+t._s(i.text)+" ")])}),t._l((t.msg.list||[]).filter(function(i){return i.type!="case"&&i.text}),function(i,a){return e("li",[a==2&&t.msg.list.length>4?e("span",{staticClass:"expand",on:{click:t.unfoldWordChain}},[t._v(" ..."+t._s(t.$L("\u5C55\u5F00"))+"... ")]):t._e(),e("span",{class:{shrink:a>=2&&t.msg.list.length>4}},[t._v(" "+t._s(a+1)+". "+t._s(i.text)+" ")])])}),e("li",{staticClass:"participate",on:{click:t.onWordChain}},[t._v(" "+t._s(t.$L("\u53C2\u4E0E\u63A5\u9F99"))+" "),e("i",{staticClass:"taskfont"},[t._v("\uE703")])])],2)])},ge=[];const $e={props:{msg:Object,msgId:Number,unfoldWordChainData:Array},methods:{unfoldWordChain(){this.$emit("unfoldWordChain")},onWordChain(){this.$emit("onWordChain")}}},E={};var Ce=d($e,fe,ge,!1,we,null,null,null);function we(t){for(let s in E)this[s]=E[s]}var ke=function(){return Ce.exports}(),ye=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-text content-word-vote no-dark-content"},[e("div",{staticClass:"vote-msg-head"},[e("i",{staticClass:"taskfont"},[t._v("\uE7FD")]),e("em",[t._v(t._s(t.$L("\u6295\u7968")))]),e("span",[t._v(t._s(t.msg.multiple==1?t.$L("\u591A\u9009"):t.$L("\u5355\u9009")))]),e("span",[t._v(t._s(t.msg.anonymous==1?t.$L("\u533F\u540D"):t.$L("\u5B9E\u540D")))])]),e("pre",{domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msg.text,t.userId))}}),(t.msg.votes||[]).filter(function(i){return i.userid==t.userId}).length==0?[t.msg.multiple==0?e("RadioGroup",{attrs:{vertical:""},model:{value:t.voteData[t.msg.uuid],callback:function(i){t.$set(t.voteData,t.msg.uuid,i)},expression:"voteData[msg.uuid]"}},t._l(t.msg.list||[],function(i,a){return e("Radio",{key:a,attrs:{label:i.id}},[t._v(" "+t._s(i.text)+" ")])}),1):e("CheckboxGroup",{model:{value:t.voteData[t.msg.uuid],callback:function(i){t.$set(t.voteData,t.msg.uuid,i)},expression:"voteData[msg.uuid]"}},t._l(t.msg.list||[],function(i,a){return e("Checkbox",{key:a,attrs:{label:i.id}},[t._v(" "+t._s(i.text)+" ")])}),1),e("div",{staticClass:"btn-row"},[(t.voteData[t.msg.uuid]||[]).length==0?e("Button",{staticClass:"ivu-btn-grey",attrs:{disabled:""}},[t._v(t._s(t.$L("\u8BF7\u9009\u62E9\u540E\u6295\u7968")))]):e("Button",{staticClass:"no-dark-content",attrs:{type:"warning",loading:t.msg._loadIng>0},on:{click:function(i){return t.onVote("vote")}}},[t._v(t._s(t.$L("\u7ACB\u5373\u6295\u7968")))])],1)]:[e("div",{staticClass:"vote-result-body"},[e("ul",t._l(t.msg.list||[],function(i){return e("li",[e("div",{staticClass:"vote-option-title"},[t._v(t._s(i.text))]),e("div",{staticClass:"ticket-num"},[e("span",[t._v(t._s(t.getVoteProgress(t.msg,i.id).num)+t._s(t.$L("\u7968")))]),e("span",[t._v(t._s(t.getVoteProgress(t.msg,i.id).progress+"%"))])]),e("Progress",{attrs:{percent:Number(t.getVoteProgress(t.msg,i.id).progress),"stroke-width":5,"hide-info":""}}),t.msg.anonymous==0?e("div",{staticClass:"avatar-row"},[t._l((t.msg.votes||[]).filter(function(a){return a.votes.indexOf(i.id)!=-1}),function(a){return[e("UserAvatar",{attrs:{userid:a.userid,size:18}})]})],2):t._e()],1)}),0)]),t.msg.state==1&&t.msg.userid==t.userId?e("div",{staticClass:"btn-row"},[e("Button",{attrs:{type:"warning",loading:t.msg._loadIng>0},on:{click:function(i){return t.onVote("again")}}},[t._v(t._s(t.$L("\u518D\u6B21\u53D1\u9001")))]),e("Button",{attrs:{type:"warning",loading:t.msg._loadIng>0},on:{click:function(i){return t.onVote("finish")}}},[t._v(t._s(t.$L("\u7ED3\u675F\u6295\u7968")))])],1):t._e()]],2)},be=[];const Le={props:{msg:Object,voteData:Object},methods:{getVoteProgress(t,s){const e=t.votes.filter(a=>(a.votes||"").indexOf(s)!=-1).length,i=e?(e/t.votes.length*100).toFixed(2):"0.00";return{num:e,progress:i}},onVote(t){this.$emit("onVote",t)}}},I={};var xe=d(Le,ye,be,!1,De,null,null,null);function De(t){for(let s in I)this[s]=I[s]}var Se=function(){return xe.exports}(),Me=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[t._v(" "+t._s(t.$L("\u60A8\u597D\uFF0C\u6211\u662F\u673A\u5668\u4EBA"))+"\uFF1A"+t._s(t.msg.data.nickname)+"\uFF0C"+t._s(t.$L("\u6211\u7684\u673A\u5668\u4EBAID\u662F"))+"\uFF1A"+t._s(t.msg.data.userid)+"\uFF0C"+t._s(t.$L("\u4F60\u53EF\u4EE5\u53D1\u9001"))+" "),e("span",{staticClass:"mark-color"},[t._v("/help")]),t._v(" "+t._s(t.$L("\u67E5\u770B\u6211\u652F\u6301\u4EC0\u4E48\u547D\u4EE4"))+"\u3002 ")])},je=[];const Te={props:{msg:Object},data(){return{}},computed:{},methods:{}},A={};var Ee=d(Te,Me,je,!1,Ie,null,null,null);function Ie(t){for(let s in A)this[s]=A[s]}var Ae=function(){return Ee.exports}(),Re=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[t._v(t._s(t.$L("\u60A8\u53EF\u4EE5\u901A\u8FC7\u53D1\u9001\u4EE5\u4E0B\u547D\u4EE4\u6765\u63A7\u5236\u6211"))+"\uFF1A")]),e("p",[t._v("\xA0")]),t.msg.manager?[e("p",[e("span",{staticClass:"mark-color"},[t._v("/list")]),t._v(" - "+t._s(t.$L("\u673A\u5668\u4EBA\u5217\u8868")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("/newbot ("+t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+")")]),t._v(" - "+t._s(t.$L("\u521B\u5EFA\u673A\u5668\u4EBA")))])]:[e("p",[e("span",{staticClass:"mark-color"},[t._v("/info")]),t._v(" - "+t._s(t.$L("\u67E5\u770B\u673A\u5668\u4EBA\u8BE6\u60C5")))])],e("p",[t._v("\xA0")]),e("p",[e("b",[t._v(t._s(t.$L("\u4FEE\u6539\u673A\u5668\u4EBA")))])]),e("p",[e("span",{staticClass:"mark-color"},[t._v("/setname"+t._s(t.IDLabel)+" ("+t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+")")]),t._v(" - "+t._s(t.$L("\u4FEE\u6539\u673A\u5668\u4EBA\u540D\u79F0")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("/deletebot"+t._s(t.IDLabel))]),t._v(" - "+t._s(t.$L("\u5220\u9664\u673A\u5668\u4EBA")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("/clearday"+t._s(t.IDLabel)+" ("+t._s(t.$L("\u5929\u6570"))+")")]),t._v(" - "+t._s(t.$L("\u8BBE\u7F6E\u4FDD\u7559\u6D88\u606F\u65F6\u95F4\uFF08\u9ED8\u8BA430\u5929\uFF09")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("/webhook"+t._s(t.IDLabel)+" [url]")]),t._v(" - "+t._s(t.$L("\u8BBE\u7F6E\u6D88\u606FWebhook\uFF08\u8BE6\u60C5\u8BF7\u770B API\u63A5\u53E3\u6587\u6863\uFF09")))]),e("p",[t._v("\xA0")]),e("p",[e("b",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u8BBE\u7F6E")))])]),e("p",[e("span",{staticClass:"mark-color"},[t._v("/token"+t._s(t.IDLabel))]),t._v(" - "+t._s(t.$L("\u751F\u6210Token\u4EE4\u724C")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("/revoke"+t._s(t.IDLabel))]),t._v(" - "+t._s(t.$L("\u64A4\u9500\u673A\u5668\u4EBAToken\u4EE4\u724C")))]),e("p",[t._v("\xA0")]),e("p",[e("b",[t._v(t._s(t.$L("\u4F1A\u8BDD\u7BA1\u7406")))])]),e("p",[e("span",{staticClass:"mark-color"},[t._v("/dialog"+t._s(t.IDLabel)+" ["+t._s(t.$L("\u641C\u7D22\u5173\u952E\u8BCD"))+"]")]),t._v(" - "+t._s(t.$L("\u67E5\u770B\u4F1A\u8BDDID")))]),e("p",[t._v("\xA0")]),e("p",[e("b",[t._v(t._s(t.$L("API\u63A5\u53E3\u6587\u6863")))])]),e("p",[e("span",{staticClass:"mark-color"},[t._v("/api")]),t._v(" - "+t._s(t.$L("\u67E5\u770B\u63A5\u53E3\u5217\u8868")))])],2)},Fe=[];const qe={props:{msg:Object},data(){return{}},computed:{IDLabel(){return this.msg.manager?this.$L(" {\u673A\u5668\u4EBAID}"):""}}},R={};var Be=d(qe,Re,Fe,!1,Oe,null,null,null);function Oe(t){for(let s in R)this[s]=R[s]}var Ve=function(){return Be.exports}(),Ne=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u6211\u7684\u673A\u5668\u4EBA")))])]),e("p",[t._v("\xA0")]),e("p",[e("b",[t._v(t._s(t.$L("ID | \u540D\u79F0 | \u6E05\u7406\u65F6\u95F4 | Webhook")))])]),t._l(t.msg.data,function(i){return e("p",[t._v(t._s(i.userid)+" | "+t._s(i.nickname)+" | "+t._s(i.clear_day)+" | "+t._s(i.webhook_url?"\u2705":"-"))])})],2)},Pe=[];const Ue={props:{msg:Object},data(){return{}},computed:{},methods:{}},F={};var ze=d(Ue,Ne,Pe,!1,He,null,null,null);function He(t){for(let s in F)this[s]=F[s]}var Qe=function(){return ze.exports}(),We=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u8BE6\u60C5")))])]),e("p",[t._v("\xA0")]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBAID"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.userid))])]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.nickname))])]),e("p",[t._v(t._s(t.$L("\u4FDD\u7559\u6D88\u606F\u65F6\u95F4"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.clear_day))])]),e("p",[t._v(t._s(t.$L("\u6700\u540E\u4E00\u6B21\u6E05\u7406\u65F6\u95F4"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.clear_at||"-"))])]),e("p",[t._v(t._s(t.$L("Webhook\u5730\u5740"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.webhook_url||"-"))])]),e("p",[t._v(t._s(t.$L("Webhook\u8BF7\u6C42\u6B21\u6570"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.webhook_num))])])])},Ke=[];const Ye={props:{msg:Object},data(){return{}},computed:{},methods:{}},q={};var Je=d(Ye,We,Ke,!1,Xe,null,null,null);function Xe(t){for(let s in q)this[s]=q[s]}var Ge=function(){return Je.exports}(),Ze=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u521B\u5EFA\u6210\u529F")))])]),e("p",[t._v("\xA0")]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBAID"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.userid))])]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.nickname))])])])},ts=[];const es={props:{msg:Object},data(){return{}},computed:{},methods:{}},B={};var ss=d(es,Ze,ts,!1,is,null,null,null);function is(t){for(let s in B)this[s]=B[s]}var as=function(){return ss.exports}(),os=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u8BBE\u7F6E\u540D\u79F0\u6210\u529F")))])]),e("p",[t._v("\xA0")]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBAID"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.userid))])]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.nickname))])])])},rs=[];const ns={props:{msg:Object},data(){return{}},computed:{},methods:{}},O={};var ls=d(ns,os,rs,!1,cs,null,null,null);function cs(t){for(let s in O)this[s]=O[s]}var ds=function(){return ls.exports}(),us=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u5220\u9664\u6210\u529F")))])]),e("p",[t._v("\xA0")]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBAID"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.userid))])]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.nickname))])])])},hs=[];const _s={props:{msg:Object},data(){return{}},computed:{},methods:{}},V={};var ms=d(_s,us,hs,!1,ps,null,null,null);function ps(t){for(let s in V)this[s]=V[s]}var vs=function(){return ms.exports}(),fs=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u751F\u6210Token\u4EE4\u724C")))])]),e("p",[t._v("\xA0")]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBAID"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.userid))])]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.nickname))])]),e("p",[t._v("Token\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.token))])])])},gs=[];const $s={props:{msg:Object},data(){return{}},computed:{},methods:{}},N={};var Cs=d($s,fs,gs,!1,ws,null,null,null);function ws(t){for(let s in N)this[s]=N[s]}var ks=function(){return Cs.exports}(),ys=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u64A4\u9500\u673A\u5668\u4EBAToken\u4EE4\u724C")))])]),e("p",[t._v("\xA0")]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBAID"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.userid))])]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.nickname))])])])},bs=[];const Ls={props:{msg:Object},data(){return{}},computed:{},methods:{}},P={};var xs=d(Ls,ys,bs,!1,Ds,null,null,null);function Ds(t){for(let s in P)this[s]=P[s]}var Ss=function(){return xs.exports}(),Ms=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u8BBE\u7F6EWebhook\u5730\u5740")))])]),e("p",[t._v("\xA0")]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBAID"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.userid))])]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.nickname))])]),e("p",[t._v(t._s(t.$L("Webhook\u5730\u5740"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.webhook_url))])])])},js=[];const Ts={props:{msg:Object},data(){return{}},computed:{},methods:{}},U={};var Es=d(Ts,Ms,js,!1,Is,null,null,null);function Is(t){for(let s in U)this[s]=U[s]}var As=function(){return Es.exports}(),Rs=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u8BBE\u7F6E\u4FDD\u7559\u6D88\u606F\u65F6\u95F4")))])]),e("p",[t._v("\xA0")]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBAID"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.userid))])]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u540D\u79F0"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.nickname))])]),e("p",[t._v(t._s(t.$L("\u6E05\u7406\u5468\u671F"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.clear_day)+t._s(t.$L("\u5929")))])]),e("p",[t._v(t._s(t.$L("\u4E0B\u6B21\u6E05\u7406"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.clear_at))])])])},Fs=[];const qs={props:{msg:Object},data(){return{}},computed:{},methods:{}},z={};var Bs=d(qs,Rs,Fs,!1,Os,null,null,null);function Os(t){for(let s in z)this[s]=z[s]}var Vs=function(){return Bs.exports}(),Ns=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L("\u673A\u5668\u4EBA"))+" "),e("span",{staticClass:"mark-color"},[t._v(t._s(t.msg.data.nickname)+" (ID:"+t._s(t.msg.data.userid)+")")]),t._v(" "+t._s(t.$L("\u5DF2\u52A0\u5165\u7684\u4F1A\u8BDD"))+"\uFF1A")])]),e("p",[t._v("\xA0")]),e("p",[e("b",[t._v(t._s(t.$L("\u4F1A\u8BDDID | \u4F1A\u8BDD\u540D\u79F0")))])]),t._l(t.msg.data.list,function(i){return e("p",[t._v(" "+t._s(i.id)+" | "+t._s(i.name)+t._s(i.type=="user"?t.$L(" (\u4E2A\u4EBA)"):"")+" ")])})],2)},Ps=[];const Us={props:{msg:Object},data(){return{}},computed:{},methods:{}},H={};var zs=d(Us,Ns,Ps,!1,Hs,null,null,null);function Hs(t){for(let s in H)this[s]=H[s]}var Qs=function(){return zs.exports}(),Ws=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[t._v(t._s(t.$L("\u4F60\u53EF\u4EE5\u901A\u8FC7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u6765\u8BF7\u6C42\u6211"))+":")]),e("p",[t._v("\xA0")]),e("p",[e("b",[t._v(t._s(t.$L("\u53D1\u9001\u6587\u672C\u6D88\u606F"))+"\uFF1A")])]),e("p",[t._v("curl --request POST '"+t._s(t.$A.apiUrl("dialog/msg/sendtext"))+"' \\")]),e("p",[t._v("--header 'version: "+t._s(t.msg.version)+"' \\")]),e("p",[t._v("--header 'token: "),e("span",{staticClass:"mark-color"},[t._v(t._s(t.$L("\u673A\u5668\u4EBAToken")))]),t._v("' \\")]),e("p",[t._v(`--form 'dialog_id="`),e("span",{staticClass:"mark-color"},[t._v(t._s(t.$L("\u5BF9\u8BDDID")))]),t._v(`"' \\`)]),e("p",[t._v(`--form 'text="`),e("span",{staticClass:"mark-color"},[t._v(t._s(t.$L("\u6D88\u606F\u5185\u5BB9")))]),t._v(`"'`)]),t._m(0),e("p",[t._v(`--form 'key="`),e("span",{staticClass:"mark-color"},[t._v(t._s(t.$L("\u641C\u7D22\u8BCD (\u7559\u7A7A\u81EA\u52A8\u751F\u6210)")))]),t._v(`"'`)]),t._m(1),e("p",[t._v(`--form 'reply_id="`),e("span",{staticClass:"mark-color"},[t._v(t._s(t.$L("\u56DE\u590D\u6307\u5B9A\u6D88\u606FID")))]),t._v(`"'`)]),e("p",[t._v("\xA0")]),e("p",[e("b",[t._v(t._s(t.$L("Webhook\u8BF4\u660E"))+"\uFF1A")])]),e("p",[t._v(t._s(t.$L("\u673A\u5668\u4EBA\u6536\u5230\u6D88\u606F\u540E\u4F1A\u5C06\u6D88\u606FPOST\u63A8\u9001\u5230Webhook\u5730\u5740\uFF0C\u8BF7\u6C42\u8D85\u65F6\u4E3A10\u79D2\uFF0C\u8BF7\u6C42\u53C2\u6570\u5982\u4E0B"))+"\uFF1A")]),e("p",[e("span",{staticClass:"mark-color"},[t._v("text")]),t._v(": "+t._s(t.$L("\u6D88\u606F\u6587\u672C")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("token")]),t._v(": "+t._s(t.$L("\u673A\u5668\u4EBAToken")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("dialog_id")]),t._v(": "+t._s(t.$L("\u5BF9\u8BDDID")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("dialog_type")]),t._v(": "+t._s(t.$L("\u5BF9\u8BDD\u7C7B\u578B")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("msg_id")]),t._v(": "+t._s(t.$L("\u6D88\u606FID")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("msg_uid")]),t._v(": "+t._s(t.$L("\u6D88\u606F\u53D1\u9001\u4EBAID")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("mention")]),t._v(": "+t._s(t.$L("\u662F\u5426\u88AB@\u5230")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("bot_uid")]),t._v(": "+t._s(t.$L("\u673A\u5668\u4EBAID")))]),e("p",[e("span",{staticClass:"mark-color"},[t._v("version")]),t._v(": "+t._s(t.$L("\u7CFB\u7EDF\u7248\u672C")))])])},Ks=[function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("p",[t._v(`--form 'text_type="`),e("span",{staticClass:"mark-color"},[t._v("[html|md]")]),t._v(`"'`)])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("p",[t._v(`--form 'silence="`),e("span",{staticClass:"mark-color"},[t._v("[yes|no]")]),t._v(`"'`)])}];const Ys={props:{msg:Object},data(){return{}},computed:{},methods:{}},Q={};var Js=d(Ys,Ws,Ks,!1,Xs,null,null,null);function Xs(t){for(let s in Q)this[s]=Q[s]}var Gs=function(){return Js.exports}(),Zs=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"open-approve-details",attrs:{"data-id":t.msg.data.id}},[e("b",[t._v(t._s(t.$L(`${t.msg.data.nickname} \u63D0\u4EA4\u7684\u300C${t.msg.data.proc_def_name}\u300D\u5F85\u4F60\u5BA1\u6279`)))]),e("div",{staticClass:"cause"},[e("p",[t._v(t._s(t.$L("\u7533\u8BF7\u4EBA"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v("@"+t._s(t.msg.data.nickname))]),t._v(" "+t._s(t.msg.data.department))]),e("b",[t._v(t._s(t.$L("\u8BE6\u60C5")))]),t.$A.strExists(t.msg.data.proc_def_name,"\u8BF7\u5047")&&t.msg.data.type?e("p",[t._v(t._s(t.$L("\u5047\u671F\u7C7B\u578B"))+"\uFF1A"+t._s(t.$L(t.msg.data.type)))]):t._e(),e("p",[t._v(t._s(t.$L("\u5F00\u59CB\u65F6\u95F4"))+"\uFF1A"+t._s(t.msg.data.start_time)+" ("+t._s(t.$L(t.msg.data.start_day_of_week))+")")]),e("p",[t._v(t._s(t.$L("\u7ED3\u675F\u65F6\u95F4"))+"\uFF1A"+t._s(t.msg.data.end_time)+" ("+t._s(t.$L(t.msg.data.end_day_of_week))+")")]),e("p",[t._v(t._s(t.$L("\u4E8B\u7531"))+"\uFF1A"+t._s(t.msg.data.description))]),t.msg.data.thumb?e("p",{domProps:{innerHTML:t._s(t.imageHtml(t.msg.data.thumb))}}):t._e()]),e("div",{staticClass:"btn-raw no-dark-content"},[t.msg.action==="pass"?e("button",{staticClass:"ivu-btn ivu-btn-grey"},[t._v(t._s(t.$L("\u5DF2\u540C\u610F")))]):t.msg.action==="refuse"?e("button",{staticClass:"ivu-btn ivu-btn-grey rejected"},[t._v(t._s(t.$L("\u5DF2\u62D2\u7EDD")))]):t.msg.action==="withdraw"?e("button",{staticClass:"ivu-btn ivu-btn-grey revoked"},[t._v(t._s(t.$L("\u5DF2\u64A4\u9500")))]):[e("button",{staticClass:"ivu-btn ivu-btn-primary"},[t._v(t._s(t.$L("\u540C\u610F")))]),e("button",{staticClass:"ivu-btn ivu-btn-error"},[t._v(t._s(t.$L("\u62D2\u7EDD")))])]],2)])},ti=[];const ei={props:{msg:Object},data(){return{}},methods:{imageHtml(t){const s=$A.imageRatioHandle({src:t.url,width:t.width,height:t.height,crops:{ratio:5,percentage:"320x0"},scaleSize:220});return`<img src="${s.src}" width="${s.width}" height="${s.height}" />`}}},W={};var si=d(ei,Zs,ti,!1,ii,null,null,null);function ii(t){for(let s in W)this[s]=W[s]}var ai=function(){return si.exports}(),oi=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"open-approve-details",attrs:{"data-id":t.msg.data.id}},[e("b",[t._v(t._s(t.$L(`\u6284\u9001 ${t.msg.data.nickname} \u63D0\u4EA4\u7684\u300C${t.msg.data.proc_def_name}\u300D\u8BB0\u5F55`)))]),e("div",{staticClass:"cause"},[e("p",[t._v(t._s(t.$L("\u7533\u8BF7\u4EBA"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v("@"+t._s(t.msg.data.nickname))]),t._v(" "+t._s(t.msg.data.department))]),e("b",[t._v(t._s(t.$L("\u8BE6\u60C5")))]),t.$A.strExists(t.msg.data.proc_def_name,"\u8BF7\u5047")&&t.msg.data.type?e("p",[t._v(t._s(t.$L("\u5047\u671F\u7C7B\u578B"))+"\uFF1A"+t._s(t.$L(t.msg.data.type)))]):t._e(),e("p",[t._v(t._s(t.$L("\u5F00\u59CB\u65F6\u95F4"))+"\uFF1A"+t._s(t.msg.data.start_time)+" ("+t._s(t.$L(t.msg.data.start_day_of_week))+")")]),e("p",[t._v(t._s(t.$L("\u7ED3\u675F\u65F6\u95F4"))+"\uFF1A"+t._s(t.msg.data.end_time)+" ("+t._s(t.$L(t.msg.data.end_day_of_week))+")")]),e("p",[t._v(t._s(t.$L("\u4E8B\u7531"))+"\uFF1A"+t._s(t.msg.data.description))])]),e("div",{staticClass:"btn-raw no-dark-content"},[t.msg.is_finished?e("button",{staticClass:"ivu-btn ivu-btn-grey"},[t._v(t._s(t.$L("\u5DF2\u540C\u610F")))]):e("button",{staticClass:"ivu-btn ivu-btn-grey"},[t._v(t._s(t.$L("\u67E5\u770B\u8BE6\u60C5")))])])])},ri=[];const ni={props:{msg:Object},data(){return{}},computed:{},methods:{}},K={};var li=d(ni,oi,ri,!1,ci,null,null,null);function ci(t){for(let s in K)this[s]=K[s]}var di=function(){return li.exports}(),ui=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"open-approve-details",attrs:{"data-id":t.msg.data.id}},[e("b",[t._v(t._s(t.$L(`${t.msg.data.comment_nickname} \u8BC4\u8BBA\u4E86 ${t.msg.data.nickname} \u7684\u300C${t.msg.data.proc_def_name}\u300D\u5BA1\u6279`)))]),e("div",{staticClass:"cause"},[e("p",[t._v(t._s(t.$L("\u7533\u8BF7\u4EBA"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v("@"+t._s(t.msg.data.nickname))]),t._v(" "+t._s(t.msg.data.department))]),e("b",[t._v(t._s(t.$L("\u8BC4\u8BBA\u5185\u5BB9")))]),e("p",[t._v(t._s(t.msg.data.comment_content))]),t.msg.data.thumb?e("p",{domProps:{innerHTML:t._s(t.imageHtml(t.msg.data.thumb))}}):t._e()]),e("div",{staticClass:"btn-raw no-dark-content"},[e("button",{staticClass:"ivu-btn ivu-btn-grey"},[t._v(t._s(t.$L("\u67E5\u770B\u8BE6\u60C5")))])])])},hi=[];const _i={props:{msg:Object},data(){return{}},methods:{imageHtml(t){const s=$A.imageRatioHandle({src:t.url,width:t.width,height:t.height,crops:{ratio:5,percentage:"320x0"},scaleSize:220});return`<img src="${s.src}" width="${s.width}" height="${s.height}" />`}}},Y={};var mi=d(_i,ui,hi,!1,pi,null,null,null);function pi(t){for(let s in Y)this[s]=Y[s]}var vi=function(){return mi.exports}(),fi=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"open-approve-details",attrs:{"data-id":t.msg.data.id}},[e("b",[t._v(t._s(t.$L(t.title)))]),e("div",{staticClass:"cause"},[e("p",[t._v(t._s(t.$L("\u7533\u8BF7\u4EBA"))+"\uFF1A"),e("span",{staticClass:"mark-color"},[t._v("@"+t._s(t.msg.data.start_nickname))]),t._v(" "+t._s(t.msg.data.department))]),e("b",[t._v(t._s(t.$L("\u8BE6\u60C5")))]),t.$A.strExists(t.msg.data.proc_def_name,"\u8BF7\u5047")&&t.msg.data.type?e("p",[t._v(t._s(t.$L("\u5047\u671F\u7C7B\u578B"))+"\uFF1A"+t._s(t.$L(t.msg.data.type)))]):t._e(),e("p",[t._v(t._s(t.$L("\u5F00\u59CB\u65F6\u95F4"))+"\uFF1A"+t._s(t.msg.data.start_time)+" ("+t._s(t.$L(t.msg.data.start_day_of_week))+")")]),e("p",[t._v(t._s(t.$L("\u7ED3\u675F\u65F6\u95F4"))+"\uFF1A"+t._s(t.msg.data.end_time)+" ("+t._s(t.$L(t.msg.data.end_day_of_week))+")")]),e("p",[t._v(t._s(t.$L("\u4E8B\u7531"))+"\uFF1A"+t._s(t.msg.data.description))])]),e("div",{staticClass:"btn-raw no-dark-content"},[t.msg.action==="pass"?e("button",{staticClass:"ivu-btn ivu-btn-grey"},[t._v(t._s(t.$L("\u5DF2\u540C\u610F")))]):t.msg.action==="refuse"?e("button",{staticClass:"ivu-btn ivu-btn-grey rejected"},[t._v(t._s(t.$L("\u5DF2\u62D2\u7EDD")))]):t.msg.action==="withdraw"?e("button",{staticClass:"ivu-btn ivu-btn-grey revoked"},[t._v(t._s(t.$L("\u5DF2\u64A4\u9500")))]):t._e()])])},gi=[];const $i={props:{msg:Object},data(){return{}},computed:{title({msg:t}){return t.action==="pass"?`\u60A8\u53D1\u8D77\u7684\u300C${t.data.proc_def_name}\u300D\u5DF2\u901A\u8FC7`:`\u60A8\u53D1\u8D77\u7684\u300C${t.data.proc_def_name}\u300D\u88AB ${t.data.nickname} \u62D2\u7EDD`}},methods:{}},J={};var Ci=d($i,fi,gi,!1,wi,null,null,null);function wi(t){for(let s in J)this[s]=J[s]}var ki=function(){return Ci.exports}(),yi=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[t._v(t._s(t.$L(t.msg.title)))]),e("p",[t._v("\xA0")]),t._l(t.msg.list,function(i){return e("p",[e("span",{staticClass:"mention task",attrs:{"data-id":i.id}},[t._v("#"+t._s(i.name))])])})],2)},bi=[];const Li={props:{msg:Object},data(){return{}},computed:{},methods:{}},X={};var xi=d(Li,yi,bi,!1,Di,null,null,null);function Di(t){for(let s in X)this[s]=X[s]}var Si=function(){return xi.exports}(),Mi=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[e("p",[e("b",[t._v(t._s(t.$L(t.msg.title)))])]),e("p",[t._v("\xA0")]),e("p",[t._v(t._s(t.$L("\u6587\u4EF6\u540D"))+": "+t._s(t.msg.name))]),e("p",[t._v(t._s(t.$L("\u6587\u4EF6\u5927\u5C0F"))+": "+t._s(t.$A.bytesToSize(t.msg.size)))]),e("p",{staticStyle:{"margin-top":"10px"}},[e("Button",{staticClass:"no-dark-content",attrs:{to:t.msg.url,target:"_blank",type:"warning"}},[t._v(t._s(t.$L("\u7ACB\u5373\u4E0B\u8F7D")))])],1)])},ji=[];const Ti={props:{msg:Object},data(){return{}},computed:{},methods:{}},G={};var Ei=d(Ti,Mi,ji,!1,Ii,null,null,null);function Ii(t){for(let s in G)this[s]=G[s]}var Ai=function(){return Ei.exports}(),Ri=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",t._l(t.items,function(i,a){return e("p",{key:a,style:i.style},[t._v(t._s(i.content))])}),0)},Fi=[];const qi={props:{msg:Object},data(){return{}},computed:{items({msg:t}){const{content:s}=t;return $A.isArray(s)?s.map(e=>this.formatContent(e)):[this.formatContent(s)]}},methods:{formatContent(t){return $A.isJson(t)?{content:t.language===!1||this.msg.source==="api"?t.content:this.$L(t.content),style:t.style||{}}:{content:this.$L(t),style:{}}}}},Z={};var Bi=d(qi,Ri,Fi,!1,Oi,null,null,null);function Oi(t){for(let s in Z)this[s]=Z[s]}var Vi=function(){return Bi.exports}(),Ni=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.isBot?e("div",[t._v(" "+t._s(t.$L("\u4E0D\u652F\u6301\u7684\u6307\u4EE4"))+" "),e("span",{staticClass:"warning-color"},[t._v(t._s(t.msg.type))]),t._v("\uFF0C"+t._s(t.$L("\u4F60\u53EF\u4EE5\u53D1\u9001"))+" "),e("span",{staticClass:"mark-color"},[t._v("/help")]),t._v(" "+t._s(t.$L("\u67E5\u770B\u5E2E\u52A9\u83DC\u5355"))+"\u3002 ")]):e("div",[t._v(" "+t._s(t.$L("\u672A\u77E5\u7684\u6D88\u606F"))+" ")])},Pi=[];const Ui={props:{msg:Object},data(){return{}},computed:{isBot(){return/^\//.test(this.msg.type)}},methods:{}},tt={};var zi=d(Ui,Ni,Pi,!1,Hi,null,null,null);function Hi(t){for(let s in tt)this[s]=tt[s]}var Qi=function(){return zi.exports}(),Wi=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{class:`content-template no-dark-content ${t.msg.type}`,on:{click:t.viewText}},[e(t.currentTemplate,{tag:"component",attrs:{msg:t.msg}})],1)},Ki=[];const Yi={props:{msg:Object},data(){return{}},computed:{currentTemplate(){switch(this.msg.type){case"/hello":return Ae;case"/help":return Ve;case"/list":return Qe;case"/info":return Ge;case"/newbot":return as;case"/setname":return ds;case"/deletebot":return vs;case"/token":return ks;case"/revoke":return Ss;case"/webhook":return As;case"/clearday":return Vs;case"/dialog":return Qs;case"/api":return Gs;case"approve_reviewer":return ai;case"approve_notifier":return di;case"approve_comment_notifier":return vi;case"approve_submitter":return ki;case"task_list":return Si;case"file_download":return Ai;case"content":return Vi;default:return Qi}}},methods:{viewText(t){this.$emit("viewText",t)}}},et={};var Ji=d(Yi,Wi,Ki,!1,Xi,null,null,null);function Xi(t){for(let s in et)this[s]=et[s]}var Gi=function(){return Ji.exports}(),Zi=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-loading"},[t.error===!0?e("Icon",{attrs:{type:"ios-alert-outline"}}):e("Loading")],1)},ta=[];const ea={props:{error:Boolean}},st={};var sa=d(ea,Zi,ta,!1,ia,null,null,null);function ia(t){for(let s in st)this[s]=st[s]}var aa=function(){return sa.exports}(),oa=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("\u672A\u77E5\u7684\u6D88\u606F")))])},ra=[];const na={},it={};var la=d(na,oa,ra,!1,ca,null,null,null);function ca(t){for(let s in it)this[s]=it[s]}var da=function(){return la.exports}(),ua=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"dialog-view",class:t.viewClass,attrs:{"data-id":t.msgData.id}},[t.dialogType==="group"?e("div",{staticClass:"dialog-username"},[e("UserAvatar",{attrs:{userid:t.msgData.userid,"show-icon":!1,"show-name":!0,"click-open-dialog":""}})],1):t._e(),e("div",{directives:[{name:"longpress",rawName:"v-longpress",value:{callback:t.handleLongpress,delay:300},expression:"{callback: handleLongpress, delay: 300}"}],staticClass:"dialog-head",class:t.headClass,on:{click:t.handleClick}},[!t.hideReply&&t.msgData.reply_id&&t.showReplyData(t.msgData.msg.reply_data)?e("div",{staticClass:"dialog-reply no-dark-content",on:{click:t.viewReply}},[e("div",{staticClass:"reply-avatar"},[e("UserAvatar",{attrs:{userid:t.msgData.msg.reply_data.userid,"show-icon":!1,"show-name":!0}})],1),e("div",{staticClass:"reply-desc",domProps:{innerHTML:t._s(t.$A.getMsgSimpleDesc(t.msgData.msg.reply_data,"image-preview"))}})]):t._e(),!t.hideForward&&t.msgData.forward_id&&t.showForwardData(t.msgData.msg.forward_data)?e("div",{staticClass:"dialog-reply no-dark-content",on:{click:function(i){return t.openDialog(t.msgData.msg.forward_data.userid)}}},[e("div",{staticClass:"reply-avatar"},[e("UserAvatar",{attrs:{userid:t.msgData.msg.forward_data.userid,"show-icon":!1,"show-name":!0}})],1)]):t._e(),e("div",{ref:"content",staticClass:"dialog-content",class:t.contentClass},[t.msgData.type==="text"?e("TextMsg",{attrs:{msgId:t.msgData.id,msg:t.msgData.msg,createdAt:t.msgData.created_at},on:{viewText:t.viewText}}):t.msgData.type==="longtext"?e("LongTextMsg",{attrs:{msgId:t.msgData.id,msg:t.msgData.msg},on:{viewText:t.viewText,downFile:t.downFile}}):t.msgData.type==="file"?e("FileMsg",{attrs:{msg:t.msgData.msg},on:{viewFile:t.viewFile,downFile:t.downFile}}):t.msgData.type==="record"?e("RecordMsg",{attrs:{msgId:t.msgData.id,msg:t.msgData.msg},on:{playRecord:t.playRecord}}):t.msgData.type==="location"?e("LocationMsg",{attrs:{msg:t.msgData.msg}}):t.msgData.type==="meeting"?e("MeetingMsg",{attrs:{msg:t.msgData.msg},on:{openMeeting:t.openMeeting}}):t.msgData.type==="word-chain"?e("WordChainMsg",{attrs:{msg:t.msgData.msg,msgId:t.msgData.id,unfoldWordChainData:t.unfoldWordChainData},on:{unfoldWordChain:function(i){return t.unfoldWordChain(t.msgData)},onWordChain:t.onWordChain}}):t.msgData.type==="vote"?e("VoteMsg",{attrs:{msg:t.msgData.msg,voteData:t.voteData},on:{onVote:function(i){return t.onVote(i,t.msgData)}}}):t.msgData.type==="template"?e("TemplateMsg",{attrs:{msg:t.msgData.msg},on:{viewText:t.viewText}}):t.isLoading?e("LoadMsg",{attrs:{error:t.msgData.error}}):e("UnknownMsg")],1),t.$A.arrayLength(t.msgData.emoji)>0?e("ul",{staticClass:"dialog-emoji"},t._l(t.msgData.emoji,function(i,a){return e("li",{key:a,class:{hasme:i.userids.includes(t.userId)}},[e("div",{staticClass:"emoji-symbol no-dark-content",on:{click:function(o){return t.onEmoji(i.symbol)}}},[t._v(t._s(i.symbol))]),e("div",{staticClass:"emoji-users",on:{click:function(o){return t.onShowEmojiUser(i)}}},[e("ul",[t._l(t.sortEmojiUser(i.userids),function(o,l){return[l<t.emojiUsersNum?e("li",[e("UserAvatar",{attrs:{userid:o,"show-name":"","show-icon":!1}})],1):l==t.emojiUsersNum?e("li",[t._v("+"+t._s(i.userids.length-t.emojiUsersNum)+"\u4F4D")]):t._e()]})],2)])])}),0):t._e()]),e("div",{staticClass:"dialog-foot"},[!t.hideReply&&t.msgData.reply_num>0?e("div",{staticClass:"reply",on:{click:t.replyList}},[e("i",{staticClass:"taskfont"},[t._v("\uE6EB")]),t._v(" "+t._s(t.msgData.reply_num)+"\u6761\u56DE\u590D ")]):t._e(),t.msgData.tag?e("div",{staticClass:"tag",on:{click:t.openTag}},[e("i",{staticClass:"taskfont"},[t._v("\uE61E")])]):t._e(),t.msgData.todo?e("div",{staticClass:"todo",on:{click:t.openTodo}},[e("EPopover",{ref:"todo",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.todoShow,callback:function(i){t.todoShow=i},expression:"todoShow"}},[e("div",{staticClass:"read-poptip-content"},[e("Scrollbar",{attrs:{"class-name":"read"}},[e("div",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoDoneList.length))]),t._v(" "+t._s(t.$L("\u5B8C\u6210"))+" ")]),e("ul",t._l(t.todoDoneList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:""}})],1)}),0)]),e("Scrollbar",{attrs:{"class-name":"unread"}},[e("div",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoUndoneList.length))]),t._v(" "+t._s(t.$L("\u5F85\u529E"))+" "),e("span",{staticClass:"space"}),e("Button",{attrs:{type:"primary",size:"small"},on:{click:t.handleTodoAdd}},[t._v(t._s(t.$L("\u6DFB\u52A0")))])],1),e("ul",t._l(t.todoUndoneList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:""}})],1)}),0)])],1),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t.todoLoad>0?e("Loading"):e("i",{staticClass:"taskfont"},[t._v("\uE7B7")])],1):t._e(),t.msgData.modify?e("div",{staticClass:"modify"},[e("i",{staticClass:"taskfont"},[t._v("\uE779")])]):t._e(),t.msgData.error===!0?e("div",{staticClass:"error",on:{click:t.onError}},[e("Icon",{attrs:{type:"ios-alert"}})],1):t.isLoading?e("Loading",{attrs:{delay:300}}):[t.timeShow?e("div",{staticClass:"time",on:{click:function(i){t.timeShow=!1}}},[t._v(t._s(t.msgData.created_at))]):e("div",{staticClass:"time",attrs:{title:t.msgData.created_at},on:{click:function(i){t.timeShow=!0}}},[t._v(t._s(t.$A.timeFormat(t.msgData.created_at)))]),t.hidePercentage?t._e():[t.dialogType==="group"?e("div",{staticClass:"percent",on:{click:t.openReadPercentage}},[e("EPopover",{ref:"percent",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.percentageShow,callback:function(i){t.percentageShow=i},expression:"percentageShow"}},[e("div",{staticClass:"read-poptip-content"},[e("Scrollbar",{attrs:{"class-name":"read"}},[e("div",{staticClass:"read-title"},[e("em",[t._v(t._s(t.readList.length))]),t._v(" "+t._s(t.$L("\u5DF2\u8BFB"))+" ")]),e("ul",t._l(t.readList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:""}})],1)}),0)]),e("Scrollbar",{attrs:{"class-name":"unread"}},[e("div",{staticClass:"read-title"},[e("em",[t._v(t._s(t.unreadList.length))]),t._v(" "+t._s(t.$L("\u672A\u8BFB"))+" ")]),e("ul",t._l(t.unreadList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:""}})],1)}),0)])],1),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t.percentageLoad>0?e("Loading"):e("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):t.msgData.percentage===100?e("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):e("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})]]],2)])},ha=[];const _a={name:"DialogView",components:{UnknownMsg:da,LoadMsg:aa,TemplateMsg:Gi,VoteMsg:Se,WordChainMsg:ke,MeetingMsg:ve,LocationMsg:de,RecordMsg:ae,LongTextMsg:Qt,TextMsg:Vt,FileMsg:Gt,WCircle:Mt},directives:{longpress:w},props:{msgData:{type:Object,default:()=>({})},dialogType:{type:String,default:""},hidePercentage:{type:Boolean,default:!1},hideReply:{type:Boolean,default:!1},hideForward:{type:Boolean,default:!1},operateVisible:{type:Boolean,default:!1},operateAction:{type:Boolean,default:!1},pointerMouse:{type:Boolean,default:!1},isRightMsg:{type:Boolean,default:!1}},data(){return{timeShow:!1,operateEnter:!1,percentageLoad:0,percentageShow:!1,percentageList:[],todoLoad:0,todoShow:!1,todoList:[],emojiUsersNum:5,voteData:{},dotClicks:[],unfoldWordChainData:[]}},mounted(){this.emojiUsersNum=Math.min(6,Math.max(2,Math.floor((this.windowWidth-180)/52))),Object.keys(this.voteData).length===0&&(this.voteData=JSON.parse(window.localStorage.getItem("__cache:vote__"))||{}),this.unfoldWordChainData.length===0&&(this.unfoldWordChainData=JSON.parse(window.localStorage.getItem("__cache:unfoldWordChain__"))||[])},beforeDestroy(){var t;this.$store.dispatch("audioStop",(t=this.msgData.msg)==null?void 0:t.path)},computed:{...$(["loads"]),...pt(["isLoad"]),isLoading(){return this.msgData.created_at?this.isLoad(`msg-${this.msgData.id}`):!0},viewClass(){const{msgData:t,operateAction:s,operateEnter:e,pointerMouse:i}=this,a=[];return t.type&&a.push(t.type),s&&(a.push("operate-action"),e&&a.push("pointer-mouse")),i&&a.indexOf("pointer-mouse")===-1&&a.push("pointer-mouse"),a},readList({userId:t}){return this.percentageList.filter(({userid:s,read_at:e})=>s!=t&&e)},unreadList({userId:t}){return this.percentageList.filter(({userid:s,read_at:e})=>s!=t&&!e)},todoDoneList(){return this.todoList.filter(({done_at:t})=>t)},todoUndoneList(){return this.todoList.filter(({done_at:t})=>!t)},headClass(){const{id:t,reply_id:s,type:e,msg:i,emoji:a,dot:o}=this.msgData,l=[];return o&&!this.dotClicks.includes(t)&&l.push("dot"),s===0&&$A.arrayLength(a)===0&&e==="text"&&(/^<img\s+class="emoticon"[^>]*?>$/.test(i.text)||/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){1,3}\s*<\/p>\s*$/.test(i.text))&&l.push("transparent"),l},contentClass(){const{type:t,msg:s}=this.msgData,e=[];return t==="text"&&(/^<img\s+class="emoticon"[^>]*?>$/.test(s.text)?e.push("an-emoticon"):/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){3}\s*<\/p>\s*$/.test(s.text)?e.push("three-emoji"):/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){2}\s*<\/p>\s*$/.test(s.text)?e.push("two-emoji"):/^\s*<p>\s*[\uD800-\uDBFF][\uDC00-\uDFFF]\s*<\/p>\s*$/.test(s.text)&&e.push("an-emoji")),e}},watch:{operateAction(t){this.operateEnter=!1,t&&setTimeout(s=>this.operateEnter=!0,500)},voteData:{handler(t){const s=JSON.parse(window.localStorage.getItem("__cache:vote__"))||{};for(const e in t)s[e]=t[e];Object.keys(s).length>0&&window.localStorage.setItem("__cache:vote__",JSON.stringify(s))},deep:!0}},methods:{handleLongpress(t,s){this.$emit("on-longpress",{event:t,el:s,msgData:this.msgData})},handleClick(){this.msgData.dot&&(this.dotClicks.push(this.msgData.id),this.$store.dispatch("dialogMsgDot",this.msgData))},openTag(){!this.msgData.tag||(this.$store.dispatch("showSpinner",600),this.$store.dispatch("getUserData",this.msgData.tag).then(t=>{$A.messageInfo(`\u6807\u6CE8\u4EBA\u5458\uFF1A${t.nickname} (ID: ${t.userid})`)}).catch(t=>{$A.messageError("\u6807\u6CE8\u4EBA\u5458\u4E0D\u5B58\u5728")}).finally(t=>{this.$store.dispatch("hiddenSpinner")}))},openTodo(){if(!(this.todoLoad>0)){if(this.todoShow){this.todoShow=!1;return}this.todoLoad++,this.$store.dispatch("call",{url:"dialog/msg/todolist",data:{msg_id:this.msgData.id}}).then(({data:t})=>{this.todoList=t}).catch(()=>{this.todoList=[]}).finally(t=>{setTimeout(()=>{this.todoLoad--,this.todoShow=!0},100)})}},handleTodoAdd(){this.$refs.todo.doClose(),this.$emit("on-other",{event:"todoAdd",data:{msg_id:this.msgData.id,userids:this.todoList.map(({userid:t})=>t)}})},openReadPercentage(){if(!(this.percentageLoad>0)){if(this.percentageShow){this.percentageShow=!1;return}this.percentageLoad++,this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then(({data:t})=>{this.percentageList=t}).catch(()=>{this.percentageList=[]}).finally(t=>{setTimeout(()=>{this.percentageLoad--,this.percentageShow=!0},100)})}},playRecord(){this.operateVisible||!this.msgData.created_at||this.$store.dispatch("audioPlay",this.msgData.msg.path)},openMeeting(){this.operateVisible||mt.emit("addMeeting",{type:"join",name:this.msgData.msg.name,meetingid:this.msgData.msg.meetingid,meetingdisabled:!0})},openDialog(t){this.$store.dispatch("openDialogUserid",t).then(s=>{this.goForward({name:"manage-messenger"})}).catch(({msg:s})=>{$A.modalError(s)})},showReplyData(t){return $A.isJson(t)?t.userid:!1},showForwardData(t){return $A.isJson(t)?t.show&&t.userid:!1},viewReply(){this.$emit("on-view-reply",{msg_id:this.msgData.id,reply_id:this.msgData.reply_id})},viewText(t){this.$emit("on-view-text",t,this.$refs.content)},viewFile(){!this.msgData.created_at||this.$emit("on-view-file",this.msgData)},downFile(){!this.msgData.created_at||this.$emit("on-down-file",this.msgData)},replyList(){this.$emit("on-reply-list",{msg_id:this.msgData.id})},onError(){this.$emit("on-error",this.msgData)},onEmoji(t){this.$emit("on-emoji",{msg_id:this.msgData.id,symbol:t})},onShowEmojiUser(t){this.$emit("on-show-emoji-user",t)},sortEmojiUser(t){const s=t.filter(i=>i==this.userId),e=t.filter(i=>i!=this.userId);return s.concat(e)},unfoldWordChain(t){if(this.unfoldWordChainData.indexOf(t.id)==-1){const s=JSON.parse(window.localStorage.getItem("__cache:unfoldWordChain__"))||[];s.push(t.id),window.localStorage.setItem("__cache:unfoldWordChain__",JSON.stringify(s)),this.unfoldWordChainData.push(t.id)}},onWordChain(){this.$store.state.dialogDroupWordChain={type:"participate",dialog_id:this.msgData.dialog_id,msgData:this.msgData}},onVote(t,s){if(t!="vote"){$A.modalConfirm({content:t=="finish"?"\u786E\u5B9A\u7ED3\u675F\u6295\u7968\uFF1F":"\u518D\u6B21\u53D1\u9001\u6295\u7968\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",onOk:()=>{this.submitVote(t,s)}});return}this.submitVote(t,s)},submitVote(t,s){this.$set(s.msg,"_loadIng",1),this.$store.dispatch("call",{url:"dialog/msg/vote",method:"post",data:{dialog_id:s.dialog_id,uuid:s.msg.uuid,vote:this.voteData[s.msg.uuid]||[],type:t}}).then(({data:e})=>{t=="again"&&$A.messageSuccess("\u5DF2\u53D1\u9001"),e.forEach(i=>{this.$store.dispatch("saveDialogMsg",i)})}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.$set(s.msg,"_loadIng",0)})}}},at={};var ma=d(_a,ua,ha,!1,pa,null,null,null);function pa(t){for(let s in at)this[s]=at[s]}var va=function(){return ma.exports}(),fa=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{class:t.classArray},[t.isUnreadStart?e("div",{staticClass:"dialog-unread-label"},[e("em"),e("span",[t._v(t._s(t.$L("\u4EE5\u4E0B\u4E3A\u65B0\u6D88\u606F")))]),e("em")]):t._e(),t.source.type==="tag"?e("div",{staticClass:"dialog-tag",on:{click:t.onViewTag}},[e("div",{staticClass:"tag-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,"show-name":!0,"show-icon":!1}})],1),t._v(" "+t._s(t.$L(t.source.msg.action==="remove"?"\u53D6\u6D88\u6807\u6CE8":"\u6807\u6CE8\u4E86"))+' "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'" ')]):t.source.type==="top"?e("div",{staticClass:"dialog-top",on:{click:t.onViewTag}},[e("div",{staticClass:"tag-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,"show-name":!0,"show-icon":!1}})],1),t._v(" "+t._s(t.$L(t.source.msg.action==="remove"?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876\u4E86"))+' "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'" ')]):t.source.type==="todo"?e("div",{staticClass:"dialog-todo",on:{click:t.onViewTodo}},[e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,"show-name":!0,"show-icon":!1}})],1),t._v(" "+t._s(t.$L(t.source.msg.action==="remove"?"\u53D6\u6D88\u5F85\u529E":t.source.msg.action==="done"?"\u5B8C\u6210":"\u8BBE\u5F85\u529E"))+' "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'" '),t.formatTodoUser(t.source.msg.data).length>0?e("div",{staticClass:"todo-users"},[e("span",[t._v(t._s(t.$L("\u7ED9")))]),t._l(t.formatTodoUser(t.source.msg.data),function(i,a){return[a<3?e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:i,"show-name":!0,"show-icon":!1}})],1):a==3?e("div",{staticClass:"todo-user"},[t._v("+"+t._s(t.formatTodoUser(t.source.msg.data).length-3))]):t._e()]})],2):t._e()]):t.source.type==="notice"?e("div",{staticClass:"dialog-notice"},[t._v(" "+t._s(t.source.msg.source==="api"?t.source.msg.notice:t.$L(t.source.msg.notice))+" ")]):[e("div",{staticClass:"dialog-avatar"},[e("UserAvatar",{directives:[{name:"longpress",rawName:"v-longpress",value:{callback:t.onMention,delay:300},expression:"{callback: onMention, delay: 300}"}],attrs:{userid:t.source.userid,size:30},on:{"open-dialog":t.onOpenDialog}})],1),e("DialogView",{attrs:{"msg-data":t.source,"dialog-type":t.dialogData.type,"hide-percentage":t.hidePercentage,"hide-reply":t.hideReply,"hide-forward":t.hideForward,"operate-visible":t.operateVisible,"operate-action":t.operateVisible&&t.source.id===t.operateItem.id,"pointer-mouse":t.pointerMouse,"is-right-msg":t.isRightMsg},on:{"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-other":t.onOther,"on-show-emoji-user":t.onShowEmojiUser}})]],2)},ga=[];const $a={name:"DialogItem",components:{DialogView:va},directives:{longpress:w},props:{source:{type:Object,default(){return{}}},dialogData:{type:Object,default(){return{}}},operateVisible:{type:Boolean,default:!1},operateItem:{type:Object,default(){return{}}},pointerMouse:{type:Boolean,default:!1},simpleView:{type:Boolean,default:!1},isMyDialog:{type:Boolean,default:!1},msgId:{type:Number,default:0},unreadOne:{type:Number,default:0},scrollIng:{type:Number,default:0},readEnabled:{type:Boolean,default:!1}},computed:{...$(["userId"]),isRightMsg(){return this.source.userid==this.$store.state.userId},isReply(){return this.simpleView||this.msgId===this.source.id},isNoRead(){return this.isRightMsg||this.source.read_at},isUnreadStart(){return this.unreadOne===this.source.id},hidePercentage(){return this.simpleView||this.isMyDialog||this.isReply},hideReply(){return this.simpleView||this.msgId>0},hideForward(){return this.simpleView||this.msgId>0},classArray(){return{"dialog-item":!0,"reply-item":this.isReply,"unread-start":this.isUnreadStart,self:this.isRightMsg}}},watch:{readEnabled(){this.msgRead()},windowActive(){this.msgRead()},scrollIng(){this.msgRead()}},methods:{msgRead(){var t;this.isNoRead||!this.readEnabled||!this.windowActive||!((t=this.$el)!=null&&t.parentNode.classList.contains("item-enter"))||this.$store.dispatch("dialogMsgRead",this.source)},formatTodoUser(t){if($A.isJson(t)){const{userids:s}=t;if(s)return s.split(",")}return[]},onViewTag(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onViewTodo(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onOpenDialog(t){var s;(this.dialogData.type=="group"||![(s=this.dialogData.dialog_user)==null?void 0:s.userid,this.userId].includes(t))&&this.$store.dispatch("openDialogUserid",t).then(e=>{this.goForward({name:"manage-messenger"})}).catch(({msg:e})=>{$A.modalError(e)})},onMention(){this.dispatch("on-mention",this.source)},onLongpress(t){this.dispatch("on-longpress",t)},onViewReply(t){this.dispatch("on-view-reply",t)},onViewText(t,s){this.dispatch("on-view-text",t,s)},onViewFile(t){this.dispatch("on-view-file",t)},onDownFile(t){this.dispatch("on-down-file",t)},onReplyList(t){this.dispatch("on-reply-list",t)},onError(t){this.dispatch("on-error",t)},onEmoji(t){this.dispatch("on-emoji",t)},onOther(t){this.dispatch("on-other",t)},onShowEmojiUser(t){this.dispatch("on-show-emoji-user",t)},dispatch(t,...s){if(this.isReply){this.$emit(t,...s);return}let e=this.$parent,i=e.$options.name;for(;e&&(!i||i!=="virtual-list");)e=e.$parent,e&&(i=e.$options.name);e&&e.$emit(t,...s)}}},ot={};var Ca=d($a,fa,ga,!1,wa,null,null,null);function wa(t){for(let s in ot)this[s]=ot[s]}var ka=function(){return Ca.exports}(),ya=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"chat-emoji-wrapper"},[e("div",{staticClass:"chat-emoji-box"},[t.type==="emosearch"?e("div",{staticClass:"chat-emoji-emosearch"},[e("Input",{attrs:{clearable:"",placeholder:t.$L("\u641C\u7D22\u8868\u60C5")},model:{value:t.emosearchKey,callback:function(i){t.emosearchKey=i},expression:"emosearchKey"}},[e("Icon",{class:{"icon-loading":t.emosearchLoad},attrs:{slot:"prefix",type:t.emosearchLoad?"ios-loading":"ios-search"},slot:"prefix"})],1)],1):t.type==="emoji"?e("div",{staticClass:"chat-emoji-nav"},t._l(t.emojiNavList,function(i){var a;return e("div",{key:i.type,class:(a={},a[`i-${i.name}`]=!0,a.active=i.type===t.emojiNavActive,a),domProps:{innerHTML:t._s(i.content)},on:{click:function(o){t.emojiNavActive=i.type}}})}),0):t._e(),e("Scrollbar",[e("ul",{class:[t.type,"no-dark-content"]},t._l(t.list,function(i){return e("li",{on:{click:function(a){return t.onSelect(a,i)}}},[i.type==="emoticon"?e("Imgs",{attrs:{src:i.src,title:i.name,alt:i.name}}):e("span",{attrs:{title:i.name},domProps:{innerHTML:t._s(i.html)}})],1)}),0)])],1),t.onlyEmoji?t._e():e("div",{staticClass:"chat-emoji-menu-wrap"},[e("span",{directives:[{name:"show",rawName:"v-show",value:t.showEmojiMenuScrollLeftBtn,expression:"showEmojiMenuScrollLeftBtn"}],staticClass:"left-btn",on:{click:function(i){return t.onEmojiMenuScroll("left")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE72D")])]),e("ul",{ref:"chatEmojiMenuRef",staticClass:"chat-emoji-menu",on:{scroll:t.onHandleScroll}},[e("li",{class:{active:t.type==="emosearch"},on:{click:function(i){t.type="emosearch"}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F8")])]),e("li",{class:{active:t.type==="emoji"},on:{click:function(i){t.type="emoji"}}},[e("span",{staticClass:"no-dark-content"},[t._v("\u{1F600}")])]),t._l(t.emoticonData,function(i){return e("li",{class:{active:t.type==="emoticon"&&t.emoticonPath==i.path},on:{click:function(a){return t.onEmoticon(i.path)}}},[e("Imgs",{attrs:{title:i.name,alt:i.name,src:i.src}})],1)})],2),e("span",{directives:[{name:"show",rawName:"v-show",value:t.showEmojiMenuScrollRightBtn,expression:"showEmojiMenuScrollRightBtn"}],staticClass:"right-btn",on:{click:function(i){return t.onEmojiMenuScroll("right")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE733")])])])])},ba=[];const La={name:"ChatEmoji",props:{searchKey:{type:String,default:""},onlyEmoji:{type:Boolean,default:!1}},data(){return{type:"emoji",emojiNavActive:"p",emojiNavList:[{type:"p",name:"people",content:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z" /></svg>'},{type:"n",name:"nature",content:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z" /></svg>
|
|
`},{type:"d",name:"food",content:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z" /></svg>'},{type:"s",name:"symbols",content:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z" /></svg>'},{type:"a",name:"activity",content:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z" /></svg>'},{type:"t",name:"travel",content:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z" /></svg>'},{type:"o",name:"objects",content:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z" /></svg>'},{type:"f",name:"flags",content:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z" /></svg>'}],emoticonPath:"",emosearchKey:"",emosearchCache:null,emosearchLoad:!1,emosearchTimer:null,emosearchList:[],emojiData:[],emoticonData:[],emojiMenuScrollLeft:0}},mounted(){var t;this.initData(),(t=this.$store)!=null&&t.state.windowPortrait||this.onMonitorWheel()},watch:{type(){this.onEmosearch()},emosearchKey(){this.onEmosearch()},searchKey:{handler(t){this.emosearchKey=t},immediate:!0}},computed:{list(){if(this.type==="emoji")return this.emojiData.filter(t=>t.category===this.emojiNavActive);if(this.type==="emosearch")return this.emosearchList;if(this.type==="emoticon"){const t=this.emoticonData.find(({path:s})=>s===this.emoticonPath);if(t)return t.list}return[]},showEmojiMenuScrollLeftBtn(){return this.emojiMenuScrollLeft>34},showEmojiMenuScrollRightBtn(){var s;const t=this.$refs.chatEmojiMenuRef;if(t){const e=((s=t==null?void 0:t.querySelector("li"))==null?void 0:s.offsetWidth)||48;return this.emojiMenuScrollLeft<t.scrollWidth-t.clientWidth-e}return this.emojiMenuScrollLeft<=100}},methods:{initData(){$A.loadScriptS(["js/emoji.all.js","js/emoticon.all.js"]).then(t=>{const s=$A.mainUrl("images/emoticon");$A.isArray(window.emojiData)&&(this.emojiData=window.emojiData.sort(function(e,i){return $A.sortFloat(e.emoji_order,i.emoji_order)}).map(e=>({type:"emoji",name:e.name,category:e.category,html:e.code_decimal}))),$A.isArray(window.emoticonData)&&(this.emoticonData=window.emoticonData.map(e=>Object.assign(e,{src:`${s}/${e.path}/${e.icon}`,list:e.list.map(i=>Object.assign(i,{type:"emoticon",asset:`images/emoticon/${e.path}/${i.path}`,src:`${s}/${e.path}/${i.path}`}))})))})},onEmosearch(){this.type!=="emosearch"||this.emosearchCache===this.emosearchKey||(this.emosearchCache=this.emosearchKey,this.emosearchLoad=!0,this.emosearchTimer&&clearTimeout(this.emosearchTimer),this.emosearchTimer=setTimeout(t=>{this.$store.dispatch("call",{url:"dialog/sticker/search",data:{key:this.emosearchKey}}).then(({data:s})=>{this.emosearchList=[];const e=s.list;e.length>0&&(this.emosearchList=e.map(i=>({type:"emoticon",asset:"emosearch",name:i.name,src:i.src,height:i.height,width:i.width}))),this.emosearchList.length===0&&$A.messageWarning("\u6CA1\u6709\u641C\u7D22\u5230\u4EFB\u4F55\u8868\u60C5")}).catch(s=>{this.emosearchList=[],$A.messageWarning("\u641C\u7D22\u7ED3\u679C\u4E3A\u7A7A")}).finally(s=>{this.emosearchLoad=!1})},300))},onEmoticon(t){this.type="emoticon",this.emoticonPath=t},onSelect(t,s){s.type==="emoji"?this.$emit("on-select",{type:"emoji",text:t.target.innerText}):this.$emit("on-select",s)},onMonitorWheel(){const t=this.$refs.chatEmojiMenuRef;t==null||t.addEventListener("wheel",s=>{Math.abs(s.deltaY)<10&&s.deltaMode===0||(s.preventDefault(),t.scrollLeft=t.scrollLeft+s.deltaY)})},onEmojiMenuScroll(t){const s=this.$refs.chatEmojiMenuRef,e=s.offsetWidth-68,i=t=="right"?s.scrollLeft+e:s.scrollLeft-e;s.scrollTo({left:i,behavior:"smooth"})},onHandleScroll(t){this.emojiMenuScrollLeft=t.target.scrollLeft}}},rt={};var xa=d(La,ya,ba,!1,Da,null,null,null);function Da(t){for(let s in rt)this[s]=rt[s]}var ft=function(){return xa.exports}();const nt="ontouchend"in document;var Sa={bind(t,s){let e=!1;t.__touchEvent__={start:i=>{i.preventDefault(),e=!0,s.value("down",i)},move:i=>{e&&s.value("move",i)},end:i=>{e&&(e=!1,s.value("up"))},click:i=>{s.value("click",i)}},nt?(t.addEventListener("touchstart",t.__touchEvent__.start),t.addEventListener("touchmove",t.__touchEvent__.move),t.addEventListener("touchend",t.__touchEvent__.end)):(t.addEventListener("mousedown",t.__touchEvent__.start,{passive:!1}),document.addEventListener("mousemove",t.__touchEvent__.move),document.addEventListener("mouseup",t.__touchEvent__.end)),t.addEventListener("click",t.__touchEvent__.click)},update(){},unbind(t){nt?(t.removeEventListener("touchstart",t.__touchEvent__.start),t.removeEventListener("touchmove",t.__touchEvent__.move),t.removeEventListener("touchend",t.__touchEvent__.end)):(t.removeEventListener("mousedown",t.__touchEvent__.start),document.removeEventListener("mousemove",t.__touchEvent__.move),document.removeEventListener("mouseup",t.__touchEvent__.end)),t.removeEventListener("click",t.__touchEvent__.click),delete t.__touchEvent__}};const lt="ontouchend"in document;var Ma={bind(t,s){if(lt){const e={move:!1,time:0,x:0,y:0};t.__touchEvent__={start:i=>{i.preventDefault(),e.move=!1,e.time=$A.dayjs().valueOf(),e.x=i.touches?i.touches[0].clientX:i.clientX,e.y=i.touches?i.touches[0].clientY:i.clientY},move:i=>{if(e.time>0){const a=i.touches?i.touches[0].clientX:i.clientX,o=i.touches?i.touches[0].clientY:i.clientY;(Math.abs(a-e.x)>5||Math.abs(o-e.y)>5)&&(e.move=!0)}},end:i=>{e.time>0&&(!e.move&&$A.dayjs().valueOf()-e.time<300&&s.value(i,t),e.time=0)}},t.addEventListener("touchstart",t.__touchEvent__.start),t.addEventListener("touchmove",t.__touchEvent__.move),t.addEventListener("touchend",t.__touchEvent__.end)}else t.__clickEvent__=e=>{e.preventDefault(),s.value(e,t)},t.addEventListener("click",t.__clickEvent__)},update(){},unbind(t){lt?(t.removeEventListener("touchstart",t.__touchEvent__.start),t.removeEventListener("touchmove",t.__touchEvent__.move),t.removeEventListener("touchend",t.__touchEvent__.end),delete t.__touchEvent__):(t.removeEventListener("click",t.__clickEvent__),delete t.__clickEvent__)}};function f(t){return t===void 0&&(t=document.body),t===!0?document.body:t instanceof window.Node?t:document.querySelector(t)}const ja={inserted(t,{value:s},e){if(t.dataset&&t.dataset.transfer!=="true")return!1;t.className=t.className?t.className+" v-transfer-dom":"v-transfer-dom";const i=t.parentNode;if(!i)return;const a=document.createComment("");let o=!1;s!==!1&&(i.replaceChild(a,t),f(s).appendChild(t),o=!0),t.__transferDomData||(t.__transferDomData={parentNode:i,home:a,target:f(s),hasMovedOut:o})},componentUpdated(t,{value:s}){if(t.dataset&&t.dataset.transfer!=="true")return!1;const e=t.__transferDomData;if(!e)return;const i=e.parentNode,a=e.home,o=e.hasMovedOut;!o&&s?(i.replaceChild(a,t),f(s).appendChild(t),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!0,target:f(s)})):o&&s===!1?(i.replaceChild(t,a),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!1,target:f(s)})):s&&f(s).appendChild(t)},unbind(t){if(t.dataset&&t.dataset.transfer!=="true")return!1;t.className=t.className.replace("v-transfer-dom",""),t.__transferDomData&&(t.__transferDomData.hasMovedOut===!0&&t.__transferDomData.parentNode&&t.__transferDomData.parentNode.appendChild(t),t.__transferDomData=null)}},m={};function ct(t,s){!t||typeof m[t]=="undefined"?m[t]=[]:m[t]=m[t].filter(e=>e!==s),m[t].push(s)}function dt(t,s){!t||typeof m[t]=="undefined"||(m[t]=m[t].filter(e=>e!==s))}function Ta(t,s){return typeof m[t]=="undefined"?!1:m[t][m[t].length-1]===s}function eo(){return new Promise(t=>{const s=new kt({render(a){return a(yt.exports.Modal,{class:"chat-emoji-one-modal",props:{fullscreen:!0,footerHide:!0},on:{"on-visible-change":o=>{o||setTimeout(l=>{document.body.removeChild(this.$el)},500)}}},[a(ft,{attrs:{onlyEmoji:!0},on:{"on-select":o=>{this.$children[0].visible=!1,o.type==="emoji"&&t(o.text)}}})])}}),e=s.$mount();document.body.appendChild(e.$el);const i=s.$children[0];i.visible=!0,i.$el.lastChild.addEventListener("click",({target:a})=>{a.classList.contains("ivu-modal-body")&&(i.visible=!1)})})}var Ea=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.hidePopover,expression:"hidePopover"}],staticClass:"chat-input-box",class:t.boxClass},[e("div",{staticClass:"chat-input-quick-emoji"},[e("EPopover",{ref:"emojiQuickRef",attrs:{visibleArrow:!1,transition:"",placement:"top-end",popperClass:"chat-quick-emoji-popover"},model:{value:t.emojiQuickShow,callback:function(i){t.emojiQuickShow=i},expression:"emojiQuickShow"}},[e("div",{attrs:{slot:"reference"},slot:"reference"}),e("Scrollbar",{ref:"emojiWrapper",attrs:{tag:"ul","enable-x":!0,"enable-y":!1,"touch-content-blur":!1,"class-name":"chat-quick-emoji-wrapper scrollbar-hidden"}},t._l(t.emojiQuickItems,function(i){return e("li",{on:{click:function(a){return t.onEmojiQuick(i)}}},[e("Imgs",{attrs:{title:i.name,alt:i.name,src:i.src}})],1)}),0)],1)],1),e("div",{ref:"inputWrapper",staticClass:"chat-input-wrapper",on:{click:function(i){return i.stopPropagation(),t.focus.apply(null,arguments)}}},[t.quoteData?e("div",{staticClass:"chat-quote"},[t.quoteUpdate?e("div",{staticClass:"quote-label"},[t._v(t._s(t.$L("\u7F16\u8F91\u6D88\u606F")))]):e("UserAvatar",{attrs:{userid:t.quoteData.userid,userResult:t.onQuoteUserResult,"show-icon":!1,"show-name":!0}}),e("div",{staticClass:"quote-desc no-dark-content"},[t._v(t._s(t.$A.getMsgSimpleDesc(t.quoteData)))]),e("i",{directives:[{name:"touchclick",rawName:"v-touchclick",value:t.onTouchClick,expression:"onTouchClick"}],staticClass:"taskfont",attrs:{"data-action":"cancel-quote"}},[t._v("\uE6E5")])],1):t._e(),e("div",{ref:"editor",staticClass:"no-dark-content",on:{click:function(i){return i.stopPropagation(),t.onClickEditor.apply(null,arguments)},paste:t.handlePaste}}),e("div",{staticClass:"chat-space"},[e("input",{staticClass:"space-input",on:{focus:t.onSpaceInputFocus}})]),e("ul",{staticClass:"chat-toolbar",on:{click:function(i){i.stopPropagation()}}},[e("li",[t.emojiBottom?e("ETooltip",{ref:"emojiTip",attrs:{disabled:t.$isEEUiApp||t.windowTouch||t.showEmoji,placement:"top",enterable:!1,content:t.$L("\u8868\u60C5")}},[e("i",{staticClass:"taskfont",on:{click:function(i){t.showEmoji=!t.showEmoji}}},[t._v("\uE7AD")])]):e("EPopover",{ref:"emoji",attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-emoji-popover"},model:{value:t.showEmoji,callback:function(i){t.showEmoji=i},expression:"showEmoji"}},[e("ETooltip",{ref:"emojiTip",attrs:{slot:"reference",disabled:t.$isEEUiApp||t.windowTouch||t.showEmoji,placement:"top",enterable:!1,content:t.$L("\u8868\u60C5")},slot:"reference"},[e("i",{staticClass:"taskfont"},[t._v("\uE7AD")])]),t.showEmoji?e("ChatEmoji",{attrs:{searchKey:t.emojiQuickKey},on:{"on-select":t.onSelectEmoji}}):t._e()],1)],1),e("li",[e("ETooltip",{attrs:{placement:"top",disabled:t.$isEEUiApp||t.windowTouch,enterable:!1,content:t.$L("\u9009\u62E9\u6210\u5458")}},[e("i",{staticClass:"taskfont",on:{click:function(i){return t.onToolbar("user")}}},[t._v("\uE78F")])])],1),e("li",[e("ETooltip",{attrs:{placement:"top",disabled:t.$isEEUiApp||t.windowTouch,enterable:!1,content:t.$L("\u9009\u62E9\u4EFB\u52A1")}},[e("i",{staticClass:"taskfont",on:{click:function(i){return t.onToolbar("task")}}},[t._v("\uE7D6")])])],1),e("li",[e("EPopover",{ref:"more",attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-more-popover"},model:{value:t.showMore,callback:function(i){t.showMore=i},expression:"showMore"}},[e("ETooltip",{ref:"moreTip",attrs:{slot:"reference",disabled:t.$isEEUiApp||t.windowTouch||t.showMore,placement:"top",enterable:!1,content:t.$L("\u5C55\u5F00")},slot:"reference"},[e("i",{staticClass:"taskfont"},[t._v("\uE790")])]),t.isAiBot?t._e():[t.recordReady?e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onToolbar("meeting")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7C1")]),t._v(" "+t._s(t.$L("\u65B0\u4F1A\u8BAE"))+" ")]):t._e(),t.canCall?e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onToolbar("call")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7BA")]),t._v(" "+t._s(t.$L("\u62E8\u6253\u7535\u8BDD"))+" ")]):t._e(),e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onToolbar("image")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7BC")]),t._v(" "+t._s(t.$L("\u53D1\u9001\u56FE\u7247"))+" ")]),e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onToolbar("file")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7C0")]),t._v(" "+t._s(t.$L("\u4E0A\u4F20\u6587\u4EF6"))+" ")]),t.canAnon?e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onToolbar("anon")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE690")]),t._v(" "+t._s(t.$L("\u533F\u540D\u6D88\u606F"))+" ")]):t._e(),t.dialogData.type=="group"?e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onToolbar("word-chain")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE80A")]),t._v(" "+t._s(t.$L("\u53D1\u8D77\u63A5\u9F99"))+" ")]):t._e(),t.dialogData.type=="group"?e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onToolbar("vote")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7FD")]),t._v(" "+t._s(t.$L("\u53D1\u8D77\u6295\u7968"))+" ")]):t._e()],e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onToolbar("full")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6A7")]),t._v(" "+t._s(t.$L("\u5168\u5C4F\u8F93\u5165"))+" ")])],2)],1),e("li",{directives:[{name:"touchmouse",rawName:"v-touchmouse",value:t.clickSend,expression:"clickSend"},{name:"longpress",rawName:"v-longpress",value:{callback:t.onShowMenu,delay:300},expression:"{callback: onShowMenu, delay: 300}"}],ref:"chatSend",staticClass:"chat-send",class:t.sendClass},[e("EPopover",{ref:"menu",attrs:{visibleArrow:!1,trigger:"manual",placement:"top",popperClass:"chat-input-more-popover"},model:{value:t.showMenu,callback:function(i){t.showMenu=i},expression:"showMenu"}},[e("ETooltip",{ref:"sendTip",attrs:{slot:"reference",placement:"top",disabled:t.$isEEUiApp||t.windowTouch||t.showMenu,enterable:!1,content:t.$L(t.sendContent)},slot:"reference"},[t.loading?e("div",[e("div",{staticClass:"chat-load"},[e("Loading")],1)]):e("div",[e("transition",{attrs:{name:"mobile-send"}},[t.sendClass==="recorder"?e("i",{staticClass:"taskfont"},[t._v("\uE609")]):t._e()]),e("transition",{attrs:{name:"mobile-send"}},[t.sendClass!=="recorder"?e("i",{staticClass:"taskfont"},[t._v("\uE606")]):t._e()])],1)]),e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onSend("silence")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7D7")]),t._v(" "+t._s(t.$L("\u65E0\u58F0\u53D1\u9001"))+" ")]),e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onSend("md")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE647")]),t._v(" "+t._s(t.$L("MD \u683C\u5F0F\u53D1\u9001"))+" ")]),e("div",{staticClass:"chat-input-popover-item",on:{click:function(i){return t.onSend("normal")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE71B")]),t._v(" "+t._s(t.$L("\u666E\u901A\u683C\u5F0F\u53D1\u9001"))+" ")])],1)],1)]),e("div",{staticClass:"chat-record",class:t.recordClassName},[e("div",{staticClass:"record-convert",on:{click:function(i){return t.stopRecord(!1,!0)}}},[e("i",{staticClass:"taskfont"},[t._v("\uE628")])]),e("div",{staticClass:"record-recwave"},[e("div",{ref:"recwave"})]),e("div",{staticClass:"record-remove",on:{click:function(i){return t.stopRecord(!0)}}},[e("i",{staticClass:"taskfont"},[t._v("\uE787")]),e("i",{staticClass:"taskfont"},[t._v("\uE702")])])]),e("div",{staticClass:"chat-cover",on:{click:function(i){return i.stopPropagation(),t.onClickCover.apply(null,arguments)}}})]),t.emojiBottom&&t.showEmoji?e("ChatEmoji",{attrs:{searchKey:t.emojiQuickKey},on:{"on-select":t.onSelectEmoji}}):t._e(),e("transition",{attrs:{name:"fade"}},[t.recordShow?e("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],staticClass:"chat-input-record-transfer",class:t.recordClassName,style:t.recordStyle,attrs:{"data-transfer":!0},on:{click:t.stopRecord}},[t.recordDuration>0?e("div",{staticClass:"record-duration"},[t._v(t._s(t.recordFormatDuration))]):e("div",{staticClass:"record-loading"},[e("Loading",{attrs:{type:"pure"}})],1),e("div",{staticClass:"record-cancel",on:{click:function(i){return i.stopPropagation(),t.stopRecord(!0)}}},[t._v(t._s(t.$L(t.recordFormatTip)))])]):t._e()]),e("transition",{attrs:{name:"fade"}},[t.recordConvertIng?e("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],staticClass:"chat-input-convert-transfer",style:t.recordConvertStyle,attrs:{"data-transfer":!0}},[e("div",{staticClass:"convert-box"},[e("div",{staticClass:"convert-body"},[e("div",{staticClass:"convert-content"},[t.recordConvertSetting?e("div",{staticClass:"convert-setting"},[e("i",{staticClass:"taskfont",class:{active:!!t.cacheTranscriptionLanguage},on:{click:function(i){return t.convertSetting("transcription",i)}}},[t._v("\uE628")]),e("i",{staticClass:"taskfont",class:{active:!!t.recordConvertTranslate},on:{click:function(i){return t.convertSetting("translate",i)}}},[t._v("\uE795")])]):t._e(),e("div",{staticClass:"convert-input"},[e("Input",{staticClass:"convert-result no-dark-content",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:5},placeholder:t.recordConvertStatus===0?"...":"",disabled:t.recordConvertStatus!==1},on:{"on-focus":function(i){t.recordConvertFocus=!0},"on-blur":function(i){t.recordConvertFocus=!1}},model:{value:t.recordConvertResult,callback:function(i){t.recordConvertResult=i},expression:"recordConvertResult"}})],1)])]),e("ul",{staticClass:"convert-footer",style:t.recordConvertFooterStyle},[e("li",{directives:[{name:"touchclick",rawName:"v-touchclick",value:t.onTouchClick,expression:"onTouchClick"}],attrs:{"data-action":"record-convert-cancel"}},[e("i",{staticClass:"taskfont"},[t._v("\uE637")]),e("span",[t._v(t._s(t.$L("\u53D6\u6D88")))])]),e("li",{directives:[{name:"touchclick",rawName:"v-touchclick",value:t.onTouchClick,expression:"onTouchClick"}],attrs:{"data-action":"record-convert-voice"}},[e("i",{staticClass:"taskfont voice"},[t._v("\uE793")]),e("span",[t._v(t._s(t.$L("\u53D1\u9001\u539F\u8BED\u97F3")))])]),e("li",{directives:[{name:"touchclick",rawName:"v-touchclick",value:t.onTouchClick,expression:"onTouchClick"}],attrs:{"data-action":"record-convert-result"}},[t.recordConvertStatus===0?e("i",{staticClass:"send"},[e("Loading")],1):t.recordConvertStatus===2?e("i",{staticClass:"taskfont error"},[t._v("\uE665")]):e("i",{staticClass:"taskfont send"},[t._v("\uE684")])])])])]):t._e()]),e("Modal",{attrs:{"mask-closable":!1,beforeClose:t.onFullBeforeClose,"class-name":"chat-input-full-input","footer-hide":"",fullscreen:""},model:{value:t.fullInput,callback:function(i){t.fullInput=i},expression:"fullInput"}},[e("div",{staticClass:"chat-input-box",style:t.chatInputBoxStyle},[e("div",{staticClass:"chat-input-wrapper"},[e("div",{ref:"editorFull",staticClass:"no-dark-content"})]),e("ul",{staticClass:"chat-input-menu",class:{activation:t.fullSelection.length>0}},t._l(t.fullTools,function(i,a){return e("li",{key:a,on:{touchstart:function(o){o.preventDefault()},touchend:function(o){return o.preventDefault(),t.onFullMenu(i.label,i.type)},click:function(o){return t.onFullMenu(i.label,i.type)}}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(i.icon)}})])}),0)]),e("i",{staticClass:"taskfont",attrs:{slot:"close"},slot:"close"},[t._v("\uE6AB")])])],1)},Ia=[];const Aa={name:"ChatInput",components:{ChatEmoji:ft},directives:{touchmouse:Sa,touchclick:Ma,TransferDom:ja,clickoutside:$t,longpress:w},props:{value:{type:[String,Number],default:""},dialogId:{type:Number,default:0},taskId:{type:Number,default:0},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},disabledRecord:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},emojiBottom:{type:Boolean,default:!1},sendMenu:{type:Boolean,default:!0},simpleMode:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},toolbar:{type:Array,default:()=>["bold","strike","italic","underline","blockquote","link",{list:"ordered"},{list:"bullet"},{list:"check"}]},maxlength:{type:Number},defaultMenuOrientation:{type:String,default:"top"},replyMsgAutoMention:{type:Boolean,default:!0}},data(){return{quill:null,isFocus:!1,rangeIndex:0,_content:"",_options:{},mentionMode:"",userList:null,userCache:null,taskList:null,fileList:{},reportList:{},showMenu:!1,showMore:!1,showEmoji:!1,emojiQuickShow:!1,emojiQuickKey:"",emojiQuickItems:[],recordReady:!1,recordRec:null,recordBlob:null,recordWave:null,recordInter:null,recordState:"stop",recordDuration:0,recordIndex:window.modalTransferIndex,recordConvertIng:!1,recordConvertFocus:!1,recordConvertSetting:!1,recordConvertStatus:0,recordConvertResult:"",recordConvertTranslate:"",touchStart:{},touchFocus:!1,touchLimitX:!1,touchLimitY:!1,pasteClean:!0,changeLoad:0,isSpecVersion:this.checkIOSVersion(),emojiTimer:null,scrollTimer:null,textTimer:null,fileTimer:null,reportTimer:null,moreTimer:null,selectTimer:null,selectRange:null,fullInput:!1,fullQuill:null,fullSelection:{index:0,length:0},fullTools:[{label:"bold",type:"",icon:""},{label:"strike",type:"",icon:""},{label:"italic",type:"",icon:""},{label:"underline",type:"",icon:""},{label:"blockquote",type:"",icon:""},{label:"link",type:"",icon:""},{label:"list",type:"ordered",icon:""},{label:"list",type:"bullet",icon:""},{label:"list",type:"unchecked",icon:""}],viewportHeight:0,iOSDevices:$A.isIos()}},created(){ct(this.dialogId,this._uid)},mounted(){this.init(),window.visualViewport&&window.visualViewport.addEventListener("resize",this.visualViewportResize),this.recordInter=setInterval(t=>{this.recordState==="ing"&&(this.__recordDuration&&this.__recordDuration===this.recordDuration?(this.__recordDuration=null,this.stopRecord(!0),$A.messageWarning("\u5F55\u97F3\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")):this.__recordDuration=this.recordDuration)},1e3),this.$isEEUiApp&&(window.__onPermissionRequest=(t,s)=>{t==="recordAudio"&&s===!1&&this.stopRecord(!0)}),$A.loadScript("js/emoticon.all.js")},beforeDestroy(){var t;dt(this.dialogId,this._uid),this.quill&&((t=this.quill.getModule("mention"))==null||t.hideMentionList(),this.quill=null),this.recordRec&&(this.recordRec=null),this.recordConvertIng&&(this.recordConvertIng=!1),this.recordInter&&clearInterval(this.recordInter),window.visualViewport&&window.visualViewport.removeEventListener("resize",this.visualViewportResize)},computed:{...$(["cacheProjects","cacheTasks","cacheUserBasic","cacheDialogs","dialogMsgs","cacheTranscriptionLanguage","cacheKeyboard","keyboardType","keyboardHeight","isModKey"]),...pt(["getDialogDraft","getDialogQuote"]),isEnterSend({cacheKeyboard:t}){return this.$isEEUiApp?t.send_button_app==="enter":t.send_button_desktop==="enter"},isAiBot({dialogData:t}){return!t.bot||t.type!=="user"?!1:/^ai-(.*?)@bot\.system/.test(t.email)},canCall(){return this.dialogData.type==="user"&&!this.dialogData.bot&&this.$isEEUiApp},canAnon(){return this.dialogData.type==="user"&&!this.dialogData.bot},recordShow(){const{recordState:t}=this;return["ready","ing"].includes(t)},recordStyle(){const{windowScrollY:t,recordIndex:s}=this,e={zIndex:s};return t>0&&(e.marginTop=t/2+"px"),e},recordConvertStyle(){const{recordIndex:t}=this;return{zIndex:t}},recordConvertFooterStyle(){const{recordConvertFocus:t,keyboardType:s,keyboardHeight:e}=this;return t&&s==="show"&&e>120?{alignItems:"flex-start",transform:"translateY(12px)"}:{}},boxClass(){const t=[];return this.recordShow&&(this.recordState==="ing"&&this.recordDuration>0?t.push("record-progress"):t.push("record-ready")),this.simpleMode&&t.push("simple-mode"),this.showMenu&&t.push("show-menu"),this.showMore&&t.push("show-more"),this.showEmoji&&t.push("show-emoji"),this.mentionMode&&t.push(this.mentionMode),t},sendClass(){return $A.filterInvalidLine(this.value)?"sender":this.recordReady?"recorder":""},sendContent(){const{sendTip:t}=this.$refs;return t&&t.$refs.popper&&(t.$refs.popper.style.visibility="hidden",t.showPopper=!1,setTimeout(s=>{t.$refs.popper&&(t.$refs.popper.style.visibility="visible")},300)),this.sendClass==="recorder"?"\u957F\u6309\u5F55\u97F3":"\u53D1\u9001"},recordFormatDuration(){const{recordDuration:t}=this;let s=Math.floor(t/6e4),e=Math.floor(t/1e3)%60,i=("00"+t%1e3).substr(-2);return s<10&&(s=`0${s}`),e<10&&(e=`0${e}`),`${s}:${e}\u2033${i}`},recordClassName({touchLimitX:t,touchLimitY:s}){return s?"cancel":t?"convert":""},recordFormatTip({touchLimitX:t,touchLimitY:s}){return s?"\u677E\u5F00\u53D6\u6D88":t?"\u8F6C\u6587\u5B57":"\u5411\u4E0A\u6ED1\u52A8\u53D6\u6D88"},dialogData(){return this.dialogId>0?this.cacheDialogs.find(({id:t})=>t==this.dialogId)||{}:{}},draftData(){var t;return((t=this.getDialogDraft(this.dialogId))==null?void 0:t.content)||""},quoteData(){var t;return((t=this.getDialogQuote(this.dialogId))==null?void 0:t.content)||null},quoteUpdate(){var t;return((t=this.getDialogQuote(this.dialogId))==null?void 0:t.type)==="update"},chatInputBoxStyle({iOSDevices:t,fullInput:s,viewportHeight:e}){const i={};return t&&s&&e>0&&(i.height=Math.max(100,e-70)+"px"),i}},watch:{value(t){this.quill&&(t&&t!==this._content?(this._content=t,this.setContent(t)):t||this.quill.setText("")),this.simpleMode||this.$store.dispatch("saveDialogDraft",{id:this.dialogId,content:t})},disabled(t){var s;(s=this.quill)==null||s.enable(!t)},dialogId(t,s){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.reportList={},this.loadInputDraft(),ct(t,this._uid),dt(s,this._uid)},taskId(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.reportList={},this.loadInputDraft()},draftData(){this.isFocus||this.loadInputDraft()},quoteData(){this.quoteChanged=!0},showMenu(t){t&&(this.showMore=!1,this.showEmoji=!1,this.emojiQuickShow=!1)},showMore(t){t&&(this.showMenu=!1,this.showEmoji=!1,this.emojiQuickShow=!1)},showEmoji(t){if(this.emojiBottom&&(t?this.quill.enable(!1):this.disabled||this.quill.enable(!0)),t){let s=this.value.replace(/ /g," ").replace(/<[^>]+>/g,"");if(s&&s.indexOf(" ")===-1&&s.length>=1&&s.length<=8?this.emojiQuickKey=s:this.emojiQuickKey="",this.showMenu=!1,this.showMore=!1,this.emojiQuickShow=!1,this.quill){const e=this.quill.selection.savedRange;this.rangeIndex=e?e.index:0}}else this.rangeIndex>0&&this.quill.setSelection(this.rangeIndex)},emojiQuickShow(t){t&&(this.showMenu=!1,this.showMore=!1,this.showEmoji=!1)},isFocus(t){this.scrollTimer&&clearInterval(this.scrollTimer),t?(this.$emit("on-focus"),this.hidePopover(),this.isSpecVersion||this.windowPortrait&&(this.scrollTimer=setInterval(()=>{var s;(s=this.quill)!=null&&s.hasFocus()?this.windowScrollY>0&&$A.scrollIntoViewIfNeeded(this.$refs.editor):clearInterval(this.scrollTimer)},200))):this.$emit("on-blur")},recordState(t){t==="ing"?this.recordWave=window.Recorder.FrequencyHistogramView({elem:this.$refs.recwave,lineCount:90,position:0,minHeight:1,stripeEnable:!1}):(this.recordWave=null,this.$refs.recwave.innerHTML=""),this.$emit("on-record-state",t)},recordShow(t){t&&(this.recordIndex=++window.modalTransferIndex)},recordConvertIng(t){t?this.recordIndex=++window.modalTransferIndex:this.recordConvertSetting=!1},fullInput(t){var s;(s=this.quill)==null||s.enable(!t)},windowScrollY(t){this.fullInput&&t>0&&window.scrollTo(0,0)}},methods:{init(){this._options=Object.assign({theme:"bubble",bubbleTooltipTop:!0,formats:["bold","strike","italic","underline","blockquote","list","link","image","mention"],readOnly:!1,placeholder:this.placeholder,modules:{toolbar:this.$isEEUiApp||this.windowTouch?!1:this.toolbar,keyboard:this.simpleMode?{}:{bindings:{"short enter":{key:"Enter",shortKey:!0,handler:t=>this.isEnterSend?!0:(this.onSend(),!1)},enter:{key:"Enter",shiftKey:!1,handler:t=>this.isEnterSend?(this.onSend(),!1):!0},esc:{key:"Escape",shiftKey:!1,handler:t=>this.emojiQuickShow?(this.emojiQuickShow=!1,!1):!0}}},mention:this.quillMention()}},this.options),this.quill=new g(this.$refs.editor,this._options),this.quill.enable(!this.disabled),this.value?this.setContent(this.value):this.loadInputDraft(),this.quill.on("selection-change",t=>{if(t)this.selectRange=t;else if(this.selectRange&&document.activeElement&&/(ql-editor|ql-clipboard)/.test(document.activeElement.className)){this.selectTimer&&clearTimeout(this.selectTimer),this.selectTimer=setTimeout(s=>{this.quill.setSelection(this.selectRange.index,this.selectRange.length)},100);return}this.isFocus=!!t}),this.quill.on("text-change",t=>{if(this.isFocus){const{index:s}=this.quill.getSelection();if(this.quill.getText(s-1,1)==="\r"){this.quill.insertText(s,`
|
|
`),this.quill.deleteText(s-1,1);return}}this.textTimer?clearTimeout(this.textTimer):this.changeLoad++,this.textTimer=setTimeout(s=>{this.textTimer=null,this.changeLoad--,this.maxlength>0&&this.quill.getLength()>this.maxlength&&this.quill.deleteText(this.maxlength,this.quill.getLength());const e=this.$refs.editor.firstChild.innerHTML;this.updateEmojiQuick(e),this._content=e,this.$emit("input",this._content)},100)}),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(t,s)=>(this.pasteClean&&(s.ops=s.ops.map(e=>{const i={insert:e.insert};try{typeof i.insert.mention=="object"&&t.innerHTML&&(i.insert=t.innerHTML.replace(/<[^>]+>/g,""))}catch{}return e.attributes&&["bold","strike","italic","underline","list","blockquote","link"].some(a=>{e.attributes[a]&&(typeof i.attributes=="undefined"&&(i.attributes={}),i.attributes[a]=e.attributes[a])}),i})),s)),this.$nextTick(t=>{this.$isEEUiApp&&this.cacheKeyboard.send_button_app==="enter"&&this.quill.root.setAttribute("enterkeyhint","send")}),this.$emit("on-ready",this.quill),this.disabledRecord||$A.loadScriptS(["js/recorder/recorder.mp3.min.js","js/recorder/lib.fft.js","js/recorder/frequency.histogram.view.js"]).then(t=>{typeof window.Recorder=="function"&&(this.recordRec=window.Recorder({type:"mp3",bitRate:64,sampleRate:32e3,audioTrackSet:{noiseSuppression:!0,echoCancellation:!0},disableEnvInFix:!1,onProcess:(s,e,i,a,o,l)=>{var n;(n=this.recordWave)==null||n.input(s[s.length-1],e,a),this.recordDuration=i,i>=3*60*1e3&&this.stopRecord(!1)}}),window.Recorder.Support()&&(this.recordReady=!0),window.systemInfo.debug!=="yes"&&(window.Recorder.CLog=function(){}))})},quillMention(){return{allowedChars:/^\S*$/,mentionDenotationChars:["@","#","~","%"],defaultMenuOrientation:this.defaultMenuOrientation,isolateCharacter:!0,positioningStrategy:"fixed",renderItem:t=>{if(t.disabled===!0)return`<div class="mention-item-disabled">${t.value}</div>`;const s=`<div class="mention-item-name" title="${t.value}">${t.value}</div>`,e=t.tip?`<div class="mention-item-tip" title="${t.tip}">${t.tip}</div>`:"";if(t.id===0)return`<div class="mention-item-at">@</div>${s}${e}`;if(t.avatar){const i=t.bot?'<div class="taskfont mention-item-bot"></div>':"";return`<div class="mention-item-img${t.online?" online":""}"><img src="${t.avatar}"/><em></em></div>${i}${s}${e}`}return`${s}${e}`},renderLoading:()=>"Loading...",source:(t,s,e)=>{const i=e=="@"?"user-mention":e=="#"?"task-mention":"file-mention",a=document.getElementsByClassName("ql-mention-list-container");for(let l=0;l<a.length;l++)a[l].classList.remove("user-mention"),a[l].classList.remove("task-mention"),a[l].classList.remove("file-mention"),a[l].classList.add(i),$A.scrollPreventThrough(a[l]);let o=null;this.getMentionSource(e,t,l=>{const n=[];l.some(r=>{let c=r.list;t&&(c=c.filter(({value:u})=>$A.strExists(u,t))),c.length>0&&(r.label&&n.push(...r.label),n.push(...c))}),$A.jsonStringify(n.map(({id:r})=>r))!==o&&(o=$A.jsonStringify(n.map(({id:r})=>r)),s(n,t))})}}},updateEmojiQuick(t){if(!this.isFocus||!t){this.emojiQuickShow=!1;return}this.emojiTimer&&clearTimeout(this.emojiTimer),this.emojiTimer=setTimeout(s=>{if(this.emojiTimer=null,/<img/i.test(t)){this.emojiQuickShow=!1;return}if(t=t.replace(/ /g," ").replace(/<[^>]+>/g,""),t&&t.indexOf(" ")===-1&&t.length>=1&&t.length<=8&&$A.isArray(window.emoticonData)){this.emojiQuickItems=[];const e=$A.mainUrl("images/emoticon");if(window.emoticonData.some(i=>{let a=0;if(i.list.some(o=>{const l=[o.name];if(o.key&&l.push(...`${o.key}`.split(" ")),l.includes(t)&&(this.emojiQuickItems.push(Object.assign(o,{type:"emoticon",asset:`images/emoticon/${i.path}/${o.path}`,name:o.name,src:`${e}/${i.path}/${o.path}`})),++a>=2))return!0}),this.emojiQuickItems.length>=20)return!0}),this.emojiQuickItems.length>0){this.$refs.emojiWrapper.$el.style.maxWidth=`${Math.min(500,this.$refs.inputWrapper.clientWidth)}px`,this.$nextTick(i=>{this.emojiQuickShow=!0,this.$refs.emojiQuickRef.updatePopper()});return}}this.emojiQuickShow=!1},100)},getEditor(){return this.fullInput?this.fullQuill:this.quill},getText(){return this.quill?`${this.quill.getText()}`.replace(/^\s+|\s+$/g,""):""},setText(t){this.quill&&this.quill.setText(t)},setContent(t){this.quill&&this.quill.setContents(this.quill.clipboard.convert({html:t}))},setPasteMode(t){this.pasteClean=t},loadInputDraft(){if(this.simpleMode||!this.draftData){this.$emit("input","");return}this.pasteClean=!1,this.$emit("input",this.draftData),this.$nextTick(t=>this.pasteClean=!0)},onClickEditor(){this.clearSearchKey(),this.updateEmojiQuick(this.value)},clearSearchKey(){this.$parent.$options.name==="DialogWrapper"&&(this.$store.state.messengerSearchKey.dialog!=""||this.$store.state.messengerSearchKey.contacts!="")&&setTimeout(t=>{this.$parent.onActive()},10),this.$store.state.messengerSearchKey={dialog:"",contacts:""}},focus(){this.$nextTick(()=>{const t=this.getEditor();t&&(t.setSelection(t.getLength()),t.focus())})},blur(){this.$nextTick(()=>{var t;(t=this.getEditor())==null||t.blur()})},clickSend(t,s){var e;if(!this.loading)switch(t){case"down":if(this.touchFocus=(e=this.quill)==null?void 0:e.hasFocus(),this.touchLimitX=!1,this.touchLimitY=!1,this.touchStart=s.type==="touchstart"?s.touches[0]:s,(s.button===void 0||s.button===0)&&this.startRecord())return;s.button===2&&this.onShowMenu();break;case"move":const i=s.type==="touchmove"?s.touches[0]:s;this.touchLimitX=(this.touchStart.clientX-i.clientX)/window.innerWidth>.1,this.touchLimitY=(this.touchStart.clientY-i.clientY)/window.innerHeight>.1;break;case"up":if(this.showMenu||this.stopRecord(this.touchLimitY,this.touchLimitX)||this.touchLimitY||this.touchLimitX)return;this.onSend();break;case"click":this.touchFocus&&(this.quill.blur(),this.quill.focus());break}},onShowMenu(){this.sendClass==="recorder"||!this.sendMenu||(this.showMenu=!0)},onSend(t="auto"){this.emojiTimer&&clearTimeout(this.emojiTimer),this.emojiQuickShow=!1,setTimeout(s=>{$A.filterInvalidLine(this.value)!==""&&(this.hidePopover("send"),this.rangeIndex=0,this.clearSearchKey(),t==="auto"&&(t=Ct(this.value)?"md":""),t==="normal"&&(t=""),t?this.$emit("on-send",null,t):this.$emit("on-send"))},this.changeLoad>0?100:0)},startRecord(){return this.sendClass==="recorder"?(this.$store.dispatch("audioStop",!0),this.recordDuration=0,this.recordState="ready",this.$nextTick(t=>{this.recordRec.open(s=>{this.recordState==="ready"?(this.recordState="ing",this.recordBlob=null,setTimeout(e=>{this.recordState=="stop"?this.recordRec.close():this.recordRec.start()},300)):this.recordRec.close()},s=>{this.recordState="stop",$A.messageError(s||"\u6253\u5F00\u5F55\u97F3\u5931\u8D25")})}),!0):!1},stopRecord(t,s=!1){switch(this.recordState){case"ing":return this.recordState="stop",this.recordRec.stop((e,i)=>{this.recordRec.close(),t!==!0&&(i<600?$A.messageWarning("\u8BF4\u8BDD\u65F6\u95F4\u592A\u77ED"):(this.recordBlob=e,this.recordDuration=i,s===!0?(this.blur(),this.convertRecord()):this.uploadRecord()))},e=>{this.recordRec.close(),$A.messageError(e||"\u5F55\u97F3\u5931\u8D25")}),!0;case"ready":return this.recordState="stop",!0;default:return this.recordState="stop",!1}},hidePopover(t){this.showMenu=!1,this.showMore=!1,t!=="send"&&(this.showEmoji=!1,this.emojiQuickShow=!1)},onClickCover(){this.hidePopover(),this.$nextTick(t=>{var s;(s=this.quill)==null||s.focus()})},onTouchClick(t,s){var i;let e=s.getAttribute("data-action");switch(e==="children"&&(e=(i=t.target)==null?void 0:i.getAttribute("data-action")),e){case"cancel-quote":this.cancelQuote();break;case"record-convert-cancel":this.recordConvertIng=!1;break;case"record-convert-voice":this.convertSend("voice");break;case"record-convert-result":this.convertSend("result");break}},convertRecord(){if(this.recordBlob===null){this.recordConvertIng=!1;return}this.recordConvertResult="",this.recordConvertStatus=0,this.recordConvertIng=!0;const t=new FileReader;t.onloadend=()=>{this.$store.dispatch("call",{url:"dialog/msg/convertrecord",data:{dialog_id:this.dialogId,base64:t.result,duration:this.recordDuration,language:this.cacheTranscriptionLanguage,translate:this.recordConvertTranslate},method:"post"}).then(({data:s})=>{s?(this.recordConvertStatus=1,this.recordConvertResult=s,this.recordConvertSetting=!0):(this.recordConvertStatus=2,this.recordConvertResult=this.$L("\u8F6C\u6587\u5B57\u5931\u8D25"))}).catch(({msg:s})=>{this.recordConvertStatus=2,this.recordConvertResult=s})},t.readAsDataURL(this.recordBlob)},async convertSetting(t,s){if(this.recordConvertStatus!==1){$A.messageWarning("\u8BF7\u7A0D\u540E\u518D\u8BD5...");return}await this.$nextTick();const e=Object.keys(k).map(a=>({label:k[a],value:a}));let i;t==="transcription"?(e.unshift({label:"\u9009\u62E9\u8BC6\u522B\u8BED\u8A00",value:"",disabled:!0},{label:"\u81EA\u52A8\u8BC6\u522B",value:"",divided:!0}),i=this.cacheTranscriptionLanguage):(e.unshift({label:"\u9009\u62E9\u7FFB\u8BD1\u7ED3\u679C",value:"",disabled:!0},{label:"\u4E0D\u7FFB\u8BD1\u7ED3\u679C",value:"",divided:!0}),i=this.recordConvertTranslate),this.$store.state.menuOperation={event:s,list:e,active:i,onUpdate:async a=>{t==="transcription"?await this.$store.dispatch("setTranscriptionLanguage",a):this.recordConvertTranslate=a,this.convertRecord()}}},convertSend(t){!this.recordConvertIng||(t==="voice"?(this.uploadRecord(),this.recordConvertIng=!1):this.recordConvertStatus===1?(this.$emit("on-send",this.recordConvertResult),this.recordConvertIng=!1):this.recordConvertStatus===2&&this.convertRecord())},uploadRecord(){if(this.recordBlob===null)return;const t=new FileReader;t.onloadend=()=>{this.$emit("on-record",{type:this.recordBlob.type,base64:t.result,duration:this.recordDuration})},t.readAsDataURL(this.recordBlob)},onEmojiQuick(t){t.type==="online"?this.$emit("on-send",`<img src="${t.src}"/>`):this.$emit("on-send",`<img class="emoticon" data-asset="${t.asset}" data-name="${t.name}" src="${t.src}"/>`),this.$emit("input",""),this.emojiQuickShow=!1,this.focus()},onSelectEmoji(t){!this.quill||(t.type==="emoji"?(this.quill.insertText(this.rangeIndex,t.text),this.rangeIndex+=t.text.length,this.windowLandscape&&!this.isModKey&&(this.showEmoji=!1)):t.type==="emoticon"&&(this.$emit("on-send",`<img class="emoticon" data-asset="${t.asset}" data-name="${t.name}" src="${t.src}"/>`),t.asset==="emosearch"&&this.$emit("input",""),this.windowLandscape&&!this.isModKey&&(this.showEmoji=!1)))},onToolbar(t){switch(this.hidePopover(),t){case"user":this.openMenu("@");break;case"task":this.openMenu("#");break;case"meeting":mt.emit("addMeeting",{type:"create",dialog_id:this.dialogId,userids:[this.userId]});break;case"full":this.onFullInput();break;case"image":case"file":case"call":case"anon":this.$emit("on-more",t);break;case"word-chain":this.$store.state.dialogDroupWordChain={type:"create",dialog_id:this.dialogId};break;case"vote":this.$store.state.dialogGroupVote={type:"create",dialog_id:this.dialogId};break}},onFullInput(){this.disabled||(this.fullInput=!this.fullInput,this.fullInput&&this.$nextTick(t=>{this.fullQuill=new g(this.$refs.editorFull,Object.assign({theme:"bubble",readOnly:!1,placeholder:this.placeholder,modules:{toolbar:!1,mention:this.quillMention()}},this.options)),this.fullQuill.on("selection-change",s=>{this.fullSelection=s||{index:0,length:0}}),this.fullQuill.on("text-change",s=>{this.fullSelection=this.fullQuill.getSelection()}),this.fullQuill.enable(!0),this.$refs.editorFull.firstChild.innerHTML=this.$refs.editor.firstChild.innerHTML,this.$nextTick(s=>{this.fullQuill.setSelection(this.fullQuill.getLength()),this.fullQuill.focus()})}))},onFullBeforeClose(){return new Promise(t=>{var s;(s=this.$refs.editorFull)!=null&&s.firstChild&&(this.$refs.editor.firstChild.innerHTML=this.$refs.editorFull.firstChild.innerHTML),t()})},onFullMenu(t,s){const{length:e}=this.fullQuill.getSelection(!0);if(e===0){$A.messageWarning("\u8BF7\u9009\u62E9\u6587\u5B57\u540E\u518D\u64CD\u4F5C");return}switch(t){case"bold":this.fullQuill.format("bold",!this.fullQuill.getFormat().bold);break;case"strike":this.fullQuill.format("strike",!this.fullQuill.getFormat().strike);break;case"italic":this.fullQuill.format("italic",!this.fullQuill.getFormat().italic);break;case"underline":this.fullQuill.format("underline",!this.fullQuill.getFormat().underline);break;case"blockquote":this.fullQuill.format("blockquote",!this.fullQuill.getFormat().blockquote);break;case"link":if(this.fullQuill.getFormat().link){this.fullQuill.format("link",!1);return}$A.modalInput({title:"\u63D2\u5165\u94FE\u63A5",placeholder:"\u8BF7\u8F93\u5165\u5B8C\u6574\u7684\u94FE\u63A5\u5730\u5740",onOk:i=>{if(!i)return!1;this.fullQuill.format("link",i)}});break;case"list":this.fullQuill.format("list",this.fullQuill.getFormat().list===s?!1:s);break}},setQuote(t,s="reply"){if(this.dialogId<=0)return;const e=this.dialogMsgs.find(i=>i.id==t&&i.dialog_id==this.dialogId);if(!e){this.$store.dispatch("removeDialogQuote",this.dialogId);return}this.$store.dispatch("saveDialogQuote",{id:this.dialogId,type:s==="update"?"update":"reply",content:e})},cancelQuote(){if(this.quoteUpdate)this.$emit("input","");else if(this.quoteData){const{firstChild:t}=this.$refs.editor;if(t&&t.querySelectorAll("img").length===0){const s=t.querySelectorAll("span.mention");if(s.length===1){const e=s[0];if(e.getAttribute("data-id")==this.quoteData.userid){const i=e.parentNode;i.normalize(),Array.from(i.childNodes).filter(o=>o.nodeType!==Node.TEXT_NODE||!/^\s*$/.test(o.textContent)).length===1&&e.remove()}}t.innerText.replace(/\s/g,"")||this.$emit("input","")}}this.setQuote(0)},onQuoteUserResult(t){var s;!this.quoteChanged||(this.quoteChanged=!1,!(this.dialogData.type!=="group"||this.quoteUpdate||!this.quoteData||!this.replyMsgAutoMention||this.userId===t.userid||this.quoteData.userid!==t.userid)&&(new RegExp(`<span[^>]+?class="mention"[^>]+?data-id="${t.userid}"[^>]*?>`).test((s=this.$refs.editor.firstChild)==null?void 0:s.innerHTML)||this.addMention({denotationChar:"@",id:t.userid,value:t.nickname})))},onSpaceInputFocus(){var t;this.selectRange&&((t=this.quill)==null||t.setSelection(this.selectRange.index,this.selectRange.length))},openMenu(t){if(!!this.quill)if(this.value.length===0||this.value.endsWith("<p><br></p>"))this.quill.getModule("mention").openMenu(t);else{let s=this.value.replace(/<[^>]+>/g,"");s.length===0||s.endsWith(" ")?this.quill.getModule("mention").openMenu(t):this.quill.getModule("mention").openMenu(` ${t}`)}},addMention(t){if(!this.quill||!Ta(this.dialogId,this._uid))return;const{index:s}=this.quill.getSelection(!0);this.quill.insertEmbed(s,"mention",t,g.sources.USER),this.quill.insertText(s+1," ",g.sources.USER),this.quill.setSelection(s+2,g.sources.USER)},getProjectId(){let t=null;if(this.dialogId>0){if(t=this.cacheProjects.find(({dialog_id:s})=>s==this.dialogId),t)return t.id;if(t=this.cacheTasks.find(({dialog_id:s})=>s==this.dialogId),t)return t.project_id}else if(this.taskId>0&&(t=this.cacheTasks.find(({id:s})=>s==this.taskId),t))return t.project_id;return 0},getMentionSource(t,s,e){switch(t){case"@":this.mentionMode="user-mention";const i=n=>{this.getMoreUser(s,n.map(r=>r.id)).then(r=>{let c=this.cacheDialogs.filter((u,h)=>u.type=="user"&&u.bot==0&&u.last_at);c.sort((u,h)=>u.last_at>h.last_at?-1:u.last_at<h.last_at?1:0),c=c.filter((u,h)=>h<5),r.forEach(u=>{u.last_at="1990-01-01 00:00:00",c.forEach(h=>{var p;((p=h.dialog_user)==null?void 0:p.userid)==u.id&&(u.last_at=h.last_at)})}),r.sort((u,h)=>u.last_at>h.last_at?-1:u.last_at<h.last_at?1:0),this.userList=n,this.userCache=[],r.length>0?(n.length>2&&this.userCache.push({label:null,list:[{id:0,value:this.$L("\u6240\u6709\u4EBA.All"),tip:""}]}),this.userCache.push({label:[{id:0,value:this.$L("\u7FA4\u5185\u6210\u5458"),disabled:!0}],list:n},{label:[{id:0,value:this.$L("\u7FA4\u5916\u6210\u5458"),disabled:!0}],list:r})):n.length>2?this.userCache.push({label:null,list:[{id:0,value:this.$L("\u6240\u6709\u4EBA.All"),tip:""}]},{label:[{id:0,value:this.$L("\u7FA4\u6210\u5458"),disabled:!0}],list:n}):this.userCache.push({label:null,list:n}),e(this.userCache)})};if(this.dialogData.people&&$A.arrayLength(this.userList)!==this.dialogData.people&&(this.userList=null,this.userCache=null),this.userCache!==null&&e(this.userCache),this.userList!==null){i(this.userList);return}const a=[];if(this.dialogId>0)this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId,getuser:1}}).then(({data:n})=>{this.cacheDialogs.find(({id:r})=>r==this.dialogId)&&this.$store.dispatch("saveDialog",{id:this.dialogId,people:n.length,people_user:n.filter(r=>!r.bot).length,people_bot:n.filter(r=>r.bot).length}),n.length>0&&a.push(...n.map(r=>({id:r.userid,value:r.nickname,avatar:r.userimg,online:r.online,bot:r.bot}))),i(a)}).catch(n=>{i(a)});else if(this.taskId>0){const n=this.cacheTasks.find(({id:r})=>r==this.taskId);n&&$A.isArray(n.task_user)&&n.task_user.some(r=>{const c=this.cacheUserBasic.find(({userid:u})=>u==r.userid);c&&a.push({id:c.userid,value:c.nickname,avatar:c.userimg,online:c.online,bot:c.bot})}),i(a)}break;case"#":if(this.mentionMode="task-mention",this.taskList!==null){e(this.taskList);return}const o=n=>{this.taskList=[],n.length>0&&(n=n.map(_=>({id:_.id,value:_.name,tip:_.complete_at?this.$L("\u5DF2\u5B8C\u6210"):null})).splice(0,100),this.taskList.push({label:[{id:0,value:this.$L("\u9879\u76EE\u4EFB\u52A1"),disabled:!0}],list:n}));const{overdue:r,today:c,todo:u}=this.$store.getters.dashboardTask,h=[...r,...c,...u];let p=this.$store.getters.transforTasks(h);p.length>0&&(p=p.sort((_,C)=>$A.sortDay(_.end_at||"2099-12-31 23:59:59",C.end_at||"2099-12-31 23:59:59")).splice(0,100),this.taskList.push({label:[{id:0,value:this.$L("\u6211\u7684\u5F85\u5B8C\u6210\u4EFB\u52A1"),disabled:!0}],list:p.map(_=>({id:_.id,value:_.name}))}));let v=this.$store.getters.assistTask;v.length>0&&(v=v.sort((_,C)=>$A.sortDay(_.end_at||"2099-12-31 23:59:59",C.end_at||"2099-12-31 23:59:59")).splice(0,100),this.taskList.push({label:[{id:0,value:this.$L("\u6211\u534F\u52A9\u7684\u4EFB\u52A1"),disabled:!0}],list:v.map(_=>({id:_.id,value:_.name}))})),e(this.taskList)},l=this.getProjectId();if(l>0){this.$store.dispatch("getTaskForProject",l).then(n=>{const r=this.cacheTasks.filter(c=>c.archived_at?!1:c.project_id==l&&c.parent_id===0&&!c.archived_at).sort((c,u)=>$A.sortDay(u.complete_at||"2099-12-31 23:59:59",c.complete_at||"2099-12-31 23:59:59"));r.length>0?o(r):o([])}).catch(n=>{o([])});return}o([]);break;case"~":if(this.mentionMode="file-mention",$A.isArray(this.fileList[s])){e(this.fileList[s]);return}this.fileTimer&&clearTimeout(this.fileTimer),this.fileTimer=setTimeout(async n=>{var u;const r=[],c=(u=await this.$store.dispatch("searchFiles",s).catch(h=>{}))==null?void 0:u.data;c&&(r.push({label:[{id:0,value:this.$L("\u6587\u4EF6\u5206\u4EAB\u67E5\u770B"),disabled:!0}],list:c.filter(h=>h.type!=="folder").map(h=>({id:h.id,value:h.ext?`${h.name}.${h.ext}`:h.name}))}),this.fileList[s]=r),e(r)},300);break;case"%":if(this.mentionMode="report-mention",$A.isArray(this.reportList[s])){e(this.reportList[s]);return}this.reportTimer&&clearTimeout(this.reportTimer),this.reportTimer=setTimeout(async n=>{var p,v;const r=[];let c=2;const u=(p=await this.$store.dispatch("call",{url:"report/my",data:{keys:{key:s}}}).catch(_=>{}))==null?void 0:p.data;u&&(r.push({label:[{id:0,value:this.$L("\u6211\u7684\u62A5\u544A"),disabled:!0}],list:u.data.map(_=>({id:_.id,value:_.title}))}),c--);const h=(v=await this.$store.dispatch("call",{url:"report/receive",data:{keys:{key:s}}}).catch(_=>{}))==null?void 0:v.data;h&&(r.push({label:[{id:0,value:this.$L("\u6536\u5230\u7684\u62A5\u544A"),disabled:!0}],list:h.data.map(_=>({id:_.id,value:_.title}))}),c--),c===0&&(this.reportList[s]=r),e(r)},300);break;default:e([]);break}},getMoreUser(t,s){return new Promise(e=>{const{owner_id:i,type:a}=this.dialogData,o=a==="group"&&[0,this.userId].includes(i);this.taskId>0||o?(this.moreTimer&&clearTimeout(this.moreTimer),this.moreTimer=setTimeout(l=>{this.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,bot:2},state:1,take:30}}).then(({data:n})=>{const r=n.filter(c=>!s.includes(c.userid));e(r.map(c=>({id:c.userid,value:c.nickname,avatar:c.userimg,online:!!c.online})))}).catch(n=>{e([])})},this.userCache===null?0:600)):e([])})},checkIOSVersion(){let s=(window&&window.navigator&&window.navigator.userAgent).match(/OS ((\d+_?){2,3})\s/i);const i=(s?s[1].replace(/_/g,"."):"unknown").split(".");return+i[0]==11&&+i[1]>=0&&+i[1]<3},handlePaste(t){const s=Array.prototype.slice.call(t.clipboardData.files);s.filter(i=>!$A.leftExists(i.type,"image/")).length>0&&(t.preventDefault(),this.$emit("on-file",s))},updateTools(){var s,e,i,a;this.showEmoji&&((s=this.$refs.emoji)==null||s.updatePopper()),this.showMore&&((e=this.$refs.more)==null||e.updatePopper()),this.showMenu&&((i=this.$refs.menu)==null||i.updatePopper());const t=(a=this.quill)==null?void 0:a.getModule("mention");t.isOpen&&t.setMentionContainerPosition()},visualViewportResize(){var t;this.viewportHeight=((t=window.visualViewport)==null?void 0:t.height)||0}}},ut={};var Ra=d(Aa,Ea,Ia,!1,Fa,null,null,null);function Fa(t){for(let s in ut)this[s]=ut[s]}var qa=function(){return Ra.exports}(),Ba=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Modal",{attrs:{title:t.title,"class-name":"common-user-select-modal forwarder-message-modal","mask-closable":!1,width:"420"},scopedSlots:t._u([{key:"footer",fn:function(){return[t.senderHidden?t._e():e("div",{staticClass:"forwarder-wrapper-footer",class:{selected:!t.sender},on:{click:t.onSender}},[e("Icon",{staticClass:"user-modal-icon",attrs:{type:t.sender?"ios-radio-button-off":"ios-checkmark-circle"}}),e("span",{staticClass:"forward-text-tip"},[t._v(t._s(t.$L("\u4E0D\u663E\u793A\u539F\u53D1\u9001\u8005\u4FE1\u606F")))])],1),e("Button",{attrs:{type:"primary",loading:t.loading},on:{click:t.onSubmit}},[t._v(" "+t._s(t.$L("\u786E\u5B9A"))+" "),t.forwardTo.length>0?[t._v("("+t._s(t.forwardTo.length)+")")]:t._e()],2)]},proxy:!0}]),model:{value:t.show,callback:function(i){t.show=i},expression:"show"}},[e("div",{staticClass:"user-modal-search"},[e("Scrollbar",{staticClass:"search-selected",attrs:{"enable-x":"","enable-y":!1}},[e("ul",t._l(t.forwardTo,function(i){return e("li",{attrs:{"data-id":i.userid}},[i.type=="group"?e("div",{staticClass:"user-modal-avatar",attrs:{title:i.name}},[i.avatar?e("EAvatar",{staticClass:"img-avatar",attrs:{src:i.avatar,size:32}}):i.group_type=="department"?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("\uE75C")]):i.group_type=="project"?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("\uE6F9")]):i.group_type=="task"?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):i.group_type=="okr"?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}}),t.forwardTo.length==1?e("div",{staticClass:"avatar-name"},[e("span",[t._v(t._s(i.name))])]):t._e()],1):e("UserAvatar",{attrs:{userid:i.userid,size:32,"show-name":t.forwardTo.length==1}})],1)}),0)])],1),e("div",{staticClass:"twice-affirm-body-extend"},[e("div",{staticClass:"forwarder-wrapper-body"},[t.msgDetail?e("div",{staticClass:"dialog-wrapper inde-list"},[e("Scrollbar",{attrs:{"class-name":"dialog-scroller"}},[e("DialogItem",{attrs:{source:t.msgDetail,simpleView:""},on:{"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-emoji":t.onEmoji,"on-other":t.onOther}})],1)],1):t._e(),e("div",{staticClass:"leave-message"},[t.dialogId>0?e("ChatInput",{attrs:{"dialog-id":t.dialogId,"emoji-bottom":t.windowPortrait,maxlength:2e5,placeholder:t.placeholder||t.$L("\u7559\u8A00"),disabled:t.loading,"disabled-record":"","simple-mode":""},model:{value:t.message,callback:function(i){t.message=i},expression:"message"}}):e("Input",{attrs:{type:"textarea",autosize:{minRows:1,maxRows:3},maxlength:2e5,placeholder:t.placeholder||t.$L("\u7559\u8A00"),disabled:t.loading,clearable:""},model:{value:t.message,callback:function(i){t.message=i},expression:"message"}})],1)])])])},Oa=[];const Va={components:{ChatInput:qa,DialogItem:ka},props:{value:{type:Boolean,default:!1},title:{type:String,default:""},placeholder:{type:String,default:null},senderHidden:{type:Boolean,default:!1},beforeSubmit:Function,dialogId:{type:Number,default:0},forwardTo:{type:Array,default:()=>[]},msgDetail:{type:Object,default:null}},data(){return{show:!1,loading:!1,message:"",sender:!0}},computed:{},watch:{value(t){this.show=t},show(t){this.$emit("input",t),t||(this.loading=!1,this.message="",this.sender=!0)}},methods:{onViewText(...t){this.$emit("on-view-text",...t)},onViewFile(...t){this.$emit("on-view-file",...t)},onDownFile(...t){this.$emit("on-down-file",...t)},onEmoji(...t){this.$emit("on-emoji",...t)},onOther(...t){this.$emit("on-other",...t)},onSender(){this.loading||(this.sender=!this.sender)},onSubmit(){if(this.loading)return;if(!this.beforeSubmit){this.hide();return}const t={message:this.message};this.senderHidden||(t.sender=this.sender);const s=this.beforeSubmit(t);s&&s.then?(this.loading=!0,s.then(()=>{this.hide()}).catch(e=>{}).finally(()=>{this.loading=!1})):this.hide()},hide(){this.show=!1}}},ht={};var Na=d(Va,Ba,Oa,!1,Pa,null,null,null);function Pa(t){for(let s in ht)this[s]=ht[s]}var Ua=function(){return Na.exports}(),za=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[e("UserSelect",{ref:"forwardSelect",attrs:{title:t.title,"show-bot":t.showBot,"multiple-max":t.userMaxSelect,"before-submit":t.onSelectBefore,"show-select-all":!1,"show-dialog":"",module:""}}),e("ForwardConfirm",{ref:"forwardConfirm",attrs:{title:t.confirmTitle,placeholder:t.confirmPlaceholder,"sender-hidden":t.senderHidden,"before-submit":t.onConfirmBefore,"dialog-id":t.forwardDialogId,"forward-to":t.forwardTo,"msg-detail":t.msgDetail},model:{value:t.confirmShow,callback:function(i){t.confirmShow=i},expression:"confirmShow"}})],1)},Ha=[];const Qa={name:"Forwarder",components:{UserSelect:wt,ForwardConfirm:Ua},props:{title:{type:String,default:"Forward"},confirmTitle:{type:String,default:"Forward Confirm"},confirmPlaceholder:{type:String,default:null},senderHidden:{type:Boolean,default:!1},showBot:{type:Boolean,default:!0},userMaxSelect:{type:Number,default:50},beforeSubmit:Function,msgDetail:{type:Object,default:null}},data(){return{confirmShow:!1,forwardDialogId:0,forwardTo:[]}},methods:{onSelection(){this.$refs.forwardSelect.onSelection()},onSelectBefore(){return new Promise((t,s)=>{if(this.forwardTo=this.$refs.forwardSelect.formatSelect(this.$refs.forwardSelect.selects),this.forwardTo.length===0)$A.messageError("\u8BF7\u9009\u62E9\u5BF9\u8BDD\u6216\u6210\u5458");else{if(this.forwardDialogId=0,this.forwardTo.length===1){const{type:e,userid:i}=this.forwardTo[0];e==="group"&&/^d:/.test(i)&&(this.forwardDialogId=parseInt(i.replace(/^d:/,"")))}this.confirmShow=!0}s()})},onConfirmBefore(t){return new Promise((s,e)=>{const i=this.$refs.forwardSelect.selects;if(i.length===0){$A.messageError("\u8BF7\u9009\u62E9\u5BF9\u8BDD\u6216\u6210\u5458"),e();return}t.dialogids=i.filter(l=>$A.leftExists(l,"d:")).map(l=>l.replace("d:","")),t.userids=i.filter(l=>!$A.leftExists(l,"d:")),this.msgDetail&&(t.msg_id=this.msgDetail.id);const a=()=>{this.$refs.forwardSelect.hide(),s()};if(!this.beforeSubmit){a();return}const o=this.beforeSubmit(t);o&&o.then?o.then(a).catch(e):a()})}}},_t={};var Wa=d(Qa,za,Ha,!1,Ka,null,null,null);function Ka(t){for(let s in _t)this[s]=_t[s]}var so=function(){return Wa.exports}();export{qa as C,ka as D,so as F,eo as c,w as l,Ma as t};
|