\n');I$("c1d55708b36e5cee72cf23349b7f94da",function(t,e,i,n,s,a,o,r,_,d){_._$$PhotoViewer=t._$klass();d=_._$$PhotoViewer._$extend(n._$$Abstract);d.__reset=function(t){this.__super(t);this.__doInitDomEvent([[this.__nok,"click",this.__onOK._$bind(this)],[this.__ncc,"click",this.__onCC._$bind(this)]]);this.__scrollbar=o._$$Scrollbar._$allocate({parent:this.__lbox});this.__list=t.photos||[];a._$render(this.__lbox,this.__seed_list,{photos:this.__list});this.__doUpdateClass(this.__list.length);this.__nok.focus()};d.__destroy=function(){this.__scrollbar._$recycle();this.__lbox.innerHTML="";delete this.__scrollbar;delete this.__list;this.__super()};d.__initXGui=function(){var t=s._$parseUITemplate(r);return function(){this.__seed_list=t.photoList;this.__seed_html=t.photoBody}}();d.__initNode=function(){this.__super();var t=e._$getByClassName(this.__body,"j-flag");this.__lbox=t[0];this.__nok=t[1];this.__ncc=t[2]};d.__doUpdateClass=function(){var t=["z-second","z-more"];return function(i){var n="";if(2==i)n=t[0];else if(i>2)n=t[1];e._$replaceClassName(this.__lbox.parentNode,t.join(" "),n)}}();d.__onOK=function(){this._$dispatchEvent("onok",{data:this.__list});this._$recycle()};d.__onCC=function(){this._$dispatchEvent("oncc");this._$recycle()};_._$preview=function(t){var e={parent:document.body};_._$$PhotoViewer._$allocate(i._$merge(e,t))}},"e4f0b0b7857ed3c1e2d0a46ba5b670d6","5fb495f256a5dcde2a92e5fe919a6422","fbbf6ddc0634989027d138f4ffd4b78b","8fe733a225a830dc6b1da5866dcaf23c","d252039c36767cb4f534ca3f91188796","2a0f6f00e8af2a07d5b9a7c4620f5b4e","c711308f00adca75206c9dc3966a29d2","0b8613625bee0baebd2cd625552996e5");I$("efa8f80f50bf19cd666a7c9c8c38605f",'\n\n\n');I$("0601a0c5ba07e512639f37a3e3c53ba0",function(t,e,i,n,s,a,o,r,_,d,c){d._$$FileModal=t._$klass();c=d._$$FileModal._$extend(s._$$Abstract);c.__init=function(t){this.__super(t);r._$extend({fileSizeFormat:a._$fileSizeFormat,spliceSuffix:a._$spliceSuffix})};c.__reset=function(t){this.__super(t);this.__data=n._$merge({max:9,files:[],isValid:!1},t);this.__data.originFiles=this.__data.files;this.__data.files=Array.prototype.slice.call(this.__data.files);var e=this.__data.files,i=this.__data.max;if(e.length>i)e.splice(i);n._$forEach(e,function(t){if("INPUT"==t.tagName&&t.value)t.name=t.value.match(/[^\/\\]+$/);t.isZero=t.size<=0?!0:!1;t.overSize=t.size>100*Math.pow(1024,2)?!0:!1});this.__onCanSendFile({result:t.canSend});this.__doInitDomEvent([[this.__nok,"click",this.__onOK._$bind(this)],[this.__ncancel,"click",this.__onCancel._$bind(this)]]);this._$addEvent("oncansendfile",this.__onCanSendFile._$bind(this));this.__nok.focus();this.__render()};c.__destroy=function(){this.__super()};c.__initXGui=function(){var t=o._$parseUITemplate(_);return function(){this.__seed_html=t.mdlBody;this.__list_html=t.fileList}}();c.__initNode=function(){this.__super();this.__ntlt=e._$getByClassName(this.__body,"modal_title")[0];this.__nok=e._$getByClassName(this.__body,"ok")[0];this.__ncancel=e._$getByClassName(this.__body,"cancel")[0];this.__nlist=e._$getByClassName(this.__body,"file-list")[0];this.__nerror=e._$getByClassName(this.__body,"u-error")[0]};c.__render=function(){r._$render(this.__nlist,this.__list_html,this.__data)};c.__onOK=function(t){if(this.__data.isValid){var e=this.__getValidateFiles();this._$dispatchEvent("onok",t,e);this._$recycle()}};c.__onCancel=function(t){this._$dispatchEvent("oncancel",t);this._$recycle()};c.__onCanSendFile=function(t){this.__data.canSend=t.result;this.__validate()};c.__getValidateFiles=function(){var t=[];n._$forEach(this.__data.files,function(e){if(!e.overSize&&!e.isZero)t.push(e)});return t};c.__validate=function(){if(this.__getValidateFiles().length>0&&this.__data.canSend){this.__data.isValid=!0;this._$enableOk()}else{this.__data.isValid=!1;this._$disableOk()}var t="";if(0==this.__data.canSend)t="您同一时间段发送文件过多,请稍后再试";else if(this.__data.originFiles.length>this.__data.max)t="一次仅可发送前"+this.__data.max+"个文件";this.__nerror.innerText=t};c._$disableOk=function(){e._$attr(this.__nok,"disabled",!0);e._$addClassName(this.__nok,"z-disabled");e._$style(this.__nok,{color:"#fff"})};c._$enableOk=function(){this.__nok.removeAttribute("disabled");e._$delClassName(this.__nok,"z-disabled");e._$style(this.__nok,{color:"#fff"})}},"e4f0b0b7857ed3c1e2d0a46ba5b670d6","5fb495f256a5dcde2a92e5fe919a6422","be567474249a271e4786c144ccf5f75a","fbbf6ddc0634989027d138f4ffd4b78b","8fe733a225a830dc6b1da5866dcaf23c","35df4ef4567b6cd0275a1b849d2bea8c","d252039c36767cb4f534ca3f91188796","2a0f6f00e8af2a07d5b9a7c4620f5b4e","efa8f80f50bf19cd666a7c9c8c38605f");I$("bad45afa5ce71bf8cd6e713026c82970",function(t,e){var i={};var n=0;e._$getCache=function(t){return i[t]};e._$setCache=function(t,e){i[t]=e};e._$parseTemplate=function(t){var i=e._$getTemplateType(t);switch(i){case"order_list":return e.__parseListTemplate(t);case"order_detail":return e.__parseDetailTemplate(t);case"order_logistic":return e.__parseFlowTemplate(t);case"order_status":return e.__parseStatusTemplate(t)}};e._$getTemplateType=function(t){var e=new DOMParser,i=e.parseFromString(t,"text/xml");return i.querySelector("template").getAttribute("id")};e.__parseListTemplate=function(t){var i=e.__botXmlParser(t),n={title:"",content:{list:[]}};var s=i.getLinks();n.title=i.getTextVal(null,"label");n.status=100;if(!(s.length<1)){for(var a=0;a0)n._$merge(t,{bot:this.__botCache});if(0==b){b=1;this._$dispatchEvent("onshuntstatus",t)}this.__cbAllocateKefu(t,e); },90:function(t,e){if(t.entries){this.__isShuntFlow=!0;var i=JSON.parse(t.entries),s=this.__getDataInCache("yunxin-kefu");this._$dispatchEvent("onshunt");this._$dispatchEvent("shuntentries",{entries:i,from:n._$merge(this._$getKefu(),{portrait:t.iconurl}),label:t.message})}},6:function(t,e){if(t.sessionid==this.__sessionId){var i=this.__getDataInCache("yunxin-kefu");var n=this.__evalBox[t.sessionid];var s={closeReason:t["close_reason"],evaluate:t.evaluate,message:t["message"],session_end_switch:i.shop.setting.session_end_switch,session_timeout_switch:i.shop.setting.session_timeout_switch};this._$keepConnection=t.keep_connection;this.__doDisConnect(s,this._$keepConnection);if(1==t.evaluate&&!n)this._$dispatchEvent("oneval",{autoPopup:t["evaluation_auto_popup"],messageInvite:this._$getEvaluation().messageInvite})}},50:function(t,e){this._$dispatchEvent("oneval",{autoPopup:t["evaluation_auto_popup"],messageInvite:t.message})},15:function(t,e){if(200!=t.code){if(302==t.code||303==t.code)this._$dispatchEvent("onqueuefail",t);this.__doClearQueueCheck()}else this._$dispatchEvent("onqueuechange",{showNum:t.showNum,before:t.before,inqueueNotify:t.inqueueNotify})},17:function(t,e){},60:function(t,e){var i=_._$parse(t);n._$forEach(i,function(t){var i=this.__getMessageBody(e);i.id=i.msgIdClient;this._$dispatchEvent("onmessage",n._$merge(i,t))},this)},70:function(t,e){this._$dispatchEvent("onovertime",{msg:t.message,time:t.timestamp})},95:function(t,e){this._$setSessionID(t.sessionid);this.__sesTokenMap[t.sessionid]=t.session_token;this.__sessionId=t.sessionid;var i=this.__getDataInCache("yunxin-kefu");this.__updateKefuName(t.staffname);var n=t.iconurl;if(~n.indexOf("nos.netease.com")||~n.indexOf("nosdn.127.net"))n+="?imageView&type=png|imageView&thumbnail=76y76&axis=5";this.__updataKefu("iconurl",n);this._$dispatchEvent("ontransferresult",{sessionId:t.sessionid,staffId:t.staffid,staffName:t.staffname||"",welcome:t.message||"",session_transfer_switch:i.shop.setting.session_transfer_switch})},72:function(e,i){var s={question:function(e,i){if(!y(i.idClient)){e.type="text";this._$dispatchEvent("onmessage",t.call(this,e,i))}},robot:function(t,e){var i={id:t.attach.msgidClient,evaluation:t.attach.evaluation};if(t.attach.evaluation_content)i.evalcontent=t.attach.evaluation_content;if(!t.attach.floating_layer_mark||t.attach.floating_layer_mark!=this.__floatingLayerMark)this._$dispatchEvent("onrobotanswerevalresult",i)}};n._$merge(i,{fromUser:1});if(s[e.type])s[e.type].call(this,e,i);else this._$dispatchEvent("onmessage",t.call(this,e,i))},134:function(t,e){var i={type:"push-msg",msgType:e.type,msgSessionId:e.ext.msgSessionId,content:e.text,from:this._$getKefu(),id:e.idServer,msgIdClient:e.idClient};var s=1,a=1;if(!this._$chatNoKefu){if(!document.hidden&&!x()&&1==this.__sdkWindowStatus){this._$sendPushMsgStatus(2,[i.msgSessionId]);a=0}if(1==this._$hasList){this._$dispatchEvent("onmessage",i);s=0}this._$dispatchEvent("onpushmessage",n._$merge(i,{append:s,sdkAppend:a}))}},203:function(t,e){var i=this.__getMessageBody(e);this._$dispatchEvent("receivethirdorder",n._$merge(i,{content:t}))},104:function(t){var e=this.__getDataInCache("yunxin-user");if(t.fromIp==e.ip)this._$dispatchEvent("oncansendfile",{timestamp:t.timestamp,result:t.result})},205:function(t){var e=t.template.id;if("order_list"==e||"card_layout"==e)this._$dispatchEvent("onmorebotlist",null,t);else if("pair"==e)this._$dispatchEvent("onmorebotdetail",null,t)},41:function(t){var e=t.message;if(0==t.result){this._$dispatchEvent("onusererror",e);if(this.__ktimer)this.__ktimer=window.clearTimeout(this.__ktimer)}},65:function(t,e){var e={type:"rich",time:e.time,msgIdClient:e.idClient,fromUser:e.fromUser,from:this._$getKefu(),id:e.idServer,sid:e.isOffline?-100:this._$getSessionID(),to:{id:e.to},content:t.content};this._$dispatchEvent("onmessage",e)},57:function(t,e){v[t.type]=t.config;this._$dispatchEvent("onconfig",t)},23:function(t,e){var i={"switch":t["switch"],sendingRate:t.sendingRate};v["input_assciation_permisson"]=i;var n={sessionid:t.sessionid,"switch":t["switch"],sendingRate:t.sendingRate,type:"input_assciation_permisson"};this._$dispatchEvent("onconfig",n)},25:function(t,e){this._$dispatchEvent("oninputassociation",t)},42:function(t,e){this._$dispatchEvent("onmsgtrashed",t)},405:function(t,e){var i=t.split_index;var s=t.split_id;var a=t.split_content||"";var o=t.msg_id||"";if(!this.__splitmsgCache[s])this.__splitmsgCache[s]={};this.__splitmsgCache[s][i]=a;if(t.split_count==n._$objectSize(this.__splitmsgCache[s])){var r="";for(var _=0;_3)i=i.slice(0,3);n._$forEach(i,function(t){if(t.label){if(t.label.length>8)t.label=t.label.substr(0,8);if(t.data)t.data=JSON.stringify(t.data);s.push(t)}},this);n._$merge(a.product,{tags:s})}}this._$dispatchEvent("onproductinfo",{id:e.idClient,msgIdClient:e.idClient,sid:t.sessionid,fromUser:0,data:a,type:"productinfo",from:this._$getKefu()})},211:function(t,e){this.__botCache=t.bot||[];this._$dispatchEvent("onbotentry",t.bot)},9:function(t){this._$dispatchEvent("onmessagereceipt",t)},28:function(t){t.msgIdClient=t.msgidClient;this._$dispatchEvent("onmsgwithdraw",t)}};e["17"]=e["6"];return function(t,i,s){d._$info("__onReceiveInstr",{msg:t,cmd:s});var a=t.content||"";try{a=JSON.parse(a);if(i&&!i[a.cmd]&&!s)return}catch(o){}var r=e[a.cmd||s];if(n._$isFunction(r))r.call(this,a,t)}}();u.__cbReceiveMessage=function(){var t={image:"file",audio:"file",video:"file"};var e={60:!0,90:!0,95:!0,72:!0,203:!0,205:!0,65:!0,121:!0};var i={2:134};return function(s,a){g&&g("[recieveMessage] msg:%O",s);if("custom"!=s.type)if(!/##/gi.test(s.idClient)){d._$info("recievemessage",s);g&&g("[dispatch message]");this._$dispatchEvent("onmessage",{type:s.type,time:s.time,id:s.idServer,sid:a?-100:this._$getSessionID(),content:s[t[s.type]||s.type],from:a?{id:-100}:this._$getKefu(),to:{id:s.to},msgIdClient:s.idClient})}else{var o=s.idClient.split("##"),r=o[0],_=o[1];n._$merge(s,{ext:{type:_,msgSessionId:r}});this.__onReceiveInstr(s,e,i[s.ext.type])}else{s.isOffline=a;this.__onReceiveInstr(s,e)}}}();u.__doDisConnect=function(t,e){this.__state=w.NULL;var i=n._$merge({time:+new Date},t);this.__delDataInCache("yunxin-kefu");this._$dispatchEvent("onfinish",i);if(1!=e)this.__nim.disconnect();this.__clearPrdStorage()};u.__onDisConnect=function(t){d._$error("__onDisConnect",t);this.__doClearQueueCheck();this.__delDataInCache("yunxin-kefu");if(this.__xtimer)this.__xtimer=window.clearInterval(this.__xtimer);if(this.__offlineAckTimer)this.__offlineAckTimer=window.clearInterval(this.__offlineAckTimer);if(this.__state!==w.NULL){this.__state=w.NULL;if(t.kicked)this._$dispatchEvent("onkickout");else this._$dispatchEvent("ondisconnect")}};u.__doCheckUserChange=function(){var t=this.__getUserInfo(),e=this;if(t)if(this.__last!=t.source){this.__last=t.source;var i=this.__getDataInCache("yunxin-user"),s=i.exchange[0];this.__nim.sendCustomSysMsg({to:s,cc:!0,filter:!0,scene:"p2p",content:JSON.stringify({cmd:52,foreignid:t.uid,userinfo:JSON.stringify(this.__getForeignInfo(t)),authToken:t.authToken||0}),done:function(t,e){if(t)d._$error("doCheckUserChange",n._$merge({cmd:52},t))}});g&&g("[reportCrm] content:%O",{cmd:52,foreignid:t.uid,userinfo:this.__getForeignInfo(t),authToken:t.authToken||0})}};u.__setRemoteStorage=function(t,i){var s={userInfo:function(){var s=e._$text2type(t.userInfo,"json");s=n._$object2query(s);var a="X-"+i.toUpperCase()+"-YSF-INFO";window.localStorage.setItem(a,s)},orderInfo:function(){var s=e._$text2type(t.orderInfo,"json");s=n._$object2query(s);var a="X-"+i.toUpperCase()+"-YSF-PRODUCT";window.localStorage.setItem(a,s)},analyticInfo:function(){var s=e._$text2type(t.analyticInfo,"json");s=n._$object2query(s);var a="X-"+i.toUpperCase()+"-YSF-WEBANALYTICS";window.localStorage.setItem(a,s)}};if(t)n._$loop(t,function(t,e){var i=s[e];if(i&&n._$isFunction(i))i.apply(this)}._$bind(this))};u._$getVisitor=function(){var t=this.__getDataInCache("yunxin-user");return{id:t.account}};u._$getAppkey=function(){return m.appkey||this.__getDataInCache("corp-appkey")};u._$getPrdKey=function(){return"X-"+this._$getAppkey().toUpperCase()+"-YSF-PRODUCT"};u._$getKefu=function(){var t=this.__getDataInCache("yunxin-kefu");if(!t)return{};else return{id:t.staffid,portrait:t.iconurl,nickname:t.staffname}};u._$getEvaluation=function(){return this.__getDataInCache("evaluation")||{}};u._$getSessionID=function(){return this.__sessionId||(this.__getDataInCache("yunxin-kefu")||{}).sessionid};u._$getRobotSessionID=function(){return this.__robotSessionId||""};u._$setSessionID=function(t){(this.__getDataInCache("yunxin-kefu")||{}).sessionid=t};u.__updateKefuName=function(t){(this.__getDataInCache("yunxin-kefu")||{}).staffname=t};u.__updataKefu=function(t,e){var i=this.__getDataInCache("yunxin-kefu")||{};i[t]=e};u._$isRobot=function(){var t=this.__getDataInCache("yunxin-kefu")||{};return 1==t.stafftype||1==t.robotInQueue};u._$connect=function(t,e,i){if(window.nim){window.nim.disconnect();delete window.nim}if(t.appkey||t.token){if(this.__state===w.NULL){this.__state=w.INIT;this.__doResetTimeout();t=t||{};this.__tmpOnly2kefu=e;if(i)this._$dispatchEvent("reconnect");if(!t.token)this.__doCreateYXUser(t.appkey);else this.__cbCreateYXUser(t.appkey,t); }}else this._$dispatchEvent("onusererror")};u._$pushMsgConnect=function(t,e,i){if(window.nim){window.nim.disconnect();delete window.nim}this.__doSendRequest("user-push-add",{data:{deviceid:this.__getDeviceID(),appkey:t||""},onload:function(s){s.appKey=t;s.exchange=s.exchange||[-1];s=n._$merge({},s,this.__nopt,{onerror:function(){},onconnect:function(){this._$sendPushMsg(e,i)}._$bind(this),ondisconnect:function(){},oncustomsysmsg:function(){}});window.nim=this.__nim=new NIM(s)}._$bind(this)})};u._$isInQueue=function(){return!!this.__qtimer};u._$canSendMessage=function(){return this._$isInQueue()||this.__state===w.CONNECTED};u._$isDelay=function(){return!!this.__delay};u._$sendMessage=function(){var t=function(t){var e={c:t.content.file,m:"sendFile"};var i=t.content.file;if(n._$isString(i))if(0===i.indexOf("data:image"))e.r="dataURL";else{e.r="file";e.c={url:i,size:1,md5:i,ext:"png",w:1,h:1}}else if("INPUT"===i.tagName)e.r="fileInput";else if(i.md5)e.r="file";else e.r="blob";return e};var e=function(t){var e={"crm-thirdorder":202};n._$merge(t.content,{cmd:e[t.type]});var i={m:"sendCustomMsg",r:"content",c:JSON.stringify(t.content)};return i};var i={image:t,audio:t,video:t,file:t,geo:{m:"sendGeo",r:"geo"},text:{m:"sendText",r:"text"},"crm-thirdorder":e};return function(t){if(this._$canSendMessage()){var e=i[t.type];if(n._$isFunction(e))e=e.call(this,t);if(e){var s=this.__getDataInCache("yunxin-user"),a=n._$merge({cc:!0,filter:!0,scene:"p2p",to:s.exchange[0]},t);a[e.r]=e.c||a.content;if("content"!=e.r)delete a.content;d._$info("_$sendMessage",a);return this.__nim[e.m](a)}else(t.done||h)({code:-2,message:"消息类型不支持"})}else(t.done||h)({code:-1,message:"长连接未建立"})}}();u._$updateEvaluate=function(t,e,i,n,s){t=parseInt(t,10);var a=this.__sesTokenMap[t];if(a){this.__evalBox[t]=!0;$.push(t);this.__doSendRequest("user-evaluate",{data:{appkey:this._$getAppkey(),sessionid:t,session_token:a,evaluation:e,fromtype:"web",remarks:encodeURIComponent(i),tagList:encodeURIComponent(JSON.stringify(n))},onload:function(){var n={sid:t,value:e,name:s,remarks:i};if(window.localStorage)window.localStorage.setItem(("YSF-SATISFY-"+this._$getAppkey()+"-"+t).toUpperCase(),JSON.stringify(n))},onerror:function(){d._$error("_$updateEvaluate",{sid:t,value:e,remarks:i,tagList:n});window.setTimeout(this._$updateEvaluate._$bind(this,t,e,i,n,s),1e4)}._$bind(this)})}};u._$syncRobot=function(t){if(this._$canSendMessage()){var e=this.__getDataInCache("yunxin-user"),i=this.__getDataInCache("yunxin-kefu"),s=n._$merge({cmd:61},t);this.__nim.sendCustomSysMsg({to:e.exchange[0],cc:!0,filter:!0,scene:"p2p",content:JSON.stringify(s),done:function(e){if(e){window.setTimeout(this._$syncRobot._$bind(this,t),1e4);d._$error("syncRobot",n._$merge({cmd:61},e))}}._$bind(this)})}};u._$syncRobotEx=function(t){var e={matched_question:"question",id:"questionid"};var i=function(t){var i={};for(var n in t)if(e[n])i[e[n]]=t[n];else i[n]=t[n];return i};if(this._$canSendMessage()){var s=this.__getDataInCache("yunxin-user"),a=this.__getDataInCache("yunxin-kefu"),o=n._$uniqueID(),r=n._$merge({cmd:63},i(t),{msgIdClient:o});this.__nim.sendCustomSysMsg({to:s.exchange[0],cc:!0,filter:!0,scene:"p2p",content:JSON.stringify(r),done:function(e,i){if(!e)$.push(o);else{window.setTimeout(this._$syncRobotEx._$bind(this,t),1e4);d._$error("syncRobotEx",n._$merge({cmd:63},e))}}._$bind(this)})}};u._$action=function(){var t={kefu:function(t){if(this._$isRobot())this.__cbConnect2Yunxin({type:1})}};return function(e,i){var s=t[e];if(n._$isFunction(s)){d._$info("_$action",{action:e,data:i});s.call(this,i)}}}();u._$sendOfflineMessage=function(t){var e=this.__getDataInCache("yunxin-user");this.__nim.sendCustomSysMsg({cc:!0,filter:!0,scene:"p2p",to:e.exchange[0],content:JSON.stringify({cmd:83,message:t.message||"",mobile:t.mobile||"",email:t.email||"",customFields:JSON.stringify(t.customFields||[])}),done:function(t){if(t){d._$error("_$sendOfflineMessage",t);this._$dispatchEvent("onleavesend",{error:t})}}._$bind(this)})};u._$sendSelectShunt=function(t){var e={type:1};n._$merge(e,t);b=0;this.__cbConnect2Yunxin(e)};u._$sendKefuHeart=function(t){var e=this,i=window.globalSetting.heartbeatCycle||8e3;var n=this.__getDataInCache("yunxin-user");var s=function(){if(t)e.__nim.sendCustomSysMsg({cc:!0,filter:!0,to:n.exchange[0],scene:"p2p",content:JSON.stringify({cmd:-1e3,sessionid:t}),done:function(t,n){if(e.__timeout)clearTimeout(e.__timeout);e.__timeout=setTimeout(function(){s()},i)}})};s()};u.__getProductInfo=function(){if(window.localStorage){var t=this.__getDataInCache("yunxin-user");var e="X-"+t.appKey.toUpperCase()+"-YSF-PRODUCT",i=localStorage.getItem(e);return null==i?null:n._$query2object(i)}};u.__setAckDvc=function(t){if(window.localStorage){var e="YSF-"+t.toUpperCase()+"-DVCTIME";window.localStorage.setItem(e,+new Date)}};u.__setAckTime=function(t){if(window.localStorage){var e="YSF-"+t+"-MSGTIME";if(!document.hidden&&!x()&&1==this.__sdkWindowStatus)window.localStorage.setItem(e,+new Date)}};u.__confirmAckDvc=function(t){if(window.localStorage){var e="YSF-"+t.toUpperCase()+"-DVCTIME",i=this.__getDeviceID(),a=2100,o=+new Date;if(Math.abs(o-Number(window.localStorage.getItem(e)))>a){var r=s._$md52hex(n._$uniqueID()+"-"+ +new Date);window.localStorage.setItem(i,r)}}};u._$sendPrdMsg=function(){var t=this;if(window.localStorage){var e=this._$getPrdKey(),i=localStorage.getItem(e),s="YSF-PRODUCT-"+this.__sessionId+"-last",a=localStorage.getItem(s);if(!i)return;var o=this.__getProductInfo();if(o.pageId!=m.pageId)return;if("1"==o.sendByUser){var r={id:n._$uniqueID(),type:"pre-product",fromUser:1,from:{id:-72},content:o};t._$dispatchEvent("onmessage",r)}else{if(i==a)return;this._$doSendPrdMsg(o)}}};u._$doSendPrdMsg=function(t){var e=this.__getDataInCache("yunxin-user"),i=this,s=this._$getPrdKey(),a=localStorage.getItem(s);lastPrdKey="YSF-PRODUCT-"+this.__sessionId+"-last",lastPrd=localStorage.getItem(lastPrdKey);if(t)i.__nim.sendCustomSysMsg({cc:!0,filter:!0,to:e.exchange[0],scene:"p2p",content:JSON.stringify(n._$merge({cmd:121},t)),done:function(e,s){if(!e){window.localStorage.setItem(lastPrdKey,a);var o=n._$merge({id:n._$uniqueID(),type:"productinfo",fromUser:1,from:{id:-72},time:s.time},t);if("1"==t.sendByUser)n._$merge(o,{read:0});i._$dispatchEvent("onmessage",o)}else{i._$dispatchEvent("onproducterror",{type:"product-error",content:"商品链接参数错误"});d._$error("sender3rdProductsInfo",n._$merge({cmd:121},e))}}})};u.__clearPrdStorage=function(){var t=this._$getPrdKey();window.localStorage.removeItem(t);var e=/^YSF-PRODUCT-\d+-last$/;for(var i in window.localStorage)if(e.test(i))window.localStorage.removeItem(i)};u._$sendPushMsg=function(t,e){t=t||[];var i=this.__getDataInCache("yunxin-user");for(var s=0;s\n\n\n\n');I$("3d11bad61274f72cc4672369e4367f45",function(t,e,i){i.__insertLineBreak=function(t){t.execCommand("insertLineBreak")};i.__insertHTML=function(t,e){t.execCommand("insertHTML",!1,e)};i.__unlink=function(t){t.execCommand("unlink",!1)};i.__getTextContent=function(t){return t&&t.innerText||""};i.__focusToEnd=function(t){t.focus();var e=t.getSelection();if(e.rangeCount>0){var i=e.getRangeAt(0);i.selectNodeContents(t.document.body);i.collapse(!1)}};i.__fixFocus=function(t){};i.__collapse=function(t){try{t.getSelection().collapseToEnd()}catch(e){}};i.__hasSelectionHack=function(){return!1};i.__saveSelection=function(){};i.__revertSelection=function(t,e){};i.__getPosition=function(t){if(t){var e=t.getSelection(),i=e.getRangeAt(0);if(i){var n=(i.getClientRects()||[])[0];if(n){var s=t.document,a=Math.max(s.body.scrollTop,s.documentElement.scrollTop),o=Math.min(s.body.clientHeight,s.documentElement.clientHeight);if(n.top>0&&n.top0)return i.getRangeAt(0)}else if(e.selection)return e.selection.createRange()};i.__revertSelection=function(t,e){if(t&&e)if(e.select)e.select();else if(t.getSelection){var i=t.getSelection();i.addRange(e)}}});if("trident"===t._$KERNEL.engine&&t._$KERNEL.release>"6.0")I$("6d476928bfbe08d2eac3dcf42e33ce24",function(){i.__insertLineBreak=function(t){var e=t.getSelection().getRangeAt(0);var i=t.createElement("p");i.innerText=" ";e.insertNode(i);e.collapse(!0)};i.__insertHTML=function(t,i){var n=t.getSelection();if(n.getRangeAt){var s=n.getRangeAt(0);if(s){var a=t.createElement("div");a.innerHTML=i;s.deleteContents();e._$reverseEach(a.childNodes,function(t){s.insertNode(t)});s.collapse(!1)}}}});if("trident"===t._$KERNEL.engine&&t._$KERNEL.release<="6.0")I$("d951de6b23d5aba225d22325eed7f522",function(){i.__insertLineBreak=function(t){var e=t.selection.createRange();e.pasteHTML("

");e.collapse(!1);e.select()};i.__insertHTML=function(t,e){var i=t.selection.createRange();if(i.pasteHTML)i.pasteHTML(e)};i.__hasSelectionHack=function(){return!0}});if("webkit"===t._$KERNEL.engine)I$("71eea72ff887613a8f02c41936272629",function(){i.__fixFocus=function(t){var e=t.getSelection();if(!(e&&e.rangeCount>0)){var i=t.document.createRange();i.selectNodeContents(t.document.body);e.addRange(i);i.collapse(!1)}}});if("gecko"===t._$KERNEL.engine)I$("49440cd1d2530c2c966f7161146cc696",function(){i.__insertLineBreak=function(t){t.execCommand("insertHTML",!1,"

")};i.__getTextContent=function(){var t=/inline|cell/i;var i=function(e){return!t.test(window.getComputedStyle(e,null).display||"")};var n=function(t,s){var a=t.childNodes;if(0!==a.length||t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.TEXT_NODE){if(0===a.length)return;if(s.length>0)if("\n"!==s[s.length-1]&&i(t))s.push("\n");else s.push(" ");e._$forEach(a,function(t){n(t,s)})}else s.push(t.textContent||t.nodeValue||"")};return function(t){var e=[];n(t,e);return e.join("")}}()});return i},"e7be6ff9122e14c2be65196e9dffe066","fbbf6ddc0634989027d138f4ffd4b78b","3d11bad61274f72cc4672369e4367f45");I$("3c211b458888deac6eb931a8a8aa5f66",function(t,e,i,n,s,a,o,r,_,d,c,l,f,u,h,p,m,g,b){var v="YSF_MSG_"+n._$uniqueID()+"_";g._$$YSFEditor=t._$klass();b=g._$$YSFEditor._$extend(s._$$Abstract);b.__init=function(){this.__sopt={};this.__ropt={};this.__fopt={accept:"image/*",onchange:this.__onFileSelect._$bind(this)};this.__popt={clazz:"pc_portrait",btn:"portrait_btn",onSelect:this.__onPortraitSelect._$bind(this),onSendGIf:this.__onSendGIf._$bind(this)};this.__eopt={visible:!0,onload:this.__onIFrameLoaded._$bind(this)};this.__aopt={onselectItem:this.__onSelectRbItem._$bind(this)};this.__switchInputAssociation=!1;this.__super()};b.__reset=function(t){this.__super(t);this.__inputComposition=!1;e._$dataset(this.__fopt.btn,"log",t.log||"");this.__limit=parseInt(t.maxLength)||0;this.__placeholder=t.placeholder||"输入消息...";this.__doShowPlaceHolder();var i=parseInt(t.maxHeight)||0;if(i)this.__range=[0,i];this.__sopt.css=t.css||"";this.__iframe=e._$createXFrame(this.__eopt);this.__doInitDomEvent([[this.__nsender,"click",this.__doSubmitContent._$bind(this,{label:0})],[this.__nholder,"click",this._$focus._$bind(this)],[this.__nfile,"click",this.__onFileBtnClick._$bind(this)]]); this._$addEvent("oncansendfile",this.__onCanSendFile._$bind(this));if(t.popt){this.__popt=n._$merge(this.__popt,t.popt);this.__popt.parent=this.__popt.parent||this.__body;if(t.editFrom)this.__popt.newWebTrade=!0}this.__portrait=u._$$Portrait._$allocate(this.__popt);this.__ftOpt={node:this.__nfile,multiple:!0,onsend:this.__doSendFile._$bind(this)};this.__fileTransfer=l._$$FileTransfer._$allocate(this.__ftOpt);var s=window.setting.appkey;if(!this.__ccache){this.__ccache=f._$$Cache._$allocate({load_getCF:this.__getCFLists._$bind(this)});this.__ccache._$getCF({data:{appKey:s}})}};b.__getCFLists=function(t){this.__emojiLists=t;if(!this.__emojiLists.length){if(this.__popt.newWebTrade){e._$setStyle("portrait_btn","display","none");this._phLabel=e._$getByClassName(this.__body,"photo_label")[0];e._$setStyle(this._phLabel,"left","10px");this._fileLabel=e._$getByClassName(this.__body,"file_label")[0];e._$setStyle(this._fileLabel,"left","42px")}}else if(1==this.__emojiLists.length&&1!=this.__emojiLists[0].status&&this.__emojiLists[0].id==-1)if(this.__popt.newWebTrade){e._$setStyle("portrait_btn","display","none");this._phLabel=e._$getByClassName(this.__body,"photo_label")[0];e._$setStyle(this._phLabel,"left","10px");this._fileLabel=e._$getByClassName(this.__body,"file_label")[0];e._$setStyle(this._fileLabel,"left","42px")}};b.__destroy=function(){if(this.__scrollbar){this.__scrollbar._$recycle();delete this.__scrollbar}if(this.__observer){this.__observer.disconnect();delete this.__observer}if(this.__stimer){window.clearTimeout(this.__stimer);delete this.__stimer}e._$remove(this.__iframe);delete this.__iframe;delete this.__content;delete this.__range;this.__doHideToast();this._$clear();this.__super()};b.__initXGui=function(){var t=a._$parseUITemplate(p);return function(){this.__seed_tst=t.editToast;this.__seed_hld=t.editPlaceHolder;this.__seed_cnt=t.editStyle;this.__seed_html=t.editBody}}();b.__initNode=function(){this.__super();var t=e._$getByClassName(this.__body,"j-flag");this.__richText=e._$getByClassName(this.__body,"j-richflag")[0];this.__eopt.parent=t[1];this.__ropt.container=t[1];this.__fopt.btn=t[0];this.__fopt.form=t[3];this.__fopt.parent=this.__body;r._$bind(this.__fopt.btn,this.__fopt);this.__nsender=t[2];this.__ntoast=e._$html2node(a._$getTextTemplate(this.__seed_tst));this.__nholder=e._$html2node(a._$getTextTemplate(this.__seed_hld));this.__nfile=e._$getByClassName(this.__body,"j-fflag")[0];if(!this.__inputAssociation)this.__inputAssociation=new h(this.__aopt).$inject(t[2],"before")};b.__getViewPort=function(){try{return this.__iframe.contentWindow}catch(t){}};b.__getContext=function(){try{return this.__getViewPort().document}catch(t){}};b.__getBody=function(){try{var t=this.__getContext().body;return"true"==t.contentEditable?t:null}catch(e){}};b.__hasContent=function(){var t=this.__getBody(),e=this.__getTextContent(t).trim();if(!e)return u._$hasPortrait(t);else return!!e};b.__getTextContent=function(t){return m.__getTextContent(t||this.__getBody())};b.__doShowToast=function(t){this.__doHideToast();this.__body.appendChild(this.__ntoast);this.__ntoast.getElementsByTagName("h4")[0].innerHTML=t;this.__xtimer=window.setTimeout(this.__doHideToast._$bind(this),5e3)};b.__doHideToast=function(){if(this.__xtimer)this.__xtimer=window.clearTimeout(this.__xtimer);e._$removeByEC(this.__ntoast)};b.__doShowPlaceHolder=function(t){t=t||this.__placeholder;this.__nholder.innerText=t;this.__eopt.parent.appendChild(this.__nholder)};b.__doHidePlaceHolder=function(){e._$removeByEC(this.__nholder)};b.__doDumpImageFromEvent=function(t){var e=[],i=t.clipboardData||window.clipboardData||{};n._$forEach(i.items,function(t){if(0===t.type.indexOf("image")){var i=t.getAsFile();e.push({file:i,url:URL.createObjectURL(i)})}});var s=t.dataTransfer||{};n._$forEach(s.files,function(t){if(0===t.type.indexOf("image"))e.push({file:t,url:URL.createObjectURL(t)})});return e};b.__doDumpImageFromContent=function(t){var e=[],i=t.getElementsByTagName("IMG");n._$reverseEach(i,function(t){var i=t.src||"";if(0===i.indexOf("data:image")||i.indexOf("nos.netease.com")>0||i.indexOf("nosdn.127.net")>=0){e.push({url:i,file:i});t.parentNode.removeChild(t)}});return e};b.__doDumpTextFromEvent=function(t){var e="",i=t.clipboardData;if(i)e=i.getData("text/plain");else if(window.clipboardData)e=clipboardData.getData("text");return e||""};b.__doCheckEnter=function(t){if(13==t.keyCode){i._$stop(t);var n=this.__inputAssociation&&this.__inputAssociation.entryItem();if(!n||"-1"==n.key1)if(!t.ctrlKey)this.__doSubmitContent({label:1});else{m.__insertLineBreak(this.__getContext());var s=e._$getStyle(this.__getBody(),"lineHeight"),a=parseInt(s)||20;this.__getViewPort().scrollBy(0,a);this.__doCheckScrollBar()}else{this._$dispatchEvent("onsubmit",{type:"text",content:n.value});this.__inputAssociation.hide()}}};b.__doCheckScrollBar=function(){var t=function(){delete this.__stimer;if(this.__scrollbar)this.__scrollbar._$resize()};return function(){if(!this.__stimer)this.__stimer=window.setTimeout(t._$bind(this),50)}}();b.__doCheckAutoHeight=function(){var t=this.__range;if(t&&t[0]!==t[1]){var i=this.__eopt.parent;if(!t[0]){if(!i.clientHeight)return;var n=i.clientHeight,s=t[1];t[0]=n;t[1]=Math.max(s,n)}var a=this.__getBody();if(a){e._$setStyle(i,"height","1px");var o=Math.max(t[0],Math.min(a.scrollHeight,t[1]));e._$setStyle(i,"height",o+"px");this._$dispatchEvent("onheightchange")}}};b.__doCheckInputLimit=function(t){if(this.__limit){if(null==t)t=this._$getContent().trim();if(t.length>this.__limit)this._$setContent(t.substr(0,this.__limit))}};b.__doCheckSubmitable=function(){this.__doDisableSubmit(!this.__hasContent())};b.__doCheckPlaceHolder=function(){var t=this.__hasContent();!t?this.__doShowPlaceHolder():this.__doHidePlaceHolder()};b.__doCheckEventMessage=function(t){var e=this.__doDumpTextFromEvent(t);if(0===e.indexOf(v)){i._$stop(t);this._$dispatchEvent("onsubmit",{type:"message",content:e.replace(v,"")})}};b.__doCheckEventImage=function(t){var e=this.__doDumpImageFromEvent(t);if(!e||!e.length){this.__filterRichContent(t);window.setTimeout(this.__doCheckContentImage._$bind(this),100)}else{i._$stop(t);this.__doPreviewImage(e)}};b.__doCheckContentImage=function(){var t=this.__getBody(),e=this.__doDumpImageFromContent(t);t.scrollTop=2*t.scrollHeight;m.__focusToEnd(this.__getViewPort());if(e&&e.length)this.__doPreviewImage(e)};b.__doSelectionChange=function(t){var e=this.__onSelectionChange._$bind(this);if(!window.MutationObserver){this.__doInitDomEvent([[t,"selectionchange",e]]);if(m.__hasSelectionHack())this.__doInitDomEvent([[t,"keydown",e],[t,"keyup",e]])}else{this.__observer=new MutationObserver(e);this.__observer.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0})}};b.__doLoadImage=function(t,e,i){var n=this,s=new Image;s.onload=function(){e.call(n,t)};s.onerror=function(){t.file=null;(i||e).call(n,t)};s.src=t.url};b.__doPreviewImage=function(){var t=function(t){var e=[];n._$forEach(t,function(t){if(t.file)e.push(t)});return e};return function(e){var i=0,s=this;if(!this.__onPreviewState){var a=function(){i++;if(i==e.length){var n=t(e);if(!n.length)this.__doSendImage({});else{s.__onPreviewState=!0;c._$preview({photos:n,onok:function(){s.__doSendImage(n);delete s.__onPreviewState},oncc:function(){delete s.__onPreviewState}})}}};n._$forEach(e,function(t){if(t.url)this.__doLoadImage(t,a,a);else i++},this)}}}();b.__doSendFile=function(t){n._$forEach(t,function(t){if(!(t.type.indexOf("video")>-1))this._$dispatchEvent("onsubmit",{type:"file",content:{file:t,name:t.name,size:t.size}});else{var e={file:t};e.url=URL.createObjectURL(e.file);this.__doSendVideo(e)}},this)};b.__doSendImage=function(t){if(!n._$isArray(t))this._$dispatchEvent("onsubmit",{type:"image",content:{url:t.url,file:t.file}});else n._$forEach(t,this.__doSendImage,this)};b.__doSendVideo=function(t){if(!n._$isArray(t))this._$dispatchEvent("onsubmit",{type:"video",content:{url:t.url,file:t.file}});else n._$forEach(t,this.__doSendVideo,this)};b.__doSubmitContent=function(t){var e=this._$getContent().trim();if(e)if(!(this.__limit&&e.length>this.__limit))this._$dispatchEvent("onsubmit",n._$merge({type:"text",content:e},t));else this._$toast("消息内容超过最大限制"+this.__limit+"个字符")};b.__doDisableSubmit=function(t){this.__nsender.disabled=!!t;!t?e._$delClassName(this.__nsender,"u-btn-disabled"):e._$addClassName(this.__nsender,"u-btn-disabled")};b.__doFocusToEnd=function(){m.__collapse(this.__getViewPort())};b.__doFocus=function(){this.__doHidePlaceHolder()};b.__doBlur=function(){this.__doCheckPlaceHolder()};b.__onIFrameLoaded=function(t){var e=this.__getContext();e.open();e.write(o._$get(this.__seed_cnt,this.__sopt));e.close();var n=this.__getViewPort();this.__doInitDomEvent([[e,"paste",this.__onContentPaste._$bind(this)],[e,"drop",this.__onFileDropIn._$bind(this)],[e,"keydown",this.__doCheckEnter._$bind(this)],[n,"focus",this.__doFocus._$bind(this)],[n,"blur",this.__doBlur._$bind(this)],[n,"scroll",this.__doCheckScrollBar._$bind(this)],[e,"click",i._$dispatchEvent._$bind(i,document,"click")],[e,"beforedeactivate",this.__doSaveSelection._$bind(this)],[e,"compositionstart",this.__onCompositionStart._$bind(this)],[e,"compositionend",this.__onCompositionEnd._$bind(this)],[e,"keyup",this.__onKeyup._$bind(this)]]);this.__doSelectionChange(e);try{e.execCommand("enableObjectResizing",!1,!1)}catch(s){}this.__ropt.parent=e.body;this.__ropt.sbody=this.__getViewPort();this.__scrollbar=d._$$Scrollbar._$allocate(this.__ropt);this._$setContent(this.__content||"");this.__setIframeStyle(e)};b.__doSaveSelection=function(){this.__range=m.__saveSelection(this.__getViewPort())};b.__onSelectionChange=function(t){var e=this._$getContent();this.__doCheckSubmitable();this.__doCheckAutoHeight();!this.__inputComposition&&this._$dispatchEvent("oninputchange",e);this.__inputAssociation.$emit("change",{inputcontent:e})};b.__onContentPaste=function(t){this.__doCheckEventMessage(t);if(!this.__disSendImg)this.__doCheckEventImage(t);else{this.__stopImgEvent(t); this.__filterRichContent(t)}};b.__onFileSelect=function(t){var i=e._$get(t.id),n={file:(i.files||[])[0]};if(!n.file)n.file=i;else if(n.file.type.indexOf("image")<0)n.file=null;else n.url=URL.createObjectURL(n.file);this.__doLoadImage(n,this.__doSendImage)};b.__onFileDropIn=function(t){if(!this.__disSendImg){this.__doCheckEventImage(t);i._$stop(t);window.setTimeout(this.__doFocusToEnd._$bind(this),150)}else this.__stopImgEvent(t)};b.__onSendGIf=function(t){var e={};var i='';e=n._$merge(e,{type:"rich",content:i});this._$dispatchEvent("onsubmit",e)};b.__onPortraitSelect=function(t){var e=this.__getContext();try{this._$focus();m.__fixFocus(this.__getViewPort());this.__doScrollToCursor();m.__insertHTML(e,t.html)}catch(i){console.log(i)}this.__onSelectionChange()};b.__doScrollToCursor=function(){var t=this.__getViewPort(),e=m.__getPosition(t);if(e)if(t)t.scrollTo(0,e.top||0)};b._$setContent=function(t,e){var i=this.__getBody();var n=document.createElement("div");if(i){delete this.__content;if("innerText"in n)n.innerText=t||"";else n.textContent=t||"";i.innerHTML=this.__text2portrait(n.innerHTML);if(!e)this.__onSelectionChange();else this._$dispatchEvent("oninputchange",t,e)}else this.__content=t||""};b._$getContent=function(){var t=this.__getBody(),e=u._$formatPortrait(t)||t;return this.__getTextContent(e)};b._$reset=function(){this._$resetFile();this._$resetContent()};b._$resetFile=function(){this.__fopt.form.reset()};b._$resetContent=function(){this._$setContent("")};b._$focus=function(){var t=this.__getViewPort();if(t){this.__doHidePlaceHolder();t.focus();m.__revertSelection(t,this.__range);delete this.__range}};b._$blur=function(){this.__focus=!1;window.focus()};b._$disable=function(t){!t?e._$delClassName(this.__body,"z-disabled"):e._$addClassName(this.__body,"z-disabled");this.__portrait._$hide()};b._$toast=function(t){if(!t)this.__doHideToast();else this.__doShowToast(t)};b._$placeholder=function(t){this._$reset();this.__doShowPlaceHolder(t)};b._$clear=function(t){t=t||{};if(!t.disabled&&t.focus){this._$reset();this._$focus()}else{this._$blur();this._$placeholder(t.placeholder);this._$disable(!!t.disabled);if(t.toast)this.__doShowToast(t.toast)}};g._$copy=function(t){i._$addEvent(t,"copy",function(t){var n=i._$getElement(t,"d:copyId");if(n){i._$stop(t);var s=v+e._$dataset(n,"copyId");if(t.clipboardData)t.clipboardData.setData("text/plain",s);else if(window.clipboardData)clipboardData.setData("text",s)}})};b.__portrait2text=function(t){return u._$portrait2text(t)};b.__text2portrait=function(t){return u._$text2portrait(t)};b._$toggleOpr=function(t){if(t){e._$addClassName(this.__richText,"u-status-robot");e._$addClassName(this.__fopt.btn,"f-dn");e._$addClassName("portrait_btn","f-dn");e._$addClassName(this.__nfile,"f-dn");this.__portrait._$hide()}else{e._$delClassName(this.__richText,"u-status-robot");e._$delClassName(this.__fopt.btn,"f-dn");e._$delClassName("portrait_btn","f-dn");e._$delClassName(this.__nfile,"f-dn")}this._$setDisSendImg(t)};b.__filterRichContent=function(t){i._$stop(t);var e=this.__getContext();var s=this.__doDumpTextFromEvent(t);s=this.__text2portrait(s);m.__insertHTML(e,n._$escape(s))};b._$setDisSendImg=function(t){t?this.__disSendImg=!0:delete this.__disSendImg};b.__stopImgEvent=function(t){var e=this.__doDumpImageFromEvent(t);if(!e||!e.length);else i._$stop(t)};b.__onFileBtnClick=function(t){this.__timestamp=n._$uniqueID();this._$dispatchEvent("checkcansendfile",this.__timestamp)};b.__onCanSendFile=function(t){if(t.timestamp==this.__timestamp){this.__canSend=!!t.result;this.__fileTransfer._$dispatchEvent("oncansendfile",{result:this.__canSend})}};b.__setIframeStyle=function(t){var e=function(t,e,i,n){if(t&&i){i="#"+i;if(!e)var s=t+"{"+i+"}";else s=t+"{"+e+":"+i+"}";var a=document.createTextNode(s);n.appendChild(a)}};var i=n._$query2object(location.search.substr(1)),s=i["editorColor"],a=i["editorBgColor"];if(s||a){var o=t.createElement("style"),r=t.head;o.type="text/css";r.appendChild(o);e("body","color",s,o);e("body","background-color",a,o)}};b.__onCompositionStart=function(t){this.__inputComposition=!0};b.__onCompositionEnd=function(t){this.__inputComposition=!1;var e=this._$getContent();!this.__inputComposition&&this._$dispatchEvent("oninputchange",e);this.__inputAssociation.$emit("change",{inputcontent:e})};b.__onKeyup=function(t){if(38===t.keyCode||40===t.keyCode){var e={keyCode:t.keyCode};if(this.__inputAssociation&&this.__inputAssociation.entryItem().qalist.length>0)this.__inputAssociation.$emit("keyboard",e)}};b.__onSelectRbItem=function(){var t=this.__inputAssociation.entryItem();this._$dispatchEvent("onsubmit",{type:"text",content:t.value});this.__inputAssociation.hide()};b._$renderInputAssociation=function(t){var e={qalist:t,inputcontent:this._$getContent().trim()};this.__inputAssociation.$emit("change",e);this.__inputAssociation.show()};b._$hideInputAssociation=function(){this.__inputAssociation.hide()}},"e4f0b0b7857ed3c1e2d0a46ba5b670d6","5fb495f256a5dcde2a92e5fe919a6422","be567474249a271e4786c144ccf5f75a","fbbf6ddc0634989027d138f4ffd4b78b","8fe733a225a830dc6b1da5866dcaf23c","d252039c36767cb4f534ca3f91188796","2a0f6f00e8af2a07d5b9a7c4620f5b4e","9733787c25ceca396cb6e8dcce07ee63","b8c452dcf5e5dd56a4db87471ce5da65","c711308f00adca75206c9dc3966a29d2","c1d55708b36e5cee72cf23349b7f94da","81e4c9c4999784e360c6a2b666dc5320","ccb6b7d0ce45c3548151b739858e96c8","00b1248fcdd93958d87e26de99277f67","f2b46c0ee658f65c8607f9d898c02a66","fc5aed51c0df9784c68a9c2b6896c8ea","2a3d8899990b1a57302aa0f0bb6e9ec4");I$("9b42795f59bfa55be8f84d79b287510a",function(t,e,i,n,s,a,o){a._$$HeadTab=t._$klass();o=a._$$HeadTab._$extend(s._$$Abstract);o.__reset=function(t){this.__super(t);this.tab={node:t.node,list:t.list,total:t.list.length,offset:0,parentWidth:t.parentWidth,selected:t.selected||"z-crt"};this.startNodeIndexMap=[0];this.currentNodeIndex=0;if(t.node){n._$merge(this.tab,{icon:this.__initIconNode(t.node)});this.__initEvent();this.__resetTab();e._$style(this.tab.node,{left:"0px",position:"absolute"})}};o.__initIconNode=function(t){var i=t.parentNode.parentNode;if(i){var s=function(t){var e=document.createElement("a");e.className=t;return e};var a=function(t){var i=e._$getChildren(t,"j-flag-triangle");n._$forEach(i,function(t){e._$remove(t)})};a(i);var o=s("icon-triangle-left j-flag-triangle");var r=s("icon-triangle-right j-flag-triangle");i.appendChild(o);i.appendChild(r);return[o,r]}};o.__initEvent=function(){i._$addEvent(this.tab.icon[0],"click",this.__clickLeftIcon._$bind(this));i._$addEvent(this.tab.icon[1],"click",this.__clickRightIcon._$bind(this));this._$addEvent("onresize",this.__onWidthResize._$bind(this))};o.__resetTab=function(){var t=this.tab.node.parentNode.offsetWidth,i=this.tab.node.scrollWidth,n=Math.ceil(i/t);this.startNodeIndexMap=[0];var s=0;for(var a=0,o=this.tab.list.length;al){s=c;this.startNodeIndexMap.push(a)}}this.__setIcon()};o.__onPageChange=function(){this.__setIcon();this.__positionScreen()};o.__setIcon=function(){e._$setStyle(this.tab.icon[0],"display","none");e._$setStyle(this.tab.icon[1],"display","none");if(void 0!=this.__getPreStartNodeIndex())e._$setStyle(this.tab.icon[0],"display","block");if(this.__getNextStartNodeIndex())e._$setStyle(this.tab.icon[1],"display","block")};o.__positionScreen=function(){var t=3;var i=this.tab.list[this.currentNodeIndex];var n=e._$offset(i,i.parentNode).x||0;e._$setStyle(this.tab.node,"left",-n+t+"px")};o.__clickLeftIcon=function(t){var e=this.__getPreStartNodeIndex();if(void 0!=e){this.currentNodeIndex=e;this.__onPageChange()}};o.__clickRightIcon=function(t){var e=this.__getNextStartNodeIndex();this.currentNodeIndex=e;this.__onPageChange()};o.__getPreStartNodeIndex=function(){for(var t=this.startNodeIndexMap.length-1;t>=0;t--){var e=this.startNodeIndexMap[t];if(ethis.currentNodeIndex)return e}return!1};o.__onWidthResize=function(){this.__resetTab()};o._$recycle=function(){i._$delEvent(this.tab.icon[0],"click");i._$delEvent(this.tab.icon[1],"click");this.__super()}},"e4f0b0b7857ed3c1e2d0a46ba5b670d6","5fb495f256a5dcde2a92e5fe919a6422","be567474249a271e4786c144ccf5f75a","fbbf6ddc0634989027d138f4ffd4b78b","8fe733a225a830dc6b1da5866dcaf23c");I$("b02d8d903f51634e97264ccb64933373",'\n\n\n');I$("21e5b22e71937c4475a2de368ed9e491",function(t,e,i,n,s,a,o,r,_,d,c){d._$$BotEntry=t._$klass();c=d._$$BotEntry._$extend(s._$$Abstract);c.__reset=function(t){this.__super(t);var i=t.list;var n=this;this.__timer={};this.__timer["resize"]=null;if(i&&i.length>0)this.__renderList(t.list);e._$addEvent(window,"resize",function(t){if(n.__timer.resize)clearTimeout(n.__timer.resize);n.__timer.resize=setTimeout(function(){n.__ht._$dispatchEvent("onresize")},500)})};c.__destroy=function(){this.__super()};c.__initXGui=function(){var t=a._$parseUITemplate(_);return function(){this.__seed_html=t.lbEntry;this.__seed_list=t.lbList}}();c.__initNode=function(){this.__super();this.__delegate(this.__body,"li",this.__selectItem._$bind(this));i._$style(this.__body,{right:"20px",left:"20px",height:"100%",position:"absolute",overflow:"hidden"})};c.__renderList=function(t,e){o._$render(this.__body,this.__seed_list,{list:t,showEval:e});var n=i._$getByClassName(this.__body,"j-flag")[0];var t=i._$getChildren(n); this.__ht=r._$$HeadTab._$allocate({node:n,list:t})};c.__delegate=function(t,i,n){var s=this;e._$addEvent(t,"click",function(t){var s=e._$getElement(t,"t:"+i);if(s){s.innerText&&DATracker&&DATracker.track("bot_entry",{name:s.innerText});n(s)}})};c.__selectItem=function(t){var e=i._$dataset(t,"label"),n=i._$dataset(t,"action"),s=i._$dataset(t,"url");this._$dispatchEvent("select",{label:e,action:n,url:s})}},"e4f0b0b7857ed3c1e2d0a46ba5b670d6","be567474249a271e4786c144ccf5f75a","5fb495f256a5dcde2a92e5fe919a6422","fbbf6ddc0634989027d138f4ffd4b78b","8fe733a225a830dc6b1da5866dcaf23c","d252039c36767cb4f534ca3f91188796","2a0f6f00e8af2a07d5b9a7c4620f5b4e","9b42795f59bfa55be8f84d79b287510a","b02d8d903f51634e97264ccb64933373");I$("462784759f136bedba5a0d03f454e788","");I$("2ae4b3f868c159318a2eff6d37fe4259",function(t,e,i,n,s){return i.extend({name:"bot-drawerModal",config:function(t){e._$extend(t,{contentTemplate:s,"class":"m-modal-botDrawer",closeButton:!0,okButton:!1,cancelButton:!1,hideFooter:!0,title:t.template.title||" "});this.supr(t)},init:function(){this.supr()},destroy:function(){this.supr()},onSelectItem:function(t){this.$emit("selectItem",t)}})},"be567474249a271e4786c144ccf5f75a","3e346f2b6313e57a75f5ee9b603c4b65","fdec2b215e7e7770f7e7b5af3422ee86","7ccdd01e9d3ce809aac4bc84d0216707","462784759f136bedba5a0d03f454e788");I$("8c7d64f10ed8f664dc200c4c4ad16191",function(t,e,i,n,s,a,o,r,_,d,c,l,f,u,h,p,m,g,b,v,$,y,x,w,S){S=t._$klass();w=S._$extend(y._$$Module);w.__doBuild=function(){this.__super();this.__scrollToNodeOffset=75};w.__onShow=function(t){this.__super(t)};w.__onRefresh=function(t){this.__super(t)};w.__onHide=function(){this.__super()};w.__initEditorConfig=function(t){this.__super();this.__eopt={popt:{parent:"ysf-client",col:12},maxLength:4500,parent:t,editFrom:"trade",placeholder:window.setting.inputPlaceholder,onsubmit:this.__editorSubmit._$bind(this),oninputchange:this.__onInputChange._$bind(this),checkcansendfile:this.__checkCanSendFile._$bind(this)}};w.__initEditor=function(){if(!this.__editor){this.__editor=f._$$YSFEditor._$allocate(this.__eopt);this.__editor._$toggleOpr(!0)}};w.__initEventListener=function(){this.__super();if(1!=window.setting.winType&&!window.setting.tradeTag)this.__doInitDomEvent([[window,"beforeunload",this.__onBeforeUnload._$bind(this)]]);$._$delegateWithStopEvent(this,this.__body,{picHref:this.__picHref._$bind(this)})};w.__setEditorContent=function(t){if(this.__editor){var e=t.shop.editorContent;if(e){this.__editor._$setContent(e);this.__editor._$resetFile();this.__editor.__portrait._$hide();this.__editor._$focus()}else this.__editor._$clear({focus:!1})}};w.__richContentDelegate=function(t,i){i=i||window.event;var s=e._$getElement(i,"d:group");if(s){var a=n._$dataset(s,"url");window.open(a,"_blank")}var o=e._$getElement(i,"t:a");if(o)this.__onRichContentLinkClick(o,i)};w.__picHref=function(t){var e=n._$dataset(t,"href");window.open($._$getOriginImageUrl(e),"_blank")};w.__renderBotEntry=function(t){if(this.__botentry)this.__botentry._$recycle();var e=n._$getByClassName(this.__body,"j-flag-bot")[0],i=n._$getByClassName(this.__body,"j-chat")[0];var s=n._$getStyle(e,"bottom");if(!t.kefu.isRobot&&t.entranceSetting&&t.entranceSetting.length>=1){var a=$._$copy(t.entranceSetting);for(var o=a.length-1;o>=0;o--)if(!("evaluate"!=a[o].action||t.sessionStatus&&t.sessionStatus.initShowEvaluation))a.splice(o,1)}if(t.kefu.isRobot&&(!t.bot||t.bot.length<1)||!t.kefu.isRobot&&(!a||a.length<1)){n._$style(i,{bottom:n._$getStyle(e,"bottom")});n._$style(e,{opacity:0,"z-index":-1e3})}else{n._$style(e,{opacity:1,"z-index":0});n._$style(i,{bottom:parseInt(s.replace(/px/gi,""))+e.offsetHeight+"px"});var r=t.kefu.isRobot?$._$copy(t.bot):a;this.__botentry=b._$$BotEntry._$allocate({parent:e,list:r,select:this.__onBotEntrySelect._$bind(this)})}};w.__initBotDrawerModal=function(t){this.__botDrawerModal=new v({data:{template:t.content.template}}).$inject(document.body).$on("selectItem",function(e){this.__onSelectBotBubbleItem(e,t,this.__botDrawerModal)}._$bind(this))};y._$regist("chat",S)},"e4f0b0b7857ed3c1e2d0a46ba5b670d6","be567474249a271e4786c144ccf5f75a","fbbf6ddc0634989027d138f4ffd4b78b","5fb495f256a5dcde2a92e5fe919a6422","d252039c36767cb4f534ca3f91188796","2a0f6f00e8af2a07d5b9a7c4620f5b4e","d99f29446b4a4cf86c6084cb99df7ab0","aa835e6c54cfdee711ae8d0d1296fa57","e4a45dc3cf399bf73004ce111fd4b206","f0b1d7ff05e74da750d6bb82da881934","d67add781b37b82c1816b8c159701e56","4e09e3c278408cd8001c7779e34c93e9","3c211b458888deac6eb931a8a8aa5f66","00b1248fcdd93958d87e26de99277f67","93872d9c4b2f20c68917dbdfa2b58e43","9e07459e62a4073031ead15e8b2bc7b2","57b425e54e094947e45b4232d3c28d89","aac22a477c227075a6def1f716ee003f","21e5b22e71937c4475a2de368ed9e491","2ae4b3f868c159318a2eff6d37fe4259","35df4ef4567b6cd0275a1b849d2bea8c","36d99ebff621b8efb3f90d915049bdd7");
\n\n');I$("8ae6eae18399c1d213cfd2e7fd33c429",function(t,e,i,n,s,a,o,r,_,d,c){d._$$FAQ=t._$klass();c=d._$$FAQ._$extend(s._$$Abstract);c.__init=function(){this.__super()};c.__reset=function(t){this.__super(t);o._$render(this.__container,this.__seed_info,{companyInfo:this.__parseAInfo(window.companyInfo)});this.__initEvent();this.__buildFAQHeight()};c.__destroy=function(){this.__super()};c.__initXGui=function(){var t=a._$parseUITemplate(_);return function(){this.__seed_html=t.faqBody;this.__seed_info=t.faqInfo}}();c.__initNode=function(){this.__super();this.__container=this.__body};c.__toogleQuestion=function(t){var e=t.parentNode.parentNode,n=t.parentNode.getElementsByTagName("p")[0],s=t.parentNode.getElementsByTagName("i")[0],a=i._$hasClassName(s,"u-icon-infodown");this.__disableQuestionList(e);if(a){i._$delClassName(n,"f-dn");i._$replaceClassName(s,"u-icon-infodown","u-icon-infoup")}else{i._$replaceClassName(s,"u-icon-infoup","u-icon-infodown");i._$addClassName(n,"f-dn")}};c.__disableQuestionList=function(t){var e=t.getElementsByTagName("p"),n=t.getElementsByTagName("i");for(var s=0;s